@dv.nghiem/flowdeck 0.3.3 → 0.3.5
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 +160 -8
- package/dist/agents/coder.d.ts +3 -1
- package/dist/agents/coder.d.ts.map +1 -1
- package/dist/agents/design.d.ts +3 -0
- package/dist/agents/design.d.ts.map +1 -0
- package/dist/agents/index.d.ts +4 -3
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/orchestrator.d.ts.map +1 -1
- package/dist/agents/reviewer.d.ts.map +1 -1
- package/dist/agents/specialist.d.ts +0 -1
- package/dist/agents/specialist.d.ts.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/loader.d.ts +8 -0
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/schema.d.ts +55 -2
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/dashboard/server.mjs +24 -1
- package/dist/dashboard/types.d.ts +72 -0
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/hooks/guard-rails.d.ts.map +1 -1
- package/dist/hooks/orchestrator-guard-hook.d.ts +4 -1
- package/dist/hooks/orchestrator-guard-hook.d.ts.map +1 -1
- package/dist/hooks/session-idle-hook.d.ts.map +1 -1
- package/dist/hooks/telemetry-hook.d.ts +14 -1
- package/dist/hooks/telemetry-hook.d.ts.map +1 -1
- package/dist/hooks/telemetry-hook.test.d.ts +2 -0
- package/dist/hooks/telemetry-hook.test.d.ts.map +1 -0
- package/dist/hooks/tool-guard.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +810 -474
- package/dist/services/agent-contract-registry.d.ts +32 -0
- package/dist/services/agent-contract-registry.d.ts.map +1 -0
- package/dist/services/agent-performance.d.ts +1 -1
- package/dist/services/agent-performance.d.ts.map +1 -1
- package/dist/services/agent-trace-graph.d.ts +94 -0
- package/dist/services/agent-trace-graph.d.ts.map +1 -0
- package/dist/services/agent-validator.d.ts +56 -0
- package/dist/services/agent-validator.d.ts.map +1 -0
- package/dist/services/deadlock-detector.d.ts +34 -0
- package/dist/services/deadlock-detector.d.ts.map +1 -0
- package/dist/services/delegation-budget.d.ts +54 -0
- package/dist/services/delegation-budget.d.ts.map +1 -0
- package/dist/services/governance.test.d.ts +11 -0
- package/dist/services/governance.test.d.ts.map +1 -0
- package/dist/services/index.d.ts +6 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/telemetry.d.ts +1 -1
- package/dist/services/telemetry.d.ts.map +1 -1
- package/dist/services/workflow-scorecard.d.ts +76 -0
- package/dist/services/workflow-scorecard.d.ts.map +1 -0
- package/dist/tools/council.d.ts.map +1 -1
- package/dist/tools/delegate.d.ts.map +1 -1
- package/dist/tools/dispatch-routing.d.ts +9 -0
- package/dist/tools/dispatch-routing.d.ts.map +1 -0
- package/dist/tools/dispatch-routing.test.d.ts +2 -0
- package/dist/tools/dispatch-routing.test.d.ts.map +1 -0
- package/dist/tools/planning-state-lib.d.ts +8 -0
- package/dist/tools/planning-state-lib.d.ts.map +1 -1
- package/dist/tools/planning-state.d.ts.map +1 -1
- package/dist/tools/run-pipeline.d.ts.map +1 -1
- package/docs/agents.md +104 -74
- package/docs/best-practices.md +1 -1
- package/docs/commands/fd-ask.md +2 -2
- package/docs/commands/fd-fix-bug.md +2 -2
- package/docs/commands/fd-new-feature.md +2 -2
- package/docs/commands/fd-quick.md +3 -1
- package/docs/commands.md +37 -7
- package/docs/configuration.md +76 -46
- package/docs/design-first-workflow.md +94 -0
- package/docs/feature-integration-architecture.md +3 -31
- package/docs/index.md +5 -2
- package/docs/installation.md +6 -17
- package/docs/intelligence.md +110 -34
- package/docs/multi-repo.md +1 -1
- package/docs/optimization-baseline.md +21 -0
- package/docs/rules.md +10 -37
- package/docs/skills.md +24 -15
- package/docs/workflows.md +18 -14
- package/package.json +4 -2
- package/src/commands/fd-ask.md +1 -0
- package/src/commands/fd-design.md +64 -0
- package/src/commands/fd-discuss.md +2 -0
- package/src/commands/fd-execute.md +7 -3
- package/src/commands/fd-fix-bug.md +2 -2
- package/src/commands/fd-multi-repo.md +3 -3
- package/src/commands/fd-plan.md +2 -0
- package/src/commands/fd-quick.md +4 -1
- package/src/commands/fd-verify.md +6 -0
- package/src/rules/README.md +10 -0
- package/src/rules/common/agent-orchestration.md +6 -6
- package/src/rules/common/coding-style.md +2 -2
- package/src/rules/typescript/patterns.md +1 -1
- package/src/skills/app-shell-design/SKILL.md +31 -0
- package/src/skills/backend-patterns/SKILL.md +6 -0
- package/src/skills/clean-architecture/SKILL.md +6 -0
- package/src/skills/cqrs/SKILL.md +6 -0
- package/src/skills/dashboard-design/SKILL.md +32 -0
- package/src/skills/ddd-architecture/SKILL.md +6 -0
- package/src/skills/decision-trace/SKILL.md +1 -1
- package/src/skills/design-audit/SKILL.md +37 -0
- package/src/skills/design-system-definition/SKILL.md +33 -0
- package/src/skills/event-driven-architecture/SKILL.md +6 -0
- package/src/skills/frontend-handoff/SKILL.md +31 -0
- package/src/skills/hexagonal-architecture/SKILL.md +6 -0
- package/src/skills/landing-page-design/SKILL.md +32 -0
- package/src/skills/layered-architecture/SKILL.md +6 -0
- package/src/skills/multi-repo/SKILL.md +3 -3
- package/src/skills/plan-task/SKILL.md +2 -2
- package/src/skills/postgres-patterns/SKILL.md +6 -0
- package/src/skills/responsive-review/SKILL.md +31 -0
- package/src/skills/saga-architecture/SKILL.md +6 -0
- package/src/skills/ui-ux-planning/SKILL.md +32 -0
- package/src/skills/wireframe-planning/SKILL.md +30 -0
- package/dist/services/model-router.d.ts +0 -35
- package/dist/services/model-router.d.ts.map +0 -1
package/docs/rules.md
CHANGED
|
@@ -1,47 +1,20 @@
|
|
|
1
1
|
# FlowDeck Rules
|
|
2
2
|
|
|
3
|
-
Rules are coding
|
|
3
|
+
Rules are coding standards used by FlowDeck agents for style, testing, security, and language-specific guidance.
|
|
4
4
|
|
|
5
|
-
## How
|
|
5
|
+
## How Rules Load
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
FlowDeck loads all markdown files under `src/rules/` automatically through plugin startup. You do not need to manually copy or symlink rule files.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Precedence
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
"instructions": [
|
|
14
|
-
".flowdeck-rules/common/coding-style.md",
|
|
15
|
-
".flowdeck-rules/common/testing.md",
|
|
16
|
-
".flowdeck-rules/common/security.md",
|
|
17
|
-
".flowdeck-rules/typescript/patterns.md"
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Where `.flowdeck-rules/` is a symlink or copy of the FlowDeck rules directory:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
ln -s ~/.config/opencode/node_modules/@dv.nghiem/flowdeck/rules .flowdeck-rules
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### Method 2 — Per-session
|
|
29
|
-
|
|
30
|
-
Reference a rule file directly in your prompt:
|
|
11
|
+
When guidance conflicts, precedence is:
|
|
31
12
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
### Method 3 — Copy to project
|
|
37
|
-
|
|
38
|
-
Copy the rules directory into your project for version-controlled standards:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
cp -r ~/.config/opencode/node_modules/@dv.nghiem/flowdeck/rules ./flowdeck-rules
|
|
42
|
-
```
|
|
13
|
+
1. `AGENTS.md` and `CLAUDE.md` in the repository
|
|
14
|
+
2. FlowDeck plugin rules in `src/rules/**`
|
|
15
|
+
3. Runtime policy rules in `.codebase/POLICIES.json`
|
|
43
16
|
|
|
44
|
-
|
|
17
|
+
This keeps repository-specific conventions authoritative and lets policy learning add guardrails without overriding project intent.
|
|
45
18
|
|
|
46
19
|
---
|
|
47
20
|
|
|
@@ -138,7 +111,7 @@ Governs how FlowDeck agents are selected and coordinated.
|
|
|
138
111
|
- **Run `@task-splitter` before `/fd-new-feature` on large scope.** If a feature description spans more than a few hours of work, invoke `@task-splitter` first to break it into independent sub-features. Attempting to implement large scope in one `/fd-new-feature` call produces lower-quality output.
|
|
139
112
|
- **`@reviewer` is mandatory before merge.** Every code-producing command (`/fd-new-feature`, `/fd-fix-bug`) must be followed by at least one `@reviewer` pass. This is enforced when guard mode is enabled in `.planning/config.json`.
|
|
140
113
|
- **`@security-auditor` is mandatory for auth, payment, and PII code.** Any change to authentication flows, payment processing, or code that stores or transmits personally identifiable information must be audited by `@security-auditor` before merge — regardless of the change size.
|
|
141
|
-
- **Wave gates are not optional.** In parallel execution, Wave 3 (`@coder` + `@tester`) must not begin until Wave 2 (`@architect`) has produced its output. Starting implementation before design is complete produces rework.
|
|
114
|
+
- **Wave gates are not optional.** In parallel execution, Wave 3 (`@backend-coder` + `@tester`) must not begin until Wave 2 (`@architect`) has produced its output. Starting implementation before design is complete produces rework.
|
|
142
115
|
|
|
143
116
|
---
|
|
144
117
|
|
package/docs/skills.md
CHANGED
|
@@ -26,21 +26,30 @@ For example: `@tester use the tdd-workflow skill to add tests for the payments m
|
|
|
26
26
|
| `context-load` | Efficient session start: load STATE.md, PLAN.md, PROJECT.md | Any agent at session start |
|
|
27
27
|
| `debug-flow` | 6-step debug sequence: reproduce → trace → test → fix → verify | `@debug-specialist`, `@tester` |
|
|
28
28
|
| `dependency-audit` | CVE scanning, license compliance, outdated package detection | `@security-auditor`, `@reviewer` |
|
|
29
|
+
| `design-audit` | UI fidelity audit against approved design artifacts | `@design`, `@reviewer` |
|
|
30
|
+
| `ui-ux-planning` | UX flow and structure planning before implementation | `@design` |
|
|
31
|
+
| `wireframe-planning` | Wireframe-level layout and section planning | `@design` |
|
|
32
|
+
| `design-system-definition` | Token and component behavior guidance | `@design`, `@backend-coder` |
|
|
33
|
+
| `frontend-handoff` | Convert design outputs into implementation checklist | `@design`, `@backend-coder` |
|
|
34
|
+
| `responsive-review` | Responsive behavior and breakpoint review | `@design`, `@reviewer` |
|
|
35
|
+
| `dashboard-design` | Dashboard-specific hierarchy and data-density patterns | `@design` |
|
|
36
|
+
| `landing-page-design` | Conversion-oriented landing page structure | `@design` |
|
|
37
|
+
| `app-shell-design` | App shell and navigation model design | `@design` |
|
|
29
38
|
| `deploy-check` | Pre-deployment go/no-go checklist | `@orchestrator`, `@security-auditor` |
|
|
30
39
|
| `documentation-writer` | Technical writing standards for READMEs, API docs, changelogs | `@writer`, `@doc-updater` |
|
|
31
40
|
| `git-release` | Semantic versioning, changelog generation, release tagging | `@writer`, `@orchestrator` |
|
|
32
|
-
| `git-workflow` | Conventional commits, branching strategy, PR standards | `@coder`, `@orchestrator` |
|
|
33
|
-
| `golang-patterns` | Idiomatic Go: error handling, goroutines, interfaces, testing | `@coder`, `@reviewer` |
|
|
34
|
-
| `java-patterns` | Modern Java 17+: records, Spring Boot, JPA, CompletableFuture | `@coder`, `@reviewer` |
|
|
41
|
+
| `git-workflow` | Conventional commits, branching strategy, PR standards | `@backend-coder`, `@orchestrator` |
|
|
42
|
+
| `golang-patterns` | Idiomatic Go: error handling, goroutines, interfaces, testing | `@backend-coder`, `@reviewer` |
|
|
43
|
+
| `java-patterns` | Modern Java 17+: records, Spring Boot, JPA, CompletableFuture | `@backend-coder`, `@reviewer` |
|
|
35
44
|
| `multi-repo` | Cross-repo dependency graphs, contract-first changes, ordered rollouts | `@multi-repo-coordinator`, `@architect` |
|
|
36
|
-
| `parallel-execute` | Wave-based parallel task coordination and merge protocol | `@
|
|
45
|
+
| `parallel-execute` | Wave-based parallel task coordination and merge protocol | `@orchestrator`, `@task-splitter` |
|
|
37
46
|
| `performance-profiling` | Profiling methodology, bottleneck identification, before/after measurement | `@performance-optimizer` |
|
|
38
47
|
| `plan-task` | Wave-structured task planning with dependency graph and success criteria | `@planner`, `@planner` |
|
|
39
|
-
| `python-patterns` | Python 3.10+: type hints, dataclasses, asyncio, pytest | `@coder`, `@reviewer` |
|
|
40
|
-
| `refactor-guide` | Safe refactoring: tests-first, one transformation per commit | `@refactor-guide`, `@coder` |
|
|
41
|
-
| `rust-patterns` | Ownership, traits, async/Tokio, error handling, smart pointers | `@coder`, `@reviewer` |
|
|
48
|
+
| `python-patterns` | Python 3.10+: type hints, dataclasses, asyncio, pytest | `@backend-coder`, `@reviewer` |
|
|
49
|
+
| `refactor-guide` | Safe refactoring: tests-first, one transformation per commit | `@refactor-guide`, `@backend-coder` |
|
|
50
|
+
| `rust-patterns` | Ownership, traits, async/Tokio, error handling, smart pointers | `@backend-coder`, `@reviewer` |
|
|
42
51
|
| `security-scan` | OWASP-based scanning, severity classification, PASS/FAIL verdict | `@security-auditor`, `@reviewer` |
|
|
43
|
-
| `tdd-workflow` | Red-Green-Refactor cycle, AAA pattern, 80% coverage target | `@tester`, `@coder` |
|
|
52
|
+
| `tdd-workflow` | Red-Green-Refactor cycle, AAA pattern, 80% coverage target | `@tester`, `@backend-coder` |
|
|
44
53
|
| `test-coverage` | Coverage gap analysis, TDD enforcement, write-test-first cycle | `@tester`, `@reviewer` |
|
|
45
54
|
|
|
46
55
|
---
|
|
@@ -178,7 +187,7 @@ Idiomatic Python 3.10+ patterns for production code: type hints with `TypeVar` a
|
|
|
178
187
|
|
|
179
188
|
**Example invocation:**
|
|
180
189
|
```
|
|
181
|
-
@coder Use the python-patterns skill to implement the data pipeline.
|
|
190
|
+
@backend-coder Use the python-patterns skill to implement the data pipeline.
|
|
182
191
|
Prefer dataclasses for the value objects and asyncio for IO operations.
|
|
183
192
|
```
|
|
184
193
|
|
|
@@ -192,7 +201,7 @@ Idiomatic Go for production services: explicit error handling with wrapped error
|
|
|
192
201
|
|
|
193
202
|
**Example invocation:**
|
|
194
203
|
```
|
|
195
|
-
@coder Use the golang-patterns skill to implement the worker pool.
|
|
204
|
+
@backend-coder Use the golang-patterns skill to implement the worker pool.
|
|
196
205
|
Use proper goroutine lifecycle management and context cancellation.
|
|
197
206
|
```
|
|
198
207
|
|
|
@@ -206,7 +215,7 @@ Modern Java 17+ patterns for production applications: records for immutable valu
|
|
|
206
215
|
|
|
207
216
|
**Example invocation:**
|
|
208
217
|
```
|
|
209
|
-
@coder Use the java-patterns skill to implement the OrderService.
|
|
218
|
+
@backend-coder Use the java-patterns skill to implement the OrderService.
|
|
210
219
|
Use records for the command objects and constructor injection for dependencies.
|
|
211
220
|
```
|
|
212
221
|
|
|
@@ -220,7 +229,7 @@ Safe, idiomatic Rust: ownership and borrowing mental model (own vs borrow vs bor
|
|
|
220
229
|
|
|
221
230
|
**Example invocation:**
|
|
222
231
|
```
|
|
223
|
-
@coder Use the rust-patterns skill to implement the async HTTP client.
|
|
232
|
+
@backend-coder Use the rust-patterns skill to implement the async HTTP client.
|
|
224
233
|
Use Tokio and ensure proper error propagation with the ? operator.
|
|
225
234
|
```
|
|
226
235
|
|
|
@@ -308,7 +317,7 @@ Branching strategy (feature branches from `main`, naming convention `feat/`, `fi
|
|
|
308
317
|
|
|
309
318
|
**Example invocation:**
|
|
310
319
|
```
|
|
311
|
-
@coder Use the git-workflow skill to commit the authentication changes.
|
|
320
|
+
@backend-coder Use the git-workflow skill to commit the authentication changes.
|
|
312
321
|
Write a conventional commit message and create the PR.
|
|
313
322
|
```
|
|
314
323
|
|
|
@@ -380,8 +389,8 @@ Coordinates parallel agent execution for independent workstreams. Provides the W
|
|
|
380
389
|
|
|
381
390
|
**Example invocation:**
|
|
382
391
|
```
|
|
383
|
-
@
|
|
384
|
-
@coder and @tester are independent — start both simultaneously.
|
|
392
|
+
@orchestrator Use the parallel-execute skill to run Wave 3 of the current plan.
|
|
393
|
+
@backend-coder and @tester are independent — start both simultaneously.
|
|
385
394
|
```
|
|
386
395
|
|
|
387
396
|
**When to use:** When a plan has tasks that can run simultaneously. The skill makes independence explicit so merge conflicts are caught before they occur.
|
package/docs/workflows.md
CHANGED
|
@@ -20,7 +20,9 @@ FlowDeck commands are the single entry point for all operations. Each command em
|
|
|
20
20
|
/fd-discuss → .planning/phases/phase-N/DISCUSS.md (locked decisions)
|
|
21
21
|
↓
|
|
22
22
|
/fd-plan → .planning/phases/phase-N/PLAN.md (confirmed plan)
|
|
23
|
-
|
|
23
|
+
↓
|
|
24
|
+
/fd-design → design artifact + approval + handoff (UI-heavy tasks only)
|
|
25
|
+
↓
|
|
24
26
|
/fd-execute → implemented, tested, reviewed code (via TDD)
|
|
25
27
|
↓
|
|
26
28
|
/fd-verify → verification report (tests, review, security, deploy check)
|
|
@@ -28,7 +30,7 @@ FlowDeck commands are the single entry point for all operations. Each command em
|
|
|
28
30
|
/fd-checkpoint → .planning/STATE.md saved
|
|
29
31
|
```
|
|
30
32
|
|
|
31
|
-
Each step gates the next. `/fd-discuss` requires a defined feature. `/fd-plan` requires confirmed decisions from `DISCUSS.md`. `/fd-execute` requires a confirmed `PLAN.md
|
|
33
|
+
Each step gates the next. `/fd-discuss` requires a defined feature. `/fd-plan` requires confirmed decisions from `DISCUSS.md`. `/fd-design` is mandatory for UI-heavy tasks unless explicitly overridden. `/fd-execute` requires a confirmed `PLAN.md` and (for UI-heavy tasks) approved design handoff. `/fd-verify` confirms all checks pass before marking the feature as complete.
|
|
32
34
|
|
|
33
35
|
---
|
|
34
36
|
|
|
@@ -38,36 +40,36 @@ Each step gates the next. `/fd-discuss` requires a defined feature. `/fd-plan` r
|
|
|
38
40
|
|---------|---------|------------|
|
|
39
41
|
| `/fd-new-project` | Bootstrap a new project | @orchestrator |
|
|
40
42
|
| `/fd-map-codebase` | Analyse and index the codebase | @mapper (×6 parallel) |
|
|
41
|
-
| `/fd-settings` | Configure FlowDeck settings | @orchestrator |
|
|
42
43
|
| `/fd-new-feature` | Initialize a new feature | @orchestrator |
|
|
43
44
|
| `/fd-discuss` | Pre-planning discussion | @discusser |
|
|
44
45
|
| `/fd-plan` | Generate a phase plan | @planner, @plan-checker |
|
|
45
|
-
| `/fd-
|
|
46
|
-
| `/fd-dashboard` | Visual progress dashboard | — |
|
|
46
|
+
| `/fd-design` | Run design-first planning/review/system modes | @design |
|
|
47
47
|
| `/fd-ask` | Smart agent dispatch | various |
|
|
48
|
-
| `/fd-execute` | Implement feature via TDD | @orchestrator, @coder, @tester, @reviewer |
|
|
48
|
+
| `/fd-execute` | Implement feature via TDD | @orchestrator, @backend-coder/@frontend-coder/@devops, @tester, @reviewer |
|
|
49
49
|
| `/fd-verify` | Verify feature completion | @tester, @reviewer, @security-auditor |
|
|
50
|
-
| `/fd-fix-bug` | Fix a bug with TDD | @debug-specialist, @tester, @coder |
|
|
51
|
-
| `/fd-review-code` | Code review | @reviewer, @researcher, @tester |
|
|
50
|
+
| `/fd-fix-bug` | Fix a bug with TDD | @debug-specialist, @tester, @backend-coder/@frontend-coder/@devops |
|
|
52
51
|
| `/fd-write-docs` | Generate documentation | @writer, @reviewer |
|
|
53
52
|
| `/fd-deploy-check` | Pre-deploy safety check | @tester, @security-auditor, @reviewer |
|
|
54
|
-
| `/fd-
|
|
53
|
+
| `/fd-status` | View project progress | — |
|
|
55
54
|
| `/fd-checkpoint` | Save a session checkpoint | — |
|
|
56
55
|
| `/fd-resume` | Resume from checkpoint | — |
|
|
57
56
|
| `/fd-multi-repo` | Multi-repo orchestration | @multi-repo-coordinator, @architect |
|
|
57
|
+
| `/fd-translate-intent` | Convert vague requests to ranked implementation options | @architect, @researcher |
|
|
58
|
+
| `/fd-suggest` | Suggest high-value feature opportunities from codebase signals | @researcher, @architect |
|
|
59
|
+
| `/fd-quick` | Fast focused task execution | @backend-coder/@frontend-coder/@devops or selected specialist |
|
|
60
|
+
| `/fd-reflect` | Post-session reflection and skill capture | @auto-learner |
|
|
61
|
+
| `/fd-doctor` | Installation and environment diagnostics | @orchestrator |
|
|
58
62
|
|
|
59
63
|
---
|
|
60
64
|
|
|
61
65
|
## Analysis Commands
|
|
62
66
|
|
|
63
|
-
|
|
67
|
+
Analysis workflows are currently exposed through:
|
|
64
68
|
|
|
65
69
|
| Command | Purpose | Flags |
|
|
66
70
|
|---------|---------|-------|
|
|
67
|
-
| `/fd-analyze-change` | Combined impact analysis | `--impact`, `--blast-radius`, `--regression`, `--test-gap`, `--volatility` |
|
|
68
|
-
| `/fd-guarded-edit` | Edit gate decision | auto/confirm/review/block |
|
|
69
|
-
| `/fd-evaluate-risk` | Standalone risk assessment | — |
|
|
70
71
|
| `/fd-translate-intent` | Intent to concrete options | `assumptions`, `recommended_option` |
|
|
72
|
+
| `/fd-suggest` | Suggest feature opportunities from volatility, failures, and decisions | `--category`, `--limit` |
|
|
71
73
|
|
|
72
74
|
---
|
|
73
75
|
|
|
@@ -116,7 +118,9 @@ argument-hint: [args]
|
|
|
116
118
|
|-------|---------|
|
|
117
119
|
| @orchestrator | Coordinates multi-step workflows |
|
|
118
120
|
| @planner | Creates implementation plans |
|
|
119
|
-
| @coder | Implements code changes |
|
|
121
|
+
| @backend-coder | Implements backend code changes |
|
|
122
|
+
| @frontend-coder | Implements frontend code changes |
|
|
123
|
+
| @devops | Implements infrastructure and operations changes |
|
|
120
124
|
| @tester | Writes and runs tests |
|
|
121
125
|
| @reviewer | Reviews code quality |
|
|
122
126
|
| @researcher | Investigates and provides context |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dv.nghiem/flowdeck",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "FlowDeck — structured planning and execution workflows for OpenCode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
"postinstall": "node postinstall.mjs",
|
|
30
30
|
"prepublishOnly": "bun run clean && bun run build",
|
|
31
31
|
"test": "bun test",
|
|
32
|
-
"typecheck": "tsc --noEmit"
|
|
32
|
+
"typecheck": "tsc --noEmit",
|
|
33
|
+
"validate:skills": "node scripts/validate-skills.mjs",
|
|
34
|
+
"validate:docs": "node scripts/validate-docs.mjs"
|
|
33
35
|
},
|
|
34
36
|
"keywords": ["opencode", "plugin", "ai", "workflow", "planning"],
|
|
35
37
|
"author": "DVNghiem",
|
package/src/commands/fd-ask.md
CHANGED
|
@@ -15,6 +15,7 @@ Analyze `$ARGUMENTS` to determine the best specialist:
|
|
|
15
15
|
|
|
16
16
|
| Keywords / Topic | Agent |
|
|
17
17
|
|-----------------|-------|
|
|
18
|
+
| ui, ux, wireframe, landing page, dashboard, admin panel, app screen, design system | **@design** |
|
|
18
19
|
| design, architecture, structure, system, component, API | **@architect** |
|
|
19
20
|
| security, auth, vulnerability, token, permission, injection | **@security-auditor** |
|
|
20
21
|
| performance, speed, slow, optimize, latency, cache, memory | **@performance** |
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Design-first workflow for UI-heavy tasks — draft design artifacts, review implementation fidelity, or define design system rules
|
|
3
|
+
argument-hint: [--mode=draft|review|system] [task-description] [--override]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Design
|
|
7
|
+
|
|
8
|
+
Run design-first workflow stages for user-facing tasks.
|
|
9
|
+
|
|
10
|
+
**Input:** $ARGUMENTS — supports `--mode=draft|review|system` (default `draft`)
|
|
11
|
+
|
|
12
|
+
## Mode: draft
|
|
13
|
+
|
|
14
|
+
Use when creating/updating UI before implementation.
|
|
15
|
+
|
|
16
|
+
### Required Stages
|
|
17
|
+
|
|
18
|
+
1. discovery
|
|
19
|
+
2. UX planning
|
|
20
|
+
3. wireframe/layout planning
|
|
21
|
+
4. visual system definition
|
|
22
|
+
5. design approval
|
|
23
|
+
6. implementation handoff
|
|
24
|
+
|
|
25
|
+
### Process
|
|
26
|
+
|
|
27
|
+
1. Classify task as UI-heavy (landing page, dashboard, admin panel, app screen, website/app UX)
|
|
28
|
+
2. Delegate to `@design` agent for structured artifacts
|
|
29
|
+
3. Persist outputs in planning state under `design_artifact`
|
|
30
|
+
4. Mark:
|
|
31
|
+
- `requires_design_first: true`
|
|
32
|
+
- `design_stage: handoff_complete`
|
|
33
|
+
- `design_approved: true` only when approval criteria are met
|
|
34
|
+
5. Record any bypass with explicit `design_override_reason`
|
|
35
|
+
|
|
36
|
+
## Mode: review
|
|
37
|
+
|
|
38
|
+
Use to review implemented UI against approved design artifact.
|
|
39
|
+
|
|
40
|
+
### Process
|
|
41
|
+
|
|
42
|
+
1. Load approved design artifact and changed UI files
|
|
43
|
+
2. Delegate to `@design` with `design-audit` + `responsive-review`
|
|
44
|
+
3. Report:
|
|
45
|
+
- design mismatches
|
|
46
|
+
- hierarchy/spacing issues
|
|
47
|
+
- CTA flow weaknesses
|
|
48
|
+
- responsive/accessibility concerns
|
|
49
|
+
- missing empty/error/loading/success states
|
|
50
|
+
|
|
51
|
+
## Mode: system
|
|
52
|
+
|
|
53
|
+
Use to generate/update design tokens and component behavior rules.
|
|
54
|
+
|
|
55
|
+
### Process
|
|
56
|
+
|
|
57
|
+
1. Delegate to `@design` with `design-system-definition`
|
|
58
|
+
2. Generate/update token guidance and component rules
|
|
59
|
+
3. Save summary in planning state `design_artifact.design_tokens_guidance`
|
|
60
|
+
|
|
61
|
+
## Enforcement Notes
|
|
62
|
+
|
|
63
|
+
- UI-heavy tasks must complete design approval before `/fd-execute`, unless `--override` is explicitly provided and logged.
|
|
64
|
+
- Backend-only/infrastructure-only tasks skip this command.
|
|
@@ -50,6 +50,7 @@ Structure the discussion:
|
|
|
50
50
|
2. **Constraints** — Technical constraints, deadlines, dependencies?
|
|
51
51
|
3. **Acceptance criteria** — How will we know it's done?
|
|
52
52
|
4. **Risks** — What could go wrong? Any known issues?
|
|
53
|
+
5. **UI classification** — Is this task user-facing and UI-heavy (website/app/dashboard/admin/landing/onboarding)?
|
|
53
54
|
|
|
54
55
|
Ask questions one at a time. Wait for answers before proceeding.
|
|
55
56
|
|
|
@@ -89,6 +90,7 @@ D-02: [Topic] — [Decision] ([Rationale])
|
|
|
89
90
|
## Completion
|
|
90
91
|
|
|
91
92
|
Report: decisions captured, file path, and suggest running `/fd-plan`.
|
|
93
|
+
If UI-heavy, also suggest running `/fd-design --mode=draft` before `/fd-execute`.
|
|
92
94
|
|
|
93
95
|
## Error Handling
|
|
94
96
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Execute feature implementation from PLAN.md — TDD pipeline with coder, tester, reviewer, and STATE.md update
|
|
2
|
+
description: Execute feature implementation from PLAN.md — TDD pipeline with backend-coder, frontend-coder, devops, tester, reviewer, and STATE.md update
|
|
3
3
|
argument-hint: [--phase=N] [--override]
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -35,6 +35,10 @@ Verify prerequisites:
|
|
|
35
35
|
- `.codebase/` directory exists
|
|
36
36
|
- `STATE.md` has `plan_confirmed: true`
|
|
37
37
|
- `PLAN.md` exists in current phase directory
|
|
38
|
+
- If `requires_design_first: true`, require:
|
|
39
|
+
- `design_stage: handoff_complete`
|
|
40
|
+
- `design_approved: true`
|
|
41
|
+
- OR explicit `--override` with logged reason
|
|
38
42
|
|
|
39
43
|
Initialize TDD state:
|
|
40
44
|
```yaml
|
|
@@ -79,7 +83,7 @@ Run failing tests:
|
|
|
79
83
|
|
|
80
84
|
### Step 7: Implement Minimum (GREEN)
|
|
81
85
|
|
|
82
|
-
Spawn `@coder` to implement:
|
|
86
|
+
Spawn the implementation agent selected by scope (`@backend-coder`, `@frontend-coder`, or `@devops`) to implement:
|
|
83
87
|
- **Minimum code** to make failing tests pass
|
|
84
88
|
- No speculative features
|
|
85
89
|
- No over-engineering
|
|
@@ -160,7 +164,7 @@ User can override with `/fd-execute --override`:
|
|
|
160
164
|
|
|
161
165
|
D-03: Fail fast with clear error
|
|
162
166
|
- If guard check fails: abort with clear error and remediation
|
|
163
|
-
- If
|
|
167
|
+
- If implementation agent fails: report failure, offer retry or skip
|
|
164
168
|
- If @reviewer finds critical issues: return to Step 7 for fixes
|
|
165
169
|
- No partial state saved on error
|
|
166
170
|
|
|
@@ -66,7 +66,7 @@ Confirm test fails. If it passes, the bug may already be fixed or the test is wr
|
|
|
66
66
|
|
|
67
67
|
### Step 7: GREEN — Implement Fix
|
|
68
68
|
|
|
69
|
-
-
|
|
69
|
+
- **Implementation agent (`@backend-coder` / `@frontend-coder` / `@devops`)**: Implement the minimum code change that makes the regression test pass
|
|
70
70
|
- Do not refactor yet
|
|
71
71
|
|
|
72
72
|
**GUARD: Do NOT proceed if test does not pass GREEN.**
|
|
@@ -101,7 +101,7 @@ Append entry to `.codebase/FAILURES.json`:
|
|
|
101
101
|
|
|
102
102
|
## Error Handling
|
|
103
103
|
|
|
104
|
-
- **GUARD VIOLATION**: If
|
|
104
|
+
- **GUARD VIOLATION**: If implementation agent attempts to skip RED or GREEN phase, block and return to correct phase
|
|
105
105
|
- **Override mechanism**: User can override with `/fd-fix-bug --override` but every override is logged in `override_log`
|
|
106
106
|
- If root cause unclear: spawn `@debug-specialist` for deeper analysis
|
|
107
107
|
- If fix breaks tests: revert, reassess root cause, never suppress error
|
|
@@ -101,13 +101,13 @@ If any circular dependency is detected, the flow stops and reports the cycle. Ci
|
|
|
101
101
|
|
|
102
102
|
Changes execute in dependency order. For each repo:
|
|
103
103
|
|
|
104
|
-
1. `@coder` implements the changes in that repo
|
|
104
|
+
1. Implementation agent (`@backend-coder`, `@frontend-coder`, or `@devops`) implements the changes in that repo based on scope
|
|
105
105
|
2. `@tester` writes and runs tests for that repo's changes
|
|
106
106
|
3. No downstream repo starts until the upstream repo's changes pass tests
|
|
107
107
|
|
|
108
|
-
For non-breaking changes,
|
|
108
|
+
For non-breaking changes, implementation agent and `@tester` for a given repo run in parallel. For breaking changes, `@tester` must verify the upstream before downstream implementation starts.
|
|
109
109
|
|
|
110
|
-
If a repo's
|
|
110
|
+
If a repo's implementation agent or `@tester` fails, that repo and all downstream repos in the dependency chain are paused. Upstream repos that completed are not rolled back — they remain deployed. The flow resumes once the failing repo is fixed.
|
|
111
111
|
|
|
112
112
|
### Step 5: Verify Integration
|
|
113
113
|
|
package/src/commands/fd-plan.md
CHANGED
|
@@ -82,6 +82,8 @@ Update STATE.md:
|
|
|
82
82
|
- Set plan_file to path of saved PLAN.md
|
|
83
83
|
- Set plan_confirmed: true
|
|
84
84
|
- Update last_action to "Plan confirmed"
|
|
85
|
+
- If task is UI-heavy, set `requires_design_first: true` and `design_stage: pending`
|
|
86
|
+
- Suggest running `/fd-design --mode=draft` immediately after plan confirmation
|
|
85
87
|
|
|
86
88
|
## D-06 Compliance
|
|
87
89
|
|
package/src/commands/fd-quick.md
CHANGED
|
@@ -21,10 +21,13 @@ Parse `$ARGUMENTS` to determine:
|
|
|
21
21
|
|
|
22
22
|
| Task Type | Signal Keywords | Agent |
|
|
23
23
|
|-----------|-----------------|-------|
|
|
24
|
-
|
|
|
24
|
+
| Backend code implementation | api, server, service, database, migration, endpoint, repository | `@backend-coder` |
|
|
25
|
+
| Frontend code implementation | ui, frontend, component, page, css, style, react, screen | `@frontend-coder` |
|
|
26
|
+
| DevOps and infra implementation | ci, cd, deploy, pipeline, workflow, docker, kubernetes, terraform | `@devops` |
|
|
25
27
|
| Explore and understand | trace, map, find, explore, understand, what does | `@code-explorer` |
|
|
26
28
|
| Review code quality | review, check, audit, analyze | `@reviewer` |
|
|
27
29
|
| Security review | security, auth, vulnerability, injection, OWASP | `@security-auditor` |
|
|
30
|
+
| UI design-first planning | landing page, dashboard, admin panel, onboarding UX, app screen, wireframe, design system | `@design` |
|
|
28
31
|
| Design or architecture | design, architect, schema, API, structure | `@architect` |
|
|
29
32
|
| Write tests | test, coverage, regression, TDD | `@tester` |
|
|
30
33
|
| Documentation | docs, README, document, write | `@writer` |
|
|
@@ -42,6 +42,12 @@ Review all changed files:
|
|
|
42
42
|
- Quality: critical bugs, missing error handling, TDD discipline
|
|
43
43
|
- Conventions: naming, patterns, import style
|
|
44
44
|
- Test coverage >= 80% for changed files — flag as HIGH if below
|
|
45
|
+
- If task is UI-heavy, include design fidelity review against approved design artifact
|
|
46
|
+
|
|
47
|
+
**Check B2: UI Design Review (@design) — UI-heavy only**
|
|
48
|
+
- Compare implemented UI to approved design artifact
|
|
49
|
+
- Report hierarchy, spacing, CTA flow, responsiveness, accessibility, and missing state coverage gaps
|
|
50
|
+
- Fail verification when severe design fidelity mismatch exists
|
|
45
51
|
|
|
46
52
|
**Check C: Security Scan (@security-auditor)**
|
|
47
53
|
- No hardcoded secrets
|
package/src/rules/README.md
CHANGED
|
@@ -6,6 +6,16 @@ Coding standards for projects using FlowDeck. These define conventions that Flow
|
|
|
6
6
|
|
|
7
7
|
Rules are loaded **automatically** by the FlowDeck plugin. No manual configuration is needed — when FlowDeck is installed, all rule files in this directory are injected into OpenCode's `instructions` at startup.
|
|
8
8
|
|
|
9
|
+
## Rule Precedence
|
|
10
|
+
|
|
11
|
+
When guidance conflicts, FlowDeck resolves precedence in this order:
|
|
12
|
+
|
|
13
|
+
1. Repository governance files (`AGENTS.md`, `CLAUDE.md`)
|
|
14
|
+
2. FlowDeck plugin rules from `src/rules/**`
|
|
15
|
+
3. Runtime policies from `.codebase/POLICIES.json`
|
|
16
|
+
|
|
17
|
+
This keeps repository-specific expectations authoritative while still allowing runtime policy learning.
|
|
18
|
+
|
|
9
19
|
## Selective Rules (Optional)
|
|
10
20
|
|
|
11
21
|
If you want to override the default set and load only specific rules, add them to `opencode.json` under `instructions`:
|
|
@@ -10,14 +10,14 @@ FlowDeck provides 23 specialist agents. Each has a specific role. Using the righ
|
|
|
10
10
|
| `@build-error-resolver` | Fix build failures and type errors | Immediately when build fails |
|
|
11
11
|
| `@build-resolver` | Diagnose and fix build/compile failures | When build breaks and cause is unclear |
|
|
12
12
|
| `@code-explorer` | Map unfamiliar codebase structure | Before modifying unfamiliar code |
|
|
13
|
-
| `@coder` | Implement features and fixes | All code implementation |
|
|
13
|
+
| `@backend-coder` | Implement features and fixes | All code implementation |
|
|
14
14
|
| `@debug-specialist` | Root cause analysis for bugs | When a bug needs deep investigation |
|
|
15
15
|
| `@discusser` | Extract requirements via Q&A | Starting a new feature or phase |
|
|
16
16
|
| `@doc-updater` | Update docs after code changes | After implementation completes |
|
|
17
17
|
| `@plan-checker` | Review PLAN.md before execution | Before executing any plan |
|
|
18
18
|
| `@mapper` | Map codebase to .codebase/ docs | Running /fd-map-codebase |
|
|
19
19
|
| `@orchestrator` | Coordinate multi-agent execution | Managing a full feature delivery |
|
|
20
|
-
| `@
|
|
20
|
+
| `@task-splitter` | Decompose parallel workstreams | When tasks can run simultaneously |
|
|
21
21
|
| `@performance-optimizer` | Profile and fix performance issues | When app is slow or before release |
|
|
22
22
|
| `@planner` | Create detailed implementation plans | Any multi-file feature |
|
|
23
23
|
| `@refactor-guide` | Safe code restructuring | Reducing technical debt |
|
|
@@ -34,7 +34,7 @@ These situations should trigger agent use automatically:
|
|
|
34
34
|
|
|
35
35
|
| Situation | Agent |
|
|
36
36
|
|-----------|-------|
|
|
37
|
-
| Complex feature spanning 3+ files | `@planner` first, then `@coder` |
|
|
37
|
+
| Complex feature spanning 3+ files | `@planner` first, then `@backend-coder` |
|
|
38
38
|
| Code was just written | `@reviewer` |
|
|
39
39
|
| Build fails | `@build-error-resolver` |
|
|
40
40
|
| Bug reported | `@debug-specialist` |
|
|
@@ -50,11 +50,11 @@ Independent agents can run simultaneously. Examples:
|
|
|
50
50
|
```
|
|
51
51
|
Wave 1 (parallel):
|
|
52
52
|
@researcher — research the library API
|
|
53
|
-
@coder — implement the model and types
|
|
53
|
+
@backend-coder — implement the model and types
|
|
54
54
|
@tester — write test cases
|
|
55
55
|
|
|
56
56
|
Wave 2 (after Wave 1):
|
|
57
|
-
@coder — implement service using Wave 1 research
|
|
57
|
+
@backend-coder — implement service using Wave 1 research
|
|
58
58
|
@reviewer — review Wave 1 implementation
|
|
59
59
|
```
|
|
60
60
|
|
|
@@ -78,7 +78,7 @@ discuss → plan → execute → review
|
|
|
78
78
|
|-------|-------|---------|
|
|
79
79
|
| discuss | `@discusser` | `/fd-discuss` |
|
|
80
80
|
| plan | `@planner` → `@plan-checker` | `/fd-plan` |
|
|
81
|
-
| execute | `@orchestrator` → `@coder`, `@tester`, etc. | `/fd-new-feature` |
|
|
81
|
+
| execute | `@orchestrator` → `@backend-coder`, `@tester`, etc. | `/fd-new-feature` |
|
|
82
82
|
| review | `@reviewer` + `@security-auditor` | `/fd-review-code` |
|
|
83
83
|
|
|
84
84
|
Do not skip phases. The orchestrator enforces phase gating automatically.
|
|
@@ -9,8 +9,8 @@ Language-agnostic coding conventions followed by all FlowDeck agents.
|
|
|
9
9
|
| 1 | **No Redundant Code** | No redundant arguments, methods, or attributes. Each piece of code must serve a purpose. |
|
|
10
10
|
| 2 | **Simplicity** | Code should be simple and easy to understand. Prefer clarity over cleverness. |
|
|
11
11
|
| 3 | **Clear Commands** | Code should have clear, explicit commands. No ambiguity in intent. |
|
|
12
|
-
| 4 | **Extensibility** |
|
|
13
|
-
| 5 | **Documentation** |
|
|
12
|
+
| 4 | **Extensibility** | Prefer minimal designs for current requirements. Add extension points only when required by active scope. |
|
|
13
|
+
| 5 | **Documentation** | Add comments when needed to explain non-obvious tradeoffs or constraints; avoid boilerplate file headers. |
|
|
14
14
|
| 6 | **Information Security** | Comply with information security best practices. No secrets, no injections, no XSS. |
|
|
15
15
|
| 7 | **Memory Optimization** | Optimize memory usage to the minimum possible. Avoid unnecessary allocations. |
|
|
16
16
|
| 8 | **Speed** | Process speed should be as fast as possible. Prefer efficient algorithms and data structures. |
|
|
@@ -102,7 +102,7 @@ class UserService {
|
|
|
102
102
|
|
|
103
103
|
## Result Types for Error Handling
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
Prefer explicit error contracts (Result types or typed exceptions) for business logic. Use one pattern consistently within a module.
|
|
106
106
|
|
|
107
107
|
```typescript
|
|
108
108
|
type Ok<T> = { ok: true; value: T };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: app-shell-design
|
|
3
|
+
description: Define app shell structure, navigation model, and reusable surface patterns for web/mobile apps
|
|
4
|
+
origin: FlowDeck
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# App Shell Design Skill
|
|
8
|
+
|
|
9
|
+
Standardizes navigation and page frame behavior across app surfaces.
|
|
10
|
+
|
|
11
|
+
## When to Activate
|
|
12
|
+
|
|
13
|
+
- New app or major app redesign
|
|
14
|
+
- Task includes navigation, shell, or global layout work
|
|
15
|
+
|
|
16
|
+
## Required Inputs
|
|
17
|
+
|
|
18
|
+
- Core product flows
|
|
19
|
+
- Platform targets (web/mobile)
|
|
20
|
+
|
|
21
|
+
## Output Format
|
|
22
|
+
|
|
23
|
+
- shell_structure
|
|
24
|
+
- navigation_model
|
|
25
|
+
- route_grouping
|
|
26
|
+
- persistent_ui_regions
|
|
27
|
+
- global_state_requirements
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
Use for: "Design app shell and navigation for a kanban productivity app."
|