fix: brief template teaches runnable criteria; commands call validators through the plugin root
The skills reading (2026-10-06) found two defects the operator decided to fix once wave 1 was merged: - the brief template's Success Criteria examples used a pipe and npx, which the criteria runner refuses (and the brief validator now warns on); - trekcontinue and trekexecute called lib/ scripts relative to the working directory, which is the user's repo, not the plugin. Tests fail on the old text first (tests/lib/reading-defects.test.mjs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5f9faeed4a
commit
8094b00861
4 changed files with 55 additions and 8 deletions
|
|
@ -109,8 +109,13 @@ Quantified where possible.*
|
|||
verifiable by running a specific command or observing a specific system behavior.*
|
||||
|
||||
- {criterion — e.g., "All existing tests pass: `npm test` exits 0"}
|
||||
- {criterion — e.g., "New endpoint returns 200: `curl -s localhost:3000/api/health | jq .status` → `"ok"`"}
|
||||
- {criterion — e.g., "No TypeScript errors: `npx tsc --noEmit` exits 0"}
|
||||
- {criterion — e.g., "New endpoint answers ok: `bash tests/health.sh` exits 0 (the script calls the endpoint and checks the status field)"}
|
||||
- {criterion — e.g., "No TypeScript errors: `npm run typecheck` exits 0"}
|
||||
|
||||
One command per criterion, from the runner's allowlist (`npm test`, `npm run <script>`,
|
||||
`node --test`, `pytest`, `bash tests/<script>.sh`, …), with no pipe or `&&`.
|
||||
Anything else is wrapped in a script under `tests/`; otherwise the review
|
||||
reports the criterion as NOT RUN.
|
||||
|
||||
Do NOT write vague criteria:
|
||||
- "It should work" (not testable)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue