How merchantlee99/vibebuilder works
1. This repository is a pack registry, not a single application. It contains two parallel harness templates: vb-pack-claude-harness and vb-pack-codex-harness. The top-level README frames them as copyable starting points for different agent runtimes, with shared goals around durable context, validation loops, review discipline, learning logs, and skill evolution.
2. The main architectural boundary is the split between the two packs:
- Claude pack: optimized for Claude Code, with strong reliance on hooks and sealed prompts.
- Codex pack: optimized for Codex app, with subagents, automations, modes, and worktree/browser/computer-use primitives.
This means the repo is not one generic harness; it is two runtime-specific operating systems for agent work.
3. Both packs share a similar high-level layering:
- Policy/config layer: manifests and routing rules that decide what actions are allowed.
- Runtime interception layer: hooks or adapters that observe or block actions.
- Operational playbooks: human-readable workflows for planning, review, automation, and recovery.
- Prompt/template layer: reusable document templates and sealed prompts.
- Execution scripts: Python utilities that enforce policy, manage state, and generate artifacts.
- Tests/self-checks: validation for the harness itself.
4. In the Claude harness, .claude/hooks is the critical control plane. Files like pre_tool_use.py, post_tool_use.py, user_prompt_submit.py, session_start.py, and stop.py indicate that governance happens by intercepting tool usage and session lifecycle events. That pack also includes gate_4_runner.py, suggesting a staged review or approval gate in the session flow.
5. The Claude pack’s policy and knowledge model is file-based and explicit:
- .claude/manifests defines automation policy, capability routing, and subagent definitions.
- .claude/agents and .claude/skills encode role definitions and reusable workflows.
- .claude/sealed-prompts contains locked prompt assets for planning, implementation, review, red-teaming, verification, and audits.
This pack is designed to make agent behavior predictable and mechanically constrained.
6. The Claude pack’s Python harness scripts provide supporting services around enforcement and memory:
- event_log.py, session_index.py, rotate_logs.py manage persistent traceability.
- memory_manager.py, learning_log.py, taxonomy_learner.py, insights_engine.py support long-term adaptation.
- runtime_gate.py, risk_policy.py, oversight_policy.py, protected_paths.py, size_check.py enforce guardrails.
- subagent_planner.py, automation_planner.py, skill_auto_gen.py generate or route work.
This makes the Claude pack a hook-driven governance system with logging and learning attached.
7. In the Codex harness, the equivalent control plane is split differently. The .codex/hooks directory plus hooks.json and hook_adapter.py suggest a hook adapter rather than direct hook wiring. The presence of runtime.json, telemetry, and audits indicates a more explicit runtime/state model with observability and audit trails.
8. The Codex pack’s policy surface is broader and more mode-oriented:
- .codex/manifests includes automation policy, capability routing, evolution policy, mode policy, review matrix, and subagents.
- .codex/playbooks includes automations, browser QA, computer use, git ops, modes, and subagents.
- review_gate.py, review_digest.py, mode_recommender.py, ownership_guard.py, and worktree_manager.py show that Codex is structured around task orchestration, mode selection, and workspace isolation.
Compared with Claude, Codex leans more on operational modes and task routing than hard hook blocking.
9. The Codex pack’s script layer has a stronger separation between workflow coordination and policy enforcement:
- activity_bridge.py, session_state.py, memory_feedback.py, and insights_report.py connect runtime events to persistent state.
- manifest_loader.py, validate_manifests.py, and review_matrix_policy.py keep the configuration graph coherent.
- protect_paths.py, append_only_guard.py, ownership_guard.py, and runtime_gate.py enforce safety boundaries.
- meta_audit.py, review_gate.py, and self_test.py provide internal validation.
This gives the Codex pack a more compositional architecture around reusable runtime primitives.
10. The templates directory in both packs is the artifact boundary for generated human-facing documents. Files like PRD.md, Plan.md, Implement.md, Documentation.md, Prompt.md, Subagent-Manifest.md, and review/design variants act as structured inputs or outputs for the harness workflows. They define the document-driven workflow that the scripts and prompts consume.
11. The playbooks are the operational runbooks. They translate policy into repeatable practices such as automation, git operations, browser/computer use, MCP usage, memory handling, hooks recipes, and subagent usage. Architecturally, these are not execution code; they are the human-operational layer that defines how the runtime should be used.
12. The skills directories are another reusable behavior layer. Both packs have _manual skill folders with workflows such as investigate, review, ship, QA, plan/review, and vibe-coding workflow. These are likely invoked by the harness or referenced by prompts to standardize how a session proceeds.
13. The tests are intentionally thin but important: each pack has a tests/test_harness.py, indicating the harness itself is treated as the unit under test rather than the product being built. That fits the repository’s purpose: validate the pack’s rules, not a domain application.
14. For an architecture diagram, the key flows are:
- User prompt or session start enters the runtime hook/adapter layer.
- Hooks/scripts consult manifests and policies.
- Work is routed to subagents, automations, or mode-specific workflows.
- Execution produces logs, learning artifacts, audits, and session state.
- Templates and sealed prompts shape the next planning/review cycle.
In short, this repo is a meta-operating system for agent sessions, with Claude and Codex as two distinct runtime backends.
Main entry points: vb-pack-codex-harness/README.md Codex README · vb-pack-claude-harness/README.md Claude README · scripts/harness Harness scripts · scripts/harness Harness scripts
Components 18
Registry
Top-level repository framing the two harness packs
- README · Repository overview and pack selection guidance
README.md
Claude pack
Hook-driven harness for Claude Code
- Claude README · Entry point for the Claude harness
vb-pack-claude-harness/README.md - Hook plane · Lifecycle and tool-use interception for Claude
vb-pack-claude-harness/.claude/hooks - Manifests · Automation, routing, and subagent policy for Claude
vb-pack-claude-harness/.claude/manifests - Sealed prompts · Locked prompts for planning, review, verification, and audits
vb-pack-claude-harness/.claude/sealed-prompts - Manual skills · Reusable human-facing workflows for Claude sessions
vb-pack-claude-harness/.claude/skills/_manual - Harness scripts · Logging, policy, planning, and learning utilities
vb-pack-claude-harness/scripts/harness - Templates · Structured documents produced and consumed by the harness
vb-pack-claude-harness/templates - Harness tests · Validation for the Claude harness itself
vb-pack-claude-harness/tests/test_harness.py
Codex pack
Mode- and subagent-driven harness for Codex
- Codex README · Entry point for the Codex harness
vb-pack-codex-harness/README.md - Hook adapter · Hook surface and adapter for Codex runtime events
vb-pack-codex-harness/.codex/hooks - Manifests · Automation, routing, mode, and review policy for Codex
vb-pack-codex-harness/.codex/manifests - Playbooks · Mode, browser, computer-use, git, and subagent workflows
vb-pack-codex-harness/.codex/playbooks - Runtime state · Explicit runtime and context state for Codex
vb-pack-codex-harness/.codex/runtime.json - Telemetry · Runtime observation and audit support
vb-pack-codex-harness/.codex/telemetry - Harness scripts · State bridging, validation, gating, and workspace orchestration
vb-pack-codex-harness/scripts/harness - Templates · Structured documents produced and consumed by the harness
vb-pack-codex-harness/templates - Harness tests · Validation for the Codex harness itself
vb-pack-codex-harness/tests/test_harness.py
Connections 23
- README → Claude README: introduces · Top-level registry points to the Claude pack
- README → Codex README: introduces · Top-level registry points to the Codex pack
- Claude README → Hook plane: uses · Claude runtime is governed by hook interception
- Claude README → Manifests: uses · Claude runtime consumes policy manifests
- Claude README → Sealed prompts: uses · Claude workflows are shaped by sealed prompts
- Claude README → Manual skills: uses · Claude workflows reference reusable manual skills
- Claude README → Harness scripts: runs · Claude pack delegates enforcement and learning to scripts
- Claude README → Templates: produces · Claude sessions emit structured artifacts from templates
- Claude README → Harness tests: verifies · Claude harness is validated by its own tests
- Hook plane → Manifests: consults · Hooks enforce policy defined in manifests
- Harness scripts → Sealed prompts: supports · Scripts operationalize prompt-driven workflows
- Harness scripts → Templates: emits · Scripts generate or consume template artifacts
- Codex README → Hook adapter: uses · Codex runtime enters through hooks and adapter logic
- Codex README → Manifests: uses · Codex runtime consumes broader policy manifests
- Codex README → Playbooks: uses · Codex runtime is organized by operational playbooks
- Codex README → Runtime state: uses · Codex pack keeps explicit runtime state
- Codex README → Telemetry: observes · Codex pack records telemetry and audit traces
- Codex README → Harness scripts: runs · Codex pack delegates orchestration and enforcement to scripts
- Codex README → Templates: produces · Codex sessions emit structured artifacts from templates
- Codex README → Harness tests: verifies · Codex harness is validated by its own tests
- Hook adapter → Manifests: consults · Hook adapter resolves policy and routing from manifests
- Harness scripts → Runtime state: updates · Scripts bridge events into persistent runtime state
- Harness scripts → Telemetry: records · Scripts feed telemetry and audit outputs