Local-first agentic engineering

AgentForge

A private engineering CLI that turns bounded agent attempts into inspectable evidence while keeping validation, human approval, and GitHub publication behind explicit boundaries.

Context
Independent developer tool
Role
Product architecture & engineering
Status
Private · In development
Runtime
Local CLI and owned Git worktrees
Stack
TypeScript · Node.js · SQLite · Git · GitHub APIs

01 / Product overview

A guarded path from task to draft pull request.

AgentForge separates execution from proof. Every boundary asks for the evidence needed by the next one.

01

Run locally

Persist task scope, verify the owned worktree, and execute one bounded attempt with explicit outcomes.

Task scopeWorktree ownershipBounded execution
02

Prove the revision

Bind validation checks, repository fingerprints, and review material to the exact candidate revision.

Validation profilesRevision evidenceReview package
03

Publish deliberately

Require explicit human authorization before pushing an approved snapshot and opening a draft pull request.

Human approvalDraft PR onlyAmbiguity recovery

02 / Engineering architecture

Evidence crosses boundaries; authority does not.

The local CLI coordinates policy and durable state around an owned Git worktree. Agent execution is bounded, validation is revision-specific, and GitHub mutation remains outside the run until approval is verified.

SQLite stores tasks, attempts, events, checks, review packages, approvals, and publication records so recovery does not depend on an agent’s final message.

AgentForge architecture. A local CLI and policy layer coordinate an isolated Git worktree, a bounded agent runtime, validation and review evidence, then a separately authorized GitHub draft pull request publication boundary. SQLite persists lifecycle evidence throughout.

Local execution boundary

Control plane

CLI + policy

Owns lifecycle transitions and rejects unsupported state changes

TypeScriptRun policyRecovery

Repository boundary

Git worktree

Isolates the task and exposes the exact candidate revision

Owned workspaceFingerprintContainment

Execution boundary

Agent attempt

Runs once within bounded time, scope, and cancellation controls

Attempt recordTimeoutCancellation

Evidence boundary

Validate + review

Packages trusted checks and provenance for the current revision

Ordered checksReview packageProvenance

Durable local state

SQLite evidence store

Lifecycle records, attempts, events, validation results, approvals, and publication state

Human-authorized external boundary

GitHub draft PR

Push the approved snapshot, reconcile ambiguous results, and create a draft pull request—never merge

03 / Engineering highlights

Reliability designed around exact evidence.

A successful process exit is only one event. The system preserves the stronger proof needed for review, approval, and recovery.

02

Guarded lifecycle

Policy prevents generic status changes from skipping required validation, review, or approval evidence.

03

Revision-bound validation

Trusted profiles, ordered checks, and before-and-after fingerprints keep passing results attached to the revision that produced them.

04

Fail-closed recovery

Timeouts, cancellations, stale claims, and uncertain remote outcomes enter explicit recovery paths instead of being treated as success.

05

Constrained publication

Deterministic commit construction and same-repository branch controls limit GitHub writes to an approved draft pull request.

04 / Technical challenges

Design decisions at trust boundaries.

  • Execution is not validationA zero exit code and final message do not create test evidence or approve a revision.
  • Validation is not authorizationPassing checks can make a revision reviewable, but cannot permit remote mutation.
  • Approval is snapshot-specificThe publication gate rechecks the evidence and identity attached to the approved candidate.
  • Timeout is ambiguousA timed-out push or PR request is reconciled before any retry to avoid duplicate or conflicting writes.
  • Local does not mean unguardedWorktree containment, credential boundaries, durable claims, and bounded repair reduce accidental repository damage.

Private project in active development

The private source implements and tests the components described here. The complete issue-to-PR workflow was not reproduced during the portfolio audit on its qualified Ubuntu, Codex, and GitHub runtime. This case study does not claim production readiness, autonomous merging, a hosted multi-user service, or commercial deployment.