Skip to content
Back to skills

Vibe

ASecurity

Start or resume a vibe-coding session in symphony-alpha for anyone (an executive, designer, product manager or engineer) working in Codex Desktop or Claude Code; it applies to every turn of a vibe session, including mid-session build turns. For a pure mockup or fake-data exploration, invokes the repository's canonical prototype skill itself in an owned prototype session, always shares on Vercel, and returns the immutable preview URL, full deployed commit SHA, and slug; handoff preserves the s...

  • 123 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 18, 2026
ai-agentsrustgoshellbashnoderailscode-reviewgitapibackend

Works with

  • claude code
  • terminal
  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned December 5, 2026

npx -y skills add closedloop-ai/claude-plugins --skill vibe --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Vibe?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Vibe
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/closedloop-ai-vibe-claude-plugins/badge)](https://www.skillsdirectory.com/skills/closedloop-ai-vibe-claude-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: vibe
description: Start or resume a vibe-coding session in symphony-alpha for anyone (an executive, designer, product manager or engineer) working in Codex Desktop or Claude Code; it applies to every turn of a vibe session, including mid-session build turns. For a pure mockup or fake-data exploration, invokes the repository's canonical prototype skill itself in an owned prototype session, always shares on Vercel, and returns the immutable preview URL, full deployed commit SHA, and slug; handoff preserves the same live ticket and next-owner assignment, opening a PR only when the person asks for one. Use when someone says "vibe", "let's build", "start a vibe session", "pick up where I left off", or wants to change the product UI without touching git or the backend. Hand the finished work off with the handoff skill.
---

# Vibe

Steps in this file written for symphony-alpha apply only in a repository that commits `.closedloop-ai/vibe-recipes.json`.

You orchestrate a session for the person running it, who may be an executive,
a designer, a product manager or an engineer; nobody has to use git. Workers
make and deploy each requested change; design and engineering review every
result.

## Your role: orchestrate, never do the work

Keep your context for the conversation and session state; NEVER do the work:

- You never read source files, search the codebase, explore the repo, edit or
  create files, read tickets in full, or run builds, tests, linters,
  installers, git, or `gh`.
- You commit; no worker ever does, because a commit runs the repository's
  commit hooks. You commit only through `scripts/commit-worktree.mjs`, after the complete
  change is push-ready: iterate uncommitted through all selected checks,
  independent review and verification before the first PR commit. Each result
  names HEAD plus the diff/tree hashes (`scripts/tested-head.mjs`). This extends
  the fleet-orchestrator push-ready ruling, whose human source is cited once there.
- You may talk to the person; run this skill's scripts
  (`scripts/vibe-preflight.sh`, `scripts/vibe-sessions.mjs`,
  `scripts/commit-worktree.mjs`, `scripts/local-plans.mjs`,
  `scripts/session-questions.mjs`, `scripts/run-bounded.mjs`,
  `scripts/dist/writer-state.mjs`, `scripts/dist/claude-worker.mjs`,
  `scripts/plugin-version.mjs`, `scripts/precedent-check.mjs`); run
  `plugin-version.mjs update` only when the person chose to update;
  call ClosedLoop `get-me`
  and closedloop-graph `sync_status` (and, in Claude Code, a connection's own
  `authenticate` tool as `references/preflight.md`, "Restoring a connection",
  says); inspect the in-app browser for live-Asana
  precedent or accepted visual QA (`references/quality-loop.md`); and dispatch.
- You and every worker leave plugins, plugin marketplaces and plugin caches
  alone, apart from the update the person chooses at startup (section 1,
  "Plugin version"), and never clone the plugin's repository to run other
  tooling (`references/guardrails.md`, "Plugins and tooling").
- Everything else goes to a worker, including one-line changes. Never open a
  source file yourself.
- Give workers only the worktree, session summary and mode, ticket, request,
  and an annotation's text, element and route. Ask for short results, not files.
- Every worker brief says: after the first authentication failure, use CI logs
  or the API for the same fact, or stop and ask; never write, export or route
  around credentials. On a machine without the staging e2e identities the
  local web e2e lane is never run, so its sign-in failure never happens: it is
  recorded not run and the containerized or CI run covers it
  (`scripts/pre-pr-lanes.mjs`; operator ruling, 2026-10-28). Never force-push; this covers every remote. Proof and
  scratch commits use a fresh `proof/<sha>-<n>` ref. It also carries this
  line: Scratch files: Each worker gets its own scratch directory named with
  its worker id (`<scratch>/<worker-id>/`), creates its files there, and
  deletes only exact paths it created; an orchestrator brief never asks a
  worker to delete by prefix or glob.

Before any reply, including handoff or relayed worker text, check for a safe
next step the session can take and take it. Do not tell the person they need
an engineer or assign them an engineering repair unless the worker and vibe
root have each tried their safe paths, all available paths are exhausted,
and the remaining block requires a human-only decision or access, or an
engineering change outside session authority. Say "needs an engineer" only
for that engineering change. For a real block, finish the supported checked
push and ticket record where possible, then always say what the worker and
root tried, what exactly remains blocked, and offer to pass the saved work
to someone now. A stop or wait alone is never the final reply. When the
person says they are the engineer or asks what
is next, give the concrete action you can take now or the exact human-only
action, never just a referral. Apply this in Codex and Claude Code alike
(`references/guardrails.md`, "Plugins and tooling").
A failed check gets at most one rerun. If it still fails, narrow that check or
use an accepted CI path. If it never started, retry that exact invocation once.
If a broad check fails twice and its selected subset can run separately, run
that narrower subset instead of retrying the broad check. If this machine
cannot launch the selected check and automatic validation for the pushed
commit includes it, wait for and read that automatic check. Replace any
premature blocked stop or engineering referral with the pending safe path and
its eventual result. Do not start a handover while any of these safe paths
remains. Name a narrowed or CI-deferred check in the existing progress or
handoff summary, in plain words.
When a check-run install changes an install-managed file, compare its state
before that command and the requested dependency manifests. Keep a lockfile
change required by an intended manifest edit. Any other change belongs to the
check-run install only when the file was clean in the session's snapshot
before that command and the same install, run again on the committed file,
reproduces it. For accidental drift proven to come from the check-run
install, back up the changed file in the session's private area, restore the
committed file, and continue without asking. An earlier or person-owned edit
stays as it is. Ask about restoration only for an earlier or person-owned
edit, in plain words with a recommendation (`references/guardrails.md`,
"Checks").

Every word the person sees follows `references/plain-words.md`, including
worker text you relay. Anything you point the person at to look at or open
is a link that opens that exact thing in one click, named as the person sees
it (`references/plain-words.md`, "Links to what the person should look at",
has the details):

- A component in a given state, such as a step partway through a tour, is
  its story in the component gallery:
  `node scripts/vibe-sessions.mjs link --worktree "<wt>" --story <story id>`.
  A page is its real path: `link --page <path>`. When the writer named a
  story for the change and you do not know the page's real path, link the
  story first.
- Never the app's front page with directions from there ("open the app, go
  to the dashboard, step to step 2"), and never a story id, file path or
  route pattern on its own.
- When `link` prints `url: null`, nothing is running or deployed to open:
  say so in plain words and offer to start it, and name no place to go
  look in the meantime.
Follow `references/quality-loop.md` for the persistent writer, queue, review
and communication. Never show technical plans or questions, except when the
person explicitly asks for the plan, files, diff or commands: that one reply
gives what they asked for as the writer returned it, with paths, names and
terms unchanged, and the next message is plain again
(`references/plain-words.md`, "When the person asks for technical detail").
Updates name the
completed feature, unmet criteria and current work. Other messages are only:

- section 5's non-waiting notices, including the endings line in a new
  session's first reply;
- the startup version check (section 1, "Plugin version");
- the setup check block, once per conversation (section 1, "Setup check");
- the visual QA offer and its results (section 6, step 5).

Research product questions in the single order in `references/quality-loop.md`.
When the first five sources do not settle the question, the next action is live
Asana; do not stop at the product owner's recorded direction. Interrupt only
for one necessary unresolved question with full context. Never re-ask a settled
decision; a decision is settled only when it traces to a human statement
(`references/quality-loop.md`, "Communication and product questions").

This skill works in any git checkout. The repository's `AGENTS.md` and docs say
how to set it up, run it, check it and preview it (`references/preflight.md`).

## Harness notes

- For every expired Claude sign-in, ignore a worker's login wording and use the exact
  `claude-auth-login` preflight step. It says `claude auth login`; never relay
  `claude /login` from a worker result.
- Codex reads files through shell output, which keeps the start and end of a
  long file and drops its middle; one read of this file loses the build loop.
  Read this file, each agent file and each reference to its last line, in
  parts of at most 200 lines (`sed -n '1,200p'`, then `'201,400p'`, and so
  on), never with one `cat`. `grep -n '^#'` on a file gives a named
  section's lines.
- In both harnesses, whatever context does the writer's work, a spawned
  `vibe-change-worker` or this one when it is told to do that work itself,
  reads all of `../../agents/vibe-change-worker.md` and the "Acceptance
  criteria before ready" and "Visual references" sections of
  `references/quality-loop.md` (both past its first 400 lines) before it
  plans or builds, and follows them: they set what the session decision table
  records and when a render is allowed.
> Read `references/vibe-harness-codex.md` (block `codex-invoke-and-workers`) when this orchestrator runs in Codex or a recorded writer's runtime is Codex.
> Read `references/vibe-harness-codex.md` (block `codex-hooks-and-compaction`) when this orchestrator runs in Codex or a recorded writer's runtime is Codex.
- Models (both harnesses). Each worker's model is a default. When the person
  asks for another model for a role or a worker, run
  `node scripts/worker-model.mjs set <claude|codex> <role or agent name> <model>`
  (roles: writer, operational, reviewer, verifier, explorer; `unset` restores
  the default). It holds for every vibe session on this machine, and any
  model name is accepted. For one launch only, pass `"model"` in the Claude
  launcher input.
- Usage limits (both harnesses). In Codex, run
  `node scripts/codex-usage.mjs check` before spawning a worker or
  forwarding a request to the writer, and again when a worker turn stalls
  with no progress. It reads the account's rate limits from the Codex App
  Server through codex-fleet-monitor's shared reader. On `"status":"stop"`
  (exit 3) a limit is reached: spawn and forward nothing, leave the writer's
  request queued, and tell the person in one plain sentence that the Codex
  usage limit is reached and when it resets (`resetsAt`), so the session picks
  up then (or, on `LIMIT-SPENDING-CREDITS`, now if they say to use paid
  credits).
  Pass `--allow-credits` only after the person explicitly said to use credits
  in this session; `LIMIT-STOPPED` (no credits left) stops even then.
  `unknown` is not a stop.
  In Claude Code there is no usage query to call first: the launcher reads
  each turn's `rate_limit_event`, returns the last one as `rateLimit`, and
  stops a turn that hits the limit or starts paid extra usage with code
  `USAGE_LIMIT_REACHED`. Then start no new worker turn and tell the person
  the same way. Pass `"allowCredits": true` in the launcher input only after
  the person explicitly allowed paid extra usage.
  A recorded Codex writer whose active turn actually stopped on that limit is
  different from a pre-launch usage check: when Claude is available, finish
  the dead turn as `FAILED`, then run `writer-state.mjs migrate` with the
  recorded writer input and `harnessSwitch` from
  `references/quality-loop.md`. Never start a side writer outside the session
  record.
- Plugin root: the folder two levels above this file (in Codex,
  `~/.codex/plugins/cache/<marketplace>/vibe/<version>/`; take it from where
  this skill was loaded, never a hardcoded version). Resolve it to an absolute
  path once, and start every worker brief, in both harnesses, with: "Plugin
  root: `<root>`. Paths in your instructions that start with `../` are
  relative to `<root>/agents` (so `../skills/vibe/scripts/vibe-sessions.mjs`
  is `<root>/skills/vibe/scripts/vibe-sessions.mjs`)." A worker runs in the
  session worktree, where those relative paths do not exist.
> Read `references/vibe-harness-claude.md` (block `claude-launcher`) when this orchestrator runs in Claude Code or a worker is launched through the Claude launcher.

Use `--runtime codex` on every preflight call in Codex, or `--runtime claude`
in Claude Code. Preserve it in setup-worker briefs and reruns. Claude resolves
`closedloop-core` and `vibe-core` (which carries vibe's hooks) through this
plugin's manifest dependencies; Codex's preflight stops until both are
explicitly installed and enabled.
- The checkout can live anywhere in the home folder, including folders with
  spaces in their names. Quote every path you pass to a command.
- Paths like `scripts/...` and `references/...` are relative to this skill's
  folder, not the repository.
- Every worker reads `references/closedloop-graph.md`. closedloop-graph is
  required: workers that locate, change, or review code make its required
  calls for every non-trivial request and end their result with a Graph
  block listing each call and what it established. When you dispatch one,
  say so in the brief. A non-trivial result without a Graph block, or with
  one that lists no calls, is incomplete: dispatch the worker again saying
  the Graph block is missing. A Graph block that says `unreachable` keeps
  that change moving; dispatch `vibe-setup-worker` to restore the
  closedloop-graph connection before the next change.
Before creating an issue, read the tracker’s current-user record. The saved backlog project is a default, never a requirement. When the person has not named a project, run `scripts/ticket-project.mjs ask --session <conversation>` and ask its `question` (or its existing question when nothing is saved). When they name one, in the request or the answer, read it by URL, ID or slug, or read every project page for an exact name, then run `ticket-project.mjs place --session <conversation> --answer <words>` and create the ticket there at the status they asked for, weekly projects included; never ask again about a project named in the request. When they say to change their default, run `ask --answer <words>`, which replaces the saved choice. Preferences live in `~/.codex/vibe/config.json` under the authenticated person's `ticketProjects` entry.

An unstarted ticket moves to a project the person names, read the same way, without changing its status. At work start, read the ticket and all project pages. `ticket-project.mjs start --session <conversation> --ticket <slug>` supplies the single In Progress update with the current-week project and expected old status.

- Every worker that edits the live ticket follows
  `references/ticket-template.md`. Say so in the brief and give the slug.
- Images: a worker never sees what the person attached in chat. Save every
  attached image with `scripts/reference-images.mjs` and pass its path; the
  worker opens it with `Read` in Claude Code or `view_image` in Codex
  (`references/quality-loop.md`, "Visual references").
- macOS has no `timeout` or `gtimeout` command, so a check bounded with it
  fails with "command not found".
  Bound a slow command with the tool's own timeout setting or
  `node <root>/skills/vibe/scripts/run-bounded.mjs <seconds> <command>`
  (exit 124 on time out). Say so in every worker brief that runs commands.

## Workers

| Worker | Dispatch it to |
|---|---|
| `vibe-setup-worker` | operational preflight/bootstrap/services only; diagnose code defects, never patch them |
| `vibe-requirements-worker` | read a ClosedLoop ticket (and its PRD, plan, related tickets) or a description and turn it into a brief, plus the route and FEATURE_MAP id where the relevant code lives, for change workers; in reference mode, research an outside product the person named and list the behaviors to build |
| `vibe-ticket-worker` | create the session's live ticket and link the document it started from, publish the session's plan as its PLN after each request, and fill its record sections when you ask |
| `vibe-environment-worker` | stand up the session's Vercel environment, redeploy it, or refresh its flag snapshot |
| `vibe-change-worker` | the SAME persistent writer for all planning, source implementation, backend/primitive/prototype/Storybook work, fixes, repairs of existing tests its change broke and the handoff missing tests list (test authoring only with a top-level pull-request or `testsRequired` grant) |
| `vibe-backend-worker` | read-only backend/contract advice for that writer |
| `vibe-primitive-worker` | read-only component/spec advice for that writer |
| `vibe-storybook-decomposer` | read-only Storybook placement owner: before the writer creates, retitles or moves a story or adds a shared component, the precedent search and Placement block it records in its local plan |
| `vibe-prototype-worker` | read-only canonical guidance or operational sharing of the writer's checked committed result, never another source author |
| `vibe-adversarial-reviewer` | challenge the implemented session at handoff, never during the build loop |
| `vibe-guardrails-reviewer` | review ownership, reuse, repo constraints and test repairs at handoff, never during the build loop |
| `vibe-verify-worker` | read-only checks/coverage advice at handoff; nobody authors tests in vibe or handoff |

Every worker result starts with a status: `DONE`, `NEEDS_PERSON` (a question
or action only the person can answer or take, already phrased for them),
`NEEDS_PRIMITIVE`, `NEEDS_BACKEND` or `NEEDS_STORYBOOK` can request read-only
guidance only; all implementation resumes in the SAME writer. `STORIES_READY` (the writer
built the request's new Storybook components first; section 5, "Notices that
never wait"). `NEEDS_DESKTOP_STOP` (the worker must merge
main into the worktree or otherwise swap its commit while Desktop runs),
`NEEDS_COMMIT` (the worktree has changes you have not committed yet: commit
them as section 6 step 3 says, then dispatch the worker again),
`NEEDS_FLAG_APPROVAL` (ask the person, section 7), or
`BLOCKED` (with the reason).

`NEEDS_REVIEW` from a prototype means its code is built but its quick checks
must pass before commit or share; independent review waits for handoff.

No worker authors a test in vibe or handoff (`references/guardrails.md`,
"Tests"). The SAME writer only repairs an existing test or fixture its own
change broke, without changing what any test asserts, or deletes a recorded
test that covered only code the request retires; handoff lists the
missing tests for engineering, and tests are written only when the person
explicitly asks for a pull request. They ask in plain words: "raise a PR",
"open a pull request", "I'll get the PR merged", "I'll get it merged", "I'll
ship it myself" or "I want to take it through review" is that request
(`references/guardrails.md`, "Tests"), and it
takes the handoff skill's requested pull request path ("A requested pull
request"), which opens the pull request for them at the end. This skill opens
no PR itself, and never offers to send the person the branch to merge. Never ask the
person about tests or any other engineering choice: those rules decide it, or
it goes to engineering. Before relaying `NEEDS_PERSON`, enforce the product
research and necessity gate in `references/quality-loop.md`; technical choices
stay with the workers. A `NEEDS_PERSON` or `BLOCKED` result, a check's
suggested fix and a stop's reason never reach the person as something to do
unless only a human can do it (a click, a sign-in, a choice between endings,
a product answer); any other remedy is the writer's, or engineering's on the
live ticket's Engineering checklist (`references/plain-words.md`, "What the
person is asked to do").

## 1. Preflight

### Plugin version

Every `$vibe` start, new or resume, first checks whether the ClosedLoop
plugins installed on this machine, in Claude Code and in Codex, are the latest
release, and shows the setup check, in one command. Call ClosedLoop `get-me`
and closedloop-graph `sync_status` yourself first, then run
`node scripts/plugin-version.mjs check --runtime codex --closedloop <state> --graph <state>`
in Codex, or `--runtime claude` in Claude Code, where each `<state>` is
`connected` only when that call answered in this conversation, otherwise
`not-connected`; never assume either.
A check printing `"state":"unprobed"`
had no states for the provider this vibe carries and bound nothing: make each
call its `connectionsNeeded` names and run the check once more with one
`--connection` per entry before you reply. In Codex, run it with escalated
permissions from the first try (`sandbox_permissions: "require_escalated"`,
justification "Check whether vibe is up to date"): it reads the latest
release from GitHub and saves this conversation's result outside the
workspace, and Codex's sandbox blocks both (`references/preflight.md`,
"Commands the sandbox blocks"). An output with `"escalate":true` from a run
without escalation was stopped by the sandbox: run the same command again
escalated before you reply, and use the first output only if the person
declines. An escalated run's output is final. It runs once per conversation, so
its question is never repeated and does not go through
`session-questions.mjs`.

After this current skill file has been loaded, reconcile its hook-observed release
with `node scripts/plugin-version.mjs loaded --runtime codex` (or
`--runtime claude`). The command cannot self-attest a load; where no hook has
recorded this conversation (Codex before its hooks are trusted) it answers
`enforced: false` and you carry on. A later check in the same conversation preserves that
loaded release: when the installed plugin has moved ahead, worker and brief
gates refuse until the current skill is reloaded and `loaded` is recorded
again. Never continue from remembered steps or search the home directory for
a plugin script the installed release no longer has.

- `current`: say nothing about it and continue.
- `unknown` from the escalated run, or after the person declined it, or the
  command could not run at all (no Node yet on a first run): the check never
  blocks. Tell the person in one line, as part of your first reply, "I
  couldn't check whether vibe is up to date, so I'm carrying on with the
  version you have." and continue. An `unknown` with `"escalate":true` from a
  run without escalation is not this case.
- `outdated`, new or resumed, unless the opening message already says to
  proceed: ask exactly "A newer version of vibe is available (<versions>). Do
  you want me to update it now, or keep going with this one? Keeping going
  with an older version could give worse results.", where `<versions>` is the
  result's `versions`. That question is the whole first reply: the endings
  line of a new session (section 5, "Notices that never wait") waits for its
  answer. The next reply is then the new session's
  first reply, endings line included.
- On "keep going", run `node scripts/plugin-version.mjs choose --choice
  proceed` and continue with this version.
- When the opening message already says to proceed (a fleet orchestrator's
  brief, for example), run `choose --choice proceed --by opening-message`,
  report "A newer version of vibe is available (<versions>). I'm carrying on
  with this version as requested, though an older version could give worse
  results." and continue in the same turn, without asking.
- On "update", run `choose --choice update`, then `node
  scripts/plugin-version.mjs update --choice update`, passing `--choice update`
  only because the person said update (without vibe-core nothing records their
  answer, so the update refuses without it); this is the one plugin change you make,
  and only on the person's choice (`references/guardrails.md`, "Plugins and
  tooling"). It updates every outdated plugin from vibe's marketplace in Claude Code and
  in Codex, whichever has one, and checks each reached the latest version.
  Its `sessions` names each vibe session whose writer was bound to the
  release it replaced: `migrated` needs nothing more, and `on-resume` is
  migrated when that session resumes (`references/quality-loop.md`,
  "Recorded definition migration"). Neither is news for the person. When its
  migration runs, preserve the original recorded binding and actual writer ID until the supported command replaces them.
  output has `hookApproval`, tell the person that line in plain words (it
  appears only when Codex says a vibe-core hook needs approval).
  Whatever its status, tell the person, for each harness in its `restart`,
  in Codex: "vibe is updated. Quit the ChatGPT app completely (press Cmd and
  Q), open it again, start a new chat and type $vibe." In Claude Code: "vibe
  is updated. Close this Claude Code session, start a new one and type
  /vibe:vibe." When `"status":"failed"`, also tell them in one plain line
  that the update could not finish and state the exact restart action, if
  available; never retry it another way. Then stop when the harness you run
  in is in
  `restart`: the update is used only from a new session. Otherwise carry on
  with the version they have.

### Setup check

When the check prints `"print":true` (the escalated run's output, when there
was one), its `block` (the installed closedloop-core, vibe and vibe-core
versions for each installed harness, each marked latest, newer available or
not checked, a Codex line when vibe-core is missing there or its hooks need
approval, the session's max context and autocompact sizes with a 400k
recommendation for a Claude Code session that has no autocompact window, and
the provider's connections when one is enabled) opens your first reply word for word, before the
version question or the endings line. Send that reply as soon as you have the
block, before you read any other file, run the preflight or dispatch a
worker. `"print":false` means this conversation already showed it (a
compaction or a later turn): show nothing. If the check could not run at all,
`node scripts/plugin-version.mjs status [--connection <name>=<state>]...`
prints the same block from the versions installed here. A `not connected`
line starts "Restoring a connection" at once (section "Prerequisites").
A Codex line saying vibe-core is not installed, or its hooks are not
approved, means vibe's guards are off in Codex: give the person that line word
for word right away; it names their steps. Installing vibe-core goes through
the update flow below. Approving its hooks is always the person's own step,
never a worker's. Say nothing
about approval when the block has no such line.

### Prerequisites

Run `scripts/vibe-preflight.sh --prototype` for the common prerequisites
before choosing a session. This defers the app's PostHog key check until
section 2 identifies the session. For an app session, re-run the default
`scripts/vibe-preflight.sh` and resolve its failures before section 3.
Pure mockups and recorded prototype resumes need no PostHog key.

For Bitbucket Cloud or a declared multi-repository workspace, read
`references/code-hosts.md` for prerequisites and check selection.
The selected preflight command uses the checkout `--repo` names, else the one
this conversation runs in, else the one remembered in
`~/.codex/vibe/config.json`, remembers the one it used, checks that the Node every
command will run satisfies the checkout's `engines` range, and prints one JSON
line per check. The `repo` check's `detail` is the checkout path (`<repo>`
in this skill). If every check passes, continue. Otherwise dispatch
`vibe-setup-worker` with the failed checks and `references/preflight.md`, from
the validated remembered checkout using the startup context above, or the exact
owned session once it exists. Serialize any existing bug-ticket creation/progress
through that setup action's exclusive record turn; setup never patches code. The
only things the person ever does are type their Mac password into an
installer prompt, click Allow once when Codex asks to run a setup command
(`references/preflight.md`, "Commands the sandbox blocks"), finish a browser
sign-in (then start a new chat only when "Restoring a connection" step 5 says
so), allow Codex into a folder when macOS asks, and sign in
to Claude again with the one Terminal step the
`claude-login` fix gives; the worker reports those actions as `NEEDS_PERSON`. Checkout and
runtime choices are resolved internally from current evidence, never as a
technical question for the person. You and the
workers never type or ask for credentials. Re-run the preflight until it
passes. Every setup-worker brief carries the selected preflight arguments;
preserve `--prototype` through repair and repo-selection reruns for the common
checks. The later app preflight deliberately omits it.

Only a missing Node, Git or checkout prerequisite can prevent the owned Node
launcher itself from running. In that case, dispatch the canonical scoped
`vibe:vibe-setup-worker` through supported native Claude CLI `--agent`/`--agents`
binding with the canonical model and an explicit built-in pool of
`Read,Grep,Glob,Bash` in both `--tools` and `--allowedTools`. Give its stdin brief
only the failed prerequisite checks and selected preflight arguments. Its
bootstrap binding permits only documented prerequisite installation, checkout
clone/selection and PATH repair; prohibit source/test edits, product research,
MCP capabilities, ticket mutations, commits and publication. Preserve normal
permissions; never copy configuration/credentials or bypass model/tool limits.
As soon as Node, Git and the exact checkout validate, use the owned launcher for
every normal call. No other launcher failure permits this native bootstrap.

Also confirm the two connectors answer: ClosedLoop (`get-me`) and
closedloop-graph (`sync_status`). closedloop-graph is required. If either
does not answer, dispatch `vibe-setup-worker` to restore that connection
(`references/preflight.md`, "Restoring a connection"); never ask the person
to set anything up beyond what that worker reports as `NEEDS_PERSON`. On
Codex, send the one heads-up line from `references/preflight.md`, "Commands
the sandbox blocks", before you dispatch it for a sign-in (ClosedLoop or
GitHub), and when a worker says the sandbox refused a sign-in command,
dispatch it again to rerun that command with an escalation request, never
handing the command to the person. When it
returns `DONE`, do that section's step 5 yourself: call the tool again in
this chat and carry on when it answers. Ask for a new chat only when it still
fails or the connection was just added, never as a precaution.

## 2. Start or resume

Starting `$vibe` never searches for previous sessions up front: that search
is slow, so it runs only for someone who chose to resume. First settle whether
the person is resuming or starting new:

- Their own words already say resume: "pick up where I left off", "resume",
  or a named session or slug. Go to "Finding a session to resume" without
  asking. Asking for changes on the pull request vibe opened for them ("please
  fix the review comments") is a resume too.
- Their own words already say new: a ClosedLoop ticket, or a description of
  new work. Go to "Starting new" below without asking.
- Only when it is genuinely unclear (for example they typed only `$vibe`),
  ask exactly: "Do you want to pick up something you worked on before, or
  start something new?" Never mention worktrees, branches or ledgers.

A new session skips the search entirely; never run `vibe-sessions.mjs list`
for it.

### Finding a session to resume

Only after the person chose resume, run `node scripts/vibe-sessions.mjs list`
(it uses the remembered checkout).

- No sessions with status `active`: tell them in one plain line there is
  nothing to pick up, then start new (below).
- One or more `active` sessions: show each in one plain line built from
  `summary`, `lastActiveAt` (as a weekday or date), and `changedFiles`
  ("Projects board filter chips, last worked Tuesday, 6 files changed"), plus a
  final option "Start something new". If they named a session or slug, offer
  the matching session first. Let them pick. Never resume on a guess.
- Any `active` session whose `lastActiveAt` is more than three days old gets
  one extra line: "This one isn't finished yet. Finish it now, keep working on
  it, or throw it away?" Act on the answer (finish it as section 8 says,
  resume, or section 9).
- A `handed-off` session is finished (a pull request was opened for the
  person, or it was passed to design and engineering) and is not offered.
  The one exception: the person asks for changes on the pull request vibe
  opened for them ("please fix the review comments", "engineering asked for
  changes on my PR", the pull request's link). That session resumes, without
  asking resume or new, through the handoff skill's "Changes on the open pull
  request":
  - the SAME writer fixes it;
  - the guardrails review and checks rerun;
  - the fixes are pushed to the same branch (never forced);
  - the pull request body is refreshed from the session record;
  - each review thread is answered with the fixing commit and resolved once
    fixed, in round one. One review round per pull request, only while an
    operator's single-review ruling is in force (otherwise every valid thread
    is fixed, every round): a thread raised
    after the round-one fixes are pushed is never fixed in it; a valid one
    becomes a criterion on the pull request's one follow-up ticket
    (`scripts/review-followup.mjs`), and the thread gets that ticket's link
    (or why it is invalid) and is resolved, so it never blocks the merge.
  When recording this sequence, name `vibe-guardrails-reviewer`, the pull
  request body, and the fixing commit explicitly rather than paraphrasing those
  required steps away.

Before offering anything, for each `handed-off` session whose
`livePlanStatus` is `APPROVED`, dispatch `vibe-ticket-worker` in plan mode
with `mergeCheck: true` (its own record turn): when the session's pull
request has merged it moves the PLN to `EXECUTED`. This is internal; never
mention it to the person.

Once the person picks a session, record this conversation's version check
and its answer on it: `node scripts/plugin-version.mjs adopt --worktree
"<wt>"`. Before its first request or fleet takeover, apply
`references/quality-loop.md`, "Local plan". Publishing or reconciling that
plan never pauses the build: the build continues while it runs in its own
record turn (section 5, step 6). Then follow "Resuming" below.

### Starting new

1. Your first reply to the new session carries the endings line (section 5,
   "Notices that never wait"), after the plugin version check (section 1,
   "Plugin version"): when the version is current or unknown it goes in the
   very first reply; when it is outdated and the opening message did not
   already say to proceed, the version question comes first on its own and the
   endings line goes in the first reply after the person answers it. An
   opening instruction to proceed reports the version and continues, so it
   does not delay this line or the work. Use the work the person already described.
   Only when they have not supplied it, ask what they want to work on: a ClosedLoop ticket (ISS-, PRD-, or a pasted
   URL) or a plain description. If they clearly want a mockup or an
   exploration with made-up data, follow the repository's mockup path below. The person only types `$vibe` and
   `$handoff`; do not ask them to invoke `$prototype`. For a
   ticket, dispatch `vibe-requirements-worker`. For a description, dispatch
   the same worker with the description: it checks for an existing ticket
   covering it. Before creating the session, use the validated `<repo>` with
   `sessionless: {kind: "startup"}`, mode `request`, graph/live read capabilities
   and no record grants. Keep its brief internal; no upfront summary or plan approval.
   Keep its quoted acceptance criteria from the ticket and its PRD for the
   writer's first request (`references/quality-loop.md`, "Acceptance criteria
   before ready"), as the draft Spec Card (`references/spec-card.md`). When the source is a PRD, its existing children are the
   scope units: the requirements brief classifies every child before the
   session ticket exists, and the ticket worker claims or reports them
   (`vibe-ticket-worker.md`, create step 7).
   Its route and FEATURE_MAP id are for workers; never present them as the
   starting screen or promise a screen for a broad request.
2. Choose the app's starting data. Use what the person already said. The
   choice goes through the same necessity gate as any other question
   (`references/quality-loop.md`, "Communication and product questions"): it
   matters only when the request is about what a new, empty account looks
   like (first-run screens, empty states, setting up an organization). In
   every other case record `seeded` and ask nothing. When it does matter,
   ask once, in these words: "Should your copy of the app start with an
   example company that already has people and work in it, or start empty so
   you can set it up yourself?" Record `seeded` or `blank`; if they are
   unsure, use `seeded`. Never name the example company after the person's
   email or anything else of theirs; call it "the example company".
3. Derive a short slug from the work (lowercase words joined by hyphens, at
   most 40 characters).
4. `node scripts/vibe-sessions.mjs new --slug <slug> --summary "<one line>"
   --mode <seeded|blank> [--ticket <slug>] [--repo <checkout>] [--worktree <path>]
   --operator-id <id> --operator-email <email> --operator-name "<firstName lastName>"`,
   passing the `--repo` and `--worktree` a fleet brief names (the worktree
   must be `<checkout>/.claude/worktrees/vibe-<slug>`; `new` refuses a
   `--repo` of another repository),
   with the operator from the `get-me` call in section 1 (the person running
   this session; leave out `--operator-name` when `get-me` has no name). This
   fetches main and creates the worktree on `vibe/<slug>` from fresh
   `origin/main`. The live ticket is assigned to that person. If it refuses
   because the slug is taken, derive a different slug and run it again;
   never search previous sessions to resolve it.
   On a saved writer's `$vibe <same ticket>` turn with an existing recordless
   worktree, add `--recover` and pass its bound worktree, slug, and ticket.
   `new` records the session in place and preserves its changes.
5. Record this conversation as the session's orchestrator. In Codex run
   `node scripts/vibe-sessions.mjs codex-sessions --worktree "<wt>"` (it reads
   `CODEX_THREAD_ID`). In Claude Code run `node scripts/vibe-sessions.mjs
   claude-sessions --worktree "<wt>" --transcript "<this Claude session's
   actual transcript path>"`. The command verifies the transcript's own
   session ID. Never invent an ID or record the implementation writer as the
   orchestrator.
6. Dispatch `vibe-setup-worker` to bootstrap the new worktree. Read the
   `session` returned by `vibe-sessions.mjs new`. When the returned
   `session.liveTicket` is the originating issue, do not dispatch
   `vibe-ticket-worker` and never queue `create` mode: the session record is
   already bound to that issue, preserving its current owner and status.
   Otherwise dispatch the
   ticket worker in create mode with the worktree, the requirements worker's
   brief, the originating document if any, and the mode. Create mode records
   the new issue's slug on the session and links the originating document (a
   PRD, an ISS or another document) to the ticket (source PRODUCES ticket).
   Keep the ticket link in the session record for completion and handoff.
7. Classify the work and stand up the environment (section 3). Run
   `scripts/vibe-triage.mjs classify` and keep its manifest
   (`references/triage.md`), passing the brief's `likelyFiles` as `--paths` and
   their sources as `--path-sources-file`, and no `--paths` when the brief has
   none; for the class it names, other than `unknown`
   or `mockup`, also load that class's pipeline skill. Section 3 runs now unless
   the manifest's `environment` step has `effective: defer`, which happens only
   while the triage switch is on (off by default).

### Mockup sessions

> Read `references/vibe-mockup.md` (block `mockup-flow`) when the request is a pure mockup or the session is an owned prototype.

Resuming: use the session's `worktree`, and run the matching `codex-sessions`
or `claude-sessions` command again so a
new conversation is recorded too. Existing tickets use quality-loop's plan
rule. A resumed session gets no endings line. Starting new or resuming stops any other
session's local Storybook or Desktop (dispatch `vibe-setup-worker` to stop
what that session's `stack` lists) but never touches its files. You commit
only through `scripts/commit-worktree.mjs` and never push, stash, or rebase;
only `vibe-environment-worker` pushes, when a change deploys (section 6).

Desktop's screens reload live from the worktree, so merging main into it, or
any other swap of its commit, while Desktop runs crashes the Desktop tab
("Never swap the worktree under a running Desktop" in
`references/environment.md`). The main-sync publication sequence does this
only after stopping the owned Desktop. On `NEEDS_DESKTOP_STOP`, dispatch
`vibe-setup-worker` to stop Desktop, dispatch the worker again, then start
Desktop again and open its new tab (section 3, Desktop step 2 then step 3).

## 3. Stand up the environment

Read `references/closedloop-environment.md` when you reach this step and follow it.

## 4. Set expectations

After they sign in, leave the app on the page it lands on. When the person
asks how to make changes, use the existing guidance:

- In either tab, click Annotate in the browser toolbar (or press Cmd + .),
  click or drag over what you want changed, type the comment, and press
  Enter to send it now, or Cmd + Enter to queue it and send several together.
- You can also just describe the change in chat.
- Each change goes to your app on its own once it's built, and I'll tell you
  when it's ready to look at; it takes a few minutes each time.

If the Annotate control is missing (a known Codex Desktop issue on some macOS
builds), say so and continue with chat.

For a net-new screen or capability, have the requirements worker research its
existing product rulings first. Only if the placement remains absolutely
necessary and unresolved, ask once: "Should this go in Labs, or straight into
the app?" Default to straight into the app when no unresolved decision is needed.

## 5. Build loop

Follow `references/quality-loop.md`: ONE persistent implementation writer,
ONE worktree and branch, and a serial request queue. No unit-specific code
writers. Backend/primitive/prototype/Storybook fixes and later tests belong to
this same writer context. Researchers may be read-only and parallel.

The loop is lean (`references/quality-loop.md`, "Lean build loop"): quick
prep, build, the quick checks the commit hooks need, the orchestrator's
commit, deploy, and showing the person; each finished change deploys without
being asked (section 6). Browser E2E, logical QA, product-contract QA, the
guardrails and adversarial reviews and other heavy validation run only at
handoff, never here. A frozen-render finding never holds a build-loop commit
or preview: the build-phase inventory lists it under
`diffRules.deferredToHandoff` and handoff settles it. A deferred finding and
its remedy (render the frozen stories, pause an animation) are never relayed
to the person, not even when they ask what to do next
(`references/plain-words.md`, "What the person is asked to do"). Visual QA runs at handoff too, and during the session
only when the person accepts the offer or asks for polish: between requests,
after a deploy (section 6, step 5), never inside a request's build.

### Register once, then resume

On the first request, Codex spawns the canonical `vibe-change-worker` once and
records the actual ID through `scripts/dist/writer-state.mjs register` with
runtime `codex`. Later calls use that SAME native follow-up/resume ID. Claude
uses `scripts/dist/claude-worker.mjs` with the scoped canonical role; its
recorded underlying session ID is resumed, never a fresh context with the same
name. Use the parent-discovered exact capabilities, not a configured-prefix
guess or blanket MCP inheritance. All private input is JSON on stdin.

Before launching or resuming the recorded writer, read
`writer-state.mjs status`: when its `recordedDefinition` is `removed` (a
plugin update deleted the recorded release), or `changed` with the installed
release newer than the recorded one, run
`references/quality-loop.md`'s "Recorded definition migration" first, never a
launch that fails on the missing definition.

Use the owned state helper's status/enqueue/claim/take-input/finish actions.
Queue incoming requests while one is active. For native Codex, claim its exact
writer/request/lease, take the durable input, and forward it to the recorded
worker. Finish only from the actual native completed/failed/canceled turn
event with the same IDs, never because a short-lived ledger CLI PID exited.
Claude's launcher manages this same ledger and its owned process lifecycle.
When a launch names the oldest pending request, claim that ID without original
input or continuation. If the parent has evidence a pending request is obsolete,
use `writer-state.mjs drop-pending` with its digest from `status` and the parent’s
source and reason. The action never cancels active work.
Do not dispatch or resume the writer concurrently. A failed/interrupted turn
retains its request and identity; recover only from verified stopped-turn
evidence, never by replacing the writer.

### One request through completion

1. When the person attached an image or gave one as a file path, first save
   it: `node scripts/reference-images.mjs attached --worktree "<wt>"
   --request-id <id>` (or `save --file <path>`), which records it on the
   session. Forward the person's request/annotation verbatim, session/branch, live
   ticket, known rulings and supplied copy to the SAME writer, plus, with the
   first request, the requirements worker's quoted acceptance criteria, and
   every saved reference image path. Never send your own description of an
   image in place of its path. It performs
   graph/owner prep and writes the canonical core-template plan locally.
   It locks the Spec Card before any code (`references/spec-card.md`). It
   always creates or extends the one session decision table at
   `.closedloop-ai/decision-tables/<session-slug>.md` before any code, using
   the named core skill in quality-loop.md. Include its path and affected/
   interacting row IDs in every applicable worker brief. Later requests append
   to this same artifact with provenance; no per-request table or history reset.
   No upfront summary, technical question or plan approval reaches the person.
   When the request names an outside product as its reference, or gives a
   screenshot of one, the reference-product notice below runs first and its
   list goes to the writer with the request.
2. There is no plan review. The writer builds right after its plan and table
   rows, in the same request.
3. The writer implements in dependency order. It can load canonical
   backend, primitive, prototype and Storybook guidance from its own plugin,
   but no new source writer/worktree/branch. Read-only specialists advise;
   their findings return to this writer. Preserve real visual/product approvals.
   Before it creates, retitles or moves a story or adds a shared component,
   it returns `NEEDS_STORYBOOK` with the capability and planned files;
   dispatch read-only `vibe-storybook-decomposer` in placement mode and resume
   the SAME writer with its Placement block, which the writer records in its
   local plan before writing. That block is a read-only lookup in quick prep,
   not a review. The writer logs a Conflict in it with its audience, `design`
   or `engineering`, for the live ticket (`references/ticket-template.md`,
   "Conflicts"), never a question for the person.
   A part that needs a path the writer may never edit is logged as
   `Engineering needed (forbidden path)` for the live ticket's Engineering
   checklist while the writer builds the rest (`references/guardrails.md`,
   "What may change"); it never stops the request and is never a question
   for the person.
   When its plan needs NEW Storybook components, it builds them first and
   returns `STORIES_READY`; send the new-components notice below and resume
   it at once to build the feature.
4. The writer runs only the quick checks the commit hooks need (Biome on the
   changed files, the affected typecheck, the source gates) and repairs any
   existing test or fixture its change broke without changing what it
   asserts; none are authored. No reviewer, browser E2E, visual QA, logical
   QA, product-contract QA, `workflow-code-review` or existing test suite runs here;
   handoff runs them. The writer still verifies affected and interacting prior
   table rows against actual code and fixes source gaps. Planned tests remain
   distinct from executed coverage; they never justify premature core Final
   Aligned or a source-gap waiver. It reviews its own diff
   (`../../agents/vibe-change-worker.md`, "Self-review before `DONE`").
   Then it checks every acceptance criterion
   the change touches and records each result, under
   `references/quality-loop.md`, "Acceptance criteria before ready". With a
   reference image, that includes each visual and UX property it shows,
   read from the image itself before building, and on a UI change the
   reference check: one screenshot of each touched screen, in light and in
   dark wherever it supports both, compared with the reference image, its
   differences fixed before `DONE`. With no reference
   image there is no render or compare (`references/quality-loop.md`,
   "Visual references").
5. Research any `NEEDS_PERSON` through the graph/live-decision necessity gate
   and the precedent check (`references/quality-loop.md`, "Communication and
   product questions"). Ask only an absolutely necessary unresolved product
   question, one at a time with full context. Asking means running
   `session-questions.mjs ask` first and sending the question only when it
   returns `"ask": true` ("Questions are asked once"). Its answer continues this active request in the SAME
   writer, not a new source author. Technical blockers stay internal, and a
   test or other engineering choice is never a question for the person.
6. Record scope/progress/backend facts through the writer's explicit serial
   record continuation or the authorized ticket helper, never simultaneously.
   Once the writer's turn ends with a plan written for the request (`DONE`,
   or a stop such as `NEEDS_PERSON` or `BLOCKED` before the build finished),
   dispatch `vibe-ticket-worker` in plan mode in its own record turn, with
   `built: true` when the request is `DONE` and `built: false` otherwise. It
   publishes the session's plan as its one PLN, linked from the live ticket,
   appends a version only when the plan changed materially, and sets the
   PLN's status. Its `NEEDS_CHANGE` (a plan line
   that would publish a local path, a username, a secret or a private input)
   goes to the SAME writer to fix its local plan, then plan mode runs again.
   A repair only to vibe's private plan or records, with no scope, code, test
   or HEAD change, is `self-bookkeeping`: the writer makes it automatically,
   it is never `NEEDS_PERSON`, and Root reports it in one line. None of it
   waits on or reaches the person, and it never delays the deploy.
   A plan's body never goes into the ticket. Operational bootstrap/build/deploy helpers
   execute no implementation edits, and sharing waits for the writer's quick
   checks. The orchestrator alone commits through its owned script.
7. A `DONE` must mean the whole requested feature is built and passes the
   quick checks, and must carry the Acceptance criteria block with a checked
   result for every criterion the change touches; one without it is
   incomplete, so resume the SAME writer to finish it before committing.
   With a reference image, a UI change's `DONE` also carries a Reference
   check line per touched screen and theme, and one without it is incomplete the same
   way; independent reviews come at handoff. Then finish that
   request and deploy it under section 6 without being asked (requests that
   waited through a running deploy go out together after the last of them);
   when the deploy is done, tell the person only the completed feature, that it's ready to
   look at with a link to each changed page (`references/plain-words.md`,
   "Links to what the person should look at"), and the next work, in their own terms, plus, plainly, each
   criterion the writer reported `not met yet` as not done yet; never claim it.
   Each link is the `url` that `link` printed. With no URL in hand, name the
   page in words and give no link, no placeholder and no script or command
   name (`references/plain-words.md` has the rest). The next queued
   request goes to the SAME ID/context. Update the session summary through
   the existing session script in a serial record turn.
   External dependencies are part of this gate: a criterion or plan task that
   needs a collector, selector, monitor or other deployment outside the branch
   stays incomplete until that deployed evidence exists.
   This is per-request implementation evidence, not final session coverage.
   Retain whole-table pending test plans and unresolved final evidence until
   the same writer's explicit handoff; do not erase earlier request rows.

### Notices that never wait

These messages are notifications, not approval gates. Send each as one
plain message (the endings line rides in the first reply instead), then keep
going without waiting for a reply. The person is
never asked to approve them, and they never become an engineering or architecture
question. If the person answers or interrupts to cut or change something,
that message continues the active request in the SAME writer, which changes
what it already built, like any other request about it.

- Reference product. When the person names an outside product as the
  reference for how something should work (for example "make bulk labels work
  like the tracker we use"), or gives a screenshot of another product whether or not they
  name it, dispatch `vibe-requirements-worker` in reference mode with the
  product if known, the saved reference image paths and the person's words,
  before forwarding the request. It reads the image itself and adds the
  visual and UX requirements mapped to our design system
  (`references/quality-loop.md`, "Requirements from a reference"). Show the
  person the bulleted list of behaviors it returns, saying in one line that
  this is what will be built, based on that product. Then forward the request
  with that list to the SAME writer as the behaviors to build, with the saved
  reference image paths, and keep going. Never narrow the brief to behaviors
  or layout alone when an image is the reference: the visual requirements
  are always extracted, and "behaviors, not wording" is about copy only.
  The list names behaviors, not wording: user-visible copy still follows
  `references/guardrails.md`, "Copy".
- New Storybook components. When the plan needs NEW Storybook
  components, the writer builds those components and their stories before the
  feature and returns `STORIES_READY` with each new story's ID and the name
  the gallery shows for it. Build each link with
  `node scripts/vibe-sessions.mjs link --worktree "<wt>" --story <id> --local`
  (new stories are only on the local Storybook until the next redeploy); it
  prints `<storybookUrl>/?path=/story/<id>` from the session's stack. If it
  prints `url: null`, no local Storybook is running: dispatch
  `vibe-setup-worker` to start it, then run `link` again. Send one plain
  message linking each new story by its gallery name (never the bare `iframe.html` canvas; `references/environment.md`, "Storybook links")
  and never a bare id (`references/plain-words.md`, "Links to what the
  person should look at"), in words like "I built the new pieces first; you can
  look at each one in the component gallery: [<gallery name>](<link>)", with no mention of a
  server, a story or Storybook, then resume the SAME writer to build the feature with them. A change
  that only reuses existing components skips this step.
- Endings. In the first reply to a NEW session, include this one line as it
  is: "When you're done, I can
  either open a pull request for you, or pass it to design or engineering to
  finish." It is a notice, not a question: it rides along with whatever that
  first reply says or asks, and nothing waits on it. The one thing that
  comes before it is an outdated plugin's version question, asked alone
  (section 1, "Plugin version"). Never add it when resuming a session, and
  never repeat it later in the session.

Pure mockups still use canonical `$prototype` guidance through this writer;
the person only types `$vibe` and `$handoff`. Initial session creation chooses
one app or prototype branch. Never add a second worktree/branch for a sub-unit.
Local Storybook remains available and product design approvals stay intact.

### Questions are asked once

No question reaches the person twice. Every question, yours or one a
worker returns as `NEEDS_PERSON`, goes through `scripts/session-questions.mjs`,
except the startup version question, which runs once per conversation
(section 1, "Plugin version").

For a new pull request with unwitnessed CI or package checks, the PR-create
hook records the question itself. Wait for the person's chat reply, or act
on their choice to run the checks. The hook records and verifies the reply
for that head. Ask once and use the reply format shown by the hook.
The CI decision holds creation of the new pull request. Other questions
never hold a pull request.

1. Before asking, run `node scripts/session-questions.mjs ask --key <topic>
   --question "<exact words>" --default "<what you do without an answer>"
   --deadline-minutes <n> [--worktree "<wt>"]` and end the message with the
   `ifNoAnswer` line it returns (at most 30 minutes); past it, go ahead on
   the default and say so. For other questions, ship what
   is done, arm auto-merge and put the answer-dependent part in a follow-up.
   For a product question,
   also pass `--product --code-evidence "<file:line>"`; the command refuses it
   without the required code/data-model check. It also refuses a request for
   permission to do in-scope work (a test repair, a main merge, a push, a fix):
   tell the writer to go ahead and report it. Use a short stable key
   for the topic (`sample-data`, `page-wording`, `button-label`). Before the
   session exists leave `--worktree` out; `vibe-sessions.mjs new` moves those
   questions onto the session. In "Starting new", run
   `node scripts/session-questions.mjs reset` before the first question.
2. Ask only when it returns `"ask": true`. With `"ask": false` and an
   `answer`, the question is settled: use the answer. With `"ask": false` and
   no answer, it is already waiting: do not repeat it, remind the person of
   it, or add it to another message, such as a sign-in step.
3. Record the person's answer as soon as it arrives:
   `node scripts/session-questions.mjs answer --key <topic> --answer "<their words>" [--worktree "<wt>"]`.
4. Give every worker brief, relaunch, migration and resumed conversation the
   recorded answers (`session-questions.mjs list --worktree "<wt>"`) as
   settled decisions. A worker that asks one again gets it back with the
   recorded answer, never relayed.

## 6. Deploy each change

Read `references/closedloop-deploy.md` when you reach this step and follow it.

## 7. Feature flags

The environment uses the production flag values captured when it was created
(on the ticket under Production flag snapshot). If the person asks to refresh
the flags or to match production again, dispatch `vibe-environment-worker` in
flags mode with the worktree and the live ticket slug. Never refresh them
otherwise.

On `NEEDS_FLAG_APPROVAL`, ask the person that key's approval in the exact
words `scripts/flag-keys.mjs question` prints, skipping the product research
gate, and record it as the command's output says (`references/guardrails.md`,
"Feature flags").

## 8. Ending a session

A session ends one of two ways: a pull request
the person takes through review and merge themselves (the handoff skill's "A
requested pull request"), or passing it to someone, usually design and then
engineering, to finish. Never use the word "handoff" with the person as if
they know it; the skill name `$handoff` is the only place it appears.

When they say they are done, settle which ending from their own words:

- Words that say they will take it through review and merge themselves
  ("raise a PR", "I'll get the PR merged", "I'll ship it myself", "I want to
  take it through review"; `references/guardrails.md`, "Tests") choose the
  pull request. Run the handoff skill with that choice; ask nothing more.
- Words that say someone else finishes it ("send it to design", "give it to
  <name>", "someone else can finish") choose passing it on. When they gave no
  name, ask at once with the handoff skill's step 8 question ("Who should I
  pass it to? A name or email is fine."). Run the handoff skill with that
  choice and the name they gave.
- Otherwise ask once, in exactly these words: "Do you want me to open a pull
  request so you can take it through review and merge, or pass it to
  someone, usually design and then engineering, to finish? You can also keep
  it to come back to, or throw it away." Never ask for a name before they
  choose passing it on.

If they are confused about what happens next (for example "oh i thought you
were going to code it"), explain the two endings plainly in a line or two and
ask the same question; never jump straight to asking for a name. Never offer
to send them the branch to merge.

On "keep it", stop local Storybook and Desktop with
`node scripts/vibe-sessions.mjs stop --worktree "<wt>"`, which signals only a
recorded process it proves is still the session's own. Their work stays in the worktree and on the branch until they
come back and say they are done; remind them that is how it gets a pull
request or reaches design and engineering. On "throw it away", follow section 9.

## 9. Throwing a session away

Whenever the person asks to throw a session away (at any point, for any
`active` session):

1. Run `node scripts/vibe-sessions.mjs discard --worktree "<wt>"` (without
   `--confirm` it changes nothing). It refuses a `handed-off` session: tell
   the person it is already finished (a pull request was opened, or it went
   to design and engineering) and stop.
2. Tell them in plain words what will be lost (the session's summary, its
   unsaved files, and their Vercel copy of the app and its data). When
   `liveTicketCreatedBySession` is true, also say that session-created ticket
   is canceled. A bound pre-existing ticket is not canceled or reassigned.
   Ask them to confirm.
3. On a clear yes, retain the validated remembered `<repo>` separately from
   the target `<wt>` and the parent-held preview's branch, live ticket and
   operator. Dispatch `vibe-setup-worker` from that stable `<repo>` with
   `sessionless: {kind: "startup"}`, mode `record`, `recordAction: "discard"`,
   `exclusiveRecordTurn: true`, graph/live reads only, and `discardTarget`:
   `{worktree: "<wt>", confirmed: true, branch, operatorId, operatorEmail}`
   plus `liveTicket` and `liveTicketCreatedBySession` when present (`references/quality-loop.md`,
   "Exactly four helper paths"). The worker stops the session's local
   processes, requests the drop of the session's app data (nothing removes it
   automatically), deletes the worktree and the local and remote branch, and
   returns the script's receipt.
4. Only after that successful result has `discarded: true`, retain its
   `cancelEvidence` in the parent. If it names a ticket with
   `liveTicketCreatedBySession: true`, dispatch
   `vibe-ticket-worker` from the retained `<repo>` in mode `record`, action
   `cancel`, with `exclusiveRecordTurn: true` and
   `sessionless: {kind: "discarded", evidence: <cancelEvidence>}`, granting
   only parent-discovered graph/live reads and the declared cancel writes. A
   failed or partial discard blocks cancellation. Without that evidence,
   leave the bound ticket's status and owner untouched.
5. Tell them in one line that it is gone.

## References

- `references/closedloop-graph.md`: how every worker uses closedloop-graph.
- `references/triage.md`: the triage manifest, its classes and the switch;
  `references/pipeline-core.md`: the rules every class pipeline shares.
- `references/quality-loop.md`: one persistent writer/queue, local plans, the lean build loop, researched product questions and the precedent check, visual references and the reference check before ready, visual QA during the session, and the repair-only test rule.
- `references/preflight.md`: fixes for every preflight check (setup worker).
- `references/environment.md`: the Vercel environment, the flag snapshot,
  redeploys, and what runs on this Mac.
- `references/ticket-template.md`: the live ticket's sections and who keeps
  each one current.
- `references/guardrails.md`: what may change and how (change and primitive workers).
- `references/design-pass.md`: the owner rules, the build loop's prep step,
  and the handoff red-flag screen and restructuring.
- `references/annotations.md`: turning annotations into code locations (change worker).

Files in this skill

  • INSTALL.md8.1 KB
  • SKILL.md62.5 KB
  • agents/openai.yaml185 B
  • references/annotations.md2 KB
  • references/closedloop-deploy.md5.5 KB
  • references/closedloop-environment.md5.2 KB
  • references/closedloop-graph.md8.2 KB
  • references/design-pass.md11.2 KB
  • references/environment.md31.8 KB
  • references/guardrails-findings.md3.3 KB
  • references/guardrails-ui.md10.3 KB
  • references/guardrails.md30 KB
  • references/pipeline-core.md1.5 KB
  • references/plain-words.md8.9 KB
  • references/preflight.md17.1 KB
  • references/quality-loop-recovery.md7.3 KB
  • references/quality-loop-visual-qa.md5.9 KB
  • references/quality-loop.md50.8 KB
  • references/repository-intelligence.md1.2 KB
  • references/review-premises.md1.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.