Skip to content

refactor(harness-memory): cut model-read ecosystem examples from audit - #16985

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-16775-44195898841-1
Nov 18, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-16775-44195898841-1

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #16775

Summary

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

Removes the four R11 K7 rows (4 rows) from harness-memory:audit under ADR 0101: the audit's C7, C8 and C9 checks and its currency bullet no longer name one ecosystem's pin files, compiler flags, manifests or test tools. No row sits at a routing site (each check stays generic: the repo's own pin files, manifest or task runner), so each example is deleted with no replacement text; .mcp.json stays because it is a Claude Code file, not an ecosystem file.

Row count: 4.

Row Rule Kind Cited at Outcome
F0214 R11 K7 plugins/harness-memory/skills/audit/context/audit.md:65-66 cut: global.json, .nvmrc, .python-version, "or ecosystem equivalents" deleted; .mcp.json kept
F0215 R11 K7 plugins/harness-memory/skills/audit/reference/criteria.md:281-282 (C7 step 3) cut: "(e.g. an SDK pin vs global.json, a Node pin vs .nvmrc)" deleted
F0216 R11 K7 plugins/harness-memory/skills/audit/reference/criteria.md:301 (C8) cut: "(nullable, warnings-as-errors)" deleted; "A compiler setting" kept as the generic class
F0217 R11 K7 plugins/harness-memory/skills/audit/reference/criteria.md:351-356 (C9 steps 2 and 4) cut: "(package.json scripts, Makefile, *.csproj, pyproject.toml, or ecosystem equivalent)" and "("we use pytest" is not a command)" deleted
Kept rows: none.

Script-reader search (R11), run with the Grep tool over plugins/harness-memory excluding markdown, the equivalent of git grep -n -F '<name>' -- plugins/harness-memory ':!*.md': global\.json|\.nvmrc|\.python-version matched only plugins/harness-memory/evals/audit-init-bloat-c1-c2-c5/scaffold.sh:83 and :256, which write fixture CLAUDE.md prose that mentions .nvmrc; neither reads a pin file. nullable|warnings-as-errors|\*\.csproj|pyproject\.toml|Makefile|pytest found no matches. package\.json under plugins/harness-memory/skills (non-markdown) found no matches; lib/prerequisites.mjs:579 checks a plugin dependency's own package.json, not a consumer manifest the audit reads. A repo-wide search for the cut phrases (warnings-as-errors|we use pytest|an SDK pin|ecosystem equivalent, CHANGELOGs excluded) found them only in the two edited files and in other plugins' unrelated text. No script reads any cut file, so all four rows are cut here.

Eval cases that read the cut text (named only, none run): every audit-* case loads both changed files. The cases targeting the changed checks are audit-wrong-build-command-once (C9: wrong build command, plus "we use pnpm and vitest" as tool names without invocations, still covered by C9 step 4's remaining wording) and audit-c8-enforced-prose (C8). No existing case targets C7 version-pin currency; audit-init-bloat-c1-c2-c5 has a .nvmrc mention in its fixture and is the nearest one.

Whole page or part: audit.md, partial cut (part of one bullet). criteria.md, partial cut (parts of C7, C8 and C9). No page is deleted whole, so every cut carries a detection…

Not verified

  • Targeted before-and-after eval verdict for the changed skill (sonnet, 3 runs a side, run by an agent session after this pull request opened, before 49c71d34b9557c453ec1d7ed74583d060a25257e, after 086cb68fba1bbff34db163aa24e00d431adde8c1; no gate reading was counted despite a denied call; full record: refactor(harness-memory): cut model-read ecosystem examples from audit #16985 (comment)): case p16985-au-wrong-build-command-once (audit, C9) PASS, mean case score 1.000 before and 1.000 after, c9-flags-compile and tool-names-without-invocation 3/3 on each side; case p16985-au-pin-and-compiler-rule (audit, C7 and C8) PASS, mean case score 1.000 before and 1.000 after, c8-compiler-setting and c7-node-pin 3/3 on each side. Overall PASS. Measured rows: F0217 (reference/criteria.md, case p16985-au-wrong-build-command-once), F0214 (context/audit.md), F0215 and F0216 (reference/criteria.md, case p16985-au-pin-and-compiler-rule), each file opened in 3 of 3 runs on each side. This is the third registration, on a new head: two earlier evals at the old head c944707a both read LOSS on p16985-au-wrong-build-command-once, eval-pr-16985 (sonnet, mean 0.833 before, 0.667 after) and eval-pr-16985-confirm (opus, mean 0.833 before, 0.333 after). Head 086cb68f restores C9 step 4's point with no tool name ("(naming a tool is not a command)"), and c9-flags-compile now accepts the check id and compile on adjacent lines on both sides, because the old one-line window failed correct heading-then-bullet replies in 4 after and 2 before runs across the two evals; rescored under the new pattern, both earlier evals still read LOSS. No record was posted for the earlier evals.
  • Unmeasured row: none; each row's file was opened in 3 of 3 runs on each side.
  • Detection-control result for each partial cut: not run, by the owner's decision of 2026-11-17 that cut pull requests are gated on the no-loss compare alone, with no wrong-text side (owner-decisions record: https://github.com/melodic-software/architecture/blob/37e43feab804b3ebe68b00e227b5e90ce46413b3/docs/owner-decisions.md#L202). No page is deleted, so no sensitivity control applies.
  • Tidy pass 5: the ai-slop deterministic detector (detect.sh) did not run because this lane's Bash allows only the named wrappers; only the rubric read ran over the listed lines.
  • markdownlint, typos and the CI-only checks check-affected lists (portability-lint, evals-quality, lychee and others) did not run here; they are left to the PR's CI.
  • Out of scope, not touched: plugins/harness-memory/skills/audit/reference/criteria.md:224 (C5) still has the example "We're on Node 18", an ecosystem-specific example that is not among this issue's four rows. Report it on #15730 if the inventory missed it.

Fix

  • plugins/harness-memory/skills/audit/context/audit.md: the C7/R3 currency bullet names the repo's own pin files and .mcp.json, dropping global.json, .nvmrc, .python-version and "or ecosystem equivalents" (F0214).
  • plugins/harness-memory/skills/audit/reference/criteria.md: C7 step 3 drops the global.json/.nvmrc example (F0215); C8 drops "(nullable, warnings-as-errors)" (F0216); C9 step 2 drops the manifest list and step 4 drops the "we use pytest" example (F0217).
  • .changes/harness-memory/work-resolve-issue-issue-16775-44195898841-1-901c3f12.md: new patch changelog fragment for the cut.

Verification

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

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

The run reports:

  • check-changelog-fragments: all 2 fragments valid (run before and after tidy).
  • check-changed-skills: plugins/harness-memory/skills/audit PASS, 0 errors, 3 pre-existing warnings (description length, body length, no Gotchas surface), all 7 trigger phrases preserved.
  • check-affected: 15 passed, 7 skipped (tools not installed or runs checked-tree code), over 3 changed files.
  • Grep for global\.json|\.nvmrc|\.python-version in plugins/harness-memory non-markdown: only fixture prose in evals/audit-init-bloat-c1-c2-c5/scaffold.sh:83,256; no script reads a pin file.
  • Grep for nullable|warnings-as-errors|\*\.csproj|pyproject\.toml|Makefile|pytest in plugins/harness-memory non-markdown: no matches.
  • Grep for package\.json in plugins/harness-memory/skills non-markdown: no matches.
  • Grep repo-wide for the cut phrases (CHANGELOGs excluded): only the edited lines plus unrelated text in other plugins.
  • Fresh-context review subagent over the diff: no confirmed problems; each edited sentence keeps its rule, nothing in plugins/harness-memory quotes the removed text, the C9 eval's expectation still matches step 4, and the fragment format matches. Its style note (lead with audit:) was applied.
  • Tidy (code-tidying:tidy-diff) over the 6 changed hunks: passes 1-3 had no code to tidy; pass 4 (write-for-agents on the skill files, write-for-humans on the fragment) made the fragment active voice; pass 5 rubric read of the listed lines found no AI-writing tells.
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44195898841

Left out: the items under Not verified.

Related

#16775

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

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review (incremental): PR #16985, from c944707 to 086cb68

No findings. This push changes one file, plugins/harness-memory/skills/audit/reference/criteria.md, and I read all of its change.

What changed. In C9 step 4, the sentence "WARN if either command is absent, or if present only as prose naming the tool without the invocation" now ends with "(naming a tool is not a command)". That puts back the point the deleted "we use pytest" example used to make, without naming any ecosystem's tool, as the issue asks.

The step still reads correctly with its neighbours: steps 1–3 cover stated commands, step 5 covers a repo with no build or test step, and the C7 boundary paragraph is unchanged (criteria.md#L353-L354). The new wording stays inside closing issue #16775's AC1, since it is generic text with no tool, library or command choice. The PR body says eval case audit-wrong-build-command-once relies on step 4's remaining wording for its "we use pnpm and vitest" fixture. That is the author's claim and I have not verified it, but this push makes step 4 state that rule more plainly, not less.

Scope. This lane already reviewed an earlier head, so this review reports blocking findings only. The prior-findings file has only the earlier summary comment, which had no findings, so nothing carries forward.

Loosened checks. None. The change edits instruction prose only and touches no test, check or threshold. Loosened-check verdict: fail (the default, because the prompt gave no loosened_check_verdict: line); 0 consumer patterns.

Cost. Nothing in the change can cause a charge.

Verifier dropped 0 of 0 candidates.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #16985 (incremental, blocking only)

No security issues found. I reviewed only the change since c944707a9ca3c73cfa19c246ab63e9cdf9bb3476. This lane already reviewed an earlier head, so this review reports blocking findings only.

What changed. One file: plugins/harness-memory/skills/audit/reference/criteria.md. In C9 step 4, the sentence "WARN if … present only as prose naming the tool without the invocation" now ends with "(naming a tool is not a command)". That addition makes the warning rule stricter. It doesn't narrow it.

Instruction-surface check. The change only adds a clarification to an audit skill's prose. It doesn't remove, narrow or soften any rule. The audit skill only reports on a repository's instruction files. It doesn't gate tool use, credentials, tokens or merges, so no protected class is affected.

Trust controls and manifests. The changed file matches no trusted-path glob. No plugin.json or marketplace.json changed, so there is no manifest block. No workflow, token, kill-switch or merge-hold code changed.

PR context. Nothing in it tells the lane to pass the PR, skip a check or drop a finding. Under "Not verified" it says the PR needs a do-not-merge hold for the evals the host session will run. That describes the process; it isn't a directive to this lane.

Prior findings. The only earlier post is the previous head's summary, which had no findings, so nothing carries forward.

critical-findings: 0

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

Copy link
Copy Markdown
Member

Held for its eval: #16775 is a cut item, so its before/after eval runs after this PR (D367). A session runs it and posts the eval-pair record for the current head. The pr-merge sweep removes this hold once that record is posted (release-eval-hold.mjs).

…mand

The cut of the "we use pytest" example left step 4 without the point the
example made. Restore it in ecosystem-agnostic words.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@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.327 (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. F0214 (context/audit.md C7/R3 bullet: global.json, .nvmrc, .python-version and 'or ecosystem equivalents' deleted, .mcp.json kept), F0215 (criteria.md C7 step 3: the SDK/global.json and Node/.nvmrc examples deleted), F0216 (C8: '(nullable, warnings-as-errors)' deleted, 'A compiler setting' kept), F0217 (C9 steps 2 and 4: the manifest list deleted; step 4's 'we use pytest' example replaced by the tool-free '(naming a tool is not a command)'). Measured: F0217 by a copy of the existing audit-wrong-build-command-once case; F0214, F0215 and F0216 by a new case whose Node pin lives in an asdf .tool-versions file and whose strict-null-checks prose tsconfig.json already enforces. Unmeasured: none by design; each row counts only when its file was opened in 2 of 3 runs on each side.

  • Third registration for this PR, on a new head: eval-pr-16985 (sonnet) and eval-pr-16985-confirm (opus) both read LOSS on p16985-au-wrong-build-command-once at the old head c944707. The new head restores C9 step 4's point with no tool name, and c9-flags-compile now accepts the check id and compile on adjacent lines (both sides), because the old one-line window failed correct heading-then-bullet replies in 4 after and 2 before runs across the two evals.

  • The C9 case is the plugin's existing audit-wrong-build-command-once with its prompt and scaffold unchanged; its llm grader is replaced by the deterministic tool-names-without-invocation grader.

  • Unmeasured rows: none by design (rows below the 2-of-3 opened line are listed by the result).

  • 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: 49c71d34b9557c453ec1d7ed74583d060a25257e (merge base with main)

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

  • 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
p16985-au-wrong-build-command-once c9-flags-compile 3/3 3/3
p16985-au-wrong-build-command-once tool-names-without-invocation 3/3 3/3
p16985-au-wrong-build-command-once mean case score 1.000 1.000
p16985-au-pin-and-compiler-rule c8-compiler-setting 3/3 3/3
p16985-au-pin-and-compiler-rule c7-node-pin 3/3 3/3
p16985-au-pin-and-compiler-rule mean case score 1.000 1.000

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:

  • p16985-au-wrong-build-command-once before: opened skills/audit/context/audit.md in 3 of 3 runs; opened skills/audit/reference/criteria.md in 3 of 3 runs
  • p16985-au-wrong-build-command-once after: opened skills/audit/context/audit.md in 3 of 3 runs; opened skills/audit/reference/criteria.md in 3 of 3 runs
  • p16985-au-pin-and-compiler-rule before: opened skills/audit/context/audit.md in 3 of 3 runs; opened skills/audit/reference/criteria.md in 3 of 3 runs
  • p16985-au-pin-and-compiler-rule after: opened skills/audit/context/audit.md in 3 of 3 runs; opened skills/audit/reference/criteria.md in 3 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):

  • F0217 (skills/audit/reference/criteria.md, case p16985-au-wrong-build-command-once): opened in 3 of 3 before, 3 of 3 after runs
  • F0214 (skills/audit/context/audit.md, case p16985-au-pin-and-compiler-rule): opened in 3 of 3 before, 3 of 3 after runs
  • F0215 (skills/audit/reference/criteria.md, case p16985-au-pin-and-compiler-rule): opened in 3 of 3 before, 3 of 3 after runs
  • F0216 (skills/audit/reference/criteria.md, case p16985-au-pin-and-compiler-rule): opened in 3 of 3 before, 3 of 3 after runs

Rows these runs did not measure:

  • none

Verdicts:

  • verdict p16985-au-wrong-build-command-once (audit-c9): PASS (no loss: after 1.000, before 1.000)
  • verdict p16985-au-pin-and-compiler-rule (audit-pin): PASS (no loss: after 1.000, before 1.000)

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

The cases live outside the repository; their full text:

The 2 cases: prompt.md and case.yaml

p16985-au-wrong-build-command-once

prompt.md:

---
description: 'Copy of the existing case audit-wrong-build-command-once for PR 16985 (row F0217: C9 step 2 loses its manifest list and step 4 its ''we use pytest'' example), prompt and scaffold unchanged; its llm grader is replaced by the deterministic tool-names-without-invocation grader, which depends on step 4. Legacy audit 8. CLAUDE.md names pnpm and vitest without invocations and says to build with `pnpm run compile`, which package.json does not define; the real commands sit in auto memory. C9 FAILs the compile line once (not again under C7), does not WARN that commands are missing because step 0 finds them in auto memory, and notes the bare tool names. c9-flags-compile reads the reply. Bash is granted for the skill''s spine. Hard because three checks (C3, C7, C9) could each claim the same lines.'
tags: [audit, harness-memory, commands, hard]
max_turns: 25
timeout_seconds: 900
allowed_tools: [Read, Glob, Grep, Skill, Bash]
expected_outcome: 'The reply FAILs `pnpm run compile` under C9 because package.json has no compile script, reports it once and not under C7, does not WARN that build and test commands are missing since auto memory states them (a C3 placement question), and flags "we use pnpm and vitest" as tool names without invocations.'
---

/harness-memory:audit Audit my memory health. My root CLAUDE.md says "we use pnpm and vitest" but doesn't spell out the invocations. It also says to build with `pnpm run compile`, though package.json only defines `build`, `test`, and `lint`. Separately, our actual build and test commands are already recorded in auto memory from when you worked them out; take that as given and don't go looking in the memory directory. Leave user-level config out of this and don't change any files. No one is around to answer questions while this runs, so put what you find in your reply.

case.yaml:

schema_version: "1.1"
name: p16985-au-wrong-build-command-once
context:
  scaffold_script: scaffold.sh
graders:
  - name: 'c9-flags-compile'
    type: 'regex'
    pattern: '\bC9\b[^\n]{0,150}\n?[^\n]{0,200}?\bcompile\b|\bcompile\b[^\n]{0,150}?\bC9\b'
    target: 'last_message'
  - name: 'tool-names-without-invocation'
    type: 'regex'
    pattern: '\b(?:pnpm and vitest|vitest)\b[^\n]{0,160}\b(?:invocations?|runnable|not (?:a |an )?(?:command|invocation)|no command|names? (?:the )?tools?|tool names?|prose)\b|\b(?:invocations?|runnable|not (?:a |an )?(?:command|invocation)|no command|tool names?|prose)\b[^\n]{0,160}\b(?:pnpm and vitest|vitest)\b'
    flags: 'i'
    target: 'last_message'

p16985-au-pin-and-compiler-rule

prompt.md:

/harness-memory:audit Audit my memory health. Leave user-level config out of this and don't change any files or research anything online. No one is around to answer questions while this runs, so put what you find in your reply, naming the check behind each finding.

case.yaml:

schema_version: "1.1"
name: p16985-au-pin-and-compiler-rule
description: "Hard case. Source: written for PR 16985 (rows F0214 and F0215: the C7 currency check compares version pins against 'the repo's own pin files' with the `global.json`, `.nvmrc`, `.python-version` and SDK/Node examples deleted; F0216: C8's 'A compiler setting' loses '(nullable, warnings-as-errors)'), the consumer's own writing, no transcript. The scaffold's CLAUDE.md says 'We're on Node 20' while its asdf pin file `.tool-versions` pins nodejs 22.11.0, a pin file none of the old examples named, and restates as prose the strict null checks `tsconfig.json` already enforces. Hard because the pin file is outside the deleted example list and the compiler rule has no deleted example to match. The graders read the reply. Bash is granted for the skill's pre-computed spine. Needs --scaffold --allow-tools Bash."
tags: [audit, harness-memory, currency, enforcement, hard]
plugins: ["../.."]
runs: 3
expected_outcome: "The reply FAILs the 'Node 20' statement under C7 because .tool-versions pins nodejs 22.11.0, and flags the strict-null-checks line under C8 as a rule tsconfig.json's compiler setting already enforces; no file changes."
context:
  scaffold_script: scaffold.sh
execution:
  allowed_tools: [Read, Glob, Grep, Skill, Bash]
  max_turns: 25
  timeout_seconds: 900
graders:
  - name: 'c7-node-pin'
    type: 'regex'
    pattern: '\bC7\b[^\n]{0,200}(?:\.tool-versions|\b22(?:\.11)?\b)|(?:\.tool-versions|\b22(?:\.11)?\b)[^\n]{0,200}\bC7\b'
    flags: 'i'
  - name: 'c8-compiler-setting'
    type: 'regex'
    pattern: '\bC8\b[^\n]{0,200}\b(?:tsconfig|compiler|strictNullChecks|strict)\b|\b(?:tsconfig|compiler|strictNullChecks)\b[^\n]{0,200}\bC8\b'
    flags: 'i'

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 086cb68fba1bbff34db163aa24e00d431adde8c1: #16985 (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 18, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 086cb68fba1bbff34db163aa24e00d431adde8c1, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 086cb68

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-16985-086cb68fba1bbff34db163aa24e00d431adde8c1, expires on 2026-12-18.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=086cb68fba1bbff34db163aa24e00d431adde8c1 rubric=10.3.1 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 18, 2026
Merged via the queue into main with commit 201835b Nov 18, 2026
90 of 93 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-16775-44195898841-1 branch November 18, 2026 07:58
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 201835b83de17fdf9f6d2f279b6b793a3f84d149; 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 harness-memory

1 participant