fix: addressed PR comments
This commit is contained in:
parent
0227b55eee
commit
af75e9d8a1
|
|
@ -6,6 +6,17 @@ npx --no-install lint-staged
|
||||||
# Validate everything
|
# Validate everything
|
||||||
npm test
|
npm test
|
||||||
|
|
||||||
|
# Validate marketplace manifest when skills or manifest change
|
||||||
|
if command -v rg >/dev/null 2>&1; then
|
||||||
|
if git diff --cached --name-only | rg -q 'SKILL\.md|\.claude-plugin/marketplace\.json'; then
|
||||||
|
npm run validate:marketplace
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if git diff --cached --name-only | grep -Eq 'SKILL\.md|\.claude-plugin/marketplace\.json'; then
|
||||||
|
npm run validate:marketplace
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Validate docs links only when docs change
|
# Validate docs links only when docs change
|
||||||
if command -v rg >/dev/null 2>&1; then
|
if command -v rg >/dev/null 2>&1; then
|
||||||
if git diff --cached --name-only | rg -q '^docs/'; then
|
if git diff --cached --name-only | rg -q '^docs/'; then
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ Build software faster using AI-powered workflows with specialized agents that gu
|
||||||
- **Git** — Recommended for version control
|
- **Git** — Recommended for version control
|
||||||
- **AI-powered IDE** — Claude Code, Cursor, or similar
|
- **AI-powered IDE** — Claude Code, Cursor, or similar
|
||||||
- **A project idea** — Even a simple one works for learning
|
- **A project idea** — Even a simple one works for learning
|
||||||
:::
|
|
||||||
|
:::
|
||||||
|
|
||||||
:::tip[The Easiest Path]
|
:::tip[The Easiest Path]
|
||||||
**Install** → `npx bmad-method install`
|
**Install** → `npx bmad-method install`
|
||||||
|
|
@ -285,6 +286,7 @@ BMad-Help inspects your project, detects what you've completed, and tells you ex
|
||||||
- **Always use fresh chats** — Start a new chat for each workflow
|
- **Always use fresh chats** — Start a new chat for each workflow
|
||||||
- **Track matters** — Quick Flow uses `bmad-quick-dev`; Method/Enterprise need PRD and architecture
|
- **Track matters** — Quick Flow uses `bmad-quick-dev`; Method/Enterprise need PRD and architecture
|
||||||
- **BMad-Help runs automatically** — Every workflow ends with guidance on what's next
|
- **BMad-Help runs automatically** — Every workflow ends with guidance on what's next
|
||||||
:::
|
|
||||||
|
:::
|
||||||
|
|
||||||
Ready to start? Install BMad, invoke `bmad-help`, and let your intelligent guide lead the way.
|
Ready to start? Install BMad, invoke `bmad-help`, and let your intelligent guide lead the way.
|
||||||
|
|
|
||||||
|
|
@ -86,10 +86,15 @@ function validate() {
|
||||||
return { ok: false, fatal: `marketplace.json is not valid JSON: ${error.message}` };
|
return { ok: false, fatal: `marketplace.json is not valid JSON: ${error.message}` };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!fs.existsSync(SRC_DIR)) {
|
||||||
|
return { ok: false, fatal: `src directory not found at ${SRC_DIR}` };
|
||||||
|
}
|
||||||
|
|
||||||
const plugins = Array.isArray(marketplace.plugins) ? marketplace.plugins : [];
|
const plugins = Array.isArray(marketplace.plugins) ? marketplace.plugins : [];
|
||||||
const declaredBy = new Map(); // skillPath -> [pluginName]
|
const declaredBy = new Map(); // skillPath -> [pluginName]
|
||||||
for (const plugin of plugins) {
|
for (const plugin of plugins) {
|
||||||
for (const skillPath of plugin.skills || []) {
|
const skills = Array.isArray(plugin.skills) ? plugin.skills : [];
|
||||||
|
for (const skillPath of skills) {
|
||||||
if (!declaredBy.has(skillPath)) declaredBy.set(skillPath, []);
|
if (!declaredBy.has(skillPath)) declaredBy.set(skillPath, []);
|
||||||
declaredBy.get(skillPath).push(plugin.name);
|
declaredBy.get(skillPath).push(plugin.name);
|
||||||
}
|
}
|
||||||
|
|
@ -111,9 +116,16 @@ function validate() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const duplicates = []; // same path declared by multiple plugins
|
const duplicates = []; // same path declared more than once (within or across plugins)
|
||||||
for (const [skillPath, names] of declaredBy) {
|
for (const [skillPath, names] of declaredBy) {
|
||||||
if (names.length > 1) duplicates.push({ path: skillPath, declaredBy: names });
|
if (names.length > 1) {
|
||||||
|
const uniquePlugins = [...new Set(names)];
|
||||||
|
duplicates.push({
|
||||||
|
path: skillPath,
|
||||||
|
declaredBy: uniquePlugins,
|
||||||
|
withinSamePlugin: uniquePlugins.length === 1,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
@ -149,9 +161,12 @@ function reportHuman(result) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (duplicates.length > 0) {
|
if (duplicates.length > 0) {
|
||||||
console.log(`\n✗ ${duplicates.length} skill path(s) declared by multiple plugins:`);
|
console.log(`\n✗ ${duplicates.length} skill path(s) declared more than once:`);
|
||||||
for (const d of duplicates) {
|
for (const d of duplicates) {
|
||||||
console.log(` ${d.path} (in: ${d.declaredBy.join(', ')})`);
|
const where = d.withinSamePlugin
|
||||||
|
? `listed multiple times in "${d.declaredBy[0]}"`
|
||||||
|
: `in multiple plugins: ${d.declaredBy.join(', ')}`;
|
||||||
|
console.log(` ${d.path} (${where})`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue