devflow-kit 1.5.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +9 -4
  3. package/dist/commands/ambient.js +1 -1
  4. package/dist/commands/init.js +8 -4
  5. package/dist/commands/uninstall.d.ts +9 -0
  6. package/dist/commands/uninstall.js +60 -4
  7. package/dist/plugins.js +23 -23
  8. package/dist/utils/post-install.js +6 -2
  9. package/package.json +1 -1
  10. package/plugins/devflow-accessibility/.claude-plugin/plugin.json +1 -1
  11. package/plugins/devflow-ambient/.claude-plugin/plugin.json +25 -4
  12. package/plugins/devflow-ambient/README.md +48 -29
  13. package/plugins/devflow-ambient/agents/coder.md +135 -0
  14. package/plugins/devflow-ambient/agents/reviewer.md +165 -0
  15. package/plugins/devflow-ambient/agents/scrutinizer.md +80 -0
  16. package/plugins/devflow-ambient/agents/shepherd.md +94 -0
  17. package/plugins/devflow-ambient/agents/simplifier.md +93 -0
  18. package/plugins/devflow-ambient/agents/skimmer.md +93 -0
  19. package/plugins/devflow-ambient/agents/validator.md +86 -0
  20. package/plugins/devflow-ambient/skills/ambient-router/SKILL.md +76 -29
  21. package/plugins/devflow-ambient/skills/ambient-router/references/skill-catalog.md +40 -35
  22. package/plugins/devflow-ambient/skills/debug-orchestration/SKILL.md +69 -0
  23. package/plugins/devflow-ambient/skills/implementation-orchestration/SKILL.md +92 -0
  24. package/plugins/devflow-ambient/skills/plan-orchestration/SKILL.md +71 -0
  25. package/plugins/devflow-audit-claude/.claude-plugin/plugin.json +10 -1
  26. package/plugins/devflow-audit-claude/commands/audit-claude.md +4 -0
  27. package/plugins/devflow-code-review/.claude-plugin/plugin.json +2 -1
  28. package/plugins/devflow-code-review/agents/reviewer.md +10 -9
  29. package/plugins/devflow-code-review/commands/code-review-teams.md +43 -30
  30. package/plugins/devflow-code-review/commands/code-review.md +10 -1
  31. package/plugins/devflow-code-review/skills/knowledge-persistence/SKILL.md +128 -0
  32. package/plugins/devflow-code-review/skills/knowledge-persistence/references/examples.md +44 -0
  33. package/plugins/devflow-core-skills/.claude-plugin/plugin.json +1 -1
  34. package/plugins/devflow-core-skills/skills/docs-framework/SKILL.md +7 -2
  35. package/plugins/devflow-core-skills/skills/test-driven-development/SKILL.md +6 -5
  36. package/plugins/devflow-debug/.claude-plugin/plugin.json +5 -3
  37. package/plugins/devflow-debug/agents/synthesizer.md +211 -0
  38. package/plugins/devflow-debug/commands/debug-teams.md +28 -14
  39. package/plugins/devflow-debug/commands/debug.md +26 -12
  40. package/plugins/devflow-debug/skills/knowledge-persistence/SKILL.md +128 -0
  41. package/plugins/devflow-debug/skills/knowledge-persistence/references/examples.md +44 -0
  42. package/plugins/devflow-frontend-design/.claude-plugin/plugin.json +1 -1
  43. package/plugins/devflow-go/.claude-plugin/plugin.json +1 -1
  44. package/plugins/devflow-implement/.claude-plugin/plugin.json +2 -1
  45. package/plugins/devflow-implement/agents/coder.md +6 -1
  46. package/plugins/devflow-implement/agents/simplifier.md +32 -1
  47. package/plugins/devflow-implement/agents/skimmer.md +5 -0
  48. package/plugins/devflow-implement/commands/implement-teams.md +72 -55
  49. package/plugins/devflow-implement/commands/implement.md +44 -35
  50. package/plugins/devflow-implement/skills/knowledge-persistence/SKILL.md +128 -0
  51. package/plugins/devflow-implement/skills/knowledge-persistence/references/examples.md +44 -0
  52. package/plugins/devflow-java/.claude-plugin/plugin.json +1 -1
  53. package/plugins/devflow-python/.claude-plugin/plugin.json +1 -1
  54. package/plugins/devflow-react/.claude-plugin/plugin.json +1 -1
  55. package/plugins/devflow-resolve/.claude-plugin/plugin.json +4 -3
  56. package/plugins/devflow-resolve/agents/simplifier.md +32 -1
  57. package/plugins/devflow-resolve/commands/resolve-teams.md +16 -7
  58. package/plugins/devflow-resolve/commands/resolve.md +16 -7
  59. package/plugins/devflow-resolve/skills/knowledge-persistence/SKILL.md +128 -0
  60. package/plugins/devflow-resolve/skills/knowledge-persistence/references/examples.md +44 -0
  61. package/plugins/devflow-rust/.claude-plugin/plugin.json +1 -1
  62. package/plugins/devflow-self-review/.claude-plugin/plugin.json +10 -1
  63. package/plugins/devflow-self-review/agents/simplifier.md +32 -1
  64. package/plugins/devflow-self-review/commands/self-review.md +10 -4
  65. package/plugins/devflow-specify/.claude-plugin/plugin.json +1 -1
  66. package/plugins/devflow-specify/agents/skimmer.md +5 -0
  67. package/plugins/devflow-specify/commands/specify-teams.md +27 -20
  68. package/plugins/devflow-specify/commands/specify.md +26 -19
  69. package/plugins/devflow-typescript/.claude-plugin/plugin.json +1 -1
  70. package/scripts/hooks/ambient-prompt +10 -8
  71. package/scripts/hooks/background-memory-update +114 -85
  72. package/scripts/hooks/session-start-memory +34 -20
  73. package/shared/agents/coder.md +6 -1
  74. package/shared/agents/reviewer.md +10 -9
  75. package/shared/agents/simplifier.md +32 -1
  76. package/shared/agents/skimmer.md +5 -0
  77. package/shared/skills/ambient-router/SKILL.md +76 -29
  78. package/shared/skills/ambient-router/references/skill-catalog.md +40 -35
  79. package/shared/skills/debug-orchestration/SKILL.md +69 -0
  80. package/shared/skills/docs-framework/SKILL.md +7 -2
  81. package/shared/skills/implementation-orchestration/SKILL.md +92 -0
  82. package/shared/skills/knowledge-persistence/SKILL.md +128 -0
  83. package/shared/skills/knowledge-persistence/references/examples.md +44 -0
  84. package/shared/skills/plan-orchestration/SKILL.md +71 -0
  85. package/shared/skills/test-driven-development/SKILL.md +6 -5
  86. package/plugins/devflow-ambient/commands/ambient.md +0 -110
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: Validator
3
+ description: Dedicated agent for running validation commands (build, typecheck, lint, test). Reports pass/fail with structured failure details - never fixes.
4
+ model: haiku
5
+ skills: test-patterns
6
+ ---
7
+
8
+ # Validator Agent
9
+
10
+ You are a validation specialist that runs build and test commands to verify code correctness. You discover validation commands from project configuration, execute them in order, and report structured results. You never fix issues - you only report them for other agents to fix.
11
+
12
+ ## Input Context
13
+
14
+ You receive from orchestrator:
15
+ - **FILES_CHANGED**: List of modified files
16
+ - **VALIDATION_SCOPE**: `full` | `changed-only` (hints for test filtering if supported)
17
+
18
+ ## Responsibilities
19
+
20
+ 1. **Discover validation commands**: Check package.json scripts, Makefile, Cargo.toml, or similar for available commands
21
+ 2. **Execute in order**: build → typecheck → lint → test (skip if command doesn't exist)
22
+ 3. **Capture all output**: Record stdout/stderr for each command
23
+ 4. **Parse failures**: Extract file:line references from error output where possible
24
+ 5. **Report results**: Return structured pass/fail status with failure details
25
+
26
+ ## Validation Order
27
+
28
+ Execute in this order, stopping on first failure:
29
+
30
+ | Priority | Command Type | Common Examples |
31
+ |----------|-------------|-----------------|
32
+ | 1 | Build | `npm run build`, `cargo build`, `make build` |
33
+ | 2 | Typecheck | `npm run typecheck`, `tsc --noEmit` |
34
+ | 3 | Lint | `npm run lint`, `cargo clippy`, `make lint` |
35
+ | 4 | Test | `npm test`, `cargo test`, `make test` |
36
+
37
+ ## Principles
38
+
39
+ 1. **Report only** - Never fix code, never commit, never modify files
40
+ 2. **Stop on failure** - First failure halts remaining commands
41
+ 3. **Parse intelligently** - Extract file:line from error messages when possible
42
+ 4. **Respect scope** - Use VALIDATION_SCOPE hint for test filtering if framework supports it
43
+ 5. **Fast feedback** - Use haiku model for speed on this simple task
44
+
45
+ ## Output
46
+
47
+ Return structured validation results:
48
+
49
+ ```markdown
50
+ ## Validation Report
51
+
52
+ ### Status: PASS | FAIL | BLOCKED
53
+
54
+ ### Commands Executed
55
+ | Command | Status | Duration |
56
+ |---------|--------|----------|
57
+ | npm run build | PASS | 3.2s |
58
+ | npm run typecheck | FAIL | 1.8s |
59
+
60
+ ### Failures (if FAIL)
61
+
62
+ #### typecheck
63
+ ```
64
+ src/auth/login.ts:42:15 - error TS2339: Property 'email' does not exist on type 'User'.
65
+ src/auth/login.ts:58:3 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
66
+ ```
67
+
68
+ **Parsed References:**
69
+ - `src/auth/login.ts:42` - Property 'email' does not exist on type 'User'
70
+ - `src/auth/login.ts:58` - Argument type mismatch (string vs number)
71
+
72
+ ### Blockers (if BLOCKED)
73
+ {Description of why validation couldn't run - e.g., missing dependencies, broken config}
74
+ ```
75
+
76
+ ## Boundaries
77
+
78
+ **Escalate to orchestrator (BLOCKED):**
79
+ - No validation commands found in project
80
+ - Validation command crashes (not test failure, but command itself fails to run)
81
+ - Missing dependencies that prevent any validation
82
+
83
+ **Handle autonomously:**
84
+ - All command execution and output parsing
85
+ - Determining which commands exist and should run
86
+ - Formatting error output into structured references
@@ -1,25 +1,23 @@
1
1
  ---
2
2
  name: ambient-router
3
- description: >-
4
- Classify user intent and response depth for ambient mode. Auto-loads relevant
5
- skills without explicit command invocation. Used by /ambient command and
6
- always-on UserPromptSubmit hook.
3
+ description: This skill should be used when classifying user intent for ambient mode, auto-loading relevant skills without explicit command invocation. Used by the always-on UserPromptSubmit hook.
7
4
  user-invocable: false
8
- allowed-tools: Read, Grep, Glob
5
+ # No allowed-tools: orchestrator requires unrestricted access (Skill, Agent, Edit, Write, Bash)
9
6
  ---
10
7
 
11
8
  # Ambient Router
12
9
 
13
- Classify user intent and auto-load relevant skills. Zero overhead for simple requests, skill injection for substantive work, workflow nudges for complex tasks.
10
+ Classify user intent and auto-load relevant skills. Zero overhead for simple requests, skill loading + optional agent orchestration for substantive work.
14
11
 
15
12
  ## Iron Law
16
13
 
17
- > **PROPORTIONAL RESPONSE**
14
+ > **PROPORTIONAL RESPONSE MATCHED TO SCOPE**
18
15
  >
19
- > Match effort to intent. Never apply heavyweight processes to lightweight requests.
20
- > A chat question gets zero overhead. A 3-file feature gets 2-3 skills. A system
21
- > refactor gets a nudge toward `/implement`. Misclassification in either direction
22
- > is a failure.
16
+ > QUICK gets zero overhead. GUIDED gets skill loading + main session implementation
17
+ > with Simplifier cleanup. ORCHESTRATED gets full skill loading via the Skill tool plus
18
+ > agent pipeline execution. Misclassification in either direction is a failure —
19
+ > false-positive ORCHESTRATED is expensive (5-6 agent spawns), false-negative
20
+ > GUIDED leaves quality on the table.
23
21
 
24
22
  ---
25
23
 
@@ -29,14 +27,14 @@ Determine what the user is trying to do from their prompt.
29
27
 
30
28
  | Intent | Signal Words / Patterns | Examples |
31
29
  |--------|------------------------|---------|
32
- | **BUILD** | "add", "create", "implement", "build", "write", "make" | "add a login form", "create an API endpoint" |
30
+ | **IMPLEMENT** | "add", "create", "implement", "build", "write", "make" | "add a login form", "create an API endpoint" |
33
31
  | **DEBUG** | "fix", "bug", "broken", "failing", "error", "why does" | "fix the auth error", "why is this test failing" |
34
32
  | **REVIEW** | "check", "look at", "review", "is this ok", "any issues" | "check this function", "any issues with this?" |
35
33
  | **PLAN** | "how should", "design", "architecture", "approach", "strategy" | "how should I structure auth?", "what's the approach for caching?" |
36
34
  | **EXPLORE** | "what is", "where is", "find", "show me", "explain", "how does" | "where is the config?", "explain this function" |
37
35
  | **CHAT** | greetings, meta-questions, confirmations, short responses | "thanks", "yes", "what can you do?" |
38
36
 
39
- **Ambiguous prompts:** Default to the lowest-overhead classification. "Update the README" → BUILD/GUIDED. Git operations like "commit this" → QUICK.
37
+ **Ambiguous prompts:** Default to the lowest-overhead classification. "Update the README" → QUICK. Git operations like "commit this" → QUICK.
40
38
 
41
39
  ## Step 2: Classify Depth
42
40
 
@@ -44,44 +42,90 @@ Determine how much enforcement the prompt warrants.
44
42
 
45
43
  | Depth | Criteria | Action |
46
44
  |-------|----------|--------|
47
- | **QUICK** | CHAT intent. EXPLORE with no analytical depth ("where is X?"). Git/devops operations (commit, push, merge, branch, pr, deploy, reinstall). Single-word continuations. | Respond normally. Zero overhead. Do not state classification. |
48
- | **GUIDED** | BUILD/DEBUG/REVIEW/PLAN intent (any word count). EXPLORE with analytical depth ("analyze our X", "discuss how Y works"). | Read and apply 2-3 relevant skills from the selection matrix below. State classification briefly. |
49
- | **ELEVATE** | Multi-file architectural change, system-wide scope, > 5 files. Detailed implementation plan (100+ words with plan structure). | Respond at best effort + recommend: "This looks like it would benefit from `/implement` for full lifecycle management." |
45
+ | **QUICK** | CHAT intent. EXPLORE intent. Git/devops operations (commit, push, merge, branch, pr, deploy, reinstall). Single-word continuations. Small edits, config changes, trivial single-file tweaks. | Respond normally. Zero overhead. Do not state classification. |
46
+ | **GUIDED** | IMPLEMENT with small scope (≤2 files, single module). DEBUG with clear error location (stack trace, specific file, known function). PLAN for focused design questions (specific area/pattern). REVIEW (always GUIDED). | Load skills via Skill tool. Main session implements directly. Spawn Simplifier after code changes. State classification. |
47
+ | **ORCHESTRATED** | IMPLEMENT with larger scope (>2 files, multi-module, complex). DEBUG with vague/cross-cutting bug (no clear location, multiple possible causes). PLAN for system-level architecture (caching layer, auth system, multi-module design). | Load skills via Skill tool, then orchestrate agents per Step 5. State classification. |
50
48
 
51
- ## Step 3: Select Skills (GUIDED depth only)
49
+ **Scope-based decision criteria:**
52
50
 
53
- Based on classified intent, read the following skills to inform your response.
51
+ | Intent | GUIDED (small scope) | ORCHESTRATED (large scope) |
52
+ |--------|---------------------|---------------------------|
53
+ | **IMPLEMENT** | ≤2 files, single module, clear task | >2 files, multi-module, complex |
54
+ | **DEBUG** | Clear error with known location (stack trace, specific file) | Vague/cross-cutting bug, multiple possible causes |
55
+ | **PLAN** | Focused question about specific area/pattern | System-level architecture, multi-module design |
56
+ | **REVIEW** | Always GUIDED | — |
57
+
58
+ **Classification conservatism:** Default to QUICK. Only classify GUIDED/ORCHESTRATED when the prompt has clear task scope. When choosing between GUIDED and ORCHESTRATED, prefer GUIDED — escalate only when scope clearly exceeds main-session capacity.
59
+
60
+ ## Step 3: Select Skills
61
+
62
+ Based on classified intent and depth, invoke each selected skill using the Skill tool.
63
+
64
+ ### GUIDED-depth skills
54
65
 
55
66
  | Intent | Primary Skills | Secondary (if file type matches) |
56
67
  |--------|---------------|----------------------------------|
57
- | **BUILD** | test-driven-development, implementation-patterns, search-first | typescript (.ts), react (.tsx/.jsx), go (.go), java (.java), python (.py), rust (.rs), frontend-design (CSS/UI), input-validation (forms/API), security-patterns (auth/crypto) |
58
- | **DEBUG** | test-patterns, core-patterns | git-safety (if git operations involved) |
68
+ | **IMPLEMENT** | test-driven-development, implementation-patterns, search-first | typescript (.ts), react (.tsx/.jsx), go (.go), java (.java), python (.py), rust (.rs), frontend-design (CSS/UI), input-validation (forms/API), security-patterns (auth/crypto) |
69
+ | **DEBUG** | core-patterns, test-patterns | git-safety (if git operations involved) |
70
+ | **PLAN** | implementation-patterns, core-patterns | — |
59
71
  | **REVIEW** | self-review, core-patterns | test-patterns |
60
- | **PLAN** | implementation-patterns | core-patterns |
61
72
 
62
- **Excluded from ambient** (review-command-only): review-methodology, complexity-patterns, consistency-patterns, database-patterns, dependencies-patterns, documentation-patterns, regression-patterns, architecture-patterns, accessibility.
73
+ ### ORCHESTRATED-depth skills
74
+
75
+ | Intent | Primary Skills | Secondary (if file type matches) |
76
+ |--------|---------------|----------------------------------|
77
+ | **IMPLEMENT** | implementation-orchestration, implementation-patterns | typescript (.ts), react (.tsx/.jsx), go (.go), java (.java), python (.py), rust (.rs), frontend-design (CSS/UI), input-validation (forms/API), security-patterns (auth/crypto) |
78
+ | **DEBUG** | debug-orchestration, core-patterns | git-safety (if git operations involved) |
79
+ | **PLAN** | plan-orchestration, implementation-patterns, core-patterns | — |
80
+
81
+ **Excluded from ambient** (review-command-only): review-methodology, complexity-patterns, consistency-patterns, database-patterns, dependencies-patterns, documentation-patterns, regression-patterns, architecture-patterns, accessibility, performance-patterns.
63
82
 
64
83
  See `references/skill-catalog.md` for the full skill-to-intent mapping with file pattern triggers.
65
84
 
66
85
  ## Step 4: Apply
67
86
 
68
87
  <IMPORTANT>
69
- When classification is GUIDED or ELEVATE, skill application is NON-NEGOTIABLE.
88
+ When classification is GUIDED or ORCHESTRATED, skill loading is NON-NEGOTIABLE.
70
89
  Do not rationalize skipping skills. Do not respond without loading them first.
71
- If test-driven-development is selected, you MUST write the failing test before ANY production code.
90
+ BLOCKING REQUIREMENT: Invoke each selected skill using the Skill tool before proceeding.
91
+ For IMPLEMENT intent, enforce TDD: write the failing test before ANY production code.
92
+ NOTE: Skills loaded in the main session via ambient mode are reference patterns only —
93
+ their allowed-tools metadata does NOT restrict your tool access. You retain full access
94
+ to all tools (Edit, Write, Bash, Agent, etc.) for implementation work.
72
95
  </IMPORTANT>
73
96
 
74
97
  - **QUICK:** Respond directly. No preamble, no classification statement.
75
- - **GUIDED:** State classification briefly: `Ambient: BUILD/GUIDED. Loading: test-driven-development, implementation-patterns.` Then read the selected skills and apply their patterns. No exceptions.
76
- - **ELEVATE:** Respond with your best effort, then append: `> This task spans multiple files/systems. Consider \`/implement\` for full lifecycle.`
98
+ - **GUIDED:** State classification briefly: `Ambient: IMPLEMENT/GUIDED. Loading: implementation-patterns, search-first.` Then invoke each skill using the Skill tool and work directly in main session. After code changes, spawn Simplifier on changed files.
99
+ - **ORCHESTRATED:** State classification briefly: `Ambient: IMPLEMENT/ORCHESTRATED. Loading: implementation-orchestration, implementation-patterns.` Then invoke each skill using the Skill tool and follow Step 5 for agent orchestration.
100
+
101
+ ### GUIDED Behavior by Intent
102
+
103
+ | Intent | Main Session Work | Post-Work |
104
+ |--------|------------------|-----------|
105
+ | **IMPLEMENT** | Implement directly with loaded skills. Follow TDD cycle. | Spawn Simplifier on changed files. |
106
+ | **DEBUG** | Investigate directly — reproduce bug, diagnose from stack trace/error, fix. | Spawn Simplifier on changed files. |
107
+ | **PLAN** | Explore relevant code and design directly. The area is focused enough for main session. | No Simplifier (no code changes). |
108
+ | **REVIEW** | Review directly with loaded skills. | No Simplifier. |
109
+
110
+ ## Step 5: Orchestrate Agents (ORCHESTRATED depth only)
111
+
112
+ After loading skills via Step 3-4, execute the agent pipeline for the classified intent:
113
+
114
+ | Intent | Pipeline |
115
+ |--------|----------|
116
+ | **IMPLEMENT** | Follow implementation-orchestration skill pipeline: pre-flight → plan synthesis → Coder → quality gates |
117
+ | **DEBUG** | Follow debug-orchestration skill pipeline: hypotheses → parallel Explores → convergence → report → offer fix |
118
+ | **PLAN** | Follow plan-orchestration skill pipeline: Skimmer → Explores → Plan agent → gap validation |
119
+ | **EXPLORE** | No agents — respond in main session |
120
+ | **CHAT** | No agents — respond in main session |
77
121
 
78
122
  ---
79
123
 
80
124
  ## Transparency Rules
81
125
 
82
126
  1. **QUICK → silent.** No classification output.
83
- 2. **GUIDED → brief statement + full skill enforcement.** One line: intent, depth, skills loaded. Then follow every skill requirement without shortcuts.
84
- 3. **ELEVATErecommendation.** Best-effort response + workflow nudge.
127
+ 2. **GUIDED → brief statement + full skill enforcement.** One line: intent, depth, skills loaded. Then implement in main session with skill patterns applied.
128
+ 3. **ORCHESTRATEDbrief statement + full skill enforcement + agent orchestration.** One line: intent, depth, skills loaded. Then follow every skill requirement and orchestrate agents per Step 5.
85
129
  4. **Never lie about classification.** If uncertain, say so.
86
130
  5. **Never over-classify.** When in doubt, go one tier lower.
87
131
  6. **Never under-apply.** Rationalization is the enemy of quality. If a skill requires a step, do the step.
@@ -90,7 +134,10 @@ If test-driven-development is selected, you MUST write the failing test before A
90
134
 
91
135
  | Case | Handling |
92
136
  |------|----------|
93
- | Mixed intent ("fix this bug and add a test") | Use the higher-overhead intent (BUILD > DEBUG) |
137
+ | Mixed intent ("fix this bug and add a test") | Use the higher-overhead intent (IMPLEMENT > DEBUG) |
94
138
  | Continuation of previous conversation | Inherit previous classification unless prompt clearly shifts |
95
139
  | User explicitly requests no enforcement | Respect immediately — classify as QUICK |
96
140
  | Prompt references specific DevFlow command | Skip ambient — the command has its own orchestration |
141
+ | Scope ambiguous between GUIDED and ORCHESTRATED | Default to GUIDED; escalate if complexity emerges during work |
142
+ | REVIEW intent | Always GUIDED — single Reviewer focus, no orchestration pipeline |
143
+ | Multiple triggers per session | Each runs independently; context compaction handles accumulation |
@@ -4,47 +4,50 @@ Full mapping of DevFlow skills to ambient intents and file-type triggers. The am
4
4
 
5
5
  ## Skills Available for Ambient Loading
6
6
 
7
- These skills may be loaded during GUIDED-depth ambient routing.
8
-
9
- ### BUILD Intent
10
-
11
- | Skill | When to Load | File Patterns |
12
- |-------|-------------|---------------|
13
- | test-driven-development | Always for BUILD | `*.ts`, `*.tsx`, `*.js`, `*.jsx`, `*.py` |
14
- | implementation-patterns | Always for BUILD | Any code file |
15
- | search-first | Always for BUILD | Any code file |
16
- | typescript | TypeScript files in scope | `*.ts`, `*.tsx` |
17
- | react | React components in scope | `*.tsx`, `*.jsx` |
18
- | frontend-design | UI/styling work | `*.css`, `*.scss`, `*.tsx` with styling keywords |
19
- | input-validation | Forms, APIs, user input | Files with form/input/validation keywords |
20
- | go | Go files in scope | `*.go` |
21
- | java | Java files in scope | `*.java` |
22
- | python | Python files in scope | `*.py` |
23
- | rust | Rust files in scope | `*.rs` |
24
- | security-patterns | Auth, crypto, secrets | Files with auth/token/crypto/password keywords |
7
+ These skills may be loaded during GUIDED and ORCHESTRATED-depth ambient routing.
8
+
9
+ ### IMPLEMENT Intent
10
+
11
+ | Skill | When to Load | Depth | File Patterns |
12
+ |-------|-------------|-------|---------------|
13
+ | implementation-orchestration | ORCHESTRATED only | ORCHESTRATED | Any orchestrates agent pipeline |
14
+ | test-driven-development | Always for IMPLEMENT | GUIDED + ORCHESTRATED | Any code file — enforces RED-GREEN-REFACTOR |
15
+ | implementation-patterns | Always for IMPLEMENT | GUIDED + ORCHESTRATED | Any code file |
16
+ | search-first | Always for IMPLEMENT | GUIDED + ORCHESTRATED | Any enforces research before building |
17
+ | typescript | TypeScript files in scope | GUIDED + ORCHESTRATED | `*.ts`, `*.tsx` |
18
+ | react | React components in scope | GUIDED + ORCHESTRATED | `*.tsx`, `*.jsx` |
19
+ | frontend-design | UI/styling work | GUIDED + ORCHESTRATED | `*.css`, `*.scss`, `*.tsx` with styling keywords |
20
+ | input-validation | Forms, APIs, user input | GUIDED + ORCHESTRATED | Files with form/input/validation keywords |
21
+ | go | Go files in scope | GUIDED + ORCHESTRATED | `*.go` |
22
+ | java | Java files in scope | GUIDED + ORCHESTRATED | `*.java` |
23
+ | python | Python files in scope | GUIDED + ORCHESTRATED | `*.py` |
24
+ | rust | Rust files in scope | GUIDED + ORCHESTRATED | `*.rs` |
25
+ | security-patterns | Auth, crypto, secrets | GUIDED + ORCHESTRATED | Files with auth/token/crypto/password keywords |
25
26
 
26
27
  ### DEBUG Intent
27
28
 
28
- | Skill | When to Load | File Patterns |
29
- |-------|-------------|---------------|
30
- | test-patterns | Always for DEBUG | Any test-related context |
31
- | core-patterns | Always for DEBUG | Any code file |
32
- | git-safety | Git operations involved | User mentions git, rebase, merge, etc. |
29
+ | Skill | When to Load | Depth | File Patterns |
30
+ |-------|-------------|-------|---------------|
31
+ | debug-orchestration | ORCHESTRATED only | ORCHESTRATED | Any orchestrates investigation pipeline |
32
+ | core-patterns | Always for DEBUG | GUIDED + ORCHESTRATED | Any code file |
33
+ | test-patterns | Always for DEBUG (GUIDED) | GUIDED | Any code file |
34
+ | git-safety | Git operations involved | GUIDED + ORCHESTRATED | User mentions git, rebase, merge, etc. |
33
35
 
34
36
  ### REVIEW Intent
35
37
 
36
- | Skill | When to Load | File Patterns |
37
- |-------|-------------|---------------|
38
- | self-review | Always for REVIEW | Any code file |
39
- | core-patterns | Always for REVIEW | Any code file |
40
- | test-patterns | Test files in scope | `*.test.*`, `*.spec.*` |
38
+ | Skill | When to Load | Depth | File Patterns |
39
+ |-------|-------------|-------|---------------|
40
+ | self-review | Always for REVIEW | GUIDED | Any code file |
41
+ | core-patterns | Always for REVIEW | GUIDED | Any code file |
42
+ | test-patterns | Test files in scope | GUIDED | `*.test.*`, `*.spec.*` |
41
43
 
42
44
  ### PLAN Intent
43
45
 
44
- | Skill | When to Load | File Patterns |
45
- |-------|-------------|---------------|
46
- | implementation-patterns | Always for PLAN | Any planning context |
47
- | core-patterns | Architectural planning | System design discussions |
46
+ | Skill | When to Load | Depth | File Patterns |
47
+ |-------|-------------|-------|---------------|
48
+ | plan-orchestration | ORCHESTRATED only | ORCHESTRATED | Any orchestrates design pipeline |
49
+ | implementation-patterns | Always for PLAN | GUIDED + ORCHESTRATED | Any planning context |
50
+ | core-patterns | Always for PLAN | GUIDED + ORCHESTRATED | System design discussions |
48
51
 
49
52
  ## Skills Excluded from Ambient
50
53
 
@@ -63,7 +66,9 @@ These skills are loaded only by explicit DevFlow commands (primarily `/code-revi
63
66
 
64
67
  ## Selection Limits
65
68
 
66
- - **Maximum 3 skills** per ambient response (primary + up to 2 secondary)
67
- - **Primary skills** are always loaded for the classified intent
69
+ - **Maximum 3 knowledge skills** per ambient response (primary + up to 2 secondary)
70
+ - **Orchestration skills** (implementation-orchestration, debug-orchestration, plan-orchestration) are loaded only at ORCHESTRATED depth — they don't count toward the knowledge skill limit
71
+ - **Primary skills** are always loaded for the classified intent at both GUIDED and ORCHESTRATED depth
68
72
  - **Secondary skills** are loaded only when file patterns match conversation context
69
- - If more than 3 skills seem relevant, this is an ELEVATE signal
73
+ - **GUIDED depth** loads knowledge skills only (no orchestration skills) main session works directly
74
+ - **ORCHESTRATED depth** loads orchestration skill + knowledge skills — agents execute the pipeline
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: debug-orchestration
3
+ description: Agent orchestration for DEBUG intent — hypothesis investigation, root cause analysis, optional fix
4
+ user-invocable: false
5
+ allowed-tools: Read, Grep, Glob, Bash, Task, AskUserQuestion
6
+ ---
7
+
8
+ # Debug Orchestration
9
+
10
+ Agent pipeline for DEBUG intent in ambient ORCHESTRATED mode. Competing hypothesis investigation, parallel evidence gathering, convergence validation, and optional fix.
11
+
12
+ This is a lightweight variant of `/debug` for ambient ORCHESTRATED mode. Excluded: knowledge persistence loading, GitHub issue fetching, pitfall recording.
13
+
14
+ ## Iron Law
15
+
16
+ > **COMPETING HYPOTHESES BEFORE CONCLUSIONS**
17
+ >
18
+ > Never investigate a single theory. Generate 3-5 distinct hypotheses, investigate them
19
+ > in parallel, and let evidence determine the root cause. Confirmation bias is the enemy
20
+ > of debugging — multiple hypotheses are the antidote.
21
+
22
+ ---
23
+
24
+ ## Phase 1: Hypothesize
25
+
26
+ Analyze the bug description, error messages, and conversation context. Generate 3-5 hypotheses that are:
27
+
28
+ - **Specific**: Points to a concrete mechanism (not "something is wrong with auth")
29
+ - **Testable**: Can be confirmed or disproved by examining specific files/logs
30
+ - **Distinct**: Each hypothesis proposes a different root cause
31
+
32
+ If fewer than 3 hypotheses are possible, proceed with 2.
33
+
34
+ ## Phase 2: Investigate (Parallel)
35
+
36
+ Spawn one `Task(subagent_type="Explore")` per hypothesis **in a single message** (parallel execution):
37
+
38
+ - Each investigator searches for evidence FOR and AGAINST its hypothesis
39
+ - Must provide file:line references for all evidence
40
+ - Returns verdict: **CONFIRMED** | **DISPROVED** | **PARTIAL** (some evidence supports, some contradicts)
41
+
42
+ ## Phase 3: Converge
43
+
44
+ Evaluate investigation results:
45
+
46
+ - **One CONFIRMED**: Spawn 1-2 additional `Task(subagent_type="Explore")` agents to validate from different angles (prevent confirmation bias)
47
+ - **Multiple PARTIAL**: Look for a unifying root cause that explains all partial evidence
48
+ - **All DISPROVED**: Report honestly — "No root cause identified from initial hypotheses." Generate 2-3 second-round hypotheses if conversation context suggests avenues not yet explored.
49
+
50
+ ## Phase 4: Report
51
+
52
+ Present root cause analysis:
53
+
54
+ - **Confidence level**: HIGH (confirmed + validated) | MEDIUM (partial convergence) | LOW (best guess from incomplete evidence)
55
+ - **Evidence table**: Hypothesis → verdict → key evidence (file:line)
56
+ - **Root cause**: Clear statement of what's wrong and why
57
+ - **Recommended fix**: Specific changes with file references
58
+
59
+ ## Phase 5: Offer Fix
60
+
61
+ Ask user via AskUserQuestion: "Want me to implement this fix?"
62
+
63
+ - **YES** → Implement the fix directly in main session using GUIDED approach: load implementation-patterns, search-first, and test-driven-development skills, then code the fix. Spawn `Task(subagent_type="Simplifier")` on changed files after.
64
+ - **NO** → Done. Report stands as documentation.
65
+
66
+ ## Error Handling
67
+
68
+ - **All hypotheses disproved, no second-round ideas**: Report "No root cause identified" with summary of what was investigated and ruled out
69
+ - **Explore agents return insufficient evidence**: Report LOW confidence with available evidence, suggest manual investigation areas
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: implementation-orchestration
3
+ description: Agent orchestration for IMPLEMENT intent — pre-flight, Coder, quality gates
4
+ user-invocable: false
5
+ allowed-tools: Read, Grep, Glob, Bash, Task, AskUserQuestion
6
+ ---
7
+
8
+ # Implementation Orchestration
9
+
10
+ Agent pipeline for IMPLEMENT intent in ambient ORCHESTRATED mode. Pre-flight checks, plan synthesis, Coder execution, and quality gates.
11
+
12
+ This is a lightweight variant of `/implement` for ambient ORCHESTRATED mode. Excluded: strategy selection (single/sequential/parallel Coders), retry loops, PR creation, knowledge loading.
13
+
14
+ ## Iron Law
15
+
16
+ > **QUALITY GATES ARE NON-NEGOTIABLE**
17
+ >
18
+ > Every Coder output passes through Validator → Simplifier → Scrutinizer → re-Validate → Shepherd.
19
+ > Skipping a gate because "it looks fine" is never acceptable. The pipeline runs to completion
20
+ > or halts on failure — there is no shortcut.
21
+
22
+ ---
23
+
24
+ ## Phase 1: Pre-flight — Branch Safety
25
+
26
+ Detect branch type before spawning Coder:
27
+
28
+ - **Work branches** (`feat/`, `fix/`, `chore/`, `refactor/`, `docs/` prefix): proceed on current branch.
29
+ - **Protected branches** (`main`, `master`, `develop`, `release/*`, `staging`, `production`): ask user via AskUserQuestion with 2-3 suggested branch names following `{type}/{ticket}-{slug}` convention. Include ticket number if available from conversation context.
30
+ - **If user declines branch creation**: proceed on the protected branch. Respect the user's choice.
31
+
32
+ ## Phase 2: Plan Synthesis
33
+
34
+ Synthesize conversation context into a structured EXECUTION_PLAN for Coder:
35
+
36
+ - **If a plan exists** in conversation context (from plan mode — accepted in-session or injected after "accept and clear") → use the plan as-is.
37
+ - **Otherwise** → synthesize from conversation: what to build, files/modules affected, constraints, decisions made during discussion.
38
+
39
+ Format as structured markdown with: Goal, Steps, Files, Constraints, Decisions.
40
+
41
+ ## Phase 3: Coder Execution
42
+
43
+ Record git SHA before first Coder: `git rev-parse HEAD`
44
+
45
+ Spawn `Task(subagent_type="Coder")` with input variables:
46
+ - **TASK_ID**: Generated from timestamp (e.g., `task-2026-03-19_1430`)
47
+ - **TASK_DESCRIPTION**: From conversation context
48
+ - **BASE_BRANCH**: Current branch (or newly created branch from Phase 1)
49
+ - **EXECUTION_PLAN**: From Phase 2
50
+ - **PATTERNS**: Codebase patterns from conversation context
51
+ - **CREATE_PR**: `false` (commit only, no push)
52
+ - **DOMAIN**: Inferred from files in scope (`backend`, `frontend`, `tests`, `fullstack`)
53
+
54
+ **Execution strategy**: Single sequential Coder by default. Parallel Coders only when tasks are self-contained — zero shared contracts, no integration points, different files/modules with no imports between them.
55
+
56
+ If Coder returns **BLOCKED**, halt the pipeline and report to user.
57
+
58
+ ## Phase 4: FILES_CHANGED Detection
59
+
60
+ After Coder completes, detect changed files:
61
+
62
+ ```bash
63
+ git diff --name-only {starting_sha}...HEAD
64
+ ```
65
+
66
+ Pass FILES_CHANGED to all quality gate agents.
67
+
68
+ ## Phase 5: Quality Gates
69
+
70
+ Run sequentially — each gate must pass before the next:
71
+
72
+ 1. `Task(subagent_type="Validator")` (build + typecheck + lint + tests) — retry up to 2× on failure (Coder fixes between retries)
73
+ 2. `Task(subagent_type="Simplifier")` — code clarity and maintainability pass on FILES_CHANGED
74
+ 3. `Task(subagent_type="Scrutinizer")` — 9-pillar quality evaluation on FILES_CHANGED
75
+ 4. `Task(subagent_type="Validator")` (re-validate after Simplifier/Scrutinizer changes)
76
+ 5. `Task(subagent_type="Shepherd")` — verify implementation matches original request — retry up to 2× if misalignment found
77
+
78
+ If any gate exhausts retries, halt pipeline and report what passed and what failed.
79
+
80
+ ## Phase 6: Completion
81
+
82
+ Report results:
83
+ - Commits created (from Coder)
84
+ - Files changed
85
+ - Quality gate results (pass/fail per gate)
86
+ - No push — user decides when to push
87
+
88
+ ## Error Handling
89
+
90
+ - **Coder BLOCKED**: Halt immediately, report blocker to user
91
+ - **Validator fails after retries**: Report specific failures, halt pipeline
92
+ - **Shepherd misalignment after retries**: Report misalignment details, let user decide next steps
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: plan-orchestration
3
+ description: Agent orchestration for PLAN intent — codebase orientation, design exploration, gap validation
4
+ user-invocable: false
5
+ allowed-tools: Read, Grep, Glob, Bash, Task, AskUserQuestion
6
+ ---
7
+
8
+ # Plan Orchestration
9
+
10
+ Agent pipeline for PLAN intent in ambient ORCHESTRATED mode. Codebase orientation, targeted exploration, architecture design, and gap validation.
11
+
12
+ This is a lightweight variant of the Plan phase in `/implement` for ambient ORCHESTRATED mode.
13
+
14
+ ## Iron Law
15
+
16
+ > **PLANS WITHOUT CODEBASE GROUNDING ARE FANTASIES**
17
+ >
18
+ > Orient before architecting. Every design decision must reference existing patterns,
19
+ > real file structures, and actual integration points. A plan that ignores the codebase
20
+ > will fail on contact with implementation.
21
+
22
+ ---
23
+
24
+ ## Phase 1: Orient
25
+
26
+ Spawn `Task(subagent_type="Skimmer")` to get codebase overview relevant to the planning question:
27
+
28
+ - Existing patterns and conventions in the affected area
29
+ - File structure and module boundaries
30
+ - Test patterns and coverage approach
31
+ - Related prior implementations (similar features, analogous patterns)
32
+
33
+ ## Phase 2: Explore
34
+
35
+ Based on Skimmer findings, spawn 2-3 `Task(subagent_type="Explore")` agents **in a single message** (parallel execution):
36
+
37
+ - **Integration explorer**: Examine integration points — APIs, shared types, module boundaries the plan must respect
38
+ - **Pattern explorer**: Find existing implementations of similar features to follow as templates
39
+ - **Constraint explorer**: Identify constraints — test infrastructure, build system, CI requirements, deployment concerns
40
+
41
+ Adjust explorer focus based on the specific planning question.
42
+
43
+ ## Phase 3: Design
44
+
45
+ Spawn `Task(subagent_type="Plan")` with combined Skimmer + Explore findings:
46
+
47
+ - Design implementation approach with file-level specificity
48
+ - Reference existing patterns discovered in Phase 1-2
49
+ - Include: architecture decisions, file changes, new files needed, test strategy
50
+ - Flag any areas where existing patterns conflict with the proposed approach
51
+
52
+ ## Phase 4: Validate
53
+
54
+ Main session reviews the plan for:
55
+
56
+ - **Gaps**: Missing files, unhandled edge cases, integration points not addressed
57
+ - **Risks**: Areas where the plan deviates from existing patterns, potential regressions
58
+ - **Ambiguities**: Design choices that need user input
59
+
60
+ Present plan to user with identified risks. Use AskUserQuestion for any ambiguous design choices.
61
+
62
+ ## Output
63
+
64
+ Structured plan ready to feed into IMPLEMENT/ORCHESTRATED if user proceeds:
65
+
66
+ - Goal and scope
67
+ - Architecture decisions with rationale
68
+ - File-level change list (create/modify/delete)
69
+ - Test strategy
70
+ - Risks and mitigations
71
+ - Open questions (if any)
@@ -4,7 +4,16 @@
4
4
  "author": {
5
5
  "name": "Dean0x"
6
6
  },
7
- "version": "1.5.0",
7
+ "version": "1.6.1",
8
+ "homepage": "https://github.com/dean0x/devflow",
9
+ "repository": "https://github.com/dean0x/devflow",
10
+ "license": "MIT",
11
+ "keywords": [
12
+ "audit",
13
+ "claude-md",
14
+ "best-practices",
15
+ "lint"
16
+ ],
8
17
  "agents": [],
9
18
  "skills": []
10
19
  }
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Audit CLAUDE.md files against Anthropic best practices
3
+ ---
4
+
1
5
  # Command: /audit-claude
2
6
 
3
7
  ## Description
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "Dean0x"
6
6
  },
7
- "version": "1.5.0",
7
+ "version": "1.6.1",
8
8
  "homepage": "https://github.com/dean0x/devflow",
9
9
  "repository": "https://github.com/dean0x/devflow",
10
10
  "license": "MIT",
@@ -28,6 +28,7 @@
28
28
  "database-patterns",
29
29
  "dependencies-patterns",
30
30
  "documentation-patterns",
31
+ "knowledge-persistence",
31
32
  "performance-patterns",
32
33
  "regression-patterns",
33
34
  "review-methodology",