Add "lessons/patterns/command-frontmatter-missing-name-field-causes-silent-load-failure"

2026-02-03 04:02:39 +00:00
parent c9d13fde76
commit 3bbb0e6c2a

@@ -0,0 +1,52 @@
# Command Frontmatter Missing Name Field
## Date
2026-02-03
## Summary
Commands MUST have a `name:` field in their YAML frontmatter. Without it, the skill won't be registered and the plugin appears to silently fail to load.
## What Happened
1. During the projman refactor (commit 2e65b60), commands were rewritten
2. The `name:` field was NOT added to projman commands
3. Other plugins (git-flow, claude-config-maintainer) got the name field during their refactors
4. projman commands only had `description:` and `agent:` fields
5. Skills for projman never appeared in the session
## Correct Command Frontmatter
```yaml
---
name: sprint-plan
description: Start sprint planning with AI-guided architecture analysis
agent: planner
---
```
## Wrong (what we had)
```yaml
---
description: Start sprint planning with AI-guided architecture analysis
agent: planner
---
```
## Why This Wasn't Caught
1. No validation script checks for `name:` field in command frontmatter
2. The plugin "loads" but commands aren't registered as skills
3. User only notices when trying to use the command
## Fix
Added `name:` field to all 12 projman commands matching the filename (without .md extension).
## Prevention
Add validation to `validate-marketplace.sh` to check that all command files have `name:` field in frontmatter.
---
**Tags:** command, frontmatter, name-field, plugin-loading, stupid-mistakes