Skip to main content

Model-agnostic repository documentation tooling (prompt-first; thin CLI).

Project description

codeForerunner — your codebase gets a Forerunner; your docs finally see the light

codeForerunner

CodeForerunner is a model-agnostic documentation agent that acts as overwatch for your repository, automatically analyzing code and maintaining docs, diagrams, and architecture knowledge as your codebase evolves over time.

The current repo is the prompt-first foundation for that agent: it ships prompt assets for understanding a codebase and generating developer docs. A thin Python CLI (including forerunner mcp-server and a scoped forerunner init --full / --agents-only), an idempotent skill installer, pre-commit + CI hooks, and a PyPI publish workflow now wrap those prompts; the first published PyPI release remains pending.

Current State

  • Core product: Markdown prompts in prompts/.
  • Agent package artifacts: Codex plugin files under plugins/codeforerunner/ and Claude Code plugin files under .claude-plugin/ plus skills/codeforerunner/.
  • Python package: pyproject.toml + src/codeforerunner/ expose a forerunner console script. forerunner doc <task> resolves the prompt bundle (base + partials + task) to stdout; forerunner install <agent> idempotently writes the canonical skill into agent-specific directories; forerunner init resolves the agent-onboarding bundle (with --full to prepend a scan or --agents-only for the default scope); forerunner scan resolves the scan bundle; forerunner mcp-server serves prompt bundles as MCP tools over stdio.
  • Hooks: .pre-commit-hooks.yaml exposes a forerunner-check hook; .github/workflows/forerunner-check.yml mirrors it in CI. Both no-op when forerunner.config.yaml is absent.
  • Current config: forerunner.config.yaml.example documents the schema now parsed by src/codeforerunner/config.py; see "Configuration" below.
  • Not currently present: Docker image, Makefile, published PyPI release.

Install

After the first PyPI release:

pipx install codeforerunner   # recommended; isolated environment
pip install codeforerunner    # alternative

From source:

git clone https://github.com/derek-palmer/codeForerunner
cd codeForerunner
python -m pip install -e .

Then forerunner --help should print the subcommand list.

Prompt Layout

prompts/
├── system/
│   └── base.md
├── partials/
│   ├── context-format.md
│   ├── output-rules.md
│   └── stack-hints.md
└── tasks/
    ├── scan.md
    ├── init-agent-onboarding.md
    ├── readme.md
    ├── api-docs.md
    ├── stack-docs.md
    ├── diagrams.md
    ├── flows.md
    ├── version-audit.md
    ├── check.md
    └── review.md

Quick Start

  1. Open prompts/system/base.md and use it as the agent system or project instruction.
  2. Assemble repo context using the shape in prompts/partials/context-format.md.
  3. For documentation generation, run prompts/tasks/scan.md first.
  4. For agent onboarding only, run prompts/tasks/init-agent-onboarding.md directly.
  5. Pass the scan result into one downstream documentation prompt, such as prompts/tasks/readme.md or prompts/tasks/stack-docs.md.
  6. Apply generated docs only after checking that every claim is grounded in provided files.

What The Prompts Do

Prompt Purpose
prompts/system/base.md Defines the codeforerunner role, quality bar, Markdown rules, and accuracy constraints.
prompts/tasks/scan.md Produces the first structured repo scan used by downstream tasks.
prompts/tasks/init-agent-onboarding.md Generates or updates AGENTS.md from repo evidence plus files such as CLAUDE.md, .cursor/rules/*, .cursorrules, .github/copilot-instructions.md, and opencode.json.
prompts/tasks/readme.md Generates or rewrites a top-level README from scan output and selected files.
prompts/tasks/api-docs.md Documents public APIs when endpoints/interfaces are evident.
prompts/tasks/stack-docs.md Documents stack-specific areas of a repo.
prompts/tasks/diagrams.md Generates Mermaid architecture or flow diagrams.
prompts/tasks/flows.md Documents user, request, job, or data flows.
prompts/tasks/version-audit.md Audits pinned versions from manifests, lockfiles, Dockerfiles, workflows, or IaC.
prompts/tasks/check.md Checks existing docs for staleness against a fresh scan.
prompts/tasks/review.md Summarizes documentation impact for review.

Docs And Spec

  • SPEC.md tracks phases, invariants, and tasks so future PRs can make small status updates instead of broad rewrites.
  • docs/getting-started.md explains manual prompt use.
  • docs/prompt-guide.md explains how system, partial, and task prompts compose.
  • docs/editor-agent-setup.md explains how to adapt prompts to local agents.
  • docs/roadmap.md mirrors the SPEC.md phase status in human-readable form.
  • docs/agent-distribution-design.md records the design that backs the Codex/Claude packages and forerunner install.

Configuration

forerunner.config.yaml.example documents the loaded schema. Copy it to forerunner.config.yaml to opt in; without that file, forerunner check is a silent no-op. The schema has top-level provider/model fields (provider, model, api_key_env, output_dir, context_max_files, context_max_lines_per_file, approaching_eol_threshold_months), ignore_patterns, tasks.version_audit, and tasks.check. forerunner check honors tasks.check.enabled_rules (allowlist of rule IDs, default all) and tasks.check.ignore_paths (fnmatch globs applied to scanned docs). Invalid YAML, unknown providers, unknown api_key_env providers, or unknown severities surface as a ConfigError and exit non-zero.

MCP Server

forerunner mcp-server speaks JSON-RPC 2.0 over stdio and exposes one tool per prompts/tasks/*.md (tool name = filename stem). Each tools/call returns the resolved base + partials + task bundle as text. A scan-first gate enforces SPEC V2: any tool other than scan or init-agent-onboarding returns an error until scan has been called in the same session. Point any MCP-compatible client at forerunner mcp-server as a stdio server (running from the target repo so prompts/tasks/ resolves).

See examples/mcp/ for Claude Desktop and mcp-cli wiring examples.

Roadmap

See SPEC.md for the canonical phase/task tracker and docs/roadmap.md for the human-readable roadmap.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codeforerunner-0.3.2.tar.gz (51.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codeforerunner-0.3.2-py3-none-any.whl (47.4 kB view details)

Uploaded Python 3

File details

Details for the file codeforerunner-0.3.2.tar.gz.

File metadata

  • Download URL: codeforerunner-0.3.2.tar.gz
  • Upload date:
  • Size: 51.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codeforerunner-0.3.2.tar.gz
Algorithm Hash digest
SHA256 c1685d921202610dae8227fc22bcbfaaaae3b475db631d7b50c04bda3c6db415
MD5 c9e361c104eb691ea1c33c1791978f0f
BLAKE2b-256 246ac89625f822c724a882c6a51dbb368a690573efc8480524c105aea308c1bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for codeforerunner-0.3.2.tar.gz:

Publisher: publish.yml on derek-palmer/codeforerunner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codeforerunner-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: codeforerunner-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 47.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codeforerunner-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fd4a51a00b74e463f9be5d829d94bc83c96bd2d186e59ff4d0829c9dc0b85deb
MD5 7cd391c4505a149e3cc3d2afd9690493
BLAKE2b-256 2baf265555b2edd2fcf026af0919dc19a2c83fcd0e220da774d81ad00f8a8398

See more details on using hashes here.

Provenance

The following attestation bundles were made for codeforerunner-0.3.2-py3-none-any.whl:

Publisher: publish.yml on derek-palmer/codeforerunner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page