/cog-second-brain:closed-loopfrom cog-second-brain
Runs a V-model verification loop (CP-2 plan through CP-5 acceptance) for a single task, recording evidence tied to acceptance criteria. Opt-in via /closed-loop or asking for proper verification.
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.
Read when SKILL.md points to them.
Mechanical verification pipeline. Every verify step emits evidence rows tied to acceptance criterion IDs (AC-n).
The harness is opt-in. Run it when:
/closed-loop <task> or /closed-loop <spec-path>.verification_harness: on in 00-inbox/MY-PROFILE.md and this is a build task.normal+ lane reaches its verify step.Do not run it on a request that did not ask for it. Notes, briefs, research, drafts, and ordinary edits are not harness runs, and a checkpoint ledger on those is pure overhead.
bash .claude/lib/lane-classify.sh explain "<task>"
bash .claude/lib/checkpoint.sh init 04-projects/harness/runs/<YYYY-MM-DD-HHmm>
| Lane | Checkpoints |
|---|---|
tiny | CP-3 → CP-5 (if mutating) |
normal | CP-1 → CP-2 → CP-3 → CP-3v → CP-5 |
full | + CP-4 + claim-verifier + CP-6 |
bug | root-cause ledger (CP-0) before CP-3 |
Record: checkpoint.sh record <run-dir> CP-0 PASS|SKIP "<lane>"
If spec exists, use its ## Acceptance criteria + traceability matrix. Else write:
04-projects/harness/runs/<id>/criteria.md using references/spec-template.md (criteria + matrix sections only).
Each criterion: falsifiable + AC-n ID + verify method.
Record: checkpoint.sh record <run-dir> CP-1 PASS "N criteria"
Map tasks → AC IDs in evidence/CP-2-plan.md. Update matrix status to pending.
Record: checkpoint.sh record <run-dir> CP-2 PASS
Worker implements. Returns deliverable path only.
retry=0
loop:
spawn task-verifier (fresh context, read-only)
merge EVIDENCE rows into evidence/ledger.md
if PASS → break
if FAIL:escalate → record CP-3v FAIL, escalate
if FAIL:fixable && retry < 2 → fix-agent → retry++
else → escalate
Copy verifier EVIDENCE rows into evidence/CP-3v-component.md.
Record: checkpoint.sh record <run-dir> CP-3v PASS|FAIL
full or multi-task)Spawn integration-verifier (read-only). Append rows to ledger.
Skip for single-task normal.
Record: checkpoint.sh record <run-dir> CP-4 PASS|SKIP
For each mutation, observe artifact (curl, screenshot, re-fetch). Emit:
EVIDENCE AC-n | CP-5 | PASS | <observation> | <artifact>
UI/UX flow changes: the post-condition is visual. Screenshot every meaningful state with whatever browser tooling the environment has, then read the image and confirm no overflow, misalignment, clipping, wrong color, or broken responsive layout before PASS. The Observation must describe what you saw; the artifact is the screenshot/GIF in evidence/. Fix any visual defect and re-capture. See CLAUDE.md → Visual Verification.
Write evidence/CP-5-acceptance.md. Traceability closure: every AC in matrix has ≥1 PASS row in ledger.
Record: checkpoint.sh record <run-dir> CP-5 PASS|FAIL
.claude/logs/loop-ledger.tsvverifiedfull lane / big task: generate an HTML rollup from references/report-template.html → 04-projects/harness/runs/<id>/report.html, filled from criteria.md + evidence/ledger.md (criteria, AC traceability, verifier verdicts, post-condition observations). Self-contained; SendUserFile it or publish as an Artifact. Skip for normal/tiny./retro <run-dir> for CP-7| Skill | Lane | CP-4 |
|---|---|---|
ultragoal | full per phase (never downgraded) | integration-verifier + north-star acceptance |
team-brief | full | claim-verifier |
comprehensive-analysis, auto-research | full | claim-verifier on cited claims |
content-factory | normal | skip |
review-cockpit | normal | skip; CP-6 is the user's approval per card |
ESCALATED — <task>
Lane: <lane> | Last CP: <CP-n>
Evidence bundle: 04-projects/harness/runs/<id>/evidence/
Open AC IDs: <list without PASS rows>
Decision needed: <one question>
What SKILL.md sets; muted values are Claude Code's defaults
43 skills in this plugin
/auto-researchDeep strategic research engine — decomposes questions into parallel research threads, spawns multiple agents, and synthesizes into actionable strategic analysis/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 extractionClaude 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.
Other plugins' skills for the same job