Operating manual for Claude Code sessions in this repo.
Deterministic policy and effects runtime for LLM tool calls. Public API and observable semantics are defined by the architectural invariants below; the sibling project at MacFall7/M87-Spine-lite is informational and not a parity target. See docs/explanation/porting-notes.md for the relationship.
You decide:
- File contents, signatures, types, tests, commit messages.
- Refactors that don't change the public API.
- Lint, format, and typecheck rule application.
Mac decides — halt and ask:
- Anything in
src/spine_lite/__init__.py's__all__. - New dependencies beyond
pyproject.toml. - Phase boundary transitions (1→2, 2→3).
- PyPI publish, repo visibility, GitHub Pages enablement.
- Closed effects taxonomy. Six members:
READ,WRITE,NETWORK,EXECUTE,SPAWN,DESTRUCTIVE. No additions without project sign-off. - Precedence:
DESTRUCTIVE > SPAWN > EXECUTE > NETWORK > WRITE > READ.most_restrictive()returns the highest. - Determinism. No timestamps, UUIDs, or randomness in
effects.py,classifier.py,posture.py,manifest.py,receipt.py. Inject entropy where you need it. - No I/O in those five modules. I/O lives in
hook.py,cli.py, and tests. mypy --strictclean on every commit. NoAnywithout a comment justifying it.- Public API gate. Anything not in
__all__is private. Private names start with_. - This file ≤ 150 lines. Refactor before letting it sprawl.
- Python 3.11+.
from __future__ import annotationsat the top of every module. - Frozen, slotted, kw-only dataclasses by default.
- Google-style docstrings on every public symbol.
logging.getLogger(__name__)with aNullHandlerat package init. Library never configures logging.- Conventional Commits. Subject ≤ 72 chars, imperative mood, no trailing period.
- Direct prose. No marketing tone, no LLM boilerplate, no performative empathy.
Before any commit:
nox -s lint typecheck test
All three green or no commit. Before any push, also coverage and docs. Coverage ≥ 95% on touched files. Docs build with --strict.
Halt and report when:
- A phase exit gate item is unclear.
- The architectural invariants above conflict with new code or new decisions.
- A test fails you can't explain in 15 minutes.
- You're about to add a dependency.
- You're about to modify
__all__. - Two consecutive CI runs fail on the same root cause.
Halt format:
HALT: <one-line reason>
Context: <what surfaced>
Options: <2-3 with tradeoffs>
Recommendation: <pick + reasoning>
Awaiting: <decision needed>
- Phase 1 — scaffold + CI + docs deploy. Tags
v0.1.0a0. - Phase 2 —
manifest,classifier, and the closedPostureenum complete. Pydantic v2 models, round-trip parity tests against authored fixtures,hypothesisfor invariants. Tagsv0.2.0a0. - Phase 3 —
posture,receipt,hook,clicomplete. End-to-end PreToolUse integration with Claude Code. Tagsv0.3.0a0.
Phase exit gates and receipts live in RECEIPTS.md.
- In-repo only. Don't touch the sibling project at MacFall7/M87-Spine-lite (informational, not a parity target).
- Don't invoke Patronus, Braintrust, or Arize SDKs (operator-decision pending).
- No network calls in tests. No LLM calls anywhere in the runtime.
Append to RECEIPTS.md after every phase day or major milestone. Never edit prior entries. Mac mirrors entries to the canonical run-registry on his side.