Vibe Coding
Overview
vibe-coding is the top-level orchestration entry point for multi-turn
vibe-coding workflows. It classifies the user's current instruction into one
row of the decision table under Workflow Phases, then either routes that row to
the visible specialist skill whose metadata matches it — preserving each
specialist's own write boundary, approval gate, stop condition, and
verification rules — or, for a router-owned row, performs the work itself under
the shared effect and commit boundaries carried in this file.
This skill routes work; it does not replace specialist skills and does not
authorize host command plumbing, release preparation, generated eval
workspaces, or implementation outside the row it selected.
Before any nontrivial state-changing or external-cost action, distinguish
selection from permission. Select the action only when the current deliverable
requires it or an applicable higher-priority or owning-workflow contract
requires it in support of that deliverable. Record the action owner and
authority source in routing or workflow state when the distinction is material.
Permission, capability, availability, relevance, conventional path placement,
or existing tracked status may constrain or support a selected action, but none
of them independently selects new work or bypasses a bound identity, proof
minimum, consent gate, or stop condition.
Apply the same separation to artifact lifecycle. Authority to create or edit an
artifact does not by itself authorize tracking, staging, committing,
release-note inclusion, or publishing it. A mandatory repository or
owning-workflow coupling may select one of those transitions, but the workflow
must cite that obligation rather than infer it from usefulness or visibility.
The checkpoint default in the commit-selection contract below is the one
transition a state-changing route's own contract selects, and it reaches only
that unit's verified in-scope changes. Deferring the checkpoint is not the
conservative choice — it accumulates a change set the user can neither review
nor split without re-verifying each block — so treat an unexplained uncommitted
pile at the end of a state-changing run as a defect, not as safety.
This skill does not hardcode a specialist roster. Routes are resolved at
routing time from the skill metadata visible in the current environment, so the
family can grow or shrink without changing this skill.
Activation
Activate this skill only when the current turn has one of these signals:
- An explicit host-specific skill invocation for
vibe-coding, such as Claude
/vibe-coding or Codex $vibe-coding. These are representative examples,
not an exhaustive list of valid AI-agent syntaxes.
- A host-provided invocation signal that says
vibe-coding is active.
- An explicit instruction such as "use
vibe-coding".
Do not activate when the user merely mentions "vibe coding" as a style,
repository label, quoted text, background concept, or example.
After vibe-coding is already active, later related turns may continue through
Routing State without a new activation signal. Do not treat that continuation as
a fresh activation.
If activation lacks a concrete coding instruction, ask for the instruction and
do not select a downstream phase yet. Keep this clarification narrow: do not
present a route menu, availability diagnosis, or specialist boundary summary
before the user provides enough intent to classify the immediate phase.
Routing State
Routing state has two carriers with different authority. The conversation and
the active artifact paths are the authority: approvals, proceed decisions, and
stop boundaries are given and read there. The session record at
.plans/vibe-sessions/<record_id>.json — the router's default record_id is
the workflow id — is a record of that state, not authority. It persists the six
routing fields the router owns:
- Current goal.
- Current phase.
- Active artifact path or paths.
- Pending user decision, when one exists.
- Known blocker.
- Next route.
It also names each approval, proceed decision, handoff, commit selection, and
gate confirmation as an event with its source, so a recorded event counts
only for its enumerated source, only while its status is current, and
never becomes a decision the conversation did not make. The write points are under Session Record below; the schema is in
references/session-record.md.
Specialist-specific state—such as execution item status, review target identity,
debug hypotheses, delegated-work budgets, or verification receipts—stays with
the active specialist. Summarize only the minimum needed to resume that
specialist after interruption or compaction; the record's routing fields do not
duplicate its ledger.
For later related turns, classify the user request before routing:
continue current workflow
revise current artifact
replace workflow
cancel workflow
unrelated ordinary request
If stale context would change behavior and the class is unclear, ask one
clarifying question before routing. On a continuation turn, rebind from
conversation state and the active artifact paths, and from the session record
when one is valid: scan the record directory, keep the active, unexpired
records that belong to this worktree, and select the one whose
host_session_id matches the host's session id when both are known. When more
than one candidate remains, the record is conflicting: continue from
conversation state, and every gate answers as for a conflicting record. When no
valid record exists and context was lost after compaction or a long
interruption, rebind from the latest known artifact path; if that is not
possible, ask for the missing artifact or decision.
On cancellation or replacement, clear the active phase, next route, pending
approvals, active slice, and live artifact bindings, and write the record's
tombstone — cancelled, or superseded with a new workflow id for the
replacement. Preserve completed artifact paths only as historical context.
When a downstream phase reports that the bound spec or plan is defective —
contradictory, stale, infeasible, or contract-breaking — that is a backtracking
signal, not a reason to force the current phase forward. Route the next turn to
the row that owns the broken artifact: requirements-specification when the
requirements artifact, user-visible behavior, scope, or source acceptance
criteria are wrong; implementation-planning when the bound plan's acceptance
criteria, proof, schema, test, edit-order, or risk contract is wrong. Do not
keep executing patch-by-patch against a contract a downstream specialist
already flagged as broken; references/phase-boundaries.md has the detail.
Goal-Alignment Gate
Apply this gate to the instruction before classifying it into a row. It fires
only when the instruction leaves an unresolved semantic or acceptance ambiguity
about history, release, irreversible, or outward-facing effects: the words can
reasonably be read two ways that differ in whether history is rewritten, what
is released or versioned, whether something is destroyed or otherwise cannot be
undone, or whether anything leaves this machine — including when the two
readings differ in what counts as done for one of those four effects — and
nothing in the turn settles which reading is meant.
It does not fire on:
- A settled direct request whose action, scope, and target are clear, such as
a plain request to commit the current changes.
- A negation such as "do not push": a stated boundary is a settled
instruction, not an ambiguity.
- Quoted or background material: a commit message that mentions
rebase, a
pasted log, an audit report, or an example is inert context, not the
instruction.
- Plan metadata: a bound plan that carries
Commit checkpoints or similar
routing metadata settles the checkpoint question rather than raising one.
- An action the request names as out of scope, such as release preparation
that an adjacent report suggests and the user excluded.
- Ordinary approval or readiness ambiguity that an active artifact row already
settles by asking — "looks good, continue" during requirements, "looks good,
go ahead" after planning — unless it also changes a history, release,
irreversible, or outward-facing effect.
When it fires, route to the visible goal-alignment specialist — the skill whose
visible description matches aligning, confirming, or correcting the agent's
understanding before action, matched by its metadata like any other route —
and stop for the user's answer. When no such specialist is visible, ask the one
confirming question yourself, name the availability source you checked, and
stop; the gate is not a phase, so it never reports matched-but-unavailable.
In both cases record the user's answer as a confirmation event with
source: user-turn and status: current after the answer, then classify the
instruction. A completed gate is not proceed evidence for anything else: it
settles the reading of the instruction, and every row's own approval, consent,
and stop boundaries still apply.
Workflow Phases
Classify the immediate instruction into exactly one row. Choose the immediate
next required phase, not the eventual end goal. Router-owned rows
(workflow-control, direct-implementation, maintenance) are performed by
this skill as ordinary behavior under the shared effect and commit boundaries
below; every other row is routed to the visible specialist whose metadata
matches it. Read references/route-selection.md when the cells do not settle
the classification. Row ids such as requirements-specification are the
phase values the session record stores, not route names: when reporting a
matched specialist route, name the specialist by the name its visible metadata
states, with the row id at most alongside it; for a router-owned route, report
the row with its ownership status and invent no specialist name; for an
unavailable route, report the row as matched-but-unavailable together with
the specialist name the prompt, user-provided material, or visible metadata
identifies as absent, and invent none when nothing identifies one. Write every
route report under the language gate in User-Facing Output: when a task
enumerates represented turns or scenarios under an English wrapper, each turn's
language comes from that turn's own request text, and neither the wrapper's
language nor the number of scenarios changes it.
| Row |
Trigger |
Exclusions |
Owner |
Required artifact |
Next boundary |
workflow-control |
Lifecycle commands: cancel workflow, replace workflow, an unrelated top-level skill or mode invocation, or a specialist reaching its finish gate with no further related instruction; a stale-context clarification before routing; an unrelated ordinary request; the terminal no matching specialist fallback. |
A bare activation with no coding instruction — the activation contract asks for it before any classification; any instruction another row accepts. |
This skill (router-owned): clears or suspends routing state, asks the one clarifying question, or continues with ordinary behavior; exempt from the availability gate and never matched-but-unavailable. |
None; an active workflow's session record — tombstoned on cancel or replace, otherwise untouched by an unrelated request. |
The user's next related instruction; on cancel or replace, live routing state is cleared before anything else is classified; no matching specialist continues as ordinary behavior with no routing state created or retained for it. |
requirements-specification |
A new vague, rough, contradictory, creative, non-technical, or underspecified coding goal; revising, finishing, or approving the current requirements spec; durably capturing a confirmed creative direction; backtracking when the bound requirements artifact, user-visible behavior, scope, or source acceptance criteria are wrong. |
An input concrete enough to plan or execute; an ideas-only request with no saved-requirements ask (creative-direction-exploration); a defect only in the bound plan's contract (implementation-planning); "looks good", "ready", "continue", "go ahead", or a completed checklist is not approval unless it clearly approves the current spec. |
The visible requirements-specification specialist (artifact-only). |
The requirements spec, bound by path once it exists; none before a chat-only or no-file run's first write. |
Stops after the spec update and its summary and never creates the plan in the same response; the next related instruction routes to implementation-planning only on explicit current-spec approval evidence; a same-instruction continuation to planning starts only after recordable current-spec approval or handoff evidence and no completion-audit blocker. |
creative-direction-exploration |
Explicit brainstorming, idea generation, alternatives, interaction concepts, or implicit expected-behavior and convention checks before scope hardens, with no saved-requirements ask. |
A request to save requirements (requirements-specification); a reported defect; an edit, plan, or commit request; a concrete bound plan. |
The visible creative-exploration specialist (read-only, chat-first). |
None; the deliverable is chat. |
A confirmed direction or a trusted proxy selection is input to later requirements or planning work — recorded as AI-selected direction when it came from a proxy — never implementation authorization; a request to capture it durably routes the next instruction to requirements-specification. |
code-investigation |
Read-only questions about existing code or behavior — how it works, where it lives, data flow, dependencies, what a change would affect — with no defect report and no edit, plan, or commit request. |
A reported symptom or repair request, which outranks investigation (debug-and-repair); any edit, plan, spec, or commit request; a bound plan to execute. |
The visible code-investigation specialist (read-only). |
None; findings are chat evidence; a saved artifact exists only on the user's explicit ask. |
Findings are evidence for later phases and authorize no edit, fix, plan, or commit; the next instruction is classified afresh and no commit state is created. |
implementation-planning |
An approval-evidenced or legacy Approved spec plus a next related instruction; a supplied spec, acceptance criteria, task list, or multi-surface request needing a plan; create/revise a plan; backtracking the bound plan's acceptance-criteria, proof, schema, test, edit-order, or risk contract. |
Concrete bound plan with a ready proceed condition and an execution request (plan-execution); item-by-item walkthrough (plan-pre-check-walkthrough); git-backed plan diff (review); vague goal without approval evidence (requirements-specification); single-surface edit needing no plan (direct-implementation); "looks good, go ahead" after planning is neither revision nor execution — ask which. |
The visible implementation-planning specialist (artifact-only). |
The plan artifact it creates or revises, plus the approved spec or concrete inputs bound. |
Stops after the plan artifact and its summary; no same-turn implementation and no plan-artifact commit; a ready proceed condition together with an explicit execution request starts a separate plan-execution route, and a same-instruction continuation starts only after a concrete reviewed plan with a ready proceed condition or recorded accepted risk. |
plan-execution |
A clear request to execute, implement, apply, or continue a known plan or slice, with a concrete bound plan whose proceed condition is ready or accepted-risk condition is satisfied for that slice; continuation rebinding the slice from the implementation-progress ledger. |
Inputs not concrete enough (implementation-planning); bare "continue", "go ahead", "ready", "looks good" not clearly asking to execute the known plan; a reported plan-contract defect (backtracking); a new runtime symptom (debug-and-repair); a walkthrough (plan-pre-check-walkthrough); adjacent work the plan and mandatory repository coupling do not require. |
The visible plan-execution specialist (state-changing). |
The bound implementation plan, and its implementation-progress ledger when present — plan-execution state, not routing state, whose recorded completions the execution specialist verifies before a rebinding relies on them. |
The bound plan's scope, acceptance criteria, documentation/changelog coupling, release policy, verification path, and review; each verified, reviewed slice closes with a checkpoint through commit-execution under the commit-selection gate — from a plan Commit checkpoints item or the specialist's default — never a commit inside execution; a blocked proceed condition, plan defect, or stop signal ends the route. |
debug-and-repair |
Bug reports, regressions, failed prior fixes, repeated "still broken" feedback, rough repair requests, tool or automation failures, environment-specific failures, and runtime artifact mismatches; a review fix that regressed a core user journey. |
Continuing execution against a bound plan whose contract itself is reported wrong (backtracking to the artifact-owning row); a read-only question with no symptom (code-investigation); a request for a spec or plan artifact; a dependency, build, or test edit with no reported defect (maintenance). |
The visible debug-and-repair specialist (state-changing). |
None; the bug report or reproduction is the input; a named plan file is context, not execution authority. |
A proven repair closes with a checkpoint of the repair-owned changes through commit-execution under the commit-selection gate, without a startup commit question; a diagnosis with no fix commits nothing. |
review |
A git-backed diff, working tree, branch, base ref, or git-backed plan or document change to review; a review/fix loop with scope triage, Definition-of-Done alignment, findings, or gated fixes; continuing a review while excluding a finding, path, package, or subsystem. |
Item-by-item walkthrough of a saved plan (plan-pre-check-walkthrough); a new runtime symptom or a fix regressing a core user journey (debug-and-repair); a repeated finding class past the threshold, a fix needing material architecture expansion, or a repair depth the bound spec or plan cannot decide (artifact-owning row). |
The visible review specialist (state-changing). |
The frozen git-backed review target; routing state carries the target, primary journey, acceptance sentinels, cycle count, active stop signals, last verified checkpoint, and unverified shared edits. |
A completed fix loop closes its own verified fixes through commit-execution under the commit-selection gate; a review that applies no fix commits nothing and never commits the changes under review; an excluded surface stays non-editable and outside selectable fixes; an active stop signal routes out to the owning row. |
plan-pre-check-walkthrough |
A request to interactively walk through, pre-check, confirm, or review a saved implementation plan artifact item by item before execution starts, where the target is the saved plan itself. |
A git-backed diff, branch, or base-ref target (review); revising plan content from new requirements or evidence (implementation-planning); executing the plan (plan-execution). |
The visible plan pre-check specialist (artifact-only; reflects decisions into the plan only with explicit consent). |
The saved implementation plan artifact. |
Stops before implementation; item decisions and reflection consent stay with the user; completion is neither proceed evidence nor execution authorization; reflected changes stay uncommitted unless the user explicitly selects a commit. Unattended or delegated operation matches this row but is not delegable: report the interactive requirement and stop rather than emulating item decisions. |
commit-execution |
A request to stage, commit, split, amend, or repair repository history for the current changes; a checkpoint selected by a bound plan item, by a state-changing specialist closing a verified unit, or by a router-owned row closing its verified edit. |
Message wording alone, with no history action (writing); a skill offering only a commit command capability without the workflow's boundary contract is auxiliary, never primary; push, release preparation, version changes, tags, and rewrites of shared history are never implied by a commit request. |
The visible commit-execution specialist (state-changing); when none is visible, matched-but-unavailable with the fallback in references/route-selection.md. |
The verified change set with its scope, evidence, unrelated-path exclusions, and any proposed message; before a plain commit, a recorded commit-selection event naming its source. |
The commit workflow's file-set, staging-safety, exact-diff, message-transport, and post-commit verification gates; the history-mutation gate for amend, rebase, reset, push, and scripted replays under their own consent. |
writing |
Wording, message content, localization, or text-format deliverables — comments, docstrings, docs, changelog, PR descriptions, UI copy, progress updates, summaries, commit-message text — with no review target, Definition-of-Done triage, or fix loop. |
A direct lexical, grammar, or naming judgment about a short label or identifier, when the user wants only an immediate answer and excludes editing, review, planning, debugging, and written deliverables — ordinary behavior or no matching specialist, no routing state; a review target (review); a history action (commit-execution); wording inside another active phase (auxiliary only). |
The visible writing specialist (artifact-only). |
The text artifact the request names; none for a chat-only reply or a message draft. |
Verified text edits remain uncommitted unless the user explicitly selects a commit; a chat-only reply or commit-message draft never selects history work. |
direct-implementation |
A concrete edit with a stated or obvious surface, acceptance, and verification — one behavior, default, option, or component the user names — with no saved plan and no defect report. |
Multi-surface work; bug reports and regressions (debug-and-repair); an approved or bound plan (plan-execution); vague or underspecified goals (requirements-specification); a request for a plan (implementation-planning); dependency, build, test-only, or release work with no behavior change (maintenance). |
This skill (router-owned): ordinary implementation under the effect and commit boundaries below; exempt from the availability gate and never matched-but-unavailable. |
None; the session record carries the goal, surface, and acceptance; no plan or spec is created. |
The commit-selection gate — the verified edit closes with a checkpoint under the state-changing commit contract, routed through commit-execution when a specialist is visible; push, release, and version changes stay consent-bound. |
maintenance |
Dependency updates, build repairs without a reported defect, test-only edits, release preparation on the user's explicit request, and repository chores such as configuration, tooling, or housekeeping edits. |
A reported defect or regression (debug-and-repair); a bound plan (plan-execution); a behavior change the user names as the deliverable (direct-implementation); release, version, tag, or push work the user did not explicitly request. |
This skill (router-owned): ordinary maintenance under the effect and commit boundaries below; exempt from the availability gate and never matched-but-unavailable. |
None; the session record carries the goal and the touched surfaces. |
The commit-selection gate — a verified maintenance unit closes with a checkpoint under the state-changing commit contract; release, version, tag, and push stay separately consent-bound even when the request is release preparation. |
The precedence below classifies an instruction that could match more than one
row; the goal-alignment gate precedes every item. Each original precedence item
maps to a row:
- Lifecycle commands and unrelated top-level invocations →
workflow-control.
- Stale-context clarification before routing →
workflow-control.
- Active artifact continuation or revision → the row that owns the active
artifact (
requirements-specification, implementation-planning,
plan-execution, plan-pre-check-walkthrough, review, or writing).
- Review targets and review/fix loops →
review.
- Bug reports, regressions, failed fixes, tool failures, runtime artifact
mismatches, and existing-feature repair →
debug-and-repair.
- Interactive pre-execution walkthroughs of a saved implementation plan →
plan-pre-check-walkthrough.
- Commit, staging, and history-repair execution requests →
commit-execution.
- Wording-only deliverables with no review target or Definition-of-Done
triage →
writing.
- Clear execution requests for concrete implementation plans →
plan-execution.
- Read-only code-investigation questions with no defect report or edit
request →
code-investigation.
- Idea-generation, direction-exploration, or convention-check requests that
do not ask for a saved requirements artifact →
creative-direction-exploration.
- Implementation planning for approval-evidenced specs or inputs that need a
plan before execution →
implementation-planning.
- Requirements specification for new vague, rough, contradictory, creative,
non-technical, or underspecified coding goals →
requirements-specification.
no matching specialist fallback → workflow-control.
The router-owned rows direct-implementation and then maintenance are
classified between items 12 and 13, and always before item 14: a concrete edit
or a maintenance unit is not the terminal fallback and never reports
matched-but-unavailable.
Before any plain commit
For every consolidation block this package carries, here and in its references: where this package declares a stricter or narrower rule in its own text, that declaration controls.
For every gate and schema block this package carries, here and in its references: this package may state which of its phases the block applies to; it may not change the block's inputs, outcomes, or fields.
Never run a plain git commit without naming the selection source it rests on.
- With no user-installed hook enforcing this gate, this wording is the whole gate: apply it yourself before the command runs.
- Name one recorded source before committing: the current user's request (
user-turn), the bound plan item (bound-plan-item), or the workflow's own checkpoint of a verified unit (specialist-checkpoint).
- Treat
agent-proposed as a recorded proposal, never a selection.
- When the workflow is router-bound, have the router record that source as a
commit-selection event before the command runs.
- For a standalone commit with no router active, name the direct current-user request or the verified checkpoint handoff and follow the phase's ordinary confirmation policy.
- When no source can be named, do not commit; ask the user whether a commit is wanted.
- Return
allow when the command is not a commit.
- Return
ask on every plain commit, quoting from the session record under .plans/vibe-sessions/ the recorded phase and the most recent recorded commit-selection event's source, at, and note.
- Or state that no
commit-selection event is recorded, or that the record is absent, malformed, stale, foreign, session-unbound, or conflicting.
- Never return
deny from this gate.
- Never allow a plain commit silently: surface the recorded
source at the prompt so a self-attested selection is caught there.
- Answer
ask, never deny, for a record in any invalid state.
Exception: an amend or other history rewrite belongs to the history-mutation gate, not this one.
This gate applies to every plain commit under a vibe-coding workflow, in any
row. The router records the commit-selection event named under Session Record
before the command runs, whether the commit is executed by the visible
commit-execution specialist or, when none is visible, under the fallback in
references/route-selection.md.
Before a history rewrite
Never rewrite git history without stopping and asking the user first.
- With no user-installed hook enforcing this gate, this wording is the whole gate.
- Before running a matched command, stop and ask the user with that reason, and proceed only on the user's answer.
- Match
git commit --amend, git rebase, git filter-branch or another filter-* rewrite, git reset --hard, git push, or a scripted or looped replay that rewrites more than one commit.
- Return
allow when the command is not a history mutation.
- Return
ask for every matched history mutation, naming the matched operation.
- Quote from the session record under
.plans/vibe-sessions/ the recorded phase, effect_mode, and the kind and source of every recorded event bearing on it.
- Or state that the record is absent, malformed, stale, foreign, session-unbound, or conflicting, or that no such event is recorded.
- Never return
deny from this gate.
- Never allow a matched history mutation silently, whatever the record says: surface the recorded values at the prompt so a self-attested record is caught there rather than trusted.
- Treat history that has left this machine — pushed, fetched by another clone, or otherwise published — as shared; no recorded value makes rewriting it silent.
- Let the record decide only the wording of the reason, never the outcome.
- Answer
ask, never deny, for an absent, malformed, stale, foreign, session-unbound, conflicting, or identity-mismatched record.
Exception: a plain git commit belongs to the commit-selection gate, not this one, and a read-only git command is not a history mutation.
This gate applies to every shell action under a vibe-coding workflow, in any
row, the router-owned rows included. The router renews the record's lease
immediately before a matched command and, when no hook enforces the gate, asks
with the wording above before running it.
Before a write in a read-only or artifact-only phase
Never write a path your phase's effect class and recorded allowed_paths do not permit.
- With no user-installed hook enforcing this gate, this wording is the whole gate.
- Count as a write any file-edit or file-write tool call, and any shell command that writes a path — redirection,
sed -i, tee, a heredoc, mv, cp, rm, git checkout --.
- In a read-only phase, write only an explicitly requested saved artifact whose canonical path is recorded in
allowed_paths; otherwise write no file.
- In an artifact-only phase, write only the artifact it owns, the supporting paths its own text declares, and the scratch root recorded for the unit.
- Refuse a write outside that boundary in the phase itself and report it as a boundary stop.
- Report a denied write verbatim as a boundary stop; never retry it through another tool.
- Return
deny only for a fresh, valid, session-bound read-only or artifact-only record whose canonical target lies outside every allowed_paths entry and recorded directory.
- Name the target path in that reason and quote the recorded
phase, effect_mode, and allowed_paths.
- Return
allow in every other case: a target inside allowed_paths, an effect_mode of state-changing or none, or a record absent, malformed, stale, foreign, session-unbound, conflicting, or identity-mismatched.
- Never return
ask from this gate.
- Never let an invalid record state produce
deny, so the refusal never rests on unverified host behavior.
Example: in an artifact-only phase whose allowed_paths holds only the artifact it owns, a write to that artifact is inside the boundary; a write to a source file is outside it, and with a fresh, valid, session-bound record the gate returns deny.
Exception: writing the router's own record — .plans/vibe-sessions/<record_id>.json or its rename temp file — is allow at any effect_mode, not a phase write; judge every other path there like any other path, and allowed_paths does not widen.
This gate applies while the recorded row is creative-direction-exploration,
code-investigation, requirements-specification, implementation-planning,
plan-pre-check-walkthrough, or writing; the state-changing rows and
workflow-control are outside it.
Commit selection
Only an explicit user request, a bound plan item, or a workflow's own verified checkpoint selects a commit.
- Select a commit from exactly three sources: an explicit current-user request; a bound approved plan item requiring that checkpoint; or a state-changing workflow closing its own verified, reviewed, in-scope unit under its checkpoint default.
- Never let routing or invocation, edit permission, a convenient stopping point, tracked changes in the working tree, or an available commit-execution workflow select a commit.
- Never treat an unverified unit as a handoff.
- Execute in commit-execution only the commits those sources select; that phase has no checkpoint default of its own.
- Close a self-contained unit of the workflow's own work with a local commit of exactly that unit once it is implemented, verified, reviewed, and its material findings dispositioned.
- Commit that unit without waiting for a separate commit instruction.
- Never let a multi-unit run accumulate as one undifferentiated working tree.
- When the default is suspended, leave the verified changes in the working tree and report the reason.
- Let the checkpoint default reach only local commits of the unit's own verified changes.
- Select no commit from discovery-only, blocked, unchanged, failing, unverified, or work-in-progress state.
- Never widen the staged set beyond the verified unit.
- Exclude pre-existing working-tree changes the workflow did not make, an artifact whose tracked status would itself be new, and paths outside the unit.
- Never treat an available commit-execution workflow or ambient tracked status as a reason to include them.
- When the unit's changes cannot be separated from unrelated working-tree state, report the mixed state and ask instead of committing.
- Route every selected commit through the commit-execution workflow with the verified scope, its test and review evidence, its unrelated-path exclusions, and any proposed message.
- Leave staging, file-set and exact-diff review, message transport, history safety, and post-commit verification to that workflow.
- Never read a request to commit as a request to push.
- Keep push, release preparation, version changes, tags, amend, rebase, reset, stash, squash, destructive actions including cleanup, force-adds, tracking a newly created artifact, external side effects, and unrelated or ambiguous paths separately consent-bound even when a checkpoint was selected.
- Never let a route, checkpoint, or handoff implicitly authorize them.
Example: "the user asked for a commit this turn" names a source; "this is a good stopping point" does not.
Exception: a current no-commit instruction, a bound plan that forbids commits, or project policy against commits suspends the checkpoint default.
For a router-owned row this skill is the state-changing workflow the contract
names: its verified edit closes under the checkpoint default, recorded with
specialist-checkpoint as the selection source. For a routed row the checkpoint
belongs to the specialist; the router records the selection and routes the
history action. When a unit's changes cannot be separated from unrelated
working-tree state, the router records no new commit-selection event for that
blocked checkpoint, reports the mixed state, and asks instead of committing.
What this phase may write
Write nothing beyond what the phase's own effect class and its declared boundary permit.
- Declare exactly one effect class for every workflow phase, in that phase's own text.
- In a read-only phase, read and report; make chat the deliverable — findings, alignment, or direction.
- In a read-only phase, edit no source, test, config, doc, or other file, and run no command that mutates runtime or repository state.
- In a read-only phase, never stage, commit, tag, push, change versions, delete data, or start services.
- In a read-only phase, write a file only when the current user explicitly asks for a saved artifact.
- In an artifact-only phase, create or update the artifact it owns: the requirements spec, the plan, the plan-review state, the instruction files, or the text artifacts the request names.
- In an artifact-only phase, write the supporting paths its own text declares:
- the text it was asked to revise (comments, docstrings, docs);
- a confirmed reflection into the bound plan;
- an ignore file it previewed and the user confirmed;
- a narrowly confirmed configuration edit its text names;
- a decision record or findings report its own text declares.
- In an artifact-only phase, leave those verified changes in the working tree.
- In an artifact-only phase, never implement executable behavior, never edit application code or tests as implementation, never produce an artifact another phase owns, and never perform release work.
- Never let an artifact-only phase's artifact authorize same-turn implementation.
- In a state-changing phase, edit files and run commands inside the scope its own text declares — the unit it implements, the repair it proves, the fixes it applies, the round it integrates, or the commit it executes.
- In a state-changing phase, keep its edits to the smallest verified unit of that scope.
- In a state-changing phase, leave paths outside the scope, pre-existing working-tree changes the phase did not make, and runtime or external state beyond the scope unwritten unless the current user selects them.
- Keep every irreversible or outward-facing operation under its own consent.
Each row's class is stated in its owner cell: the router-owned rows
direct-implementation and maintenance are state-changing, and
workflow-control writes nothing. The router records the active row's class as
effect_mode and its declared write boundary as allowed_paths. The
router-owned state-changing rows also write docs/decisions/ and
docs/reports/findings/ under Durable Records; workflow-control writes
neither.
Durable Records
Before recording a settled decision, deferring a finding, closing a unit, or
starting this phase, read references/durable-records.md. The router-owned rows
direct-implementation and maintenance write docs/decisions/ and
docs/reports/findings/, or the repository's existing record directory, as
declared supporting paths; workflow-control writes neither.
Before a human-risk decision
1---2name: vibe-coding3description: Use when the user explicitly invokes vibe-coding through a host-specific skill command, host-provided invocation signal, or direct instruction such as "use `vibe-coding`" for a coding workflow.4---56# Vibe Coding78## Overview910`vibe-coding` is the top-level orchestration entry point for multi-turn11vibe-coding workflows. It classifies the user's current instruction into one12row of the decision table under Workflow Phases, then either routes that row to13the visible specialist skill whose metadata matches it — preserving each14specialist's own write boundary, approval gate, stop condition, and15verification rules — or, for a router-owned row, performs the work itself under16the shared effect and commit boundaries carried in this file.1718This skill routes work; it does not replace specialist skills and does not19authorize host command plumbing, release preparation, generated eval20workspaces, or implementation outside the row it selected.2122Before any nontrivial state-changing or external-cost action, distinguish23selection from permission. Select the action only when the current deliverable24requires it or an applicable higher-priority or owning-workflow contract25requires it in support of that deliverable. Record the action owner and26authority source in routing or workflow state when the distinction is material.27Permission, capability, availability, relevance, conventional path placement,28or existing tracked status may constrain or support a selected action, but none29of them independently selects new work or bypasses a bound identity, proof30minimum, consent gate, or stop condition.3132Apply the same separation to artifact lifecycle. Authority to create or edit an33artifact does not by itself authorize tracking, staging, committing,34release-note inclusion, or publishing it. A mandatory repository or35owning-workflow coupling may select one of those transitions, but the workflow36must cite that obligation rather than infer it from usefulness or visibility.3738The checkpoint default in the commit-selection contract below is the one39transition a state-changing route's own contract selects, and it reaches only40that unit's verified in-scope changes. Deferring the checkpoint is not the41conservative choice — it accumulates a change set the user can neither review42nor split without re-verifying each block — so treat an unexplained uncommitted43pile at the end of a state-changing run as a defect, not as safety.4445This skill does not hardcode a specialist roster. Routes are resolved at46routing time from the skill metadata visible in the current environment, so the47family can grow or shrink without changing this skill.4849## Activation5051Activate this skill only when the current turn has one of these signals:5253- An explicit host-specific skill invocation for `vibe-coding`, such as Claude54 `/vibe-coding` or Codex `$vibe-coding`. These are representative examples,55 not an exhaustive list of valid AI-agent syntaxes.56- A host-provided invocation signal that says `vibe-coding` is active.57- An explicit instruction such as "use `vibe-coding`".5859Do not activate when the user merely mentions "vibe coding" as a style,60repository label, quoted text, background concept, or example.6162After `vibe-coding` is already active, later related turns may continue through63Routing State without a new activation signal. Do not treat that continuation as64a fresh activation.6566If activation lacks a concrete coding instruction, ask for the instruction and67do not select a downstream phase yet. Keep this clarification narrow: do not68present a route menu, availability diagnosis, or specialist boundary summary69before the user provides enough intent to classify the immediate phase.7071## Routing State7273Routing state has two carriers with different authority. The conversation and74the active artifact paths are the authority: approvals, proceed decisions, and75stop boundaries are given and read there. The session record at76`.plans/vibe-sessions/<record_id>.json` — the router's default `record_id` is77the workflow id — is a record of that state, not authority. It persists the six78routing fields the router owns:7980- Current goal.81- Current phase.82- Active artifact path or paths.83- Pending user decision, when one exists.84- Known blocker.85- Next route.8687It also names each approval, proceed decision, handoff, commit selection, and88gate confirmation as an event with its `source`, so a recorded event counts89only for its enumerated `source`, only while its `status` is `current`, and90never becomes a decision the conversation did not make. The write points are under Session Record below; the schema is in91`references/session-record.md`.9293Specialist-specific state—such as execution item status, review target identity,94debug hypotheses, delegated-work budgets, or verification receipts—stays with95the active specialist. Summarize only the minimum needed to resume that96specialist after interruption or compaction; the record's routing fields do not97duplicate its ledger.9899For later related turns, classify the user request before routing:100101- `continue current workflow`102- `revise current artifact`103- `replace workflow`104- `cancel workflow`105- `unrelated ordinary request`106107If stale context would change behavior and the class is unclear, ask one108clarifying question before routing. On a continuation turn, rebind from109conversation state and the active artifact paths, and from the session record110when one is valid: scan the record directory, keep the active, unexpired111records that belong to this worktree, and select the one whose112`host_session_id` matches the host's session id when both are known. When more113than one candidate remains, the record is conflicting: continue from114conversation state, and every gate answers as for a conflicting record. When no115valid record exists and context was lost after compaction or a long116interruption, rebind from the latest known artifact path; if that is not117possible, ask for the missing artifact or decision.118119On cancellation or replacement, clear the active phase, next route, pending120approvals, active slice, and live artifact bindings, and write the record's121tombstone — `cancelled`, or `superseded` with a new workflow id for the122replacement. Preserve completed artifact paths only as historical context.123124When a downstream phase reports that the bound spec or plan is defective —125contradictory, stale, infeasible, or contract-breaking — that is a backtracking126signal, not a reason to force the current phase forward. Route the next turn to127the row that owns the broken artifact: `requirements-specification` when the128requirements artifact, user-visible behavior, scope, or source acceptance129criteria are wrong; `implementation-planning` when the bound plan's acceptance130criteria, proof, schema, test, edit-order, or risk contract is wrong. Do not131keep executing patch-by-patch against a contract a downstream specialist132already flagged as broken; `references/phase-boundaries.md` has the detail.133134## Goal-Alignment Gate135136Apply this gate to the instruction before classifying it into a row. It fires137only when the instruction leaves an unresolved semantic or acceptance ambiguity138about history, release, irreversible, or outward-facing effects: the words can139reasonably be read two ways that differ in whether history is rewritten, what140is released or versioned, whether something is destroyed or otherwise cannot be141undone, or whether anything leaves this machine — including when the two142readings differ in what counts as done for one of those four effects — and143nothing in the turn settles which reading is meant.144145It does not fire on:146147- A settled direct request whose action, scope, and target are clear, such as148 a plain request to commit the current changes.149- A negation such as "do not push": a stated boundary is a settled150 instruction, not an ambiguity.151- Quoted or background material: a commit message that mentions `rebase`, a152 pasted log, an audit report, or an example is inert context, not the153 instruction.154- Plan metadata: a bound plan that carries `Commit checkpoints` or similar155 routing metadata settles the checkpoint question rather than raising one.156- An action the request names as out of scope, such as release preparation157 that an adjacent report suggests and the user excluded.158- Ordinary approval or readiness ambiguity that an active artifact row already159 settles by asking — "looks good, continue" during requirements, "looks good,160 go ahead" after planning — unless it also changes a history, release,161 irreversible, or outward-facing effect.162163When it fires, route to the visible goal-alignment specialist — the skill whose164visible description matches aligning, confirming, or correcting the agent's165understanding before action, matched by its metadata like any other route —166and stop for the user's answer. When no such specialist is visible, ask the one167confirming question yourself, name the availability source you checked, and168stop; the gate is not a phase, so it never reports `matched-but-unavailable`.169In both cases record the user's answer as a `confirmation` event with170`source: user-turn` and `status: current` after the answer, then classify the171instruction. A completed gate is not proceed evidence for anything else: it172settles the reading of the instruction, and every row's own approval, consent,173and stop boundaries still apply.174175## Workflow Phases176177Classify the immediate instruction into exactly one row. Choose the immediate178next required phase, not the eventual end goal. Router-owned rows179(`workflow-control`, `direct-implementation`, `maintenance`) are performed by180this skill as ordinary behavior under the shared effect and commit boundaries181below; every other row is routed to the visible specialist whose metadata182matches it. Read `references/route-selection.md` when the cells do not settle183the classification. Row ids such as `requirements-specification` are the184`phase` values the session record stores, not route names: when reporting a185matched specialist route, name the specialist by the name its visible metadata186states, with the row id at most alongside it; for a router-owned route, report187the row with its ownership status and invent no specialist name; for an188unavailable route, report the row as `matched-but-unavailable` together with189the specialist name the prompt, user-provided material, or visible metadata190identifies as absent, and invent none when nothing identifies one. Write every191route report under the language gate in User-Facing Output: when a task192enumerates represented turns or scenarios under an English wrapper, each turn's193language comes from that turn's own request text, and neither the wrapper's194language nor the number of scenarios changes it.195196| Row | Trigger | Exclusions | Owner | Required artifact | Next boundary |197| --- | --- | --- | --- | --- | --- |198| `workflow-control` | Lifecycle commands: `cancel workflow`, `replace workflow`, an unrelated top-level skill or mode invocation, or a specialist reaching its finish gate with no further related instruction; a stale-context clarification before routing; an `unrelated ordinary request`; the terminal `no matching specialist` fallback. | A bare activation with no coding instruction — the activation contract asks for it before any classification; any instruction another row accepts. | This skill (router-owned): clears or suspends routing state, asks the one clarifying question, or continues with ordinary behavior; exempt from the availability gate and never `matched-but-unavailable`. | None; an active workflow's session record — tombstoned on cancel or replace, otherwise untouched by an unrelated request. | The user's next related instruction; on cancel or replace, live routing state is cleared before anything else is classified; `no matching specialist` continues as ordinary behavior with no routing state created or retained for it. |199| `requirements-specification` | A new vague, rough, contradictory, creative, non-technical, or underspecified coding goal; revising, finishing, or approving the current requirements spec; durably capturing a confirmed creative direction; backtracking when the bound requirements artifact, user-visible behavior, scope, or source acceptance criteria are wrong. | An input concrete enough to plan or execute; an ideas-only request with no saved-requirements ask (`creative-direction-exploration`); a defect only in the bound plan's contract (`implementation-planning`); "looks good", "ready", "continue", "go ahead", or a completed checklist is not approval unless it clearly approves the current spec. | The visible requirements-specification specialist (artifact-only). | The requirements spec, bound by path once it exists; none before a chat-only or no-file run's first write. | Stops after the spec update and its summary and never creates the plan in the same response; the next related instruction routes to `implementation-planning` only on explicit current-spec approval evidence; a same-instruction continuation to planning starts only after recordable current-spec approval or handoff evidence and no completion-audit blocker. |200| `creative-direction-exploration` | Explicit brainstorming, idea generation, alternatives, interaction concepts, or implicit expected-behavior and convention checks before scope hardens, with no saved-requirements ask. | A request to save requirements (`requirements-specification`); a reported defect; an edit, plan, or commit request; a concrete bound plan. | The visible creative-exploration specialist (read-only, chat-first). | None; the deliverable is chat. | A confirmed direction or a trusted proxy selection is input to later requirements or planning work — recorded as AI-selected direction when it came from a proxy — never implementation authorization; a request to capture it durably routes the next instruction to `requirements-specification`. |201| `code-investigation` | Read-only questions about existing code or behavior — how it works, where it lives, data flow, dependencies, what a change would affect — with no defect report and no edit, plan, or commit request. | A reported symptom or repair request, which outranks investigation (`debug-and-repair`); any edit, plan, spec, or commit request; a bound plan to execute. | The visible code-investigation specialist (read-only). | None; findings are chat evidence; a saved artifact exists only on the user's explicit ask. | Findings are evidence for later phases and authorize no edit, fix, plan, or commit; the next instruction is classified afresh and no commit state is created. |202| `implementation-planning` | An approval-evidenced or legacy `Approved` spec plus a next related instruction; a supplied spec, acceptance criteria, task list, or multi-surface request needing a plan; create/revise a plan; backtracking the bound plan's acceptance-criteria, proof, schema, test, edit-order, or risk contract. | Concrete bound plan with a ready proceed condition and an execution request (`plan-execution`); item-by-item walkthrough (`plan-pre-check-walkthrough`); git-backed plan diff (`review`); vague goal without approval evidence (`requirements-specification`); single-surface edit needing no plan (`direct-implementation`); "looks good, go ahead" after planning is neither revision nor execution — ask which. | The visible implementation-planning specialist (artifact-only). | The plan artifact it creates or revises, plus the approved spec or concrete inputs bound. | Stops after the plan artifact and its summary; no same-turn implementation and no plan-artifact commit; a ready proceed condition together with an explicit execution request starts a separate `plan-execution` route, and a same-instruction continuation starts only after a concrete reviewed plan with a ready proceed condition or recorded accepted risk. |203| `plan-execution` | A clear request to execute, implement, apply, or continue a known plan or slice, with a concrete bound plan whose proceed condition is ready or accepted-risk condition is satisfied for that slice; continuation rebinding the slice from the implementation-progress ledger. | Inputs not concrete enough (`implementation-planning`); bare "continue", "go ahead", "ready", "looks good" not clearly asking to execute the known plan; a reported plan-contract defect (backtracking); a new runtime symptom (`debug-and-repair`); a walkthrough (`plan-pre-check-walkthrough`); adjacent work the plan and mandatory repository coupling do not require. | The visible plan-execution specialist (state-changing). | The bound implementation plan, and its implementation-progress ledger when present — plan-execution state, not routing state, whose recorded completions the execution specialist verifies before a rebinding relies on them. | The bound plan's scope, acceptance criteria, documentation/changelog coupling, release policy, verification path, and review; each verified, reviewed slice closes with a checkpoint through `commit-execution` under the commit-selection gate — from a plan `Commit checkpoints` item or the specialist's default — never a commit inside execution; a blocked proceed condition, plan defect, or stop signal ends the route. |204| `debug-and-repair` | Bug reports, regressions, failed prior fixes, repeated "still broken" feedback, rough repair requests, tool or automation failures, environment-specific failures, and runtime artifact mismatches; a review fix that regressed a core user journey. | Continuing execution against a bound plan whose contract itself is reported wrong (backtracking to the artifact-owning row); a read-only question with no symptom (`code-investigation`); a request for a spec or plan artifact; a dependency, build, or test edit with no reported defect (`maintenance`). | The visible debug-and-repair specialist (state-changing). | None; the bug report or reproduction is the input; a named plan file is context, not execution authority. | A proven repair closes with a checkpoint of the repair-owned changes through `commit-execution` under the commit-selection gate, without a startup commit question; a diagnosis with no fix commits nothing. |205| `review` | A git-backed diff, working tree, branch, base ref, or git-backed plan or document change to review; a review/fix loop with scope triage, Definition-of-Done alignment, findings, or gated fixes; continuing a review while excluding a finding, path, package, or subsystem. | Item-by-item walkthrough of a saved plan (`plan-pre-check-walkthrough`); a new runtime symptom or a fix regressing a core user journey (`debug-and-repair`); a repeated finding class past the threshold, a fix needing material architecture expansion, or a repair depth the bound spec or plan cannot decide (artifact-owning row). | The visible review specialist (state-changing). | The frozen git-backed review target; routing state carries the target, primary journey, acceptance sentinels, cycle count, active stop signals, last verified checkpoint, and unverified shared edits. | A completed fix loop closes its own verified fixes through `commit-execution` under the commit-selection gate; a review that applies no fix commits nothing and never commits the changes under review; an excluded surface stays non-editable and outside selectable fixes; an active stop signal routes out to the owning row. |206| `plan-pre-check-walkthrough` | A request to interactively walk through, pre-check, confirm, or review a saved implementation plan artifact item by item before execution starts, where the target is the saved plan itself. | A git-backed diff, branch, or base-ref target (`review`); revising plan content from new requirements or evidence (`implementation-planning`); executing the plan (`plan-execution`). | The visible plan pre-check specialist (artifact-only; reflects decisions into the plan only with explicit consent). | The saved implementation plan artifact. | Stops before implementation; item decisions and reflection consent stay with the user; completion is neither proceed evidence nor execution authorization; reflected changes stay uncommitted unless the user explicitly selects a commit. Unattended or delegated operation matches this row but is not delegable: report the interactive requirement and stop rather than emulating item decisions. |207| `commit-execution` | A request to stage, commit, split, amend, or repair repository history for the current changes; a checkpoint selected by a bound plan item, by a state-changing specialist closing a verified unit, or by a router-owned row closing its verified edit. | Message wording alone, with no history action (`writing`); a skill offering only a commit command capability without the workflow's boundary contract is auxiliary, never primary; push, release preparation, version changes, tags, and rewrites of shared history are never implied by a commit request. | The visible commit-execution specialist (state-changing); when none is visible, `matched-but-unavailable` with the fallback in `references/route-selection.md`. | The verified change set with its scope, evidence, unrelated-path exclusions, and any proposed message; before a plain commit, a recorded `commit-selection` event naming its `source`. | The commit workflow's file-set, staging-safety, exact-diff, message-transport, and post-commit verification gates; the history-mutation gate for amend, rebase, reset, push, and scripted replays under their own consent. |208| `writing` | Wording, message content, localization, or text-format deliverables — comments, docstrings, docs, changelog, PR descriptions, UI copy, progress updates, summaries, commit-message text — with no review target, Definition-of-Done triage, or fix loop. | A direct lexical, grammar, or naming judgment about a short label or identifier, when the user wants only an immediate answer and excludes editing, review, planning, debugging, and written deliverables — ordinary behavior or `no matching specialist`, no routing state; a review target (`review`); a history action (`commit-execution`); wording inside another active phase (auxiliary only). | The visible writing specialist (artifact-only). | The text artifact the request names; none for a chat-only reply or a message draft. | Verified text edits remain uncommitted unless the user explicitly selects a commit; a chat-only reply or commit-message draft never selects history work. |209| `direct-implementation` | A concrete edit with a stated or obvious surface, acceptance, and verification — one behavior, default, option, or component the user names — with no saved plan and no defect report. | Multi-surface work; bug reports and regressions (`debug-and-repair`); an approved or bound plan (`plan-execution`); vague or underspecified goals (`requirements-specification`); a request for a plan (`implementation-planning`); dependency, build, test-only, or release work with no behavior change (`maintenance`). | This skill (router-owned): ordinary implementation under the effect and commit boundaries below; exempt from the availability gate and never `matched-but-unavailable`. | None; the session record carries the goal, surface, and acceptance; no plan or spec is created. | The commit-selection gate — the verified edit closes with a checkpoint under the state-changing commit contract, routed through `commit-execution` when a specialist is visible; push, release, and version changes stay consent-bound. |210| `maintenance` | Dependency updates, build repairs without a reported defect, test-only edits, release preparation on the user's explicit request, and repository chores such as configuration, tooling, or housekeeping edits. | A reported defect or regression (`debug-and-repair`); a bound plan (`plan-execution`); a behavior change the user names as the deliverable (`direct-implementation`); release, version, tag, or push work the user did not explicitly request. | This skill (router-owned): ordinary maintenance under the effect and commit boundaries below; exempt from the availability gate and never `matched-but-unavailable`. | None; the session record carries the goal and the touched surfaces. | The commit-selection gate — a verified maintenance unit closes with a checkpoint under the state-changing commit contract; release, version, tag, and push stay separately consent-bound even when the request is release preparation. |211212The precedence below classifies an instruction that could match more than one213row; the goal-alignment gate precedes every item. Each original precedence item214maps to a row:2152161. Lifecycle commands and unrelated top-level invocations → `workflow-control`.2172. Stale-context clarification before routing → `workflow-control`.2183. Active artifact continuation or revision → the row that owns the active219 artifact (`requirements-specification`, `implementation-planning`,220 `plan-execution`, `plan-pre-check-walkthrough`, `review`, or `writing`).2214. Review targets and review/fix loops → `review`.2225. Bug reports, regressions, failed fixes, tool failures, runtime artifact223 mismatches, and existing-feature repair → `debug-and-repair`.2246. Interactive pre-execution walkthroughs of a saved implementation plan →225 `plan-pre-check-walkthrough`.2267. Commit, staging, and history-repair execution requests → `commit-execution`.2278. Wording-only deliverables with no review target or Definition-of-Done228 triage → `writing`.2299. Clear execution requests for concrete implementation plans →230 `plan-execution`.23110. Read-only code-investigation questions with no defect report or edit232 request → `code-investigation`.23311. Idea-generation, direction-exploration, or convention-check requests that234 do not ask for a saved requirements artifact →235 `creative-direction-exploration`.23612. Implementation planning for approval-evidenced specs or inputs that need a237 plan before execution → `implementation-planning`.23813. Requirements specification for new vague, rough, contradictory, creative,239 non-technical, or underspecified coding goals →240 `requirements-specification`.24114. `no matching specialist` fallback → `workflow-control`.242243The router-owned rows `direct-implementation` and then `maintenance` are244classified between items 12 and 13, and always before item 14: a concrete edit245or a maintenance unit is not the terminal fallback and never reports246`matched-but-unavailable`.247248## Before any plain commit249250<!-- shared-contract:class language=none commit=state-changing effect=state-changing -->251<!-- shared-contract:begin closing source=shared/vibe-contract.md -->252For every consolidation block this package carries, here and in its references: where this package declares a stricter or narrower rule in its own text, that declaration controls.253For every gate and schema block this package carries, here and in its references: this package may state which of its phases the block applies to; it may not change the block's inputs, outcomes, or fields.254<!-- shared-contract:end closing -->255<!-- shared-contract:begin commit-selection-gate source=shared/vibe-contract.md -->256**Never run a plain `git commit` without naming the selection source it rests on.**257258- With no user-installed hook enforcing this gate, this wording is the whole gate: apply it yourself before the command runs.259- Name one recorded source before committing: the current user's request (`user-turn`), the bound plan item (`bound-plan-item`), or the workflow's own checkpoint of a verified unit (`specialist-checkpoint`).260- Treat `agent-proposed` as a recorded proposal, never a selection.261- When the workflow is router-bound, have the router record that source as a `commit-selection` event before the command runs.262- For a standalone commit with no router active, name the direct current-user request or the verified checkpoint handoff and follow the phase's ordinary confirmation policy.263- When no source can be named, do not commit; ask the user whether a commit is wanted.264- Return `allow` when the command is not a commit.265- Return `ask` on every plain commit, quoting from the session record under `.plans/vibe-sessions/` the recorded `phase` and the most recent recorded `commit-selection` event's `source`, `at`, and `note`.266- Or state that no `commit-selection` event is recorded, or that the record is absent, malformed, stale, foreign, session-unbound, or conflicting.267- Never return `deny` from this gate.268- Never allow a plain commit silently: surface the recorded `source` at the prompt so a self-attested selection is caught there.269- Answer `ask`, never `deny`, for a record in any invalid state.270271Exception: an amend or other history rewrite belongs to the history-mutation gate, not this one.272<!-- shared-contract:end commit-selection-gate -->273274This gate applies to every plain commit under a `vibe-coding` workflow, in any275row. The router records the `commit-selection` event named under Session Record276before the command runs, whether the commit is executed by the visible277commit-execution specialist or, when none is visible, under the fallback in278`references/route-selection.md`.279280## Before a history rewrite281282<!-- shared-contract:begin history-mutation-gate source=shared/vibe-contract.md -->283**Never rewrite git history without stopping and asking the user first.**284285- With no user-installed hook enforcing this gate, this wording is the whole gate.286- Before running a matched command, stop and ask the user with that reason, and proceed only on the user's answer.287- Match `git commit --amend`, `git rebase`, `git filter-branch` or another `filter-*` rewrite, `git reset --hard`, `git push`, or a scripted or looped replay that rewrites more than one commit.288- Return `allow` when the command is not a history mutation.289- Return `ask` for every matched history mutation, naming the matched operation.290- Quote from the session record under `.plans/vibe-sessions/` the recorded `phase`, `effect_mode`, and the `kind` and `source` of every recorded event bearing on it.291- Or state that the record is absent, malformed, stale, foreign, session-unbound, or conflicting, or that no such event is recorded.292- Never return `deny` from this gate.293- Never allow a matched history mutation silently, whatever the record says: surface the recorded values at the prompt so a self-attested record is caught there rather than trusted.294- Treat history that has left this machine — pushed, fetched by another clone, or otherwise published — as shared; no recorded value makes rewriting it silent.295- Let the record decide only the wording of the reason, never the outcome.296- Answer `ask`, never `deny`, for an absent, malformed, stale, foreign, session-unbound, conflicting, or identity-mismatched record.297298Exception: a plain `git commit` belongs to the commit-selection gate, not this one, and a read-only git command is not a history mutation.299<!-- shared-contract:end history-mutation-gate -->300301This gate applies to every shell action under a `vibe-coding` workflow, in any302row, the router-owned rows included. The router renews the record's lease303immediately before a matched command and, when no hook enforces the gate, asks304with the wording above before running it.305306## Before a write in a read-only or artifact-only phase307308<!-- shared-contract:begin read-only-phase-write-gate source=shared/vibe-contract.md -->309**Never write a path your phase's effect class and recorded `allowed_paths` do not permit.**310311- With no user-installed hook enforcing this gate, this wording is the whole gate.312- Count as a write any file-edit or file-write tool call, and any shell command that writes a path — redirection, `sed -i`, `tee`, a heredoc, `mv`, `cp`, `rm`, `git checkout --`.313- In a read-only phase, write only an explicitly requested saved artifact whose canonical path is recorded in `allowed_paths`; otherwise write no file.314- In an artifact-only phase, write only the artifact it owns, the supporting paths its own text declares, and the scratch root recorded for the unit.315- Refuse a write outside that boundary in the phase itself and report it as a boundary stop.316- Report a denied write verbatim as a boundary stop; never retry it through another tool.317- Return `deny` only for a fresh, valid, session-bound `read-only` or `artifact-only` record whose canonical target lies outside every `allowed_paths` entry and recorded directory.318- Name the target path in that reason and quote the recorded `phase`, `effect_mode`, and `allowed_paths`.319- Return `allow` in every other case: a target inside `allowed_paths`, an `effect_mode` of `state-changing` or `none`, or a record absent, malformed, stale, foreign, session-unbound, conflicting, or identity-mismatched.320- Never return `ask` from this gate.321- Never let an invalid record state produce `deny`, so the refusal never rests on unverified host behavior.322323Example: in an artifact-only phase whose `allowed_paths` holds only the artifact it owns, a write to that artifact is inside the boundary; a write to a source file is outside it, and with a fresh, valid, session-bound record the gate returns `deny`.324325Exception: writing the router's own record — `.plans/vibe-sessions/<record_id>.json` or its rename temp file — is `allow` at any `effect_mode`, not a phase write; judge every other path there like any other path, and `allowed_paths` does not widen.326<!-- shared-contract:end read-only-phase-write-gate -->327328This gate applies while the recorded row is `creative-direction-exploration`,329`code-investigation`, `requirements-specification`, `implementation-planning`,330`plan-pre-check-walkthrough`, or `writing`; the state-changing rows and331`workflow-control` are outside it.332333## Commit selection334335<!-- shared-contract:begin commit-selection-state-changing source=shared/vibe-contract.md -->336**Only an explicit user request, a bound plan item, or a workflow's own verified checkpoint selects a commit.**337338- Select a commit from exactly three sources: an explicit current-user request; a bound approved plan item requiring that checkpoint; or a state-changing workflow closing its own verified, reviewed, in-scope unit under its checkpoint default.339- Never let routing or invocation, edit permission, a convenient stopping point, tracked changes in the working tree, or an available commit-execution workflow select a commit.340- Never treat an unverified unit as a handoff.341- Execute in commit-execution only the commits those sources select; that phase has no checkpoint default of its own.342- Close a self-contained unit of the workflow's own work with a local commit of exactly that unit once it is implemented, verified, reviewed, and its material findings dispositioned.343- Commit that unit without waiting for a separate commit instruction.344- Never let a multi-unit run accumulate as one undifferentiated working tree.345- When the default is suspended, leave the verified changes in the working tree and report the reason.346- Let the checkpoint default reach only local commits of the unit's own verified changes.347- Select no commit from discovery-only, blocked, unchanged, failing, unverified, or work-in-progress state.348- Never widen the staged set beyond the verified unit.349- Exclude pre-existing working-tree changes the workflow did not make, an artifact whose tracked status would itself be new, and paths outside the unit.350- Never treat an available commit-execution workflow or ambient tracked status as a reason to include them.351- When the unit's changes cannot be separated from unrelated working-tree state, report the mixed state and ask instead of committing.352- Route every selected commit through the commit-execution workflow with the verified scope, its test and review evidence, its unrelated-path exclusions, and any proposed message.353- Leave staging, file-set and exact-diff review, message transport, history safety, and post-commit verification to that workflow.354- Never read a request to commit as a request to push.355- Keep push, release preparation, version changes, tags, amend, rebase, reset, stash, squash, destructive actions including cleanup, force-adds, tracking a newly created artifact, external side effects, and unrelated or ambiguous paths separately consent-bound even when a checkpoint was selected.356- Never let a route, checkpoint, or handoff implicitly authorize them.357358Example: "the user asked for a commit this turn" names a source; "this is a good stopping point" does not.359360Exception: a current no-commit instruction, a bound plan that forbids commits, or project policy against commits suspends the checkpoint default.361<!-- shared-contract:end commit-selection-state-changing -->362363For a router-owned row this skill is the state-changing workflow the contract364names: its verified edit closes under the checkpoint default, recorded with365`specialist-checkpoint` as the selection source. For a routed row the checkpoint366belongs to the specialist; the router records the selection and routes the367history action. When a unit's changes cannot be separated from unrelated368working-tree state, the router records no new `commit-selection` event for that369blocked checkpoint, reports the mixed state, and asks instead of committing.370371## What this phase may write372373<!-- shared-contract:begin effect-write-boundaries source=shared/vibe-contract.md -->374**Write nothing beyond what the phase's own effect class and its declared boundary permit.**375376- Declare exactly one effect class for every workflow phase, in that phase's own text.377- In a read-only phase, read and report; make chat the deliverable — findings, alignment, or direction.378- In a read-only phase, edit no source, test, config, doc, or other file, and run no command that mutates runtime or repository state.379- In a read-only phase, never stage, commit, tag, push, change versions, delete data, or start services.380- In a read-only phase, write a file only when the current user explicitly asks for a saved artifact.381- In an artifact-only phase, create or update the artifact it owns: the requirements spec, the plan, the plan-review state, the instruction files, or the text artifacts the request names.382- In an artifact-only phase, write the supporting paths its own text declares:383 - the text it was asked to revise (comments, docstrings, docs);384 - a confirmed reflection into the bound plan;385 - an ignore file it previewed and the user confirmed;386 - a narrowly confirmed configuration edit its text names;387 - a decision record or findings report its own text declares.388- In an artifact-only phase, leave those verified changes in the working tree.389- In an artifact-only phase, never implement executable behavior, never edit application code or tests as implementation, never produce an artifact another phase owns, and never perform release work.390- Never let an artifact-only phase's artifact authorize same-turn implementation.391- In a state-changing phase, edit files and run commands inside the scope its own text declares — the unit it implements, the repair it proves, the fixes it applies, the round it integrates, or the commit it executes.392- In a state-changing phase, keep its edits to the smallest verified unit of that scope.393- In a state-changing phase, leave paths outside the scope, pre-existing working-tree changes the phase did not make, and runtime or external state beyond the scope unwritten unless the current user selects them.394- Keep every irreversible or outward-facing operation under its own consent.395<!-- shared-contract:end effect-write-boundaries -->396397Each row's class is stated in its owner cell: the router-owned rows398`direct-implementation` and `maintenance` are state-changing, and399`workflow-control` writes nothing. The router records the active row's class as400`effect_mode` and its declared write boundary as `allowed_paths`. The401router-owned state-changing rows also write `docs/decisions/` and402`docs/reports/findings/` under `Durable Records`; `workflow-control` writes403neither.404405## Durable Records406407Before recording a settled decision, deferring a finding, closing a unit, or408starting this phase, read `references/durable-records.md`. The router-owned rows409`direct-implementation` and `maintenance` write `docs/decisions/` and410`docs/reports/findings/`, or the repository's existing record directory, as411declared supporting paths; `workflow-control` writes neither.412413## Before a human-risk decision414415<!-- s416417…(truncated)