Commit cd06d00
Add Skills Support and Command→Agent→Skill Architecture (#15)
* feat: add skills infrastructure and 7 new auto-activate skills
Introduce model-invoked skills that automatically enforce quality
patterns without manual invocation. Skills activate based on context
and provide proactive quality gates during implementation.
Skills added:
- pattern-check: Enforce Result types, DI, immutability, pure functions
- test-design: Detect test quality issues (complex setup, difficult mocking)
- code-smell: Catch fake solutions, unlabeled workarounds, magic values
- research: Auto-trigger pre-implementation planning for unfamiliar features
- debug: Systematic debugging with hypothesis testing and root cause analysis
- input-validation: Enforce boundary validation (parse-don't-validate, SQL injection)
- error-handling: Ensure Result type consistency and exception boundaries
This shifts quality enforcement from reactive (code review) to proactive
(during implementation), catching violations before they're committed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: migrate research and debug to skills-only
Remove /research and /debug commands in favor of skills-based approach.
These workflows work better as auto-activating skills rather than
manual commands:
- research skill auto-triggers when unfamiliar features are requested
- debug skill activates when errors occur or tests fail
This reduces friction (no need to remember to invoke commands) and
ensures best practices are always applied.
Breaking change: /research and /debug commands removed. Users should
rely on automatic skill activation instead.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: add skills installation and display to CLI
Update init command to:
- Install skills to ~/.claude/skills/devflow/
- Clean old skills directory on reinstall
- Display installed skills in output with auto-activate annotation
- Update component list to include skills
Installation now shows both commands (user-invoked) and skills
(model-invoked) to clarify the distinction.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: add comprehensive skills documentation to README
Add skills section explaining:
- What skills are and how they differ from commands
- Auto-activation triggers for each skill
- How skills enforce quality proactively
- Updated workflows showing skill integration
- Skills installation path
Reorganize command list to clarify user-invoked vs model-invoked
capabilities. Update examples to show skills auto-activating during
development.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: add skills development guide to CLAUDE.md
Add comprehensive guide for developing skills:
- Skill structure and YAML frontmatter requirements
- When to use skills vs commands
- Skill activation testing procedures
- Integration with project philosophy
- Examples of current skills
Update architecture overview to include skills as fourth main
component alongside CLI, commands, and sub-agents.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: fix uninstall bug and refactor CLI to namespace pattern
BREAKING FIX: uninstall command now properly removes skills directory
Previously, 'devflow uninstall' was NOT removing the skills directory,
leaving orphaned files in ~/.claude/skills/devflow/. This occurred because
we were manually managing each directory separately, making it easy to
forget new additions.
Refactored both init.ts and uninstall.ts to use a namespace pattern with
a single source of truth for all DevFlow directories:
- commands/devflow
- agents/devflow
- skills/devflow
- scripts
This ensures:
- Uninstall properly removes ALL DevFlow namespaces
- Adding new directories in the future requires only one line change
- Impossible to forget a directory (DRY principle)
- Consistent behavior between init and uninstall
Updated CLI output to clearly distinguish between commands (manual) and
skills (auto-activate) for better user understanding.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: restore research and debug commands for dual-mode pattern
Restored /research and /debug as explicit commands in addition to skills.
This implements a "dual-mode" pattern where research and debug exist as:
1. Commands (manual, user-invoked): /research, /debug
- Explicit control when user wants deep analysis
- Launches sub-agent with separate context
- Full workflow with documentation tracking
2. Skills (auto, model-invoked): research skill, debug skill
- Proactive assistance during implementation
- Inline guidance and enforcement
- Context-aware activation
This gives users maximum flexibility:
- Explicit control when they want it
- Automatic assistance when they need it
Updated init.ts to clearly show both modes in installation output
with "(manual)" and "(auto)" labels for clarity.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: add input validation for execSync to prevent command injection
- Isolate stderr with stdio configuration
- Validate git root path for injection patterns (newlines, semicolons, &&)
- Ensure returned path is absolute
- Prevent command injection vulnerability (HIGH-1 from code review)
Addresses security concern in init.ts where execSync was called without
proper input validation on the returned git root path.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: implement command→agent→skill architecture pattern
Implement clean separation following DevFlow philosophy:
- Commands: Orchestrate workflows (launch agents)
- Agents: Execute intensive analysis (separate context)
- Skills: Guide decisions (lightweight dispatchers)
Changes:
- Created debug agent (12k lines) for systematic debugging
- Simplified /debug command: 228 → 56 lines (launches agent)
- Simplified debug skill: 484 → 119 lines (auto-dispatcher)
- Simplified research skill: 381 → 135 lines (auto-dispatcher)
- Total skill reduction: 3026 → 2415 lines (611 lines saved)
Architecture Benefits:
- Main session stays clean (skills are lightweight)
- Heavy analysis offloaded to agents (separate context)
- Auto-activation preserves autonomy (skills dispatch agents)
- Context-efficient while maximizing AI quality
Skills now:
1. Detect when heavy work needed
2. Auto-launch appropriate agent
3. Summarize agent results
4. Keep main session focused
This ensures comprehensive research/debugging happens in isolated
context while main session remains clean and focused on implementation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: refactor /devlog to orchestrator pattern with project-state agent
Complete separation of session context from codebase analysis:
**Command Changes (devlog.md):**
- Before: 369 lines with Bash, Read, Grep, Glob, Write, TodoWrite, Task
- After: 409 lines with Task, Write, TodoWrite only
- Removed: All inline git/find/grep operations
- Architecture: Session context (inline) + Project state (agent)
**New Agent (project-state.md):**
- 465 lines of comprehensive codebase analysis
- Handles: Git history, file changes, TODO scanning, docs structure
- Returns: Structured data for status documentation
- Tools: Bash, Read, Grep, Glob
**Workflow:**
1. Command captures session-local context (conversation, todos)
2. Command launches project-state agent (separate context)
3. Agent analyzes codebase (git, files, TODOs, docs, tech stack)
4. Command synthesizes agent data + session context
5. Command writes comprehensive status documents
**Benefits:**
- Main session: Zero heavy bash/grep work
- Agent context: All codebase analysis isolated
- Clean separation: Session vs project state
- Follows orchestrator pattern: Commands launch agents
**Philosophy Applied:**
- Commands → Orchestrate workflows
- Agents → Execute intensive analysis
- Main session stays clean and focused
This completes the orchestrator pattern refactoring for all major
commands that were doing heavy codebase analysis inline.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: add /implement command for smart interactive implementation
Create intelligent implementation orchestrator that guides users through
todo implementation with continuous interaction and quality enforcement.
**Command**: /implement (507 lines)
**Type**: Smart Interactive Orchestrator
**Tools**: TodoWrite, Read, Write, Edit, AskUserQuestion, Bash, Grep, Glob
**Workflow**:
1. Load current todos from TodoWrite
2. Interactive triage (remove, defer, prioritize)
3. For each todo in priority:
- Analyze complexity (Simple/Medium/Complex)
- Seek clarification only when needed (AskUserQuestion)
- Share implementation plan
- Implement following existing patterns
- Skills auto-validate (pattern-check, test-design, etc.)
- Mark complete, move to next
4. Comprehensive session summary
**Key Features**:
- **Smart Triage**: User controls what to implement vs defer
- **One Question at a Time**: Only asks when genuinely unclear
- **Pattern-Driven**: Finds and follows existing code patterns
- **Quality by Default**: Existing skills enforce patterns automatically
- **Transparent Progress**: Shows plan before implementing
- **Continuous Interaction**: Can pause for decisions/clarification
**Philosophy**: Pair programming with AI
- User decides priorities and provides clarification
- AI implements with user guidance
- Quality enforced through existing skills
- No need for separate implementation agent
**Usage**:
User: /implement
→ Triage todos
→ Implement iteratively with guidance
→ Summary and recommendations
This completes the implementation workflow:
/plan-next-steps → /implement → /code-review → /commit
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: fix critical documentation gaps from code review
Addresses all 4 critical documentation issues identified in comprehensive
code review (.docs/audits/feat-add-skills-support/comprehensive-review.md):
1. Add missing commands to table:
- /implement - Smart interactive implementation orchestrator
- /debug - Systematic debugging workflow
- /research - Pre-implementation research and approach analysis
2. Add auto-activation warning:
- Clear statement that skills cannot be manually invoked
- Prevents user confusion about skill invocation
3. Document dual-mode pattern:
- Explains research/debug exist as both skill (auto) and command (manual)
- Clarifies when to use each mode
- Provides best of both worlds: automatic assistance + manual control
4. Skills path verification:
- Confirmed already documented in CLAUDE.md:425
- No changes needed
Impact: Resolves all blocking documentation issues from code review.
Estimated time saved in user confusion: significant.
Related: PR #15, comprehensive review 2025-10-21_2111
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: bump version to 0.4.0
Release 0.4.0 with 12 commits since v0.3.3
- Skills infrastructure with 7 auto-activating skills
- /implement command for guided implementation
- Command→Agent→Skill dual-mode architecture
- Security and bug fixes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Dean Sharon <deanshrn@gmain.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 500aba2 commit cd06d00
File tree
18 files changed
+4344
-445
lines changed- src
- claude
- agents/devflow
- commands/devflow
- skills/devflow
- code-smell
- debug
- error-handling
- input-validation
- pattern-check
- research
- test-design
- cli/commands
18 files changed
+4344
-445
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
8 | 77 | | |
9 | 78 | | |
10 | 79 | | |
| |||
288 | 357 | | |
289 | 358 | | |
290 | 359 | | |
| 360 | + | |
291 | 361 | | |
292 | 362 | | |
293 | 363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
123 | 206 | | |
124 | 207 | | |
125 | 208 | | |
| |||
331 | 414 | | |
332 | 415 | | |
333 | 416 | | |
| 417 | + | |
334 | 418 | | |
335 | 419 | | |
336 | 420 | | |
337 | 421 | | |
338 | 422 | | |
339 | 423 | | |
340 | 424 | | |
| 425 | + | |
341 | 426 | | |
342 | 427 | | |
343 | 428 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
17 | 45 | | |
18 | 46 | | |
19 | 47 | | |
20 | 48 | | |
21 | | - | |
22 | 49 | | |
23 | 50 | | |
24 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
25 | 54 | | |
26 | 55 | | |
27 | 56 | | |
| |||
95 | 124 | | |
96 | 125 | | |
97 | 126 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
102 | 131 | | |
103 | 132 | | |
104 | 133 | | |
| |||
116 | 145 | | |
117 | 146 | | |
118 | 147 | | |
119 | | - | |
120 | | - | |
| 148 | + | |
| 149 | + | |
121 | 150 | | |
122 | | - | |
| 151 | + | |
123 | 152 | | |
124 | 153 | | |
125 | 154 | | |
| |||
131 | 160 | | |
132 | 161 | | |
133 | 162 | | |
| 163 | + | |
134 | 164 | | |
135 | 165 | | |
136 | 166 | | |
| |||
161 | 191 | | |
162 | 192 | | |
163 | 193 | | |
164 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
165 | 199 | | |
166 | 200 | | |
167 | 201 | | |
168 | | - | |
169 | 202 | | |
170 | 203 | | |
171 | 204 | | |
| |||
202 | 235 | | |
203 | 236 | | |
204 | 237 | | |
| 238 | + | |
205 | 239 | | |
206 | 240 | | |
207 | 241 | | |
| |||
210 | 244 | | |
211 | 245 | | |
212 | 246 | | |
213 | | - | |
| 247 | + | |
214 | 248 | | |
215 | 249 | | |
216 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments