Skip to content

fix(discovery): give the research Effort-ceiling sentence headroom in the re-attach slice - #12647

Closed
melodic-automation-lanes[bot] wants to merge 2 commits into
mainfrom
work-resolve-issue/issue-12631-41571316834-1
Closed

melodic-automation-lanes[bot] wants to merge 2 commits into
mainfrom
work-resolve-issue/issue-12631-41571316834-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Closes #12631

Summary

Opened by the work-resolve-issue lane. The run's own summary:

The sentence 'The Effort row is the ceiling over discipline 8' moved from the top of '### Effort, source breadth' into the Disciplines intro of plugins/discovery/skills/research/SKILL.md. It now ends at about byte 15,225, down from about 19,997, so it has about 2,775 bytes more room than the 2,000 the issue asks for. The 20,000-byte window stays: contract.test.sh:351-357 says it stands in for the first 5,000 tokens that compaction re-attaches, so option 2 (check the whole file) was rejected. Moving the sentence earlier pushes the '### Effort, source breadth' heading later, so the N-topic fan-out grading paragraph moved from acceptance gate step 2 to the 'Two or more separable topics' bullet under '## The deep tier'. Step 2 keeps a one-line pointer to it, and context/deep-tier.md:179-188 and context/dispatch.md:234-263 already carry the same rules. The heading now ends at about byte 19,500, up from about 19,946 of room before.

Not verified

  • bash plugins/discovery/scripts/contract.test.sh was not executed: this lane's Bash runs only the named wrappers. Its slice, word-count and assert_present checks on research/SKILL.md were reproduced with Grep byte-mode regexes; the full suite is left to the PR's CI.
  • Trade-off: the full N-topic fan-out grading paragraph now sits after byte 20,000. After compaction only the step 2 pointer survives inside the slice; context/deep-tier.md, which the deep tier requires reading before any dispatch, carries the full rule.
  • Tidy: the ai-slop deterministic detector (detect.sh) and its fix-flow semantic-diff subagent could not run because Bash runs only the lane wrappers. The rubric was applied by reading the listed lines; write-for-agents found nothing to change.
  • The '### Effort, source breadth' heading has about 460-500 bytes of room before byte 20,000, so a large edit above it (for example from #12517) still needs a recheck.

Fix

  • plugins/discovery/skills/research/SKILL.md: moved the Effort-ceiling sentence into the Disciplines intro, with a pointer to 'Effort, source breadth' below; the Effort subsection now opens with 'Rationale for the ceiling over discipline 8, and skipped-phase N/A'; moved the 'Fanning out over N topics'
  • .changes/discovery/work-resolve-issue-issue-12631-41571316834-1-f83c6418.md: new patch changelog fragment describing the move.

Verification

The runner ran each check from the base copy against 5517692:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • Grep byte-mode regex (?s-u)\A.{0,15953}The Effort row is the ceiling over discipline 8: matches, so the sentence ends at or before byte 16,000 (the review subagent measured the start at byte 15,145, ending at about 15,225).
  • Grep byte-mode regex: '### Effort, source breadth' starts within the first 19,500 bytes and 'Every accepted claim follows from its sources jointly' within the first 19,300; none of the seven slice phrases matches after byte 20,000; the other slice phrases sit earlier than before.
  • Grep word-count regex \A\s*(?:\S+\s+){7000}: no match in SKILL.md and a match in context/discipline.md, so the hub still has fewer words than the spoke (contract.test.sh:343-349).
  • Grep: the contract.test.sh:557 pattern '^ +**Fanning out over N topics.*fresh verifier for the verifier-owned rows' and the line 1402 phrase both still match SKILL.md.
  • check-changelog-fragments: all 7 fragments valid.
  • check-changed-skills: research PASS, 0 errors, 15 warnings (all pre-existing size and fresh-eyes warnings, plus body grew 338 -> 339 lines).
  • check-affected: 11 passed, 7 skipped (checks that run code from the checked tree), the rest CI-only.
  • Fresh-context review subagent: no contract assertion broken and no reference in plugins/discovery depends on the old placement. It flagged that the fragment overstated the headroom (fixed) and that the line-123 'ceiling' lacked its referent (fixed); it also noted the full fan-out paragraph now sits
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41571316834

Left out: the items under Not verified.

Related

#12631

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #12647

No security issues found.

I read every hunk of both changed files:

  • plugins/discovery/skills/research/SKILL.md: the change moves two passages and drops nothing.
    • The sentence "The Effort row is the ceiling over discipline 8" moves from the top of "Effort, source breadth" up into the Disciplines intro. Its wording is unchanged.
    • The "Fanning out over N topics" grading paragraph moves out of acceptance gate step 2 and into the "Two or more separable topics" bullet under "The deep tier". Step 2 keeps a one-line pointer to it.
  • .changes/discovery/...f83c6418.md: a new patch changelog fragment. It is prose only.

Instruction-surface lens. The diff moves skill instructions, so I checked whether any rule was removed or narrowed. None was:

  • Each rule the paragraph sets is still in the skill, in the same wording: grade each sub-slice before synthesis, a fresh verifier for the verifier-owned rows, and the --sub-slice restatement check before writing verification: skipped (cost). The only edit is a clarifying "(acceptance gate step 2)".
  • The PR notes that after compaction the full paragraph sits past the 20,000-byte re-attach window, and only the step 2 pointer stays inside it. That is a research-quality trade-off, not a security control. These rules govern how research artifacts are graded. None of them guards credentials, trust, execution or spend.
  • I did not consult the protected-class register: this lane has no shell to check whether the file is in the checkout. I judged each moved rule by what would break without it, and nothing is lost.

Other surfaces.

  • No workflow, script, trust control, manifest or userConfig change.
  • No changed file matches a trusted-path glob.
  • I found no embedded directives in the PR context.

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 55176925be3cf393a41b2175530227067383abe3; the summary is in this lane's pull request comment.

claude-lane: claude-review

## Disciplines

Full recipes and rationale: `${CLAUDE_PLUGIN_ROOT}/skills/research/context/discipline.md` (also the canonical source-tier table for this plugin).
Full recipes and rationale: `${CLAUDE_PLUGIN_ROOT}/skills/research/context/discipline.md` (also the canonical source-tier table for this plugin). The Effort row is the ceiling over discipline 8: "Effort, source breadth" below.

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.

Advisory: no test pins the closing issue's headroom criterion.

#12631's done-when says: "Done when the sentence has at least 2000 bytes of headroom, or the window no longer applies to it, and contract.test.sh passes."

The move meets this. The author says the sentence now ends at about byte 15,225; I did not measure it. But the only check is assert_in_slice at plugins/discovery/scripts/contract.test.sh:387-388, and it fails only after byte 20,000. Edits above this line can wear the headroom back down to 1 byte, which is the state #12631 was filed for, and nothing would fail until it is gone.

To fix it, add a headroom check for this phrase, for example one that fails when the sentence ends after byte 18,000. Or record in the test's comment that the headroom is not enforced, so the next person who trims for the window knows it is unenforced.

claude-lane: claude-review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pr-unblock / address-feedback: UNCERTAIN, left open

Evidence: plugins/discovery/scripts/contract.test.sh:358, plugins/discovery/scripts/contract.test.sh:387

The finding holds: assert_in_slice at contract.test.sh:358-372 fails only once a phrase crosses byte 20,000, so nothing pins the headroom that #12631 asks for. Both suggested fixes (a headroom assertion, or a comment saying the headroom is not enforced) need an edit to plugins/discovery/scripts/contract.test.sh, and the review-thread tool refuses that path as outside this thread's scope, so this lane cannot make the change. Measured for whoever picks it up: the topic and Effort-ceiling sentences sit well inside the slice, but the last pinned phrase, the Effort, source breadth heading at SKILL.md:121, starts between bytes 19,250 and 19,650 after this round's edit. A threshold of 18,000 applied to every pinned phrase would fail today, so a person should choose the threshold and which phrases it covers.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 55176925be3cf393a41b2175530227067383abe3: read 2 of 2 changed file(s); 2 finding(s), 2 as inline comments.

Code review: PR #12647

I found no blocking problems. The change moves "The Effort row is the ceiling over discipline 8" from the ### Effort, source breadth subsection up into the Disciplines intro of plugins/discovery/skills/research/SKILL.md. To pay for those bytes, it moves the N-topic fan-out grading paragraph from acceptance gate step 2 into "The deep tier" and leaves a one-line pointer in step 2. A patch changelog fragment is added. A doc-only change to a skill body fits a patch bump.

I checked the PR against the closing issue #12631:

  • "the sentence has at least 2000 bytes of headroom": met by placement. The author says the sentence now ends at about byte 15,225; I did not measure it. Nothing in the PR or the repository would fail if that headroom wore away again; see the inline comment on line 103.

  • "contract.test.sh passes": author-claimed, not verified. Neither the author's lane nor this lane ran it, so it is left to CI. I read the assertions the move touches:

    • assert_in_slice for the sentence and the heading, at contract.test.sh:385-388.
    • The fan-out paragraph pattern '^ +\*\*Fanning out over N topics.*fresh verifier for the verifier-owned rows' at :557. The moved paragraph is still indented two spaces, so it still matches.
    • The :1402 phrase, which is still present.

    I found none that the diff should break.

Advisory: moving the fan-out paragraph takes part of the acceptance gate out of the first 20,000 bytes. The contract test treats those bytes as the part that compaction re-attaches, and its comment says that part holds the acceptance gates. See the inline comment on line 42.

Other notes:

  • No plugin manifest changed.
  • There are no settled threads.
  • No prior findings apply (round 0 of 3).
  • The PR context has no embedded instructions aimed at this lane.
  • The PR body says the ### Effort, source breadth heading still has only about 460–500 bytes of room before byte 20,000. That is better than before, but the next large edit above it can still hit the same problem.

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM6y-TJe
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on efa0184.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 3, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped address-feedback on this pull request: the lane left a review finding open and no adjudicator verdict settled it: none was recorded, it found the finding does not hold where the lane had not disputed it (an UNCERTAIN or VALID-defer reply), which only an INCORRECT reply lets a verdict resolve, it found the finding asks only for tests whose covering check runs had not all passed when the round began, or it raised a security question on a finding the security-review lane rated below CRITICAL; so a session builder takes it. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/address-feedback status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=12647 -f activity=address-feedback

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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

Code review: PR #12647 (head efa0184c)

No new problems found. One earlier advisory is still open and is counted again below.

The PR moves the sentence "The Effort row is the ceiling over discipline 8" from the start of ### Effort, source breadth up into the Disciplines intro of plugins/discovery/skills/research/SKILL.md. To make room, it moves the N-topic fan-out grading paragraph from acceptance gate step 2 to the "Two or more separable topics" bullet under "The deep tier". Step 2 keeps a pointer to it. The PR also adds a patch changelog fragment, which fits a change that only edits skill text.

Since the last round

The latest commit expands the step 2 pointer (SKILL.md:42). It now also says to send the synthesis to a fresh verifier for the verifier-owned rows, and it points to "The deep tier" for the one exception. That covers my earlier advisory about losing the verifier rule after compaction. The thread is resolved and its lines have not changed since, so it stays settled.

Closing issue #12631

  • "the sentence has at least 2000 bytes of headroom": met by where the sentence now sits. The author says it ends at about byte 15,200; I did not measure that. No test enforces the headroom. already posted: fix(discovery): give the research Effort-ceiling sentence headroom in the re-attach slice #12647 (comment)
  • "contract.test.sh passes": the author claims this, but nobody ran it. The author's lane did not run the suite and this lane has no shell, so CI has to confirm it. I read the assertions the move touches and none should break:
    • assert_in_slice checks (contract.test.sh:373-390): each pinned phrase still appears once. The topic slot and Disciplines heading come before the moved sentence.
    • Pattern at :557 ('^ +\*\*Fanning out over N topics.*fresh verifier for the verifier-owned rows'): it still matches, because the moved paragraph keeps its two-space indent as a continuation of the bullet.

Other notes

  • No plugin manifest changed.
  • Settled threads: one (the line 42 advisory). It is resolved and its lines have not changed, so I did not raise it again.
  • Round 2 of a cap of 3, so the cap did not apply.
  • The PR context and the thread text contain no instructions aimed at this lane.
  • No spend or billing impact.
  • The PR body says the ### Effort, source breadth heading now starts before about byte 19,650. That leaves only a few hundred bytes of room inside the 20,000-byte window, so a large edit above it could still cause the problem discovery research SKILL.md: a contract-tested sentence sits 1 byte inside its 20000-byte window #12631 describes.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #12647 at efa0184c

No security issues found.

I read every hunk of both changed files.

  • plugins/discovery/skills/research/SKILL.md: the change moves two passages and removes no rule.
    • The sentence "The Effort row is the ceiling over discipline 8" moves from the "Effort, source breadth" subsection up into the Disciplines intro. That subsection now opens with a pointer to the rationale.
    • The "Fanning out over N topics" grading paragraph moves out of acceptance gate step 2 and into the "Two or more separable topics" bullet under "The deep tier". Its rules are unchanged; the only addition is the clarifying "(acceptance gate step 2)".
    • Since the last review, the step 2 pointer also carries the fresh-verifier obligation. This answers the advisory thread on that line, which is now resolved.
  • .changes/discovery/...f83c6418.md: a new patch changelog fragment. It contains only prose.

Instruction-surface lens. The diff moves skill instructions, so I checked each moved rule against the register at docs/contracts/instruction-exception-register/README.md. Its protected classes are Gate 0's six: irreversible-action, secret-handling, data-integrity, external-publication, legal-compliance and agent-authority. No rule was deleted, narrowed or softened:

  • Every moved rule is still in the skill: grade each sub-slice, a fresh verifier for the verifier-owned rows, and the --sub-slice restatement exception.
  • These rules govern how research is graded. None of them guards credentials, trust, execution, publication or spend.

Other surfaces.

  • The diff changes no workflow, script, trust control, merge hold, token scope, plugin manifest or userConfig key.
  • No changed file matches a trusted-path glob.
  • The PR context contains no embedded directives aimed at this lane.
  • The one settled thread (step 2 pointer, lines changed since resolution: no) was an advisory on research quality. I am not raising it again.
  • This lane's earlier review of this PR reported no findings, so nothing carries forward from it.

critical-findings: 0

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head efa0184cd59c0d98a00c11faa06524b7b23fca56. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head efa0184cd59c0d98a00c11faa06524b7b23fca56.

@kyle-sexton

Copy link
Copy Markdown
Member

Superseded by #12745, which carries this branch's commits plus the headroom assertion in contract.test.sh that pr-unblock could not make (outside its review-thread scope). Closes #12631 there.

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

Labels

do-not-merge Hard merge gate: do not merge while applied. needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

discovery research SKILL.md: a contract-tested sentence sits 1 byte inside its 20000-byte window

1 participant