The Autonomous Stack

Documents & Content · Doc Generation · v1.0.1

Agent DocGen Pack v1.0

Autonomous technical-documentation generator. Scans a codebase, extracts symbols, drafts and verifies docs, BYO-LLM.

$3.00one-timePay with crypto

docgen documentation technical-writing autonomous byo-llm

agent ⟶ theautonomousstack.xyz

01GET /api/v1/pack/agent-docgen-v1

402 Payment RequiredX-PAYMENT-REQUIRED

02sign TransferWithAuthorization3.00 USDC · Base (eip155:8453)

03GET + PAYMENT-SIGNATURE

200 OKapplication/zip · 24 files

pay per pack over x402no account

What's inside

Autonomous technical-documentation generator. Scans a codebase, extracts symbols, structures a doc skeleton, drafts sections, verifies consistency, and publishes Markdown — offline by default, smarter with a BYO-LLM CLI.


Overview

This pack provides an operational autonomous agent for generating and maintaining the technical documentation of a software project.

It includes an OODA loop dedicated to the docgen domain, versioned prompts, configuration templates and a set of installation, test and execution scripts.

The pack is designed to be self-hosted (BYO-LLM): no API key is included, no third-party dependency (Python stdlib only). The LLM adapter automatically detects your own CLI (claude-code, kimi, codex; override via PACK_LLM) and calls it as a subprocess. Without an LLM, the agent runs in deterministic mode and produces a basic documentation structure.


Target audience


Architecture

┌─────────────────────────────────────────────────────────────────────┐
│                    Source code / repo / files                        │
└──────────────────────────────────┬──────────────────────────────────┘
                                   ▼
┌─────────────────────────────────────────────────────────────────────┐
│  IDLE → DISCOVER → EXTRACT → STRUCTURE → DRAFT → VERIFY → PUBLISH   │
│                        OODA State Machine                            │
└──────────────────────────────────┬──────────────────────────────────┘
                                   ▼
┌─────────────────────────────────────────────────────────────────────┐
│  Named prompts → Deterministic handler →  BYO-LLM Adapter           │
│  scripts/test_prompt.py    scripts/run_agent.py                     │
└──────────────────────────────────┬──────────────────────────────────┘
                                   ▼
┌─────────────────────────────────────────────────────────────────────┐
│  SQLite queue  →  templates/*.yaml  →  docs/output/*.md              │
└─────────────────────────────────────────────────────────────────────┘

Pack contents

File Role
README.md This file — overview and quick-start
SOUL.md Mission, values and docgen-specific OODA states
PROMPTS.md 6 named, versioned system prompts
CHECKLIST.md 30+ operational steps with commands
SPEC.md Technical spec, configurable parameters, interfaces
CUSTOMIZE.md 5-min guide: where to plug in your own sources/rules
OPERATING_COST_ESTIMATE.md Provider-agnostic LLM cost estimate
CHANGELOG.md Version history
agent-docgen-v1.json Pack manifest with stats and files
agent.py Runnable agent — SQLite queue, retry, dead-letter, OODA
llm_adapter.py BYO-LLM adapter (claude/kimi/codex) without an API key
install.sh One-shot Debian installer: deps + venv + systemd service
agent-docgen-v1.service Reference systemd unit
scripts/install.sh Automated installation script (copy + systemd)
scripts/config.yaml Default runtime configuration
scripts/test_prompt.py Named-prompt tester
scripts/run_agent.py Convenience runner that delegates to agent.py via the venv
templates/source_schema.yaml Source codebase schema template
templates/doc_outline.yaml Documentation outline template
templates/verification_policy.yaml Verification policy template

Quick installation

cd /opt/agents/agent-docgen-v1
bash install.sh

The installer checks for Python 3.10+, creates a venv, installs the dependencies, detects a local LLM provider and configures a systemd unit.


Immediate test

# Test the main prompt
python3 scripts/test_prompt.py --prompt codebase_scanner --input templates/source_schema.yaml

# Run the agent in dry-run mode
python3 scripts/run_agent.py --config scripts/config.yaml --dry-run

# Offline test suite
bash smoke_test.sh

Customization

  1. Copy scripts/config.yaml to config.local.yaml.
  2. Adapt the templates in templates/.
  3. Plug your own code sources into run_agent.py or via agent.py enqueue.

See CUSTOMIZE.md for details.


Costs and limits

This pack favors deterministic logic for critical decisions. The LLM is used for semantic extraction, drafting and verification. See OPERATING_COST_ESTIMATE.md for the operating cost estimate.


License

Personal use per purchase. Resale prohibited.