From forge
MANDATORY Forge entry point. Use when the user explicitly says "forge", "build a harness", "set up Forge", asks Forge to build a new product, or asks Forge to diagnose/fix/analyze an existing project. If the request is for a phased team workflow, build-vs-repair routing, or harness-based execution, you must start here.
npx claudepluginhub cjy5507/forge --plugin forgeThis skill uses the workspace's default tool permissions.
<Purpose>
Implements structured self-debugging workflow for AI agent failures: capture errors, diagnose patterns like loops or context overflow, apply contained recoveries, and generate introspection reports.
Monitors deployed URLs for regressions in HTTP status, console errors, performance metrics, content, network, and APIs after deploys, merges, or upgrades.
Provides React and Next.js patterns for component composition, compound components, state management, data fetching, performance optimization, forms, routing, and accessible UIs.
The CEO evaluates the request and routes to the right mode. After kickoff, Forge should operate like an internal software company: the client gives the request, answers minimum critical questions, and reviews the delivery at the end. Internal teams own the rest. Forge is also a harness engineering layer: it should set up the execution harness, drive work through completion, and advance phases automatically instead of narrating partial progress back to the user as if the user were the internal project manager.
<Use_When>
<Do_Not_Use_When>
<Core_Principles>
full tier a
.forge/handoff-interviews/{phase}.md artifact is code-enforced before advance.
Load references/handoff-interview.md for the full protocol.
</Core_Principles><Execution_Policy>
references/phase-map.md for the compact phase sequence.references/handoff-interview.md for the handoff interview protocol between phases.references/context-budget.md when dispatching agents to determine correct context loading.references/harness-learning.md at project start (intake) to check lessons from past projects, and at delivery to record new lessons.references/harness-ab-eval.md when asked to prove Forge's value against a baseline.
</Execution_Policy>applies_when conditions2b. Express Qualification Check: Before routing to full BUILD or REPAIR pipeline, CEO evaluates if the task qualifies for express mode.
[Express-qualified tasks] (route to forge:express):
- Single feature with bounded scope (1-3 files expected)
- Clear requirements, no ambiguity
- No architecture decisions needed
- Bug fix with known location
- Documentation or config changes
- User explicitly says "quick", "simple", "express"
[Full pipeline tasks] (route to forge:discovery or troubleshooter):
- Multi-system changes
- Architecture decisions needed
- Unclear requirements requiring PM interview
- Security-sensitive changes
- User explicitly requests full process
**CEO Decision**: If express-qualified AND user hasn't requested full pipeline:
→ Initialize .forge/ with mode="express", tier="medium"
→ Route directly to forge:express (skips discovery + design)
**Default for routine bug fixes**: prefer **express**. Benchmark evidence (2026-04 codex-framework-benchmark-hard) showed full pipeline produced 77% more test-file lines than plain Codex on a single-file bug — over-processing is itself a defect, not safety. Only escalate to full pipeline when:
- Multi-system integration is in scope
- Security/compliance is in scope
- The user explicitly asks for full process
For brand-new product builds and unclear-multi-feature requests, full pipeline remains the default.
3. CEO agent evaluates and ROUTES:
[BUILD mode] — new product request
"build me", idea description
→ Can we build this? If not directly, what alternative achieves the same goal?
→ GO: initialize .forge/, Phase 1 (Discovery)
[REPAIR mode] — existing project fix/analysis
"fix", "bug", "analyze", "what's wrong"
→ Existing codebase detected?
→ REPAIR Intake: Generate minimal baseline artifacts
- Read existing codebase structure and create minimal spec.md (scope, constraints, known architecture)
- Extract existing code conventions into code-rules.md
- Scan for existing interfaces/types and populate .forge/contracts/ with stubs
→ Dispatch Troubleshooter for diagnosis
→ Diagnosis → Fix → QA → Deliver (skip full Phase 1-3)
3. If unclear which mode or critical customer intent is missing → ask the client ONE focused question that resolves the routing decision. Do not open a broad interview outside intake/discovery 4. BUILD: initialize .forge/ directory with state.json (from templates/state.json), hand off to PM 5. REPAIR: initialize .forge/ with mode="repair", hand off to Troubleshooter
Phase 1 — DISCOVERY (PM):
Phase 2 — DESIGN (CTO + Designer):
full tier, produce .forge/handoff-interviews/design.md.Phase 3 — PLAN (Lead Dev):
plan.md and pings CTO/Designer
directly. At full tier, produce .forge/handoff-interviews/plan.md..forge/plan.md, lane graph, task briefsPhase 4 — DEVELOPMENT (Lead + Devs + Publisher):
full
tier, produce .forge/handoff-interviews/develop.md.Phase 5 — QA (QA Engineer):
Phase 6 — SECURITY (Security Reviewer):
Phase 7 — FIX LOOP (Fact Checker + Devs + Troubleshooter):
Phase 8 — DELIVERY (CEO + Tech Writer):
<State_Management> On first invocation, create .forge/ directory:
.forge/ ├── state.json ← current phase, progress, active agents ├── spec.md ← client-approved spec (Phase 1 output) ├── code-rules.md ← CTO-defined code rules (Phase 2 output) ├── design/ ← architecture + UI design (Phase 2 output) ├── contracts/ ← interface contracts (Phase 2 output) ├── plan.md ← execution plan produced from native decomposition (Phase 3 output) ├── evidence/ ← fact-checker verification results ├── holes/ ← discovered issues ├── tasks/ ← lane task briefs (Phase 3+) ├── worktrees/ ← git worktree directories (Phase 4) ├── knowledge/ ← project knowledge base ├── lessons/ ← harness learning: lessons from QA, fixes, and delivery └── delivery-report/← final delivery docs </State_Management>
After each major transition, show progress to the client in customer language. Internal status may be richer than what is shown externally:Forge Progress: ┌─────────────────────────────────┐ │ Phase: N/{max} ({phase_name}) │ │ ████████░░░░ XX% │ │ │ │ ✅ Completed │ │ 🔄 In Progress │ │ ⏳ Pending │ │ │ │ Known Issues: N │ │ Needs Client Input: N │ └─────────────────────────────────┘
Each Phase completion creates a git tag: forge/v{N}-{phase_name}Client can request rollback: "The earlier design was better" → rollback to forge/v1-design → continue from Phase 2
<Tool_Usage>