* chore(#604): rename get-shit-done/ runtime directory to gsd-core/ Renames the installed runtime directory `get-shit-done/` to `gsd-core/` so the on-disk name matches the package (`@opengsd/gsd-core`), repo, and binary (`gsd-tools`). The npm package name and binary are unchanged; npx/npm consumers are unaffected. Mechanical (bulk, ~90% of the diff): - `git mv get-shit-done gsd-core` - Swept path/identifier references across the repo via `perl -pe 's/get-shit-done(?!-\w)/gsd-core/g'`. The negative lookahead preserves the five legitimate slug variants that are NOT the directory: get-shit-done-{OLD,cc,classic,cli,redux} (old package/repo names). - Build/manifest wiring: package.json (bin, files, coverage globs), tsconfig.build.json (outDir), ~86 .gitignore build-output entries, stryker.config.mjs, scan-ignore files, install.js path strings. - Frozen (not rewritten): CHANGELOG.md history; translated docs (README.<locale>.md and docs/{ja-JP,ko-KR,pt-BR,zh-CN}/). New logic (review here): - src/installer-migrations/003-rename-get-shit-done-to-gsd-core.cts: a proper ADR-0008 installer migration. On upgrade it walks the legacy `~/.claude/get-shit-done/` tree, classifies each file via the prior install manifest, and emits remove-managed / backup-and-remove for managed files while PRESERVING unknown user-added files. Symlink-safe (skips a symlinked root and symlinked entries; bounds-checks every path under configDir). The framework rolls back on install failure. Emptied dirs may remain (framework has no recursive dir-removal primitive) — documented. - scripts/lint-legacy-dir-name.cjs: CI regression guard forbidding the bare `get-shit-done` directory token (split token to avoid self-match; case- insensitive; `(?!-\w)` lookahead allows the slug variants; allowlists CHANGELOG, translated docs, and `gsd-allow-legacy-name` marker lines). Wired into the lint-tests CI job. - Restored scripts/lint-package-identity-drift.cjs detection regexes (the mechanical sweep had wrongly rewritten the old-name patterns it exists to detect) and marked them as intentional legacy references. - TDD tests for the migration and the guard; do.md slash-command guard regex tightened so a `/gsd-core/bin` path segment is not mistaken for a command; changeset + docs/installer-migrations.md row added. Breaking: the installed runtime path moves `~/.claude/get-shit-done/` -> `~/.claude/gsd-core/`. Migration 003 removes the stale legacy dir's managed files (preserving user files) on upgrade. Users with custom hooks/configs hardcoding the old path must update them. Closes #604 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): unsweep pending changesets + allowlist injection-example docs CI fixes for the rename PR: - Do not sweep pending .changeset/*.md (ephemeral release-note fragments, like CHANGELOG); reverted those body edits so 5 pre-existing malformed fragments (missing type/pr) no longer enter the PR diff and trip docs-lint. Allowlisted .changeset/ in the legacy-name guard accordingly. - Allowlisted TEST-EXAMPLES.md and docs/explanation/security-model.md in prompt-injection-scan.sh: they contain intentional injection examples / security-model prose; the path-reference rewrites are kept. CodeQL alerts on this PR are pre-existing (alert lines unchanged by this PR; none in the new migration/guard) and are out of scope for the rename. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): resolve CodeQL alerts surfaced on this PR The rename diff touched files carrying pre-existing CodeQL findings; per the no-pre-existing-dismissal rule, fixing every surfaced alert rather than waving them off. All behavior-preserving: - scripts/ci-test-scope.cjs: build the config-path match from string .includes() instead of a RegExp over an arg-derived value (js/regex-injection). - src/profile-output.cts: escape backslashes before pipe-escaping desc/safeName so the table-cell escape is complete (js/incomplete-sanitization). - tests/{bug-2643,bug-2808,docs-parity-live-registry}: two-pass HTML-comment strip so a bare/unclosed `<!--` cannot survive (js/incomplete-multi-character-sanitization). - tests/inline-plan-threshold: drop the no-op `\s`->`\s` identity replace, keep the meaningful POSIX-class conversion (js/identity-replacement). Verified: build:lib green; the touched test files + ci-test-scope + profile-output suites pass; lint:legacy-name clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): correctly resolve remaining CodeQL alerts (regex-injection + sanitization) The prior commit's fixes for two alerts were ineffective: - ci-test-scope.cjs js/regex-injection: the alert is the CLI-arg-derived `file` reaching static regex `.test(file)` calls (not the config rule). Removed ALL regex over file/t — startsWith/includes/=== string checks + an isWindowsHint helper — so there is no regex sink for the tainted value. - js/incomplete-multi-character-sanitization (3 test files): a single `.replace(/<!--...-->/g,'')` can let `<!--` re-form. Replaced with a fixpoint loop (replace until stable) plus a final bare-opener strip. Verified: no regex over file/t remains; ci-test-scope + the 3 test suites pass; lint:legacy-name clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): make ci-test-scope + comment-strippers regex-free to clear CodeQL CodeQL flags the regex PATTERNS syntactically (regex-injection on the --files arg split; incomplete-multi-character-sanitization on the <!--...--> replace), so loop fixes do not satisfy it. Made these paths regex-free: - ci-test-scope.cjs splitFiles: char-by-char separator tokenizer (no /[,\\s]+/). - 3 test files: indexOf/slice HTML-comment stripper (no .replace(/<!--/)). Behavior preserved; ci-test-scope + the 3 suites pass; guard clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): unblock security base64 scan on the large rename diff The security job hit its 10m timeout: base64-scan.sh choked on the binary test fixture tests/feat-3594-parser-property-style.test.cjs (embedded NUL/ non-UTF8 bytes -> thousands of bogus blobs + "ignored null byte" warnings), and the ~800-file rename diff is slow to scan regardless. - scripts/base64-scan.sh: skip binary-by-content files (grep -Iq .) — they can't carry base64-obfuscated *text* and feeding NUL bytes through the per-line scanner is pathologically slow. collect_files already filtered binary *extensions*; this catches binary *content* in text extensions. - .github/workflows/security-scan.yml: raise the security job timeout 10m->30m to accommodate very large diffs (the scan itself is unchanged). Verified locally: scan skips the fixture, 0 "ignored null byte" warnings, 0 findings, exit 0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): sweep get-shit-done refs introduced by merging next The branch was updated with next (#614/#384/#618 etc.), which reference the get-shit-done/ dir (still named that on next). Swept the stale references in the merged files to gsd-core so the rename stays consistent and lint:legacy-name passes: - commands/gsd/discuss-phase.md (runtime-launcher shim paths) - src/core.cts (getAgentsDir layout comments) - tests/bug-384-agents-runtime-aware.test.cjs (require path to runtime lib) Verified: guard 0 violations; build green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): exclude gsd-core/ path segments from bug-3683 command cross-ref invariant The #614 runtime-launcher shim added to discuss-phase.md references `${_GSD_RUNTIME_ROOT}/gsd-core/bin/...`. bug-3683's REF_PATTERN excluded path-y refs only via lookbehind, but `}` precedes `/gsd-core/` in the shim, so it mis-read the directory path as a dangling `/gsd-core` command ref (same class as the #604 bug-2954 fix). Added a trailing `(?![\w-]*\/)` so `/gsd-<x>/...` path segments are not treated as slash-command references. Verified locally on BOTH platforms before pushing: - mac (node 26) full suite: 0 failures - gsd-test-runner (linux, node22 image) full suite: 0 failures - bug-3683 + bug-2954 pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): lazily resolve findProjectRoot in gsd-tools (harden flaky CI) CI intermittently failed state.test's gsd-tools subprocess with "findProjectRoot is not a function" (flip-flopping across legs; not reproducible on mac full suite, gsd-test linux full suite, test:unit, or state.test x8). findProjectRoot is a re-export from core.cjs (sourced from project-root.cjs); binding it via destructure at module-load can be undefined under a load-ordering edge. Resolve it lazily at call time via a small wrapper so the lookup happens after core.cjs is fully initialized. Verified green on BOTH platforms before pushing: - mac (node 26) full suite: 0 failures - gsd-test-runner (linux, node22) full suite: 0 failures - state.test.cjs: 106/106; gsd-tools loads cleanly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): allowlist verification-patterns.md placeholder examples in secret scan The rename git-mv'd references/verification-patterns.md into gsd-core/, pulling it into the secret-scan diff. It documents stub/placeholder RED-FLAG env-var examples (illustrative Stripe test-key / database-URL / API-key placeholders) — not real credentials. Added it to .secretscanignore with the strict annotation, mirroring the existing gsd-core/workflows/plan-phase.md exception. Verified locally: secret-scan-lint --strict OK; secret-scan --diff origin/next exits 0 with 0 findings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
322
gsd-core/templates/verification-report.md
Normal file
322
gsd-core/templates/verification-report.md
Normal file
@@ -0,0 +1,322 @@
|
||||
# Verification Report Template
|
||||
|
||||
Template for `.planning/phases/XX-name/{phase_num}-VERIFICATION.md` — phase goal verification results.
|
||||
|
||||
---
|
||||
|
||||
## File Template
|
||||
|
||||
```markdown
|
||||
---
|
||||
phase: XX-name
|
||||
verified: YYYY-MM-DDTHH:MM:SSZ
|
||||
status: passed | gaps_found | human_needed
|
||||
score: N/M must-haves verified
|
||||
---
|
||||
|
||||
# Phase {X}: {Name} Verification Report
|
||||
|
||||
**Phase Goal:** {goal from ROADMAP.md}
|
||||
**Verified:** {timestamp}
|
||||
**Status:** {passed | gaps_found | human_needed}
|
||||
|
||||
## Goal Achievement
|
||||
|
||||
### Observable Truths
|
||||
|
||||
| # | Truth | Status | Evidence |
|
||||
|---|-------|--------|----------|
|
||||
| 1 | {truth from must_haves} | ✓ VERIFIED | {what confirmed it} |
|
||||
| 2 | {truth from must_haves} | ✗ FAILED | {what's wrong} |
|
||||
| 3 | {truth from must_haves} | ? UNCERTAIN | {why can't verify} |
|
||||
|
||||
**Score:** {N}/{M} truths verified
|
||||
|
||||
### Required Artifacts
|
||||
|
||||
| Artifact | Expected | Status | Details |
|
||||
|----------|----------|--------|---------|
|
||||
| `src/components/Chat.tsx` | Message list component | ✓ EXISTS + SUBSTANTIVE | Exports ChatList, renders Message[], no stubs |
|
||||
| `src/app/api/chat/route.ts` | Message CRUD | ✗ STUB | File exists but POST returns placeholder |
|
||||
| `prisma/schema.prisma` | Message model | ✓ EXISTS + SUBSTANTIVE | Model defined with all fields |
|
||||
|
||||
**Artifacts:** {N}/{M} verified
|
||||
|
||||
### Key Link Verification
|
||||
|
||||
| From | To | Via | Status | Details |
|
||||
|------|----|----|--------|---------|
|
||||
| Chat.tsx | /api/chat | fetch in useEffect | ✓ WIRED | Line 23: `fetch('/api/chat')` with response handling |
|
||||
| ChatInput | /api/chat POST | onSubmit handler | ✗ NOT WIRED | onSubmit only calls console.log |
|
||||
| /api/chat POST | database | prisma.message.create | ✗ NOT WIRED | Returns hardcoded response, no DB call |
|
||||
|
||||
**Wiring:** {N}/{M} connections verified
|
||||
|
||||
## Requirements Coverage
|
||||
|
||||
| Requirement | Status | Blocking Issue |
|
||||
|-------------|--------|----------------|
|
||||
| {REQ-01}: {description} | ✓ SATISFIED | - |
|
||||
| {REQ-02}: {description} | ✗ BLOCKED | API route is stub |
|
||||
| {REQ-03}: {description} | ? NEEDS HUMAN | Can't verify WebSocket programmatically |
|
||||
|
||||
**Coverage:** {N}/{M} requirements satisfied
|
||||
|
||||
## Anti-Patterns Found
|
||||
|
||||
| File | Line | Pattern | Severity | Impact |
|
||||
|------|------|---------|----------|--------|
|
||||
| src/app/api/chat/route.ts | 12 | `// TODO: implement` | ⚠️ Warning | Indicates incomplete |
|
||||
| src/components/Chat.tsx | 45 | `return <div>Placeholder</div>` | 🛑 Blocker | Renders no content |
|
||||
| src/hooks/useChat.ts | - | File missing | 🛑 Blocker | Expected hook doesn't exist |
|
||||
|
||||
**Anti-patterns:** {N} found ({blockers} blockers, {warnings} warnings)
|
||||
|
||||
## Human Verification Required
|
||||
|
||||
{If no human verification needed:}
|
||||
None — all verifiable items checked programmatically.
|
||||
|
||||
{If human verification needed:}
|
||||
|
||||
### 1. {Test Name}
|
||||
**Test:** {What to do}
|
||||
**Expected:** {What should happen}
|
||||
**Why human:** {Why can't verify programmatically}
|
||||
|
||||
### 2. {Test Name}
|
||||
**Test:** {What to do}
|
||||
**Expected:** {What should happen}
|
||||
**Why human:** {Why can't verify programmatically}
|
||||
|
||||
## Gaps Summary
|
||||
|
||||
{If no gaps:}
|
||||
**No gaps found.** Phase goal achieved. Ready to proceed.
|
||||
|
||||
{If gaps found:}
|
||||
|
||||
### Critical Gaps (Block Progress)
|
||||
|
||||
1. **{Gap name}**
|
||||
- Missing: {what's missing}
|
||||
- Impact: {why this blocks the goal}
|
||||
- Fix: {what needs to happen}
|
||||
|
||||
2. **{Gap name}**
|
||||
- Missing: {what's missing}
|
||||
- Impact: {why this blocks the goal}
|
||||
- Fix: {what needs to happen}
|
||||
|
||||
### Non-Critical Gaps (Can Defer)
|
||||
|
||||
1. **{Gap name}**
|
||||
- Issue: {what's wrong}
|
||||
- Impact: {limited impact because...}
|
||||
- Recommendation: {fix now or defer}
|
||||
|
||||
## Recommended Fix Plans
|
||||
|
||||
{If gaps found, generate fix plan recommendations:}
|
||||
|
||||
### {phase}-{next}-PLAN.md: {Fix Name}
|
||||
|
||||
**Objective:** {What this fixes}
|
||||
|
||||
**Tasks:**
|
||||
1. {Task to fix gap 1}
|
||||
2. {Task to fix gap 2}
|
||||
3. {Verification task}
|
||||
|
||||
**Estimated scope:** {Small / Medium}
|
||||
|
||||
---
|
||||
|
||||
### {phase}-{next+1}-PLAN.md: {Fix Name}
|
||||
|
||||
**Objective:** {What this fixes}
|
||||
|
||||
**Tasks:**
|
||||
1. {Task}
|
||||
2. {Task}
|
||||
|
||||
**Estimated scope:** {Small / Medium}
|
||||
|
||||
---
|
||||
|
||||
## Verification Metadata
|
||||
|
||||
**Verification approach:** Goal-backward (derived from phase goal)
|
||||
**Must-haves source:** {PLAN.md frontmatter | derived from ROADMAP.md goal}
|
||||
**Automated checks:** {N} passed, {M} failed
|
||||
**Human checks required:** {N}
|
||||
**Total verification time:** {duration}
|
||||
|
||||
---
|
||||
*Verified: {timestamp}*
|
||||
*Verifier: Claude (subagent)*
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Guidelines
|
||||
|
||||
**Status values:**
|
||||
- `passed` — All must-haves verified, no blockers
|
||||
- `gaps_found` — One or more critical gaps found
|
||||
- `human_needed` — Automated checks pass but human verification required
|
||||
|
||||
**Evidence types:**
|
||||
- For EXISTS: "File at path, exports X"
|
||||
- For SUBSTANTIVE: "N lines, has patterns X, Y, Z"
|
||||
- For WIRED: "Line N: code that connects A to B"
|
||||
- For FAILED: "Missing because X" or "Stub because Y"
|
||||
|
||||
**Severity levels:**
|
||||
- 🛑 Blocker: Prevents goal achievement, must fix
|
||||
- ⚠️ Warning: Indicates incomplete but doesn't block
|
||||
- ℹ️ Info: Notable but not problematic
|
||||
|
||||
**Fix plan generation:**
|
||||
- Only generate if gaps_found
|
||||
- Group related fixes into single plans
|
||||
- Keep to 2-3 tasks per plan
|
||||
- Include verification task in each plan
|
||||
|
||||
---
|
||||
|
||||
## Example
|
||||
|
||||
```markdown
|
||||
---
|
||||
phase: 03-chat
|
||||
verified: 2025-01-15T14:30:00Z
|
||||
status: gaps_found
|
||||
score: 2/5 must-haves verified
|
||||
---
|
||||
|
||||
# Phase 3: Chat Interface Verification Report
|
||||
|
||||
**Phase Goal:** Working chat interface where users can send and receive messages
|
||||
**Verified:** 2025-01-15T14:30:00Z
|
||||
**Status:** gaps_found
|
||||
|
||||
## Goal Achievement
|
||||
|
||||
### Observable Truths
|
||||
|
||||
| # | Truth | Status | Evidence |
|
||||
|---|-------|--------|----------|
|
||||
| 1 | User can see existing messages | ✗ FAILED | Component renders placeholder, not message data |
|
||||
| 2 | User can type a message | ✓ VERIFIED | Input field exists with onChange handler |
|
||||
| 3 | User can send a message | ✗ FAILED | onSubmit handler is console.log only |
|
||||
| 4 | Sent message appears in list | ✗ FAILED | No state update after send |
|
||||
| 5 | Messages persist across refresh | ? UNCERTAIN | Can't verify - send doesn't work |
|
||||
|
||||
**Score:** 1/5 truths verified
|
||||
|
||||
### Required Artifacts
|
||||
|
||||
| Artifact | Expected | Status | Details |
|
||||
|----------|----------|--------|---------|
|
||||
| `src/components/Chat.tsx` | Message list component | ✗ STUB | Returns `<div>Chat will be here</div>` |
|
||||
| `src/components/ChatInput.tsx` | Message input | ✓ EXISTS + SUBSTANTIVE | Form with input, submit button, handlers |
|
||||
| `src/app/api/chat/route.ts` | Message CRUD | ✗ STUB | GET returns [], POST returns { ok: true } |
|
||||
| `prisma/schema.prisma` | Message model | ✓ EXISTS + SUBSTANTIVE | Message model with id, content, userId, createdAt |
|
||||
|
||||
**Artifacts:** 2/4 verified
|
||||
|
||||
### Key Link Verification
|
||||
|
||||
| From | To | Via | Status | Details |
|
||||
|------|----|----|--------|---------|
|
||||
| Chat.tsx | /api/chat GET | fetch | ✗ NOT WIRED | No fetch call in component |
|
||||
| ChatInput | /api/chat POST | onSubmit | ✗ NOT WIRED | Handler only logs, doesn't fetch |
|
||||
| /api/chat GET | database | prisma.message.findMany | ✗ NOT WIRED | Returns hardcoded [] |
|
||||
| /api/chat POST | database | prisma.message.create | ✗ NOT WIRED | Returns { ok: true }, no DB call |
|
||||
|
||||
**Wiring:** 0/4 connections verified
|
||||
|
||||
## Requirements Coverage
|
||||
|
||||
| Requirement | Status | Blocking Issue |
|
||||
|-------------|--------|----------------|
|
||||
| CHAT-01: User can send message | ✗ BLOCKED | API POST is stub |
|
||||
| CHAT-02: User can view messages | ✗ BLOCKED | Component is placeholder |
|
||||
| CHAT-03: Messages persist | ✗ BLOCKED | No database integration |
|
||||
|
||||
**Coverage:** 0/3 requirements satisfied
|
||||
|
||||
## Anti-Patterns Found
|
||||
|
||||
| File | Line | Pattern | Severity | Impact |
|
||||
|------|------|---------|----------|--------|
|
||||
| src/components/Chat.tsx | 8 | `<div>Chat will be here</div>` | 🛑 Blocker | No actual content |
|
||||
| src/app/api/chat/route.ts | 5 | `return Response.json([])` | 🛑 Blocker | Hardcoded empty |
|
||||
| src/app/api/chat/route.ts | 12 | `// TODO: save to database` | ⚠️ Warning | Incomplete |
|
||||
|
||||
**Anti-patterns:** 3 found (2 blockers, 1 warning)
|
||||
|
||||
## Human Verification Required
|
||||
|
||||
None needed until automated gaps are fixed.
|
||||
|
||||
## Gaps Summary
|
||||
|
||||
### Critical Gaps (Block Progress)
|
||||
|
||||
1. **Chat component is placeholder**
|
||||
- Missing: Actual message list rendering
|
||||
- Impact: Users see "Chat will be here" instead of messages
|
||||
- Fix: Implement Chat.tsx to fetch and render messages
|
||||
|
||||
2. **API routes are stubs**
|
||||
- Missing: Database integration in GET and POST
|
||||
- Impact: No data persistence, no real functionality
|
||||
- Fix: Wire prisma calls in route handlers
|
||||
|
||||
3. **No wiring between frontend and backend**
|
||||
- Missing: fetch calls in components
|
||||
- Impact: Even if API worked, UI wouldn't call it
|
||||
- Fix: Add useEffect fetch in Chat, onSubmit fetch in ChatInput
|
||||
|
||||
## Recommended Fix Plans
|
||||
|
||||
### 03-04-PLAN.md: Implement Chat API
|
||||
|
||||
**Objective:** Wire API routes to database
|
||||
|
||||
**Tasks:**
|
||||
1. Implement GET /api/chat with prisma.message.findMany
|
||||
2. Implement POST /api/chat with prisma.message.create
|
||||
3. Verify: API returns real data, POST creates records
|
||||
|
||||
**Estimated scope:** Small
|
||||
|
||||
---
|
||||
|
||||
### 03-05-PLAN.md: Implement Chat UI
|
||||
|
||||
**Objective:** Wire Chat component to API
|
||||
|
||||
**Tasks:**
|
||||
1. Implement Chat.tsx with useEffect fetch and message rendering
|
||||
2. Wire ChatInput onSubmit to POST /api/chat
|
||||
3. Verify: Messages display, new messages appear after send
|
||||
|
||||
**Estimated scope:** Small
|
||||
|
||||
---
|
||||
|
||||
## Verification Metadata
|
||||
|
||||
**Verification approach:** Goal-backward (derived from phase goal)
|
||||
**Must-haves source:** 03-01-PLAN.md frontmatter
|
||||
**Automated checks:** 2 passed, 8 failed
|
||||
**Human checks required:** 0 (blocked by automated failures)
|
||||
**Total verification time:** 2 min
|
||||
|
||||
---
|
||||
*Verified: 2025-01-15T14:30:00Z*
|
||||
*Verifier: Claude (subagent)*
|
||||
```
|
||||
Reference in New Issue
Block a user