ultimate-pi 0.6.0 → 0.7.0
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.
- package/.agents/skills/harness-plan/SKILL.md +9 -5
- package/.agents/skills/harness-sentrux-setup/SKILL.md +3 -4
- package/.pi/extensions/00-ultimate-pi-system-prompt.ts +194 -0
- package/.pi/extensions/budget-guard.ts +10 -2
- package/.pi/extensions/debate-orchestrator.ts +10 -2
- package/.pi/extensions/harness-live-widget.ts +10 -3
- package/.pi/extensions/harness-run-context.ts +703 -0
- package/.pi/extensions/observation-bus.ts +7 -9
- package/.pi/extensions/policy-gate.ts +50 -68
- package/.pi/extensions/trace-recorder.ts +80 -20
- package/.pi/harness/README.md +2 -0
- package/.pi/harness/agents.manifest.json +3 -3
- package/.pi/harness/docs/adrs/0009-sentrux-rules-lifecycle.md +1 -1
- package/.pi/harness/docs/adrs/0031-harness-run-context.md +38 -0
- package/.pi/harness/docs/adrs/README.md +1 -0
- package/.pi/harness/env.harness.template +24 -10
- package/.pi/harness/evals/smoke/run-context.fixture.json +17 -0
- package/.pi/harness/specs/harness-run-context.schema.json +80 -0
- package/.pi/lib/harness-run-context.ts +794 -0
- package/.pi/lib/harness-ui-state.ts +11 -0
- package/.pi/prompts/harness-abort.md +9 -6
- package/.pi/prompts/harness-auto.md +3 -3
- package/.pi/prompts/harness-critic.md +3 -5
- package/.pi/prompts/harness-eval.md +16 -16
- package/.pi/prompts/harness-incident.md +7 -5
- package/.pi/prompts/harness-plan.md +18 -3
- package/.pi/prompts/harness-review.md +4 -5
- package/.pi/prompts/harness-router-tune.md +1 -1
- package/.pi/prompts/harness-run.md +11 -11
- package/.pi/prompts/harness-setup.md +5 -27
- package/.pi/prompts/harness-trace.md +3 -5
- package/.pi/scripts/harness-searxng-bootstrap.mjs +92 -7
- package/.pi/scripts/harness-verify.mjs +18 -0
- package/CHANGELOG.md +22 -0
- package/README.md +31 -14
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -29,11 +29,12 @@ pi install npm:ultimate-pi
|
|
|
29
29
|
|
|
30
30
|
That runs: plan → execute → evaluate → adversary → policy decision. It does **not** auto-merge.
|
|
31
31
|
|
|
32
|
-
If something blocks, inspect
|
|
32
|
+
If something blocks, inspect status (no run id needed):
|
|
33
33
|
|
|
34
34
|
```text
|
|
35
|
-
/harness-
|
|
35
|
+
/harness-run-status
|
|
36
36
|
/harness-policy-status
|
|
37
|
+
/harness-trace-last
|
|
37
38
|
```
|
|
38
39
|
|
|
39
40
|
## Commands
|
|
@@ -42,15 +43,18 @@ If something blocks, inspect the last run:
|
|
|
42
43
|
|---------|----------------|
|
|
43
44
|
| `/harness-setup` | One-time project bootstrap (tools, harness dirs, extensions) |
|
|
44
45
|
| `/harness-auto "<task>"` | End-to-end pipeline (recommended) |
|
|
45
|
-
| `/harness-plan "<task>"` |
|
|
46
|
-
| `/harness-run
|
|
47
|
-
| `/harness-eval
|
|
48
|
-
| `/harness-review
|
|
49
|
-
| `/harness-critic
|
|
50
|
-
| `/harness-trace
|
|
51
|
-
| `/harness-
|
|
46
|
+
| `/harness-plan "<task>"` | Create or **revise** the active plan in context (no plan path to copy) |
|
|
47
|
+
| `/harness-run` | Execute the active plan from context (**no `--plan`** on happy path) |
|
|
48
|
+
| `/harness-eval` | Eval for active run (optional `--run`; **new session** after execute) |
|
|
49
|
+
| `/harness-review` | Independent review (optional `--run`) |
|
|
50
|
+
| `/harness-critic` | Adversarial review (optional `--run`) |
|
|
51
|
+
| `/harness-trace` | Trace summary (optional `--run`) |
|
|
52
|
+
| `/harness-run-status` | Where you are + what to run next (no run id shown) |
|
|
53
|
+
| `/harness-new-run` | Abandon current run and start fresh |
|
|
54
|
+
| `/harness-use-run <id>` | Advanced recovery only |
|
|
55
|
+
| `/harness-trace-last` | Last phase / handoff (no run id) |
|
|
52
56
|
| `/harness-policy-status` | Current policy / block reasons |
|
|
53
|
-
| `/harness-abort [reason]` | Stop and
|
|
57
|
+
| `/harness-abort [reason]` | Stop and replan path |
|
|
54
58
|
|
|
55
59
|
## Manual workflow
|
|
56
60
|
|
|
@@ -58,15 +62,24 @@ Use this when you want each step separate:
|
|
|
58
62
|
|
|
59
63
|
```text
|
|
60
64
|
/harness-plan "your task"
|
|
61
|
-
/harness-run
|
|
62
|
-
|
|
63
|
-
/harness-
|
|
64
|
-
/harness-
|
|
65
|
+
/harness-run
|
|
66
|
+
# New Pi session (review isolation):
|
|
67
|
+
/harness-eval
|
|
68
|
+
/harness-review
|
|
69
|
+
/harness-critic
|
|
65
70
|
```
|
|
66
71
|
|
|
72
|
+
The harness **remembers the active run and plan** per project — you do not pass `plan-packet.json` paths or run ids between steps. The live widget shows phase/policy; after each step the agent (and UI notify) suggests the next command.
|
|
73
|
+
|
|
74
|
+
Recovery: `--run` and `--plan` remain for scripts; `/harness-use-run` and `/harness-run-status` for operators.
|
|
75
|
+
|
|
67
76
|
## Defaults you should know
|
|
68
77
|
|
|
78
|
+
- **System prompt** — [`.pi/extensions/00-ultimate-pi-system-prompt.ts`](.pi/extensions/00-ultimate-pi-system-prompt.ts) sets the base prompt from packaged [`.pi/SYSTEM.md`](.pi/SYSTEM.md), or from your workspace override **`.pi/system.md`** (lowercase) if you create one. Nothing is copied into your project by default. After upgrading the package or editing either file, run **`/reload`**.
|
|
69
79
|
- **Model routing (vendored + gated)** — [`pi-model-router`](https://github.com/yeliu84/pi-model-router) ships inside this package (`vendor/pi-model-router/`). [`.pi/extensions/pi-model-router-harness.ts`](.pi/extensions/pi-model-router-harness.ts) activates it **only after** `.pi/model-router.json` exists (generation: `/harness-setup` Step 3.5), so **`router/auto` does not appear** beforehand. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). [`.pi/scripts/harness-sync-model-router.mjs`](.pi/scripts/harness-sync-model-router.mjs) may set **`defaultProvider`/`defaultModel`** to **`router`/`auto`** when the project sets no default — run **`/reload`** afterward. Do **not** add `npm:@yeliu84/pi-model-router` to `.pi/settings.json`; it duplicates the fork. Maintainer refresh: **`npm run vendor:sync-router`**.
|
|
80
|
+
- **Active run + plan context** — PlanPacket lives at a fixed path per run; the extension injects it for `/harness-plan` (revise) and `/harness-run` (execute). Session state plus `.pi/harness/active-run.json`; no run ids or plan paths to copy.
|
|
81
|
+
- **Review isolation** — run evaluate/review/critic in a **new session** after execute (see troubleshooting).
|
|
82
|
+
- **Concurrent plans** — a second `/harness-plan` while a run is active is blocked until `/harness-abort` or `/harness-new-run` (except drift replan / amend after `needs_clarification`).
|
|
70
83
|
- **Plan before mutate** — write/edit/shell that changes the repo is blocked until execute phase.
|
|
71
84
|
- **No auto-merge** — you decide when to open or merge a PR.
|
|
72
85
|
- **Structured runs** — each run writes artifacts under `.pi/harness/runs/` for replay and audit.
|
|
@@ -78,7 +91,11 @@ Optional: copy [`.env.example`](.env.example) to `.env` if you use PostHog or ot
|
|
|
78
91
|
| Problem | Try |
|
|
79
92
|
|---------|-----|
|
|
80
93
|
| Setup fails | `node --version` (need 18+), rerun `/harness-setup` |
|
|
94
|
+
| "No active run" on eval | Finish plan+run first, or `/harness-run-status`; open a new session for eval |
|
|
95
|
+
| Forgot where you left off | `/harness-run-status` |
|
|
96
|
+
| Second plan rejected | `/harness-abort` or `/harness-new-run` |
|
|
81
97
|
| Blocked in evaluate/review | Run review in a fresh session (isolation from execute) |
|
|
98
|
+
| High plan drift | `harness-drift-replan` or abort then replan (ADR 0007) |
|
|
82
99
|
| Budget / scope stop | `/harness-budget-status`, narrow the task or split the plan |
|
|
83
100
|
| Test integrity warning | `/harness-test-integrity-last`, fix or justify test changes |
|
|
84
101
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultimate-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Ultimate AI coding harness for pi.dev — extensible skills, Obsidian wiki knowledge layer, compressed context, deterministic output",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@mariozechner/pi-coding-agent": "*"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
|
76
|
-
"check:ts": "tsc --noEmit --target ES2023 --lib ES2023 --moduleResolution nodenext --module nodenext --skipLibCheck .pi/extensions/lib/harness-vcc-settings.ts .pi/extensions/dotenv-loader.ts .pi/extensions/lib/posthog-node.d.ts .pi/extensions/lib/harness-posthog.ts .pi/extensions/lib/harness-paths.ts .pi/extensions/pi-model-router-harness.ts .pi/extensions/provider-payload-sanitize.ts .pi/extensions/harness-telemetry.ts .pi/extensions/harness-ask-user.ts .pi/extensions/lib/ask-user/schema.ts .pi/extensions/lib/ask-user/types.ts .pi/extensions/lib/ask-user/validate.ts .pi/extensions/lib/ask-user/dialog.ts .pi/extensions/lib/ask-user/fallback.ts .pi/extensions/lib/ask-user/render.ts .pi/extensions/trace-recorder.ts .pi/extensions/observation-bus.ts .pi/extensions/drift-monitor.ts .pi/extensions/sentrux-rules-sync.ts .pi/extensions/custom-header.ts .pi/extensions/lib/harness-subagents/agent-loader.ts .pi/extensions/lib/harness-subagents/agent-parser.ts .pi/extensions/lib/harness-subagents/agent-manifest.ts .pi/extensions/lib/harness-subagents/blackboard.ts .pi/extensions/lib/harness-subagents/blackboard-tool.ts .pi/extensions/lib/harness-subagents/spawn-policy.ts .pi/extensions/lib/harness-subagents/types-blackboard.ts .pi/extensions/harness-web-tools.ts .pi/extensions/harness-web-guard.ts .pi/extensions/lib/harness-web/run-cli.ts",
|
|
76
|
+
"check:ts": "tsc --noEmit --target ES2023 --lib ES2023 --moduleResolution nodenext --module nodenext --skipLibCheck .pi/extensions/00-ultimate-pi-system-prompt.ts .pi/lib/harness-run-context.ts .pi/lib/harness-ui-state.ts .pi/extensions/harness-run-context.ts .pi/extensions/lib/harness-vcc-settings.ts .pi/extensions/dotenv-loader.ts .pi/extensions/lib/posthog-node.d.ts .pi/extensions/lib/harness-posthog.ts .pi/extensions/lib/harness-paths.ts .pi/extensions/pi-model-router-harness.ts .pi/extensions/provider-payload-sanitize.ts .pi/extensions/harness-telemetry.ts .pi/extensions/harness-ask-user.ts .pi/extensions/lib/ask-user/schema.ts .pi/extensions/lib/ask-user/types.ts .pi/extensions/lib/ask-user/validate.ts .pi/extensions/lib/ask-user/dialog.ts .pi/extensions/lib/ask-user/fallback.ts .pi/extensions/lib/ask-user/render.ts .pi/extensions/trace-recorder.ts .pi/extensions/observation-bus.ts .pi/extensions/drift-monitor.ts .pi/extensions/policy-gate.ts .pi/extensions/budget-guard.ts .pi/extensions/debate-orchestrator.ts .pi/extensions/harness-live-widget.ts .pi/extensions/sentrux-rules-sync.ts .pi/extensions/custom-header.ts .pi/extensions/lib/harness-subagents/agent-loader.ts .pi/extensions/lib/harness-subagents/agent-parser.ts .pi/extensions/lib/harness-subagents/agent-manifest.ts .pi/extensions/lib/harness-subagents/blackboard.ts .pi/extensions/lib/harness-subagents/blackboard-tool.ts .pi/extensions/lib/harness-subagents/spawn-policy.ts .pi/extensions/lib/harness-subagents/types-blackboard.ts .pi/extensions/harness-web-tools.ts .pi/extensions/harness-web-guard.ts .pi/extensions/lib/harness-web/run-cli.ts",
|
|
77
77
|
"vendor:sync-router": "bash .pi/scripts/vendor-sync-pi-model-router.sh",
|
|
78
78
|
"vendor:sync-vcc": "bash .pi/scripts/vendor-sync-pi-vcc.sh",
|
|
79
79
|
"release": "bash .pi/scripts/release.sh",
|