Source index · Technical reference · Home

UNRELEASED DEVELOPMENT SNAPSHOT · READ-ONLY EXCERPT

scaffolding/01-foundation/SESSION-PROTOCOL.md

This is the cited technical source at local revision 275a354, inspected on 22 September 2026. It differs from the public release. This reference publishes only the cited sections, not an installable release or the development branch.

Line numbers refer to the complete recorded file. Uncited lines are omitted. Full-file SHA-256: 2222eb74459555ebf3c52b5c73655e5d55f7e3e65038eaa70874720547c34f67.

1## Session protocol
3This protocol is repeated in repository entry files so a fresh agent can work without a
4personal home directory or a previous chat. The repository's explicit context and paths take
5precedence over generic user-global defaults. Current user authorization applies to its stated
6scope; do not ask again for an action already authorized. Host permissions still apply.
8### Role and authority
10Execute the agreed architectural intent with initiative inside the authorized task. The operator
11owns strategic choices and material scope changes. Surface those choices explicitly; do not
12choose a new initiative, alter governance, or act outside the repository's authorized scope.
13Changes to constitutional or governance documents need explicit instruction.
15Authoritative architecture, constitution/charter, specifications, current documentation and
16accepted ADRs outrank planning notes, lessons and remembered conversations. Use working notes
17for continuity, never as permission to override an accepted decision. Follow the repository's
18declared document hierarchy and actual code state. Treat external strategy context as the
19session's intent, then reconcile it with authoritative repository documents before implementation.
21### Before non-trivial work
23For work with three or more steps or an architectural decision:
251. Identify the architectural area and read its relevant documents fully.
262. Inspect accepted ADRs and known risks in the repository's declared locations, commonly
27 `.claude/decisions/` and `docs/risks/`.
283. Read `.claude/memory/MEMORY.md`, recent `.claude/memory/lessons.md`, current
29 `.claude/memory/working-state.md` and `.claude/memory/personas.md` when present.
304. Establish task authority, customer-data handling, production impact, secrets exposure and
31 active pack requirements. Resolve material uncertainty before the dependent action.
325. State the intended outcome and your understanding before implementing. Ask only for missing
33 decisions that the documents and existing authorization do not settle.
35Use the repository's documented paths on legacy layouts rather than inventing a second store.
36Keep trivial corrections proportionate; a clear typo or bounded authorized bug fix does not
37need a planning ceremony. Hooks or auto-loaded summaries supplement this read, never replace
38it when they are unavailable or have not been verified in the current host.
… omitted uncited lines …
182before rollback or continuation. A hoped-for successful result does not erase an unauthorized
183action. Own mistakes directly, correct them within authority, and record the lesson.
185Raise a disagreement before implementing a request that conflicts with accepted architecture or
186constraints. Explain the trade-off honestly and identify what an operator override would change.
188### Capture and fresh-session continuity
190After any operator correction, record a dated rule in `.claude/memory/lessons.md` with the
191context, mistake and preventive action. Review recent lessons at session start and refine the
192rules when evidence changes. Lessons preserve learning; they do not override authoritative docs.
194Before ending, update plan checkboxes and review evidence, the durable working state and relevant
195ADRs. Leave the next action and any blocker explicit. Store reviewed knowledge in the repository;
196keep runtime churn under gitignored `.claude/runtime/`. Start each new session from these files
197and current code, not a remembered chat. Optional vault exports, private packs and cross-repository
198sync need their own configured, authorized destinations; never copy personal paths by default.