@dv.nghiem/flowdeck 0.3.9 → 0.4.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 +13 -21
- package/dist/agents/code-explorer.d.ts.map +1 -1
- package/dist/agents/mapper.d.ts.map +1 -1
- package/dist/agents/orchestrator.d.ts.map +1 -1
- package/dist/agents/planner.d.ts.map +1 -1
- package/dist/agents/specialist.d.ts.map +1 -1
- package/dist/dashboard/server.mjs +12 -2
- package/dist/hooks/compaction-hook.d.ts +1 -2
- package/dist/hooks/compaction-hook.d.ts.map +1 -1
- package/dist/hooks/file-tracker.d.ts +6 -0
- package/dist/hooks/file-tracker.d.ts.map +1 -1
- package/dist/hooks/notifications.d.ts.map +1 -1
- package/dist/hooks/session-start.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +742 -794
- package/dist/lib/completion-validator.d.ts +51 -0
- package/dist/lib/completion-validator.d.ts.map +1 -0
- package/dist/lib/recommended-question.d.ts +24 -0
- package/dist/lib/recommended-question.d.ts.map +1 -0
- package/dist/lib/research-gate.d.ts +97 -0
- package/dist/lib/research-gate.d.ts.map +1 -0
- package/dist/lib/research-gate.test.d.ts +2 -0
- package/dist/lib/research-gate.test.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +12 -2
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/services/codegraph.d.ts +36 -0
- package/dist/services/codegraph.d.ts.map +1 -0
- package/dist/services/codegraph.test.d.ts +2 -0
- package/dist/services/codegraph.test.d.ts.map +1 -0
- package/dist/services/question-guard.d.ts +4 -0
- package/dist/services/question-guard.d.ts.map +1 -1
- package/dist/services/recommended-question.test.d.ts +2 -0
- package/dist/services/recommended-question.test.d.ts.map +1 -0
- package/dist/services/supervisor-binding.d.ts +3 -1
- package/dist/services/supervisor-binding.d.ts.map +1 -1
- package/dist/tools/codebase-index.d.ts +30 -0
- package/dist/tools/codebase-index.d.ts.map +1 -0
- package/dist/tools/codebase-index.test.d.ts +2 -0
- package/dist/tools/codebase-index.test.d.ts.map +1 -0
- package/dist/tools/codegraph-tool.d.ts +3 -0
- package/dist/tools/codegraph-tool.d.ts.map +1 -0
- package/dist/tools/planning-state-lib.d.ts +23 -0
- package/dist/tools/planning-state-lib.d.ts.map +1 -1
- package/docs/agents/index.md +154 -0
- package/docs/commands/fd-ask.md +71 -39
- package/docs/commands/fd-checkpoint.md +63 -8
- package/docs/commands/fd-deploy-check.md +166 -9
- package/docs/commands/fd-design.md +101 -0
- package/docs/commands/fd-discuss.md +87 -20
- package/docs/commands/fd-doctor.md +100 -13
- package/docs/commands/fd-done.md +215 -0
- package/docs/commands/fd-execute.md +104 -0
- package/docs/commands/fd-fix-bug.md +144 -24
- package/docs/commands/fd-map-codebase.md +85 -21
- package/docs/commands/fd-multi-repo.md +155 -40
- package/docs/commands/fd-new-feature.md +63 -19
- package/docs/commands/fd-plan.md +80 -27
- package/docs/commands/fd-quick.md +143 -29
- package/docs/commands/fd-reflect.md +81 -13
- package/docs/commands/fd-resume.md +65 -8
- package/docs/commands/fd-status.md +80 -12
- package/docs/commands/fd-suggest.md +114 -0
- package/docs/commands/fd-translate-intent.md +69 -9
- package/docs/commands/fd-verify.md +71 -14
- package/docs/commands/fd-write-docs.md +121 -8
- package/docs/concepts/architecture.md +163 -0
- package/docs/concepts/governance.md +242 -0
- package/docs/concepts/intelligence.md +145 -0
- package/docs/concepts/multi-repo.md +227 -0
- package/docs/concepts/workflows.md +205 -0
- package/docs/configuration/index.md +208 -0
- package/docs/configuration/opencode-settings.md +98 -0
- package/docs/getting-started/first-project.md +126 -0
- package/docs/getting-started/installation.md +73 -0
- package/docs/getting-started/quick-start.md +74 -0
- package/docs/index.md +36 -72
- package/docs/reference/hooks.md +176 -0
- package/docs/reference/rules.md +109 -0
- package/docs/skills/code-review.md +47 -0
- package/docs/skills/index.md +148 -0
- package/docs/skills/planning.md +39 -0
- package/package.json +1 -1
- package/src/commands/fd-discuss.md +74 -10
- package/src/commands/fd-done.md +196 -0
- package/src/commands/fd-execute.md +43 -6
- package/src/commands/fd-fix-bug.md +43 -6
- package/src/commands/fd-map-codebase.md +99 -19
- package/src/commands/fd-new-feature.md +14 -5
- package/src/commands/fd-plan.md +38 -1
- package/src/commands/fd-quick.md +1 -1
- package/src/commands/fd-resume.md +1 -1
- package/src/commands/fd-status.md +1 -1
- package/src/commands/fd-verify.md +16 -2
- package/src/commands/fd-write-docs.md +30 -5
- package/src/skills/context-load/SKILL.md +1 -1
- package/dist/hooks/memory-hook.d.ts +0 -28
- package/dist/hooks/memory-hook.d.ts.map +0 -1
- package/dist/services/memory-store.d.ts +0 -73
- package/dist/services/memory-store.d.ts.map +0 -1
- package/dist/services/memory-store.test.d.ts +0 -2
- package/dist/services/memory-store.test.d.ts.map +0 -1
- package/dist/tools/memory-search.d.ts +0 -3
- package/dist/tools/memory-search.d.ts.map +0 -1
- package/dist/tools/memory-status.d.ts +0 -3
- package/dist/tools/memory-status.d.ts.map +0 -1
- package/docs/USER_GUIDE.md +0 -20
- package/docs/agents.md +0 -544
- package/docs/best-practices.md +0 -47
- package/docs/commands/fd-new-project.md +0 -24
- package/docs/commands.md +0 -557
- package/docs/configuration.md +0 -325
- package/docs/design-first-workflow.md +0 -94
- package/docs/feature-integration-architecture.md +0 -227
- package/docs/installation.md +0 -123
- package/docs/intelligence.md +0 -370
- package/docs/memory.md +0 -69
- package/docs/multi-repo.md +0 -201
- package/docs/notifications.md +0 -170
- package/docs/optimization-baseline.md +0 -21
- package/docs/quick-start.md +0 -197
- package/docs/rules.md +0 -432
- package/docs/skills.md +0 -417
- package/docs/workflows.md +0 -134
- package/src/commands/fd-new-project.md +0 -114
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Configuration
|
|
2
|
+
|
|
3
|
+
FlowDeck is configured via the OpenCode configuration file at `~/.config/opencode/opencode.json` (or `$OPENCODE_CONFIG_DIR/opencode.json`). This file is managed by FlowDeck's `postinstall` script — the plugin is registered automatically when you install FlowDeck.
|
|
4
|
+
|
|
5
|
+
> **Note:** FlowDeck uses `opencode.json` (OpenCode's global config), not `flowdeck.json`. This page documents the schema understood by FlowDeck's plugin layer.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Top-Level Schema
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"agents": { ... },
|
|
14
|
+
"governance": { ... },
|
|
15
|
+
"model_profile": "balanced",
|
|
16
|
+
"tdd_enforced": false,
|
|
17
|
+
"approval_required": false,
|
|
18
|
+
"volatility_threshold": 0.5,
|
|
19
|
+
"default_agent": "orchestrator"
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
All keys are optional unless noted.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## `agents` — Per-Agent Model Override
|
|
28
|
+
|
|
29
|
+
> **Default:** every agent inherits the active OpenCode model.
|
|
30
|
+
|
|
31
|
+
Override the model for specific agents when you want a cheaper or more capable model for particular roles (e.g., a fast model for summarization, Opus for complex planning).
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"agents": {
|
|
36
|
+
"planner": { "model": "anthropic/claude-opus-4" },
|
|
37
|
+
"architect": { "model": "anthropic/claude-opus-4" },
|
|
38
|
+
"reviewer": { "model": "openai/gpt-4o-mini" },
|
|
39
|
+
"tester": { "model": "anthropic/claude-sonnet-4" },
|
|
40
|
+
"debugger": { "model": "openai/gpt-4o-mini" }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
| Field | Type | Description |
|
|
46
|
+
|-------|------|-------------|
|
|
47
|
+
| `model` | string | Full model spec in `provider/model` format. Examples: `anthropic/claude-opus-4`, `openai/gpt-4o-mini`, `google/gemini-2.5-pro` |
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## `governance` — Runtime Safety Services
|
|
52
|
+
|
|
53
|
+
FlowDeck's governance layer validates multi-agent execution. Each service can be toggled independently.
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"governance": {
|
|
58
|
+
"validator": {
|
|
59
|
+
"mode": "advisory"
|
|
60
|
+
},
|
|
61
|
+
"delegationBudget": {
|
|
62
|
+
"maxToolCalls": 200,
|
|
63
|
+
"maxDepth": 8,
|
|
64
|
+
"maxSameStepRetries": 3
|
|
65
|
+
},
|
|
66
|
+
"deadlockDetection": {
|
|
67
|
+
"enabled": true,
|
|
68
|
+
"bounceThreshold": 3,
|
|
69
|
+
"autoStop": false
|
|
70
|
+
},
|
|
71
|
+
"scorecard": {
|
|
72
|
+
"enabled": true
|
|
73
|
+
},
|
|
74
|
+
"agentContractRegistry": {
|
|
75
|
+
"contracts": {}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### `validator` — Agent Validation Mode
|
|
82
|
+
|
|
83
|
+
| Mode | Description |
|
|
84
|
+
|------|-------------|
|
|
85
|
+
| `off` | No validation performed |
|
|
86
|
+
| `advisory` | Logs violations; does not block execution |
|
|
87
|
+
| `strict` | Blocks agent actions that violate their capability contract |
|
|
88
|
+
|
|
89
|
+
In `advisory` mode, a violation produces a warning in the session log:
|
|
90
|
+
```
|
|
91
|
+
[flowdeck/validator] Agent 'coder' called forbidden tool 'deleteFile'
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### `delegationBudget` — Per-Run Resource Limits
|
|
95
|
+
|
|
96
|
+
| Field | Type | Description |
|
|
97
|
+
|-------|------|-------------|
|
|
98
|
+
| `maxToolCalls` | number | Maximum tool calls per agent invocation |
|
|
99
|
+
| `maxDepth` | number | Maximum delegation chain depth (e.g., orchestrator → architect → coder is depth 2) |
|
|
100
|
+
| `maxSameStepRetries` | number | Maximum retries when an agent is stuck on the same step |
|
|
101
|
+
|
|
102
|
+
### `deadlockDetection` — Loop and Stall Detection
|
|
103
|
+
|
|
104
|
+
| Field | Type | Description |
|
|
105
|
+
|-------|------|-------------|
|
|
106
|
+
| `enabled` | boolean | Enable deadlock/loop detection |
|
|
107
|
+
| `bounceThreshold` | number | Number of same-task bounces before flagging as a potential loop |
|
|
108
|
+
| `autoStop` | boolean | If `true`, stops execution when a deadlock is detected |
|
|
109
|
+
|
|
110
|
+
Deadlock signals are written to `.codebase/DEADLOCK_SIGNALS.jsonl`.
|
|
111
|
+
|
|
112
|
+
### `scorecard` — Workflow Quality Recording
|
|
113
|
+
|
|
114
|
+
| Field | Type | Description |
|
|
115
|
+
|-------|------|-------------|
|
|
116
|
+
| `enabled` | boolean | Enable 10-dimension workflow quality scorecard |
|
|
117
|
+
|
|
118
|
+
Scorecards are written to `.codebase/SCORECARDS.jsonl` after each run. Dimensions include TDD adherence, design-first completion, approval rate, and budget efficiency.
|
|
119
|
+
|
|
120
|
+
### `agentContractRegistry` — Agent Capability Contracts
|
|
121
|
+
|
|
122
|
+
Defines per-agent allowed/forbidden tools, required inputs, and success criteria.
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"governance": {
|
|
127
|
+
"agentContractRegistry": {
|
|
128
|
+
"contracts": {
|
|
129
|
+
"coder": {
|
|
130
|
+
"allowedTools": ["Read", "Edit", "Bash", "WebSearch"],
|
|
131
|
+
"forbiddenTools": ["Write"],
|
|
132
|
+
"requires": ["task_description"],
|
|
133
|
+
"successCriteria": ["compiles", "tests_pass"]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## `model_profile` — Context Window Balance
|
|
144
|
+
|
|
145
|
+
Controls how FlowDeck balances token usage vs. thoroughness.
|
|
146
|
+
|
|
147
|
+
| Value | Description |
|
|
148
|
+
|-------|-------------|
|
|
149
|
+
| `balanced` | Default. Moderate context usage. Good for most workflows. |
|
|
150
|
+
| `fast` | Prioritizes low token usage. Use for simple, well-understood tasks. |
|
|
151
|
+
| `thorough` | Maximizes context usage. Use for complex multi-file refactors or unfamiliar codebases. |
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## `tdd_enforced` — Test-Driven Development Enforcement
|
|
156
|
+
|
|
157
|
+
> **Default:** `false`
|
|
158
|
+
|
|
159
|
+
When `true`, FlowDeck agents will enforce TDD discipline: failing tests must be written before any implementation code is added. The `reviewer` agent will flag any implementation that is not preceded by a failing test.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## `approval_required` — Phase Approval Gates
|
|
164
|
+
|
|
165
|
+
> **Default:** `false`
|
|
166
|
+
|
|
167
|
+
When `true`, FlowDeck will pause at each phase boundary and require explicit user approval before proceeding. Useful for high-stakes changes where you want to review plan output before execution begins.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## `volatility_threshold` — Risk Scoring Cutoff
|
|
172
|
+
|
|
173
|
+
> **Default:** `0.5` | **Range:** `0.0` – `1.0`
|
|
174
|
+
|
|
175
|
+
Used by FlowDeck's AI safety layer to determine when a change is considered "volatile" (high risk of regression). Changes with a volatility score above this threshold are flagged or blocked depending on governance mode.
|
|
176
|
+
|
|
177
|
+
- `0.0` — everything is flagged as volatile
|
|
178
|
+
- `1.0` — nothing is flagged (effectively disabled)
|
|
179
|
+
- `0.3` — conservative; flags many changes
|
|
180
|
+
- `0.7` — permissive; only flags obviously risky changes
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## `default_agent` — Default Dispatch Target
|
|
185
|
+
|
|
186
|
+
> **Default:** `orchestrator`
|
|
187
|
+
|
|
188
|
+
Sets the agent that receives commands when no explicit agent is specified. The `orchestrator` coordinates sub-agents and is the appropriate default for most workflows.
|
|
189
|
+
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"default_agent": "orchestrator"
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Other valid targets include `planner`, `architect`, `coder`, `reviewer`, `tester`, `debugger`, `risk-analyst`, and `policy-enforcer`.
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Environment Variables
|
|
201
|
+
|
|
202
|
+
FlowDeck reads the following environment variables:
|
|
203
|
+
|
|
204
|
+
| Variable | Default | Description |
|
|
205
|
+
|----------|---------|-------------|
|
|
206
|
+
| `OPENCODE_CONFIG_DIR` | `~/.config/opencode` | OpenCode configuration directory |
|
|
207
|
+
| `XDG_CONFIG_HOME` | `~/.config` | XDG Base Directory, used to derive `OPENCODE_CONFIG_DIR` |
|
|
208
|
+
| `FLOWDECK_CONTEXT_LIMIT` | `200000` | Context window token limit for context monitor warnings |
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# OpenCode Integration Settings
|
|
2
|
+
|
|
3
|
+
FlowDeck integrates with OpenCode as a plugin. This page explains how the plugin is registered, what gets published as an npm package, and what environment variables FlowDeck reads at runtime.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Plugin Registration
|
|
8
|
+
|
|
9
|
+
FlowDeck uses the `@opencode-ai/plugin` package to register itself with OpenCode. After running `npm install @dv.nghiem/flowdeck`, the `postinstall` script (`postinstall.mjs`) automatically:
|
|
10
|
+
|
|
11
|
+
1. Reads the OpenCode global config at `~/.config/opencode/opencode.json` (or `$OPENCODE_CONFIG_DIR/opencode.json`)
|
|
12
|
+
2. Adds `"@dv.nghiem/flowdeck"` to the `plugin` array if not already present
|
|
13
|
+
3. Sets `"default_agent": "orchestrator"` if not already set
|
|
14
|
+
4. Writes the updated config back to disk
|
|
15
|
+
|
|
16
|
+
OpenCode loads all plugins listed in the `plugin` array on startup.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Package Contents
|
|
21
|
+
|
|
22
|
+
The `package.json` `files` field controls what gets published as the npm package:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
files:
|
|
26
|
+
dist/ — compiled plugin code
|
|
27
|
+
bin/ — CLI entry point
|
|
28
|
+
src/commands/ — command implementations
|
|
29
|
+
src/rules/ — coding standards
|
|
30
|
+
src/skills/ — skill definitions
|
|
31
|
+
docs/ — documentation
|
|
32
|
+
postinstall.mjs — post-install registration script
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The npm package does **not** include `src/agents/`, `src/tools/`, `src/hooks/` (with the exception of `src/skills/`), or development files.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Plugin Architecture
|
|
40
|
+
|
|
41
|
+
FlowDeck registers its capabilities through the following source directories:
|
|
42
|
+
|
|
43
|
+
### `src/agents/`
|
|
44
|
+
|
|
45
|
+
Agent definitions. Each agent specifies its role, allowed tools, instructions, and delegation policies.
|
|
46
|
+
|
|
47
|
+
### `src/tools/`
|
|
48
|
+
|
|
49
|
+
Tool definitions. These extend OpenCode's tool set with FlowDeck-specific capabilities.
|
|
50
|
+
|
|
51
|
+
### `src/hooks/`
|
|
52
|
+
|
|
53
|
+
System hooks that react to OpenCode lifecycle events:
|
|
54
|
+
|
|
55
|
+
| Hook File | When It Fires | Purpose |
|
|
56
|
+
|-----------|---------------|---------|
|
|
57
|
+
| `session-start.ts` | `session.created` | Loads prior state from `.planning/STATE.md` and injects phase/status/steps into context |
|
|
58
|
+
| `compaction-hook.ts` | `experimental.session.compacting` | Injects structured planning context before context window compaction |
|
|
59
|
+
| `shell-env-hook.ts` | Every `bash` tool execution | Injects `FLOWDECK_VERSION`, `PROJECT_ROOT`, `PACKAGE_MANAGER`, `DETECTED_LANGUAGES`, `FLOWDECK_PHASE` env vars |
|
|
60
|
+
| `context-window-monitor.ts` | `message.updated`, `tool.execute.after` | Warns when context usage exceeds 70% of the token limit |
|
|
61
|
+
| `session-idle-hook.ts` | `session.idle` (when files edited) | Sends desktop notification and logs edited file summary |
|
|
62
|
+
| `notifications.ts` | Various | Desktop notification dispatch |
|
|
63
|
+
| `file-tracker.ts` | During session | Tracks edited file paths across agent turns |
|
|
64
|
+
|
|
65
|
+
### `src/skills/`
|
|
66
|
+
|
|
67
|
+
Skill definitions exported via the plugin's skill registration API. Skills expose reusable workflow patterns (TDD, security scan, code review, etc.) to OpenCode's skill system.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Environment Variables
|
|
72
|
+
|
|
73
|
+
FlowDeck reads the following environment variables:
|
|
74
|
+
|
|
75
|
+
| Variable | Default | Description |
|
|
76
|
+
|----------|---------|-------------|
|
|
77
|
+
| `OPENCODE_CONFIG_DIR` | `~/.config/opencode` | OpenCode configuration directory |
|
|
78
|
+
| `XDG_CONFIG_HOME` | `~/.config` | Used to derive `OPENCODE_CONFIG_DIR` if not set |
|
|
79
|
+
| `FLOWDECK_CONTEXT_LIMIT` | `200000` | Token limit for context window monitor (used by `context-window-monitor.ts`) |
|
|
80
|
+
|
|
81
|
+
FlowDeck does **not** read any API keys, tokens, or secrets. All model authentication is handled by OpenCode.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## opencode.json Schema (Plugin Section)
|
|
86
|
+
|
|
87
|
+
After installation, your `opencode.json` looks like:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"plugin": [
|
|
92
|
+
"@dv.nghiem/flowdeck"
|
|
93
|
+
],
|
|
94
|
+
"default_agent": "orchestrator"
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
FlowDeck's plugin reads the top-level keys described in [Configuration](index.md) (`agents`, `governance`, `model_profile`, etc.) from this same file.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# First Project — End-to-End Walkthrough
|
|
2
|
+
|
|
3
|
+
This guide walks through creating a simple feature end-to-end, showing what FlowDeck produces at each step.
|
|
4
|
+
|
|
5
|
+
## Step 1: Map the Codebase
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
fd-map-codebase
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
FlowDeck analyses the project and creates `.codebase/` with:
|
|
12
|
+
- `.codebase/CODEGRAPH.json` — dependency graph
|
|
13
|
+
- `.codebase/CONVENTIONS.md` — detected code conventions
|
|
14
|
+
- `.codebase/CODEBASE_INDEX.md` — high-level structural index
|
|
15
|
+
|
|
16
|
+
This step is required before starting a feature.
|
|
17
|
+
|
|
18
|
+
## Step 2: Start a Feature
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
fd-new-feature "user authentication"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
FlowDeck initializes `.planning/` (if it doesn't exist yet) and creates `.planning/phases/phase-1/FEATURE.md`:
|
|
25
|
+
|
|
26
|
+
```markdown
|
|
27
|
+
# Feature: user authentication
|
|
28
|
+
|
|
29
|
+
## Description
|
|
30
|
+
user authentication
|
|
31
|
+
|
|
32
|
+
## Status
|
|
33
|
+
discuss
|
|
34
|
+
|
|
35
|
+
## Created
|
|
36
|
+
2026-05-26
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Step 3: Discuss
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
fd-discuss
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The discusser agent runs structured Q&A and produces **`DISCUSS.md`**:
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
# Discussion — user authentication
|
|
49
|
+
|
|
50
|
+
## Q: What is the scope?
|
|
51
|
+
A: [agent response]
|
|
52
|
+
|
|
53
|
+
## Q: What are the constraints?
|
|
54
|
+
A: [agent response]
|
|
55
|
+
|
|
56
|
+
## Decisions
|
|
57
|
+
- [captured decisions listed here]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Step 4: Plan
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
fd-plan
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
When prompted, type `CONFIRM` to proceed. The planner generates **`PLAN.md`**:
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
# Plan — user authentication
|
|
70
|
+
|
|
71
|
+
## Wave 1 (parallel)
|
|
72
|
+
- [ ] Implement user model
|
|
73
|
+
- [ ] Create auth service
|
|
74
|
+
- [ ] Write unit tests
|
|
75
|
+
|
|
76
|
+
## Wave 2 (parallel)
|
|
77
|
+
- [ ] Implement login endpoint
|
|
78
|
+
- [ ] Implement registration endpoint
|
|
79
|
+
- [ ] Add integration tests
|
|
80
|
+
|
|
81
|
+
## Wave 3 (sequential)
|
|
82
|
+
- [ ] Security audit
|
|
83
|
+
- [ ] Documentation
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Step 5: Execute
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
fd-execute
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Agents work through each wave in `PLAN.md`. Independent tasks run in parallel. State is updated in `STATE.md` after each task.
|
|
93
|
+
|
|
94
|
+
## Step 6: Verify
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
fd-verify
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Runs the full verification pipeline:
|
|
101
|
+
- Unit and integration tests
|
|
102
|
+
- Code review by reviewer agent
|
|
103
|
+
- Security scan
|
|
104
|
+
- Deploy check
|
|
105
|
+
|
|
106
|
+
Results are written to `.planning/VERIFICATION.md`.
|
|
107
|
+
|
|
108
|
+
## What You Have Now
|
|
109
|
+
|
|
110
|
+
After completing the full workflow:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
.planning/
|
|
114
|
+
STATE.md — current phase and progress
|
|
115
|
+
ROADMAP.md — all features and timeline
|
|
116
|
+
PLAN.md — current feature execution plan
|
|
117
|
+
DISCUSS.md — captured decisions
|
|
118
|
+
VERIFICATION.md — test results, review, security
|
|
119
|
+
.codebase/
|
|
120
|
+
CODEGRAPH.json — dependency graph
|
|
121
|
+
CONVENTIONS.md — detected code conventions
|
|
122
|
+
CODEBASE_INDEX.md — structural index
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
You can now run `/fd-status` to see the project overview, or start a new feature with `/fd-new-feature`.
|
|
126
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
## Prerequisites
|
|
4
|
+
|
|
5
|
+
- [OpenCode](https://opencode.ai) installed and configured
|
|
6
|
+
- Node.js 18+ (for npx installation)
|
|
7
|
+
- Git (for curl installation)
|
|
8
|
+
|
|
9
|
+
## Install Methods
|
|
10
|
+
|
|
11
|
+
### Method 1: curl (recommended)
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
curl -fsSL https://raw.githubusercontent.com/DVNghiem/flowdeck/main/install.sh | bash
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This downloads and runs the official installer script. It clones the repository and runs the post-install setup.
|
|
18
|
+
|
|
19
|
+
### Method 2: npx
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx @dv.nghiem/flowdeck install
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
No git required. Uses npx to fetch and install the package directly.
|
|
26
|
+
|
|
27
|
+
## Verify Installation
|
|
28
|
+
|
|
29
|
+
Run the health check command:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
flowdeck doctor
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Expected output shows FlowDeck version, OpenCode plugin status, and environment health.
|
|
36
|
+
|
|
37
|
+
Alternatively, verify the binary is in your path:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
which flowdeck
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Post-Installation
|
|
44
|
+
|
|
45
|
+
After installation, FlowDeck registers as an OpenCode plugin. Restart OpenCode to load the plugin and its commands.
|
|
46
|
+
|
|
47
|
+
## Environment Variables
|
|
48
|
+
|
|
49
|
+
FlowDeck respects the following environment variables:
|
|
50
|
+
|
|
51
|
+
| Variable | Description | Default |
|
|
52
|
+
|----------|-------------|---------|
|
|
53
|
+
| `FLOWDECK_CONFIG` | Path to flowdeck.json config | `./flowdeck.json` |
|
|
54
|
+
| `FLOWDECK_STATE_DIR` | Directory for state files | `.planning/` |
|
|
55
|
+
| `OPENCODE_MODEL` | Model to use when not overridden | (OpenCode default) |
|
|
56
|
+
|
|
57
|
+
## Uninstall
|
|
58
|
+
|
|
59
|
+
### Method 1: npm
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm uninstall -g @dv.nghiem/flowdeck
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Method 2: Run uninstall script
|
|
66
|
+
|
|
67
|
+
If you used the curl installer:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
./uninstall.sh
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
This removes the plugin from OpenCode and cleans up installed files.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Quick Start — First 15 Minutes
|
|
2
|
+
|
|
3
|
+
Get FlowDeck installed and run your first feature workflow in under 15 minutes.
|
|
4
|
+
|
|
5
|
+
## Step 1: Install FlowDeck
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
curl -fsSL https://raw.githubusercontent.com/DVNghiem/flowdeck/main/install.sh | bash
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
See [Installation](installation.md) for alternative install methods.
|
|
12
|
+
|
|
13
|
+
## Step 2: Verify Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
flowdeck doctor
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Checks that FlowDeck is installed, the OpenCode plugin is loaded, and your environment is ready.
|
|
20
|
+
|
|
21
|
+
## Step 3: Map the Codebase
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
fd-map-codebase
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Analyses the project and writes structured indexes to `.codebase/`. This is required before starting a feature — it gives all subsequent agents the context they need.
|
|
28
|
+
|
|
29
|
+
## Step 4: Start a Feature
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
fd-new-feature "hello world API"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Initializes feature context and creates a `FEATURE.md` file in the current phase directory. If `.planning/` does not exist yet, it is created automatically.
|
|
36
|
+
|
|
37
|
+
## Step 5: Discuss the Feature
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
fd-discuss
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Runs structured Q&A to capture requirements, constraints, and decisions. Saves to `DISCUSS.md`.
|
|
44
|
+
|
|
45
|
+
## Step 6: Plan Implementation
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
fd-plan
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Generates a wave-structured execution plan. When prompted, type `CONFIRM` to proceed.
|
|
52
|
+
|
|
53
|
+
The planner outputs a `PLAN.md` with task waves — groups of independent tasks that can run in parallel.
|
|
54
|
+
|
|
55
|
+
## Step 7: Execute
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
fd-execute
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Implements the feature using TDD discipline. Parallel agents (architect, coder, tester, reviewer) work through the plan waves.
|
|
62
|
+
|
|
63
|
+
## What to Expect
|
|
64
|
+
|
|
65
|
+
After completing these steps you will have:
|
|
66
|
+
|
|
67
|
+
- A `.planning/` directory with full project state
|
|
68
|
+
- A `PLAN.md` with executable task breakdown
|
|
69
|
+
- Working code with tests
|
|
70
|
+
- Verification results from the review pipeline
|
|
71
|
+
|
|
72
|
+
## Next Steps
|
|
73
|
+
|
|
74
|
+
- [First Project → End-to-End Walkthrough](first-project.md) — see what the output files actually look like
|
package/docs/index.md
CHANGED
|
@@ -1,72 +1,36 @@
|
|
|
1
|
-
# FlowDeck
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## Reference
|
|
18
|
-
|
|
19
|
-
|
|
|
20
|
-
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
| [Multi-Repo](multi-repo.md) | Coordinating changes across two or more repositories in a single session |
|
|
38
|
-
| [Notifications](notifications.md) | Desktop and system alerts for long-running task completion |
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## Setup & Maintenance
|
|
43
|
-
|
|
44
|
-
| Document | Description |
|
|
45
|
-
|----------|-------------|
|
|
46
|
-
| [Configuration](configuration.md) | `opencode.json` fields, project config schema, environment variables, and plugin tools |
|
|
47
|
-
| [Troubleshooting](troubleshooting.md) | Fixes for the most common problems: missing agents, corrupted state, build failures |
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Quick Command Cheat Sheet
|
|
52
|
-
|
|
53
|
-
| Command | What it does |
|
|
54
|
-
|---------|--------------|
|
|
55
|
-
| `/fd-new-project <name>` | Initialize project with planning structure and default config |
|
|
56
|
-
| `/fd-discuss <topic>` | Run structured requirements Q&A to capture decisions |
|
|
57
|
-
| `/fd-plan [--phase=N]` | Generate implementation plan from decisions (requires CONFIRM) |
|
|
58
|
-
| `/fd-design [--mode=draft\|review\|system]` | Run design-first planning and UI fidelity review for UI-heavy tasks |
|
|
59
|
-
| `/fd-new-feature "<description>"` | Execute full feature workflow with TDD discipline |
|
|
60
|
-
| `/fd-fix-bug "<description>"` | Diagnose and fix a bug with regression test |
|
|
61
|
-
| `/fd-deploy-check [--check=deploy,review,analysis]` | Pre-deploy checks, code review, or pre-change analysis |
|
|
62
|
-
| `/fd-status [--roadmap\|--workspace\|--phase=N]` | Combined status, roadmap, and workspace view |
|
|
63
|
-
| `/fd-checkpoint` | Save current state — safe to close the session after this |
|
|
64
|
-
| `/fd-resume [--yes]` | Reload STATE.md and PLAN.md to continue interrupted session |
|
|
65
|
-
| `/fd-reflect [--mode=reflect,learn]` | Post-session reflection or capture skill from session |
|
|
66
|
-
| `/fd-map-codebase [--incremental]` | Generate `.codebase/` documentation |
|
|
67
|
-
| `/fd-write-docs [--scope=path]` | Generate documentation from public APIs |
|
|
68
|
-
| `/fd-multi-repo <list\|add\|remove\|status>` | Manage multi-repo configuration |
|
|
69
|
-
| `/fd-translate-intent "<vague request>"` | Convert vague request into ranked implementation options |
|
|
70
|
-
| `/fd-ask "<question>"` | Route question to specialist agent |
|
|
71
|
-
| `/fd-quick "<task>"` | Quick focused task with automatic agent selection |
|
|
72
|
-
| `/fd-doctor` | Check FlowDeck installation and environment health |
|
|
1
|
+
# FlowDeck
|
|
2
|
+
|
|
3
|
+
> AI-powered multi-agent workflow orchestration with built-in safety intelligence for OpenCode
|
|
4
|
+
|
|
5
|
+
FlowDeck structures every feature through a six-step cycle:
|
|
6
|
+
`/fd-map-codebase` → `/fd-new-feature` → `/fd-discuss` → `/fd-plan` → `/fd-execute` → `/fd-verify`
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- **25 agents** — architect, planner, coder, reviewer, tester, debugger, risk-analyst, policy-enforcer, and more
|
|
11
|
+
- **59 skills** — reusable workflow patterns (TDD, security scan, code review, deploy check, and more)
|
|
12
|
+
- **20 commands** — workflow commands for all project operations
|
|
13
|
+
- **Persistent state** — resume exactly where you left off across sessions via `.planning/STATE.md`
|
|
14
|
+
- **Parallel execution** — independent tasks run simultaneously in wave-structured batches
|
|
15
|
+
- **AI Safety layer** — patch trust scoring, edit gates, phase gating, regression prediction built into every workflow
|
|
16
|
+
|
|
17
|
+
## Quick Reference
|
|
18
|
+
|
|
19
|
+
| Command | Purpose |
|
|
20
|
+
|---------|---------|
|
|
21
|
+
| `/fd-map-codebase` | Analyse and index the codebase into structured `.codebase/` files |
|
|
22
|
+
| `/fd-new-feature` | Define a new feature and initialize feature context |
|
|
23
|
+
| `/fd-discuss` | Pre-planning structured Q&A to capture decisions |
|
|
24
|
+
| `/fd-plan` | Generate a wave-structured execution plan |
|
|
25
|
+
| `/fd-execute` | Implement feature with TDD discipline and parallel agents |
|
|
26
|
+
| `/fd-verify` | Full verification pipeline: tests, code review, security scan |
|
|
27
|
+
| `/fd-checkpoint` | Save a mid-session checkpoint to STATE.md |
|
|
28
|
+
| `/fd-resume` | Reload checkpoint to continue interrupted session |
|
|
29
|
+
| `/fd-status` | View project progress and roadmap |
|
|
30
|
+
| `/fd-doctor` | Check FlowDeck installation and environment health |
|
|
31
|
+
|
|
32
|
+
## Next Steps
|
|
33
|
+
|
|
34
|
+
- [Getting Started → Installation](getting-started/installation.md)
|
|
35
|
+
- [Quick Start → First 15 Minutes](getting-started/quick-start.md)
|
|
36
|
+
- [First Project → Bootstrap Your First Project](getting-started/first-project.md)
|