@thierrynakoa/fire-flow 10.0.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.
- package/.claude-plugin/plugin.json +64 -0
- package/ARCHITECTURE-DIAGRAM.md +440 -0
- package/COMMAND-REFERENCE.md +172 -0
- package/DOMINION-FLOW-OVERVIEW.md +421 -0
- package/LICENSE +21 -0
- package/QUICK-START.md +351 -0
- package/README.md +398 -0
- package/TROUBLESHOOTING.md +264 -0
- package/agents/fire-codebase-mapper.md +484 -0
- package/agents/fire-debugger.md +535 -0
- package/agents/fire-executor.md +949 -0
- package/agents/fire-fact-checker.md +276 -0
- package/agents/fire-learncoding-explainer.md +237 -0
- package/agents/fire-learncoding-walker.md +147 -0
- package/agents/fire-planner.md +675 -0
- package/agents/fire-project-researcher.md +155 -0
- package/agents/fire-research-synthesizer.md +166 -0
- package/agents/fire-researcher.md +723 -0
- package/agents/fire-reviewer.md +499 -0
- package/agents/fire-roadmapper.md +203 -0
- package/agents/fire-verifier.md +880 -0
- package/bin/cli.js +208 -0
- package/commands/fire-0-orient.md +476 -0
- package/commands/fire-1-new.md +281 -0
- package/commands/fire-1a-discuss.md +455 -0
- package/commands/fire-2-plan.md +527 -0
- package/commands/fire-3-execute.md +1303 -0
- package/commands/fire-4-verify.md +845 -0
- package/commands/fire-5-handoff.md +515 -0
- package/commands/fire-6-resume.md +501 -0
- package/commands/fire-7-review.md +409 -0
- package/commands/fire-add-new-skill.md +598 -0
- package/commands/fire-analytics.md +499 -0
- package/commands/fire-assumptions.md +78 -0
- package/commands/fire-autonomous.md +528 -0
- package/commands/fire-brainstorm.md +413 -0
- package/commands/fire-complete-milestone.md +270 -0
- package/commands/fire-dashboard.md +375 -0
- package/commands/fire-debug.md +663 -0
- package/commands/fire-discover.md +616 -0
- package/commands/fire-double-check.md +460 -0
- package/commands/fire-execute-plan.md +182 -0
- package/commands/fire-learncoding.md +242 -0
- package/commands/fire-loop-resume.md +272 -0
- package/commands/fire-loop-stop.md +198 -0
- package/commands/fire-loop.md +1168 -0
- package/commands/fire-map-codebase.md +313 -0
- package/commands/fire-new-milestone.md +356 -0
- package/commands/fire-reflect.md +235 -0
- package/commands/fire-research.md +246 -0
- package/commands/fire-search.md +330 -0
- package/commands/fire-security-audit-repo.md +293 -0
- package/commands/fire-security-scan.md +484 -0
- package/commands/fire-session-summary.md +252 -0
- package/commands/fire-skills-diff.md +506 -0
- package/commands/fire-skills-history.md +388 -0
- package/commands/fire-skills-rollback.md +408 -0
- package/commands/fire-skills-sync.md +470 -0
- package/commands/fire-test.md +520 -0
- package/commands/fire-todos.md +335 -0
- package/commands/fire-transition.md +186 -0
- package/commands/fire-update.md +312 -0
- package/commands/fire-verify-uat.md +146 -0
- package/commands/fire-vuln-scan.md +493 -0
- package/hooks/hooks.json +16 -0
- package/hooks/run-hook.cmd +69 -0
- package/hooks/run-hook.sh +8 -0
- package/hooks/run-session-end.cmd +49 -0
- package/hooks/run-session-end.sh +7 -0
- package/hooks/session-end.sh +90 -0
- package/hooks/session-start.sh +111 -0
- package/package.json +52 -0
- package/plugin.json +7 -0
- package/references/auto-skill-extraction.md +136 -0
- package/references/behavioral-directives.md +365 -0
- package/references/blocker-tracking.md +155 -0
- package/references/checkpoints.md +165 -0
- package/references/circuit-breaker.md +410 -0
- package/references/context-engineering.md +587 -0
- package/references/decision-time-guidance.md +289 -0
- package/references/error-classification.md +326 -0
- package/references/execution-mode-intelligence.md +242 -0
- package/references/git-integration.md +217 -0
- package/references/honesty-protocols.md +304 -0
- package/references/integration-architecture.md +470 -0
- package/references/issue-to-pr-pipeline.md +150 -0
- package/references/metrics-and-trends.md +234 -0
- package/references/playwright-e2e-testing.md +326 -0
- package/references/questioning.md +125 -0
- package/references/research-improvements.md +110 -0
- package/references/skills-usage-guide.md +429 -0
- package/references/tdd.md +131 -0
- package/references/testing-enforcement.md +192 -0
- package/references/ui-brand.md +383 -0
- package/references/validation-checklist.md +456 -0
- package/references/verification-patterns.md +187 -0
- package/references/warrior-principles.md +173 -0
- package/skills-library/SKILLS-INDEX.md +588 -0
- package/skills-library/_general/frontend/html-visual-reports.md +292 -0
- package/skills-library/_general/methodology/debug-swarm-researcher-escape-hatch.md +240 -0
- package/skills-library/_general/methodology/learncoding-agentic-pattern.md +114 -0
- package/skills-library/_general/methodology/shell-autonomous-loop-fixplan.md +238 -0
- package/skills-library/basics/api-rest-basics.md +162 -0
- package/skills-library/basics/env-variables.md +96 -0
- package/skills-library/basics/error-handling-basics.md +125 -0
- package/skills-library/basics/git-commit-conventions.md +106 -0
- package/skills-library/basics/readme-template.md +108 -0
- package/skills-library/common-tasks/async-await-patterns.md +157 -0
- package/skills-library/common-tasks/auth-jwt-basics.md +164 -0
- package/skills-library/common-tasks/database-schema-design.md +166 -0
- package/skills-library/common-tasks/file-upload-basics.md +166 -0
- package/skills-library/common-tasks/form-validation.md +159 -0
- package/skills-library/debugging/FAILURE_TAXONOMY_CLASSIFICATION.md +117 -0
- package/skills-library/debugging/THREE_AGENT_HYPOTHESIS_DEBUGGING.md +86 -0
- package/skills-library/methodology/BREATH_BASED_PARALLEL_EXECUTION.md +678 -0
- package/skills-library/methodology/CONFIDENCE_GATED_EXECUTION.md +243 -0
- package/skills-library/methodology/EVIDENCE_BASED_VALIDATION.md +308 -0
- package/skills-library/methodology/MULTI_PERSPECTIVE_CODE_REVIEW.md +330 -0
- package/skills-library/methodology/PATH_VERIFICATION_GATE.md +211 -0
- package/skills-library/methodology/REFLEXION_MEMORY_PATTERN.md +183 -0
- package/skills-library/methodology/RESEARCH_BACKED_WORKFLOW_UPGRADE.md +263 -0
- package/skills-library/methodology/SABBATH_REST_PATTERN.md +267 -0
- package/skills-library/methodology/STONE_AND_SCAFFOLD.md +220 -0
- package/skills-library/performance/cache-augmented-generation.md +172 -0
- package/skills-library/quality-safety/debugging-steps.md +147 -0
- package/skills-library/quality-safety/deployment-checklist.md +155 -0
- package/skills-library/quality-safety/security-checklist.md +204 -0
- package/skills-library/quality-safety/testing-basics.md +180 -0
- package/skills-library/security/agent-security-scanner.md +445 -0
- package/skills-library/specialists/api-architecture/api-designer.md +49 -0
- package/skills-library/specialists/api-architecture/graphql-architect.md +49 -0
- package/skills-library/specialists/api-architecture/mcp-developer.md +51 -0
- package/skills-library/specialists/api-architecture/microservices-architect.md +50 -0
- package/skills-library/specialists/api-architecture/websocket-engineer.md +48 -0
- package/skills-library/specialists/backend/django-expert.md +52 -0
- package/skills-library/specialists/backend/fastapi-expert.md +52 -0
- package/skills-library/specialists/backend/laravel-specialist.md +52 -0
- package/skills-library/specialists/backend/nestjs-expert.md +51 -0
- package/skills-library/specialists/backend/rails-expert.md +53 -0
- package/skills-library/specialists/backend/spring-boot-engineer.md +56 -0
- package/skills-library/specialists/data-ml/fine-tuning-expert.md +48 -0
- package/skills-library/specialists/data-ml/ml-pipeline.md +47 -0
- package/skills-library/specialists/data-ml/pandas-pro.md +47 -0
- package/skills-library/specialists/data-ml/rag-architect.md +51 -0
- package/skills-library/specialists/data-ml/spark-engineer.md +47 -0
- package/skills-library/specialists/frontend/angular-architect.md +52 -0
- package/skills-library/specialists/frontend/flutter-expert.md +51 -0
- package/skills-library/specialists/frontend/nextjs-developer.md +54 -0
- package/skills-library/specialists/frontend/react-native-expert.md +50 -0
- package/skills-library/specialists/frontend/vue-expert.md +51 -0
- package/skills-library/specialists/infrastructure/chaos-engineer.md +74 -0
- package/skills-library/specialists/infrastructure/cloud-architect.md +70 -0
- package/skills-library/specialists/infrastructure/database-optimizer.md +64 -0
- package/skills-library/specialists/infrastructure/devops-engineer.md +70 -0
- package/skills-library/specialists/infrastructure/kubernetes-specialist.md +52 -0
- package/skills-library/specialists/infrastructure/monitoring-expert.md +70 -0
- package/skills-library/specialists/infrastructure/sre-engineer.md +70 -0
- package/skills-library/specialists/infrastructure/terraform-engineer.md +51 -0
- package/skills-library/specialists/languages/cpp-pro.md +74 -0
- package/skills-library/specialists/languages/csharp-developer.md +69 -0
- package/skills-library/specialists/languages/dotnet-core-expert.md +54 -0
- package/skills-library/specialists/languages/golang-pro.md +51 -0
- package/skills-library/specialists/languages/java-architect.md +49 -0
- package/skills-library/specialists/languages/javascript-pro.md +68 -0
- package/skills-library/specialists/languages/kotlin-specialist.md +68 -0
- package/skills-library/specialists/languages/php-pro.md +49 -0
- package/skills-library/specialists/languages/python-pro.md +52 -0
- package/skills-library/specialists/languages/react-expert.md +51 -0
- package/skills-library/specialists/languages/rust-engineer.md +50 -0
- package/skills-library/specialists/languages/sql-pro.md +56 -0
- package/skills-library/specialists/languages/swift-expert.md +69 -0
- package/skills-library/specialists/languages/typescript-pro.md +51 -0
- package/skills-library/specialists/platform/atlassian-mcp.md +52 -0
- package/skills-library/specialists/platform/embedded-systems.md +53 -0
- package/skills-library/specialists/platform/game-developer.md +53 -0
- package/skills-library/specialists/platform/salesforce-developer.md +53 -0
- package/skills-library/specialists/platform/shopify-expert.md +49 -0
- package/skills-library/specialists/platform/wordpress-pro.md +49 -0
- package/skills-library/specialists/quality/code-documenter.md +51 -0
- package/skills-library/specialists/quality/code-reviewer.md +67 -0
- package/skills-library/specialists/quality/debugging-wizard.md +51 -0
- package/skills-library/specialists/quality/fullstack-guardian.md +51 -0
- package/skills-library/specialists/quality/legacy-modernizer.md +50 -0
- package/skills-library/specialists/quality/playwright-expert.md +65 -0
- package/skills-library/specialists/quality/spec-miner.md +56 -0
- package/skills-library/specialists/quality/test-master.md +65 -0
- package/skills-library/specialists/security/secure-code-guardian.md +55 -0
- package/skills-library/specialists/security/security-reviewer.md +53 -0
- package/skills-library/specialists/workflow/architecture-designer.md +53 -0
- package/skills-library/specialists/workflow/cli-developer.md +70 -0
- package/skills-library/specialists/workflow/feature-forge.md +65 -0
- package/skills-library/specialists/workflow/prompt-engineer.md +54 -0
- package/skills-library/specialists/workflow/the-fool.md +62 -0
- package/templates/ASSUMPTIONS.md +125 -0
- package/templates/BLOCKERS.md +73 -0
- package/templates/DECISION_LOG.md +116 -0
- package/templates/UAT.md +96 -0
- package/templates/blueprint.md +94 -0
- package/templates/brainstorm.md +185 -0
- package/templates/conscience.md +92 -0
- package/templates/fire-handoff.md +159 -0
- package/templates/metrics.md +67 -0
- package/templates/phase-prompt.md +142 -0
- package/templates/record.md +131 -0
- package/templates/review-report.md +117 -0
- package/templates/skills-index.md +157 -0
- package/templates/verification.md +149 -0
- package/templates/vision.md +79 -0
- package/validation-config.yml +793 -0
- package/version.json +7 -0
- package/workflows/execute-phase.md +732 -0
- package/workflows/handoff-session.md +678 -0
- package/workflows/new-project.md +578 -0
- package/workflows/plan-phase.md +592 -0
- package/workflows/verify-phase.md +874 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# Dominion Flow Execution Mode Intelligence
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Dominion Flow automatically determines whether to use **Swarm Mode** (multi-agent parallel teams), **Subagent Mode** (Task tool parallelism), or **Sequential Mode** based on plan/task characteristics. The Team Lead never needs to manually choose — the system analyzes the work and selects the optimal execution strategy.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Execution Modes
|
|
10
|
+
|
|
11
|
+
| Mode | How It Works | Best For |
|
|
12
|
+
|------|-------------|----------|
|
|
13
|
+
| **Swarm** | Team Lead spawns specialist teammates via Agent Teams | Multi-file features, full-stack plans, parallel debugging |
|
|
14
|
+
| **Subagent** | Task tool spawns focused executor agents per plan | Breath-based phase execution, isolated plan work |
|
|
15
|
+
| **Sequential** | Single agent executes tasks one at a time | Decision-dependent work, small plans, high-risk changes |
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Decision Algorithm
|
|
20
|
+
|
|
21
|
+
### Phase-Level Decision (in `/fire-3-execute`)
|
|
22
|
+
|
|
23
|
+
When executing a phase with multiple plans grouped into breaths:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
FOR each breath in phase:
|
|
27
|
+
independent_plans = plans in this breath (all can run in parallel)
|
|
28
|
+
|
|
29
|
+
IF independent_plans.count == 1:
|
|
30
|
+
MODE = SEQUENTIAL (single plan, no parallelism needed)
|
|
31
|
+
|
|
32
|
+
ELIF independent_plans.count >= 3 AND no_file_overlap(plans):
|
|
33
|
+
MODE = SWARM (many independent plans, dedicated agents per specialty)
|
|
34
|
+
REASON: "3+ independent plans with no file overlap — swarm is optimal"
|
|
35
|
+
|
|
36
|
+
ELIF independent_plans.count >= 2 AND no_file_overlap(plans):
|
|
37
|
+
MODE = SUBAGENT (Task tool spawns executor per plan)
|
|
38
|
+
REASON: "2 parallel plans — subagent execution is sufficient"
|
|
39
|
+
|
|
40
|
+
ELIF independent_plans.count >= 2 AND has_file_overlap(plans):
|
|
41
|
+
MODE = SEQUENTIAL (file conflicts require serialization)
|
|
42
|
+
REASON: "File overlap detected — sequential prevents merge conflicts"
|
|
43
|
+
|
|
44
|
+
ELSE:
|
|
45
|
+
MODE = SEQUENTIAL (default safe mode)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Plan-Level Decision (in `/fire-execute-plan`)
|
|
49
|
+
|
|
50
|
+
When executing a single plan with multiple tasks:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
FOR plan:
|
|
54
|
+
tasks = all tasks in plan
|
|
55
|
+
auto_tasks = tasks where type == "auto"
|
|
56
|
+
checkpoint_tasks = tasks where type starts with "checkpoint:"
|
|
57
|
+
|
|
58
|
+
IF checkpoint_tasks has type "checkpoint:decision":
|
|
59
|
+
MODE = SEQUENTIAL (decisions require user interaction in main context)
|
|
60
|
+
REASON: "Decision checkpoint requires main context"
|
|
61
|
+
|
|
62
|
+
ELIF auto_tasks.count >= 3 AND tasks_are_independent(auto_tasks):
|
|
63
|
+
AND plan.risk_level != "high":
|
|
64
|
+
MODE = SWARM (multiple independent auto tasks, spawn specialist team)
|
|
65
|
+
REASON: "3+ independent tasks — Team Lead delegates to specialists"
|
|
66
|
+
TEAM:
|
|
67
|
+
- Backend specialist (API/DB tasks)
|
|
68
|
+
- Frontend specialist (UI/component tasks)
|
|
69
|
+
- Test specialist (test writing tasks)
|
|
70
|
+
|
|
71
|
+
ELIF auto_tasks.count >= 2 AND tasks_are_independent(auto_tasks):
|
|
72
|
+
MODE = SUBAGENT (2 parallel segments possible)
|
|
73
|
+
REASON: "2 independent segments — subagent per segment"
|
|
74
|
+
|
|
75
|
+
ELIF plan.risk_level == "high":
|
|
76
|
+
MODE = SEQUENTIAL (high-risk needs careful, serial attention)
|
|
77
|
+
REASON: "High-risk plan — sequential for careful execution"
|
|
78
|
+
|
|
79
|
+
ELSE:
|
|
80
|
+
MODE = SEQUENTIAL (default)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Independence Checks
|
|
86
|
+
|
|
87
|
+
### File Overlap Detection
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
no_file_overlap(plans) =
|
|
91
|
+
FOR each pair of plans (A, B):
|
|
92
|
+
files_A = A.frontmatter.files_modified
|
|
93
|
+
files_B = B.frontmatter.files_modified
|
|
94
|
+
IF intersection(files_A, files_B) is not empty:
|
|
95
|
+
RETURN false
|
|
96
|
+
RETURN true
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Task Independence Detection
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
tasks_are_independent(tasks) =
|
|
103
|
+
FOR each pair of tasks (A, B):
|
|
104
|
+
IF A.files overlaps B.files:
|
|
105
|
+
RETURN false
|
|
106
|
+
IF B references output of A:
|
|
107
|
+
RETURN false
|
|
108
|
+
RETURN true
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Specialty Detection (for Swarm team composition)
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
detect_specialties(tasks) =
|
|
115
|
+
specialties = {}
|
|
116
|
+
FOR each task:
|
|
117
|
+
IF task.files match "src/api/*" OR "src/models/*" OR "prisma/*":
|
|
118
|
+
specialties.add("backend")
|
|
119
|
+
IF task.files match "src/components/*" OR "src/app/*" OR "*.css":
|
|
120
|
+
specialties.add("frontend")
|
|
121
|
+
IF task.files match "*test*" OR "*spec*":
|
|
122
|
+
specialties.add("testing")
|
|
123
|
+
IF task.files match "*.sql" OR "prisma/migrations/*":
|
|
124
|
+
specialties.add("database")
|
|
125
|
+
RETURN specialties
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Mode Display
|
|
131
|
+
|
|
132
|
+
When execution mode is selected, display to user:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
+---------------------------------------------------------------+
|
|
136
|
+
| EXECUTION MODE: SWARM |
|
|
137
|
+
+---------------------------------------------------------------+
|
|
138
|
+
| |
|
|
139
|
+
| Breath 1: 3 independent plans |
|
|
140
|
+
| File overlap: None detected |
|
|
141
|
+
| Risk level: Low |
|
|
142
|
+
| |
|
|
143
|
+
| Team Lead will delegate to: |
|
|
144
|
+
| Backend Agent: Plan 03-01 (API endpoints) |
|
|
145
|
+
| Frontend Agent: Plan 03-02 (Dashboard UI) |
|
|
146
|
+
| Test Agent: Plan 03-03 (Integration tests) |
|
|
147
|
+
| |
|
|
148
|
+
| Rationale: 3+ independent plans with no file overlap |
|
|
149
|
+
| and complementary specialties |
|
|
150
|
+
+-----------------------------------------------------------------+
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
+---------------------------------------------------------------+
|
|
155
|
+
| EXECUTION MODE: SEQUENTIAL |
|
|
156
|
+
+---------------------------------------------------------------+
|
|
157
|
+
| |
|
|
158
|
+
| Plan 04-02: Checkout flow |
|
|
159
|
+
| Decision checkpoint at Task 2 (payment provider) |
|
|
160
|
+
| Risk level: High (payment processing) |
|
|
161
|
+
| |
|
|
162
|
+
| Rationale: Decision checkpoint requires user interaction |
|
|
163
|
+
| + high-risk plan benefits from careful execution |
|
|
164
|
+
+-----------------------------------------------------------------+
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Swarm Team Composition
|
|
170
|
+
|
|
171
|
+
When SWARM mode is selected, compose the team based on detected specialties:
|
|
172
|
+
|
|
173
|
+
| Detected Specialty | Agent Role | Assignment |
|
|
174
|
+
|-------------------|------------|------------|
|
|
175
|
+
| backend | Backend Specialist | API routes, middleware, database queries |
|
|
176
|
+
| frontend | Frontend Specialist | React components, pages, styles |
|
|
177
|
+
| testing | Test Specialist | Unit tests, integration tests, E2E |
|
|
178
|
+
| database | Database Specialist | Migrations, schema changes, seeds |
|
|
179
|
+
| mixed (single plan) | Full-Stack Agent | Entire plan execution |
|
|
180
|
+
|
|
181
|
+
### Swarm Prompt Template
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
"Execute Phase {N}, Breath {W} as a team.
|
|
185
|
+
|
|
186
|
+
Team composition:
|
|
187
|
+
- Backend Agent: Execute Plan {N}-01 (API endpoints for {feature})
|
|
188
|
+
Context: @.planning/phases/{N}-name/{N}-01-BLUEPRINT.md
|
|
189
|
+
|
|
190
|
+
- Frontend Agent: Execute Plan {N}-02 (UI components for {feature})
|
|
191
|
+
Context: @.planning/phases/{N}-name/{N}-02-BLUEPRINT.md
|
|
192
|
+
|
|
193
|
+
- Test Agent: Execute Plan {N}-03 (Tests for {feature})
|
|
194
|
+
Context: @.planning/phases/{N}-name/{N}-03-BLUEPRINT.md
|
|
195
|
+
|
|
196
|
+
Rules:
|
|
197
|
+
- Each agent commits atomically per task
|
|
198
|
+
- Each agent creates their own RECORD.md
|
|
199
|
+
- Coordinate on shared types/interfaces
|
|
200
|
+
- Flag any dependency discoveries immediately
|
|
201
|
+
"
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Override Flags
|
|
207
|
+
|
|
208
|
+
Users can override the automatic decision:
|
|
209
|
+
|
|
210
|
+
```yaml
|
|
211
|
+
optional_flags:
|
|
212
|
+
--swarm: "Force swarm mode regardless of analysis"
|
|
213
|
+
--sequential: "Force sequential mode regardless of analysis"
|
|
214
|
+
--subagent: "Force subagent mode (Task tool parallelism)"
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Fallback Rules
|
|
220
|
+
|
|
221
|
+
| Situation | Fallback |
|
|
222
|
+
|-----------|----------|
|
|
223
|
+
| Swarm mode not available (env var not set) | Fall back to Subagent mode |
|
|
224
|
+
| Subagent hits permission error | Fall back to Sequential mode |
|
|
225
|
+
| File overlap detected mid-execution | Pause, serialize remaining tasks |
|
|
226
|
+
| Swarm agent fails | Retry as Subagent, then Sequential |
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Metrics Tracking
|
|
231
|
+
|
|
232
|
+
Each execution records the mode used in RECORD.md:
|
|
233
|
+
|
|
234
|
+
```yaml
|
|
235
|
+
metrics:
|
|
236
|
+
execution_mode: swarm|subagent|sequential
|
|
237
|
+
mode_reason: "3+ independent plans with no file overlap"
|
|
238
|
+
agents_spawned: 3
|
|
239
|
+
parallel_efficiency: "42% faster than sequential estimate"
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
This data feeds into trend analysis for optimizing future mode decisions.
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# Dominion Flow Git Integration Reference
|
|
2
|
+
|
|
3
|
+
> **Origin:** Ported from Dominion Flow `git-integration.md` with full Git Flow branch strategy.
|
|
4
|
+
|
|
5
|
+
## Core Principle
|
|
6
|
+
|
|
7
|
+
**Commit outcomes, not process.** The git log should read like a changelog of what shipped, not a diary of planning activity.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Git Flow Branch Strategy
|
|
12
|
+
|
|
13
|
+
### Branch Types
|
|
14
|
+
|
|
15
|
+
| Branch | Purpose | Created From | Merges Into | Lifetime |
|
|
16
|
+
|--------|---------|-------------|-------------|----------|
|
|
17
|
+
| `main` | Production-ready code | --- | --- | Permanent |
|
|
18
|
+
| `develop` | Integration branch | `main` | `main` | Permanent |
|
|
19
|
+
| `feature/phase-N-desc` | Per-phase feature work | `develop` | `develop` | Until phase complete |
|
|
20
|
+
| `hotfix/description` | Emergency production fixes | `main` | `main` AND `develop` | Until fix deployed |
|
|
21
|
+
| `release/vX.Y.Z` | Release preparation | `develop` | `main` AND `develop` | Until release shipped |
|
|
22
|
+
|
|
23
|
+
### Branch Naming
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
feature/phase-01-foundation
|
|
27
|
+
feature/phase-02-auth
|
|
28
|
+
feature/phase-03-dashboard
|
|
29
|
+
hotfix/fix-login-crash
|
|
30
|
+
release/v1.0.0
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Branch Lifecycle
|
|
34
|
+
|
|
35
|
+
**Starting a phase:**
|
|
36
|
+
```bash
|
|
37
|
+
git checkout develop
|
|
38
|
+
git pull origin develop
|
|
39
|
+
git checkout -b feature/phase-03-dashboard
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Completing a phase (after verification passes):**
|
|
43
|
+
```bash
|
|
44
|
+
git push -u origin feature/phase-03-dashboard
|
|
45
|
+
gh pr create --base develop --head feature/phase-03-dashboard \
|
|
46
|
+
--title "Phase 03: Dashboard" --body "..."
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Hotfix workflow:**
|
|
50
|
+
```bash
|
|
51
|
+
git checkout main && git pull origin main
|
|
52
|
+
git checkout -b hotfix/fix-login-crash
|
|
53
|
+
# Make fix, commit, push
|
|
54
|
+
gh pr create --base main --title "Hotfix: Login crash"
|
|
55
|
+
# After merge to main, also merge to develop
|
|
56
|
+
git checkout develop && git merge main && git push
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Commit Points
|
|
62
|
+
|
|
63
|
+
| Event | Commit? | Why |
|
|
64
|
+
|-------|---------|-----|
|
|
65
|
+
| PROJECT.md + ROADMAP created | YES | Project initialization |
|
|
66
|
+
| BLUEPRINT.md created | NO | Intermediate |
|
|
67
|
+
| RESEARCH.md created | NO | Intermediate |
|
|
68
|
+
| **Task completed** | YES | Atomic unit of work |
|
|
69
|
+
| **Plan completed** | YES | Metadata commit |
|
|
70
|
+
| **Test written (TDD RED)** | YES | Atomic test commit |
|
|
71
|
+
| **Test passing (TDD GREEN)** | YES | Atomic implementation |
|
|
72
|
+
| Handoff created | YES | WIP state preserved |
|
|
73
|
+
| **Blocker created/resolved** | YES | Track blocker state |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Commit Formats
|
|
78
|
+
|
|
79
|
+
### Project Initialization
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
docs: initialize [project-name] ([N] phases)
|
|
83
|
+
|
|
84
|
+
[One-liner from PROJECT.md]
|
|
85
|
+
|
|
86
|
+
Phases:
|
|
87
|
+
1. [phase-name]: [goal]
|
|
88
|
+
2. [phase-name]: [goal]
|
|
89
|
+
|
|
90
|
+
Branch strategy: main -> develop -> feature/phase-N-*
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Task Completion (Per-Task Atomic Commits)
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
{type}({phase}-{plan}): {task-name}
|
|
97
|
+
|
|
98
|
+
- [Key change 1]
|
|
99
|
+
- [Key change 2]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Types:** `feat`, `fix`, `test`, `refactor`, `perf`, `chore`, `docs`
|
|
103
|
+
|
|
104
|
+
**Examples:**
|
|
105
|
+
```bash
|
|
106
|
+
git add src/api/auth.ts src/types/user.ts
|
|
107
|
+
git commit -m "feat(08-02): create user registration endpoint
|
|
108
|
+
|
|
109
|
+
- POST /auth/register validates email and password
|
|
110
|
+
- Returns JWT token on success"
|
|
111
|
+
|
|
112
|
+
git add src/__tests__/jwt.test.ts
|
|
113
|
+
git commit -m "test(07-02): add failing test for JWT generation
|
|
114
|
+
|
|
115
|
+
- Tests token contains user ID claim
|
|
116
|
+
- Tests token expires in 1 hour"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Plan Completion
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
docs({phase}-{plan}): complete [plan-name]
|
|
123
|
+
|
|
124
|
+
Tasks completed: [N]/[N]
|
|
125
|
+
- [Task 1]
|
|
126
|
+
- [Task 2]
|
|
127
|
+
|
|
128
|
+
SUMMARY: .planning/phases/XX-name/{phase}-{plan}-RECORD.md
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Handoff (WIP)
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
wip: [phase-name] paused at task [X]/[Y]
|
|
135
|
+
|
|
136
|
+
Current: [task name]
|
|
137
|
+
Branch: feature/phase-XX-description
|
|
138
|
+
Blockers: [count] open
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## PR Workflow
|
|
144
|
+
|
|
145
|
+
### When to Create PRs
|
|
146
|
+
|
|
147
|
+
| Event | PR Target | Required |
|
|
148
|
+
|-------|-----------|----------|
|
|
149
|
+
| Phase complete + verified | `develop` | Yes |
|
|
150
|
+
| Hotfix ready | `main` | Yes |
|
|
151
|
+
| Release ready | `main` | Yes |
|
|
152
|
+
| Mid-phase handoff | None (push only) | No |
|
|
153
|
+
|
|
154
|
+
### PR Template
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
gh pr create --base develop --title "Phase XX: Short description" --body "$(cat <<'EOF'
|
|
158
|
+
## Summary
|
|
159
|
+
- [Key deliverable 1]
|
|
160
|
+
- [Key deliverable 2]
|
|
161
|
+
|
|
162
|
+
## Test Results
|
|
163
|
+
- Unit tests: X/X passing
|
|
164
|
+
- Build: Clean
|
|
165
|
+
|
|
166
|
+
## Verification
|
|
167
|
+
- [x] Must-haves verified
|
|
168
|
+
- [x] WARRIOR quality gates passed
|
|
169
|
+
- [x] No P0/P1 blockers open
|
|
170
|
+
EOF
|
|
171
|
+
)"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Example Git Log
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
# Phase 03 - Products (feature/phase-03-products)
|
|
180
|
+
3m4n5o docs(03-02): complete product listing plan
|
|
181
|
+
6p7q8r feat(03-02): add pagination controls
|
|
182
|
+
9s0t1u feat(03-02): implement search and filters
|
|
183
|
+
2v3w4x feat(03-01): create product catalog schema
|
|
184
|
+
|
|
185
|
+
# Phase 02 - Auth (feature/phase-02-auth)
|
|
186
|
+
5y6z7a docs(02-02): complete token refresh plan
|
|
187
|
+
8b9c0d feat(02-02): implement refresh token rotation
|
|
188
|
+
1e2f3g test(02-02): add failing test for token refresh
|
|
189
|
+
7k8l9m feat(02-01): add JWT generation and validation
|
|
190
|
+
|
|
191
|
+
# Phase 01 - Foundation (feature/phase-01-foundation)
|
|
192
|
+
6t7u8v feat(01-01): configure Tailwind and globals
|
|
193
|
+
9w0x1y feat(01-01): set up Prisma with database
|
|
194
|
+
2z3a4b feat(01-01): create Next.js 15 project
|
|
195
|
+
|
|
196
|
+
# Initialization (develop)
|
|
197
|
+
5c6d7e docs: initialize ecommerce-app (5 phases)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Why Per-Task Commits?
|
|
203
|
+
|
|
204
|
+
- **AI context:** `git log --grep="{phase}-{plan}"` shows all work for a plan
|
|
205
|
+
- **Failure recovery:** Can revert to last successful task
|
|
206
|
+
- **Debugging:** `git bisect` finds exact failing task
|
|
207
|
+
- **PR clarity:** Reviewers step through commits individually
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Anti-Patterns
|
|
212
|
+
|
|
213
|
+
- Committing directly to main or develop (use feature branches)
|
|
214
|
+
- Giant commits with all plan work (commit per task)
|
|
215
|
+
- Committing planning artifacts separately (commit with plan completion)
|
|
216
|
+
- Long-lived feature branches (one phase per branch)
|
|
217
|
+
- Forgetting to merge hotfixes back to develop
|