| name | mold |
| description | Converge a fuzzy idea or half-formed feature into an approved spec through an iterative, grounded design dialogue. Use when the user has a fuzzy idea or design direction — phrases like "let's design X", "I'm thinking about Y", "what should the API for Z look like", "shape this into a spec", "what would it take to build/set up X", "I want to add a feature that…", "/mold". Use even when the user is "just thinking out loud" if they want the dialogue to leave behind a written artifact. Do NOT use for free-form discussion with no artifact intent (`/culture`), direct implementation (`/cook`), or research-only questions (`/briesearch`). |
| license | MIT |
| metadata | {"dispatches-agents":true} |
/mold
Two modes, by analogy to /culture:
- User-invoked full ceremony (default). The user typed
/mold (or /cheese routed an explicit fuzzy-design ask straight here). Runs the full Explore/Ground/Shape/Sketch/Grill/Diagnose dialogue and the two-key handshake before any spec is written. The flow below describes this mode.
- Agent-invoked mini-spec mode.
/cheese calls into /mold at tier 1 of its escalation (see skills/cheese/SKILL.md § Escalation) when the cook fast-path checks all pass and a spec needs to materialise before /cook --auto runs. No dialogue, no handshake — the agent writes a mini-spec directly from the user's input (plus any tier-2 /culture / /briesearch synthesis) and returns the spec path. See ## Agent-invoked mini-spec mode below.
Do not use the user-invoked ceremony for free-form discussion with no artifact intent (/culture), direct implementation (/cook), or research-only questions (/briesearch).
Flow
- Bounds pass — before routing, run one Explore-style bounds round for every input shape: map the problem's edges to candidate goals and non-goals, and put the consequential ones to the user as questions rather than assuming them. Open the per-round decision ledger here (
Decided / Asking / [AGENT-DECIDED]; see ## Rules). Tier it — a genuinely clear input gets a single fast confirm of the bounds, not a full A/B/C/D menu — but it is never skipped, so asking precedes any output. See references/modes.md.
- Route — pick the secondary mode from the input shape (see
references/modes.md) and announce it in one line. If the user's framing rests on a false premise or a loaded assumption, name it before routing.
- Dialogue — build shared understanding by asking the user the decisions that shape the design: every consequential fork is theirs to pick, surfaced as a choice, not settled for them. Contribute full depth (options, named edge cases, concrete evidence — not gestural sketches) to inform each question, never to replace asking it. Ground every critical claim with
cheez-search, cheez-read, a Validate Cycle (references/validate-cycle.md), or — for an ungrillable design unknown only a running sketch can settle — a Prototype Cycle (references/prototype-cycle.md). Both cycles are sub-agent-spawnable mid-dialogue, in parallel, and are context-bounded (no hard cap; soft backstop of 10). Track contradictions across turns; if turn N contradicts an earlier conclusion, flag and resolve it before continuing. After 3 consecutive fork questions, or whenever the user asks "what forks are left?", render the decision map (see ## Rules § Decision map) before continuing.
- Sketch — for any feature touching >1 module or a new public interface, run the shape check (
references/shape-check.md) on the touched symbols, then lock seams in pseudocode signatures before talking spec content. While the code is open, bind every identity/ownership-role noun to a code referent per references/handshake.md § Entity-referent binding — a search hit of a different referent is an alias, not a pass.
- Two-key handshake — both the user (explicit verb) and the agent (coherence self-check) must agree before extraction. See
references/handshake.md.
- Curdle — resolve the durable spec path with
SPEC=$(python3 shared/scripts/artifact_path.py specs <slug>). Phase one writes all local artifacts and write-ahead prepared state: write the approved spec to "$SPEC", any local issue drafts, and the session's non-obvious decisions as durable ADRs before any external call. If you're on a host that only exposes the packaged helper, python3 skills/mold/scripts/mold.pyz artifact-path specs <slug> is the fallback. The resolver anchors specs at the per-project durable corpus (see ../cheese/references/formatting.md § Corpus location); never hardcode a repo-local spec path. After phase one is durable, phase two publishes approved follow-ups, retains prepared recovery state when an external capability is unavailable or publication fails, and reconciles their state and references into the durable spec. Format, slug, publication, reconciliation, and corpus-resolution rules live in references/curdle.md and references/adr.md.
- Count and hand off — only after phase-two publication attempts and reconciliation finish, run
python3 skills/mold/scripts/mold.pyz curd-count "$SPEC" --blast-radius <low|medium|high> to compute the recommended downstream skill (full procedure in references/curd-count.md). Then prompt the next step via the shared handoff gate in ../cheese/references/handoff-gate.md. Never dispatch before the user selects; after a non-stop selection, run the selected downstream skill immediately.
Portability reference: ../cheese/references/harness-portability.md. It covers helper resolution, sub-agent dispatch, GitHub operations, and handoff transitions; prefer the bundled or repo-local helper first, and treat ${CLAUDE_SKILL_DIR} as optional host-provided fallback.
The handoff blocks below are the portable contract; slash commands are host renderings, not the control model.
Follow-up candidates
Every non-goal and explicit dialogue deferral enters the current session's follow-up candidate set. Record it within Decided as [FOLLOW-UP?] with its summary, source, and rationale. A candidate is dialogue state only: collecting one does not create an artifact or accept a future commitment.
When candidates exist, complete the pre-Curdle disposition batch in references/handshake.md before the two-key handshake can pass. When none exist, omit the batch and preserve the current Curdle flow. After both keys pass, Curdle writes local artifacts first, publishes approved follow-ups, reconciles their state and references into the durable spec, and only then renders the implementation handoff.
Modes
| Mode | Use when | Goal |
|---|
| Explore | The idea is vague | Identify the real problem and pain point |
| Ground | A file, bug, or existing doc is named | Verify facts against evidence |
| Shape | The goal is known but approach is open | Compare viable options (Do Nothing always included) |
| Sketch | Interfaces or module boundaries matter | Lock responsibilities and seams |
| Grill | A favoured approach needs stress-testing | Steelman each item, then put every design-changing call to the user as a fork |
| Diagnose | A symptom, failure, or trace is supplied | Build a Loop → reproduce → hypothesize → confirm root cause |
Full mode definitions, exit criteria, and user knobs in references/modes.md. Trigger and trace evals for the skill — including the Grill user-fork checks — in references/evals.md.
Agent-invoked mini-spec mode
/cheese's tier-1 escalation calls into /mold to produce a spec without a user-facing dialogue. The cook fast-path checks have already passed at the call site, so the input is unambiguous by construction — there is nothing left to ground, no trade-offs to grill. The mode skips the Flow above entirely:
- Derive slug from the user's ask (kebab-case noun-phrase, ≤ 4 words).
- Write the resolver-owned
<spec-path> with the mini-spec schema below. Resolve it via python3 shared/scripts/artifact_path.py specs <slug>; if you're on a host that only exposes the packaged helper, python3 skills/mold/scripts/mold.pyz artifact-path specs <slug> is the fallback. Never hardcode a repo-local spec path: the resolver anchors it at the durable corpus, matching the Curdle step.
- Return the resolved spec path to
/cheese so it can dispatch /cook --auto <spec-path> (the full path printed by the resolver, not a bare <slug>).
The two-key handshake does not fire in this mode. The agent-introduced-scope check still runs implicitly: every distinguishing noun in the mini-spec must come from the user's input or from the tier-2 /culture / /briesearch synthesis recorded in ## Provenance. Anything else is a silent agent addition and is forbidden — the mini-spec records only what the user asked for, not what the agent thinks they might have meant.
Mini-spec schema
---
slug: <kebab-slug>
source: agent-mini-spec
intent: <one-sentence restatement of the user's ask>
blast_radius: low | medium | high
inputs: <one-line>
outputs: <one-line>
verification: <one-line: the obvious check>
---
## Contract
<one paragraph: behaviour change, scope boundary>
## Acceptance
- <verifiable check 1>
- <verifiable check 2>
## Non-goals
- <what we are NOT changing>
## Provenance (tier 2 only)
- culture: <one-line synthesis of what /culture concluded>
- briesearch: <one-line synthesis>; artifact: research/<slug>/<slug>.md
source: agent-mini-spec is the marker that downstream skills (/cook, /age, etc.) can read if they ever want different taste-test stringency for agent-written vs handshake-approved specs. They are not required to act on it today. User-invoked-ceremony specs omit source: or use source: mold-handshake.
## Provenance appears only when /cheese reached tier 2 before falling into tier 1 — i.e., when /culture or /briesearch contributed context the original input lacked. Omit the section when tier 1 fires on the raw input. When /briesearch ran, the artifact: field links the durable cited research at research/<slug>/<slug>.md so the citations are preserved and /cook (or any later skill) can re-read them without re-researching. Omit artifact: only when /briesearch answered from local code patterns alone and wrote no durable file.
Preferred tools and fallbacks
Code search, reading, and editing (including spec writing) all go through the cheez-* skills (/cheez-search, /cheez-read, /cheez-write) — see those skills for tool selection rules. Shape checks specifically use cheez-search callers (kind: "callers") plus tilth_deps; the procedure lives in references/shape-check.md.
Beyond cheez-* there are mold-specific tools:
| Need | Prefer | Fallback |
|---|
| External validation | /briesearch with Context7/Tavily | user-provided docs, repo docs, or note as unverified |
Wiki grounding (Ground entry + decision points; scope per references/grounding.md § When to probe) | mcp__hallouminate__list_corpora + mcp__hallouminate__ground on repo:<repo>:wiki — see references/grounding.md | skip; proceed with code evidence only; cap at speculating when design rationale is central |
Optional tools accelerate the work; missing tools do not block the dialogue. When evidence is unavailable, mark the affected claim [?] until settled.
Sub-agent context gate
/mold keeps the dialogue, contradictions, approval state, and the two-key handshake in the parent context — those never delegate. Offloading heavy work to a read-only sub-agent is the default (references/context-budget.md) — the explorer phase-agent for code reads and shape checks, the researcher phase-agent for deep /briesearch. Spawn one whenever the work would flood the conversation with raw evidence or graph output (sub-agent selection and the Explore/inline fallback: see references/context-budget.md):
Triggers and digest constraints in references/context-budget.md.
Gate graph
Mold's gate state machine is a single machine-readable model rendered two ways: python3 skills/mold/scripts/mold.pyz gate-graph --render dot|svg|png|mermaid. dot/mermaid need no binary; svg/png use Graphviz dot when present and degrade to mermaid otherwise. The model's gate nodes are kept in lockstep with the handshake.md coherence checklist by a test, so a gate cannot be dropped from prose. Details in references/gate-graph.md.
Approval gate
Curdle requires the two-key handshake: an explicit user verb (e.g. curdle, ship it) and the agent's coherence self-check. The full checklist, mandatory gates, and override semantics live in references/handshake.md — do not duplicate them here.
Before the handshake fires, also run the agent-introduced-scope check — flag any noun in Approach / Decisions / Interface sketches the user did not type, and require explicit per-term approval before extraction. Full procedure and the single-chokepoint guarantee in references/handshake.md § Agent-introduced scope.
If any gate is unmet, propose the smallest next question or evidence check. Write artifacts only after both keys pass.
--hard
/mold --hard propagates --hard through to /cook at handoff (any of the cook-flavoured options below carries the flag forward). Mold itself runs no gate — the metacognitive vibecheck fires later, at /cure's share-for-review boundary. See skills/hard-cheese/SKILL.md and ../hard-cheese/references/composition.md.
Handoff
Pipeline: culture → [mold] → cook → press → age → cure → plate
After Curdle completes phase-two publication attempts and mechanical reconciliation of Deferred follow-ups into the durable spec, run the curd-count script (procedure and --blast-radius rules in references/curd-count.md), then render the branch menu below and prompt via the shared handoff gate. Never pre-select an autonomous option.
Read the JSON digest. Its decomposable field (true when candidate_curds ≥ 2, the PARALLEL_THRESHOLD) picks the option set rendered below; its recommended_skill field picks which option holds the (recommended) slot. Then ask the user via the shared handoff gate in ../cheese/references/handoff-gate.md. Lead each option with the verb; the skill command (with the spec path and any in-scope --hard propagation) is the backing detail.
Decomposable specs (decomposable: true, candidate_curds ≥ 2):
The spec splits into independent slices, so /ultracook's decomposer can fan them out in parallel with reviewable PRs. Before rendering the menu, confirm with the user that the candidate curds are file-disjoint (criterion 4) — the script counts signals, it does not verify independence. The dispatched skill is /ultracook either way: its decomposer routes 2+ file-disjoint curds to parallel mode and folds shared-file curds back into the linear chain, so the user's answer informs the decomposer rather than changing the command.
- Run the full pipeline (parallel fan-out when disjoint, else linear) (recommended) —
/ultracook <spec-path>. The decomposer picks parallel curd fan-out or the linear chain; /plate performs the final artifact-writing gate, resolves topology from the explicit choice and review shape, and publishes the ordinary or stacked layout.
- Implement manually, one phase at a time —
/cook <spec-path>.
- Stop — dispatch none; leave the spec for later.
Non-decomposable, high-blast-radius specs (decomposable: false, verdict high only):
The spec is large enough that per-phase context contamination becomes a real concern: review reasoning softens when the same window contains the cook reasoning, and the parent context bloats across phases. Offer the fresh-context orchestrator and the manual compaction path:
- Run the full pipeline in fresh-context isolation (recommended) —
/ultracook <spec-path>, autonomous chain (cook → press → age → cure → age → cure → age, all --auto) with each phase running inside its own sub-agent, blind to prior phases.
- Implement manually, one phase at a time —
/cook <spec-path>.
- Compact and resume by hand — dispatch none; clear context, then dispatch
/cook <spec-path> or /ultracook <spec-path> directly. (/cheese --continue scans phase handoff slugs only — fresh specs don't surface there until cook lands a slug — so dispatching the explicit command is the resumption path here.)
- Stop — dispatch none; leave the spec for later.
Non-decomposable, low- or medium-blast-radius specs (decomposable: false, verdict low or medium):
- Implement the spec (recommended) —
/cook <spec-path>.
- Implement and auto-review —
/cook --auto <spec-path>, chains through /press → /age → /cure. Opening or updating a PR remains a /plate step; a new PR follows its explicit-choice and review-shape policy.
- Research more first —
/briesearch, gather more external evidence before implementing.
- Stop — dispatch none; leave the spec for later.
/cook --auto is omitted from the decomposable and high-blast-radius offer sets: with many parallel curds or a wide footprint, /ultracook (parallel fan-out or fresh-context linear chain) is the actual motivation for going autonomous, and the in-session chain is the wrong transport. The no-pre-select-autonomous rule stated above applies here too; the user must opt in. medium blast radius keeps the standard handoff because the in-session /cook --auto chain is still the right tool for that footprint — the fresh-context premium is only worth paying when the spec actually crosses module boundaries broadly enough to flip the verdict to high, or when the spec decomposes into 2+ independent curds.
Rules
- Dialogue first; artifacts are the by-product.
- Tiered lettered options. Consequential forks (scope, approach, non-goals, interface/seam, trade-offs) are posed to the user as
A/B/C/D choices — they cannot be resolved silently. Minor mechanical calls are made but logged [AGENT-DECIDED] inline with a one-line alternative the user can veto (ADR-003).
- Per-round decision ledger. Each dialogue round prints
Decided / Asking / [AGENT-DECIDED]. At curdle the ledger persists to the ADR(s) (references/adr.md) plus a one-line minor decision-log on the spec; no separate ledger file (ADR-004).
- Decision map. After 3 consecutive fork questions, or whenever the user asks "what forks are left?", render a compact decision map from the existing ledger: Done forks (from
Decided), Remaining-before-curdle forks split into required (the mandatory gates in references/handshake.md § Mandatory gates) vs optional, and a one-line curdle-readiness verdict (ready, or blocked naming the unmet gate). This is a rendering of the ledger and handshake checklist already tracked, not a new artifact, file, or script.
- Do not implement code.
- Do not write production files before the approval gate.
- Do not silently settle uncertain claims.
- Apply the shared voice kernel (lives at
../age/references/voice.md): correct false premises, flag confidence as certain | speculating | don't know on each critical claim, steelman before dismissing, and ask the user the decisions that shape the design — contributing full depth to inform each question, never to replace asking it.
Agent resolution
Resolve exploration and research delegates through ../cheese/references/agent-resolution.md.
| Work | Preferred types | Permissions/isolation | Minimum power | Effort | Fallback |
|---|
| Explore the codebase | explorer | read-only, fresh-context | default | medium | compatible explorer, then general |
| Research external constraints | researcher | read-only, fresh-context | default | medium | compatible researcher, then general |
The canonical mold spec or mini-spec carries the shared agent_resolution block.