memex
Persistent memory for AI coding agents. Your agent remembers what it learned across sessions.
A full team in a single Claude Code skill. You're the CEO — OPC is everyone else.
$ npx -y skills add iamtouchskyer/opc --agent claude-code
A full team in a single Claude Code skill. You're the CEO — OPC is everyone else.
21 built-in roles (PM, Designer, Security, Devil's Advocate, and more) that build, review, and evaluate your code through a digraph-based pipeline with code-enforced quality gates.
English | 中文
From a single one-line brief, OPC's build-verify flow ships a complete, production-quality product — design tokens injected and visual quality validated by the design-intelligence extension. Every screenshot below is a real, clickable site (not a mockup), built by the same 21-role pipeline. Same system, six completely different design languages.
Each card in the lookbook flips on hover to reveal the exact prompt that built it — e.g. Pulse came from one line:
/opc build a production-quality SaaS analytics dashboard called "Pulse"...
OPC isn't only for UIs. The same zero-trust pipeline also handles:
/opc loop build features F1–F4 from PLAN.md decomposes the work, schedules a durable cron, and runs 10+ hours without you./opc review the auth changes dispatches 2–5 independent role agents (security, backend, a11y, devil's advocate) in parallel and computes a mechanical verdict./opc implement user auth with email/password runs build → independent review → test-design → test-execute → gate./opc verify before release runs acceptance + audit + e2e gates before you ship.One principle: the agent that does the work never evaluates it.
Task → Flow Selection → Node Execution → Gate Verdict → Route Next
↑ ↓
└──────── ITERATE/FAIL ────────┘
Task inference — reads your request, picks a flow template (quick, review, build-verify, full-stack, pre-release), and enters at the right node.
Typed nodes — each node has a type (discussion, build, review, execute, gate) with specific protocols. Build nodes produce commits. Review nodes dispatch parallel subagents. Gate nodes compute verdicts from code, not LLM judgment.
Mechanical gates — verdicts are computed by opc-harness synthesize: any red = FAIL, any yellow = ITERATE, all green = PASS. No LLM gets to decide if a finding is "important enough."
Cycle limits — max 3 loops per edge, 5 re-entries per node, 20-30 total steps depending on flow. Oscillation detection catches A↔B loops.

The system is built on a zero-trust axiom: every critical output must have an independent verification path. Four layers:
OPC preserves its full multi-agent topology while avoiding accidental premium-model fan-out. Before every Agent call, opc-harness model-route resolves an explicit host-native model from layered configuration:
| Tier | Claude Code default | Typical work |
|---|---|---|
| economy | haiku | test design, user/UX observers |
| standard | sonnet | discussion, implementation, semantic review |
| premium | inherit | explicit escalation only |
inherit and opus require explicit premium approval. Claude Code's CLAUDE_CODE_SUBAGENT_MODEL environment override is detected and reported. Other hosts can replace the tier values with their own model IDs:
{
"agentRouting": {
"models": {
"economy": "your-fast-model-id",
"standard": "your-value-model-id",
"premium": "your-premium-model-id"
}
}
}
See pipeline/model-routing.md for node/role overrides and the resolver contract.
npm install -g @touchskyer/opc
Skill files are automatically copied to ~/.claude/skills/opc/.
Recent npm versions block install scripts by default — if the copy is skipped (check: opc --version prints but ~/.claude/skills/opc/SKILL.md is missing), rerun with npm install -g --allow-scripts=@touchskyer/opc, or just run opc install once afterwards.
git clone https://github.com/iamtouchskyer/opc.git
cp -r opc ~/.claude/skills/opc
# Review — dispatches 2-5 role agents in parallel
/opc review the auth changes
# Build — implements + independent review + gate
/opc implement user authentication with email/password
# Autonomous loop — decomposes, schedules cron, runs unattended
/opc loop build features F1-F4 from PLAN.md
# Interactive mode — asks clarifying questions first
/opc -i redesign the onboarding flow
# Explicit roles
/opc security devil-advocate
# Flow control
/opc skip # skip current node
/opc pass # force-pass gate
/opc stop # terminate, preserve state
/opc goto build # jump to node
/opc loop build the math tutoring app features F1-F4
What happens:
opc-harness runbook match "<task>" checks --dir flag → OPC_RUNBOOKS_DIR → ~/.opc/runbooks/ for a matching recipe. If one hits, its units / flow / tier become the plan; otherwise fall through to step 2. Disable per-invocation with OPC_DISABLE_RUNBOOKS=1. See docs/runbooks.md and examples/runbooks/add-feature.md.opc-harness enforces: git commit required, ≥2 independent reviewers, no plan tampering, no state forgery, artifact freshness, tick limitsFor well-scoped tasks, the system runs 10+ hours continuously without intervention.
| Guard | Enforcement |
|---|---|
| Write nonce | Random SHA256 at init; state written by harness only |
| Atomic writes | write → rename (POSIX atomic); no truncated JSON on crash |
| Plan integrity | SHA256 hash at init; verified every tick |
| Review independence | ≥2 eval files, identical content rejected, line overlap warned |
| Git commit required | HEAD must change for implement/fix units |
| Screenshot required | UI units must produce .png/.jpg artifact |
| Tick limits | maxTotalTicks (units×3) + 24h wall-clock deadline |
| Oscillation detection | A↔B pattern over 4-6 ticks = warning/hard stop |
| Concurrent tick mutex | in_progress status blocks overlapping cron fires |
| JSON crash recovery | try/catch on all JSON.parse; structured errors, not crashes |
| External validators | Pre-commit hooks, test suites detected at init and leveraged |
| Template | Nodes | When |
|---|---|---|
| quick | build → review → gate | "quick fix", "small change", one-liner, ≤3 files, non-UI, no logic branches |
| review | code-review → gate | PR review, audit, "find problems" |
| build-verify | brief → build → code-review → test-design → test-execute; ITERATE → hotfix → test-execute; PASS → gate | "implement X", "fix bug Y" |
| full-stack | discuss → build → review → test → acceptance → audit → e2e → gates | Complex/vague requests |
| pre-release | acceptance → audit → e2e → gates | "verify before release" |
quick vs build-verify — quick drops the structured brief node and the
test-design/test-execute split, halving nodes and evaluator dispatches. It keeps
the core quality gate (independent review + gate verdict). Use it only for true
one-liners / single-file, non-UI, no-logic-branch changes. Anything with logic
branches, multiple files, or UI → use build-verify, where test-design's enforced
L1–L5 coverage check earns its keep.
The brief node (entry of build-verify) produces a structured build brief —
resolved design tokens, file plan, component inventory, constraints — that the
build node follows. It measurably lifts first-pass build fidelity, but the brief
describes intended behavior: downstream test-design must test the actual built
code, not the brief's ideal, or it will assert behavior the build never implemented.
OPC has a capability-routed extension surface. Extensions live in
~/.claude/skills/opc-extension/<name>/ — each with ext.json (capability
declarations) + hook.mjs exporting any of promptAppend / verdictAppend
/ executeRun / artifactEmit hooks. No fork, no rebuild. Hooks are
sandboxed via per-extension timeouts + circuit breakers, so a broken
third-party extension can't take down the harness.
Persistent memory for AI coding agents. Your agent remembers what it learned across sessions.
opc is a Claude Code plugin with 1 hand-picked skill, indexed on Flowy in the Agent Orchestration category. Install it with the command on its page. It includes opc. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it