Repository navigation
Shorten the AGENTS.md block (format 0.3) and note outdated blocks in check - #4
Merged
Merged
Conversation
Cuts the block init writes from about 800 words to about 390. The rules
are unchanged; the squash-merge and commitlint appendix becomes a short
checklist that points at SPEC.md, which already carries the full
verification detail.
Agent-Context: {"why":"agents load this block at the start of every session in every adopting repo, so its length is a recurring cost, and about half of it only applied to repos that squash-merge or run commitlint. Kept the behavioral rules for those cases in the block (merge-draft, final trailer block placement, gh --body dropping Co-authored-by) and moved only the evidence to SPEC.md, since an agent that never opens the spec still needs the rules","touches":["AGENTS.md","SPEC.md","README.md","cli/src/agentsBlock.ts"]}
check now compares the repository root's AGENTS.md block marker to the
format this CLI writes and prints a one-line note on stderr when it is
older (run init --update) or newer (update the CLI).
Agent-Context: {"why":"the 0.3 block makes 0.2 the first real outdated block in the wild, and nothing told those repos. Kept it a stderr note that never touches the exit code because check's exit code already means something specific (commits missing a usable trailer) and people gate on it. Versions compare numerically so 0.10 is newer than 0.3; a version that isn't dotted numbers is reported as different rather than guessed. Reuses init's marker rules so both commands agree on what's ambiguous, but reads through a symlink since it never writes","touches":["cli/src/init.ts","cli/src/index.ts"]}
Agent-Context: {"why":"the version in the note comes from AGENTS.md, which arrives with any cloned repo, and the marker regex accepts any non-space characters, so an ESC sequence in it reached the terminal raw. Sanitized at the print site with the same sanitizeForTerminal used for commit subjects, rather than narrowing the marker regex, which would also change what init recognizes as a block","touches":["cli/src/index.ts"]}
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.
What
initwrites drops from about 806 words to about 389. Same rules; the squash-merge and commitlint appendix becomes a short checklist that points at SPEC.md, which already holds the verification detail. The trailer format itself is unchanged. SPEC.md's version line now says so, and that the number tracks the block too.checknotes an outdated block. On stderr only, never changing the exit code: "older" suggestsinit --update, "newer" suggests updating the CLI. Reads AGENTS.md at the repository root, compares versions numerically, reuses init's marker rules for ambiguous files, and follows symlinks since it only reads.Why
Agents load this block at the start of every session in every adopting repo, and about half of it only applied to repos that squash-merge or run commitlint. Shortening it creates the first real outdated block (0.2) in the wild, so
checknow says so; the README used to claim it already did.Verification
sync-docs:checkclean.init --updatereplaces only the block, and the surrounding content survives.agent-commit checkon this branch: both commits OK.Release
These go out as CLI 0.3.0 (new block content plus a new
checkbehavior). Release commit, tag andnpm publishcome after merge, same as 0.2.0.