Quick Reference

Setup: /pod init · /pod status · /pod resume

Assist Mode: /cocoplus on · /cocoplus off

Lifecycle: /spec · /plan · /build · /test · /review · /ship · /rewind · /fork

Pipeline: /flow run · /flow status · /flow pause · /flow resume

Personas: $de · $ae · $ds · $da · $bi · $dpm · $dst · $cdo

Features: /memory on|off · /inspect · /safety strict|normal|off · /quality on|off|run · /meter · /cup · /patterns · /context on|off · /spark · /secondeye · /doc run · /prompt new|compare · /fleet

Setup and State — CocoPod

CocoPod is the prerequisite. No other CocoPlus command functions in a directory without an initialized CocoPod.

/pod init

/pod init
/pod init --name "Data Platform v2"

Prompts for project name and description if not provided. Creates .cocoplus/ directory structure, writes initial AGENTS.md, project.md, flow.json, safety-config.json, and notifications.json. Creates the initial git commit. Fails if .cocoplus/ already exists.

/pod status

/pod status

Reads all state from .cocoplus/ and reports: current CocoBrew phase, active feature modes, CocoFlow pipeline status, recent CocoMeter session summary, latest CocoCupper findings, and Environment Inspector snapshot age. No state changes.

/pod resume

/pod resume

Produces a focused narrative of where you left off: last phase completed, blocking items remaining, three most recent key decisions, and the recommended immediate next action. Use at the start of any session after time away.

Master Toggle — Assist Mode

/cocoplus on

/cocoplus on

Creates mode flag files for Memory Engine, Environment Inspector (auto), Safety Gate (normal), Code Quality Advisor, Context Mode, and CocoMeter. Immediately triggers an Environment Inspector background scan. Updates AGENTS.md to show "FULL ASSIST MODE: ACTIVE". Creates git commit. Idempotent — running when already active confirms state only.

Does not activate: CocoBrew lifecycle phases, CocoSpark, CocoFleet.

/cocoplus off

/cocoplus off

Removes all mode flag files. Does not delete data files — memory, meter history, grove patterns, and lifecycle artifacts are preserved. Creates git commit.

Lifecycle — CocoBrew

The six phases run sequentially. Each requires the previous phase to be committed before it can begin.

/spec

/spec

Opens a structured requirements dialogue: goal, success criteria, explicit out-of-scope, involved Snowflake objects, constraints. Output written to .cocoplus/lifecycle/spec.md. Git commit: feat(spec): initial project specification captured.

/plan

/plan

Reads spec.md, invokes CocoHarvest to decompose work, generates flow.json, and enters Coco's native plan mode as a hard approval gate. No Build phase begins without plan approval. Output: plan.md, flow.json, prompt stubs. Git commit: feat(plan): approved execution plan v<version>.

/build

/build
/build --model <haiku|sonnet|opus>

Reads plan.md and flow.json. For complex multi-workstream plans, invokes CocoHarvest to spawn parallel persona subagents in isolated git worktrees. --model sets the pipeline-level default (Tier 2). Checks for unacknowledged SecondEye Critical findings before proceeding.

/test

/test

Runs validation against spec success criteria using SQL execution, notebook execution, or file-existence checks. Results recorded in .cocoplus/lifecycle/test.md. Can be re-run without rebuilding.

/review

/review

Aggregates Code Quality Advisor findings, CocoCupper session intelligence, and spec compliance check into .cocoplus/lifecycle/review.md. Findings classified: must-fix, should-fix, consider.

/ship

/ship

Gated on review completion with no open must-fix items. Creates final commit with full lifecycle summary. Applies semantic version tag. Writes deployment.md. Optionally creates a pull request via gh pr create if configured.

/rewind [step-id]

/rewind plan-v1
/rewind build-stage-003

Identifies CocoBrew phase commits in git log, shows the target state and what would be discarded, then resets to the target after confirmation. Uses soft reset — history is preserved.

/fork [branch-name]

/fork alternative-schema

Creates a git worktree on a fork/<branch-name> branch at the current phase. Experiment freely. Main branch is untouched.

Pipeline Execution — CocoFlow

/flow run [stage-id]

/flow run
/flow run stage-003
/flow run --model <haiku|sonnet|opus>
/flow run --model <value> --stage <stage-id>

Reads flow.json, spawns stage subagents, monitors completion via SubagentStop hook integration. Stage status written back to flow.json in real time. --model without --stage applies a Tier 2 pipeline default. --model with --stage applies a Tier 3 stage-level override. Neither form modifies flow.json on disk.

/flow status

/flow status

Renders the pipeline state: each stage with status, runtime duration, checkpoint validation results, and failure reason where applicable. No state changes.

/flow pause and /flow resume [stage-id]

/flow pause
/flow resume
/flow resume stage-003

/flow pause halts execution after the currently-running stage completes — running stages are never killed mid-execution. /flow resume validates that all prior stages' checkpoints are satisfied before resuming. If checkpoints are missing, resume is blocked with a clear explanation.

Personas

Personas are invoked with the $ prefix. All invocations route through the UserPromptSubmit hook.

/personas

/personas

Lists all eight personas with trigger, default model, invocation mode, and core tools. No state changes.

CommandPersonaModelModeDomain
$deData EngineerSonnetautoSchema design, SQL, stored procedures, pipelines
$aeAnalytics EngineerSonnetautoSemantic models, dbt-style transformations, metrics
$dsData ScientistSonnetautoNotebooks, ML pipelines, Cortex ML functions
$daData AnalystHaikuautoQuery writing, exploration, Cortex Analyst
$biBI AnalystHaikuautoDashboards, semantic layer, Snowsight
$dpmData Product ManagerSonnetplan onlyRequirements, documentation, stakeholder communication
$dstData StewardSonnetplan onlyGovernance, data quality, access policy review
$cdoChief Data OfficerOpusplan onlyStrategic architecture, trade-off analysis

Flags common to all persona invocations:

--continue — Pass the full current conversation context to the persona for seamless continuation.

--model <haiku|sonnet|opus> — Override the persona's default model for this invocation only. Cannot override CocoCupper.

Memory Engine

/memory on   # Create modes/memory.on — enable warm memory capture
/memory off  # Remove modes/memory.on — preserve existing content, stop capture

Environment Inspector

/inspect                   # Full environment scan
/inspect --schema ANALYTICS # Limit scan to one schema
/inspect --full            # Include column-level statistics and access policy details

/inspector on   # Auto-scan at every session start (background, non-blocking)
/inspector off  # Disable auto-scan; manual /inspect still works

Safety Gate

/safety strict  # Hard blocks on DROP, TRUNCATE, DELETE without WHERE, ALTER on prod schemas
/safety normal  # Same pattern set — warnings instead of blocks (default)
/safety off     # No hard blocks, no warnings (development environments only)

Protected schema patterns are configured in .cocoplus/safety-config.json under production_schema_patterns. Changes take effect immediately.

Code Quality Advisor

/quality on              # Enable background review after every .sql file write
/quality off             # Disable background review

/quality run             # Immediate review of all SQL modified this session
/quality run path/to/procedure.sql  # Review a specific file

CocoMeter — Token and Cost Tracking

/meter on              # Enable token tracking (modes/cocometer.on)
/meter off             # Disable token tracking

/meter                 # Current session summary: tokens by feature and operation
/meter estimate "..."  # Pre-flight cost estimate for a described operation
/meter history         # Last 10 sessions cost summaries
/meter history 5       # Last N sessions

CocoCupper — Post-Execution Intelligence

/cup              # Manually trigger CocoCupper analysis (Haiku, read-only)
/cup history      # All historical findings
/cup history 3    # Last N sessions' findings

CocoCupper also runs automatically via the Stop and SubagentStop hooks.

CocoGrove — Pattern Library

/patterns view               # Browse all promoted patterns
/patterns view pagination    # Filter by tag

/patterns promote FINDING-047  # Elevate a CocoCupper finding to a permanent pattern

Context Mode

/context on   # Enable narration overlay — what is happening, why, what to expect
/context off  # Disable narration overlay

Brainstorm Mode — CocoSpark

/spark                          # Activate divergent thinking
/spark schema design approaches # Topic-focused brainstorm
/spark-off                      # Exit; optionally carry insights into spec.md

Plan Critique — SecondEye

/secondeye                           # Three-model parallel critique of plan.md
/secondeye --artifact spec           # Critique spec.md
/secondeye --artifact review         # Critique review.md
/secondeye --artifact path/to/file   # Critique any file

/secondeye --model haiku   # Single-model critique
/secondeye --model opus

/secondeye acknowledge     # Clear the Build soft gate after reviewing Critical findings
/secondeye history         # List all SecondEye reports with finding counts

Doc Engine

/doc run                           # Generate docs for all SQL written this session
/doc run path/to/procedure.sql     # Document a specific file
/doc run ANALYTICS.CUSTOMER_SCHEMA # Document a Snowflake schema

Prompt Studio

/prompt new                         # Guided workflow to create a Cortex AI prompt
/prompt compare prompts/v1.md prompts/v2.md  # Compare two prompt variants

Multi-Process Orchestration — CocoFleet

/fleet init data-platform  # Create a fleet manifest template

/fleet run .cocoplus/fleet/data-platform-manifest.json  # Execute a fleet

/fleet status fleet-001     # Live status for all instances
/fleet logs instance-003    # Stream a specific instance's log

/fleet stop fleet-001       # Graceful shutdown (SIGTERM → SIGKILL)

Hooks — Automatic Reference

HookFires WhenWhat It Does
SessionStartSession beginsReads state, initializes CocoMeter, triggers inspector background scan if enabled
SessionEndSession endsWrites CocoMeter data, updates AGENTS.md with session summary
PreToolUseBefore any tool callSafety Gate — intercepts SnowflakeSqlExecute, blocks or warns per safety mode
PostToolUseAfter any tool callMemory Engine — captures significant events to warm memory layer
UserPromptSubmitDeveloper submits a promptRoutes $<persona> shorthand; intercepts /cocoplus on|off
SubagentStopA subagent completesValidates checkpoints, updates flow.json stage status, triggers next stage
StopMain session endsFinal state capture, queues CocoCupper
PreCompactBefore context compactionFlushes important state to warm memory before it's lost
NotificationCocoPlus raises an eventRoutes to Coco UI or log file per notifications.json