@dv.nghiem/flowdeck 0.2.4 → 0.3.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.
Files changed (74) hide show
  1. package/README.md +24 -41
  2. package/dist/hooks/memory-hook.d.ts +21 -0
  3. package/dist/hooks/memory-hook.d.ts.map +1 -0
  4. package/dist/hooks/orchestrator-guard-hook.d.ts.map +1 -1
  5. package/dist/hooks/todo-hook.d.ts +1 -7
  6. package/dist/hooks/todo-hook.d.ts.map +1 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +709 -420
  9. package/dist/services/memory-store.d.ts +40 -0
  10. package/dist/services/memory-store.d.ts.map +1 -0
  11. package/dist/tools/memory-search.d.ts +3 -0
  12. package/dist/tools/memory-search.d.ts.map +1 -0
  13. package/docs/commands/fd-doctor.md +21 -0
  14. package/docs/commands/fd-quick.md +33 -0
  15. package/docs/commands/fd-reflect.md +23 -0
  16. package/docs/commands/fd-status.md +31 -0
  17. package/docs/commands/fd-translate-intent.md +17 -0
  18. package/docs/commands.md +209 -271
  19. package/docs/configuration.md +1 -2
  20. package/docs/index.md +22 -28
  21. package/docs/memory.md +69 -0
  22. package/docs/quick-start.md +1 -1
  23. package/package.json +1 -1
  24. package/src/commands/fd-deploy-check.md +131 -11
  25. package/src/commands/fd-new-project.md +14 -1
  26. package/src/commands/fd-quick.md +60 -0
  27. package/src/commands/fd-reflect.md +41 -2
  28. package/src/commands/fd-status.md +84 -0
  29. package/src/rules/README.md +8 -7
  30. package/src/skills/agent-harness-construction/SKILL.md +227 -0
  31. package/src/skills/api-design/SKILL.md +5 -0
  32. package/src/skills/backend-patterns/SKILL.md +105 -0
  33. package/src/skills/clean-architecture/SKILL.md +85 -0
  34. package/src/skills/cqrs/SKILL.md +230 -0
  35. package/src/skills/ddd-architecture/SKILL.md +104 -0
  36. package/src/skills/django-patterns/SKILL.md +304 -0
  37. package/src/skills/django-tdd/SKILL.md +297 -0
  38. package/src/skills/event-driven-architecture/SKILL.md +152 -0
  39. package/src/skills/frontend-pattern/SKILL.md +159 -0
  40. package/src/skills/hexagonal-architecture/SKILL.md +80 -0
  41. package/src/skills/layered-architecture/SKILL.md +64 -0
  42. package/src/skills/postgres-patterns/SKILL.md +74 -0
  43. package/src/skills/python-patterns/SKILL.md +5 -0
  44. package/src/skills/saga-architecture/SKILL.md +113 -0
  45. package/dist/tools/run-parallel.d.ts +0 -4
  46. package/dist/tools/run-parallel.d.ts.map +0 -1
  47. package/docs/command-migration.md +0 -175
  48. package/docs/commands/fd-analyze-change.md +0 -107
  49. package/docs/commands/fd-dashboard.md +0 -11
  50. package/docs/commands/fd-evaluate-risk.md +0 -134
  51. package/docs/commands/fd-guarded-edit.md +0 -105
  52. package/docs/commands/fd-progress.md +0 -11
  53. package/docs/commands/fd-review-code.md +0 -29
  54. package/docs/commands/fd-roadmap.md +0 -10
  55. package/docs/commands/fd-settings.md +0 -10
  56. package/docs/parallel-execution.md +0 -255
  57. package/src/commands/fd-analyze-change.md +0 -57
  58. package/src/commands/fd-approve.md +0 -64
  59. package/src/commands/fd-blast-radius.md +0 -49
  60. package/src/commands/fd-dashboard.md +0 -57
  61. package/src/commands/fd-evaluate-risk.md +0 -62
  62. package/src/commands/fd-guarded-edit.md +0 -69
  63. package/src/commands/fd-impact-radar.md +0 -51
  64. package/src/commands/fd-learn.md +0 -36
  65. package/src/commands/fd-progress.md +0 -50
  66. package/src/commands/fd-regression-predict.md +0 -57
  67. package/src/commands/fd-review-code.md +0 -96
  68. package/src/commands/fd-review-route.md +0 -54
  69. package/src/commands/fd-roadmap.md +0 -46
  70. package/src/commands/fd-settings.md +0 -57
  71. package/src/commands/fd-test-gap.md +0 -54
  72. package/src/commands/fd-volatility-map.md +0 -64
  73. package/src/commands/fd-workspace-status.md +0 -34
  74. package/src/skills/parallel-execute/SKILL.md +0 -92
@@ -1,175 +0,0 @@
1
- # Command Architecture & Migration Guide
2
-
3
- FlowDeck v2 consolidates seven individual analysis commands into four umbrella commands, reducing the top-level command surface while keeping all capabilities. The 15 workflow commands remain as separate top-level slash commands.
4
-
5
- ---
6
-
7
- ## Command Map
8
-
9
- ### Workflow commands (unchanged — 15 total)
10
-
11
- These remain as separate top-level commands:
12
-
13
- | Command | Purpose |
14
- |---------|---------|
15
- | `/fd-new-project` | Bootstrap a new project |
16
- | `/fd-map-codebase` | Analyse and index the codebase |
17
- | `/fd-settings` | Configure FlowDeck settings |
18
- | `/fd-discuss` | Pre-planning discussion with impact radar |
19
- | `/fd-plan` | Generate a phase plan |
20
- | `/fd-roadmap` | View / update project roadmap |
21
- | `/fd-dashboard` | Visual progress dashboard |
22
- | `/fd-ask` | Smart agent dispatch |
23
- | `/fd-new-feature` | Implement a new feature |
24
- | `/fd-fix-bug` | Fix a bug with failure replay |
25
- | `/fd-review-code` | Code review with impact radar |
26
- | `/fd-write-docs` | Generate documentation |
27
- | `/fd-deploy-check` | Pre-deploy safety check |
28
- | `/fd-progress` | View project progress |
29
- | `/fd-checkpoint` | Save a session checkpoint |
30
- | `/fd-resume` | Resume from checkpoint |
31
- | `/fd-multi-repo` | Multi-repo management |
32
-
33
- ### Analysis commands — old → new mapping
34
-
35
- | Old command | New umbrella command | Flag |
36
- |-------------|---------------------|------|
37
- | `/fd-impact-radar` | `/fd-analyze-change` | `--impact` |
38
- | `/fd-blast-radius` | `/fd-analyze-change` | `--blast-radius` |
39
- | `/fd-regression-predict` | `/fd-analyze-change` | `--regression` |
40
- | `/fd-test-gap` | `/fd-analyze-change` | `--test-gap` |
41
- | `/fd-volatility-map` | `/fd-analyze-change` | `--volatility` |
42
- | `/fd-review-route` | `/fd-analyze-change` | `--review-route` |
43
- | `/fd-translate-intent` | `/fd-translate-intent` | *(enhanced, kept as-is)* |
44
- | *(new)* | `/fd-guarded-edit` | — |
45
- | *(new)* | `/fd-evaluate-risk` | — |
46
-
47
- ### New umbrella commands (4 total)
48
-
49
- | Command | Replaces / Adds |
50
- |---------|----------------|
51
- | `/fd-analyze-change` | Combines 6 analysis commands; `--all` runs all modules |
52
- | `/fd-guarded-edit` | New — edit gate decision (auto/confirm/review/block) |
53
- | `/fd-evaluate-risk` | New — standalone risk + regression assessment |
54
- | `/fd-translate-intent` | Enhanced — adds `assumptions`, `recommended_option`, `clarifying_questions` |
55
-
56
- ---
57
-
58
- ## Architecture
59
-
60
- ### Command layer
61
-
62
- Commands are thin entry points that dispatch to agent pipelines or shared utilities. No analysis logic lives inside command files.
63
-
64
- ```
65
- User runs: /fd-analyze-change --change "..." --impact --regression
66
-
67
- analyzeChangeCommand.execute()
68
-
69
- reads: VOLATILITY.json, FAILURES.json, MEMORY.json via shared libs
70
- calls: runImpactRadar(), scorePatch()
71
-
72
- returns: unified config object with agent pipeline + aggregated data
73
- ```
74
-
75
- ### Agent layer
76
-
77
- Agents are modular and reusable across commands:
78
-
79
- | Agent | Used by |
80
- |-------|---------|
81
- | `architect` | `/fd-analyze-change`, `/fd-translate-intent`, `/fd-plan` |
82
- | `researcher` | `/fd-analyze-change`, `/fd-evaluate-risk`, `/fd-discuss` |
83
- | `tester` | `/fd-analyze-change` |
84
- | `reviewer` | `/fd-analyze-change`, `/fd-evaluate-risk`, `/fd-review-code` |
85
- | `security-auditor` | `/fd-evaluate-risk` (high/critical risk), `/fd-review-code` |
86
- | `risk-analyst` | `/fd-evaluate-risk`, `/fd-guarded-edit` |
87
- | `policy-enforcer` | `/fd-guarded-edit` |
88
-
89
- ### Plugin hooks
90
-
91
- Hooks intercept tool execution and enforce safety policies at the infrastructure layer:
92
-
93
- | Hook | Function |
94
- |------|---------|
95
- | `tool.execute.before` | `toolGuardHook` — blocks dangerous read/write/bash/edit |
96
- | `tool.execute.before` | `guardRailsHook` — enforces execution mode (auto/guarded/review-only) |
97
- | `tool.execute.before` | `patchTrustHook` — scores writes/edits; blocks high-risk without approval |
98
- | `tool.execute.before` | `decisionTraceHook` — records every edit to DECISIONS.jsonl |
99
- | `session.started` | `sessionStartHook` — announces FlowDeck, loads context |
100
- | `command.execute.before` | Command routing — dispatches slash commands |
101
-
102
- ### Shared libraries
103
-
104
- Reusable utilities consumed by multiple commands:
105
-
106
- | Module | Exports |
107
- |--------|---------|
108
- | `src/lib/impact-radar.ts` | `runImpactRadar()`, `impactRadarSummaryLines()`, `lookupPriorFailures()` |
109
- | `src/hooks/patch-trust.ts` | `scorePatch()` |
110
- | `src/hooks/guard-rails.ts` | `resolveExecutionMode()` |
111
- | `src/hooks/tool-guard.ts` | `checkArchConstraint()`, `isBlocked()` |
112
- | `src/tools/planning-state-lib.ts` | `statePath()`, `codebaseDir()`, `readPlanningState()`, `timestamp()` |
113
-
114
- ### Data files (`.codebase/`)
115
-
116
- | File | Purpose |
117
- |------|---------|
118
- | `MEMORY.json` | Architecture graph — modules, ownership, types |
119
- | `FAILURES.json` | Failure history — root causes, tags, recurrence counts |
120
- | `DECISIONS.jsonl` | Append-only edit audit log |
121
- | `VOLATILITY.json` | Churn metrics — stability ratings per path |
122
- | `POLICIES.json` | Self-healing policy rules |
123
- | `CONSTRAINTS.md` | Forbidden paths and architectural boundaries |
124
- | `ARCHITECTURE.md` | High-level architecture notes (written by `/fd-map-codebase`) |
125
- | `STACK.md` | Technology stack reference |
126
-
127
- ---
128
-
129
- ## Migration Plan
130
-
131
- ### For existing users
132
-
133
- **All old commands still work.** No action required. Old commands were not removed.
134
-
135
- **When to migrate:**
136
-
137
- | If you used to run | Now prefer |
138
- |-------------------|-----------|
139
- | `/fd-impact-radar --change "..."` | `/fd-analyze-change --change "..." --impact` |
140
- | Multiple analysis commands in sequence | `/fd-analyze-change --change "..." --all` |
141
- | Manual pre-edit risk assessment | `/fd-evaluate-risk --change "..." --file "..."` |
142
- | Manually deciding whether to apply a change | `/fd-guarded-edit --file "..." --change "..."` |
143
- | `/fd-translate-intent --intent "..."` | Same — now returns `assumptions` and `recommended_option` |
144
-
145
- ### Quick start for new workflows
146
-
147
- **Before any significant edit:**
148
- ```bash
149
- # 1. Translate vague intent to concrete options
150
- /fd-translate-intent --intent "make checkout faster"
151
-
152
- # 2. Full pre-change analysis
153
- /fd-analyze-change --change "add Redis cache for checkout queries"
154
-
155
- # 3. Gate decision for the specific file
156
- /fd-guarded-edit --file "src/checkout/query.ts" --change "add Redis cache layer"
157
- ```
158
-
159
- **In CI/CD pipelines:**
160
- ```bash
161
- # Risk gate — fail if approval required
162
- /fd-evaluate-risk --change "<PR description>" --json | jq '.approval_needed'
163
-
164
- # Edit gate — fail if block decision
165
- /fd-guarded-edit --file "<changed file>" --json | jq '.decision == "block"'
166
- ```
167
-
168
- ---
169
-
170
- ## Backward compatibility notes
171
-
172
- - All 7 original intelligence commands (`/fd-impact-radar`, `/fd-blast-radius`, `/fd-regression-predict`, `/fd-test-gap`, `/fd-volatility-map`, `/fd-review-route`, `/fd-translate-intent`) remain registered and functional.
173
- - Their implementations were not modified (except `/fd-translate-intent` which gained `assumptions`, `recommended_option`, and `clarifying_questions` in its output spec).
174
- - The new umbrella commands are registered alongside the old ones — no commands were removed.
175
- - Existing scripts, keybindings, or workflows that call the old commands will continue to work without changes.
@@ -1,107 +0,0 @@
1
- # /fd-analyze-change
2
-
3
- **Umbrella analysis command** — runs up to 6 analysis modules in a single pass and produces a consolidated pre-change risk report.
4
-
5
- Replaces individual calls to `/fd-impact-radar`, `/fd-blast-radius`, `/fd-regression-predict`, `/fd-test-gap`, `/fd-volatility-map`, and `/fd-review-route`.
6
-
7
- ---
8
-
9
- ## Usage
10
-
11
- ```
12
- /fd-analyze-change --change "<what's changing>" [flags]
13
- ```
14
-
15
- ## Arguments
16
-
17
- | Flag | Type | Default | Description |
18
- |------|------|---------|-------------|
19
- | `--change` | string | — | Description of the proposed change |
20
- | `--scope` | string | `"all"` | Module or file path scope |
21
- | `--files` | string | — | Comma-separated file paths |
22
- | `--depth` | number | `2` | Blast radius traversal depth |
23
- | `--impact` | boolean | false | Run impact radar module |
24
- | `--blast-radius` | boolean | false | Run blast radius module |
25
- | `--regression` | boolean | false | Run regression prediction module |
26
- | `--test-gap` | boolean | false | Run test gap detection module |
27
- | `--volatility` | boolean | false | Run volatility map module |
28
- | `--review-route` | boolean | false | Run reviewer routing module |
29
- | `--all` | boolean | false | Force all modules (default when no module flags given) |
30
- | `--json` | boolean | false | Return raw JSON instead of table |
31
-
32
- **Default behaviour:** If no module flags are specified, all 6 modules run automatically.
33
-
34
- ---
35
-
36
- ## Output
37
-
38
- ```
39
- ════════════════════════════════════════════════════════════════
40
- fd-analyze-change
41
- ────────────────────────────────────────────────────────────────
42
- Change: update JWT token expiry
43
- Scope: all
44
- Modules: impact-radar, blast-radius, regression-predict, test-gap, volatility-map, review-route
45
- ────────────────────────────────────────────────────────────────
46
- ⚠ Affected zones: src/auth/, src/session/, src/middleware/
47
- ⚠ Known failures: F-023, F-031
48
- ≈ Regression cats: auth, performance, async-flow...
49
- ✗ Test gap types: 5 gap patterns checked
50
- → Route to: security, backend
51
- ────────────────────────────────────────────────────────────────
52
- ⚠ HIGH RISK: 3 volatile zone(s), 2 known failure(s), 1 fragile pattern(s)
53
- ════════════════════════════════════════════════════════════════
54
- ```
55
-
56
- ### Top-level fields returned
57
-
58
- | Field | Description |
59
- |-------|-------------|
60
- | `modules_run` | Which analysis modules were executed |
61
- | `affected_zones` | Volatile/critical file paths matching the change |
62
- | `recommended_reviewers` | Reviewer types suggested (security, backend, infra, etc.) |
63
- | `risk_summary` | Human-readable risk advisory |
64
- | `risk_score` | Numeric score 0–100 (higher = lower risk) |
65
- | `config` | Full agent pipeline config dispatched to agents |
66
-
67
- ---
68
-
69
- ## Examples
70
-
71
- ```bash
72
- # Full analysis before editing auth middleware
73
- /fd-analyze-change --change "replace JWT with session tokens" --files "src/auth/token.ts"
74
-
75
- # Impact + regression only (partial analysis)
76
- /fd-analyze-change --change "refactor database connection pool" --impact --regression
77
-
78
- # JSON output for scripting
79
- /fd-analyze-change --change "update payment webhook handler" --json
80
-
81
- # Deep blast radius (3 levels)
82
- /fd-analyze-change --change "extract user service" --blast-radius --depth 3
83
- ```
84
-
85
- ---
86
-
87
- ## Old commands (still supported)
88
-
89
- These individual commands remain available and still work. Use `/fd-analyze-change` for combined analysis:
90
-
91
- | Old command | Equivalent flag |
92
- |-------------|----------------|
93
- | `/fd-impact-radar` | `--impact` |
94
- | `/fd-blast-radius` | `--blast-radius` |
95
- | `/fd-regression-predict` | `--regression` |
96
- | `/fd-test-gap` | `--test-gap` |
97
- | `/fd-volatility-map` | `--volatility` |
98
- | `/fd-review-route` | `--review-route` |
99
-
100
- ---
101
-
102
- ## Agents dispatched
103
-
104
- - `researcher` — traces dependency graph from changed paths
105
- - `architect` — maps blast radius to configured depth, flags integration points
106
- - `tester` — estimates coverage gaps per regression category and test gap types
107
- - `reviewer` — ranks gaps by risk and confirms routing
@@ -1,11 +0,0 @@
1
- ---
2
- description: Open project dashboard — displays phase progress, milestones, and blockers
3
- ---
4
- Run the FlowDeck dashboard to view project progress.
5
-
6
- ## What Next?
7
-
8
- 1. **Start feature work** → `/fd-new-feature [description]`
9
- 2. **Fix a bug** → `/fd-fix-bug [issue]`
10
- 3. **View roadmap** → `/fd-roadmap`
11
- 4. **Check progress** → `/fd-progress`
@@ -1,134 +0,0 @@
1
- # /fd-evaluate-risk
2
-
3
- **Standalone risk assessment command** — estimates change risk, confidence, likely regression categories, and whether human approval is needed before proceeding.
4
-
5
- Works with a change description alone (keyword-based) or with a specific file path (trust score + keyword combined).
6
-
7
- ---
8
-
9
- ## Usage
10
-
11
- ```
12
- /fd-evaluate-risk --change "<description>" [--file "<path>"] [flags]
13
- ```
14
-
15
- ## Arguments
16
-
17
- | Flag | Type | Default | Description |
18
- |------|------|---------|-------------|
19
- | `--change` | string | — | Plain-language description of the proposed change |
20
- | `--file` | string | — | Specific file being changed (enables patch trust scoring) |
21
- | `--volatility` | boolean | true | Include volatile zone count in analysis |
22
- | `--json` | boolean | false | Return raw JSON instead of table |
23
-
24
- At least one of `--change` or `--file` is required.
25
-
26
- ---
27
-
28
- ## Risk levels
29
-
30
- | Level | Score | Meaning |
31
- |-------|-------|---------|
32
- | `low` | 80–100 | Safe to proceed without approval |
33
- | `medium` | 50–79 | Proceed with care; review recommended |
34
- | `high` | 25–49 | Approval required; consider safer alternative |
35
- | `critical` | 0–24 | Approval required; safer alternative strongly recommended |
36
-
37
- **Approval is required when:** `risk_score < 60` OR `≥3 regression categories predicted`.
38
-
39
- ---
40
-
41
- ## Output
42
-
43
- ```
44
- ════════════════════════════════════════════════════════════
45
- fd-evaluate-risk
46
- ────────────────────────────────────────────────────────────
47
- Change: replace JWT with session tokens
48
- File: src/auth/token.ts
49
- ────────────────────────────────────────────────────────────
50
- ⚠ Risk level: HIGH (score: 38/100)
51
- Confidence: 72/100 (codebase context coverage)
52
- Approval: REQUIRED
53
- Regressions: auth, security, async-flow
54
- Hot zones: src/auth/
55
- Signals: volatile path, auth keyword
56
- ────────────────────────────────────────────────────────────
57
- Safer alt: Consider a feature-flag rollout before swapping auth tokens
58
- ────────────────────────────────────────────────────────────
59
- researcher → map to affected paths
60
- reviewer → validate risk + regressions
61
- security → targeted review of high-risk areas
62
- ════════════════════════════════════════════════════════════
63
- ```
64
-
65
- ### Fields returned
66
-
67
- | Field | Description |
68
- |-------|-------------|
69
- | `risk_score` | 0–100 (higher = less risky) |
70
- | `risk_level` | low / medium / high / critical |
71
- | `confidence` | 0–100 (how much codebase context data exists) |
72
- | `approval_needed` | boolean — whether human approval is required |
73
- | `likely_regressions` | predicted regression categories from change keywords |
74
- | `volatile_zones` | count of volatile/critical zones in the repo |
75
- | `volatile_matches` | paths that match the change description |
76
- | `safer_alternative` | suggested safer approach if risk is high/critical |
77
- | `trust_signals` | risk signals from the patch trust scorer |
78
-
79
- ---
80
-
81
- ## Regression categories detected
82
-
83
- | Category | Triggered by keywords |
84
- |----------|----------------------|
85
- | performance | slow, latency, cache, query, index, bulk, batch, load |
86
- | auth | auth, token, session, jwt, oauth, permission, rbac, login |
87
- | schema | schema, migration, column, table, foreign key, constraint |
88
- | ui-state | state, redux, context, store, hook, render, component |
89
- | async-flow | async, await, promise, callback, event, queue, worker |
90
- | api-contract | api, endpoint, route, request, response, payload, version |
91
- | data-integrity | transaction, rollback, constraint, unique, required, nullable |
92
- | security | secret, password, encrypt, decrypt, hash, sanitize |
93
- | config | env, config, setting, flag, feature flag, toggle |
94
- | i18n | locale, translation, i18n, format, timezone, language |
95
-
96
- ---
97
-
98
- ## Confidence score
99
-
100
- Confidence reflects how much codebase context data the system has:
101
-
102
- | Data source | Points |
103
- |-------------|--------|
104
- | `.codebase/ARCHITECTURE.md` exists | +20 |
105
- | `.codebase/STACK.md` exists | +10 |
106
- | `.codebase/MEMORY.json` node count | up to +25 |
107
- | `.codebase/VOLATILITY.json` entries | up to +15 |
108
- | `.codebase/FAILURES.json` entries | up to +10 |
109
- | Base | +20 |
110
-
111
- Run `/fd-map-codebase` and let FlowDeck index the repo to increase confidence.
112
-
113
- ---
114
-
115
- ## Examples
116
-
117
- ```bash
118
- # Keyword-based risk estimate
119
- /fd-evaluate-risk --change "refactor JWT auth to use session tokens"
120
-
121
- # File + change (enables patch trust scoring)
122
- /fd-evaluate-risk --change "update stripe webhook" --file "src/payment/webhook.ts"
123
-
124
- # JSON output for CI decision gates
125
- /fd-evaluate-risk --change "drop users table column" --json
126
- ```
127
-
128
- ---
129
-
130
- ## Agents dispatched
131
-
132
- - `researcher` — maps change description to affected modules and paths
133
- - `reviewer` — validates risk level and regression predictions
134
- - `security-auditor` — targeted review (only when risk is high or critical)
@@ -1,105 +0,0 @@
1
- # /fd-guarded-edit
2
-
3
- **Edit gate command** — evaluates a proposed file change before it is applied and returns a binding gate decision.
4
-
5
- Combines: patch trust scoring, architectural constraint checking, policy enforcement, volatility analysis, and failure history into a single pass/block decision.
6
-
7
- ---
8
-
9
- ## Usage
10
-
11
- ```
12
- /fd-guarded-edit --file "<path>" --change "<description>" [flags]
13
- ```
14
-
15
- ## Arguments
16
-
17
- | Flag | Type | Default | Description |
18
- |------|------|---------|-------------|
19
- | `--file` | string | — | File path being changed |
20
- | `--change` | string | — | Plain-language description of the change |
21
- | `--dry-run` | boolean | false | Evaluate without recording or side effects |
22
- | `--json` | boolean | false | Return raw JSON instead of table |
23
-
24
- At least one of `--file` or `--change` is required.
25
-
26
- ---
27
-
28
- ## Gate decisions
29
-
30
- | Decision | Meaning |
31
- |----------|---------|
32
- | `auto-approve` | Apply — no action needed (trust ≥70, no violations, stable file) |
33
- | `require-confirmation` | Review the diff carefully, then confirm (volatile file, guarded mode, or prior failures) |
34
- | `require-review` | Route to human reviewer — do not auto-apply (trust <40 or policy violation) |
35
- | `block` | Do NOT apply — arch constraint violation or critical policy breach |
36
-
37
- ### Decision priority (highest first)
38
-
39
- 1. Arch constraint violated → **block**
40
- 2. Policy violation + trust < 30 → **block**
41
- 3. `review-only` execution mode → **require-review**
42
- 4. Trust < 40 OR any policy violation → **require-review**
43
- 5. `guarded` execution mode OR volatile file OR prior failures → **require-confirmation**
44
- 6. All else → **auto-approve**
45
-
46
- ---
47
-
48
- ## Output
49
-
50
- ```
51
- ════════════════════════════════════════════════════════════
52
- fd-guarded-edit
53
- ────────────────────────────────────────────────────────────
54
- File: src/auth/token.ts
55
- Change: replace jwt secret rotation logic
56
- ────────────────────────────────────────────────────────────
57
- ⚑ Decision: REQUIRE-REVIEW
58
- Reason: High risk: trust score 32/100, 0 policy violation(s)
59
- Risk score: 32/100 (high-risk)
60
- Exec mode: guarded
61
- Prior fails: F-023, F-031
62
- ────────────────────────────────────────────────────────────
63
- → Route to human reviewer before applying — do not auto-apply
64
- ════════════════════════════════════════════════════════════
65
- ```
66
-
67
- ### Fields returned
68
-
69
- | Field | Description |
70
- |-------|-------------|
71
- | `decision` | Gate decision string |
72
- | `reason` | Explanation for the decision |
73
- | `risk_score` | Patch trust score 0–100 |
74
- | `execution_mode` | Current repo execution mode (auto/guarded/review-only) |
75
- | `policy_violations` | Policy rule strings that were triggered |
76
- | `volatile_files` | Files that matched volatile/critical zones |
77
- | `prior_failures` | Failure IDs for prior failures on this path |
78
- | `arch_constraint` | Whether an architectural constraint was violated |
79
- | `recommended_action` | Plain-language next step |
80
-
81
- ---
82
-
83
- ## Examples
84
-
85
- ```bash
86
- # Check before editing auth token logic
87
- /fd-guarded-edit --file "src/auth/token.ts" --change "replace secret rotation"
88
-
89
- # Dry run (evaluate without recording)
90
- /fd-guarded-edit --file "src/payment/webhook.ts" --change "update stripe handler" --dry-run
91
-
92
- # JSON for CI/CD pipeline integration
93
- /fd-guarded-edit --file "src/core/engine.ts" --change "patch core engine" --json
94
- ```
95
-
96
- ---
97
-
98
- ## Data sources read
99
-
100
- - `.codebase/POLICIES.json` — active policy rules
101
- - `.codebase/VOLATILITY.json` — volatile/critical paths
102
- - `.codebase/FAILURES.json` — unresolved prior failures per path
103
- - `.codebase/CONSTRAINTS.md` — forbidden path patterns
104
- - `.planning/config.json` — execution mode setting
105
- - Patch trust scorer — keyword + volatility scoring
@@ -1,11 +0,0 @@
1
- ---
2
- description: Display current STATE.md, active PLAN.md, and recent results
3
- ---
4
- Run the FlowDeck progress command to see current project state.
5
-
6
- ## What Next?
7
-
8
- 1. **Continue feature work** → `/fd-new-feature [description]`
9
- 2. **Fix a bug** → `/fd-fix-bug [issue]`
10
- 3. **View dashboard** → `/fd-dashboard`
11
- 4. **Check roadmap** → `/fd-roadmap`
@@ -1,29 +0,0 @@
1
- ---
2
- description: Parallel code review — reviewer + researcher + tester — aggregates into critical/major/minor report
3
- argument-hint: "[scope: file, directory, or 'staged']"
4
- ---
5
-
6
- Run a comprehensive parallel code review.
7
-
8
- **What this does:**
9
- 1. Determines scope: staged changes, a file/directory, or the whole PR
10
- 2. Runs `@reviewer` (security, quality, logic), `@researcher` (API correctness), and `@tester` (test coverage) in parallel
11
- 3. Aggregates findings into a single report ranked: CRITICAL → HIGH → MEDIUM → LOW
12
- 4. Proposes fixes for every CRITICAL and HIGH finding
13
- 5. Skips stylistic preferences — only real bugs and security issues
14
-
15
- **Output format:**
16
- ```
17
- ## Code Review Report
18
- ### CRITICAL [n]
19
- - [finding]: [file:line] — [fix]
20
- ### HIGH [n]
21
- ...
22
- ```
23
-
24
- ## What Next?
25
-
26
- 1. **Fix critical issues found** → `/fd-fix-bug [issue description]`
27
- 2. **Deploy check** → `/fd-deploy-check`
28
- 3. **Update documentation** → `/fd-write-docs`
29
- 4. **Check project progress** → `/fd-progress`
@@ -1,10 +0,0 @@
1
- ---
2
- description: View or update the project roadmap — shows phase statuses and milestones
3
- ---
4
- Run the FlowDeck roadmap workflow to view or update project phases and milestones.
5
-
6
- ## What Next?
7
-
8
- 1. **Start next phase** → `/fd-new-feature [description]`
9
- 2. **View progress** → `/fd-progress`
10
- 3. **Check dashboard** → `/fd-dashboard`
@@ -1,10 +0,0 @@
1
- ---
2
- description: View or update FlowDeck settings — model assignments, guard enforcement, workspace mode
3
- ---
4
- Run the FlowDeck settings command to view or modify configuration.
5
-
6
- ## What Next?
7
-
8
- 1. **View dashboard** → `/fd-dashboard`
9
- 2. **Check progress** → `/fd-progress`
10
- 3. **Start working** → `/fd-new-feature [description]`