@curdx/flow 1.1.11 → 2.0.0-beta.10

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 (96) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +4 -11
  3. package/CHANGELOG.md +99 -0
  4. package/README.md +74 -102
  5. package/README.zh.md +2 -2
  6. package/agent-preamble/preamble.md +81 -11
  7. package/agents/flow-adversary.md +41 -56
  8. package/agents/flow-architect.md +24 -11
  9. package/agents/flow-debugger.md +2 -2
  10. package/agents/flow-edge-hunter.md +20 -6
  11. package/agents/flow-executor.md +3 -3
  12. package/agents/flow-planner.md +51 -48
  13. package/agents/flow-product-designer.md +15 -2
  14. package/agents/flow-qa-engineer.md +4 -4
  15. package/agents/flow-researcher.md +18 -3
  16. package/agents/flow-reviewer.md +5 -1
  17. package/agents/flow-security-auditor.md +2 -2
  18. package/agents/flow-triage-analyst.md +4 -4
  19. package/agents/flow-ui-researcher.md +7 -7
  20. package/agents/flow-ux-designer.md +3 -3
  21. package/agents/flow-verifier.md +47 -14
  22. package/bin/curdx-flow.js +13 -1
  23. package/cli/doctor.js +28 -13
  24. package/cli/install.js +62 -36
  25. package/cli/protocols.js +63 -10
  26. package/cli/registry.js +73 -0
  27. package/cli/uninstall.js +9 -11
  28. package/cli/upgrade.js +6 -10
  29. package/cli/utils.js +104 -56
  30. package/commands/debug.md +10 -10
  31. package/commands/fast.md +1 -1
  32. package/commands/help.md +109 -87
  33. package/commands/implement.md +7 -7
  34. package/commands/init.md +18 -7
  35. package/commands/review.md +114 -130
  36. package/commands/spec.md +131 -89
  37. package/commands/start.md +130 -153
  38. package/commands/verify.md +110 -92
  39. package/gates/adversarial-review-gate.md +20 -20
  40. package/gates/coverage-audit-gate.md +1 -1
  41. package/gates/devex-gate.md +5 -6
  42. package/gates/edge-case-gate.md +2 -2
  43. package/gates/security-gate.md +3 -3
  44. package/hooks/hooks.json +0 -11
  45. package/hooks/scripts/quick-mode-guard.sh +12 -9
  46. package/hooks/scripts/session-start.sh +2 -2
  47. package/hooks/scripts/stop-watcher.sh +25 -15
  48. package/knowledge/epic-decomposition.md +2 -2
  49. package/knowledge/execution-strategies.md +10 -9
  50. package/knowledge/planning-reviews.md +6 -6
  51. package/knowledge/spec-driven-development.md +11 -10
  52. package/knowledge/two-stage-review.md +6 -5
  53. package/knowledge/wave-execution.md +5 -5
  54. package/package.json +4 -2
  55. package/skills/brownfield-index/SKILL.md +62 -0
  56. package/skills/browser-qa/SKILL.md +50 -0
  57. package/skills/epic/SKILL.md +68 -0
  58. package/skills/security-audit/SKILL.md +50 -0
  59. package/skills/ui-sketch/SKILL.md +49 -0
  60. package/templates/config.json.tmpl +1 -1
  61. package/templates/design.md.tmpl +32 -112
  62. package/templates/requirements.md.tmpl +25 -43
  63. package/templates/research.md.tmpl +37 -68
  64. package/templates/tasks.md.tmpl +27 -84
  65. package/agents/persona-amelia.md +0 -128
  66. package/agents/persona-david.md +0 -141
  67. package/agents/persona-emma.md +0 -179
  68. package/agents/persona-john.md +0 -105
  69. package/agents/persona-mary.md +0 -95
  70. package/agents/persona-oliver.md +0 -136
  71. package/agents/persona-rachel.md +0 -126
  72. package/agents/persona-serena.md +0 -175
  73. package/agents/persona-winston.md +0 -117
  74. package/commands/audit.md +0 -170
  75. package/commands/autoplan.md +0 -184
  76. package/commands/design.md +0 -155
  77. package/commands/discuss.md +0 -162
  78. package/commands/doctor.md +0 -124
  79. package/commands/index.md +0 -261
  80. package/commands/install-deps.md +0 -128
  81. package/commands/party.md +0 -241
  82. package/commands/plan-ceo.md +0 -117
  83. package/commands/plan-design.md +0 -107
  84. package/commands/plan-dx.md +0 -104
  85. package/commands/plan-eng.md +0 -108
  86. package/commands/qa.md +0 -118
  87. package/commands/requirements.md +0 -146
  88. package/commands/research.md +0 -141
  89. package/commands/security.md +0 -109
  90. package/commands/sketch.md +0 -118
  91. package/commands/spike.md +0 -181
  92. package/commands/status.md +0 -139
  93. package/commands/switch.md +0 -95
  94. package/commands/tasks.md +0 -189
  95. package/commands/triage.md +0 -160
  96. package/hooks/scripts/fail-tracker.sh +0 -31
package/commands/qa.md DELETED
@@ -1,118 +0,0 @@
1
- ---
2
- name: qa
3
- description: Real-browser QA — run user flows with chrome-devtools MCP, capturing bugs / performance / accessibility. Dispatches flow-qa-engineer (Oliver).
4
- argument-hint: "[spec-name] [--url=<dev-url>]"
5
- allowed-tools: [Read, Write, Bash, Task, WebFetch]
6
- ---
7
-
8
- # Flow QA — Real-Browser Testing
9
-
10
- Dispatches `flow-qa-engineer` (Oliver) to run user flows in real Chrome using **chrome-devtools MCP**.
11
-
12
- ## Step 1: Preflight check
13
-
14
- ```bash
15
- [ ! -d ".flow" ] && { echo "✗ Not a CurDX-Flow project"; exit 1; }
16
-
17
- ARGS="$ARGUMENTS"
18
- URL=""
19
- case "$ARGS" in
20
- *--url=*)
21
- URL=$(echo "$ARGS" | grep -oE -- '--url=[^[:space:]]+' | cut -d= -f2)
22
- ;;
23
- esac
24
- SPEC_NAME=$(echo "$ARGS" | sed 's/--url=[^ ]*//g' | xargs)
25
- [ -z "$SPEC_NAME" ] && SPEC_NAME=$(cat .flow/.active-spec 2>/dev/null)
26
- [ -z "$SPEC_NAME" ] && { echo "✗ No active spec"; exit 1; }
27
- ```
28
-
29
- ## Step 2: Detect chrome-devtools MCP
30
-
31
- ```bash
32
- # If MCP is not up, flow-qa-engineer will fall back to static QA
33
- # Do not block here; the agent will handle it
34
- ```
35
-
36
- ## Step 3: Confirm dev server URL
37
-
38
- If `--url` is not given, ask:
39
- ```
40
- AskUserQuestion:
41
- question: "What is your dev server URL?"
42
- options:
43
- - http://localhost:3000 (common)
44
- - http://localhost:5173 (Vite)
45
- - Other (custom)
46
- ```
47
-
48
- ## Step 4: Dispatch Oliver
49
-
50
- ```
51
- Task:
52
- subagent_type: general-purpose
53
- description: "QA: $SPEC_NAME"
54
- prompt: |
55
- You are the flow-qa-engineer agent (Oliver). Full definition:
56
- ${CLAUDE_PLUGIN_ROOT}/agents/flow-qa-engineer.md
57
-
58
- Target:
59
- spec_name: $SPEC_NAME
60
- URL: $URL
61
-
62
- Prerequisites:
63
- - .flow/specs/$SPEC_NAME/requirements.md (AC list)
64
- - .flow/specs/$SPEC_NAME/design.md (error paths + NFR)
65
-
66
- Workflow:
67
- 1. Detect chrome-devtools MCP (mcp__chrome-devtools__*)
68
- - Available → real-browser QA
69
- - Unavailable → static QA, clearly inform the user
70
- 2. Run the happy path (once per AC)
71
- 3. Run edge cases (at least 4 of the 7 categories in edge-case-gate)
72
- 4. Performance trace (LCP / INP / CLS)
73
- 5. Accessibility scan
74
- 6. Save screenshots to .flow/specs/$SPEC_NAME/qa-screenshots/
75
- 7. Generate .flow/specs/$SPEC_NAME/qa-report.md
76
-
77
- Return to me:
78
- - Bug count (categorized by severity)
79
- - Performance data (measured, not estimated)
80
- - Accessibility warnings
81
- - Recommended next steps
82
- ```
83
-
84
- ## Step 5: Read + report
85
-
86
- ```bash
87
- REPORT=".flow/specs/$SPEC_NAME/qa-report.md"
88
- [ ! -f "$REPORT" ] && { echo "⚠ QA report was not generated"; exit 1; }
89
-
90
- HIGH_BUGS=$(grep -c "\[high\]" "$REPORT" || echo 0)
91
- MED_BUGS=$(grep -c "\[medium\]" "$REPORT" || echo 0)
92
- LOW_BUGS=$(grep -c "\[low\]" "$REPORT" || echo 0)
93
- ```
94
-
95
- ## Step 6: Output to user
96
-
97
- ```
98
- 🔬 QA complete: $SPEC_NAME
99
-
100
- Findings:
101
- [high]: $HIGH_BUGS
102
- [medium]: $MED_BUGS
103
- [low]: $LOW_BUGS
104
-
105
- Report: .flow/specs/$SPEC_NAME/qa-report.md
106
- Screenshots: .flow/specs/$SPEC_NAME/qa-screenshots/
107
-
108
- Next steps:
109
- - Fix high-severity bugs → /curdx-flow:implement --task=QA-fix
110
- - Or add tasks to Phase 3.X in tasks.md
111
- - Retest: /curdx-flow:qa
112
- ```
113
-
114
- ## Error recovery
115
-
116
- - chrome-devtools MCP not installed → recommend `/curdx-flow:install-deps` or `claude mcp add chrome-devtools`
117
- - Dev server not running → prompt the user to start it and rerun
118
- - URL not accessible → prompt to check (`curl -I $URL`)
@@ -1,146 +0,0 @@
1
- ---
2
- name: requirements
3
- description: Run the requirements stage — dispatch the flow-product-designer agent to generate user stories + FR/NFR, producing requirements.md
4
- argument-hint: "[spec-name]"
5
- allowed-tools: [Read, Write, Bash, Task, AskUserQuestion]
6
- ---
7
-
8
- # Requirements Stage
9
-
10
- Dispatch the `flow-product-designer` agent to translate research directions into user stories.
11
-
12
- ## Step 1: Resolve spec + preflight checks
13
-
14
- ```bash
15
- SPEC_NAME="${ARGUMENTS:-$(cat .flow/.active-spec 2>/dev/null)}"
16
-
17
- [ -z "$SPEC_NAME" ] && { echo "❌ Run /curdx-flow:start first"; exit 1; }
18
- [ ! -f ".flow/specs/$SPEC_NAME/research.md" ] && {
19
- echo "❌ research.md missing. Run /curdx-flow:research first"
20
- exit 1
21
- }
22
- ```
23
-
24
- Verify the status of research:
25
-
26
- ```bash
27
- python3 -c "
28
- import re
29
- fm = open('.flow/specs/$SPEC_NAME/research.md').read()[:500]
30
- m = re.search(r'status:\s*(\w+)', fm)
31
- status = m.group(1) if m else 'unknown'
32
- if status not in ('completed', 'approved'):
33
- print(f'⚠ research status: {status}')
34
- print('Recommend completing the research stage before continuing')
35
- "
36
- ```
37
-
38
- ## Step 2: Open question check
39
-
40
- If research.md lists open questions but no user answers are visible, prompt:
41
-
42
- ```
43
- ⚠ research.md has unanswered open questions:
44
- Q1: ...
45
- Q2: ...
46
-
47
- You can:
48
- 1. Answer the questions first (write them to STATE.md or state them), then run /curdx-flow:requirements
49
- 2. Let the agent continue based on reasonable assumptions (assumptions will be listed explicitly in requirements.md)
50
-
51
- Continue? (continue / answer / skip)
52
- ```
53
-
54
- Use AskUserQuestion.
55
-
56
- ## Step 3: Update state + dispatch agent
57
-
58
- ```python
59
- # Mark in_progress
60
- import json
61
- s = json.load(open(f'.flow/specs/{SPEC_NAME}/.state.json'))
62
- s.setdefault('phase_status',{})['requirements']='in_progress'
63
- s['phase']='requirements'
64
- json.dump(s, open(f'.flow/specs/{SPEC_NAME}/.state.json','w'), indent=2, ensure_ascii=False)
65
- ```
66
-
67
- Task dispatch:
68
-
69
- ```
70
- Task:
71
- subagent_type: general-purpose
72
- description: "Requirements design $SPEC_NAME"
73
- prompt: |
74
- You are the flow-product-designer agent. Full definition at:
75
- ${CLAUDE_PLUGIN_ROOT}/agents/flow-product-designer.md
76
-
77
- Prerequisite files:
78
- - .flow/specs/$SPEC_NAME/research.md (must read)
79
- - .flow/PROJECT.md
80
- - .flow/CONTEXT.md
81
-
82
- Template:
83
- ${CLAUDE_PLUGIN_ROOT}/templates/requirements.md.tmpl
84
-
85
- Output:
86
- .flow/specs/$SPEC_NAME/requirements.md
87
-
88
- Workflow:
89
- 1. Read research.md to understand recommended directions
90
- 2. Generate user stories (US-NN) — at least 2
91
- 3. At least 3 acceptance criteria per US (AC-X.Y), must cover happy path + edges + errors
92
- 4. Extract FR (functional requirements) + NFR (at least performance and security)
93
- 5. Explicit Out of Scope (at least 3 items)
94
- 6. List open questions (if user decisions are needed)
95
- 7. Update .state.json and .progress.md
96
-
97
- If multiple reasonable interpretations exist, you MUST AskUserQuestion — do not silently pick a direction.
98
-
99
- Success criteria:
100
- - At least 2 US, all from the user's perspective (non-technical language)
101
- - Each AC testable (can be written as curl / assert)
102
- - At least 3 FR, NFR covers at least P and S
103
- - Out of Scope lists at least 3 items
104
-
105
- Return a brief when finished.
106
- ```
107
-
108
- ## Step 4: Output verification
109
-
110
- ```bash
111
- REQ_FILE=".flow/specs/$SPEC_NAME/requirements.md"
112
-
113
- # Count US / FR / AC
114
- US_COUNT=$(grep -c "^### US-" "$REQ_FILE" || echo 0)
115
- FR_COUNT=$(grep -c "^- \*\*FR-" "$REQ_FILE" || echo 0)
116
- AC_COUNT=$(grep -c "^- AC-" "$REQ_FILE" || echo 0)
117
-
118
- echo " US: $US_COUNT, FR: $FR_COUNT, AC: $AC_COUNT"
119
-
120
- # Minimum requirements
121
- [ "$US_COUNT" -lt 2 ] && echo "⚠ Fewer than 2 user stories"
122
- [ "$FR_COUNT" -lt 3 ] && echo "⚠ Fewer than 3 functional requirements"
123
- [ "$AC_COUNT" -lt 6 ] && echo "⚠ Fewer than 6 acceptance criteria (average < 3 per US)"
124
- ```
125
-
126
- ## Step 5: Output
127
-
128
- ```
129
- ✓ requirements stage complete
130
-
131
- File: .flow/specs/$SPEC_NAME/requirements.md
132
- User stories: N
133
- Functional reqs: M
134
- Acceptance criteria: K
135
-
136
- Next steps:
137
- - Review requirements.md
138
- - If the agent listed open questions, answer them before entering design
139
- - /curdx-flow:design — enter design stage
140
- ```
141
-
142
- ## Error recovery
143
-
144
- - research.md missing → prompt to run /curdx-flow:research first
145
- - Agent times out → requirements may be too complex, consider splitting into an Epic (/curdx-flow:triage, see Phase 4)
146
- - Agent made a major interpretation without asking the user → the user can annotate requirements.md and request a correction
@@ -1,141 +0,0 @@
1
- ---
2
- name: research
3
- description: Run the research stage — dispatch the flow-researcher agent to deeply explore the problem, producing research.md
4
- argument-hint: "[spec-name]"
5
- allowed-tools: [Read, Write, Bash, Task]
6
- ---
7
-
8
- # Research Stage
9
-
10
- Dispatch the `flow-researcher` agent to complete the research stage of a spec.
11
-
12
- ## Step 1: Resolve target spec
13
-
14
- ```bash
15
- # Use the argument if provided; otherwise use the active spec
16
- if [ -n "$ARGUMENTS" ]; then
17
- SPEC_NAME="$ARGUMENTS"
18
- else
19
- SPEC_NAME=$(cat .flow/.active-spec 2>/dev/null)
20
- fi
21
-
22
- if [ -z "$SPEC_NAME" ] || [ ! -d ".flow/specs/$SPEC_NAME" ]; then
23
- echo "❌ Spec does not exist. Use /curdx-flow:start <name> \"<goal>\" to create a new spec"
24
- exit 1
25
- fi
26
- ```
27
-
28
- ## Step 2: Preflight checks
29
-
30
- ```bash
31
- # The research stage has no prerequisites; just verify the spec directory is ready
32
- if [ ! -f ".flow/specs/$SPEC_NAME/.state.json" ]; then
33
- echo "❌ Spec state file missing. Run /curdx-flow:start to re-initialize"
34
- exit 1
35
- fi
36
- ```
37
-
38
- If research.md already exists with status=completed:
39
- - Ask the user whether to overwrite (AskUserQuestion)
40
- - Default: do not overwrite; suggest `/curdx-flow:requirements` to move to the next step
41
-
42
- ## Step 3: Update state
43
-
44
- ```bash
45
- # Mark the research stage as in_progress
46
- python3 <<'EOF'
47
- import json
48
- from pathlib import Path
49
- state_file = Path(f".flow/specs/$SPEC_NAME/.state.json")
50
- state = json.loads(state_file.read_text())
51
- state.setdefault("phase_status", {})["research"] = "in_progress"
52
- state["phase"] = "research"
53
- state_file.write_text(json.dumps(state, indent=2, ensure_ascii=False))
54
- EOF
55
- ```
56
-
57
- ## Step 4: Dispatch the flow-researcher agent
58
-
59
- Using the Task tool:
60
-
61
- ```
62
- Task:
63
- subagent_type: general-purpose
64
- description: "Research $SPEC_NAME"
65
- prompt: |
66
- You are the flow-researcher agent. Your full responsibilities and workflow are at:
67
- ${CLAUDE_PLUGIN_ROOT}/agents/flow-researcher.md
68
-
69
- Spec prerequisites to read:
70
- - .flow/specs/$SPEC_NAME/.state.json (goal + state)
71
- - .flow/PROJECT.md
72
- - .flow/CONTEXT.md
73
- - .flow/STATE.md
74
-
75
- Template (you must populate and write to research.md):
76
- ${CLAUDE_PLUGIN_ROOT}/templates/research.md.tmpl
77
-
78
- Output file:
79
- .flow/specs/$SPEC_NAME/research.md
80
-
81
- Workflow requirements:
82
- 1. Load context (Step 1)
83
- 2. Call mcp__claude_mem__search to retrieve history (Step 2)
84
- 3. sequential-thinking 5+ rounds for problem understanding (Step 3)
85
- 4. Glob/Grep to scan existing code (Step 4)
86
- 5. context7 to look up the latest docs for 2-3 technical options (Step 5)
87
- 6. WebSearch to supplement (Step 6, if needed)
88
- 7. Write research.md (based on the template, replacing placeholders)
89
- 8. Update .state.json and .progress.md (Step 8)
90
-
91
- Success criteria:
92
- - research.md exists and matches the template structure
93
- - Problem understanding section has 3+ explicit assumptions
94
- - 2-3 technical options, each referencing context7 results
95
- - Code analysis includes actual file paths found
96
- - Recommended direction + rationale is clear
97
- - At least 1 open question (unless the research is fully unambiguous)
98
-
99
- Forbidden:
100
- - Writing library APIs from memory
101
- - Skipping context7 queries
102
- - sequentialthinking < 5 rounds
103
- - Creating any new files outside research.md
104
-
105
- When done, return a brief (findings, recommendations, open questions).
106
- ```
107
-
108
- ## Step 5: After the agent completes
109
-
110
- Read the agent-generated research.md and verify that key sections exist:
111
-
112
- ```bash
113
- for section in "Problem Understanding" "Technical Options" "Existing Code Analysis" "Feasibility" "Recommended Direction"; do
114
- if ! grep -q "$section" ".flow/specs/$SPEC_NAME/research.md" 2>/dev/null; then
115
- echo "⚠ research.md missing section: $section"
116
- fi
117
- done
118
- ```
119
-
120
- If any section is missing, emit a warning but do not block (the user decides whether to re-run).
121
-
122
- ## Step 6: Output suggestions
123
-
124
- ```
125
- ✓ research stage complete
126
-
127
- File: .flow/specs/$SPEC_NAME/research.md
128
-
129
- Next steps:
130
- - Read research.md and confirm the recommended direction is reasonable
131
- - Answer the open questions listed by the agent (if any)
132
- - /curdx-flow:requirements — enter the requirements stage
133
-
134
- To re-research, just run /curdx-flow:research again
135
- ```
136
-
137
- ## Error recovery
138
-
139
- - research.md generation fails → check MCP status (/curdx-flow:doctor), retry
140
- - Agent exceeds 40 turns → the research is too complex, narrow the target scope
141
- - context7 unavailable → the agent falls back to WebSearch, but must explicitly inform the user
@@ -1,109 +0,0 @@
1
- ---
2
- name: security
3
- description: Security audit — OWASP Top 10 + STRIDE + dependency CVEs. Dispatches flow-security-auditor (Serena).
4
- argument-hint: "[spec-name]"
5
- allowed-tools: [Read, Write, Bash, Task, Grep, Glob, WebSearch]
6
- ---
7
-
8
- # Flow Security — Security Audit
9
-
10
- @${CLAUDE_PLUGIN_ROOT}/gates/security-gate.md
11
-
12
- Dispatches `flow-security-auditor` (Serena) to perform a full security audit.
13
-
14
- ## When to use
15
-
16
- - Specs touching authentication / authorization / payments / PII
17
- - Pre-release gate
18
- - After adding new API endpoints
19
- - After dependency upgrades
20
-
21
- ## Step 1: Preflight
22
-
23
- ```bash
24
- SPEC_NAME="${ARGUMENTS:-$(cat .flow/.active-spec 2>/dev/null)}"
25
-
26
- # Can still run without an active spec (global security scan)
27
- if [ -z "$SPEC_NAME" ]; then
28
- echo "ℹ No active spec; running a security scan across the entire codebase"
29
- SPEC_NAME="_global"
30
- fi
31
- ```
32
-
33
- ## Step 2: Dispatch Serena
34
-
35
- ```
36
- Task:
37
- subagent_type: general-purpose
38
- description: "Security Audit: $SPEC_NAME"
39
- prompt: |
40
- You are the flow-security-auditor agent (Serena). Full definition:
41
- ${CLAUDE_PLUGIN_ROOT}/agents/flow-security-auditor.md
42
-
43
- Audit scope:
44
- $([ "$SPEC_NAME" = "_global" ] && echo "Entire codebase" || echo ".flow/specs/$SPEC_NAME/ + related code")
45
-
46
- Prerequisites:
47
- - OWASP Top 10 (2021) checklist
48
- - STRIDE threat modeling
49
- - package.json (npm audit)
50
- - Project auth / data-layer code
51
-
52
- Workflow:
53
- 1. Scan OWASP 10 categories in parallel
54
- - A01: Broken access control
55
- - A02: Cryptography
56
- - A03: Injection
57
- - A04: Insecure Design
58
- - A05: Misconfiguration
59
- - A06: CVE (npm audit)
60
- - A07: Auth failures
61
- - A08: Integrity
62
- - A09: Logging
63
- - A10: SSRF
64
- 2. STRIDE threat modeling (≥6 rounds of sequential-thinking)
65
- 3. context7 to check CVEs for critical dependencies
66
- 4. Manual review of suspicious areas
67
- 5. Generate security-audit.md
68
-
69
- Output:
70
- - .flow/specs/$SPEC_NAME/security-audit.md (or .flow/security-audit-global.md)
71
-
72
- Return to me:
73
- - Findings classified by risk (high/medium/low)
74
- - Number of must-fix items
75
- - Recommended order
76
- ```
77
-
78
- ## Step 3: Output
79
-
80
- ```bash
81
- REPORT=".flow/specs/$SPEC_NAME/security-audit.md"
82
- [ "$SPEC_NAME" = "_global" ] && REPORT=".flow/security-audit-global.md"
83
-
84
- HIGH=$(grep -c "\[High\]" "$REPORT" || echo 0)
85
- MED=$(grep -c "\[Medium\]" "$REPORT" || echo 0)
86
- LOW=$(grep -c "\[Low\]" "$REPORT" || echo 0)
87
- ```
88
-
89
- ```
90
- 🔒 Security Audit complete
91
-
92
- Risk distribution:
93
- High: $HIGH (must fix, blocks release)
94
- Medium: $MED (recommended to fix)
95
- Low: $LOW (as needed)
96
-
97
- Report: $REPORT
98
-
99
- Next steps:
100
- - High risk → /curdx-flow:implement adds fix tasks
101
- - Or STATE.md explicitly waives + commits to a fix timeline
102
- - After fixing → /curdx-flow:security to re-audit
103
- ```
104
-
105
- ## Error recovery
106
-
107
- - npm audit requires package.json → non-Node projects skip this class
108
- - context7 unavailable → use WebSearch to supplement CVE queries
109
- - No active spec → global scan mode
@@ -1,118 +0,0 @@
1
- ---
2
- name: sketch
3
- description: UI design sketch — invokes the frontend-design skill to generate multiple HTML variants. Dispatches flow-ux-designer (Emma).
4
- argument-hint: "[spec-name] [\"<description>\"]"
5
- allowed-tools: [Read, Write, Bash, Task, WebSearch, AskUserQuestion]
6
- ---
7
-
8
- # Flow Sketch — UI Sketch
9
-
10
- Dispatches `flow-ux-designer` (Emma) to use the **frontend-design skill** to generate tasteful UI variants.
11
-
12
- ## Step 1: Parse arguments
13
-
14
- ```bash
15
- ARGS="$ARGUMENTS"
16
- # The first word may be spec-name (if such a spec exists); otherwise it is the description
17
-
18
- SPEC_NAME=""
19
- DESCRIPTION=""
20
-
21
- FIRST_WORD=$(echo "$ARGS" | awk '{print $1}')
22
- if [ -d ".flow/specs/$FIRST_WORD" ]; then
23
- SPEC_NAME="$FIRST_WORD"
24
- DESCRIPTION=$(echo "$ARGS" | sed "s/^$FIRST_WORD//" | sed 's/^["\x27]//;s/["\x27]$//' | xargs)
25
- else
26
- DESCRIPTION=$(echo "$ARGS" | sed 's/^["\x27]//;s/["\x27]$//')
27
- fi
28
-
29
- [ -z "$SPEC_NAME" ] && SPEC_NAME=$(cat .flow/.active-spec 2>/dev/null)
30
- ```
31
-
32
- ## Step 2: Preflight checks
33
-
34
- ```bash
35
- # Requires at least an active spec (to read CONTEXT.md)
36
- if [ -z "$SPEC_NAME" ] && [ -z "$DESCRIPTION" ]; then
37
- echo "Usage: /curdx-flow:sketch [spec] \"<description of what to sketch>\""
38
- echo "Example: /curdx-flow:sketch \"login form\""
39
- exit 1
40
- fi
41
-
42
- # Check frontend-design skill (if unavailable, fall back)
43
- ```
44
-
45
- ## Step 3: Ask for the variant count
46
-
47
- ```
48
- AskUserQuestion:
49
- Question: "How many variants to generate?"
50
- Options:
51
- - 2 (compare minimalist vs distinctive)
52
- - 3 (recommended — adds a dense variant)
53
- - Custom
54
- ```
55
-
56
- ## Step 4: Dispatch Emma
57
-
58
- ```
59
- Task:
60
- subagent_type: general-purpose
61
- description: "UI Sketch: $DESCRIPTION"
62
- prompt: |
63
- You are the flow-ux-designer agent (Emma). Full definition:
64
- ${CLAUDE_PLUGIN_ROOT}/agents/flow-ux-designer.md
65
-
66
- Task:
67
- - Description: $DESCRIPTION
68
- - Spec: $SPEC_NAME (optional)
69
- - Variant count: $VARIANT_COUNT
70
-
71
- Prerequisites:
72
- - .flow/CONTEXT.md (user UI preferences)
73
- - .flow/specs/$SPEC_NAME/requirements.md (if present)
74
- - .flow/specs/$SPEC_NAME/design.md (if present)
75
- - .flow/specs/$SPEC_NAME/ui-research.md (if /curdx-flow:ui-research has been run)
76
-
77
- Workflow:
78
- 1. Detect the frontend-design skill
79
- - Available: activate it to guide design choices
80
- - Unavailable: use Tailwind + shadcn defaults and explicitly announce the fallback
81
- 2. Read user preferences (CONTEXT.md)
82
- 3. Generate N variant HTMLs (each a single file, zero dependencies, CDN Tailwind)
83
- 4. Generate an index.html comparison page (iframes side by side)
84
- 5. Generate decisions.md explaining the rationale for each variant
85
-
86
- Output directory:
87
- .flow/specs/$SPEC_NAME/ui-sketch/ (or .flow/sketches/<slug>/)
88
-
89
- Return to me:
90
- - The list of generated variants + what distinguishes each
91
- - Recommended direction (based on CONTEXT.md)
92
- - Preview command (how to open index.html)
93
- ```
94
-
95
- ## Step 5: Output
96
-
97
- ```
98
- 🎨 Sketch complete
99
-
100
- Variants:
101
- variant-a-minimalist.html (system font + whitespace)
102
- variant-b-distinctive.html (custom font + micro animations)
103
- variant-c-dense.html (information-dense — suited for admin)
104
-
105
- Decisions: .flow/specs/<name>/ui-sketch/decisions.md
106
- Comparison page: open .flow/specs/<name>/ui-sketch/index.html
107
-
108
- Next steps:
109
- - Pick a variant → tell me → I'll convert the HTML into production components
110
- - Or /curdx-flow:qa to verify interactions in the browser
111
- - Clone another reference → /curdx-flow:ui-research <feature>
112
- ```
113
-
114
- ## Error recovery
115
-
116
- - frontend-design skill not installed → Emma falls back and announces it
117
- - Variants are too similar → ask the user to re-run with more specific guidance
118
- - No spec and no description → at least one must be supplied