spec-runner 2.3.0__tar.gz → 2.3.1__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.
- {spec_runner-2.3.0/src/spec_runner.egg-info → spec_runner-2.3.1}/PKG-INFO +8 -2
- {spec_runner-2.3.0 → spec_runner-2.3.1}/README.md +7 -1
- {spec_runner-2.3.0 → spec_runner-2.3.1}/pyproject.toml +1 -1
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/SKILL.md +4 -0
- spec_runner-2.3.1/src/spec_runner/skills/spec-generator-skill/templates/pi/skills/pi-implementer/SKILL.md +37 -0
- spec_runner-2.3.1/src/spec_runner/skills/spec-generator-skill/templates/pi/skills/pi-reviewer/SKILL.md +32 -0
- spec_runner-2.3.1/src/spec_runner/skills/spec-generator-skill/templates/pi/skills/pi-tester/SKILL.md +28 -0
- spec_runner-2.3.1/src/spec_runner/skills/spec-generator-skill/templates/pi/spec-runner.pi.config.yaml +51 -0
- spec_runner-2.3.1/src/spec_runner/skills/spec-generator-skill/templates/prompts/review.pi.md +38 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1/src/spec_runner.egg-info}/PKG-INFO +8 -2
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner.egg-info/SOURCES.txt +4 -0
- spec_runner-2.3.0/src/spec_runner/skills/spec-generator-skill/templates/prompts/review.pi.md +0 -38
- {spec_runner-2.3.0 → spec_runner-2.3.1}/LICENSE +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/setup.cfg +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/__init__.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/audit.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/audit_log.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/cli.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/cli_info.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/cli_plan.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/config.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/errors.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/events.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/execution.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/executor.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/git_ops.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/github_sync.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/hooks.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/init_cmd.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/logging.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/mcp_server.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/notifications.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/obs.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/plugins.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/prompt.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/py.typed +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/report.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/review.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/runner.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/Makefile.template +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/design.template.md +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/executor.config.yaml +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/executor.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/phase-design.template.md +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/phase-requirements.template.md +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/phase-tasks.template.md +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/prompts/review.claude.md +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/prompts/review.codex.md +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/prompts/review.llama.md +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/prompts/review.md +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/prompts/review.ollama.md +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/prompts/review.opencode.md +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/requirements.template.md +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/task.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/tasks.template.md +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/templates/workflow.template.md +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/stages.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/state.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/task.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/task_commands.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/tui.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/validate.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/verify.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner.egg-info/dependency_links.txt +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner.egg-info/entry_points.txt +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner.egg-info/requires.txt +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner.egg-info/top_level.txt +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_audit.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_audit_log.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_cli_flags.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_cli_info.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_cli_run_reset.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_config.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_costs.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_e2e.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_errors.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_events.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_execution.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_gh_sync.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_hooks.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_json_result_contract.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_logging.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_mcp.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_notifications.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_obs.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_obs_contract.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_plan_full.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_plugins.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_prompt.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_report.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_runner.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_spec_prefix.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_stages.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_state.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_subdir_detection.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_task.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_task_diff.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_tui.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_validate.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_verify.py +0 -0
- {spec_runner-2.3.0 → spec_runner-2.3.1}/tests/test_watch.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spec-runner
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: Task automation from markdown specs via Claude CLI
|
|
5
5
|
Author: Andrei
|
|
6
6
|
License-Expression: MIT
|
|
@@ -134,7 +134,8 @@ Tasks are defined in `spec/tasks.md`:
|
|
|
134
134
|
# Execution
|
|
135
135
|
spec-runner run # Execute next ready task
|
|
136
136
|
spec-runner run --task=TASK-001 # Execute specific task
|
|
137
|
-
spec-runner run --all # Execute all ready tasks
|
|
137
|
+
spec-runner run --all # Execute all ready tasks (resets failed→pending by default)
|
|
138
|
+
spec-runner run --all --no-reset-failed # Keep failed tasks sticky (skip the default reset)
|
|
138
139
|
spec-runner run --all --hitl-review # Interactive HITL approval gate
|
|
139
140
|
spec-runner run --force # Skip lock check (stale lock)
|
|
140
141
|
spec-runner run --tui # Execute with live TUI dashboard
|
|
@@ -375,6 +376,11 @@ paths:
|
|
|
375
376
|
| llama-cli | Yes | `{cmd} -m {model} -p {prompt} --no-display-prompt` |
|
|
376
377
|
| Custom | Use template | `{cmd} --prompt {prompt}` |
|
|
377
378
|
|
|
379
|
+
> **Full pi-driven loop:** `pi` can run the entire dev → review → test cycle (with native
|
|
380
|
+
> skills, per-stage tool control and a read-only review gate) using only config and a small
|
|
381
|
+
> script — no core code. See [docs/pi-workflow.md](docs/pi-workflow.md) and the runnable
|
|
382
|
+
> [examples/pi-loop/](examples/pi-loop/).
|
|
383
|
+
|
|
378
384
|
## Project Structure
|
|
379
385
|
|
|
380
386
|
```
|
|
@@ -99,7 +99,8 @@ Tasks are defined in `spec/tasks.md`:
|
|
|
99
99
|
# Execution
|
|
100
100
|
spec-runner run # Execute next ready task
|
|
101
101
|
spec-runner run --task=TASK-001 # Execute specific task
|
|
102
|
-
spec-runner run --all # Execute all ready tasks
|
|
102
|
+
spec-runner run --all # Execute all ready tasks (resets failed→pending by default)
|
|
103
|
+
spec-runner run --all --no-reset-failed # Keep failed tasks sticky (skip the default reset)
|
|
103
104
|
spec-runner run --all --hitl-review # Interactive HITL approval gate
|
|
104
105
|
spec-runner run --force # Skip lock check (stale lock)
|
|
105
106
|
spec-runner run --tui # Execute with live TUI dashboard
|
|
@@ -340,6 +341,11 @@ paths:
|
|
|
340
341
|
| llama-cli | Yes | `{cmd} -m {model} -p {prompt} --no-display-prompt` |
|
|
341
342
|
| Custom | Use template | `{cmd} --prompt {prompt}` |
|
|
342
343
|
|
|
344
|
+
> **Full pi-driven loop:** `pi` can run the entire dev → review → test cycle (with native
|
|
345
|
+
> skills, per-stage tool control and a read-only review gate) using only config and a small
|
|
346
|
+
> script — no core code. See [docs/pi-workflow.md](docs/pi-workflow.md) and the runnable
|
|
347
|
+
> [examples/pi-loop/](examples/pi-loop/).
|
|
348
|
+
|
|
343
349
|
## Project Structure
|
|
344
350
|
|
|
345
351
|
```
|
{spec_runner-2.3.0 → spec_runner-2.3.1}/src/spec_runner/skills/spec-generator-skill/SKILL.md
RENAMED
|
@@ -311,6 +311,10 @@ File templates are located in `templates/`:
|
|
|
311
311
|
- `executor.py` — auto-execution via Claude CLI
|
|
312
312
|
- `executor.config.yaml` — executor configuration
|
|
313
313
|
- `Makefile.template` — Make targets for the project
|
|
314
|
+
- `pi/` — full **dev → review → test loop on the `pi` coding agent** with no core code:
|
|
315
|
+
`pi/skills/{pi-implementer,pi-reviewer,pi-tester}/SKILL.md` (pi-native role skills) and
|
|
316
|
+
`pi/spec-runner.pi.config.yaml` (per-stage command templates: full tools for develop, a
|
|
317
|
+
read-only review gate). See `docs/pi-workflow.md` and `examples/pi-loop/` in the repo.
|
|
314
318
|
|
|
315
319
|
## Examples
|
|
316
320
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pi-implementer
|
|
3
|
+
description: Implement a spec-runner task end-to-end with the pi coding agent — write the code AND its tests, run the tests via bash until green, then emit the spec-runner completion marker. Use during the development stage of the dev→review→test loop.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pi Implementer
|
|
7
|
+
|
|
8
|
+
You are the **implementer** in a spec-runner dev→review→test loop. spec-runner hands you a
|
|
9
|
+
single task (with its checklist, requirements and design refs). Your job is to make it real,
|
|
10
|
+
verify it yourself, and report a machine-readable result.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. **Understand the task.** Read the task description, checklist, and any referenced
|
|
15
|
+
`[REQ-XXX]` / `[DESIGN-XXX]`. Use `read`/`grep`/`find` to study the existing code and
|
|
16
|
+
match its conventions (naming, structure, style). Do not invent new patterns when one
|
|
17
|
+
already exists.
|
|
18
|
+
2. **Implement.** Use `edit`/`write` to make the smallest change that satisfies the task.
|
|
19
|
+
Keep functions small and focused; add docstrings to public APIs; follow the project's
|
|
20
|
+
line-length and style rules.
|
|
21
|
+
3. **Write tests in the same pass.** Every new behavior gets a test. Cover the happy path,
|
|
22
|
+
edge cases, and error paths. Put tests where the project keeps them (mirror existing
|
|
23
|
+
test layout).
|
|
24
|
+
4. **Run the tests yourself with `bash`.** Run the project's test command (e.g.
|
|
25
|
+
`uv run pytest -q`). If anything fails, fix it and re-run. Do not stop while tests are
|
|
26
|
+
red. If you also have a linter/formatter, run it and fix what it flags.
|
|
27
|
+
5. **Report.** End your final message with exactly one marker on its own line:
|
|
28
|
+
- `TASK_COMPLETE` — the change is implemented, tested, and the suite is green.
|
|
29
|
+
- `TASK_FAILED` — you could not complete the task (explain why on the line above).
|
|
30
|
+
|
|
31
|
+
## Rules
|
|
32
|
+
|
|
33
|
+
- Only touch code related to this task. No drive-by refactors.
|
|
34
|
+
- Never leave the suite red and claim success — spec-runner re-runs the tests as a gate and
|
|
35
|
+
will fail the task anyway.
|
|
36
|
+
- Prefer reusing existing helpers over writing new ones.
|
|
37
|
+
- Put the marker on the **last line**, nothing after it.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pi-reviewer
|
|
3
|
+
description: Read-only code review for a spec-runner task with the pi coding agent — inspect the diff and changed files, report findings, and emit a pass/fail verdict WITHOUT editing any code. Use during the review-gate stage of the dev→review→test loop.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pi Reviewer (read-only gate)
|
|
7
|
+
|
|
8
|
+
You are the **reviewer** in a spec-runner dev→review→test loop. You run with a read-only tool
|
|
9
|
+
set (`read`, `grep`, `find`) — you **cannot and must not** modify code. Your job is to judge
|
|
10
|
+
the change and return a verdict spec-runner can act on.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. **Read the change.** spec-runner gives you the task, the changed files, and the diff. Use
|
|
15
|
+
`read`/`grep`/`find` to inspect the touched code and its surroundings in context.
|
|
16
|
+
2. **Review against this checklist:**
|
|
17
|
+
- **Correctness** — logic errors, off-by-one, null/None handling, wrong types.
|
|
18
|
+
- **Security** — injection, unsafe input handling, secrets in code.
|
|
19
|
+
- **Error handling** — missing or swallowed errors, unguarded edge cases.
|
|
20
|
+
- **Test coverage** — does the new behavior have tests? Are edge/error paths covered?
|
|
21
|
+
- **Task fit** — are all checklist items actually implemented?
|
|
22
|
+
3. **Report findings** concisely: file + line + what's wrong + why it matters. If clean, say so.
|
|
23
|
+
4. **Verdict.** End your final message with exactly one marker on its own line:
|
|
24
|
+
- `REVIEW_PASSED` — no blocking issues; the change is good to merge.
|
|
25
|
+
- `REVIEW_FAILED` — there are issues that need attention (list them above).
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
- **Do not edit, write, or run code.** You are a gate, not a fixer. If something is wrong,
|
|
30
|
+
describe it and fail the review — the implementer will fix it on retry.
|
|
31
|
+
- Be specific and actionable. "Looks fine" is not a review; "no issues found in X, Y, Z" is.
|
|
32
|
+
- Put the verdict marker on the **last line**, nothing after it.
|
spec_runner-2.3.1/src/spec_runner/skills/spec-generator-skill/templates/pi/skills/pi-tester/SKILL.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pi-tester
|
|
3
|
+
description: Strengthen a module's test suite with the pi coding agent — add missing edge-case, error-path and regression tests, then run them to confirm they pass. Use for a standalone test-hardening step (script or plugin) outside the main task gate.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pi Tester
|
|
7
|
+
|
|
8
|
+
You harden tests for a target module. This is a focused **testing** pass, not feature work —
|
|
9
|
+
you add and improve tests, you do not change production behavior.
|
|
10
|
+
|
|
11
|
+
## Workflow
|
|
12
|
+
|
|
13
|
+
1. **Find the target.** You're given a module/area (often via `$1` / `$SR_TASK_ID`). Use
|
|
14
|
+
`read`/`grep`/`find` to locate it and its existing tests.
|
|
15
|
+
2. **Find the gaps.** Look for untested branches, edge cases (empty/boundary inputs), error
|
|
16
|
+
paths, and recently changed behavior with no regression test.
|
|
17
|
+
3. **Add tests** with `edit`/`write`, matching the project's test framework and layout. Keep
|
|
18
|
+
tests small, named clearly, and independent.
|
|
19
|
+
4. **Run them with `bash`** (e.g. `uv run pytest -q`). Keep iterating until they pass. If a
|
|
20
|
+
new test reveals a real bug, report it clearly rather than weakening the test to pass.
|
|
21
|
+
5. **Report** what you added and the final test result.
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
- Do not change production code to make a test pass — if a test fails for a real reason, flag
|
|
26
|
+
it. (If invoked read-only, just report the gaps and proposed tests.)
|
|
27
|
+
- Prefer extending existing test files over creating parallel ones.
|
|
28
|
+
- Keep additions minimal and high-signal; no redundant or trivial assertions.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# spec-runner config for a full dev→review→test loop driven by the `pi` coding agent.
|
|
2
|
+
#
|
|
3
|
+
# Copy to your project root as `spec-runner.config.yaml` and adjust the model. The pi-native
|
|
4
|
+
# skills referenced below ship alongside this file under `pi/skills/` — copy them to your
|
|
5
|
+
# project as `.pi/skills/` (or point `--skill` at wherever you keep them).
|
|
6
|
+
#
|
|
7
|
+
# See docs/pi-workflow.md for the full explanation of how each stage maps to pi flags.
|
|
8
|
+
|
|
9
|
+
executor:
|
|
10
|
+
# --- which agent backend ---
|
|
11
|
+
claude_command: "pi"
|
|
12
|
+
# IMPORTANT: set an explicit model your pi install is authenticated for — run
|
|
13
|
+
# `pi --list-models` to see them (ids look like "openai-codex/gpt-5.4", "google/gemini-...").
|
|
14
|
+
# With the templates below a blank model yields a bare `--model ` which shlex drops and pi
|
|
15
|
+
# errors. Either set a model here or remove `--model {model}` from the templates and rely on
|
|
16
|
+
# pi's own default (provider / PI_* env / ~/.pi/agent/settings.json).
|
|
17
|
+
claude_model: "openai-codex/gpt-5.4"
|
|
18
|
+
|
|
19
|
+
# --- DEVELOP stage: implementer with the full tool set + role skill ---
|
|
20
|
+
command_template: "{cmd} -p --model {model} --tools read,bash,edit,write,grep,find,ls --skill .pi/skills/pi-implementer {prompt}"
|
|
21
|
+
|
|
22
|
+
# --- REVIEW stage: read-only gate (no edit/write/bash) + reviewer skill ---
|
|
23
|
+
review_command: "pi"
|
|
24
|
+
review_model: "openai-codex/gpt-5.4"
|
|
25
|
+
review_command_template: "{cmd} -p --model {model} --tools read,grep,find --skill .pi/skills/pi-reviewer {prompt}"
|
|
26
|
+
|
|
27
|
+
# --- TEST stage: spec-runner runs the suite as the gate ---
|
|
28
|
+
run_tests_on_done: true
|
|
29
|
+
run_review: true
|
|
30
|
+
commands:
|
|
31
|
+
test: "uv run pytest -q"
|
|
32
|
+
lint: "uv run ruff check ."
|
|
33
|
+
lint_fix: "uv run ruff check . --fix"
|
|
34
|
+
|
|
35
|
+
# Roles are ALSO carried as personas. pi only puts skill *descriptions* in the system prompt
|
|
36
|
+
# and loads the full SKILL.md on demand — in headless `-p` runs that's not guaranteed, so the
|
|
37
|
+
# persona system_prompt (always injected into the prompt text by spec-runner) is the reliable
|
|
38
|
+
# belt-and-suspenders layer. The `.pi/skills/` skills add the reusable pi-native workflow.
|
|
39
|
+
personas:
|
|
40
|
+
implementer:
|
|
41
|
+
system_prompt: >-
|
|
42
|
+
You are the implementer. Implement the task and its tests, run the tests via bash
|
|
43
|
+
until green, then end with TASK_COMPLETE (or TASK_FAILED on the last line).
|
|
44
|
+
reviewer:
|
|
45
|
+
system_prompt: >-
|
|
46
|
+
You are a read-only reviewer. Inspect the diff, report findings, and DO NOT edit code.
|
|
47
|
+
End with REVIEW_PASSED or REVIEW_FAILED on the last line.
|
|
48
|
+
qa:
|
|
49
|
+
system_prompt: >-
|
|
50
|
+
You harden tests: add edge-case, error-path and regression tests, then run them.
|
|
51
|
+
Do not weaken production behavior to make tests pass.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Code Review (read-only gate)
|
|
2
|
+
|
|
3
|
+
Task: ${TASK_ID} — ${TASK_NAME}
|
|
4
|
+
|
|
5
|
+
Files changed:
|
|
6
|
+
${CHANGED_FILES}
|
|
7
|
+
|
|
8
|
+
Diff:
|
|
9
|
+
${GIT_DIFF}
|
|
10
|
+
|
|
11
|
+
## Instructions
|
|
12
|
+
|
|
13
|
+
You are a **read-only** reviewer. Inspect the change — do NOT edit, write, or run code.
|
|
14
|
+
Review for:
|
|
15
|
+
1. Bugs and logic errors
|
|
16
|
+
2. Security issues
|
|
17
|
+
3. Missing error handling
|
|
18
|
+
4. Test coverage (does the new behavior have tests? are edge/error paths covered?)
|
|
19
|
+
5. Task fit (are all checklist items implemented?)
|
|
20
|
+
|
|
21
|
+
Report findings concisely (file + line + what's wrong + why). If clean, say what you checked.
|
|
22
|
+
|
|
23
|
+
## Required Response Format
|
|
24
|
+
|
|
25
|
+
You MUST end your response with exactly one of these status codes on a new line:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
REVIEW_PASSED
|
|
29
|
+
```
|
|
30
|
+
Use this if the code looks good and has no blocking issues.
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
REVIEW_FAILED
|
|
34
|
+
```
|
|
35
|
+
Use this if there are issues that need attention. List them above; the implementer will fix
|
|
36
|
+
them on retry — you do not fix anything yourself.
|
|
37
|
+
|
|
38
|
+
Do not add any text after the status code.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spec-runner
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: Task automation from markdown specs via Claude CLI
|
|
5
5
|
Author: Andrei
|
|
6
6
|
License-Expression: MIT
|
|
@@ -134,7 +134,8 @@ Tasks are defined in `spec/tasks.md`:
|
|
|
134
134
|
# Execution
|
|
135
135
|
spec-runner run # Execute next ready task
|
|
136
136
|
spec-runner run --task=TASK-001 # Execute specific task
|
|
137
|
-
spec-runner run --all # Execute all ready tasks
|
|
137
|
+
spec-runner run --all # Execute all ready tasks (resets failed→pending by default)
|
|
138
|
+
spec-runner run --all --no-reset-failed # Keep failed tasks sticky (skip the default reset)
|
|
138
139
|
spec-runner run --all --hitl-review # Interactive HITL approval gate
|
|
139
140
|
spec-runner run --force # Skip lock check (stale lock)
|
|
140
141
|
spec-runner run --tui # Execute with live TUI dashboard
|
|
@@ -375,6 +376,11 @@ paths:
|
|
|
375
376
|
| llama-cli | Yes | `{cmd} -m {model} -p {prompt} --no-display-prompt` |
|
|
376
377
|
| Custom | Use template | `{cmd} --prompt {prompt}` |
|
|
377
378
|
|
|
379
|
+
> **Full pi-driven loop:** `pi` can run the entire dev → review → test cycle (with native
|
|
380
|
+
> skills, per-stage tool control and a read-only review gate) using only config and a small
|
|
381
|
+
> script — no core code. See [docs/pi-workflow.md](docs/pi-workflow.md) and the runnable
|
|
382
|
+
> [examples/pi-loop/](examples/pi-loop/).
|
|
383
|
+
|
|
378
384
|
## Project Structure
|
|
379
385
|
|
|
380
386
|
```
|
|
@@ -51,6 +51,10 @@ src/spec_runner/skills/spec-generator-skill/templates/requirements.template.md
|
|
|
51
51
|
src/spec_runner/skills/spec-generator-skill/templates/task.py
|
|
52
52
|
src/spec_runner/skills/spec-generator-skill/templates/tasks.template.md
|
|
53
53
|
src/spec_runner/skills/spec-generator-skill/templates/workflow.template.md
|
|
54
|
+
src/spec_runner/skills/spec-generator-skill/templates/pi/spec-runner.pi.config.yaml
|
|
55
|
+
src/spec_runner/skills/spec-generator-skill/templates/pi/skills/pi-implementer/SKILL.md
|
|
56
|
+
src/spec_runner/skills/spec-generator-skill/templates/pi/skills/pi-reviewer/SKILL.md
|
|
57
|
+
src/spec_runner/skills/spec-generator-skill/templates/pi/skills/pi-tester/SKILL.md
|
|
54
58
|
src/spec_runner/skills/spec-generator-skill/templates/prompts/review.claude.md
|
|
55
59
|
src/spec_runner/skills/spec-generator-skill/templates/prompts/review.codex.md
|
|
56
60
|
src/spec_runner/skills/spec-generator-skill/templates/prompts/review.llama.md
|
spec_runner-2.3.0/src/spec_runner/skills/spec-generator-skill/templates/prompts/review.pi.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Code Review
|
|
2
|
-
|
|
3
|
-
Task: ${TASK_ID} — ${TASK_NAME}
|
|
4
|
-
|
|
5
|
-
Files changed:
|
|
6
|
-
${CHANGED_FILES}
|
|
7
|
-
|
|
8
|
-
Diff:
|
|
9
|
-
${GIT_DIFF}
|
|
10
|
-
|
|
11
|
-
## Instructions
|
|
12
|
-
|
|
13
|
-
Review the code for:
|
|
14
|
-
1. Bugs and errors
|
|
15
|
-
2. Security issues
|
|
16
|
-
3. Missing error handling
|
|
17
|
-
4. Test coverage
|
|
18
|
-
|
|
19
|
-
## Required Response Format
|
|
20
|
-
|
|
21
|
-
You MUST end your response with exactly one of these status codes on a new line:
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
REVIEW_PASSED
|
|
25
|
-
```
|
|
26
|
-
Use this if the code looks good and has no issues.
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
REVIEW_FIXED
|
|
30
|
-
```
|
|
31
|
-
Use this if you found and fixed issues.
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
REVIEW_FAILED
|
|
35
|
-
```
|
|
36
|
-
Use this if there are issues that need manual attention.
|
|
37
|
-
|
|
38
|
-
Do not add any text after the status code.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|