Das Problem & die IdeeThe problem & the idea
Unstrukturiertes Agent-Coding scheitert auf zwei bekannte Arten: Der frei laufende Agent verliert nach wenigen Iterationen die Richtung — er refactort funktionierenden Code, das Kontextfenster gerät in die „Dumb Zone", und die Entscheidungen von gestern sind weg. Das Wasserfall-Gegenteil überplant ein Feature, das noch niemand verstanden hat. CRAFT setzt dazwischen an: gleicher Workflow, gleiche Kontrolloberfläche — egal welcher Stack.
Das Kernprinzip: menschliche Kontrolle konzentriert an den harten Phasen (Planung, Recap, Review, eskalierte Bugs) — die Ausführung wird an sichere, parallele Agent-Arbeit delegiert.
Unstructured agent coding fails in two familiar ways: the free-running agent loses direction after a few iterations — it refactors working code, the context window enters its "dumb zone", and yesterday's decisions are gone. The waterfall opposite over-plans a feature nobody understands yet. CRAFT sits in between: same workflow, same control surface — regardless of stack.
The core principle: human control concentrated at the hard phases (planning, recap, review, escalated bugs) — execution is delegated to safe, parallel agent work.
Vier DisziplinenFour disciplines
Kontext-ResetsContext resets
Jede Phase endet mit einem Markdown-Checkpoint. Chat ist kein Speicher — was zählt, wird noch im selben Zug in eine dauerhafte Datei geschrieben („Durable Capture"). Every phase ends with a Markdown checkpoint. Chat is not storage — anything that matters is written to a durable file in the same turn ("Durable Capture").
Vertical Slicing
Jeder Slice ist Ende-zu-Ende testbar und eigenständig erlebbar — kein „Frontend jetzt, Backend später". Slices sind feature-förmig, nicht komponenten-förmig. Every slice is end-to-end testable and standalone-experienceable — no "frontend now, backend later". Slices are feature-shaped, not component-shaped.
Wissens-SchichtenKnowledge layering
State (Code) ist abgeleitet; Intent (Warum) und Rules (Wie) sind explizit. Der Agent schlägt Änderungen an dauerhaftem Wissen vor — der Mensch bestätigt. State (code) is derived; Intent (why) and Rules (how) are explicit. The agent proposes changes to durable knowledge — the human confirms.
Explizite Autonomie-StufenExplicit autonomy levels
Lesen ist still, Edits im Plan-Scope laufen automatisch weiter, Regel-Änderungen brauchen Bestätigung, Push/Deploy fragt immer. Reads are silent, in-scope edits auto-continue, rule mutations need confirmation, pushes and deploys always ask.
Zwei-Ebenen-Architektur: Das Plugin liefert die universelle Hülle (Workflow +
Senior-Developer-Baseline, in jeder Session aktiv). Das Projekt behält seine Sprach-/Framework-Spezialisten
lokal (.claude/skills/), lazy geladen — plus optionale Stack-Packs
(z. B. stack-php-laravel), die in den code-nahen Phasen automatisch dazugeladen werden.
Two-tier architecture: the plugin ships the universal shell (workflow +
Senior-Developer baseline, active in every session). The project keeps its language/framework specialists
locally (.claude/skills/), lazy-loaded — plus optional stack-packs
(e.g. stack-php-laravel) autoloaded during the code-near phases.
Der 9-Phasen-LoopThe 9-phase loop
Das methodische Rückgrat. Phase 1–2 laufen nur beim Projektstart oder Betreten einer neuen Domäne; Routine-Slices starten in Phase 3. Nach Phase 9 kehrt der Loop zu Phase 3 zurück — der nächste Slice.
The methodological backbone. Phases 1–2 run only at project start or when entering a new domain; routine slices start at Phase 3. After Phase 9 the loop returns to Phase 3 — the next slice.
Die Phasen im DetailThe phases in detail
| # | Phase | Command | KontrolleControl | Was passiertWhat happens |
|---|---|---|---|---|
| 1 | Brainstorm | /craft:brainstorm | L0 | Problemraum erkunden, bevor Code existiert — divergente Ideation (Question Storming, SCAMPER, First Principles). Endet mit Markdown-Checkpoint + Kontext-Reset. Explore the problem space before code exists — divergent ideation (question storming, SCAMPER, first principles). Ends with a Markdown checkpoint + context reset. |
| 2 | Alignment | /craft:grill-me | L0 | Der Agent interviewt den Menschen und schließt die Lücke „alles Ungesagte wird erfunden". Richtung, Constraints, Akzeptanzkriterien als Checkpoint. The agent interviews the human, closing the "anything not said gets invented" gap. Direction, constraints, acceptance criteria as a checkpoint. |
| 3 | Planning | /craft:plan / /craft:epic | L1 | Kleinsten Ende-zu-Ende-Slice schneiden. Drei nicht überspringbare Fragen: Was ist der Trigger? Was ist der beobachtbare Effekt? Wie testen wir Ende-zu-Ende? Ohne Test-Strategie kein Plan. Cut the smallest end-to-end slice. Three non-skippable questions: what is the trigger? What is the observable effect? How do we test end-to-end? No plan without a test strategy. |
| 4 | Implementation | /craft:build | L2 | Plan in Code umsetzen, Sub-Tasks der Reihe nach, Tests laufen still (nur Rot wird gemeldet). Bündel-Meldung an jeder Sub-Task-Grenze; 30k-Token-Bremse gegen die „Dumb Zone". Edits außerhalb des Scopes fallen auf L1 zurück. Turn the plan into code, sub-tasks in order, tests run silently (only red surfaces). Bundle report at each sub-task boundary; 30k-token brake against the "dumb zone". Out-of-scope edits drop to L1. |
| 5 | Testing & UX | /craft:test | Human | Die einzige Phase, in der der Mensch das Artefakt selbst ausprobiert — konstitutiv, nie überspringbar, auch bei grünen Tests. 5a Demo-Setup → 5b Nutzer probiert → 5c Feedback: [W]orks / [B]ug / [U]X issue.
The only phase where the human exercises the artifact — constitutive, never skippable, even with green tests. 5a demo setup → 5b user exercises → 5c feedback: [W]orks / [B]ug / [U]X issue. |
| 6 | Recap | /craft:recap | L1 | Erzwingt mentale Ownership: „Wie funktioniert es? Führe mich von Trigger zu Effekt." Bei komplexen Slices wird ein Mermaid-Diagramm angeboten. Der Entwurf wird in Phase 9 zum Slice-Archiv. Forces mental ownership: "How does it work? Walk me trigger→effect." A Mermaid diagram is offered for complex slices. The draft becomes the slice archive in Phase 9. |
| 7 | Refactoring | /craft:refactor | L1 | Kleine strukturelle Verbesserungen, max. 2–3 Punkte pro Slice (mehr = eigener Slice). Drei dialogische Prompts. Pro Projekt abschaltbar — dann geht es von Phase 6 direkt zu Phase 8. Small structural improvements, max 2–3 items per slice (more = its own slice). Three dialogic prompts. Droppable per project — Phase 6 then hands straight to Phase 8. |
| 8 | Review | /craft:review | L2+L1 | Ein code-reviewer-Subagent mit frischem Kontextfenster klassifiziert Findings auf zwei Achsen: Schwere {Heavy, Light} × Fix-Natur {Local edit, Needs rethinking}. Lokale Edits werden in der Phase gefixt (Soft-Cap 5); Heavy+Rethinking blockiert den Commit.
A code-reviewer subagent with a clean context window classifies findings on two axes: severity {Heavy, Light} × fix-nature {local edit, needs rethinking}. Local edits are fixed in-phase (soft cap 5); Heavy+rethinking blocks Commit. |
| 9 | Commit & Cleanup | /craft:commit | L1 | Atomare Commits (Conventional Commits + Slice:-Footer), Entscheidungs-Promotion ([K]eep/[I]ntent/[R]ules/[D]iscard), Slice-Archiv schreiben, Plan-Datei löschen. Der Slice schließt hier.
Atomic commits (Conventional Commits + Slice: footer), decision promotion ([K]eep/[I]ntent/[R]ules/[D]iscard), slice archive written, plan file deleted. The slice closes here. |
Quickstart
So fühlt sich ein Arbeitstag mit CRAFT an — vom Onboarding bis zum geschlossenen Slice:
What a working day with CRAFT feels like — from onboarding to a closed slice:
# einmalig pro Projekt: Projektwissen aufbauen (oder bestehendes .claude/ migrieren)once per project: bootstrap project knowledge (or migrate an existing .claude/)
❯ /craft:onboard
# jede Session: Kontext laden — läuft automatisch beim Session-Startevery session: load context — auto-runs at session start
❯ /craft:prime
✓ Project · ✓ Tools · ✓ Rules↔State drift check · Active slices · Recommended next
# neuer Slice: die drei Fragen (Trigger? Effekt? Test?) → Plan-Dateinew slice: the three questions (trigger? effect? test?) → plan file
❯ /craft:plan user-login
→ .claude/plans/slice-001-user-login.md Status: planning
❯ /craft:build # Phase 4 — implementiert Sub-Tasks, Tests still im Hintergrundworks sub-tasks, tests silent
❯ /craft:test # Phase 5 — DU probierst es aus:YOU exercise it: [W]orks / [B]ug / [U]X
❯ /craft:recap # Phase 6 — was wurde gebaut & warumwhat was built & why
❯ /craft:refactor # Phase 7 — optional, pro Projekt abschaltbaroptional, droppable per project
❯ /craft:review # Phase 8 — Fresh-Context-Review, Commit-Gatefresh-context review, commit gate
❯ /craft:commit # Phase 9 — atomare Commits, Archiv, Slice zuatomic commits, archive, slice closed
# wieder einsteigen, egal wo man stand:resume from wherever you left off:
❯ /craft:continue # liest den Status und empfiehlt das richtige Kommandoreads Status, recommends the right command
# groß denken: Epic planen und autonom bauen lassenthink big: plan an epic and build it autonomously
❯ /craft:epic checkout-flow
❯ /craft:execute epic-001 # parallele Worktrees, ein Agent pro Sliceparallel worktrees, one agent per slice
Kontext-Hygiene — der unterschätzte Effizienz-HebelContext hygiene — the underrated efficiency lever
Hat die Session grob 300.000 Tokens verbraucht, lohnt ein beherzter Schnitt:
/clear — und der SessionStart-Hook stößt /craft:prime automatisch wieder an.
Weil aller relevanter Zustand in Dateien lebt (Slice-Plan mit Status-Token, Intent, Rules, Profil), landet
die frische Session ohne Verlust exakt an der richtigen Stelle — genau dafür ist das Status-Token-Design
gebaut. Regelmäßiges Leeren statt endlosem Weiterschleppen hält das Modell aus seiner „Dumb Zone" und
bringt spürbar Effizienz.
Once a session has burned roughly 300,000 tokens, a clean cut pays off:
/clear — and the SessionStart hook automatically re-triggers /craft:prime.
Because all relevant state lives in files (the slice plan with its status token, intent, rules, profile),
the fresh session lands exactly where you left off, losing nothing — that is precisely what the status-token
design is built for. Clearing regularly instead of dragging context along keeps the model out of its
"dumb zone" and is a real efficiency win.
❯ /clear # bei ~300k verbrauchten Tokens: Kontext leerenat ~300k tokens consumed: clear the context
❯ /craft:prime # läuft automatisch wieder an — lädt Status, empfiehlt den Wiedereinstiegauto-runs again — loads state, recommends where to resume
Der zweite Hebel ist die harte Abhängigkeit von context-mode — sie ist kein Zufall: context-mode führt große Ausgaben (Logs, Diffs, Suchläufe, Doku) in einer Sandbox aus und lässt nur die destillierte Antwort ins Kontextfenster. Das spart aktiv enorme Token-Mengen und erlaubt deutlich größere Sessions — erst dadurch läuft der 9-Phasen-Loop eines Slices in einem Rutsch.
The second lever is the hard dependency on context-mode — and it is no accident: context-mode runs large outputs (logs, diffs, searches, docs) in a sandbox and lets only the distilled answer into the context window. That actively saves enormous amounts of tokens and allows much larger sessions — it is what lets a slice's 9-phase loop run in one go.
Voraussetzungen (von /craft:prime hart geprüft): context-mode,
agent-browser, git, gh. Fehlt eines, bricht Prime mit konkreten
Installationsanweisungen ab.
Prerequisites (strictly verified by /craft:prime): context-mode,
agent-browser, git, gh. If one is missing, prime aborts with concrete
install instructions.
Der Status-Graph — und alle AbbiegemöglichkeitenThe status graph — and every branch-off
Jeder Slice-Plan trägt ein Status:-Feld — das Execution-Token des
Workflows: Ein Kommando schreibt es, das nächste konsumiert es. /craft:continue
liest nur den Status und routet zum richtigen Kommando. Der Graph ist maschinell geprüft
(scripts/test-workflow-status-graph.sh) — kein Status ohne Konsumenten.
Every slice plan carries a Status: field — the workflow's execution
token: one command writes it, the next consumes it. /craft:continue
just reads the status and routes to the right command. The graph is machine-checked
(scripts/test-workflow-status-graph.sh) — no status without a consumer.
review = Phase 6 wartet, reviewing = Phase 8 läuft.review = phase 6 pending, reviewing = phase 8 running.Die Abbiegungen im DetailThe branch-offs in detail
| Command | WannWhen | Was passiertWhat happens | RückwegWay back |
|---|---|---|---|
/craft:pause |
Kurz weg, KontextwechselStepping away, context switch | Pausen-Notiz in den Plan, paused; Code und Commits unangetastet. Pause note into the plan, paused; code and commits untouched. | /craft:continue |
/craft:handoff |
Kontext „vergiftet", Session festgefahrenContext poisoned, session stuck | Komprimierte Übergabe (## Handoff: Wo stehen wir / Versucht / Ausgeschlossen / Beste nächste Idee) in den Plan, Handoff active: yes. Der Status bleibt unverändert!
Condensed handoff (## Handoff: where we are / tried / ruled out / best next guess) into the plan, Handoff active: yes. Status stays unchanged! |
Neue Session — /craft:prime zeigt den Handoff prominentFresh session — /craft:prime surfaces the handoff prominently |
/craft:block |
Voraussetzung fehlt (Arbeit, Entscheidung, Zugang, Externes)A prerequisite is missing (work, decision, access, external) | Erstklassiger blocked-Zustand: Blocker-Typ klassifizieren (prerequisite-work | external | decision | access), Kontext festhalten, das aktuelle Execution-Token als Blocked-status sichern. Bei fehlender Arbeit: Fork Spawn / Park / Descope.
First-class blocked state: classify the blocker (prerequisite-work | external | decision | access), capture context, save the current execution token as Blocked-status. For missing work: the spawn / park / descope fork. |
/craft:unblock — [R]esume / [P]lan neu / [A]bortSchließt der vorausgesetzte Slice via /craft:commit, wird der Blockierte automatisch wieder aufgetaucht.
When the prerequisite closes via /craft:commit, the blocked slice auto-resurfaces. |
/craft:abort |
Slice aufgebenAbandon a slice | Mehrfache Warnungen (frische Arbeit? Teil-Commits? Worktree?), dann getippte Slice-ID als Bestätigung; Plan-Datei wird gelöscht (kein Archiv — abgebrochene Slices haben keinen Archivwert). Multiple warnings (recent work? partial commits? worktree?), then a typed slice ID to confirm; the plan file is deleted (no archive — aborted slices have no archive value). | keiner — bewusst endgültignone — deliberately final |
/craft:debug |
[B] in Phase 5, manuell, oder auto-angeboten nach 2 Fix-Versuchen am selben Symptom
[B] in phase 5, manual, or auto-offered after 2 fix attempts on the same symptom |
Vier Schritte: ALIGN (Bug gemeinsam präzisieren) → PROTOCOL (Verifikations-Kommando vor dem ersten Fix einfrieren) → AUTONOMOUS LOOP (bis 5 Versuche, jeder mit Verifikation + Negativ-Check, 15k-Token-Bremse) → ESCALATION (Handoff / Recap / Protokoll neu verhandeln / manuell). Four steps: ALIGN (pin the bug down together) → PROTOCOL (freeze the verification command before any fix) → AUTONOMOUS LOOP (up to 5 attempts, each with verification + negative check, 15k token brake) → ESCALATION (handoff / recap / renegotiate protocol / take it manually). | Erfolg → Phase 6; der Verifikations-Befehl wird als Regressionstest angeboten Success → phase 6; the verification command is offered as a regression test |
/craft:release |
In-Place-Build wartet auf IDE-Review (awaiting-release) In-place build awaiting IDE review (awaiting-release) | Die explizite Geste „Ich habe den rohen Diff gesehen — weiter": zeigt git diff --stat, fragt [Y]/[N], setzt testing. Committet, merged und pusht nichts.
The explicit "I've seen the raw diff — proceed" gesture: shows git diff --stat, asks [Y]/[N], sets testing. Commits, merges, pushes nothing. |
weiter in Phase 5on into phase 5 |
/craft:commit ×2 |
Profil: pull-request + Protected-main: yes
Profile: pull-request + Protected-main: yes |
„Freigabe ≠ Merge": Erster Aufruf pusht + öffnet den PR (awaiting-approval), merged aber nicht. Der zweite Aufruf merged via gh pr merge — nur bei echtem GitHub-APPROVED, nie --admin. Der Mensch gibt frei, das System merged.
"Approval ≠ merge": the first invocation pushes + opens the PR (awaiting-approval) but does not merge. The second invocation merges via gh pr merge — only on a real GitHub APPROVED, never --admin. The human approves, the system merges. |
Slice schließtslice closes |
Dazu kommt ein zweiter Marker-Namensraum: In Worktrees schreibt der
slice-builder-Agent bei jeder menschenpflichtigen Pause eine .craft/handoff.md
(awaiting-test, awaiting-protocol, awaiting-scope-decision,
awaiting-refactor-decision, awaiting-rethink-decision, …) — das sind Worktree-Marker,
keine Slice-Status.
There is a second marker namespace: inside worktrees the slice-builder
agent writes a .craft/handoff.md on every human-required pause (awaiting-test,
awaiting-protocol, awaiting-scope-decision, awaiting-refactor-decision,
awaiting-rethink-decision, …) — worktree markers, not slice statuses.
Wer entscheidet was — die Autonomie-TaxonomieWho decides what — the autonomy taxonomy
Vier Stufen regeln, wie selbstständig der Agent handelt. Jede Phase hat eine Default-Stufe (siehe Loop) — aber bestimmte Aktionstypen erzwingen ihre Stufe phasenübergreifend:
Four levels govern how independently the agent acts. Each phase has a default level (see the loop) — but certain action types force their level across all phases:
L0 Ask-Always
Explizit fragen, auf „Ja" warten.Ask explicitly, wait for a "yes".
L1 Propose-Confirm
Vorschlagen, Bestätigung abwarten.Propose, wait for confirmation.
L2 Auto-Notify
Handeln, dann kompakt an der Bündel-Grenze melden — Pause/Rollback möglich. Act, then report compactly at the bundle boundary — pause/rollback possible.
L3 Auto-Silent
Ohne Unterbrechung handeln (immer im nächsten Bündel zusammengefasst, nie unsichtbar). Act without interrupting (always summarized in the next bundle, never invisible).
| AktionAction | StufeLevel | BegründungRationale |
|---|---|---|
| Datei lesen, grep, Lint-Check, TestlaufFile read, grep, lint check, test run | L3 | reine Informationsbeschaffung, read-onlypure info gathering, read-only |
| Code-Edit im Plan-ScopeCode edit inside plan scope | L2 | der Plan ist der Vertragthe plan is the contract |
| Code-Edit außerhalb des Plan-ScopesCode edit outside plan scope | L1 | Scope-Grenzen bestätigt der Menschscope boundaries are the human's call |
| Git-Commit | L1 | nachvollziehbare Historieaccountable history |
| Lokale Branch-Operationen (nicht destruktiv)Local branch ops (non-destructive) | L2 | wiederherstellbarrecoverable |
rules.md / intent.md ändernmutation |
L0 | „heilig" — nie still mutiert"sacred" — never silently mutated |
| Git-Push, PR, Deploy | L0 | extern & irreversibelexternal & irreversible |
| Branch löschen, Force-PushBranch delete, force-push | L0 | destruktivdestructive |
Strukturell menschlich — vom Agenten nie fabriziert: UX-Feedback
([W]/[B]/[U]), Refactoring-Auswahl, Eskalations-Routing, Entscheidungs-Promotion
([K]/[I]/[R]/[D]), Scope-Änderungen, Merges. Dazu die Bündel-Disziplin:
Meldung an jeder Sub-Task-Grenze, 30k-Token-Bremse (15k im Debug-Loop) gegen die „Dumb Zone", und
Buchstaben-Menüs zeigen immer die volle Legende.
Structurally human — never fabricated by the agent: UX feedback
([W]/[B]/[U]), refactor selection, escalation routing, decision promotion
([K]/[I]/[R]/[D]), scope changes, merges. Plus the bundling discipline:
a report at every sub-task boundary, a 30k token brake (15k inside the debug loop) against the
"dumb zone", and lettered menus always render their full legend.
Regel-Konflikte: Bend / Override / RepealRule conflicts: bend / override / repeal
Will der Mensch eine Regel umgehen, biegt der Agent sie nie still — er bietet drei Stufen an:
Bend (nur dieser eine Austausch), Override (slice-weit, im Plan unter
Active Rule Overrides protokolliert, in Phase 9 gelöscht), Repeal (dauerhaft —
rules.md wird mit Bestätigung geändert). Drift zwischen Rules und State wird von
/craft:prime nur gemeldet, nie automatisch korrigiert.
When the human wants to bypass a rule, the agent never bends it silently — it offers three
stages: bend (this one exchange only), override (slice-scoped, recorded in
the plan under Active Rule Overrides, cleared in phase 9), repeal (permanent —
rules.md edited with confirmation). Rules↔State drift is only reported by
/craft:prime, never auto-corrected.
Autonome Ausführung — die drei ModiAutonomous execution — the three modes
/craft:execute <epic-NNN | slice-NNN> ist der Orchestrator: Er verwandelt einen
geplanten Epic oder Slice in gebauten Code, ohne dass der Mensch jede Phase begleitet — gestoppt wird nur an
den vereinbarten Review-Punkten. Welcher Modus läuft, entscheidet das CRAFT-Profil.
/craft:execute <epic-NNN | slice-NNN> is the orchestrator: it turns a planned
epic or slice into built code without per-phase supervision — stopping only at the agreed review points.
Which mode runs is decided by the CRAFT profile.
Epic Mode: parallel bzw. Execution → Mode: worktree;
Modus 2 Execution → Mode: in-place; Modus 3 Epic Mode: sequential.Epic Mode: parallel / Execution → Mode: worktree;
mode 2 = Execution → Mode: in-place; mode 3 = Epic Mode: sequential.Was der Orchestrator garantiert
- Worktree-Trust: Worktrees liegen außerhalb des Projektordners
(
../<repo>-worktrees/<slice-id>-<slug>/). Ihr Basisverzeichnis wird — einmalig, nach Bestätigung — inpermissions.additionalDirectoriesvon.claude/settings.local.jsoneingetragen, damit keine Permission-Prompts den Lauf stoppen. - Lock-Datei:
.claude/plans/.execute.lockverhindert parallele Läufe; Post-Assertions prüfen die Freigabe. - Abhängigkeiten: Slices mit
Depends-Onwerden als DAG aufgelöst; nur die freie „Frontier" läuft parallel. - Review-Checkpoints: Im Epic-Plan markierte Slices stoppen den Lauf vor dem Merge.
- Harte Grenzen: merged nie nach
main(das ist/craft:commit), pusht nie, löst Heavy+Rethinking-Findings nie selbst auf. Ein Handoff eines Slices bricht den Lauf nicht ab — unabhängige Slices laufen weiter.
Rundherum: /craft:worktree-status (Übersicht aller Worktrees inkl. Handoff-Marker),
/craft:checkout (in einen Worktree zum Inspizieren wechseln),
/craft:worktree-clean (verwaiste Worktrees nach Bestätigung entfernen — nie mit --force).
What the orchestrator guarantees
- Worktree trust: worktrees live outside the project root
(
../<repo>-worktrees/<slice-id>-<slug>/). Their base directory is added — once, after confirmation — topermissions.additionalDirectoriesin.claude/settings.local.jsonso permission prompts can't stall the run. - Lock file:
.claude/plans/.execute.lockprevents concurrent runs; post-assertions verify its release. - Dependencies: slices with
Depends-Onare resolved as a DAG; only the free "frontier" runs in parallel. - Review checkpoints: slices marked in the epic plan halt the run before merging.
- Hard limits: never merges into
main(that is/craft:commit), never pushes, never resolves Heavy+rethinking findings itself. One slice's handoff doesn't abort the run — independent slices continue.
Around it: /craft:worktree-status (overview of all worktrees incl. handoff markers),
/craft:checkout (switch into a worktree for inspection),
/craft:worktree-clean (remove orphaned worktrees after confirmation — never with --force).
Alle Stellschrauben — die KonfigurationsreferenzEvery knob — the configuration reference
Das CRAFT-ProfilThe CRAFT profile — .claude/project/craft-profile.md
Das portable Betriebsprofil eines Projekts: Autonomie-, Commit-, Merge-, Sprach- und
Modell-Einstellungen an einem Ort. Fehlt die Datei, gilt implizit das Preset balanced.
Beim Onboarding wählbar: ein Preset übernehmen oder jede Stellschraube einzeln setzen
(> Preset: custom). /craft:prime validiert das Profil jede Session —
Warnungen, nie Abbruch.
A project's portable operating profile: autonomy, commit, merge, language and model settings
in one place. If the file is absent, the balanced preset applies implicitly. During onboarding
you either adopt a preset or set every knob individually (> Preset: custom).
/craft:prime validates the profile every session — warnings, never aborts.
| Preset | Execution Mode | Auto- commit | Merge | Epic Mode | Permission Scope |
CharakterCharacter |
|---|---|---|---|---|---|---|
careful | in-place | off |
pull-request + protected-main + GitHub-Review |
sequential | minimal |
Jeder Diff wird vor Phase 5 in der IDE gesichtet; alles landet per freigegebenem PR. Every diff is reviewed in the IDE before phase 5; everything lands via an approved PR. |
balanced ★ | worktree | on |
direct | parallel | standard |
Der Default: parallele Worktrees, direkte Merges, Chat-Freigaben. The default: parallel worktrees, direct merges, chat approvals. |
autonomous | worktree | on |
direct | parallel | broad |
Wie balanced, aber mit breiterer Read-only-Allowlist — weniger Prompts. Like balanced but with a broader read-only allowlist — fewer prompts. |
| Block → FeldBlock → field | Werte (Default fett)Values (default bold) | WirkungEffect |
|---|---|---|
Execution → Mode | worktree | in-place |
Worktree: Wegwerf-Worktree außerhalb des Repos, parallelsicher. In-place: Branch im Haupt-Checkout, Halt vor Phase 5 (/craft:release).
Worktree: throwaway worktree outside the repo, parallel-safe. In-place: branch in the main checkout, halt before phase 5 (/craft:release). |
Commit Policy → Auto-commit | on | off |
on: Commits pro Sub-Task. off: alles bleibt bis Phase 9 uncommitted — nur mit in-place gültig (das Worktree-Merge-Modell braucht Sub-Task-Commits).
on: per-sub-task commits. off: everything stays uncommitted until phase 9 — valid only with in-place (the worktree merge model needs per-sub-task commits). |
Commit Policy → Co-Authored-By | on | off |
on: /craft:commit hängt den Claude-Trailer an jede Commit-Message.
on: /craft:commit appends the Claude trailer to each commit message. |
Merge Workflow → Type | direct | pull-request |
direct: Merge direkt auf den Trunk. pull-request: es wird ein PR geöffnet. direct: merge straight to trunk. pull-request: a PR is opened. |
Merge Workflow → Protected-main | no | yes |
yes + pull-request = „Freigabe ≠ Merge": Merge nur nach echtem GitHub-Approval, nie --admin.
yes + pull-request = "approval ≠ merge": merge only after a real GitHub approval, never --admin. |
Merge Workflow → Approval | chat | github-pr-review |
Wo die menschliche Freigabe stattfindet: im Chat oder als GitHub-PR-Review. Where the human go-ahead happens: in chat or as a GitHub PR review. |
Merge Workflow → Approval-granularity | auto | per-slice | per-epic |
auto: sequenzieller Epic → pro Slice; paralleler Epic/Einzel-Slice → einmal am Ende. auto: sequential epic → per slice; parallel epic / lone slice → once at the end. |
Epic Mode → Default | parallel | sequential |
Siehe Ausführungsmodi.See execution modes. |
Permissions → Scope | minimal | standard | broad |
Welche read-only-Allowlist das Onboarding in .claude/settings.local.json schreibt (git status/diff/log/ls → + cat/grep/git show/gh pr → + wc/head/tail/git blame/gh issue/run). Nie ein mutierendes Kommando; find ist bewusst ausgeschlossen.
Which read-only allowlist onboarding writes to .claude/settings.local.json (git status/diff/log/ls → + cat/grep/git show/gh pr → + wc/head/tail/git blame/gh issue/run). Never a mutating command; find is deliberately excluded. |
Operational Language | Chat / Commits / Comments | Drei unabhängige Sprachen: Chat (Default: Systemsprache) für die Session, Commits (Default: Englisch) für /craft:commit, Comments (Default: Englisch) für /craft:build//craft:review.
Three independent languages: chat (default: system language) for the session, commits (default: English) for /craft:commit, comments (default: English) for /craft:build//craft:review. |
Agent Model Overrides | <agent>: opus | sonnet | haiku | inherit |
Übersteuert das Frontmatter-Default eines Subagenten: slice-builder (Default sonnet, Phase 4 via Execute), code-reviewer (Default opus, Phase 8). Alle dialogischen Phasen laufen auf dem Session-Modell.
Overrides a subagent's frontmatter default: slice-builder (default sonnet, phase 4 via execute), code-reviewer (default opus, phase 8). All dialogic phases run on the session model. |
Optionale Blöcke inOptional blocks in .claude/project/rules.md
| Block | Felder & DefaultsFields & defaults | WirkungEffect |
|---|---|---|
## Personality |
Stack-Pack: <name> | none |
Deklariert das Stack-Pack für die code-nahen Phasen. Auflösung: skills/<name>/ (im Plugin) → ~/.claude/craft-personalities/<name>/ (eigene Packs). Fehlt das Pack: Warnung, nie Abbruch.
Declares the stack-pack for the code-near phases. Resolution: skills/<name>/ (plugin-shipped) → ~/.claude/craft-personalities/<name>/ (your own packs). Missing pack: warning, never fatal. |
## Worktree Settings |
Pfad-Musterpath pattern ../<repo>-worktrees/<slice-id>-<slug>/Branch-Musterbranch pattern <slice-id>-<slug> |
Wo /craft:execute Worktrees anlegt und wie Branches heißen.
Where /craft:execute creates worktrees and how branches are named. |
## Read-Only Context Sources |
- <absolute-path> pro Quelleper source |
„Connected projects": lesbar, aber schreibgeschützt — ein PreToolUse-Hook verweigert Write/Edit auf diese Pfade. Der Ordner research/ im Repo ist immer geschützt.
"Connected projects": readable but write-blocked — a PreToolUse hook denies Write/Edit on these paths. The in-repo research/ folder is always protected. |
## Self-Verification Settings |
Max attempts: 5 · Auto-trigger: 2 · Token brake: 15000 · Stale slice: 7 days · Review fix cap: 5 | Stellschrauben für den Debug-Loop, das Auto-Angebot von /craft:debug, die Token-Bremse, die Stale-Slice-Warnung von Prime und das In-Phase-Fix-Limit des Reviews.
Knobs for the debug loop, the auto-offer of /craft:debug, the token brake, prime's stale-slice warning and review's in-phase fix cap. |
## Workflow Rules |
u. a. „Phase 7 entfällt"e.g. "phase 7 is dropped" | Ein Bullet, das Phase 7 als gestrichen erklärt, schaltet das Routing um: Recap übergibt direkt an Review. Der Status-Graph-Harness prüft beide Konfigurationen. A bullet declaring phase 7 dropped flips the routing: recap hands straight to review. The status-graph harness verifies both configurations. |
Die drei Persönlichkeits-EbenenThe three personality tiers
Tier 1 · Senior-Developer
Stack-agnostische Baseline, von /craft:prime einmal geladen, in jeder Phase aktiv:
Qualitäts-Hierarchie (Correctness > Tests > Architektur > Wartbarkeit > Performance > Konsistenz),
Workflow-Gates, Test-Disziplin-Matrix, Problem-Playbook.
Stack-agnostic baseline, loaded once by /craft:prime, active in every phase:
quality hierarchy (correctness > tests > architecture > maintainability > performance > consistency),
workflow gates, test-discipline matrix, problem playbook.
Tier 2 · Stack-Pack
Framework-Idiome (z. B. stack-php-laravel: PHP 8.4 + Laravel 12 + Filament + Pest).
Nur in den code-nahen Phasen geladen (Build, Test, Refactor, Review). Eigene Packs unter
~/.claude/craft-personalities/.
Framework idioms (e.g. stack-php-laravel: PHP 8.4 + Laravel 12 + Filament + Pest).
Loaded only in the code-near phases (build, test, refactor, review). Your own packs live under
~/.claude/craft-personalities/.
Tier 3 · Projekt-OverlayProject overlay
Die eigenen Konventionen des Projekts: rules.md (Code Conventions, Tabus,
exakte Tool-Kommandos) + intent.md. Stack-Packs verweisen bewusst hierher — immer wirksam.
The project's own conventions: rules.md (code conventions, taboos, exact tool
commands) + intent.md. Stack-packs explicitly defer here — always in effect.
Das Wissensmodell — „Chat ist kein Speicher"The knowledge model — "chat is not storage"
CRAFT trennt drei Wissensschichten mit unterschiedlicher Ground Truth. Alles Bleibende wird
im selben Zug, in dem es entsteht, in seine dauerhafte Heimat geschrieben — denn Kontext stirbt bei
/clear, Compaction und Session-Ende:
CRAFT separates three knowledge layers with distinct ground truth. Anything lasting is written
to its durable home in the same turn it is produced — because context dies on /clear,
compaction and session end:
| SchichtLayer | InhaltContent | Ground Truth | ZuhauseHome |
|---|---|---|---|
| State | Was heute existiertWhat exists today | Code, Git, ConfigsCode, git, configs | nicht dupliziert — bei Bedarf gelesennot duplicated — read on demand |
| Intent | Was wir wollen & warumWhat we want & why | vom Menschen verfassthuman-authored | intent.md |
| Rules | Wie wir bauen, immerHow we build, always | gegen State verifizierbarverifiable against State | rules.md |
Routing für bleibende Erkenntnisse: Warum → intent.md · Wie → rules.md ·
Langfrist-Phasen → roadmap.md · Slice-Entscheidungen → Slice-Archiv · Epic-Entscheidungen →
Epic-Plan · Querschnitts-Design (Domänenmodell, Szenario-Kataloge) → design/*.md.
Nach Phase 9 lebt das Gedächtnis in drei Orten: Code, Commits (mit Slice:-Footer) und dem
Slice-Archiv — dem Decision Log.
Routing for lasting insight: why → intent.md · how → rules.md ·
long-term phases → roadmap.md · slice decisions → slice archive · epic decisions → epic plan ·
cross-cutting design (domain model, scenario catalogs) → design/*.md.
After phase 9, memory lives in three places: code, commits (with Slice: footers) and the
slice archive — the decision log.
your-project/
├── CLAUDE.md # schlanker Index auf alles Untereslim index pointing at everything below
├── .claude/
│ ├── project/ # DAUERHAFT — versioniertDURABLE — version-controlled
│ │ ├── intent.md # Warum: Vision, Ziele, Entscheidungen (≤ ~80 Zeilen)why: vision, goals, decisions (≤ ~80 lines)
│ │ ├── rules.md # Wie: Stack, Konventionen, Tabus (≤ ~80 Zeilen)how: stack, conventions, taboos (≤ ~80 lines)
│ │ ├── craft-profile.md # Betriebsprofil (Presets & Stellschrauben)operating profile (presets & knobs)
│ │ ├── roadmap.md # optional: Backlog jenseits des Kernsoptional: backlog beyond the core
│ │ ├── design/ # Querschnitts-Designwissen, on demandcross-cutting design knowledge, on demand
│ │ └── slices/ # Archiv abgeschlossener Slices = Decision Logarchive of completed slices = decision log
│ ├── plans/ # EPHEMER — lebt nur solange ein Slice offen istEPHEMERAL — lives only while a slice is open
│ │ ├── slice-001-user-login.md # aktiver Plan — trägt das Status-Tokenactive plan — carries the status token
│ │ ├── .next-id · .next-epic-id # ID-Zähler (getrennte Räume)ID counters (independent spaces)
│ │ └── .execute.lock # nur während eines /craft:execute-Laufsonly during a /craft:execute run
│ ├── skills/ # projekt-lokale Spezialisten, lazy geladenproject-local specialists, lazy-loaded
│ └── settings.local.json # Allowlist + Worktree-Trust (gitignored)allowlist + worktree trust (gitignored)
└── research/ # immer schreibgeschützt (PreToolUse-Hook)always write-protected (PreToolUse hook)
Command-ReferenzCommand reference
24 Commands + 4 slash-aufrufbare Skills, alle im /craft:-Namensraum
(bewusst — kollidiert nicht mit reservierten Namen wie /plan). Fast alle Commands beginnen mit
dem „Ensure-primed"-Gate: Ist die Session nicht geprimed, läuft /craft:prime automatisch vorweg.
24 commands + 4 slash-invocable skills, all in the /craft: namespace
(deliberate — no collision with reserved names like /plan). Nearly every command starts with
the "ensure-primed" gate: if the session isn't primed, /craft:prime runs first automatically.
| Session & NavigationSession & navigation | |
|---|---|
/craft:prime | Session-Start: Tool-Check, Kontext laden, Drift-Check, aktive Slices, Empfehlung. Läuft automatisch (SessionStart-Hook).Session start: tool check, context load, drift check, active slices, recommendation. Auto-runs (SessionStart hook). |
/craft:continue | Liest den Status des aktiven Slice und empfiehlt das nächste Kommando — mutiert nie.Reads the active slice's status, recommends the next command — never mutates. |
/craft:status | Leichte Übersicht: Slices, Phasen, Fortschrittsbalken, Blocker, Handoffs. Read-only.Lightweight overview: slices, phases, progress bars, blockers, handoffs. Read-only. |
/craft:checkout | In einen Worktree wechseln (Anleitung) zum Inspizieren während Recap/Review.Switch into a worktree (instructions) for inspection during recap/review. |
| Phasen-KommandosPhase commands | |
/craft:plan | Phase 3 — Slice planen: Trigger / Effekt / Test-Strategie, Sub-Tasks, Plan-Datei.Phase 3 — plan a slice: trigger / effect / test strategy, sub-tasks, plan file. |
/craft:epic | Multi-Slice-Epic planen: Vision + Zerlegung (≥ 2 Slices), eigener ID-Raum.Plan a multi-slice epic: vision + decomposition (≥ 2 slices), own ID space. |
/craft:build | Phase 4 — implementieren, Sub-Tasks in Reihenfolge, Tests still, Bündel-Meldungen.Phase 4 — implement, sub-tasks in order, tests silent, bundle reports. |
/craft:test | Phase 5 — der Mensch testet: Demo-Setup → Ausprobieren → [W]/[B]/[U].Phase 5 — the human tests: demo setup → exercise → [W]/[B]/[U]. |
/craft:recap | Phase 6 — Was/Warum erklären, Entscheidungen sichern, ggf. Mermaid-Diagramm.Phase 6 — explain what/why, capture decisions, Mermaid diagram if complex. |
/craft:refactor | Phase 7 — max. 2–3 strukturelle Verbesserungen; pro Projekt abschaltbar.Phase 7 — max 2–3 structural improvements; droppable per project. |
/craft:review | Phase 8 — Fresh-Context-Review, Heavy/Light × Local/Rethink, Commit-Gate.Phase 8 — fresh-context review, heavy/light × local/rethink, commit gate. |
/craft:commit | Phase 9 — atomare Commits, Promotion-Dialog, Archiv, Plan löschen, ggf. PR-Flow.Phase 9 — atomic commits, promotion dialog, archive, plan deletion, PR flow if configured. |
| OrchestrierungOrchestration | |
/craft:execute | Epic/Slice autonom bauen — parallel (Worktrees), in-place oder sequenziell.Build an epic/slice autonomously — parallel (worktrees), in-place or sequential. |
/craft:release | In-Place-Halt lösen: „Diff gesehen, weiter zu Phase 5".Lift the in-place halt: "diff reviewed, on to phase 5". |
| Unterbrechungen & ZustandInterrupts & state | |
/craft:pause | Slice pausieren, Notiz in den Plan.Pause the slice, note into the plan. |
/craft:handoff | Übergabe für frische Session schreiben (Status bleibt).Write a handoff for a fresh session (status unchanged). |
/craft:block / /craft:unblock | Blocker erstklassig erfassen / auflösen ([R]/[P]/[A]), Auto-Resurface via Commit.Record / clear a first-class blocker ([R]/[P]/[A]), auto-resurface via commit. |
/craft:abort | Slice endgültig verwerfen — getippte ID als Bestätigung.Discard a slice for good — typed ID to confirm. |
/craft:intent-update | Einziger Weg, intent.md außerhalb von Phase 9 zu ändern — Diff + Bestätigung.The only way to edit intent.md outside phase 9 — diff + confirmation. |
| Worktrees & WartungWorktrees & maintenance | |
/craft:worktree-status / -clean | Worktrees auflisten / verwaiste nach Bestätigung entfernen.List worktrees / remove orphans after confirmation. |
/craft:onboard | Einmaliges Onboarding — Greenfield oder Migration eines bestehenden .claude/.One-time onboarding — greenfield or migration of an existing .claude/. |
/craft:upgrade | Marketplace-Klon von GitHub synchronisieren; Installation übernimmt Claude Code beim Neustart.Sync the marketplace clone from GitHub; Claude Code reinstalls on next start. |
| Slash-aufrufbare SkillsSlash-invocable skills | |
/craft | Zustandsbewusster Einstieg: erkennt Onboarding-/Slice-Status, bietet gültige Aktionen an.State-aware entry point: detects onboarding/slice state, offers valid actions. |
/craft:brainstorm / /craft:grill-me | Phase 1 (Ideation) / Phase 2 (Alignment-Interview).Phase 1 (ideation) / phase 2 (alignment interview). |
/craft:debug | Bug-Verifikationsprotokoll ALIGN → PROTOCOL → LOOP → ESCALATION.Bug verification protocol ALIGN → PROTOCOL → LOOP → ESCALATION. |
Unter der HaubeUnder the hood
Reines Markdown-PluginPure Markdown plugin
24 Commands, 8 Skills, 2 Agents, 3 Hooks — Markdown, JSON und Bash. Kein Build,
kein MCP-Server. Das Repo ist sein eigener Marketplace (marketplace.json mit
source: "./").
24 commands, 8 skills, 2 agents, 3 hooks — Markdown, JSON and Bash. No build,
no MCP server. The repo is its own marketplace (marketplace.json with
source: "./").
Hooks
SessionStart: session-start.sh stößt das Auto-Prime an
(nur in onboardeten Projekten); worktree-handoff-notify.sh zeigt wartende Worktree-Handoffs.
PreToolUse: readonly-context-guard.sh verweigert Write/Edit auf
research/ und deklarierte Read-only-Quellen — mit pfad-normalisierender Traversal-Abwehr,
fail-open bei fehlendem jq.
SessionStart: session-start.sh triggers auto-prime
(only in onboarded projects); worktree-handoff-notify.sh surfaces pending worktree handoffs.
PreToolUse: readonly-context-guard.sh denies Write/Edit on
research/ and declared read-only sources — with path-normalizing traversal defense,
fail-open when jq is missing.
Agents
code-reviewer (Opus): klassifiziert nur — hat strukturell keine
Schreib-Tools. slice-builder (Sonnet): führt Phase 4–7 eines Slices im Worktree aus,
schreibt bei jeder menschenpflichtigen Pause .craft/handoff.md, committet/merged/pusht nie
selbst und erfindet nie eine menschliche Antwort.
code-reviewer (Opus): classifies only — structurally has no write
tools. slice-builder (Sonnet): runs a slice's phases 4–7 in its worktree, writes
.craft/handoff.md on every human-required pause, never commits/merges/pushes itself and
never fabricates a human answer.
Selbst-TestsSelf-tests
test-workflow-status-graph.sh beweist, dass der Status-Graph geschlossen
ist und die Commands ihm entsprechen — über maschinenlesbare Marker, denn Prosa ist nicht prüfbar
(ein Grep unterscheidet Gebot nicht von Verbot). test-readonly-context.sh testet den
Schreibschutz-Hook inklusive Traversal-Fällen.
test-workflow-status-graph.sh proves the status graph is closed and the
commands agree with it — via machine-readable markers, because prose is not checkable
(a grep can't tell prescription from prohibition). test-readonly-context.sh tests the
write-protection hook including traversal cases.
Begleitwerkzeuge (Pflicht)Companion tools (required)
| Tool | Wofür CRAFT es brauchtWhat CRAFT needs it for |
|---|---|
context-mode | Kontextfenster-Schutz: große Ausgaben laufen in einer Sandbox, nur Ergebnisse gelangen in die Konversation. Spart aktiv große Token-Mengen und macht deutlich längere Sessions möglich — der 9-Phasen-Loop in einem Rutsch lebt davon (siehe Kontext-Hygiene).Context-window protection: large outputs run in a sandbox, only derived answers enter the conversation. Actively saves large amounts of tokens and enables much longer sessions — running the 9-phase loop in one go depends on it (see context hygiene). |
agent-browser | Browser-Automatisierung für Hands-on-Verifikation (Phase 5).Browser automation for hands-on verification (phase 5). |
git | Worktrees, Branches, das gesamte Ausführungs- und Commit-Modell.Worktrees, branches, the whole execution and commit model. |
gh | PR-Landing im Protected-main-Profil (öffnen + mergen nur nach Approval).PR landing under the protected-main profile (open + merge only after approval). |
Upgrade-Modell: /craft:upgrade synct nur den Marketplace-Klon
(~/.claude/plugins/marketplaces/…) — die Installation in den Plugin-Cache übernimmt Claude Code
beim nächsten Start. Wichtig fürs Dogfooding: Die laufende Session führt immer die Cache-Version aus,
nicht den Working Tree.
Upgrade model: /craft:upgrade only syncs the marketplace clone
(~/.claude/plugins/marketplaces/…) — installation into the plugin cache is Claude Code's job on
next start. Dogfooding caveat: a running session always executes the cache version, not the working tree.