@dv.nghiem/flowdeck 0.3.8 → 0.4.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/README.md +13 -122
- package/dist/agents/code-explorer.d.ts.map +1 -1
- package/dist/agents/mapper.d.ts.map +1 -1
- package/dist/agents/orchestrator.d.ts.map +1 -1
- package/dist/agents/planner.d.ts.map +1 -1
- package/dist/agents/specialist.d.ts.map +1 -1
- package/dist/dashboard/server.mjs +12 -2
- package/dist/hooks/compaction-hook.d.ts.map +1 -1
- package/dist/hooks/file-tracker.d.ts +6 -0
- package/dist/hooks/file-tracker.d.ts.map +1 -1
- package/dist/hooks/notifications.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +752 -785
- package/dist/lib/completion-validator.d.ts +51 -0
- package/dist/lib/completion-validator.d.ts.map +1 -0
- package/dist/lib/recommended-question.d.ts +24 -0
- package/dist/lib/recommended-question.d.ts.map +1 -0
- package/dist/lib/research-gate.d.ts +97 -0
- package/dist/lib/research-gate.d.ts.map +1 -0
- package/dist/lib/research-gate.test.d.ts +2 -0
- package/dist/lib/research-gate.test.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +14 -3
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/services/codegraph.d.ts +36 -0
- package/dist/services/codegraph.d.ts.map +1 -0
- package/dist/services/codegraph.test.d.ts +2 -0
- package/dist/services/codegraph.test.d.ts.map +1 -0
- package/dist/services/command-validator.d.ts +11 -0
- package/dist/services/command-validator.d.ts.map +1 -1
- package/dist/services/preflight-explorer.d.ts +130 -0
- package/dist/services/preflight-explorer.d.ts.map +1 -0
- package/dist/services/preflight-explorer.test.d.ts +25 -0
- package/dist/services/preflight-explorer.test.d.ts.map +1 -0
- package/dist/services/question-guard.d.ts +96 -0
- package/dist/services/question-guard.d.ts.map +1 -0
- package/dist/services/quick-router.d.ts +40 -1
- package/dist/services/quick-router.d.ts.map +1 -1
- package/dist/services/recommended-question.test.d.ts +2 -0
- package/dist/services/recommended-question.test.d.ts.map +1 -0
- package/dist/services/supervisor-binding.d.ts +3 -1
- package/dist/services/supervisor-binding.d.ts.map +1 -1
- package/dist/tools/codebase-index.d.ts +30 -0
- package/dist/tools/codebase-index.d.ts.map +1 -0
- package/dist/tools/codebase-index.test.d.ts +2 -0
- package/dist/tools/codebase-index.test.d.ts.map +1 -0
- package/dist/tools/codegraph-tool.d.ts +3 -0
- package/dist/tools/codegraph-tool.d.ts.map +1 -0
- package/dist/tools/planning-state-lib.d.ts +23 -0
- package/dist/tools/planning-state-lib.d.ts.map +1 -1
- package/docs/agents/index.md +154 -0
- package/docs/commands/fd-ask.md +71 -39
- package/docs/commands/fd-checkpoint.md +63 -8
- package/docs/commands/fd-deploy-check.md +166 -9
- package/docs/commands/fd-design.md +101 -0
- package/docs/commands/fd-discuss.md +87 -20
- package/docs/commands/fd-doctor.md +100 -13
- package/docs/commands/fd-done.md +215 -0
- package/docs/commands/fd-execute.md +104 -0
- package/docs/commands/fd-fix-bug.md +144 -24
- package/docs/commands/fd-map-codebase.md +85 -21
- package/docs/commands/fd-multi-repo.md +155 -40
- package/docs/commands/fd-new-feature.md +63 -19
- package/docs/commands/fd-plan.md +80 -27
- package/docs/commands/fd-quick.md +143 -29
- package/docs/commands/fd-reflect.md +81 -13
- package/docs/commands/fd-resume.md +65 -8
- package/docs/commands/fd-status.md +80 -12
- package/docs/commands/fd-suggest.md +114 -0
- package/docs/commands/fd-translate-intent.md +69 -9
- package/docs/commands/fd-verify.md +71 -14
- package/docs/commands/fd-write-docs.md +121 -8
- package/docs/concepts/architecture.md +163 -0
- package/docs/concepts/governance.md +242 -0
- package/docs/concepts/intelligence.md +145 -0
- package/docs/concepts/multi-repo.md +227 -0
- package/docs/concepts/workflows.md +205 -0
- package/docs/configuration/index.md +208 -0
- package/docs/configuration/opencode-settings.md +98 -0
- package/docs/getting-started/first-project.md +126 -0
- package/docs/getting-started/installation.md +73 -0
- package/docs/getting-started/quick-start.md +74 -0
- package/docs/index.md +36 -72
- package/docs/reference/hooks.md +176 -0
- package/docs/reference/rules.md +109 -0
- package/docs/skills/code-review.md +47 -0
- package/docs/skills/index.md +148 -0
- package/docs/skills/planning.md +39 -0
- package/package.json +1 -1
- package/src/commands/fd-deploy-check.md +2 -2
- package/src/commands/fd-discuss.md +128 -7
- package/src/commands/fd-done.md +196 -0
- package/src/commands/fd-execute.md +43 -6
- package/src/commands/fd-fix-bug.md +43 -6
- package/src/commands/fd-map-codebase.md +100 -20
- package/src/commands/fd-multi-repo.md +1 -1
- package/src/commands/fd-new-feature.md +14 -5
- package/src/commands/fd-plan.md +38 -1
- package/src/commands/fd-quick.md +77 -14
- package/src/commands/fd-resume.md +1 -1
- package/src/commands/fd-status.md +1 -1
- package/src/commands/fd-verify.md +16 -2
- package/src/commands/fd-write-docs.md +30 -5
- package/src/rules/common/behavioral.md +63 -0
- package/src/skills/codebase-mapping/SKILL.md +1 -1
- package/src/skills/context-load/SKILL.md +1 -1
- package/src/skills/multi-repo/SKILL.md +1 -1
- package/src/skills/repo-memory-graph/SKILL.md +1 -1
- package/dist/hooks/memory-hook.d.ts +0 -28
- package/dist/hooks/memory-hook.d.ts.map +0 -1
- package/dist/services/memory-store.d.ts +0 -73
- package/dist/services/memory-store.d.ts.map +0 -1
- package/dist/services/memory-store.test.d.ts +0 -2
- package/dist/services/memory-store.test.d.ts.map +0 -1
- package/dist/tools/memory-search.d.ts +0 -3
- package/dist/tools/memory-search.d.ts.map +0 -1
- package/dist/tools/memory-status.d.ts +0 -3
- package/dist/tools/memory-status.d.ts.map +0 -1
- package/docs/USER_GUIDE.md +0 -20
- package/docs/agents.md +0 -544
- package/docs/best-practices.md +0 -47
- package/docs/commands/fd-new-project.md +0 -24
- package/docs/commands.md +0 -557
- package/docs/configuration.md +0 -325
- package/docs/design-first-workflow.md +0 -94
- package/docs/feature-integration-architecture.md +0 -227
- package/docs/installation.md +0 -123
- package/docs/intelligence.md +0 -370
- package/docs/memory.md +0 -69
- package/docs/multi-repo.md +0 -201
- package/docs/notifications.md +0 -170
- package/docs/optimization-baseline.md +0 -21
- package/docs/quick-start.md +0 -197
- package/docs/rules.md +0 -432
- package/docs/skills.md +0 -417
- package/docs/workflows.md +0 -134
- package/src/commands/fd-new-project.md +0 -114
|
@@ -1,63 +1,178 @@
|
|
|
1
|
-
|
|
2
|
-
description: Initialize or manage multi-repo configuration for microservice architecture. Adds, lists, checks status of, or removes repos from .planning/config.json.
|
|
3
|
-
argument-hint: "[--add <path> <role> | --list | --status | --remove <name>]"
|
|
4
|
-
---
|
|
1
|
+
# /fd-multi-repo
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
**Purpose:** Multi-repo orchestration for coordinated changes across a microservice architecture.
|
|
7
4
|
|
|
8
|
-
|
|
5
|
+
## Usage
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
/fd-multi-repo [list | add <path> [name] | remove <name> | status]
|
|
11
8
|
|
|
12
|
-
|
|
9
|
+
## Arguments
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
- `list` — display all registered repositories
|
|
12
|
+
- `add <path> [name]` — add a repository to the registry
|
|
13
|
+
- `remove <name>` — remove a repository from the registry
|
|
14
|
+
- `status` — show status of all registered repositories
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
## What Happens
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
### List (or no arguments)
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Read `.planning/config.json` → `repos` array. Display:
|
|
21
|
+
```
|
|
22
|
+
════════════════════════════════════
|
|
23
|
+
MULTI-REPO REGISTRY
|
|
24
|
+
════════════════════════════════════
|
|
25
|
+
user-service ../user-service upstream-api node+typescript
|
|
26
|
+
order-service ../order-service downstream-consumer node+typescript
|
|
27
|
+
shared-types ../shared-types shared-lib node+typescript
|
|
28
|
+
api-gateway ../api-gateway gateway nginx+lua
|
|
29
|
+
|
|
30
|
+
Path check: all 4 repos resolved ✅
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Add (`add <path> [name]`)
|
|
34
|
+
|
|
35
|
+
1. Verify `<path>` exists and has a `.planning/STATE.md`
|
|
36
|
+
2. Derive `name` from directory basename if not provided
|
|
37
|
+
3. Add to `.planning/config.json` → `repos` array
|
|
38
|
+
4. Report: "Added '<name>' at <path>."
|
|
39
|
+
|
|
40
|
+
### Remove (`remove <name>`)
|
|
41
|
+
|
|
42
|
+
Remove matching repo from registry. Report: "Removed '<name>'."
|
|
43
|
+
|
|
44
|
+
### Status (`status`)
|
|
45
|
+
|
|
46
|
+
For each registered repo, read its STATE.md and display:
|
|
47
|
+
```
|
|
48
|
+
════════════════════════════════════
|
|
49
|
+
WORKSPACE STATUS
|
|
50
|
+
════════════════════════════════════
|
|
51
|
+
frontend — Phase 2 | in_progress | Updated: <time>
|
|
52
|
+
backend — Phase 3 | completed | Updated: <time>
|
|
53
|
+
shared — Phase 1 | planned | Updated: <time>
|
|
54
|
+
════════════════════════════════════
|
|
55
|
+
Overall: 1 in progress, 1 complete, 1 planned
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Execution Flow (for coordinated feature/fix)
|
|
59
|
+
|
|
60
|
+
**Step 1: Analyze Repos**
|
|
61
|
+
|
|
62
|
+
`@multi-repo-coordinator` reads `.planning/config.json` and produces a registry summary. If any path fails to resolve, the flow stops here with a clear error.
|
|
63
|
+
|
|
64
|
+
**Step 2: Identify Dependencies**
|
|
65
|
+
|
|
66
|
+
`@multi-repo-coordinator` and `@architect` work together to:
|
|
67
|
+
1. Build the dependency graph from service roles and actual API references
|
|
68
|
+
2. Classify the change as breaking or non-breaking for each affected service
|
|
69
|
+
3. Produce the ordered change list
|
|
70
|
+
|
|
71
|
+
If circular dependency is detected, the flow stops and reports the cycle.
|
|
72
|
+
|
|
73
|
+
**Step 3: Plan Changes**
|
|
74
|
+
|
|
75
|
+
`@architect` produces the cross-repo CHANGE PLAN using contract-first development:
|
|
76
|
+
1. Write the new API contract or type definition before any implementation starts
|
|
77
|
+
2. Confirm the contract covers all required changes without scope creep
|
|
78
|
+
3. Produce a per-repo task list ordered by the dependency graph
|
|
79
|
+
|
|
80
|
+
**Step 4: Execute Per Repo**
|
|
81
|
+
|
|
82
|
+
Changes execute in dependency order. For each repo:
|
|
83
|
+
1. Implementation agent implements the changes
|
|
84
|
+
2. `@tester` writes and runs tests for that repo's changes
|
|
85
|
+
3. No downstream repo starts until upstream repo's changes pass tests
|
|
86
|
+
|
|
87
|
+
For non-breaking changes, implementation and testing run in parallel. For breaking changes, `@tester` must verify upstream before downstream implementation starts.
|
|
88
|
+
|
|
89
|
+
If a repo fails, that repo and all downstream repos are paused. Upstream repos that completed are not rolled back.
|
|
21
90
|
|
|
22
|
-
|
|
23
|
-
2. For `--add`: resolves the path, infers `name` from the directory name if not provided, writes the new entry to `sub_repos`
|
|
24
|
-
3. For `--list`: formats the `sub_repos` array as a readable table
|
|
25
|
-
4. For `--status`: walks each entry, checks `path` existence, runs `git -C <resolved_path> branch --show-current`
|
|
26
|
-
5. For `--remove`: removes the matching entry by `name`, writes back to config.json
|
|
91
|
+
**Step 5: Verify Integration**
|
|
27
92
|
|
|
28
|
-
|
|
93
|
+
After all per-repo changes complete, `@tester` and `@reviewer` run cross-repo verification:
|
|
94
|
+
- `@tester` (integration): runs end-to-end integration tests covering the full change path
|
|
95
|
+
- `@reviewer` (cross-repo): reviews all changed files across all repos for contract adherence
|
|
29
96
|
|
|
97
|
+
Both run in parallel. Integration test failures block the production rollout.
|
|
98
|
+
|
|
99
|
+
**Rollout After Integration Pass**
|
|
100
|
+
|
|
101
|
+
Once integration is verified in staging, deploy in dependency order:
|
|
102
|
+
```
|
|
103
|
+
1. shared-types → publish to package registry (semver minor)
|
|
104
|
+
2. user-service → canary (5% traffic, 15 min) → stage ✅ → prod
|
|
105
|
+
3. order-service → canary (after user-service prod) → stage ✅ → prod
|
|
106
|
+
4. api-gateway → canary (after order-service prod) → stage ✅ → prod
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Conflict Handling
|
|
110
|
+
|
|
111
|
+
If a conflict is detected during Step 2 or Step 3, the flow pauses:
|
|
30
112
|
```
|
|
31
|
-
|
|
113
|
+
FLOW PAUSED — Conflict Requires Resolution
|
|
114
|
+
|
|
115
|
+
Service A (user-service): removing `legacyUserId` from response
|
|
116
|
+
Service B (order-service PR #47): new consumer of `legacyUserId`
|
|
117
|
+
Classification: Breaking API collision
|
|
118
|
+
|
|
119
|
+
Resolution options:
|
|
120
|
+
A. Versioned endpoint: keep /v1/users (with legacyUserId) + add /v2/users (without)
|
|
121
|
+
B. Coordinate: block order-service PR #47 until user-service migration is complete
|
|
122
|
+
C. Reverse: defer the user-service removal until order-service removes its dependency
|
|
123
|
+
|
|
124
|
+
Owner teams: platform (user-service), commerce (order-service)
|
|
125
|
+
Decision required before this flow can continue.
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The flow does not auto-resolve conflicts. It surfaces them clearly, names the options, and waits for human direction.
|
|
32
129
|
|
|
33
|
-
|
|
34
|
-
─────────────────── ───────────────────── ──────────────────── ──────────────── ────────
|
|
35
|
-
user-service ../user-service upstream-api node+typescript platform
|
|
36
|
-
order-service ../order-service downstream-consumer node+typescript commerce
|
|
37
|
-
shared-types ../shared-types shared-lib node+typescript platform
|
|
38
|
-
api-gateway ../api-gateway gateway nginx+lua infra
|
|
130
|
+
## Error Handling
|
|
39
131
|
|
|
40
|
-
|
|
132
|
+
| Condition | Action |
|
|
133
|
+
|-----------|--------|
|
|
134
|
+
| Registry path not found on disk | Stop at Step 1; report which path failed |
|
|
135
|
+
| Circular dependency in graph | Stop at Step 2; show the cycle |
|
|
136
|
+
| Contract review rejected | Stop at Step 3; rework contract before proceeding |
|
|
137
|
+
| Repo's tests fail | Pause that repo and all dependents; upstream remains deployed |
|
|
138
|
+
| Integration test fails | Block production rollout; report which test failed |
|
|
139
|
+
| Conflict detected | Pause flow; surface options; wait for human decision |
|
|
140
|
+
|
|
141
|
+
## Output / State
|
|
142
|
+
|
|
143
|
+
- `.planning/config.json` updated with repo registry
|
|
144
|
+
- Per-repo state tracked across phases
|
|
145
|
+
- Cross-repo integration verified
|
|
146
|
+
|
|
147
|
+
## Examples
|
|
148
|
+
|
|
149
|
+
**List all registered repos:**
|
|
150
|
+
```
|
|
151
|
+
/fd-multi-repo list
|
|
41
152
|
```
|
|
42
153
|
|
|
43
|
-
**
|
|
154
|
+
**Add a repo:**
|
|
155
|
+
```
|
|
156
|
+
/fd-multi-repo add ../user-service
|
|
157
|
+
```
|
|
44
158
|
|
|
159
|
+
**Add a repo with custom name:**
|
|
160
|
+
```
|
|
161
|
+
/fd-multi-repo add ../order-service order-service
|
|
45
162
|
```
|
|
46
|
-
Multi-Repo Status
|
|
47
163
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
shared-types ../shared-types ✅ main ❌
|
|
53
|
-
api-gateway ../api-gateway ❌ — —
|
|
164
|
+
**Remove a repo:**
|
|
165
|
+
```
|
|
166
|
+
/fd-multi-repo remove shared-types
|
|
167
|
+
```
|
|
54
168
|
|
|
55
|
-
|
|
56
|
-
|
|
169
|
+
**Check status across all repos:**
|
|
170
|
+
```
|
|
171
|
+
/fd-multi-repo status
|
|
57
172
|
```
|
|
58
173
|
|
|
59
|
-
|
|
174
|
+
## Related Commands
|
|
60
175
|
|
|
61
|
-
- `/fd-
|
|
62
|
-
- `/fd-
|
|
63
|
-
- `/fd-
|
|
176
|
+
- `/fd-new-feature` — start a new feature in a single repo
|
|
177
|
+
- `/fd-status` — view current state across repos
|
|
178
|
+
- `/fd-deploy-check` — run pre-deployment checks across all affected repos
|
|
@@ -1,25 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
description: Execute feature implementation workflow — orchestrator + role-routed implementation/researcher + reviewer + tester
|
|
3
|
-
argument-hint: "[feature-description]"
|
|
4
|
-
---
|
|
1
|
+
# /fd-new-feature
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
**Purpose:** Define a new feature, initialize feature context in the current phase directory, and guide the user through the discuss-plan-execute-verify workflow.
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
1. If a confirmed PLAN.md exists: delegates each step to `@backend-coder`, `@frontend-coder`, or `@devops` based on scope
|
|
10
|
-
2. If no plan: first runs discuss → plan → confirm, then executes
|
|
11
|
-
3. Runs `@researcher` in parallel for any external APIs or docs needed
|
|
12
|
-
4. Runs `@reviewer` after each significant step to catch issues early
|
|
13
|
-
5. Runs `@tester` to write and run tests for implemented code
|
|
14
|
-
6. Updates STATE.md after each step
|
|
5
|
+
## Usage
|
|
15
6
|
|
|
16
|
-
|
|
7
|
+
/fd-new-feature [feature name or description]
|
|
17
8
|
|
|
18
|
-
|
|
9
|
+
## What Happens
|
|
19
10
|
|
|
20
|
-
|
|
11
|
+
1. **Pre-flight checks.**
|
|
12
|
+
- Verify `.planning/` exists (error if not found)
|
|
13
|
+
- Read `STATE.md` to determine current phase number N
|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
2. **Capture feature description.**
|
|
16
|
+
- If no arguments provided, ask the user to describe the feature
|
|
17
|
+
- Use the provided description as the feature name/summary
|
|
18
|
+
|
|
19
|
+
3. **Initialize feature context.**
|
|
20
|
+
- Create `.planning/phases/phase-<N>/FEATURE.md` with phase, timestamp, status (defined), description, and placeholder fields for acceptance criteria and out-of-scope
|
|
21
|
+
|
|
22
|
+
4. **Update STATE.md.**
|
|
23
|
+
- Set `feature` to the feature name
|
|
24
|
+
- Set `status` to `defined`
|
|
25
|
+
- Set `last_action` to record the feature initialization
|
|
26
|
+
|
|
27
|
+
5. **Present next steps.** Report the created file and the ordered workflow:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
Next steps (in order):
|
|
31
|
+
1. /fd-discuss — capture requirements, scope, and acceptance criteria
|
|
32
|
+
2. /fd-plan — create implementation plan from discussion decisions
|
|
33
|
+
3. /fd-execute — run TDD pipeline to implement the plan
|
|
34
|
+
4. /fd-verify — run full test + review + deploy-check pipeline
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Output / State
|
|
38
|
+
|
|
39
|
+
File created:
|
|
40
|
+
- `.planning/phases/phase-<N>/FEATURE.md`
|
|
41
|
+
|
|
42
|
+
STATE.md updates:
|
|
43
|
+
```yaml
|
|
44
|
+
phase: <N>
|
|
45
|
+
status: defined
|
|
46
|
+
feature: <feature name>
|
|
47
|
+
last_action: "Feature defined: <feature name>"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Examples
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
/fd-new-feature user authentication
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Initializes a feature "user authentication" in the current phase and creates `FEATURE.md`.
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
/fd-new-feature
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Prompts for a feature description if no arguments are given.
|
|
63
|
+
|
|
64
|
+
## Related Commands
|
|
65
|
+
|
|
66
|
+
- `/fd-discuss` — capture requirements and decisions for this feature
|
|
67
|
+
- `/fd-plan` — create implementation plan from discuss decisions
|
|
68
|
+
- `/fd-execute` — run TDD pipeline to implement the feature
|
|
69
|
+
- `/fd-verify` — run full verification after implementation
|
package/docs/commands/fd-plan.md
CHANGED
|
@@ -1,33 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
# /fd-plan
|
|
2
|
+
|
|
3
|
+
**Purpose:** Create a detailed implementation plan from confirmed DISCUSS.md decisions — research-first, saves PLAN.md, updates STATE.md, and requires CONFIRM before saving.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
/fd-plan [--phase=N] [--yes]
|
|
8
|
+
|
|
9
|
+
## What Happens
|
|
10
|
+
|
|
11
|
+
1. **Research gate (before writing any plan).**
|
|
12
|
+
- CodeGraph intelligence check (`codegraph action=check`)
|
|
13
|
+
- If indexed and fresh: use `codegraph_context`, `codegraph_explore`, `codegraph_impact`
|
|
14
|
+
- If unavailable: standard research pass reading STATE.md, DISCUSS.md, ARCHITECTURE.md, CODEBASE_INDEX.md
|
|
15
|
+
- Reuse persisted research if fresh (within 5 minutes), otherwise run fresh pass and persist results
|
|
16
|
+
- Invoke configured MCP tools for library/API/external knowledge as needed
|
|
17
|
+
|
|
18
|
+
2. **Guard check — D-06 compliance.**
|
|
19
|
+
- Verify DISCUSS.md exists — error if not found
|
|
20
|
+
- Verify DISCUSS.md is confirmed — error if not yet confirmed
|
|
21
|
+
- Abort with clear remediation in both cases
|
|
22
|
+
|
|
23
|
+
3. **Load context.**
|
|
24
|
+
- Read PROJECT.md, STATE.md, and the current phase's DISCUSS.md
|
|
25
|
+
|
|
26
|
+
4. **Draft plan.**
|
|
27
|
+
- Tasks trace to D-XX decisions from DISCUSS.md
|
|
28
|
+
- Each task includes `<action>` referencing relevant D-XX decisions
|
|
29
|
+
- Wave assignments for parallel execution
|
|
30
|
+
- File dependencies between tasks
|
|
31
|
+
|
|
32
|
+
5. **Validate plan.**
|
|
33
|
+
- All requirements from ROADMAP.md for the current phase addressed
|
|
34
|
+
- All D-XX decisions from DISCUSS.md traced in tasks
|
|
35
|
+
- No tasks contradict prior decisions
|
|
36
|
+
- Return to Step 4 to revise if validation fails
|
|
37
|
+
|
|
38
|
+
6. **Review plan.** Present draft to user showing tasks, D-XX traces, wave structure, and file dependencies.
|
|
39
|
+
|
|
40
|
+
7. **PAUSE for CONFIRM.**
|
|
41
|
+
- Present: "Ready to save PLAN.md? Type CONFIRM to save, or describe changes needed."
|
|
42
|
+
- If user types CONFIRM → proceed to Step 8
|
|
43
|
+
- If user requests changes → return to Step 4 with feedback
|
|
44
|
+
|
|
45
|
+
8. **Save PLAN.md** to `.planning/phases/phase-<N>/PLAN.md` and commit with message `docs(phase-N): save confirmed plan`
|
|
46
|
+
|
|
47
|
+
9. **Update STATE.md.**
|
|
48
|
+
- Set `plan_file` to the saved path
|
|
49
|
+
- Set `plan_confirmed: true`
|
|
50
|
+
- Set `last_action: "Plan confirmed"`
|
|
51
|
+
- If UI-heavy task: set `requires_design_first: true` and `design_stage: pending`
|
|
52
|
+
- Suggest `/fd-design --mode=draft` if design-first is required
|
|
53
|
+
|
|
54
|
+
## Output / State
|
|
55
|
+
|
|
56
|
+
File created:
|
|
57
|
+
- `.planning/phases/phase-<N>/PLAN.md`
|
|
58
|
+
|
|
59
|
+
STATE.md updates:
|
|
60
|
+
```yaml
|
|
61
|
+
plan_file: ".planning/phases/phase-<N>/PLAN.md"
|
|
62
|
+
plan_confirmed: true
|
|
63
|
+
last_action: "Plan confirmed"
|
|
64
|
+
requires_design_first: true # if UI-heavy
|
|
65
|
+
design_stage: pending # if UI-heavy
|
|
17
66
|
```
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
67
|
+
|
|
68
|
+
## Examples
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
/fd-plan
|
|
22
72
|
```
|
|
23
73
|
|
|
24
|
-
|
|
74
|
+
Creates a plan for the current phase using confirmed DISCUSS.md decisions.
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
/fd-plan --phase=2 --yes
|
|
78
|
+
```
|
|
25
79
|
|
|
26
|
-
|
|
80
|
+
Creates a plan for phase 2 and skips the confirmation pause.
|
|
27
81
|
|
|
28
|
-
|
|
82
|
+
## Related Commands
|
|
29
83
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
4. **Check dashboard** → `/fd-dashboard`
|
|
84
|
+
- `/fd-discuss` — capture decisions before planning
|
|
85
|
+
- `/fd-execute` — run TDD pipeline to implement the plan
|
|
86
|
+
- `/fd-design` — draft UI designs if the feature is UI-heavy (required before execute if `requires_design_first: true`)
|
|
@@ -1,35 +1,149 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
# /fd-quick
|
|
2
|
+
|
|
3
|
+
**Purpose:** Focused autonomous task execution with automatic agent and workflow selection.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
/fd-quick [task description]
|
|
8
|
+
|
|
9
|
+
## What Happens
|
|
10
|
+
|
|
11
|
+
The command explores the codebase first, classifies the task, selects the appropriate workflow, and runs the full stage sequence end-to-end with minimal user input.
|
|
12
|
+
|
|
13
|
+
### Step 0: Autonomous Preflight Exploration
|
|
14
|
+
|
|
15
|
+
Before asking anything, invoke `@code-explorer` to inspect:
|
|
16
|
+
1. Repository structure — `.planning/STATE.md`, `.planning/PROJECT.md`, `AGENTS.md`
|
|
17
|
+
2. Available commands — enumerate `src/commands/*.md` filenames
|
|
18
|
+
3. Available agents — enumerate `src/agents/*.ts` filenames
|
|
19
|
+
4. Available skills — enumerate `src/skills/` directory names
|
|
20
|
+
5. Workflow config — read `flowdeck.json` (governance, models)
|
|
21
|
+
6. Tech stack — read `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`
|
|
22
|
+
7. Implementation patterns — inspect `src/` top-level directories
|
|
23
|
+
8. Prior decisions — check `.planning/phases/*/DISCUSS.md` files
|
|
24
|
+
9. Relevant files — find source files matching keywords in the task description
|
|
25
|
+
|
|
26
|
+
Store exploration snapshot in STATE.md under `quick_run.preflightExploration`.
|
|
27
|
+
|
|
28
|
+
### Question Suppression Rule
|
|
29
|
+
|
|
30
|
+
A question may only be forwarded to `@supervisor` if:
|
|
31
|
+
1. It cannot be answered by the exploration evidence
|
|
32
|
+
2. It has not already been asked in the current session
|
|
33
|
+
3. It is required to safely select the correct workflow
|
|
34
|
+
|
|
35
|
+
### Step 1: Classify the Task
|
|
36
|
+
|
|
37
|
+
Use both text-signal matching and preflight exploration evidence via `classifyTaskWithContext()`.
|
|
38
|
+
|
|
39
|
+
| Task Type | Strong Signal Keywords | Stage Sequence |
|
|
40
|
+
|-----------|------------------------|----------------|
|
|
41
|
+
| **bugfix** | fix, bug, broken, not working, error, crash, regression, debug, exception, failing, root cause | `discuss → fix-bug → verify` |
|
|
42
|
+
| **ui-feature** | landing page, dashboard, admin panel, app screen, wireframe, design system, ux flow | `discuss → design → plan → execute → verify` |
|
|
43
|
+
| **docs** | docs, documentation, readme, api docs, usage guide | `discuss → write-docs → verify` |
|
|
44
|
+
| **simple** | rename, move file, typo, update constant, bump version, one-liner | `execute → verify` |
|
|
45
|
+
| **feature** | (substantive description, 8+ words, no above signals) | `discuss → plan → execute → verify` |
|
|
46
|
+
| **ambiguous** | (short, vague, only after exploration cannot resolve) | *(clarify via supervisor)* |
|
|
47
|
+
|
|
48
|
+
**Bug signals dominate**: if the description contains "fix", "bug", "error", "crash", "exception", "broken", or "regression", classify as `bugfix` even if it also mentions UI elements.
|
|
49
|
+
|
|
50
|
+
### Step 2: Supervisor-Gated Clarification (only when exploration cannot resolve)
|
|
51
|
+
|
|
52
|
+
If classification is `ambiguous` AND exploration evidence did not resolve it:
|
|
53
|
+
1. Invoke `@supervisor` with the partial task description and preflight exploration snapshot
|
|
54
|
+
2. `@supervisor` asks ONE clarifying question
|
|
55
|
+
3. Wait for the answer
|
|
56
|
+
4. Re-classify using combined description + answer
|
|
57
|
+
|
|
58
|
+
### Step 3: Confirm Stage Sequence
|
|
59
|
+
|
|
60
|
+
Present the classification and planned stage sequence before proceeding:
|
|
61
|
+
```
|
|
62
|
+
Task classified as: <task type>
|
|
63
|
+
Stage sequence: <stage-1> → <stage-2> → ... → <stage-N>
|
|
64
|
+
Requires design: <yes / no>
|
|
65
|
+
Requires TDD: <yes / no>
|
|
66
|
+
Evidence used: <N> items from preflight exploration
|
|
67
|
+
|
|
68
|
+
Running /fd-quick autonomously. I will proceed through each stage and pause only
|
|
69
|
+
if I need approval, encounter a blocker, or complete the full sequence.
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Proceed automatically — do not wait for additional input unless approval is explicitly required.
|
|
73
|
+
|
|
74
|
+
### Step 4: Execute Stage Sequence Autonomously
|
|
75
|
+
|
|
76
|
+
For each stage in sequence:
|
|
77
|
+
|
|
78
|
+
1. **Announce stage start**
|
|
79
|
+
2. **Supervisor preflight review** — pass `taskDescription`, `currentPhase`, `prerequisitesMet`, `designApprovalPresent`, `regressionTestPresent`
|
|
80
|
+
3. **Handle supervisor decision:**
|
|
81
|
+
- `approve` — proceed immediately
|
|
82
|
+
- `revise` — resolve listed required changes then re-run stage
|
|
83
|
+
- `block` — stop, report why, update `quick_run.outcome = blocked`
|
|
84
|
+
- `escalate` — pause, present reason to user, request explicit approval
|
|
85
|
+
4. **Execute the stage** using its existing command with full context
|
|
86
|
+
5. **Stage completion check** — invoke `@supervisor` (post-stage) to confirm valid output
|
|
87
|
+
6. **Update STATE.md** with completed stages and supervisor decisions
|
|
88
|
+
7. **Proceed to next stage**
|
|
89
|
+
|
|
90
|
+
**Stage → Command Mapping:**
|
|
91
|
+
|
|
92
|
+
| Stage | Command | Key Behavior |
|
|
93
|
+
|-------|---------|--------------|
|
|
94
|
+
| `discuss` | `/fd-discuss` | Runs `@discusser` structured Q&A. Questions already answered by evidence are skipped. Saves `DISCUSS.md`. |
|
|
95
|
+
| `design` | `/fd-design --mode=draft` | Runs design-first pipeline. Required for `ui-feature` tasks. Produces design artifact + approval. |
|
|
96
|
+
| `plan` | `/fd-plan` | Creates `PLAN.md` from `DISCUSS.md` decisions. **Pauses for user CONFIRM before saving.** |
|
|
97
|
+
| `execute` | `/fd-execute` | TDD pipeline: BEHAVIOR → RED → GREEN → REFACTOR per step. |
|
|
98
|
+
| `fix-bug` | `/fd-fix-bug` | TDD bugfix: explore → RED regression test → GREEN fix → REFACTOR → record in FAILURES.json. |
|
|
99
|
+
| `write-docs` | `/fd-write-docs` | Explore APIs → `@writer` drafts → `@reviewer` accuracy check → finalize. |
|
|
100
|
+
| `verify` | `/fd-verify` | Full verification: tests + code review + security scan + deploy check. Reports verdict. |
|
|
101
|
+
|
|
102
|
+
### Step 5: Completion
|
|
103
|
+
|
|
104
|
+
When all stages complete:
|
|
105
|
+
1. Update STATE.md with `outcome: complete`
|
|
106
|
+
2. Present final summary
|
|
107
|
+
|
|
108
|
+
### Block / Failure Handling
|
|
109
|
+
|
|
110
|
+
If execution cannot continue at any stage:
|
|
111
|
+
1. Update STATE.md: `quick_run.outcome = blocked`
|
|
112
|
+
2. Report blocked stage, reason, what's needed, and how to resume
|
|
113
|
+
|
|
114
|
+
## Workflow Discipline (Non-Negotiable)
|
|
115
|
+
|
|
116
|
+
- **Design-first**: `ui-feature` tasks MUST complete the `design` stage before `execute` can begin
|
|
117
|
+
- **TDD**: `execute` and `fix-bug` stages enforce RED → GREEN → REFACTOR
|
|
118
|
+
- **Plan CONFIRM**: The `plan` stage requires explicit user CONFIRM
|
|
119
|
+
- **Regression test**: `fix-bug` requires a failing regression test before implementation
|
|
120
|
+
- **Verify**: All workflows end with `/fd-verify`
|
|
121
|
+
|
|
122
|
+
## Output / State
|
|
123
|
+
|
|
124
|
+
All routing and execution progress recorded in `.planning/STATE.md` under `quick_run` key.
|
|
27
125
|
|
|
28
126
|
## Examples
|
|
29
127
|
|
|
128
|
+
**Run a feature through full workflow:**
|
|
129
|
+
```
|
|
130
|
+
/fd-quick "Add user profile page with avatar upload"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Fix a bug autonomously:**
|
|
134
|
+
```
|
|
135
|
+
/fd-quick "Fix the login timeout error that happens randomly"
|
|
30
136
|
```
|
|
31
|
-
|
|
32
|
-
|
|
137
|
+
|
|
138
|
+
**Start a documentation task:**
|
|
33
139
|
```
|
|
140
|
+
/fd-quick "Generate API documentation for the payment module"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Related Commands
|
|
34
144
|
|
|
35
|
-
|
|
145
|
+
- `/fd-discuss` — explore a topic manually
|
|
146
|
+
- `/fd-plan` — plan manually
|
|
147
|
+
- `/fd-execute` — execute manually
|
|
148
|
+
- `/fd-status` — inspect current state and progress
|
|
149
|
+
- `/fd-resume` — reload context after a session break
|