codeforerunner 0.4.3__tar.gz → 0.4.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. {codeforerunner-0.4.3/src/codeforerunner.egg-info → codeforerunner-0.4.5}/PKG-INFO +69 -80
  2. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/README.md +68 -79
  3. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/pyproject.toml +2 -2
  4. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/bundle.py +1 -0
  5. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/check.py +7 -0
  6. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/cli.py +41 -112
  7. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/config.py +18 -42
  8. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/doctor.py +8 -92
  9. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/installer.py +8 -17
  10. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/mcp_server.py +28 -24
  11. codeforerunner-0.4.5/src/codeforerunner/prompt_session.py +53 -0
  12. codeforerunner-0.4.5/src/codeforerunner/prompts/tasks/arch-review.md +121 -0
  13. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/tasks/init-agent-onboarding.md +14 -1
  14. codeforerunner-0.4.5/src/codeforerunner/prompts/tasks/refresh.md +23 -0
  15. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/tasks/scan.md +2 -0
  16. codeforerunner-0.4.5/src/codeforerunner/tasks.json +30 -0
  17. codeforerunner-0.4.5/src/codeforerunner/tasks.py +59 -0
  18. {codeforerunner-0.4.3 → codeforerunner-0.4.5/src/codeforerunner.egg-info}/PKG-INFO +69 -80
  19. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner.egg-info/SOURCES.txt +8 -7
  20. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/tests/test_check.py +6 -5
  21. codeforerunner-0.4.5/tests/test_check_versions.py +126 -0
  22. codeforerunner-0.4.5/tests/test_cli.py +302 -0
  23. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/tests/test_config.py +16 -43
  24. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/tests/test_doctor.py +4 -179
  25. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/tests/test_installer.py +48 -9
  26. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/tests/test_mcp_server.py +88 -26
  27. codeforerunner-0.4.5/tests/test_prompt_session.py +50 -0
  28. codeforerunner-0.4.5/tests/test_tasks.py +85 -0
  29. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/tests/test_workflows_yaml.py +44 -0
  30. codeforerunner-0.4.3/src/codeforerunner/providers/__init__.py +0 -38
  31. codeforerunner-0.4.3/src/codeforerunner/providers/anthropic.py +0 -122
  32. codeforerunner-0.4.3/src/codeforerunner/providers/base.py +0 -47
  33. codeforerunner-0.4.3/src/codeforerunner/providers/google.py +0 -118
  34. codeforerunner-0.4.3/src/codeforerunner/providers/ollama.py +0 -139
  35. codeforerunner-0.4.3/src/codeforerunner/providers/openai.py +0 -117
  36. codeforerunner-0.4.3/tests/test_cli.py +0 -627
  37. codeforerunner-0.4.3/tests/test_providers.py +0 -669
  38. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/LICENSE.md +0 -0
  39. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/setup.cfg +0 -0
  40. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/__init__.py +0 -0
  41. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/partials/context-format.md +0 -0
  42. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/partials/output-rules.md +0 -0
  43. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/partials/stack-hints.md +0 -0
  44. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/system/base.md +0 -0
  45. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/tasks/api-docs.md +0 -0
  46. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/tasks/audit.md +0 -0
  47. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/tasks/changelog.md +0 -0
  48. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/tasks/check.md +0 -0
  49. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/tasks/diagrams.md +0 -0
  50. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/tasks/flows.md +0 -0
  51. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/tasks/readme.md +0 -0
  52. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/tasks/review.md +0 -0
  53. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/tasks/stack-docs.md +0 -0
  54. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner/prompts/tasks/version-audit.md +0 -0
  55. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner.egg-info/dependency_links.txt +0 -0
  56. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner.egg-info/entry_points.txt +0 -0
  57. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner.egg-info/requires.txt +0 -0
  58. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/src/codeforerunner.egg-info/top_level.txt +0 -0
  59. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/tests/test_bundle.py +0 -0
  60. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/tests/test_check_config_integration.py +0 -0
  61. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/tests/test_examples.py +0 -0
  62. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/tests/test_hooks_manifest.py +0 -0
  63. {codeforerunner-0.4.3 → codeforerunner-0.4.5}/tests/test_validate_codex_marketplace.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeforerunner
3
- Version: 0.4.3
3
+ Version: 0.4.5
4
4
  Summary: Model-agnostic repository documentation tooling (prompt-first; thin CLI).
5
5
  Author: Derek Palmer
6
6
  License-Expression: LicenseRef-Codeforerunner-SAL-0.1
@@ -29,11 +29,11 @@ Dynamic: license-file
29
29
 
30
30
  # codeForerunner
31
31
 
32
- 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.
32
+ [![Socket Badge](https://badge.socket.dev/npm/package/codeforerunner/0.4.5)](https://socket.dev/npm/package/codeforerunner)
33
33
 
34
- ## Two modes
34
+ 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.
35
35
 
36
- ### Mode A — Agent skill (recommended, no API key required)
36
+ ## Install
37
37
 
38
38
  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.
39
39
 
@@ -44,10 +44,15 @@ Install forerunner's prompt pack as skills into your agent CLI. Each documentati
44
44
  # One-liner (auto-detects Claude Code, Codex, Gemini CLI)
45
45
  curl -fsSL https://raw.githubusercontent.com/derek-palmer/codeforerunner/main/install.sh | bash
46
46
 
47
+ # npm
48
+ npx -y codeforerunner
49
+ npm install -g codeforerunner
50
+
47
51
  # Windows
48
52
  irm https://raw.githubusercontent.com/derek-palmer/codeforerunner/main/install.ps1 | iex
49
53
 
50
- # Via forerunner CLI (after pip install)
54
+ # Via Python CLI
55
+ pip install codeforerunner
51
56
  forerunner install --all claude
52
57
  forerunner install --all codex
53
58
  ```
@@ -58,26 +63,9 @@ Then in your agent:
58
63
  /forerunner-scan ← scan the repo first
59
64
  /forerunner-readme ← generate README
60
65
  /forerunner-check ← detect doc drift
66
+ /forerunner-refresh ← scan + update all stale docs
61
67
  ```
62
68
 
63
- ### Mode B — Direct API (needs API key or Ollama)
64
-
65
- Install the Python CLI and call your provider directly. Works without any agent CLI installed.
66
-
67
- ```bash
68
- pipx install codeforerunner # recommended
69
- pip install codeforerunner # alternative
70
- ```
71
-
72
- Configure a provider (or start Ollama for keyless local generation):
73
-
74
- ```bash
75
- export ANTHROPIC_API_KEY=sk-...
76
- forerunner generate readme --stream
77
- ```
78
-
79
- If no API key and no `--provider` flag, forerunner auto-detects Ollama at `localhost:11434` and falls back to local mode.
80
-
81
69
  ## Slash commands
82
70
 
83
71
  | Command | Task | Purpose |
@@ -87,6 +75,7 @@ If no API key and no `--provider` flag, forerunner auto-detects Ollama at `local
87
75
  | `/forerunner-api-docs` | `api-docs` | Generate API reference docs |
88
76
  | `/forerunner-diagrams` | `diagrams` | Generate Mermaid architecture diagrams |
89
77
  | `/forerunner-flows` | `flows` | Document system flows |
78
+ | `/forerunner-arch-review` | `arch-review` | Rank architecture improvement candidates, inspired by Matt Pocock's [`/improve-codebase-architecture`](https://github.com/mattpocock/skills/tree/main/skills/engineering/improve-codebase-architecture) |
90
79
  | `/forerunner-stack-docs` | `stack-docs` | Stack-specific developer docs |
91
80
  | `/forerunner-version-audit` | `version-audit` | Audit pinned versions vs EOL |
92
81
  | `/forerunner-check` | `check` | Check docs for staleness |
@@ -94,14 +83,17 @@ If no API key and no `--provider` flag, forerunner auto-detects Ollama at `local
94
83
  | `/forerunner-audit` | `audit` | Security and dependency audit |
95
84
  | `/forerunner-changelog` | `changelog` | Generate changelog from git log |
96
85
  | `/forerunner-init` | `init-agent-onboarding` | Bootstrap or refresh AGENTS.md |
86
+ | `/forerunner-refresh` | `refresh` | Scan + check + update all stale docs in one pass |
97
87
 
98
- Slash command availability depends on the agent CLI. Claude Code, Codex, and Gemini CLI support all 12 commands after install.
88
+ Slash command availability depends on the agent CLI. Claude Code, Codex, and Gemini CLI support all commands after install.
99
89
 
100
90
  ## Skill install options
101
91
 
102
92
  | Flag | Effect |
103
93
  |------|--------|
104
- | `./install.sh` | Auto-detect all agents, install all skills |
94
+ | `./install.sh` | Auto-detect all agents, prompt global vs local, install all skills |
95
+ | `./install.sh --global` | Skip prompt, install to global agent dirs (all projects) |
96
+ | `./install.sh --local` | Skip prompt, install to `.claude/skills/` and `.agents/skills/` in cwd |
105
97
  | `./install.sh --only claude` | Claude Code only |
106
98
  | `./install.sh --only codex` | Codex only |
107
99
  | `./install.sh --only gemini` | Gemini CLI only |
@@ -120,65 +112,57 @@ pip install codeforerunner
120
112
  | `forerunner init` | Resolve agent-onboarding bundle to stdout. |
121
113
  | `forerunner scan` | Resolve scan bundle to stdout. |
122
114
  | `forerunner doc <task>` | Resolve `base + partials + task` bundle to stdout. |
115
+ | `forerunner refresh` | Output scan + check + all doc-task bundles in sequence for a full doc refresh. |
123
116
  | `forerunner check` | Run drift-detection rules; no-op without `forerunner.config.yaml`. |
124
- | `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. |
125
- | `forerunner doctor` | Health report: skill parity, config, provider key, local-mode status. Add `--fix` to write a starter config. |
117
+ | `forerunner doctor` | Health report: skill parity, config. Add `--fix` to write a starter config. |
126
118
  | `forerunner mcp-server` | Serve prompt bundles as MCP tools over stdio (JSON-RPC 2.0). |
127
119
  | `forerunner install <agent>` | Install canonical skill into agent-specific directory. Add `--all` for all per-task skills. |
128
120
 
129
- ## Prompt pack
130
-
131
- Prompts are bundled inside the package at `src/codeforerunner/prompts/`.
132
-
133
- ```text
134
- prompts/
135
- ├── system/base.md
136
- ├── partials/
137
- │ ├── context-format.md
138
- │ ├── output-rules.md
139
- │ └── stack-hints.md
140
- └── tasks/
141
- ├── scan.md api-docs.md audit.md
142
- ├── readme.md diagrams.md changelog.md
143
- ├── check.md flows.md version-audit.md
144
- ├── review.md stack-docs.md
145
- └── init-agent-onboarding.md
146
- ```
147
-
148
- ## Quick start (agent skill mode)
121
+ ## Quick start
149
122
 
150
123
  ```bash
151
124
  # Install skills into Claude Code
152
125
  curl -fsSL https://raw.githubusercontent.com/derek-palmer/codeforerunner/main/install.sh | bash
153
126
 
127
+ # Or via npm
128
+ # npx -y codeforerunner
129
+
154
130
  # In Claude Code:
155
- # /forerunner-scan → scans your repo
156
- # /forerunner-readme → generates README.md
157
- # /forerunner-check checks for doc drift
131
+ # /forerunner-scan → scans your repo
132
+ # /forerunner-readme → generates README.md
133
+ # /forerunner-refresh updates all stale docs
134
+ # /forerunner-check → checks for doc drift
158
135
  ```
159
136
 
160
- ## Quick start (direct API mode)
161
-
162
- ```bash
163
- # 1. Install and configure
164
- pip install codeforerunner
165
- export ANTHROPIC_API_KEY=sk-...
137
+ ## GitHub Action
166
138
 
167
- # 2. Run a task
168
- forerunner generate readme --stream
139
+ Add doc-drift detection to any repo's CI — fails the PR if docs contradict repo state.
169
140
 
170
- # 3. Enable drift detection
171
- forerunner doctor --fix # writes forerunner.config.yaml
172
- forerunner check # run any time or as pre-commit hook
141
+ ```yaml
142
+ # .github/workflows/doc-check.yml
143
+ name: Doc Check
144
+ on: [push, pull_request]
145
+
146
+ jobs:
147
+ doc-check:
148
+ runs-on: ubuntu-latest
149
+ steps:
150
+ - uses: actions/checkout@v6.0.2
151
+ - uses: derek-palmer/codeforerunner@v0.4.5
152
+ with:
153
+ fail-on-drift: "true" # set "false" to warn-only
173
154
  ```
174
155
 
175
- ## GitHub Action
156
+ No-op when `forerunner.config.yaml` is absent — safe to add before configuring rules.
176
157
 
177
- ```yaml
178
- - uses: derek-palmer/codeforerunner@v0.4.2
179
- ```
158
+ **Inputs**
180
159
 
181
- No-op when `forerunner.config.yaml` is absent.
160
+ | Input | Default | Description |
161
+ |-------|---------|-------------|
162
+ | `version` | `latest` | `codeforerunner` version to install |
163
+ | `python-version` | `3.11` | Python version |
164
+ | `repo` | workspace root | Path to check |
165
+ | `fail-on-drift` | `true` | Exit non-zero on drift |
182
166
 
183
167
  ## Configuration
184
168
 
@@ -191,10 +175,7 @@ forerunner doctor --fix
191
175
  ### Config fields
192
176
 
193
177
  ```yaml
194
- provider: anthropic # anthropic | openai | google | ollama
195
- model: claude-opus-4-7
196
- api_key_env:
197
- anthropic: ANTHROPIC_API_KEY
178
+ approaching_eol_threshold_months: 6
198
179
 
199
180
  tasks:
200
181
  check:
@@ -237,20 +218,28 @@ tasks:
237
218
 
238
219
  See `examples/mcp/` for Claude Desktop and mcp-cli wiring examples.
239
220
 
240
- ## Providers
221
+ ## Prompt pack
241
222
 
242
- `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.
223
+ Prompts are bundled inside the package at `src/codeforerunner/prompts/`.
243
224
 
244
- | Provider | Env var | Default model |
245
- |----------|---------|---------------|
246
- | `anthropic` | `ANTHROPIC_API_KEY` | `claude-opus-4-7` |
247
- | `openai` | `OPENAI_API_KEY` | `gpt-4o` |
248
- | `google` | `GOOGLE_API_KEY` | `gemini-2.5-pro` |
249
- | `ollama` | `OLLAMA_HOST` (optional) | `llama3` |
225
+ ```text
226
+ prompts/
227
+ ├── system/base.md
228
+ ├── partials/
229
+ │ ├── context-format.md
230
+ │ ├── output-rules.md
231
+ │ └── stack-hints.md
232
+ └── tasks/
233
+ ├── scan.md api-docs.md audit.md
234
+ ├── readme.md diagrams.md changelog.md
235
+ ├── check.md flows.md version-audit.md
236
+ ├── review.md stack-docs.md arch-review.md
237
+ ├── refresh.md
238
+ └── init-agent-onboarding.md
239
+ ```
250
240
 
251
- ## Docs and spec
241
+ ## Docs
252
242
 
253
- - `SPEC.md` — canonical phase/task tracker
254
243
  - `docs/getting-started.md` — manual prompt use
255
244
  - `docs/prompt-guide.md` — how system, partial, and task prompts compose
256
245
  - `docs/editor-agent-setup.md` — adapting prompts to local agents
@@ -2,11 +2,11 @@
2
2
 
3
3
  # codeForerunner
4
4
 
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.
5
+ [![Socket Badge](https://badge.socket.dev/npm/package/codeforerunner/0.4.5)](https://socket.dev/npm/package/codeforerunner)
6
6
 
7
- ## Two modes
7
+ 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.
8
8
 
9
- ### Mode A — Agent skill (recommended, no API key required)
9
+ ## Install
10
10
 
11
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
12
 
@@ -17,10 +17,15 @@ Install forerunner's prompt pack as skills into your agent CLI. Each documentati
17
17
  # One-liner (auto-detects Claude Code, Codex, Gemini CLI)
18
18
  curl -fsSL https://raw.githubusercontent.com/derek-palmer/codeforerunner/main/install.sh | bash
19
19
 
20
+ # npm
21
+ npx -y codeforerunner
22
+ npm install -g codeforerunner
23
+
20
24
  # Windows
21
25
  irm https://raw.githubusercontent.com/derek-palmer/codeforerunner/main/install.ps1 | iex
22
26
 
23
- # Via forerunner CLI (after pip install)
27
+ # Via Python CLI
28
+ pip install codeforerunner
24
29
  forerunner install --all claude
25
30
  forerunner install --all codex
26
31
  ```
@@ -31,26 +36,9 @@ Then in your agent:
31
36
  /forerunner-scan ← scan the repo first
32
37
  /forerunner-readme ← generate README
33
38
  /forerunner-check ← detect doc drift
39
+ /forerunner-refresh ← scan + update all stale docs
34
40
  ```
35
41
 
36
- ### Mode B — Direct API (needs API key or Ollama)
37
-
38
- Install the Python CLI and call your provider directly. Works without any agent CLI installed.
39
-
40
- ```bash
41
- pipx install codeforerunner # recommended
42
- pip install codeforerunner # alternative
43
- ```
44
-
45
- Configure a provider (or start Ollama for keyless local generation):
46
-
47
- ```bash
48
- export ANTHROPIC_API_KEY=sk-...
49
- forerunner generate readme --stream
50
- ```
51
-
52
- If no API key and no `--provider` flag, forerunner auto-detects Ollama at `localhost:11434` and falls back to local mode.
53
-
54
42
  ## Slash commands
55
43
 
56
44
  | Command | Task | Purpose |
@@ -60,6 +48,7 @@ If no API key and no `--provider` flag, forerunner auto-detects Ollama at `local
60
48
  | `/forerunner-api-docs` | `api-docs` | Generate API reference docs |
61
49
  | `/forerunner-diagrams` | `diagrams` | Generate Mermaid architecture diagrams |
62
50
  | `/forerunner-flows` | `flows` | Document system flows |
51
+ | `/forerunner-arch-review` | `arch-review` | Rank architecture improvement candidates, inspired by Matt Pocock's [`/improve-codebase-architecture`](https://github.com/mattpocock/skills/tree/main/skills/engineering/improve-codebase-architecture) |
63
52
  | `/forerunner-stack-docs` | `stack-docs` | Stack-specific developer docs |
64
53
  | `/forerunner-version-audit` | `version-audit` | Audit pinned versions vs EOL |
65
54
  | `/forerunner-check` | `check` | Check docs for staleness |
@@ -67,14 +56,17 @@ If no API key and no `--provider` flag, forerunner auto-detects Ollama at `local
67
56
  | `/forerunner-audit` | `audit` | Security and dependency audit |
68
57
  | `/forerunner-changelog` | `changelog` | Generate changelog from git log |
69
58
  | `/forerunner-init` | `init-agent-onboarding` | Bootstrap or refresh AGENTS.md |
59
+ | `/forerunner-refresh` | `refresh` | Scan + check + update all stale docs in one pass |
70
60
 
71
- Slash command availability depends on the agent CLI. Claude Code, Codex, and Gemini CLI support all 12 commands after install.
61
+ Slash command availability depends on the agent CLI. Claude Code, Codex, and Gemini CLI support all commands after install.
72
62
 
73
63
  ## Skill install options
74
64
 
75
65
  | Flag | Effect |
76
66
  |------|--------|
77
- | `./install.sh` | Auto-detect all agents, install all skills |
67
+ | `./install.sh` | Auto-detect all agents, prompt global vs local, install all skills |
68
+ | `./install.sh --global` | Skip prompt, install to global agent dirs (all projects) |
69
+ | `./install.sh --local` | Skip prompt, install to `.claude/skills/` and `.agents/skills/` in cwd |
78
70
  | `./install.sh --only claude` | Claude Code only |
79
71
  | `./install.sh --only codex` | Codex only |
80
72
  | `./install.sh --only gemini` | Gemini CLI only |
@@ -93,65 +85,57 @@ pip install codeforerunner
93
85
  | `forerunner init` | Resolve agent-onboarding bundle to stdout. |
94
86
  | `forerunner scan` | Resolve scan bundle to stdout. |
95
87
  | `forerunner doc <task>` | Resolve `base + partials + task` bundle to stdout. |
88
+ | `forerunner refresh` | Output scan + check + all doc-task bundles in sequence for a full doc refresh. |
96
89
  | `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. |
90
+ | `forerunner doctor` | Health report: skill parity, config. Add `--fix` to write a starter config. |
99
91
  | `forerunner mcp-server` | Serve prompt bundles as MCP tools over stdio (JSON-RPC 2.0). |
100
92
  | `forerunner install <agent>` | Install canonical skill into agent-specific directory. Add `--all` for all per-task skills. |
101
93
 
102
- ## Prompt pack
103
-
104
- Prompts are bundled inside the package at `src/codeforerunner/prompts/`.
105
-
106
- ```text
107
- prompts/
108
- ├── system/base.md
109
- ├── partials/
110
- │ ├── context-format.md
111
- │ ├── output-rules.md
112
- │ └── stack-hints.md
113
- └── tasks/
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
119
- ```
120
-
121
- ## Quick start (agent skill mode)
94
+ ## Quick start
122
95
 
123
96
  ```bash
124
97
  # Install skills into Claude Code
125
98
  curl -fsSL https://raw.githubusercontent.com/derek-palmer/codeforerunner/main/install.sh | bash
126
99
 
100
+ # Or via npm
101
+ # npx -y codeforerunner
102
+
127
103
  # In Claude Code:
128
- # /forerunner-scan → scans your repo
129
- # /forerunner-readme → generates README.md
130
- # /forerunner-check checks for doc drift
104
+ # /forerunner-scan → scans your repo
105
+ # /forerunner-readme → generates README.md
106
+ # /forerunner-refresh updates all stale docs
107
+ # /forerunner-check → checks for doc drift
131
108
  ```
132
109
 
133
- ## Quick start (direct API mode)
134
-
135
- ```bash
136
- # 1. Install and configure
137
- pip install codeforerunner
138
- export ANTHROPIC_API_KEY=sk-...
110
+ ## GitHub Action
139
111
 
140
- # 2. Run a task
141
- forerunner generate readme --stream
112
+ Add doc-drift detection to any repo's CI — fails the PR if docs contradict repo state.
142
113
 
143
- # 3. Enable drift detection
144
- forerunner doctor --fix # writes forerunner.config.yaml
145
- forerunner check # run any time or as pre-commit hook
114
+ ```yaml
115
+ # .github/workflows/doc-check.yml
116
+ name: Doc Check
117
+ on: [push, pull_request]
118
+
119
+ jobs:
120
+ doc-check:
121
+ runs-on: ubuntu-latest
122
+ steps:
123
+ - uses: actions/checkout@v6.0.2
124
+ - uses: derek-palmer/codeforerunner@v0.4.5
125
+ with:
126
+ fail-on-drift: "true" # set "false" to warn-only
146
127
  ```
147
128
 
148
- ## GitHub Action
129
+ No-op when `forerunner.config.yaml` is absent — safe to add before configuring rules.
149
130
 
150
- ```yaml
151
- - uses: derek-palmer/codeforerunner@v0.4.2
152
- ```
131
+ **Inputs**
153
132
 
154
- No-op when `forerunner.config.yaml` is absent.
133
+ | Input | Default | Description |
134
+ |-------|---------|-------------|
135
+ | `version` | `latest` | `codeforerunner` version to install |
136
+ | `python-version` | `3.11` | Python version |
137
+ | `repo` | workspace root | Path to check |
138
+ | `fail-on-drift` | `true` | Exit non-zero on drift |
155
139
 
156
140
  ## Configuration
157
141
 
@@ -164,10 +148,7 @@ forerunner doctor --fix
164
148
  ### Config fields
165
149
 
166
150
  ```yaml
167
- provider: anthropic # anthropic | openai | google | ollama
168
- model: claude-opus-4-7
169
- api_key_env:
170
- anthropic: ANTHROPIC_API_KEY
151
+ approaching_eol_threshold_months: 6
171
152
 
172
153
  tasks:
173
154
  check:
@@ -210,20 +191,28 @@ tasks:
210
191
 
211
192
  See `examples/mcp/` for Claude Desktop and mcp-cli wiring examples.
212
193
 
213
- ## Providers
194
+ ## Prompt pack
214
195
 
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.
196
+ Prompts are bundled inside the package at `src/codeforerunner/prompts/`.
216
197
 
217
- | Provider | Env var | Default model |
218
- |----------|---------|---------------|
219
- | `anthropic` | `ANTHROPIC_API_KEY` | `claude-opus-4-7` |
220
- | `openai` | `OPENAI_API_KEY` | `gpt-4o` |
221
- | `google` | `GOOGLE_API_KEY` | `gemini-2.5-pro` |
222
- | `ollama` | `OLLAMA_HOST` (optional) | `llama3` |
198
+ ```text
199
+ prompts/
200
+ ├── system/base.md
201
+ ├── partials/
202
+ │ ├── context-format.md
203
+ │ ├── output-rules.md
204
+ │ └── stack-hints.md
205
+ └── tasks/
206
+ ├── scan.md api-docs.md audit.md
207
+ ├── readme.md diagrams.md changelog.md
208
+ ├── check.md flows.md version-audit.md
209
+ ├── review.md stack-docs.md arch-review.md
210
+ ├── refresh.md
211
+ └── init-agent-onboarding.md
212
+ ```
223
213
 
224
- ## Docs and spec
214
+ ## Docs
225
215
 
226
- - `SPEC.md` — canonical phase/task tracker
227
216
  - `docs/getting-started.md` — manual prompt use
228
217
  - `docs/prompt-guide.md` — how system, partial, and task prompts compose
229
218
  - `docs/editor-agent-setup.md` — adapting prompts to local agents
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "codeforerunner"
7
- version = "0.4.3"
7
+ version = "0.4.5"
8
8
  description = "Model-agnostic repository documentation tooling (prompt-first; thin CLI)."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -50,7 +50,7 @@ forerunner = "codeforerunner.cli:main"
50
50
  where = ["src"]
51
51
 
52
52
  [tool.setuptools.package-data]
53
- codeforerunner = ["py.typed", "prompts/**/*.md"]
53
+ codeforerunner = ["py.typed", "prompts/**/*.md", "tasks.json"]
54
54
 
55
55
  [tool.pytest.ini_options]
56
56
  testpaths = ["tests"]
@@ -5,6 +5,7 @@ from pathlib import Path
5
5
 
6
6
 
7
7
  def _package_prompts() -> Path:
8
+ """Return the path to the bundled prompts directory inside the package."""
8
9
  return Path(__file__).parent / "prompts"
9
10
 
10
11
 
@@ -21,6 +21,8 @@ class Violation:
21
21
 
22
22
  @dataclass(frozen=True)
23
23
  class _Rule:
24
+ """Drift detection rule: pattern to match, trigger files, and violation message."""
25
+
24
26
  id: str
25
27
  pattern: re.Pattern
26
28
  triggers: tuple[str, ...]
@@ -124,6 +126,7 @@ _CHANGELOG_FILENAME = "CHANGELOG.md"
124
126
 
125
127
 
126
128
  def _trigger_exists(repo: Path, patterns: tuple[str, ...]) -> bool:
129
+ """Return True if any pattern matches an existing file in repo."""
127
130
  for pat in patterns:
128
131
  if "*" in pat:
129
132
  parent = repo / Path(pat).parent
@@ -137,6 +140,7 @@ def _trigger_exists(repo: Path, patterns: tuple[str, ...]) -> bool:
137
140
 
138
141
 
139
142
  def _scanned_docs(repo: Path) -> list[Path]:
143
+ """Collect README.md and all *.md files under docs/ from repo."""
140
144
  docs: list[Path] = []
141
145
  readme = repo / "README.md"
142
146
  if readme.is_file():
@@ -148,6 +152,7 @@ def _scanned_docs(repo: Path) -> list[Path]:
148
152
 
149
153
 
150
154
  def _path_ignored(repo: Path, doc: Path, ignore_patterns: tuple[str, ...]) -> bool:
155
+ """Return True if doc's repo-relative path matches any ignore pattern."""
151
156
  if not ignore_patterns:
152
157
  return False
153
158
  try:
@@ -158,6 +163,7 @@ def _path_ignored(repo: Path, doc: Path, ignore_patterns: tuple[str, ...]) -> bo
158
163
 
159
164
 
160
165
  def _current_version(repo: Path) -> str | None:
166
+ """Extract the package version from pyproject.toml, or None if absent/unparseable."""
161
167
  pyproject = repo / "pyproject.toml"
162
168
  if not pyproject.is_file():
163
169
  return None
@@ -175,6 +181,7 @@ def _check_version_drift(
175
181
  ignore_patterns: tuple[str, ...],
176
182
  enabled: set[str] | None,
177
183
  ) -> list[Violation]:
184
+ """Scan docs for pinned version strings that don't match pyproject.toml."""
178
185
  if enabled is not None and "RV1-version-drift" not in enabled:
179
186
  return []
180
187
  current = _current_version(repo)