Repository navigation
feat(final-review): ship only changes that meet the standard, with independent reviews and a workaround scan - #40
Merged
Conversation
…mp the review posture
…a workaround checklist
…eviewers from the source, and send design decisions to the user
…structions, not the author's review
… untracked links without a stale stamp or a crash
…fixed in the same pass
… and say when a new scan file leaves the defaults in use
…ees' stamps apart, and judge prose one way
…karounds, and give later second-opinion rounds only where each finding was fixed
…rktree's stamp so no branch can collide with it
…, stamp and re-check wording
…special files, recognise more test files, and run in the starting directory
… early-exit stamps, and rescan at the re-check
… guard, and pin special files and renames through the CLI
…or reviewers, and let the posture shape the second opinion
…guage support is out of scope
… as real behaviour is no finding
…n the timer and catch patterns
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.
Why
A multi-PR program passed this gate with workarounds stamped
ready to ship. A separate audit caught them only later:One change was correct, tested and green, yet it added about 1,300 lines and slowed every cold start by 40% to avoid a rare event. Nothing checked proportionality.
Three parts of the gate let this happen:
ready to shipcould stand withreworkdeferred, and "do not start rework unless asked" let the deferred list keep growing.What
code-quality: an ordered standard (
references/standards.md). It has eight principles, applied top to bottom:Each principle has a definition, how a reviewer spots a violation, and its usual class.
Scope. The standard applies to:
Code that existed before the workstream never blocks, and nothing asks a change to retrofit it. Bringing an area up to the standard is an audit's job.
Postures.
balancedapplies principles 1, 3 and 4, and applies 5 to 8 only where the change adds a module or contract, then asnitunless the design gets clearly worse.strictapplies all eight.SKILL.mdcarries an 8-line summary and a pointer to the reference. The vendored rules are bounded by scope and posture.audit, define, debug and deliver point at the standard.
code-quality: a workaround checklist (
references/workarounds.md). It names ten concepts, with no API or language in them. "Two owners of one piece of state" lives in principle 8, and the checklist links to it.rework, oreasywhen the fix is local. A cited external cause, with the workaround minimal and in one place, is no finding.final-review: verdict.
ready to shiprequires green checks, no design decision left open, and no countedeasyorreworkfinding left open.not ready, with the options on aDecide:line.ready to shipstamp is reused.final-review: independent reviewers. Each reviewer gets the scope commands, the issue, spec or request, the posture, the project instructions, its own skill file, and the workstream's earlier unreleased work when the caller names it. The second opinion's round 1 gets the same. Rounds 2 and 3 get only the earlier findings and where each was fixed.
final-review: bounded steps. See below.
final-review:
gate.mts scan --base <ref>. It lists each added line that matches a workaround pattern, asfile:line, cut to 200 characters..final-review-scanfile, read at the merge base. The scan prints a note when the change edits that file.final-review:
--postureonreadandwrite. The posture is stamped with the verdict. Abalancedstamp never satisfies astrictrun.final-review: fixes to
collect, the code behindfacts,readandwrite. Each fix has a failing test written first.factsno longer counts lockfiles. The stamp still covers them, so a lockfile-only change runs the checks again..detached/key that no branch name can match.factsandscan.fixafterfix/thing) gets its own stamp.INIT_CWD.scripts/lockfiles.mts, servesgate.mts,run-review.mtsand the scope commands, throughgate.mts locks.second-opinion.
--notesis still required.deliver. A design decision parks the issue as a drafted decision. Out-of-scope findings become drafts, and other open findings go in the PR body. A track's gate gets the posture, the second-opinion harness and, as its workstream, the program's earlier unreleased PRs (with issue gates, also the track's earlier issues).
audit. It passes its posture on to deliver.
create-pr. A stack's second opinion is briefed with each layer's issue. Each changed layer's gate re-runs with the layers below it as its workstream.
Why the gate cannot loop
scanruns again. A finding counts only if the fixes introduced it, or if it is aneasyorreworkfinding still unfixed from the first review; nits never block. The exceptions are correctness bugs and workarounds in the change's scope. Either blocks whenever it is noticed, is fixed then (unless the fix needs a design decision), and the checks run once more with no further review. Any other late finding is listed and does not block.balanced(the default) holds design principles 5 to 8 to new modules or contracts.How the skills follow the same principles
Settled by the maintainer
.final-review-scanis committed and read at the merge base.Open decision
Cross-skill import.
run-review.mtsnow imports the lockfile list fromfinal-review/scripts/lockfiles.mts, the first script to import from another skill.pnpm check.Out of scope
test_*.py,*Test.java,tests/) is out of scope for this PR, by the maintainer's ruling.isTestPathis unchanged, and no follow-up issue is planned.INIT_CWD: handoff, deliver, github, audit and atlassian. This predates the workstream.Reviews
pnpm checkis green: prettier, tsc, 125 tests, check-skills and sync-version. CI is green.easyfinding is fixed.easyfindings; 12 are fixed, and 1 was ruled out of scope (test files in other languages).ready to ship.gate.mtsreadsINIT_CWDwhen present. That value is inherited from any enclosing pnpm or npm process.