Name formats.py's samples by what they are, put Session's lifetime on Session, and file the prose pass's places

This commit was merged in pull request #135.
This commit is contained in:
2026-09-29 11:53:46 +02:00
parent c2be13efd5
commit aba2a98d7e
3 changed files with 9 additions and 4 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
"""Every Claude Code shape loop-claude reads, each under a sample of it, as Claude Code 2.1.284 writes it."""
"""Claude Code's JSON shapes loop-claude handles, each under a sample of it, as Claude Code 2.1.284 writes it."""
import json
from loop_claude.outcome import Failure
@@ -84,7 +84,7 @@ def structured_output(stdout):
return (parse(stdout) or {}).get("structured_output")
# ~/.claude.json: {"projects": {"/home/me/code/log": {"hasTrustDialogAccepted": true, ...}}, ...}
# Claude Code's config: {"projects": {"/home/me/code/log": {"hasTrustDialogAccepted": true, ...}}, ...}
def mark_trusted(config, roots):
projects = config.get("projects", {}) if isinstance(config, dict) else None
if not isinstance(projects, dict):
@@ -96,7 +96,7 @@ def mark_trusted(config, roots):
return {**config, "projects": {**projects, **marked}}, untrusted
# <model catalog>/*.json: {"fetchedAt": 1790618085238, "catalog": {"config": {"models": [{"id": "claude-opus-5-5", "name": "Opus 5.5", ...}]}}}
# A model catalog file: {"fetchedAt": 1790618085238, "catalog": {"config": {"models": [{"id": "claude-opus-5-5", "name": "Opus 5.5", ...}]}}}
def models_in(files):
"""The (id, name) of each model in the newest of the parsed catalog files."""
newest = {}
+1 -1
View File
@@ -11,13 +11,13 @@ NAMESPACE = uuid.UUID("64fb586b-d926-4bb3-a44c-c903e86d3eec")
@dataclasses.dataclass(frozen=True)
class Session:
"""Exists while its transcript does."""
id: uuid.UUID
claude_code_transcripts: pathlib.Path
name: str
def session_for(project, paths):
"""Exists while its transcript does."""
# "A " is the human's cue in the session picker that the session is the loop's.
name = f"A {project} loop-claude"
return Session(id=uuid.uuid5(NAMESPACE, name), claude_code_transcripts=paths.claude_code_transcripts, name=name)
+5
View File
@@ -20,3 +20,8 @@ The places the panel on `rebuild` at 2f9ab2f named (`docs/decisions.md`), cappin
- **Show the judge's reply when `loop-claude` rejects its verdict.** Its stdout is discarded, so a judge that failed three times running leaves nothing to diagnose.
- **Back up `loop-claude`'s transcript archive to a destination other than this repo's remote.**
- **Make the contributor a standing member of every project's audience, dropped only where `## Audience` says maintainability does not matter.** `CLAUDE.md`'s premises rule states it; larv-review's comprehension floor names the contributor as the reader it serves, so the floor gates every chunk while the contributor stands and a project that drops them skips it.
- **Give `docs/decisions.md`'s comprehension-floor and vocabulary entries a premise that has not already expired, with the floor's rule first and its runs' scores as a table, and give the rebuild entry's warning placement its own heading and index line.** A prose pass found both "Valid until the next scoring run" outlived by three runs.
- **Move larv-review's reasons for `/security-review` and for the premises chunk's review into `docs/decisions.md`, and inline in `review-findings.md` what a round is.** A prose pass found rejected alternatives at the rule, and a pointer back to `SKILL.md`, which points here.
- **Cut `comprehension-panel`'s run history and the restated description, `systems-architect.md`'s "one home" line, and split its Reasonability Review steps 4 and 5.** A prose pass found them carrying nothing the instructions need.
- **Keep `outcome.Failure`'s docstring to what a failure is, without naming `retried`.** A value type naming its consumer.
- **Say in `AGENTS.md` that only the rebuild's last chunk opens `rebuild`'s PR into main.** Today it reads as every chunk doing so.