@dv.nghiem/flowdeck 0.2.3 → 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.
- package/README.md +24 -41
- package/dist/hooks/memory-hook.d.ts +21 -0
- package/dist/hooks/memory-hook.d.ts.map +1 -0
- package/dist/hooks/orchestrator-guard-hook.d.ts +2 -1
- package/dist/hooks/orchestrator-guard-hook.d.ts.map +1 -1
- package/dist/hooks/todo-hook.d.ts +1 -7
- package/dist/hooks/todo-hook.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +649 -310
- package/dist/services/memory-store.d.ts +40 -0
- package/dist/services/memory-store.d.ts.map +1 -0
- package/dist/services/telemetry.d.ts +1 -1
- package/dist/services/telemetry.d.ts.map +1 -1
- package/dist/tools/memory-search.d.ts +3 -0
- package/dist/tools/memory-search.d.ts.map +1 -0
- package/docs/commands/fd-doctor.md +21 -0
- package/docs/commands/fd-quick.md +33 -0
- package/docs/commands/fd-reflect.md +23 -0
- package/docs/commands/fd-status.md +31 -0
- package/docs/commands/fd-translate-intent.md +17 -0
- package/docs/commands.md +209 -271
- package/docs/configuration.md +2 -1
- package/docs/index.md +22 -28
- package/docs/memory.md +69 -0
- package/docs/quick-start.md +1 -1
- package/docs/workflows.md +72 -320
- package/package.json +1 -2
- package/src/commands/fd-deploy-check.md +189 -34
- package/src/commands/fd-discuss.md +44 -6
- package/src/commands/fd-fix-bug.md +47 -20
- package/src/commands/fd-map-codebase.md +66 -18
- package/src/commands/fd-multi-repo.md +130 -6
- package/src/commands/fd-new-feature.md +164 -21
- package/src/commands/fd-new-project.md +14 -1
- package/src/commands/fd-plan.md +66 -44
- package/src/commands/fd-quick.md +60 -0
- package/src/commands/fd-reflect.md +41 -2
- package/src/commands/fd-status.md +84 -0
- package/src/commands/fd-write-docs.md +55 -23
- package/src/rules/README.md +8 -7
- package/src/skills/agent-harness-construction/SKILL.md +227 -0
- package/src/skills/api-design/SKILL.md +5 -0
- package/src/skills/backend-patterns/SKILL.md +105 -0
- package/src/skills/clean-architecture/SKILL.md +85 -0
- package/src/skills/cqrs/SKILL.md +230 -0
- package/src/skills/ddd-architecture/SKILL.md +104 -0
- package/src/skills/django-patterns/SKILL.md +304 -0
- package/src/skills/django-tdd/SKILL.md +297 -0
- package/src/skills/event-driven-architecture/SKILL.md +152 -0
- package/src/skills/frontend-pattern/SKILL.md +159 -0
- package/src/skills/hexagonal-architecture/SKILL.md +80 -0
- package/src/skills/layered-architecture/SKILL.md +64 -0
- package/src/skills/postgres-patterns/SKILL.md +74 -0
- package/src/skills/python-patterns/SKILL.md +5 -0
- package/src/skills/saga-architecture/SKILL.md +113 -0
- package/dist/tools/run-parallel.d.ts +0 -4
- package/dist/tools/run-parallel.d.ts.map +0 -1
- package/docs/command-migration.md +0 -175
- package/docs/commands/fd-analyze-change.md +0 -107
- package/docs/commands/fd-dashboard.md +0 -11
- package/docs/commands/fd-evaluate-risk.md +0 -134
- package/docs/commands/fd-guarded-edit.md +0 -105
- package/docs/commands/fd-progress.md +0 -11
- package/docs/commands/fd-review-code.md +0 -29
- package/docs/commands/fd-roadmap.md +0 -10
- package/docs/commands/fd-settings.md +0 -10
- package/docs/parallel-execution.md +0 -227
- package/src/commands/fd-analyze-change.md +0 -57
- package/src/commands/fd-approve.md +0 -64
- package/src/commands/fd-blast-radius.md +0 -49
- package/src/commands/fd-dashboard.md +0 -57
- package/src/commands/fd-evaluate-risk.md +0 -62
- package/src/commands/fd-guarded-edit.md +0 -69
- package/src/commands/fd-impact-radar.md +0 -51
- package/src/commands/fd-learn.md +0 -36
- package/src/commands/fd-progress.md +0 -50
- package/src/commands/fd-regression-predict.md +0 -57
- package/src/commands/fd-review-code.md +0 -62
- package/src/commands/fd-review-route.md +0 -54
- package/src/commands/fd-roadmap.md +0 -46
- package/src/commands/fd-settings.md +0 -57
- package/src/commands/fd-test-gap.md +0 -54
- package/src/commands/fd-volatility-map.md +0 -64
- package/src/commands/fd-workspace-status.md +0 -34
- package/src/skills/parallel-execute/SKILL.md +0 -92
- package/src/workflows/debug-flow.md +0 -119
- package/src/workflows/deploy-check-flow.md +0 -98
- package/src/workflows/discuss-flow.md +0 -97
- package/src/workflows/execute-flow.md +0 -233
- package/src/workflows/execute-phase.md +0 -145
- package/src/workflows/fix-bug-flow.md +0 -210
- package/src/workflows/map-codebase-flow.md +0 -92
- package/src/workflows/multi-repo-flow.md +0 -226
- package/src/workflows/parallel-execution-flow.md +0 -236
- package/src/workflows/plan-flow.md +0 -126
- package/src/workflows/plan-phase.md +0 -101
- package/src/workflows/refactor-flow.md +0 -122
- package/src/workflows/review-code-flow.md +0 -105
- package/src/workflows/spec-driven-flow.md +0 -43
- package/src/workflows/write-docs-flow.md +0 -95
|
@@ -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]`
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
# Parallel Execution
|
|
2
|
-
|
|
3
|
-
FlowDeck can coordinate multiple agents working simultaneously on independent tasks. This is managed by the `@parallel-coordinator` agent using a wave-based execution model.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## When to Use Parallel Execution
|
|
8
|
-
|
|
9
|
-
Parallel execution pays off when:
|
|
10
|
-
|
|
11
|
-
- A feature decomposes into clearly independent tracks (research, implementation, documentation)
|
|
12
|
-
- The codebase has well-separated modules with distinct file ownership
|
|
13
|
-
- Review and security audit need to happen simultaneously (they always can)
|
|
14
|
-
- Estimated total work exceeds 30 minutes
|
|
15
|
-
|
|
16
|
-
## When NOT to Use It
|
|
17
|
-
|
|
18
|
-
Avoid parallel execution when:
|
|
19
|
-
|
|
20
|
-
- Total estimated work is under 30 minutes — coordination overhead outweighs the gain
|
|
21
|
-
- File ownership is unclear — parallel agents editing the same files produce merge conflicts
|
|
22
|
-
- Task B depends directly on task A's output — sequential is correct here, not parallel
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## The WAVE TABLE
|
|
27
|
-
|
|
28
|
-
When `@parallel-coordinator` plans work, it produces a WAVE TABLE that maps each wave to its agents, and records any inter-wave dependencies:
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
╔══════════════════════════════════════════════════════════════╗
|
|
32
|
-
║ WAVE TABLE — [Feature Name] ║
|
|
33
|
-
╠══════════════════════════════════════════════════════════════╣
|
|
34
|
-
║ Wave 1 (parallel) │ @researcher + @code-explorer ║
|
|
35
|
-
║ Wave 2 (serial) │ @architect ║
|
|
36
|
-
║ Wave 3 (parallel) │ @coder + @tester ║
|
|
37
|
-
║ Wave 4 (parallel) │ @reviewer + @security-auditor ║
|
|
38
|
-
╠══════════════════════════════════════════════════════════════╣
|
|
39
|
-
║ Dependency lock: │ Wave 3 blocked on Wave 2 output ║
|
|
40
|
-
╚══════════════════════════════════════════════════════════════╝
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
The dependency lock line explicitly documents which wave gates are in effect. `@parallel-coordinator` enforces these locks — Wave 3 will not begin until Wave 2 output is confirmed available.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Standard 4-Wave Pattern
|
|
48
|
-
|
|
49
|
-
### Wave 1 — Research (always parallel)
|
|
50
|
-
|
|
51
|
-
**Agents:** `@researcher` + `@code-explorer`
|
|
52
|
-
|
|
53
|
-
These two agents run simultaneously because neither depends on the other's output.
|
|
54
|
-
|
|
55
|
-
- **`@researcher`** — gathers external context: API documentation, library docs, relevant RFCs, prior art, and best practices for the problem domain
|
|
56
|
-
- **`@code-explorer`** — maps the existing codebase: which patterns are in use, which modules will be affected, which conventions must be followed
|
|
57
|
-
|
|
58
|
-
Both results feed into Wave 2 as inputs. `@architect` should not begin until both are complete.
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
### Wave 2 — Design (always serial)
|
|
63
|
-
|
|
64
|
-
**Agent:** `@architect`
|
|
65
|
-
|
|
66
|
-
Wave 2 is intentionally serial. Architecture decisions are the foundation everything else builds on — running `@coder` before `@architect` is done produces code that must be thrown away.
|
|
67
|
-
|
|
68
|
-
`@architect` consumes Wave 1 outputs and produces:
|
|
69
|
-
|
|
70
|
-
- **Interface contracts** — function signatures, type definitions, API shapes
|
|
71
|
-
- **Data models** — schemas, entity relationships, persistence strategy
|
|
72
|
-
- **ADRs (Architecture Decision Records)** — the key decisions made and the alternatives rejected, with rationale
|
|
73
|
-
|
|
74
|
-
Wave 2 output is written to `.planning/phases/*/ARCH.md` and is the authoritative specification for Wave 3.
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
### Wave 3 — Execution (usually parallel)
|
|
79
|
-
|
|
80
|
-
**Agents:** `@coder` + `@tester`
|
|
81
|
-
|
|
82
|
-
`@coder` and `@tester` can run in parallel because both work from the same Wave 2 interface contracts — neither needs to see the other's actual implementation.
|
|
83
|
-
|
|
84
|
-
- **`@coder`** — implements the interfaces and data models specified by `@architect`. Works top-down from contracts, not bottom-up from intuition.
|
|
85
|
-
- **`@tester`** — writes tests against the same Wave 2 interface contracts. Because tests are written to the contract (not the implementation), they are valid before `@coder` finishes.
|
|
86
|
-
|
|
87
|
-
When Wave 3 completes, tests should be passing against the new implementation. If they are not, `@coder` and `@tester` reconcile before Wave 4 begins.
|
|
88
|
-
|
|
89
|
-
> **Note:** Wave 3 is marked "usually parallel" because some features have sequential implementation requirements — for example, a migration that must run before the new code can be tested. `@parallel-coordinator` identifies these cases from the Wave 2 output and adjusts accordingly.
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
### Wave 4 — Verification (always parallel)
|
|
94
|
-
|
|
95
|
-
**Agents:** `@reviewer` + `@security-auditor`
|
|
96
|
-
|
|
97
|
-
Both agents review the same codebase snapshot but look for different issues — they can always run in parallel.
|
|
98
|
-
|
|
99
|
-
- **`@reviewer`** — checks code quality, logic correctness, error handling completeness, naming, and adherence to the project's coding standards
|
|
100
|
-
- **`@security-auditor`** — runs through the OWASP checklist, checks authentication and authorization logic, scans for injection vulnerabilities, and verifies that no secrets are present in the diff
|
|
101
|
-
|
|
102
|
-
Wave 4 produces a joint findings report. Findings are classified as:
|
|
103
|
-
|
|
104
|
-
| Severity | Meaning |
|
|
105
|
-
|----------|---------|
|
|
106
|
-
| **Critical** | Must be resolved before the code is merged |
|
|
107
|
-
| **Major** | Should be resolved; skipping requires explicit justification |
|
|
108
|
-
| **Minor** | Suggestions; no blocking requirement |
|
|
109
|
-
|
|
110
|
-
If Critical findings exist, the flow returns to Wave 3 (`@coder`) for remediation before re-entering Wave 4.
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## Triggering Parallel Execution
|
|
115
|
-
|
|
116
|
-
### Automatic (via `/fd-new-feature`)
|
|
117
|
-
|
|
118
|
-
```
|
|
119
|
-
/fd-new-feature "payment integration with Stripe"
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
The `@orchestrator` estimates scope for every `/fd-new-feature` call. If the feature exceeds approximately 30 minutes of estimated work, `@orchestrator` automatically hands off to `@parallel-coordinator`, which builds the WAVE TABLE and begins Wave 1.
|
|
123
|
-
|
|
124
|
-
You do not need to specify parallel execution — it is selected based on scope.
|
|
125
|
-
|
|
126
|
-
### Manual (direct invocation)
|
|
127
|
-
|
|
128
|
-
For work that does not go through `/fd-new-feature`, invoke `@parallel-coordinator` directly:
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
@parallel-coordinator I need to implement the notification system.
|
|
132
|
-
Track 1: email notifications via SendGrid
|
|
133
|
-
Track 2: push notifications via Firebase FCM
|
|
134
|
-
Track 3: SMS notifications via Twilio
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
`@parallel-coordinator` will:
|
|
138
|
-
1. Identify which tracks are fully independent
|
|
139
|
-
2. Build a WAVE TABLE appropriate for the work
|
|
140
|
-
3. Manage agent dispatch, output collection, and inter-wave handoffs
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Merge Protocol
|
|
145
|
-
|
|
146
|
-
After parallel waves complete, `@parallel-coordinator` classifies the combined output by conflict type:
|
|
147
|
-
|
|
148
|
-
- **Additive** — each agent touched different files and different modules. These are merged automatically with no manual review required.
|
|
149
|
-
- **Structural** — agents touched the same module but made compatible changes (e.g., both added new functions to the same file). `@parallel-coordinator` merges and flags the overlapping area for `@reviewer`.
|
|
150
|
-
- **Contradictory** — agents produced conflicting design decisions (e.g., `@coder` implemented a REST interface while `@tester` assumed a message queue). These are escalated to `@architect` for resolution before any merge occurs.
|
|
151
|
-
|
|
152
|
-
The merge classification is written to `.planning/phases/*/MERGE.md` so the resolution is traceable.
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## Using the `run-parallel` Tool
|
|
157
|
-
|
|
158
|
-
The `run-parallel` plugin tool is available in all FlowDeck sessions. It provides lower-level control over parallel dispatch when you want to coordinate agents yourself without going through `@parallel-coordinator`:
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
Use the run-parallel tool to execute @researcher and @code-explorer simultaneously
|
|
162
|
-
on the topic of rate-limiting strategies for REST APIs.
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
```
|
|
166
|
-
Use the run-parallel tool to run @reviewer on src/payments/ and
|
|
167
|
-
@security-auditor on src/payments/ at the same time, then combine their findings.
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
`run-parallel` is best used when:
|
|
171
|
-
- You have exactly two independent tasks and do not need full WAVE TABLE management
|
|
172
|
-
- You want to parallelize review and audit on a specific directory after manual edits
|
|
173
|
-
- You are running a one-off investigation, not a full feature pipeline
|
|
174
|
-
|
|
175
|
-
For full feature work, prefer `/fd-new-feature` or direct `@parallel-coordinator` invocation over the `run-parallel` tool.
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
## Using the `delegate` Tool
|
|
180
|
-
|
|
181
|
-
The `delegate` tool runs a single agent in an isolated child session and returns its output. Use it when you need a focused sub-task completed by a specific agent without disrupting the current session context:
|
|
182
|
-
|
|
183
|
-
```
|
|
184
|
-
Use the delegate tool to ask @security-auditor to review src/auth/login.ts
|
|
185
|
-
and report back any vulnerabilities found.
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
```
|
|
189
|
-
Use the delegate tool with context "existing schema: ..." to ask @architect to
|
|
190
|
-
propose a migration plan.
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
`delegate` supports an optional `context` field — any string prepended to the agent's prompt. This is useful for passing output from a prior step without polluting the current conversation.
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
## Using the `run-pipeline` Tool
|
|
198
|
-
|
|
199
|
-
The `run-pipeline` tool chains agents sequentially: each step's output becomes part of the next step's input. This is the right tool when tasks must happen in order and each depends on the previous result:
|
|
200
|
-
|
|
201
|
-
```
|
|
202
|
-
Use the run-pipeline tool with steps:
|
|
203
|
-
1. agent: planner, prompt: "Analyze the codebase and produce an implementation plan for the auth refactor"
|
|
204
|
-
2. agent: coder, prompt: "Implement the plan"
|
|
205
|
-
3. agent: reviewer, prompt: "Review the implementation for correctness and security"
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
Key behaviors:
|
|
209
|
-
- Each step gets its own fresh child session (no hidden state accumulates between steps)
|
|
210
|
-
- The previous step's text output is automatically prepended to the next step's prompt
|
|
211
|
-
- Set `abort_on_failure: false` to continue the pipeline even if a step fails
|
|
212
|
-
- Provide `initial_context` to seed the first step with prior information
|
|
213
|
-
|
|
214
|
-
---
|
|
215
|
-
|
|
216
|
-
## Implementation Notes
|
|
217
|
-
|
|
218
|
-
All three dispatch tools (`run-parallel`, `delegate`, `run-pipeline`) create real OpenCode child sessions via `client.session.create` and `client.session.prompt`. They:
|
|
219
|
-
|
|
220
|
-
- Use `parentID` to link child sessions to the current session
|
|
221
|
-
- Check both transport-level errors (`response.error`) and agent-level errors (`response.data.info.error`)
|
|
222
|
-
- Register an abort listener on the parent context so child sessions are cancelled if the parent aborts
|
|
223
|
-
- Return structured JSON with per-task/step results including `session_id`, `success`, and `duration_ms`
|
|
224
|
-
|
|
225
|
-
---
|
|
226
|
-
|
|
227
|
-
← [Back to Index](index.md)
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Pre-change analysis — runs impact radar, blast radius, regression prediction, test gaps, volatility, and reviewer routing in one report
|
|
3
|
-
argument-hint: [change description]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Analyze Change
|
|
7
|
-
|
|
8
|
-
Run a comprehensive pre-change analysis combining all intelligence tools into a single report.
|
|
9
|
-
|
|
10
|
-
**Input:** $ARGUMENTS — description of the proposed change
|
|
11
|
-
|
|
12
|
-
## Steps
|
|
13
|
-
|
|
14
|
-
Run all analyses in parallel:
|
|
15
|
-
|
|
16
|
-
1. **Impact Radar** — which files/APIs/tests are affected (see `/fd-impact-radar`)
|
|
17
|
-
2. **Blast Radius** — downstream consequences and hidden couplings (see `/fd-blast-radius`)
|
|
18
|
-
3. **Regression Predict** — most likely regression categories (see `/fd-regression-predict`)
|
|
19
|
-
4. **Test Gap** — coverage gaps to fill before implementing (see `/fd-test-gap`)
|
|
20
|
-
5. **Volatility** — check `.codebase/VOLATILITY.json` for hotspot scores on affected files
|
|
21
|
-
6. **Review Route** — who should review this change (see `/fd-review-route`)
|
|
22
|
-
|
|
23
|
-
## Consolidated Report
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
════════════════════════════════════════════════════
|
|
27
|
-
PRE-CHANGE ANALYSIS: "$ARGUMENTS"
|
|
28
|
-
════════════════════════════════════════════════════
|
|
29
|
-
|
|
30
|
-
IMPACT (<N> files affected)
|
|
31
|
-
- <top 5 affected files with reason>
|
|
32
|
-
|
|
33
|
-
BLAST RADIUS (risk: <low|medium|high>)
|
|
34
|
-
- <key downstream risks>
|
|
35
|
-
|
|
36
|
-
REGRESSIONS (top 3 risks)
|
|
37
|
-
🔴 <category> — <reason>
|
|
38
|
-
🟠 <category> — <reason>
|
|
39
|
-
|
|
40
|
-
TEST GAPS (<N> gaps found)
|
|
41
|
-
- CRITICAL: <gap>
|
|
42
|
-
- HIGH: <gap>
|
|
43
|
-
|
|
44
|
-
VOLATILITY
|
|
45
|
-
Hot zones touched: <list or "none">
|
|
46
|
-
|
|
47
|
-
REVIEW ROUTING
|
|
48
|
-
→ <reviewer type> (<reason>)
|
|
49
|
-
|
|
50
|
-
────────────────────────────────────────────────────
|
|
51
|
-
RECOMMENDATION: <proceed | add tests first | redesign | review required>
|
|
52
|
-
|
|
53
|
-
Next steps:
|
|
54
|
-
1. <most important action>
|
|
55
|
-
2. <second action>
|
|
56
|
-
════════════════════════════════════════════════════
|
|
57
|
-
```
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Manage approval requests — list pending approvals, approve or reject a request by ID
|
|
3
|
-
argument-hint: [list | approve <id> | reject <id> [reason]]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Approve
|
|
7
|
-
|
|
8
|
-
Manage approval requests for guarded changes.
|
|
9
|
-
|
|
10
|
-
**Input:** $ARGUMENTS
|
|
11
|
-
|
|
12
|
-
## Behavior
|
|
13
|
-
|
|
14
|
-
### List Pending (`list` or no arguments)
|
|
15
|
-
|
|
16
|
-
Read `.planning/approvals.json`. Display all pending approval requests:
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
════════════════════════════════════════
|
|
20
|
-
PENDING APPROVALS
|
|
21
|
-
════════════════════════════════════════
|
|
22
|
-
ID | Change | Risk | Requested
|
|
23
|
-
---------|---------------------------|-------|----------
|
|
24
|
-
APR-001 | Edit auth middleware | HIGH | <time>
|
|
25
|
-
APR-002 | Update DB migration | MED | <time>
|
|
26
|
-
════════════════════════════════════════
|
|
27
|
-
Use: /fd-approve approve <ID> or /fd-approve reject <ID> [reason]
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
If no pending approvals: "No pending approvals."
|
|
31
|
-
|
|
32
|
-
### Approve (`approve <ID>`)
|
|
33
|
-
|
|
34
|
-
1. Read `.planning/approvals.json`
|
|
35
|
-
2. Find approval with matching ID
|
|
36
|
-
3. Update status to `approved`, set `approved_at` timestamp
|
|
37
|
-
4. Write updated file
|
|
38
|
-
5. Report: "APR-XXX approved. Change may proceed."
|
|
39
|
-
|
|
40
|
-
### Reject (`reject <ID> [reason]`)
|
|
41
|
-
|
|
42
|
-
1. Find approval with matching ID
|
|
43
|
-
2. Update status to `rejected`, set `rejected_at` and `reason`
|
|
44
|
-
3. Report: "APR-XXX rejected. Reason: <reason>."
|
|
45
|
-
|
|
46
|
-
## Approval File Format
|
|
47
|
-
|
|
48
|
-
`.planning/approvals.json`:
|
|
49
|
-
```json
|
|
50
|
-
{
|
|
51
|
-
"approvals": [
|
|
52
|
-
{
|
|
53
|
-
"id": "APR-001",
|
|
54
|
-
"change": "<description>",
|
|
55
|
-
"risk_score": 0.8,
|
|
56
|
-
"requested_at": "<timestamp>",
|
|
57
|
-
"status": "pending|approved|rejected",
|
|
58
|
-
"approved_at": null,
|
|
59
|
-
"rejected_at": null,
|
|
60
|
-
"reason": null
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
```
|