@curdx/flow 1.1.4 → 1.1.6

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.
Files changed (89) hide show
  1. package/.claude-plugin/marketplace.json +25 -0
  2. package/.claude-plugin/plugin.json +43 -0
  3. package/CHANGELOG.md +279 -0
  4. package/agent-preamble/preamble.md +214 -0
  5. package/agents/flow-adversary.md +216 -0
  6. package/agents/flow-architect.md +190 -0
  7. package/agents/flow-debugger.md +325 -0
  8. package/agents/flow-edge-hunter.md +273 -0
  9. package/agents/flow-executor.md +246 -0
  10. package/agents/flow-planner.md +204 -0
  11. package/agents/flow-product-designer.md +146 -0
  12. package/agents/flow-qa-engineer.md +276 -0
  13. package/agents/flow-researcher.md +155 -0
  14. package/agents/flow-reviewer.md +280 -0
  15. package/agents/flow-security-auditor.md +398 -0
  16. package/agents/flow-triage-analyst.md +290 -0
  17. package/agents/flow-ui-researcher.md +227 -0
  18. package/agents/flow-ux-designer.md +247 -0
  19. package/agents/flow-verifier.md +283 -0
  20. package/agents/persona-amelia.md +128 -0
  21. package/agents/persona-david.md +141 -0
  22. package/agents/persona-emma.md +179 -0
  23. package/agents/persona-john.md +105 -0
  24. package/agents/persona-mary.md +95 -0
  25. package/agents/persona-oliver.md +136 -0
  26. package/agents/persona-rachel.md +126 -0
  27. package/agents/persona-serena.md +175 -0
  28. package/agents/persona-winston.md +117 -0
  29. package/bin/curdx-flow.js +5 -2
  30. package/cli/install.js +44 -5
  31. package/commands/audit.md +170 -0
  32. package/commands/autoplan.md +184 -0
  33. package/commands/debug.md +199 -0
  34. package/commands/design.md +155 -0
  35. package/commands/discuss.md +162 -0
  36. package/commands/doctor.md +124 -0
  37. package/commands/fast.md +128 -0
  38. package/commands/help.md +119 -0
  39. package/commands/implement.md +381 -0
  40. package/commands/index.md +261 -0
  41. package/commands/init.md +105 -0
  42. package/commands/install-deps.md +128 -0
  43. package/commands/party.md +241 -0
  44. package/commands/plan-ceo.md +117 -0
  45. package/commands/plan-design.md +107 -0
  46. package/commands/plan-dx.md +104 -0
  47. package/commands/plan-eng.md +108 -0
  48. package/commands/qa.md +118 -0
  49. package/commands/requirements.md +146 -0
  50. package/commands/research.md +141 -0
  51. package/commands/review.md +168 -0
  52. package/commands/security.md +109 -0
  53. package/commands/sketch.md +118 -0
  54. package/commands/spec.md +135 -0
  55. package/commands/spike.md +181 -0
  56. package/commands/start.md +189 -0
  57. package/commands/status.md +139 -0
  58. package/commands/switch.md +95 -0
  59. package/commands/tasks.md +189 -0
  60. package/commands/triage.md +160 -0
  61. package/commands/verify.md +124 -0
  62. package/gates/adversarial-review-gate.md +219 -0
  63. package/gates/coverage-audit-gate.md +184 -0
  64. package/gates/devex-gate.md +255 -0
  65. package/gates/edge-case-gate.md +194 -0
  66. package/gates/karpathy-gate.md +130 -0
  67. package/gates/security-gate.md +218 -0
  68. package/gates/tdd-gate.md +188 -0
  69. package/gates/verification-gate.md +183 -0
  70. package/hooks/hooks.json +56 -0
  71. package/hooks/scripts/fail-tracker.sh +31 -0
  72. package/hooks/scripts/inject-karpathy.sh +52 -0
  73. package/hooks/scripts/quick-mode-guard.sh +64 -0
  74. package/hooks/scripts/session-start.sh +76 -0
  75. package/hooks/scripts/stop-watcher.sh +166 -0
  76. package/knowledge/atomic-commits.md +262 -0
  77. package/knowledge/epic-decomposition.md +307 -0
  78. package/knowledge/execution-strategies.md +278 -0
  79. package/knowledge/karpathy-guidelines.md +219 -0
  80. package/knowledge/planning-reviews.md +211 -0
  81. package/knowledge/poc-first-workflow.md +227 -0
  82. package/knowledge/spec-driven-development.md +183 -0
  83. package/knowledge/systematic-debugging.md +384 -0
  84. package/knowledge/two-stage-review.md +233 -0
  85. package/knowledge/wave-execution.md +387 -0
  86. package/package.json +14 -3
  87. package/schemas/config.schema.json +100 -0
  88. package/schemas/spec-frontmatter.schema.json +42 -0
  89. package/schemas/spec-state.schema.json +117 -0
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: doctor
3
+ description: Check the dependency health and project configuration of CurDX-Flow
4
+ argument-hint: "[--verbose]"
5
+ allowed-tools: [Bash, Read]
6
+ ---
7
+
8
+ # CurDX-Flow Health Check
9
+
10
+ Quickly confirm: **Are all the MCPs up? Are the recommended plugins installed? Is the project config valid?**
11
+
12
+ ## Steps
13
+
14
+ ### Step 1: MCP status
15
+
16
+ ```bash
17
+ claude mcp list 2>/dev/null
18
+ ```
19
+
20
+ Expected (auto-injected by CurDX-Flow's plugin.json):
21
+
22
+ - ✓ `context7` — documentation queries
23
+ - ✓ `sequential-thinking` — structured thinking
24
+ - ✓ `chrome-devtools` — browser QA
25
+
26
+ If missing, output:
27
+ - `❌ <name> not started. Possible causes: npx connection failed, Node.js < 18, or corrupted npm cache.`
28
+ - Hint: `claude mcp list` to view details, or restart Claude Code.
29
+
30
+ ### Step 2: Plugin status
31
+
32
+ ```bash
33
+ claude plugin list 2>/dev/null
34
+ ```
35
+
36
+ **Required**:
37
+ - `curdx-flow` — this plugin
38
+
39
+ **Recommended**:
40
+ - `pua` (tanweai/pua) — anti-giving-up
41
+ - `claude-mem` (thedotmack/claude-mem) — auto memory
42
+ - `frontend-design` — UI design
43
+
44
+ If a recommended plugin is missing, output:
45
+ ```
46
+ ⚠ <name> is not installed. Run /curdx-flow:install-deps to install, or run in degraded mode.
47
+ Degradation impact:
48
+ - pua missing → no pressure escalation; rely on the three red lines in the preamble
49
+ - claude-mem missing → no auto memory; only explicit state in .flow/STATE.md
50
+ - frontend-design missing → UI falls back to default Tailwind + shadcn
51
+ ```
52
+
53
+ ### Step 3: Project status
54
+
55
+ Check whether `.flow/` exists:
56
+
57
+ ```bash
58
+ if [ -d ".flow" ]; then
59
+ echo "✓ .flow/ directory exists"
60
+ else
61
+ echo "⚠ .flow/ directory does not exist. Run /curdx-flow:init to initialize."
62
+ fi
63
+ ```
64
+
65
+ If present, check:
66
+ - `.flow/config.json` — valid JSON?
67
+ - `.flow/PROJECT.md` — has content (not template placeholder)?
68
+ - `.flow/STATE.md` — readable?
69
+ - `.flow/.active-spec` — does the corresponding specs/<name>/ exist?
70
+
71
+ ### Step 4: CLAUDE.md check
72
+
73
+ ```bash
74
+ if [ -f "CLAUDE.md" ]; then
75
+ echo "✓ Project-level CLAUDE.md exists"
76
+ else
77
+ echo "ℹ Project has no CLAUDE.md. The Karpathy baseline is still injected via the InstructionsLoaded hook."
78
+ fi
79
+ ```
80
+
81
+ ### Step 5: Write diagnostic report (optional --verbose)
82
+
83
+ In verbose mode, output a full diagnosis, including:
84
+ - Node.js version (`node --version`)
85
+ - Claude Code version (`claude --version`)
86
+ - Plugin data directory: `${CLAUDE_PLUGIN_DATA}`
87
+ - Last dependency check date: `${CLAUDE_PLUGIN_DATA}/.deps-checked`
88
+
89
+ ## Output format
90
+
91
+ ```
92
+ 🏥 CurDX-Flow Health Check
93
+ ═══════════════════════════════════════
94
+
95
+ MCP Servers:
96
+ ✓ context7 (auto-installed)
97
+ ✓ sequential-thinking (auto-installed)
98
+ ✓ chrome-devtools (auto-installed)
99
+
100
+ Plugins:
101
+ ✓ curdx-flow v0.1.0
102
+ ✓ pua v3.2.1
103
+ ⚠ claude-mem not installed → /curdx-flow:install-deps
104
+ ✓ frontend-design v1.x
105
+
106
+ Project:
107
+ ✓ .flow/ initialized
108
+ ✓ config.json valid (mode: standard)
109
+ ⚠ PROJECT.md still the template (please fill in the project vision)
110
+ ℹ No active spec run /curdx-flow:start to launch the first one
111
+
112
+ ═══════════════════════════════════════
113
+ Summary: 1 warning, 0 errors. Run /curdx-flow:install-deps to clear the warning.
114
+ ```
115
+
116
+ ## Exit status
117
+
118
+ - 0 errors → fully healthy
119
+ - Warnings only → usable, but recommended to address
120
+ - Errors present → must be fixed before continuing
121
+
122
+ ## Error recovery
123
+
124
+ For each issue found, provide a concrete recovery command rather than just "check the config".
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: fast
3
+ description: Ultra-fast execution — skip all spec phases and implement directly per the description. Suited for one-shot small tasks.
4
+ argument-hint: "\"<task description>\""
5
+ allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Task]
6
+ ---
7
+
8
+ # Flow Fast — Ultra-Fast Execution
9
+
10
+ @${CLAUDE_PLUGIN_ROOT}/agent-preamble/preamble.md
11
+ @${CLAUDE_PLUGIN_ROOT}/knowledge/atomic-commits.md
12
+
13
+ **Fast Mode**: skip research / requirements / design / tasks, just do it.
14
+
15
+ ## Applicable Scenarios
16
+
17
+ - ✓ One-shot scripts (e.g., "add a CLI command that prints the version number")
18
+ - ✓ Clear small changes (e.g., "swap the deprecated API in foo.ts to bar")
19
+ - ✓ Single-file modifications
20
+ - ✓ Bug fixes (simple types)
21
+
22
+ ## Not Applicable
23
+
24
+ - ✗ Production feature development (run the full /curdx-flow:start → /curdx-flow:spec → /curdx-flow:implement)
25
+ - ✗ Architecture-level changes spanning multiple files
26
+ - ✗ User-story-driven requirements
27
+
28
+ **Cost of using this command**: no spec files are left behind; nobody will know later why it was changed this way. If that cost is unacceptable, run the full flow.
29
+
30
+ ## Step 1: Parse Input
31
+
32
+ ```bash
33
+ TASK_DESC="$ARGUMENTS"
34
+ [ -z "$TASK_DESC" ] && { echo "Usage: /curdx-flow:fast \"task description\""; exit 1; }
35
+ ```
36
+
37
+ ## Step 2: 5-Question Quick Clarification (Karpathy Principle 1)
38
+
39
+ Even in fast mode, do not skip thinking. Before executing, explicitly state:
40
+
41
+ ```
42
+ Quick understanding (please confirm or amend):
43
+
44
+ 1. Task: <restate in your own words>
45
+ 2. Files involved: <preliminary assessment>
46
+ 3. Expected effect: <success criteria>
47
+ 4. Known constraints: <if any>
48
+ 5. Assumptions: <list explicitly>
49
+
50
+ Any ambiguity? (yes: amend then continue / no: proceed directly)
51
+ ```
52
+
53
+ Use AskUserQuestion. If the user picks `no`, go straight to Step 3.
54
+
55
+ ## Step 3: Context Loading (Lightweight)
56
+
57
+ ```bash
58
+ # Read project's CLAUDE.md (if any) and .flow/CONTEXT.md (if any)
59
+ # but do not require a flow project — fast mode is allowed in any project
60
+ [ -f "CLAUDE.md" ] && cat CLAUDE.md | head -50
61
+ [ -f ".flow/CONTEXT.md" ] && cat .flow/CONTEXT.md | head -30
62
+ ```
63
+
64
+ ## Step 4: Explore + Execute
65
+
66
+ **Mandatory tool use** (do not rely on training memory):
67
+
68
+ ```
69
+ 1. If library/API is involved: mcp__context7__query-docs
70
+ 2. Use Grep/Glob to find relevant code
71
+ 3. Read files to understand the current state
72
+ 4. Apply Karpathy's surgical principles
73
+ 5. Run validation commands (tsc/lint/test, per project)
74
+ ```
75
+
76
+ ## Step 5: Atomic Commit
77
+
78
+ Even in fast mode, commit (do not leave changes scattered):
79
+
80
+ ```bash
81
+ git add <exact files>
82
+ git commit -m "<type>(<scope>): <summary>
83
+
84
+ <body if any>
85
+ "
86
+ ```
87
+
88
+ The commit message must conform to `atomic-commits.md`.
89
+
90
+ ## Step 6: Output
91
+
92
+ ```
93
+ ✓ Fast execution complete
94
+
95
+ Changes:
96
+ - src/foo.ts (+3 -1)
97
+ - src/foo.test.ts (+15)
98
+
99
+ Verification:
100
+ npm test ✓ 12/12 passed
101
+ tsc --noEmit ✓
102
+
103
+ Commit: abc123f — fix(foo): handle null case
104
+
105
+ Consider the full flow next time?
106
+ /curdx-flow:start <name> "<goal>" — if this type of task will recur
107
+ ```
108
+
109
+ ## Downgrade Comparison
110
+
111
+ Fast vs Standard:
112
+
113
+ | Dimension | Fast | Standard |
114
+ |-----------|------|----------|
115
+ | Time | 5-15 minutes | 1-4 hours |
116
+ | Files | No spec residue | .flow/specs/<name>/*.md |
117
+ | Traceability | git log only | git log + spec docs |
118
+ | Quality | Relies on agent discipline | Multi-Gate enforced |
119
+ | Suited for | Simple & known | Complex / team collaboration |
120
+
121
+ Choosing the right scenario matters more than forcing the flow.
122
+
123
+ ## Forbidden
124
+
125
+ - ✗ Committing without running verification
126
+ - ✗ Changes touching more than 5 files (means it is no longer fast — run the full flow)
127
+ - ✗ Writing library APIs from memory
128
+ - ✗ Skipping the Step 2 5-question clarification (even when "obvious," explicit statement still has value)
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: help
3
+ description: CurDX-Flow help (command list, workflow overview, troubleshooting)
4
+ argument-hint: "[<command-name> | workflow | troubleshoot]"
5
+ allowed-tools: [Read]
6
+ ---
7
+
8
+ # CurDX-Flow Help
9
+
10
+ ## No Arguments — Quick Overview
11
+
12
+ ```
13
+ 🚀 CurDX-Flow — AI Engineering Workflow Meta-Framework
14
+
15
+ Current version: 0.1.0 (Phase 0 — Foundation)
16
+
17
+ ╔══════════════════════════════════════════════════════════════╗
18
+ ║ Command overview (Phase 0 implemented) ║
19
+ ╠══════════════════════════════════════════════════════════════╣
20
+ ║ /curdx-flow:init Initialize .flow/ project structure ║
21
+ ║ /curdx-flow:install-deps One-shot install of recommended plugins ║
22
+ ║ /curdx-flow:doctor Health check (deps + project config) ║
23
+ ║ /curdx-flow:status View spec and phase status ║
24
+ ║ /curdx-flow:help This help ║
25
+ ╚══════════════════════════════════════════════════════════════╝
26
+
27
+ Coming soon (Phase 1+):
28
+ /curdx-flow:start / /curdx-flow:research / /curdx-flow:requirements / /curdx-flow:design
29
+ /curdx-flow:tasks / /curdx-flow:implement / /curdx-flow:verify / /curdx-flow:review
30
+ /curdx-flow:triage / /curdx-flow:party / /curdx-flow:debug / /curdx-flow:qa / /curdx-flow:sketch
31
+ /curdx-flow:ship / /curdx-flow:land / /curdx-flow:canary / /curdx-flow:retro ...
32
+
33
+ Usage:
34
+ /curdx-flow:help <command> View detailed usage for a command
35
+ /curdx-flow:help workflow Introduce the full workflow
36
+ /curdx-flow:help troubleshoot Common troubleshooting
37
+ ```
38
+
39
+ ## `<command-name>` — Command Details
40
+
41
+ Based on the argument, read and display the corresponding command file (in a user-friendly format):
42
+
43
+ ```bash
44
+ cat "${CLAUDE_PLUGIN_ROOT}/commands/${COMMAND}.md"
45
+ ```
46
+
47
+ ## `workflow` — Workflow Overview
48
+
49
+ ```
50
+ 📐 CurDX-Flow Standard Workflow
51
+
52
+ 1. Foundation (one-time)
53
+ └─ /curdx-flow:install-deps → /curdx-flow:init → /curdx-flow:doctor
54
+
55
+ 2. Per feature (Feature Workflow)
56
+ ├─ Research /curdx-flow:research (optional)
57
+ ├─ Requirements /curdx-flow:requirements (required)
58
+ ├─ Design /curdx-flow:design (required)
59
+ ├─ Tasks /curdx-flow:tasks (required)
60
+ ├─ Execute /curdx-flow:implement (required)
61
+ ├─ Verify /curdx-flow:verify (required)
62
+ ├─ Review /curdx-flow:review (recommended)
63
+ └─ Ship /curdx-flow:ship (recommended)
64
+
65
+ 3. Large feature (Epic Workflow)
66
+ └─ /curdx-flow:triage → split into multiple specs advanced in parallel
67
+
68
+ 4. Ultra-fast path (Fast Path)
69
+ └─ /curdx-flow:fast "description" — skip specs and execute directly
70
+
71
+ 5. Prototype exploration (Sketch Path)
72
+ └─ /curdx-flow:sketch "description" — UI design drafts
73
+
74
+ Five modes (configured via .flow/config.json):
75
+ sketch — Rapid prototyping
76
+ fast — One-shot tasks
77
+ standard — Regular features (default)
78
+ enterprise — Full SDLC + multi-agent collaboration
79
+ autonomous — Overnight automation
80
+ ```
81
+
82
+ ## `troubleshoot` — Common Issues
83
+
84
+ ```
85
+ 🛠️ Common Troubleshooting
86
+
87
+ Q: 3 MCPs did not start?
88
+ A: Check Node.js >= 18: `node --version`
89
+ View MCP status: `claude mcp list`
90
+ Restart Claude Code
91
+
92
+ Q: Recommended-plugins prompt keeps appearing?
93
+ A: Run /curdx-flow:install-deps to install, or create the marker file manually:
94
+ touch "${CLAUDE_PLUGIN_DATA}/.deps-checked"
95
+
96
+ Q: /curdx-flow:init reports "directory already exists"?
97
+ A: An existing .flow/ is already initialized. Run /curdx-flow:status to view, or use --force to overwrite.
98
+
99
+ Q: Agents do not call context7 / sequential-thinking?
100
+ A: Make sure preamble.md is loaded (InstructionsLoaded hook).
101
+ Run /curdx-flow:doctor to check MCP status.
102
+
103
+ Q: Do claude-mem and .flow/STATE.md conflict?
104
+ A: No. claude-mem lives at ~/.claude-mem/ (SQLite), curdx-flow lives at .flow/ (JSON+MD).
105
+ Division of duties: claude-mem for automatic implicit memory, STATE.md for explicit decisions.
106
+
107
+ Q: pua is too aggressive, can it be turned off?
108
+ A: pua is an independent plugin, you can /plugin disable pua.
109
+ Enabling pua does not affect curdx-flow's core features (the three red lines are built into preamble).
110
+
111
+ Q: Want to contribute / report a bug?
112
+ A: https://github.com/wdx/curdx-flow/issues
113
+ ```
114
+
115
+ ## Output Principles
116
+
117
+ - Stay concise; use tables and lists instead of long prose
118
+ - Every answer points to a specific command; avoid filler like "please consult the docs"
119
+ - Prioritize showing the user's next actionable step