diff --git a/CLAUDE.md b/CLAUDE.md index 4eb24ebd..869c3f53 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -79,9 +79,7 @@ Prose describing the code as it stands — a comment, a README, an `AGENTS.md`, ### Decisions: one home, each linked to a goal or a technical principle -**A choice confined to one place is a comment there, with its reason.** One line at the code it governs. Once the same choice is made a second time it is a pattern, and it moves to the decision log. - -**A decision record owns a choice made in more than one place.** Its rejected alternative, or what it deliberately does not cover, stays out of every call site because the record holds it — a standing choice a future reader would otherwise relitigate, where a `CHANGELOG` holds what changed in a release. **The decision log has one home: `docs/decisions.md`**, or `docs/decisions/` split by area once it outgrows one file. A title states the whole decision in one line: what holds at the commit it ships in, in words a reader finds in the code or the plan. `AGENTS.md` lists every title, so a session works by the decisions without loading their background. A session reads the entry under a title only to question, revise or add a decision. The entry holds the background: its date, who made it, the reasoning, and the premise it rests on ("valid while X") so it can expire honestly when that premise dies. A recurring choice found anywhere else — an `AGENTS.md` body, a comment at each site, or a README section that is neither a goal nor how one is met — moves there and leaves its title in `AGENTS.md`'s list. A goal stays a goal in the README; the log records only what the goal leaves open. +**A choice that shapes what the code does, made in one place, is a comment there, with its reason. Made in more than one place, it is a decision, and the decision log owns it.** Its rejected alternative, or what it deliberately does not cover, stays out of every call site. **The decision log has one home: `docs/decisions.md`**, or `docs/decisions/` split by area once it outgrows one file. A title states the whole decision in one line: what holds at the commit it ships in, in words a reader finds in the code or the plan. `AGENTS.md` lists every title, so a session works by the decisions without loading their background. A session reads the entry under a title only to question, revise or add a decision. The entry holds the background: its date, who made it, the reasoning, and the premise it rests on ("valid while X") so it can expire honestly when that premise dies. A choice found anywhere else — an `AGENTS.md` body, a comment, or a README section that is neither a goal nor how one is met — moves: to a comment at its one place, or, once it recurs, to the log, leaving its title in `AGENTS.md`'s list. A goal stays a goal in the README; the log records only what the goal leaves open. **Every decision links to a goal or a technical principle.** An entry names the goal it serves or the technical principle under `~/.claude/principles/` it applies; one that can do neither is a missing goal, and an entry already in the repo with neither behind it is a finding. Propose the goal, never a reason of your own — "Ask, don't guess" under "Working loop" says how. An entry working against a goal or a technical principle stands only while it names the `todo.md` item that ends it. diff --git a/agents/prose-reviewer.md b/agents/prose-reviewer.md index 65204a78..222bacae 100644 --- a/agents/prose-reviewer.md +++ b/agents/prose-reviewer.md @@ -14,7 +14,7 @@ Run them in this order. A fix for a later check never breaks an earlier one. 1. **Easy to understand.** Read each sentence once, cold. A sentence you had to reread, a term used before it is explained, or an "it" or "them" that could point at two things is a finding. Fix: **Rewrite**, giving the plain sentence. 2. **Most important first.** Name the document's reader and what they want to know first. Check that the sections run in that order, then the paragraphs within each section, then the items within each list. If not, fix: **Reorder**, naming the new order. A section so long that a reader has to search it gets sub-headings or an index. Fix: **Split**. -3. **Default to delete.** A line the reader does not need fails. Fix: **Delete** what the code, a type, a test name, the README or another rule already says. Fix: **Move** a decision made in more than one place to `docs/decisions.md` with its title in `AGENTS.md`, one confined to one place to a comment there, and a goal to the README. A pointer standing where a definition belongs ("A pointer is not a definition") gets the fix **Move back**: inline the definition, and leave the reasoning where it is. +3. **Default to delete.** A line the reader does not need fails. Fix: **Delete** what the code, a type, a test name, the README or another rule already says. Fix: **Move** a choice made in one place to a comment there, one made in more places to `docs/decisions.md` with its title in `AGENTS.md`, and a goal to the README. A pointer standing where a definition belongs ("A pointer is not a definition") gets the fix **Move back**: inline the definition, and leave the reasoning where it is. 4. **Short.** Words that do not clearly help 1–3 fail. Fix: **Cut**. Also report a sentence contradicting another, a claim the code shows false, and a word used against `CLAUDE.md` → "Vocabulary". diff --git a/bin/statusline.py b/bin/statusline.py index 17778ca7..ffac7a9b 100755 --- a/bin/statusline.py +++ b/bin/statusline.py @@ -67,7 +67,7 @@ def limit(raw: dict[str, object], window: str, zone: datetime.tzinfo | None) -> # The input's fields: https://code.claude.com/docs/en/statusline -# A field absent, null or of the wrong type is left out silently: Claude Code's schema drifts by renaming or dropping fields, which a type warning would miss. +# Leave out a field absent, null or of the wrong type without a warning: many are absent in normal use (no rate_limits for API users), so drift shows only as absence. def parse(raw: dict[str, object], zone: datetime.tzinfo | None) -> Status: return Status( context_percent=number(raw, "context_window", "used_percentage"), diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 3f8d5d05..ae934081 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -1,6 +1,6 @@ --- name: larv-review -description: Ship a work chunk through review to a merged PR; decisions land in the repo's decision log so repeated reviews converge. Use when the user asks for /larv-review, says "implement X then run larv-review", or wants a chunk shipped, reviewed and merged. +description: Ship a work chunk through review to a merged PR; decisions land in a comment at their one place, or in the decision log once they recur, so repeated reviews converge. Use when the user asks for /larv-review, says "implement X then run larv-review", or wants a chunk shipped, reviewed and merged. --- # larv-review — ship the chunk, review until clean, gate green, merge @@ -63,8 +63,8 @@ A comment is prose, not code. Passes run in this order: line-level polish on cod 1. A finding outside the chunk's change is filed in `todo.md`, under a release, whatever its pass or severity. A verified security HIGH is handled per "Security". 2. A fix that would change a goal, or a decision the repo held before the chunk began, is asked; no user reachable → filed, the goal or decision left as is. -3. A 🔴 is fixed, or shown factually wrong, with what disproved it recorded per `~/.claude/CLAUDE.md` → "Decisions: one home, each linked to a goal or a technical principle": a comment at the one place it concerns, `docs/decisions.md` once it recurs. Never declined. -4. A 🟡 is fixed, shown factually wrong like a 🔴, or declined. Decline one only where the reason is sound, consistent with the goals and the technical principles, and confidence is very high; the decline, its reason and the goal or technical principle it rests on are recorded the same way. A reason neither speaks to is a gap in the goals: fix the finding, or ask per `~/.claude/CLAUDE.md` → "Working loop", "Ask, don't guess"; no user reachable → fix. Never drop one silently, and never decline one for convenience or the size of the fix. +3. A 🔴 is fixed, or shown factually wrong, and what disproved it recorded per `~/.claude/CLAUDE.md` → "Decisions: one home, each linked to a goal or a technical principle": in a comment at the code the finding concerns, or in `docs/decisions.md` when it concerns more than one place. Never declined. +4. A 🟡 is fixed, shown factually wrong like a 🔴, or declined. Decline one only where the reason is sound, consistent with the goals and the technical principles, and confidence is very high; the decline and its reason are recorded the same way, and an entry in `docs/decisions.md` also names the goal or technical principle it rests on. A reason neither speaks to is a gap in the goals: fix the finding, or ask per `~/.claude/CLAUDE.md` → "Working loop", "Ask, don't guess"; no user reachable → fix. Never drop one silently, and never decline one for convenience or the size of the fix. 5. A 🟢 or ❓ is fixed, answered, declined in the summary with its reason, or filed. Answer one where the code, a test or a record settles it, and quote what in the summary. A ❓ only the user can answer is asked; no user reachable → filed. 6. A 🔀 runs the named pass once the current pass is done. 7. Other reviewers map onto this scale: `/security-review`'s HIGH is 🔴, MEDIUM 🟡, LOW 🟢; what a forge's auto-reviewer marks blocking is 🔴. A finding of theirs repeating one declined or filed does not stand.