Skip to content

feat(code-tidying): add aggressive and strip dials to dissolve-comments - #4184

Merged
kyle-sexton merged 18 commits into
mainfrom
feat/dissolve-comments-aggressive-dial
Sep 15, 2026
Merged

kyle-sexton merged 18 commits into
mainfrom
feat/dissolve-comments-aggressive-dial

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

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-comments gains two dials. aggressive (a per-run token and a comment_posture value) 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 is safe, then strip, then aggressive, 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, and statusline-tee.sh's stamp reader from 8 to 1.

Fix

  • No knob loosens a gate. The dials widen what a run removes and change no proof: deletions still carry COMMENT-ONLY, function-local renames RENAME-ONLY, tier-2 and tier-3 moves a discovered test net, and an UNPROVABLE file still yields proposals only. The retired "posture ladder only descends" wording is replaced across SKILL.md, reference/safety.md, README.md, and the option description.
  • A survivor list in 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.
  • Two rules now hold in every mode: a comment paired with a regression test is never deleted alone, and an identifier a repo-local marker row pins is never renamed. A kept comment also stays where it is and keeps its own words.
  • A run is non-interactive whenever AskUserQuestion is unavailable, where it takes a widened rung in safe mode, says so, and does not end on a question.
  • The tier tables in safety.md and dissolving-moves.md agree, one 16-move set; the apply-capacity counts read 2 of 16 and 0 of 16.
  • Version 0.20.0, with the changelog entry, the regenerated options block and catalog, and three evals.json entries.

Verification

  • A new claude plugin eval suite under plugins/code-tidying/evals/: 23 calibration cases plus 2 probes, covering three real sections frozen at 0a676a578, invented fixtures per triage class, exempt surfaces, a marker row, a private Python docstring, a paired record, an UNPROVABLE excerpt, and the aggressive/strip/safe/--notes/./aggressive/non-interactive interactions. Expected outputs were marked by the plugin owner one fixture at a time.
  • Run in WSL2 at --runs 1 --ablation none, about 32 USD across the calibration passes. Every case passes on the final wording: real-hook-utils-header-aggressive 0.93, invented-class-c-aggressive 0.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.
  • Static gates: check-skill PASS, validate-cases.py exit 0, check-evals-quality.sh PASS, sync-plugin-options-docs.py --check exit 0, allowed-tools-pairing.test.sh, scope-code-files.test.sh and changed-code-files.test.sh exit 0, check-purged-em-dashes.sh exit 0, and the two tier tables diff clean tier by tier.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01KcBf2VNNsVTuiqZ1N5RuCu

kyle-sexton and others added 13 commits September 14, 2026 14:38
…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
kyle-sexton marked this pull request as ready for review September 15, 2026 16:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-15T16:27:18.259175Z 2a78f0a 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.

…s-aggressive-dial

# Conflicts:
#	plugins/code-tidying/.claude-plugin/plugin.json
#	plugins/code-tidying/CHANGELOG.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread plugins/code-tidying/skills/dissolve-comments/SKILL.md Outdated
Comment thread plugins/code-tidying/skills/dissolve-comments/SKILL.md Outdated
Comment thread plugins/code-tidying/skills/dissolve-comments/SKILL.md Outdated
kyle-sexton and others added 3 commits September 15, 2026 12:36
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
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
@kyle-sexton
kyle-sexton merged commit 71751c2 into main Sep 15, 2026
12 checks passed
@kyle-sexton
kyle-sexton deleted the feat/dissolve-comments-aggressive-dial branch September 15, 2026 18:17
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.

1 participant