Back to Discover

second-claude-code

connector

unclejobs-ai

View on GitHub
39 starsMITSynced Aug 14, 2026

Install to Claude Code

/plugin marketplace add unclejobs-ai/second-claude-code

README

English | 한국어

version license

Second Claude Code

A Claude Code plugin that runs the whole knowledge-work cycle — research, draft, review, revise — from a single prompt.

You type one line. Researchers crawl 20+ sources. An analyst finds the patterns. A writer drafts 3,000 words — and before you ever see it, five reviewers are already tearing the draft apart. One checks the logic, one attacks the weakest claim, one verifies every number.

The point isn't that it writes. It's that it won't hand you the first draft.

Second Claude Code — Knowledge Work OS Image created with SceneSteller

One prompt to finished output

Architecture · User Manual · Skill Guides · Changelog · Issues


Install

claude plugin marketplace add unclejobs-ai/second-claude-code
claude plugin install scc

Start a session and just talk. No slash commands to memorize — the router reads intent, in English or Korean.

Research the current state of AI agent frameworks and write a report
AI 에이전트 알아보고 보고서 써줘

Nothing happening? claude plugin list to confirm the install.


Why

  • It refuses its own output. Three to five reviewers with different lenses attack every draft. A review that returns zero findings is treated as a rubber stamp, not a pass.
  • Failures route by cause. Thin research goes back to Plan. Botched execution goes back to Do. A rough edge goes to Refine. Not everything is "try again."
  • Gates are checks, not vibes. Plan can't reach Do without 5 distinct sources and an approved plan. Each gate names what's missing.
  • It learns your voice. SOUL.md holds your tone rules and anti-patterns, and the tone reviewer enforces those — not a generic style guide.
  • Every run leaves a record. Which gates fired, what each reviewer caught, every re-entry and why. Exportable as one shareable page.
  • Nothing else required. No API key, no second plugin, no service. Everything above runs on this plugin alone.

The Loop

Every prompt runs through Plan → Do → Check → Act, with hard gates between phases.

"Research AI agents and write a report"

[Plan]  Crawl 20+ sources, find patterns, synthesize a brief
        ↓ gate: 5 distinct sources + an approved plan
[Do]    Write a full draft grounded in that research
        ↓ gate: complete artifact, findings integrated
[Check] 3–5 reviewers run in parallel, each on a different dimension
        ↓ gate: score + vote thresholds; any Critical blocks
[Act]   Action Router reads the failure and picks where to go back to

The Action Router is the part that matters. When review finds a problem it classifies the root cause and re-enters the phase that caused it — a research gap goes back to research, not to a generic retry. That's why the second pass is dramatically better than the first, and why runs converge instead of looping.

PDCA Cycle


Skills

18 skills, each deep enough that you never have to pick between eighty. Say what you want; the router handles the rest. Slash commands (/scc:write, /scc:review, …) are there when you want to be precise.

The whole cycle

SkillWhat it does
pdcaResearch → write → review → route back, until it passes

Plan — gather

SkillWhat it does
deep-interviewSocratic questions until nothing's ambiguous, then an approval-gated spec
research20+ sources crawled, patterns synthesized, brief delivered
collectSave a URL or note; it lands PARA-classified, not in a pile
discoverFinds and installs the skill you don't have yet
unblockFetches what WebFetch can't — 9-phase escalation, zero API keys

Do — produce

SkillWhat it does
writeArticle, report, newsletter — research-backed and review-verified
analyze15 strategy frameworks (SWOT, Porter, RICE…) applied properly, not name-dropped
workflowChain skills into a pipeline you can rerun with one argument changed
batchSplits a large task into independent units and runs them at once

Check — verify

SkillWhat it does
review3–5 reviewers, different lenses, consensus vote
investigateRoot-causes the failure before anyone touches the fix

Act — improve

SkillWhat it does
refineRewrites until reviewers pass; --dod lets you set the bar
translateEN↔KO that keeps your voice instead of flattening it
soulLearns your tone rules across sessions and enforces them on your drafts
viewerOpens a run as a shareable page: gates, verdicts, every re-entry

Maintainer-only — slash commands, never auto-routed

SkillWhat it does
loopBenchmarks prompt assets against a fixed suite, promotes the winner on an isolated branch
evolveFeeds repeated gate failures back into the asset that caused them
Maintainer loops in detail

loop runs a fixed benchmark suite against prompt assets (skills/**/SKILL.md, commands/*.md, agents/*.md, templates/*.md) and promotes the best candidate only inside an isolated codex/loop-… branch. State is resumable in .data/state/loop-active.json; the leaderboard, score history, and winner diff land in .captures/loop-<run_id>/.

/scc:loop list-suites
/scc:loop run write-core --targets skills/write/SKILL.md --parallel 2 --max-generations 2

evolve closes the ring on top of it. When the same gate keeps failing, it harvests those real failures, has the maintainer hand-author the structural check, then hands the asset to the unmodified loop engine. The optimizer never writes its own success criterion, and merging the winner stays a manual decision after reading winner.diff.

/scc:evolve list-failures
/scc:evolve harvest <id> --assertion '/scc:'
/scc:evolve run evolve-<id>

Full design and its adversarial-review history: evolve-ouroboros-spec.md.


The Review System

Every output passes a multi-agent review before it reaches you.

ReviewerWhat it checks
Xatu — deep reviewerLogic, completeness, argument flow
Absol — devil's advocateFinds the weakest point and attacks it
Porygon — fact checkerEvery number, claim, and source
Jigglypuff — tone guardianVoice consistency, audience fit
Unown — structure analystReadability, organization, flow

Each returns a 0.0–1.0 score plus findings tagged Critical, Warning, or Nitpick. The gate is dual-track: the score says how good it is, the votes say how many reviewers agree it's ready. Any Critical finding blocks, regardless of score.

Review Flow

Review presets
PresetReviewersBest for
contentDeep + Advocate + ToneArticles, blogs, newsletters
strategyDeep + Advocate + FactsPRDs, SWOTs, strategy docs
codeDeep + Facts + StructureCode review
securityDeep + Facts + StructureSecurity audit (CWE, OWASP Top 10)
academicDeep + Facts + StructurePapers, research outputs, citations
quickAdvocate + FactsFast validation, under a minute
fullall 5Final pre-publish pass

--external adds cross-model review through MMBridge (Kimi, Qwen, Gemini, Codex) behind an adapter protocol, so tests keep a deterministic stubbed path. Real external runs need separate setup, and they send the draft to those providers — leave it off for anything confidential.


Under the Hood

Cycle memory — the 10th run is smarter than the 1st

Every phase transition writes its artifact to .data/cycles/cycle-NNN/<phase>.md and logs the decision to that cycle's events.jsonl. No manual saves.

When a run starts it reads .data/cycles/insights.json first, so it begins with what earlier runs learned. Insights older than 30 days decay in rank, and a category that keeps producing critical findings gets written up as a gotcha proposal for the maintainer to promote into a checklist.

.data/cycles/
├── cycle-001/
│   ├── plan.md / do.md / check.md / act.md
│   ├── metrics.json
│   └── events.jsonl
└── insights.json
Domain-aware gates — code and prose aren't judged the same

pdca_start_run(domain=…) loads a different contract set from config/stage-contracts.json, defining entry criteria, exit criteria, and Definition of Done per phase.

DomainPlanDoCheckAct
codeExecutable plan + approval gate for risky workScoped branch/worktree, tests, stage reportValidator proof, not worker self-reportCleanup, handoff, CI or local verification
contentResearch brief with sourcesFull draft with citations5-reviewer consensus: logic, facts, toneEditorial polish, publish-ready
analysisData collection + framework choiceStructured analysis outputMethodology and numbers validatedActionable recommendations
pipelineSpec + rollback planImplementation + dry runIntegration and load testsDeployment checklist verified

The code domain runs the Code Engineering Lane — the same four phases, tightened around executable acceptance criteria, worker/validator separation, human approval for broad changes, and an explicit handoff state.

pdca_transition returns one of three outcomes: PROCEED, REFINE (bounded improvement round), or PIVOT (wrong phase — re-enter elsewhere, with retry caps).

17 agents across 3 model tiers

Cost-optimized, not all opus: 4 opus / 11 sonnet / 2 haiku. Each agent has a focused prompt and limited tools — the writer has no web search, the reviewers don't write. Pokemon names because "Xatu found a logic gap" is easier to track in a log than "reviewer-3 found issue."

PhaseAgentRoleModel
PlanEeveeResearcher — web search, collectionsonnet
NoctowlSearch specialisthaiku
AlakazamAnalyst — pattern recognitionsonnet
MewtwoStrategist — framework analysissonnet
DoSmeargleWriter — long-formopus
ArceusMaster — general executionsonnet
CheckXatuDeep reviewer — logic, structureopus
AbsolDevil's advocatesonnet
PorygonFact checkersonnet
JigglypuffTone guardiansonnet
UnownStructure analystsonnet
ActDittoEditor — refinementopus
InfraMachampPipeline step executorsonnet
MagnezoneSkill candidate inspectorsonnet
DeoxysSkill candidate scorersonnet
AbraKnowledge connectorhaiku
PikachuSoul keeper — behavior synthesisopus

Agent Roster

Session-end report — the cycle leaves a dashboard behind

When a cycle reaches Act, session-end prints a summary box to the terminal:

┌─── PDCA Cycle #2 ───┐
│ Plan ✓  Do ✓  Check ⚠  Act ✓  │
│ Time: 4m  Issues: 3  Score: 74 │
└────────────────────────────────┘

Check shows , , or depending on the verdict; score is 0–100.

It also writes a self-contained HTML dashboard to .data/reports/cycle-N.html (plus a .mmd flow diagram) with the phase timeline, every issue the reviewers raised, and the next action — and prints the path. Generated by hooks/lib/report-generator.mjs, so a finished run leaves a persistent artifact instead of terminal scrollback.

Hooks and state — 8 lifecycle hooks, 31 MCP tools

Hooks fire automatically; you never call them. SessionStart initializes state, UserPromptSubmit runs the auto-router, SubagentStart injects review context into the agent, SubagentStop aggregates reviewer consensus, Stop saves output and cleans up, StopFailure blocks delivery when the Check gate fails, and PreCompact/PostCompact serialize and restore state so a compacted session resumes mid-cycle instead of restarting.

The router checks compound intent first: "research and write" matches there and routes to pdca immediately — the cycle is the thing that adds review and correction. Only single-purpose prompts continue to skill scoring and external plugin dispatch.

A dedicated pdca-state MCP server (stdio) exposes 31 tools across PDCA state, cycle memory, soul, project memory, daemon control, session recall, and plugin orchestration. Every transition, gate decision, review score, and action route is event-sourced, so run history is queryable and recurring failure patterns are visible.

Full tool reference: docs/architecture.md.

Cross-plugin dispatch — an accelerant, not a dependency

The orchestrator scans ~/.claude/plugins/ at session start and maps what it finds to PDCA phases. If you have coderabbit installed, "코드 리뷰해줘" dispatches there instead of running the built-in reviewers. commit-commands catches "커밋해줘." Install a plugin and it appears; uninstall it and it's gone. No config files.

With none installed, nothing degrades — the orchestrator finds no match and the built-in reviewers, writer, and committer handle it.

One thing is pinned rather than discovered: which plugin each intent prefers. INTENT_PROFILES ships with review → coderabbit, act → commit-commands, design → frontend-design, memory → claude-mem. Drop a plugin-preferences.json into CLAUDE_PLUGIN_DATA to override it, or an empty array to remove the pin.

Background runs — queued, never auto-executed

daemon_start_background_run returns the command that starts the work; it doesn't run anything itself.

claude --bg "/scc:workflow run weekly-digest"
claude agents

That's deliberate. Claude Code already ships background agents, and reimplementing them in a plugin would mean worse lifecycle handling and no crash recovery. The stronger reason is consent: this plugin gates publishing, pushing, and sending mail behind approval in the conversation, and a background executor has no conversation in which to ask.


Configuration

Works out of the box. One optional JSON file, and every field in it is optional.

{
  "defaults": {
    "research_depth": "medium",     // "shallow" | "medium" | "deep"
    "write_voice": "peer-mentor",
    "review_preset": "content",     // content | strategy | code | security | academic | quick | full
    "refine_max_iterations": 3,
    "publish_target": "file"        // "file" | "notion"
  },
  "quality_gate": {
    "consensus_threshold": 0.67,
    "external_reviewers": []        // ["kimi", "qwen", "gemini", "codex"]
  }
}

Trade-offs

Every limitation here is a choice.

  • Auto-routing gets ~95% of prompts right. For the rest, /scc:* commands give you full control.
  • Cheap agents keep high-volume work affordable — but with many plugins active, context gets tight. Disable what you don't use.
  • Claude Code is the tested platform. OpenClaw, Codex, and Gemini CLI work through SKILL.md / ACP, but are experimental.
  • Subagent results arrive complete, not streamed. Partial results would break the gate model.
  • Review findings come back in English regardless of input language. Korean output is planned.

Disagree with one? Open an issue — the reasoning changes with new evidence.


15 strategy frameworks in /scc:analyze
CategoryFrameworks
Strategyansoff, porter, pestle, north-star, value-prop
Planningprd, okr, lean-canvas, gtm, battlecard
Prioritizationrice, pricing
Analysisswot, persona, journey-map

Auto-selected from your prompt, or name one directly:

/scc:analyze porter "cloud infrastructure market"
/scc:analyze rice --input features.md

Issues and pull requests welcome. Built by Unclejobs. MIT License.

Release history: CHANGELOG.md

Rendered live from unclejobs-ai/second-claude-code's GitHub README — not stored, always reflects the source repo.

1 Plugin

NameDescriptionCategorySource
sccPDCA-native Knowledge Work OS with Cross-Plugin Orchestrator — 18 skills, 17 Pokemon agents, 31 MCP tools, Artifact Viewer, Cycle Memory with Self-Evolution, Code Engineering Lane, and zero-key adaptive fetchproductivity./

0 Comments

Login required
Log in to post a comment or update on this repo.

No comments yet — be the first to share an update.