@dv.nghiem/flowdeck 0.1.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/LICENSE +21 -0
- package/README.md +136 -0
- package/bin/flowdeck.js +108 -0
- package/dist/agents/architect.d.ts +3 -0
- package/dist/agents/architect.d.ts.map +1 -0
- package/dist/agents/code-explorer.d.ts +3 -0
- package/dist/agents/code-explorer.d.ts.map +1 -0
- package/dist/agents/coder.d.ts +3 -0
- package/dist/agents/coder.d.ts.map +1 -0
- package/dist/agents/debug.d.ts +4 -0
- package/dist/agents/debug.d.ts.map +1 -0
- package/dist/agents/doc-updater.d.ts +3 -0
- package/dist/agents/doc-updater.d.ts.map +1 -0
- package/dist/agents/flowdeck.d.ts +5 -0
- package/dist/agents/flowdeck.d.ts.map +1 -0
- package/dist/agents/index.d.ts +38 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/mapper.d.ts +3 -0
- package/dist/agents/mapper.d.ts.map +1 -0
- package/dist/agents/orchestrator.d.ts +10 -0
- package/dist/agents/orchestrator.d.ts.map +1 -0
- package/dist/agents/performance.d.ts +4 -0
- package/dist/agents/performance.d.ts.map +1 -0
- package/dist/agents/planner.d.ts +3 -0
- package/dist/agents/planner.d.ts.map +1 -0
- package/dist/agents/policy-enforcer.d.ts +3 -0
- package/dist/agents/policy-enforcer.d.ts.map +1 -0
- package/dist/agents/researcher.d.ts +3 -0
- package/dist/agents/researcher.d.ts.map +1 -0
- package/dist/agents/reviewer.d.ts +3 -0
- package/dist/agents/reviewer.d.ts.map +1 -0
- package/dist/agents/risk-analyst.d.ts +3 -0
- package/dist/agents/risk-analyst.d.ts.map +1 -0
- package/dist/agents/security-auditor.d.ts +3 -0
- package/dist/agents/security-auditor.d.ts.map +1 -0
- package/dist/agents/specialist.d.ts +5 -0
- package/dist/agents/specialist.d.ts.map +1 -0
- package/dist/agents/tester.d.ts +3 -0
- package/dist/agents/tester.d.ts.map +1 -0
- package/dist/agents/types.d.ts +20 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/writer.d.ts +3 -0
- package/dist/agents/writer.d.ts.map +1 -0
- package/dist/commands/analysis/analysis.test.d.ts +2 -0
- package/dist/commands/analysis/analysis.test.d.ts.map +1 -0
- package/dist/commands/analysis/analyze-change.d.ts +148 -0
- package/dist/commands/analysis/analyze-change.d.ts.map +1 -0
- package/dist/commands/analysis/evaluate-risk.d.ts +77 -0
- package/dist/commands/analysis/evaluate-risk.d.ts.map +1 -0
- package/dist/commands/analysis/guarded-edit.d.ts +72 -0
- package/dist/commands/analysis/guarded-edit.d.ts.map +1 -0
- package/dist/commands/execution/deploy-check.d.ts +91 -0
- package/dist/commands/execution/deploy-check.d.ts.map +1 -0
- package/dist/commands/execution/fix-bug.d.ts +187 -0
- package/dist/commands/execution/fix-bug.d.ts.map +1 -0
- package/dist/commands/execution/new-feature.d.ts +171 -0
- package/dist/commands/execution/new-feature.d.ts.map +1 -0
- package/dist/commands/execution/review-code.d.ts +130 -0
- package/dist/commands/execution/review-code.d.ts.map +1 -0
- package/dist/commands/execution/write-docs.d.ts +94 -0
- package/dist/commands/execution/write-docs.d.ts.map +1 -0
- package/dist/commands/governance/approve.d.ts +80 -0
- package/dist/commands/governance/approve.d.ts.map +1 -0
- package/dist/commands/intelligence/blast-radius.d.ts +67 -0
- package/dist/commands/intelligence/blast-radius.d.ts.map +1 -0
- package/dist/commands/intelligence/impact-radar.d.ts +71 -0
- package/dist/commands/intelligence/impact-radar.d.ts.map +1 -0
- package/dist/commands/intelligence/intelligence.test.d.ts +2 -0
- package/dist/commands/intelligence/intelligence.test.d.ts.map +1 -0
- package/dist/commands/intelligence/regression-predict.d.ts +75 -0
- package/dist/commands/intelligence/regression-predict.d.ts.map +1 -0
- package/dist/commands/intelligence/review-route.d.ts +65 -0
- package/dist/commands/intelligence/review-route.d.ts.map +1 -0
- package/dist/commands/intelligence/test-gap.d.ts +73 -0
- package/dist/commands/intelligence/test-gap.d.ts.map +1 -0
- package/dist/commands/intelligence/translate-intent.d.ts +87 -0
- package/dist/commands/intelligence/translate-intent.d.ts.map +1 -0
- package/dist/commands/intelligence/volatility-map-cmd.d.ts +68 -0
- package/dist/commands/intelligence/volatility-map-cmd.d.ts.map +1 -0
- package/dist/commands/planning/ask.d.ts +62 -0
- package/dist/commands/planning/ask.d.ts.map +1 -0
- package/dist/commands/planning/ask.test.d.ts +2 -0
- package/dist/commands/planning/ask.test.d.ts.map +1 -0
- package/dist/commands/planning/dashboard.d.ts +30 -0
- package/dist/commands/planning/dashboard.d.ts.map +1 -0
- package/dist/commands/planning/discuss.d.ts +39 -0
- package/dist/commands/planning/discuss.d.ts.map +1 -0
- package/dist/commands/planning/plan.d.ts +67 -0
- package/dist/commands/planning/plan.d.ts.map +1 -0
- package/dist/commands/planning/roadmap.d.ts +105 -0
- package/dist/commands/planning/roadmap.d.ts.map +1 -0
- package/dist/commands/setup/doctor.d.ts +10 -0
- package/dist/commands/setup/doctor.d.ts.map +1 -0
- package/dist/commands/setup/map-codebase.d.ts +62 -0
- package/dist/commands/setup/map-codebase.d.ts.map +1 -0
- package/dist/commands/setup/new-project.d.ts +19 -0
- package/dist/commands/setup/new-project.d.ts.map +1 -0
- package/dist/commands/setup/settings.d.ts +57 -0
- package/dist/commands/setup/settings.d.ts.map +1 -0
- package/dist/commands/state/checkpoint.d.ts +27 -0
- package/dist/commands/state/checkpoint.d.ts.map +1 -0
- package/dist/commands/state/multi-repo.d.ts +63 -0
- package/dist/commands/state/multi-repo.d.ts.map +1 -0
- package/dist/commands/state/progress.d.ts +57 -0
- package/dist/commands/state/progress.d.ts.map +1 -0
- package/dist/commands/state/resume.d.ts +11 -0
- package/dist/commands/state/resume.d.ts.map +1 -0
- package/dist/commands/state/workspace-commands.d.ts +207 -0
- package/dist/commands/state/workspace-commands.d.ts.map +1 -0
- package/dist/dashboard/lib/port-finder.d.ts +10 -0
- package/dist/dashboard/lib/port-finder.d.ts.map +1 -0
- package/dist/dashboard/lib/port-finder.test.d.ts +2 -0
- package/dist/dashboard/lib/port-finder.test.d.ts.map +1 -0
- package/dist/dashboard/lib/state-reader.d.ts +3 -0
- package/dist/dashboard/lib/state-reader.d.ts.map +1 -0
- package/dist/dashboard/server.d.ts +2 -0
- package/dist/dashboard/server.d.ts.map +1 -0
- package/dist/dashboard/server.mjs +13649 -0
- package/dist/dashboard/types.d.ts +72 -0
- package/dist/dashboard/types.d.ts.map +1 -0
- package/dist/dashboard/views/index.ejs +391 -0
- package/dist/dashboard/views/partials/blockers.ejs +10 -0
- package/dist/dashboard/views/partials/header.ejs +20 -0
- package/dist/dashboard/views/partials/phase-timeline.ejs +40 -0
- package/dist/dashboard/views/partials/progress.ejs +12 -0
- package/dist/hooks/approval-hook.d.ts +13 -0
- package/dist/hooks/approval-hook.d.ts.map +1 -0
- package/dist/hooks/compaction-hook.d.ts +23 -0
- package/dist/hooks/compaction-hook.d.ts.map +1 -0
- package/dist/hooks/context-window-monitor.d.ts +21 -0
- package/dist/hooks/context-window-monitor.d.ts.map +1 -0
- package/dist/hooks/decision-trace-hook.d.ts +13 -0
- package/dist/hooks/decision-trace-hook.d.ts.map +1 -0
- package/dist/hooks/file-tracker.d.ts +29 -0
- package/dist/hooks/file-tracker.d.ts.map +1 -0
- package/dist/hooks/guard-rails.d.ts +33 -0
- package/dist/hooks/guard-rails.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/notifications.d.ts +21 -0
- package/dist/hooks/notifications.d.ts.map +1 -0
- package/dist/hooks/patch-trust.d.ts +27 -0
- package/dist/hooks/patch-trust.d.ts.map +1 -0
- package/dist/hooks/patch-trust.test.d.ts +2 -0
- package/dist/hooks/patch-trust.test.d.ts.map +1 -0
- package/dist/hooks/session-events.d.ts +8 -0
- package/dist/hooks/session-events.d.ts.map +1 -0
- package/dist/hooks/session-idle-hook.d.ts +21 -0
- package/dist/hooks/session-idle-hook.d.ts.map +1 -0
- package/dist/hooks/session-start.d.ts +10 -0
- package/dist/hooks/session-start.d.ts.map +1 -0
- package/dist/hooks/shell-env-hook.d.ts +21 -0
- package/dist/hooks/shell-env-hook.d.ts.map +1 -0
- package/dist/hooks/telemetry-hook.d.ts +25 -0
- package/dist/hooks/telemetry-hook.d.ts.map +1 -0
- package/dist/hooks/todo-hook.d.ts +25 -0
- package/dist/hooks/todo-hook.d.ts.map +1 -0
- package/dist/hooks/tool-guard.d.ts +41 -0
- package/dist/hooks/tool-guard.d.ts.map +1 -0
- package/dist/hooks/tool-guard.test.d.ts +2 -0
- package/dist/hooks/tool-guard.test.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6639 -0
- package/dist/lib/confirmation.d.ts +20 -0
- package/dist/lib/confirmation.d.ts.map +1 -0
- package/dist/lib/impact-radar.d.ts +35 -0
- package/dist/lib/impact-radar.d.ts.map +1 -0
- package/dist/lib/signatures.d.ts +12 -0
- package/dist/lib/signatures.d.ts.map +1 -0
- package/dist/lib/timestamps.d.ts +23 -0
- package/dist/lib/timestamps.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +20 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/services/agent-performance.d.ts +29 -0
- package/dist/services/agent-performance.d.ts.map +1 -0
- package/dist/services/approval-manager.d.ts +30 -0
- package/dist/services/approval-manager.d.ts.map +1 -0
- package/dist/services/index.d.ts +7 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/model-router.d.ts +35 -0
- package/dist/services/model-router.d.ts.map +1 -0
- package/dist/services/policy-compiler.d.ts +27 -0
- package/dist/services/policy-compiler.d.ts.map +1 -0
- package/dist/services/run-trace.d.ts +34 -0
- package/dist/services/run-trace.d.ts.map +1 -0
- package/dist/services/services.test.d.ts +2 -0
- package/dist/services/services.test.d.ts.map +1 -0
- package/dist/services/telemetry.d.ts +34 -0
- package/dist/services/telemetry.d.ts.map +1 -0
- package/dist/tools/agent-dispatch.test.d.ts +2 -0
- package/dist/tools/agent-dispatch.test.d.ts.map +1 -0
- package/dist/tools/codebase-state.d.ts +4 -0
- package/dist/tools/codebase-state.d.ts.map +1 -0
- package/dist/tools/context-generator.d.ts +3 -0
- package/dist/tools/context-generator.d.ts.map +1 -0
- package/dist/tools/council.d.ts +4 -0
- package/dist/tools/council.d.ts.map +1 -0
- package/dist/tools/decision-trace.d.ts +16 -0
- package/dist/tools/decision-trace.d.ts.map +1 -0
- package/dist/tools/delegate.d.ts +4 -0
- package/dist/tools/delegate.d.ts.map +1 -0
- package/dist/tools/failure-replay.d.ts +19 -0
- package/dist/tools/failure-replay.d.ts.map +1 -0
- package/dist/tools/failure-replay.test.d.ts +2 -0
- package/dist/tools/failure-replay.test.d.ts.map +1 -0
- package/dist/tools/hash-edit.d.ts +3 -0
- package/dist/tools/hash-edit.d.ts.map +1 -0
- package/dist/tools/planning-state-lib.d.ts +65 -0
- package/dist/tools/planning-state-lib.d.ts.map +1 -0
- package/dist/tools/planning-state.d.ts +3 -0
- package/dist/tools/planning-state.d.ts.map +1 -0
- package/dist/tools/policy-engine.d.ts +19 -0
- package/dist/tools/policy-engine.d.ts.map +1 -0
- package/dist/tools/repo-memory.d.ts +20 -0
- package/dist/tools/repo-memory.d.ts.map +1 -0
- package/dist/tools/repo-memory.test.d.ts +2 -0
- package/dist/tools/repo-memory.test.d.ts.map +1 -0
- package/dist/tools/run-parallel.d.ts +4 -0
- package/dist/tools/run-parallel.d.ts.map +1 -0
- package/dist/tools/run-pipeline.d.ts +4 -0
- package/dist/tools/run-pipeline.d.ts.map +1 -0
- package/dist/tools/volatility-map.d.ts +18 -0
- package/dist/tools/volatility-map.d.ts.map +1 -0
- package/dist/tools/volatility-map.test.d.ts +2 -0
- package/dist/tools/volatility-map.test.d.ts.map +1 -0
- package/dist/tools/workspace-state.d.ts +3 -0
- package/dist/tools/workspace-state.d.ts.map +1 -0
- package/docs/USER_GUIDE.md +20 -0
- package/docs/agents.md +562 -0
- package/docs/best-practices.md +47 -0
- package/docs/command-migration.md +175 -0
- package/docs/commands/fd-analyze-change.md +107 -0
- package/docs/commands/fd-ask.md +51 -0
- package/docs/commands/fd-checkpoint.md +10 -0
- package/docs/commands/fd-dashboard.md +11 -0
- package/docs/commands/fd-deploy-check.md +11 -0
- package/docs/commands/fd-discuss.md +28 -0
- package/docs/commands/fd-evaluate-risk.md +134 -0
- package/docs/commands/fd-fix-bug.md +24 -0
- package/docs/commands/fd-guarded-edit.md +105 -0
- package/docs/commands/fd-map-codebase.md +27 -0
- package/docs/commands/fd-multi-repo.md +63 -0
- package/docs/commands/fd-new-feature.md +25 -0
- package/docs/commands/fd-new-project.md +24 -0
- package/docs/commands/fd-plan.md +33 -0
- package/docs/commands/fd-progress.md +11 -0
- package/docs/commands/fd-resume.md +10 -0
- package/docs/commands/fd-review-code.md +29 -0
- package/docs/commands/fd-roadmap.md +10 -0
- package/docs/commands/fd-settings.md +10 -0
- package/docs/commands/fd-write-docs.md +10 -0
- package/docs/commands.md +476 -0
- package/docs/configuration.md +211 -0
- package/docs/feature-integration-architecture.md +255 -0
- package/docs/index.md +75 -0
- package/docs/installation.md +134 -0
- package/docs/intelligence.md +294 -0
- package/docs/multi-repo.md +201 -0
- package/docs/notifications.md +170 -0
- package/docs/parallel-execution.md +227 -0
- package/docs/quick-start.md +174 -0
- package/docs/rules.md +459 -0
- package/docs/skills.md +408 -0
- package/docs/workflows.md +376 -0
- package/package.json +58 -0
- package/postinstall.mjs +102 -0
- package/src/rules/README.md +37 -0
- package/src/rules/common/agent-orchestration.md +86 -0
- package/src/rules/common/coding-style.md +120 -0
- package/src/rules/common/git-workflow.md +77 -0
- package/src/rules/common/security.md +94 -0
- package/src/rules/common/testing.md +105 -0
- package/src/rules/golang/patterns.md +187 -0
- package/src/rules/java/patterns.md +204 -0
- package/src/rules/python/patterns.md +141 -0
- package/src/rules/rust/patterns.md +210 -0
- package/src/rules/typescript/patterns.md +168 -0
- package/src/skills/api-design/SKILL.md +143 -0
- package/src/skills/arch-constraint-guard/SKILL.md +61 -0
- package/src/skills/blast-radius-preview/SKILL.md +65 -0
- package/src/skills/change-impact-radar/SKILL.md +63 -0
- package/src/skills/code-review/SKILL.md +108 -0
- package/src/skills/code-tour/SKILL.md +101 -0
- package/src/skills/codebase-mapping/SKILL.md +87 -0
- package/src/skills/codebase-onboarding/SKILL.md +133 -0
- package/src/skills/confidence-aware-planning/SKILL.md +67 -0
- package/src/skills/context-load/SKILL.md +63 -0
- package/src/skills/debug-flow/SKILL.md +75 -0
- package/src/skills/decision-trace/SKILL.md +72 -0
- package/src/skills/dependency-audit/SKILL.md +126 -0
- package/src/skills/deploy-check/SKILL.md +87 -0
- package/src/skills/documentation-writer/SKILL.md +154 -0
- package/src/skills/failure-replay-engine/SKILL.md +59 -0
- package/src/skills/git-release/SKILL.md +94 -0
- package/src/skills/git-workflow/SKILL.md +177 -0
- package/src/skills/golang-patterns/SKILL.md +511 -0
- package/src/skills/human-review-routing/SKILL.md +65 -0
- package/src/skills/intent-translator/SKILL.md +57 -0
- package/src/skills/java-patterns/SKILL.md +479 -0
- package/src/skills/multi-repo/SKILL.md +187 -0
- package/src/skills/parallel-execute/SKILL.md +92 -0
- package/src/skills/patch-trust-score/SKILL.md +44 -0
- package/src/skills/performance-profiling/SKILL.md +153 -0
- package/src/skills/plan-task/SKILL.md +101 -0
- package/src/skills/python-patterns/SKILL.md +529 -0
- package/src/skills/refactor-guide/SKILL.md +117 -0
- package/src/skills/regression-prediction/SKILL.md +57 -0
- package/src/skills/repo-memory-graph/SKILL.md +49 -0
- package/src/skills/rust-patterns/SKILL.md +492 -0
- package/src/skills/security-scan/SKILL.md +91 -0
- package/src/skills/self-healing-policies/SKILL.md +76 -0
- package/src/skills/tdd-workflow/SKILL.md +126 -0
- package/src/skills/test-coverage/SKILL.md +94 -0
- package/src/skills/test-gap-detector/SKILL.md +58 -0
- package/src/skills/volatility-map/SKILL.md +52 -0
- package/src/workflows/debug-flow.md +119 -0
- package/src/workflows/deploy-check-flow.md +98 -0
- package/src/workflows/discuss-flow.md +97 -0
- package/src/workflows/execute-flow.md +233 -0
- package/src/workflows/execute-phase.md +142 -0
- package/src/workflows/fix-bug-flow.md +210 -0
- package/src/workflows/map-codebase-flow.md +92 -0
- package/src/workflows/multi-repo-flow.md +226 -0
- package/src/workflows/parallel-execution-flow.md +236 -0
- package/src/workflows/plan-flow.md +126 -0
- package/src/workflows/plan-phase.md +101 -0
- package/src/workflows/refactor-flow.md +122 -0
- package/src/workflows/review-code-flow.md +105 -0
- package/src/workflows/spec-driven-flow.md +43 -0
- package/src/workflows/write-docs-flow.md +95 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
# FlowDeck Workflows
|
|
2
|
+
|
|
3
|
+
Workflows define how agents collaborate in multi-step sequences. They live in `flowdeck/workflows/` as reference documents — agents read and follow them, but you don't invoke workflows directly. Commands trigger them.
|
|
4
|
+
|
|
5
|
+
## How Workflows Work
|
|
6
|
+
|
|
7
|
+
1. You run a command (e.g., `/fd-plan`)
|
|
8
|
+
2. The command's plugin handler injects workflow context into the session
|
|
9
|
+
3. The AI reads the workflow steps and delegates to the named agents in order
|
|
10
|
+
4. Each step's output becomes context for the next step
|
|
11
|
+
5. The workflow may pause for user confirmation before irreversible actions
|
|
12
|
+
|
|
13
|
+
## The Core FlowDeck Cycle
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/fd-new-project
|
|
17
|
+
↓
|
|
18
|
+
/fd-discuss → .planning/phases/phase-N/DISCUSS.md (locked decisions)
|
|
19
|
+
↓
|
|
20
|
+
/fd-plan → .planning/phases/phase-N/PLAN.md (confirmed plan)
|
|
21
|
+
↓
|
|
22
|
+
/fd-new-feature → implemented, tested, reviewed code
|
|
23
|
+
↓
|
|
24
|
+
/fd-review-code → review report (CRITICAL/HIGH/MEDIUM/PASS)
|
|
25
|
+
↓
|
|
26
|
+
/fd-deploy-check → GO / NO-GO decision
|
|
27
|
+
↓
|
|
28
|
+
/fd-checkpoint → .planning/STATE.md saved
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Each step gates the next. `/fd-plan` will not proceed without a confirmed `DISCUSS.md`. `/fd-new-feature` will not execute without a confirmed `PLAN.md`.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Workflow Reference Table
|
|
36
|
+
|
|
37
|
+
| Workflow file | Triggered by | Agents involved |
|
|
38
|
+
|--------------|-------------|----------------|
|
|
39
|
+
| `discuss-flow.md` | `/fd-discuss` | `@orchestrator`, `@discusser` |
|
|
40
|
+
| `plan-flow.md` | `/fd-plan` | `@orchestrator`, `@flowdeck-planner`, `@flowdeck-plan-checker` |
|
|
41
|
+
| `plan-phase.md` | `/fd-plan-phase [N]` | `@flowdeck-planner`, `@flowdeck-plan-checker`, `@orchestrator` |
|
|
42
|
+
| `execute-flow.md` | `/fd-new-feature` | `@orchestrator`, `@coder`, `@reviewer` |
|
|
43
|
+
| `execute-phase.md` | `/execute-phase [N]` | `@orchestrator`, `@flowdeck-executor` |
|
|
44
|
+
| `fix-bug-flow.md` | `/fd-fix-bug` | `@orchestrator`, `@debug-specialist`, `@researcher`, `@tester`, `@coder`, `@reviewer` |
|
|
45
|
+
| `debug-flow.md` | `/debug` | `@debug-specialist`, `@tester`, `@coder` |
|
|
46
|
+
| `review-code-flow.md` | `/fd-review-code` | `@orchestrator`, `@parallel-coordinator`, `@reviewer`, `@researcher`, `@tester` |
|
|
47
|
+
| `deploy-check-flow.md` | `/fd-deploy-check` | `@parallel-coordinator`, `@orchestrator`, `@security-auditor`, `@tester`, `@reviewer` |
|
|
48
|
+
| `refactor-flow.md` | `/refactor` | `@tester`, `@mapper`, `@refactor-guide`, `@coder`, `@orchestrator` |
|
|
49
|
+
| `write-docs-flow.md` | `/fd-write-docs` | `@code-explorer`, `@writer`, `@reviewer`, `@doc-updater` |
|
|
50
|
+
| `map-codebase-flow.md` | `/fd-map-codebase` | `@orchestrator`, `@mapper` (×6 in parallel) |
|
|
51
|
+
| `parallel-execution-flow.md` | Triggered by `@parallel-coordinator` | `@parallel-coordinator`, `@researcher`, `@code-explorer`, `@architect`, `@coder`, `@tester`, `@reviewer`, `@security-auditor` |
|
|
52
|
+
| `multi-repo-flow.md` | `/fd-multi-repo` | `@multi-repo-coordinator`, `@architect`, `@coder`, `@tester`, `@reviewer` |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Detailed Workflow Descriptions
|
|
57
|
+
|
|
58
|
+
### discuss-flow
|
|
59
|
+
|
|
60
|
+
**Triggered by:** `/fd-discuss`
|
|
61
|
+
|
|
62
|
+
The discuss flow drives the requirements extraction phase. It starts by loading `PROJECT.md` and `STATE.md` to understand the current phase and any decisions already made. The `@orchestrator` extracts the current phase number, then spawns `@discusser` with that context so it avoids re-asking about settled decisions.
|
|
63
|
+
|
|
64
|
+
The `@discusser` asks one question per turn, records every decision as `D-XX` with its rationale, and detects conflicts between new answers and existing decisions before proceeding. The Q&A loop continues until all required topics are covered. When complete, all decisions are written to `.planning/phases/phase-N/DISCUSS.md`.
|
|
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`), `@flowdeck-planner` creates a wave-structured `PLAN.md` where every task traces back to a `D-XX` decision. The draft plan is then handed to `@flowdeck-plan-checker`, which scores it for completeness, feasibility, and testability.
|
|
115
|
+
|
|
116
|
+
A FAIL verdict from `@flowdeck-plan-checker` returns the plan to `@flowdeck-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. `@flowdeck-planner` — Create `PLAN.md` with tasks traced to D-XX decisions
|
|
122
|
+
4. `@flowdeck-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
|
+
`@flowdeck-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`. `@flowdeck-plan-checker` then reviews the plan and returns PASS or FAIL with specific recommendations. Results are presented by `@orchestrator`.
|
|
137
|
+
|
|
138
|
+
**Steps:**
|
|
139
|
+
1. `@flowdeck-planner` — Create `PLAN.md` for the specified phase
|
|
140
|
+
2. `@flowdeck-plan-checker` — Score plan: completeness, feasibility, testability
|
|
141
|
+
3. `@orchestrator` — Present PASS/FAIL verdict and recommendations
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
### execute-flow
|
|
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.
|
|
150
|
+
|
|
151
|
+
`@orchestrator` loads the active `PLAN.md` and identifies the first incomplete step. If steps are independent, `@coder` agents run in parallel via `@parallel-coordinator`. After each step, `@reviewer` reviews the completed work. `@orchestrator` marks the step complete in `STATE.md`, then advances to the next step. When all steps are complete, `STATE.md` is updated to the `review` phase.
|
|
152
|
+
|
|
153
|
+
**Steps:**
|
|
154
|
+
1. `@orchestrator` — Guard check: verify `.planning/`, `.codebase/`, plan confirmed
|
|
155
|
+
2. `@orchestrator` — Load active `PLAN.md`; identify first incomplete step
|
|
156
|
+
3. `@coder` — Execute step (parallel if steps are independent)
|
|
157
|
+
4. `@reviewer` — Review completed work
|
|
158
|
+
5. `@orchestrator` — Mark step complete; advance to next step
|
|
159
|
+
6. `@orchestrator` — Loop until all steps complete; update phase to `review`
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
### execute-phase
|
|
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
|
+
`@flowdeck-executor` 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, `@flowdeck-executor` 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. `@flowdeck-executor` — Execute tasks in wave order; atomic commit per task
|
|
175
|
+
4. `@flowdeck-executor` — Checkpoint state after each task
|
|
176
|
+
5. `@flowdeck-executor` — 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
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
### debug-flow
|
|
202
|
+
|
|
203
|
+
**Triggered by:** `/debug`
|
|
204
|
+
|
|
205
|
+
A lighter debugging workflow focused on systematic diagnosis without the full bug-fix lifecycle. Where `fix-bug-flow` orchestrates a complete team, `debug-flow` keeps `@debug-specialist` in the lead throughout.
|
|
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
|
+
---
|
|
219
|
+
|
|
220
|
+
### review-code-flow
|
|
221
|
+
|
|
222
|
+
**Triggered by:** `/fd-review-code`
|
|
223
|
+
|
|
224
|
+
A parallel code review workflow that combines quality review, security checking, and test coverage verification simultaneously. `@orchestrator` determines the review scope — either from changed files (git diff) or an explicit scope argument.
|
|
225
|
+
|
|
226
|
+
`@parallel-coordinator` spawns three agents simultaneously: `@reviewer` checks for security vulnerabilities (injection, exposed secrets, missing auth) and code quality issues; `@researcher` provides best-practice context for any flagged areas; `@tester` verifies that changed code has adequate test coverage. All three run in parallel and report independently. `@orchestrator` then aggregates the findings into a unified report sorted by severity: CRITICAL → HIGH → MEDIUM → PASS.
|
|
227
|
+
|
|
228
|
+
**Steps:**
|
|
229
|
+
1. `@orchestrator` — Identify review scope (changed files or explicit argument)
|
|
230
|
+
2. `@parallel-coordinator` — Spawn in parallel:
|
|
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
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
### multi-repo-flow
|
|
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.
|
|
366
|
+
|
|
367
|
+
**Steps:**
|
|
368
|
+
1. `@multi-repo-coordinator` — Read `.planning/config.json`; verify repo paths; load stacks
|
|
369
|
+
2. `@multi-repo-coordinator` + `@architect` — Build dependency graph; classify change
|
|
370
|
+
3. `@architect` — Write contract-first change spec and ordered per-repo CHANGE PLAN
|
|
371
|
+
4. `@coder` + `@tester` — Implement and test in dependency order (upstream first)
|
|
372
|
+
5. `@tester` + `@reviewer` — Cross-repo integration tests; sign off per repo
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
← [Back to Index](index.md)
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dv.nghiem/flowdeck",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "FlowDeck — structured planning and execution workflows for OpenCode",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"flowdeck": "./bin/flowdeck.js"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"bin",
|
|
20
|
+
"src/rules",
|
|
21
|
+
"src/skills",
|
|
22
|
+
"src/workflows",
|
|
23
|
+
"docs",
|
|
24
|
+
"postinstall.mjs"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"clean": "rm -rf dist",
|
|
28
|
+
"build": "bun build src/index.ts --outdir dist --target bun --format esm --external @opencode-ai/plugin --external @opencode-ai/sdk && tsc --emitDeclarationOnly && bun build src/dashboard/server.ts --outfile dist/dashboard/server.mjs --target bun --format esm && cp -r src/dashboard/views dist/dashboard/views",
|
|
29
|
+
"postinstall": "node postinstall.mjs",
|
|
30
|
+
"prepublishOnly": "bun run clean && bun run build",
|
|
31
|
+
"test": "bun test",
|
|
32
|
+
"typecheck": "tsc --noEmit"
|
|
33
|
+
},
|
|
34
|
+
"keywords": ["opencode", "plugin", "ai", "workflow", "planning"],
|
|
35
|
+
"author": "DVNghiem",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/DVNghiem/FlowDeck.git"
|
|
40
|
+
},
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/DVNghiem/FlowDeck/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/DVNghiem/FlowDeck#readme",
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@opencode-ai/plugin": "^1.4.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/node": "^20.0.0",
|
|
50
|
+
"bun-types": "^1.3.13",
|
|
51
|
+
"ejs": "^3.1.9",
|
|
52
|
+
"typescript": "^5.7.0",
|
|
53
|
+
"vitest": "^2.0.0"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@opencode-ai/sdk": "^1.4.0"
|
|
57
|
+
}
|
|
58
|
+
}
|
package/postinstall.mjs
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// postinstall.mjs
|
|
2
|
+
// Runs after `npm install @dv.nghiem/flowdeck`
|
|
3
|
+
// Only registers the plugin in opencode.json — agents/skills come from the npm package
|
|
4
|
+
|
|
5
|
+
import { readFileSync, writeFileSync, existsSync, mkdirSync } from "node:fs";
|
|
6
|
+
import { join, dirname } from "node:path";
|
|
7
|
+
import { homedir } from "node:os";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { execSync } from "node:child_process";
|
|
10
|
+
|
|
11
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
|
|
13
|
+
const MIN_OPENCODE_VERSION = "1.4.0";
|
|
14
|
+
|
|
15
|
+
// ── helpers ──────────────────────────────────────────────────────────────────
|
|
16
|
+
|
|
17
|
+
function parseVersion(version) {
|
|
18
|
+
return version
|
|
19
|
+
.replace(/^v/, "")
|
|
20
|
+
.split("-")[0]
|
|
21
|
+
.split(".")
|
|
22
|
+
.map((p) => Number.parseInt(p, 10) || 0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function versionMeetsMin(current, minimum) {
|
|
26
|
+
const cur = parseVersion(current);
|
|
27
|
+
const min = parseVersion(minimum);
|
|
28
|
+
const len = Math.max(cur.length, min.length);
|
|
29
|
+
for (let i = 0; i < len; i++) {
|
|
30
|
+
if ((cur[i] ?? 0) > (min[i] ?? 0)) return true;
|
|
31
|
+
if ((cur[i] ?? 0) < (min[i] ?? 0)) return false;
|
|
32
|
+
}
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function checkOpenCodeVersion() {
|
|
37
|
+
try {
|
|
38
|
+
const out = execSync("opencode --version", {
|
|
39
|
+
encoding: "utf-8",
|
|
40
|
+
stdio: ["pipe", "pipe", "ignore"],
|
|
41
|
+
}).trim();
|
|
42
|
+
return { ok: versionMeetsMin(out, MIN_OPENCODE_VERSION), version: out };
|
|
43
|
+
} catch {
|
|
44
|
+
return { ok: true, version: null }; // opencode not on PATH yet — non-fatal
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function getOpenCodeConfigDir() {
|
|
49
|
+
return (
|
|
50
|
+
process.env.OPENCODE_CONFIG_DIR ||
|
|
51
|
+
(process.env.XDG_CONFIG_HOME
|
|
52
|
+
? join(process.env.XDG_CONFIG_HOME, "opencode")
|
|
53
|
+
: join(homedir(), ".config", "opencode"))
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ── main ─────────────────────────────────────────────────────────────────────
|
|
58
|
+
|
|
59
|
+
function main() {
|
|
60
|
+
// Version check (advisory only)
|
|
61
|
+
const versionCheck = checkOpenCodeVersion();
|
|
62
|
+
if (versionCheck.version && !versionCheck.ok) {
|
|
63
|
+
console.warn(`⚠ @dv.nghiem/flowdeck requires OpenCode >= ${MIN_OPENCODE_VERSION}`);
|
|
64
|
+
console.warn(` Detected: ${versionCheck.version}`);
|
|
65
|
+
console.warn(` Please update OpenCode: https://opencode.ai/docs`);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const configDir = getOpenCodeConfigDir();
|
|
69
|
+
const configFile = join(configDir, "opencode.json");
|
|
70
|
+
|
|
71
|
+
mkdirSync(configDir, { recursive: true });
|
|
72
|
+
|
|
73
|
+
let cfg = {};
|
|
74
|
+
if (existsSync(configFile)) {
|
|
75
|
+
try { cfg = JSON.parse(readFileSync(configFile, "utf-8")); } catch { /* ignore */ }
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (!Array.isArray(cfg.plugin)) cfg.plugin = [];
|
|
79
|
+
const already = cfg.plugin.some(
|
|
80
|
+
(p) => p === "@dv.nghiem/flowdeck" || String(p).startsWith("@dv.nghiem/flowdeck@")
|
|
81
|
+
);
|
|
82
|
+
if (!already) {
|
|
83
|
+
cfg.plugin.push("@dv.nghiem/flowdeck");
|
|
84
|
+
console.log(`✓ Added @dv.nghiem/flowdeck to plugin list`);
|
|
85
|
+
} else {
|
|
86
|
+
console.log(`✓ Plugin already registered`);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (!cfg.default_agent) {
|
|
90
|
+
cfg.default_agent = "orchestrator";
|
|
91
|
+
console.log(`✓ Set default_agent to orchestrator`);
|
|
92
|
+
} else {
|
|
93
|
+
console.log(`✓ default_agent already set`);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
writeFileSync(configFile, JSON.stringify(cfg, null, 2) + "\n");
|
|
97
|
+
|
|
98
|
+
console.log(`\n✅ FlowDeck ready! Restart OpenCode to activate.`);
|
|
99
|
+
console.log(` Config: ${configDir}`);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
main();
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# FlowDeck Rules
|
|
2
|
+
|
|
3
|
+
Coding standards for projects using FlowDeck. These define conventions that FlowDeck agents follow automatically.
|
|
4
|
+
|
|
5
|
+
## How to Use
|
|
6
|
+
|
|
7
|
+
Add a rule file to `opencode.json` under `instructions`:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"instructions": [
|
|
12
|
+
".flowdeck/rules/common/coding-style.md",
|
|
13
|
+
".flowdeck/rules/common/security.md",
|
|
14
|
+
".flowdeck/rules/typescript/patterns.md"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Agents will read these files and follow the conventions defined in them.
|
|
20
|
+
|
|
21
|
+
## Available Rules
|
|
22
|
+
|
|
23
|
+
### Common Rules (language-agnostic)
|
|
24
|
+
|
|
25
|
+
| File | Description |
|
|
26
|
+
|------|-------------|
|
|
27
|
+
| `common/agent-orchestration.md` | When to use each FlowDeck agent and parallel execution patterns |
|
|
28
|
+
| `common/coding-style.md` | Immutability, KISS/DRY/YAGNI, file organization, error handling, naming |
|
|
29
|
+
| `common/testing.md` | TDD workflow, coverage thresholds, test types, AAA pattern |
|
|
30
|
+
| `common/security.md` | Pre-commit security checklist, secret management, OWASP Top 10 |
|
|
31
|
+
| `common/git-workflow.md` | Conventional commits, branch naming, PR workflow, rebase vs merge |
|
|
32
|
+
|
|
33
|
+
### TypeScript Rules
|
|
34
|
+
|
|
35
|
+
| File | Description |
|
|
36
|
+
|------|-------------|
|
|
37
|
+
| `typescript/patterns.md` | API response format, custom hooks, repository pattern, Result types |
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Agent Orchestration
|
|
2
|
+
|
|
3
|
+
FlowDeck provides 23 specialist agents. Each has a specific role. Using the right agent gets better results faster.
|
|
4
|
+
|
|
5
|
+
## Available FlowDeck Agents
|
|
6
|
+
|
|
7
|
+
| Agent | Purpose | When to Use |
|
|
8
|
+
|-------|---------|------------|
|
|
9
|
+
| `@architect` | System design, ADRs, API contracts | Planning new modules, API changes, schema changes |
|
|
10
|
+
| `@build-error-resolver` | Fix build failures and type errors | Immediately when build fails |
|
|
11
|
+
| `@build-resolver` | Diagnose and fix build/compile failures | When build breaks and cause is unclear |
|
|
12
|
+
| `@code-explorer` | Map unfamiliar codebase structure | Before modifying unfamiliar code |
|
|
13
|
+
| `@coder` | Implement features and fixes | All code implementation |
|
|
14
|
+
| `@debug-specialist` | Root cause analysis for bugs | When a bug needs deep investigation |
|
|
15
|
+
| `@discusser` | Extract requirements via Q&A | Starting a new feature or phase |
|
|
16
|
+
| `@doc-updater` | Update docs after code changes | After implementation completes |
|
|
17
|
+
| `@flowdeck-executor` | Execute confirmed FlowDeck plans | When a confirmed PLAN.md exists |
|
|
18
|
+
| `@flowdeck-plan-checker` | Review PLAN.md before execution | Before executing any plan |
|
|
19
|
+
| `@flowdeck-planner` | Create FlowDeck PLAN.md files | When running /plan command |
|
|
20
|
+
| `@mapper` | Map codebase to .codebase/ docs | Running /map-codebase |
|
|
21
|
+
| `@orchestrator` | Coordinate multi-agent execution | Managing a full feature delivery |
|
|
22
|
+
| `@parallel-coordinator` | Run parallel agent workstreams | When tasks can run simultaneously |
|
|
23
|
+
| `@performance-optimizer` | Profile and fix performance issues | When app is slow or before release |
|
|
24
|
+
| `@planner` | Create detailed implementation plans | Any multi-file feature |
|
|
25
|
+
| `@refactor-guide` | Safe code restructuring | Reducing technical debt |
|
|
26
|
+
| `@researcher` | Research APIs, docs, best practices | Using an unfamiliar library or API |
|
|
27
|
+
| `@reviewer` | Code quality and convention review | After writing code, before PRs |
|
|
28
|
+
| `@security-auditor` | Deep security audit | Before merging security-sensitive code |
|
|
29
|
+
| `@task-splitter` | Decompose tasks into parallel tracks | Complex features with parallel work |
|
|
30
|
+
| `@tester` | Write and run tests (TDD) | Implementing features or fixing bugs |
|
|
31
|
+
| `@writer` | Draft project documentation | Writing or updating docs |
|
|
32
|
+
|
|
33
|
+
## When to Use Agents Immediately (No Prompting Needed)
|
|
34
|
+
|
|
35
|
+
These situations should trigger agent use automatically:
|
|
36
|
+
|
|
37
|
+
| Situation | Agent |
|
|
38
|
+
|-----------|-------|
|
|
39
|
+
| Complex feature spanning 3+ files | `@planner` first, then `@coder` |
|
|
40
|
+
| Code was just written | `@reviewer` |
|
|
41
|
+
| Build fails | `@build-error-resolver` |
|
|
42
|
+
| Bug reported | `@debug-specialist` |
|
|
43
|
+
| Security-sensitive PR | `@security-auditor` |
|
|
44
|
+
| Using an unfamiliar API | `@researcher` |
|
|
45
|
+
| Pre-production deployment | `@reviewer` + `@security-auditor` in parallel |
|
|
46
|
+
|
|
47
|
+
## Parallel Execution Patterns
|
|
48
|
+
|
|
49
|
+
Independent agents can run simultaneously. Examples:
|
|
50
|
+
|
|
51
|
+
**Feature implementation:**
|
|
52
|
+
```
|
|
53
|
+
Wave 1 (parallel):
|
|
54
|
+
@researcher — research the library API
|
|
55
|
+
@coder — implement the model and types
|
|
56
|
+
@tester — write test cases
|
|
57
|
+
|
|
58
|
+
Wave 2 (after Wave 1):
|
|
59
|
+
@coder — implement service using Wave 1 research
|
|
60
|
+
@reviewer — review Wave 1 implementation
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Pre-deploy check:**
|
|
64
|
+
```
|
|
65
|
+
Parallel:
|
|
66
|
+
@reviewer — code quality review
|
|
67
|
+
@security-auditor — security audit
|
|
68
|
+
@tester — run full test suite
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Phase-Gated Workflow
|
|
72
|
+
|
|
73
|
+
FlowDeck follows a structured phase order:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
discuss → plan → execute → review
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
| Phase | Agent | Command |
|
|
80
|
+
|-------|-------|---------|
|
|
81
|
+
| discuss | `@discusser` | `/discuss` |
|
|
82
|
+
| plan | `@flowdeck-planner` → `@flowdeck-plan-checker` | `/plan` |
|
|
83
|
+
| execute | `@orchestrator` → `@coder`, `@tester`, etc. | `/new-feature` |
|
|
84
|
+
| review | `@reviewer` + `@security-auditor` | `/review-code` |
|
|
85
|
+
|
|
86
|
+
Do not skip phases. The orchestrator enforces phase gating automatically.
|