devflow-kit 1.5.0 → 1.6.0

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 (83) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +6 -3
  3. package/dist/commands/ambient.js +1 -1
  4. package/dist/commands/init.js +2 -2
  5. package/dist/plugins.js +23 -23
  6. package/dist/utils/post-install.js +6 -1
  7. package/package.json +1 -1
  8. package/plugins/devflow-accessibility/.claude-plugin/plugin.json +1 -1
  9. package/plugins/devflow-ambient/.claude-plugin/plugin.json +25 -4
  10. package/plugins/devflow-ambient/README.md +48 -29
  11. package/plugins/devflow-ambient/agents/coder.md +135 -0
  12. package/plugins/devflow-ambient/agents/reviewer.md +165 -0
  13. package/plugins/devflow-ambient/agents/scrutinizer.md +80 -0
  14. package/plugins/devflow-ambient/agents/shepherd.md +94 -0
  15. package/plugins/devflow-ambient/agents/simplifier.md +93 -0
  16. package/plugins/devflow-ambient/agents/skimmer.md +93 -0
  17. package/plugins/devflow-ambient/agents/validator.md +86 -0
  18. package/plugins/devflow-ambient/skills/ambient-router/SKILL.md +72 -28
  19. package/plugins/devflow-ambient/skills/ambient-router/references/skill-catalog.md +40 -35
  20. package/plugins/devflow-ambient/skills/debug-orchestration/SKILL.md +69 -0
  21. package/plugins/devflow-ambient/skills/implementation-orchestration/SKILL.md +92 -0
  22. package/plugins/devflow-ambient/skills/plan-orchestration/SKILL.md +71 -0
  23. package/plugins/devflow-audit-claude/.claude-plugin/plugin.json +10 -1
  24. package/plugins/devflow-audit-claude/commands/audit-claude.md +4 -0
  25. package/plugins/devflow-code-review/.claude-plugin/plugin.json +2 -1
  26. package/plugins/devflow-code-review/agents/reviewer.md +10 -9
  27. package/plugins/devflow-code-review/commands/code-review-teams.md +43 -30
  28. package/plugins/devflow-code-review/commands/code-review.md +10 -1
  29. package/plugins/devflow-code-review/skills/knowledge-persistence/SKILL.md +128 -0
  30. package/plugins/devflow-code-review/skills/knowledge-persistence/references/examples.md +44 -0
  31. package/plugins/devflow-core-skills/.claude-plugin/plugin.json +1 -1
  32. package/plugins/devflow-core-skills/skills/docs-framework/SKILL.md +7 -1
  33. package/plugins/devflow-core-skills/skills/test-driven-development/SKILL.md +6 -5
  34. package/plugins/devflow-debug/.claude-plugin/plugin.json +5 -3
  35. package/plugins/devflow-debug/agents/synthesizer.md +211 -0
  36. package/plugins/devflow-debug/commands/debug-teams.md +28 -14
  37. package/plugins/devflow-debug/commands/debug.md +26 -12
  38. package/plugins/devflow-debug/skills/knowledge-persistence/SKILL.md +128 -0
  39. package/plugins/devflow-debug/skills/knowledge-persistence/references/examples.md +44 -0
  40. package/plugins/devflow-frontend-design/.claude-plugin/plugin.json +1 -1
  41. package/plugins/devflow-go/.claude-plugin/plugin.json +1 -1
  42. package/plugins/devflow-implement/.claude-plugin/plugin.json +2 -1
  43. package/plugins/devflow-implement/agents/coder.md +6 -1
  44. package/plugins/devflow-implement/agents/simplifier.md +32 -1
  45. package/plugins/devflow-implement/agents/skimmer.md +5 -0
  46. package/plugins/devflow-implement/commands/implement-teams.md +72 -55
  47. package/plugins/devflow-implement/commands/implement.md +44 -35
  48. package/plugins/devflow-implement/skills/knowledge-persistence/SKILL.md +128 -0
  49. package/plugins/devflow-implement/skills/knowledge-persistence/references/examples.md +44 -0
  50. package/plugins/devflow-java/.claude-plugin/plugin.json +1 -1
  51. package/plugins/devflow-python/.claude-plugin/plugin.json +1 -1
  52. package/plugins/devflow-react/.claude-plugin/plugin.json +1 -1
  53. package/plugins/devflow-resolve/.claude-plugin/plugin.json +4 -3
  54. package/plugins/devflow-resolve/agents/simplifier.md +32 -1
  55. package/plugins/devflow-resolve/commands/resolve-teams.md +16 -7
  56. package/plugins/devflow-resolve/commands/resolve.md +16 -7
  57. package/plugins/devflow-resolve/skills/knowledge-persistence/SKILL.md +128 -0
  58. package/plugins/devflow-resolve/skills/knowledge-persistence/references/examples.md +44 -0
  59. package/plugins/devflow-rust/.claude-plugin/plugin.json +1 -1
  60. package/plugins/devflow-self-review/.claude-plugin/plugin.json +10 -1
  61. package/plugins/devflow-self-review/agents/simplifier.md +32 -1
  62. package/plugins/devflow-self-review/commands/self-review.md +10 -4
  63. package/plugins/devflow-specify/.claude-plugin/plugin.json +1 -1
  64. package/plugins/devflow-specify/agents/skimmer.md +5 -0
  65. package/plugins/devflow-specify/commands/specify-teams.md +27 -20
  66. package/plugins/devflow-specify/commands/specify.md +26 -19
  67. package/plugins/devflow-typescript/.claude-plugin/plugin.json +1 -1
  68. package/scripts/hooks/ambient-prompt +8 -7
  69. package/scripts/hooks/session-start-memory +33 -3
  70. package/shared/agents/coder.md +6 -1
  71. package/shared/agents/reviewer.md +10 -9
  72. package/shared/agents/simplifier.md +32 -1
  73. package/shared/agents/skimmer.md +5 -0
  74. package/shared/skills/ambient-router/SKILL.md +72 -28
  75. package/shared/skills/ambient-router/references/skill-catalog.md +40 -35
  76. package/shared/skills/debug-orchestration/SKILL.md +69 -0
  77. package/shared/skills/docs-framework/SKILL.md +7 -1
  78. package/shared/skills/implementation-orchestration/SKILL.md +92 -0
  79. package/shared/skills/knowledge-persistence/SKILL.md +128 -0
  80. package/shared/skills/knowledge-persistence/references/examples.md +44 -0
  81. package/shared/skills/plan-orchestration/SKILL.md +71 -0
  82. package/shared/skills/test-driven-development/SKILL.md +6 -5
  83. package/plugins/devflow-ambient/commands/ambient.md +0 -110
@@ -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
5
  allowed-tools: Read, Grep, Glob
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,87 @@ 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.
72
92
  </IMPORTANT>
73
93
 
74
94
  - **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.`
95
+ - **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.
96
+ - **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.
97
+
98
+ ### GUIDED Behavior by Intent
99
+
100
+ | Intent | Main Session Work | Post-Work |
101
+ |--------|------------------|-----------|
102
+ | **IMPLEMENT** | Implement directly with loaded skills. Follow TDD cycle. | Spawn Simplifier on changed files. |
103
+ | **DEBUG** | Investigate directly — reproduce bug, diagnose from stack trace/error, fix. | Spawn Simplifier on changed files. |
104
+ | **PLAN** | Explore relevant code and design directly. The area is focused enough for main session. | No Simplifier (no code changes). |
105
+ | **REVIEW** | Review directly with loaded skills. | No Simplifier. |
106
+
107
+ ## Step 5: Orchestrate Agents (ORCHESTRATED depth only)
108
+
109
+ After loading skills via Step 3-4, execute the agent pipeline for the classified intent:
110
+
111
+ | Intent | Pipeline |
112
+ |--------|----------|
113
+ | **IMPLEMENT** | Follow implementation-orchestration skill pipeline: pre-flight → plan synthesis → Coder → quality gates |
114
+ | **DEBUG** | Follow debug-orchestration skill pipeline: hypotheses → parallel Explores → convergence → report → offer fix |
115
+ | **PLAN** | Follow plan-orchestration skill pipeline: Skimmer → Explores → Plan agent → gap validation |
116
+ | **EXPLORE** | No agents — respond in main session |
117
+ | **CHAT** | No agents — respond in main session |
77
118
 
78
119
  ---
79
120
 
80
121
  ## Transparency Rules
81
122
 
82
123
  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.
124
+ 2. **GUIDED → brief statement + full skill enforcement.** One line: intent, depth, skills loaded. Then implement in main session with skill patterns applied.
125
+ 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
126
  4. **Never lie about classification.** If uncertain, say so.
86
127
  5. **Never over-classify.** When in doubt, go one tier lower.
87
128
  6. **Never under-apply.** Rationalization is the enemy of quality. If a skill requires a step, do the step.
@@ -90,7 +131,10 @@ If test-driven-development is selected, you MUST write the failing test before A
90
131
 
91
132
  | Case | Handling |
92
133
  |------|----------|
93
- | Mixed intent ("fix this bug and add a test") | Use the higher-overhead intent (BUILD > DEBUG) |
134
+ | Mixed intent ("fix this bug and add a test") | Use the higher-overhead intent (IMPLEMENT > DEBUG) |
94
135
  | Continuation of previous conversation | Inherit previous classification unless prompt clearly shifts |
95
136
  | User explicitly requests no enforcement | Respect immediately — classify as QUICK |
96
137
  | Prompt references specific DevFlow command | Skip ambient — the command has its own orchestration |
138
+ | Scope ambiguous between GUIDED and ORCHESTRATED | Default to GUIDED; escalate if complexity emerges during work |
139
+ | REVIEW intent | Always GUIDED — single Reviewer focus, no orchestration pipeline |
140
+ | 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.0",
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.0",
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",
@@ -42,15 +42,16 @@ The orchestrator provides:
42
42
  ## Responsibilities
43
43
 
44
44
  1. **Load focus skill** - Read the pattern skill file for your focus area from the table above. This gives you detection rules and patterns specific to your review type.
45
- 2. **Identify changed lines** - Get diff against base branch (main/master/develop)
46
- 3. **Apply 3-category classification** - Sort issues by where they occur
47
- 4. **Apply focus-specific analysis** - Use pattern skill detection rules from the loaded skill file
48
- 5. **Assign severity** - CRITICAL, HIGH, MEDIUM, LOW based on impact
49
- 6. **Assess confidence** - Assign 0-100% confidence to each finding (see Confidence Scale below)
50
- 7. **Filter by confidence** - Only report findings ≥80% in main sections; lower-confidence items go to Suggestions
51
- 8. **Consolidate similar issues** - Group related findings to reduce noise (see Consolidation Rules)
52
- 9. **Generate report** - File:line references with suggested fixes
53
- 10. **Determine merge recommendation** - Based on blocking issues
45
+ 2. **Check known pitfalls** - If `.memory/knowledge/pitfalls.md` exists, read it. Check if any pitfall Areas overlap with files in the current diff. Verify the Resolution was applied. Flag if a known pitfall pattern is being reintroduced.
46
+ 3. **Identify changed lines** - Get diff against base branch (main/master/develop)
47
+ 4. **Apply 3-category classification** - Sort issues by where they occur
48
+ 5. **Apply focus-specific analysis** - Use pattern skill detection rules from the loaded skill file
49
+ 6. **Assign severity** - CRITICAL, HIGH, MEDIUM, LOW based on impact
50
+ 7. **Assess confidence** - Assign 0-100% confidence to each finding (see Confidence Scale below)
51
+ 8. **Filter by confidence** - Only report findings ≥80% in main sections; lower-confidence items go to Suggestions
52
+ 9. **Consolidate similar issues** - Group related findings to reduce noise (see Consolidation Rules)
53
+ 10. **Generate report** - File:line references with suggested fixes
54
+ 11. **Determine merge recommendation** - Based on blocking issues
54
55
 
55
56
  ## Confidence Scale
56
57