feat(code-tidying): add aggressive and strip dials to dissolve-comments - #4184
Merged
Merged
Conversation
…al suite Brief and approved plan for an `aggressive` posture and a `strip` argument on /code-tidying:dissolve-comments, calibrated by a claude plugin eval suite run in WSL2 against expected outputs the owner writes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMAbPZjcSzfppwu1AoCpag
…omments Two probe cases prove the eval harness in WSL2 before any calibration case is written: the sandboxed Bash resolves a python3 with the comment-tooling wheels, the slash invocation fires the skill, change-shape.sh returns COMMENT-ONLY inside the with-arm, and file-content graders read the edited file. The plan records the Docker credential-store symlink that blocks Bash-granting runs and the temporary-HOME workaround. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMAbPZjcSzfppwu1AoCpag
Twenty-three calibration cases for claude plugin eval cover three frozen real sections (statusline-tee.sh stamp reader, check-silent-revert.sh design block, lib/hook-utils.sh header), invented class A, B, C, exempt-surface and edge fixtures, and the aggressive, strip, safe, --notes, ./aggressive, non-interactive, and UNPROVABLE interactions. Every expected outcome was marked by the owner; kept comments must be at most two succinct lines. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMAbPZjcSzfppwu1AoCpag
…ive dial Phase 3's first work item is the consumer sweep; its hits and their dispositions are recorded before any wording changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
…mments aggressive keeps only the exempt surfaces, paired comment-plus-test records, and terse warnings of consequence; every other comment is staged and deleted. strip deletes every comment but the exempt surfaces and rewrites no code. --notes writes the staged block to an untracked file, refusing a tracked path. No gate moves: deletions still carry COMMENT-ONLY, function-local renames RENAME-ONLY, tier-2 and tier-3 moves a discovered test net, and an UNPROVABLE file yields proposals only. The retired "posture ladder only descends" wording is replaced by "no knob loosens a gate", and the two tier tables are reconciled to one 16-move set. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
Every static gate passed, the em-dash scan included. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
…rst eval pass Pass 1 scored 0.92 with four cases under the bar. "Warning of consequence" is now defined: a runtime failure a caller hits by using the code as written, not the reason a value was chosen. The exempt bullet for units, sentinels, ownership, thread-safety and ordering narrows to annotations on the adjacent declaration, so a sentence about a choice is triaged like any other comment. A kept comment now stays where it is and keeps its own words, and a run is non-interactive whenever AskUserQuestion is unavailable. Six grader anchors widened where a correct result was missed or a reworded keep passed a deletion check. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
…can show Any untracked file keeps the scope ladder on the uncommitted rung with zero code files, where the doctrine correctly stops, so the case cannot reach a widened rung. It now checks the posture statement instead: the run names the rung it resolved, says the session is non-interactive, names the explicit-target re-run, and does not end on a question. The skill states that rule for a zero-file rung as well as a widened one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
The aggressive run kept a library's header, its kill-switch note, and a predicate note, reading each as an exempt public-API doc comment. The exemption now names the language's structured doc-comment form; a language without one has no exempt surface there. A warning also earns its keep only when the failure it names is not already visible in the adjacent code. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
A comment explaining why a sibling function exists, or why an interface is shaped as it is, is design rationale and is staged and deleted; a warning belongs to the declaration it sits on. The succinct-keep grader now counts comment lines with content, so a blank comment line between two two-line keeps no longer reads as one oversized block. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
A required call order is what the doctrine now defines a warning to be, and the note is one succinct line. The case expects it kept within the budget instead of deleted; the owner agreed after the definition landed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
…ed keep The widened anchor matched the word "Sourced" in a kept line, so a correct run failed a deletion check. It now names phrases only the deleted description carried. The plan records passes 2 to 5. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
Every case passes on the final wording, case by case. The owner declined a whole-suite confirmation pass and sent the work to review. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
kyle-sexton
marked this pull request as ready for review
September 15, 2026 16:22
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…s-aggressive-dial # Conflicts: # plugins/code-tidying/.claude-plugin/plugin.json # plugins/code-tidying/CHANGELOG.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a78f0a0f8
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The topic slice is branch-lived. Its durable outcomes shipped: the doctrine in the skill body and its references, the expectations in the eval suite, the calibration record in the pull request body, and the release note in the changelog. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
Three lint gates read the fixtures as ordinary source. A fixture test now names every shared fixture and asserts it still parses and self-certifies, which is also the guard against corpus rot; the shebang-carrying fixtures take the executable bit the repo requires of any shebang file; and an .editorconfig beside the suite exempts frozen corpus from indentation normalization, because a Makefile recipe needs its tab and rewriting whitespace would change what the graders measure. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
The probe fixture and the fixture test carry a shebang, so the repo requires mode 100755 on both. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
kyle-sexton
enabled auto-merge (squash)
September 15, 2026 17:07
--notes now refuses a symlink before the index check, because `git ls-files --error-unmatch` reads the entry for the path it is given and an untracked link to a tracked file would otherwise pass while the append lands on the tracked target. The triage step's done condition is mode-aware: under aggressive and strip only survivors owe a criterion-2 verdict, matching the instruction that skips the evidence check for everything leaving anyway. The apply step routes aggressive through the over-budget rewrite path, so a survivor longer than the budget is rewritten with its narrative staged rather than left as it stands. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No related issue: calibration work driven interactively with the plugin owner, from an interview and plan under
docs/topics/dissolve-comments-aggressive-dial/.Summary
/code-tidying:dissolve-commentsgains two dials.aggressive(a per-run token and acomment_posturevalue) keeps only the exempt surfaces, paired comment-plus-test records, and terse warnings of consequence; every other comment is staged and deleted, rationale included.strip(a per-run token) deletes every comment but the exempt surfaces and rewrites no code.--notes <path>appends the staged commit-message block to an untracked or out-of-repo file and refuses a tracked one. Precedence issafe, thenstrip, thenaggressive, and a token beats the standing posture.The skill removed 2 of about 2,360 comment lines across four runs on this repository, because every posture kept rationale that passed the class-C test. On the frozen fixtures the dial now takes
lib/hook-utils.sh's header from 46 comment lines to 4,check-silent-revert.sh's design block from 34 to 1, andstatusline-tee.sh's stamp reader from 8 to 1.Fix
SKILL.md,reference/safety.md,README.md, and the option description.SKILL.md, because an eval with-arm cannot read the skill's reference spokes. It defines a warning of consequence (a runtime failure a caller hits by using the code as written, not the reason a value was chosen), narrows the units-and-sentinels exemption to annotations on the adjacent declaration, and scopes public-API doc comments to a language's structured doc-comment form, so a shell header block takes the ordinary triage.AskUserQuestionis unavailable, where it takes a widened rung in safe mode, says so, and does not end on a question.safety.mdanddissolving-moves.mdagree, one 16-move set; the apply-capacity counts read 2 of 16 and 0 of 16.evals.jsonentries.Verification
claude plugin evalsuite underplugins/code-tidying/evals/: 23 calibration cases plus 2 probes, covering three real sections frozen at0a676a578, invented fixtures per triage class, exempt surfaces, a marker row, a private Python docstring, a paired record, an UNPROVABLE excerpt, and theaggressive/strip/safe/--notes/./aggressive/non-interactive interactions. Expected outputs were marked by the plugin owner one fixture at a time.--runs 1 --ablation none, about 32 USD across the calibration passes. Every case passes on the final wording:real-hook-utils-header-aggressive0.93,invented-class-c-aggressive0.90, the rest 1.00. A single whole-suite confirmation pass on the final wording was offered and declined, so no invocation has yet scored all 23 green at once.check-skillPASS,validate-cases.pyexit 0,check-evals-quality.shPASS,sync-plugin-options-docs.py --checkexit 0,allowed-tools-pairing.test.sh,scope-code-files.test.shandchanged-code-files.test.shexit 0,check-purged-em-dashes.shexit 0, and the two tier tables diff clean tier by tier.Related
docs/topics/dissolve-comments-aggressive-dial/PLAN.mdcarries the Brief, the plan, the owner's per-fixture calibration marks, and the per-pass eval record.overrideargument uses.🤖 Generated with Claude Code
https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu