@dv.nghiem/flowdeck 0.3.9 → 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 -21
- 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 +1 -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/hooks/session-start.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +742 -794
- 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 +12 -2
- 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/question-guard.d.ts +4 -0
- package/dist/services/question-guard.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-discuss.md +74 -10
- 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 +99 -19
- package/src/commands/fd-new-feature.md +14 -5
- package/src/commands/fd-plan.md +38 -1
- package/src/commands/fd-quick.md +1 -1
- 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/skills/context-load/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,27 +1,91 @@
|
|
|
1
|
-
|
|
2
|
-
description: Map the codebase structure into .codebase/ files for AI context
|
|
3
|
-
argument-hint: "[--full] [--update]"
|
|
4
|
-
---
|
|
1
|
+
# /fd-map-codebase
|
|
5
2
|
|
|
6
|
-
Analyze and
|
|
3
|
+
**Purpose:** Analyze and index the codebase into structured `.codebase/` documentation files.
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
1. Scans the project structure (entry points, modules, dependencies)
|
|
10
|
-
2. Identifies key files, patterns, and conventions
|
|
11
|
-
3. Writes structured summaries to `.codebase/`:
|
|
12
|
-
- `ARCHITECTURE.md` — high-level system design
|
|
13
|
-
- `CONVENTIONS.md` — naming, style, and patterns used in this project
|
|
14
|
-
- `DEPENDENCIES.md` — external packages and what they're used for
|
|
15
|
-
- `INDEX.md` — file-by-file inventory
|
|
5
|
+
## Usage
|
|
16
6
|
|
|
17
|
-
|
|
18
|
-
- `--full` — Deep scan (reads every file, slower but thorough)
|
|
19
|
-
- `--update` — Refresh existing `.codebase/` files with recent changes
|
|
7
|
+
/fd-map-codebase [--incremental] [--force]
|
|
20
8
|
|
|
21
|
-
|
|
9
|
+
## Arguments
|
|
22
10
|
|
|
23
|
-
|
|
11
|
+
- `--incremental` — only update files where the underlying source has changed since the last mapping
|
|
12
|
+
- `--force` — skip the existing-index confirmation prompt and rebuild from scratch
|
|
24
13
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
## What Happens
|
|
15
|
+
|
|
16
|
+
### Pre-flight
|
|
17
|
+
|
|
18
|
+
1. Check codegraph installation using `codegraph action=check`.
|
|
19
|
+
2. Log the result: installed and indexed, installed but not indexed, or not installed.
|
|
20
|
+
3. Auto-install codegraph if missing (`codegraph action=install`).
|
|
21
|
+
4. Initialize or refresh the codegraph index (`codegraph action=init` or `codegraph action=refresh`).
|
|
22
|
+
|
|
23
|
+
### Process
|
|
24
|
+
|
|
25
|
+
1. Check if `.codebase/` documentation directory already exists. If it does and `--force` is not set, prompt for confirmation before overwriting.
|
|
26
|
+
2. Initialize 6 isolated worktrees for parallel mapper agents:
|
|
27
|
+
- `flowdeck-mapper-stack`
|
|
28
|
+
- `flowdeck-mapper-arch`
|
|
29
|
+
- `flowdeck-mapper-structure`
|
|
30
|
+
- `flowdeck-mapper-conventions`
|
|
31
|
+
- `flowdeck-mapper-testing`
|
|
32
|
+
- `flowdeck-mapper-concerns`
|
|
33
|
+
3. Spawn 6 `@mapper` agents in parallel, each producing one documentation file:
|
|
34
|
+
- `@mapper` → `.codebase/STACK.md` — tech stack, dependencies, versions
|
|
35
|
+
- `@mapper` → `.codebase/ARCHITECTURE.md` — system design, components, data flow
|
|
36
|
+
- `@mapper` → `.codebase/STRUCTURE.md` — file organization, directory layout
|
|
37
|
+
- `@mapper` → `.codebase/CONVENTIONS.md` — coding standards, naming, patterns
|
|
38
|
+
- `@mapper` → `.codebase/TESTING.md` — test strategy, coverage, frameworks
|
|
39
|
+
- `@mapper` → `.codebase/CONCERNS.md` — known issues, technical debt, risks
|
|
40
|
+
|
|
41
|
+
Each mapper uses codegraph MCP tools for symbol-level analysis, falling back to direct file reads when codegraph does not cover a specific detail.
|
|
42
|
+
|
|
43
|
+
### Cleanup
|
|
44
|
+
|
|
45
|
+
Remove all worktrees regardless of outcome after agents complete.
|
|
46
|
+
|
|
47
|
+
### Verify
|
|
48
|
+
|
|
49
|
+
Check that all 6 doc files exist and contain non-empty content.
|
|
50
|
+
|
|
51
|
+
### Finalize
|
|
52
|
+
|
|
53
|
+
1. Write timestamp to `.codebase/last_mapped`.
|
|
54
|
+
2. Update codegraph state with `codegraph action=status`.
|
|
55
|
+
|
|
56
|
+
## Output / State
|
|
57
|
+
|
|
58
|
+
Files created in `.codebase/`:
|
|
59
|
+
- `STACK.md` — technology stack and dependencies
|
|
60
|
+
- `ARCHITECTURE.md` — system architecture and component relationships
|
|
61
|
+
- `STRUCTURE.md` — directory layout and file organization
|
|
62
|
+
- `CONVENTIONS.md` — coding standards and patterns
|
|
63
|
+
- `TESTING.md` — test coverage and frameworks
|
|
64
|
+
- `CONCERNS.md` — technical debt and known risks
|
|
65
|
+
- `last_mapped` — timestamp file
|
|
66
|
+
- `CODEGRAPH.md` — codegraph index status
|
|
67
|
+
|
|
68
|
+
Report includes: codegraph install/index status, files created per mapper, key findings per category.
|
|
69
|
+
|
|
70
|
+
## Examples
|
|
71
|
+
|
|
72
|
+
**Full codebase mapping:**
|
|
73
|
+
```
|
|
74
|
+
/fd-map-codebase
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Incremental update (only changed files):**
|
|
78
|
+
```
|
|
79
|
+
/fd-map-codebase --incremental
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Force rebuild (skip confirmation):**
|
|
83
|
+
```
|
|
84
|
+
/fd-map-codebase --force
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Related Commands
|
|
88
|
+
|
|
89
|
+
- `/fd-doctor` — check environment health including codegraph status
|
|
90
|
+
- `/fd-discuss` — uses codegraph for code intelligence during discussions
|
|
91
|
+
- `/fd-plan` — uses codegraph for impact analysis during planning
|
|
@@ -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`)
|