@gonrocca/zero-pi 0.1.53 → 0.1.54

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gonrocca/zero-pi",
3
- "version": "0.1.53",
3
+ "version": "0.1.54",
4
4
  "description": "zero-pi — an installable layer for pi (pi.dev): the zero spec-driven development workflow (explore → plan → build → veredicto) with per-phase model autotune and token-efficient batched builds. Adds capability to pi without modifying pi.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -392,41 +392,45 @@ Recommended command order for an audit-ready SDD change is: `/zero-branch <slug>
392
392
  - `/zero-git-validate <slug>` checks worktree, branch, remote, `gh auth`, and verdict gating without mutating.
393
393
  - `/zero-archive <slug>` merges approved deltas into `.sdd/specs/` and moves the run to `.sdd/archive/YYYY-MM-DD-<slug>/`.
394
394
 
395
- ## Spec sync & archive
395
+ ## Spec archive
396
396
 
397
397
  The project keeps a **canonical spec store** at `.sdd/specs/requirements.md` —
398
398
  the accepted requirements of every prior run. A `/forge` run's `plan` phase
399
399
  emits a delta `spec.md` against that store; once the run reaches a `pasa`
400
- verdict the delta is folded back into the store.
400
+ verdict the delta is folded back into the store and the run is archived. One
401
+ command does both: **`/zero-archive`**. (The older `/zero-sync` still exists as a
402
+ manual fold-only command, but the pipeline drives `/zero-archive`, which already
403
+ folds the delta itself — never run both for the same run.)
401
404
 
402
405
  **After a `pasa` verdict — and only then.** Alongside the Cortex save and the
403
406
  `zero-runs.jsonl` append, invoke the **`/zero-archive <slug>`** command, passing
404
407
  the run's feature slug explicitly. `/zero-archive` is a real pi command — a
405
- deterministic, unit-tested merge, not a prompt instruction that reads
406
- `.sdd/specs/requirements.md` or per-domain `.sdd/specs/<domain>/requirements.md`
407
- and `.sdd/<slug>/spec.md` or `.sdd/<slug>/specs/<domain>/spec.md`, folds the
408
- delta into the store, writes atomically, moves the run to `.sdd/archive/`, and
409
- records `archivePath` in `links.json`. You only call it; you never edit the store yourself.
410
-
411
- **Never sync on a non-`pasa` outcome.** Do **not** invoke `/zero-sync` for a
412
- `corregir` or `replantear` verdict, or when the iteration cap was reached
413
- without a `pasa` — the store is changed by a `pasa` run only, and no archive
414
- entry is created otherwise. Likewise skip it for a **legacy resumed run** whose
415
- `.sdd/<slug>/` has no `spec.md` (the older artifact shape) that run has no
416
- delta to fold, and `/zero-sync` will report it has nothing to sync.
417
-
418
- **On a guardrail error, surface do not claim a sync.** If `/zero-sync`
408
+ deterministic, unit-tested operation, not a prompt instruction. In one step it
409
+ folds the delta into the store (`.sdd/specs/requirements.md`, or per-domain
410
+ `.sdd/specs/<domain>/requirements.md`), writes the store atomically, moves the
411
+ run to `.sdd/archive/<YYYY-MM-DD>-<slug>/`, and records `archivePath` in
412
+ `links.json`. It guards itself: it refuses to run unless the run's last verdict
413
+ is `pasa`, the worktree is clean (override with `--allow-dirty` when justified),
414
+ and the spec/tasks artifacts validate. Use `--dry-run` to preview the writes
415
+ without touching disk. You only call it; you never edit the store yourself.
416
+
417
+ **Never archive on a non-`pasa` outcome.** Do **not** invoke `/zero-archive`
418
+ for a `corregir` or `replantear` verdict, or when the iteration cap was reached
419
+ without a `pasa` the command refuses it anyway, and no store change or archive
420
+ entry is created. Likewise skip it for a **legacy resumed run** whose
421
+ `.sdd/<slug>/` has no `spec.md` (the older artifact shape): there is no delta to
422
+ fold, so the command reports nothing to archive.
423
+
424
+ **On a guardrail error, surface — do not claim success.** If `/zero-archive`
419
425
  reports a guardrail failure (a duplicate name, an ADDED collision, a MODIFIED or
420
- REMOVED of a missing block, or a malformed store/delta) it writes **nothing**.
421
- Relay the failing requirement name(s) and reason to the user and state plainly
422
- that the canonical store was **not** updated and is out of sync for a manual
423
- fix. The `pasa` verdict still stands — the build shipped; only the store fold
424
- was rejected. Never report the store as updated when `/zero-sync` did not
425
- update it.
426
-
427
- **On success, relay the report.** When `/zero-sync` succeeds it writes the new
428
- store and creates an archive entry at `.sdd/archive/<YYYY-MM-DD>-<slug>/` a
429
- copy of the run's `proposal.md` and `spec.md` plus a `sync.md` report listing
430
- every added, modified, and removed requirement. Include `/zero-sync`'s report in
431
- the run's final summary, calling out the destructive effects (replacements,
432
- deletions) explicitly.
426
+ REMOVED of a missing block, a malformed store/delta, a failed validation, or a
427
+ dirty worktree) it changes **nothing**, and on a mid-write failure it rolls the
428
+ store back. Relay the failing reason to the user and state plainly that the
429
+ canonical store was **not** updated. The `pasa` verdict still stands — the build
430
+ shipped; only the archive step was rejected. Never report the store as updated
431
+ when `/zero-archive` did not update it.
432
+
433
+ **On success, relay the report.** When `/zero-archive` succeeds it writes the
434
+ new store, moves the run to `.sdd/archive/<YYYY-MM-DD>-<slug>/`, and records the
435
+ archive path in `links.json`. Include its report in the run's final summary,
436
+ calling out the destructive effects (replacements, deletions) explicitly.