@dv.nghiem/flowdeck 0.3.7 → 0.3.8

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.
@@ -0,0 +1,21 @@
1
+ /**
2
+ * HOOK: Command Reference Guard
3
+ * Post-response hook that scans agent output for /fd-* slash command references
4
+ * and warns when an invalid (unregistered) command is found.
5
+ *
6
+ * This is a lightweight advisory guardrail — it emits a warning comment
7
+ * at the top of the response rather than blocking it, preserving usability
8
+ * while surfacing drift for developers to fix.
9
+ */
10
+ /**
11
+ * Scan an agent response string and return a warning prefix if any invalid
12
+ * command references are detected. Returns null if response is clean.
13
+ */
14
+ export declare function buildCommandRefWarning(response: string): string | null;
15
+ /**
16
+ * Apply the command reference guardrail to an agent response.
17
+ * If invalid command references are found, prepend a warning block.
18
+ * If clean, return the response unchanged.
19
+ */
20
+ export declare function applyCommandRefGuard(response: string): string;
21
+ //# sourceMappingURL=command-ref-guard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-ref-guard.d.ts","sourceRoot":"","sources":["../../src/hooks/command-ref-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAwBtE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAI7D"}
package/dist/index.js CHANGED
@@ -2480,7 +2480,7 @@ async function guardRailsHook(ctx, input, _output) {
2480
2480
  for (const pattern of BUILD_DEPLOY_PATTERNS) {
2481
2481
  if (cmd.includes(pattern)) {
2482
2482
  if (!getPlanConfirmed(statePath2)) {
2483
- throw new Error(`[flowdeck] WARNING: Build/deploy command detected but plan is not confirmed. Run /plan first.`);
2483
+ throw new Error(`[flowdeck] WARNING: Build/deploy command detected but plan is not confirmed. Run /fd-plan first.`);
2484
2484
  }
2485
2485
  break;
2486
2486
  }
@@ -2543,15 +2543,15 @@ function getPlanConfirmed(statePath2) {
2543
2543
  }
2544
2544
  function getWarningMessage(planningDir2) {
2545
2545
  if (!existsSync18(join18(planningDir2, STATE_FILE2))) {
2546
- return "No .planning/ found. Run /new-project first.";
2546
+ return "No .planning/ found. Run /fd-new-project first.";
2547
2547
  }
2548
- return "Plan not confirmed. Run /plan and confirm to enable execution.";
2548
+ return "Plan not confirmed. Run /fd-plan and confirm to enable execution.";
2549
2549
  }
2550
2550
  function getBlockMessage(planningDir2) {
2551
2551
  if (!existsSync18(join18(planningDir2, STATE_FILE2))) {
2552
- return "No .planning/ found. Run /new-project first.";
2552
+ return "No .planning/ found. Run /fd-new-project first.";
2553
2553
  }
2554
- return "Plan not confirmed. Run /plan and confirm to enable execution.";
2554
+ return "Plan not confirmed. Run /fd-plan and confirm to enable execution.";
2555
2555
  }
2556
2556
 
2557
2557
  // src/hooks/tool-guard.ts
@@ -2689,7 +2689,7 @@ async function sessionStartHook(ctx) {
2689
2689
  return {
2690
2690
  flowdeck_phase: null,
2691
2691
  flowdeck_status: "no_plan",
2692
- flowdeck_warning: "Run /new-project or /map-codebase to initialize.",
2692
+ flowdeck_warning: "Run /fd-new-project or /fd-map-codebase to initialize.",
2693
2693
  flowdeck_has_codebase: existsSync20(codebaseDirectory),
2694
2694
  ...workspaceRoot && config?.sub_repos ? {
2695
2695
  flowdeck_workspace_root: workspaceRoot,
@@ -3605,16 +3605,16 @@ MUST execute at session start:
3605
3605
  3. Check which steps are marked complete
3606
3606
  4. Begin execution from the first incomplete step
3607
3607
 
3608
- If STATE.md does not exist, tell the user: "No STATE.md found. Run \`/new-project\` to initialize."
3608
+ If STATE.md does not exist, tell the user: "No STATE.md found. Run \`/fd-new-project\` to initialize."
3609
3609
 
3610
3610
  ## Phase Gating
3611
3611
 
3612
3612
  Only orchestrate in the **execute** phase.
3613
3613
 
3614
3614
  If the project is in another phase:
3615
- - **discuss** phase: "Run \`/discuss\` to complete requirements gathering first."
3616
- - **plan** phase: "Run \`/plan\` to create the implementation plan first."
3617
- - **review** phase: "Run \`/review-code\` to complete the review phase."
3615
+ - **discuss** phase: "Run \`/fd-discuss\` to complete requirements gathering first."
3616
+ - **plan** phase: "Run \`/fd-plan\` to create the implementation plan first."
3617
+ - **review** phase: "Run \`/fd-verify\` to complete the review phase."
3618
3618
 
3619
3619
  ## Step Execution
3620
3620
 
@@ -5539,7 +5539,7 @@ Discussion is complete when:
5539
5539
  - All decisions recorded in DISCUSS.md
5540
5540
  - No open questions remain
5541
5541
 
5542
- Report: "Requirements gathering complete. N decisions recorded. Ready for /plan."`;
5542
+ Report: "Requirements gathering complete. N decisions recorded. Ready for /fd-plan."`;
5543
5543
  var createTaskSplitterAgent = (model, customPrompt, customAppendPrompt) => {
5544
5544
  const prompt = resolvePrompt(TASK_SPLITTER_PROMPT, customPrompt, customAppendPrompt);
5545
5545
  return {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Shared Impact Radar utility.
3
3
  * Scans .codebase/ data stores for risk signals relevant to a change description.
4
- * Used by /discuss, /plan, /new-feature, and /fix-bug.
4
+ * Used by /fd-discuss, /fd-plan, /fd-new-feature, and /fd-fix-bug.
5
5
  */
6
6
  import type { FailureEntry } from "../tools/failure-replay";
7
7
  export interface ImpactRadarResult {
@@ -29,7 +29,7 @@ export declare function impactRadarSummaryLines(radar: ImpactRadarResult): strin
29
29
  /**
30
30
  * Look up prior failures from FAILURES.json that match by path prefix or keyword.
31
31
  * Returns full FailureEntry objects (including root_cause and fix_applied) sorted by recurrence desc.
32
- * Used by /fix-bug to surface lessons learned before the fix begins.
32
+ * Used by /fd-fix-bug to surface lessons learned before the fix begins.
33
33
  */
34
34
  export declare function lookupPriorFailures(dir: string, scope: string, bugText: string, limit?: number): FailureEntry[];
35
35
  //# sourceMappingURL=impact-radar.d.ts.map
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Command reference validator.
3
+ * Source of truth: REGISTERED_COMMANDS from supervisor-binding.
4
+ * Used at startup, in tests, and by the response guardrail to prevent
5
+ * agents from suggesting slash commands that don't exist.
6
+ */
7
+ export interface CommandValidationResult {
8
+ valid: boolean;
9
+ command: string;
10
+ reason?: string;
11
+ }
12
+ export interface AuditResult {
13
+ text: string;
14
+ references: string[];
15
+ invalid: CommandValidationResult[];
16
+ valid: CommandValidationResult[];
17
+ hasInvalid: boolean;
18
+ }
19
+ /**
20
+ * Returns true if the given slash command (with or without leading slash) is registered.
21
+ */
22
+ export declare function isValidCommand(ref: string): boolean;
23
+ /**
24
+ * Validate a single command reference string (e.g. "/fd-plan" or "fd-plan").
25
+ */
26
+ export declare function validateCommandReference(ref: string): CommandValidationResult;
27
+ /**
28
+ * Extract all /fd-* slash command references from a text string.
29
+ */
30
+ export declare function extractCommandReferences(text: string): string[];
31
+ /**
32
+ * Extract bare /word references that are missing the fd- prefix.
33
+ * Returns only those that would be valid if prefixed with fd-.
34
+ */
35
+ export declare function extractBarePrefixErrors(text: string): string[];
36
+ /**
37
+ * Audit a text string for invalid command references.
38
+ * Checks all /fd-* patterns against the registered command set.
39
+ */
40
+ export declare function auditTextForInvalidCommands(text: string): AuditResult;
41
+ /**
42
+ * Rewrite a text string by replacing invalid /fd-* command references with
43
+ * a note that the command is unavailable. Leaves valid commands untouched.
44
+ */
45
+ export declare function rewriteInvalidCommandRefs(text: string): string;
46
+ /**
47
+ * Return the full canonical command inventory for inspection/testing.
48
+ */
49
+ export declare function getCommandInventory(): readonly string[];
50
+ //# sourceMappingURL=command-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-validator.d.ts","sourceRoot":"","sources":["../../src/services/command-validator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,OAAO,EAAE,uBAAuB,EAAE,CAAA;IAClC,KAAK,EAAE,uBAAuB,EAAE,CAAA;IAChC,UAAU,EAAE,OAAO,CAAA;CACpB;AAQD;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAGnD;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,uBAAuB,CAmB7E;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAG/D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAY9D;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAqBrE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK9D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,SAAS,MAAM,EAAE,CAEvD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=command-validator.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-validator.test.d.ts","sourceRoot":"","sources":["../../src/services/command-validator.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,118 @@
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
+ export type TaskType = "feature" | "ui-feature" | "bugfix" | "docs" | "simple" | "ambiguous";
17
+ /** A single stage in a workflow sequence, mapping to an existing fd-* command. */
18
+ export interface WorkflowStage {
19
+ /** Human-readable stage name */
20
+ name: string;
21
+ /** The registered fd-* command that implements this stage */
22
+ command: string;
23
+ /** Arguments to pass to the command (if any) */
24
+ args?: string;
25
+ /** Whether this stage requires human approval before proceeding */
26
+ requiresApproval: boolean;
27
+ /** Whether this stage can be skipped if prerequisites are absent and --override is set */
28
+ skippable: boolean;
29
+ }
30
+ export interface ClassificationResult {
31
+ taskType: TaskType;
32
+ /** 0.0–1.0 confidence in the classification */
33
+ confidence: number;
34
+ /** Which signal patterns triggered the classification */
35
+ signals: string[];
36
+ /** True when the task is explicitly UI/UX-heavy, requiring design-first */
37
+ requiresDesign: boolean;
38
+ /** True when TDD enforcement applies (always true except for docs-only) */
39
+ requiresTDD: boolean;
40
+ /** Ordered sequence of stages to execute */
41
+ stageSequence: WorkflowStage[];
42
+ /** True when the description is too vague to classify without asking a question */
43
+ clarificationNeeded: boolean;
44
+ /** The single clarifying question to ask via supervisor (when clarificationNeeded=true) */
45
+ clarificationPrompt?: string;
46
+ }
47
+ /**
48
+ * Classify a free-text task description into a TaskType with a confidence score.
49
+ *
50
+ * Signal matching is case-insensitive substring search. Multiple signal hits
51
+ * increase confidence. The highest-confidence match wins; ties break toward
52
+ * the more structured workflow type (feature > simple > ambiguous).
53
+ */
54
+ export declare function classifyTask(description: string): ClassificationResult;
55
+ /**
56
+ * Build the ordered WorkflowStage array for a given TaskType.
57
+ * Each stage maps 1:1 to an existing registered fd-* command.
58
+ */
59
+ export declare function buildStageSequence(taskType: TaskType): WorkflowStage[];
60
+ export interface StageProgress {
61
+ completedStageNames: string[];
62
+ blockedAtStage?: string;
63
+ blockedReason?: string;
64
+ }
65
+ export interface NextStageResult {
66
+ /** The stage to execute next, or null if all stages are complete */
67
+ stage: WorkflowStage | null;
68
+ /** True when all stages have been completed */
69
+ allComplete: boolean;
70
+ /** True when execution is blocked at a stage */
71
+ blocked: boolean;
72
+ blockedReason?: string;
73
+ /** Remaining stage names (not counting the returned stage) */
74
+ remaining: string[];
75
+ }
76
+ /**
77
+ * Given a stage sequence and the current progress, determine the next
78
+ * stage to execute.
79
+ *
80
+ * Returns null stage when all stages are complete.
81
+ */
82
+ export declare function getNextStage(sequence: WorkflowStage[], progress: StageProgress): NextStageResult;
83
+ /** The structure written to STATE.md under the `quick_run` key by /fd-quick. */
84
+ export interface QuickRunState {
85
+ /** Original task description from $ARGUMENTS */
86
+ taskDescription: string;
87
+ /** Classification result */
88
+ taskType: TaskType;
89
+ confidence: number;
90
+ requiresDesign: boolean;
91
+ requiresTDD: boolean;
92
+ /** Ordered stage names for this run */
93
+ stageSequence: string[];
94
+ /** Stages that have been completed */
95
+ completedStages: string[];
96
+ /** Current stage being executed, if any */
97
+ currentStage: string | null;
98
+ /** Whether the run has been halted */
99
+ blocked: boolean;
100
+ blockedReason?: string;
101
+ /** Supervisor decisions keyed by stage name */
102
+ supervisorDecisions: Record<string, {
103
+ decision: string;
104
+ reasons: string[];
105
+ timestamp: string;
106
+ }>;
107
+ /** ISO timestamp when the run started */
108
+ startedAt: string;
109
+ /** ISO timestamp of last update */
110
+ updatedAt: string;
111
+ /** Final run outcome */
112
+ outcome: "running" | "complete" | "blocked" | "failed";
113
+ }
114
+ /**
115
+ * Create a fresh QuickRunState record for a new /fd-quick run.
116
+ */
117
+ export declare function createQuickRunState(taskDescription: string, classification: ClassificationResult): QuickRunState;
118
+ //# sourceMappingURL=quick-router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quick-router.d.ts","sourceRoot":"","sources":["../../src/services/quick-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,YAAY,GACZ,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,WAAW,CAAA;AAEf,kFAAkF;AAClF,MAAM,WAAW,aAAa;IAC5B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAA;IACf,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mEAAmE;IACnE,gBAAgB,EAAE,OAAO,CAAA;IACzB,0FAA0F;IAC1F,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,QAAQ,CAAA;IAClB,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAA;IAClB,yDAAyD;IACzD,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,2EAA2E;IAC3E,cAAc,EAAE,OAAO,CAAA;IACvB,2EAA2E;IAC3E,WAAW,EAAE,OAAO,CAAA;IACpB,4CAA4C;IAC5C,aAAa,EAAE,aAAa,EAAE,CAAA;IAC9B,mFAAmF;IACnF,mBAAmB,EAAE,OAAO,CAAA;IAC5B,2FAA2F;IAC3F,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAsCD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,oBAAoB,CA6GtE;AAiBD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,aAAa,EAAE,CA6CtE;AAcD,MAAM,WAAW,aAAa;IAC5B,mBAAmB,EAAE,MAAM,EAAE,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,oEAAoE;IACpE,KAAK,EAAE,aAAa,GAAG,IAAI,CAAA;IAC3B,+CAA+C;IAC/C,WAAW,EAAE,OAAO,CAAA;IACpB,gDAAgD;IAChD,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,aAAa,EAAE,EACzB,QAAQ,EAAE,aAAa,GACtB,eAAe,CAkCjB;AAID,gFAAgF;AAChF,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,eAAe,EAAE,MAAM,CAAA;IACvB,4BAA4B;IAC5B,QAAQ,EAAE,QAAQ,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,OAAO,CAAA;IACvB,WAAW,EAAE,OAAO,CAAA;IACpB,uCAAuC;IACvC,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,sCAAsC;IACtC,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,2CAA2C;IAC3C,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,sCAAsC;IACtC,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,+CAA+C;IAC/C,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC/F,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAA;IACjB,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAA;IACjB,wBAAwB;IACxB,OAAO,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAA;CACvD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,eAAe,EAAE,MAAM,EACvB,cAAc,EAAE,oBAAoB,GACnC,aAAa,CAiBf"}
@@ -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]` | Quick focused task with automatic agent selection |
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:** Execute a focused task without the full workflow. Selects best specialist agent automatically.
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
- **Agent Selection Matrix:**
492
-
493
- | Task Type | Agent |
494
- |-----------|-------|
495
- | Backend code | @backend-coder |
496
- | Frontend code | @frontend-coder |
497
- | DevOps/infra code | @devops |
498
- | Explore/understand | @code-explorer |
499
- | Review code | @reviewer |
500
- | Security review | @security-auditor |
501
- | Design/architecture | @architect |
502
- | Write tests | @tester |
503
- | Documentation | @doc-updater |
504
- | Research | @researcher |
505
- | Debug | @debug-specialist |
506
- | Performance | @performance-optimizer |
507
- | Build error | @build-error-resolver |
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 find where the session token is validated
512
- /fd-quick add rate limiting to the API
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
 
@@ -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` | Fast focused task execution | @backend-coder/@frontend-coder/@devops or selected specialist |
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.7",
3
+ "version": "0.3.8",
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.4.0"
48
+ "@opencode-ai/plugin": "^1.14.49"
49
49
  },
50
50
  "devDependencies": {
51
- "@types/node": "^20.0.0",
52
- "bun-types": "^1.3.13",
53
- "ejs": "^3.1.9",
54
- "typescript": "^5.7.0",
55
- "vitest": "^2.0.0"
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.4.0"
58
+ "@opencode-ai/sdk": "^1.14.49"
59
59
  }
60
60
  }
@@ -95,7 +95,7 @@ If UI-heavy, also suggest running `/fd-design --mode=draft` before `/fd-execute`
95
95
  ## Error Handling
96
96
 
97
97
  D-03: Fail fast with clear error
98
- - If PROJECT.md not found: error with "Run /new-project first"
98
+ - If PROJECT.md not found: error with "Run /fd-new-project first"
99
99
  - If STATE.md not found: error with "Project not initialized"
100
100
  - If @discusser fails: error with "Discusser agent unavailable"
101
101
  - No partial state saved on error
@@ -16,14 +16,14 @@ 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
28
  If the registry is empty or not set up, run `/multi-repo --add` first.
29
29
 
@@ -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: