feat(skill-quality): fresh-eyes delegation doctrine + conformance gate (check 21)#1096
feat(skill-quality): fresh-eyes delegation doctrine + conformance gate (check 21)#1096kyle-sexton wants to merge 5 commits into
Conversation
…e (check 21) Phase 1 of program #304 per docs/topics/fresh-eyes-checkpoint-audit/PLAN.md: PLUGIN-PHILOSOPHY gains the Delegation mechanics section (dispatch ladder, named-agent bar, model tiers with dated mapping, declared patterns; all claims cited to official pages verified 2026-07-22), and check-skill.sh gains check 21 enforcing the declared-pattern contract (FAIL on malformed/reason-less fresh-eyes-exempt directives; WARN-only curated judgment-language heuristic; fence- and span-aware; CommonMark fence matching; per-file proximity). The mechanical spec ships inside the plugin for third-party authors (skills/check/reference/fresh-eyes-declarations.md); registry row added. Also fixes pre-existing stale check-count references (README still said eighteen/seventeen after checks 19-20 shipped). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Warning Automated review did not complete — this is an infrastructure failure, not a review verdict. Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."
Re-running the job, or pushing a new commit, will retry the review. |
|
Warning Automated security review did not complete — this is an infrastructure failure, not a review verdict. Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."
Re-running the job, or pushing a new commit, will retry the review. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a7c6ab2e1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
nd/nw/nj read as typo candidates (nd -> and); dir_n/word_n/judge_n say what they count. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude encountered an error after 3s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 1s —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46c02c9601
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
🔒 babysit-prs lane claiming this PR for on-branch fix work this cycle (amendment-round: 16, safe tier). Will fix clear branch-owned findings and push; will not resolve threads or merge (safe tier). |
Three review findings, each with a regression fixture: - Fence closers follow CommonMark fully: an info-string line (```yaml) inside an open fence is content, never a closer. - Inline code spans pair backtick runs of exactly equal length, so multi-backtick spans hide their content instead of being split at the first run. - Delegation wording counts only when the line also names the worker or dispatch (agent|worker|advisor|reviewer|verif|dispatch|delegat) — bare "in a fresh context" prose assigns the judgment to no one. Spec pages and the design contract amended to match (dated note). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 1s —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7454583bd4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Two review findings, each with a regression fixture: - Fence openers follow CommonMark indentation: at most three leading spaces; a four-space-indented backtick run is an indented code block, so a malformed directive after it is still scanned and still blocks. - Worker token verif narrowed to verifier: the stem matched bare "verification" prose that dispatches no worker, so a same-context review line was misread as fresh-context delegation. Spec page and the design contract amended to match (dated note). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84bb65834e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fe_char = substr(fe_run, 1, 1) | ||
| fe_len = 0 | ||
| while (substr(fe_run, fe_len + 1, 1) == fe_char) fe_len++ | ||
| if (!fe_fence) { fe_fence = 1; fe_open_char = fe_char; fe_open_len = fe_len } |
There was a problem hiding this comment.
Reject invalid backticks in a fence opener
For a backtick fence, CommonMark does not permit backticks in its info string. A line such as ```markdown ` is therefore ordinary prose, but this unconditional opener records it as a fence and suppresses all following content until a closing run. In particular, a subsequent malformed fresh-eyes-exempt directive is silently skipped and the checker reports PASS instead of its documented blocking directive error.
Useful? React with 👍 / 👎.
| if (low ~ /fresh[- ]context/ \ | ||
| && low ~ /agent|worker|advisor|reviewer|verifier|dispatch|delegat/) { |
There was a problem hiding this comment.
Require whole worker tokens in delegation matches
The worker check is a substring match, so non-worker prose can satisfy the delegation requirement. The fresh evidence is Self-review the work in a fresh context using an agentless workflow.: it produces the “fresh-context delegation declared nearby” INFO even though it explicitly names no worker or dispatch. Add token boundaries (and, ideally, word forms) around worker terms so this same-context review continues to warn.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7d1f4479b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| while (match(line, /`+/)) { | ||
| sp_start = RSTART; sp_len = RLENGTH | ||
| sp_rest = substr(line, sp_start + sp_len) | ||
| sp_close = 0; sp_base = 0; sp_search = sp_rest |
There was a problem hiding this comment.
Track inline code spans across line boundaries
When a literal directive example is inside a valid inline code span that crosses a newline, the opener is processed only in its first record and is not remembered for the next one, so the directive line reaches the parser and produces a blocking malformed-directive failure. For example, `<!-- fresh-eyes-exempt: bogus-class -- literal\nexample -->` fails despite being code-span content; retain delimiter state across input lines before applying the detectors.
Useful? React with 👍 / 👎.
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
Summary
Phase 1 of the fresh-eyes program (#304), per
docs/topics/fresh-eyes-checkpoint-audit/PLAN.md:the delegation-mechanics doctrine and its deterministic conformance gate land together, so every
Wave-2 retrofit PR that follows conforms to a merged spec.
docs/PLUGIN-PHILOSOPHY.md— new## Delegation mechanicssection beside the existingfresh-eyes section: dispatch ladder (generic fresh-context subagent with rich inline
instructions = default; named agent behind the earned bar; cross-vendor advisor on top, always
presence-gated with the generic fallback), inline-template conventions (fresh-context wording,
artifact-not-story, degrade-when-absent), named-agent bar, model-tier ladder with a dated
tier-to-model mapping and recheck trigger, tool-cage framing (Bash-holding allowlists are not
read-only), and the two declared patterns with the
skill-qualityplugin as spec owner(convention-registry row added). Every load-bearing claim cites its official page, fetched and
verified 2026-07-22 (six dated citations). Existing fresh-eyes section reconciled: "a named
subagent removes it" → fresh-context (non-fork) subagent, generic or named.
check-skill.shcheck 21 — fresh-eyes declaration conformance — implements the semanticstable in
docs/topics/fresh-eyes-checkpoint-audit/design/design-resolution.mdverbatim:FAIL on malformed/unknown-class/reason-less
fresh-eyes-exemptdirectives; WARN-onlyjudgment-language heuristic (curated POSIX ERE, seeded from the audited skills' phrasing);
stale-directive WARN (advisory); per-file line proximity (
FRESH_EYES_PROXIMITY_LINES, tunableconstant); fence- and inline-code-span-aware detectors (self-reference guard); CRLF-tolerant;
scan surface = SKILL.md + skill-internal spoke dirs,
vendor/andevals/excluded.plugins/skill-quality/skills/check/reference/fresh-eyes-declarations.mdcarries the mechanical contract (grammar, classes, semantics table, curation policy); check-21
messages point at it so third-party authors can read the rule without this repo's doctrine.
undeclared judgment language / stale directive; PASS delegation prose (both spellings), valid
exemption, fenced literals (self-reference guard), no judgment language.
descriptions "twenty" → "twenty-one"; also fixes pre-existing stale counts (plugin README still
said "eighteen"/"seventeen" after checks 19–20 shipped; the checks list gained the missing
injection-portability row).
Plan deltas (re-verified against current main per the plan's own freshness mandate)
docs/MIGRATION-PLAYBOOK.md:984no longer applies: the current"seventeen" hit (line ~1115) is a dated 2026-07-13 decision record describing what the plugin
shipped THEN — historical, true at its date, left intact.
doctrine claims verified against current official pages; no Brief constraint reopened. Notable
current facts cited in the doctrine: frontmatter
modeldefaults toinherit;CLAUDE_CODE_SUBAGENT_MODEL(model-config page) overrides both the per-invocation param andfrontmatter; no per-plugin model seam in
userConfig.Verification
shellcheckclean oncheck-skill.sh;bash plugins/skill-quality/scripts/check-skill.test.shexits 0 — 56 assertions including 10 new check-21 fixtures (fixture demo of the FAIL half: the
malformed-directive fixture exits 1 naming the defect).
npx markdownlint-cli2clean on every changed markdown file.empirically re-verified (consumer-facing spec path in messages; word-boundary guards on the
judgment regex — "upgrade your own"/"underscore its own" no longer hit; CommonMark
fence-matching so nested
~~~/`` examples cannot desync the scanner; a fixture for thecontradictory-declaration branch).
untouched and the suite proves no regression there, so the full-gate baseline diff is vacuous —
the only possible gainers are check-21 emissions. The shipped check-21 scanner (extracted
verbatim at runtime) ran over all 173 skills: 0 FAIL, 56 WARN sites in 24 skills, every
site triaged and dispositioned (
.work/fresh-eyes-checkpoint-audit/baselines/ check21-warn-triage-20260722.md): expected tranche-1/2 gainers ride Phases 2/4; the rest arehand-verified meta-text/quote/narrative hits; zero mechanical false hits, no regex change
warranted. A clean full-gate pre-change baseline at the merge-base is retained alongside.
Related
(retrofits, corrections, tranche-2 filing).
prematurely close the multi-phase program).