@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,294 @@
|
|
|
1
|
+
# FlowDeck Intelligence Features
|
|
2
|
+
|
|
3
|
+
FlowDeck's intelligence layer adds safety-first AI editing, persistent architecture memory, and risk prediction directly into every OpenCode session. These features require no extra setup beyond running `/fd-new-project`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
| Feature | Command / Hook | Storage |
|
|
10
|
+
|---------|---------------|---------|
|
|
11
|
+
| Change Impact Radar | `/fd-impact-radar` | VOLATILITY.json, MEMORY.json |
|
|
12
|
+
| Patch Trust Score | Hook (automatic) | VOLATILITY.json, FAILURES.json |
|
|
13
|
+
| Blast Radius Preview | `/fd-blast-radius` | MEMORY.json, FAILURES.json |
|
|
14
|
+
| Repo Memory Graph | `repo-memory` tool | `.codebase/MEMORY.json` |
|
|
15
|
+
| Failure Replay Engine | `failure-replay` tool | `.codebase/FAILURES.json` |
|
|
16
|
+
| Safe Execution Modes | Hook (automatic) | `.planning/config.json` |
|
|
17
|
+
| Test Gap Detector | `/fd-test-gap` | VOLATILITY.json |
|
|
18
|
+
| Architectural Constraint Guard | Hook (automatic) | `.codebase/CONSTRAINTS.md` |
|
|
19
|
+
| Intent-to-Change Translator | `/fd-translate-intent` | — |
|
|
20
|
+
| Confidence-Aware Planning | Skill | — |
|
|
21
|
+
| Codebase Volatility Map | `/fd-volatility-map`, `volatility-map` tool | `.codebase/VOLATILITY.json` |
|
|
22
|
+
| Human Review Routing | `/fd-review-route` | VOLATILITY.json, FAILURES.json |
|
|
23
|
+
| Regression Prediction | `/fd-regression-predict` | — |
|
|
24
|
+
| Decision Trace | `decision-trace` tool + hook | `.codebase/DECISIONS.jsonl` |
|
|
25
|
+
| Self-Healing Policies | `policy-engine` tool | `.codebase/POLICIES.json` |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Slash Commands
|
|
30
|
+
|
|
31
|
+
### `/fd-impact-radar`
|
|
32
|
+
|
|
33
|
+
Predicts which files, modules, APIs, tests, and database paths are likely to be affected before the AI edits anything.
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
/fd-impact-radar --change "refactor auth token handling" --scope all
|
|
37
|
+
/fd-impact-radar --change "drop users table" --json
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Arguments:**
|
|
41
|
+
- `--change` — describe the proposed change (free text)
|
|
42
|
+
- `--scope` — `all` (default), `api`, `db`, `tests`
|
|
43
|
+
- `--json` — machine-readable JSON output
|
|
44
|
+
|
|
45
|
+
**Output:** Table showing researcher/architect/tester agent roles, known hotspots, and recommended traversal scope.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
### `/fd-blast-radius`
|
|
50
|
+
|
|
51
|
+
Shows the likely downstream consequences of a proposed change — hidden dependencies, fragile integration points, and predicted test breakages.
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
/fd-blast-radius --change "delete legacy session table" --depth 3
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Arguments:**
|
|
58
|
+
- `--change` — describe the proposed change
|
|
59
|
+
- `--depth` — dependency traversal hops (default: `2`)
|
|
60
|
+
- `--json` — JSON output
|
|
61
|
+
|
|
62
|
+
**How it works:** Reads Repo Memory Graph for dependency edges. Cross-references recurring failure patterns from Failure Replay Engine. Spawns architect + researcher + tester agent team.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### `/fd-translate-intent`
|
|
67
|
+
|
|
68
|
+
Converts a vague request like "make checkout faster" into concrete, ranked implementation options with tradeoffs **before** any code is written.
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
/fd-translate-intent --intent "make checkout faster"
|
|
72
|
+
/fd-translate-intent --intent "reduce memory usage on the worker"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Arguments:**
|
|
76
|
+
- `--intent` — the high-level intent to translate (required)
|
|
77
|
+
- `--json` — JSON output
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
### `/fd-volatility-map`
|
|
82
|
+
|
|
83
|
+
Displays the Codebase Volatility Map — highlights unstable zones based on churn, hotfix frequency, and unresolved TODO clusters.
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
/fd-volatility-map
|
|
87
|
+
/fd-volatility-map --threshold volatile --limit 10
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Arguments:**
|
|
91
|
+
- `--threshold` — minimum stability level to show: `stable`, `moderate`, `volatile` (default), `critical`
|
|
92
|
+
- `--limit` — max results
|
|
93
|
+
- `--json` — JSON output
|
|
94
|
+
|
|
95
|
+
**Populated by:** `/fd-map-codebase` writes initial data; the `volatility-map` tool allows incremental updates.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### `/fd-regression-predict`
|
|
100
|
+
|
|
101
|
+
Estimates the most likely regression categories for a change — performance, auth, schema, UI states, async flows, etc.
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
/fd-regression-predict --change "add webhook retry logic" --categories all
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Arguments:**
|
|
108
|
+
- `--change` — describe the proposed change
|
|
109
|
+
- `--categories` — comma-separated from: `performance`, `auth`, `schema`, `ui-state`, `async-flow`, `api-contract`, `data-integrity`, `security`, `config`, `i18n` (default: `all`)
|
|
110
|
+
- `--json` — JSON output
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
### `/fd-test-gap`
|
|
115
|
+
|
|
116
|
+
Identifies which areas of a proposed change are weakly covered by tests, and suggests the minimum high-value tests to add first.
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
/fd-test-gap --change "add payment webhook handler"
|
|
120
|
+
/fd-test-gap --change "update user schema" --scope unit
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Arguments:**
|
|
124
|
+
- `--change` — describe the proposed change
|
|
125
|
+
- `--scope` — `unit`, `integration`, `e2e`, `all` (default)
|
|
126
|
+
- `--json` — JSON output
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### `/fd-review-route`
|
|
131
|
+
|
|
132
|
+
Routes risky patches to the right reviewer type — security, backend, infra, domain-owner, frontend, data, or devops — based on the file paths and change description.
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
/fd-review-route --files "src/auth/token.ts,src/api/routes.ts" --change "new JWT rotation logic"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Arguments:**
|
|
139
|
+
- `--files` — comma-separated file paths being changed
|
|
140
|
+
- `--change` — describe the change
|
|
141
|
+
- `--json` — JSON output
|
|
142
|
+
|
|
143
|
+
**Routing rules:**
|
|
144
|
+
- `security` — auth, token, password, crypto, JWT, RBAC, XSS, SQL keywords; always added for high-risk patches
|
|
145
|
+
- `backend` — API, route, controller, migration keywords
|
|
146
|
+
- `infra` — Docker, Kubernetes, Terraform, CI/CD keywords
|
|
147
|
+
- `domain-owner` — billing, payment, checkout, subscription keywords
|
|
148
|
+
- `frontend` — component, CSS, React, Vue keywords
|
|
149
|
+
- `data` — schema, migration, index, constraint keywords
|
|
150
|
+
- `devops` — pipeline, YAML workflow, cron, schedule keywords
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Automatic Hooks
|
|
155
|
+
|
|
156
|
+
These run on every `write` or `edit` tool call with no manual trigger needed.
|
|
157
|
+
|
|
158
|
+
### Patch Trust Score
|
|
159
|
+
|
|
160
|
+
Every AI-generated write/edit is scored 0–100:
|
|
161
|
+
|
|
162
|
+
| Score | Verdict | Action |
|
|
163
|
+
|-------|---------|--------|
|
|
164
|
+
| ≥ 80 | `safe` | Auto-apply |
|
|
165
|
+
| 40–79 | `review-required` | Logged with signals |
|
|
166
|
+
| < 40 | `high-risk` | Warning printed, human review required |
|
|
167
|
+
|
|
168
|
+
**Risk signals checked:**
|
|
169
|
+
- File is in a `critical` volatility zone (−40 pts)
|
|
170
|
+
- File is in a `volatile` zone (−25 pts)
|
|
171
|
+
- File has moderate churn (−10 pts)
|
|
172
|
+
- File has prior failure history in FAILURES.json (−20 pts)
|
|
173
|
+
- Edit content contains high-risk keywords: password, secret, token, auth, crypto, jwt, etc. (−8 pts each, max −30 pts)
|
|
174
|
+
|
|
175
|
+
### Safe Execution Modes
|
|
176
|
+
|
|
177
|
+
Automatically selects the editing mode for the session:
|
|
178
|
+
|
|
179
|
+
| Mode | When Used |
|
|
180
|
+
|------|-----------|
|
|
181
|
+
| `auto-edit` | Trust score ≥ 60, low volatility |
|
|
182
|
+
| `guarded` | Trust score 30–59, or moderate volatility |
|
|
183
|
+
| `review-only` | Trust score < 30, or config override |
|
|
184
|
+
|
|
185
|
+
Override by setting `execution_mode` in `.planning/config.json`:
|
|
186
|
+
```json
|
|
187
|
+
{ "execution_mode": "review-only" }
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Architectural Constraint Guard
|
|
191
|
+
|
|
192
|
+
Before any write or edit, FlowDeck reads `.codebase/CONSTRAINTS.md` and blocks writes to any path listed under `## Forbidden Paths`.
|
|
193
|
+
|
|
194
|
+
**Example `.codebase/CONSTRAINTS.md`:**
|
|
195
|
+
```markdown
|
|
196
|
+
## Forbidden Paths
|
|
197
|
+
- src/legacy/
|
|
198
|
+
- infra/production/
|
|
199
|
+
- db/migrations/
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Decision Trace Hook
|
|
203
|
+
|
|
204
|
+
Every write or edit automatically appends a minimal entry to `.codebase/DECISIONS.jsonl` recording the tool name, file path, and timestamp. For full entries with rationale, use the `decision-trace` tool explicitly.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Persistent State Tools
|
|
209
|
+
|
|
210
|
+
These tools manage the `.codebase/` directory and can be called directly by agents.
|
|
211
|
+
|
|
212
|
+
### `repo-memory`
|
|
213
|
+
|
|
214
|
+
Manages `.codebase/MEMORY.json` — a persistent graph of modules, services, APIs, schemas, and their relationships.
|
|
215
|
+
|
|
216
|
+
**Actions:** `read`, `write_node`, `query`, `delete_node`
|
|
217
|
+
|
|
218
|
+
**Example:**
|
|
219
|
+
```
|
|
220
|
+
repo-memory action=write_node node_id=auth-module node={type:module, path:src/auth, owner:alice, tags:[auth,security], ...}
|
|
221
|
+
repo-memory action=query query={type:module, owner:alice}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### `failure-replay`
|
|
225
|
+
|
|
226
|
+
Manages `.codebase/FAILURES.json` — a log of reverted commits, failed deployments, flaky tests, and bug fixes.
|
|
227
|
+
|
|
228
|
+
**Actions:** `record`, `query`, `list`, `mark_resolved`
|
|
229
|
+
|
|
230
|
+
**Example:**
|
|
231
|
+
```
|
|
232
|
+
failure-replay action=record entry={id:deploy-001, type:failed_deployment, description:"...", affected_paths:[src/auth], tags:[auth]}
|
|
233
|
+
failure-replay action=query query={path_prefix:src/auth}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### `decision-trace`
|
|
237
|
+
|
|
238
|
+
Manages `.codebase/DECISIONS.jsonl` — append-only log of why every change was made.
|
|
239
|
+
|
|
240
|
+
**Actions:** `record`, `query`, `get_for_file`
|
|
241
|
+
|
|
242
|
+
**Fields:** `file_path`, `change_type`, `rationale`, `evidence[]`, `assumptions[]`, `alternatives_considered[]`, `risk_level`
|
|
243
|
+
|
|
244
|
+
### `volatility-map`
|
|
245
|
+
|
|
246
|
+
Manages `.codebase/VOLATILITY.json` — per-file churn and stability data.
|
|
247
|
+
|
|
248
|
+
**Actions:** `read`, `write`, `query_hotspots`, `update_entry`
|
|
249
|
+
|
|
250
|
+
**Stability labels:** `stable` → `moderate` → `volatile` → `critical` (computed from churn score + hotfix count + TODO count)
|
|
251
|
+
|
|
252
|
+
### `policy-engine`
|
|
253
|
+
|
|
254
|
+
Manages `.codebase/POLICIES.json` — self-healing editing rules that update after repeated failures.
|
|
255
|
+
|
|
256
|
+
**Actions:** `list`, `add`, `record_violation`, `toggle`, `query`
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## `.codebase/` File Reference
|
|
261
|
+
|
|
262
|
+
| File | Format | Purpose |
|
|
263
|
+
|------|--------|---------|
|
|
264
|
+
| `MEMORY.json` | JSON | Repo architecture graph (nodes + edges) |
|
|
265
|
+
| `FAILURES.json` | JSON | Failure history and recurrence tracking |
|
|
266
|
+
| `DECISIONS.jsonl` | Newline-delimited JSON | Append-only edit rationale log |
|
|
267
|
+
| `VOLATILITY.json` | JSON | Per-file churn and stability metrics |
|
|
268
|
+
| `POLICIES.json` | JSON | Self-healing editing rule set |
|
|
269
|
+
| `CONSTRAINTS.md` | Markdown | Forbidden path list for Arch Constraint Guard |
|
|
270
|
+
|
|
271
|
+
> **Tip:** All `.codebase/` files should be committed to version control so the intelligence layer improves over time.
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Skills
|
|
276
|
+
|
|
277
|
+
Each intelligence feature also has a corresponding skill that gives the OpenCode agent detailed workflow instructions. Skills are installed automatically by `install.sh`.
|
|
278
|
+
|
|
279
|
+
| Skill | Name |
|
|
280
|
+
|-------|------|
|
|
281
|
+
| `change-impact-radar` | Change Impact Radar |
|
|
282
|
+
| `patch-trust-score` | Patch Trust Score |
|
|
283
|
+
| `blast-radius-preview` | Blast Radius Preview |
|
|
284
|
+
| `repo-memory-graph` | Repo Memory Graph |
|
|
285
|
+
| `failure-replay-engine` | Failure Replay Engine |
|
|
286
|
+
| `test-gap-detector` | Test Gap Detector |
|
|
287
|
+
| `arch-constraint-guard` | Architectural Constraint Guard |
|
|
288
|
+
| `intent-translator` | Intent-to-Change Translator |
|
|
289
|
+
| `confidence-aware-planning` | Confidence-Aware Planning |
|
|
290
|
+
| `volatility-map` | Codebase Volatility Map |
|
|
291
|
+
| `human-review-routing` | Human Review Routing |
|
|
292
|
+
| `regression-prediction` | Regression Prediction |
|
|
293
|
+
| `decision-trace` | Decision Trace |
|
|
294
|
+
| `self-healing-policies` | Self-Healing Prompt Policies |
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Multi-Repo & Microservices
|
|
2
|
+
|
|
3
|
+
FlowDeck supports coordinating changes across multiple repositories in a microservice architecture. The `@multi-repo-coordinator` agent manages dependency graphs, determines change order, and produces per-repo CHANGE PLANs.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## When to Use Multi-Repo Mode
|
|
8
|
+
|
|
9
|
+
Multi-repo mode is appropriate when:
|
|
10
|
+
|
|
11
|
+
- A shared API contract is changing and multiple services need to update their clients
|
|
12
|
+
- A breaking change requires a coordinated rollout with a specific service order
|
|
13
|
+
- A new cross-cutting capability (authentication, distributed tracing, audit logging) must be added to several services at once
|
|
14
|
+
- Dependency upgrades need to be applied consistently across a service mesh
|
|
15
|
+
|
|
16
|
+
Single-repo mode is sufficient for all other work. Multi-repo coordination adds overhead — only enable it when the cross-repo dependency is real.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Setup
|
|
21
|
+
|
|
22
|
+
### Step 1 — Initialize the root repository
|
|
23
|
+
|
|
24
|
+
If your root (orchestrating) repository is not already a FlowDeck project:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
/fd-new-project MyPlatform
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This creates `.planning/` and `.planning/config.json` in the root repo.
|
|
31
|
+
|
|
32
|
+
### Step 2 — Register service repositories
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
/fd-multi-repo --add ../user-service upstream-api
|
|
36
|
+
/fd-multi-repo --add ../order-service consumer
|
|
37
|
+
/fd-multi-repo --add ../notification-service consumer
|
|
38
|
+
/fd-multi-repo --add ../api-gateway edge
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Each `--add` command:
|
|
42
|
+
1. Resolves and validates the path
|
|
43
|
+
2. Detects the tech stack (language, framework) from the target repo's files
|
|
44
|
+
3. Appends an entry to `sub_repos` in `.planning/config.json`
|
|
45
|
+
|
|
46
|
+
### Step 3 — Verify registration
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
/fd-multi-repo --list
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Expected output:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Registered repositories:
|
|
56
|
+
user-service ../user-service role: upstream-api tech: node+typescript
|
|
57
|
+
order-service ../order-service role: consumer tech: node+typescript
|
|
58
|
+
notification-svc ../notification-service role: consumer tech: python
|
|
59
|
+
api-gateway ../api-gateway role: edge tech: golang
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## config.json sub_repos Schema
|
|
65
|
+
|
|
66
|
+
Registered repos are stored in `.planning/config.json` under the `sub_repos` key:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"sub_repos": [
|
|
71
|
+
{
|
|
72
|
+
"name": "user-service",
|
|
73
|
+
"path": "../user-service",
|
|
74
|
+
"role": "upstream-api",
|
|
75
|
+
"tech_stack": "node+typescript",
|
|
76
|
+
"owner_team": "platform"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "order-service",
|
|
80
|
+
"path": "../order-service",
|
|
81
|
+
"role": "consumer",
|
|
82
|
+
"tech_stack": "node+typescript",
|
|
83
|
+
"owner_team": "commerce"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "notification-service",
|
|
87
|
+
"path": "../notification-service",
|
|
88
|
+
"role": "consumer",
|
|
89
|
+
"tech_stack": "python",
|
|
90
|
+
"owner_team": "growth"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "api-gateway",
|
|
94
|
+
"path": "../api-gateway",
|
|
95
|
+
"role": "edge",
|
|
96
|
+
"tech_stack": "golang",
|
|
97
|
+
"owner_team": "platform"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
All fields except `owner_team` are required. `owner_team` is optional but recommended — it enables `@multi-repo-coordinator` to surface team-level communication needs in the CHANGE PLAN.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Role Vocabulary
|
|
108
|
+
|
|
109
|
+
The `role` field tells `@multi-repo-coordinator` how each service fits into the dependency graph. It uses this to determine change order and to classify changes as breaking or non-breaking.
|
|
110
|
+
|
|
111
|
+
| Role | Meaning |
|
|
112
|
+
|------|---------|
|
|
113
|
+
| `upstream-api` | Exposes an API that other services consume. Changes here propagate outward. |
|
|
114
|
+
| `consumer` | Calls one or more upstream APIs. Must update its client when upstream contracts change. |
|
|
115
|
+
| `edge` | API gateway or entry point. Routes external traffic and may enforce rate limits or authentication. |
|
|
116
|
+
| `shared-lib` | A library imported by other services. Breaking changes here affect every consumer simultaneously. |
|
|
117
|
+
| `worker` | Background job processor. Typically a consumer of events or queues; rarely an upstream dependency. |
|
|
118
|
+
| `data-store` | Database, cache, or storage service. Schema changes here can be breaking for any direct consumer. |
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Running a Cross-Repo Change
|
|
123
|
+
|
|
124
|
+
Invoke `@multi-repo-coordinator` with a plain-language description of the cross-cutting change:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
@multi-repo-coordinator I need to add user preferences to the user-service API and
|
|
128
|
+
update all consumer services to use the new endpoint.
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### What `@multi-repo-coordinator` does
|
|
132
|
+
|
|
133
|
+
1. **Reads `sub_repos`** from `.planning/config.json` to identify all registered services
|
|
134
|
+
2. **Builds the dependency graph** — in the example above: `user-service → order-service`, `user-service → notification-service`, and `api-gateway → user-service`
|
|
135
|
+
3. **Determines change order** based on roles: upstream services change first, consumers second, edge last
|
|
136
|
+
4. **Classifies the change**: adding a new field or endpoint is non-breaking; renaming or removing is breaking. Breaking changes require a compatibility strategy (versioned endpoints, feature flags, or synchronized cutover)
|
|
137
|
+
5. **Produces a CHANGE PLAN** for each affected repository in dependency order
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## CHANGE PLAN Format
|
|
142
|
+
|
|
143
|
+
`@multi-repo-coordinator` produces a CHANGE PLAN that is saved to `.planning/fd-multi-repo/CHANGE-<timestamp>.md`:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
CHANGE PLAN — user-preferences feature
|
|
147
|
+
|
|
148
|
+
Order of changes:
|
|
149
|
+
1. user-service (upstream-api) — add GET /users/{id}/preferences endpoint
|
|
150
|
+
2. order-service (consumer) — update UserClient to call new preferences endpoint
|
|
151
|
+
3. notification-service (consumer) — update notification triggers with user preferences
|
|
152
|
+
4. api-gateway (edge) — add /preferences route, update rate limit policy
|
|
153
|
+
|
|
154
|
+
Breaking changes: None (additive endpoint — existing clients unaffected)
|
|
155
|
+
Rollout strategy: canary → staging → production per service in the order above
|
|
156
|
+
|
|
157
|
+
Owner teams notified:
|
|
158
|
+
platform (user-service, api-gateway)
|
|
159
|
+
commerce (order-service)
|
|
160
|
+
growth (notification-service)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
For breaking changes, the CHANGE PLAN includes a compatibility section:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
Breaking changes: YES — /users/{id} response shape modified (field renamed)
|
|
167
|
+
Compatibility strategy:
|
|
168
|
+
- Deploy user-service@v2 alongside v1 (parallel run)
|
|
169
|
+
- Migrate consumers to v2 endpoint one-by-one
|
|
170
|
+
- Deprecate v1 after all consumers are migrated (target: 2 sprints)
|
|
171
|
+
- Remove v1 after deprecation window closes
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Multi-Repo Workflow
|
|
177
|
+
|
|
178
|
+
The `multi-repo-flow` workflow orchestrates the full end-to-end process:
|
|
179
|
+
|
|
180
|
+
1. **Analyze** — `@code-explorer` runs in each registered repo and builds a combined dependency graph
|
|
181
|
+
2. **Classify** — `@multi-repo-coordinator` identifies which changes are breaking vs non-breaking and determines service change order
|
|
182
|
+
3. **Plan** — produces a CHANGE PLAN per repo in dependency order
|
|
183
|
+
4. **Execute** — `@coder` is invoked per repo in order; `@tester` runs per repo in parallel with `@coder` (using that repo's test suite)
|
|
184
|
+
5. **Verify** — `@reviewer` and `@security-auditor` run per repo after implementation; integration tests are run across the full service mesh in staging before any production rollout
|
|
185
|
+
|
|
186
|
+
Each step produces output files in `.planning/fd-multi-repo/` so the entire process is auditable.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Multi-Repo Commands Reference
|
|
191
|
+
|
|
192
|
+
| Command | What it does |
|
|
193
|
+
|---------|-------------|
|
|
194
|
+
| `/fd-multi-repo --add <path> <role>` | Register a repo with the given path and role |
|
|
195
|
+
| `/fd-multi-repo --list` | Print a table of all registered repos |
|
|
196
|
+
| `/fd-multi-repo --status` | Show `git status` summary for every registered repo |
|
|
197
|
+
| `/fd-multi-repo --remove <name>` | Remove a repo from `sub_repos` by name |
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
← [Back to Index](index.md)
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# System Notifications
|
|
2
|
+
|
|
3
|
+
FlowDeck fires desktop notifications when commands that require your attention complete. This is useful when you switch to another application while the AI processes a task — you will be alerted when your input is needed or when a long-running command is ready for review.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## How It Works
|
|
8
|
+
|
|
9
|
+
When an interactive command finishes (one that either asks questions or produces output you need to approve), FlowDeck sends a desktop notification through the OS notification system. Notification urgency depends on the command:
|
|
10
|
+
|
|
11
|
+
- **Critical-level (urgent):** `/fd-discuss`, `/fd-plan`, `/fd-review-code`, `/fd-deploy-check`, `/fd-new-project`
|
|
12
|
+
These commands present questions or decisions that block further progress. The notification is sent at high urgency so it appears even in Do Not Disturb mode on some systems.
|
|
13
|
+
|
|
14
|
+
- **Info-level:** `/fd-new-feature`, `/fd-fix-bug`, `/fd-write-docs`, `/fd-checkpoint`
|
|
15
|
+
These commands complete autonomously and notify you that output is ready for review. Low urgency — appears in notification center but does not interrupt focus.
|
|
16
|
+
|
|
17
|
+
Notifications are **best-effort**: if the notification system is unavailable (missing package, SSH session without display, headless CI), FlowDeck logs a warning and continues silently. No command is blocked by a notification failure.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Linux (`notify-send`)
|
|
22
|
+
|
|
23
|
+
FlowDeck uses `notify-send` from the `libnotify` package. A desktop session (X11 or Wayland) must be active.
|
|
24
|
+
|
|
25
|
+
### Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Debian / Ubuntu
|
|
29
|
+
sudo apt install libnotify-bin
|
|
30
|
+
|
|
31
|
+
# Fedora / RHEL / CentOS Stream
|
|
32
|
+
sudo dnf install libnotify
|
|
33
|
+
|
|
34
|
+
# Arch Linux
|
|
35
|
+
sudo pacman -S libnotify
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Verify
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
notify-send "FlowDeck" "Notifications working"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
A toast notification should appear in the top-right corner of your desktop (or wherever your notification daemon places them — GNOME, KDE, and sway all position them differently).
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## macOS (`osascript`)
|
|
49
|
+
|
|
50
|
+
`osascript` is a standard macOS tool available on every installation. No additional packages are needed.
|
|
51
|
+
|
|
52
|
+
### Allow notifications from Terminal
|
|
53
|
+
|
|
54
|
+
macOS requires per-application notification permission:
|
|
55
|
+
|
|
56
|
+
1. Open **System Preferences** (macOS 12 and earlier) or **System Settings** (macOS 13+)
|
|
57
|
+
2. Navigate to **Notifications**
|
|
58
|
+
3. Find **Terminal** in the app list (or your OpenCode host application if you run it outside Terminal)
|
|
59
|
+
4. Set **Allow Notifications** to on
|
|
60
|
+
5. Choose **Alerts** or **Banners** depending on your preference
|
|
61
|
+
|
|
62
|
+
### Verify
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
osascript -e 'display notification "Notifications working" with title "FlowDeck"'
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Windows (PowerShell toast)
|
|
71
|
+
|
|
72
|
+
FlowDeck uses the `Windows.UI.Notifications` WinRT API via PowerShell. This requires Windows 10 or later and PowerShell 5 or later. No additional installation is needed.
|
|
73
|
+
|
|
74
|
+
### Allow notifications from PowerShell
|
|
75
|
+
|
|
76
|
+
1. Open **Settings → System → Notifications**
|
|
77
|
+
2. Scroll to the app list and find **Windows PowerShell**
|
|
78
|
+
3. Enable notifications for Windows PowerShell
|
|
79
|
+
|
|
80
|
+
### Verify
|
|
81
|
+
|
|
82
|
+
```powershell
|
|
83
|
+
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
|
|
84
|
+
$template = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent(
|
|
85
|
+
[Windows.UI.Notifications.ToastTemplateType]::ToastText02)
|
|
86
|
+
$template.SelectSingleNode("//text[@id='1']").InnerText = "FlowDeck"
|
|
87
|
+
$template.SelectSingleNode("//text[@id='2']").InnerText = "Notifications working"
|
|
88
|
+
$toast = [Windows.UI.Notifications.ToastNotification]::new($template)
|
|
89
|
+
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("FlowDeck").Show($toast)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Notification Content Reference
|
|
95
|
+
|
|
96
|
+
| Command | Title | Body |
|
|
97
|
+
|---------|-------|------|
|
|
98
|
+
| `/fd-discuss` | `FlowDeck: /fd-discuss` | Your input is needed — please check OpenCode |
|
|
99
|
+
| `/fd-plan` | `FlowDeck: /fd-plan` | Your input is needed — please check OpenCode |
|
|
100
|
+
| `/fd-review-code` | `FlowDeck: /fd-review-code` | Your input is needed — please check OpenCode |
|
|
101
|
+
| `/fd-deploy-check` | `FlowDeck: /fd-deploy-check` | Your input is needed — please check OpenCode |
|
|
102
|
+
| `/fd-new-project` | `FlowDeck: /fd-new-project` | Your input is needed — please check OpenCode |
|
|
103
|
+
| `/fd-new-feature` | `FlowDeck: /fd-new-feature complete` | Review the output and choose your next step |
|
|
104
|
+
| `/fd-fix-bug` | `FlowDeck: /fd-fix-bug complete` | Review the output and choose your next step |
|
|
105
|
+
| `/fd-write-docs` | `FlowDeck: /fd-write-docs complete` | Review the output and choose your next step |
|
|
106
|
+
| `/fd-checkpoint` | `FlowDeck: /fd-checkpoint` | State saved — safe to close this session |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Disabling Notifications
|
|
111
|
+
|
|
112
|
+
Notifications are opt-out at the OS level. To stop receiving them:
|
|
113
|
+
|
|
114
|
+
- **Linux:** Uninstall `libnotify-bin` (`sudo apt remove libnotify-bin`) or close your notification daemon
|
|
115
|
+
- **macOS:** System Settings → Notifications → find Terminal → set Allow Notifications to off
|
|
116
|
+
- **Windows:** Settings → System → Notifications → Windows PowerShell → toggle off
|
|
117
|
+
|
|
118
|
+
Alternatively, when FlowDeck runs in a non-interactive environment (CI pipeline, headless server, SSH session without `$DISPLAY`) it detects the absence of a notification system and skips notification dispatch automatically. No configuration is needed for headless use.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Troubleshooting
|
|
123
|
+
|
|
124
|
+
### Linux: notifications not appearing
|
|
125
|
+
|
|
126
|
+
**`notify-send` command not found:**
|
|
127
|
+
```bash
|
|
128
|
+
which notify-send # should return a path
|
|
129
|
+
sudo apt install libnotify-bin
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**`notify-send` runs but nothing appears:**
|
|
133
|
+
```bash
|
|
134
|
+
echo $DISPLAY # must not be empty; e.g. :0 or :1
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
If `$DISPLAY` is empty, you are in a session that is not connected to a display server. Set it explicitly if you are connected to a local machine via SSH:
|
|
138
|
+
```bash
|
|
139
|
+
export DISPLAY=:0
|
|
140
|
+
notify-send "test" "test"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Running under Wayland:**
|
|
144
|
+
```bash
|
|
145
|
+
echo $WAYLAND_DISPLAY # should be wayland-0 or similar
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Some distributions require `notify-send` version 0.8+ for Wayland support. Check: `notify-send --version`.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
### macOS: notifications not appearing
|
|
153
|
+
|
|
154
|
+
1. Run the verification command above — if it shows no notification, Terminal notifications are disabled
|
|
155
|
+
2. Check System Settings → Notifications → Terminal → Allow Notifications is on
|
|
156
|
+
3. Check that **Focus** or **Do Not Disturb** is not suppressing alerts
|
|
157
|
+
4. On macOS 14+, check that notification permissions have not been reset after an OS update
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### Windows: notifications not appearing
|
|
162
|
+
|
|
163
|
+
1. Verify Settings → System → Notifications → **Notifications** master toggle is on
|
|
164
|
+
2. Verify **Windows PowerShell** is enabled in the app-level list
|
|
165
|
+
3. Check that **Focus Assist** is not set to **Alarms only** during your work hours
|
|
166
|
+
4. If running OpenCode as an administrator, PowerShell inherits elevated privileges; some Windows configurations suppress toasts from elevated processes
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
← [Back to Index](index.md)
|