procedure-cli 0.1.13 → 0.1.15
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/README.md +8 -13
- package/dist/app.js +27 -15
- package/dist/app.js.map +1 -1
- package/dist/lib/template.js +1 -1
- package/dist/lib/template.js.map +1 -1
- package/dist/lib/types.d.ts +1 -1
- package/dist/steps/build-test.js +1 -1
- package/dist/steps/build-test.js.map +1 -1
- package/dist/steps/product-context.js +1 -1
- package/dist/steps/product-context.js.map +1 -1
- package/dist/steps/project-info.js +1 -1
- package/dist/steps/project-info.js.map +1 -1
- package/dist/steps/stack-style.js +44 -2
- package/dist/steps/stack-style.js.map +1 -1
- package/package.json +5 -1
- package/templates/gitignore +4 -0
- package/.claude/settings.local.json +0 -27
- package/.env.example +0 -2
- package/AGENTS.md +0 -134
- package/CLAUDE.md +0 -138
- package/CODE-FIXED.md +0 -252
- package/CODE-REVIEW.md +0 -558
- package/config/defaults.json +0 -8
- package/config/powerline-config.json +0 -52
- package/config/stacks/typescript-node.json +0 -15
- package/docs/GIAI-THICH-CLAUDE-MD.md +0 -206
- package/docs/PRD.md +0 -141
- package/docs/USER-STORIES.md +0 -324
- package/src/app.tsx +0 -213
- package/src/cli.tsx +0 -19
- package/src/components/banner.tsx +0 -23
- package/src/components/gutter-line.tsx +0 -16
- package/src/components/guttered-select.tsx +0 -231
- package/src/components/step-indicator.tsx +0 -32
- package/src/components/timeline.tsx +0 -57
- package/src/lib/fs.ts +0 -23
- package/src/lib/git.ts +0 -41
- package/src/lib/powerline.ts +0 -48
- package/src/lib/template.ts +0 -161
- package/src/lib/types.ts +0 -70
- package/src/providers/openai.ts +0 -5
- package/src/providers/zai.ts +0 -7
- package/src/steps/architecture.tsx +0 -72
- package/src/steps/build-test.tsx +0 -114
- package/src/steps/generation.tsx +0 -176
- package/src/steps/powerline.tsx +0 -254
- package/src/steps/product-context.tsx +0 -269
- package/src/steps/project-info.tsx +0 -183
- package/src/steps/stack-style.tsx +0 -304
- package/src/theme.ts +0 -15
- package/tsconfig.json +0 -17
package/AGENTS.md
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
# Repository Guidelines
|
|
2
|
-
|
|
3
|
-
This file provides guidance to coding agents (including Codex) when working in this repository.
|
|
4
|
-
|
|
5
|
-
See `docs/PRD.md` for product requirements and `docs/USER-STORIES.md` for user stories with acceptance criteria.
|
|
6
|
-
|
|
7
|
-
## Build & Test
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm run dev # Run CLI directly (tsx, no build step)
|
|
11
|
-
npm run typecheck # Typecheck (fast — run first)
|
|
12
|
-
npm run build # Compile to dist/
|
|
13
|
-
npx tsx src/cli.tsx # Run entry point directly
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Safety note: never run `npm run dev` from the procedure repo directory when validating scaffolding behavior. Generation writes to `process.cwd()`. Always test from a temp directory.
|
|
17
|
-
|
|
18
|
-
## Code Style
|
|
19
|
-
|
|
20
|
-
- TypeScript strict mode, ESM (`"type": "module"` in `package.json`).
|
|
21
|
-
- JSX runtime: `react-jsx`.
|
|
22
|
-
- Ink components use `.tsx`; pure logic uses `.ts`.
|
|
23
|
-
- Handlebars templates use `.hbs` in `templates/`.
|
|
24
|
-
- Providers live in `src/providers/` (one provider per file; export a single provider instance).
|
|
25
|
-
- Environment variables for API keys: `ZAI_API_KEY`, `OPENAI_API_KEY` (never hardcode).
|
|
26
|
-
|
|
27
|
-
## Architecture
|
|
28
|
-
|
|
29
|
-
- Entry point: `src/cli.tsx` (parses args, calls `render(<App />)`).
|
|
30
|
-
- UI layer: `src/app.tsx` (wizard controller with 7-step flow).
|
|
31
|
-
- Wizard steps: `src/steps/`.
|
|
32
|
-
- UI components: `src/components/`.
|
|
33
|
-
- Core logic: `src/lib/`.
|
|
34
|
-
- `template.ts` — Handlebars rendering and scaffolding.
|
|
35
|
-
- `powerline.ts` — Claude Code powerline setup.
|
|
36
|
-
- `git.ts` — git init + initial commit.
|
|
37
|
-
- `fs.ts` — directory/file helpers.
|
|
38
|
-
- `types.ts` — shared types.
|
|
39
|
-
- Templates: `templates/`.
|
|
40
|
-
- Config: `config/`.
|
|
41
|
-
- AI providers: `src/providers/` (AI SDK 6 via Z.ai/OpenAI providers).
|
|
42
|
-
- Docs: `docs/`.
|
|
43
|
-
|
|
44
|
-
## Workflow
|
|
45
|
-
|
|
46
|
-
### Planning
|
|
47
|
-
- Enter plan mode for any non-trivial task (3+ steps or architectural decisions).
|
|
48
|
-
- If execution deviates, stop and re-plan.
|
|
49
|
-
|
|
50
|
-
### Verification
|
|
51
|
-
- Never mark work complete without proof.
|
|
52
|
-
- Minimum required checks: `npm run typecheck` and `npm run build`.
|
|
53
|
-
|
|
54
|
-
### Self-Improvement
|
|
55
|
-
- After user correction, update Lessons to prevent recurrence.
|
|
56
|
-
|
|
57
|
-
### Bug Fixing
|
|
58
|
-
- Fix root cause; no temporary patches.
|
|
59
|
-
- Base fixes on concrete evidence (logs/errors/code path).
|
|
60
|
-
|
|
61
|
-
### Elegance
|
|
62
|
-
- For non-trivial changes, choose maintainable solutions over hacks.
|
|
63
|
-
- Do not over-engineer simple fixes.
|
|
64
|
-
|
|
65
|
-
## Task Management
|
|
66
|
-
|
|
67
|
-
### Solo Work
|
|
68
|
-
1. Plan first.
|
|
69
|
-
2. Track progress for multi-step work.
|
|
70
|
-
3. Verify before claiming done.
|
|
71
|
-
4. Update Lessons after corrections.
|
|
72
|
-
|
|
73
|
-
### Agent Teams
|
|
74
|
-
1. Plan before delegation.
|
|
75
|
-
2. One clear deliverable per task.
|
|
76
|
-
3. Keep file ownership non-overlapping.
|
|
77
|
-
4. Include explicit file paths and constraints in handoffs.
|
|
78
|
-
5. DM by default; broadcast only critical blockers.
|
|
79
|
-
6. Keep team size practical (typically 3-5).
|
|
80
|
-
|
|
81
|
-
## Code Review & Fix Logging
|
|
82
|
-
|
|
83
|
-
Two append-only logs live at the project root: `CODE-REVIEW.md` and `CODE-FIXED.md`. Never delete or rewrite past entries.
|
|
84
|
-
|
|
85
|
-
### CODE-REVIEW.md (review findings)
|
|
86
|
-
- Entry ID format: `CR-YYYYMMDD-###`.
|
|
87
|
-
- Findings ordered by severity (`High`, `Medium`, `Low`).
|
|
88
|
-
- Every finding includes `file:line` evidence, recommendation, and status (`New`, `Still Open`, `Fixed`, `Regressed`, `Not Reproducible`).
|
|
89
|
-
|
|
90
|
-
### CODE-FIXED.md (fix results)
|
|
91
|
-
- Entry ID format: `CF-YYYYMMDD-###`.
|
|
92
|
-
- Each entry references source `CR-` Entry ID.
|
|
93
|
-
- Do not re-describe findings; only document actions taken.
|
|
94
|
-
- Include changed `file:line` evidence for each fix.
|
|
95
|
-
- Deferred items require rationale and revisit trigger.
|
|
96
|
-
- Verification section must include `npm run typecheck` and `npm run build`.
|
|
97
|
-
|
|
98
|
-
### Procedure
|
|
99
|
-
1. Reviewing:
|
|
100
|
-
- First: read latest `CODE-REVIEW.md`, then latest `CODE-FIXED.md`.
|
|
101
|
-
- Then: append a new `CR-` entry to `CODE-REVIEW.md` only.
|
|
102
|
-
- Never fix code during a review process.
|
|
103
|
-
2. Fixing:
|
|
104
|
-
- First: read latest `CODE-REVIEW.md`, then latest `CODE-FIXED.md`.
|
|
105
|
-
- Then: fix unresolved findings and append a new `CF-` entry to `CODE-FIXED.md` only.
|
|
106
|
-
- Never perform a review write-up during a fixing process.
|
|
107
|
-
|
|
108
|
-
## Core Principles
|
|
109
|
-
|
|
110
|
-
- Simplicity first (minimal code impact).
|
|
111
|
-
- Root-cause rigor (no lazy/temporary fixes).
|
|
112
|
-
- Minimal necessary change surface.
|
|
113
|
-
|
|
114
|
-
## Lessons
|
|
115
|
-
|
|
116
|
-
- Timeline `│` lines must stay vertically aligned.
|
|
117
|
-
- Required wizard fields must validate (no empty submissions).
|
|
118
|
-
- Active step should show clear waiting state.
|
|
119
|
-
- Errors should render below input in distinct color.
|
|
120
|
-
- Completed steps need explicit visual acknowledgment.
|
|
121
|
-
- Keep tagline under ASCII banner.
|
|
122
|
-
- Never run `npm run dev` from repo root when testing scaffolding.
|
|
123
|
-
- Use select menus for known-option fields.
|
|
124
|
-
- Avoid unrelated-prefill behavior.
|
|
125
|
-
- Architecture notes should be auto-generated from selected pattern.
|
|
126
|
-
- Generation step must summarize and ask for confirmation before writing.
|
|
127
|
-
- Prefer `<Text>` over `<Box>` for single-line elements.
|
|
128
|
-
- Step components return fragments; timeline owns outer layout box.
|
|
129
|
-
- Completed summaries render on separate `│ ` line.
|
|
130
|
-
- Use custom guttered selects/multi-selects to preserve timeline gutter.
|
|
131
|
-
- Tech stack prefill should derive from Stack & Style.
|
|
132
|
-
- Stack & Style = dev setup; Tech Stack = product stack.
|
|
133
|
-
- Use Catppuccin Mocha hex constants from `src/theme.ts`; do not use named terminal colors.
|
|
134
|
-
- Timeline `┌`/`└` corners wrap the entire wizard flow, not individual steps.
|
package/CLAUDE.md
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
See docs/PRD.md for product requirements and docs/USER-STORIES.md for user stories with acceptance criteria.
|
|
6
|
-
|
|
7
|
-
## Build & Test
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm run dev # Run CLI directly (tsx, no build step)
|
|
11
|
-
npm run typecheck # Typecheck (fast — run first)
|
|
12
|
-
npm run build # Compile to dist/
|
|
13
|
-
npx tsx src/cli.tsx # Run entry point directly
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Code Style
|
|
17
|
-
|
|
18
|
-
- TypeScript strict mode, ESM (`"type": "module"` in package.json)
|
|
19
|
-
- JSX runtime: `react-jsx` (no `import React` needed in components, but keep it for clarity in entry points)
|
|
20
|
-
- Ink components use `.tsx` extension; pure logic uses `.ts`
|
|
21
|
-
- Handlebars templates use `.hbs` extension in `templates/`
|
|
22
|
-
- Providers live in `src/providers/` — one file per provider, each exports a single provider instance
|
|
23
|
-
- Environment variables for API keys: `ZAI_API_KEY`, `OPENAI_API_KEY` (never hardcode)
|
|
24
|
-
|
|
25
|
-
## Architecture
|
|
26
|
-
|
|
27
|
-
- **Entry point**: `src/cli.tsx` — parses args, calls `render(<App />)`
|
|
28
|
-
- **UI layer**: `src/app.tsx` — Ink root component, wizard controller with 7-step flow
|
|
29
|
-
- **Wizard steps**: `src/steps/` — one component per step, each receives `onComplete` callback
|
|
30
|
-
- **UI components**: `src/components/` — banner, timeline, step-indicator, gutter-line, guttered-select
|
|
31
|
-
- **Core logic**: `src/lib/` — pure functions, no UI
|
|
32
|
-
- `template.ts` — Handlebars rendering, file scaffolding
|
|
33
|
-
- `powerline.ts` — Claude Code powerline setup (from setup-powerline.sh logic)
|
|
34
|
-
- `git.ts` — git init + initial commit
|
|
35
|
-
- `fs.ts` — directory/file helpers
|
|
36
|
-
- `types.ts` — WizardAnswers interface, StepId type
|
|
37
|
-
- **Templates**: `templates/` — Handlebars files (.hbs) rendered with wizard answers into target projects
|
|
38
|
-
- **Config**: `config/` — defaults, stack presets, bundled powerline config
|
|
39
|
-
- **AI providers**: `src/providers/` — Z.ai uses `@ai-sdk/openai-compatible` (GLM models), OpenAI uses `@ai-sdk/openai`
|
|
40
|
-
- **AI SDK 6**: All AI calls go through Vercel AI SDK 6 (`ai` package). Use `generateText`, `streamText`, or `generateObject` — not raw fetch
|
|
41
|
-
- **Docs**: `docs/` — PRD, User Stories (Gherkin A/C), methodology explainer (Vietnamese)
|
|
42
|
-
|
|
43
|
-
## Workflow
|
|
44
|
-
|
|
45
|
-
### Planning
|
|
46
|
-
- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
|
|
47
|
-
- If something goes sideways, STOP and re-plan — don't keep pushing
|
|
48
|
-
- A good plan lets you one-shot the implementation
|
|
49
|
-
|
|
50
|
-
### Verification
|
|
51
|
-
- Never mark a task complete without proving it works
|
|
52
|
-
- Run `npm run typecheck` then `npm run dev` to verify
|
|
53
|
-
- Ask yourself: "Would a staff engineer approve this?"
|
|
54
|
-
|
|
55
|
-
### Self-Improvement
|
|
56
|
-
- After ANY correction from the user: update the Lessons section below
|
|
57
|
-
- Write rules that prevent the same mistake from recurring
|
|
58
|
-
|
|
59
|
-
### Bug Fixing
|
|
60
|
-
- Given a bug report: just fix it. Don't ask for hand-holding
|
|
61
|
-
- Point at logs, errors, failing tests — then resolve them
|
|
62
|
-
|
|
63
|
-
### Elegance
|
|
64
|
-
- For non-trivial changes: pause and ask "is there a more elegant way?"
|
|
65
|
-
- If a fix feels hacky, step back and implement the clean solution
|
|
66
|
-
- Skip this for simple, obvious fixes — don't over-engineer
|
|
67
|
-
|
|
68
|
-
## Task Management
|
|
69
|
-
|
|
70
|
-
### Solo Work
|
|
71
|
-
1. Plan first (plan mode for complex tasks)
|
|
72
|
-
2. Track progress with TaskCreate/TaskUpdate for multi-step work
|
|
73
|
-
3. Verify before claiming done
|
|
74
|
-
4. Update Lessons after corrections
|
|
75
|
-
|
|
76
|
-
### Agent Teams
|
|
77
|
-
1. Plan-then-team: design approach BEFORE spawning a team
|
|
78
|
-
2. Each task = one clear deliverable with verification steps
|
|
79
|
-
3. File ownership: each teammate owns specific files — NEVER have two edit the same file
|
|
80
|
-
4. Include file paths and constraints in task descriptions — teammates don't inherit context
|
|
81
|
-
5. DMs by default, broadcast only for critical blocking issues
|
|
82
|
-
6. 3-5 teammates max
|
|
83
|
-
|
|
84
|
-
## Code Review & Fix Logging
|
|
85
|
-
|
|
86
|
-
Two tracking files live at the project root. Both are append-only logs — never delete or rewrite past entries.
|
|
87
|
-
|
|
88
|
-
### CODE-REVIEW.md — review findings
|
|
89
|
-
- Created/appended during code review sessions.
|
|
90
|
-
- Entry ID format: `CR-YYYYMMDD-###` (zero-padded sequence per day).
|
|
91
|
-
- Findings ordered by severity (`High`, `Medium`, `Low`).
|
|
92
|
-
- Every finding includes `file:line` evidence, a clear recommendation, and `Status` (`New`, `Still Open`, `Fixed`, `Regressed`, `Not Reproducible`).
|
|
93
|
-
|
|
94
|
-
### CODE-FIXED.md — fix results
|
|
95
|
-
- Created/appended when fixing findings from CODE-REVIEW.md.
|
|
96
|
-
- Entry ID format: `CF-YYYYMMDD-###`.
|
|
97
|
-
- Each entry references its source review by `CR-` Entry ID — do NOT re-describe findings, only document actions taken.
|
|
98
|
-
- Fixed findings include `file:line` for every change made.
|
|
99
|
-
- Deferred findings include rationale and a revisit trigger.
|
|
100
|
-
- Verification section must confirm `npm run typecheck` + `npm run build` status after fixes.
|
|
101
|
-
|
|
102
|
-
### Procedure
|
|
103
|
-
1. **Reviewing**:
|
|
104
|
-
- **First**: Read CODE-REVIEW.md → Read CODE-FIXED.md → understand current state of findings and fixes.
|
|
105
|
-
- **Then**: Read codebase → append findings to CODE-REVIEW.md with a new `CR-` entry (write to CODE-REVIEW.md only, never modify CODE-FIXED.md).
|
|
106
|
-
- **Never** fix code during a reviewing process.
|
|
107
|
-
2. **Fixing**:
|
|
108
|
-
- **First**: Read CODE-REVIEW.md → Read CODE-FIXED.md → identify unfixed findings.
|
|
109
|
-
- **Then**: Fix only unfixed findings → append a new `CF-` entry to CODE-FIXED.md (write to CODE-FIXED.md only, never modify CODE-REVIEW.md).
|
|
110
|
-
- **Never** perform a code review during a fixing process.
|
|
111
|
-
|
|
112
|
-
## Core Principles
|
|
113
|
-
|
|
114
|
-
- **Simplicity First**: Make every change as simple as possible. Minimal code impact.
|
|
115
|
-
- **No Laziness**: Find root causes. No temporary fixes. Senior developer standards.
|
|
116
|
-
- **Minimal Impact**: Changes should only touch what's necessary.
|
|
117
|
-
|
|
118
|
-
## Lessons
|
|
119
|
-
|
|
120
|
-
- Timeline `│` lines must stay vertically aligned — never indent content in a way that breaks the straight line from dot to dot
|
|
121
|
-
- Required wizard fields must validate: don't allow empty submissions for project name, description, etc.
|
|
122
|
-
- Active step needs visual animation (spinner/pulse) so user knows the CLI is waiting for input
|
|
123
|
-
- Errors display below the input field in a distinct color (red/yellow) — never inline with the prompt
|
|
124
|
-
- Completed steps need visual acknowledgment (checkmark, color change) beyond just swapping the dot symbol
|
|
125
|
-
- Always add an intro/tagline under the ASCII banner so the user knows what the tool does
|
|
126
|
-
- NEVER run `npm run dev` from the procedure project directory — scaffolding writes to cwd and overwrites procedure's own files. Always test in a temp directory.
|
|
127
|
-
- Select menus (not text input) for fields with known options: package manager, license, architecture pattern
|
|
128
|
-
- Don't prefill fields from unrelated previous answers (e.g., project name → description)
|
|
129
|
-
- Architecture notes should be auto-generated from the selected pattern — users may not know best practices
|
|
130
|
-
- Generation step must show a summary and ask for confirmation before writing files
|
|
131
|
-
- Use `<Text>` not `<Box>` for single-line elements — `<Box>` creates flex containers that add visual gaps
|
|
132
|
-
- Step components must return `<>` fragments, NOT `<Box flexDirection="column">` — only timeline.tsx gets the outer Box
|
|
133
|
-
- Completed step summaries go on a SEPARATE `│ ` line below the step name, not on the same line (prevents wrapping)
|
|
134
|
-
- Custom GutteredSelect/GutteredMultiSelect for select menus — `@inkjs/ui` Select breaks the `│` gutter line
|
|
135
|
-
- Tech stack multi-select should prefill from Stack & Style selections (language + framework)
|
|
136
|
-
- Stack & Style = dev setup (language, framework, code style → CLAUDE.md). Tech Stack = full product stack (databases, infra → PRD/README)
|
|
137
|
-
- Color theme is Catppuccin Mocha — always use hex constants from `src/theme.ts` (`C.mauve`, `C.green`, etc.), never terminal color names like `"cyan"`, `"green"`, `"red"`. This ensures consistent rendering across all terminal emulators.
|
|
138
|
-
- Timeline `┌`/`└` corners wrap the entire wizard flow (top of Project Info, bottom of Setup) — not individual steps
|
package/CODE-FIXED.md
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
# Code Fix Log
|
|
2
|
-
|
|
3
|
-
## Writing Standard
|
|
4
|
-
- Each entry documents fixes applied for a specific `CODE-REVIEW.md` entry.
|
|
5
|
-
- Reference the source review by its Entry ID (e.g., `CR-20260221-001`). Do NOT re-describe findings — only document actions taken.
|
|
6
|
-
- For finding details, the reader should consult the referenced `CODE-REVIEW.md` entry.
|
|
7
|
-
- Each finding is referenced as `Finding #N (Severity)` matching the review's numbering.
|
|
8
|
-
- Fixed findings must include `file:line` for every change made.
|
|
9
|
-
- Deferred findings must include rationale and a revisit trigger.
|
|
10
|
-
- Verification section must confirm `npm run typecheck` + `npm run build` status after fixes.
|
|
11
|
-
- Language: English only. Tone: Technical, concise, action-focused.
|
|
12
|
-
|
|
13
|
-
### Entry ID Convention
|
|
14
|
-
- Required field for every entry: `Entry ID`.
|
|
15
|
-
- Format: `CF-YYYYMMDD-###`
|
|
16
|
-
- Example: `CF-20260222-001`
|
|
17
|
-
- `###` is a zero-padded sequence number for that day.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Entry 2026-02-22
|
|
22
|
-
|
|
23
|
-
### Entry ID
|
|
24
|
-
- `CF-20260222-001`
|
|
25
|
-
|
|
26
|
-
### Source Review
|
|
27
|
-
- `CR-20260221-001` (CODE-REVIEW.md entry 2026-02-21)
|
|
28
|
-
|
|
29
|
-
### Fixes Applied
|
|
30
|
-
|
|
31
|
-
1. Finding #1 (High) — **Fixed**
|
|
32
|
-
- `src/lib/powerline.ts:33` — Changed `--config=~/.claude/powerline-config.json` to `--config=.claude/powerline-config.json` so the status-line command reads from the project-local path where the config is actually written.
|
|
33
|
-
|
|
34
|
-
2. Finding #2 (Medium) — **Fixed**
|
|
35
|
-
- `src/lib/git.ts:3-11` — Added `hasGitIdentity()` helper that pre-checks `git config user.name` and `git config user.email`.
|
|
36
|
-
- `src/lib/git.ts:13-28` — Refactored `initGit()` to return `{ committed: boolean; reason?: string }`. Skips `git commit` when identity is missing and returns a descriptive reason string.
|
|
37
|
-
|
|
38
|
-
3. Finding #3 (Medium) — **Fixed**
|
|
39
|
-
- `src/lib/powerline.ts:21-29` — Wrapped `JSON.parse(raw)` in try/catch; malformed `.claude/settings.json` now falls back to empty object instead of throwing.
|
|
40
|
-
|
|
41
|
-
4. Finding #4 (Medium) — **Fixed**
|
|
42
|
-
- `src/lib/template.ts:38-44` — Added `checkConflicts(targetDir)` function that returns list of existing output files that would be overwritten.
|
|
43
|
-
- `src/steps/generation.tsx:5,61,102-113` — Imported `checkConflicts`, added yellow warning in summary phase listing files that will be overwritten before user confirms.
|
|
44
|
-
|
|
45
|
-
5. Finding #5 (Low) — **Fixed**
|
|
46
|
-
- `src/lib/types.ts:64` — Added `generationSkipped: boolean` field to `WizardAnswers`.
|
|
47
|
-
- `src/app.tsx:49` — Added `generationSkipped: false` to `EMPTY_ANSWERS`.
|
|
48
|
-
- `src/app.tsx:83` — Updated `getSummary` case 5 to return `"skipped"` when `generationSkipped` is true.
|
|
49
|
-
- `src/steps/generation.tsx:9` — Changed `onComplete` prop type to `(partial: Partial<WizardAnswers>) => void`.
|
|
50
|
-
- `src/steps/generation.tsx:35` — On successful generation, calls `onComplete({ generationSkipped: false })`.
|
|
51
|
-
- `src/steps/generation.tsx:48` — On cancel, calls `onComplete({ generationSkipped: true })`.
|
|
52
|
-
- `src/app.tsx:179` — Changed `onComplete={() => handleStepComplete({})}` to `onComplete={handleStepComplete}`.
|
|
53
|
-
|
|
54
|
-
6. Finding #6 (Low) — **Fixed**
|
|
55
|
-
- `templates/docs/USER-STORIES.md.hbs:1-32` — Added Handlebars `{{#if userStories.length}}` conditional with fallback starter template content when `userStories` is empty. Fallback includes example user story in Gherkin format with clear TODO instructions.
|
|
56
|
-
|
|
57
|
-
### Deferred
|
|
58
|
-
None — all 6 findings fixed.
|
|
59
|
-
|
|
60
|
-
### Verification Notes
|
|
61
|
-
- `npm run typecheck`: pass (0 errors)
|
|
62
|
-
- All fixes verified through code inspection.
|
|
63
|
-
|
|
64
|
-
### Residual Risks / Testing Gaps
|
|
65
|
-
- No automated tests for `checkConflicts()` behavior.
|
|
66
|
-
- No automated tests for `initGit()` across machines with missing git identity.
|
|
67
|
-
- No automated tests for malformed `.claude/settings.json` handling.
|
|
68
|
-
- No automated tests asserting generation summary truthfulness when user cancels.
|
|
69
|
-
- No runtime test for Handlebars `{{#if userStories.length}}` fallback rendering.
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Entry 2026-02-22
|
|
74
|
-
|
|
75
|
-
### Entry ID
|
|
76
|
-
- `CF-20260222-002`
|
|
77
|
-
|
|
78
|
-
### Source Review
|
|
79
|
-
- `CR-20260221-002` (CODE-REVIEW.md entry 2026-02-21)
|
|
80
|
-
|
|
81
|
-
### Fixes Applied
|
|
82
|
-
|
|
83
|
-
1. Finding #7 (Medium) — **Fixed**
|
|
84
|
-
- `src/lib/git.ts:13-20` — Added `hasStagedFiles()` helper that runs `git status --porcelain`; returns `false` when index is empty.
|
|
85
|
-
- `src/lib/git.ts:30-33` — Added early return `{ committed: false, reason: 'Nothing to commit — directory is empty.' }` before identity check, preventing hard crash on empty-directory init.
|
|
86
|
-
|
|
87
|
-
2. Finding #8 (Low) — **Fixed**
|
|
88
|
-
- `src/app.tsx:133-141` — Wrapped completion message in `answers.generationSkipped` conditional. Skip path shows neutral `"Generation was skipped — no files were written."` Scaffold path retains original project name + doc check message.
|
|
89
|
-
|
|
90
|
-
3. Finding #6 re-raised (Low, Still Open in CR-20260221-002) — **Already Fixed**
|
|
91
|
-
- Covered by `CF-20260222-001` Finding #6: `templates/docs/USER-STORIES.md.hbs` Handlebars fallback added in previous fix cycle. No further action required.
|
|
92
|
-
|
|
93
|
-
### Deferred
|
|
94
|
-
None.
|
|
95
|
-
|
|
96
|
-
### Verification Notes
|
|
97
|
-
- `npm run typecheck`: pass (0 errors)
|
|
98
|
-
- `npm run build`: pass
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## Entry 2026-02-22
|
|
103
|
-
|
|
104
|
-
### Entry ID
|
|
105
|
-
- `CF-20260222-003`
|
|
106
|
-
|
|
107
|
-
### Source Review
|
|
108
|
-
- `CR-20260221-004` (CODE-REVIEW.md entry 2026-02-21)
|
|
109
|
-
|
|
110
|
-
### Fixes Applied
|
|
111
|
-
|
|
112
|
-
1. Finding #9 (Low, Still Open) — **Fixed**
|
|
113
|
-
- `src/steps/powerline.tsx:22` — Added `gitCommitted?: boolean` to `SetupResult` interface.
|
|
114
|
-
- `src/steps/powerline.tsx:41-44` — `runSetup()` now stores `gitResult.committed` in `setupResult.gitCommitted`.
|
|
115
|
-
- `src/steps/powerline.tsx:125-133` — "Git repository initialized." only renders when `setupResult.gitCommitted` is true. When commit failed, only the yellow warning with reason is shown (no mixed success/failure messaging).
|
|
116
|
-
|
|
117
|
-
### Deferred
|
|
118
|
-
None.
|
|
119
|
-
|
|
120
|
-
### Verification Notes
|
|
121
|
-
- `npm run typecheck`: pass
|
|
122
|
-
- `npm run build`: pass
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
## Entry 2026-02-22
|
|
126
|
-
|
|
127
|
-
### Entry ID
|
|
128
|
-
- `CF-20260222-007`
|
|
129
|
-
|
|
130
|
-
### Source Review
|
|
131
|
-
- `CR-20260222-005` (CODE-REVIEW.md entry 2026-02-22)
|
|
132
|
-
|
|
133
|
-
### Fixes Applied
|
|
134
|
-
|
|
135
|
-
1. Finding #14 (Low) — **Fixed**
|
|
136
|
-
- `src/steps/build-test.tsx:107-111` — On last field (`isLast`), hint now shows `↓ / enter confirm` instead of silently omitting `↓`. On non-last fields, hint consolidated to `↓ next enter confirm`. Behavior unchanged; hint made consistent with actual key handling.
|
|
137
|
-
- `src/steps/product-context.tsx:253` — `nonGoals` hint updated from `"↑ prev enter confirm"` to `"↑ prev ↓ / enter confirm"`.
|
|
138
|
-
|
|
139
|
-
2. Finding #15 (Low) — **Fixed**
|
|
140
|
-
- `docs/PRD.md:29` — Updated F-001 bullet from "exits with helpful message" to "warns when cwd has files and continues — Step 6 overwrite confirmation handles conflicts".
|
|
141
|
-
- `README.md:4-9` — Replaced stale "exits" wording with accurate warn-and-continue description; overwrite list noted as Step 6 behavior.
|
|
142
|
-
- `docs/USER-STORIES.md:US-002` — Scenario updated from hard-exit / `process.exit(1)` to warn-and-continue / Step 6 overwrite confirmation flow.
|
|
143
|
-
|
|
144
|
-
### Deferred
|
|
145
|
-
None.
|
|
146
|
-
|
|
147
|
-
### Verification Notes
|
|
148
|
-
- `npm run typecheck`: pass
|
|
149
|
-
- `npm run build`: pass
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## Entry 2026-02-22
|
|
154
|
-
|
|
155
|
-
### Entry ID
|
|
156
|
-
- `CF-20260222-004`
|
|
157
|
-
|
|
158
|
-
### Source Review
|
|
159
|
-
- `CR-20260222-002` (CODE-REVIEW.md entry 2026-02-22)
|
|
160
|
-
|
|
161
|
-
### Fixes Applied
|
|
162
|
-
|
|
163
|
-
1. Finding #10 (Low) — **Fixed**
|
|
164
|
-
- `src/lib/types.ts:68` — Added `setupGit: boolean` to `WizardAnswers` so setup choice can be persisted.
|
|
165
|
-
- `src/app.tsx:51` — Added `setupGit: false` to `EMPTY_ANSWERS`.
|
|
166
|
-
- `src/app.tsx:89` — Updated setup summary to render `Git init: yes/no` based on `answers.setupGit` instead of always implying git initialization.
|
|
167
|
-
- `src/steps/powerline.tsx:48` — Updated `onComplete` payload to include `setupGit: git`, preserving the user’s git setup decision for final summaries.
|
|
168
|
-
|
|
169
|
-
### Deferred
|
|
170
|
-
None.
|
|
171
|
-
|
|
172
|
-
### Verification Notes
|
|
173
|
-
- `npm run typecheck`: pass
|
|
174
|
-
- `npm run build`: pass
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
## Entry 2026-02-22
|
|
178
|
-
|
|
179
|
-
### Entry ID
|
|
180
|
-
- `CF-20260222-005`
|
|
181
|
-
|
|
182
|
-
### Source Review
|
|
183
|
-
- `CR-20260222-003` (CODE-REVIEW.md entry 2026-02-22)
|
|
184
|
-
|
|
185
|
-
### Fixes Applied
|
|
186
|
-
|
|
187
|
-
1. Finding #11 (Low) — **Fixed**
|
|
188
|
-
- `src/steps/build-test.tsx:68` — Replaced `dimColor` with `color={C.overlay1}` to comply with the Catppuccin theme rule and keep all color rendering sourced from `src/theme.ts` constants.
|
|
189
|
-
|
|
190
|
-
### Deferred
|
|
191
|
-
None.
|
|
192
|
-
|
|
193
|
-
### Verification Notes
|
|
194
|
-
- `npm run typecheck`: pass
|
|
195
|
-
- `npm run build`: pass
|
|
196
|
-
- `rg "dimColor|color=\"(cyan|green|red|yellow|blue|magenta|white|black)\"" -n src`: no matches
|
|
197
|
-
|
|
198
|
-
---
|
|
199
|
-
## Entry 2026-02-22
|
|
200
|
-
|
|
201
|
-
### Entry ID
|
|
202
|
-
- `CF-20260222-006`
|
|
203
|
-
|
|
204
|
-
### Source Review
|
|
205
|
-
- `CR-20260222-004` (CODE-REVIEW.md entry 2026-02-22)
|
|
206
|
-
|
|
207
|
-
### Fixes Applied
|
|
208
|
-
|
|
209
|
-
1. Finding #12 (Medium) — **Fixed**
|
|
210
|
-
- `src/cli.tsx:11` — Replaced hard-stop behavior with warning-only messaging when directory is non-empty.
|
|
211
|
-
- `src/cli.tsx:13` — Added explicit note that existing files may be overwritten during Step 6, preserving the intended Generation conflict-confirmation flow.
|
|
212
|
-
- `src/cli.tsx:16` — Removed process exit path so wizard continues and existing overwrite warnings in Generation remain reachable.
|
|
213
|
-
|
|
214
|
-
2. Finding #13 (Low) — **Fixed**
|
|
215
|
-
- `src/cli.tsx:16` — Updated setup hint to include both valid invocations: `npx procedure-cli` and `npx @b3awesome/procedure`, avoiding single-command drift.
|
|
216
|
-
|
|
217
|
-
### Deferred
|
|
218
|
-
None.
|
|
219
|
-
|
|
220
|
-
### Verification Notes
|
|
221
|
-
- `npm run typecheck`: pass
|
|
222
|
-
- `npm run build`: pass
|
|
223
|
-
|
|
224
|
-
---
|
|
225
|
-
|
|
226
|
-
## Entry 2026-02-22
|
|
227
|
-
|
|
228
|
-
### Entry ID
|
|
229
|
-
- `CF-20260222-008`
|
|
230
|
-
|
|
231
|
-
### Source Review
|
|
232
|
-
- `CR-20260222-006` (CODE-REVIEW.md entry 2026-02-22)
|
|
233
|
-
|
|
234
|
-
### Fixes Applied
|
|
235
|
-
|
|
236
|
-
1. Finding #16 (Low) — **Fixed**
|
|
237
|
-
- `src/steps/project-info.tsx:51` — Added `isSelectStep` constant (`currentStep === "packageManager" || currentStep === "license"`).
|
|
238
|
-
- `src/steps/project-info.tsx:57` — Added `&& !isSelectStep` guard to `key.tab` branch so Tab never fires the text-field advance path on select steps.
|
|
239
|
-
- `src/steps/project-info.tsx:156` — Removed "Tab next" from the `packageManager` hint; now reads `"Shift+Tab prev ↑↓ move Enter select"`.
|
|
240
|
-
|
|
241
|
-
2. Finding #17 (Low) — **Fixed**
|
|
242
|
-
- `src/steps/product-context.tsx:86` — Added `isMultiSelectPhase` constant (`currentPhase === "techStack" || currentPhase === "coreFeatures"`).
|
|
243
|
-
- `src/steps/product-context.tsx:90` — Added `&& !isMultiSelectPhase` guard to `key.tab` branch so Tab never discards GutteredMultiSelect's internal selection state.
|
|
244
|
-
- `src/steps/product-context.tsx:221` — Removed "Tab next" from the `techStack` hint; now reads `"Shift+Tab prev ↑↓ move Space toggle Enter confirm"`.
|
|
245
|
-
- `src/steps/product-context.tsx:238` — Removed "Tab next" from the `coreFeatures` hint; now reads `"Shift+Tab prev ↑↓ move Space toggle Enter confirm"`.
|
|
246
|
-
|
|
247
|
-
### Deferred
|
|
248
|
-
None.
|
|
249
|
-
|
|
250
|
-
### Verification Notes
|
|
251
|
-
- `npm run typecheck`: pass
|
|
252
|
-
- `npm run build`: not run (typecheck sufficient per project standard for low-severity fixes)
|