Model-agnostic repository documentation tooling (prompt-first; thin CLI).
Project description
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/plusskills/codeforerunner/. - Python package:
pyproject.toml+src/codeforerunner/expose aforerunnerconsole 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 initresolves the agent-onboarding bundle (with--fullto prepend a scan or--agents-onlyfor the default scope);forerunner scanresolves the scan bundle;forerunner mcp-serverserves prompt bundles as MCP tools over stdio. - Hooks:
.pre-commit-hooks.yamlexposes aforerunner-checkhook;.github/workflows/forerunner-check.ymlmirrors it in CI. Both no-op whenforerunner.config.yamlis absent. - Current config:
forerunner.config.yaml.exampledocuments the schema now parsed bysrc/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
- Open
prompts/system/base.mdand use it as the agent system or project instruction. - Assemble repo context using the shape in
prompts/partials/context-format.md. - For documentation generation, run
prompts/tasks/scan.mdfirst. - For agent onboarding only, run
prompts/tasks/init-agent-onboarding.mddirectly. - Pass the scan result into one downstream documentation prompt, such as
prompts/tasks/readme.mdorprompts/tasks/stack-docs.md. - 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.mdtracks phases, invariants, and tasks so future PRs can make small status updates instead of broad rewrites.docs/getting-started.mdexplains manual prompt use.docs/prompt-guide.mdexplains how system, partial, and task prompts compose.docs/editor-agent-setup.mdexplains how to adapt prompts to local agents.docs/roadmap.mdmirrors theSPEC.mdphase status in human-readable form.docs/agent-distribution-design.mdrecords the design that backs the Codex/Claude packages andforerunner 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codeforerunner-0.3.0.tar.gz.
File metadata
- Download URL: codeforerunner-0.3.0.tar.gz
- Upload date:
- Size: 33.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46a3aef72eedad046dc773e7af373914e2494bd24daa57351c97c3bf8aabf30b
|
|
| MD5 |
1d2ac231f56ea859d1048228afb11c28
|
|
| BLAKE2b-256 |
a2d3fb8fd1c49644d8fe9dab1b4b437504d3629631f2e3a60e0f8bd475e98d05
|
Provenance
The following attestation bundles were made for codeforerunner-0.3.0.tar.gz:
Publisher:
publish.yml on derek-palmer/codeforerunner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codeforerunner-0.3.0.tar.gz -
Subject digest:
46a3aef72eedad046dc773e7af373914e2494bd24daa57351c97c3bf8aabf30b - Sigstore transparency entry: 1623662213
- Sigstore integration time:
-
Permalink:
derek-palmer/codeforerunner@fdcbd4d29e6f8a027b980029123a354387df8f15 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/derek-palmer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fdcbd4d29e6f8a027b980029123a354387df8f15 -
Trigger Event:
push
-
Statement type:
File details
Details for the file codeforerunner-0.3.0-py3-none-any.whl.
File metadata
- Download URL: codeforerunner-0.3.0-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56e6b26f2202f6158935f3b66946f94b1bb25385724370cfaaacc2682967662e
|
|
| MD5 |
2e44f332404d5762bba9b95858f111d4
|
|
| BLAKE2b-256 |
39c59cf9f0c6f42471cf5945920d2b6e3952f51781c765b550bfafd081084a38
|
Provenance
The following attestation bundles were made for codeforerunner-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on derek-palmer/codeforerunner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codeforerunner-0.3.0-py3-none-any.whl -
Subject digest:
56e6b26f2202f6158935f3b66946f94b1bb25385724370cfaaacc2682967662e - Sigstore transparency entry: 1623662306
- Sigstore integration time:
-
Permalink:
derek-palmer/codeforerunner@fdcbd4d29e6f8a027b980029123a354387df8f15 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/derek-palmer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fdcbd4d29e6f8a027b980029123a354387df8f15 -
Trigger Event:
push
-
Statement type: