@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,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: parallel-execute
|
|
3
|
+
description: Coordinate parallel agent execution for independent workstreams. Assign tasks to specialist agents by wave, merge outputs, handle conflicts. Use when a plan has parallel tasks.
|
|
4
|
+
origin: FlowDeck
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Parallel Execute Skill
|
|
8
|
+
|
|
9
|
+
Maximizes throughput by running independent work simultaneously. Manages waves, verifies independence, handles merge conflicts.
|
|
10
|
+
|
|
11
|
+
## When to Activate
|
|
12
|
+
|
|
13
|
+
Activate when:
|
|
14
|
+
- A plan has tasks that can run simultaneously
|
|
15
|
+
- Multiple independent features need to be implemented
|
|
16
|
+
- Research can happen in parallel with implementation
|
|
17
|
+
|
|
18
|
+
## Core Principles
|
|
19
|
+
|
|
20
|
+
- Parallel = different files + no shared state + not dependent on each other
|
|
21
|
+
- Always wait for an entire wave before starting the next
|
|
22
|
+
- Conflicts mean the tasks weren't truly independent — reassign as sequential
|
|
23
|
+
- Brief each agent completely — they are stateless
|
|
24
|
+
|
|
25
|
+
## Workflow
|
|
26
|
+
|
|
27
|
+
1. **Identify Wave 1** — tasks with no dependencies
|
|
28
|
+
2. **Verify independence** — confirm different files, no shared state
|
|
29
|
+
3. **Spawn Wave 1 simultaneously** — delegate all Wave 1 tasks at once
|
|
30
|
+
4. **Wait for all Wave 1** — do not start Wave 2 until all complete
|
|
31
|
+
5. **Check for conflicts** — compare files changed by each agent
|
|
32
|
+
6. **Spawn Wave 2** — tasks that depend on Wave 1 outputs
|
|
33
|
+
|
|
34
|
+
## Wave Structure Example
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Wave 1 (start simultaneously — ~2 hours):
|
|
38
|
+
Track A: @coder implements UserModel in src/models/user.ts
|
|
39
|
+
Track B: @researcher documents bcrypt API for password hashing
|
|
40
|
+
Track C: @tester writes tests for UserService in src/user.test.ts
|
|
41
|
+
|
|
42
|
+
[Wait for all three to complete]
|
|
43
|
+
|
|
44
|
+
Wave 2 (sequential — ~2 hours):
|
|
45
|
+
Task 2.A: @coder implements auth service using outputs from Track A + B
|
|
46
|
+
Task 2.B: @writer documents the public API using outputs from Track A
|
|
47
|
+
|
|
48
|
+
[Wait for 2.A and 2.B to complete]
|
|
49
|
+
|
|
50
|
+
Wave 3 (review — 30 min):
|
|
51
|
+
@reviewer reviews all changes together
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Timing example:
|
|
55
|
+
- Sequential total: 6.5 hours
|
|
56
|
+
- Parallel total: ~4.5 hours (30% faster)
|
|
57
|
+
|
|
58
|
+
## Independence Checklist
|
|
59
|
+
|
|
60
|
+
Before marking tasks as parallel:
|
|
61
|
+
- [ ] Task A and Task B touch different files
|
|
62
|
+
- [ ] Neither task's output is needed as input by the other
|
|
63
|
+
- [ ] Both tasks can be verified independently
|
|
64
|
+
- [ ] If both complete correctly, integration will be straightforward
|
|
65
|
+
|
|
66
|
+
## Conflict Resolution
|
|
67
|
+
|
|
68
|
+
If two agents modified the same file:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
CONFLICT: Track A and Track C both modified src/types/user.ts
|
|
72
|
+
Resolution: Assigning @coder to reconcile both versions sequentially.
|
|
73
|
+
Track A change: [description]
|
|
74
|
+
Track C change: [description]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Output Format
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
## Parallel Execution Report
|
|
81
|
+
|
|
82
|
+
### Wave 1 Results (all must complete before Wave 2)
|
|
83
|
+
- Track A (@coder): ✅ src/models/user.ts created
|
|
84
|
+
- Track B (@researcher): ✅ bcrypt docs ready
|
|
85
|
+
- Track C (@tester): ✅ 8 tests written, 8 passing
|
|
86
|
+
|
|
87
|
+
### Conflicts
|
|
88
|
+
None detected.
|
|
89
|
+
|
|
90
|
+
### Wave 2 Starting
|
|
91
|
+
Task 2.A: @coder building auth service with Wave 1 outputs
|
|
92
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: patch-trust-score
|
|
3
|
+
description: Assign a confidence and risk rating to every AI-generated change. Returns safe, review-required, or high-risk verdict with specific signals.
|
|
4
|
+
origin: FlowDeck
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Patch Trust Score
|
|
8
|
+
|
|
9
|
+
Every AI-generated patch gets a trust score before it is applied. The score gates how the change is handled: auto-apply, flag for review, or block and escalate.
|
|
10
|
+
|
|
11
|
+
## Score Bands
|
|
12
|
+
|
|
13
|
+
| Score | Verdict | Action |
|
|
14
|
+
|-------|---------|--------|
|
|
15
|
+
| 80–100 | safe | Auto-apply in guarded mode |
|
|
16
|
+
| 40–79 | review-required | Inline warning + human ACK |
|
|
17
|
+
| 0–39 | high-risk | Block auto-apply, route to reviewer |
|
|
18
|
+
|
|
19
|
+
## Risk Signals (each reduces the score)
|
|
20
|
+
|
|
21
|
+
| Signal | Deduction |
|
|
22
|
+
|--------|-----------|
|
|
23
|
+
| File in volatile/critical volatility zone | −25 to −40 |
|
|
24
|
+
| File has prior failure history | −20 |
|
|
25
|
+
| Edit contains auth/crypto/payment keywords | −8 per keyword (max −30) |
|
|
26
|
+
| File in arch-constrained zone | −20 |
|
|
27
|
+
| No test coverage for file | −10 |
|
|
28
|
+
|
|
29
|
+
## Workflow
|
|
30
|
+
|
|
31
|
+
1. For every proposed write or edit:
|
|
32
|
+
a. Look up the file in `.codebase/VOLATILITY.json`
|
|
33
|
+
b. Check `.codebase/FAILURES.json` for prior failures on this file
|
|
34
|
+
c. Scan the patch content for high-risk keywords
|
|
35
|
+
d. Check `.codebase/CONSTRAINTS.md` for boundary violations
|
|
36
|
+
2. Compute score (0–100, start at 100)
|
|
37
|
+
3. Emit verdict with signals
|
|
38
|
+
4. Route accordingly (auto / warn / block)
|
|
39
|
+
|
|
40
|
+
## Integration
|
|
41
|
+
|
|
42
|
+
The `patch-trust` hook runs automatically on every `write` and `edit` tool call. The score is logged to stdout and appended to `.codebase/DECISIONS.jsonl`.
|
|
43
|
+
|
|
44
|
+
For manual scoring, use the `patch-trust-score` skill with a file path and change description.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: performance-profiling
|
|
3
|
+
description: CPU and memory profiling, N+1 query detection, bundle analysis, and render optimization. Activate when diagnosing slow performance or before production deployments.
|
|
4
|
+
origin: FlowDeck
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Performance Profiling Skill
|
|
8
|
+
|
|
9
|
+
Finds real performance bottlenecks using data. Never optimize without measuring first.
|
|
10
|
+
|
|
11
|
+
## When to Activate
|
|
12
|
+
|
|
13
|
+
Activate when:
|
|
14
|
+
- Users report slow responses
|
|
15
|
+
- A page or endpoint takes longer than expected
|
|
16
|
+
- Before a production deployment of performance-sensitive changes
|
|
17
|
+
- After adding features to a hot code path
|
|
18
|
+
|
|
19
|
+
## Core Principles
|
|
20
|
+
|
|
21
|
+
- **Measure before optimizing** — a guess about the bottleneck is almost always wrong
|
|
22
|
+
- **Profile the real bottleneck** — top-line metrics first, then drill down
|
|
23
|
+
- **Verify improvement with numbers** — "feels faster" is not a performance result
|
|
24
|
+
|
|
25
|
+
## Workflow
|
|
26
|
+
|
|
27
|
+
1. **Establish baseline** — measure current performance with actual numbers
|
|
28
|
+
2. **Profile** — find where time is spent
|
|
29
|
+
3. **Identify bottleneck** — the one slowest thing
|
|
30
|
+
4. **Fix** — targeted change to address bottleneck
|
|
31
|
+
5. **Measure improvement** — confirm the number improved
|
|
32
|
+
|
|
33
|
+
## Profiling Tools
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Node.js CPU profiling
|
|
37
|
+
node --prof app.js
|
|
38
|
+
node --prof-process isolate-*.log | head -100
|
|
39
|
+
|
|
40
|
+
# Clinic.js (visual profiler)
|
|
41
|
+
npm install -g clinic
|
|
42
|
+
clinic doctor -- node app.js
|
|
43
|
+
clinic flame -- node app.js # flame graph
|
|
44
|
+
|
|
45
|
+
# Lighthouse (web performance)
|
|
46
|
+
npx lighthouse http://localhost:3000 --output=json --output-path=./report.json
|
|
47
|
+
|
|
48
|
+
# Bundle analyzer
|
|
49
|
+
npx webpack-bundle-analyzer dist/stats.json
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Core Web Vitals Targets
|
|
53
|
+
|
|
54
|
+
| Metric | Good | Needs Work | Poor |
|
|
55
|
+
|--------|------|-----------|------|
|
|
56
|
+
| LCP | < 2.5s | 2.5s-4s | > 4s |
|
|
57
|
+
| FID | < 100ms | 100ms-300ms | > 300ms |
|
|
58
|
+
| CLS | < 0.1 | 0.1-0.25 | > 0.25 |
|
|
59
|
+
| TTFB | < 800ms | 800ms-1.8s | > 1.8s |
|
|
60
|
+
|
|
61
|
+
## N+1 Detection
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
// ❌ N+1 — 1 query for posts, N queries for authors
|
|
65
|
+
const posts = await Post.findAll();
|
|
66
|
+
for (const post of posts) {
|
|
67
|
+
post.author = await User.findById(post.authorId); // N queries!
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// ✅ Single query with JOIN
|
|
71
|
+
const posts = await Post.findAll({
|
|
72
|
+
include: [{ model: User, as: 'author' }]
|
|
73
|
+
});
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Detection: add query logging and look for repeated queries with different IDs.
|
|
77
|
+
|
|
78
|
+
## Bundle Analysis
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Generate stats
|
|
82
|
+
npm run build -- --stats
|
|
83
|
+
|
|
84
|
+
# Analyze
|
|
85
|
+
npx webpack-bundle-analyzer dist/stats.json
|
|
86
|
+
|
|
87
|
+
# What to look for:
|
|
88
|
+
# - Large libraries that could be replaced with smaller alternatives
|
|
89
|
+
# - Libraries imported in full that should be tree-shaken
|
|
90
|
+
# - Duplicate dependencies at different versions
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## React Render Profiling
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
// React DevTools Profiler — open in browser DevTools → Profiler tab
|
|
97
|
+
// Record a user interaction, look for:
|
|
98
|
+
// - Components rendering too often
|
|
99
|
+
// - Renders taking >16ms (drops frame rate)
|
|
100
|
+
|
|
101
|
+
// why-did-you-render (development only)
|
|
102
|
+
import whyDidYouRender from '@welldone-software/why-did-you-render';
|
|
103
|
+
whyDidYouRender(React, { trackAllPureComponents: true });
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Memory Leak Patterns
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
// ❌ Event listener never removed
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
document.addEventListener('click', handler);
|
|
112
|
+
}, []);
|
|
113
|
+
|
|
114
|
+
// ✅ Cleanup
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
document.addEventListener('click', handler);
|
|
117
|
+
return () => document.removeEventListener('click', handler);
|
|
118
|
+
}, []);
|
|
119
|
+
|
|
120
|
+
// ❌ Interval never cleared
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
setInterval(poll, 5000);
|
|
123
|
+
}, []);
|
|
124
|
+
|
|
125
|
+
// ✅ Clear on unmount
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
const id = setInterval(poll, 5000);
|
|
128
|
+
return () => clearInterval(id);
|
|
129
|
+
}, []);
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Performance Report Template
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
## Performance Report
|
|
136
|
+
|
|
137
|
+
### Baseline
|
|
138
|
+
- Endpoint: GET /api/v1/users
|
|
139
|
+
- P50: 340ms | P95: 1200ms | P99: 3400ms
|
|
140
|
+
- Measured with: autocannon, 100 concurrent connections
|
|
141
|
+
|
|
142
|
+
### Bottleneck
|
|
143
|
+
- Root cause: N+1 query — 1 query per user to fetch their role
|
|
144
|
+
- Evidence: query log shows 47 queries for 47 users
|
|
145
|
+
|
|
146
|
+
### Fix
|
|
147
|
+
- Single JOIN query in UserRepository.findAllWithRoles()
|
|
148
|
+
- File: src/db/user-repo.ts
|
|
149
|
+
|
|
150
|
+
### After
|
|
151
|
+
- P50: 42ms | P95: 98ms | P99: 210ms
|
|
152
|
+
- Improvement: 87% faster at P50
|
|
153
|
+
```
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-task
|
|
3
|
+
description: Break complex features into a phased implementation plan with wave-structured parallel tasks, dependency graph, and verifiable success criteria. Use before starting any multi-file feature.
|
|
4
|
+
origin: FlowDeck
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Plan Task Skill
|
|
8
|
+
|
|
9
|
+
Turns vague feature requests into concrete, executable plans. Each step maps to a file, has a verification, and fits within a working session.
|
|
10
|
+
|
|
11
|
+
## When to Activate
|
|
12
|
+
|
|
13
|
+
Activate when:
|
|
14
|
+
- A feature touches more than 2 files
|
|
15
|
+
- You are unsure what order to implement things
|
|
16
|
+
- Multiple people need to work on the feature in parallel
|
|
17
|
+
- The feature involves data model changes or API changes
|
|
18
|
+
|
|
19
|
+
## Core Principles
|
|
20
|
+
|
|
21
|
+
- Foundation first: types → data → services → routes → UI
|
|
22
|
+
- Steps must be independently verifiable
|
|
23
|
+
- No step longer than 2-3 hours of work
|
|
24
|
+
- Success criteria must be observable (not "it works")
|
|
25
|
+
|
|
26
|
+
## Task Sizing Guide
|
|
27
|
+
|
|
28
|
+
| Size | Duration | Action |
|
|
29
|
+
|------|----------|--------|
|
|
30
|
+
| Too small | < 30 min | Combine with a related task |
|
|
31
|
+
| Right size | 1-3 hours | Keep as is |
|
|
32
|
+
| Too large | > 3 hours | Split into two steps in separate waves |
|
|
33
|
+
|
|
34
|
+
## Workflow
|
|
35
|
+
|
|
36
|
+
1. **Parse requirements** — list every behavior the feature must have
|
|
37
|
+
2. **Map to files** — which files must change for each behavior?
|
|
38
|
+
3. **Build dependency graph** — which changes depend on others?
|
|
39
|
+
4. **Group into waves** — independent changes in same wave
|
|
40
|
+
5. **Write success criteria** — one observable outcome per requirement
|
|
41
|
+
|
|
42
|
+
## Wave Assignment Rules
|
|
43
|
+
|
|
44
|
+
**Same wave (run in parallel):**
|
|
45
|
+
- Different files, no shared mutable state
|
|
46
|
+
- Neither task reads the other's output
|
|
47
|
+
|
|
48
|
+
**Next wave:**
|
|
49
|
+
- Integration tasks (wiring together Wave 1 outputs)
|
|
50
|
+
- Review and documentation
|
|
51
|
+
- Any task that reads output produced by Wave 1
|
|
52
|
+
|
|
53
|
+
## Plan Format
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
# Plan: [Feature Name]
|
|
57
|
+
|
|
58
|
+
## Objective
|
|
59
|
+
[What this delivers and why]
|
|
60
|
+
|
|
61
|
+
## Wave 1 — Foundation (parallel)
|
|
62
|
+
|
|
63
|
+
### Task 1.A — [Name]
|
|
64
|
+
- **Agent**: @coder
|
|
65
|
+
- **File**: `src/models/subscription.ts`
|
|
66
|
+
- **Scope**: Create Subscription model with id, userId, status, expiresAt
|
|
67
|
+
- **Verify**: `npx tsc --noEmit` passes
|
|
68
|
+
|
|
69
|
+
### Task 1.B — [Name]
|
|
70
|
+
- **Agent**: @researcher
|
|
71
|
+
- **Scope**: Document Stripe subscription API
|
|
72
|
+
- **Verify**: Research covers: create, cancel, webhook events
|
|
73
|
+
|
|
74
|
+
## Wave 2 — Implementation (after Wave 1)
|
|
75
|
+
|
|
76
|
+
### Task 2.A — [Name]
|
|
77
|
+
- **Agent**: @coder
|
|
78
|
+
- **Depends on**: Task 1.A, Task 1.B
|
|
79
|
+
- **File**: `src/services/billing-service.ts`
|
|
80
|
+
- **Scope**: Implement subscribe(), cancel(), handleWebhook()
|
|
81
|
+
- **Verify**: `npm test src/billing.test.ts` passes
|
|
82
|
+
|
|
83
|
+
## Success Criteria
|
|
84
|
+
- [ ] [Observable outcome 1]
|
|
85
|
+
- [ ] [Observable outcome 2]
|
|
86
|
+
- [ ] `npm test` exits 0
|
|
87
|
+
- [ ] `npx tsc --noEmit` exits 0
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Success Criteria Quality
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
✅ Good: "User can log in with email+password and receives a JWT"
|
|
94
|
+
❌ Bad: "Authentication works"
|
|
95
|
+
|
|
96
|
+
✅ Good: "GET /users/:id returns 404 when user does not exist"
|
|
97
|
+
❌ Bad: "Error handling works"
|
|
98
|
+
|
|
99
|
+
✅ Good: "npm test produces 0 failures"
|
|
100
|
+
❌ Bad: "Tests pass"
|
|
101
|
+
```
|