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:
@@ -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
|
import json
|
||||||
|
|
||||||
from loop_claude.outcome import Failure
|
from loop_claude.outcome import Failure
|
||||||
@@ -84,7 +84,7 @@ def structured_output(stdout):
|
|||||||
return (parse(stdout) or {}).get("structured_output")
|
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):
|
def mark_trusted(config, roots):
|
||||||
projects = config.get("projects", {}) if isinstance(config, dict) else None
|
projects = config.get("projects", {}) if isinstance(config, dict) else None
|
||||||
if not isinstance(projects, dict):
|
if not isinstance(projects, dict):
|
||||||
@@ -96,7 +96,7 @@ def mark_trusted(config, roots):
|
|||||||
return {**config, "projects": {**projects, **marked}}, untrusted
|
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):
|
def models_in(files):
|
||||||
"""The (id, name) of each model in the newest of the parsed catalog files."""
|
"""The (id, name) of each model in the newest of the parsed catalog files."""
|
||||||
newest = {}
|
newest = {}
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ NAMESPACE = uuid.UUID("64fb586b-d926-4bb3-a44c-c903e86d3eec")
|
|||||||
|
|
||||||
@dataclasses.dataclass(frozen=True)
|
@dataclasses.dataclass(frozen=True)
|
||||||
class Session:
|
class Session:
|
||||||
|
"""Exists while its transcript does."""
|
||||||
id: uuid.UUID
|
id: uuid.UUID
|
||||||
claude_code_transcripts: pathlib.Path
|
claude_code_transcripts: pathlib.Path
|
||||||
name: str
|
name: str
|
||||||
|
|
||||||
|
|
||||||
def session_for(project, paths):
|
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.
|
# "A " is the human's cue in the session picker that the session is the loop's.
|
||||||
name = f"A {project} loop-claude"
|
name = f"A {project} loop-claude"
|
||||||
return Session(id=uuid.uuid5(NAMESPACE, name), claude_code_transcripts=paths.claude_code_transcripts, name=name)
|
return Session(id=uuid.uuid5(NAMESPACE, name), claude_code_transcripts=paths.claude_code_transcripts, name=name)
|
||||||
|
|||||||
@@ -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.
|
- **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.**
|
- **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.
|
- **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.
|
||||||
|
|||||||
Reference in New Issue
Block a user