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.1.tar.gz (47.8 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.1-py3-none-any.whl (45.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: codeforerunner-0.3.1.tar.gz
  • Upload date:
  • Size: 47.8 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.1.tar.gz
Algorithm Hash digest
SHA256 67cd0db750079ea3b50476dda69fce1f85b68ad0f68fe5d2044455e452f36880
MD5 6fb0b3545a593f41c824457690c117bc
BLAKE2b-256 8178f9173541ff56691493115be1466eb8a2861e5f9526eba45b336dfb82ef57

See more details on using hashes here.

Provenance

The following attestation bundles were made for codeforerunner-0.3.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: codeforerunner-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 45.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee3f4b4608f9f9ad0597b95c585216dfe6361fa1800396cb8de18a8ee5ef4b39
MD5 cadca57558e0ab2284fdb7e5fdcdc940
BLAKE2b-256 2973ec66880f00b66d461bf049fd5f18785f8639050a4796c829f5b95538d5bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for codeforerunner-0.3.1-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