pi-aia-asf 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/CHANGELOG.md CHANGED
@@ -7,6 +7,59 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.7.0] - 2026-09-11
11
+
12
+ ### Added
13
+
14
+ - **Absolute wait ceiling — 30 minutes (06b Rule 15)** — no single wait may
15
+ exceed 30 min (1800s). Addresses the reported failure where tool calls waited
16
+ forever for the system to react and the whole process kept hanging,
17
+ especially during testing. The ceiling is a **backstop, never a substitute**
18
+ for a real per-call bound: a 30s suite still gets ~120s, and a lone 1800s
19
+ bound is treated as not having bounded anything. Hitting the ceiling means
20
+ kill the wait and diagnose the blocking cause — it is a bug signal, not
21
+ patience.
22
+ - **Explicit per-run waiver** — the ceiling can be disabled, but only
23
+ deliberately and only for a **single run**: stated before running, with the
24
+ reason and a finite larger bound. A waiver does not persist, does not carry
25
+ over, and resets immediately afterwards. Blanket/standing waivers are
26
+ disallowed; repeated need for waivers is a setup defect to report (Rule 11).
27
+ - **"Every waiting call carries its own explicit timeout"** — makes the rule
28
+ cover *every* tool call or command that waits on the system, not just the
29
+ obviously slow ones, with testing called out as the highest-risk area
30
+ (harnesses, servers, daemons, browsers hanging on ports, locks and prompts).
31
+ Bounds are sized from the stated expected duration with headroom.
32
+ - New Definition-of-Done item for the ceiling; ceiling applies at **both
33
+ scales** (small work is not exempt).
34
+ - **Durable test suite in `test/`** — the ASF suites were previously only in
35
+ `/tmp` and would have been lost. `npm test` now runs 67 checks (timeouts,
36
+ ceiling, delegation, docs-rule) against the real shipped skill text;
37
+ `test/setup.sh` prepares the jiti harness against the installed pi.
38
+
39
+ ### Verification
40
+
41
+ - 67/67 checks pass (`npm test`): 13 timeouts, 17 ceiling, 19 delegation,
42
+ 18 docs-rule.
43
+ - The 17 new ceiling checks were confirmed to **fail 11/17 on the pre-change
44
+ text** before implementation, proving they assert real content.
45
+ - SKILL.md YAML frontmatter re-verified as parsing (pi silently skips skills
46
+ with malformed frontmatter).
47
+
48
+
49
+ ## [0.6.1] - 2026-08-28
50
+
51
+ ### Removed
52
+
53
+ - **pi-intercom is no longer a dependency** (reversal of the 0.4.0 addition,
54
+ per user decision): removed from `dependencies` in package.json and from the
55
+ runtime dependency check — `/asf` summary is back to the four required
56
+ packages (pi-vigilant, pi-smart-web-search, pi-smart-fetch, pi-aia-browser).
57
+ ASF works fully without it; intercom is documented as an **optional** tool
58
+ (`pi install npm:pi-intercom`) in the README, 06d-delegation.md, and the
59
+ SKILL.md delegation note. Rationale: a hard dependency broke the workspace
60
+ installer's `--skip=pi-intercom` semantics (npm pulled it back in via
61
+ pi-aia-asf), and delegation is a nice-to-have, not a requirement.
62
+
10
63
  ## [0.6.0] - 2026-08-28
11
64
 
12
65
  ### Added
package/README.md CHANGED
@@ -41,9 +41,8 @@ You can also force/start a session explicitly:
41
41
  | **pi-smart-web-search** | `web_search` | `pi install npm:pi-smart-web-search` |
42
42
  | **pi-smart-fetch** | `web_fetch`, `batch_web_fetch` | `pi install npm:pi-smart-fetch` |
43
43
  | **pi-aia-browser** | `browser_init`, `browser_navigate`, … (Playwright + Chromium, auto-installed) | `pi install npm:pi-aia-browser` |
44
- | **pi-intercom** | `intercom` — message other live pi sessions directly (delegation, cross-session verification) | `pi install npm:pi-intercom` |
45
44
 
46
- `pi-intercom` is also declared in `dependencies` in `package.json`, so `npm install` of this package pulls it in. It is intentionally **not bundled** into the tarball: bundling it would conflict with a top-level `pi install npm:pi-intercom` (tool name collision), so the tool must be installed at top level to register.
45
+ **Optional:** `pi-intercom` (`intercom` — message other live pi sessions directly) is **not** a dependency; ASF works without it. Install it only if you want delegation between sessions: `pi install npm:pi-intercom`.
47
46
 
48
47
  The extension warns at startup (and on `/asf` with no args) when any dependency is missing.
49
48
 
package/index.ts CHANGED
@@ -215,12 +215,6 @@ function checkDependencies(): DependencyCheck[] {
215
215
  existsSync(join(gitDir, "github.com", "brunoj", "pi-aia-browser")),
216
216
  hint: "pi install npm:pi-aia-browser (installs Playwright + Chromium)",
217
217
  },
218
- {
219
- name: "pi-intercom (intercom: message other pi sessions)",
220
- package: "pi-intercom",
221
- present: existsSync(join(npmDir, "pi-intercom")),
222
- hint: "pi install npm:pi-intercom",
223
- },
224
218
  ];
225
219
 
226
220
  return checks;
@@ -230,7 +224,7 @@ function dependencySummary(): string {
230
224
  const checks = checkDependencies();
231
225
  const missing = checks.filter((c) => !c.present);
232
226
  if (missing.length === 0) {
233
- return "All ASF dependencies present: pi-vigilant, pi-smart-web-search, pi-smart-fetch, pi-aia-browser, pi-intercom ✓";
227
+ return "All ASF dependencies present: pi-vigilant, pi-smart-web-search, pi-smart-fetch, pi-aia-browser ✓";
234
228
  }
235
229
  return (
236
230
  "⚠️ ASF dependencies missing — install before starting a project:\n" +
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-aia-asf",
3
- "version": "0.6.0",
4
- "description": "Ai Applied Agentic Software Factory — codifies the full software development flow: intake, research, spec capture, adversarial analysis, planning with approval gates, test-first implementation, and release. Requires pi-vigilant, pi-smart-web-search, pi-smart-fetch, pi-aia-browser, and pi-intercom.",
3
+ "version": "0.7.0",
4
+ "description": "Ai Applied Agentic Software Factory — codifies the full software development flow: intake, research, spec capture, adversarial analysis, planning with approval gates, test-first implementation, and release. Requires pi-vigilant, pi-smart-web-search, pi-smart-fetch, and pi-aia-browser.",
5
5
  "keywords": [
6
6
  "pi-package",
7
7
  "software-factory",
@@ -31,7 +31,7 @@
31
31
  "clean": "echo 'nothing to clean'",
32
32
  "build": "echo 'nothing to build — pi loads .ts via jiti at runtime'",
33
33
  "check": "tsc --noEmit --target ES2022 --module NodeNext --moduleResolution NodeNext --skipLibCheck --allowImportingTsExtensions --noCheck index.ts",
34
- "test": "echo 'see https://github.com/brunoj/pi-aia-asf for test suites'",
34
+ "test": "./test/run-all.sh",
35
35
  "release": "./scripts/release.sh"
36
36
  },
37
37
  "pi": {
@@ -48,9 +48,6 @@
48
48
  "@earendil-works/pi-coding-agent": "*",
49
49
  "typebox": "*"
50
50
  },
51
- "dependencies": {
52
- "pi-intercom": "^0.10.1"
53
- },
54
51
  "peerDependenciesMeta": {
55
52
  "@earendil-works/pi-ai": {
56
53
  "optional": false
@@ -187,7 +187,8 @@ Keep the plan **implementation-ready**: any competent engineer (or agent) can ex
187
187
 
188
188
  > **Read `references/06d-delegation.md` before delegating.** Work may be delegated two ways:
189
189
  > **intercom** (message another live pi session that owns relevant context — always `list`
190
- > first, say what you want back, and treat their findings as evidence, not proof), and
190
+ > first, say what you want back, and treat their findings as evidence, not proof; **optional** —
191
+ > only when the user has installed `pi-intercom`, ASF works without it), and
191
192
  > **subagents** (spawn an isolated `pi -p` process when the OUTCOME matters more than the
192
193
  > trace — scoped codebase research, independent parallel fixes, fresh-perspective review).
193
194
  > Two verified hard limits: **never run parallel subagents against the same file** — tested,
@@ -203,7 +204,7 @@ Execute the task list milestone by milestone. Discipline rules:
203
204
  3. **No scope creep**: if something new is discovered that changes specs, capture it, ask the user, and update the plan before implementing.
204
205
  4. **Descriptive commits**: `git commit -m "type: specific description of what and why"` (e.g. `fix: verify specs before rotation`). No vague messages, no placeholders.
205
206
  5. **Browser testing — MANDATORY for any web interface**: if the deliverable has a UI/website/web app, test it through `pi-aia-browser` (`browser_init`, `browser_navigate`, `browser_click`, `browser_type`, `browser_screenshot`, `browser_dom`, …) to replicate the user's real experience — not just curl/API checks. Verify: loads, key user journeys, responsive behavior, console errors. **Silent async paths included**: ingest through the real flow and wait for the enrichment to land (06b Rule 9).
206
- 6. **Bounded waits — ALWAYS (06b Rule 15)**: before any long-running command (package install, platform/test-harness startup, browser/daemon launch, full suite), **state the expected duration explicitly** and wrap it in a **hard timeout** (`timeout N …` or the tool's `timeout` parameter) — never run unbounded. If it exceeds the bound: kill it, diagnose what it is blocking on, fix the root cause. If the bound proves too short, raise it deliberately with a reason — never silently extend, never remove the bound. A 50,000-second hang is a failure to investigate, not patience.
207
+ 6. **Bounded waits — ALWAYS (06b Rule 15)**: **every** tool call or command that waits on the system gets an explicit, reasonable **hard timeout** (`timeout N …` or the tool's `timeout` parameter) — never run unbounded. State the expected duration first and size the bound to it with headroom (a 30s suite gets ~120s, not 3000s). This matters most **during testing**, where harnesses, servers, daemons and browsers hang on ports, locks and prompts. **Absolute ceiling: no single wait may exceed 30 min (1800s).** The ceiling is a backstop, never a substitute for the real per-call bound. When it is hit: kill the wait and diagnose what it is blocking on — that is a bug signal, not patience. The ceiling may be **waived only for a single run**, stated explicitly beforehand with a reason and a finite larger bound; the waiver **does not persist** and resets immediately after that run. A 50,000-second hang is a failure to investigate.
207
208
  7. **Let pi-vigilant do its job**: it will auto-continue after premature stops and verify specs at settle. When it asks for `update_spec_status` with evidence, do it.
208
209
  8. **CHANGELOG discipline**: every user-visible change gets a CHANGELOG entry describing exactly what changed (no placeholder text).
209
210
  9. **Challenge approved designs (M4)**: if a spec's literal reading creates product tension (e.g. feedback clusters under "Plan" when "Plan = plans"), stop and resolve it with the user before implementing — never implement blindly and call it delivered.
@@ -147,6 +147,7 @@ never arrives, the wiring is dead — that is a failed test.
147
147
  - [ ] **E2E behavioral test: every feature spec has a test through the real entry point asserting the operator-facing outcome**
148
148
  - [ ] Unverifiable specs → `partial` + asked the user (never self-certified)
149
149
  - [ ] **Every long-running command ran under an explicit timeout with a stated expected duration (no unbounded waits)**
150
+ - [ ] **No wait exceeded the 30 min (1800s) absolute ceiling — or it was explicitly waived for that single run, with a reason and a finite bound**
150
151
 
151
152
  ## Rule 11 — Report honestly
152
153
 
@@ -216,3 +217,54 @@ done — the wiring may be dead.
216
217
  - **A hang that outlives its expected duration is a failure to investigate,**
217
218
  not a wait to endure. If you cannot verify something within a bounded time,
218
219
  say so explicitly (Rule 11) instead of waiting indefinitely.
220
+
221
+ ### Every waiting call carries its own explicit timeout
222
+
223
+ This applies to **every tool call or command that waits on the system** — not
224
+ just the obviously slow ones. Testing is where this bites hardest: a test
225
+ harness, dev server, daemon, browser launch, or watcher can block forever on a
226
+ port, a lock, a prompt, or a process that never exits.
227
+
228
+ - Shell: `timeout <seconds> <command>` — always.
229
+ - Tool calls: pass the tool's explicit `timeout` parameter — always.
230
+ - Pick the bound from the **stated expected duration**, with headroom. A test
231
+ suite you expect to take 30s gets ~120s, not 3000s.
232
+ - "I'll just run it and see" is the failure mode this rule exists to prevent.
233
+
234
+ ### The absolute ceiling — 30 minutes, no exceptions unless explicitly waived
235
+
236
+ > **Real failure (user report):** tool calls waited forever for the system to
237
+ > react and the whole process kept hanging — especially during testing.
238
+
239
+ **No single wait may exceed 30 minutes (1800s).** This is a hard ceiling, not a
240
+ default and not a target:
241
+
242
+ - **It is a backstop, not a substitute for a per-call bound.** The ceiling never
243
+ replaces the real timeout: a 30s suite still gets a ~120s bound. If your only
244
+ bound is 1800s, you have not bounded anything — you have deferred the hang.
245
+ - **Never exceed it.** If a command genuinely needs longer, that is a signal to
246
+ restructure it (run it in the background and poll with bounded checks, split
247
+ it into stages, or reduce the work) — not to raise the number.
248
+ - **When the ceiling is hit, kill the wait and diagnose.** Hitting 30 minutes is
249
+ a bug signal and a failure to investigate: find what it is blocking on
250
+ (network, lock, hung process, missing dependency, waiting on stdin) and fix
251
+ the root cause. Never re-run the same unbounded wait hoping for a different
252
+ result.
253
+
254
+ **Explicit per-run waiver.** The ceiling can be disabled, but only deliberately
255
+ and only for a **single run**:
256
+
257
+ - The agent must **state it explicitly before running** — what is being run, why
258
+ it legitimately needs more than 30 minutes, and the new bound. For example:
259
+ *"Waiving the 30-min ceiling for this one run: full integration suite against
260
+ a cold container build, expected ~45 min, bound 3600s."*
261
+ - A waiver covers **that one run only**. It **does not persist**, does not carry
262
+ over to the next command, and **resets immediately afterwards** — the next
263
+ wait is bounded by 30 minutes again.
264
+ - A waiver still requires a **finite bound**. Waiving the ceiling means choosing
265
+ a larger explicit number, never running unbounded.
266
+ - Blanket or standing waivers are not allowed. If waivers are needed repeatedly,
267
+ that is a defect in the setup — report it (Rule 11) instead of normalizing it.
268
+
269
+ **Applies at both scales.** Small work is not exempt: a hang wastes the same
270
+ time regardless of how the task was classified.
@@ -14,6 +14,12 @@ ASF work does not have to happen in one session, in one context window, or one t
14
14
 
15
15
  ## Part 1 — Intercom: passing messages to other sessions
16
16
 
17
+ > **Optional capability.** `pi-intercom` is **not** a dependency of ASF — ASF
18
+ > works fully without it. The `intercom` tool is available only when the user
19
+ > has installed it (`pi install npm:pi-intercom`). When it is present, use it
20
+ > as described below; when it is absent, fall back to asking the user or
21
+ > working in one session.
22
+
17
23
  Other pi sessions on this machine are often working on directly relevant things: the same monorepo, an adjacent service, the package you depend on. **Use intercom to talk to them directly instead of guessing, duplicating their work, or routing everything through the user.**
18
24
 
19
25
  ### When to use intercom