Skip to content

fix(testing): cut ecosystem-specific examples from the write skill - #17752

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-17740-44850184478-1
Nov 21, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-17740-44850184478-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17740

Summary

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

Part 1 of 5 of #16755. Cuts the model-read .NET/xUnit, JavaScript and C# specifics from /testing:write and its write and organize pages under R11. None of the cut sites is a routing site where the skill takes a language-specific step, so every row is deleted with no generic replacement; the neutral rules around them (use the project's documented naming and placement, else mirror the ecosystem's idiom) stay.

Row count: 5 (all R11).

  • F0421 (R11, K7) SKILL.md naming bullet, .NET/xUnit forms: CUT.
  • F0422 (R11, K4) SKILL.md Gotchas, .NET framework traps (MTP options, global.json, nesting): CUT; the bullet's own generic last sentence ("Check the consuming project's own gotcha notes before writing tests") is kept as the bullet.
  • F0423 (R11, K7) context/write.md: orchestrator row "(Aspire, docker-compose, tilt)", .NET/xUnit naming forms, JS hollow-out worked example with its per-language null values and "(here, ...)" back-reference, and the C# database-read fence with its "Illustrative: .NET/xUnit" lead-in: CUT.
  • F0425 (R11, K7) context/organize.md {Project}.Tests "in .NET" (table row and Naming list) and {ClassUnderTest}Tests: CUT.
  • F0426 (R11, K4) context/organize.md "Nested test projects (.NET)" section: CUT (its "integration tests go under the integration-test location" line is already stated by the page's placement table). No row was GONE.

Script readers: searched the repo with skills/write/(SKILL|context/(write|organize))\.md|context/(write|organize)\.md and for the cut strings (Hollow-out run|Framework traps|Nested test projects|totalCart|CreateUser_|ClassUnderTest|Illustrative forms). Hits: .github/scripts/plugin-eval/hill-climb-*.test.mjs use the SKILL.md path only as a fixture literal (never read its content); .performance/ratchets.json holds the write.md fence ceiling (updated here); docs/architecture/landscape.json and docs/upstream/*.md cite the files as references, not script reads; eval samples only assert a Read of the path. No script reads the cut text, so no row is held back and there is no Script readers exception.

Eval cases for the write skill: plugins/testing/evals/wr-hollow-out-receipt exercises the hollow-out checklist item whose worked JS example was cut (it uses its own buildReceipt prompt, so it does not read the cut text verbatim); wr-handler-unit-tests exercises naming that defers to documented project patterns. No existing case reads the .NET naming forms, the framework-traps gotcha, the C# database example or the nested-project section. R8 rows: none in this part.

Per file: SKILL.md, write.md and organize.md are partial cuts; no whole page is deleted. AC10: no enforcement-placing skill is added.

Not verified

  • Tidy not run: the change spans 2 areas (plugins/testing with .changes/testing, and .performance), over the 1-area tidy cutoff
  • check-affected skipped typos (not installed), comment-hygiene (network fetch denied) and size-check (script missing in the lane); its CI-only checks (portability-lint, eval-cases, lychee, etc.) are left to the PR's CI
  • scripts/skill-stack-fences.py and the ratchet were not run (no interpreter in this lane); the fence count of 0 for write.md was read from the script's tag rules (remaining fences are untagged and text). Left to the PR's CI ratchet step
  • Eval before-and-after case for the write skill (wr-hollow-out-receipt) is the host session's step after the PR opens, per the issue
  • Out of scope, seen during review: plan/SKILL.md:91 still has {Method}_Should{Behavior}_When{Condition}; run-e2e/SKILL.md:389 and run-e2e/context/e2e.md:7 name Aspire/docker-compose/tilt; diagnose/SKILL.md:96 and diagnose/context/investigate.md:18 carry the dotnet test MTP link. These belong to…
  • Untracked sandbox placeholder files at the checkout root (.bashrc, .bash_profile, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc) were not created by this run and are not part of the change

Fix

  • plugins/testing/skills/write/SKILL.md: cut the .NET/xUnit illustrative naming forms (F0421) and the .NET framework-traps gotcha (F0422); partial cut
  • plugins/testing/skills/write/context/write.md: cut the orchestrator tool names, the .NET/xUnit naming forms, the JS hollow-out worked example and per-language null values, and the C# database-read fence (F0423); partial cut
  • plugins/testing/skills/write/context/organize.md: cut the {Project}.Tests/{ClassUnderTest}Tests .NET examples (F0425) and the Nested test projects (.NET) section (F0426); partial cut
  • .performance/ratchets.json: removed the skill-stack-fences ceiling for write.md; the cut removed its only counted (csharp) fence, so its count is 0, and the ratchet's tighten step drops 0 ceilings
  • .changes/testing/work-resolve-issue-issue-17740-44850184478-1-73589d88.md: patch changelog fragment for testing

Verification

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

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

The run reports:

  • check-changelog-fragments: all 3 fragments under .changes/ valid
  • check-changed-skills: CHECK-SKILL write PASS, 0 errors, 1 warning (description 575 chars above the 419 warn setting; the description is unchanged by this PR)
  • check-affected: 14 passed, 9 skipped over 5 changed files
  • Grep of plugins/testing/skills/write for .NET, xUnit, dotnet, C#, csharp, Aspire, docker-compose, tilt, global.json, MTP: no matches after the cut (per the review subagent)
  • Script-reader search (patterns in summary): no script reads the cut text
  • Fresh-context review subagent over the whole diff: no findings
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44850184478

Left out: the items under Not verified.

Related

#17740

Lane-Activity: work-resolve-issue/resolve-issue
@melodic-automation-lanes melodic-automation-lanes Bot added the do-not-merge Hard merge gate: do not merge while applied. label Nov 21, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Held for the before-and-after eval that cut item #17740 needs. The pr-merge release step lifts this hold when an eval-pair record exists for the current head.

@github-actions

Copy link
Copy Markdown
Contributor

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

Security review: PR #17752 (head a2c66f4)

I found no security issues.

I read every hunk of all 5 changed files in the full diff and checked them against the PR context. No changed file matches a trusted-path glob. The diff touches no workflow, action, trust control, merge hold, token scope or plugin manifest.

  • plugins/testing/skills/write/SKILL.md, context/write.md and context/organize.md: these delete ecosystem-specific examples from a skill body. The cuts are the .NET/xUnit test-name forms, the .NET framework-traps gotcha (MTP runner options, global.json, nested SDK projects), the orchestrator tool names, the JavaScript hollow-out example, the C# database-read sample and the {Project}.Tests / {ClassUnderTest}Tests naming examples. The neutral rules stay in place.
  • Instruction-surface check: because the diff deletes standing instruction text, I checked each removed rule against the protected classes in docs/contracts/instruction-exception-register/README.md (Gate 0: irreversible-action, secret-handling, data-integrity, external-publication, legal-compliance, agent-authority). None of the removed text is in one of those classes. It is test-writing style and build-layout advice. Losing it can cause no irreversible action, secret exposure, data loss, publication or authority grant.
  • .performance/ratchets.json: this removes one fence-count ceiling entry for write.md because the counted C# fence is gone. It is a performance and size ratchet, not a security control.
  • .changes/testing/...md: a changelog fragment that is prose only.

The PR context contains no text addressed to the review lane.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: no findings

I read all 5 changed files in full. This PR removes the .NET/xUnit, JavaScript and C# examples from /testing:write (SKILL.md, context/write.md, context/organize.md), drops the write.md entry from the skill-stack-fences ratchet, and adds a patch changelog fragment.

Closing issue #17740. Each Done-when item is met:

  • All 5 rows are cut:
    • F0421 is the naming forms in SKILL.md.
    • F0422 is the framework-traps gotcha. Its last sentence stays as the bullet.
    • F0423 is in write.md: the orchestrator tool names, the naming forms, the JS hollow-out example and the C# fence.
    • F0425 is the {Project}.Tests and {ClassUnderTest}Tests examples in organize.md.
    • F0426 is the "Nested test projects (.NET)" section in organize.md.
  • None replaced: none of the cut sites is a routing site, so R11 asks for no replacement text.
  • PR body: it states the row count, the script-reader search, the eval cases, the partial-cut status of each file, and AC10.
  • Ratchet ceiling: I checked this one myself.
    • With the csharp fence gone, write.md has only untagged fences (lines 9 and 18) and a text fence (line 68), so scripts/skill-stack-fences.py counts 0.
    • The script prints only files with a count above 0.
    • plugins/performance/scripts/ratchet.py:257 treats a file with no entry as ceiling 0. Removing the entry therefore pins the file at 0, which satisfies "lowered".
  • No anchor to the removed section: I searched the repo for "Nested test projects". Nothing outside the changelog fragment refers to it.
  • Hollow-out bullet: the reworded checklist item ("gives back nothing") still reads correctly without the removed example and its "(here, …)" back-reference.

Path-scoped rules. .claude/rules/cost-claims.md and .claude/rules/skill-bodies-state-current-rules.md match the skill files. The diff only removes text and adds no cost claim or history narration, so neither rule is broken.

Loosened checks. No loosening: the ratchet entry removal tightens the effective ceiling from 1 to 0. The prompt had no loosened_check_verdict:, loosened_check_patterns: or loosened_check_decision_record: line, so I used fail with no consumer entries and did not check the citation requirement. Loosened checks would be marked: fail (bundled default); patterns: 0.

Not verified. The PR body's test results (changelog-fragment and changed-skills checks passing) are the author's claims; I did not confirm them. Per the issue, the targeted eval (wr-hollow-out-receipt) runs after the PR opens, so it has not run yet.

No plugin manifests changed, no paved-path citation was needed, and no embedded instructions were found in the PR context.

Verifier dropped 0 of 0 candidates.

@kyle-sexton

Copy link
Copy Markdown
Member

Targeted eval result: PASS

One targeted case per changed skill, run on the old text (before) and the new text (after), on sonnet at 3 runs a side, Claude Code 2.1.330 (Claude Code).

What this gate checks: that the new text does no worse than the old on these cases. By the owner's decision of 2026-11-17 the gate is this no-loss compare alone. There is no wrong-text side, so this case set has not been shown to detect wrong text: a PASS says the cases did not get worse, not that they would have noticed a bad edit.

Scope: pure cut (five R11 rows, no R8 row). Measured by p17752-wr-ledger-plan: F0421 and F0423 naming forms (name-project-idiom: the reply mirrors the project's pytest idiom; the cut .NET/xUnit forms are the only text that could pull it elsewhere), F0423 C# database-read example (row-readback-ok, index-read-not-ok: the kept prose states the rule), F0423 JS hollow-out example (hollow-stub-none, hollow-expect-red: the kept checklist line says to return nothing and expect red), F0423 orchestrator row (composition-integration: Aspire/docker-compose/tilt names cut, the row stays), F0425 and F0426 (location-existing-unit: placement follows the project's existing convention; organize.md opened only on a placement question). F0422 (the .NET framework-traps gotcha) is loaded with SKILL.md but no grader reads it on a Python project. Unmeasured: F0422.

  • New case p17752-wr-ledger-plan: the existing write cases scaffold a project and write tests (scaffold and llm graders, above the cost gate for a 3-a-side compare and not tied to the cut examples), so a rules-only case was written: a Python ledger service with a public read path and an internal index table, seven regex graders on fixed KEY lines, no llm grader, no Skill grader (slash prompt, R105).

  • Loss-capable graders (their right answer was illustrated by cut text on BEFORE): row-readback-ok and index-read-not-ok (F0423 C# example), hollow-stub-none (F0423 JS example and its None/null list), composition-integration (F0423 orchestrator names). The kept prose states each rule on both sides.

  • The skill's settings step runs a plugin script through Bash, which the case does not grant; a denied call no grader reads is counted under D110 and listed in the record.

  • Unmeasured rows: F0422 (.NET framework-traps gotcha; no grader on a Python project reads it).

  • Control result (the issue's acceptance item): not run: the owner's decision of 2026-11-17 gates cut pull requests on the no-loss compare alone.

  • Before: 4ff0523bd8ba86f06216769baa31bf0fe958ce2e (merge base with main)

  • After: a2c66f40c2b4bc9e154f4c5b6ae92e95d072b960 (pull request head; live head when this was written: a2c66f40c2b4bc9e154f4c5b6ae92e95d072b960)

  • Loss: the mean case score falls by 0.15 or more, or any one grader passes in 2 or more fewer after runs than before runs.

Passing runs per grader, per side:

Case Grader Before After
p17752-wr-ledger-plan name-project-idiom 3/3 3/3
p17752-wr-ledger-plan location-existing-unit 3/3 3/3
p17752-wr-ledger-plan row-readback-ok 3/3 3/3
p17752-wr-ledger-plan index-read-not-ok 3/3 3/3
p17752-wr-ledger-plan hollow-stub-none 3/3 3/3
p17752-wr-ledger-plan hollow-expect-red 3/3 3/3
p17752-wr-ledger-plan composition-integration 2/3 1/3
p17752-wr-ledger-plan mean case score 0.952 0.905

Graders that cannot show a loss, because they failed on the old text in every run:

  • none: every grader passed in at least one run on the old text

Changed files the compare runs opened, per case and side:

  • p17752-wr-ledger-plan before: opened skills/write/context/write.md in 2 of 3 runs
  • p17752-wr-ledger-plan after: opened skills/write/context/write.md in 1 of 3 runs

Rows these runs measured (the row's file opened in at least 2 of 3 runs on each side, or loaded with the skill or agent):

  • F0421 (skills/write/SKILL.md, case p17752-wr-ledger-plan): measured; the file is loaded with the skill or agent, never opened, so no open count applies
  • F0422 (skills/write/SKILL.md, case p17752-wr-ledger-plan): measured; the file is loaded with the skill or agent, never opened, so no open count applies

Rows these runs did not measure:

  • F0423 (skills/write/context/write.md, case p17752-wr-ledger-plan): opened in 2 of 3 before, 1 of 3 after runs: below the measured line
  • F0425 (skills/write/context/organize.md, case p17752-wr-ledger-plan): opened in 0 of 3 before, 0 of 3 after runs: below the measured line
  • F0426 (skills/write/context/organize.md, case p17752-wr-ledger-plan): opened in 0 of 3 before, 0 of 3 after runs: below the measured line

Verdicts:

  • verdict p17752-wr-ledger-plan (write): PASS (no loss: after 0.905, before 0.952)

Cost: 0.69 USD (smoke and compare, the runs' costUsd).

The cases live outside the repository; their full text:

The 1 cases: prompt.md and case.yaml

p17752-wr-ledger-plan

prompt.md:

---
description: "Written for PR 17752 (rows F0421, F0422, F0423, F0425, F0426, all R11 cuts in testing:write). Asked to plan, before writing, the tests for a new Python repository function, the reply names a test in the project's own idiom, says reading the stored row back is fine and reading an internal index table is not, describes the hollow-out run, picks the test type for a docker-compose composition and says where the unit tests go"
tags: [write, routine]
max_turns: 20
timeout_seconds: 600
allowed_tools: [Skill, Read, Glob, Grep]
expected_outcome: "Nothing is written or run. The reply names the test in pytest snake case like the existing tests, calls the row read-back legitimate state verification and the index-table read coupling to the implementation while search_accounts exists, describes swapping each subject function for one returning None and expecting red, calls the composition test an integration test, and places the unit tests by the project's existing convention. It ends with the seven fixed lines."
---

/testing:write

Before you write anything, plan it with me. `ledger/` is a Python service: pytest, Postgres behind our own repository layer, a docker-compose file that starts the service with Postgres and RabbitMQ, and no documented test naming convention. The existing tests live in `ledger/tests/unit/` and are named like `test_posts_entry_when_balanced`. I'm adding `create_account(name)`, which stores the account row in `accounts` and also writes a normalized-name row into an internal `account_search_index` table; `search_accounts(q)` is the public read path.

1. What would you name the unit test for `create_account` rejecting an empty name, and where does that test file go?
2. In the integration test, is it fine to read the `accounts` row back after the call and assert its fields? Is it fine to read `account_search_index` directly to check the normalized name?
3. Describe the hollow-out run you would do on the new tests: what do you swap each function for, and what result do you expect?
4. Which test type covers the service starting up together with Postgres and RabbitMQ under the docker-compose setup?

Don't write, run or install anything yet, and don't research online.

End with exactly these seven lines:

TEST_NAME: <the test name>
TEST_LOCATION: <the folder the test file goes in>
ROW_READBACK: <ok or not ok>
INDEX_READ: <ok or not ok>
HOLLOW_OUT_STUB: <what each swapped function returns>
HOLLOW_OUT_EXPECT: <red or green>
COMPOSITION_TYPE: <test type>

case.yaml:

schema_version: "1.1"
name: p17752-wr-ledger-plan
plugins: ["../.."]
graders:
  - name: 'name-project-idiom'
    type: 'regex'
    pattern: '^[\W_]*TEST_NAME[*_]*:[\s*`]*test_[a-z0-9_]+[\s*`.]*$'
    flags: 'm'
    target: 'last_message'
  - name: 'location-existing-unit'
    type: 'regex'
    pattern: '^[\W_]*TEST_LOCATION[*_]*:[^\n]*tests/unit'
    flags: 'im'
    target: 'last_message'
  - name: 'row-readback-ok'
    type: 'regex'
    pattern: '^[\W_]*ROW_READBACK[*_]*:[\s*`]*ok\b'
    flags: 'im'
    target: 'last_message'
  - name: 'index-read-not-ok'
    type: 'regex'
    pattern: '^[\W_]*INDEX_READ[*_]*:[\s*`]*not ok\b'
    flags: 'im'
    target: 'last_message'
  - name: 'hollow-stub-none'
    type: 'regex'
    pattern: '^[\W_]*HOLLOW_OUT_STUB[*_]*:[^\n]*\b(?:None|nothing|null)\b'
    flags: 'im'
    target: 'last_message'
  - name: 'hollow-expect-red'
    type: 'regex'
    pattern: '^[\W_]*HOLLOW_OUT_EXPECT[*_]*:[\s*`]*red\b'
    flags: 'im'
    target: 'last_message'
  - name: 'composition-integration'
    type: 'regex'
    pattern: '^[\W_]*COMPOSITION_TYPE[*_]*:[^\n]*integration'
    flags: 'im'
    target: 'last_message'

Posted by an agent session.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The do-not-merge hold waited only on eval evidence (reason=eval), and a listed human posted a VALID no-loss eval-pair record for a2c66f40c2b4bc9e154f4c5b6ae92e95d072b960: #17752 (comment). pr-merge removed do-not-merge. To hold again, add the label back with a new pr-hold reason line.

@melodic-automation-lanes melodic-automation-lanes Bot removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 21, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path is about to arm native auto-merge at head a2c66f40c2b4bc9e154f4c5b6ae92e95d072b960, the head its arming checks judged. The arm fails if the head moves first.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=a2c66f40c2b4bc9e154f4c5b6ae92e95d072b960 rubric=10.4.3 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit bfdfd0f Nov 21, 2026
94 of 97 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-17740-44850184478-1 branch November 21, 2026 04:32
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit bfdfd0f4253dd8776ea9f51b7e140f038b807633; later checks count it verified from this comment.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cut the model-read ecosystem specifics from testing: write skill and its naming and placement pages

1 participant