/cog-second-brain:ultragoalfrom cog-second-brain
Manages large multi-session goals through a V-model closed loop with cross-session state, phase decomposition, and adversarial verification. Invoke with /ultragoal.
Ships in cog-second-brain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
An ultragoal is the term for a north-star that spans many sessions: fork the repos, combine the strong parts, ship one product. A /closed-loop run is one task through the loop. An ultragoal is a chain of phases, each of which is its own full closed-loop run, tracked so any cold session can resume.
Core rule (from dwarves-kit, adopted fully): the worker never grades its own homework, and wrongness compounds across sessions — so verify every phase, not just the end.
/ultragoal <name> — resume or advance an existing ultragoal/ultragoal new "<north-star>" — charter a new one/ultragoal status: report all ultragoals from the registry. If the registry does not exist yet, report that no ultragoals are registered. Do not create a fileDo not use for single-run work (that is /closed-loop), and do not start one on a request that never asked for one. Rule of thumb: if it needs a phase decomposition and won't finish today, it is an ultragoal.
| File | Role |
|---|---|
04-projects/harness/ultragoals.md | Mutable user registry. Created on the first /ultragoal new; never overwrite an existing registry |
04-projects/<goal>/spec.md | Contract: north-star + AC-n acceptance criteria + phases P0…Pn + traceability matrix |
04-projects/<goal>/STATUS.md | Living ledger: phase state, current phase, open AC-n, next action (resume from here) |
04-projects/<goal>/evidence/P<n>/ | Per-phase evidence bundle (ledger.md + CP-* files) |
Code, if any, lives outside the vault (e.g. ~/code/<goal>/) — the spec/status/evidence stay in the vault.
The registry is user state, not a framework file. Do not add it to cog-update.sh FRAMEWORK_FILES and never replace an existing copy.
/ultragoal status: if 04-projects/harness/ultragoals.md is absent, return No registered ultragoals. and stop. This command stays read-only./ultragoal new: before the first registry write, create 04-projects/harness/ if needed. If the registry is absent, create it exactly once with this starter shape, then append the new goal row. If it exists, preserve all existing rows.# Ultragoal Registry
| Goal | Overall status | Current phase | Updated | Goal folder |
|---|---|---|---|---|
Registry rows point to each goal's STATUS.md; STATUS.md remains the detailed source of truth.
/ultragoal new)AC-n criteria define correct. The bar defines good. A critic must be able to compare the artifact with the bar side by side. Examples: screenshots of an app to match, an exemplar site or report in the same category, a test suite or a latency target for backend work. "Make it amazing" is not a bar. If the user does not know the right bar, finding one is part of P0: research candidates and propose two or three for the user to pick. The idea comes from the Gauntlet Loop.04-projects/<goal>/spec.md from ../closed-loop/references/spec-template.md:
AC-n acceptance criteria (these define done for the whole goal)P0…Pn — each phase is a shippable increment mapped to a subset of AC-nAC-n ↔ phase ↔ status)STATUS.md (see template below), then append one registry row for the new goal without changing unrelated rows.Record: bash .claude/lib/checkpoint.sh record 04-projects/<goal>/evidence/P0 CP-1 PASS "N criteria, M phases"
Each phase runs the full closed loop. Do not shortcut with tiny. Ultragoals are full lane by construction.
select next phase from STATUS.md
│
▼
CP-2 PLAN tasks for this phase ↔ AC-n → evidence/P<n>/CP-2-plan.md
│
▼
CP-3 BUILD worker implements (traced to AC-n); returns paths only
│
▼ (optional: high-variance, cheap, non-mutating artifact)
SELECT fan out N candidates, pivot tournament, winner (/best-of-n)
│
▼ (only if the phase is bar-gated: see Gauntlet rounds)
GAUNTLET builder and fresh critic against the reference bar, largest gap per round
│
▼
CP-3v VERIFY task-verifier (fresh context, read-only) → evidence rows per AC-n
│ ├── FAIL:fixable → fix-agent (max 2) → re-verify
│ └── FAIL:escalate → stop, escalate to the user
▼
CP-4 INTEGRATE integration-verifier → does this phase wire correctly with prior phases?
│ (always run for ultragoals — cross-phase regression is the main risk)
▼
CP-5 ACCEPT observe the artifact (curl / screenshot / re-fetch), not the tool return
│ EVIDENCE AC-n | CP-5 | PASS | <observation> | <artifact>
▼
CP-6 SHIP external mutation? → Review Gate: you approve. Internal? → auto.
│
▼
update STATUS.md (phase → done, advance current phase, log open AC-n)
│
▼
CP-7 RETRO /retro 04-projects/<goal>/evidence/P<n> → harvest + STATUS
Merge every verifier's EVIDENCE rows into evidence/P<n>/ledger.md.
The verify steps catch wrong output. Nothing in them pushes an adequate artifact toward a good one. A phase that the spec marks bar-gated (UI, reports, content, anywhere quality is the point) adds gauntlet rounds between CP-3 and CP-3v. The method follows the Gauntlet Loop.
round:
1. A builder makes or improves the artifact.
2. A fresh-context critic (a read-only subagent that gets the artifact path
and the reference bar, never the builder's summary) inspects the ACTUAL
artifact next to the bar: pixels, rendered output, test results.
3. The critic returns BAR-PARITY, or the SINGLE largest remaining gap.
4. A gap goes back to the builder, and the next round starts.
Stop condition. The loop ends on bar parity (or a critic verdict that the remaining gaps are taste, not quality), or when the user calls the phase ready. A builder saying "good enough" does not end it. When rounds go flat, change the angle (a new critic lens, a different facet split, a different builder approach) and record the flat streak in STATUS.md so the user can call it.
Rules for the rounds:
CLAUDE.md.integration-verifier reads the whole artifact for seams between facets. Its findings go to one worker that fixes cohesion only. No redesign.evidence/P<n>/gauntlet/round-<k>/. The last verdict becomes an EVIDENCE row in the ledger, and report.html shows the progression.fix-agent through CP-3v with its two-attempt wall./best-of-n picks the round 0 artifact, and the gauntlet then improves it. Skip selection when the artifact is expensive to regenerate or changes external state.AC-n this phase claims has a PASS row before the phase is marked done.AC-n across all phases has ≥1 PASS evidence row. Any AC-n without one is a gap, not a ship. This is the ultragoal-level analogue of CP-5.North-star acceptance:
read spec.md matrix (all AC-n)
read every evidence/P*/ledger.md
for each AC-n: assert ≥1 PASS row exists, artifact re-observed
any miss → list open AC-n, STATUS stays "in progress", do NOT declare done
Every ultragoal carries a single self-contained HTML report that covers everything: north-star, live status, all phases, the full AC-n traceability table with pass/open/fail, evidence rows per phase, and the open-items / next-action block.
closed-loop, then run python3 scripts/render-harness-report.py --data <report-data.json> --output 04-projects/<goal>/report.html. The renderer uses .claude/skills/closed-loop/references/report-template.html by default.data:image/png, jpeg, webp, or gif entries in the structured media list. Arbitrary HTML and non-image data URIs are rejected.04-projects/<goal>/report.html. One file, overwritten each phase so it reflects current truth.AC-n with a PASS row. If any status is open, the goal is not done.artifact-design skill.SendUserFile 04-projects/<goal>/report.html (display: render) so the user can open it, or publish via Artifact for a shareable link.# <Goal> — status ledger
North-star: <one sentence>
Reference bar: <the exemplar and the phases it gates, or "none (no bar-gated phases)">
Spec: 04-projects/<goal>/spec.md · Registry: 04-projects/harness/ultragoals.md
Current phase: P<n> · Overall: <not-started|in-progress|blocked|done>
## Phases
| Phase | AC covered | State | Evidence | Notes |
|---|---|---|---|---|
| P0 | AC-1,AC-2 | done | evidence/P0/ | <one line> |
| P1 | AC-3 | in-progress | evidence/P1/ | <what's left> |
## Open AC-n (no PASS row yet)
- AC-3 — <why still open>
## Next action (resume cold from here)
<the single next concrete step + any user-gated decision waiting>
/ultragoal <name> with no other context:
04-projects/<goal>/STATUS.md → "Next action" and "Open AC-n".done unless integration verify caught a regression.fix-agent wall) are separate tracks.evidence/P<n>/ and feeds report.html. See CLAUDE.md → Visual Verification.task-verifier, integration-verifier, north-star verifier get paths only — never paste worker output in (CLAUDE.md fresh-context isolation).ULTRAGOAL ESCALATED — <goal> / P<n>
Last CP: <CP-id> | Open AC: <list without PASS rows>
Evidence: 04-projects/<goal>/evidence/P<n>/
Decision needed: <one question>
Live list: 04-projects/harness/ultragoals.md. Each ultragoal gets its own 04-projects/<goal>/ folder holding spec.md, STATUS.md, evidence/, and report.html.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
long-running-goals, multi-session, project-management, v-model
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: skills: Invalid input, repository: Invalid input: expected string, received object
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
49 skills in this plugin
/auto-researchDeep strategic research engine — decomposes questions into parallel research threads, spawns multiple agents, and synthesizes into actionable strategic analysis/best-of-nSelector stage before a verification gate - generate N candidates in parallel, pick the best with a pivot tournament of pairwise judgements, then gate the winner. For high-variance, non-mutating deliverables only/blog-publishWrite and publish a post to your own static blog end to end: content checklist (embedded links, optional TL;DR), per-post ASCII art, an agent-readable markdown twin, deploy, and social distribution. Use when you say "write a blog post", "publish this to my blog", or "push this post to socials".
/braindumpQuick capture of raw thoughts with intelligent domain classification and competitive intelligence extraction/closed-loopRun one task through the V-model verification loop: CP-2 plan → CP-3 build → CP-3v component verify → CP-4 integration verify (full lane) → CP-5 acceptance. The worker never grades its own homework; evidence rows trace back to AC-n. Opt-in: invoke with /closed-loop or by asking for the closed loop, proper verification, or an evidence trail. Ordinary work does not run this.
/comprehensive-analysisDeep-dive 7-day analysis across all data sources for weekly reviews, board prep, and strategic planningOther plugins' skills for the same job