@gonrocca/zero-pi 0.1.1 → 0.1.2

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/README.md CHANGED
@@ -33,13 +33,24 @@ A spec-driven development pipeline driven through four phases, in order:
33
33
  4. **veredicto** — review the build adversarially and record a verdict
34
34
  (`pasa`, `corregir`, or `replantear`).
35
35
 
36
- Run it with the `/forge` prompt. The orchestrator drives phase order and
37
- enforces a hard build/veredicto iteration cap. Each phase has its own prompt
36
+ Run it with the `/forge <feature>` prompt. The orchestrator drives phase order
37
+ and enforces a hard build/veredicto iteration cap. Each phase has its own prompt
38
38
  under `prompts/phases/` so it can be delegated to a dedicated sub-agent.
39
39
 
40
+ `/forge models` (no feature request) opens an in-session editor for the
41
+ per-phase models — it reads `~/.pi/zero.json`, lets you reassign any phase, and
42
+ writes the choice back.
43
+
40
44
  Per-phase model assignments are read from `~/.pi/zero.json`, which the `zero`
41
45
  CLI writes when it installs this layer.
42
46
 
47
+ **Run memory** — every SDD run reads from and writes to Cortex (the memory MCP
48
+ server). Before exploring, the orchestrator recalls prior `zero-run/*` traces
49
+ for the feature; when the run ends it saves a run-trace — the final verdict, the
50
+ correction rounds, and the gotchas — under `topic_key: zero-run/<slug>`. The
51
+ next run on related work starts from what the last one learned. With `--no-mcp`
52
+ the loop degrades silently.
53
+
43
54
  ### Skill auto-learning (`skills/`)
44
55
 
45
56
  `skill-loop.md` gives the agent a closed learning loop so solutions are reused
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gonrocca/zero-pi",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "zero-pi — an installable layer for pi (pi.dev): the zero spec-driven development workflow, skill auto-learning, and an animated ZERO startup banner. Adds capability to pi without modifying pi.",
5
5
  "type": "module",
6
6
  "keywords": [
package/prompts/forge.md CHANGED
@@ -1,8 +1,31 @@
1
1
  ---
2
- description: Run an automatic spec-driven development pipeline for a feature request
2
+ description: Run the SDD pipeline for a feature — or `/forge models` to set the per-phase models
3
3
  ---
4
4
 
5
- Run the zero SDD pipeline for the feature request in the arguments.
5
+ The argument decides the mode.
6
+
7
+ ## `/forge models` — configure the SDD models
8
+
9
+ When the argument is exactly `models`, do **not** run the pipeline. Configure
10
+ the per-phase models instead:
11
+
12
+ 1. Read `~/.pi/zero.json`. Show the user the current `models` mapping — the
13
+ model assigned to each phase: `explore`, `plan`, `build`, `veredicto`.
14
+ 2. Ask which phases they want to change and to what. Offer the models the
15
+ active provider exposes — run `pi --list-models` if you need the list.
16
+ Guidance: a cheap, fast model suits `explore`; a strong model suits `plan`
17
+ and the adversarial `veredicto`; `build` sits in between.
18
+ 3. Write the chosen models back into `~/.pi/zero.json`, replacing only the
19
+ `models` block and preserving every other key (`version`, `installedAt`).
20
+ Validate each model name against `pi --list-models` before writing.
21
+ 4. Confirm the new mapping back to the user.
22
+
23
+ This changes the models for every later `/forge` run — the orchestrator reads
24
+ `~/.pi/zero.json` at the start of each run.
25
+
26
+ ## `/forge <feature request>` — run the SDD pipeline
27
+
28
+ For any other argument, run the zero SDD pipeline for that feature request.
6
29
 
7
30
  Follow the zero SDD orchestrator instructions: drive the run through the
8
31
  explore → plan → build → veredicto phases, honour the build/veredicto iteration
@@ -17,4 +40,4 @@ In interactive mode, pause after each phase with a summary and ask before
17
40
  continuing. Never report success unless the veredicto phase returned a `pasa`
18
41
  verdict; if the cap is reached first, report that the result is not verified.
19
42
 
20
- Feature request: $ARGUMENTS
43
+ Argument: $ARGUMENTS
@@ -60,3 +60,32 @@ Cache the mode for the run.
60
60
  While a phase runs, keep the user informed of progress — never run silently for
61
61
  a long stretch. The user must always be able to tell which phase and round the
62
62
  run is in.
63
+
64
+ ## Run memory
65
+
66
+ zero runs improve each other. The pipeline reads from and writes to Cortex —
67
+ the persistent memory MCP server zero installs — so every run learns from the
68
+ runs before it. You, the orchestrator, own both ends of the loop.
69
+
70
+ **Recall — before the explore phase.** Search Cortex for the feature: prior
71
+ `zero-run/*` traces and related discoveries, bug fixes, and patterns. Pass what
72
+ you find into the explore sub-agent's brief — past runs flag what already broke
73
+ in this code and which plans were sent back.
74
+
75
+ **Persist — after the final verdict.** When the run ends — a `pasa` verdict, or
76
+ the iteration cap reached — save one run-trace memory with `memoria_save`:
77
+
78
+ - `type`: `session_summary`
79
+ - `topic_key`: `zero-run/<feature-slug>` — stable, so re-running a feature
80
+ updates its trace rather than duplicating it
81
+ - `title`: `zero run — <feature>`
82
+ - `what`: what was built, the final verdict, and the build/veredicto round count
83
+ - `why`: the feature request
84
+ - `where_at`: the files the run touched
85
+ - `learned`: the gotchas — what each `corregir` round fixed and, on any
86
+ `replantear`, why the plan was wrong. Future runs read this first.
87
+
88
+ Use the project name Cortex derives from the working directory.
89
+
90
+ If Cortex is unavailable — installed with `--no-mcp`, or the server is down —
91
+ skip recall and persist silently. The memory loop must never block a run.
@@ -10,3 +10,7 @@ integration points, and the constraints. Identify the risks and the unknowns.
10
10
 
11
11
  Produce a concise findings report the **plan** phase can build on: what exists,
12
12
  what is relevant to the request, and what to watch out for.
13
+
14
+ If the orchestrator includes prior-run memory in your brief, use it: past runs
15
+ record what already broke in this code and which plans were sent back. Fold the
16
+ relevant points into the findings under a "Prior runs" heading.
@@ -11,3 +11,6 @@ independently verifiable tasks.
11
11
  Do not write implementation code in this phase — only the plan. Keep each task
12
12
  scoped tightly enough that the build phase can implement and check it on its
13
13
  own.
14
+
15
+ Honour the prior-run lessons carried in the explore findings: when a past run
16
+ was sent back with `replantear`, do not repeat the plan mistake it recorded.
@@ -15,3 +15,7 @@ Record exactly one verdict:
15
15
  - `replantear` — the plan itself is wrong; the plan phase must re-run.
16
16
 
17
17
  Never return `pasa` unless the evidence supports it.
18
+
19
+ State the verdict's reasoning concretely — the specific defects for `corregir`,
20
+ the specific plan flaw for `replantear`. The orchestrator persists that
21
+ reasoning to the run's memory trace, so future runs depend on it being precise.