English | 한국어
Every time an agent makes a mistake, change the system so that mistake cannot structurally happen again.
A customized Claude Code harness built on everything-claude-code. The core addition: an ontology-driven structural error prevention system that makes agent failures self-correcting at the harness level.
everything-claude-code is a production-ready performance optimization system for AI agent harnesses — skills, instincts, memory persistence, continuous learning, and cross-harness compatibility (Claude Code, Codex, Cowork).
oh-my-forge keeps all of that and adds two things on top:
1. Ontology-driven structural error prevention
When an agent makes a mistake, the default response is to patch the prompt. That's fragile — the same mistake resurfaces in a new session with a fresh context. oh-my-forge treats mistakes as system signals: each error is classified, routed, and converted into a structural change (a new constraint in the ontology, or a failure instinct in the learning pipeline) so the same failure cannot happen again.
2. Ontology as a GPS for implementation
Claude Code plans. The ontology index (index.json) acts as a coordinate map — Claude reads only the domain index and one spec doc (~3K tokens) instead of exploring the full source tree, then generates a structured BRIEF. Implementation is handled by whichever engine is available:
- Codex — if the
codexCLI is installed (/codex-delegate) - Claude — automatic fallback when Codex is not installed (
/claude-implement)
No configuration needed. The engine is auto-detected at plan time.
Three principles:
- Structural prevention over prompt patching — if a mistake can happen twice, the system is wrong, not the prompt
- Ontology + harness co-design — constraints, file coordinates, and specs are defined together
- Every session teaches the system — learning is automatic, not manual
The central knowledge graph. Maps logical domains to their files, constraints, and feature specs.
"domain_hooks": {
"files": ["hooks/hooks.json", "scripts/hooks/..."],
"spec": "docs/features/hooks.md",
"constraints": [
"블로킹 훅(PreToolUse, Stop)은 200ms 이하 — 네트워크 호출 금지",
"신규 훅은 run-with-flags.js 래퍼를 통해서만 등록"
],
"riskLevel": "high",
"codexWorkerHint": "workspace-write"
}Each domain_* entry defines:
- files — which files belong to this domain
- spec — the feature doc agents read to understand intent
- constraints — rules agents must follow, with optional machine-checkable patterns (
|pattern:keyword) - codexWorkerHint —
"read-only"or"workspace-write", tells Codex what role to take - riskLevel —
"high"triggers stronger warnings from the constraint guard
Schema: /.claude/ontology/_schema.json validates every domain entry.
The ontology index doubles as a GPS for implementation. Instead of giving the implementer the full source tree, Claude reads only index.json and the relevant spec doc (~3K tokens total), then generates a structured BRIEF.
/plan → auto-detects engine → /codex-delegate (Codex CLI installed)
→ /claude-implement (no Codex, Claude-only)
Both commands use the same BRIEF format and produce the same HANDOFF output — the engine is interchangeable. The /plan skill enforces Codex-first delegation and guards against silent fallback loops (fixed in v1.10.x).
Engine detection (first match wins):
CLAUDE_IMPL_ENGINEenv var (claudeorcodex)- Project
.claude/settings.json→implementationEngine - Global
~/.claude/settings.json→implementationEngine - Auto-detect:
codexbinary absent →"claude" - Default:
"codex"
Project/global implementationEngine is operator configuration, not an in-session escape hatch. pre-write-edit-codex-guard pins the resolved engine per session and blocks direct .claude/settings.json engine flips unless ECC_BYPASS_CODEX_GUARD=1 is set explicitly.
When Codex is pinned, pre-bash-codex-guard also blocks shell-level writes to ontology-tracked files (cat >, heredoc, tee, cp/mv, inline Python/Node writes, in-place editors). Bash is no longer a silent bypass around the Edit/Write guard.
BRIEF
=====
DOMAIN: domain_hooks
WRITE: true
TASK: Add ECC_DISABLED_HOOKS support to the PostToolUse handler
FILES:
hooks/hooks.json
scripts/hooks/run-with-flags.js
...
CONSTRAINTS:
블로킹 훅(PreToolUse, Stop)은 200ms 이하 — 네트워크 호출 금지
신규 훅은 run-with-flags.js 래퍼를 통해서만 등록
...
HANDOFF FORMAT:
RESULT: DONE | BLOCKED | PARTIAL
FILES CHANGED: <list>
TESTS: PASS | FAIL | SKIPPED
SUMMARY: <one paragraph>
When to use which:
| Condition | Action |
|---|---|
| Codex CLI installed | /codex-delegate domain_X "task" (or let /plan route automatically) |
| Claude-only subscription | /claude-implement domain_X "task" (or let /plan route automatically) |
| Multi-domain task | Decompose first, then delegate each domain |
| Architecture decision | Handle in Claude directly — do not delegate |
| Security-sensitive code | Implement, then /code-review |
A PreToolUse hook that runs before every Write, Edit, or MultiEdit.
When an agent edits a file in a tracked domain, this hook:
- Looks up which
domain_*owns that file - Extracts machine-checkable patterns from the domain's
constraints[] - Warns to stderr if the proposed content matches a violation pattern
// Constraint format
"No network calls in blocking hooks — 200ms limit|pattern:require('node-fetch')|pattern:require('axios')"
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// machine-checked patterns
- Always exits
0— never blocks tool execution - Session-scoped: each warning fires at most once per session
riskLevel: "high"domains get a strongerWARNING: HIGH RISKheader
The /error-capture command is the entry point for the learning loop.
When an agent makes a mistake, run:
/error-capture "hooks script made a direct DB call"
/error-capture scripts/hooks/my-hook.js "added network call without knowing the 200ms limit"
The command:
- Classifies the error — ontology gap, harness gap, or both
- Routes to the right fix:
- Ontology gap → adds a new constraint to
index.json+ updates the feature spec - Harness gap → creates a failure instinct file for
continuous-learning-v2
- Ontology gap → adds a new constraint to
- Outputs a structured report showing exactly why the same mistake won't happen again
Extracts patterns from sessions and promotes them to instincts, then to structural constraints.
Pipeline:
session mistake
→ /error-capture
→ failure instinct (yaml)
→ evolve analysis
→ constraint candidate
→ /ontology-sync → domain constraints[]
oh-my-forge/
├── .claude/
│ └── ontology/
│ ├── _schema.json # Domain entry validation schema
│ └── index.json # Domain registry (files, constraints, specs)
├── agents/ # Specialized subagents for delegation
├── commands/ # Slash commands
│ ├── error-capture.md # /error-capture — structural error prevention
│ ├── ontology-sync.md # /ontology-sync — sync ontology
│ ├── evolve.md # /evolve — promote instincts to structure
│ └── ...
├── hooks/
│ └── hooks.json # Hook registrations
├── rules/ # Always-follow guidelines
├── scripts/
│ └── hooks/
│ └── constraint-guard.js # PreToolUse constraint checker
├── skills/
│ ├── continuous-learning-v2/ # Session → instinct → constraint pipeline
│ └── ... # 140+ workflow skills
├── mcp-configs/ # MCP server configurations
└── docs/
└── features/ # Feature specs linked from ontology domains
| Command | Description |
|---|---|
/error-capture [description] |
Classify a mistake and create a structural fix |
/ontology-sync |
Sync ontology index with current codebase |
/evolve |
Promote failure instincts to skills, rules, or constraints |
/codex-delegate <domain> <task> |
Delegate implementation to Codex using ontology GPS |
/claude-implement <domain> <task> |
Same as above but implemented by Claude — no Codex required |
| Command | Description |
|---|---|
/plan |
Implementation planning |
/tdd |
Test-driven development workflow |
/code-review |
Quality review |
/build-fix |
Fix build errors |
/e2e |
Generate and run E2E tests |
| Command | Description |
|---|---|
/save-session |
Save current session state |
/resume-session |
Resume a previous session |
/learn |
Extract patterns from the current session |
/skill-create |
Generate a skill from git history |
/instinct-status |
Show current instinct summary |
| Command | Description |
|---|---|
/orchestrate |
Multi-agent task orchestration |
/loop |
Run a command on a recurring interval |
/qa-loop |
Continuous QA loop |
Full command list: see
/commands/directory.
Inside any Claude Code session, run:
/plugin install rlagycks/oh-my-forge
Skills, commands, agents, and hooks are available immediately. No cloning or build step required.
Installs access to 36 agents, 144 skills, and 76 commands.
| Category | Count |
|---|---|
| Agents | 36 agents |
| Skills | 144 skills |
| Commands | 76 commands |
git clone https://github.com/rlagycks/oh-my-forge.git
cd oh-my-forge
yarn install
node scripts/ecc.js installAfter either install method, confirm the plugin is loaded:
/plugin list
oh-my-forge should appear in the list. You can then run any command:
/plan
/tdd
/error-capture "description of what went wrong"
- Edit
.claude/ontology/index.json - Add a
domain_*entry following the schema - Run validation:
node scripts/ci/validate-ontology.js
# After an agent makes a mistake
/error-capture "description of what went wrong"
# With file context
/error-capture path/to/file.js "what the agent did wrong here"oh-my-forge does not send local hook telemetry to a hosted analytics service, but it does persist some data locally under ~/.claude/ for workflow continuity:
- session summaries and follow-up notes
- token/cost metrics
- optional redacted Bash command audit logs when
ECC_ENABLE_BASH_COMMAND_LOG=1
Hook processing runs locally inside Claude Code. Network access can still occur when you opt into MCP servers or use tools that call external services.
everything-claude-code by Affaan Mustafa — MIT License
MIT © 2026 Hyochan Kim — see LICENSE