pan-wizard 3.12.2 → 3.12.3
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": "pan-wizard",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.3",
|
|
4
4
|
"description": "Command a bot army for your codebase: an Opus Mission Control delegates whole-project goals to specialist squads and ships behind a human merge gate. Five AI CLIs, zero context rot.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"pan-wizard": "bin/install.js"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"generated_at": "2026-
|
|
3
|
+
"generated_at": "2026-06-28T11:51:31.104Z",
|
|
4
4
|
"topics": [
|
|
5
5
|
{
|
|
6
6
|
"name": "experiment-runner",
|
|
@@ -107,6 +107,24 @@
|
|
|
107
107
|
"reviewer": "medium"
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
|
+
{
|
|
111
|
+
"name": "autonomous-loop",
|
|
112
|
+
"scope": "universal",
|
|
113
|
+
"file": "pan-wizard-core/learnings/universal/autonomous-loop.md",
|
|
114
|
+
"patterns": [
|
|
115
|
+
"P-310",
|
|
116
|
+
"P-350",
|
|
117
|
+
"P-360"
|
|
118
|
+
],
|
|
119
|
+
"size_bytes": 10680,
|
|
120
|
+
"size_tokens_est": 2670,
|
|
121
|
+
"agent_relevance": {
|
|
122
|
+
"planner": "low",
|
|
123
|
+
"executor": "medium",
|
|
124
|
+
"verifier": "low",
|
|
125
|
+
"reviewer": "low"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
110
128
|
{
|
|
111
129
|
"name": "binary-io",
|
|
112
130
|
"scope": "universal",
|
|
@@ -532,9 +550,9 @@
|
|
|
532
550
|
}
|
|
533
551
|
],
|
|
534
552
|
"totals": {
|
|
535
|
-
"topics":
|
|
536
|
-
"patterns":
|
|
537
|
-
"size_bytes":
|
|
538
|
-
"size_tokens_est":
|
|
553
|
+
"topics": 32,
|
|
554
|
+
"patterns": 66,
|
|
555
|
+
"size_bytes": 101338,
|
|
556
|
+
"size_tokens_est": 25344
|
|
539
557
|
}
|
|
540
558
|
}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
topic: autonomous-loop
|
|
3
|
-
last_updated: 2026-06-
|
|
3
|
+
last_updated: 2026-06-28T00:00:00.000Z
|
|
4
4
|
patterns:
|
|
5
5
|
- id: P-310
|
|
6
6
|
summary: Autonomous build loops should fan out research and verify in parallel but keep implement/build a single serial step, then seal with one clean build at loop end
|
|
7
7
|
promoted_at: 2026-06-12T00:00:00.000Z
|
|
8
8
|
source_experiments: [montyhall-focus-loop]
|
|
9
|
+
- id: P-350
|
|
10
|
+
summary: In a parallel campaign, review a branch against its merge-base (three-dot / fork-sha diff), never two-dot main..HEAD, or a moved base produces phantom deletions and false blocks
|
|
11
|
+
promoted_at: 2026-06-28T00:00:00.000Z
|
|
12
|
+
source_experiments: [abilitycompliance-army-v1.1]
|
|
13
|
+
- id: P-360
|
|
14
|
+
summary: Campaign telemetry must be both captured (active per-step record, not just the passive hook) and trustworthy (never naive-sum a shared-session transcript — cumulative-per-turn cache-read over-counts by orders of magnitude)
|
|
15
|
+
promoted_at: 2026-06-28T00:00:00.000Z
|
|
16
|
+
source_experiments: [abilitycompliance-army-v1.1, plusb-loans-focus-auto, plusbforecasting-exec]
|
|
9
17
|
---
|
|
10
18
|
|
|
11
19
|
# Autonomous Loop (AI-derived)
|
|
@@ -54,3 +62,29 @@ patterns:
|
|
|
54
62
|
5. **Never let a schedule lower an irreversible-action gate** — scheduled or not, the human approves the merge. Autonomy extends up to the irreversible step, never through it.
|
|
55
63
|
|
|
56
64
|
**Applies in:** `campaign.cjs` + `/pan:army --schedule` (ADR-0034), any cron/`/loop`-driven PAN automation, the self-improvement loop on a cadence.
|
|
65
|
+
|
|
66
|
+
## P-350 — Review a worktree branch against its merge-base, never two-dot, when the base moves
|
|
67
|
+
|
|
68
|
+
**Evidence:** In the first production army campaign (AbilityCompliance v1.1, 6 missions), a Quality squad **BLOCK was a false positive**: the reviewer diffed `main..HEAD` (two-dot) *after* an earlier parallel mission had merged and advanced `main` past the reviewed mission's fork point — so the already-merged mission's additions appeared as **phantom deletions** in the diff. The block was disproven only by re-diffing against the merge-base. A false block burns a whole cycle; the mirror case (phantom additions hiding a genuine deletion) can wave a bad change through a gate.
|
|
69
|
+
|
|
70
|
+
**Rule:** Whenever you review or merge a branch whose base can advance under it (every parallel campaign):
|
|
71
|
+
|
|
72
|
+
1. **Diff against the merge-base, not the moved tip** — `git diff <fork-sha>..HEAD`, or three-dot `git diff main...HEAD`. Never two-dot `main..HEAD`.
|
|
73
|
+
2. **Stamp the fork sha at worktree-creation time** so review and release always carry the correct base instead of recomputing it from a `main` that has since moved.
|
|
74
|
+
3. **A surprising diff is a base smell first** — large phantom deletions/additions of code the mission never touched means "wrong diff base," not "bad change." Re-check the base before trusting any verdict built on it.
|
|
75
|
+
|
|
76
|
+
**Applies in:** `pan-reviewer` / `pan-hardener` / `pan-integration-checker`, the `/pan:army` Quality + Release steps, `worktree.cjs` (record base sha), any parallel-branch review or merge.
|
|
77
|
+
|
|
78
|
+
## P-360 — Campaign telemetry must be both captured and trustworthy
|
|
79
|
+
|
|
80
|
+
**Evidence:** Three production projects showed campaign telemetry failing in *both* directions. (1) **Absent** — a full 5-mission army campaign (AbilityCompliance v1.1) produced **zero** cost/trace/bus records, although the hooks were installed, registered on `SubagentStop`, and verified working in isolation; a main-loop coordinator's work never fired `SubagentStop`, so nothing was captured. (2) **Corrupted** — two projects that *did* capture (a weeks-long focus-auto loop and a phase-exec project) logged physically-impossible figures: a single subagent record claiming billions of cache-read tokens, cache-hit pinned at 100%, and many byte-identical rows. Root cause: the transcript fallback summed `usage` across *every* assistant message in a transcript whose `session_id` is shared by all subagents — so each event re-summed the whole growing transcript, and `cache_read` (re-read every turn) multiplied by the turn count. Either way the HUD, `/pan:cost`, and `/pan:optimize` consumed nothing usable.
|
|
81
|
+
|
|
82
|
+
**Rule:** For any long-running, multi-step autonomous campaign, telemetry must survive the spawn pattern *and* be numerically sane:
|
|
83
|
+
|
|
84
|
+
1. **Don't make load-bearing observability depend on a passive hook.** Subagent-stop events fire only for spawned subagents; a main-loop orchestrator's own tokens — and some headless runtimes — never trigger them.
|
|
85
|
+
2. **Record per-step telemetry actively** at the Learn step — tokens (an estimate is fine), duration, role, outcome — via an explicit metrics-append, so capture survives any spawn pattern.
|
|
86
|
+
3. **Never naive-sum a transcript to attribute one actor's usage.** Subagents share the parent session id, so summing all matching messages on every event counts the whole (growing) transcript repeatedly; cumulative-per-turn cache-read then explodes. Attribute per-event *deltas* (a high-water mark), prefer the event's own usage payload, and dedup identical writes.
|
|
87
|
+
4. **Sanity-check before you trust the number.** A cache-hit pinned at 100%, or cache-read far exceeding input, is a miscount — not a triumph. Cap or flag implausible records instead of aggregating them.
|
|
88
|
+
5. **Preflight a telemetry probe** at campaign start (write then read one record); treat empty *or* absurd telemetry as a defect, not a quiet state.
|
|
89
|
+
|
|
90
|
+
**Applies in:** `/pan:army` Phase 0 + Learn step, `pan-conductor` campaign mode, `hooks/pan-cost-logger.js` + `pan-trace-logger.js`, the HUD telemetry panels, `/pan:cost`, `/pan:optimize`.
|