Skip to content

docs(vale): fold the dogfood gotchas into create-vale-rule (topic v12) - #381

Merged
theCodeDrift merged 1 commit into
mainfrom
docs/create-vale-rule-dogfood-gotchas
Sep 22, 2026
Merged

theCodeDrift merged 1 commit into
mainfrom
docs/create-vale-rule-dogfood-gotchas

Conversation

@theCodeDrift

Copy link
Copy Markdown
Member

Recipe-only change. create-vale-rule goes v11 to v12 and verify-rule v3 to v4; no CLI behaviour moves, so no changeset (skip-changeset).

Merge order: land this AFTER #380 (feat/vale-raw-authoring-checks), the code half of #360/#361 (the multi-entry raw notice and the vendor-contract pins). This PR closes those two issues and its raw passage quotes the notice verify emits, which only exists once that branch is in.

What

Source

The 2026-09-21 dogfood notes behind #360 to #364 (eleven voice rules over ~1,100 markdown files). Every measurement not quoted from the issues was re-run on this tree's vendored Vale 3.22.0 with a scratch project: the raw join (\bstops + being\b fires on It stops being. and on neither half alone), front-matter reach under raw, text, default, [raw, code, text] and ~frontmatter, the occurrence/min: 1 rule on a document with and without description, the vale-parse-error finding from an unquoted colon, and test on an unparseable fail/ and pass/ fixture.

Verified

  • pnpm build && pnpm cli agent create-vale-rule renders topic v12 with no %(…)s marker left; agent verify-rule renders v4.
  • pnpm cli check clean over the recipes (no-em-dashes, no-hedging, no-blocklist-phrases all quiet).
  • pnpm lint, pnpm typecheck, pnpm --filter @taskless/cli test (98 files, 1623 tests). Two tests caught a literal 0.11.2 and two ISO dates in the first draft; the passages now say "now" and spell the date out.

Noticed, not changed

A pass/ fixture whose front matter Vale cannot parse stays green under test even when it holds a violation, because test counts only findings from the rule under test and the parse-error finding is filed under vale-parse-error. Documented in both recipes; worth a follow-up so test reports the unread fixture.

Fixes #360
Fixes #361
Fixes #362
Fixes #363
Fixes #364

@theCodeDrift theCodeDrift added the skip-changeset PR intentionally ships no release note (bypasses the changeset requirement) label Sep 22, 2026
@theCodeDrift

Copy link
Copy Markdown
Member Author

@claude /review

@claude

claude Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Claude finished @thecodedrift's task in 5m 27s —— View job


Review mode: incremental — read 0 prior review thread(s) before reviewing.

.prior-review.json held no review threads, no review summaries, and no comments other than the @claude /review trigger itself. This is the first review of this PR — everything below is assessed fresh, nothing is being repeated or skipped as previously addressed.

Scope

Docs-only change to two agent recipe files (packages/cli/src/agent/create-vale-rule.md v11→v12, packages/cli/src/agent/verify-rule.md v3→v4), folding measured Vale gotchas from issues #360–#364 into the recipes. I fact-checked essentially every quoted JSON shape, error string, and behavioral claim in the new prose against the current source (rules/vale/run.ts, rules/vale/verify.ts, rules/dispatch.ts, rules/vale/formats.ts, rules/inspect.ts, schemas/check.ts, schemas/rules-verify.ts) rather than taking the prose on faith, since a wrong claim here silently misleads every agent that reads the recipe. Everything checked out exactly as written:

  • The vale-parse-error JSON shape and "Vale could not check this file: …" message match parseErrorResult/formatValeConfigError in run.ts verbatim, including severity: "error".
  • notices being absent from --json output when empty matches schemas/check.ts (.optional()) and commands/check.ts:314 (...(runNotices.length > 0 ? { notices: runNotices } : {})).
  • "fail fixture did not fire: …" matches rules/inspect.ts:447 verbatim; the pass/fail asymmetry for an unparseable fixture matches the firedIn filtering logic in rules/vale/verify.ts (vale-parse-error findings never match result.ruleId === ruleId, so they're invisible to both missingFailures and unexpectedFindings).
  • The Vale notice field description in verify-rule.md matches schemas/rules-verify.ts's valeVerifyOutputSchema.notice description almost word for word.
  • The .taskless/** advisory cross-reference ("step 4 lists the advisory") and the W101 cross-reference ("the mistake step 4 warns of") both point at real content in step 4 of create-vale-rule.md.
  • occurrence's field is token (singular), matching the existing field table elsewhere in the same file; no em dashes were introduced (consistent with the "Verified" section's no-em-dashes claim); all markdown code fences are balanced.

[New] One real risk: the raw-notice passage documents behavior that doesn't exist in this tree yet

packages/cli/src/agent/create-vale-rule.md, the new "raw entries concatenate" bullet (approx. lines 502–538 in the current file) quotes a verify notice:

<id>: raw has N entries; Vale joins them into one pattern with no separator, so the second never matches on its own. Write one entry with (a|b) unless the join is intended.

I grepped the whole packages/cli/src/rules/vale/ and packages/cli/src/schemas/ trees for this text ("raw has", "joins them into one pattern") and for any raw-multi-entry check in verify.ts — there is none. The PR body is explicit about why: this passage "quotes the notice verify emits, which only exists once that branch is in" (#380, feat/vale-raw-authoring-checks), and states this PR must land after #380. I confirmed #380 is still OPEN (mergedAt: null), based on main, not yet merged.

The problem is that PR #381 is opened against main directly rather than stacked on top of feat/vale-raw-authoring-checks, so nothing in the repo mechanically prevents merging #381 before #380. If that happens, the built create-vale-rule recipe (topic v12) will tell every agent that verify reports a raw-entries notice in a specific format, when verify does not actually emit it — the exact "silent, nothing fails, docs quietly stop matching reality" failure mode the rest of this repo's conventions are so careful about elsewhere (see the OpenSpec archive guidance in root CLAUDE.md). The "Verified" section in the PR body only confirms the placeholders render with no %(…)s markers left; it doesn't (and can't, since the code isn't there) verify the notice text against a real verify run.

This isn't a defect in the prose itself — it reads correctly once #380 lands — but it is a real correctness gap in the sequencing, worth calling out explicitly rather than trusting the PR description alone: confirm the merge order is actually enforced (e.g., land #380 first, or convert this into a PR stacked on feat/vale-raw-authoring-checks) before this is merged to main.

No other findings survived verification. The prose is unusually well fact-checked against the vendored Vale binary and the current source; I could not find a factual error, a broken cross-reference, a dangling code fence, or a CLAUDE.md convention violation anywhere else in the diff.

@theCodeDrift

Copy link
Copy Markdown
Member Author

Re: @claude[bot] — "Claude finished @thecodedrift's task in 5m 27s … One real risk: the raw-notice passage documents behavior that doesn't exist in this tree yet"
#381 (comment)

Confirmed: the quoted notice text has no source in this tree (grep "raw has" packages/cli/src outside the recipe returns nothing) and #380 is still open against main, so nothing enforces the order beyond the PR body. The sequencing question (land #380 first, or restack this PR on feat/vale-raw-authoring-checks) is being raised with the maintainer rather than decided here; no change to the prose is needed either way.

— AI Coding Agent

@theCodeDrift
theCodeDrift merged commit e880755 into main Sep 22, 2026
8 checks passed
@theCodeDrift
theCodeDrift deleted the docs/create-vale-rule-dogfood-gotchas branch September 22, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment