define
$
npx mdskill add doodledood/manifest-dev/defineBuilds a verifiable Manifest from shared understanding
- Solves the problem of turning discussions into structured deliverables
- Relies on Manifest format, ASM, and BABYSIT_MODE synthesis flow
- Balances encoding decisions with auto-answers and user guidance
- Saves output as a Manifest file for execution and acceptance
SKILL.md
.github/skills/defineView on GitHub ↗
---
name: define
description: 'Manifest builder. Turns shared understanding into a verifiable Manifest with Deliverables, Acceptance Criteria, Global Invariants, and Approach. Use when planning features, scoping refactors, debugging complex issues, or when the user asks to define, scope, plan, spec out, make a manifest, or break down a task.'
argument-hint: '[task] [<manifest-path> to amend] [--babysit <pr-url>] [--canvas]'
user-invocable: true
---
Encode the conversation's shared understanding as a Manifest at `<scratch>/manifest-{ts}.md` (writable scratch path — prefer `/tmp/` when writable, else `$TMPDIR` / `%TEMP%`). If the transcript lacks shared understanding, invoke `manifest-dev:figure-out` first; propagate `--autonomous` when invoked from `/auto` or `/do`'s amendment path. **Pre-flight:** if `--babysit <pr-url>`, load `references/BABYSIT_MODE.md` and follow its synthesis flow; if `$ARGUMENTS` contains a manifest file path, amend (see below); else fresh.
**Encoding discipline.** figure-out reaches shared understanding of the *problem*; /define handles manifest-specific *encoding* judgment calls — invariant vs process guidance, AC scope and pass threshold, phase ordering (fast vs slow), trade-offs to lock as `[T-N]`. Surface the load-bearing encoding decisions briefly with a recommended answer before encoding; auto-decide the rest and mark `(auto)` + matching ASM. The manifest is the acceptance contract — what the user accepts as *"I'd ship the outcome of executing this."*
**Task files.** Identify task type; load applicable files from `tasks/` per `tasks/README.md` — their gates and Defaults auto-encode before the interview. For code tasks, also compose `tasks/PR_LIFECYCLE.md` when origin is on github.com; probe if origin is missing or a github-enterprise host. Per-repo for multi-repo manifests.
**Verifier prompt discipline.** Before writing `verify.prompt` fields, invoke the prompt-engineering skill if it is available; if not, apply its core discipline inline. Verifier prompts are prompts: state the verifier's goal, evidence to inspect, PASS/FAIL/BLOCKED contract, and non-obvious context. Do not run a separate prompt-engineering interview — /define owns the manifest interview.
## Manifest Schema
````markdown
# Definition: [Title]
## 1. Intent & Context
- **Goal:** [High-level purpose]
- **Mental Model:** [Key concepts to understand]
## 2. Approach (Complex Tasks Only)
*Initial direction, not rigid plan. Expect adjustment when reality diverges.*
- **Architecture:** [High-level HOW — starting direction]
- **Execution Order:**
- D1 → D2 → D3
- Rationale: [why this order]
- **Risk Areas:**
- [R-1] [What could go wrong] | Detect: [how you'd know]
- **Trade-offs:**
- [T-1] [Priority A] vs [Priority B] → Prefer [A] because [reason]
## 3. Global Invariants
*Rules that apply to the ENTIRE execution. If these fail, the task fails.*
- [INV-G1] Description: ...
```yaml
verify:
prompt: "..." # required, verbatim verifier instruction
agent: "..." # optional, default = general-purpose subagent
model: "..." # optional, default = inherit from invoking context
phase: 1 # optional integer, default 1; higher phases run after lower pass
```
## 4. Process Guidance
*Constraints on HOW to work. Not gates — guidance for the implementer.*
- [PG-1] Description: ...
## 5. Known Assumptions
- [ASM-1] [What was assumed] | Default: [chosen value] | Impact if wrong: [consequence]
## 6. Deliverables
*Ordered by execution order from Approach, or by dependency then importance.*
### Deliverable 1: [Name]
**Acceptance Criteria:**
- [AC-1.1] Description: ...
```yaml
verify:
prompt: "..." # required, verbatim verifier instruction
agent: "..." # optional, default = general-purpose subagent
model: "..." # optional, default = inherit from invoking context
phase: 1 # optional integer, default 1; higher phases run after lower pass
```
````
Verifiers return **PASS**, **FAIL**, or **BLOCKED** (waiting on external action — `/do` routes via `/escalate`). Automate verification — criteria that genuinely require human action belong in Process Guidance, not as ACs. Auto-decided items carry `(auto)` after the ID with a matching ASM entry.
**Amendment.** A manifest path in `$ARGUMENTS` means amend. Read it fully, apply targeted changes only — preserve unaffected items verbatim. IDs are stable (modify in place; remove without renumbering). No `## Amendments` log — git is history. Autonomous when caller is `/auto` or `/do`; interactive otherwise.
**Flags.** `--babysit <pr-url>` — load `references/BABYSIT_MODE.md`; synthesizes a lifecycle-only manifest from a PR. `--canvas` — load `references/CANVAS_MODE.md`; generates a Shared Understanding Canvas alongside the manifest. `--autonomous` skips summary approval and lets figure-out self-answer. When the task spans multiple repos (manifest declares `Repos:` in Intent), load `references/MULTI_REPO.md`.
**Summary for Approval.** Before Complete, write a plain-language digest (plan / what / guardrails / how-verified) — no codes, no YAML, no schema vocab. **Test:** reads like talking to a colleague, not a compressed manifest. Approval → Complete; feedback → revise; `/do` → handoff; decline → exit silently. Skip the wait when caller is `/auto` or `/do` amendment, or the user signals "enough".
**Complete.** Emit the load-bearing handoff (`<manifest-path>` is the absolute path you wrote; `<dir>` is the project directory in slug form, e.g. `-home-user-manifest-dev`):
```text
Manifest complete: <manifest-path>
Session: ~/.claude/projects/<dir>/${CLAUDE_SESSION_ID}.jsonl
To execute: /do <manifest-path>
```
More from doodledood/manifest-dev
- autoEnd-to-end autonomous execution: figure-out → define → do, chained without manual approval gates. Use when you want to define and execute without intervention during planning, when the user asks for autonomous or end-to-end work, says just build it, or asks to tend or babysit a PR.
- auto-optimize-promptIteratively auto-optimize a prompt until no issues remain. Uses prompt-reviewer in a loop, asks user for ambiguities, applies fixes via prompt-engineering skill. Runs until converged.
- compress-promptCompresses prompts/skills into minimal goal-focused instructions. Trusts the model, drops what it already knows, maximizes action space. Use when asked to compress, condense, or minimize a prompt.
- doneCompletion marker for the /do workflow. Outputs a plain-prose summary of what was built. Called by /do after every Acceptance Criterion and Global Invariant verifies PASS, when the manifest is complete, all criteria pass, or the workflow needs to wrap up with a completion summary.
- escalateStructured escalation when /do hits an unrecoverable blocker. Surfaces what was tried, why it failed, and what the user can decide. Called by /do when work is blocked, cannot proceed, hits an unrecoverable failure, needs a user decision, or gets stuck.
- exampleAnalyzes the current project structure and tech stack. Use when asked to explore, understand, or summarize a project. Trigger terms: project overview, analyze codebase, what is this project.
- figure-outFigure things out together — any topic, problem, or idea. Presses relentlessly until shared understanding is reached. Use when you need to understand before acting, when figuring it out is the goal, or when the user asks to think through a decision, dig deeper, press an assumption, investigate why something is happening, or work through a problem.
- figure-out-teamDrive a multi-party deliberation in a Slack channel or thread. The agent is an involved orchestrator — presses rigorously, brings evidence, names trade-offs, surfaces disagreements, advances when answers cohere; owner-by-Slack-handle overrules. Use when the people involved cannot all sit in one chat, when deliberation has to happen in Slack, or when the user asks to figure out with the team, press a group asynchronously, or get the team aligned.
- harden-task-fileHarden /define task guidance files for one-shot quality. Iterates: orthogonality gap analysis, user-approved additions, prompt review, fix, converge. Use when a task file needs comprehensive coverage or "harden task file".
- learn-from-sessionAnalyze Claude Code sessions to learn what went right/wrong and suggest high-confidence improvements to skills. Use when asked to analyze a session, learn from a session, or review workflow effectiveness.