brainerd-reflect
Brainerd Reflect
Persist durable repo memory from the current session and route to the correct harness-specific flow.
Detect the harness first
- If the run exposes
brainerd_current_sessionandbrainerd_apply_changes, you are in the Pi branch. Stay inside the Pi tool flow. - If
CODEX_THREAD_IDis present, you are in the Codex branch. Use the Codex wrapper. - If
BRAINERD_CLAUDE_SESSION_IDorBRAINERD_CLAUDE_TRANSCRIPT_PATHis present, you are in the Claude branch. Use the Claude wrapper. - If none of those signals match, stop and report that harness detection failed. Do not guess.
Pi branch
- Read the ambient brain context already injected into the run.
- Open additional
brain/files only when needed. - Call
brainerd_current_session. - Distill the smallest durable change that helps future sessions.
- Prefer updating an existing principle; otherwise create one focused note.
- Apply changes only through
brainerd_apply_changes. - End with a visible section that starts exactly with
Brainerd summary:.
Codex and Claude branches
- Read
brain/index.mdandbrain/principles.md. - Run the matching wrapper:
./scripts/brainerd-codex.sh current-session
./scripts/brainerd-claude.sh current-session
- Distill the smallest durable change that helps future sessions.
- Prefer updating an existing principle; otherwise create one focused note.
- Write a small JSON payload to
/tmp/brainerd-reflect.jsonwith achangesarray. - Apply changes only through the matching wrapper:
./scripts/brainerd-codex.sh apply-changes --input /tmp/brainerd-reflect.json
./scripts/brainerd-claude.sh apply-changes --input /tmp/brainerd-reflect.json
Guardrails
- Do not store secrets, one-off task state, or generic skill instructions.
- Do not hand-edit generated entrypoints like
brain/index.mdorbrain/principles.md. - If nothing durable happened, say so and stop.
- End with a short summary of what changed and why.
More from mylesmcook/mcook-skills
adversarial-review
Use this skill when you need a serious code review, diff review, or implementation-plan review from independent reviewers. In Codex hosts, prefer a fresh Codex subagent for the Codex reviewer; otherwise use the Codex, Claude Code, and Gemini reviewer paths when available. Return a PASS, CONTESTED, or REJECT verdict.
13subagent-driven-development
Use after an implementation plan is approved to execute mostly independent tasks through fresh subagents with scoped context, harness-aware model routing, proportional review gates, and mandatory controller verification.
10brainerd
>
10simple-code
Reduce incidental complexity in code and design. Use when shaping APIs, module boundaries, refactors, tests, naming, and architecture tradeoffs with a bias toward concrete, local, reversible solutions.
7git-it-out
Use this skill when the user explicitly wants final end-of-session closeout and no more branch or PR limbo: proper verification, proper commits, main/mainline landing, push, repo-native merge/release/deploy/publish steps, tracker updates, Entire/checkpoint handling when configured, and a concise handoff. Reach for it on prompts like 'git it out', 'get it out', 'ship this', 'I'm done', 'I'm going to bed', 'take this off my plate', 'finish the session', or 'get this into production'. Do not use it for greenfield implementation, open-ended debugging, broad refactors, or inventing a release process from scratch.
7laws-of-taste
>-
6