@thierrynakoa/fire-flow 10.0.0 → 12.2.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 (94) hide show
  1. package/.claude-plugin/plugin.json +8 -8
  2. package/ARCHITECTURE-DIAGRAM.md +7 -4
  3. package/COMMAND-REFERENCE.md +33 -13
  4. package/DOMINION-FLOW-OVERVIEW.md +581 -421
  5. package/QUICK-START.md +3 -3
  6. package/README.md +101 -44
  7. package/TROUBLESHOOTING.md +264 -264
  8. package/agents/fire-executor.md +200 -116
  9. package/agents/fire-fact-checker.md +276 -276
  10. package/agents/fire-phoenix-analyst.md +394 -0
  11. package/agents/fire-planner.md +145 -53
  12. package/agents/fire-project-researcher.md +155 -155
  13. package/agents/fire-research-synthesizer.md +166 -166
  14. package/agents/fire-researcher.md +144 -59
  15. package/agents/fire-roadmapper.md +215 -203
  16. package/agents/fire-verifier.md +247 -65
  17. package/agents/fire-vision-architect.md +381 -0
  18. package/commands/fire-0-orient.md +476 -476
  19. package/commands/fire-1a-new.md +216 -0
  20. package/commands/fire-1b-research.md +210 -0
  21. package/commands/fire-1c-setup.md +254 -0
  22. package/commands/{fire-1a-discuss.md → fire-1d-discuss.md} +35 -7
  23. package/commands/fire-3-execute.md +55 -2
  24. package/commands/fire-4-verify.md +61 -0
  25. package/commands/fire-5-handoff.md +2 -2
  26. package/commands/fire-6-resume.md +37 -2
  27. package/commands/fire-add-new-skill.md +2 -2
  28. package/commands/fire-autonomous.md +20 -3
  29. package/commands/fire-brainstorm.md +1 -1
  30. package/commands/fire-complete-milestone.md +2 -2
  31. package/commands/fire-cost.md +183 -0
  32. package/commands/fire-dashboard.md +2 -2
  33. package/commands/fire-debug.md +663 -663
  34. package/commands/fire-loop-resume.md +2 -2
  35. package/commands/fire-loop-stop.md +1 -1
  36. package/commands/fire-loop.md +1168 -1168
  37. package/commands/fire-map-codebase.md +3 -3
  38. package/commands/fire-new-milestone.md +356 -356
  39. package/commands/fire-phoenix.md +603 -0
  40. package/commands/fire-reflect.md +235 -235
  41. package/commands/fire-research.md +246 -246
  42. package/commands/fire-search.md +1 -1
  43. package/commands/fire-skills-diff.md +3 -3
  44. package/commands/fire-skills-history.md +3 -3
  45. package/commands/fire-skills-rollback.md +7 -7
  46. package/commands/fire-skills-sync.md +5 -5
  47. package/commands/fire-test.md +9 -9
  48. package/commands/fire-todos.md +1 -1
  49. package/commands/fire-update.md +5 -5
  50. package/hooks/hooks.json +16 -16
  51. package/hooks/run-hook.sh +8 -8
  52. package/hooks/run-session-end.sh +7 -7
  53. package/hooks/session-end.sh +90 -90
  54. package/hooks/session-start.sh +1 -1
  55. package/package.json +4 -2
  56. package/plugin.json +7 -7
  57. package/references/metrics-and-trends.md +1 -1
  58. package/skills-library/SKILLS-INDEX.md +588 -588
  59. package/skills-library/_general/methodology/AUTONOMOUS_ORCHESTRATION.md +182 -0
  60. package/skills-library/_general/methodology/BACKWARD_PLANNING_INTERVIEW.md +307 -0
  61. package/skills-library/_general/methodology/CIRCUIT_BREAKER_INTELLIGENCE.md +163 -0
  62. package/skills-library/_general/methodology/CONTEXT_ROTATION.md +151 -0
  63. package/skills-library/_general/methodology/DEAD_ENDS_SHELF.md +188 -0
  64. package/skills-library/_general/methodology/DESIGN_PHILOSOPHY_ENFORCEMENT.md +152 -0
  65. package/skills-library/_general/methodology/INTERNAL_CONSISTENCY_AUDIT.md +212 -0
  66. package/skills-library/_general/methodology/LIVE_BREADCRUMB_PROTOCOL.md +242 -0
  67. package/skills-library/_general/methodology/PHOENIX_REBUILD_METHODOLOGY.md +251 -0
  68. package/skills-library/_general/methodology/QUALITY_GATES_AND_VERIFICATION.md +157 -0
  69. package/skills-library/_general/methodology/RELIABILITY_PREDICTION.md +104 -0
  70. package/skills-library/_general/methodology/REQUIREMENTS_DECOMPOSITION.md +155 -0
  71. package/skills-library/_general/methodology/SELF_TESTING_FEEDBACK_LOOP.md +143 -0
  72. package/skills-library/_general/methodology/STACK_COMPATIBILITY_MATRIX.md +178 -0
  73. package/skills-library/_general/methodology/TIERED_CONTEXT_ARCHITECTURE.md +118 -0
  74. package/skills-library/_general/methodology/ZERO_FRICTION_CLI_SETUP.md +312 -0
  75. package/skills-library/_general/methodology/autonomous-multi-phase-build.md +133 -0
  76. package/skills-library/_general/methodology/claude-md-archival.md +280 -0
  77. package/skills-library/_general/methodology/debug-swarm-researcher-escape-hatch.md +240 -240
  78. package/skills-library/_general/methodology/git-worktrees-parallel.md +232 -0
  79. package/skills-library/_general/methodology/llm-judge-memory-crud.md +241 -0
  80. package/skills-library/_general/methodology/multi-project-autonomous-build.md +360 -0
  81. package/skills-library/_general/methodology/shell-autonomous-loop-fixplan.md +238 -238
  82. package/skills-library/_general/patterns-standards/GOF_DESIGN_PATTERNS_FOR_AI_AGENTS.md +358 -0
  83. package/skills-library/methodology/BREATH_BASED_PARALLEL_EXECUTION.md +1 -1
  84. package/skills-library/methodology/RESEARCH_BACKED_WORKFLOW_UPGRADE.md +1 -1
  85. package/skills-library/methodology/SABBATH_REST_PATTERN.md +1 -1
  86. package/templates/ASSUMPTIONS.md +1 -1
  87. package/templates/BLOCKERS.md +1 -1
  88. package/templates/DECISION_LOG.md +1 -1
  89. package/templates/phase-prompt.md +1 -1
  90. package/templates/phoenix-comparison.md +80 -0
  91. package/version.json +2 -2
  92. package/workflows/handoff-session.md +1 -1
  93. package/workflows/new-project.md +2 -2
  94. package/commands/fire-1-new.md +0 -281
@@ -0,0 +1,358 @@
1
+ ---
2
+ name: GOF_DESIGN_PATTERNS_FOR_AI_AGENTS
3
+ category: patterns-standards
4
+ version: 1.0.0
5
+ contributed: 2026-03-06
6
+ contributor: dominion-flow
7
+ last_updated: 2026-03-06
8
+ tags: [design-patterns, gof, gang-of-four, agent-architecture, refactoring-guru, software-engineering]
9
+ difficulty: hard
10
+ usage_count: 0
11
+ success_rate: 100
12
+ ---
13
+
14
+ # GoF Design Patterns for AI Agent Architecture
15
+
16
+ ## Problem
17
+
18
+ AI agent systems reinvent classical software engineering patterns without recognizing them. This leads to:
19
+ - **Fragile orchestration** — ad-hoc coordination between agents instead of proven structural patterns
20
+ - **Monolithic agents** — single agents doing everything instead of composable, single-responsibility components
21
+ - **Brittle error handling** — retry-everything approaches instead of classified, pattern-appropriate recovery
22
+ - **Undocumented architecture** — no shared vocabulary to describe why an agent system is structured the way it is
23
+
24
+ The Gang of Four (GoF) design patterns — 22 patterns across Creational, Structural, and Behavioral categories — provide a battle-tested vocabulary and implementation guide. Most AI agent architectures already use these patterns implicitly. Making them explicit improves communication, extensibility, and debugging.
25
+
26
+ ## Solution Pattern
27
+
28
+ Map each GoF pattern to its AI agent equivalent. Use the classical pattern name when discussing architecture. This gives every agent developer a shared vocabulary backed by 30+ years of software engineering validation.
29
+
30
+ ### Reference: https://refactoring.guru/design-patterns
31
+
32
+ ---
33
+
34
+ ## Creational Patterns — How Agents Are Born
35
+
36
+ ### 1. Factory Method → Agent Spawning
37
+
38
+ **Classical:** Define an interface for creating objects; let subclasses decide which class to instantiate.
39
+
40
+ **AI Agent equivalent:** Commands (`/fire-2-plan`, `/fire-3-execute`) decide WHICH agent to spawn based on context. The command is the factory — it reads the project state and instantiates the right agent type.
41
+
42
+ ```
43
+ /fire-3-execute → reads BLUEPRINT → spawns fire-executor
44
+ /fire-debug → reads error type → spawns fire-researcher OR fire-executor
45
+ /fire-autonomous → reads phase → spawns planner, executor, OR verifier per step
46
+ ```
47
+
48
+ **When to use:** When the agent type needed depends on runtime context (project state, error type, phase).
49
+
50
+ ### 2. Abstract Factory → Agent Family Selection
51
+
52
+ **Classical:** Create families of related objects without specifying concrete classes.
53
+
54
+ **AI Agent equivalent:** Stack selection in `/fire-1-new` produces a coherent FAMILY of tools, patterns, and skills. Choosing "MERN stack" selects MongoDB skills + Express patterns + React frontend + Node backend — a compatible family. Choosing "Django stack" selects a different family.
55
+
56
+ **When to use:** When selecting one technology implies a whole family of related decisions (database, ORM, auth, hosting).
57
+
58
+ ### 3. Builder → BLUEPRINT Construction
59
+
60
+ **Classical:** Separate construction of a complex object from its representation.
61
+
62
+ **AI Agent equivalent:** The fire-planner builds BLUEPRINTs step by step — first scope manifest, then risk register, then tasks, then kill conditions. Each step adds a layer. The final BLUEPRINT is complex, but construction is orderly.
63
+
64
+ ```
65
+ Step 1: Define scope (allowed_files, forbidden operations)
66
+ Step 2: Define risks (risk_register with mitigations)
67
+ Step 3: Define tasks (ordered, with dependencies)
68
+ Step 4: Define exit criteria (kill_conditions, wake_conditions)
69
+ → Result: Complete BLUEPRINT.md
70
+ ```
71
+
72
+ **When to use:** When the plan/configuration object has many optional parts that should be assembled in stages.
73
+
74
+ ### 4. Prototype → Context Cloning for Fresh Agents
75
+
76
+ **Classical:** Create new objects by copying an existing object.
77
+
78
+ **AI Agent equivalent:** Context rotation — when a stuck agent spawns a fresh agent, it clones the ESSENTIAL context (dead-end map, constraints, goal) without the fixation baggage. The fresh agent is a "prototype" of the original but with clean working memory.
79
+
80
+ **When to use:** When functional fixedness sets in and a fresh perspective needs the same problem context without accumulated bias.
81
+
82
+ ### 5. Singleton → Shared State Files
83
+
84
+ **Classical:** Ensure a class has only one instance with global access.
85
+
86
+ **AI Agent equivalent:** Files like `CONSCIENCE.md`, `VISION.md`, and `FAILURES.md` are singletons — one per project, globally readable, updated by any agent. They prevent inconsistent state from multiple agents maintaining separate copies.
87
+
88
+ **When to use:** For project-level state that ALL agents must see the same version of (roadmap, progress, known failures).
89
+
90
+ ---
91
+
92
+ ## Structural Patterns — How Agents Compose
93
+
94
+ ### 6. Adapter → Skill-to-Agent Translation
95
+
96
+ **Classical:** Convert one interface to another that clients expect.
97
+
98
+ **AI Agent equivalent:** The skills library contains patterns in a universal format. Each agent ADAPTS the skill's guidance into its own step format. The same CIRCUIT_BREAKER_INTELLIGENCE skill becomes Step 3.5 in executor (runtime classification) and anti-pattern #8 in planner (plan-time kill conditions).
99
+
100
+ **When to use:** When a reusable pattern needs to be expressed differently for different agents.
101
+
102
+ ### 7. Bridge → Agent/Tool Separation
103
+
104
+ **Classical:** Decouple abstraction from implementation.
105
+
106
+ **AI Agent equivalent:** Agents define WHAT to do (abstraction); tools define HOW (implementation). fire-executor says "run tests" — whether that's `npm test`, `pytest`, or `cargo test` depends on the project. The agent's logic is independent of the tool implementation.
107
+
108
+ **When to use:** When agent logic should work across different tech stacks without modification.
109
+
110
+ ### 8. Composite → Phase/Task Tree
111
+
112
+ **Classical:** Compose objects into tree structures for part-whole hierarchies.
113
+
114
+ **AI Agent equivalent:** VISION.md contains phases. Each phase contains BLUEPRINTs. Each BLUEPRINT contains tasks. Each task contains sub-steps. The same operations (execute, verify, report) apply at every level — you can verify a task, a plan, a phase, or the whole project.
115
+
116
+ ```
117
+ Project (VISION.md)
118
+ ├── Phase 1
119
+ │ ├── BLUEPRINT 1-1
120
+ │ │ ├── Task 1
121
+ │ │ └── Task 2
122
+ │ └── BLUEPRINT 1-2
123
+ ├── Phase 2
124
+ └── Phase 3
125
+ ```
126
+
127
+ **When to use:** When work has a natural tree structure and operations should apply uniformly at any level.
128
+
129
+ ### 9. Decorator → Additive Agent Enhancements (v12.0 Pattern)
130
+
131
+ **Classical:** Attach additional responsibilities dynamically without modifying existing code.
132
+
133
+ **AI Agent equivalent:** v12.0 added new steps BETWEEN existing steps (Step 2.5, Step 3.5, Step 3.7) without changing existing step numbers or behavior. Each new step "decorates" the existing flow with additional capability (DoR check, circuit breaker, implied scenarios).
134
+
135
+ ```
136
+ Original: Step 2 → Step 3 → Step 4
137
+ Decorated: Step 2 → [2.5: DoR] → [2.7: Scope] → Step 3 → [3.5: Circuit Breaker] → [3.7: Implied Scenarios] → Step 4
138
+ ```
139
+
140
+ **When to use:** When extending agent behavior without breaking backward compatibility. The Decorator pattern is why v12.0 was additive, not destructive.
141
+
142
+ ### 10. Facade → OVERVIEW.md
143
+
144
+ **Classical:** Provide a simplified interface to a complex subsystem.
145
+
146
+ **AI Agent equivalent:** DOMINION-FLOW-OVERVIEW.md is a facade — it presents the complete system (45 commands, 14 agents, 484+ skills) through a single navigable document. New agents read the OVERVIEW to understand the system without needing to read every individual file.
147
+
148
+ **When to use:** When the system has grown complex enough that newcomers need an entry point.
149
+
150
+ ### 11. Flyweight → Shared Skills Library
151
+
152
+ **Classical:** Share common state across many objects to save memory.
153
+
154
+ **AI Agent equivalent:** Skills are flyweights — stored once in the skills library, referenced by many agents. Instead of each agent containing its own copy of "how to handle circuit breakers," all agents reference the single CIRCUIT_BREAKER_INTELLIGENCE skill.
155
+
156
+ **When to use:** When multiple agents need the same knowledge. Store it once, reference everywhere.
157
+
158
+ ### 12. Proxy → Scope Manifest
159
+
160
+ **Classical:** Provide a surrogate to control access to another object.
161
+
162
+ **AI Agent equivalent:** The scope manifest acts as a proxy for filesystem access. Instead of letting the executor touch any file, the scope manifest controls which files can be read, written, or deleted. It's a protection proxy that enforces boundaries defined at plan time.
163
+
164
+ ```yaml
165
+ scope:
166
+ allowed_files: [src/auth/*, src/middleware/*]
167
+ forbidden: [.env, package.json, database/migrations/*]
168
+ max_file_changes: 8
169
+ ```
170
+
171
+ **When to use:** When agent access to resources (files, APIs, databases) needs to be bounded per-task.
172
+
173
+ ---
174
+
175
+ ## Behavioral Patterns — How Agents Collaborate
176
+
177
+ ### 13. Chain of Responsibility → Tiered Verification
178
+
179
+ **Classical:** Pass requests along a chain of handlers until one handles it.
180
+
181
+ **AI Agent equivalent:** Verification flows through a chain: Tier 1 Fast Gate → Tier 2 Must-Haves → Tier 3 WARRIOR 70-point. Each tier decides whether to handle (reject) or pass to the next tier. If Tier 1 catches a build failure, Tier 2 and 3 never run.
182
+
183
+ ```
184
+ Code → [Tier 1: Build/Types/Lint] → FAIL? Stop.
185
+ → PASS? → [Tier 2: Must-Haves] → FAIL? Stop.
186
+ → PASS? → [Tier 3: WARRIOR] → Score
187
+ ```
188
+
189
+ **When to use:** When validation has multiple levels of expense and most failures are caught by cheap checks. Shift-left principle.
190
+
191
+ ### 14. Command → BLUEPRINT Tasks
192
+
193
+ **Classical:** Encapsulate a request as an object.
194
+
195
+ **AI Agent equivalent:** Each task in a BLUEPRINT is a Command object — it has a description, preconditions (dependencies), expected output, risk level, and can be executed, undone (git revert), or queued. Tasks are first-class entities, not inline instructions.
196
+
197
+ **When to use:** When work units need to be queued, logged, retried, or undone independently.
198
+
199
+ ### 15. Iterator → Breath-Based Execution
200
+
201
+ **Classical:** Access elements sequentially without exposing the underlying structure.
202
+
203
+ **AI Agent equivalent:** The breath pattern iterates over tasks without exposing the full plan complexity. Each breath gets 2-4 tasks. The executor doesn't see the entire remaining plan — just the current breath. This prevents overwhelm and maintains focus.
204
+
205
+ **When to use:** When the full task list would overwhelm context. Feed work in digestible chunks.
206
+
207
+ ### 16. Mediator → fire-autonomous Orchestrator
208
+
209
+ **Classical:** Define an object that encapsulates how objects interact.
210
+
211
+ **AI Agent equivalent:** `/fire-autonomous` mediates between planner, executor, and verifier. None of these agents talk to each other directly — autonomous mode reads their outputs and decides what happens next (re-plan, advance, escalate).
212
+
213
+ **When to use:** When multiple agents need coordination but shouldn't be coupled to each other.
214
+
215
+ ### 17. Memento → WARRIOR Handoffs
216
+
217
+ **Classical:** Capture and externalize object state for later restoration.
218
+
219
+ **AI Agent equivalent:** WARRIOR handoffs capture the full session state (files changed, decisions made, blockers hit, phase position) so a new Claude instance can restore context without re-discovering everything. The handoff IS a memento.
220
+
221
+ **When to use:** When agent sessions end and the next session needs to resume from the same state. Context preservation across the session boundary.
222
+
223
+ ### 18. Observer → Live Breadcrumb Protocol
224
+
225
+ **Classical:** When one object changes, all dependents are notified.
226
+
227
+ **AI Agent equivalent:** When any agent discovers a lesson, failure, pattern, or dependency, it writes to the breadcrumb files (LESSONS.md, FAILURES.md, PATTERNS.md, DEPENDENCIES.md). All subsequent agents read these files on startup — they're "notified" of changes through the file system.
228
+
229
+ **When to use:** When discoveries by one agent should influence all future agents without explicit coupling.
230
+
231
+ ### 19. State → Circuit Breaker States
232
+
233
+ **Classical:** Allow an object to alter its behavior when its state changes.
234
+
235
+ **AI Agent equivalent:** The circuit breaker has three states — CLOSED (normal execution), OPEN (stop, research alternatives), HALF-OPEN (probe with limited scope). The executor's behavior changes completely based on which state it's in. Same agent, different behavior.
236
+
237
+ ```
238
+ CLOSED → execute tasks normally, count errors
239
+ OPEN → stop execution, route to research
240
+ HALF-OPEN → try researched alternative with guardrails
241
+ ```
242
+
243
+ **When to use:** When an agent needs fundamentally different behavior based on accumulated failure state.
244
+
245
+ ### 20. Strategy → Stuck-State Interventions
246
+
247
+ **Classical:** Define a family of algorithms and make them interchangeable.
248
+
249
+ **AI Agent equivalent:** The 6 stuck-state types each have a STRATEGY for intervention. TRANSIENT → retry. FIXATION → context rotation. DEAD_END → shelf with wake conditions. The classification determines which strategy runs. All strategies share the same interface (input: stuck state, output: next action).
250
+
251
+ | Stuck Type | Strategy |
252
+ |------------|----------|
253
+ | TRANSIENT | Retry (up to 2x) |
254
+ | FIXATION | Context rotation |
255
+ | CONTEXT_OVERFLOW | Compact + checkpoint |
256
+ | SEMANTIC | Re-read requirements |
257
+ | DEAD_END | Shelf with wake conditions |
258
+ | SCOPE_DRIFT | Re-read scope manifest |
259
+
260
+ **When to use:** When the same problem category has multiple valid solutions and the right one depends on classification.
261
+
262
+ ### 21. Template Method → Agent Lifecycle
263
+
264
+ **Classical:** Define the skeleton of an algorithm; let subclasses override specific steps.
265
+
266
+ **AI Agent equivalent:** Every Dominion Flow agent follows the same skeleton: Load context → Validate prerequisites → Execute core work → Write results → Report verdict. The SKELETON is fixed. Each agent type overrides the "core work" step — planner creates BLUEPRINTs, executor runs tasks, verifier checks results.
267
+
268
+ ```
269
+ Template:
270
+ 1. Load context (VISION, CONSCIENCE, breadcrumbs) ← fixed
271
+ 2. Validate prerequisites (path, phase, DoR) ← fixed
272
+ 3. [OVERRIDE: Core work] ← varies by agent
273
+ 4. Write artifacts (BLUEPRINT/RECORD/VERIFICATION) ← fixed
274
+ 5. Report verdict ← fixed
275
+ ```
276
+
277
+ **When to use:** When all agents share the same lifecycle but differ in their core operation.
278
+
279
+ ### 22. Visitor → Multi-Perspective Code Review
280
+
281
+ **Classical:** Perform operations on elements of a structure without changing the structure.
282
+
283
+ **AI Agent equivalent:** The fire-reviewer visits code from 15 different perspectives (Performance Auditor, Security Analyst, UX Champion, etc.) without modifying the code. Each perspective is a "visitor" that examines the same code and produces findings. The code structure doesn't change — only the analysis accumulates.
284
+
285
+ **When to use:** When the same artifact needs evaluation from multiple independent perspectives.
286
+
287
+ ---
288
+
289
+ ## Quick Reference Matrix
290
+
291
+ | Pattern | GoF Category | Agent Equivalent | Dominion Flow Example |
292
+ |---------|-------------|-----------------|----------------------|
293
+ | Factory Method | Creational | Agent spawning | Commands spawn agents by context |
294
+ | Abstract Factory | Creational | Stack family selection | `/fire-1-new` stack choice |
295
+ | Builder | Creational | BLUEPRINT construction | fire-planner step-by-step |
296
+ | Prototype | Creational | Context cloning | Context rotation fresh agent |
297
+ | Singleton | Creational | Shared state files | CONSCIENCE.md, VISION.md |
298
+ | Adapter | Structural | Skill-to-agent translation | Skills → agent steps |
299
+ | Bridge | Structural | Agent/tool separation | "run tests" → npm/pytest/cargo |
300
+ | Composite | Structural | Phase/task tree | Project → Phase → Plan → Task |
301
+ | Decorator | Structural | Additive enhancements | v12.0 interleaved steps |
302
+ | Facade | Structural | System overview | OVERVIEW.md |
303
+ | Flyweight | Structural | Shared skills | Skills library |
304
+ | Proxy | Structural | Scope manifest | Filesystem access control |
305
+ | Chain of Resp. | Behavioral | Tiered verification | Tier 1 → 2 → 3 |
306
+ | Command | Behavioral | BLUEPRINT tasks | Encapsulated work units |
307
+ | Iterator | Behavioral | Breath-based execution | 2-4 tasks per breath |
308
+ | Mediator | Behavioral | Autonomous orchestrator | fire-autonomous |
309
+ | Memento | Behavioral | WARRIOR handoffs | Session state capture |
310
+ | Observer | Behavioral | Breadcrumb protocol | LESSONS/FAILURES/PATTERNS |
311
+ | State | Behavioral | Circuit breaker | CLOSED/OPEN/HALF-OPEN |
312
+ | Strategy | Behavioral | Stuck interventions | 6 types × 6 strategies |
313
+ | Template Method | Behavioral | Agent lifecycle | Load → Validate → Work → Write → Report |
314
+ | Visitor | Behavioral | Multi-perspective review | 15-persona code review |
315
+
316
+ ---
317
+
318
+ ## When to Use
319
+
320
+ - **Architecture discussions** — Use GoF names as shared vocabulary ("the verification chain of responsibility" is clearer than "the thing that checks stuff in order")
321
+ - **Extending Dominion Flow** — Before adding a feature, check which GoF pattern it maps to. If none, question whether the feature is structurally sound.
322
+ - **Debugging agent behavior** — Pattern violations indicate bugs ("the mediator is bypassed" → agents talking directly instead of through autonomous mode)
323
+ - **Onboarding** — Developers who know GoF patterns instantly understand Dominion Flow's architecture through this mapping
324
+ - **New agent system design** — Use this as a checklist: which patterns does your system use? Which is it missing?
325
+
326
+ ## When NOT to Use
327
+
328
+ - **Simple scripts** — A single-agent, single-task script doesn't need pattern awareness
329
+ - **Pattern forcing** — Don't retrofit patterns onto things that work fine without them
330
+ - **Over-abstraction** — Recognizing patterns ≠ creating abstract base classes. AI agents are text-configured, not class-hierarchied
331
+
332
+ ## Common Mistakes
333
+
334
+ - **Confusing Strategy with State** — Strategy = choosing an algorithm. State = changing behavior based on accumulated state. Stuck-type classification is Strategy. Circuit breaker is State.
335
+ - **Skipping Facade** — Systems without an OVERVIEW doc force every new agent to read everything. Add a facade early.
336
+ - **Missing Observer** — If agent discoveries die with the session, you have no Observer pattern. Add breadcrumbs.
337
+
338
+ ## Related Skills
339
+
340
+ - [CIRCUIT_BREAKER_INTELLIGENCE](../methodology/CIRCUIT_BREAKER_INTELLIGENCE.md) — State + Strategy patterns in depth
341
+ - [AUTONOMOUS_ORCHESTRATION](../methodology/AUTONOMOUS_ORCHESTRATION.md) — Mediator + Template Method patterns
342
+ - [CONTEXT_ROTATION](../methodology/CONTEXT_ROTATION.md) — Prototype pattern for fresh agents
343
+ - [QUALITY_GATES_AND_VERIFICATION](../methodology/QUALITY_GATES_AND_VERIFICATION.md) — Chain of Responsibility
344
+ - [MULTI_PERSPECTIVE_CODE_REVIEW](../methodology/MULTI_PERSPECTIVE_CODE_REVIEW.md) — Visitor pattern
345
+ - [RELIABILITY_PREDICTION](../methodology/RELIABILITY_PREDICTION.md) — Observer pattern (implied scenarios)
346
+
347
+ ## References
348
+
349
+ - https://refactoring.guru/design-patterns — Complete GoF pattern catalog with visual examples
350
+ - Gamma, Helm, Johnson, Vlissides — *Design Patterns: Elements of Reusable Object-Oriented Software* (1994)
351
+ - Contributed from: Dominion Flow v12.0 session (2026-03-06)
352
+
353
+ ## When Agents Should Reference This Skill
354
+
355
+ - **fire-planner:** When designing new agent workflows or extending existing ones — ensure structural patterns are used intentionally
356
+ - **fire-researcher:** When evaluating architecture approaches — check if they align with established patterns
357
+ - **fire-reviewer:** When reviewing agent code — flag pattern violations (bypassed mediator, missing facade, coupled agents)
358
+ - **fire-vision-architect:** When proposing architecture branches — name the patterns each branch relies on
@@ -530,7 +530,7 @@ await executeWave(3, wave3Plans);
530
530
  ## Resources
531
531
 
532
532
  ### Dominion Flow Documentation
533
- - Dominion Flow Plugin: `~/.claude/plugins/dominion-flow/`
533
+ - Dominion Flow Plugin: `~/.claude/plugins/fire-flow/`
534
534
  - Execution Command: `/fire-3-execute N`
535
535
  - Agent Definitions: `@agents/fire-executor.md`
536
536
 
@@ -238,7 +238,7 @@ grep -r "{.*}" [modified-files] | grep -v "^Binary"
238
238
  - SWE-Bench Pro (2025): Single agent + retries vs multi-agent swarms
239
239
  - METR Study (2025): AI Impact on Developer Productivity
240
240
  - CNCF Four Pillars (2025): Golden Paths, Guardrails, Safety Nets, Manual Review
241
- - Full citation index: `~/.claude/plugins/dominion-flow/references/research-improvements.md`
241
+ - Full citation index: `~/.claude/plugins/fire-flow/references/research-improvements.md`
242
242
 
243
243
  ---
244
244
 
@@ -107,7 +107,7 @@ Long-term memory for project history. Contains:
107
107
  - **Key Decisions:**
108
108
  - RS256 signing (security requirement)
109
109
  - Refresh token rotation enabled
110
- - **Session Files:** .claude/dominion-flow.local.md
110
+ - **Session Files:** .claude/fire-flow.local.md
111
111
  - **Last Agent:** Claude Opus 4.5, 2025-01-23
112
112
  ```
113
113
 
@@ -6,7 +6,7 @@
6
6
  > accumulate across phases without systematic tracking, leading to contradictions.
7
7
  > See: references/research-improvements.md (GAP-1, GAP-2, BLIND-SPOT-B)
8
8
 
9
- Template for `.planning/ASSUMPTIONS.md` — created by `/fire-1-new`.
9
+ Template for `.planning/ASSUMPTIONS.md` — created by `/fire-1a-new`.
10
10
 
11
11
  ---
12
12
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **Origin:** NEW for Dominion Flow v2.0 - Centralized blocker tracking.
4
4
 
5
- Template for `.planning/BLOCKERS.md` — created by `/fire-1-new`.
5
+ Template for `.planning/BLOCKERS.md` — created by `/fire-1a-new`.
6
6
 
7
7
  ---
8
8
 
@@ -5,7 +5,7 @@
5
5
  > cross-phase contradictions occur when rationale is buried in old handoffs.
6
6
  > See: references/research-improvements.md (GAP-1, GAP-3, BLIND-SPOT-A)
7
7
 
8
- Template for `.planning/DECISION_LOG.md` — created by `/fire-1-new`.
8
+ Template for `.planning/DECISION_LOG.md` — created by `/fire-1a-new`.
9
9
 
10
10
  ---
11
11
 
@@ -39,7 +39,7 @@ Output: [What artifacts will be created]
39
39
  </objective>
40
40
 
41
41
  <execution_context>
42
- @~/.claude/plugins/dominion-flow/templates/summary.md
42
+ @~/.claude/plugins/fire-flow/templates/summary.md
43
43
  </execution_context>
44
44
 
45
45
  <honesty_precheck>
@@ -0,0 +1,80 @@
1
+ # PHOENIX-COMPARISON.md — {Project Name}
2
+
3
+ ---
4
+ generated_at: "{ISO timestamp}"
5
+ generated_by: fire-phoenix
6
+ source_path: "{source absolute path}"
7
+ target_path: "{target absolute path}"
8
+ phoenix_score: "{0-100}%"
9
+ verdict: "{APPROVED | CONDITIONAL | REJECTED}"
10
+ ---
11
+
12
+ ## Side-by-Side Metrics
13
+
14
+ | Metric | Source (Messy) | Target (Clean) | Change |
15
+ |--------|---------------|----------------|--------|
16
+ | Total Files | {N} | {N} | {±N} ({±%}) |
17
+ | Lines of Code | {N} | {N} | {±N} ({±%}) |
18
+ | Avg File Size (LOC) | {N} | {N} | {±N} ({±%}) |
19
+ | Max File Size (LOC) | {N} ({filename}) | {N} ({filename}) | {±N} |
20
+ | Dependencies (package.json / requirements.txt) | {N} | {N} | {±N} |
21
+ | Dev Dependencies | {N} | {N} | {±N} |
22
+ | Environment Variables | {N} | {N} | {±N} |
23
+ | Test Files | {N} | {N} | {±N} |
24
+ | Test Coverage | {N}% | {N}% | {±N}pp |
25
+
26
+ ## Phoenix Verification Checks
27
+
28
+ | Check | Weight | Score | Details |
29
+ |-------|--------|-------|---------|
30
+ | PX-1: Feature Parity | 30% | {0-100}% | {N}/{total} INTENT.md features implemented |
31
+ | PX-2: Edge Case Coverage | 25% | {0-100}% | {N}/{total} "KEEP" edge cases handled |
32
+ | PX-3: Dependency Compatibility | 20% | {0-100}% | {N}/{total} external services connected |
33
+ | PX-4: Accidental Complexity Removal | 15% | {0-100}% | {N}/{total} anti-patterns absent from rebuild |
34
+ | PX-5: Architecture Improvement | 10% | {0-100}% | File structure, separation, naming |
35
+ | **Phoenix Score** | **100%** | **{weighted}%** | **{APPROVED / CONDITIONAL / REJECTED}** |
36
+
37
+ ## Feature Parity Detail (PX-1)
38
+
39
+ | Feature | Intent | Source Files | Target Files | Status |
40
+ |---------|--------|-------------|-------------|--------|
41
+ | {feature} | {squint test} | {source files} | {target files} | {IMPLEMENTED / PARTIAL / DROPPED} |
42
+
43
+ ## Anti-Pattern Removal Detail (PX-4)
44
+
45
+ | Anti-Pattern | Found in Source | Present in Target? | Status |
46
+ |-------------|----------------|-------------------|--------|
47
+ | {pattern} | {file(s)} | {Yes/No} | {REMOVED / STILL PRESENT} |
48
+
49
+ ## Architecture Comparison (PX-5)
50
+
51
+ ### Source Structure
52
+ ```
53
+ {directory tree excerpt — top 2 levels}
54
+ ```
55
+
56
+ ### Target Structure
57
+ ```
58
+ {directory tree excerpt — top 2 levels}
59
+ ```
60
+
61
+ ### Key Improvements
62
+ - {improvement 1}
63
+ - {improvement 2}
64
+ - {improvement 3}
65
+
66
+ ## Items Dropped (User-Approved)
67
+
68
+ | Feature | Reason for Dropping | Approved In |
69
+ |---------|-------------------|-------------|
70
+ | {feature} | {reason} | Phase 3 Clarification |
71
+
72
+ ## Verdict
73
+
74
+ ```
75
+ Phoenix Score: {score}% — {APPROVED | CONDITIONAL | REJECTED}
76
+
77
+ 90%+ = APPROVED — Rebuild is production-ready
78
+ 75-89% = CONDITIONAL — Rebuild needs minor fixes before replacing source
79
+ <75% = REJECTED — Rebuild has significant gaps, review INTENT.md coverage
80
+ ```
package/version.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
- "version": "11.0.0",
2
+ "version": "12.2.0",
3
3
  "commit": "local",
4
4
  "branch": "main",
5
- "updatedAt": "2026-03-01T00:00:00Z",
5
+ "updatedAt": "2026-03-06T00:00:00Z",
6
6
  "installMethod": "local"
7
7
  }
@@ -268,7 +268,7 @@ next_action: "{what to do next}"
268
268
  ### Important Paths
269
269
  - **Project Root:** {absolute path}
270
270
  - **Planning Docs:** {path}/.planning/
271
- - **Skills Library:** ~/.claude/plugins/dominion-flow/skills-library/
271
+ - **Skills Library:** ~/.claude/plugins/fire-flow/skills-library/
272
272
  - **Handoffs:** ~/.claude/warrior-handoffs/
273
273
 
274
274
  ---
@@ -476,7 +476,7 @@ status: ready_to_plan
476
476
 
477
477
  **Purpose:** Ensure automatic context loading on session start.
478
478
 
479
- The Dominion Flow plugin includes SessionStart hooks that:
479
+ The Fire Flow plugin includes SessionStart hooks that:
480
480
  1. Load CONSCIENCE.md context automatically
481
481
  2. Remind about WARRIOR handoffs
482
482
  3. Display last activity and next action
@@ -484,7 +484,7 @@ The Dominion Flow plugin includes SessionStart hooks that:
484
484
  **Verify hook configuration:**
485
485
  ```bash
486
486
  # Check hooks.json exists in plugin
487
- ls ~/.claude/plugins/dominion-flow/hooks/hooks.json
487
+ ls ~/.claude/plugins/fire-flow/hooks/hooks.json
488
488
  ```
489
489
 
490
490
  ---