Never skipped
The session-start inbox and the stop-time docs gate run as fixed code paths in the harness. Claude doesn’t choose to run them, and can’t forget them at the end of a long session.
How it works · installed behavior, not aspiration
What actually happens when you open a kit-installed repo and talk to Claude Code — Anthropic’s agentic coding tool — with the kit shaping its agent loop through project memory, skills, and hooks. It is all written into the kit’s CLAUDE.md, loaded at the start of every session.
Session start
Claude Code never holds your whole repo in its context window, and it doesn’t need to.
The installed CLAUDE.md imports three small files at load time — docs/GOAL.md and the spec and ADR indexes — so every session begins already knowing the goal, which milestones are done, and what knowledge exists.
Full specs, ADRs, and code stay on disk until a task needs them; the indexes and the source-to-doc map tell Claude exactly which file to read for the task at hand. The conversation is a scratchpad; the docs bundle is the memory.
The first session
If the goal file still contains template placeholders, Claude Code doesn’t start working — it interviews you first, a few questions at a time, and drafts the goal from your answers for your confirmation.
It pushes back on answers it can’t verify — “migrate the API to GraphQL” is a direction, not a done state — and in an existing codebase it proposes answers from the code first and lets you correct them.
Saying “continue”
Once the goal exists, you don’t have to write tasks. Ask Claude Code to continue and its agent loop runs over the backlog — Claude directing its own tools and reading the test results as ground truth for whether a milestone is done.
docs/GOAL.md.docs/log.md entry. The stale-map check catches anything missed.The loop stops on its own in exactly three cases: the backlog is empty, a decision reserved for you comes up, or you say stop. An empty backlog isn’t a dead end — Claude first runs an acceptance pass, exercising the deliverable the way a first-time user would, then reports the goal met with any still-proposed ADRs listed, and proposes candidate next milestones for you to choose from.
Division of labor
Claude Code doesn’t recalculate the bookkeeping each session — the kit puts each kind of work where it is cheapest and most reliable, and reserves judgment for the parts that need thinking.
The session-start inbox and the stop-time docs gate run as fixed code paths in the harness. Claude doesn’t choose to run them, and can’t forget them at the end of a long session.
The playbook binds Claude to bash scripts/okf for the mechanics — the next ADR number, index entries, staleness from the source map. Computed in code: zero model tokens, identical every session, no improvised numbering on a bad day.
CLAUDE.md imports the goal and the spec and ADR indexes at load time, so every fresh context window starts with the map and reads individual documents from disk only on demand.
What a spec commits to, what an ADR argues, what code satisfies a milestone — the work that needs thinking stays with Claude, and stays reviewable.
Misfires are harvested, not hidden. When a helper meets a shape it doesn’t recognize — an index kept as a table, a naming convention it hasn’t seen — it declines visibly rather than guessing, and Claude works around it in the open. That friction is carried back into the kit as a proposed change. A silent workaround would hide the defect and re-pay its cost in every session; harvesting it pays once, in the kit.
Decisions
The division of labor is explicit, and every decision-shaped change leaves a reviewable trail.
Implementation choices inside existing specs, accepted ADRs, and the guardrails are Claude’s to make without asking.
A new dependency, persistence model, auth approach, API contract, or deployment shape starts with an ADR Claude writes itself — marked status: proposed with context, decision, alternatives, consequences, and a rollback trigger — implemented against and flagged for you.
Scan the ADR folder (docs/adr/ by default) for proposed entries (or run bash scripts/okf pending) and accept, request changes, or revert — frontmatter status and body-style - Status: conventions both count. Accepting flips the status to accepted and binds every future session; a session-start note counts what still awaits you.
Changing the goal, superseding an accepted ADR, and every action the guardrails gate.
Guardrails
The same rules hold across every session, whoever is driving.
Tests run after every change; a milestone with failing tests is not done.
Failing tests are never deleted, skipped, or weakened to force a green run.
Env and credential files are confirmed git-ignored before they’re created, and the shipped settings deny reading local .env files outright.
Auth, input parsing, crypto, network exposure, and permission changes get an ADR check.
Force pushes, data deletion, publishing, deploying, and side-effecting external calls wait for your explicit go-ahead, every time.
Failures, partial progress, and skipped steps stay visible; outcomes are reported as they are.
Know the limit. These guardrails are instructions, not mechanical enforcement. The kit’s mechanical gates are docs sync (hooks) and a settings rule denying reads of local .env files — nothing else. When a rule must be guaranteed rather than followed — tests green before merge, no secrets in commits — put it in your repo’s own CI and branch protection, on top of this kit.
Interruptions
Sessions end: context windows fill, limits hit, laptops close. The loop is built for it.
Milestone checkboxes, the dated log, ADRs, and git commits are the durable record — a fresh session reads them, with the goal preloaded, and knows exactly where the loop stands.
If a session was cut off mid-milestone, the next one treats uncommitted changes as in-flight work: it reconciles them against the first unchecked milestone and the newest log entry, then finishes or backs them out before taking anything new.
In practice
The pattern an installed repo produces, request by request.
Claude reads the goal and the governing specs and ADRs first, reports the gap between what exists and what you asked for, then makes the smallest change that closes it — behavior changes landing with their spec updates, an ADR if decision-shaped, a log entry, and a full verification run.
You get an assessment grounded in the repo’s own files — honest trade-offs and a recommendation — not an unrequested edit. If it suggests an improvement, Claude offers it and waits; work starts when you say yes.
Claude runs the loop: impact analysis, smallest change, tests, docs sync, verification, honest report. Decisions it had to make are waiting as proposed ADRs, and the log tells the story in dated entries you can read months later.
Claude runs the first-time-user acceptance pass, reports the goal met, and stops building. Instead of inventing scope, it lays out your options — log items, ADR revisit triggers, acceptance findings, missing repo hygiene, and non-goal-fitting extensions — and drafts only what you pick.
Nothing is re-explained. The goal, milestone state, and knowledge indexes load automatically; the log and ADRs carry every decision since; “continue” means the same thing it meant last time.
Install
The kit is a reviewable source repo. Clone it, point the installer at your target repo, and it chooses the safe path — a fresh setup for new or empty repos, a non-destructive update (backups, merged settings, numbered candidates) for existing ones.
git clone https://github.com/lilabrooks/claude-okf-repo-kit.git
cd claude-okf-repo-kit
bash scripts/install-kit /path/to/target-repo
bash scripts/verify-install /path/to/target-repo
Then open the target repo in Claude Code — it runs the goal interview with you before the first task. Full instructions, the manual paths, and verification details are in the README.
Keep reading
The home page explains why the kit exists and what it installs; the dogfood record shows what real repositories taught it.