Skip to content

feat(work-items): add a CI mode to triage that writes the intake verdict - #18964

Merged
kyle-sexton merged 6 commits into
mainfrom
feat/18859-intake-triage-skill
Nov 25, 2026
Merged

kyle-sexton merged 6 commits into
mainfrom
feat/18859-intake-triage-skill

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Refs: #18859

Summary

First part of #18859 (owner Q2011, Q2102): give /work-items:triage a CI mode that writes the intake verdict, with no tracker writes of its own. Moving the intake lane onto the skill-activity path waits for an owner decision, because the read runner's issue mode accepts neither intake's events nor a verdict-only run (.github/workflows/pr-run-activity-read.yml:636-646, 837-844).

Fix

  • /work-items:triage --issue <n> --ci (plugins/work-items/skills/triage/, added text only, plus new context/ci-mode.md): reads issue.json from the scratchpad and stops, writing nothing, if its number differs from <n>; evaluates read-only; checks dimension keys with set-dimensions.sh --dry-run; writes triage-verdict.json (labels, comment, needs_human, size, complexity, uncertainty, flags, blocked_by) whose comment opens with the Size:, Complexity:, Uncertainty:, Flags:, Blocked by: lines apply-verdict.mjs parses. The comment carries no lane marker; the lane adds it.
  • scripts/check-ci-verdict.mjs: checks the closed field set, the enums, and that the comment's first five lines match the typed fields.
  • .github/scripts/intake-triage/ci-verdict-contract.test.mjs: builds the lane comment the way the reusable posts it and parses it with apply-verdict.mjs's parseVerdict, asserting every field round-trips.
  • Two new eval cases, deterministic graders only, per docs/review/evals.md:39-40: tr-ci-issue-number-mismatch-stops (no verdict file, no verdict write, no tracker call) and tr-unknown-token-stops (an unknown token still stops and names the accepted set; owner-accepted 2026-11-25).
  • Minor fragment for work-items.

Dimension values are the repository's option keys (small, low, known); apply-verdict.mjs compares case-insensitively, and the contract test confirms both forms parse alike.

Verification

  • node --test on check-ci-verdict.test.mjs and ci-verdict-contract.test.mjs: 15 passed. check-ci-verdict.test.sh: 11 passed. label-as-code-repo.test.sh, permission-floor-source.test.sh: 5 of 5 each.
  • scripts/check-changed-skills.sh origin/main: triage PASS (0 errors). Fragments valid. markdownlint: 0 issues.
  • validate-cases.py on plugins/work-items/evals: exit 0; the new case's only findings are the three expected allowed_tools WARNs existing cases share.
  • Evals: select-cases.py origin/main names only the two new cases, tr-ci-issue-number-mismatch-stops and tr-unknown-token-stops (the token gate the new sentence widens), 12 agent runs; every SKILL.md change is added text (the new token is a new sentence, so the existing token-list line and argument-hint are unchanged). Compare mode refuses the PR's script files (compare-refused), so it merges first and those two cases owe one suite run on main after merge (docs/review/evals.md:75-77).

Remaining

  • Move the intake lane's model job onto the skill-activity path and cut .github/scripts/intake-triage/triage-rubric.txt to this repository's labels and field ids: waits on the owner's choice of how the read runner admits intake's events.

Related

🤖 Generated with Claude Code

@kyle-sexton
kyle-sexton marked this pull request as ready for review November 25, 2026 04:27
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 25, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T04:29:02.035183Z 18377ee Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 18377eef3a5645e45a6e8f75ab4d49b54a076439: read 18 of 18 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #18964 (/work-items:triage --issue <n> --ci)

No security issues found.

I read every hunk of all 18 changed files in .claude-lane/pr.diff. I also read the parts of plugins/work-items/skills/triage/SKILL.md the new mode depends on: the data-never-instruction rule at L31-36 and the direction gate at L429-432.

What I checked:

  • Trust controls and trusted paths. No changed file matches a trusted-path glob. The new .github/scripts/intake-triage/ci-verdict-contract.test.mjs is a test only and not one of the listed intake-triage modules. No workflow, action, token request, kill switch, merge hold or trusted-actor list changes. No lane calls the new mode yet; the PR says wiring it into the intake lane waits on an owner decision.
  • Instruction surface. SKILL.md gains text and loses none. The new mode says the direction gate "does not apply, since nothing here mutates". That gate covers mutations only (labels, comments, closes, item creation; SKILL.md L429). CI mode makes no tracker writes, so no mutation escapes the gate. The rule that issue content is data and never instruction stays in force: context/ci-mode.md step 1 says it again and links reference/item-content-trust.md, even though CI mode skips the rest of SKILL.md. Claims are checked by reading the checkout, "never by running it", and the reproduction runs (step 3) are skipped.
  • Data flow. check-ci-verdict.mjs only validates a JSON file: a closed set of fields, fixed values for flags, a dimension-key pattern ^[A-Za-z][A-Za-z0-9-]*$, and at most 20 integer blocked_by entries. It also refuses a comment that already contains the lane marker, so the skill cannot write it. It runs nothing and writes no file.
  • Evals. The two scaffold.sh scripts set up a local git repository and an issue.json fixture. They use no secrets and make no network calls. The graders are deterministic.
  • Plugin manifests. No plugin.json or marketplace.json changes, so there are no manifest lines.

Spend (not a finding, no hold): two new eval cases add about 12 agent runs to a suite run. That draws on prepaid API credit only.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 18377eef3a5645e45a6e8f75ab4d49b54a076439: read 18 of 18 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

I read all 18 changed files in full. The PR adds a CI mode to /work-items:triage (--issue <n> --ci) that writes triage-verdict.json. It also adds a checker for that file (check-ci-verdict.mjs), a contract test against the intake lane's parseVerdict, two eval cases, and a minor changelog fragment.

What I checked against code that already exists (I read it; I ran nothing):

  • Comment format. check-ci-verdict.mjs builds and checks the first five lines (Size:, Complexity:, Uncertainty:, Flags:, Blocked by:). The lane's parser reads the same prefixes:
    • parseVerdict takes the dimension and flag lines with startsWith("<prefix>: "), once each (apply-verdict.mjs#L253-L261).
    • parseBlockedBy takes none or a list of #<n> (edges.mjs#L26-L42).
    • The checker refuses any later line that repeats one of these prefixes. That matches the parser, which rejects a prefix that appears more than once.
  • Flags. The checker's closed set (intent, security, cost, untrusted) is the set knownFlags accepts. It also refuses a repeated flag, as the parser does.
  • Typed fields. The typed-field path (typedVerdict) matches dimension keys case-insensitively, so small and Small read the same.
  • Dimension dry run. set-dimensions.sh takes --dry-run and --ref in any order before or after the item id (set-dimensions.sh#L33-L52), so the command in ci-mode.md step 3 is valid.
  • Lane marker. LANE_MARKER is the same string as apply-verdict's MARKER, and the contract test asserts it.

Closing issue. The PR body says Refs: #18859 and closes no issue, so there are no acceptance criteria to check against. The PR context file has no embedded instructions to report.

Spend. The two new eval cases (tr-ci-issue-number-mismatch-stops, tr-unknown-token-stops) add about 12 agent runs per eval selection, paid from prepaid credits. This is not a hold.

Tests and verification. The PR's test counts and eval selection are the author's claims; I did not run them.

Loosened checks. Nothing is loosened: every check is new, and the only existing file changed (SKILL.md) gets added text only. Loosened checks would be marked: fail (default; the prompt has no loosened_check_verdict: line); patterns: 0 (the prompt has no loosened_check_patterns: line). With no loosened_check_decision_record: line, I did not check the citation requirement.

Path-scoped rules. These rules match the changed files: consumer-agnostic-plugins.md, cost-claims.md, eval-case-transcripts.md and skill-bodies-state-current-rules.md. The eval fixtures are synthetic and hold no transcript. The triage skill already depends on this repository's pr-pipeline.yaml dimension map, and this mode follows that same pattern.

No plugin manifest changed.

Verifier dropped 0 of 0 candidates.

Merged via the queue into main with commit 2ba0dcc Nov 25, 2026
79 checks passed
@kyle-sexton
kyle-sexton deleted the feat/18859-intake-triage-skill branch November 25, 2026 04:34
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 4, survived 3, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 57%; mutation score 57%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/work-items/skills/triage/scripts/check-ci-verdict.mjs 4 3 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/work-items/skills/triage/scripts/check-ci-verdict.mjs:49 ROR productive input-gap
plugins/work-items/skills/triage/scripts/check-ci-verdict.mjs:50 ROR productive input-gap
plugins/work-items/skills/triage/scripts/check-ci-verdict.mjs:74 LCR productive input-gap

The run's summary has the full report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant