@dv.nghiem/flowdeck 0.3.7 → 0.3.9
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 +0 -101
- package/dist/dashboard/server.mjs +789 -868
- package/dist/hooks/command-ref-guard.d.ts +21 -0
- package/dist/hooks/command-ref-guard.d.ts.map +1 -0
- package/dist/hooks/compaction-hook.d.ts +2 -1
- package/dist/hooks/compaction-hook.d.ts.map +1 -1
- package/dist/hooks/session-start.d.ts.map +1 -1
- package/dist/index.js +33 -14
- package/dist/lib/impact-radar.d.ts +2 -2
- package/dist/mcp/index.d.ts +3 -2
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/services/command-validator.d.ts +61 -0
- package/dist/services/command-validator.d.ts.map +1 -0
- package/dist/services/command-validator.test.d.ts +2 -0
- package/dist/services/command-validator.test.d.ts.map +1 -0
- 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 +92 -0
- package/dist/services/question-guard.d.ts.map +1 -0
- package/dist/services/quick-router.d.ts +157 -0
- package/dist/services/quick-router.d.ts.map +1 -0
- package/dist/services/quick-router.test.d.ts +13 -0
- package/dist/services/quick-router.test.d.ts.map +1 -0
- package/docs/commands.md +43 -23
- package/docs/quick-start.md +2 -0
- package/docs/workflows.md +1 -1
- package/package.json +8 -8
- package/src/commands/fd-deploy-check.md +2 -2
- package/src/commands/fd-discuss.md +61 -4
- package/src/commands/fd-map-codebase.md +1 -1
- package/src/commands/fd-multi-repo.md +3 -3
- package/src/commands/fd-plan.md +1 -1
- package/src/commands/fd-quick.md +303 -55
- package/src/rules/common/behavioral.md +63 -0
- package/src/skills/blast-radius-preview/SKILL.md +1 -1
- package/src/skills/change-impact-radar/SKILL.md +2 -2
- package/src/skills/codebase-mapping/SKILL.md +1 -1
- package/src/skills/confidence-aware-planning/SKILL.md +1 -1
- package/src/skills/context-load/SKILL.md +1 -1
- package/src/skills/human-review-routing/SKILL.md +3 -3
- package/src/skills/intent-translator/SKILL.md +2 -2
- package/src/skills/multi-repo/SKILL.md +1 -1
- package/src/skills/regression-prediction/SKILL.md +1 -1
- package/src/skills/repo-memory-graph/SKILL.md +1 -1
- package/src/skills/test-gap-detector/SKILL.md +1 -1
- package/src/skills/volatility-map/SKILL.md +1 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quick Router Service
|
|
3
|
+
*
|
|
4
|
+
* Provides task classification and stage-sequence routing for the /fd-quick
|
|
5
|
+
* autonomous workflow launcher.
|
|
6
|
+
*
|
|
7
|
+
* This module is the single source of truth for:
|
|
8
|
+
* - Classifying user task descriptions into task types
|
|
9
|
+
* - Mapping task types to the correct existing stage sequence
|
|
10
|
+
* - Computing the next stage given what has already completed
|
|
11
|
+
* - Determining whether supervisor clarification is required before proceeding
|
|
12
|
+
*
|
|
13
|
+
* It does NOT create new workflows. It routes to the existing commands:
|
|
14
|
+
* fd-discuss, fd-design, fd-plan, fd-execute, fd-fix-bug, fd-write-docs, fd-verify
|
|
15
|
+
*
|
|
16
|
+
* Autonomy contract:
|
|
17
|
+
* - classifyTaskWithContext() must be preferred over classifyTask() when a
|
|
18
|
+
* preflight ExplorationResult is available.
|
|
19
|
+
* - classificationNeeded is set to false whenever exploration evidence
|
|
20
|
+
* supplies the missing context, eliminating the human question entirely.
|
|
21
|
+
*/
|
|
22
|
+
import type { ExplorationResult } from "./preflight-explorer";
|
|
23
|
+
export type TaskType = "feature" | "ui-feature" | "bugfix" | "docs" | "simple" | "ambiguous";
|
|
24
|
+
/** A single stage in a workflow sequence, mapping to an existing fd-* command. */
|
|
25
|
+
export interface WorkflowStage {
|
|
26
|
+
/** Human-readable stage name */
|
|
27
|
+
name: string;
|
|
28
|
+
/** The registered fd-* command that implements this stage */
|
|
29
|
+
command: string;
|
|
30
|
+
/** Arguments to pass to the command (if any) */
|
|
31
|
+
args?: string;
|
|
32
|
+
/** Whether this stage requires human approval before proceeding */
|
|
33
|
+
requiresApproval: boolean;
|
|
34
|
+
/** Whether this stage can be skipped if prerequisites are absent and --override is set */
|
|
35
|
+
skippable: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface ClassificationResult {
|
|
38
|
+
taskType: TaskType;
|
|
39
|
+
/** 0.0–1.0 confidence in the classification */
|
|
40
|
+
confidence: number;
|
|
41
|
+
/** Which signal patterns triggered the classification */
|
|
42
|
+
signals: string[];
|
|
43
|
+
/** True when the task is explicitly UI/UX-heavy, requiring design-first */
|
|
44
|
+
requiresDesign: boolean;
|
|
45
|
+
/** True when TDD enforcement applies (always true except for docs-only) */
|
|
46
|
+
requiresTDD: boolean;
|
|
47
|
+
/** Ordered sequence of stages to execute */
|
|
48
|
+
stageSequence: WorkflowStage[];
|
|
49
|
+
/** True when the description is too vague to classify without asking a question */
|
|
50
|
+
clarificationNeeded: boolean;
|
|
51
|
+
/** The single clarifying question to ask via supervisor (when clarificationNeeded=true) */
|
|
52
|
+
clarificationPrompt?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Classify a free-text task description into a TaskType with a confidence score.
|
|
56
|
+
*
|
|
57
|
+
* Signal matching is case-insensitive substring search. Multiple signal hits
|
|
58
|
+
* increase confidence. The highest-confidence match wins; ties break toward
|
|
59
|
+
* the more structured workflow type (feature > simple > ambiguous).
|
|
60
|
+
*/
|
|
61
|
+
export declare function classifyTask(description: string): ClassificationResult;
|
|
62
|
+
/**
|
|
63
|
+
* Build the ordered WorkflowStage array for a given TaskType.
|
|
64
|
+
* Each stage maps 1:1 to an existing registered fd-* command.
|
|
65
|
+
*/
|
|
66
|
+
export declare function buildStageSequence(taskType: TaskType): WorkflowStage[];
|
|
67
|
+
export interface StageProgress {
|
|
68
|
+
completedStageNames: string[];
|
|
69
|
+
blockedAtStage?: string;
|
|
70
|
+
blockedReason?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface NextStageResult {
|
|
73
|
+
/** The stage to execute next, or null if all stages are complete */
|
|
74
|
+
stage: WorkflowStage | null;
|
|
75
|
+
/** True when all stages have been completed */
|
|
76
|
+
allComplete: boolean;
|
|
77
|
+
/** True when execution is blocked at a stage */
|
|
78
|
+
blocked: boolean;
|
|
79
|
+
blockedReason?: string;
|
|
80
|
+
/** Remaining stage names (not counting the returned stage) */
|
|
81
|
+
remaining: string[];
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Given a stage sequence and the current progress, determine the next
|
|
85
|
+
* stage to execute.
|
|
86
|
+
*
|
|
87
|
+
* Returns null stage when all stages are complete.
|
|
88
|
+
*/
|
|
89
|
+
export declare function getNextStage(sequence: WorkflowStage[], progress: StageProgress): NextStageResult;
|
|
90
|
+
/** The structure written to STATE.md under the `quick_run` key by /fd-quick. */
|
|
91
|
+
export interface QuickRunState {
|
|
92
|
+
/** Original task description from $ARGUMENTS */
|
|
93
|
+
taskDescription: string;
|
|
94
|
+
/** Classification result */
|
|
95
|
+
taskType: TaskType;
|
|
96
|
+
confidence: number;
|
|
97
|
+
requiresDesign: boolean;
|
|
98
|
+
requiresTDD: boolean;
|
|
99
|
+
/** Ordered stage names for this run */
|
|
100
|
+
stageSequence: string[];
|
|
101
|
+
/** Stages that have been completed */
|
|
102
|
+
completedStages: string[];
|
|
103
|
+
/** Current stage being executed, if any */
|
|
104
|
+
currentStage: string | null;
|
|
105
|
+
/** Whether the run has been halted */
|
|
106
|
+
blocked: boolean;
|
|
107
|
+
blockedReason?: string;
|
|
108
|
+
/** Supervisor decisions keyed by stage name */
|
|
109
|
+
supervisorDecisions: Record<string, {
|
|
110
|
+
decision: string;
|
|
111
|
+
reasons: string[];
|
|
112
|
+
timestamp: string;
|
|
113
|
+
}>;
|
|
114
|
+
/** ISO timestamp when the run started */
|
|
115
|
+
startedAt: string;
|
|
116
|
+
/** ISO timestamp of last update */
|
|
117
|
+
updatedAt: string;
|
|
118
|
+
/** Final run outcome */
|
|
119
|
+
outcome: "running" | "complete" | "blocked" | "failed";
|
|
120
|
+
/**
|
|
121
|
+
* Preflight exploration snapshot — persisted so later stages can
|
|
122
|
+
* reuse it without re-running exploration or re-asking the user.
|
|
123
|
+
*/
|
|
124
|
+
preflightExploration?: {
|
|
125
|
+
exploredAt: string;
|
|
126
|
+
techStack: string[];
|
|
127
|
+
availableCommands: string[];
|
|
128
|
+
availableSkills: string[];
|
|
129
|
+
implementationPatterns: string[];
|
|
130
|
+
evidenceCount: number;
|
|
131
|
+
/** Whether clarification was resolved via evidence (no human asked) */
|
|
132
|
+
clarificationResolvedByEvidence: boolean;
|
|
133
|
+
/** The resolved reason when evidence answered the question */
|
|
134
|
+
clarificationResolvedReason?: string;
|
|
135
|
+
};
|
|
136
|
+
/** Questions that were suppressed by the guard (not sent to human) */
|
|
137
|
+
suppressedQuestions: string[];
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Create a fresh QuickRunState record for a new /fd-quick run.
|
|
141
|
+
*/
|
|
142
|
+
export declare function createQuickRunState(taskDescription: string, classification: ClassificationResult, exploration?: ExplorationResult): QuickRunState;
|
|
143
|
+
/**
|
|
144
|
+
* Classify a task description, using repo exploration evidence to resolve
|
|
145
|
+
* ambiguity before falling back to supervisor clarification.
|
|
146
|
+
*
|
|
147
|
+
* Prefer this over `classifyTask` whenever a preflight ExplorationResult is
|
|
148
|
+
* available. It eliminates unnecessary human questions when the repo already
|
|
149
|
+
* contains the answer.
|
|
150
|
+
*
|
|
151
|
+
* @param description - Free-text task from the user
|
|
152
|
+
* @param exploration - ExplorationResult from exploreRepo()
|
|
153
|
+
* @param sessionHistory - Questions already asked in this session (for
|
|
154
|
+
* deduplication via the question guard)
|
|
155
|
+
*/
|
|
156
|
+
export declare function classifyTaskWithContext(description: string, exploration: ExplorationResult, sessionHistory?: string[]): ClassificationResult;
|
|
157
|
+
//# sourceMappingURL=quick-router.d.ts.map
|
|
@@ -0,0 +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G,QAAQ,CAAA;IACtD;;;OAGG;IACH,oBAAoB,CAAC,EAAE;QACrB,UAAU,EAAE,MAAM,CAAA;QAClB,SAAS,EAAE,MAAM,EAAE,CAAA;QACnB,iBAAiB,EAAE,MAAM,EAAE,CAAA;QAC3B,eAAe,EAAE,MAAM,EAAE,CAAA;QACzB,sBAAsB,EAAE,MAAM,EAAE,CAAA;QAChC,aAAa,EAAE,MAAM,CAAA;QACrB,uEAAuE;QACvE,+BAA+B,EAAE,OAAO,CAAA;QACxC,8DAA8D;QAC9D,2BAA2B,CAAC,EAAE,MAAM,CAAA;KACrC,CAAA;IACD,sEAAsE;IACtE,mBAAmB,EAAE,MAAM,EAAE,CAAA;CAC9B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,eAAe,EAAE,MAAM,EACvB,cAAc,EAAE,oBAAoB,EACpC,WAAW,CAAC,EAAE,iBAAiB,GAC9B,aAAa,CAiCf;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,iBAAiB,EAC9B,cAAc,GAAE,MAAM,EAAO,GAC5B,oBAAoB,CAuCtB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quick Router Tests
|
|
3
|
+
*
|
|
4
|
+
* Covers:
|
|
5
|
+
* - classifyTask: correctly classifies feature, bugfix, ui-feature, docs, simple, ambiguous
|
|
6
|
+
* - buildStageSequence: returns correct ordered stages for each task type
|
|
7
|
+
* - getNextStage: returns correct next stage and handles completed / blocked states
|
|
8
|
+
* - createQuickRunState: initialises state correctly
|
|
9
|
+
* - /fd-quick routing contracts (supervisor integration points are tested as
|
|
10
|
+
* integration-level expectations on the returned stage sequences)
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=quick-router.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quick-router.test.d.ts","sourceRoot":"","sources":["../../src/services/quick-router.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
package/docs/commands.md
CHANGED
|
@@ -24,7 +24,7 @@ Commands are slash commands registered in OpenCode. Run them by typing `/command
|
|
|
24
24
|
| `/fd-multi-repo` | `[list \| add <path> [name] \| remove <name> \| status]` | Multi-repo orchestration |
|
|
25
25
|
| `/fd-translate-intent` | `[vague intent]` | Convert vague request into ranked implementation options |
|
|
26
26
|
| `/fd-ask` | `[question]` | Route question to specialist agent (architect, security, etc.) |
|
|
27
|
-
| `/fd-quick` | `[task description]` |
|
|
27
|
+
| `/fd-quick` | `[task description]` | Autonomous workflow launcher — classifies task, selects correct workflow, runs all stages end-to-end |
|
|
28
28
|
| `/fd-doctor` | — | Check FlowDeck installation and environment health |
|
|
29
29
|
|
|
30
30
|
---
|
|
@@ -483,34 +483,54 @@ Comprehensive pre-change analysis: impact radar, blast radius, regression predic
|
|
|
483
483
|
|
|
484
484
|
## /fd-quick
|
|
485
485
|
|
|
486
|
-
**Description:**
|
|
486
|
+
**Description:** Autonomous workflow launcher. Classifies the task, selects the correct existing FlowDeck workflow, and runs all stages end-to-end with minimal user input. Routes all clarifying questions through `@supervisor`.
|
|
487
487
|
|
|
488
488
|
**Arguments:**
|
|
489
|
-
- `[task description]` — what you need done
|
|
490
|
-
|
|
491
|
-
**
|
|
492
|
-
|
|
493
|
-
|
|
|
494
|
-
|
|
495
|
-
|
|
|
496
|
-
|
|
|
497
|
-
|
|
|
498
|
-
|
|
|
499
|
-
|
|
|
500
|
-
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
489
|
+
- `[task description]` — what you need done (any phrasing — the command classifies it)
|
|
490
|
+
|
|
491
|
+
**Task Classification:**
|
|
492
|
+
|
|
493
|
+
| Classification | Trigger Signals | Stage Sequence |
|
|
494
|
+
|----------------|-----------------|----------------|
|
|
495
|
+
| `feature` | Substantive description, no specific signals | `discuss → plan → execute → verify` |
|
|
496
|
+
| `ui-feature` | landing page, dashboard, admin panel, app screen, ux flow | `discuss → design → plan → execute → verify` |
|
|
497
|
+
| `bugfix` | fix, bug, error, crash, regression, broken, exception | `discuss → fix-bug → verify` |
|
|
498
|
+
| `docs` | docs, documentation, readme, api docs, write docs | `discuss → write-docs → verify` |
|
|
499
|
+
| `simple` | rename, typo, minor, move file | `execute → verify` |
|
|
500
|
+
| `ambiguous` | vague or too short | *supervisor asks one clarifying question* |
|
|
501
|
+
|
|
502
|
+
**What it does:**
|
|
503
|
+
1. Classifies the task from `$ARGUMENTS` using signal patterns
|
|
504
|
+
2. Routes ambiguous tasks through `@supervisor` for a single focused clarifying question
|
|
505
|
+
3. Presents the selected stage sequence to the user
|
|
506
|
+
4. Executes each stage in order using the existing registered commands (`/fd-discuss`, `/fd-plan`, etc.)
|
|
507
|
+
5. Gates each stage through `@supervisor` preflight review (approve / revise / block / escalate)
|
|
508
|
+
6. Respects all workflow discipline: TDD gates, design-first gate for UI tasks, plan CONFIRM gate
|
|
509
|
+
7. Pauses only when a supervisor gate requires user approval, or when blocked
|
|
510
|
+
8. Records all routing decisions, stage transitions, and supervisor decisions in STATE.md
|
|
511
|
+
9. On block: explains exactly what stopped execution and what is needed to resume
|
|
512
|
+
|
|
513
|
+
**What it preserves:**
|
|
514
|
+
- All existing commands (`/fd-discuss`, `/fd-plan`, `/fd-execute`, etc.) remain independently usable
|
|
515
|
+
- TDD enforcement is never bypassed
|
|
516
|
+
- Design-first gate for UI-heavy tasks is enforced
|
|
517
|
+
- Plan CONFIRM gate is always presented to the user
|
|
518
|
+
- Verify pipeline always runs at end
|
|
508
519
|
|
|
509
520
|
**Example:**
|
|
510
521
|
```
|
|
511
|
-
/fd-quick
|
|
512
|
-
/fd-quick
|
|
522
|
+
/fd-quick add two-factor authentication to the login system
|
|
523
|
+
/fd-quick fix the checkout crash when cart is empty
|
|
524
|
+
/fd-quick build a new analytics dashboard for admin users
|
|
525
|
+
/fd-quick write API documentation for the user service
|
|
526
|
+
/fd-quick rename MAX_RETRIES constant to RETRY_LIMIT
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
**Resume after a block:**
|
|
530
|
+
```
|
|
531
|
+
/fd-quick <original task description>
|
|
513
532
|
```
|
|
533
|
+
`/fd-quick` resumes from the last completed stage automatically.
|
|
514
534
|
|
|
515
535
|
---
|
|
516
536
|
|
package/docs/quick-start.md
CHANGED
|
@@ -190,6 +190,8 @@ This writes the current execution state to `.planning/STATE.md`. To reload conte
|
|
|
190
190
|
|
|
191
191
|
> **Skip to execute for small tasks** — for a quick bug fix, you do not need to run `/fd-discuss` and `/fd-plan`. Use `/fd-fix-bug` directly and let `@debug-specialist` handle the full cycle.
|
|
192
192
|
|
|
193
|
+
> **Let `/fd-quick` drive the whole workflow** — instead of manually calling each command in sequence, run `/fd-quick <your task>` and the system classifies the task, selects the correct workflow (feature, bug fix, UI-heavy, docs), and runs all stages autonomously. It pauses only when your explicit input is needed (e.g., plan CONFIRM, approval gates). Existing commands remain fully usable standalone.
|
|
194
|
+
|
|
193
195
|
---
|
|
194
196
|
|
|
195
197
|
← [Back to Index](index.md)
|
package/docs/workflows.md
CHANGED
|
@@ -56,7 +56,7 @@ Each step gates the next. `/fd-discuss` requires a defined feature. `/fd-plan` r
|
|
|
56
56
|
| `/fd-multi-repo` | Multi-repo orchestration | @multi-repo-coordinator, @architect |
|
|
57
57
|
| `/fd-translate-intent` | Convert vague requests to ranked implementation options | @architect, @researcher |
|
|
58
58
|
| `/fd-suggest` | Suggest high-value feature opportunities from codebase signals | @researcher, @architect |
|
|
59
|
-
| `/fd-quick` |
|
|
59
|
+
| `/fd-quick` | Autonomous workflow launcher — classifies task, runs correct stage sequence end-to-end | @supervisor, @orchestrator, and all workflow agents |
|
|
60
60
|
| `/fd-reflect` | Post-session reflection and skill capture | @auto-learner |
|
|
61
61
|
| `/fd-doctor` | Installation and environment diagnostics | @orchestrator |
|
|
62
62
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dv.nghiem/flowdeck",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "FlowDeck — structured planning and execution workflows for OpenCode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -45,16 +45,16 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://github.com/DVNghiem/FlowDeck#readme",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@opencode-ai/plugin": "^1.
|
|
48
|
+
"@opencode-ai/plugin": "^1.14.49"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@types/node": "^
|
|
52
|
-
"bun-types": "^1.3.
|
|
53
|
-
"ejs": "^
|
|
54
|
-
"typescript": "^
|
|
55
|
-
"vitest": "^
|
|
51
|
+
"@types/node": "^25.7.0",
|
|
52
|
+
"bun-types": "^1.3.14",
|
|
53
|
+
"ejs": "^5.0.2",
|
|
54
|
+
"typescript": "^6.0.3",
|
|
55
|
+
"vitest": "^4.1.6"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@opencode-ai/sdk": "^1.
|
|
58
|
+
"@opencode-ai/sdk": "^1.14.49"
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -89,7 +89,7 @@ Required fixes before deploy:
|
|
|
89
89
|
- [ ] [fix 1]
|
|
90
90
|
- [ ] [fix 2]
|
|
91
91
|
|
|
92
|
-
Run /deploy-check again after fixing.
|
|
92
|
+
Run /fd-deploy-check again after fixing.
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
## No-go conditions (automatic)
|
|
@@ -102,7 +102,7 @@ Any of these → automatic NO-GO:
|
|
|
102
102
|
|
|
103
103
|
### Step 4: Code Review Scope (--check=review)
|
|
104
104
|
|
|
105
|
-
If `/deploy-check --check=review [scope]` provided: review files matching scope.
|
|
105
|
+
If `/fd-deploy-check --check=review [scope]` provided: review files matching scope.
|
|
106
106
|
If no scope: review all files changed since last commit.
|
|
107
107
|
|
|
108
108
|
```bash
|
|
@@ -17,10 +17,44 @@ Run a structured requirements discussion session and capture decisions.
|
|
|
17
17
|
|
|
18
18
|
## Process
|
|
19
19
|
|
|
20
|
+
### Step 0: Autonomous Codebase Exploration
|
|
21
|
+
|
|
22
|
+
**Before asking the user any question**, explore the repository to gather evidence.
|
|
23
|
+
|
|
24
|
+
Invoke `@code-explorer` to inspect:
|
|
25
|
+
|
|
26
|
+
1. **Project files** — `.planning/PROJECT.md` (goals, tech stack, constraints)
|
|
27
|
+
2. **Session state** — `.planning/STATE.md` (current phase, prior decisions)
|
|
28
|
+
3. **Prior discussions** — `.planning/phases/*/DISCUSS.md` (already-captured decisions)
|
|
29
|
+
4. **Tech stack** — `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`
|
|
30
|
+
5. **Implementation patterns** — `src/` directory structure (services, components, api, etc.)
|
|
31
|
+
6. **AGENTS.md / rules** — any project-level constraints or conventions
|
|
32
|
+
7. **Relevant source files** — files matching keywords in `$ARGUMENTS`
|
|
33
|
+
|
|
34
|
+
Store exploration findings in the discussion context. These will be used to:
|
|
35
|
+
- Skip questions whose answers are already known from the codebase
|
|
36
|
+
- Inform the `@discusser` agent with concrete evidence
|
|
37
|
+
- Prevent worker agents from emitting questions to the user
|
|
38
|
+
|
|
39
|
+
### Question suppression rule
|
|
40
|
+
|
|
41
|
+
After exploration, apply the question guard before each `@discusser` question:
|
|
42
|
+
|
|
43
|
+
> A `@discusser` question is skipped if:
|
|
44
|
+
> 1. The answer already exists in `PROJECT.md`, `STATE.md`, or prior `DISCUSS.md` files
|
|
45
|
+
> 2. The answer is determinable from the tech stack / implementation patterns
|
|
46
|
+
> 3. The question was already answered in a prior session for this phase
|
|
47
|
+
|
|
48
|
+
If a question is suppressed, record it in the DISCUSS.md `## Suppressed Questions` section
|
|
49
|
+
with the evidence that answered it.
|
|
50
|
+
|
|
20
51
|
### Step 1: Load Context
|
|
21
52
|
|
|
22
53
|
Read `.planning/PROJECT.md` to understand the project vision and goals.
|
|
23
54
|
Read `.planning/STATE.md` to determine the current phase and context.
|
|
55
|
+
Read any prior `.planning/phases/phase-<N>/DISCUSS.md` for existing decisions.
|
|
56
|
+
|
|
57
|
+
Use exploration findings (from Step 0) to populate the discusser's starting context.
|
|
24
58
|
|
|
25
59
|
### Step 2: Determine Phase
|
|
26
60
|
|
|
@@ -32,11 +66,18 @@ Decisions will be saved to `.planning/phases/phase-{N}/DISCUSS.md`.
|
|
|
32
66
|
Spawn @discusser agent with:
|
|
33
67
|
- Project context (from PROJECT.md)
|
|
34
68
|
- Current phase number
|
|
69
|
+
- **Preflight exploration findings** (tech stack, patterns, existing decisions)
|
|
35
70
|
- Instructions to ask ONE question per turn
|
|
71
|
+
- Instructions to skip questions already answered by exploration evidence
|
|
36
72
|
|
|
37
73
|
### Step 4: Q&A Loop
|
|
38
74
|
|
|
39
75
|
The @discusser agent asks one question at a time.
|
|
76
|
+
Before each question, the question guard is checked:
|
|
77
|
+
- If the question can be answered from exploration evidence → skip it, record as suppressed
|
|
78
|
+
- If the question was already asked in a prior session for this phase → skip it
|
|
79
|
+
- Otherwise → ask the user
|
|
80
|
+
|
|
40
81
|
After each user response:
|
|
41
82
|
- Assign D-XX number to any new decision
|
|
42
83
|
- Record: topic, choice, rationale
|
|
@@ -44,7 +85,7 @@ After each user response:
|
|
|
44
85
|
|
|
45
86
|
Continue until all required topics are covered or user says to stop early.
|
|
46
87
|
|
|
47
|
-
Structure the discussion:
|
|
88
|
+
Structure the discussion (skip topics already answered by exploration):
|
|
48
89
|
|
|
49
90
|
1. **Scope** — What exactly needs to be built/changed? What is out of scope?
|
|
50
91
|
2. **Constraints** — Technical constraints, deadlines, dependencies?
|
|
@@ -53,6 +94,7 @@ Structure the discussion:
|
|
|
53
94
|
5. **UI classification** — Is this task user-facing and UI-heavy (website/app/dashboard/admin/landing/onboarding)?
|
|
54
95
|
|
|
55
96
|
Ask questions one at a time. Wait for answers before proceeding.
|
|
97
|
+
Do not ask about things the codebase already reveals.
|
|
56
98
|
|
|
57
99
|
## Decision Recording
|
|
58
100
|
|
|
@@ -65,12 +107,24 @@ After the discussion, write `.planning/phases/phase-<N>/DISCUSS.md`:
|
|
|
65
107
|
**Date:** <timestamp>
|
|
66
108
|
**Topic:** <topic>
|
|
67
109
|
|
|
110
|
+
## Preflight Evidence Used
|
|
111
|
+
|
|
112
|
+
- Tech stack: <detected stack>
|
|
113
|
+
- Prior decisions loaded: <yes/no>
|
|
114
|
+
- Questions suppressed by evidence: <N>
|
|
115
|
+
|
|
68
116
|
## Decisions
|
|
69
117
|
|
|
70
118
|
D-01: [Topic] — [Decision] ([Rationale])
|
|
71
119
|
D-02: [Topic] — [Decision] ([Rationale])
|
|
72
120
|
...
|
|
73
121
|
|
|
122
|
+
## Suppressed Questions
|
|
123
|
+
|
|
124
|
+
(Questions that were answered by repo evidence and not asked of the user)
|
|
125
|
+
- "<question>" → answered by: <evidence source>
|
|
126
|
+
...
|
|
127
|
+
|
|
74
128
|
## Open Questions
|
|
75
129
|
|
|
76
130
|
- <any unresolved items>
|
|
@@ -83,19 +137,22 @@ D-02: [Topic] — [Decision] ([Rationale])
|
|
|
83
137
|
## D-05 Compliance
|
|
84
138
|
|
|
85
139
|
- Loads PROJECT.md + current phase STATE.md
|
|
86
|
-
-
|
|
140
|
+
- **Performs codebase exploration before any question is asked (Step 0)**
|
|
141
|
+
- Invokes @discusser agent with full exploration context
|
|
87
142
|
- Saves decisions with D-XX numbering to DISCUSS.md
|
|
88
143
|
- One question at a time (no compound questions)
|
|
144
|
+
- Questions suppressed when answered by evidence
|
|
89
145
|
|
|
90
146
|
## Completion
|
|
91
147
|
|
|
92
|
-
Report: decisions captured, file path, and suggest running `/fd-plan`.
|
|
148
|
+
Report: decisions captured, questions suppressed, file path, and suggest running `/fd-plan`.
|
|
93
149
|
If UI-heavy, also suggest running `/fd-design --mode=draft` before `/fd-execute`.
|
|
94
150
|
|
|
95
151
|
## Error Handling
|
|
96
152
|
|
|
97
153
|
D-03: Fail fast with clear error
|
|
98
|
-
- If PROJECT.md not found: error with "Run /new-project first"
|
|
154
|
+
- If PROJECT.md not found: error with "Run /fd-new-project first"
|
|
99
155
|
- If STATE.md not found: error with "Project not initialized"
|
|
100
156
|
- If @discusser fails: error with "Discusser agent unavailable"
|
|
157
|
+
- If @code-explorer fails during preflight: proceed with reduced evidence (log warning)
|
|
101
158
|
- No partial state saved on error
|
|
@@ -19,7 +19,7 @@ Check if `.codebase/` directory already exists. If present, warn and require con
|
|
|
19
19
|
|
|
20
20
|
If `.codebase/` directory already exists:
|
|
21
21
|
```
|
|
22
|
-
Warning: .codebase/ already exists. Running /map-codebase will overwrite existing docs.
|
|
22
|
+
Warning: .codebase/ already exists. Running /fd-map-codebase will overwrite existing docs.
|
|
23
23
|
Continue? (y/n)
|
|
24
24
|
```
|
|
25
25
|
If user declines, abort. If user confirms, proceed.
|
|
@@ -16,16 +16,16 @@ Orchestrates a feature or fix that spans multiple repositories in a microservice
|
|
|
16
16
|
- A shared library is being upgraded with a breaking change
|
|
17
17
|
- You need a coordinated rollout across services
|
|
18
18
|
|
|
19
|
-
Do not use for single-repo work. Use `/new-feature` instead.
|
|
19
|
+
Do not use for single-repo work. Use `/fd-new-feature` instead.
|
|
20
20
|
|
|
21
21
|
## Prerequisites
|
|
22
22
|
|
|
23
23
|
Before running this flow:
|
|
24
24
|
1. `.planning/config.json` has a `sub_repos` array with the relevant repos registered
|
|
25
25
|
2. All `path` values in the registry resolve to actual directories on disk
|
|
26
|
-
3. A description of the intended change is available (from `/discuss` or passed directly)
|
|
26
|
+
3. A description of the intended change is available (from `/fd-discuss` or passed directly)
|
|
27
27
|
|
|
28
|
-
If the registry is empty or not set up, run `/multi-repo --add` first.
|
|
28
|
+
If the registry is empty or not set up, run `/fd-multi-repo --add` first.
|
|
29
29
|
|
|
30
30
|
## Behavior
|
|
31
31
|
|
package/src/commands/fd-plan.md
CHANGED
|
@@ -17,7 +17,7 @@ D-06: Verify DISCUSS.md exists and is confirmed.
|
|
|
17
17
|
|
|
18
18
|
If no DISCUSS.md found:
|
|
19
19
|
```
|
|
20
|
-
Error: DISCUSS.md not found. Run /discuss [topic] first.
|
|
20
|
+
Error: DISCUSS.md not found. Run /fd-discuss [topic] first.
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
If DISCUSS.md exists but not confirmed:
|