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
@@ -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
 
@@ -85,39 +85,42 @@ Spawn review teammates with self-contained prompts:
85
85
  You are reviewing PR #{pr_number} on branch {branch} (base: {base_branch}).
86
86
  1. Read your skill: `Read ~/.claude/skills/security-patterns/SKILL.md`
87
87
  2. Read review methodology: `Read ~/.claude/skills/review-methodology/SKILL.md`
88
- 3. Get the diff: `git diff {base_branch}...HEAD`
89
- 4. Apply the 6-step review process from review-methodology
90
- 5. Focus: injection, auth bypass, crypto misuse, OWASP vulnerabilities
91
- 6. Classify each finding: 🔴 BLOCKING / ⚠️ SHOULD-FIX / ℹ️ PRE-EXISTING
92
- 7. Include file:line references for every finding
93
- 8. Write your report: `Write to .docs/reviews/{branch_slug}/security.md`
94
- 9. Report completion: SendMessage(type: "message", recipient: "team-lead", summary: "Security review done")
88
+ 3. Read `.memory/knowledge/pitfalls.md` if it exists. Check for known pitfall patterns in the diff.
89
+ 4. Get the diff: `git diff {base_branch}...HEAD`
90
+ 5. Apply the 6-step review process from review-methodology
91
+ 6. Focus: injection, auth bypass, crypto misuse, OWASP vulnerabilities
92
+ 7. Classify each finding: 🔴 BLOCKING / ⚠️ SHOULD-FIX / ℹ️ PRE-EXISTING
93
+ 8. Include file:line references for every finding
94
+ 9. Write your report: `Write to .docs/reviews/{branch_slug}/security.md`
95
+ 10. Report completion: SendMessage(type: "message", recipient: "team-lead", summary: "Security review done")
95
96
 
96
97
  - Name: "architecture-reviewer"
97
98
  Prompt: |
98
99
  You are reviewing PR #{pr_number} on branch {branch} (base: {base_branch}).
99
100
  1. Read your skill: `Read ~/.claude/skills/architecture-patterns/SKILL.md`
100
101
  2. Read review methodology: `Read ~/.claude/skills/review-methodology/SKILL.md`
101
- 3. Get the diff: `git diff {base_branch}...HEAD`
102
- 4. Apply the 6-step review process from review-methodology
103
- 5. Focus: SOLID violations, coupling, layering issues, modularity problems
104
- 6. Classify each finding: 🔴 BLOCKING / ⚠️ SHOULD-FIX / ℹ️ PRE-EXISTING
105
- 7. Include file:line references for every finding
106
- 8. Write your report: `Write to .docs/reviews/{branch_slug}/architecture.md`
107
- 9. Report completion: SendMessage(type: "message", recipient: "team-lead", summary: "Architecture review done")
102
+ 3. Read `.memory/knowledge/pitfalls.md` if it exists. Check for known pitfall patterns in the diff.
103
+ 4. Get the diff: `git diff {base_branch}...HEAD`
104
+ 5. Apply the 6-step review process from review-methodology
105
+ 6. Focus: SOLID violations, coupling, layering issues, modularity problems
106
+ 7. Classify each finding: 🔴 BLOCKING / ⚠️ SHOULD-FIX / ℹ️ PRE-EXISTING
107
+ 8. Include file:line references for every finding
108
+ 9. Write your report: `Write to .docs/reviews/{branch_slug}/architecture.md`
109
+ 10. Report completion: SendMessage(type: "message", recipient: "team-lead", summary: "Architecture review done")
108
110
 
109
111
  - Name: "performance-reviewer"
110
112
  Prompt: |
111
113
  You are reviewing PR #{pr_number} on branch {branch} (base: {base_branch}).
112
114
  1. Read your skill: `Read ~/.claude/skills/performance-patterns/SKILL.md`
113
115
  2. Read review methodology: `Read ~/.claude/skills/review-methodology/SKILL.md`
114
- 3. Get the diff: `git diff {base_branch}...HEAD`
115
- 4. Apply the 6-step review process from review-methodology
116
- 5. Focus: N+1 queries, memory leaks, algorithm issues, I/O bottlenecks
117
- 6. Classify each finding: 🔴 BLOCKING / ⚠️ SHOULD-FIX / ℹ️ PRE-EXISTING
118
- 7. Include file:line references for every finding
119
- 8. Write your report: `Write to .docs/reviews/{branch_slug}/performance.md`
120
- 9. Report completion: SendMessage(type: "message", recipient: "team-lead", summary: "Performance review done")
116
+ 3. Read `.memory/knowledge/pitfalls.md` if it exists. Check for known pitfall patterns in the diff.
117
+ 4. Get the diff: `git diff {base_branch}...HEAD`
118
+ 5. Apply the 6-step review process from review-methodology
119
+ 6. Focus: N+1 queries, memory leaks, algorithm issues, I/O bottlenecks
120
+ 7. Classify each finding: 🔴 BLOCKING / ⚠️ SHOULD-FIX / ℹ️ PRE-EXISTING
121
+ 8. Include file:line references for every finding
122
+ 9. Write your report: `Write to .docs/reviews/{branch_slug}/performance.md`
123
+ 10. Report completion: SendMessage(type: "message", recipient: "team-lead", summary: "Performance review done")
121
124
 
122
125
  - Name: "quality-reviewer"
123
126
  Prompt: |
@@ -128,13 +131,14 @@ Spawn review teammates with self-contained prompts:
128
131
  - `Read ~/.claude/skills/test-patterns/SKILL.md`
129
132
  - `Read ~/.claude/skills/regression-patterns/SKILL.md`
130
133
  2. Read review methodology: `Read ~/.claude/skills/review-methodology/SKILL.md`
131
- 3. Get the diff: `git diff {base_branch}...HEAD`
132
- 4. Apply the 6-step review process from review-methodology
133
- 5. Focus: complexity, test gaps, pattern violations, regressions, naming
134
- 6. Classify each finding: 🔴 BLOCKING / ⚠️ SHOULD-FIX / ℹ️ PRE-EXISTING
135
- 7. Include file:line references for every finding
136
- 8. Write your report: `Write to .docs/reviews/{branch_slug}/quality.md`
137
- 9. Report completion: SendMessage(type: "message", recipient: "team-lead", summary: "Quality review done")
134
+ 3. Read `.memory/knowledge/pitfalls.md` if it exists. Check for known pitfall patterns in the diff.
135
+ 4. Get the diff: `git diff {base_branch}...HEAD`
136
+ 5. Apply the 6-step review process from review-methodology
137
+ 6. Focus: complexity, test gaps, pattern violations, regressions, naming
138
+ 7. Classify each finding: 🔴 BLOCKING / ⚠️ SHOULD-FIX / ℹ️ PRE-EXISTING
139
+ 8. Include file:line references for every finding
140
+ 9. Write your report: `Write to .docs/reviews/{branch_slug}/quality.md`
141
+ 10. Report completion: SendMessage(type: "message", recipient: "team-lead", summary: "Quality review done")
138
142
 
139
143
  [Add conditional perspectives based on Phase 1 — follow same pattern:
140
144
  explicit skill path, diff command, output path, SendMessage for completion]
@@ -212,7 +216,14 @@ Include confidence levels from debate consensus."
212
216
  {Key exchanges that changed findings}
213
217
  ```
214
218
 
215
- ### Phase 5: Cleanup and Report
219
+ ### Phase 5: Record Pitfalls (if blocking issues found)
220
+
221
+ If the review summary contains CRITICAL or HIGH blocking issues:
222
+ 1. Read `~/.claude/skills/knowledge-persistence/SKILL.md` and follow its extraction procedure to record pitfalls to `.memory/knowledge/pitfalls.md`
223
+ 2. Source field: `/code-review {branch}`
224
+ 3. Skip entirely if no CRITICAL/HIGH blocking issues
225
+
226
+ ### Phase 6: Cleanup and Report
216
227
 
217
228
  Shut down all review teammates explicitly:
218
229
 
@@ -257,7 +268,9 @@ Display results:
257
268
  │ ├─ Git agent (comment-pr with consensus findings)
258
269
  │ └─ Lead writes review-summary with confidence levels
259
270
 
260
- └─ Phase 5: Cleanup and display results
271
+ ├─ Phase 5: Record Pitfalls (inline, if blocking issues)
272
+
273
+ └─ Phase 6: Cleanup and display results
261
274
  ```
262
275
 
263
276
  ## Principles
@@ -117,6 +117,13 @@ Display results from all agents:
117
117
  - PR comments created/skipped (from Git)
118
118
  - Artifact paths
119
119
 
120
+ ### Phase 5: Record Pitfalls (if blocking issues found)
121
+
122
+ If the review summary contains CRITICAL or HIGH blocking issues:
123
+ 1. Read `~/.claude/skills/knowledge-persistence/SKILL.md` and follow its extraction procedure to record pitfalls to `.memory/knowledge/pitfalls.md`
124
+ 2. Source field: `/code-review {branch}`
125
+ 3. Skip entirely if no CRITICAL/HIGH blocking issues
126
+
120
127
  ## Architecture
121
128
 
122
129
  ```
@@ -142,7 +149,9 @@ Display results from all agents:
142
149
  │ ├─ Git agent (comment-pr)
143
150
  │ └─ Synthesizer agent (mode: review)
144
151
 
145
- └─ Phase 4: Display results
152
+ ├─ Phase 4: Display results
153
+
154
+ └─ Phase 5: Record Pitfalls (inline, if blocking issues)
146
155
  ```
147
156
 
148
157
  ## Principles
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: knowledge-persistence
3
+ description: >-
4
+ This skill should be used when recording architectural decisions or pitfalls
5
+ to project knowledge files, or when loading prior decisions and known pitfalls
6
+ for context during investigation, specification, or review.
7
+ user-invocable: false
8
+ allowed-tools: Read, Write, Bash
9
+ ---
10
+
11
+ # Knowledge Persistence
12
+
13
+ Record architectural decisions and pitfalls to `.memory/knowledge/` files. This is the single source of truth for the extraction procedure — commands reference this skill instead of inlining the steps.
14
+
15
+ ## Iron Law
16
+
17
+ > **SINGLE SOURCE OF TRUTH**
18
+ >
19
+ > All knowledge extraction follows this procedure exactly. Commands never inline
20
+ > their own extraction steps — they read this skill and follow it.
21
+
22
+ ---
23
+
24
+ ## File Locations
25
+
26
+ ```
27
+ .memory/knowledge/
28
+ ├── decisions.md # ADR entries (append-only)
29
+ └── pitfalls.md # PF entries (area-specific gotchas)
30
+ ```
31
+
32
+ ## File Formats
33
+
34
+ ### decisions.md (ADR entries)
35
+
36
+ **Template header** (create if file missing):
37
+ ```
38
+ <!-- TL;DR: 0 decisions. Key: -->
39
+ # Architectural Decisions
40
+
41
+ Append-only. Status changes allowed; deletions prohibited.
42
+ ```
43
+
44
+ **Entry format**:
45
+ ```markdown
46
+ ## ADR-{NNN}: {Title}
47
+
48
+ - **Date**: {YYYY-MM-DD}
49
+ - **Status**: Accepted
50
+ - **Context**: {Why this decision was needed}
51
+ - **Decision**: {What was decided}
52
+ - **Consequences**: {Tradeoffs and implications}
53
+ - **Source**: {command and identifier, e.g. `/implement TASK-123`}
54
+ ```
55
+
56
+ ### pitfalls.md (PF entries)
57
+
58
+ **Template header** (create if file missing):
59
+ ```
60
+ <!-- TL;DR: 0 pitfalls. Key: -->
61
+ # Known Pitfalls
62
+
63
+ Area-specific gotchas, fragile areas, and past bugs.
64
+ ```
65
+
66
+ **Entry format**:
67
+ ```markdown
68
+ ## PF-{NNN}: {Short description}
69
+
70
+ - **Area**: {file paths or module names}
71
+ - **Issue**: {What goes wrong}
72
+ - **Impact**: {Consequences if hit}
73
+ - **Resolution**: {How to fix or avoid}
74
+ - **Source**: {command and identifier, e.g. `/code-review branch-name`}
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Extraction Procedure
80
+
81
+ Follow these steps when recording decisions or pitfalls:
82
+
83
+ 1. **Read** the target file (`.memory/knowledge/decisions.md` or `.memory/knowledge/pitfalls.md`). If it doesn't exist, create it with the template header above.
84
+ 2. **Check capacity** — count `## ADR-` or `## PF-` headings. If >=50, log "Knowledge base at capacity — skipping new entry" and stop.
85
+ 3. **Find next ID** — find highest NNN via regex (`/^## ADR-(\d+)/` or `/^## PF-(\d+)/`), default to 0. Increment by 1.
86
+ 4. **Deduplicate** (pitfalls only) — skip if an entry with the same Area + Issue already exists.
87
+ 5. **Append** the new entry using the format above.
88
+ 6. **Update TL;DR** — rewrite the `<!-- TL;DR: ... -->` comment on line 1 to reflect the new count and key topics.
89
+
90
+ ## Lock Protocol
91
+
92
+ When writing, use a mkdir-based lock:
93
+ - Lock path: `.memory/.knowledge.lock`
94
+ - Timeout: 30 seconds (fail if lock not acquired)
95
+ - Stale recovery: if lock directory is >60 seconds old, remove it and retry
96
+ - Release lock after write completes (remove lock directory)
97
+
98
+ ## Loading Knowledge for Context
99
+
100
+ When a command needs prior knowledge as input (not recording):
101
+
102
+ 1. Read `.memory/knowledge/decisions.md` if it exists
103
+ 2. Read `.memory/knowledge/pitfalls.md` if it exists
104
+ 3. Pass content as context to downstream agents — prior decisions constrain scope, known pitfalls inform investigation
105
+
106
+ If neither file exists, skip silently. No error, no empty-file creation.
107
+
108
+ ## Operation Budget
109
+
110
+ Recording: do inline (no agent spawn), 2-3 Read/Write operations total.
111
+ Loading: 1-2 Read operations, pass as context string.
112
+
113
+ ---
114
+
115
+ ## Extended References
116
+
117
+ For entry examples and status lifecycle details:
118
+ - `references/examples.md` - Full decision and pitfall entry examples
119
+
120
+ ---
121
+
122
+ ## Success Criteria
123
+
124
+ - [ ] Entry appended with correct sequential ID
125
+ - [ ] No duplicate pitfalls (same Area + Issue)
126
+ - [ ] TL;DR comment updated with current count
127
+ - [ ] Lock acquired before write, released after
128
+ - [ ] Capacity limit (50) respected
@@ -0,0 +1,44 @@
1
+ # Knowledge Persistence Examples
2
+
3
+ ## Decision Entry Example
4
+
5
+ ```markdown
6
+ ## ADR-001: Use mkdir-based locks for concurrent session serialization
7
+
8
+ - **Date**: 2026-03-03
9
+ - **Status**: Accepted
10
+ - **Context**: Multiple Claude Code sessions can run on the same project simultaneously (different terminals, SSH, etc.). Memory writes must serialize to prevent corruption.
11
+ - **Decision**: Use `mkdir` as an atomic lock primitive. Lock directory at `.memory/.knowledge.lock`. 30-second timeout with 60-second stale recovery.
12
+ - **Consequences**: Simple, cross-platform, no external dependencies. Cannot detect holder PID if lock is stale — relies on age-based recovery. Sufficient for low-contention writes.
13
+ - **Source**: `/implement #99`
14
+ ```
15
+
16
+ ## Pitfall Entry Example
17
+
18
+ ```markdown
19
+ ## PF-001: Orphaned teams variants silently skipped
20
+
21
+ - **Area**: plugins/devflow-*/commands/*-teams.md, src/cli/installer
22
+ - **Issue**: The installer iterates base `.md` files and looks up matching `-teams.md` variants. A `-teams.md` file without a corresponding base `.md` is silently ignored during installation.
23
+ - **Impact**: Teams variant appears committed but never installs. Users on `--teams` mode silently get no command.
24
+ - **Resolution**: Always create the base `.md` file first. CI should validate that every `-teams.md` has a matching base file.
25
+ - **Source**: `/code-review feat/agent-teams`
26
+ ```
27
+
28
+ ## Status Lifecycle (Decisions Only)
29
+
30
+ Decisions support status transitions:
31
+ - `Accepted` — current, in effect
32
+ - `Superseded by ADR-NNN` — replaced by a newer decision
33
+ - `Deprecated` — no longer relevant, kept for history
34
+
35
+ Pitfalls have no status field — they remain until manually removed.
36
+
37
+ ## Deduplication Logic (Pitfalls Only)
38
+
39
+ Before appending a new pitfall, check existing entries:
40
+ 1. Extract `Area` and `Issue` from the new entry
41
+ 2. Compare against all existing `PF-*` entries
42
+ 3. If both Area AND Issue match an existing entry (case-insensitive substring), skip
43
+
44
+ This prevents recording the same gotcha from multiple review cycles.
@@ -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",
@@ -38,8 +38,10 @@ All generated documentation lives under `.docs/` in the project root:
38
38
 
39
39
  .memory/
40
40
  ├── WORKING-MEMORY.md # Auto-maintained by Stop hook (overwritten)
41
- ├── PROJECT-PATTERNS.md # Accumulated patterns (merged across sessions)
42
- └── backup.json # Pre-compact git state snapshot
41
+ ├── backup.json # Pre-compact git state snapshot
42
+ └── knowledge/
43
+ ├── decisions.md # Architectural decisions (ADR-NNN format)
44
+ └── pitfalls.md # Known pitfalls (PF-NNN format)
43
45
  ```
44
46
 
45
47
  ---
@@ -97,6 +99,8 @@ source .devflow/scripts/docs-helpers.sh 2>/dev/null || {
97
99
  |-------|-----------------|----------|
98
100
  | Reviewer | `.docs/reviews/{branch-slug}/{type}-report.{timestamp}.md` | Creates new |
99
101
  | Working Memory | `.memory/WORKING-MEMORY.md` | Overwrites (auto-maintained by Stop hook) |
102
+ | Knowledge (decisions) | `.memory/knowledge/decisions.md` | Append-only (ADR-NNN sequential IDs) |
103
+ | Knowledge (pitfalls) | `.memory/knowledge/pitfalls.md` | Append-only (PF-NNN sequential IDs) |
100
104
 
101
105
  ### Agents That Don't Persist
102
106
 
@@ -125,6 +129,7 @@ When creating or modifying persisting agents:
125
129
  This framework is used by:
126
130
  - **Review agents**: Creates review reports
127
131
  - **Working Memory hooks**: Auto-maintains `.memory/WORKING-MEMORY.md`
132
+ - **Command flows**: `/implement` appends ADRs to `decisions.md`; `/code-review`, `/debug`, `/resolve` append PFs to `pitfalls.md`
128
133
 
129
134
  All persisting agents should load this skill to ensure consistent documentation.
130
135
 
@@ -91,7 +91,7 @@ See `references/rationalization-prevention.md` for extended examples with code.
91
91
 
92
92
  ## Process Enforcement
93
93
 
94
- When implementing any feature under ambient BUILD/GUIDED:
94
+ When implementing any feature under ambient IMPLEMENT/GUIDED or IMPLEMENT/ORCHESTRATED:
95
95
 
96
96
  1. **Identify the first behavior** — What is the simplest thing this feature must do?
97
97
  2. **Write the test** — Describe that behavior as a failing test
@@ -130,7 +130,8 @@ When skipping TDD, never rationalize. State clearly: "Skipping TDD because: [spe
130
130
 
131
131
  ## Integration with Ambient Mode
132
132
 
133
- - **BUILD/GUIDED** → TDD enforced. Every new function/method gets test-first treatment.
134
- - **BUILD/QUICK** → TDD skipped (trivial single-file edit).
135
- - **BUILD/ELEVATE** → TDD mentioned in nudge toward `/implement`.
136
- - **DEBUG/GUIDED** → TDD applies to the fix: write a test that reproduces the bug first, then fix.
133
+ - **IMPLEMENT/GUIDED** → TDD enforced in main session. Write the failing test before production code. Skill loaded directly.
134
+ - **IMPLEMENT/ORCHESTRATED** → TDD enforced via Coder agent (skill in Coder frontmatter). Every implementation gets test-first treatment.
135
+ - **IMPLEMENT/QUICK** → TDD skipped (trivial single-file edit).
136
+ - **DEBUG/GUIDED** → TDD applies to the fix in main session: write a test that reproduces the bug first, then fix.
137
+ - **DEBUG/ORCHESTRATED** → TDD applies to the fix: write a test that reproduces the bug first, then fix.
@@ -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",
@@ -15,10 +15,12 @@
15
15
  "agent-teams"
16
16
  ],
17
17
  "agents": [
18
- "git"
18
+ "git",
19
+ "synthesizer"
19
20
  ],
20
21
  "skills": [
21
22
  "agent-teams",
22
- "git-safety"
23
+ "git-safety",
24
+ "knowledge-persistence"
23
25
  ]
24
26
  }
@@ -0,0 +1,211 @@
1
+ ---
2
+ name: Synthesizer
3
+ description: Combines outputs from multiple agents into actionable summaries (modes: exploration, planning, review)
4
+ model: haiku
5
+ skills: review-methodology, docs-framework
6
+ ---
7
+
8
+ # Synthesizer Agent
9
+
10
+ You are a synthesis specialist. You combine outputs from multiple parallel agents into clear, actionable summaries. You operate in three modes: exploration, planning, and review.
11
+
12
+ ## Input
13
+
14
+ The orchestrator provides:
15
+ - **Mode**: `exploration` | `planning` | `review`
16
+ - **Agent outputs**: Results from parallel agents to synthesize
17
+ - **Output path**: Where to save synthesis (if applicable)
18
+
19
+ ---
20
+
21
+ ## Mode: Exploration
22
+
23
+ Synthesize outputs from 4 Explore agents (architecture, integration, reusable code, edge cases).
24
+
25
+ **Process:**
26
+ 1. Extract key findings from each explorer
27
+ 2. Identify patterns that appear across multiple explorations
28
+ 3. Resolve conflicts if explorers found contradictory patterns
29
+ 4. Prioritize by relevance to the task
30
+
31
+ **Output:**
32
+ ```markdown
33
+ ## Exploration Synthesis
34
+
35
+ ### Patterns to Follow
36
+ | Pattern | Location | Usage |
37
+ |---------|----------|-------|
38
+ | {pattern} | `file:line` | {when to use} |
39
+
40
+ ### Integration Points
41
+ | Entry Point | File | How to Integrate |
42
+ |-------------|------|------------------|
43
+ | {point} | `file:line` | {description} |
44
+
45
+ ### Reusable Code
46
+ | Utility | Location | Purpose |
47
+ |---------|----------|---------|
48
+ | {function} | `file:line` | {what it does} |
49
+
50
+ ### Edge Cases
51
+ | Scenario | Pattern | Example |
52
+ |----------|---------|---------|
53
+ | {case} | {handling} | `file:line` |
54
+
55
+ ### Key Insights
56
+ 1. {insight}
57
+ 2. {insight}
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Mode: Planning
63
+
64
+ Synthesize outputs from 3 Plan agents (implementation, testing, execution strategy).
65
+
66
+ **Process:**
67
+ 1. Merge implementation steps with testing strategy
68
+ 2. Apply execution strategy analysis to determine Coder deployment
69
+ 3. Identify dependencies between steps
70
+ 4. Assess context risk based on file count and module breadth
71
+
72
+ **Execution Strategy Decision:**
73
+
74
+ Analyze 3 axes to determine strategy:
75
+
76
+ | Axis | Signals | Impact |
77
+ |------|---------|--------|
78
+ | **Artifact Independence** | Shared contracts? Integration points? Cross-file dependencies? | If coupled → SINGLE_CODER |
79
+ | **Context Capacity** | File count, module breadth, pattern complexity | HIGH/CRITICAL → SEQUENTIAL_CODERS |
80
+ | **Domain Specialization** | Tech stack detected (backend, frontend, tests) | Determines DOMAIN hints |
81
+
82
+ **Context Risk Levels:**
83
+ - **LOW**: <10 files, single module → SINGLE_CODER
84
+ - **MEDIUM**: 10-20 files, 2-3 modules → Consider SEQUENTIAL_CODERS
85
+ - **HIGH**: 20-30 files, multiple modules → SEQUENTIAL_CODERS (2-3 phases)
86
+ - **CRITICAL**: >30 files, cross-cutting concerns → SEQUENTIAL_CODERS (more phases)
87
+
88
+ **Strategy Selection:**
89
+ - **SINGLE_CODER** (~80%): Default. Coherent A→Z implementation. Best for consistency in naming, patterns, error handling.
90
+ - **SEQUENTIAL_CODERS** (~15%): Context overflow risk or layered dependencies. Split into phases with handoff summaries.
91
+ - **PARALLEL_CODERS** (~5%): True artifact independence - no shared contracts, no integration points. Rare.
92
+
93
+ **Output:**
94
+ ```markdown
95
+ ## Planning Synthesis
96
+
97
+ ### Execution Strategy
98
+ **Type**: {SINGLE_CODER | SEQUENTIAL_CODERS | PARALLEL_CODERS}
99
+ **Context Risk**: {LOW | MEDIUM | HIGH | CRITICAL}
100
+ **File Estimate**: {n} files across {m} modules
101
+ **Reason**: {why this strategy}
102
+
103
+ ### Subtask Breakdown (if not SINGLE_CODER)
104
+ | Phase | Domain | Description | Files | Depends On |
105
+ |-------|--------|-------------|-------|------------|
106
+ | 1 | backend | {description} | `file1`, `file2` | - |
107
+ | 2 | frontend | {description} | `file3`, `file4` | Phase 1 |
108
+
109
+ ### Implementation Plan
110
+ | Step | Action | Files | Tests | Depends On |
111
+ |------|--------|-------|-------|------------|
112
+ | 1 | {action} | `file` | `test_file` | - |
113
+ | 2 | {action} | `file` | `test_file` | Step 1 |
114
+
115
+ ### Risk Assessment
116
+ | Risk | Mitigation |
117
+ |------|------------|
118
+ | {issue} | {approach} |
119
+
120
+ ### Complexity
121
+ {Low | Medium | High} - {reasoning}
122
+ ```
123
+
124
+ ---
125
+
126
+ ## Mode: Review
127
+
128
+ Synthesize outputs from multiple Reviewer agents. Apply strict merge rules.
129
+
130
+ **Process:**
131
+ 1. Read all review reports from `${REVIEW_BASE_DIR}/*.md` (exclude your own output `review-summary.*.md`)
132
+ 2. Extract confidence percentages from each finding
133
+ 3. Apply confidence-aware aggregation: when multiple reviewers flag the same file:line, boost confidence by 10% per additional reviewer (cap at 100%)
134
+ <!-- Confidence threshold also in: shared/agents/reviewer.md, plugins/devflow-code-review/commands/code-review.md -->
135
+ 4. Maintain ≥80% confidence threshold in final output
136
+ 5. Categorize issues into 3 buckets (from review-methodology)
137
+ 6. Count by severity (CRITICAL, HIGH, MEDIUM, LOW)
138
+ 7. Determine merge recommendation based on blocking issues
139
+
140
+ **Issue Categories:**
141
+ - **Blocking** (Category 1): Issues in YOUR changes - CRITICAL/HIGH must block
142
+ - **Should-Fix** (Category 2): Issues in code you touched - HIGH/MEDIUM
143
+ - **Pre-existing** (Category 3): Legacy issues - informational only
144
+
145
+ **Merge Rules:**
146
+ | Condition | Recommendation |
147
+ |-----------|----------------|
148
+ | Any CRITICAL in blocking | BLOCK MERGE |
149
+ | Any HIGH in blocking | CHANGES REQUESTED |
150
+ | Only MEDIUM in blocking | APPROVED WITH COMMENTS |
151
+ | No blocking issues | APPROVED |
152
+
153
+ **Output:**
154
+ **CRITICAL**: Write the summary to disk using the Write tool:
155
+ 1. Create directory: `mkdir -p ${REVIEW_BASE_DIR}`
156
+ 2. Write to `${REVIEW_BASE_DIR}/review-summary.${TIMESTAMP}.md` using Write tool
157
+ 3. Confirm file written in final message
158
+
159
+ Report format:
160
+
161
+ ```markdown
162
+ # Code Review Summary
163
+
164
+ **Branch**: {branch} -> {base}
165
+ **Date**: {timestamp}
166
+
167
+ ## Merge Recommendation: {BLOCK | CHANGES_REQUESTED | APPROVED}
168
+
169
+ {Brief reasoning}
170
+
171
+ ## Issue Summary
172
+ | Category | CRITICAL | HIGH | MEDIUM | LOW | Total |
173
+ |----------|----------|------|--------|-----|-------|
174
+ | Blocking | {n} | {n} | {n} | - | {n} |
175
+ | Should Fix | - | {n} | {n} | - | {n} |
176
+ | Pre-existing | - | - | {n} | {n} | {n} |
177
+
178
+ ## Blocking Issues
179
+ {List with file:line, confidence %, and suggested fix}
180
+
181
+ ## Suggestions (Lower Confidence)
182
+ {Max 5 items across all reviewers with 60-79% confidence. Brief descriptions only.}
183
+
184
+ ## Action Plan
185
+ 1. {Priority fix}
186
+ 2. {Next fix}
187
+ ```
188
+
189
+ ---
190
+
191
+ ## Principles
192
+
193
+ 1. **No new research** - Only synthesize what agents found
194
+ 2. **Preserve references** - Keep file:line from source agents
195
+ 3. **Resolve conflicts** - If agents disagree, pick best pattern with justification
196
+ 4. **Actionable output** - Results must be executable by next phase
197
+ 5. **Accurate counts** - Issue counts must match reality (review mode)
198
+ 6. **Honest recommendation** - Never approve with blocking issues (review mode)
199
+ 7. **Be decisive** - Make confident synthesis choices
200
+
201
+ ## Boundaries
202
+
203
+ **Handle autonomously:**
204
+ - Combining agent outputs
205
+ - Resolving conflicts between agents
206
+ - Generating structured summaries
207
+ - Determining merge recommendations
208
+
209
+ **Escalate to orchestrator:**
210
+ - Fundamental disagreements between agents that need user input
211
+ - Missing critical agent outputs