Skip to content

bennyhodl/afk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AFK — AI-Driven Autonomous Development Loop

A CLI that runs Claude in a loop to plan, build, test, and commit — autonomously.

Installation

git clone https://github.com/youruser/afk.git
cd afk
just install

This symlinks the afk binary to ~/.local/bin/ and the /prd skill to ~/.claude/skills/. Make sure ~/.local/bin is on your PATH.

To remove: just uninstall

Quick Start

# In a new project, generate specs interactively:
/prd

# Generate the implementation plan:
afk plan

# Start building:
afk

# Scoped work on a feature branch:
git checkout -b afk/feature-name
afk plan-work "add user authentication"
afk

Commands

Command Description
afk Build mode, unlimited iterations
afk build [N] Build mode, optional max iterations
afk plan [N] Planning mode, optional max iterations
afk plan-work "desc" [N] Scoped work on feature branch (default: 5 iterations)
afk help Show usage
afk version Print version

Options:

  • --dry-run — Print the resolved prompt without running Claude
  • --mode <mode> — Use "default" or "slc" mode (default: "default")

How It Works

Each iteration:

  1. Validates project structure (specs/, IMPLEMENTATION_PLAN.md)
  2. Resolves the appropriate prompt template
  3. Pipes the prompt to claude -p --dangerously-skip-permissions --model opus --verbose
  4. Pushes changes after each iteration

The /prd Skill

The /prd Claude Code skill walks you through an interactive session to define project requirements. It produces:

  • specs/*.md — requirement specs with acceptance criteria
  • AGENTS.md — build/test/lint commands for the loop
  • AUDIENCE_JTBD.md — audience and jobs to be done (SLC mode only)

Two modes:

  • Default — Problem -> topics of concern -> specs
  • SLC — Audience/JTBD -> activities -> story map -> specs

Key Concepts

  • Backpressure — Tests/lints/typechecks gate commits. If they fail, AFK fixes before proceeding.
  • Acceptance-driven — Specs include acceptance criteria -> planning derives test requirements -> building enforces them.
  • Context efficiency — Each loop iteration gets a fresh context window. Specs stay concise to maximize the "smart zone" (40-60% context utilization).
  • Plan is disposable — If AFK goes off track, regenerate: afk plan

About

this is the closest thing i've felt to AGI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors