You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0e51dd5
Browse filesBrowse the repository at this point in the historyBrowse files
"description": "Repo documentation tooling for Claude Code. Adds /forerunner-scan, /forerunner-readme, /forerunner-check, and 9 other documentation slash commands.",
Model-agnostic repository documentation tooling. Ships a prompt pack for codebase analysis and doc generation, a thin Python CLI, an MCP server, a Codex marketplace plugin, and drift-detection rules that keep docs honest.
5
+
Model-agnostic repository documentation tooling. Ships a prompt pack for codebase analysis and doc generation, a thin Python CLI, an MCP server, drift-detection rules that keep docs honest — and native slash-command skills for Claude Code, Codex, Gemini CLI, and other agent CLIs.
6
6
7
-
## Install
7
+
## Two modes
8
+
9
+
### Mode A — Agent skill (recommended, no API key required)
10
+
11
+
Install forerunner's prompt pack as skills into your agent CLI. Each documentation task becomes a slash command (`/forerunner-readme`, `/forerunner-check`, etc.) available inside Claude Code, Codex, Gemini CLI, and other agents. Authentication is handled by your existing agent subscription — no separate API key needed.
12
+
13
+
```bash
14
+
# From a cloned repo
15
+
./install.sh
16
+
17
+
# One-liner (auto-detects Claude Code, Codex, Gemini CLI)
|`forerunner check`| Run drift-detection rules; silent no-op without `forerunner.config.yaml`. |
32
-
|`forerunner generate <task>`|Resolve bundle for `<task>` and call the configured provider. Add `--stream`to stream output token-by-token. |
33
-
|`forerunner doctor`|Single-screen health report: skill parity, marketplace validation, installed destinations, config, provider key. Add `--fix` to write a starter `forerunner.config.yaml` if absent. |
96
+
|`forerunner check`| Run drift-detection rules; no-op without `forerunner.config.yaml`. |
97
+
|`forerunner generate <task>`|Call configured provider directly. Add `--stream`for token-by-token output. Falls back to Ollama automatically when no API key is configured. |
98
+
|`forerunner doctor`|Health report: skill parity, config, provider key, local-mode status. Add `--fix` to write a starter config. |
34
99
|`forerunner mcp-server`| Serve prompt bundles as MCP tools over stdio (JSON-RPC 2.0). |
35
-
|`forerunner install <agent>`|Idempotently write the canonical skill into agent-specific directories. |
100
+
|`forerunner install <agent>`|Install canonical skill into agent-specific directory. Add `--all` for all per-task skills. |
36
101
37
-
## Prompt Pack
102
+
## Prompt pack
38
103
39
104
Prompts are bundled inside the package at `src/codeforerunner/prompts/`.
40
105
41
106
```text
42
107
prompts/
43
-
├── system/
44
-
│ └── base.md
108
+
├── system/base.md
45
109
├── partials/
46
110
│ ├── context-format.md
47
111
│ ├── output-rules.md
48
112
│ └── stack-hints.md
49
113
└── tasks/
50
-
├── scan.md
51
-
├── init-agent-onboarding.md
52
-
├── readme.md
53
-
├── api-docs.md
54
-
├── stack-docs.md
55
-
├── diagrams.md
56
-
├── flows.md
57
-
├── version-audit.md
58
-
├── check.md
59
-
├── review.md
60
-
├── audit.md
61
-
└── changelog.md
114
+
├── scan.md api-docs.md audit.md
115
+
├── readme.md diagrams.md changelog.md
116
+
├── check.md flows.md version-audit.md
117
+
├── review.md stack-docs.md
118
+
└── init-agent-onboarding.md
62
119
```
63
120
64
-
| Task | Purpose |
65
-
|------|---------|
66
-
|`scan`| Structured repo scan used by downstream tasks. |
67
-
|`init-agent-onboarding`| Generates or updates `AGENTS.md` from repo evidence. |
68
-
|`readme`| Generates or rewrites a top-level README. |
69
-
|`api-docs`| Documents public APIs. |
70
-
|`stack-docs`| Documents stack-specific areas. |
71
-
|`diagrams`| Generates Mermaid architecture or flow diagrams. |
72
-
|`flows`| Documents user, request, job, or data flows. |
73
-
|`version-audit`| Audits pinned versions from manifests, lockfiles, workflows, IaC. |
74
-
|`check`| Checks existing docs for staleness against a fresh scan. |
75
-
|`review`| Summarizes documentation impact for review. |
76
-
|`audit`| Security and dependency audit report. |
77
-
|`changelog`| Generates a Keep-a-Changelog entry from git log. |
Use forerunner check as a reusable action in any workflow:
135
+
```bash
136
+
# 1. Install and configure
137
+
pip install codeforerunner
138
+
export ANTHROPIC_API_KEY=sk-...
96
139
97
-
```yaml
98
-
- uses: derek-palmer/codeforerunner@v0.3.2
140
+
# 2. Run a task
141
+
forerunner generate readme --stream
142
+
143
+
# 3. Enable drift detection
144
+
forerunner doctor --fix # writes forerunner.config.yaml
145
+
forerunner check # run any time or as pre-commit hook
99
146
```
100
147
101
-
With a pinned version:
148
+
## GitHub Action
102
149
103
150
```yaml
104
151
- uses: derek-palmer/codeforerunner@v0.3.2
105
-
with:
106
-
version: '0.3.2'
107
152
```
108
153
109
154
No-op when `forerunner.config.yaml` is absent.
110
155
111
156
## Configuration
112
157
113
-
Copy `forerunner.config.yaml.example` to `forerunner.config.yaml` to opt in. Without that file, `forerunner check` is a silent no-op. Generate a starter config with:
158
+
Copy `forerunner.config.yaml.example` to `forerunner.config.yaml` to opt in to drift rules. Generate a starter config with:
114
159
115
160
```bash
116
161
forerunner doctor --fix
@@ -122,7 +167,7 @@ forerunner doctor --fix
122
167
provider: anthropic # anthropic | openai | google | ollama
123
168
model: claude-opus-4-7
124
169
api_key_env:
125
-
anthropic: ANTHROPIC_API_KEY # override per-provider env var name
170
+
anthropic: ANTHROPIC_API_KEY
126
171
127
172
tasks:
128
173
check:
@@ -134,10 +179,10 @@ tasks:
134
179
- R5-no-python-package
135
180
- R7-no-mcp
136
181
- R8-no-marketplace
137
-
- RI1-missing-cli # inverse: doc claims CLI but file absent
182
+
- RI1-missing-cli
138
183
- RI5-missing-python-package
139
184
- RI7-missing-mcp
140
-
- RV1-version-drift # pinned version in docs ≠ pyproject.toml
| `RV1-version-drift` | Doc pins `codeforerunner==X.Y.Z` differing from current version |
161
206
162
-
### MCP Server
207
+
## MCP Server
163
208
164
209
`forerunner mcp-server` speaks JSON-RPC 2.0 over stdio and exposes one tool per `prompts/tasks/*.md`. A scan-first gate enforces SPEC V2: any tool except `scan` or `init-agent-onboarding` returns an error until `scan` has been called in the same session.
165
210
166
211
See `examples/mcp/` for Claude Desktop and mcp-cli wiring examples.
167
212
168
213
## Providers
169
214
170
-
`forerunner generate` supports four providers. Set the appropriate env var before calling:
215
+
`forerunner generate`supports four providers. When no provider is explicitly configured and no API key is found, forerunner probes `localhost:11434` and falls back to Ollama automatically.
171
216
172
217
| Provider | Env var | Default model |
173
218
|----------|---------|---------------|
@@ -176,20 +221,11 @@ See `examples/mcp/` for Claude Desktop and mcp-cli wiring examples.
0 commit comments