Repository navigation
refactor(#1509): split initCommand, doctorCommand, syncCommand and updateCommand to ≤ 200 counted lines; max-lines-per-function ratchet for src/commands - #1561
Merged
admarble merged 8 commits intoOct 20, 2026
Conversation
… 200 lines; add max-lines-per-function ratchet Entire-Checkpoint: 8216b87a3c7c
Entire-Checkpoint: db8a0163a60e
Entire-Checkpoint: f3d9f11dc539
Entire-Checkpoint: 8a9602f132ae
…or the ownership registry Entire-Checkpoint: 8329b5251dc2
… finding) Entire-Checkpoint: 66df769a9c13
…th main's lower counts Entire-Checkpoint: 7feea8d4701b
Entire-Checkpoint: b78186b7d922
admarble
deleted the
feature/1509-refactor-commands-split-initcommand-doctorcommand-
branch
October 20, 2026 02:53
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.
Summary
0.grep -c "src/commands/\*\*" eslint.config.jsreturns1.npm run lintis green, andlint:healthreports no metric above the baseline.0.templates.test.ts.functions.over200is now7, down from 12. I regenerated the baseline for that.src/commands/<name>/modules.syncandupdatewas not copied anywhere.eslint.config.js, scoped tosrc/commands/**/*.ts.[Unreleased]line under the existing### Changedheading.The affected-tests run (
npx vitest run --changed origin/main, 26 files) first failed one test:templates.test.tskeys its write-site registry by enclosing function, so moving the.sequant/settings.reference.mdwrite out ofinitCommandbroke it.writeFileback intoinitCommand. I re-rantemplates.test.tsand the init suites (7 files, 162 tests), which pass. I did not repeat the full affected run after the fix.I skipped the mutation check for AC-2 and wrote no
SEQUANT_MUTATIONmarkers. No test gates AC-2; before the splits, the lint run showed the five over-limit functions.npm run knipdoesn't exist in this checkout, so I checked unused exports only through lint; nothing new is exported.Pre-PR confidence check
doctor.tsandinit.ts, and only the existing tests guard the output order. Reviewing withgit diff --color-movedis the best check.Next step: the orchestrator opens the PR and runs
/qa.Fixes #1509
Runner verification (2026-10-20)
After merging main (through #1512), the runner re-ran AC-1..AC-6 verbatim at 2d70570:
01green0templates.test.ts)7The baseline records
functions.over2007 (from 12) andover4002 (from 4).Control flow traced: every early
returnin the oldinit/doctor/sync/update/readycommand functions either stays in the command function or became a helper whose result the caller checks.resolveTokens→if (!tokens) return.reportVersionCurrentDriftkeeps fix(update/sync): sync reports 'up to date' on content drift; update overwrites in-place customizations (constitution) #708'sexitCode = 1.Fixed from QA: the eslint ratchet comment now allows same-file step functions.
🤖 Generated with Claude Code