refactor(agents): derive identity from directory name#2046
refactor(agents): derive identity from directory name#2046
Conversation
Remove redundant name, canonicalId, and module fields from all 9 agent sidecar manifests. Update manifest-generator, bmad-artifacts, path-utils, skill-manifest, and _config-driven to derive identity from directory name and module context instead of reading from YAML. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR shifts identity resolution from manifest-provided fields to directory-derived names. Removes Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Augment PR SummarySummary: This PR refactors agent/skill identity handling so IDs and names are derived from path/directory conventions rather than sidecar manifest fields. Changes:
Technical Notes: The net effect is fewer redundant metadata fields and more convention-based naming across installers, manifests, and tests. 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tools/cli/installers/lib/ide/shared/skill-manifest.js`:
- Around line 35-39: The current single-entry manifest handling (check of
manifest.__single.type) clears canonicalId for any typed single-entry manifest;
change the logic in the single-entry branch so that only types 'agent' or
'skill' cause canonicalId to be ignored: check manifest.__single.type strictly
against 'agent' and 'skill' and return '' only for those values, otherwise
return manifest.__single.canonicalId || ''. Update the condition that references
manifest.__single.type in skill-manifest.js accordingly to preserve canonicalId
for other types like 'workflow', 'task', and 'tool'.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 98276fa1-117d-45f9-ae35-a6172265e84d
📒 Files selected for processing (15)
src/bmm/agents/bmad-agent-analyst/bmad-skill-manifest.yamlsrc/bmm/agents/bmad-agent-architect/bmad-skill-manifest.yamlsrc/bmm/agents/bmad-agent-dev/bmad-skill-manifest.yamlsrc/bmm/agents/bmad-agent-pm/bmad-skill-manifest.yamlsrc/bmm/agents/bmad-agent-qa/bmad-skill-manifest.yamlsrc/bmm/agents/bmad-agent-quick-flow-solo-dev/bmad-skill-manifest.yamlsrc/bmm/agents/bmad-agent-sm/bmad-skill-manifest.yamlsrc/bmm/agents/bmad-agent-tech-writer/bmad-skill-manifest.yamlsrc/bmm/agents/bmad-agent-ux-designer/bmad-skill-manifest.yamltest/test-installation-components.jstools/cli/installers/lib/core/manifest-generator.jstools/cli/installers/lib/ide/_config-driven.jstools/cli/installers/lib/ide/shared/bmad-artifacts.jstools/cli/installers/lib/ide/shared/path-utils.jstools/cli/installers/lib/ide/shared/skill-manifest.js
💤 Files with no reviewable changes (9)
- src/bmm/agents/bmad-agent-quick-flow-solo-dev/bmad-skill-manifest.yaml
- src/bmm/agents/bmad-agent-sm/bmad-skill-manifest.yaml
- src/bmm/agents/bmad-agent-qa/bmad-skill-manifest.yaml
- src/bmm/agents/bmad-agent-tech-writer/bmad-skill-manifest.yaml
- src/bmm/agents/bmad-agent-architect/bmad-skill-manifest.yaml
- src/bmm/agents/bmad-agent-analyst/bmad-skill-manifest.yaml
- src/bmm/agents/bmad-agent-pm/bmad-skill-manifest.yaml
- src/bmm/agents/bmad-agent-dev/bmad-skill-manifest.yaml
- src/bmm/agents/bmad-agent-ux-designer/bmad-skill-manifest.yaml
Summary
name,canonicalId, andmodulefields from all 9 agent sidecar manifests (bmad-skill-manifest.yaml)manifest-generator.js,bmad-artifacts.js,path-utils.js,skill-manifest.js, and_config-driven.jsto derive agent identity from directory name and module contextcollectSkills()Test plan
npm run test:install— 232 passed, 0 failednpm run validate:schemas && npm run test:schemas— 52 passed, 0 failed🤖 Generated with Claude Code