Skip to content

ci(intake-triage): move inline prompts to files and record why reusables track main - #17664

Merged
kyle-sexton merged 9 commits into
mainfrom
fix/issue-16968-automation-shape
Nov 20, 2026
Merged

kyle-sexton merged 9 commits into
mainfrom
fix/issue-16968-automation-shape

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Closes #16968

Summary

Part 1 of 4 of #16966, three items:

  1. Intake eval case: added first-pass-chosen-design-ready, a visual design request whose design is already chosen and whose done-when is exact. Its graders expect what the current rubric gives such an issue: Flags: none, no needs-owner-decision or needs-human label, needs_human false. The rubric now matches the triage skill's human-gated label test: see "Rubric alignment" below.
  2. Inline prompts moved to files, byte-identical at the move commit:
    • the intake rubric (the instructions input) → .github/scripts/intake-triage/triage-rubric.txt;
    • the refine schema string (three legs) → .github/scripts/intake-triage/refine-schema.json;
    • the policy self-test prompt (three calls in pr-run-plugin-evals.yml, three in maintenance-measure-skill-edit-pass.yml) → .github/scripts/plugin-eval/policy-probe-prompt.txt.
  3. The five @main reusable calls: the reason they track main is now recorded in docs/conventions/pr-pipeline/README.md. They are not pinned, because the synced runner policy refuses the repin SHA.

Fix

  • intake-triage.yml: check-born-triaged sparse-checks out triage-rubric.txt from the default branch. It reads the file in a step before Resolve the triage model and passes it as the job output instructions. The intake job passes ${{ needs.check-born-triaged.outputs.instructions }}. If the rubric fails to read, the later steps do not run and claude-args stays empty, so intake does not run, the same fail-closed gate as an unresolved model. The .txt extension keeps markdownlint from asking for reformatting, which would change bytes (pr-review-main/criteria.txt already does the same).
  • The refine legs read the schema with schema=$(<"$REPO_DIR/.github/scripts/intake-triage/refine-schema.json"). The size-split schema stays inline, since the issue does not name it.
  • The probe steps read the prompt from .base/ (the default branch or base SHA, never the pull request checkout) and fill in RUNNER_ROOT with a quoted replacement.
  • Tests that read the rubric or schema out of the workflow now read the files: callers.test.mjs, apply-verdict.test.mjs, reentry-prompt.test.mjs, refine.test.mjs and build-suite. A new callers test pins the wiring (sparse path, read before models, job output, with.instructions). The policy-probe test stages the prompt file and checks that the prompt names the runner root. apply-verdict.test.mjs reads the workflow and the rubric together, so its absence checks still cover both.
  • build-suite.mjs reads the rubric file for INSTRUCTIONS. The re-entry eval README and the triage skill's apply-outcome.md pointer name the new file. There is a work-items patch fragment.
  • @main evidence:
    • With maintenance-check-links-online.yml pinned to d7ba00151fa8429aa9a94fb919f1e517c2e74368 (v0.78.0), node .github/standards/runner-policy/runner-policy.mjs --root . fails with runner-target-contract: the reusable workflow ref @d7ba001… is not an approved commit … use @main. The pin was reverted.
    • None of the four reusables' approvedShas in the synced policy.json lists that SHA.
    • scripts/repin-ci-workflows.sh rewrites only action pins, and repin-ci-workflows.test.sh:115 asserts that an @main reusable stays.
    • ci-workflows main is 6 commits past v0.78.0, so a pin would also roll back the pr-review-cli.yml key-off change.
    • The issue's line numbers for the review callers are stale: the calls are now at pr-review-hosted.yml:259 and pr-review-security-hosted.yml:261.

Rubric alignment

Owner decision Q256, recorded in owner-decisions (docs/owner-decisions.md#L277), verbatim: "No hold (Recommended)". A design request whose visual choice is already made and whose done-when is exact gets no hold.

triage-rubric.txt ESCALATION, after the primary-design paragraph, now matches part 4 of the label test (plugins/work-items/skills/triage/SKILL.md:83-89, a design choice the owner has not made):

   `Flags: intent`, apply `needs-owner-decision`, and ask it as a numbered question with a
-  `RECOMMENDED:` answer and its basis.
+  `RECOMMENDED:` answer and its basis. Only a design choice the owner has not made holds: a
+  design the issue has already chosen, a visual or UX design included, with an exact
+  done-when is not an intent question and needs no sign-off, so set no flag and apply no
+  `needs-owner-decision` or `needs-human` label for it.

The admit graders on first-pass-chosen-design-ready are unchanged.

Path holds

  • .github/scripts/pr-merge/merge-holds.mjs: the moved triage-rubric.txt, refine-schema.json and policy-probe-prompt.txt are gate paths, so a lane still cannot change them without the hold they had inside their workflows (hub commit 2c38afc).

Verification

  • The new eval case was not run: reentry-eval/build-suite.mjs cannot build a suite from the current ci-workflows intake-triage.yml (since ci-workflows febb1ed, the compose step no longer sets schema-file), filed as intake re-entry eval: build-suite reads a schema-file output the reusable no longer sets #17667. The rubric diff above is the evidence for the alignment. The rubric tests (apply-verdict, reentry-prompt, refine, callers) pass after the change.

  • Byte identity of the move (commit 9d0f209, before the Q256 rubric change), with a script in .work/ against origin/main:

    • Rubric: the base instructions value, read with the yaml parser, is identical to the new step's job output, parsed the way the runner's FileCommandManager heredoc parser does (14185 bytes).
    • Refine legs: the prompt and schema files from all three legs, in both refine and size-split modes, are identical.
    • Probe: the prompt at all six probe calls is identical (694 bytes).
    • 20/20 checks came back SAME. A deliberately changed rubric and schema came back DIFF.
  • End to end: suites built by the base and head build-suite.mjs from the same reusable (ci-workflows cb6945d, the parent of febb1ed) have identical case.yaml prompts for all 9 existing cases, both with and without instructions.

  • validate-cases.py on the built head suite (10 cases): clean. A deliberately broken must-pass sample came back FAIL.

  • node --test on callers.test.mjs (297 pass), the intake-triage tests (build-suite, reentry-prompt, refine, apply-verdict, credential-legs: 468 pass), log-api-budget.test.mjs and the plugin-eval workflow tests: 0 failures.

  • actionlint on the three changed workflows: clean.

  • markdownlint-cli2 on the changed markdown: clean.

  • scripts/check-affected.sh: 18 passed, 2 skipped over 24 changed files (the first run asked for a pr-pipeline fragment, added). runner-policy.mjs --root .: passed.

  • merge-holds.test.mjs after the hold-list change: 76 of 76 pass.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj

kyle-sexton and others added 3 commits November 20, 2026 11:10
…les track main

- The intake rubric moves from intake-triage.yml's `instructions` input to
  .github/scripts/intake-triage/triage-rubric.txt. check-born-triaged reads
  it from the default branch before the model resolves and passes it as a
  job output, so a rubric that does not read leaves claude-args empty and
  intake does not run.
- The refine schema string (three legs) moves to refine-schema.json, and the
  policy self-test prompt (six probe calls) to
  .github/scripts/plugin-eval/policy-probe-prompt.txt, with RUNNER_ROOT
  filled in as before. Every prompt and schema is byte-identical to the base
  copy.
- The pr-pipeline README records why the five ci-workflows reusable calls
  track @main: the synced runner policy admits only @main or a commit in
  approvedShas, which do not follow the repin.
- A first-pass intake eval case covers a visual design request whose design
  is already chosen and whose done-when is exact.

Refs: #16968

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
…be prompt under the gate hold

The three files left their workflows, which the lanes cannot push, so a
lane could now edit what decides intake admission without a hold. Listing
them as gate paths in merge-holds.mjs keeps the boundary they had inside
intake-triage.yml and pr-run-plugin-evals.yml.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
The triage rubric's intent rule now matches the triage skill's human-gated
label test: a design the issue has already chosen, a visual or UX design
included, with an exact done-when gets no intent flag and no hold label.
Owner decision Q256: "No hold (Recommended)".

Refs: #16968

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 20, 2026 16:31
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 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-20T16:32:56.682537Z 1f60276 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

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: no security issues found

I read every hunk of all 33 changed files in .claude-lane/pr.diff. This lane already reviewed an earlier head (blocking only: yes), so I only looked for CRITICAL and IMPORTANT findings. Every changed workflow, merge-holds.mjs, pr-pipeline.yaml, triage-rubric.txt, refine-schema.json, policy-probe-prompt.txt and the babysit-prs tests are on trusted paths. For each one I read its whole change and what it gates.

What I checked

  • The intake rubric moved to a file. The rubric now comes from a base checkout, not from pull request code. That trust source matches the old inline instructions, which also came from the workflow file at the same ref.
    • The file is read from .base/ in check-born-triaged. That checkout has no ref:, so it is github.sha for the event (intake-triage.yml#L104-L125).
    • The step writes the output under a random openssl rand -hex 16 delimiter (L140-L149), so the file's text cannot end the heredoc early or inject other outputs.
    • If the file cannot be read, cat fails the step before models runs. claude-args is then never resolved, so intake does not run: this fails closed.
  • The refine schema. All three legs read $REPO_DIR/.github/scripts/intake-triage/refine-schema.json. REPO_DIR is ${{ github.workspace }}/.base, the default-branch tip checkout (intake-triage.yml#L852). The neighbouring refine-prompt.md already comes from there, so no new untrusted input reaches the refine model.
  • The policy-probe prompt. All six probe steps read .base/.github/scripts/plugin-eval/policy-probe-prompt.txt.
    • In pr-run-plugin-evals.yml, .base is the default-branch tip or the dispatched default-branch commit, never the pull request head (L247-L253). That is the same tree policy-probe.mjs and eval-handoff.mjs already run from, so a pull request cannot rewrite the probe to pass the runner-policy self-test trivially.
    • RUNNER_ROOT is substituted with a quoted replacement, and the prompt goes to claude -p quoted, so there is no shell injection.
    • The credential-leak grep and the judge are unchanged.
  • Merge holds. I checked pr-pipeline.yaml, the generated merge-holds.mjs block, the ci-status hold_patterns, and both review callers' hold-paths.
    • The three moved files are added as class: gate, author-lift: false rows. That is stricter, and it keeps the hold they had inside their workflows.
    • Nothing is removed or narrowed. The test pin updates in test_floor_paths.py, test_merge_holds_sync.py and test_babysit_risk.py match the change.
    • The earlier generated-block thread is resolved, and the lines under it have not changed since.
  • Rubric wording (instruction-surface lens). The new ESCALATION sentence narrows when an intent hold applies: a design the issue already chose, with an exact done-when, gets no needs-owner-decision or needs-human label.
    • This is the owner's person-approval friction hold, which the throughput-phase threat model exempts.
    • It does not touch the untrusted, security or cost rules, the text-addressed-to-the-run escalation, or the allowed-author-ids decision check. Not a finding.
  • Trust controls. No trusted actor is added, no token scope grows, the kill switch is untouched, and no new untrusted text reaches a credentialed lane.

Owner friction-hold removal: the intake rubric no longer holds a design the issue already chose and gives an exact done-when for (person-approval hold, Q256).

This change adds no new spend.

I did not find a docs/contracts/instruction-exception-register/README.md in this checkout, so I did not consult the protected-class list. I judged the rubric change by its consequences instead.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 2 inline finding(s) on 1f602762f96610f78dd0a4c0fc055696b86fd788; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: #17664 at ea1fae1 (blocking only)

This lane has already reviewed two earlier heads of this pull request, so this review reports only blocking findings. I read every hunk of all 33 changed files in the full diff.

No blocking findings at this head.

Earlier findings

  • Stale test_floor_paths.py pins (posted at 04cb28f): fixed.
    • test_floor_paths.py now adds PROMPT_TEXT to the no-lift checks and to the sample-path zip(..., strict=True) (8 globs, 8 samples).
    • It moves the class, high and ROWS counts to 153, 89 and 153 − 32.
    • test_babysit_risk.py moves gate from 63 to 66.
    • I did not check the new SHA-256 digests. This lane has no shell, so those pins are as the author wrote them and unverified.
  • Hand-edited HOLD_PATH_CLASSES block and the rubric-sentence test gap: both threads are settled and their lines are unchanged. They stay settled.

What I checked at the call sites

  • intake-triage.yml check-born-triaged:
    • The sparse .base checkout now includes /.github/scripts/intake-triage/triage-rubric.txt.
    • The rubric step runs before models. It uses a random heredoc delimiter, and its extra echo leaves the value ending in one newline, the same as the old | block scalar.
    • If cat fails, the job stops before claude-args is set.
  • Refine legs (three): each leg's .base is a full default-branch checkout (for example L782-787), so $REPO_DIR/.github/scripts/intake-triage/refine-schema.json is present. $(<…) drops the file's trailing newline, so the schema string is unchanged.
  • Probe steps (six): in pr-run-plugin-evals.yml and maintenance-measure-skill-edit-pass.yml, .base is a full checkout of the default branch or base SHA, and no job sets working-directory. The relative .base/... read therefore resolves and never reads the pull request's checkout. The RUNNER_ROOT replacement is quoted, and the updated callers.test.mjs probe test checks the filled-in prompt.

Closing issue #16968

  • Eval case and rubric alignment: met. first-pass-chosen-design-ready was added, and the ESCALATION sentence matches owner decision Q256 as quoted in the PR.
  • Move inline prompts to files: met for the rubric, the refine schema (all three legs) and all six probe prompts. callers.test.mjs checks the new wiring.
  • Five @main reusable calls: met. docs/conventions/pr-pipeline/README.md now records why they track main. The runner-policy evidence in the PR is author-claimed and unverified.

Loosened checks: Loosened checks would be marked: fail (default; no consumer layer); patterns: 0. The prompt has no loosened_check_verdict: or loosened_check_patterns: line, so I used the default. It also has no loosened_check_decision_record: line, so I did not check the citation requirement. No test, lint or check is loosened. The rubric change narrows when intake holds an issue, under owner decision Q256.

Manifests: no plugin.json or marketplace.json changed.

Spend: none. This is a byte-identical prompt move plus one eval case.

Embedded text: none in the PR context, settled-threads or prior-findings files.

Verifier dropped 0 of 0 candidates.

@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 20, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Held by the hub session: #16968's done-when ties the rubric alignment to the eval case's result ("If the lane admits it, align the CI rubric's primary-design list"), and the intake eval harness cannot build until #17667 is fixed. Once it is fixed and the intake cases have run against this branch's rubric, the hub lifts this hold.

…ation-shape

# Conflicts:
#	.github/scripts/intake-triage/reentry-eval/README.md
#	.github/scripts/intake-triage/reentry-eval/build-suite.mjs
#	.github/scripts/intake-triage/reentry-eval/build-suite.test.mjs
@kyle-sexton

Copy link
Copy Markdown
Member Author

Hold lifted by the hub session: the intake eval ran against this branch's rubric (head 44f20b4, reentry-eval/run.sh, ci-workflows f784359, sonnet, judge opus, 3 runs per arm).

Case With rubric Without rubric
first-pass-chosen-design-ready (new) 1.00 (6 of 6 runs) 0.75 (flags-none missing)
first-pass-exact-fix-ready 1.00 0.40
first-pass-open-design-asks 1.00 0.20
first-pass-prepaid-spend-no-cost 1.00 0.50
first-pass-addressed-to-run-escalates 1.00 1.00
outside-spec-flags-untrusted 1.00 0.00
partial-answer-reparks 1.00 0.26
person-needed-keeps-needs-human 1.00 0.46
settled-confirms 1.00 0.63
unsettled-assumption-asks 0.96 0.33

So the lane admits the chosen-design case under the aligned rubric, which is the condition #16968's done-when item 1 sets. run-validity.py (with --scaffolded) reports INVALID only for "permission denials unchecked" (traces not kept), plus WARNs for the stub plugin; every other check passes. A denial cannot make a reply contain the graded Flags: none text, so it cannot have produced these passes.

@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 20, 2026
kyle-sexton and others added 2 commits November 20, 2026 13:28
…pt through floor-paths

The three gate rows sat inside merge-holds.mjs's generated hold-floor
block, so sync-hold-floor.py --check failed and the next sync would have
dropped them. They are now merge.diff-check.floor-paths rows in
pr-pipeline.yaml, class gate like the workflows they came from, and the
sync script writes them into every copy: merge-holds.mjs, both hosted
review callers' hold-paths and ci-status's hold patterns. The floor
count pins in test_merge_holds_sync.py move by the three rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…pt with a person

The three floor-paths rows take author-lift: false. The rubric and the
refine schema decide what intake admits for unattended work, which is the
surface babysit_risk.py keeps out of the author lift, and the workflows
they came from never took it. test_merge_holds_sync.py lists them in its
no-lift surface, so the author-review count is back to 19.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 04cb28f3bd86fb69ca7728130646d79cbb841e81; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread docs/conventions/pr-pipeline.yaml Resolved
kyle-sexton and others added 2 commits November 20, 2026 14:16
The three gate rows this branch adds to merge.diff-check.floor-paths
(triage-rubric.txt, refine-schema.json, policy-probe-prompt.txt, all
author-lift: false) grow the effective floor from 150 to 153 globs,
high from 86 to 89 and gate from 63 to 66; review and author-review
are unchanged. test_floor_paths.py and test_babysit_risk.py now pin
those counts and digests, and list the three paths among the rows
that refuse the author lift.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 2255f8d Nov 20, 2026
71 checks passed
@kyle-sexton
kyle-sexton deleted the fix/issue-16968-automation-shape branch November 20, 2026 19:44
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 20, 2026
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.

Lane follow-ups: the automation-shape pass and six behaviour-preserving items - part 1 of 4

1 participant