@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
package/docs/configuration.md
CHANGED
|
@@ -268,6 +268,8 @@ These are enabled by default. If you have API keys (e.g., `CONTEXT7_API_KEY`, `E
|
|
|
268
268
|
| `XDG_CONFIG_HOME` | `~/.config` | Standard XDG base directory; used to resolve `OPENCODE_CONFIG_DIR` when not explicitly set |
|
|
269
269
|
| `FLOWDECK_CONTEXT_LIMIT` | `200000` | Token limit used by the Context Window Monitor to warn when context usage exceeds 70% |
|
|
270
270
|
| `FLOWDECK_DISABLE_MCP` | (empty) | Comma-separated list of remote MCPs to disable. Valid options: `context7`, `websearch`, `grep_app` |
|
|
271
|
+
| `FLOWDECK_ORCHESTRATOR_GUARD` | `off` | Enable the orchestrator guard hook. When `on`, the orchestrator session cannot use write/bash tools directly and must delegate all implementation work. |
|
|
272
|
+
| `TELEMETRY_ENABLED` | `false` | Enable telemetry events from hooks. When `true`, events are written to `.codebase/TELEMETRY.jsonl`. |
|
|
271
273
|
|
|
272
274
|
---
|
|
273
275
|
|
|
@@ -278,7 +280,6 @@ When the `@dv.nghiem/flowdeck` plugin is loaded, six tools become available to e
|
|
|
278
280
|
| `planning-state` | Read and write `.planning/` state files (`STATE.md`, `PLAN.md`, `DISCUSS.md`, `config.json`). Used by every agent that needs project context. |
|
|
279
281
|
| `codebase-state` | Read `.codebase/` documentation files generated by `@mapper`. Gives agents access to `STACK.md`, `ARCHITECTURE.md`, and `CONVENTIONS.md`. |
|
|
280
282
|
| `workspace-state` | Read workspace and multi-repo metadata. Returns the current project config, sub-repo list, and active phase. |
|
|
281
|
-
| `run-parallel` | Fan out a set of independent agent tasks simultaneously. Used by `@parallel-coordinator` to execute wave tasks concurrently. |
|
|
282
283
|
| `run-pipeline` | Execute a sequence of agent tasks in strict order, passing each step's output as input to the next. Used by `@orchestrator` for ordered workflows. |
|
|
283
284
|
| `delegate` | Invoke a specific named agent with a given prompt and context. The core primitive used by orchestration agents to hand off work. |
|
|
284
285
|
| `hash-edit` | Reliable file editing with content verification. Takes target content and its expected hash to prevent edits on stale versions. |
|
package/docs/index.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FlowDeck Documentation
|
|
2
2
|
|
|
3
|
-
FlowDeck is an OpenCode plugin that brings structured, multi-agent workflow orchestration to your development sessions. It coordinates
|
|
3
|
+
FlowDeck is an OpenCode plugin that brings structured, multi-agent workflow orchestration to your development sessions. It coordinates specialist agents through a four-phase cycle — discuss, plan, execute, review — with persistent state stored in your project's `.planning/` directory.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -18,12 +18,13 @@ FlowDeck is an OpenCode plugin that brings structured, multi-agent workflow orch
|
|
|
18
18
|
|
|
19
19
|
| Document | Description |
|
|
20
20
|
|----------|-------------|
|
|
21
|
-
| [Agents](agents.md) | All
|
|
22
|
-
| [Skills](skills.md) |
|
|
23
|
-
| [Commands](commands.md) | All
|
|
24
|
-
| [Workflows](workflows.md) |
|
|
21
|
+
| [Agents](agents.md) | All specialist agents — names, roles, models, and when to invoke each one |
|
|
22
|
+
| [Skills](skills.md) | Reusable skill patterns for common tasks |
|
|
23
|
+
| [Commands](commands.md) | All 18 slash commands — syntax, arguments, and what each command triggers |
|
|
24
|
+
| [Workflows](workflows.md) | Built-in workflows for common scenarios |
|
|
25
25
|
| [Rules](rules.md) | Language and common rule files — what they enforce and how to activate them |
|
|
26
|
-
| [Intelligence Features](intelligence.md) |
|
|
26
|
+
| [Intelligence Features](intelligence.md) | AI-safety features for pre-change analysis and risk assessment |
|
|
27
|
+
| [Memory System](memory.md) | Persistent memory — recall past sessions, tool executions, and context across sessions |
|
|
27
28
|
|
|
28
29
|
---
|
|
29
30
|
|
|
@@ -31,7 +32,6 @@ FlowDeck is an OpenCode plugin that brings structured, multi-agent workflow orch
|
|
|
31
32
|
|
|
32
33
|
| Document | Description |
|
|
33
34
|
|----------|-------------|
|
|
34
|
-
| [Parallel Execution](parallel-execution.md) | How FlowDeck fans out independent tasks across multiple agents simultaneously |
|
|
35
35
|
| [Multi-Repo](multi-repo.md) | Coordinating changes across two or more repositories in a single session |
|
|
36
36
|
| [Notifications](notifications.md) | Desktop and system alerts for long-running task completion |
|
|
37
37
|
|
|
@@ -50,26 +50,20 @@ FlowDeck is an OpenCode plugin that brings structured, multi-agent workflow orch
|
|
|
50
50
|
|
|
51
51
|
| Command | What it does |
|
|
52
52
|
|---------|--------------|
|
|
53
|
-
| `/fd-new-project <name>` | Initialize
|
|
54
|
-
| `/fd-discuss <
|
|
55
|
-
| `/fd-plan
|
|
56
|
-
| `/fd-new-feature "<description>"` | Execute full feature workflow
|
|
57
|
-
| `/fd-review-code [staged\|branch]` | Parallel review by `@reviewer`, `@security-auditor`, `@tester` |
|
|
53
|
+
| `/fd-new-project <name>` | Initialize project with planning structure and default config |
|
|
54
|
+
| `/fd-discuss <topic>` | Run structured requirements Q&A to capture decisions |
|
|
55
|
+
| `/fd-plan [--phase=N]` | Generate implementation plan from decisions (requires CONFIRM) |
|
|
56
|
+
| `/fd-new-feature "<description>"` | Execute full feature workflow with TDD discipline |
|
|
58
57
|
| `/fd-fix-bug "<description>"` | Diagnose and fix a bug with regression test |
|
|
58
|
+
| `/fd-deploy-check [--check=deploy,review,analysis]` | Pre-deploy checks, code review, or pre-change analysis |
|
|
59
|
+
| `/fd-status [--roadmap\|--workspace\|--phase=N]` | Combined status, roadmap, and workspace view |
|
|
59
60
|
| `/fd-checkpoint` | Save current state — safe to close the session after this |
|
|
60
|
-
| `/fd-resume` | Reload
|
|
61
|
-
| `/fd-
|
|
62
|
-
| `/fd-map-codebase` | Generate `.codebase/` documentation
|
|
63
|
-
| `/fd-
|
|
64
|
-
| `/fd-
|
|
65
|
-
| `/fd-
|
|
66
|
-
| `/fd-
|
|
67
|
-
| `/fd-
|
|
68
|
-
| `/fd-
|
|
69
|
-
| `/fd-impact-radar` | Predict affected files/APIs/tests before editing |
|
|
70
|
-
| `/fd-blast-radius` | Show downstream consequences and hidden dependencies of a change |
|
|
71
|
-
| `/fd-translate-intent` | Convert vague request into ranked concrete implementation options |
|
|
72
|
-
| `/fd-volatility-map` | Show unstable code zones by churn and hotfix frequency |
|
|
73
|
-
| `/fd-regression-predict` | Estimate likely regression categories before making a change |
|
|
74
|
-
| `/fd-test-gap` | Identify weakly-tested areas in a proposed change |
|
|
75
|
-
| `/fd-review-route` | Route risky patches to security, backend, infra, or domain reviewers |
|
|
61
|
+
| `/fd-resume [--yes]` | Reload STATE.md and PLAN.md to continue interrupted session |
|
|
62
|
+
| `/fd-reflect [--mode=reflect,learn]` | Post-session reflection or capture skill from session |
|
|
63
|
+
| `/fd-map-codebase [--incremental]` | Generate `.codebase/` documentation |
|
|
64
|
+
| `/fd-write-docs [--scope=path]` | Generate documentation from public APIs |
|
|
65
|
+
| `/fd-multi-repo <list\|add\|remove\|status>` | Manage multi-repo configuration |
|
|
66
|
+
| `/fd-translate-intent "<vague request>"` | Convert vague request into ranked implementation options |
|
|
67
|
+
| `/fd-ask "<question>"` | Route question to specialist agent |
|
|
68
|
+
| `/fd-quick "<task>"` | Quick focused task with automatic agent selection |
|
|
69
|
+
| `/fd-doctor` | Check FlowDeck installation and environment health |
|
package/docs/memory.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Memory System
|
|
2
|
+
|
|
3
|
+
FlowDeck includes a persistent memory system that stores tool executions, assistant messages, and session summaries. This helps agents recall what was worked on in previous sessions.
|
|
4
|
+
|
|
5
|
+
## How It Works
|
|
6
|
+
|
|
7
|
+
Memory is automatically captured during sessions:
|
|
8
|
+
|
|
9
|
+
1. **Session Start** — Session is registered with project directory
|
|
10
|
+
2. **Tool Execution** — Every tool call (Read, Write, Edit, Bash, etc.) is stored
|
|
11
|
+
3. **Assistant Messages** — Agent responses are captured
|
|
12
|
+
4. **Session Compact/Summary** — End-of-session summaries are stored
|
|
13
|
+
|
|
14
|
+
## Storage
|
|
15
|
+
|
|
16
|
+
- **Location**: `~/.flowdeck-memory/memory.db`
|
|
17
|
+
- **Format**: SQLite database (using `bun:sqlite`)
|
|
18
|
+
- **Tables**:
|
|
19
|
+
- `sessions` — Session metadata (project, directory, timestamps)
|
|
20
|
+
- `observations` — Tool executions and messages
|
|
21
|
+
- `summaries` — Session summaries
|
|
22
|
+
|
|
23
|
+
## Using Memory
|
|
24
|
+
|
|
25
|
+
### Search Tool
|
|
26
|
+
|
|
27
|
+
Use the `memory-search` tool to query past observations:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
tool: memory-search
|
|
31
|
+
args: { query: "authentication", limit: 5 }
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Arguments:**
|
|
35
|
+
- `query` (optional) — Search text for tool names, inputs, and outputs
|
|
36
|
+
- `session_id` (optional) — Retrieve all observations from a specific session
|
|
37
|
+
- `limit` (optional) — Max results (default: 10)
|
|
38
|
+
|
|
39
|
+
### Example Queries
|
|
40
|
+
|
|
41
|
+
```javascript
|
|
42
|
+
// Search for specific work
|
|
43
|
+
tool: memory-search
|
|
44
|
+
args: { query: "Redis cache" }
|
|
45
|
+
|
|
46
|
+
// Get recent sessions
|
|
47
|
+
tool: memory-search
|
|
48
|
+
args: { limit: 10 }
|
|
49
|
+
|
|
50
|
+
// Get all observations from a session
|
|
51
|
+
tool: memory-search
|
|
52
|
+
args: { session_id: "abc-123" }
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Context Injection
|
|
56
|
+
|
|
57
|
+
When a new session starts in the same directory, FlowDeck can optionally inject relevant context from previous sessions. This helps maintain continuity across sessions.
|
|
58
|
+
|
|
59
|
+
## Privacy
|
|
60
|
+
|
|
61
|
+
- Memory is stored per-user at `~/.flowdeck-memory/`
|
|
62
|
+
- Each project directory has its own session tracking
|
|
63
|
+
- Use session.delete event to remove specific sessions
|
|
64
|
+
|
|
65
|
+
## Configuration
|
|
66
|
+
|
|
67
|
+
No configuration required — memory is enabled by default.
|
|
68
|
+
|
|
69
|
+
To disable memory tracking for a project, you would need to modify the session tracking hooks in the FlowDeck plugin configuration.
|
package/docs/quick-start.md
CHANGED
|
@@ -123,7 +123,7 @@ Once the plan is confirmed, start implementation:
|
|
|
123
123
|
3. **Wave 3** — `@tester` writes and runs tests against the completed implementation
|
|
124
124
|
4. **Wave 4** — `@reviewer` reviews the full changeset
|
|
125
125
|
|
|
126
|
-
You see progress updates as each wave completes. Independent tasks within a wave run simultaneously via
|
|
126
|
+
You see progress updates as each wave completes. Independent tasks within a wave run simultaneously via OpenCode's multi-agent capabilities.
|
|
127
127
|
|
|
128
128
|
---
|
|
129
129
|
|
package/docs/workflows.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Command Architecture
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
FlowDeck commands are the single entry point for all operations. Each command embeds its workflow steps directly — no separate workflow files are needed.
|
|
4
4
|
|
|
5
|
-
## How
|
|
5
|
+
## How Commands Work
|
|
6
6
|
|
|
7
7
|
1. You run a command (e.g., `/fd-plan`)
|
|
8
|
-
2. The command
|
|
9
|
-
3. The AI
|
|
10
|
-
4. Each step
|
|
11
|
-
5. The
|
|
8
|
+
2. The command template is loaded with its embedded workflow steps
|
|
9
|
+
3. The AI follows the step-by-step process defined in the command
|
|
10
|
+
4. Each step may spawn agents or perform actions
|
|
11
|
+
5. The command may pause for user confirmation before irreversible actions
|
|
12
12
|
|
|
13
13
|
## The Core FlowDeck Cycle
|
|
14
14
|
|
|
@@ -32,345 +32,97 @@ Each step gates the next. `/fd-plan` will not proceed without a confirmed `DISCU
|
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## Command Reference
|
|
36
36
|
|
|
37
|
-
|
|
|
38
|
-
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
|
|
|
37
|
+
| Command | Purpose | Key Agents |
|
|
38
|
+
|---------|---------|------------|
|
|
39
|
+
| `/fd-new-project` | Bootstrap a new project | @orchestrator |
|
|
40
|
+
| `/fd-map-codebase` | Analyse and index the codebase | @mapper (×6 parallel) |
|
|
41
|
+
| `/fd-settings` | Configure FlowDeck settings | @orchestrator |
|
|
42
|
+
| `/fd-discuss` | Pre-planning discussion | @discusser |
|
|
43
|
+
| `/fd-plan` | Generate a phase plan | @planner, @plan-checker |
|
|
44
|
+
| `/fd-roadmap` | View / update project roadmap | @orchestrator |
|
|
45
|
+
| `/fd-dashboard` | Visual progress dashboard | — |
|
|
46
|
+
| `/fd-ask` | Smart agent dispatch | various |
|
|
47
|
+
| `/fd-new-feature` | Implement a new feature | @coder, @tester, @reviewer |
|
|
48
|
+
| `/fd-fix-bug` | Fix a bug with TDD | @debug-specialist, @tester, @coder |
|
|
49
|
+
| `/fd-review-code` | Code review | @reviewer, @researcher, @tester |
|
|
50
|
+
| `/fd-write-docs` | Generate documentation | @writer, @reviewer |
|
|
51
|
+
| `/fd-deploy-check` | Pre-deploy safety check | @tester, @security-auditor, @reviewer |
|
|
52
|
+
| `/fd-progress` | View project progress | — |
|
|
53
|
+
| `/fd-checkpoint` | Save a session checkpoint | — |
|
|
54
|
+
| `/fd-resume` | Resume from checkpoint | — |
|
|
55
|
+
| `/fd-multi-repo` | Multi-repo orchestration | @multi-repo-coordinator, @architect |
|
|
53
56
|
|
|
54
57
|
---
|
|
55
58
|
|
|
56
|
-
##
|
|
59
|
+
## Analysis Commands
|
|
57
60
|
|
|
58
|
-
|
|
61
|
+
These umbrella commands combine multiple analysis modules:
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
Before the file is marked confirmed, `@orchestrator` presents a summary of all decisions to the user and requires explicit confirmation. Nothing in DISCUSS.md is treated as locked until the user confirms.
|
|
67
|
-
|
|
68
|
-
**Steps:**
|
|
69
|
-
1. `@orchestrator` — Load `PROJECT.md` and `STATE.md`
|
|
70
|
-
2. `@orchestrator` — Extract current phase number
|
|
71
|
-
3. `@discusser` — Q&A loop, one question per turn
|
|
72
|
-
4. `@discusser` — Record decisions with D-XX numbering
|
|
73
|
-
5. `@discusser` — Save to `.planning/phases/phase-N/DISCUSS.md`
|
|
74
|
-
6. `@orchestrator` — Present summary; require user confirmation
|
|
75
|
-
|
|
76
|
-
**Workflow format:**
|
|
77
|
-
```yaml
|
|
78
|
-
---
|
|
79
|
-
name: discuss-flow
|
|
80
|
-
description: "Orchestrates discuss phase (context load → @discusser Q&A → pause → decisions → save)"
|
|
81
|
-
triggers:
|
|
82
|
-
- /fd-discuss
|
|
83
|
-
steps:
|
|
84
|
-
- name: load_context
|
|
85
|
-
agent: "@orchestrator"
|
|
86
|
-
priority: first
|
|
87
|
-
action: Load PROJECT.md and current phase STATE.md
|
|
88
|
-
- name: determine_phase
|
|
89
|
-
agent: "@orchestrator"
|
|
90
|
-
action: Extract current phase number from STATE.md
|
|
91
|
-
- name: invoke_discusser
|
|
92
|
-
agent: "@discusser"
|
|
93
|
-
action: Spawn @discusser agent with project context
|
|
94
|
-
- name: qa_loop
|
|
95
|
-
agent: "@discusser"
|
|
96
|
-
action: Discusser asks one question at a time; user responds; repeat until all topics covered
|
|
97
|
-
- name: save_decisions
|
|
98
|
-
agent: "@discusser"
|
|
99
|
-
action: Write all decisions to .planning/phases/phase-N/DISCUSS.md with D-XX numbering
|
|
100
|
-
- name: confirm_discuss
|
|
101
|
-
agent: "@orchestrator"
|
|
102
|
-
action: Present summary to user; require explicit confirmation before marking DISCUSS.md as confirmed
|
|
103
|
-
---
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
### plan-flow
|
|
109
|
-
|
|
110
|
-
**Triggered by:** `/fd-plan`
|
|
111
|
-
|
|
112
|
-
The plan flow creates an execution-ready `PLAN.md` from the decisions in a confirmed `DISCUSS.md`. It starts with a guard check — if `DISCUSS.md` does not exist or is not confirmed, execution stops and the user is directed to run `/fd-discuss` first.
|
|
113
|
-
|
|
114
|
-
After loading context (`PROJECT.md`, `STATE.md`, `DISCUSS.md`), `@planner` creates a wave-structured `PLAN.md` where every task traces back to a `D-XX` decision. The draft plan is then handed to `@plan-checker`, which scores it for completeness, feasibility, and testability.
|
|
115
|
-
|
|
116
|
-
A FAIL verdict from `@plan-checker` returns the plan to `@planner` for revision. A PASS (or PASS_WITH_NOTES) causes `@orchestrator` to present the plan to the user. Execution **pauses here** — the plan is not saved until the user explicitly confirms it. After confirmation, the plan is saved to `.planning/phases/phase-N/PLAN.md` and `STATE.md` is updated.
|
|
117
|
-
|
|
118
|
-
**Steps:**
|
|
119
|
-
1. `@orchestrator` — Guard check: verify `DISCUSS.md` exists and is confirmed
|
|
120
|
-
2. `@orchestrator` — Load `PROJECT.md`, `STATE.md`, `DISCUSS.md`
|
|
121
|
-
3. `@planner` — Create `PLAN.md` with tasks traced to D-XX decisions
|
|
122
|
-
4. `@plan-checker` — Verify completeness, feasibility, testability; return PASS or FAIL
|
|
123
|
-
5. `@orchestrator` — Present draft plan for user review
|
|
124
|
-
6. `@orchestrator` — **PAUSE** — wait for explicit user CONFIRM before saving
|
|
125
|
-
7. `@orchestrator` — Save confirmed `PLAN.md` to `.planning/phases/phase-N/`
|
|
126
|
-
8. `@orchestrator` — Update `STATE.md` with plan file path
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
### plan-phase
|
|
131
|
-
|
|
132
|
-
**Triggered by:** `/fd-plan-phase [N]`
|
|
133
|
-
|
|
134
|
-
A focused sub-flow for creating a plan for a specific numbered phase. Unlike `plan-flow`, which drives the full `/fd-plan` command, `plan-phase` is a targeted invocation that takes a phase number as an argument and operates only on that phase's scope.
|
|
135
|
-
|
|
136
|
-
`@planner` is spawned with the phase's `REQUIREMENTS.md` (or `DISCUSS.md`), `ROADMAP.md`, and `PROJECT.md`. It produces `.planning/phases/phase-N/PLAN.md`. `@plan-checker` then reviews the plan and returns PASS or FAIL with specific recommendations. Results are presented by `@orchestrator`.
|
|
137
|
-
|
|
138
|
-
**Steps:**
|
|
139
|
-
1. `@planner` — Create `PLAN.md` for the specified phase
|
|
140
|
-
2. `@plan-checker` — Score plan: completeness, feasibility, testability
|
|
141
|
-
3. `@orchestrator` — Present PASS/FAIL verdict and recommendations
|
|
63
|
+
| Command | Purpose | Flags |
|
|
64
|
+
|---------|---------|-------|
|
|
65
|
+
| `/fd-analyze-change` | Combined impact analysis | `--impact`, `--blast-radius`, `--regression`, `--test-gap`, `--volatility` |
|
|
66
|
+
| `/fd-guarded-edit` | Edit gate decision | auto/confirm/review/block |
|
|
67
|
+
| `/fd-evaluate-risk` | Standalone risk assessment | — |
|
|
68
|
+
| `/fd-translate-intent` | Intent to concrete options | `assumptions`, `recommended_option` |
|
|
142
69
|
|
|
143
70
|
---
|
|
144
71
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
**Triggered by:** `/fd-new-feature`
|
|
148
|
-
|
|
149
|
-
The execute flow drives full feature delivery. A guard check verifies that `.planning/` and `.codebase/` exist and that `PLAN.md` is confirmed — if any check fails, execution stops with a specific message directing the user to the missing prerequisite.
|
|
72
|
+
## Command Structure
|
|
150
73
|
|
|
151
|
-
|
|
74
|
+
Each command file (`src/commands/fd-*.md`) contains:
|
|
152
75
|
|
|
153
|
-
**
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
6. `@orchestrator` — Loop until all steps complete; update phase to `review`
|
|
76
|
+
1. **Frontmatter** — description and argument hint
|
|
77
|
+
2. **Purpose** — what the command does
|
|
78
|
+
3. **Input** — how to invoke it
|
|
79
|
+
4. **Process** — step-by-step workflow embedded directly
|
|
80
|
+
5. **Guards** — transition rules and blocking conditions
|
|
81
|
+
6. **Error Handling** — fail-fast rules
|
|
160
82
|
|
|
83
|
+
Example structure:
|
|
84
|
+
```markdown
|
|
161
85
|
---
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
**Triggered by:** `/execute-phase [N]`
|
|
166
|
-
|
|
167
|
-
A targeted sub-flow for executing a single numbered phase plan. Before delegating, `@orchestrator` verifies that `.planning/`, `.codebase/`, and `.planning/phases/phase-N/PLAN.md` all exist and that the plan has the `confirmed` status flag.
|
|
168
|
-
|
|
169
|
-
`@orchestrator` is spawned with `STATE.md`, `PLAN.md`, and `PROJECT.md`. It executes tasks in wave order, committing each atomically. After each task it checkpoints state via the planning-state tool. Deviations from the plan are documented in a `## Deviations` section of `PLAN.md`. After all tasks complete, `@orchestrator` writes `SUMMARY.md` and `@orchestrator` marks the phase complete in `STATE.md` and `ROADMAP.md`.
|
|
170
|
-
|
|
171
|
-
**Steps:**
|
|
172
|
-
1. `@orchestrator` — Verify prerequisites: `.planning/`, `.codebase/`, `PLAN.md` confirmed
|
|
173
|
-
2. `@orchestrator` — Load `PLAN.md`, `STATE.md`, `PROJECT.md`
|
|
174
|
-
3. `@orchestrator` — Execute tasks in wave order; atomic commit per task
|
|
175
|
-
4. `@orchestrator` — Checkpoint state after each task
|
|
176
|
-
5. `@orchestrator` — Write `SUMMARY.md`
|
|
177
|
-
6. `@orchestrator` — Mark phase complete in `STATE.md` and `ROADMAP.md`
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
### fix-bug-flow
|
|
182
|
-
|
|
183
|
-
**Triggered by:** `/fd-fix-bug`
|
|
184
|
-
|
|
185
|
-
A systematic bug fix workflow that guarantees a regression test exists before any fix is applied. `@orchestrator` loads `STATE.md`, `ARCHITECTURE.md`, and `CONVENTIONS.md` to give all agents the project context they need.
|
|
186
|
-
|
|
187
|
-
`@debug-specialist` reproduces the bug with a minimal case, documenting expected vs actual behavior. `@researcher` assists with root cause investigation by tracing the stack and reading related code. `@tester` writes a failing regression test that reproduces the exact failure — this test must fail before any fix is written. `@coder` then fixes the root cause (not the symptom) with the minimum change that makes the regression test pass. `@reviewer` checks the fix for quality and security regressions. Finally, `@tester` runs the full test suite to confirm everything is green.
|
|
188
|
-
|
|
189
|
-
**Steps:**
|
|
190
|
-
1. `@orchestrator` — Load `STATE.md`, `ARCHITECTURE.md`, `CONVENTIONS.md`
|
|
191
|
-
2. `@debug-specialist` — Reproduce bug; document inputs and expected vs actual
|
|
192
|
-
3. `@researcher` — Trace stack; identify root cause candidates
|
|
193
|
-
4. `@tester` — Write failing regression test
|
|
194
|
-
5. `@coder` — Fix root cause; minimum change to make regression test pass
|
|
195
|
-
6. `@reviewer` — Review fix for quality and security regressions
|
|
196
|
-
7. `@tester` — Run full suite; confirm regression test and all others pass
|
|
197
|
-
8. `@orchestrator` — Update `STATE.md` with fix summary
|
|
198
|
-
|
|
86
|
+
description: Brief description
|
|
87
|
+
argument-hint: [args]
|
|
199
88
|
---
|
|
200
89
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
**Triggered by:** `/debug`
|
|
90
|
+
# Command Name
|
|
204
91
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
`@debug-specialist` establishes a minimal reproduction case, reads the full stack trace from top to bottom, and traces the execution path backward to identify root cause. `@tester` then writes a failing regression test for the exact failure — not a general test, but one that fails for the specific reason `@debug-specialist` identified. `@coder` applies the minimal fix, and `@tester` verifies by running the regression test plus the full suite.
|
|
208
|
-
|
|
209
|
-
The cardinal rule of this workflow: never suppress an error to make a test pass. Fix the root cause.
|
|
210
|
-
|
|
211
|
-
**Steps:**
|
|
212
|
-
1. `@debug-specialist` — Establish minimal reproduction case
|
|
213
|
-
2. `@debug-specialist` — Trace execution path; identify root cause
|
|
214
|
-
3. `@tester` — Write failing regression test for the specific failure
|
|
215
|
-
4. `@coder` — Fix root cause with minimal change
|
|
216
|
-
5. `@tester` — Run regression test + full suite to confirm
|
|
217
|
-
|
|
218
|
-
---
|
|
92
|
+
**Input:** $ARGUMENTS
|
|
219
93
|
|
|
220
|
-
|
|
94
|
+
## Process
|
|
221
95
|
|
|
222
|
-
|
|
96
|
+
### Step 1: Context Load
|
|
97
|
+
...
|
|
223
98
|
|
|
224
|
-
|
|
99
|
+
### Step 2: Execute
|
|
100
|
+
...
|
|
225
101
|
|
|
226
|
-
|
|
102
|
+
## Guards
|
|
227
103
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
- `@reviewer` — security vulnerabilities and code quality
|
|
232
|
-
- `@researcher` — best-practice context for flagged areas
|
|
233
|
-
- `@tester` — test coverage for changed code
|
|
234
|
-
3. `@orchestrator` — Aggregate all findings by severity into unified report
|
|
235
|
-
|
|
236
|
-
---
|
|
237
|
-
|
|
238
|
-
### deploy-check-flow
|
|
239
|
-
|
|
240
|
-
**Triggered by:** `/fd-deploy-check`
|
|
241
|
-
|
|
242
|
-
A comprehensive pre-deployment check suite that runs four independent checks simultaneously and produces a single GO/NO-GO decision. Any CRITICAL or HIGH finding from any check produces NO-GO.
|
|
243
|
-
|
|
244
|
-
`@parallel-coordinator` launches all four checks at once: the full test suite (all tests pass, no unexplained skips), a security scan via `@security-auditor` (OWASP Top 10 on changed files), a CVE audit on dependencies, and a clean build verification. `@orchestrator` waits for all four to complete, aggregates the results, and produces the final GO or NO-GO verdict. A NO-GO includes a specific list of required fixes before the deployment can be retried.
|
|
245
|
-
|
|
246
|
-
**Steps:**
|
|
247
|
-
1. `@parallel-coordinator` — Run simultaneously:
|
|
248
|
-
- Full test suite
|
|
249
|
-
- Security scan (`@security-auditor`)
|
|
250
|
-
- CVE dependency audit
|
|
251
|
-
- Build verification
|
|
252
|
-
2. `@orchestrator` — Aggregate all results
|
|
253
|
-
3. `@orchestrator` — Produce GO/NO-GO decision; list required fixes if NO-GO
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
### refactor-flow
|
|
258
|
-
|
|
259
|
-
**Triggered by:** `/refactor`
|
|
260
|
-
|
|
261
|
-
A disciplined safe-refactoring workflow where the test suite must be green before the first line of code changes, and must stay green after every single transformation. No feature additions are permitted during a refactoring session.
|
|
262
|
-
|
|
263
|
-
`@tester` runs the suite and confirms it is green. If it is not green, the workflow stops — tests must be fixed before refactoring begins. `@mapper` reads the codebase and identifies refactoring candidates (large files, duplication, high complexity). `@refactor-guide` produces a list of specific transforms ordered from lowest to highest risk. `@coder` applies one transform, then `@tester` verifies the suite is still green. `@orchestrator` commits each transform separately with a `refactor:` prefix message. The loop repeats until all planned transforms are complete.
|
|
264
|
-
|
|
265
|
-
**Steps:**
|
|
266
|
-
1. `@tester` — Run suite; confirm green before any changes
|
|
267
|
-
2. `@mapper` — Identify refactoring candidates
|
|
268
|
-
3. `@refactor-guide` — List transforms in low-to-high risk order
|
|
269
|
-
4. Loop:
|
|
270
|
-
- `@coder` — Apply one transform
|
|
271
|
-
- `@tester` — Verify suite still green; if broken, undo
|
|
272
|
-
- `@orchestrator` — Commit with `refactor:` message
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
|
-
### write-docs-flow
|
|
277
|
-
|
|
278
|
-
**Triggered by:** `/fd-write-docs`
|
|
279
|
-
|
|
280
|
-
A documentation workflow that prioritizes accuracy over speed — every piece of documentation is verified against the actual code before it is finalized. The flow starts with exploration rather than writing.
|
|
281
|
-
|
|
282
|
-
`@code-explorer` maps all exported functions, classes, and types in the target scope, identifying public API entry points and key workflows. `@writer` uses that structural map to draft documentation covering API reference, examples, and usage patterns — it reads every source file it documents. `@reviewer` then checks the draft for accuracy against actual code behavior (not plausible-sounding descriptions, actual behavior). `@writer` incorporates reviewer feedback, and `@doc-updater` writes the final output to the appropriate location and ensures no stale references remain.
|
|
283
|
-
|
|
284
|
-
**Steps:**
|
|
285
|
-
1. `@code-explorer` — Map exports, public APIs, and key workflows in scope
|
|
286
|
-
2. `@writer` — Draft documentation from code exploration output
|
|
287
|
-
3. `@reviewer` — Accuracy check against actual code behavior
|
|
288
|
-
4. `@writer` — Revise based on review feedback
|
|
289
|
-
5. `@doc-updater` — Write final docs to appropriate location; remove stale references
|
|
290
|
-
|
|
291
|
-
---
|
|
292
|
-
|
|
293
|
-
### map-codebase-flow
|
|
294
|
-
|
|
295
|
-
**Triggered by:** `/fd-map-codebase`
|
|
296
|
-
|
|
297
|
-
Produces the six `.codebase/` documentation files in parallel using six `@mapper` instances, each assigned to one output file. Before running, `@orchestrator` checks whether `.codebase/` already exists and requires user confirmation before overwriting.
|
|
298
|
-
|
|
299
|
-
`@orchestrator` creates individual worktrees for each mapper instance to prevent file conflicts, then spawns all six `@mapper` agents simultaneously. Each mapper reads source files directly and writes only its assigned file: `STACK.md`, `ARCHITECTURE.md`, `STRUCTURE.md`, `CONVENTIONS.md`, `TESTING.md`, or `CONCERNS.md`. `@orchestrator` waits for all six to complete, then verifies each file exists and contains non-empty content. Worktrees are cleaned up regardless of success or failure.
|
|
300
|
-
|
|
301
|
-
**Steps:**
|
|
302
|
-
1. `@orchestrator` — Check if `.codebase/` exists; warn and require confirmation if present
|
|
303
|
-
2. `@orchestrator` — Create worktrees for each mapper instance
|
|
304
|
-
3. `@mapper` ×6 — Run in parallel, each writing its assigned `.codebase/` file
|
|
305
|
-
4. `@orchestrator` — Wait for all mappers to complete
|
|
306
|
-
5. `@orchestrator` — Clean up worktrees
|
|
307
|
-
6. `@orchestrator` — Verify all six files exist with non-empty content
|
|
308
|
-
|
|
309
|
-
**Output files:**
|
|
310
|
-
|
|
311
|
-
| File | Contents |
|
|
312
|
-
|------|---------|
|
|
313
|
-
| `.codebase/STACK.md` | Tech stack with exact pinned versions |
|
|
314
|
-
| `.codebase/ARCHITECTURE.md` | Component diagram and data flow |
|
|
315
|
-
| `.codebase/STRUCTURE.md` | Directory layout with purpose of each directory |
|
|
316
|
-
| `.codebase/CONVENTIONS.md` | Naming and coding patterns with file:line examples |
|
|
317
|
-
| `.codebase/TESTING.md` | Test frameworks, patterns, and file organization |
|
|
318
|
-
| `.codebase/CONCERNS.md` | All TODO, FIXME, and HACK markers found by grep |
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
|
-
### parallel-execution-flow
|
|
323
|
-
|
|
324
|
-
**Triggered by:** `@parallel-coordinator` (invoked from execute-flow or directly)
|
|
325
|
-
|
|
326
|
-
The parallel execution flow maximizes agent throughput by running independent workstreams simultaneously in waves. It is not triggered by a user command directly — it is invoked when `@orchestrator` or `@execute-flow` determines that parallel execution is appropriate for a plan.
|
|
327
|
-
|
|
328
|
-
`@parallel-coordinator` reads the active `PLAN.md`, identifies all tasks, and classifies each as blocking (must complete before something else) or independent (can run simultaneously). It then groups tasks into waves and emits a WAVE TABLE before delegating any agents.
|
|
329
|
-
|
|
330
|
-
The standard wave structure: Wave 1 runs `@researcher` and `@code-explorer` simultaneously (discovery); Wave 2 runs `@architect` alone (design, serial, gates Wave 3); Wave 3 runs `@coder` and `@tester` simultaneously (implementation from `@architect`'s contracts); Wave 4 runs `@reviewer` and `@security-auditor` simultaneously (validation). When Wave 3 tracks converge, `@parallel-coordinator` runs a merge protocol to detect and resolve any overlapping file changes.
|
|
331
|
-
|
|
332
|
-
**Steps:**
|
|
333
|
-
1. `@parallel-coordinator` — Read `PLAN.md`; classify tasks as blocking or independent
|
|
334
|
-
2. `@parallel-coordinator` — Group into waves; emit WAVE TABLE
|
|
335
|
-
3. Wave 1 (parallel): `@researcher` + `@code-explorer`
|
|
336
|
-
4. Wave 2 (serial): `@architect` (design from Wave 1 output)
|
|
337
|
-
5. Wave 3 (parallel): `@coder` + `@tester` (from `@architect` contracts)
|
|
338
|
-
6. `@parallel-coordinator` — Merge Wave 3 outputs; resolve conflicts
|
|
339
|
-
7. Wave 4 (parallel): `@reviewer` + `@security-auditor`
|
|
340
|
-
|
|
341
|
-
**WAVE TABLE format:**
|
|
342
|
-
```
|
|
343
|
-
╔══════════════════════════════════════════════════════════════╗
|
|
344
|
-
║ WAVE TABLE — [Job Title] ║
|
|
345
|
-
╠══════════════════════════════════════════════════════════════╣
|
|
346
|
-
║ Wave 1 (parallel) │ @researcher + @code-explorer ║
|
|
347
|
-
║ Wave 2 (serial) │ @architect ║
|
|
348
|
-
║ Wave 3 (parallel) │ @coder + @tester ║
|
|
349
|
-
║ Wave 4 (parallel) │ @reviewer + @security-auditor ║
|
|
350
|
-
╠══════════════════════════════════════════════════════════════╣
|
|
351
|
-
║ Est. sequential: │ 8h ║
|
|
352
|
-
║ Est. parallel: │ 4.5h ║
|
|
353
|
-
║ Dependency locks: │ Wave 3 blocked on Wave 2 output ║
|
|
354
|
-
╚══════════════════════════════════════════════════════════════╝
|
|
104
|
+
| Transition | Guard | If Violated |
|
|
105
|
+
|-----------|-------|-------------|
|
|
106
|
+
| A → B | condition | block |
|
|
355
107
|
```
|
|
356
108
|
|
|
357
109
|
---
|
|
358
110
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
**Triggered by:** `/fd-multi-repo`
|
|
362
|
-
|
|
363
|
-
Orchestrates a feature or fix that spans multiple repositories in a microservice architecture. Ensures changes propagate in the correct dependency order, API contracts are agreed before implementation, and integration is verified end-to-end before any service ships to production.
|
|
364
|
-
|
|
365
|
-
`@multi-repo-coordinator` reads the sub-repo registry from `.planning/config.json`, verifies all repository paths exist, and loads each service's tech stack. It then builds a dependency graph — which services call which — and classifies the change as breaking or non-breaking. `@architect` writes the contract-first change specification and a per-repo CHANGE PLAN ordered by the dependency graph. `@coder` and `@tester` implement and test changes in each repo in the correct order (upstream before downstream). After all repos are implemented, `@tester` and `@reviewer` run cross-repo integration verification and sign off on each repo before any service is deployed.
|
|
111
|
+
## Agent Configuration
|
|
366
112
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
113
|
+
| Agent | Purpose |
|
|
114
|
+
|-------|---------|
|
|
115
|
+
| @orchestrator | Coordinates multi-step workflows |
|
|
116
|
+
| @planner | Creates implementation plans |
|
|
117
|
+
| @coder | Implements code changes |
|
|
118
|
+
| @tester | Writes and runs tests |
|
|
119
|
+
| @reviewer | Reviews code quality |
|
|
120
|
+
| @researcher | Investigates and provides context |
|
|
121
|
+
| @security-auditor | Security vulnerability scanning |
|
|
122
|
+
| @architect | System design and patterns |
|
|
123
|
+
| @writer | Documentation generation |
|
|
124
|
+
| @mapper | Codebase analysis |
|
|
373
125
|
|
|
374
126
|
---
|
|
375
127
|
|
|
376
|
-
← [Back to Index](index.md)
|
|
128
|
+
← [Back to Index](index.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dv.nghiem/flowdeck",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "FlowDeck — structured planning and execution workflows for OpenCode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"src/commands",
|
|
21
21
|
"src/rules",
|
|
22
22
|
"src/skills",
|
|
23
|
-
"src/workflows",
|
|
24
23
|
"docs",
|
|
25
24
|
"postinstall.mjs"
|
|
26
25
|
],
|