@codewizard-dt/bootstrap 5.3.0 → 6.0.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/README.md +11 -3
- package/bin/cli.js +16 -0
- package/lib/hooks/README.md +124 -3
- package/lib/hooks/claude-settings-guard.js +8 -2
- package/lib/prompts/README.md +1 -1
- package/lib/prompts/migrate-wiki.md +7 -7
- package/lib/scripts/README.md +111 -10
- package/lib/scripts/bootstrap-prefs-tui.js +1222 -0
- package/lib/scripts/install-global.sh +137 -6
- package/lib/scripts/migrate-project.sh +52 -10
- package/lib/scripts/rename-wiki-ids.js +232 -0
- package/lib/scripts/templates/CLAUDE-wiki.md +6 -6
- package/lib/scripts/templates/bootstrap-prefs-schema.json +11 -2
- package/lib/scripts/templates/settings-sandbox-unattended.json +36 -0
- package/lib/scripts/templates/settings-sandbox.json +7 -0
- package/lib/scripts/templates/wiki/conventions.md +9 -9
- package/lib/scripts/templates/wiki/dashboard.html +527 -23
- package/lib/scripts/templates/wiki/index.md +2 -2
- package/lib/scripts/templates/wiki/work/bugs/lifecycle.md +1 -1
- package/lib/scripts/templates/wiki/work/decisions/index.md +12 -4
- package/lib/scripts/templates/wiki/work/decisions/lifecycle.md +11 -9
- package/lib/scripts/templates/wiki/work/requirements/index.md +12 -4
- package/lib/scripts/templates/wiki/work/requirements/lifecycle.md +8 -8
- package/lib/scripts/templates/wiki/work/roadmaps/index.md +11 -3
- package/lib/scripts/templates/wiki/work/roadmaps/lifecycle.md +7 -5
- package/lib/scripts/templates/wiki/work/tasks/index.md +1 -1
- package/lib/scripts/templates/wiki/work/tasks/lifecycle.md +16 -8
- package/lib/scripts/templates/wiki/work/uat/lifecycle.md +3 -3
- package/lib/scripts/wiki-dashboard-server.js +98 -0
- package/lib/skills/README.md +27 -22
- package/lib/skills/_shared/ARCHIVE-WORK-ITEM.md +103 -0
- package/lib/skills/_shared/ID-RESOLUTION.md +142 -0
- package/lib/skills/_shared/SKILL-BOILERPLATE.md +50 -0
- package/lib/skills/adr-assess/SKILL.md +112 -0
- package/lib/skills/{decision-create → adr-create}/SKILL.md +26 -26
- package/lib/skills/adr-deprecate/SKILL.md +190 -0
- package/lib/skills/adr-extract/SKILL.md +255 -0
- package/lib/skills/{decision-finalize → adr-finalize}/SKILL.md +38 -38
- package/lib/skills/{decision-next → adr-next}/SKILL.md +20 -19
- package/lib/skills/{decision-walkthrough → adr-walkthrough}/SKILL.md +23 -29
- package/lib/skills/architecture-audit/SKILL.md +1 -1
- package/lib/skills/autopilot/SKILL.md +110 -0
- package/lib/skills/bootstrap-config/SKILL.md +1 -1
- package/lib/skills/bug-assess/SKILL.md +3 -3
- package/lib/skills/bug-close/SKILL.md +13 -27
- package/lib/skills/{bug-file → bug-create}/SKILL.md +10 -14
- package/lib/skills/bug-triage/SKILL.md +5 -19
- package/lib/skills/demo/SKILL.md +1 -1
- package/lib/skills/extract-feature/SKILL.md +3 -3
- package/lib/skills/git-commit/SKILL.md +4 -4
- package/lib/skills/port-feature/SKILL.md +3 -3
- package/lib/skills/power-mode/SKILL.md +42 -49
- package/lib/skills/prd-assess/SKILL.md +105 -0
- package/lib/skills/{req-compile → prd-compile}/SKILL.md +6 -13
- package/lib/skills/{req-create → prd-create}/SKILL.md +19 -19
- package/lib/skills/prd-deprecate/SKILL.md +173 -0
- package/lib/skills/{req-finalize → prd-finalize}/SKILL.md +20 -29
- package/lib/skills/primer/SKILL.md +2 -2
- package/lib/skills/research/SKILL.md +3 -3
- package/lib/skills/roadmap-assess/SKILL.md +20 -20
- package/lib/skills/roadmap-create/SKILL.md +19 -29
- package/lib/skills/roadmap-next/SKILL.md +16 -28
- package/lib/skills/security-audit/SKILL.md +1 -1
- package/lib/skills/tackle/SKILL.md +13 -15
- package/lib/skills/{task-audit → task-assess}/SKILL.md +34 -44
- package/lib/skills/task-close/SKILL.md +73 -0
- package/lib/skills/{task-add → task-create}/SKILL.md +25 -24
- package/lib/skills/uat-assess/SKILL.md +124 -0
- package/lib/skills/uat-auto/SKILL.md +9 -7
- package/lib/skills/uat-auto-plus/SKILL.md +2 -2
- package/lib/skills/{uat-generate → uat-create}/SKILL.md +10 -12
- package/lib/skills/uat-skip/SKILL.md +5 -9
- package/lib/skills/uat-walk/SKILL.md +2 -2
- package/lib/skills/uat-walk/UAT-CORE.md +29 -16
- package/lib/skills/update-docs/SKILL.md +1 -1
- package/lib/skills/usage-report/SKILL.md +52 -0
- package/lib/skills/usage-report/scripts/pricing.json +22 -0
- package/lib/skills/usage-report/scripts/usage-report.js +518 -0
- package/lib/skills/whats-next/SKILL.md +177 -0
- package/lib/skills/wiki-archive/SKILL.md +12 -23
- package/lib/skills/wiki-lint/SKILL.md +23 -13
- package/lib/skills/wiki-query/SKILL.md +1 -1
- package/lib/skills/wiki-rotate-log/SKILL.md +1 -1
- package/lib/skills/wiki-tidy/SKILL.md +6 -9
- package/package.json +1 -1
- package/lib/scripts/templates/wiki/work/decisions/archive/index.md +0 -10
- package/lib/scripts/templates/wiki/work/requirements/archive/index.md +0 -10
- package/lib/scripts/templates/wiki/work/roadmaps/archive/index.md +0 -10
- package/lib/skills/req-extract-decisions/SKILL.md +0 -241
- package/lib/skills/req-retire/SKILL.md +0 -185
- package/lib/skills/req-update/SKILL.md +0 -265
- package/lib/skills/task-trash/SKILL.md +0 -115
- package/lib/skills/task-update/SKILL.md +0 -136
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: uat-assess
|
|
3
|
+
description: Survey all active UATs together — group them by what each is waiting on (failing cases, partial walks, auto-runnable, manual-only cases, stubs), rank by what each unblocks, and give a status update with a suggested next command for each
|
|
4
|
+
category: researching
|
|
5
|
+
model: claude-sonnet-5
|
|
6
|
+
disable-model-invocation: false
|
|
7
|
+
user-invocable: true
|
|
8
|
+
---
|
|
9
|
+
**Prereqs:** obey `wiki/guides/mcp-tools.md` + `wiki/work/uat/lifecycle.md`; run /primer if not done this session.
|
|
10
|
+
|
|
11
|
+
# UAT Assessment
|
|
12
|
+
|
|
13
|
+
Assess every active UAT in `wiki/work/uat/` together — this is the multi-UAT counterpart to `/uat-walk` (interactive, one UAT) and `/uat-auto` (headless, one UAT), which each operate on exactly one UAT you've already picked. Use this skill first when several UATs are open and you need to decide which to run next, based on what each is waiting on and what finishing it unblocks.
|
|
14
|
+
|
|
15
|
+
This skill is strictly read-only: it never runs a case, never flips a status, never creates a file, and never asks questions. Acting on a UAT is the job of the commands named in each `Next` line.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Step 1: Discover active UATs
|
|
20
|
+
|
|
21
|
+
`list_dir` `wiki/work/uat/` for `.md` files **directly** in it; skip `archive/`, `screenshots/`, `lifecycle.md`, `index.md`, `README.md`. None found → STOP: `No active UATs found in wiki/work/uat/. Use /uat-create <task> to generate one.`
|
|
22
|
+
|
|
23
|
+
A terminal UAT (`passed`, `skipped`, `trashed` per `wiki/work/uat/lifecycle.md`) may not have been swept into `archive/` yet, so also decide active vs. closed by each file's `status:`. Closed UATs are excluded from ranking and counted once in the report footer. If nothing is active after this filter, STOP with the same empty-family text.
|
|
24
|
+
|
|
25
|
+
## Step 2: Parse every active UAT
|
|
26
|
+
|
|
27
|
+
`Read` each file in full and extract:
|
|
28
|
+
|
|
29
|
+
- **Frontmatter**: `id`, `title`, `status`, `task`, `created`, `updated`.
|
|
30
|
+
- **Cases**: every `### UAT-<KIND>-NNN: <title>` heading (ignore the `## Prerequisites` checkboxes — they are not cases) and each case's marker: `[ ]` (not run), `[x]` (pass), `[FAIL: …]`, `[SKIP: …]`.
|
|
31
|
+
- **Backing** for each unresolved case (`[ ]` or `[FAIL: …]`): **unit-backed** when it carries a `Unit Test Command` line or a `Repeatable Unit Test: Created` line; **manual-only** when the field reads `Not applicable` or `Blocked`, or no command exists.
|
|
32
|
+
- **Stub**: a UAT with zero `### UAT-…` case headings, or only the skeleton left by `/uat-skip`.
|
|
33
|
+
|
|
34
|
+
Derive each UAT's state:
|
|
35
|
+
|
|
36
|
+
- `failed` — `status: failed`, or any `[FAIL: …]` case that records a real failure. A `[FAIL: auto-judge: … requires human verification]` marker is `/uat-auto` deferring a case to a person, not a failure: treat that case as unresolved and manual-only, and do not count it toward `failed` or the status/marker drift warning.
|
|
37
|
+
- `in-progress` — `status: in-progress`, or a mix of resolved (`[x]`/`[SKIP: …]`) and unresolved cases.
|
|
38
|
+
- `pending` — every case unresolved and `status: pending`.
|
|
39
|
+
- `stub` — as defined above.
|
|
40
|
+
|
|
41
|
+
A `status:` outside the lifecycle's enum is reported in Step 5c, and the UAT is ranked by its markers alone.
|
|
42
|
+
|
|
43
|
+
## Step 3: Task and roadmap linkage
|
|
44
|
+
|
|
45
|
+
For each active UAT, resolve its `task:` back-link to one task file:
|
|
46
|
+
|
|
47
|
+
Resolve the file per ~/.claude/skills/_shared/ID-RESOLUTION.md — family: tasks · scope: active+archive · ambiguous: headless · empty: n/a
|
|
48
|
+
|
|
49
|
+
Not found, or an empty `task:`, is an orphan: record it for Step 5c and continue — never STOP. Otherwise `Read` the task and record its `status` and its `blocks:` array (the TASK IDs the task gates).
|
|
50
|
+
|
|
51
|
+
Then `search_for_pattern` for `[[TASK-NNNN` (the UAT's task, both ID widths) in `wiki/work/roadmaps/`. For each roadmap that lists it, run the **Parse a roadmap** procedure defined in `lib/skills/roadmap-next/SKILL.md` — do not restate it here, follow it as written — and select roadmaps by their `status:`, never by directory. Record the roadmap item the task would tick, and whether it is the last unchecked item of that roadmap.
|
|
52
|
+
|
|
53
|
+
## Step 4: Rank UATs
|
|
54
|
+
|
|
55
|
+
Order the active UATs, highest priority first, using this precedence:
|
|
56
|
+
|
|
57
|
+
1. **Unblocking power** — the UAT's task `blocks:` other tasks (hard order: a UAT gating another task always outranks the UATs it gates), or its task is the last unchecked item of its roadmap.
|
|
58
|
+
2. **What it waits on**, in this order:
|
|
59
|
+
1. `failed` — a `[FAIL: …]` case that needs a fix;
|
|
60
|
+
2. `in-progress` — partially walked;
|
|
61
|
+
3. `pending` with every unresolved case unit-backed — **auto-runnable** headless via `/uat-auto`;
|
|
62
|
+
4. `pending` with any manual-only case — needs a human;
|
|
63
|
+
5. `stub` — nothing to run.
|
|
64
|
+
3. **Age** — oldest `created` first, then `UAT-NNNN` ascending.
|
|
65
|
+
|
|
66
|
+
Record a one-sentence rationale per UAT — a judgment call the user can override, not a fact.
|
|
67
|
+
|
|
68
|
+
## Step 5: Report
|
|
69
|
+
|
|
70
|
+
Print, in this order:
|
|
71
|
+
|
|
72
|
+
### 5a. Prioritized UATs
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
## Prioritized UATs
|
|
76
|
+
|
|
77
|
+
| Rank | UAT | Status | Waits on | Unblocks | Rationale |
|
|
78
|
+
|------|-----|--------|----------|----------|-----------|
|
|
79
|
+
| 1 | UAT-NNNN — <title> | failed | failing case: UAT-KIND-NNN | TASK-MMMM, ROADMAP-NNNN item 3 | <one sentence> |
|
|
80
|
+
| 2 | UAT-MMMM — <title> | pending | auto-runnable | — | <one sentence> |
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`Waits on` is one of: `failing case` (name the case), `partial walk`, `auto-runnable`, `manual cases: N` (N manual-only cases), `stub`. `Unblocks` lists the gated `TASK-NNNN` IDs and/or the `ROADMAP-NNNN` item from Step 3; `—` if none.
|
|
84
|
+
|
|
85
|
+
### 5b. Status update per UAT
|
|
86
|
+
|
|
87
|
+
One block per UAT, in ranked order:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
### UAT-NNNN — <title>
|
|
91
|
+
- Task: TASK-NNNN (<task status>)
|
|
92
|
+
- Status: <failed | in-progress | pending | stub> — <M/N cases resolved>
|
|
93
|
+
- Summary: <one line>
|
|
94
|
+
- Next: <see below>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
`Next` by state:
|
|
98
|
+
|
|
99
|
+
- failed → fix the failing case, then `/uat-auto <file>`; for a real defect: `/bug-create <description>`
|
|
100
|
+
- in-progress → `/uat-walk <file>`
|
|
101
|
+
- auto-runnable → `/uat-auto <file>`
|
|
102
|
+
- manual-only → `/uat-walk <file>`
|
|
103
|
+
- stub → `/uat-create TASK-NNNN` to regenerate, or `/uat-skip <file>`
|
|
104
|
+
|
|
105
|
+
### 5c. Warnings (omit if none found)
|
|
106
|
+
|
|
107
|
+
Flag, each as its own short block:
|
|
108
|
+
|
|
109
|
+
- a UAT whose task is missing or terminal — a `/task-close` candidate;
|
|
110
|
+
- status/marker drift — `passed` with unchecked cases, `pending` with checked cases;
|
|
111
|
+
- a UAT with an unrecognized `status:`;
|
|
112
|
+
- a UAT row missing or stale in the `wiki/work/uat/index.md` listing.
|
|
113
|
+
|
|
114
|
+
Footer, when Step 1 excluded any closed UAT: `Closed: N (not assessed)`.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Constraints
|
|
119
|
+
|
|
120
|
+
- Read-only — no exception. No file edits, no shell, no prompts, no log or index changes, no status flips.
|
|
121
|
+
- Permitted tools: `list_dir`, `find_file`, `search_for_pattern`, `Read`.
|
|
122
|
+
- Never bash reads (`cat`/`find`/`grep`/`sed`/`ls`).
|
|
123
|
+
- Never run a case's `Unit Test Command` — assessing is not executing; `/uat-auto` and `/uat-walk` do that.
|
|
124
|
+
- Keep the report terse — no preamble, no closing summary beyond the tables above.
|
|
@@ -25,7 +25,7 @@ Headless variant of `/uat-walk`: run every eligible test, auto-judge from determ
|
|
|
25
25
|
|
|
26
26
|
**Never auto-pass a test you cannot verify with hard evidence.** Pass requires a machine-checkable match (UAT-CORE Step 4 "Auto-judge criteria"). On any doubt, uncertainty, or missing evidence → `[FAIL: auto-judge: <reason>]`. **Never** `[SKIP: ...]` (a human verdict). **Never** `[x] Pass` unless the criteria are met exactly. A false pass ships a broken feature; a false fail merely gets re-triaged in the next `/uat-walk` — so this is the single most important rule.
|
|
27
27
|
|
|
28
|
-
Fail-closed means *no oracle*, not *no curl*. A **unit-backed** test (UAT-CORE Step 3 — carries `Repeatable Unit Test: Created: <path>`) has a real machine-checkable oracle even with no `Endpoint:`/`Command:` field, so run it and judge it rather than sending it to a human. What stays human is the genuinely unverifiable: bare Manual cases with no test file, and
|
|
28
|
+
Fail-closed means *no oracle*, not *no curl*. A **unit-backed** test (UAT-CORE Step 3 — carries `Repeatable Unit Test: Created: <path>`) has a real machine-checkable oracle even with no `Endpoint:`/`Command:` field, so run it and judge it rather than sending it to a human. UI cases likewise have a real oracle — a browser run through the Playwright MCP (UAT-CORE Step 4 channel 3). What stays human is the genuinely unverifiable: bare Manual cases with no test file, UI cases whose Expected is visual-only, and UI cases when Playwright is unavailable.
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
@@ -36,7 +36,7 @@ Run UAT-CORE as written, headless throughout:
|
|
|
36
36
|
1. **Step 1** — resolve/parse (auto/plus resolution rules: never prompt; auto-pick lowest-numbered pending on empty/unresolved).
|
|
37
37
|
2. **Step 2** — prerequisites as a **hard gate**: any failed or unverifiable prerequisite aborts → `[FAIL: auto-judge: prerequisite not satisfied — <which>]` on every untested test, then Closure. No repair attempt (that's `/uat-auto-plus`).
|
|
38
38
|
3. **Step 3 + 3.5** — classify all eligible tests, then stub-detect (leave stubs `- [ ] Pass`, do not execute).
|
|
39
|
-
4. **Step 4** — auto-judge each non-stub test in document order by its strongest evidence channel: **live command** (API/CLI with an extractable `**Command**:`) → **unit-backed** (run the recorded `Repeatable Unit Test` file, all 7 criteria) → **human** (`[FAIL: auto-judge: ... requires human verification]` for bare Manual cases
|
|
39
|
+
4. **Step 4** — auto-judge each non-stub test in document order by its strongest evidence channel: **live command** (API/CLI with an extractable `**Command**:`) → **unit-backed** (run the recorded `Repeatable Unit Test` file, all 7 criteria) → **browser** (UI cases: load the Playwright MCP tools, drive the page, assert Expected from the snapshot/DOM/network, save an evidence screenshot — UAT-CORE channel 3) → **human** (`[FAIL: auto-judge: ... requires human verification]` for bare Manual cases, visual-only UI Expected, and Playwright-unavailable — no heuristics). Channel 1 is never overridden by channel 2: a failing live command is a `[FAIL]` regardless of a green unit test. Likewise a browser verdict is final regardless of unit-backing. Eligibility = pending + previously-failed.
|
|
40
40
|
5. **Step 5** — write each verdict **immediately** via `Edit` (no buffering/batching).
|
|
41
41
|
6. **Closure** — archive on all-pass; on any fail leave the file in place and **exit 0** (the orchestrator treats exit as its task done; the pipeline decides what to do with fail markers). This mode keeps screenshots and uses log tag ` (auto)`.
|
|
42
42
|
|
|
@@ -49,13 +49,15 @@ There is **no fix workflow** — record evidence and exit; re-run `/uat-walk` (o
|
|
|
49
49
|
```
|
|
50
50
|
━━━ UAT AUTO COMPLETE ━━━
|
|
51
51
|
File: wiki/work/uat/UAT-005-positions.md · Source: wiki/work/tasks/TASK-005-positions.md · Mode: headless
|
|
52
|
-
✅ Passed
|
|
52
|
+
✅ Passed 8 (live command 4 · unit-backed 2 · browser 2) · ⚠️ Skipped 1 (pre-existing, untouched) · ❌ Failed 2 (auto-judge-uncertain: 1)
|
|
53
53
|
❔ Pending 0 · 🔲 Stub-detected 0 (left untouched — implement first) · Total 9
|
|
54
54
|
Unit-backed:
|
|
55
55
|
• UAT-EDGE-002: Rate Limit Window — `node --test test/rate-limit.test.js` (7 tests, 0 fail)
|
|
56
|
+
Browser-verified:
|
|
57
|
+
• UAT-UI-001: Strength Panel Layout — /strengths, panel visible, 3 rows (screenshot: wiki/work/uat/screenshots/005-UAT-UI-001.png)
|
|
56
58
|
Failed:
|
|
57
59
|
• UAT-API-003: Delete Position — "auto-judge: HTTP 500 expected 204"
|
|
58
|
-
→ /bug-
|
|
60
|
+
→ /bug-create "UAT-API-003: HTTP 500 received, expected 204"
|
|
59
61
|
• UAT-EDGE-001: Empty Positions — "auto-judge: manual test requires human verification"
|
|
60
62
|
Next action: /uat-walk wiki/work/uat/UAT-005-positions.md
|
|
61
63
|
```
|
|
@@ -66,10 +68,10 @@ On all-pass, replace `Next action` with the task/UAT IDs and their new `done`/`p
|
|
|
66
68
|
|
|
67
69
|
## Rules
|
|
68
70
|
|
|
69
|
-
- **No user interaction, ever** — no `AskUserQuestion`, no inline prompts, no clarifying questions. Ambiguity → record fail / exit with a diagnostic summary. Bug-
|
|
70
|
-
- **Verdict discipline** — `[x] Pass` only on concrete machine-verified evidence: a matching live command,
|
|
71
|
+
- **No user interaction, ever** — no `AskUserQuestion`, no inline prompts, no clarifying questions. Ambiguity → record fail / exit with a diagnostic summary. Bug-create suggestions in the summary are informational text only — never call `/bug-create` itself.
|
|
72
|
+
- **Verdict discipline** — `[x] Pass` only on concrete machine-verified evidence: a matching live command, a unit-backed run meeting all 7 criteria, or a Playwright browser run meeting all 4 UI criteria. `[FAIL: auto-judge: <reason>]` for everything else (uncertainty, missing command with no unit test, non-verifiable Expected, visual-only UI Expected, Playwright unavailable, bare manual); **never** `[SKIP]`.
|
|
71
73
|
- **A green exit code is not a pass** — for unit-backed tests, always confirm the run actually executed tests from the recorded file (UAT-CORE Step 4 criterion 3). Exit 0 with 0 tests collected is the one failure mode that looks exactly like success.
|
|
72
|
-
- **
|
|
74
|
+
- **Playwright is allowed and expected for UI tests** — use the Playwright MCP (load its deferred tools via `ToolSearch`) for every `UAT-UI-*` case. Never mark a UI case `[FAIL: ... requires human verification]` without first attempting the browser run, unless Playwright is unavailable or the Expected is visual-only (UAT-CORE Step 4 channel 3). Never pass a UI case from a screenshot alone.
|
|
73
75
|
- **File integrity + Bash hygiene + MCP compliance** — per UAT-CORE Step 5 and "Bash hygiene". Serena for all listing/search; `Edit` for every status flip; no `sed`/`awk`/`ls`/`find`/`grep`/`cat`; never emit literal secrets (only `"$UAT_AUTH_TOKEN"` / `"$UAT_TEST_PASSWORD"`).
|
|
74
76
|
|
|
75
77
|
**Start now — read UAT-CORE.md, resolve the UAT file, and begin.**
|
|
@@ -42,7 +42,7 @@ Run UAT-CORE headless throughout, adding the fix loop:
|
|
|
42
42
|
1. **Step 1** — resolve/parse (auto/plus resolution: never prompt; auto-pick lowest-numbered pending on empty/unresolved).
|
|
43
43
|
2. **Step 2** — prerequisites with **one autonomous repair attempt** each (start dev server in background + `Monitor` for ready; run migrate; run seed; obtain a documented env var), then re-verify. Still failing after one repair → hard gate (`[FAIL: auto-judge: prerequisite not satisfied — <which>]` on every untested test → Closure). Track every background process started — Closure terminates them.
|
|
44
44
|
3. **Step 3 + 3.5** — classify, then stub-detect (leave stubs `- [ ] Pass`; **do not enter the fix loop** for them — implementing a feature from scratch is out of scope; surface in the summary).
|
|
45
|
-
4. **Step 4** — auto-judge in document order by evidence channel: **live command** (API/CLI) and **unit-backed** (the recorded `Repeatable Unit Test` file) are both machine-checkable → on `[FAIL]`, **enter the fix loop (below)**. Bare Manual cases and
|
|
45
|
+
4. **Step 4** — auto-judge in document order by evidence channel: **live command** (API/CLI) and **unit-backed** (the recorded `Repeatable Unit Test` file) are both machine-checkable, as is the **browser** channel for UI cases (Playwright MCP — load its deferred tools via `ToolSearch`; UAT-CORE Step 4 channel 3) → on `[FAIL]`, **enter the fix loop (below)**. Bare Manual cases, visual-only UI Expected, and Playwright-unavailable / unresolvable-base-URL UI cases are `[FAIL: auto-judge: ...]` and **never** enter the fix loop (no machine-checkable signal that a fix worked). Re-runs of a UI case repeat the same browser procedure and overwrite its evidence screenshot. Eligibility = pending + previously-failed; also reset `[FIXING: ...]` → `- [ ] Pass` before running.
|
|
46
46
|
5. **Step 5** — write each verdict/`[FIXING: ...]` transition **immediately** via `Edit` (no buffering).
|
|
47
47
|
6. **Closure** — archive on all-pass; on any fail leave in place and **exit 0**. This mode additionally deletes this task's screenshots, **terminates every background process** it started, and supports multi-task WIP tracking in decision annotation (all per UAT-CORE Closure "Mode differences: uat-auto-plus"). Log tag ` (auto-plus)`.
|
|
48
48
|
|
|
@@ -106,7 +106,7 @@ On all-pass, replace `Next action` with `Archived to archive/` and the new paths
|
|
|
106
106
|
|
|
107
107
|
**Autonomy boundaries** — the agent **may** modify application code, build/config, fixtures, and seed data. It **may not**: modify any UAT file's Steps/Expected/Command; modify test assertions in code (`expect(...)`), including any unit test file backing a unit-backed case; disable, comment out, `xfail`, or `[SKIP: ...]` a failing test; narrow a test filter so fewer cases run; weaken type signatures, lower error-throwing branches, or remove validation to force a pass. When in doubt, decline and surface for review.
|
|
108
108
|
|
|
109
|
-
**Verdict discipline** — `[x] Pass` only on machine-verified evidence against unmodified logic; `[FAIL: auto-fix-exhausted: ...]` after 3 attempts; `[FAIL: auto-fix-declined: ...]` when out of scope/unsafe; `[FAIL: auto-judge: ...]` when unverifiable (UI
|
|
109
|
+
**Verdict discipline** — `[x] Pass` only on machine-verified evidence against unmodified logic; `[FAIL: auto-fix-exhausted: ...]` after 3 attempts; `[FAIL: auto-fix-declined: ...]` when out of scope/unsafe; `[FAIL: auto-judge: ...]` when unverifiable (bare manual, visual-only UI, Playwright unavailable); **never** `[SKIP]`.
|
|
110
110
|
|
|
111
111
|
**Process hygiene** — every background process started must be terminated before exit, regardless of outcome (no orphaned dev servers, type checkers, watchers). Cap concurrent sub-agents and background processes at 3 each.
|
|
112
112
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: uat-
|
|
3
|
-
description:
|
|
2
|
+
name: uat-create
|
|
3
|
+
description: Create UAT tests in wiki/work/uat/ for a task
|
|
4
4
|
category: planning
|
|
5
5
|
model: claude-sonnet-5
|
|
6
6
|
argument-hint: <TASK-NNNN | path/to/task-file.md | feature description>
|
|
@@ -9,7 +9,7 @@ user-invocable: true
|
|
|
9
9
|
---
|
|
10
10
|
**Prereqs:** obey `wiki/guides/mcp-tools.md`; run /primer if not done this session.
|
|
11
11
|
|
|
12
|
-
# UAT
|
|
12
|
+
# UAT Creator
|
|
13
13
|
|
|
14
14
|
Generate comprehensive User Acceptance Tests (UAT) for a feature, writing them to `wiki/work/uat/`.
|
|
15
15
|
|
|
@@ -40,13 +40,11 @@ Promoting a case pays off twice: the assertion becomes repeatable, **and** the c
|
|
|
40
40
|
|
|
41
41
|
### Step 1: Resolve the source task and derive the UAT path
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Resolve the source task per ~/.claude/skills/_shared/ID-RESOLUTION.md — family: tasks · scope: active · ambiguous: interactive · empty: n/a. All task files live in `wiki/work/tasks/` — files never move, status is in frontmatter.
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
2. **Number-slug** (e.g. `014-api-refactor`): use `mcp__serena__find_file` in `wiki/work/tasks/`.
|
|
47
|
-
3. **Feature description**: scan `wiki/work/tasks/` for a matching task via `mcp__serena__list_dir`. If none found, ask the user whether to create a task first via `/task-add`.
|
|
45
|
+
**Feature description** (not a path, ID, or number): scan `wiki/work/tasks/` for a matching task via `mcp__serena__list_dir`. If none found, ask the user whether to create a task first via `/task-create`.
|
|
48
46
|
|
|
49
|
-
**UAT ID mirrors the task number**: TASK-
|
|
47
|
+
**UAT ID mirrors the task number**: TASK-0014 → UAT-0014. Slug mirrors the task slug.
|
|
50
48
|
|
|
51
49
|
Output path: `wiki/work/uat/UAT-NNNN-slug.md`
|
|
52
50
|
|
|
@@ -104,7 +102,7 @@ The key answers **where** promoted tests go, not whether they exist. Its grammar
|
|
|
104
102
|
| `dedicated` | Write promoted tests into the project's dedicated test directory, **resolved from the repo** — an existing test directory if there is one, else the language default (`test/` for JS/TS, `tests/` for Python, `spec/` where that is the local idiom). The directory is detected, never stored: `values` is a closed list of literal tokens, and a stored path would be free text. |
|
|
105
103
|
| `sibling` | Write each test **beside the file under test**, using the language's own convention — `src/parse.ts` → `src/parse.test.ts`, `src/parse.js` → `src/parse.test.js`, `parse.py` → `test_parse.py`, `parse.go` → `parse_test.go`. Never invent a suffix the language's runner does not already discover. |
|
|
106
104
|
| `never` | Create or update **nothing** under any test path. Still run the promotability *analysis* and still record it per case, as `- **Repeatable Unit Test**: Skipped by preference (uatGenerate.promoteTests=never)`. Say once in the completion report (Step 7): "No test files were written (uatGenerate.promoteTests=never). Change with /bootstrap-config." |
|
|
107
|
-
| `unset` | Behave as `dedicated` — today's behaviour. Note once: "uatGenerate.promoteTests is unanswered — /uat-
|
|
105
|
+
| `unset` | Behave as `dedicated` — today's behaviour. Note once: "uatGenerate.promoteTests is unanswered — /uat-create writes promoted tests to a dedicated folder by default. Set it with: node ~/.claude/bootstrap-prefs.js --set uatGenerate.promoteTests --value <sibling\|never\|dedicated> --global" |
|
|
108
106
|
| `true` / `false` / `ask` | **Legacy values** from the key's earlier true/false grammar. Map them and carry on — do not error: `true` → `dedicated`, `false` → `never`, `ask` → ask the user once per invocation (AskUserQuestion) which of the three locations to use, honouring the answer for this run only and never writing it back. Mention once that the stored value is from an older grammar and `/bootstrap-config` can update it. |
|
|
109
107
|
|
|
110
108
|
### The project's layout outranks the stored answer
|
|
@@ -254,7 +252,7 @@ Auth-Role: user
|
|
|
254
252
|
|
|
255
253
|
3. Write `wiki/work/uat/UAT-NNNN-slug.md` using the `Write` tool.
|
|
256
254
|
|
|
257
|
-
4. Update the source task file's frontmatter: set `uat: "[[UAT-NNNN]]"`.
|
|
255
|
+
4. Update the source task file's frontmatter: set `uat: "[[UAT-NNNN]]"`. Edit only — see `~/.claude/skills/_shared/SKILL-BOILERPLATE.md` § Edit hygiene.
|
|
258
256
|
|
|
259
257
|
### Step 5: Update the family index
|
|
260
258
|
|
|
@@ -326,5 +324,5 @@ wiki/work/tasks/
|
|
|
326
324
|
|
|
327
325
|
| Task | UAT file |
|
|
328
326
|
|------|---------|
|
|
329
|
-
| `wiki/work/tasks/TASK-
|
|
330
|
-
| `wiki/work/tasks/TASK-
|
|
327
|
+
| `wiki/work/tasks/TASK-0014-api-refactor.md` | `wiki/work/uat/UAT-0014-api-refactor.md` |
|
|
328
|
+
| `wiki/work/tasks/TASK-0003-user-auth.md` | `wiki/work/uat/UAT-0003-user-auth.md` |
|
|
@@ -29,11 +29,9 @@ No files are moved. Status lives in frontmatter.
|
|
|
29
29
|
|
|
30
30
|
## Step 1: Resolve the Task File
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Locate the task file in `wiki/work/tasks/`. Task files never move; there are no subdirectories to check.
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
2. **Full path** — confirm the file exists with `find_file`. If it does not exist, STOP and report the error.
|
|
36
|
-
3. **Ambiguous / description only** — list matches and ask the user to clarify.
|
|
34
|
+
Resolve the file per ~/.claude/skills/_shared/ID-RESOLUTION.md — family: tasks · scope: active · ambiguous: interactive (ambiguous / description only: list matches and ask the user to clarify) · empty: STOP and report the error
|
|
37
35
|
|
|
38
36
|
Read the task file. Extract:
|
|
39
37
|
- `id:` frontmatter field (e.g. `TASK-007`)
|
|
@@ -94,7 +92,7 @@ Apply the STATUS-FLIP PROCEDURE to both artifacts:
|
|
|
94
92
|
2. Edit `updated:` → today's date
|
|
95
93
|
3. Remove the task's row from `wiki/work/tasks/index.md` (done tasks are not active)
|
|
96
94
|
|
|
97
|
-
|
|
95
|
+
Edit only — see `~/.claude/skills/_shared/SKILL-BOILERPLATE.md` § Edit hygiene.
|
|
98
96
|
|
|
99
97
|
---
|
|
100
98
|
|
|
@@ -119,16 +117,14 @@ Scan every active roadmap (files in `wiki/work/roadmaps/` whose `status: active`
|
|
|
119
117
|
2. Read each file. Look for lines matching `- [ ] [[TASK-NNNN` (wiki-style task link).
|
|
120
118
|
3. For each match, `Edit` `- [ ] [[TASK-NNNN` → `- [x] [[TASK-NNNN` **and** update `updated:` in that roadmap's frontmatter to today.
|
|
121
119
|
4. **Phase sweep**: after flipping this task's line, scan other `- [ ] [[TASK-NNNN` lines in the same `## Phase` block. For each, check if that task's `status:` is `done`. If yes, flip `- [ ]` → `- [x]`.
|
|
122
|
-
5. **Roadmap completion check**: if ALL checkboxes in the roadmap are now `[x]`,
|
|
123
|
-
- `git mv wiki/work/roadmaps/<file>.md wiki/work/roadmaps/archive/<file>.md`
|
|
124
|
-
- Append to `wiki/work/roadmaps/archive/index.md`: `| [[ROADMAP-NNNN]] | Title | done | YYYY-MM-DD |`
|
|
120
|
+
5. **Roadmap completion check**: if ALL checkboxes in the roadmap are now `[x]`, close it in place — read `~/.claude/skills/_shared/ARCHIVE-WORK-ITEM.md` and run its **In-place close (roadmaps, decisions, requirements)** section with `family: roadmaps`, `terminal_status: done`, `log: skip` (Step 6 writes this skill's own log entry). The file is not moved; its `status:` flips to `done` and its row moves from `## Active` to `## Closed` in `wiki/work/roadmaps/index.md`.
|
|
125
121
|
6. Silent no-op if no roadmap references this task.
|
|
126
122
|
|
|
127
123
|
---
|
|
128
124
|
|
|
129
125
|
## Step 5: Decision Annotation
|
|
130
126
|
|
|
131
|
-
Check the task body for a typed link `implements::[[DEC-NNNN#DM]]` or similar decision reference:
|
|
127
|
+
Check the task body for a typed link `implements::[[ADR-NNNN#DM]]` (or legacy `implements::[[DEC-NNNN#DM]]`) or similar decision reference:
|
|
132
128
|
|
|
133
129
|
- If found, locate the decision file in `wiki/work/decisions/`.
|
|
134
130
|
- Search the decision file for any `Source task(s):` line referencing this task.
|
|
@@ -122,7 +122,7 @@ Batch verdict input formats: `all pass` / `all p` (same to all) · `p p f fix s`
|
|
|
122
122
|
|
|
123
123
|
### Verdict actions (per test)
|
|
124
124
|
- **Pass** → `- [x] Pass <!-- YYYY-MM-DD -->`
|
|
125
|
-
- **Fail** → ask inline "What went wrong? (optional)"; mark `- [FAIL: <note or "No details provided">] <!-- YYYY-MM-DD -->`. Once recorded, ask inline "File a bug for this? (y/n)" — default no if the user doesn't answer explicitly. On yes: invoke `Skill` `bug-
|
|
125
|
+
- **Fail** → ask inline "What went wrong? (optional)"; mark `- [FAIL: <note or "No details provided">] <!-- YYYY-MM-DD -->`. Once recorded, ask inline "File a bug for this? (y/n)" — default no if the user doesn't answer explicitly. On yes: invoke `Skill` `bug-create` with a pre-filled description assembled from the test's `Description`/`Steps`/`EXPECTED` fields and the fail note as `Actual Behavior` (pass this as the skill's `$ARGUMENTS` parameter). After `/bug-create` completes (or the user says no), continue to the next test without delay.
|
|
126
126
|
- **Skip** → ask inline "Reason for skipping? (optional)"; mark `- [SKIP: <reason or "User skipped">] <!-- YYYY-MM-DD -->`
|
|
127
127
|
- **Fix now** → see Fix workflow. Process all non-fix verdicts in the batch first, then handle fix-now tests one at a time.
|
|
128
128
|
|
|
@@ -158,7 +158,7 @@ Failed: • UAT-API-003: Delete Position — "Returns 500 instead of 204"
|
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
- **All complete** (no `[FAIL]`/`[FIXING]`) → run UAT-CORE **Closure → All pass**.
|
|
161
|
-
- **Some failed** → leave the file in place (`status: in-progress`); suggest `/uat-walk <path>` to re-test or `/task-
|
|
161
|
+
- **Some failed** → leave the file in place (`status: in-progress`); suggest `/uat-walk <path>` to re-test or `/task-create "Fix UAT failures in <feature>"`.
|
|
162
162
|
- **Aborted** → leave in place; note progress was saved.
|
|
163
163
|
|
|
164
164
|
**Start now — read UAT-CORE.md, resolve the UAT file, and present the first prerequisite or test.**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Steps 1–5 and the closure procedure are identical (or near-identical) across `/uat-walk`, `/uat-auto`, and `/uat-auto-plus`. They live here once. Each SKILL.md defines only what differs for its mode; where a step varies, a **Mode differences** note names the deltas.
|
|
4
4
|
|
|
5
|
-
**Pipeline:** `/task-
|
|
5
|
+
**Pipeline:** `/task-create → /tackle → /uat-create → {uat-walk | uat-auto | uat-auto-plus} → archive/`. Tasks stay at their stable path in `wiki/work/tasks/` until UAT passes; on all-pass this procedure flips the task to `done` and archives both files. Files never move except into `archive/`.
|
|
6
6
|
|
|
7
7
|
**Status vocabulary** (only the status line ever changes — never reformat anything else in a test block):
|
|
8
8
|
|
|
@@ -20,14 +20,9 @@ A UAT file is **complete** when no test has a blocking status (`[FAIL]` / `[FIXI
|
|
|
20
20
|
|
|
21
21
|
## Step 1 — Resolve & parse the UAT file
|
|
22
22
|
|
|
23
|
-
Resolve `$ARGUMENTS` to one file in `wiki/work/uat/` (files never move — no `completed/` subdir
|
|
23
|
+
Resolve `$ARGUMENTS` to one file in `wiki/work/uat/` (files never move — no `completed/` subdir):
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|-------|--------|
|
|
27
|
-
| File path (`wiki/work/uat/UAT-003-user-auth.md`) | use directly |
|
|
28
|
-
| Number-slug (`UAT-003`, `003-user-auth`) | match in `wiki/work/uat/`; if none, STOP + report |
|
|
29
|
-
| Number / description (`3`, `user auth`) | search `wiki/work/uat/`; if ambiguous, resolve per mode |
|
|
30
|
-
| Empty / unresolved | auto-pick per mode |
|
|
25
|
+
Resolve the file per ~/.claude/skills/_shared/ID-RESOLUTION.md — family: uat · scope: active · ambiguous: interactive for uat-walk, headless for uat-auto / uat-auto-plus · empty: per mode (below)
|
|
31
26
|
|
|
32
27
|
**Mode differences (resolution):**
|
|
33
28
|
- **uat-walk** — ambiguous input: list matches, ask the user to clarify. No auto-pick; empty/unresolved → STOP and report.
|
|
@@ -58,7 +53,7 @@ For each unchecked prerequisite: if it is a **runnable check** (server on a port
|
|
|
58
53
|
| **UI** | `UAT-UI-*` prefix, or `Page:` / `Components:` metadata |
|
|
59
54
|
| **Manual** | anything else (edge cases, concurrency, integration logic) |
|
|
60
55
|
|
|
61
|
-
**Unit-backed** is an *attribute*, not a type — it cuts across all three. A test is unit-backed when it records `- **Repeatable Unit Test**: Created: \`<path>\`` (written by `/uat-
|
|
56
|
+
**Unit-backed** is an *attribute*, not a type — it cuts across all three. A test is unit-backed when it records `- **Repeatable Unit Test**: Created: \`<path>\`` (written by `/uat-create` Step 2.5 when it promoted the case to a repeatable unit test). Note the path, and the `- **Unit Test Command**: \`<cmd>\`` line if present; Step 4 uses them as a machine-checkable evidence channel. The other three values of that field — `Not applicable:`, `Blocked:`, `Skipped by preference` — are **not** unit-backed: no test file exists to run.
|
|
62
57
|
|
|
63
58
|
---
|
|
64
59
|
|
|
@@ -91,7 +86,8 @@ Judge each test on the **strongest evidence channel available to it**:
|
|
|
91
86
|
|---|---------|--------------|----------------|
|
|
92
87
|
| 1 | **Live command** | API/CLI test with an extractable `**Command**:` | run the command (below) |
|
|
93
88
|
| 2 | **Unit-backed** | channel 1 unavailable **and** the test is unit-backed (Step 3) | run that unit test file (below) |
|
|
94
|
-
| 3 | **
|
|
89
|
+
| 3 | **Browser (Playwright)** | UI test (Step 3) — `UAT-UI-*` / `Page:` / `Components:` | drive the page with the Playwright MCP (below) |
|
|
90
|
+
| 4 | **Human** | none of the above yields a verdict — no machine-checkable oracle | fail-closed `[FAIL: auto-judge: ...]` |
|
|
95
91
|
|
|
96
92
|
**Channel 1 outranks channel 2 and is never overridden by it.** A live command that fails is `[FAIL]` even when the test is unit-backed and its unit test passes — a green unit test beside a red live call means the live path is broken, and the narrower oracle does not get a vote. Channel 2 is reached only when channel 1 returns no verdict at all: a Manual/Edge case, or an API/CLI case whose body carries no extractable command or no machine-checkable Expected.
|
|
97
93
|
|
|
@@ -122,15 +118,32 @@ Pass requires **ALL**:
|
|
|
122
118
|
|
|
123
119
|
On pass: `- [x] Pass <!-- YYYY-MM-DD -->`; record `via unit test <path>` in run tracking so the summary can count it.
|
|
124
120
|
|
|
125
|
-
**UI
|
|
121
|
+
**UI (channel 3 — Playwright)** — UI cases are run in a real browser through the Playwright MCP, never sent straight to a human. A unit test cannot cover what a UI case exists to check (rendering, flow timing) — `/uat-create` Step 2.5 classifies exactly those as non-promotable — so a `Created:` on a UI case does not substitute for the browser run, and the browser verdict is final.
|
|
126
122
|
|
|
127
|
-
|
|
123
|
+
Setup:
|
|
124
|
+
1. **Load the tools.** Playwright tools are deferred in most sessions — load them with `ToolSearch` (`query: "playwright browser"`, or `select:` the `browser_navigate`, `browser_snapshot`, `browser_click`, `browser_type`, `browser_fill_form`, `browser_press_key`, `browser_select_option`, `browser_wait_for`, `browser_evaluate`, `browser_console_messages`, `browser_take_screenshot`, `browser_close` names). The server name varies by project (`mcp__playwright__*`, or `mcp__playwright-shared__*` when the project ships its own `playwright`) — use whichever is connected. Serve mode on macOS is a shared HTTP service with an isolated browser context per session, so parallel `/uat-auto` agents do not collide.
|
|
125
|
+
2. **Resolve the URL.** Absolute `Page:` URL as written. A bare route (`/strengths`) resolves against the base URL the UAT's prerequisites or the task establish (dev-server URL); none can be determined → `[FAIL: auto-judge: cannot resolve base URL for <route>]`. Never guess a port.
|
|
126
|
+
3. **No Playwright tools available** (not installed, not connected, or the server does not respond after one attempt) → `[FAIL: auto-judge: Playwright MCP unavailable — use /uat-walk]`. That is the only case where a UI test falls back to a human because of tooling.
|
|
128
127
|
|
|
129
|
-
|
|
128
|
+
Run: `browser_navigate` to the page → `browser_snapshot` (accessibility tree first, per `wiki/guides/mcp-tools.md`) → perform the test's Steps with `browser_click` / `browser_type` / `browser_fill_form` / `browser_select_option` / `browser_press_key`, re-snapshotting after each interaction (`browser_wait_for` for async UI) → assert the Expected Result. Credentials come only from `"$UAT_TEST_PASSWORD"`-style env references — never a literal.
|
|
129
|
+
|
|
130
|
+
Pass requires **ALL**:
|
|
131
|
+
1. Every navigation and interaction in Steps completed — a `ref` that cannot be found, a click that throws, or a page that fails to load is `[FAIL: auto-judge: <step> — <what happened>]`.
|
|
132
|
+
2. **Every** observable in Expected is confirmed by a machine-readable source: text/role/label/visibility/enabled state/count from the snapshot, URL from the page, computed style or DOM property via `browser_evaluate`, request/response via `browser_network_requests`. Do not assert from the screenshot alone.
|
|
133
|
+
3. No unexpected `error`-level `browser_console_messages` or failed network requests attributable to the flow, unless Expected says otherwise.
|
|
134
|
+
4. Evidence screenshot saved via `browser_take_screenshot` to `wiki/work/uat/screenshots/<task-number>-<UAT-ID>.png` (created if the directory is missing) — kept on pass and fail alike.
|
|
135
|
+
|
|
136
|
+
On pass: `- [x] Pass <!-- YYYY-MM-DD -->`; record `via browser` in run tracking so the summary can count it. Any criterion fails → `[FAIL: auto-judge: <criterion, actual vs expected>]` (final — the same never-overridden rule as channel 1).
|
|
137
|
+
|
|
138
|
+
**Stay fail-closed on the genuinely subjective.** An Expected that no DOM/snapshot/evaluate check can decide — "looks balanced", "feels responsive", pixel-level layout or colour fidelity, animation quality — yields no verdict: `[FAIL: auto-judge: UI expected is visual-only — use /uat-walk]`. Do not judge those from a screenshot by eye. When Expected mixes checkable and visual-only observables, the whole case is visual-only (partial coverage is not a pass).
|
|
139
|
+
|
|
140
|
+
**Manual** → unit-backed goes to channel 2. Otherwise always `[FAIL: auto-judge: manual test requires human verification]`, with no heuristic evaluation — intentional fail-closed: `/uat-create` produced a bare manual test because it expected a human.
|
|
141
|
+
|
|
142
|
+
`/uat-walk` does not auto-judge — the user issues every verdict. `/uat-auto-plus` enters its fix loop after a channel 1, 2, or 3 `[FAIL]` that reports a real assertion or interaction failure (each has a machine-checkable signal that a fix worked); never after a channel 4 `[FAIL]`, and never after a tooling `[FAIL]` (Playwright unavailable, base URL unresolvable).
|
|
130
143
|
|
|
131
144
|
### Bash hygiene — API/CLI and unit-backed tests (all modes)
|
|
132
145
|
|
|
133
|
-
**One program invocation per Bash call: one `curl` (as-is), optionally one `\| jq` stage. Nothing else.** If a generated `**Command**:` block violates this, rewrite it to the clean form before running (canonical style: `lib/skills/uat-
|
|
146
|
+
**One program invocation per Bash call: one `curl` (as-is), optionally one `\| jq` stage. Nothing else.** If a generated `**Command**:` block violates this, rewrite it to the clean form before running (canonical style: `lib/skills/uat-create/SKILL.md` "Curl command standards"). Never emit literal password/token values — only `"$UAT_AUTH_TOKEN"` / `"$UAT_TEST_PASSWORD"` references.
|
|
134
147
|
|
|
135
148
|
Forbidden (each triggers an approval prompt and obscures output): multiple `curl`s in one call · `&&` / `;` / `\|\|` chaining · `echo` banners · `-w` format strings · `-o /tmp/...` then re-read · defensive flags (`--max-time`) · pre-assigned `TOKEN=...` vars · `\` line-continuations · piping to `head`/`tee`/redirection. Capture per test: HTTP status, response body (truncate display to ~50 lines; never write a temp file to read it back), connection errors.
|
|
136
149
|
|
|
@@ -156,8 +169,8 @@ Runs once no test has a blocking status. Two outcomes.
|
|
|
156
169
|
4. **Archive both** (`git mv` via Bash; index appends via `Edit`):
|
|
157
170
|
- `git mv wiki/work/uat/<UAT>.md wiki/work/uat/archive/` → append `| [[UAT-NNNN]] | Title | passed | YYYY-MM-DD |` to `wiki/work/uat/archive/index.md`
|
|
158
171
|
- `git mv wiki/work/tasks/<TASK>.md wiki/work/tasks/archive/` → append `| [[TASK-NNNN]] | Title | done | YYYY-MM-DD |` to `wiki/work/tasks/archive/index.md`
|
|
159
|
-
5. **Roadmap auto-checkoff** — scan `wiki/work/roadmaps/` for `status: active` files. For each: Edit `- [ ] [[TASK-NNNN` → `- [x] [[TASK-NNNN`; then sweep remaining `- [ ]` free-text lines, checking the ones the completing task clearly accomplished (leave uncertain ones). If all items are now `[x]`:
|
|
160
|
-
6. **Decision annotation** — check the task body for `implements::[[DEC-NNNN#DM]]
|
|
172
|
+
5. **Roadmap auto-checkoff** — scan `wiki/work/roadmaps/` for `status: active` files. For each: Edit `- [ ] [[TASK-NNNN` → `- [x] [[TASK-NNNN`; then sweep remaining `- [ ]` free-text lines, checking the ones the completing task clearly accomplished (leave uncertain ones). If all items are now `[x]`: close the roadmap in place — read `~/.claude/skills/_shared/ARCHIVE-WORK-ITEM.md` and run its **In-place close (roadmaps, decisions, requirements)** section with `family: roadmaps`, `terminal_status: done` (status flip, `## Active` → `## Closed` index row move; no `git mv`, no `archive/`). Silent no-op if no roadmap references the task. `Edit` only (except the task/UAT `git mv` above).
|
|
173
|
+
6. **Decision annotation** — check the task body for `implements::[[ADR-NNNN#DM]]` (or legacy `implements::[[DEC-NNNN#DM]]`). If found: open the decision file in `wiki/work/decisions/` (`ADR-NNNN-slug.md`, or legacy `DEC-NNNN-slug.md`), append `— implemented YYYY-MM-DD` to this task's `Source task(s):` line. Then check `wiki/work/tasks/` **and** `tasks/archive/` for other `todo|in-progress` tasks with the same `implements::[[ADR-NNNN#DM]]` (either prefix form); if none remain, append `— decision fully implemented YYYY-MM-DD` on a new line in the `## DM.` block. Sweep remaining `- [ ]` items in that block, checking the ones this task accomplished. `Read` then `Edit` only — never `sed`.
|
|
161
174
|
7. **Log entry** — append to `wiki/log.md`:
|
|
162
175
|
```
|
|
163
176
|
## [YYYY-MM-DD] uat | UAT-NNNN passed<MODE-TAG> · TASK-NNNN done
|
|
@@ -41,7 +41,7 @@ In one pass, determine what shipped this session. Prefer `git status` / `git dif
|
|
|
41
41
|
|
|
42
42
|
For each `wiki/work/tasks/NNN-slug.md` whose steps were implemented:
|
|
43
43
|
- Flip `- [ ]` → `- [x]` for each completed step using **`Edit`** (one call per checkbox).
|
|
44
|
-
-
|
|
44
|
+
- Edit only — see `~/.claude/skills/_shared/SKILL-BOILERPLATE.md` § Edit hygiene (never `perl -i`).
|
|
45
45
|
- Do **not** move the file. Task files stay in `wiki/work/tasks/` until `/uat-walk` archives them to `archive/`.
|
|
46
46
|
|
|
47
47
|
### Step 3: Update `PROJECT_STATUS.md` (if it exists)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: usage-report
|
|
3
|
+
description: Locally parse Claude Code session logs into per-project token and estimated-cost rollups by model and skill (offline, read-only)
|
|
4
|
+
category: researching
|
|
5
|
+
model: claude-haiku-4-5-20251001
|
|
6
|
+
argument-hint: "[--all-projects] [--since YYYY-MM-DD]"
|
|
7
|
+
disable-model-invocation: false
|
|
8
|
+
user-invocable: true
|
|
9
|
+
---
|
|
10
|
+
**Prereqs:** obey `wiki/guides/mcp-tools.md`.
|
|
11
|
+
|
|
12
|
+
# /usage-report — Token and cost rollups from local session logs
|
|
13
|
+
|
|
14
|
+
Runs a bundled zero-dependency Node script over the Claude Code transcripts in `~/.claude/projects/**/*.jsonl` and renders the JSON it emits as a short human summary. Its purpose is to let the haiku/sonnet/opus tier declared in each skill's frontmatter be verified against what actually ran.
|
|
15
|
+
|
|
16
|
+
**This skill is read-only and offline.** It reads local transcript files only; it writes no files, makes no network request, and calls no API. Do not save the JSON or the summary anywhere.
|
|
17
|
+
|
|
18
|
+
## Step 1 — Run the script
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
node ~/.claude/skills/usage-report/scripts/usage-report.js $ARGUMENTS
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Pass `$ARGUMENTS` through unchanged. Supported flags: `--project <path>`, `--all-projects`, `--since YYYY-MM-DD`, `--until YYYY-MM-DD`, `--pretty`. Default scope is the current project (subagent transcripts included); `--all-projects` widens it to every project.
|
|
25
|
+
|
|
26
|
+
- **Exit 2** = unknown or malformed flag. Show the usage text from stderr verbatim and stop.
|
|
27
|
+
- Any other non-zero exit: show stderr and stop; do not guess at numbers.
|
|
28
|
+
- If the script file is missing, tell the user to run `npx @codewizard-dt/bootstrap update` (or `./lib/scripts/install-global.sh --skip-mcps`) to install it, then stop.
|
|
29
|
+
|
|
30
|
+
## Step 2 — Parse and render
|
|
31
|
+
|
|
32
|
+
Parse stdout as JSON (`schemaVersion: 1`).
|
|
33
|
+
|
|
34
|
+
**Empty project.** If `totals.turns == 0`, print one line — `No usage found for <scope.project> (no transcripts, or none in the requested range).` — and stop.
|
|
35
|
+
|
|
36
|
+
Otherwise render, in this order:
|
|
37
|
+
|
|
38
|
+
1. **Totals** — scope (`scope.project`, or "all projects"), range (`range.since` / `range.until` when set), input / output / cache-write / cache-read tokens, estimated cost, turns.
|
|
39
|
+
2. **By model** — table from `byModel`: model, tier, turns, input, output, cache-write, cache-read, est. cost. Sort by cost, highest first.
|
|
40
|
+
3. **By skill** — table from `bySkill`, sorted by cost, highest first: skill, turns, est. cost, `declaredModel`, observed models (keys of `models` with turn counts), and a `declared vs observed` column. Render the `modelCheck` field in the `declared vs observed` column — do not re-compare `declaredModel` to the `models` keys yourself, because the script compares model families (haiku/sonnet/opus), so an alias like `sonnet` matches `claude-sonnet-5`. Show `MISMATCH` for `mismatch`, `ok` for `match`, and `-` for `undeclared` (no declared model, or `inherit`) or `unknown` (a model outside the known families, so it cannot be compared). Keep the `(none)` bucket in the table.
|
|
41
|
+
4. **Top 5 cost days** — the five `byDay` entries with the highest `cost` (date, est. cost, turns).
|
|
42
|
+
|
|
43
|
+
Show a `null` cost as `n/a` and never sum it as zero.
|
|
44
|
+
|
|
45
|
+
## Step 3 — State the caveats
|
|
46
|
+
|
|
47
|
+
Close with these notes, briefly:
|
|
48
|
+
|
|
49
|
+
- **Costs are estimates.** They are tokens times a shipped per-model price table (`meta.pricingAsOf`); subscription plans are not billed per token.
|
|
50
|
+
- **Per-skill attribution is a heuristic.** A turn is credited to the last skill invoked in that session (subagents included) until the next invocation; turns before any invocation fall in the `(none)` bucket. A `MISMATCH` can be legitimate (a skill's subagents or the user's model choice) and is a prompt to look, not a verdict.
|
|
51
|
+
- **Unpriced models.** If `meta.unpricedModels` is non-empty, list them: their tokens are counted but their cost is `n/a` and excluded from cost totals.
|
|
52
|
+
- If `meta.skippedLines > 0`, mention that many unparseable transcript lines were skipped.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"asOf": "2026-09-19",
|
|
3
|
+
"models": {
|
|
4
|
+
"claude-fable-5-1": { "tier": "other", "input": 10, "output": 50, "cacheWrite": 12.5, "cacheWrite1h": 20, "cacheRead": 0.25 },
|
|
5
|
+
"claude-fable-5": { "tier": "other", "input": 10, "output": 50, "cacheWrite": 12.5, "cacheWrite1h": 20, "cacheRead": 1.0 },
|
|
6
|
+
"claude-opus-5": { "tier": "opus", "input": 5, "output": 25, "cacheWrite": 6.25, "cacheWrite1h": 10, "cacheRead": 0.5 },
|
|
7
|
+
"claude-opus-4-8": { "tier": "opus", "input": 5, "output": 25, "cacheWrite": 6.25, "cacheWrite1h": 10, "cacheRead": 0.5 },
|
|
8
|
+
"claude-opus-4-7": { "tier": "opus", "input": 5, "output": 25, "cacheWrite": 6.25, "cacheWrite1h": 10, "cacheRead": 0.5 },
|
|
9
|
+
"claude-opus-4-6": { "tier": "opus", "input": 5, "output": 25, "cacheWrite": 6.25, "cacheWrite1h": 10, "cacheRead": 0.5 },
|
|
10
|
+
"claude-opus-4-5": { "tier": "opus", "input": 5, "output": 25, "cacheWrite": 6.25, "cacheWrite1h": 10, "cacheRead": 0.5 },
|
|
11
|
+
"claude-opus-4-1": { "tier": "opus", "input": 15, "output": 75, "cacheWrite": 18.75, "cacheWrite1h": 30, "cacheRead": 1.5 },
|
|
12
|
+
"claude-opus-4-2025": { "tier": "opus", "input": 15, "output": 75, "cacheWrite": 18.75, "cacheWrite1h": 30, "cacheRead": 1.5 },
|
|
13
|
+
"claude-opus-4-0": { "tier": "opus", "input": 15, "output": 75, "cacheWrite": 18.75, "cacheWrite1h": 30, "cacheRead": 1.5 },
|
|
14
|
+
"claude-sonnet-5": { "tier": "sonnet", "input": 2, "output": 10, "cacheWrite": 2.5, "cacheWrite1h": 4, "cacheRead": 0.2 },
|
|
15
|
+
"claude-sonnet-4-6": { "tier": "sonnet", "input": 3, "output": 15, "cacheWrite": 3.75, "cacheWrite1h": 6, "cacheRead": 0.3 },
|
|
16
|
+
"claude-sonnet-4-5": { "tier": "sonnet", "input": 3, "output": 15, "cacheWrite": 3.75, "cacheWrite1h": 6, "cacheRead": 0.3 },
|
|
17
|
+
"claude-sonnet-4-2025": { "tier": "sonnet", "input": 3, "output": 15, "cacheWrite": 3.75, "cacheWrite1h": 6, "cacheRead": 0.3 },
|
|
18
|
+
"claude-sonnet-4-0": { "tier": "sonnet", "input": 3, "output": 15, "cacheWrite": 3.75, "cacheWrite1h": 6, "cacheRead": 0.3 },
|
|
19
|
+
"claude-haiku-4-5": { "tier": "haiku", "input": 1, "output": 5, "cacheWrite": 1.25, "cacheWrite1h": 2, "cacheRead": 0.1 },
|
|
20
|
+
"claude-3-5-haiku": { "tier": "haiku", "input": 0.8, "output": 4, "cacheWrite": 1, "cacheWrite1h": 1.6, "cacheRead": 0.08 }
|
|
21
|
+
}
|
|
22
|
+
}
|