feat(setup): ask about concise-response preference and append to CLAUDE.md - #2112
Merged
Conversation
…DE.md Adds Step 8a to /setup — asks the operator whether Claude should give concise responses by default in this repo, and idempotently appends the standard concise-response block to the project's CLAUDE.md when confirmed.
…e step Addresses code-review findings on Step 8a: decouple the idempotency marker from the appended prose so a wording tweak can't desync it, guard against a duplicate "## General" heading, create .claude/ before appending, skip symlinked CLAUDE.md files, disclose that the block is a shared repo convention (not personal), align the outcome-token vocabulary across the script/instructions/report, fix a line-wrap that truncated the generated knowledge-index summary, and add content-guard test coverage.
…pend Closing-pass review round 2 found two real bugs in round 1's fixes: a symlinked .claude/ directory (not just the file) could still escape the append, and the "skip a duplicate ## General heading" merge-detection logic itself introduced an EOF-orphaning bug and a CRLF-fragile anchor. Drop the merge-detection entirely — the marker alone already guarantees idempotency — and guard both .claude and .claude/CLAUDE.md against symlinks before any write. Also scope the two content-guard tests that were checking the whole document (or a loose >=2 count) down to the specific bullet/script/report-line they claim to cover, so they'd actually catch the regressions they're named for.
…success Round-3 verification found the script echoed "concise-preference-added" unconditionally after the append redirect, so a failed mkdir/touch/append (e.g. .claude exists as a regular file, or the tree is read-only) was silently misreported as success. Gate the echo on the redirect's own exit status and add a sixth outcome token, concise-preference-write-failed, so a real failure is never indistinguishable from a real success.
…eady set Step 8a used to ask the operator every run and only check the idempotency marker after confirmation, inside the append script. Move that check before the prompt: if the marker is already present, skip the whole step silently (no prompt, no --yes/--dry-run branching) instead of re-asking a question whose answer is already committed to the repo.
…pt gate The --yes Conservative bullet and the outcome-provenance paragraph still described the pre-pre-check behavior, contradicting the new gate: an already-covered repo now reports concise-preference-already-covered before --yes is ever consulted, not concise-preference-skipped-under-yes.
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
/setup— asks the operator whether Claude should default to concise responses in this repo, and idempotently appends the standard concise-response block to the project'sCLAUDE.mdwhen confirmed.--yessemantics (never guesses the preference; skips and notes) and the Step 12 report..claude/.claude/CLAUDE.md, gates the reported outcome on the write actually succeeding, and adds content-guard test coverage (tests/skills/test_setup_concise_preference.py).Went through 3 code-review rounds — round 1 caught scope/idempotency/vocabulary issues, round 2's fixes introduced a symlink-dir gap and a CRLF-fragile heading-merge that round 2's own panel caught, round 3 caught an unconditional-success-echo bug. Full 9-agent panel converged clean on the final pass.
Related
Test plan
tests/skills(1873 passed) and the full mandated pytest dir list green/setupinteractively on a downstream test project and confirm the prompt + append behavior/setup --yesand confirm the prompt is skipped with the expected report line