pi-aia-asf 0.14.1 → 0.15.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/CHANGELOG.md CHANGED
@@ -7,11 +7,86 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [0.14.1] - 2026-11-04
10
+ ## [0.15.0] - 2026-11-06
11
11
 
12
12
  ### Added
13
13
 
14
- - (describe changes for 0.14.1)
14
+ - **ASF is an active process for all software work.** The first source change in a
15
+ session opens a `small` run automatically. That includes edit/write tools, bash
16
+ writes into source (heredoc, `sed -i`, scripted `open(...,'w')`, redirect, `tee`,
17
+ `patch`, `cp`/`mv` into source) and hand-spawned `pi -p --no-extensions` workers
18
+ that have write tools. It works in non-git directories too. Docs, assets,
19
+ `node_modules` and loose `/tmp` scratch never activate it.
20
+ - **Completion floor.** A run that changed source cannot settle until a passing test
21
+ run that started *after the last change* is recorded. A lint or typecheck does not
22
+ count, and neither does a green run from before the edit. A spec marked met during
23
+ the run must carry `trace.outcome` + `trace.codePath`; specs met in earlier runs
24
+ are not re-checked.
25
+ - **Run card.** A compact card (≤1.5 KB, registered in the load budget) with the
26
+ phase, the open items and the single next step. It is shown when a run opens and
27
+ again at `session_start` and `session_compact`.
28
+ - **`/asf passive`** silences steering for the current run only. The next source
29
+ change re-arms ASF.
30
+ - **Refusal ladder.** The same refusal escalates: refuse → refuse with the rule
31
+ text → park for the PO. `/asf status` shows when a run is parked or passive.
32
+ - A long stretch of untested source edits gets exactly one steer naming the files.
33
+ It never blocks.
34
+ - `test/test-active-process.mjs`: an end-to-end suite that drives the real handlers,
35
+ with a negative control per guard.
36
+
37
+ ### Changed
38
+
39
+ - **No stops.** The fixed continuation cap (`MAX_CONTINUATIONS = 2`) is replaced by
40
+ de-duplication: each gap is raised once, an identical steer is never issued again,
41
+ and after `MAX_STEERS` (12) gaps are reported as unverified instead of re-asked.
42
+ The run only parks for plan approval, an irreversible step with no safe path, an
43
+ unobtainable credential, or a deliverable-shaping choice.
44
+ - `test-subset-without-impact` now steers instead of refusing (71 blocks in 18 days,
45
+ 64 of them repeats). The secret, push-without-green and destructive-git refusals
46
+ are unchanged and still apply in passive mode.
47
+ - **Run state is keyed by the git work-tree root** (absolute path outside git), not
48
+ the cwd basename. `cd` into a subdirectory no longer loses the run, and two
49
+ checkouts with the same folder name no longer share one. A run saved under the old
50
+ key is migrated once. Spec memory is still read under pi-vigilant's key.
51
+
52
+ ### Fixed
53
+
54
+ - Deleting or corrupting `state.json` no longer silently ends enforcement. The
55
+ active run is restored from memory and the deletion is recorded. `/asf abort`
56
+ remains the way to end a run.
57
+ - A malformed `agent_before_settle` event no longer requests a continuation.
58
+ - The test harness ignored a suite's `false` return value, so a suite that reported
59
+ failures still counted as passed.
60
+
61
+ ## [0.14.1] - 2026-11-04
62
+
63
+ ### Fixed
64
+
65
+ - **The completion gate's continuation now actually runs** (pi 1.5.0). pi 1.5.0 validates
66
+ boundary continuations instead of trusting them: it commits the entries an extension
67
+ returns, rebuilds the context, and only continues when `canContinue` holds. The gate
68
+ returned a bare `{ continue: true }`, which at settle time means an assistant-terminated
69
+ context with nothing queued, so pi refused it —
70
+ `agent_before_settle requested continuation without runnable model context` — the agent
71
+ was never told what was missing, and the gate's one bounded continuation logged an error
72
+ and did nothing. It now returns a `custom_message` entry (pi projects it to role `user`,
73
+ which is what makes the next provider request runnable) carrying the missing list.
74
+ - **The gate only judges ASF runs.** `currentScale()` had no "no ASF run" state, so every
75
+ session that loaded ASF was held to the delivery evidence bar. While the continuation was
76
+ inert this was invisible; once it resumed runs, a plain `pi -p` in a scratch directory
77
+ went from 3s to 181s and was told to close its missing evidence. The gate now reads the
78
+ project's ASF state and stays silent unless a run is active.
79
+
80
+ ### Changed
81
+
82
+ - The pi peers are pinned to 1.5.0, the version that actually loads the extension.
83
+ - `jiti` is declared as a devDependency; the test harness imported it without ever
84
+ declaring it, so a clean `npm install` broke the suite.
85
+ - The typecheck gate no longer reuses a cached peer at the wrong version. It printed
86
+ `host types 1.2.0` against a manifest declaring 1.5.0 and still reported OK — the failure
87
+ its own header exists to prevent.
88
+ - `scripts/verify-published.mjs` polls for the tarball instead of taking one HEAD request,
89
+ which 404s transiently while a fresh release sits in npm's staging queue.
15
90
 
16
91
  ## [0.14.0] - 2026-11-02
17
92
 
package/README.md CHANGED
@@ -19,9 +19,15 @@ It turns "let's build something" into a gated pipeline where nothing is implemen
19
19
 
20
20
  ## Activation
21
21
 
22
- The skill activates when the user's request is a **new software project, significant feature, major bugfix, or architectural refactor**. It does **not** activate for Q&A, one-liners, casual conversation, or non-software tasks. When in doubt, it asks.
22
+ **ASF is always on when software is being changed.** The extension watches tool calls: the first change to a source file (an edit/write, a bash heredoc / `sed -i` / scripted write into source, or a `pi -p --no-extensions` worker with write tools) opens a `small` run automatically. Docs, assets and loose `/tmp` scratch never activate it, and nothing activates for Q&A or research.
23
23
 
24
- You can also force/start a session explicitly:
24
+ An automatic run is held to a **floor**, not a ceremony: it cannot settle until a passing test run that started after the last source change is recorded (a lint or typecheck does not count), and any spec marked met during the run must carry `trace.outcome` + `trace.codePath`. Missing evidence is **steered**, never stopped: each gap is raised once, an identical steer never repeats, and an unclosable gap is reported as unverified. The run only parks for input ASF cannot obtain itself (plan approval, an irreversible step with no safe path, a credential, a deliverable-shaping choice).
25
+
26
+ Three refusals always hold, including in passive mode: a secret written into a tracked file, a push/publish without a recorded full-suite green, and a destructive git command on a dirty tree. A repeated identical refusal escalates from refuse, to refuse with the rule text, to parking for the PO.
27
+
28
+ Run state is stored per git work-tree root (or absolute path outside git), so `cd` into a subdirectory keeps the run. Deleting the state file does not end a run — it is restored and the deletion is recorded.
29
+
30
+ Large work (new project, significant feature, major bugfix, architectural refactor) runs the full gated flow above. You can also start a session explicitly:
25
31
 
26
32
  ```
27
33
  /asf new — start a new software project
@@ -31,7 +37,8 @@ You can also force/start a session explicitly:
31
37
  /asf status — show current phase + state
32
38
  /asf health — run the code health gate (function/module/architecture)
33
39
  /asf approve — mark PLAN.md as approved (Gate 5)
34
- /asf abort — end the session
40
+ /asf abort — end the session (the legitimate way to end a run)
41
+ /asf passive — silence steering for THIS run only (the three refusals stay)
35
42
  ```
36
43
 
37
44
  ## Dependencies (required)