app-design-thinking
Design the app mechanism and build pipeline for the produced app — the app-phase analog of [[schema-design]]. Use this skill whenever the knowledge phases are…
How to survive long-running John sessions where the work spans hours or days. Pin the endurance goal, offload large tool results, use sub-agent firewalls, compact at phase boundaries, and accept graceful degradation to fresh sessions.
$ npx -y skills add kitchen-engineer42/joharnessburg --skill context-management --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/context-managementContext preview
The summary Claude sees to decide when to auto-load this skill.
How to survive long-running John sessions where the work spans hours or days. Pin the endurance goal, offload large tool results, use sub-agent firewalls, compact at phase boundaries, and accept graceful degradation to fresh sessions.
name: context-management
description: How to survive long-running John sessions where the work spans hours or days. Pin the endurance goal, offload large tool results, use sub-agent firewalls, compact at phase boundaries, and accept graceful degradation to fresh sessions.
metadata:
triggers:
- context window
- compaction
- endurance goal
- long session
- context budgetJohn sessions are designed to run long. A knowledge-heavy project might span 4-8 hours of focused work. The active coding agent's context window is large but not infinite. This skill is the five-part discipline that keeps you coherent across long runs and degrades you gracefully when context exhausts.
You should use all five. They compound.
If the user has run `/john:endurance <goal>`, that goal is in `<project>/.john/workspace.json` and the SessionStart hook will inject it into your system prompt at the top of every session (and every post-compaction state). It survives compaction because the system prompt isn't windowed.
In Claude Code, set the goal with `/john:endurance <goal>` and inspect or clear it with `/john:endurance` or `/john:endurance --clear`. In Codex, invoke `endurance-goal` with the same intent.
What this gives you: even after compaction wipes most of conversation history, the endurance-race direction is still in front of you. You know what you're working toward.
If no endurance goal is set, the project's intent from PLAN.md's top section serves the same role — read it as step 1 of every loop iteration.
An endurance goal also changes one default: **assume the session is workflow-configured** (`/effort ultracode`, dynamic workflows available) and don't pause a long run to re-confirm config — see [[vertical-workflows]]. The user who set an endurance goal prepared the session; interrupting hours of autonomy to ask about a setting defeats the mode. If the Workflow tool is genuinely absent, fall back to inline dispatch and log it in PLAN.md instead of stopping.
**Wording shapes behavior.** Frame the goal as scope **+** discipline, not scope alone. A pure-scope goal — "complete the entire plan," "finish everything" — quietly biases toward checking phases off fast, and an "and verify carefully" tacked onto the same sentence gets read as decoration. Pair the scope with the bar it must clear: "complete phases 1-3, every done-criterion met before advancing" or "implement strictly from the skill references, quality over speed." Two genuinely-met phases beat five checked-off shells; the goal is a compass for direction, not a deadline that licenses cutting corners. (If you're *setting* the goal for the user, prefer this framing; if it's already set as pure scope, read it that way — as direction, not as permission to rush.)
When a tool returns a result that feels heavy (multi-KB parsed data, verbose error trace, raw PDF text), don't keep it in conversation context. Write it to `<project>/.john/trace/<id>.txt` and reference the path; leave a head+tail digest in your context. John's PostToolUse hook auto-wires this for results past a size threshold; do it manually for anything the hook doesn't catch but that still feels large.
When you need the full content again, Read the trace file. Until then, the digest is enough for most decision-making, and your context stays clean.
You can also do this manually: if you produce a long output mid-session, write it to `<project>/.john/trace/` and refer to the path instead of inlining it.
Subagents are their own context windows. When you dispatch a subagent to do a chunk extraction, the subagent reads the chunk (could be 4KB), produces extraction output (could be 8KB), emits events (could be 16KB) — and you, the main agent, only see the subagent's final digest (one or two lines).
This is the strongest single context-saving lever you have. See [[subagent-dispatch]]. Use subagents aggressively for work that produces non-trivial intermediate state.
The natural rhythm: do a phase, advance PLAN.md, stop or compact. Don't try to do three phases in one context-continuous burst.
Why phase boundaries:
So if context compacts at a phase boundary, the next iteration's first step (read PLAN.md, read latest checkpoint) recovers cleanly. The state is on disk; conversation memory is replaceable.
Don't compact in the middle of a phase if you can avoid it — that's where mid-flight work gets lost.
This is point one of [[ralph-loop]] and it's also a context-management technique. Re-reading PLAN.md at the start of every iteration:
If your context fills past ~80% and a compaction won't help (e.g., a single tool result was huge), the user can:
The next session, with John plugin loaded:
This is the snarktank/ralph fresh-instance pattern, available to John as a fallback when single-session memory fails. Don't apologize for it; it's a feature.
**Survives:**
中文版: README_ZH.md John turns unstructured source material into a working knowledge-dense app. It keeps knowledge engineering and app building in one durable run, coordinates large per-entry fan-outs, and leaves auditable events and checkpoints on disk.
Design the app mechanism and build pipeline for the produced app — the app-phase analog of [[schema-design]]. Use this skill whenever the knowledge phases are…
Bundle a finished John workspace from Codex. Use when the user wants to archive, package, hand off, or preserve a John project, or wants the Claude command…
Break parsed markdown into a tree of progressively-disclosed chunks for downstream extraction. Use this skill whenever a phase needs to work on per-chunk…
Apply deterministic quality checks to the code John produces — catch the 80% of issues (leaked API keys, hardcoded prod URLs, broken imports, missing…
Generate John's process scorecard, auditor manifests, and shareable run report from a Codex project using John's provider-neutral scripts. Use when the user…
Activate a Hamster-built or otherwise applied John template for Codex in the current project. Use when a merged template plugin already exists, when the user…