This is the standing entry point for any agent working with ca0v or across his projects. Internalize it at the start of relevant sessions. It composes the core lenses and infrastructure that make work productive and token-efficient.
The goal of ca0v's practices is a codebase and workflow that becomes increasingly agent-friendly: higher productivity for both agents and humans, lower token waste (less exploration, fewer backtracks, faster resumes, more "obviously correct" first attempts).
Activate this for every autonomous decision, recommendation, or edit.
See the full generalized prompt:
https://gist.github.com/ca0v/a6d9e2280cff0ba2f83dbde262e20384 (wwjd-prompt.md)
Prime directive (abridged): Every change must move the codebase toward being robust, well-documented, and obviously correct, converging on an agent-first development experience. Measure success by increased agent productivity and decreased token waste.
The four tenets (evaluate before acting):
- Obviously correct over cleverly correct (explicit invariants, make illegals unrepresentable, documentation + tests as obligations).
- Robust by construction (clean in / known out, fail loud + recoverable, deterministic helpers and "agent OS" scaffolding over ad-hoc reasoning).
- Well-documented as first-class (plans, CLAUDE.md, instructions, memory/feedback files, and runbooks are the contract for the next fresh agent; update them in the same change).
- Agent-first convergence (stable test hooks, single-source-of-truth, predictable structure/naming, deterministic scripts/DSLs, strict generated-vs-source boundaries, session continuity, capture non-obvious learnings immediately).
How to use: Lead with the recommendation, justify tenet-by-tenet (plus agent-productivity/token impact), name invariants, surface preconditions, then make the decision durable (see below). Do not ask obvious questions under this lens — state the clear choice and proceed.
Output shape: Recommendation → tenet justification → productivity impact → durability/recording steps → preconditions → next obvious action.
Use these to turn context resets and session boundaries into near-zero cost operations.
-
/hello (start of session, "I'm back", "where were we"): Read the
SESSION_HANDOFF.mdfrom the project memory directory (the auto-memory path shown in your context, typically~/.claude/projects/<project-hash>/memory/SESSION_HANDOFF.md). Reconcile live state (processes, branch, tree, recent commits). Report concisely: what we were doing, live state now (flag discrepancies), next steps, watch-outs. Offer the obvious first action. -
/goodbye (end of session, "wrapping up", "signing off"):
- Consolidate non-obvious and lasting discoveries into durable memory (write or update
feedback_*.mdor equivalent under the project memory dir; add/refresh one-line pointers inMEMORY.mdor project overview). Skip anything already in git history or derivable. - Capture live operational state (background processes + handles, branch/tree cleanliness, time-sensitive items).
- Write (overwrite)
SESSION_HANDOFF.mdin the project memory dir only (never into the repo working tree — it would dirty it for tree-sensitive tools like quality daemons). Include timestamp, through-line bullets, live state, ordered open threads/next steps, watch-outs with memory links. - Confirm to the user what was consolidated and that the handoff is written.
- Consolidate non-obvious and lasting discoveries into durable memory (write or update
These are the mechanism for "update your policy documents for future reference" (see wwjd). They prevent token waste on re-deriving state or re-learning footguns.
Project-specific implementations live in the local .claude/skills/hello and goodbye (with concrete paths and rules). The pattern is portable.
When the user describes a problem or desired change that should be owned by the quality-loop infrastructure (rather than implemented immediately by you in this session), use /qlq.
Patterns (see the quality-loop prompt for full context and invariants):
https://gist.github.com/ca0v/03dd1afa76a1ccb884138bcc57dd4ef4
Two common realizations:
- Daemon-backed (e.g. dw-ems DevQuality): Agent root-causes, designs a minimal obviously-correct fix, writes a structured spec (PROBLEM / EVIDENCE with file:line / FIX / Verify hint using one of the declared modes: page / API-positive / API-deny / test-gate), then enqueues via a race-safe helper. The outer daemon owns git, gates (build+test + declared verification), revert-on-failure, and commit. Clean tree in/out.
- DSL/intake-backed (e.g. WorkflowEngine): Agent composes a crisp title + body, files it via the running app's deterministic verb (e.g.
report-issueover/cmd), which appends to the intake queue. A helper also ensures the loop daemon is running. The loop (triage → pipeline → implement) drains it.
Key rules:
- The filed item becomes the spec the implementing (fresh) agent follows.
- Prefer
/qlqwhen you want the outer "agent OS" (singleton, stall detection, gates, verification, status pushback, no dirty tree) to own the work. - Do not use it if the user clearly wants the fix right now in the current session.
- Only act on explicitly user-provided problems for
source=userpriority. - Meta-tooling bugs in the loop itself are usually fixed directly (circular otherwise).
Project-specific /qlq skills (with exact commands, token handling, queue locations) live in the relevant .claude/skills/qlq/SKILL.md and supporting scripts (e.g. qlq-file.sh, add-issue.mjs). The quality-loop gist gives the generalized contracts, lifecycle verbs, pause rules, verification modes, and bootstrap checklist.
Under /wwjd, after any significant decision or change:
- Record it so the next agent (or future you) does not re-pay the token cost.
- Primary tools: hello/goodbye handoffs + memory/feedback files (for learnings), /qlq (for queued, gated fixes), /task (for complex multi-phase work with checklists and status), and direct updates to CLAUDE.md / PLANS / instructions / runbooks in the same change.
- The ca0v bootstrap, wwjd prompt, and quality-loop prompt themselves are policy documents — update them (via gist edits) when the patterns evolve.
- Memory hygiene: Non-obvious, cross-session facts go into
feedback_*.md(or equivalent) with[[name]]pointers. Update the index (MEMORY.md or equivalent). - Generator / source discipline: Never edit generated output directly. Fix the template, generator, or upstream model/source. (Enforced in many projects via headers and post-edit hooks.)
- Agentic surfaces: Expose stable, scriptable affordances (window.* hooks that drive full render, data-testid, DSL verbs, registries, APIs) so E2E verification and automation is deterministic rather than selector- or screenshot-brittle.
- Structural legibility: Small methods, intention-revealing names, cohesive files, explicit state machines. Enables both human and automated (scan-quality style) understanding.
- Fresh-agent context: Maintain short, high-signal CLAUDE.md + project context memory + this bootstrap so a brand-new invocation becomes productive quickly.
- Quality loops as first-class: Treat the loop machinery (scripts, prompts, skills, gists) as product code. Version it, test the contracts, document activation in CLAUDE.md.
- Stall / waste prevention: Honor dirty-tree guards, focused-test requirements, stall backoff, "in-progress items must terminate done or failed".
- In projects: Add a short pointer near the top of
CLAUDE.md(or equivalent): "Apply ca0v's personal operating procedures from [this bootstrap gist]. Primary lens: /wwjd. Use /hello on resume, /goodbye on wrap-up, /qlq for loop-owned work." - Invoking: Use the slash commands where available (
/wwjd,/qlq,/hello,/goodbye,/task). When the local skill is thin, fall back to the gist content. - New projects / cross-project work: Start here (this bootstrap), then the specialized gists (wwjd for decisions, quality-loop for autonomous fix pipelines), then the concrete local
.claude/skills/and scripts for the current stack. - Gists as living policy: These (bootstrap + wwjd-prompt + quality-loop-prompt) are the generalized, cross-project truth. Local SKILL.md files are the stack-specific adapters. Update the gists when invariants or patterns improve.
- wwjd detailed lens: the gist linked in §1.
- Quality loop + qlq patterns + full invariants/checklist: the gist linked in §3. Local cross-project synthesis:
/home/ca0v/code/quality-loop.md(also calls for a rootPROJECTS-OVERVIEW.md). - Concrete skills: look under each project's
.claude/skills/(dw-ems, dw-aware, WorkflowEngine, etc.). Variants exist because storage, driver, and filing mechanisms differ. - Memory/user profile: per-project memories capture domain facts; this bootstrap captures the interaction and durability style.
- Supporting patterns: agentic E2E command skills (stable hooks), TASK files, generator rules in CLAUDE.md, etc.
Last updated via /wwjd decision (2026-06-16). This bootstrap is the durable composition layer. When in doubt, re-read it, apply the wwjd lens, and record the outcome.
Adapt ruthlessly per project while preserving the invariants that make agents (and ca0v) more effective over time.