@dv.nghiem/flowdeck 0.1.0 → 0.1.1

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.
Files changed (99) hide show
  1. package/dist/index.d.ts.map +1 -1
  2. package/dist/index.js +14 -4197
  3. package/package.json +2 -1
  4. package/src/commands/fd-analyze-change.md +57 -0
  5. package/src/commands/fd-approve.md +64 -0
  6. package/src/commands/fd-ask.md +39 -0
  7. package/src/commands/fd-blast-radius.md +49 -0
  8. package/src/commands/fd-checkpoint.md +46 -0
  9. package/src/commands/fd-dashboard.md +57 -0
  10. package/src/commands/fd-deploy-check.md +58 -0
  11. package/src/commands/fd-discuss.md +61 -0
  12. package/src/commands/fd-doctor.md +37 -0
  13. package/src/commands/fd-evaluate-risk.md +62 -0
  14. package/src/commands/fd-fix-bug.md +93 -0
  15. package/src/commands/fd-guarded-edit.md +69 -0
  16. package/src/commands/fd-impact-radar.md +51 -0
  17. package/src/commands/fd-map-codebase.md +36 -0
  18. package/src/commands/fd-multi-repo.md +63 -0
  19. package/src/commands/fd-new-feature.md +49 -0
  20. package/src/commands/fd-new-project.md +103 -0
  21. package/src/commands/fd-plan.md +80 -0
  22. package/src/commands/fd-progress.md +50 -0
  23. package/src/commands/fd-regression-predict.md +57 -0
  24. package/src/commands/fd-resume.md +46 -0
  25. package/src/commands/fd-review-code.md +62 -0
  26. package/src/commands/fd-review-route.md +54 -0
  27. package/src/commands/fd-roadmap.md +46 -0
  28. package/src/commands/fd-settings.md +57 -0
  29. package/src/commands/fd-test-gap.md +54 -0
  30. package/src/commands/fd-translate-intent.md +56 -0
  31. package/src/commands/fd-volatility-map.md +64 -0
  32. package/src/commands/fd-workspace-status.md +34 -0
  33. package/src/commands/fd-write-docs.md +50 -0
  34. package/dist/commands/analysis/analysis.test.d.ts +0 -2
  35. package/dist/commands/analysis/analysis.test.d.ts.map +0 -1
  36. package/dist/commands/analysis/analyze-change.d.ts +0 -148
  37. package/dist/commands/analysis/analyze-change.d.ts.map +0 -1
  38. package/dist/commands/analysis/evaluate-risk.d.ts +0 -77
  39. package/dist/commands/analysis/evaluate-risk.d.ts.map +0 -1
  40. package/dist/commands/analysis/guarded-edit.d.ts +0 -72
  41. package/dist/commands/analysis/guarded-edit.d.ts.map +0 -1
  42. package/dist/commands/execution/deploy-check.d.ts +0 -91
  43. package/dist/commands/execution/deploy-check.d.ts.map +0 -1
  44. package/dist/commands/execution/fix-bug.d.ts +0 -187
  45. package/dist/commands/execution/fix-bug.d.ts.map +0 -1
  46. package/dist/commands/execution/new-feature.d.ts +0 -171
  47. package/dist/commands/execution/new-feature.d.ts.map +0 -1
  48. package/dist/commands/execution/review-code.d.ts +0 -130
  49. package/dist/commands/execution/review-code.d.ts.map +0 -1
  50. package/dist/commands/execution/write-docs.d.ts +0 -94
  51. package/dist/commands/execution/write-docs.d.ts.map +0 -1
  52. package/dist/commands/governance/approve.d.ts +0 -80
  53. package/dist/commands/governance/approve.d.ts.map +0 -1
  54. package/dist/commands/intelligence/blast-radius.d.ts +0 -67
  55. package/dist/commands/intelligence/blast-radius.d.ts.map +0 -1
  56. package/dist/commands/intelligence/impact-radar.d.ts +0 -71
  57. package/dist/commands/intelligence/impact-radar.d.ts.map +0 -1
  58. package/dist/commands/intelligence/intelligence.test.d.ts +0 -2
  59. package/dist/commands/intelligence/intelligence.test.d.ts.map +0 -1
  60. package/dist/commands/intelligence/regression-predict.d.ts +0 -75
  61. package/dist/commands/intelligence/regression-predict.d.ts.map +0 -1
  62. package/dist/commands/intelligence/review-route.d.ts +0 -65
  63. package/dist/commands/intelligence/review-route.d.ts.map +0 -1
  64. package/dist/commands/intelligence/test-gap.d.ts +0 -73
  65. package/dist/commands/intelligence/test-gap.d.ts.map +0 -1
  66. package/dist/commands/intelligence/translate-intent.d.ts +0 -87
  67. package/dist/commands/intelligence/translate-intent.d.ts.map +0 -1
  68. package/dist/commands/intelligence/volatility-map-cmd.d.ts +0 -68
  69. package/dist/commands/intelligence/volatility-map-cmd.d.ts.map +0 -1
  70. package/dist/commands/planning/ask.d.ts +0 -62
  71. package/dist/commands/planning/ask.d.ts.map +0 -1
  72. package/dist/commands/planning/ask.test.d.ts +0 -2
  73. package/dist/commands/planning/ask.test.d.ts.map +0 -1
  74. package/dist/commands/planning/dashboard.d.ts +0 -30
  75. package/dist/commands/planning/dashboard.d.ts.map +0 -1
  76. package/dist/commands/planning/discuss.d.ts +0 -39
  77. package/dist/commands/planning/discuss.d.ts.map +0 -1
  78. package/dist/commands/planning/plan.d.ts +0 -67
  79. package/dist/commands/planning/plan.d.ts.map +0 -1
  80. package/dist/commands/planning/roadmap.d.ts +0 -105
  81. package/dist/commands/planning/roadmap.d.ts.map +0 -1
  82. package/dist/commands/setup/doctor.d.ts +0 -10
  83. package/dist/commands/setup/doctor.d.ts.map +0 -1
  84. package/dist/commands/setup/map-codebase.d.ts +0 -62
  85. package/dist/commands/setup/map-codebase.d.ts.map +0 -1
  86. package/dist/commands/setup/new-project.d.ts +0 -19
  87. package/dist/commands/setup/new-project.d.ts.map +0 -1
  88. package/dist/commands/setup/settings.d.ts +0 -57
  89. package/dist/commands/setup/settings.d.ts.map +0 -1
  90. package/dist/commands/state/checkpoint.d.ts +0 -27
  91. package/dist/commands/state/checkpoint.d.ts.map +0 -1
  92. package/dist/commands/state/multi-repo.d.ts +0 -63
  93. package/dist/commands/state/multi-repo.d.ts.map +0 -1
  94. package/dist/commands/state/progress.d.ts +0 -57
  95. package/dist/commands/state/progress.d.ts.map +0 -1
  96. package/dist/commands/state/resume.d.ts +0 -11
  97. package/dist/commands/state/resume.d.ts.map +0 -1
  98. package/dist/commands/state/workspace-commands.d.ts +0 -207
  99. package/dist/commands/state/workspace-commands.d.ts.map +0 -1
@@ -0,0 +1,69 @@
1
+ ---
2
+ description: Edit gate — decides auto-approve / require-confirmation / require-review / block based on policy, trust score, volatility, and arch constraints
3
+ argument-hint: [change description or file path]
4
+ ---
5
+
6
+ # Guarded Edit
7
+
8
+ Evaluate a proposed edit against all safety gates before allowing it to proceed.
9
+
10
+ **Input:** $ARGUMENTS — description or file path of the proposed edit
11
+
12
+ ## Gates (evaluated in order)
13
+
14
+ ### Gate 1 — Policy Check
15
+
16
+ Read `.planning/config.json` for active policies:
17
+ - `approval_required`: if true, all edits need explicit approval
18
+ - `volatility_threshold`: edits touching files above this score need confirmation
19
+
20
+ ### Gate 2 — Volatility Check
21
+
22
+ Check `.codebase/VOLATILITY.json` for the files in `$ARGUMENTS`.
23
+ - Score ≥ 0.8 → REQUIRE REVIEW
24
+ - Score ≥ 0.6 → REQUIRE CONFIRMATION
25
+ - Score < 0.6 → proceed
26
+
27
+ ### Gate 3 — Architecture Constraints
28
+
29
+ Read `.codebase/ARCHITECTURE.md` and check if the edit:
30
+ - Crosses defined service boundaries
31
+ - Modifies public API contracts
32
+ - Touches security-critical paths (auth, payments, PII)
33
+
34
+ ### Gate 4 — Trust Score
35
+
36
+ Check `.codebase/FAILURES.json` for prior failures in the same path.
37
+ - 3+ prior failures in this area → REQUIRE REVIEW
38
+ - 1-2 prior failures → REQUIRE CONFIRMATION
39
+
40
+ ## Decision Matrix
41
+
42
+ | Condition | Decision |
43
+ |-----------|----------|
44
+ | Any BLOCK signal | ❌ BLOCK |
45
+ | REQUIRE REVIEW signal | 👁️ REQUIRE REVIEW |
46
+ | REQUIRE CONFIRMATION signal | ⚠️ REQUIRE CONFIRMATION |
47
+ | All gates pass | ✅ AUTO-APPROVE |
48
+
49
+ ## Report
50
+
51
+ ```
52
+ ════════════════════════════════════
53
+ GUARDED EDIT GATE
54
+ ════════════════════════════════════
55
+ Edit: <summary>
56
+
57
+ Gate 1 — Policy: <pass|flag>
58
+ Gate 2 — Volatility: <score> → <pass|confirm|review>
59
+ Gate 3 — Arch: <pass|flag>
60
+ Gate 4 — Trust: <failures count> → <pass|confirm|review>
61
+
62
+ DECISION: AUTO-APPROVE / CONFIRM / REVIEW / BLOCK
63
+
64
+ <if BLOCK or REVIEW: explain what needs to happen first>
65
+ ════════════════════════════════════
66
+ ```
67
+
68
+ If BLOCK: do not proceed with the edit. Explain what must change first.
69
+ If CONFIRM: present to user and wait for explicit "yes" before proceeding.
@@ -0,0 +1,51 @@
1
+ ---
2
+ description: Change Impact Radar — predict which files, modules, APIs, tests, and DB paths are affected before editing anything
3
+ argument-hint: [change description]
4
+ ---
5
+
6
+ # Impact Radar
7
+
8
+ Predict the blast area of a proposed change before any code is written.
9
+
10
+ **Input:** $ARGUMENTS — description of the proposed change
11
+
12
+ ## Steps
13
+
14
+ Run three agents in parallel:
15
+
16
+ - **@researcher**: Trace dependency graph from the paths mentioned in `$ARGUMENTS`; find all files that import or are imported by those modules; map 2 levels deep
17
+
18
+ - **@architect**: Identify API contracts and service boundaries at risk; flag any public interfaces that would change; check for DB schema impacts
19
+
20
+ - **@tester**: Find test files that cover the affected paths; identify which tests would need updating; spot gaps (changed files with no tests)
21
+
22
+ ## Report
23
+
24
+ ```
25
+ ════════════════════════════════════════════
26
+ CHANGE IMPACT RADAR
27
+ ════════════════════════════════════════════
28
+ Change: <summary of $ARGUMENTS>
29
+ Risk score: <low|medium|high>
30
+
31
+ Affected Files (<N>):
32
+ - <file> (<reason>)
33
+
34
+ API Contracts at Risk:
35
+ - <interface/endpoint> — <risk>
36
+
37
+ Tests to Update (<N>):
38
+ - <test file>
39
+
40
+ Test Gaps (<N> files with no tests):
41
+ - <file>
42
+
43
+ DB / Schema Impact:
44
+ - <none | description>
45
+
46
+ Recommendation:
47
+ <proceed with caution | review required | block>
48
+ ════════════════════════════════════════════
49
+ ```
50
+
51
+ If no impact found: "No significant impact detected. Proceed with standard review."
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: Analyze codebase and generate .codebase/ documentation — STACK, ARCHITECTURE, STRUCTURE, CONVENTIONS, TESTING, CONCERNS
3
+ argument-hint: [--incremental]
4
+ ---
5
+
6
+ # Map Codebase
7
+
8
+ Analyze the current codebase and generate comprehensive documentation under `.codebase/`.
9
+
10
+ **Input:** $ARGUMENTS (pass `--incremental` to only process changed files)
11
+
12
+ ## Steps
13
+
14
+ 1. Create `.codebase/` directory if it does not exist.
15
+
16
+ 2. Run parallel analysis — delegate to specialist agents:
17
+ - **@researcher**: Scan package files (`package.json`, `go.mod`, `pyproject.toml`, `Cargo.toml`, etc.) to identify tech stack, frameworks, and dependencies
18
+ - **@architect**: Analyze directory structure, module boundaries, key entry points, and architectural patterns
19
+ - **@code-explorer**: Scan source files for naming conventions, code style patterns, import conventions, and anti-patterns
20
+ - **@tester**: Find test files, identify testing frameworks, coverage configuration, and testing patterns
21
+ - **@researcher** (second pass): Scan for TODO/FIXME/HACK comments, large files (>500 lines), duplicated code patterns, and security concerns
22
+
23
+ 3. Write the following files based on analysis results:
24
+
25
+ - **`.codebase/STACK.md`** — tech stack, frameworks, key dependencies with versions
26
+ - **`.codebase/ARCHITECTURE.md`** — system design, module boundaries, key flows, data models
27
+ - **`.codebase/STRUCTURE.md`** — directory layout with explanations of each major directory
28
+ - **`.codebase/CONVENTIONS.md`** — naming rules, code style, import conventions, patterns to follow
29
+ - **`.codebase/TESTING.md`** — test frameworks, test patterns, how to run tests, coverage targets
30
+ - **`.codebase/CONCERNS.md`** — technical debt, risky areas, TODO clusters, large files, security flags
31
+
32
+ 4. If `--incremental`: only update files where the underlying source has changed since the last map (check `.codebase/last_mapped` timestamp).
33
+
34
+ 5. Write timestamp to `.codebase/last_mapped`.
35
+
36
+ 6. Report summary: files created/updated, key findings per category.
@@ -0,0 +1,63 @@
1
+ ---
2
+ description: Manage multi-repo registry in .planning/config.json — add, list, status, or remove repos
3
+ argument-hint: [list | add <path> [name] | remove <name> | status]
4
+ ---
5
+
6
+ # Multi-Repo
7
+
8
+ Manage a multi-repository workspace registry.
9
+
10
+ **Input:** $ARGUMENTS
11
+
12
+ ## Behavior
13
+
14
+ ### List (`list` or no arguments)
15
+
16
+ Read `.planning/config.json` → `repos` array. Display:
17
+
18
+ ```
19
+ ════════════════════════════════════
20
+ MULTI-REPO REGISTRY
21
+ ════════════════════════════════════
22
+ frontend — ./packages/frontend (phase 2, in_progress)
23
+ backend — ./packages/backend (phase 3, completed)
24
+ shared — ./packages/shared (phase 1, planned)
25
+ ════════════════════════════════════
26
+ ```
27
+
28
+ ### Add (`add <path> [name]`)
29
+
30
+ 1. Verify `<path>` exists and has a `.planning/STATE.md`
31
+ 2. Derive `name` from directory basename if not provided
32
+ 3. Add to `.planning/config.json` → `repos` array
33
+ 4. Report: "Added '<name>' at <path>."
34
+
35
+ ### Remove (`remove <name>`)
36
+
37
+ Remove matching repo from registry. Report: "Removed '<name>'."
38
+
39
+ ### Status (`status`)
40
+
41
+ For each registered repo, read its STATE.md and display:
42
+
43
+ ```
44
+ ════════════════════════════════════
45
+ WORKSPACE STATUS
46
+ ════════════════════════════════════
47
+ frontend — Phase 2 | in_progress | Updated: <time>
48
+ backend — Phase 3 | completed | Updated: <time>
49
+ shared — Phase 1 | planned | Updated: <time>
50
+ ════════════════════════════════════
51
+ Overall: 1 in progress, 1 complete, 1 planned
52
+ ```
53
+
54
+ ## Config Format
55
+
56
+ `.planning/config.json` repos entry:
57
+ ```json
58
+ {
59
+ "repos": [
60
+ { "name": "frontend", "path": "./packages/frontend" }
61
+ ]
62
+ }
63
+ ```
@@ -0,0 +1,49 @@
1
+ ---
2
+ description: Execute feature implementation — guard check, parallel coder + researcher, reviewer, tester, STATE.md update
3
+ argument-hint: [feature description]
4
+ ---
5
+
6
+ # New Feature
7
+
8
+ Implement a new feature using the full FlowDeck agent pipeline.
9
+
10
+ **Input:** $ARGUMENTS — description of the feature to implement
11
+
12
+ ## Pre-flight
13
+
14
+ 1. Check `.planning/STATE.md` exists — if not, error: "Run /fd-new-project first."
15
+ 2. Check `plan_confirmed: true` in STATE.md — if not, error: "Confirm plan first with /fd-plan."
16
+ 3. Read `.planning/phases/phase-<N>/PLAN.md` to get implementation steps.
17
+ 4. Read `.codebase/ARCHITECTURE.md` if it exists — pass as context.
18
+
19
+ ## Execution Pipeline
20
+
21
+ Run the following agent pipeline for feature: **$ARGUMENTS**
22
+
23
+ ### Phase 1 — Analysis (parallel)
24
+ - **@researcher**: Trace how $ARGUMENTS touches existing code, find relevant files, identify API contracts at risk
25
+ - **@architect**: Identify architectural boundaries, flag integration points, check for pattern compliance
26
+
27
+ ### Phase 2 — Implementation
28
+ - **@coder**: Implement the feature following PLAN.md steps, CONVENTIONS.md patterns, and TDD discipline
29
+ - Write failing tests FIRST (RED)
30
+ - Implement minimum code to pass (GREEN)
31
+ - Refactor if needed (REFACTOR)
32
+
33
+ ### Phase 3 — Validation (parallel)
34
+ - **@tester**: Run test suite, verify new tests pass, check coverage
35
+ - **@reviewer**: Review implementation for quality, security, and convention compliance
36
+
37
+ ### Phase 4 — State Update
38
+ - Update `.planning/STATE.md` with completed steps
39
+ - Write summary to `.planning/phases/phase-<N>/RESULT.md`
40
+
41
+ ## Guard Rails
42
+
43
+ - Block if `tdd_enforced: true` and no tests were written
44
+ - Block if any CRITICAL security issues found
45
+ - Require explicit confirmation before overwriting existing public APIs
46
+
47
+ ## Completion
48
+
49
+ Report: feature implemented, tests status, reviewer findings, files changed.
@@ -0,0 +1,103 @@
1
+ ---
2
+ description: Initialize .planning/ structure for a new project — creates PROJECT.md, REQUIREMENTS.md, ROADMAP.md, and STATE.md
3
+ argument-hint: [project-name]
4
+ ---
5
+
6
+ # New Project
7
+
8
+ Initialize FlowDeck planning structure for the current workspace.
9
+
10
+ ## Steps
11
+
12
+ 1. Check if `.planning/` already exists — if it does, warn the user and ask before overwriting.
13
+
14
+ 2. Create the `.planning/` directory and the following files if they do not exist:
15
+
16
+ **`.planning/PROJECT.md`**
17
+ ```markdown
18
+ # Project
19
+
20
+ **Name:** $ARGUMENTS
21
+ **Description:** (set via /fd-discuss)
22
+ **Tech stack:** (set via /fd-discuss)
23
+
24
+ ---
25
+
26
+ ## Goals
27
+
28
+ -
29
+
30
+ ## Non-negotiables
31
+
32
+ -
33
+
34
+ ## Out of Scope
35
+
36
+ -
37
+ ```
38
+
39
+ **`.planning/REQUIREMENTS.md`**
40
+ ```markdown
41
+ # Requirements
42
+
43
+ **Project:** $ARGUMENTS
44
+ **Version:** 1.0
45
+
46
+ ---
47
+
48
+ ## v1 Requirements
49
+
50
+ ```
51
+
52
+ **`.planning/ROADMAP.md`**
53
+ ```markdown
54
+ # Roadmap
55
+
56
+ **Project:** $ARGUMENTS
57
+ **Version:** 1.0
58
+
59
+ ---
60
+
61
+ ## Overview
62
+
63
+ | Phase | Name | Purpose |
64
+ |-------|------|---------|
65
+ | 1 | Setup | |
66
+
67
+ ---
68
+ ```
69
+
70
+ **`.planning/STATE.md`**
71
+ ```markdown
72
+ ---
73
+ flowdeck_state_version: 1.0
74
+ milestone: v1.0
75
+ last_updated: "<current timestamp>"
76
+ progress:
77
+ total_phases: 1
78
+ completed_phases: 0
79
+ ---
80
+
81
+ # State
82
+
83
+ **Project:** $ARGUMENTS
84
+ **Last updated:** <current timestamp>
85
+
86
+ ## Current Phase
87
+
88
+ phase: 1
89
+ status: planned
90
+ plan_file: none
91
+ plan_confirmed: false
92
+ confirmed_at: none
93
+
94
+ ## Progress
95
+
96
+ - [ ] Phase 1: Setup
97
+ ```
98
+
99
+ 3. Also create `.planning/phases/phase-1/` directory.
100
+
101
+ 4. Report success with the list of files created and next steps:
102
+ - Run `/fd-discuss` to capture project decisions
103
+ - Run `/fd-plan` to create an implementation plan
@@ -0,0 +1,80 @@
1
+ ---
2
+ description: Create detailed implementation plan from DISCUSS.md decisions — save PLAN.md, update STATE.md, require CONFIRM before execution
3
+ argument-hint: [--phase=N] [--yes]
4
+ ---
5
+
6
+ # Plan
7
+
8
+ Create a detailed implementation plan from confirmed discussion decisions.
9
+
10
+ **Input:** $ARGUMENTS (optional `--phase=N` to target a specific phase, `--yes` to skip confirmation)
11
+
12
+ ## Pre-flight
13
+
14
+ 1. Check `.planning/STATE.md` exists — if not, return error: "Run /fd-new-project first."
15
+ 2. Determine phase: use `--phase=N` from arguments, or read current phase from STATE.md.
16
+ 3. Check `.planning/phases/phase-<N>/DISCUSS.md` exists — if not, return error: "Run /fd-discuss first."
17
+
18
+ ## Confirmation Gate
19
+
20
+ Unless `--yes` is passed or STATE.md already has `plan_confirmed: true`:
21
+
22
+ Show a preview of the DISCUSS.md decisions found and ask:
23
+
24
+ ```
25
+ ═══════════════════════════════════════════
26
+ PLAN PHASE <N> — AWAITING CONFIRMATION
27
+ ═══════════════════════════════════════════
28
+
29
+ Found <X> decisions in DISCUSS.md:
30
+ <preview of D-XX lines>
31
+
32
+ Type CONFIRM to save PLAN.md and enable execution.
33
+ ═══════════════════════════════════════════
34
+ ```
35
+
36
+ **PAUSE** — wait for user to type CONFIRM before proceeding.
37
+
38
+ ## Plan Generation
39
+
40
+ After confirmation:
41
+
42
+ 1. Read all `D-XX: <decision>` lines from DISCUSS.md.
43
+ 2. Generate `.planning/phases/phase-<N>/PLAN.md`:
44
+
45
+ ```markdown
46
+ # Implementation Plan
47
+
48
+ **Phase:** <N>
49
+ **Created:** <timestamp>
50
+ **Source:** DISCUSS.md (<X> decisions)
51
+
52
+ ## Decisions
53
+
54
+ - D-01: <decision>
55
+ - D-02: <decision>
56
+
57
+ ## Steps
58
+
59
+ - [ ] Step 1: <concrete implementation step traced to decision>
60
+ - [ ] Step 2: <concrete implementation step>
61
+ - [ ] Step 3: <concrete implementation step>
62
+
63
+ ## Acceptance Criteria
64
+
65
+ - [ ] <criterion from DISCUSS.md>
66
+ - [ ] <criterion from DISCUSS.md>
67
+
68
+ ## Status
69
+
70
+ CONFIRMED
71
+ ```
72
+
73
+ 3. Update `.planning/STATE.md`:
74
+ - Set `plan_confirmed: true`
75
+ - Set `confirmed_at: <timestamp>`
76
+ - Set `status: in_progress`
77
+
78
+ ## Completion
79
+
80
+ Report: plan saved, decisions count, file path, next step: run `/fd-new-feature` or `/fd-fix-bug`.
@@ -0,0 +1,50 @@
1
+ ---
2
+ description: Display project progress — STATE.md summary, active PLAN.md steps, and recent results
3
+ argument-hint: [--json]
4
+ ---
5
+
6
+ # Progress
7
+
8
+ Display current project progress from planning files.
9
+
10
+ **Input:** $ARGUMENTS (pass `--json` for machine-readable output)
11
+
12
+ ## Steps
13
+
14
+ 1. Check `.planning/STATE.md` exists — if not, return error: "Initialize project first with /fd-new-project."
15
+
16
+ 2. Read STATE.md and parse:
17
+ - Current phase number
18
+ - Status (planned/in_progress/completed)
19
+ - Last updated timestamp
20
+ - `plan_confirmed` flag
21
+
22
+ 3. Read `.planning/phases/phase-<N>/PLAN.md` if it exists:
23
+ - Count total steps (lines matching `- [ ]` or `- [x]`)
24
+ - Count completed steps (lines matching `- [x]`)
25
+
26
+ 4. Check for recent RESULT.md files in the last 3 phases.
27
+
28
+ 5. Display:
29
+
30
+ ```
31
+ ════════════════════════════════════════════════════════════
32
+ Phase: <N> | Status: <status> | Updated: <timestamp>
33
+ ────────────────────────────────────────────────────────────
34
+ Plan: <X> steps (<Y> complete)
35
+ Plan confirmed: <yes/no>
36
+ Recent results: Phase <N-1>, Phase <N>
37
+ ════════════════════════════════════════════════════════════
38
+ ```
39
+
40
+ If `--json`, output structured JSON instead:
41
+ ```json
42
+ {
43
+ "phase": N,
44
+ "status": "...",
45
+ "plan_confirmed": true,
46
+ "steps_total": X,
47
+ "steps_complete": Y,
48
+ "last_updated": "..."
49
+ }
50
+ ```
@@ -0,0 +1,57 @@
1
+ ---
2
+ description: Regression Prediction — estimate the most likely regression categories for a proposed change
3
+ argument-hint: [change description]
4
+ ---
5
+
6
+ # Regression Predict
7
+
8
+ Predict the most likely regression categories for a proposed change before implementing it.
9
+
10
+ **Input:** $ARGUMENTS — description of the proposed change
11
+
12
+ ## Steps
13
+
14
+ Run two agents in parallel:
15
+
16
+ - **@researcher**: Map the changed code paths in `$ARGUMENTS` to regression category keywords and patterns; check `.codebase/FAILURES.json` for prior regressions in the same area
17
+
18
+ - **@tester**: Analyze existing test coverage for the affected paths; identify which regression categories are under-tested
19
+
20
+ ## Regression Categories
21
+
22
+ | Category | Indicators |
23
+ |----------|-----------|
24
+ | **Performance** | touching caching, DB queries, loops, response serialization |
25
+ | **Auth / Security** | touching middleware, tokens, sessions, permissions |
26
+ | **Schema / Data** | touching DB models, migrations, serializers |
27
+ | **UI States** | touching frontend components, state management, events |
28
+ | **Async Flows** | touching queues, workers, webhooks, timeouts |
29
+ | **API Contracts** | touching public endpoints, request/response shapes |
30
+ | **Integration** | touching external service calls, adapters |
31
+
32
+ ## Report
33
+
34
+ ```
35
+ ════════════════════════════════════════════
36
+ REGRESSION PREDICTION
37
+ ════════════════════════════════════════════
38
+ Change: <summary of $ARGUMENTS>
39
+
40
+ Likely Regressions (ranked by probability):
41
+
42
+ 🔴 HIGH — Auth/Security
43
+ Reason: change touches middleware X
44
+ Prior: FAILURES.json F-12 (×3 recurrences)
45
+
46
+ 🟠 MEDIUM — API Contracts
47
+ Reason: modifies response shape of /api/checkout
48
+
49
+ 🟡 LOW — Performance
50
+ Reason: adds DB query in hot path
51
+
52
+ ────────────────────────────────────────────
53
+ Recommended Tests to Add:
54
+ 1. <specific test scenario>
55
+ 2. <specific test scenario>
56
+ ════════════════════════════════════════════
57
+ ```
@@ -0,0 +1,46 @@
1
+ ---
2
+ description: Reload STATE.md + last PLAN.md + DISCUSS.md — brief the user, PAUSE for confirmation, then continue from where stopped
3
+ argument-hint: [--yes]
4
+ ---
5
+
6
+ # Resume
7
+
8
+ Resume a previously interrupted FlowDeck session.
9
+
10
+ **Input:** $ARGUMENTS (pass `--yes` to skip confirmation pause)
11
+
12
+ ## Steps
13
+
14
+ 1. Check `.planning/STATE.md` exists — if not, error: "No active project. Run /fd-new-project first."
15
+
16
+ 2. Read STATE.md and parse current state:
17
+ - Phase, status, last_updated, plan_confirmed
18
+
19
+ 3. Read `.planning/phases/phase-<N>/PLAN.md` if it exists — show preview (first 20 lines).
20
+
21
+ 4. Read `.planning/phases/phase-<N>/DISCUSS.md` if it exists — show decision count.
22
+
23
+ 5. Present session summary:
24
+
25
+ ```
26
+ ═══════════════════════════════════════════════
27
+ RESUMING SESSION
28
+ ═══════════════════════════════════════════════
29
+ Phase: <N> | Status: <status>
30
+ Last updated: <timestamp>
31
+ Plan confirmed: <yes/no>
32
+ Decisions: <X> from DISCUSS.md
33
+
34
+ Plan preview:
35
+ <first 10 lines of PLAN.md>
36
+ ───────────────────────────────────────────────
37
+ Type CONFIRM to resume execution from this point.
38
+ ═══════════════════════════════════════════════
39
+ ```
40
+
41
+ 6. Unless `--yes` is passed, **PAUSE** and wait for user to type CONFIRM.
42
+
43
+ 7. After confirmation, continue execution:
44
+ - If `plan_confirmed: true` and there are uncompleted steps in PLAN.md → proceed with implementation
45
+ - If no plan → suggest running `/fd-plan`
46
+ - Brief the user on what the next step is before starting
@@ -0,0 +1,62 @@
1
+ ---
2
+ description: Parallel reviewer + researcher + tester — aggregates findings into critical/major/minor report
3
+ argument-hint: [--scope=path | --focus=security,quality,tdd]
4
+ ---
5
+
6
+ # Review Code
7
+
8
+ Run a comprehensive parallel code review.
9
+
10
+ **Input:** $ARGUMENTS — optional `--scope=<path>` and `--focus=<areas>`
11
+
12
+ ## Steps
13
+
14
+ 1. Determine scope: use `--scope` if provided, else review uncommitted changes (`git diff --name-only HEAD`).
15
+ 2. If no changes found, report: "Nothing to review."
16
+
17
+ ## Parallel Review
18
+
19
+ Run three reviewers in parallel:
20
+
21
+ - **@reviewer**: Quality, security, convention compliance, TDD discipline
22
+ - CRITICAL: hardcoded secrets, SQL injection, XSS, auth gaps
23
+ - HIGH: logic errors, missing error handling, unsafe casts
24
+ - MEDIUM: functions >50 lines, nesting >4 deep, missing tests
25
+ - LOW: naming nits, missing comments on public APIs
26
+
27
+ - **@researcher**: API contracts, edge cases, hidden dependencies, integration risks
28
+
29
+ - **@tester**: Test coverage, missing test cases, test quality, regression risks
30
+
31
+ ## Report
32
+
33
+ Aggregate findings into:
34
+
35
+ ```
36
+ ════════════════════════════════════════════
37
+ CODE REVIEW REPORT
38
+ ════════════════════════════════════════════
39
+ Files reviewed: <N>
40
+
41
+ CRITICAL (<count>)
42
+ - <file>:<line> — <issue>
43
+
44
+ HIGH (<count>)
45
+ - <file>:<line> — <issue>
46
+
47
+ MEDIUM (<count>)
48
+ - <file>:<line> — <issue>
49
+
50
+ LOW (<count>)
51
+ - <file>:<line> — <issue>
52
+
53
+ Test Coverage: <findings>
54
+ ────────────────────────────────────────────
55
+ Verdict: PASS / NEEDS CHANGES / BLOCK
56
+ ════════════════════════════════════════════
57
+ ```
58
+
59
+ **Verdict rules:**
60
+ - CRITICAL issues → BLOCK
61
+ - HIGH issues → NEEDS CHANGES
62
+ - Only MEDIUM/LOW → PASS with comments