agentleFS
LucasDuysLucasDuys/forge/AGENTS.md

forge

AGENTS.md56 starsChanged 8 months agoMITView on GitHub

This file tells Claude Code how to route work to the correct specialized agent when working on the Forge project.

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When to use: After task implementation (standard/thorough depth) — code review against spec.

    line 24
  2. Distinctive:

    When to use: After all tasks in a phase/spec complete — goal-backward verification.

    line 29
  3. Very specific:

    When to use: Before complex/unfamiliar tasks during /forge execute — research before implementation.

    line 34
  4. Distinctive:

    When context resets at 60%, the handoff includes:

    line 84

≈ “Common” is an estimate: at least 1 in 5 of the 42,283 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Forge — Agent Routing

This file tells Claude Code how to route work to the correct specialized agent when working on the Forge project.

Agent Definitions

forge-speccer

When to use: During /forge brainstorm — writing specs from user input, existing code, or docs. Files it owns: skills/brainstorming/SKILL.md, templates/spec.md Key behavior: Asks clarifying questions one at a time, proposes approaches, writes R-numbered specs with testable acceptance criteria.

forge-planner

When to use: During /forge plan — decomposing specs into task frontiers. Files it owns: skills/planning/SKILL.md, templates/plan.md Key behavior: Reads specs, builds dependency DAGs, groups tasks into parallelizable tiers, estimates tokens per task, tags tasks with repo ownership.

forge-executor

When to use: During /forge execute — implementing individual tasks. Files it owns: skills/executing/SKILL.md Key behavior: Reads task from frontier, implements with TDD if available, runs tests, commits atomically. Follows inner loop: implement → test → fix → review → fix → commit.

forge-reviewer

When to use: After task implementation (standard/thorough depth) — code review against spec. Files it owns: skills/reviewing/SKILL.md, references/review-protocol.md Key behavior: Reviews actual code (not the report), checks against spec requirements, flags missing pieces and over-engineering. Returns PASS or ISSUES with file:line references.

forge-verifier

When to use: After all tasks in a phase/spec complete — goal-backward verification. Files it owns: references/backprop-patterns.md Key behavior: Checks observable truths (not task checkboxes), detects stubs/placeholders, verifies cross-component wiring. Returns PASSED or GAPS_FOUND.

forge-researcher

When to use: Before complex/unfamiliar tasks during /forge execute — research before implementation. Files it owns: None (produces ephemeral research reports) Key behavior: Multi-source research: official docs (Context7), codebase conventions, security best practices, knowledge graph queries. Returns structured research reports with source citations.

forge-complexity

When to use: On startup of any /forge command — auto-detecting task complexity. Files it owns: references/complexity-heuristics.md, scripts/forge-tools.cjs (complexity scoring) Key behavior: Analyzes the task/spec and recommends depth level (quick/standard/thorough). Can be overridden by user flags.

Skills (Cross-Cutting)

karpathy-guardrails

Files: skills/karpathy-guardrails/SKILL.md Referenced by: forge-executor, forge-reviewer, forge-planner Purpose: Four behavioral principles that prevent over-engineering, silent assumptions, scope creep, and unfocused execution. Based on Andrej Karpathy's observations about LLM coding mistakes.

graphify-integration

Files: skills/graphify-integration/SKILL.md Referenced by: forge-planner, forge-researcher, forge-reviewer, forge-executor Purpose: Graph-aware planning and research using codebase knowledge graphs. Enables architecture-aware task decomposition, dependency discovery, and context reduction. Optional -- degrades gracefully when no graph is available.

design-system

Files: skills/design-system/SKILL.md Referenced by: brainstorming skill, forge-planner, forge-executor, forge-reviewer Purpose: DESIGN.md integration for visual consistency across UI tasks. Supports design-tagged tasks, design compliance review, and design system generation from the awesome-design-md catalog.

Routing Rules

TriggerAgentDepth
User runs /forge brainstormforge-speccerAlways interactive
User runs /forge planforge-plannerScales with --depth
User runs /forge execute (per task)forge-executorScales with --depth
After task implementation (depth >= standard)forge-reviewerstandard: 1 pass, thorough: until clean
After all tasks completeforge-verifierstandard: quick check, thorough: full verification
Before complex tasks (thorough depth, unfamiliar tech)forge-researcherScales with task complexity
On any /forge command startupforge-complexityAlways runs (lightweight)
/forge backpropforge-verifier + forge-speccerAlways thorough

Multi-Agent Coordination

During /forge execute, the orchestrator (stop hook + forge-tools.cjs) coordinates:

  1. Sequential by default — one executor at a time (context-efficient)
  2. Parallel within tiers — if configured, tasks in the same tier can dispatch parallel subagents
  3. Review after execute — reviewer is always a separate agent (fresh context, no bias)
  4. Verifier is independent — never sees execution details, only checks outcomes

Context Handoff Between Agents

When context resets at 60%, the handoff includes:

  • .forge/state.md — current position + decisions
  • .forge/plans/{spec}-frontier.md — remaining tasks
  • .forge/token-ledger.json — budget remaining
  • .forge/capabilities.json — available tools
  • graphify-out/graph.json — codebase knowledge graph (if available)
  • DESIGN.md — design system specifications (if available)

Each new session reads these files FIRST, then continues from the exact task where the previous session left off. No re-reading completed work.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.