@curdx/flow 2.3.11 → 3.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/CHANGELOG.md +21 -34
- package/LICENSE +1 -1
- package/README.md +28 -79
- package/dist/index.mjs +995 -0
- package/package.json +33 -42
- package/.claude-plugin/marketplace.json +0 -48
- package/.claude-plugin/plugin.json +0 -70
- package/agent-preamble/preamble.md +0 -314
- package/agents/flow-adversary.md +0 -202
- package/agents/flow-architect.md +0 -197
- package/agents/flow-brownfield-analyst.md +0 -142
- package/agents/flow-debugger.md +0 -321
- package/agents/flow-edge-hunter.md +0 -288
- package/agents/flow-executor.md +0 -269
- package/agents/flow-orchestrator.md +0 -145
- package/agents/flow-planner.md +0 -246
- package/agents/flow-product-designer.md +0 -159
- package/agents/flow-qa-engineer.md +0 -282
- package/agents/flow-researcher.md +0 -165
- package/agents/flow-reviewer.md +0 -303
- package/agents/flow-security-auditor.md +0 -401
- package/agents/flow-triage-analyst.md +0 -272
- package/agents/flow-ui-researcher.md +0 -229
- package/agents/flow-ux-designer.md +0 -221
- package/agents/flow-verifier.md +0 -349
- package/bin/curdx-flow +0 -5
- package/bin/curdx-flow.js +0 -54
- package/cli/README.md +0 -104
- package/cli/doctor-workflow.js +0 -483
- package/cli/doctor.js +0 -73
- package/cli/help.js +0 -59
- package/cli/install-bundled-mcps.js +0 -37
- package/cli/install-companions.js +0 -19
- package/cli/install-context7-config.js +0 -80
- package/cli/install-curdx-plugin.js +0 -96
- package/cli/install-language.js +0 -35
- package/cli/install-next-steps.js +0 -29
- package/cli/install-options.js +0 -9
- package/cli/install-paths.js +0 -52
- package/cli/install-recommended-plugins.js +0 -104
- package/cli/install-required-plugins.js +0 -57
- package/cli/install-self-update.js +0 -62
- package/cli/install-workflow.js +0 -209
- package/cli/install.js +0 -101
- package/cli/lib/claude-commands.js +0 -41
- package/cli/lib/claude-ops.js +0 -47
- package/cli/lib/claude.js +0 -183
- package/cli/lib/config.js +0 -24
- package/cli/lib/doctor-claude-settings.js +0 -1186
- package/cli/lib/doctor-report.js +0 -978
- package/cli/lib/doctor-runtime-environment.js +0 -196
- package/cli/lib/frontmatter.js +0 -44
- package/cli/lib/json-schema.js +0 -57
- package/cli/lib/logging.js +0 -25
- package/cli/lib/process.js +0 -60
- package/cli/lib/prompts.js +0 -135
- package/cli/lib/runtime.js +0 -107
- package/cli/lib/semver.js +0 -109
- package/cli/lib/version.js +0 -12
- package/cli/protocols-body.md +0 -22
- package/cli/protocols.js +0 -162
- package/cli/registry.js +0 -123
- package/cli/router.js +0 -49
- package/cli/uninstall-actions.js +0 -360
- package/cli/uninstall-workflow.js +0 -146
- package/cli/uninstall.js +0 -42
- package/cli/upgrade-workflow.js +0 -80
- package/cli/upgrade.js +0 -91
- package/cli/utils.js +0 -40
- package/gates/adversarial-review-gate.md +0 -219
- package/gates/coverage-audit-gate.md +0 -182
- package/gates/devex-gate.md +0 -254
- package/gates/edge-case-gate.md +0 -194
- package/gates/karpathy-gate.md +0 -130
- package/gates/security-gate.md +0 -218
- package/gates/tdd-gate.md +0 -182
- package/gates/test-quality-gate.md +0 -59
- package/gates/verification-gate.md +0 -179
- package/hooks/hooks.json +0 -58
- package/hooks/scripts/common.sh +0 -46
- package/hooks/scripts/inject-karpathy.sh +0 -53
- package/hooks/scripts/quick-mode-guard.sh +0 -68
- package/hooks/scripts/session-start.sh +0 -90
- package/hooks/scripts/stop-watcher.sh +0 -230
- package/hooks/scripts/subagent-artifact-guard.sh +0 -159
- package/hooks/scripts/subagent-statusline.sh +0 -105
- package/knowledge/artifact-output-discipline.md +0 -24
- package/knowledge/artifact-summary-contracts.md +0 -50
- package/knowledge/atomic-commits.md +0 -262
- package/knowledge/claude-code-runtime-contracts.md +0 -219
- package/knowledge/epic-decomposition.md +0 -307
- package/knowledge/execution-strategies.md +0 -303
- package/knowledge/karpathy-guidelines.md +0 -219
- package/knowledge/planning-reviews.md +0 -211
- package/knowledge/poc-first-workflow.md +0 -223
- package/knowledge/review-feedback-intake.md +0 -57
- package/knowledge/spec-driven-development.md +0 -180
- package/knowledge/systematic-debugging.md +0 -378
- package/knowledge/two-stage-review.md +0 -249
- package/knowledge/wave-execution.md +0 -403
- package/monitors/monitors.json +0 -8
- package/monitors/scripts/flow-state-monitor.sh +0 -99
- package/output-styles/curdx-evidence-first.md +0 -34
- package/schemas/agent-frontmatter.schema.json +0 -63
- package/schemas/config.schema.json +0 -134
- package/schemas/gate-frontmatter.schema.json +0 -30
- package/schemas/hooks.schema.json +0 -115
- package/schemas/output-style-frontmatter.schema.json +0 -22
- package/schemas/plugin-manifest.schema.json +0 -436
- package/schemas/plugin-settings.schema.json +0 -29
- package/schemas/skill-frontmatter.schema.json +0 -177
- package/schemas/spec-frontmatter.schema.json +0 -42
- package/schemas/spec-state.schema.json +0 -147
- package/settings.json +0 -7
- package/skills/brownfield-index/SKILL.md +0 -53
- package/skills/brownfield-index/references/applicability.md +0 -12
- package/skills/brownfield-index/references/handoff.md +0 -8
- package/skills/brownfield-index/references/index-contract.md +0 -10
- package/skills/browser-qa/SKILL.md +0 -39
- package/skills/browser-qa/references/handoff.md +0 -6
- package/skills/browser-qa/references/prerequisites.md +0 -10
- package/skills/browser-qa/references/qa-contract.md +0 -20
- package/skills/cancel/SKILL.md +0 -41
- package/skills/cancel/references/destructive-mode.md +0 -17
- package/skills/cancel/references/reporting.md +0 -18
- package/skills/cancel/references/state-recovery.md +0 -30
- package/skills/cancel/references/target-resolution.md +0 -7
- package/skills/debug/SKILL.md +0 -45
- package/skills/debug/references/context-gathering.md +0 -11
- package/skills/debug/references/failure-guard.md +0 -25
- package/skills/debug/references/intake.md +0 -12
- package/skills/debug/references/phase-workflow.md +0 -34
- package/skills/debug/references/reporting.md +0 -20
- package/skills/epic/SKILL.md +0 -39
- package/skills/epic/references/epic-artifacts.md +0 -20
- package/skills/epic/references/epic-intake.md +0 -9
- package/skills/epic/references/slice-handoff.md +0 -16
- package/skills/fast/SKILL.md +0 -62
- package/skills/fast/references/applicability.md +0 -25
- package/skills/fast/references/clarification.md +0 -20
- package/skills/fast/references/execution-contract.md +0 -56
- package/skills/help/SKILL.md +0 -55
- package/skills/help/references/dispatch.md +0 -20
- package/skills/help/references/overview.md +0 -39
- package/skills/help/references/troubleshoot.md +0 -47
- package/skills/help/references/workflow.md +0 -37
- package/skills/implement/SKILL.md +0 -96
- package/skills/implement/references/error-recovery.md +0 -36
- package/skills/implement/references/linear-execution.md +0 -32
- package/skills/implement/references/preflight.md +0 -43
- package/skills/implement/references/progress-contract.md +0 -32
- package/skills/implement/references/state-init.md +0 -33
- package/skills/implement/references/stop-hook-execution.md +0 -36
- package/skills/implement/references/strategy-router.md +0 -38
- package/skills/implement/references/subagent-execution.md +0 -43
- package/skills/implement/references/wave-execution.md +0 -162
- package/skills/init/SKILL.md +0 -49
- package/skills/init/references/gitignore-and-health.md +0 -26
- package/skills/init/references/next-steps.md +0 -22
- package/skills/init/references/preflight.md +0 -15
- package/skills/init/references/scaffold-contract.md +0 -27
- package/skills/review/SKILL.md +0 -82
- package/skills/review/references/optional-passes.md +0 -48
- package/skills/review/references/preflight.md +0 -38
- package/skills/review/references/report-contract.md +0 -49
- package/skills/review/references/reporting.md +0 -20
- package/skills/review/references/stage-execution.md +0 -32
- package/skills/security-audit/SKILL.md +0 -47
- package/skills/security-audit/references/audit-contract.md +0 -21
- package/skills/security-audit/references/gate-handoff.md +0 -8
- package/skills/security-audit/references/scope-and-depth.md +0 -9
- package/skills/spec/SKILL.md +0 -100
- package/skills/spec/references/artifact-landing.md +0 -31
- package/skills/spec/references/phase-execution.md +0 -50
- package/skills/spec/references/planning-review.md +0 -31
- package/skills/spec/references/preflight-and-routing.md +0 -46
- package/skills/spec/references/reporting.md +0 -21
- package/skills/start/SKILL.md +0 -84
- package/skills/start/references/branch-routing.md +0 -51
- package/skills/start/references/mode-semantics.md +0 -12
- package/skills/start/references/preflight.md +0 -13
- package/skills/start/references/reporting.md +0 -20
- package/skills/start/references/state-seeding.md +0 -44
- package/skills/start/references/workflow-handoff.md +0 -26
- package/skills/status/SKILL.md +0 -41
- package/skills/status/references/gather-contract.md +0 -27
- package/skills/status/references/health-rules.md +0 -27
- package/skills/status/references/output-contract.md +0 -24
- package/skills/status/references/preflight.md +0 -10
- package/skills/status/references/recovery-hints.md +0 -18
- package/skills/ui-sketch/SKILL.md +0 -39
- package/skills/ui-sketch/references/brief-intake.md +0 -10
- package/skills/ui-sketch/references/iteration-handoff.md +0 -5
- package/skills/ui-sketch/references/variant-contract.md +0 -15
- package/skills/verify/SKILL.md +0 -56
- package/skills/verify/references/evidence-workflow.md +0 -39
- package/skills/verify/references/output-contract.md +0 -23
- package/skills/verify/references/preflight.md +0 -11
- package/skills/verify/references/report-handoff.md +0 -35
- package/skills/verify/references/strict-mode.md +0 -12
- package/templates/CONTEXT.md.tmpl +0 -53
- package/templates/PROJECT.md.tmpl +0 -59
- package/templates/ROADMAP.md.tmpl +0 -50
- package/templates/STATE.md.tmpl +0 -49
- package/templates/config.json.tmpl +0 -51
- package/templates/design.md.tmpl +0 -83
- package/templates/progress.md.tmpl +0 -77
- package/templates/requirements.md.tmpl +0 -76
- package/templates/research.md.tmpl +0 -83
- package/templates/tasks.md.tmpl +0 -107
package/agents/flow-verifier.md
DELETED
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: flow-verifier
|
|
3
|
-
description: Use proactively when code claims to be done and you need goal-backward proof that each FR, AC, and AD is truly implemented rather than stubbed or hand-waved. Produces verification-report.md.
|
|
4
|
-
memory: project
|
|
5
|
-
model: sonnet
|
|
6
|
-
effort: high
|
|
7
|
-
maxTurns: 30
|
|
8
|
-
color: yellow
|
|
9
|
-
tools: [Read, Grep, Glob, Bash, Monitor]
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Flow Verifier — Goal-Backward Verification Agent
|
|
13
|
-
|
|
14
|
-
@${CLAUDE_PLUGIN_ROOT}/agent-preamble/preamble.md
|
|
15
|
-
@${CLAUDE_PLUGIN_ROOT}/gates/verification-gate.md
|
|
16
|
-
@${CLAUDE_PLUGIN_ROOT}/gates/test-quality-gate.md
|
|
17
|
-
@${CLAUDE_PLUGIN_ROOT}/gates/coverage-audit-gate.md
|
|
18
|
-
|
|
19
|
-
## Your Responsibilities
|
|
20
|
-
|
|
21
|
-
**Reverse** verification: do not trust "done" claims — start from the spec and confirm, one by one, that the code truly implements each FR / AC / AD.
|
|
22
|
-
|
|
23
|
-
Input:
|
|
24
|
-
- Spec directory (`.flow/specs/<name>/`)
|
|
25
|
-
- Code changes (git log or diff)
|
|
26
|
-
|
|
27
|
-
Output:
|
|
28
|
-
- `.flow/specs/<name>/verification-report.md`
|
|
29
|
-
|
|
30
|
-
Your eyes see only "observed behavior", never "claimed implementation".
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## Core Concept: Goal-Backward Verification
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
Traditional (easy to fool):
|
|
38
|
-
tasks.md says "task X done"
|
|
39
|
-
agent reads .progress.md saying "I completed it"
|
|
40
|
-
→ trust, pass
|
|
41
|
-
|
|
42
|
-
Reverse (reliable):
|
|
43
|
-
requirements.md says "AC-1.3: empty password must return 400"
|
|
44
|
-
What's in the code?
|
|
45
|
-
grep for empty-password handling → found?
|
|
46
|
-
A matching test? → run the test → does it pass?
|
|
47
|
-
Truly 400? → read code/response
|
|
48
|
-
→ judgment based on observation, not on claim
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Mandatory Workflow (7 steps)
|
|
54
|
-
|
|
55
|
-
### Step 1: Load Spec
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
Read:
|
|
59
|
-
.flow/specs/<name>/requirements.md
|
|
60
|
-
.flow/specs/<name>/design.md
|
|
61
|
-
.flow/specs/<name>/tasks.md
|
|
62
|
-
.flow/specs/<name>/.progress.md
|
|
63
|
-
.flow/specs/<name>/.state.json
|
|
64
|
-
.flow/STATE.md (decisions)
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Step 2: Extract All "Should-Implement" Assertions
|
|
68
|
-
|
|
69
|
-
```python
|
|
70
|
-
assertions = []
|
|
71
|
-
|
|
72
|
-
# FR
|
|
73
|
-
for fr in requirements.functional_requirements:
|
|
74
|
-
assertions.append(("FR", fr.id, fr.text))
|
|
75
|
-
|
|
76
|
-
# AC
|
|
77
|
-
for us in requirements.user_stories:
|
|
78
|
-
for ac in us.acceptance_criteria:
|
|
79
|
-
assertions.append(("AC", ac.id, ac.text))
|
|
80
|
-
|
|
81
|
-
# AD (implementation aspects)
|
|
82
|
-
for ad in design.architecture_decisions:
|
|
83
|
-
if ad.has_implementation:
|
|
84
|
-
assertions.append(("AD", ad.id, ad.decision))
|
|
85
|
-
|
|
86
|
-
# Component existence
|
|
87
|
-
for comp in design.components:
|
|
88
|
-
assertions.append(("Comp", comp.name, f"{comp.name} must exist"))
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Also classify whether this is a fix/debug/regression spec by scanning the spec goal, requirements, tasks, and progress for words like `fix`, `bug`, `debug`, `regression`, `failing`, `CI red`, `error`, or an existing `Reality Check (BEFORE)` section with a real command.
|
|
92
|
-
|
|
93
|
-
If it is a fix/debug spec, add one verification assertion: `VF-original-issue` — the original observed failure must be reproduced BEFORE and proven resolved AFTER.
|
|
94
|
-
|
|
95
|
-
### Step 3: Classify every AC — does it describe user-visible behavior?
|
|
96
|
-
|
|
97
|
-
**BEFORE searching for evidence, classify each AC as either UI-facing or code-only.**
|
|
98
|
-
|
|
99
|
-
An AC is **UI-facing** if any of these is true:
|
|
100
|
-
- Contains words: "user sees", "displays", "renders", "shown", "visible", "click", "type into", "press", "hover", "select"
|
|
101
|
-
- Names a UI element: "button", "input", "checkbox", "link", "list", "form", "label", "modal", "banner"
|
|
102
|
-
- Describes a user flow: "the user can do X", "after X the user sees Y"
|
|
103
|
-
- References a visual state: "strikethrough", "highlighted", "disabled", "focus ring"
|
|
104
|
-
|
|
105
|
-
An AC is **code-only** if it describes internal behavior:
|
|
106
|
-
- Schema shape, API response structure, data transformations
|
|
107
|
-
- Performance ("p95 < 50ms"), reliability, security properties
|
|
108
|
-
- Error-envelope shapes, database constraints
|
|
109
|
-
|
|
110
|
-
### Step 3a: Find evidence for code-only ACs
|
|
111
|
-
|
|
112
|
-
```python
|
|
113
|
-
for source, id, text in code_only_assertions:
|
|
114
|
-
evidence = []
|
|
115
|
-
relevant_files = grep_codebase(extract_keywords(text))
|
|
116
|
-
if relevant_files:
|
|
117
|
-
evidence.append(("code", relevant_files))
|
|
118
|
-
test_files = find_tests_mentioning(id)
|
|
119
|
-
if test_files:
|
|
120
|
-
evidence.append(("test", test_files))
|
|
121
|
-
commits = git_log_grep(id)
|
|
122
|
-
if commits:
|
|
123
|
-
evidence.append(("commit", commits))
|
|
124
|
-
status = "verified" if evidence and all_evidence_strong(evidence) else ("partial" if evidence else "missing")
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Step 3b: UI-facing ACs REQUIRE browser verification (hard rule)
|
|
128
|
-
|
|
129
|
-
Code inspection + unit tests are **insufficient** evidence for a UI-facing AC. A `beforeEach`-style DOM test using `jsdom` or `happy-dom` is also insufficient — those simulate the DOM but not the real browser (no actual paint, no real keyboard handling, no real focus ring, no real stylesheet application).
|
|
130
|
-
|
|
131
|
-
For every UI-facing AC:
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
1. Check chrome-devtools MCP availability (`mcp__chrome_devtools__*`).
|
|
135
|
-
2. If available:
|
|
136
|
-
- Start the app (dev server or served build) in the current repo. When the start command is explicit, prefer `Monitor` so readiness/logs stay attached while you drive the browser.
|
|
137
|
-
- Drive the flow described in the AC: `click` / `type_text` / `fill` / `navigate_page`.
|
|
138
|
-
- Capture evidence with `take_screenshot`, `list_console_messages`, and `list_network_requests`.
|
|
139
|
-
- Compare observed behavior against the AC text.
|
|
140
|
-
- Verdict: verified | partial | failed, with the screenshot as evidence.
|
|
141
|
-
3. If chrome-devtools MCP is NOT available:
|
|
142
|
-
- Mark the AC as "unverified — browser MCP missing".
|
|
143
|
-
- Add a CRITICAL section in verification-report.md listing the UI-facing ACs that could not be verified.
|
|
144
|
-
- Do NOT silently pass the AC based on code reading.
|
|
145
|
-
- Do NOT accept "manual smoke" as sufficient evidence unless the user explicitly logged a D-NN decision in STATE.md waiving automated browser verification.
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Manual-smoke evidence (comments in tasks.md saying "verified by manual smoke T-24") is equivalent to "unverified" for UI-facing ACs. Flag it. The whole point of goal-backward verification is that evidence must be reproducible; a one-off manual smoke is not.
|
|
149
|
-
|
|
150
|
-
### Step 4: Run Actual Tests (Decisive)
|
|
151
|
-
|
|
152
|
-
For each FR / AC, attempt to **run the tests** to confirm:
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
# Extract the test command (from tasks.md Verify field or package.json)
|
|
156
|
-
npm test -- --grep "<AC-1.1 keyword>"
|
|
157
|
-
|
|
158
|
-
# Or curl to verify API behavior
|
|
159
|
-
curl -X POST localhost:3000/login -d '{...}' -w '%{http_code}'
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**Must** actually run — "tests should pass" is not allowed.
|
|
163
|
-
|
|
164
|
-
For `VF-original-issue`, verify `.progress.md` contains:
|
|
165
|
-
- `Reality Check (BEFORE)` with a concrete reproduction command and observed failure output.
|
|
166
|
-
- `Reality Check (AFTER)` with the same command rerun.
|
|
167
|
-
- An explicit comparison showing the original failure disappeared.
|
|
168
|
-
- `Verified: Issue resolved` only when the evidence supports it.
|
|
169
|
-
|
|
170
|
-
If any piece is missing, mark `VF-original-issue` as `partial` or `failed`; do not allow a full PASS based solely on green tests.
|
|
171
|
-
|
|
172
|
-
### Step 5: Stub Detection
|
|
173
|
-
|
|
174
|
-
Look for "fake implementations" in the code:
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
# Typical stub patterns
|
|
178
|
-
grep -rn "throw new Error('Not implemented')" src/
|
|
179
|
-
grep -rn "// TODO:" src/
|
|
180
|
-
grep -rn "return null *// stub" src/
|
|
181
|
-
grep -rn "return {}" src/ | grep -v 'interface\|type'
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
For each match, check:
|
|
185
|
-
- Is it on an FR/AC-covered path?
|
|
186
|
-
- If yes → flag as "fake implementation"
|
|
187
|
-
|
|
188
|
-
### Step 5a: Test Quality Gate
|
|
189
|
-
|
|
190
|
-
Apply `@${CLAUDE_PLUGIN_ROOT}/gates/test-quality-gate.md` to every test used as FR/AC evidence.
|
|
191
|
-
|
|
192
|
-
Flag tests as weak evidence when:
|
|
193
|
-
- Assertions only inspect mocks/spies and never verify externally observable behavior.
|
|
194
|
-
- Mock/stub/spy setup is more than 3x real behavioral assertions.
|
|
195
|
-
- Test is skipped, assertion-free, or would pass with an empty implementation.
|
|
196
|
-
- Stateful mocks lack cleanup and can leak between tests.
|
|
197
|
-
|
|
198
|
-
If a weak test is the only evidence for an FR/AC, downgrade that assertion to `partial` or `unverified`; do not count it as fully verified.
|
|
199
|
-
|
|
200
|
-
### Step 6: Generate verification-report.md
|
|
201
|
-
|
|
202
|
-
**CRITICAL (see L8 of the preamble):** your FIRST action in this step must be a `Write` tool call with the **complete report content**. Do NOT paste the report as assistant text before writing — doing so doubles output tokens and causes truncation inside the `Write` call. After the write succeeds, respond with a ≤ 5-line summary only (path, verdict counts, next step). Do not re-paste the report.
|
|
203
|
-
|
|
204
|
-
If a single `Write` call would approach the sub-agent output-token budget (judge by section density, not line count), split into `verification-report.md` (short index + verdict) and `verification-details.md` (full findings table) — two `Write` calls. See preamble L8.
|
|
205
|
-
|
|
206
|
-
Required structure (use this as the content passed to `Write`, not as preview text):
|
|
207
|
-
|
|
208
|
-
```markdown
|
|
209
|
-
# Verification Report: <spec-name>
|
|
210
|
-
|
|
211
|
-
Generated: YYYY-MM-DD
|
|
212
|
-
Verification target: commits <range>
|
|
213
|
-
Verifier: flow-verifier
|
|
214
|
-
|
|
215
|
-
## Summary
|
|
216
|
-
|
|
217
|
-
- ✓ Verified: N / Total
|
|
218
|
-
- ⚠ Partial: M / Total
|
|
219
|
-
- ✗ Unverified: K / Total
|
|
220
|
-
- 🚨 Fake impl: X sites
|
|
221
|
-
- 🔁 Reality VF: PASS | PARTIAL | N/A
|
|
222
|
-
- 🧪 Test quality: PASS | WARN | FAIL
|
|
223
|
-
|
|
224
|
-
## Detailed Checklist
|
|
225
|
-
|
|
226
|
-
### ✓ FR-01: Users can log in with email + password
|
|
227
|
-
|
|
228
|
-
**Evidence**:
|
|
229
|
-
- Code: src/auth/login.ts:15-45
|
|
230
|
-
- Test: login.test.ts "logs in with valid credentials" (passed)
|
|
231
|
-
- Commit: abc123f "feat(auth): green - implement login endpoint"
|
|
232
|
-
- Live run: `curl POST /login -d '{...valid...}'` → 200 + JWT ✓
|
|
233
|
-
|
|
234
|
-
**Verdict**: fully implemented
|
|
235
|
-
|
|
236
|
-
---
|
|
237
|
-
|
|
238
|
-
### ⚠ AC-1.3: Empty password must return 400
|
|
239
|
-
|
|
240
|
-
**Evidence**:
|
|
241
|
-
- Code: src/auth/login.ts:18 (schema validation)
|
|
242
|
-
- Test: ⚠ no "empty password" test found
|
|
243
|
-
- Commit: implicit in abc123f
|
|
244
|
-
|
|
245
|
-
**Verdict**: code may be correct, but **no automated test** guarantees it. Regression risk.
|
|
246
|
-
|
|
247
|
-
**Suggestion**: add test("rejects empty password") and verify passing.
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
|
-
### ✗ FR-03: Token refresh endpoint
|
|
252
|
-
|
|
253
|
-
**Evidence**:
|
|
254
|
-
- Code: no refreshToken implementation found
|
|
255
|
-
- Test: none
|
|
256
|
-
- Commit: none
|
|
257
|
-
|
|
258
|
-
**Verdict**: not implemented at all
|
|
259
|
-
|
|
260
|
-
**Suggestion**: go back to /curdx-flow:implement to add the task, or grant a STATE.md waiver (defer).
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
### 🚨 Fake implementation
|
|
265
|
-
|
|
266
|
-
**Location**: src/auth/logout.ts:12
|
|
267
|
-
|
|
268
|
-
```typescript
|
|
269
|
-
export async function logout(token: string) {
|
|
270
|
-
// TODO: implement
|
|
271
|
-
return { success: true };
|
|
272
|
-
}
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
**Impact**: FR-02 claimed done, but the logic is fake
|
|
276
|
-
|
|
277
|
-
**Severity**: High (user logout does not actually take effect)
|
|
278
|
-
|
|
279
|
-
**Suggestion**: fix immediately, or flag with @ts-expect-error to prevent deployment
|
|
280
|
-
|
|
281
|
-
---
|
|
282
|
-
|
|
283
|
-
## Decisions
|
|
284
|
-
|
|
285
|
-
- 3 assertions fully verified ✓
|
|
286
|
-
- 2 need tests ⚠
|
|
287
|
-
- 1 not implemented ✗
|
|
288
|
-
- 1 fake implementation 🚨
|
|
289
|
-
- Reality verification: PASS | PARTIAL | N/A
|
|
290
|
-
- Test quality: PASS | WARN | FAIL
|
|
291
|
-
|
|
292
|
-
**Suggested next steps**:
|
|
293
|
-
1. Fix the fake implementation (logout.ts) — blocking
|
|
294
|
-
2. Add the missing FR-03 implementation — blocking
|
|
295
|
-
3. Add test coverage for AC-1.3 — warning
|
|
296
|
-
4. Re-run /curdx-flow:verify to recheck
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
### Step 7: Update .state.json
|
|
300
|
-
|
|
301
|
-
```python
|
|
302
|
-
# Decide phase_status based on verify results
|
|
303
|
-
if all_verified and no_stubs:
|
|
304
|
-
s['phase_status']['verify'] = 'completed'
|
|
305
|
-
s['phase'] = 'review'
|
|
306
|
-
elif missing_count > 0 or stubs > 0:
|
|
307
|
-
s['phase_status']['verify'] = 'failed'
|
|
308
|
-
# Keep phase='execute' so the user goes back to fix
|
|
309
|
-
else:
|
|
310
|
-
s['phase_status']['verify'] = 'in_progress'
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
---
|
|
314
|
-
|
|
315
|
-
## Forbidden
|
|
316
|
-
|
|
317
|
-
- ✗ Trusting .progress.md's "done" claims without verification
|
|
318
|
-
- ✗ Giving a fix/debug spec full PASS without BEFORE/AFTER reality verification or explicit D-NN waiver
|
|
319
|
-
- ✗ Skipping actual test runs
|
|
320
|
-
- ✗ Letting fake implementations slide (`// TODO:` on critical paths)
|
|
321
|
-
- ✗ Treating mock-only or skipped tests as full FR/AC evidence
|
|
322
|
-
- ✗ Claiming "looks good" without concrete evidence (violates verification-gate)
|
|
323
|
-
|
|
324
|
-
## Quality Self-Check
|
|
325
|
-
|
|
326
|
-
- [ ] Every FR / AC / AD has a verdict (verified / partial / missing)?
|
|
327
|
-
- [ ] At least one npm test or equivalent was actually run?
|
|
328
|
-
- [ ] Stub patterns scanned (Not implemented / TODO / stub)?
|
|
329
|
-
- [ ] Every verdict in the report has a concrete evidence path?
|
|
330
|
-
|
|
331
|
-
---
|
|
332
|
-
|
|
333
|
-
## Output to User
|
|
334
|
-
|
|
335
|
-
```
|
|
336
|
-
✓ Verification complete: <spec-name>
|
|
337
|
-
|
|
338
|
-
Stats:
|
|
339
|
-
✓ Fully verified: N
|
|
340
|
-
⚠ Partial: M
|
|
341
|
-
✗ Unverified: K
|
|
342
|
-
🚨 Fake impl: X
|
|
343
|
-
|
|
344
|
-
Report: .flow/specs/<name>/verification-report.md
|
|
345
|
-
|
|
346
|
-
Next:
|
|
347
|
-
- If all ✓: /curdx-flow:review to move into code-quality review
|
|
348
|
-
- If any ✗/🚨: fix, then /curdx-flow:verify again
|
|
349
|
-
```
|
package/bin/curdx-flow
DELETED
package/bin/curdx-flow.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* curdx-flow CLI entry
|
|
4
|
-
*
|
|
5
|
-
* Usage:
|
|
6
|
-
* npx @curdx/flow <command> [args]
|
|
7
|
-
*
|
|
8
|
-
* The CLI only handles install-time and lifecycle operations that must
|
|
9
|
-
* happen outside Claude Code. Anything a user does while Claude Code is
|
|
10
|
-
* running (init a project, start a spec, run the workflow, etc.) is a
|
|
11
|
-
* slash command: /curdx-flow:init, /curdx-flow:start, and so on.
|
|
12
|
-
*
|
|
13
|
-
* Commands:
|
|
14
|
-
* install Install curdx-flow plugin + optional recommended plugins
|
|
15
|
-
* doctor Check health (claude CLI, plugin, MCPs, recommended plugins)
|
|
16
|
-
* upgrade Update curdx-flow + recommended plugins to latest
|
|
17
|
-
* uninstall Remove curdx-flow plugin (and optionally recommended / artifacts)
|
|
18
|
-
* --version / -v
|
|
19
|
-
* --help / -h (CLI usage summary — use /curdx-flow:help in Claude Code
|
|
20
|
-
* for the full command/workflow reference)
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
import { fileURLToPath } from "node:url";
|
|
24
|
-
import { realpathSync } from "node:fs";
|
|
25
|
-
|
|
26
|
-
import { runCli } from "../cli/router.js";
|
|
27
|
-
|
|
28
|
-
// Only execute main() when invoked directly (`node bin/curdx-flow.js ...`
|
|
29
|
-
// or via the npm bin shim at node_modules/.bin/<name>). When the file is
|
|
30
|
-
// imported by tests or tooling, we want the module graph to load without
|
|
31
|
-
// side-effects.
|
|
32
|
-
//
|
|
33
|
-
// CRITICAL: compare RESOLVED real paths. npm installs the bin as a symlink
|
|
34
|
-
// (node_modules/.bin/curdx-flow → ../@curdx/flow/bin/curdx-flow.js), so
|
|
35
|
-
// process.argv[1] is the symlink path while import.meta.url resolves to
|
|
36
|
-
// the real file. Comparing them directly (the pre-beta.13 behavior)
|
|
37
|
-
// silently skipped main() for every single npx / global-install user,
|
|
38
|
-
// producing a completely broken CLI that exited with no output. Regression
|
|
39
|
-
// caught by user report + reproduced in CI via test/cli-entrypoints.test.js.
|
|
40
|
-
function isInvokedDirectly() {
|
|
41
|
-
if (!process.argv[1]) return false;
|
|
42
|
-
try {
|
|
43
|
-
return realpathSync(process.argv[1]) === fileURLToPath(import.meta.url);
|
|
44
|
-
} catch {
|
|
45
|
-
// argv[1] is not a real filesystem path (e.g. `node -e` eval forms or
|
|
46
|
-
// a worker pipe). Treat as "not invoked directly" — the caller is
|
|
47
|
-
// doing something non-standard.
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (isInvokedDirectly()) {
|
|
53
|
-
runCli();
|
|
54
|
-
}
|
package/cli/README.md
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# curdx-flow CLI
|
|
2
|
-
|
|
3
|
-
One-shot installer + external diagnostics + external init. Requires Node.js 18+ and Claude Code v2.1.110+.
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Interactive install (pick recommended plugins)
|
|
9
|
-
npx github:curdx/curdx-flow install
|
|
10
|
-
|
|
11
|
-
# Or install everything automatically
|
|
12
|
-
npx github:curdx/curdx-flow install --all
|
|
13
|
-
|
|
14
|
-
# Health check
|
|
15
|
-
npx @curdx/flow doctor
|
|
16
|
-
|
|
17
|
-
# Update all plugins
|
|
18
|
-
npx @curdx/flow upgrade
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Commands
|
|
22
|
-
|
|
23
|
-
### `install [--all] [--no-deps]`
|
|
24
|
-
|
|
25
|
-
Steps:
|
|
26
|
-
1. Verify the `claude` CLI is installed
|
|
27
|
-
2. `claude plugin marketplace add --scope user curdx/curdx-flow`
|
|
28
|
-
3. Pre-register required companion marketplaces so plugin dependencies can resolve
|
|
29
|
-
4. `claude plugin install --scope user curdx-flow@curdx-flow-marketplace`
|
|
30
|
-
5. Install required companion plugin: **context7-plugin@context7-marketplace**
|
|
31
|
-
6. Register required user-level MCP: **sequential-thinking**
|
|
32
|
-
7. Interactively (or automatically) install recommended plugins: **pua**, **claude-mem**, **frontend-design**, **chrome-devtools-mcp**
|
|
33
|
-
|
|
34
|
-
| Flag | Purpose |
|
|
35
|
-
|------|---------|
|
|
36
|
-
| `--all` | Install all recommended plugins, no prompt |
|
|
37
|
-
| `--no-deps` | Install only curdx-flow itself |
|
|
38
|
-
|
|
39
|
-
### `doctor [--verbose] [--fix] [--json]`
|
|
40
|
-
|
|
41
|
-
External diagnostics: claude CLI / curdx-flow / required MCPs / recommended plugins / current directory `.flow/` state.
|
|
42
|
-
|
|
43
|
-
`--fix` applies the safe automatic repairs the CLI can perform without guessing — currently the `bun` / `uv` PATH symlinks used by `claude-mem`. Everything else remains diagnostic-only.
|
|
44
|
-
|
|
45
|
-
`--json` emits the full health result as machine-readable JSON for CI, wrappers, or external diagnostics. It includes `contractVersion`, `metadata.appliedFixes`, settings inspection scope metadata, the rendered report structure, and raw `doctorData`, including CurDX-Flow plugin option precedence, file-based managed settings, and runtime env projection.
|
|
46
|
-
|
|
47
|
-
`doctor` also compares the plugin body shipped with the current CLI/package against the `curdx-flow` version Claude actually has installed, so local development and release validation do not silently run against stale plugin cache state.
|
|
48
|
-
|
|
49
|
-
When the CLI is running from a git checkout, `doctor` also reports whether that source repo is dirty. This catches the common plugin-development trap where Claude is still running the previously installed cache while your local checkout has uninstalled edits.
|
|
50
|
-
|
|
51
|
-
### Project initialization (not a CLI command)
|
|
52
|
-
|
|
53
|
-
Project initialization is a Claude Code slash command, not a CLI one. After `install`, open your project in Claude Code and run:
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
claude
|
|
57
|
-
/curdx-flow:init
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
This keeps the CLI scoped to install-time and lifecycle operations only — anything the user does while Claude Code is running stays inside Claude Code.
|
|
61
|
-
|
|
62
|
-
### `upgrade`
|
|
63
|
-
|
|
64
|
-
`claude plugin marketplace update` + `claude plugin update --scope user` for every installed curdx-flow-related plugin.
|
|
65
|
-
|
|
66
|
-
After updating, `upgrade` also reconciles retired Context7 install artifacts:
|
|
67
|
-
|
|
68
|
-
- removes the old user-level `context7` MCP if the official `context7-plugin` already owns it
|
|
69
|
-
- removes any stale `context7ApiKey` entry from `~/.claude/curdx-flow-config.json`
|
|
70
|
-
|
|
71
|
-
### `uninstall [-y] [--keep-recommended] [--purge]`
|
|
72
|
-
|
|
73
|
-
Inverse of `install`. By default removes only the curdx-flow plugin. Recommended plugins are kept unless selected interactively. With `--purge`, also removes third-party marketplaces, the `~/.local/bin/bun` / `~/.local/bin/uv` symlinks created by install, and any retired Context7 user-level MCP / stored API key left behind by older CurDX-Flow releases.
|
|
74
|
-
|
|
75
|
-
## Why a CLI?
|
|
76
|
-
|
|
77
|
-
The **core workflow** still lives inside Claude Code (`/curdx-flow:*` commands). The CLI provides:
|
|
78
|
-
|
|
79
|
-
- **One-line install**: Docker/CI friendly (`RUN npx github:curdx/curdx-flow install --all`)
|
|
80
|
-
- **External diagnostics**: check health without entering Claude Code
|
|
81
|
-
- **Batch deployment**: write a script for your team — `for host in ...; do ssh $host npx github:curdx/curdx-flow install; done`
|
|
82
|
-
|
|
83
|
-
## Small-dependency design
|
|
84
|
-
|
|
85
|
-
- Pure ES Modules (Node 18+)
|
|
86
|
-
- Tiny runtime dependency surface (`@clack/prompts`, `picocolors`)
|
|
87
|
-
- No `commander` / `inquirer` / `execa`
|
|
88
|
-
- Fast `npx` and offline-capable plugin install
|
|
89
|
-
|
|
90
|
-
## Local development
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
# clone
|
|
94
|
-
git clone https://github.com/curdx/curdx-flow
|
|
95
|
-
cd curdx-flow
|
|
96
|
-
|
|
97
|
-
# run directly
|
|
98
|
-
node bin/curdx-flow.js --help
|
|
99
|
-
node bin/curdx-flow.js doctor
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## License
|
|
103
|
-
|
|
104
|
-
MIT
|