This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Two AGENTS.md files are authoritative and constrain almost every change here. Read them before editing:
AGENTS.md— the repo root is a marketplace wrapper only.plugins/oh-no-harness/AGENTS.md— rules for the plugin itself (public skill surface, source-vs-generated layers, regeneration).
Contributor workflow detail lives in plugins/oh-no-harness/CONTRIBUTING.md.
Oh No Harness is a Markdown-first coding-workflow plugin for Claude Code and Codex — no npm package, no packaged runtime CLI binary, no daemon, no MCP server. The "runtime" is plain text the host loads through its plugin/skill system: 11 public workflow skills (using-oh-no-harness, interview, ralplan, ralph, ultrawork, auto-routing, test-driven-development, simplify, verification-before-completion, systematic-debugging, fusion-rescue) backed by 9 internal role agents.
Many files in plugins/oh-no-harness/ are generated. Hand-editing them will be silently overwritten and is rejected by validation. Always edit the source, then regenerate.
| Edit this source… | …never hand-edit this generated output | Regenerate with |
|---|---|---|
docs/skill-core/<name>.md (shared workflow body), docs/platforms/codex.md / docs/platforms/claude-code.md and optional docs/platforms/codex-<name>.md / docs/platforms/claude-code-<name>.md overlays |
skills/<name>/SKILL.md (Codex), skills-claude/<name>/SKILL.md (Claude Code) |
python3 scripts/generate-skill-wrappers.py --write |
docs/agent-core/<name>.md (platform-neutral role body), wrapper metadata in the generator |
agents/<name>.md (Claude subagent), docs/platforms/codex-agents/<name>.toml (Codex custom agent) |
python3 scripts/generate-agent-wrappers.py --write |
docs/skill-core/*.md is the default, primary edit surface for workflow behavior. Only touch docs/platforms/*.md for genuinely host-specific invocation syntax, permissions, or tool behavior. Both generators run from the repository root (not the plugin dir).
docs/providers/openai.md and docs/providers/anthropic.md are maintenance references only — never generated sources. When company guidance changes, update the provider doc, then copy only stable runtime rules into the matching docs/platforms/*.md and regenerate.
- Root = marketplace wrapper + release/test tooling only:
.claude-plugin/marketplace.json(Claude),.agents/plugins/marketplace.json(Codex),scripts/, repo metadata. Do not reintroduce root-levelskills/,commands/,agents/,hooks/, ordocs/. plugins/oh-no-harness/= the actual plugin source of truth: skill cores, agent cores, platform docs, generated runtime files,hooks/,commands/, plugin manifests, and plugin-localscripts/.
Generated work products go under .oh-no/ (gitignored): specs/, plans/, sessions/, worktrees/, test-runs/. Ignore .oh-no/ when searching — it's full of test-run snapshots and worktree copies that match real filenames (AGENTS.md, SKILL.md, etc.).
- Skills are the public workflow stages; agents are internal role prompts the skills (or the host's subagent mechanism) call. Skills own stage selection, artifact creation, approval gates, and next-skill handoffs.
- Skill chaining is explicit Markdown only — no hidden automation. Skill bodies must not contain
Task(...)/Skill(...)calls; the validator rejects them. A skill that hands off presents aNext Skill Handoffand the caller decides. - Composition: each generated
SKILL.mdis assembled fromdocs/skill-core/<name>.md+ the platform doc + an optional per-skill platform overlay. Seedocs/reference/relationships.mdfor the full bootstrap, skill, and agent graphs, anddocs/reference/source-index.mdfor where each file originated. - Two plugin hook entrypoints only: a
SessionStartbootstrap (skill-loading guidance; appends forced-routing only when auto-routing is enabled) and a narrow RalphUserPromptSubmitadapter. Claude Code uses these throughCLAUDE_PLUGIN_ROOT; Codex also declares the same hook file when plugin hooks are enabled. NoPreToolUse/PostToolUse, no state ledger, no background process.
Run all of these from the repository root.
# Fast static checks (frontmatter, manifests, public-skill surface, no Task/Skill in bodies).
# Also fails if generated files are stale.
python3 scripts/validate-plugin-files.py .
# Verify generated outputs are up to date (CI/release-style check; no writes).
python3 scripts/generate-skill-wrappers.py --check
python3 scripts/generate-agent-wrappers.py --check
# Local install + offline smoke tests (resyncs the plugin cache when source differs).
OH_NO_MARKETPLACE_NAME=oh-no-harness scripts/test-claude-plugin.sh
OH_NO_MARKETPLACE_NAME=oh-no-harness scripts/test-codex-plugin.sh --codex-home "$(mktemp -d)"
# Live model smoke tests — cost real budget, opt-in. Closest thing to a "single test":
scripts/test-claude-plugin.sh --live-hook-only # SessionStart + auto-routing only
scripts/test-claude-plugin.sh --live # all 11 public skills, light prompts
scripts/test-claude-plugin.sh --deep-live # linked support-doc dereferencing
scripts/test-codex-plugin.sh --named-agents-live # user-scope oh-no-* agent_type dispatch
# Release from a clean main (validates, bumps both plugin.json versions, tags, pushes, publishes).
scripts/release 1.5.2 --push # omit --push to stop after local commit+tagUseful live-test overrides: OH_NO_TEST_MODEL=sonnet, OH_NO_MAX_BUDGET_USD=0.50, OH_NO_FUSION_RESCUE_MODEL=opus, --scope user.
Gotchas:
- The install smoke scripts register the marketplace from
OH_NO_MARKETPLACE_SOURCE(default: this checkout). Use a temp--codex-homeor a distinctOH_NO_MARKETPLACE_NAMEwhen you do not want to disturb an existing local marketplace registration. - Live tests can exceed the default ~$1 budget on large diffs — raise
OH_NO_MAX_BUDGET_USD. - Codex live tests need your Codex auth copied into the temp
--codex-homewhen you use an isolated Codex home.
- Edit the source doc (
docs/skill-core/,docs/platforms/, ordocs/agent-core/) — not the generated file. - Regenerate (
generate-skill-wrappers.py --writeand/orgenerate-agent-wrappers.py --write). python3 scripts/validate-plugin-files.py ..- For Claude Code behavior changes,
/clearor restart to re-fire theSessionStarthook. - New public skill? Update both plugin manifests, the validator's
PUBLIC_SKILLSlist, both test scripts'PUBLIC_SKILLS, the generator'sPUBLIC_SKILLS,plugins/oh-no-harness/AGENTS.md, public docs, and add a thincommands/<name>.mdwrapper. Update rootAGENTS.mdonly if the marketplace-wrapper boundary changes.
Commit prefixes in use: chore:, docs:, fix:, feat:, refactor:, build:. Keep the first line under ~72 chars.