Add validation and interactive guidance to /create-capability #76

Open
opened 2026-01-10 14:27:53 +00:00 by HugoNijhuis · 0 comments
Owner

Summary

Enhance the /create-capability command with validation of generated files and interactive guidance to help users make good design decisions.

For

Flowmade Developers - "Help me encode best practices so AI applies them"

Validation Checks

Before creating files, validate:

Frontmatter Validation

  • Required fields present per component type
  • Model is a valid value (haiku, sonnet, opus)
  • Tools listed are valid tool names
  • Skills referenced exist (for agents)

Content Validation

  • Skill description includes trigger conditions
  • Command has clear step-by-step instructions
  • Agent has defined capabilities and behavior sections
  • Inter-component references are correct:
    • @~/.claude/skills/name/SKILL.md paths valid
    • Agent skills: list matches actual skill names

Convention Checks

  • File names follow conventions (SKILL.md uppercase, commands lowercase)
  • Directory structure is correct
  • No duplicate capability names

Interactive Guidance

Help users make good decisions during capability creation:

Component Selection

When user describes capability, ask clarifying questions:

  • "Will this knowledge apply automatically, or is it user-invoked?" → skill vs command
  • "Does this need isolated context for complex work?" → agent needed?
  • "Is this read-only analysis or does it modify files?" → tool restrictions

Model Selection

Guide based on task complexity:

  • "This seems like a simple display task - recommend haiku for speed"
  • "This involves code generation - recommend sonnet"
  • "This requires architectural analysis - recommend opus"

Warning on Anti-patterns

Warn if generated capability shows signs of:

  • Skill body with "when to use" (should be in description)
  • Agent without tool restrictions when read-only
  • Command without skill references when domain knowledge needed
  • Overly broad agent tools

Acceptance Criteria

  • Validation runs before file creation
  • Clear error messages for validation failures
  • Interactive questions guide component selection
  • Model recommendations based on task analysis
  • Warnings for anti-patterns
  • Option to proceed despite warnings

Dependencies

  • #75 (/create-capability command)

Context

Ensures generated capabilities follow best practices. Reduces need for manual review and rework.

## Summary Enhance the `/create-capability` command with validation of generated files and interactive guidance to help users make good design decisions. ## For Flowmade Developers - "Help me encode best practices so AI applies them" ## Validation Checks Before creating files, validate: ### Frontmatter Validation - [ ] Required fields present per component type - [ ] Model is a valid value (haiku, sonnet, opus) - [ ] Tools listed are valid tool names - [ ] Skills referenced exist (for agents) ### Content Validation - [ ] Skill description includes trigger conditions - [ ] Command has clear step-by-step instructions - [ ] Agent has defined capabilities and behavior sections - [ ] Inter-component references are correct: - `@~/.claude/skills/name/SKILL.md` paths valid - Agent `skills:` list matches actual skill names ### Convention Checks - [ ] File names follow conventions (SKILL.md uppercase, commands lowercase) - [ ] Directory structure is correct - [ ] No duplicate capability names ## Interactive Guidance Help users make good decisions during capability creation: ### Component Selection When user describes capability, ask clarifying questions: - "Will this knowledge apply automatically, or is it user-invoked?" → skill vs command - "Does this need isolated context for complex work?" → agent needed? - "Is this read-only analysis or does it modify files?" → tool restrictions ### Model Selection Guide based on task complexity: - "This seems like a simple display task - recommend haiku for speed" - "This involves code generation - recommend sonnet" - "This requires architectural analysis - recommend opus" ### Warning on Anti-patterns Warn if generated capability shows signs of: - Skill body with "when to use" (should be in description) - Agent without tool restrictions when read-only - Command without skill references when domain knowledge needed - Overly broad agent tools ## Acceptance Criteria - [ ] Validation runs before file creation - [ ] Clear error messages for validation failures - [ ] Interactive questions guide component selection - [ ] Model recommendations based on task analysis - [ ] Warnings for anti-patterns - [ ] Option to proceed despite warnings ## Dependencies - #75 (/create-capability command) ## Context Ensures generated capabilities follow best practices. Reduces need for manual review and rework.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Reference: flowmade-one/architecture#76