mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-08 14:34:49 +02:00
chore: trim verbose preamble + coverage audit prose
Compress without removing behavior or voice. Three targeted cuts: 1. scripts/resolvers/testing.ts coverage diagram example: 40 lines → 14 lines. Two-column ASCII layout instead of stacked sections. Preserves all required regression-guard phrases (processPayment, refundPayment, billing.test.ts, checkout.e2e.ts, COVERAGE, QUALITY, GAPS, Code paths, User flows, ASCII coverage diagram). 2. scripts/resolvers/preamble/generate-completion-status.ts Plan Status Footer: was 35 lines with embedded markdown table example, now 7 lines that describe the table inline. The footer fires only at ExitPlanMode time — Claude can construct the placeholder table from the inline description without copying a literal example. 3. Same file's Plan Mode Safe Operations + Skill Invocation During Plan Mode sections compressed from ~25 lines combined to ~12. Preserves all required test phrases (precedence over generic plan mode behavior, Do not continue the workflow, cancel the skill or leave plan mode, PLAN MODE EXCEPTION). NOT touched: - Voice directive (Garry's voice — protected per CLAUDE.md) - Office-hours Phase 6 Handoff (Garry's voice + YC pitch) - Test bootstrap, review army, plan completion (carefully tuned behavior) Token savings (per skill, system-wide): ship/SKILL.md 35474 → 34992 tokens (-482) plan-ceo-review 29436 → 28940 (-496) office-hours 26700 → 26204 (-496) Still over the 25K ceiling. Bigger reduction requires restructure (move large resolvers to externally-referenced docs, split /ship into ship-quick + ship-full, or refactor the coverage audit + review army into shorter prose). That's a follow-up — added to TODOS. Tests: 420/420 pass on gen-skill-docs.test.ts + host-config.test.ts. Goldens regenerated for claude/codex/factory ship. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -338,47 +338,25 @@ When uncertain whether a change is a regression, err on the side of writing the
|
||||
Include BOTH code paths and user flows in the same diagram. Mark E2E-worthy and eval-worthy paths:
|
||||
|
||||
\`\`\`
|
||||
CODE PATH COVERAGE
|
||||
===========================
|
||||
[+] src/services/billing.ts
|
||||
│
|
||||
├── processPayment()
|
||||
│ ├── [★★★ TESTED] Happy path + card declined + timeout — billing.test.ts:42
|
||||
│ ├── [GAP] Network timeout — NO TEST
|
||||
│ └── [GAP] Invalid currency — NO TEST
|
||||
│
|
||||
└── refundPayment()
|
||||
├── [★★ TESTED] Full refund — billing.test.ts:89
|
||||
└── [★ TESTED] Partial refund (checks non-throw only) — billing.test.ts:101
|
||||
CODE PATHS USER FLOWS
|
||||
[+] src/services/billing.ts [+] Payment checkout
|
||||
├── processPayment() ├── [★★★ TESTED] Complete purchase — checkout.e2e.ts:15
|
||||
│ ├── [★★★ TESTED] happy + declined + timeout ├── [GAP] [→E2E] Double-click submit
|
||||
│ ├── [GAP] Network timeout └── [GAP] Navigate away mid-payment
|
||||
│ └── [GAP] Invalid currency
|
||||
└── refundPayment() [+] Error states
|
||||
├── [★★ TESTED] Full refund — :89 ├── [★★ TESTED] Card declined message
|
||||
└── [★ TESTED] Partial (non-throw only) — :101 └── [GAP] Network timeout UX
|
||||
|
||||
USER FLOW COVERAGE
|
||||
===========================
|
||||
[+] Payment checkout flow
|
||||
│
|
||||
├── [★★★ TESTED] Complete purchase — checkout.e2e.ts:15
|
||||
├── [GAP] [→E2E] Double-click submit — needs E2E, not just unit
|
||||
├── [GAP] Navigate away during payment — unit test sufficient
|
||||
└── [★ TESTED] Form validation errors (checks render only) — checkout.test.ts:40
|
||||
LLM integration: [GAP] [→EVAL] Prompt template change — needs eval test
|
||||
|
||||
[+] Error states
|
||||
│
|
||||
├── [★★ TESTED] Card declined message — billing.test.ts:58
|
||||
├── [GAP] Network timeout UX (what does user see?) — NO TEST
|
||||
└── [GAP] Empty cart submission — NO TEST
|
||||
|
||||
[+] LLM integration
|
||||
│
|
||||
└── [GAP] [→EVAL] Prompt template change — needs eval test
|
||||
|
||||
─────────────────────────────────
|
||||
COVERAGE: 5/13 paths tested (38%)
|
||||
Code paths: 3/5 (60%)
|
||||
User flows: 2/8 (25%)
|
||||
QUALITY: ★★★: 2 ★★: 2 ★: 1
|
||||
GAPS: 8 paths need tests (2 need E2E, 1 needs eval)
|
||||
─────────────────────────────────
|
||||
COVERAGE: 5/13 paths tested (38%) | Code paths: 3/5 (60%) | User flows: 2/8 (25%)
|
||||
QUALITY: ★★★:2 ★★:2 ★:1 | GAPS: 8 (2 E2E, 1 eval)
|
||||
\`\`\`
|
||||
|
||||
Legend: ★★★ behavior + edge + error | ★★ happy path | ★ smoke check
|
||||
[→E2E] = needs integration test | [→EVAL] = needs LLM eval
|
||||
|
||||
**Fast path:** All paths covered → "${mode === 'ship' ? 'Step 7' : mode === 'review' ? 'Step 4.75' : 'Test review'}: All new code paths have test coverage ✓" Continue.`);
|
||||
|
||||
// ── Mode-specific action section ──
|
||||
|
||||
Reference in New Issue
Block a user