Skip to content

JoshuaBearup/forge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

146 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forge

An autonomous, event-driven build loop, built March–May 2026. Point it at a backlog and it selects a task, implements it by spawning Claude Code (claude --print), runs quality gates, and keeps the change only if the metrics hold — otherwise it reverts and tries again. It commits its own work as it goes.

This repo is published as a historical artifact: a working agentic loop with backpressure, from before harness loops were commonplace. The evidence is in the repo itself:

  • the git history contains the loop's own commits (forge(planner): iteration 76, forge(builder): iteration 75, …)
  • .forge/log.md is the tracked iteration log — 83 iterations with per-iteration metrics, gate results, and keep/revert decisions
  • .forge/tasks.jsonl is the task store the planner worked from, including the notes it wrote as it closed items

How it works

forge run → load config → publish work.start
  → select hat → build prompt → spawn claude
  → parse output → run gates → keep/revert → log
  → publish events → next iteration

Roles ("hats") are event-driven: a planner reads the task store and picks work; a builder implements it; optional reviewer and acceptance hats gate the result. Hats communicate by publishing events, so the topology is config, not code.

Backpressure is the core idea: every iteration runs the project's gates (build, lint, test — with numeric error parsing), compares against the baseline, and makes an explicit keep-or-revert decision. An iteration that regresses the metrics is rolled back, not merged. If the loop can't say whether an iteration improved things, it doesn't keep it.

Layout

Path Purpose
forge/core/ Event bus, hat registry, orchestration loop, state
forge/backpressure/ Gates, metrics, keep/revert decisions, recovery
forge/executor/ Claude Code subprocess spawn + output parsing
forge/store/ Task store, iteration history, memory, telemetry
forge/integrations/ Git auto-commit, notifications
presets/ standard (2-hat), reviewed (3-hat), overnight (safety-constrained)
DESIGN.md, VISION.md, docs/V2_DESIGN.md Architecture and the self-refining-loop roadmap

Usage (as it was)

forge run                    # auto-init, imports BACKLOG.md
forge run --preset reviewed  # adds a code-review hat
forge run --preset overnight # safe mode, auto-push
forge status
forge log --summary

Status

Archived and unmaintained. Superseded by later infrastructure; kept public as a record of the approach. No support, no roadmap.

About

Autonomous event-driven build loop with backpressure gates and keep-or-revert — a March 2026 agentic-loop artifact, self-committed iteration history included

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages