pi-daddy 0.41.1 → 0.43.1

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.
Files changed (135) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +12 -5
  3. package/contracts/ledger-record/v1/README.md +40 -25
  4. package/contracts/ledger-record/v1/fixtures/capability-decision.json +3 -1
  5. package/contracts/ledger-record/v1/fixtures/child-lifecycle.json +25 -0
  6. package/contracts/ledger-record/v1/fixtures/episode-cost-gate.json +14 -0
  7. package/contracts/ledger-record/v1/fixtures/episode-outcome.json +12 -0
  8. package/contracts/ledger-record/v1/fixtures/ledger-record.jsonl +6 -3
  9. package/contracts/ledger-record/v1/fixtures/session-config.json +14 -0
  10. package/contracts/ledger-record/v1/governance-event.schema.json +356 -0
  11. package/dist/advisors/advisor.d.ts +24 -1
  12. package/dist/advisors/advisor.d.ts.map +1 -1
  13. package/dist/advisors/advisor.js +19 -1
  14. package/dist/advisors/advisor.js.map +1 -1
  15. package/dist/advisors/decider.d.ts +11 -0
  16. package/dist/advisors/decider.d.ts.map +1 -1
  17. package/dist/advisors/decider.js.map +1 -1
  18. package/dist/advisors/jev.d.ts.map +1 -1
  19. package/dist/advisors/jev.js +32 -1
  20. package/dist/advisors/jev.js.map +1 -1
  21. package/dist/cli.d.ts +7 -1
  22. package/dist/cli.d.ts.map +1 -1
  23. package/dist/cli.js +87 -1
  24. package/dist/cli.js.map +1 -1
  25. package/dist/executors/activity-session.d.ts +13 -0
  26. package/dist/executors/activity-session.d.ts.map +1 -1
  27. package/dist/executors/activity-session.js +44 -2
  28. package/dist/executors/activity-session.js.map +1 -1
  29. package/dist/governance/episode-cost-gate.d.ts +31 -0
  30. package/dist/governance/episode-cost-gate.d.ts.map +1 -0
  31. package/dist/governance/episode-cost-gate.js +112 -0
  32. package/dist/governance/episode-cost-gate.js.map +1 -0
  33. package/dist/governance/ledger-events.d.ts +108 -1
  34. package/dist/governance/ledger-events.d.ts.map +1 -1
  35. package/dist/governance/ledger-events.js +64 -0
  36. package/dist/governance/ledger-events.js.map +1 -1
  37. package/dist/governance/ledger-v3-validation.d.ts.map +1 -1
  38. package/dist/governance/ledger-v3-validation.js +124 -0
  39. package/dist/governance/ledger-v3-validation.js.map +1 -1
  40. package/dist/governance/ledger.d.ts +8 -2
  41. package/dist/governance/ledger.d.ts.map +1 -1
  42. package/dist/governance/ledger.js +18 -2
  43. package/dist/governance/ledger.js.map +1 -1
  44. package/dist/kernel/definitions.d.ts +5 -0
  45. package/dist/kernel/definitions.d.ts.map +1 -1
  46. package/dist/kernel/definitions.js +30 -1
  47. package/dist/kernel/definitions.js.map +1 -1
  48. package/dist/kernel/delegate-types.d.ts +4 -0
  49. package/dist/kernel/delegate-types.d.ts.map +1 -1
  50. package/dist/kernel/delegate-types.js.map +1 -1
  51. package/dist/kernel/delegate.d.ts.map +1 -1
  52. package/dist/kernel/delegate.js +20 -5
  53. package/dist/kernel/delegate.js.map +1 -1
  54. package/dist/kernel/env-names.d.ts +5 -0
  55. package/dist/kernel/env-names.d.ts.map +1 -1
  56. package/dist/kernel/env-names.js +9 -0
  57. package/dist/kernel/env-names.js.map +1 -1
  58. package/dist/kernel/grant-env.d.ts +2 -0
  59. package/dist/kernel/grant-env.d.ts.map +1 -1
  60. package/dist/kernel/grant-env.js +1 -0
  61. package/dist/kernel/grant-env.js.map +1 -1
  62. package/dist/kernel/propagation.d.ts +2 -2
  63. package/dist/kernel/propagation.d.ts.map +1 -1
  64. package/dist/kernel/propagation.js +7 -2
  65. package/dist/kernel/propagation.js.map +1 -1
  66. package/dist/products/dashboard-cli.d.ts +4 -0
  67. package/dist/products/dashboard-cli.d.ts.map +1 -1
  68. package/dist/products/dashboard-cli.js +32 -4
  69. package/dist/products/dashboard-cli.js.map +1 -1
  70. package/dist/products/dashboard-handshake.d.ts +8 -0
  71. package/dist/products/dashboard-handshake.d.ts.map +1 -1
  72. package/dist/products/dashboard-handshake.js +3 -0
  73. package/dist/products/dashboard-handshake.js.map +1 -1
  74. package/dist/products/dashboard-herdr.d.ts +4 -0
  75. package/dist/products/dashboard-herdr.d.ts.map +1 -1
  76. package/dist/products/dashboard-herdr.js +10 -2
  77. package/dist/products/dashboard-herdr.js.map +1 -1
  78. package/dist/products/dashboard-projection.d.ts.map +1 -1
  79. package/dist/products/dashboard-projection.js +13 -6
  80. package/dist/products/dashboard-projection.js.map +1 -1
  81. package/dist/products/dashboard-render.d.ts +10 -0
  82. package/dist/products/dashboard-render.d.ts.map +1 -1
  83. package/dist/products/dashboard-render.js +9 -0
  84. package/dist/products/dashboard-render.js.map +1 -1
  85. package/dist/products/dashboard-session-client.d.ts +17 -0
  86. package/dist/products/dashboard-session-client.d.ts.map +1 -0
  87. package/dist/products/dashboard-session-client.js +28 -0
  88. package/dist/products/dashboard-session-client.js.map +1 -0
  89. package/dist/products/episode-outcomes.d.ts +32 -0
  90. package/dist/products/episode-outcomes.d.ts.map +1 -0
  91. package/dist/products/episode-outcomes.js +280 -0
  92. package/dist/products/episode-outcomes.js.map +1 -0
  93. package/dist/products/episode-report.d.ts +59 -0
  94. package/dist/products/episode-report.d.ts.map +1 -0
  95. package/dist/products/episode-report.js +311 -0
  96. package/dist/products/episode-report.js.map +1 -0
  97. package/extensions/chain-ledger.ts +2 -0
  98. package/extensions/chain-plan.ts +4 -2
  99. package/extensions/dashboard-session-server.ts +86 -0
  100. package/extensions/definition-runtime.ts +93 -0
  101. package/extensions/delegate-chain.ts +31 -2
  102. package/extensions/delegation-ledger.ts +2 -0
  103. package/extensions/delegation.ts +24 -0
  104. package/extensions/effort-advice.ts +12 -0
  105. package/extensions/execute-child.ts +148 -9
  106. package/extensions/grants-command.ts +32 -2
  107. package/extensions/grants.ts +23 -1
  108. package/extensions/pruning-advice.ts +3 -1
  109. package/extensions/run-delegation.ts +54 -6
  110. package/extensions/session-model-prompt.ts +179 -0
  111. package/extensions/session.ts +104 -3
  112. package/package.json +1 -1
  113. package/src/advisors/advisor.ts +45 -2
  114. package/src/advisors/decider.ts +8 -0
  115. package/src/advisors/jev.ts +34 -1
  116. package/src/cli.ts +90 -2
  117. package/src/executors/activity-session.ts +56 -2
  118. package/src/governance/episode-cost-gate.ts +128 -0
  119. package/src/governance/ledger-events.ts +173 -1
  120. package/src/governance/ledger-v3-validation.ts +146 -0
  121. package/src/governance/ledger.ts +29 -1
  122. package/src/kernel/definitions.ts +32 -1
  123. package/src/kernel/delegate-types.ts +4 -0
  124. package/src/kernel/delegate.ts +22 -5
  125. package/src/kernel/env-names.ts +10 -0
  126. package/src/kernel/grant-env.ts +3 -0
  127. package/src/kernel/propagation.ts +7 -0
  128. package/src/products/dashboard-cli.ts +32 -4
  129. package/src/products/dashboard-handshake.ts +5 -0
  130. package/src/products/dashboard-herdr.ts +15 -1
  131. package/src/products/dashboard-projection.ts +13 -6
  132. package/src/products/dashboard-render.ts +11 -0
  133. package/src/products/dashboard-session-client.ts +35 -0
  134. package/src/products/episode-outcomes.ts +317 -0
  135. package/src/products/episode-report.ts +372 -0
package/CHANGELOG.md CHANGED
@@ -12,6 +12,46 @@ the record of how the package got here and are worth keeping; they are not worth
12
12
  > the record of how the package arrived at what it does, and because the reasoning behind each one is
13
13
  > usually the clearest statement of why the current behaviour is what it is.
14
14
 
15
+ ## 0.43.1 — Pi-only documentation refresh (2026-09-29)
16
+
17
+ - Refresh `README.md`, `AGENTS.md`, the package README, and the ledger-record contract README against the shipped
18
+ initialization, privacy, model, outcome, workspace, executor, CLI, and compatibility behavior.
19
+ - Remove obsolete Claude-specific formatting policy and describe Pi as this repository's only supported agent
20
+ workflow; retain ignore guards against accidentally committing assistant-specific scratch state.
21
+ - Extend documentation drift checks to verify the published contract's file references and root workspace commands.
22
+ No runtime behavior or default changed.
23
+
24
+ ## 0.43.0 — episode outcome labeling (2026-09-29)
25
+
26
+ - PR #85 adds `pi-daddy outcomes`, which reads Git history for `Pi-Episode` trailers and appends `episode_outcome`
27
+ ledger records covering survival on the default branch, reverts by name or inverse diff, CI state via `gh`,
28
+ amendments, and operator corrections.
29
+ - `pi-daddy report` now fills its outcome column from those records.
30
+ - The dashboard ledger reader now validates every known record kind before skipping kinds it does not render, and
31
+ skips unknown future kinds instead of throwing. No default changed.
32
+
33
+ ## 0.42.0 — model-attributed usage records (2026-09-29)
34
+
35
+ - The first delegation now prompts once to keep or change child model and thinking defaults for the session;
36
+ `sessionModelPrompt: never` skips the prompt.
37
+ - The dashboard now shows the `/grants models` table and read-only episode cost/ceiling; model and thinking edits use
38
+ the owning session's in-memory override path and produce the same `session_config` ledger event.
39
+ - Definitions and global defaults in `.pi/pi-daddy/settings.json` may select child model and thinking, with explicit,
40
+ session, definition, global, and pi fallback provenance recorded and shown by `/grants` and `pi-daddy report`.
41
+ - Episodes now warn at half of their provider-reported USD cost ceiling and gate at the ceiling (default `$5`,
42
+ configurable as `episodeCostCeiling`); direct children pause for one operator decision, while Herdr stops.
43
+ - `pi-daddy report` now joins the project grant and activity ledgers into episode-level Markdown or JSON, with
44
+ date/definition/model filters, grouped usage, range totals, and `Pi-Episode` commit attribution.
45
+ - Capability and lifecycle records now stamp the complete definition `SKILL.md` hash and, when exposed by an
46
+ installed package, its version, so measurements identify the definition version they ran under.
47
+ - Governed children now receive `PI_DADDY_EPISODE`, `PI_DADDY_DEFINITION`, and `PI_DADDY_EXECUTION`; lifecycle
48
+ records name the exported variables so work produced outside pi-daddy can be joined back to its execution.
49
+ - Child lifecycle records now include the resolved provider/model, effective thinking level and its source, nullable
50
+ provider-reported token dimensions, and the current turn's compaction count when the session file is readable.
51
+ - Advice records now include the resolved advisor provider/model and nullable token dimensions reported by the
52
+ Decisions endpoint. The endpoint does not expose an effective thinking level, so that field is recorded as null.
53
+ - The ledger-record v1 governance schema accepts the new lifecycle fields additively; retained records remain valid.
54
+
15
55
  ## 0.41.1 — context handoff bounds in delegate schemas
16
56
 
17
57
  - The `delegate`, `delegate_all`, and `delegate_chain` schemas now tell models that context handoffs accept at most
package/README.md CHANGED
@@ -3,16 +3,18 @@
3
3
  Capability governance and coordination for [pi](https://github.com/badlogic/pi-mono)'s multi-level agent system. An
4
4
  orchestrator grants each sub-agent a deliberate subset of what it holds and withholds the rest; a sub-agent may delegate
5
5
  further, but only ever a subset of what it holds. Enforcement is pi's own `--tools` allowlist on a separate child
6
- process, with an append-only, hash-chained ledger of every grant and refusal.
6
+ process, with an optional append-only, hash-chained governance ledger.
7
7
 
8
8
  ```bash
9
9
  pi install npm:pi-daddy
10
10
  pi
11
11
  ```
12
12
 
13
- `/grants` shows the session's ceiling and spawnable definitions; `/grants init` writes `.pi/pi-daddy/settings.json`,
14
- the one reviewable file you commit. A definition is an [Agent Skills](https://agentskills.io/specification) `SKILL.md`
15
- whose `allowed-tools` is the ceiling and whose body is the child's system prompt.
13
+ `/grants` shows the session's ceiling and spawnable definitions. `/grants init` writes the review copy at
14
+ `.pi/pi-daddy/settings.json`, stores the enforced grant outside the workspace, enables the project ledger, and applies
15
+ the decisions to the running session; commit the review copy when the project's ignore rules permit it. A definition
16
+ is an [Agent Skills](https://agentskills.io/specification) `SKILL.md` whose `allowed-tools` is the ceiling and whose
17
+ body is the child's system prompt.
16
18
 
17
19
  ```
18
20
  delegate({ agent: "review-security", task: "Review the diff." })
@@ -26,7 +28,12 @@ effective = ( requested ∩ parentGrant ∩ ceiling ) \ (gated \ approved)
26
28
 
27
29
  Escalation is impossible by construction on the tool surface. It does not contain an agent holding an execution
28
30
  primitive: a child granted `bash` can start an ungoverned descendant, so `bash` is gated by default and every gate
29
- answer is recorded.
31
+ answer is recorded when a governance ledger is configured.
32
+
33
+ The package requires Node.js 22.19.0 or newer. `pi-daddy report` joins episode usage and attribution;
34
+ `pi-daddy outcomes` adds Git, CI, amendment, and operator-correction signals for commits carrying a `Pi-Episode`
35
+ trailer. A connected dashboard can change model/thinking defaults for its owning session without changing persistent
36
+ settings or enforcement.
30
37
 
31
38
  The full product description is the repository [README](https://github.com/mojomanyana/pi-daddy#readme); the
32
39
  [CHANGELOG](./CHANGELOG.md) says what each release changed and what to do about breaking changes. The one shipped
@@ -1,44 +1,59 @@
1
- # pi-daddy ledger contract — version 3
1
+ # pi-daddy ledger-record contract — version 1
2
2
 
3
- Canonical machine contract for one `ledgerVersion: 3` JSONL line:
3
+ Canonical machine contract for the append-only governance ledger:
4
4
 
5
- - `ledger-event.schema.json` — closed JSON Schema draft 2020-12 event union.
6
- - `fixtures/*.json` — deterministic examples generated through the production builders by
5
+ - `record.schema.json` — the JSON Schema draft 2020-12 record envelope
6
+ `{v, seq, prev, at, kind, id, body, digest}` written as one JSON object per line.
7
+ - `governance-event.schema.json` — the closed `ledgerVersion: 3` union carried in a governance record's `body`.
8
+ - `fixtures/ledger-record.jsonl` — deterministic envelope examples.
9
+ - `fixtures/*.json` — deterministic governance-body examples generated through the production builders by
7
10
  `scripts/generate-ledger-record-contract.ts`.
8
11
 
9
- ## Dispatch and compatibility
12
+ The current governance events are `capability_decision`, `workspace_lease`, `child_lifecycle`, `cost_gate`,
13
+ `session_config`, and `episode_outcome`.
10
14
 
11
- 1. No `ledgerVersion` and no `event` is a legacy 0.17 grant record.
12
- 2. `ledgerVersion: 2` is validated against the frozen v2 contract.
13
- 3. `ledgerVersion: 3` requires one known event and validation against this schema.
14
- 4. Any unsupported explicit version, missing discriminator, unknown event, or malformed required identity is corrupt. It is never reinterpreted as legacy.
15
+ ## Reading and compatibility
15
16
 
16
- The schema is closed. Adding/removing a field, event or enum member, changing requiredness, or changing meaning requires a new ledger version and versioned path. V3 is still unreleased, so its review repairs are folded into this one initial contract rather than creating a public v4.
17
+ The envelope reader verifies sequence, previous-record hash, digest, and known envelope kind. A torn or tampered tail
18
+ is reported as damage; writers refuse to append until the operator explicitly repairs it. Pre-envelope ledgers are
19
+ imported into envelopes and are never repaired in place.
20
+
21
+ Within a governance body:
22
+
23
+ 1. No `ledgerVersion` and no `event` is a legacy grant record.
24
+ 2. Imported `ledgerVersion: 2` events are retained as historical records using their frozen identity rules.
25
+ 3. Every known `ledgerVersion: 3` event is validated against `governance-event.schema.json`, including known kinds a
26
+ particular reader does not render.
27
+ 4. The dashboard projection skips a non-empty unknown v3 event discriminator so a newer writer does not crash an
28
+ older dashboard. Missing discriminators, unsupported explicit versions, and malformed known events are corrupt.
29
+ `/grants ledger` is currently closed-world and reports valid event kinds it does not render, including future
30
+ discriminators, as corruption; that is a known compatibility gap rather than part of the contract.
31
+
32
+ The governance schema is closed. Adding or removing a field, event, or enum member, changing requiredness, or changing
33
+ meaning requires an explicit compatibility decision and regenerated fixtures. Run `npm run contracts:generate` from
34
+ the repository root and commit the generated contract with the runtime change.
17
35
 
18
36
  ## Execution identity
19
37
 
20
- Every v3 **execution** event carries:
38
+ Every v3 execution event carries:
21
39
 
22
40
  - `executionId`: globally unique identity of one execution occurrence.
23
41
  - `parentExecutionId`: the unique governed execution that delegated it, or explicit `null` at a root.
24
42
  - `childId`: the readable logical tree position, retained for operators and deterministic comparisons.
25
43
 
26
- `workflow_fact` is not an execution event; it carries its own `factId` and explicit provenance instead.
44
+ Consumers join capability, lifecycle, and lease events by `executionId`, never by `childId`. Repeated or concurrent
45
+ calls may reuse a logical position such as `d0.1`; they may never reuse an execution id.
27
46
 
28
- Consumers join lifecycle and lease events by `executionId`, never by `childId`. Repeated or concurrent calls may reuse a logical position such as `d0.1`; they may never reuse an execution id.
47
+ A lifecycle `running` event may include `herdrPaneId` and `herdrAgentName` for navigation. These are runtime
48
+ observations, not enforcement boundaries. `deadlineAt` is immutable within one occurrence and bounds how long a
49
+ non-terminal start can be rendered as live; after it, the truthful state is incomplete.
29
50
 
30
- A lifecycle `running` event may include `herdrPaneId` and `herdrAgentName` for navigation. These are runtime observations, not enforcement boundaries. `deadlineAt` is immutable within one occurrence and bounds how long a non-terminal start can be rendered as live; after it, the truthful state is incomplete.
31
-
32
- All timestamp fields share one schema/runtime profile: JSON Schema `date-time` with seconds restricted to `00`–`59`. Leap-second strings are excluded because JavaScript deadline and duration arithmetic cannot represent them.
51
+ All timestamp fields share one schema/runtime profile: JSON Schema `date-time` with seconds restricted to `00`–`59`.
52
+ Leap-second strings are excluded because JavaScript deadline and duration arithmetic cannot represent them.
33
53
 
34
54
  ## Privacy and provenance
35
55
 
36
- The privacy boundary is unchanged: no task text, prompts, tool arguments, child output, or tool results. Fields displayed as identities and every capability use explicit ASCII identifier grammars in both schema and runtime; public builders assert that their serialized event passes the same exact reader. Correlation display fields use the identifier grammar rather than free-form prose, and a top-level null `assurance_scope` is omitted/rejected consistently. Trusted task/definition digests remain outside `correlation`. Correlation is caller-declared join metadata and never becomes proof that a workflow transition was validated or that an inline skill executed.
37
-
38
- ## Note 2026-09-21 — this directory was `contracts/ledger/v3`
39
-
40
- Since ADR-0076 PR 3d every ledger line is a **record envelope** (`record.schema.json`: format, sequence, previous-line
41
- hash, writer timestamp, kind, id, body, digest). What this README calls a v3 event is now the **body** of a record of
42
- kind `capability`, `lifecycle`, `lease`, `check` or `fact`; the event fields are unchanged and
43
- `governance-event.schema.json` is the same schema under its new name. Ledger v2 is archived under
44
- `docs/archive/contracts/ledger/v2` and no longer read; a pre-format ledger is imported once at session start.
56
+ Governance bodies contain no raw task text, prompts, tool arguments, child output, or tool results. Task and
57
+ definition digests identify content without reproducing it; a digest is an identifier, not anonymisation. Correlation
58
+ metadata is caller-declared join data and never authority. The separate local activity timeline may retain private
59
+ prompt and final content according to `PI_DADDY_ACTIVITY_CONTENT`; it is not part of this governance contract.
@@ -94,5 +94,7 @@
94
94
  "name": "build",
95
95
  "source": "/operator/skills/build/SKILL.md",
96
96
  "sha256": "8888888888888888888888888888888888888888888888888888888888888888"
97
- }
97
+ },
98
+ "definitionHash": "7777777777777777777777777777777777777777777777777777777777777777",
99
+ "definitionPackageVersion": "2.3.1"
98
100
  }
@@ -14,6 +14,23 @@
14
14
  "signal": null,
15
15
  "aborted": true,
16
16
  "reason": "child did not start",
17
+ "resolvedModel": {
18
+ "provider": "openai-codex",
19
+ "modelId": "gpt-5.3-codex"
20
+ },
21
+ "modelSource": "definition",
22
+ "thinkingLevel": {
23
+ "level": "high",
24
+ "source": "advisor"
25
+ },
26
+ "thinkingSource": "advisor",
27
+ "tokenDetail": {
28
+ "inputTokens": 120,
29
+ "outputTokens": 30,
30
+ "cacheReadTokens": 20,
31
+ "cacheWriteTokens": 10,
32
+ "reasoningTokens": 5
33
+ },
17
34
  "usage": {
18
35
  "input": 120,
19
36
  "output": 30,
@@ -29,6 +46,14 @@
29
46
  "total": 0.2
30
47
  }
31
48
  },
49
+ "compactionCount": 1,
50
+ "exportedEnvironment": [
51
+ "PI_DADDY_EPISODE",
52
+ "PI_DADDY_DEFINITION",
53
+ "PI_DADDY_EXECUTION"
54
+ ],
55
+ "definitionHash": "7777777777777777777777777777777777777777777777777777777777777777",
56
+ "definitionPackageVersion": "2.3.1",
32
57
  "correlation": {
33
58
  "schema_version": "1.0",
34
59
  "run_id": "run-contract-001",
@@ -0,0 +1,14 @@
1
+ {
2
+ "ledgerVersion": 3,
3
+ "event": "cost_gate",
4
+ "ts": "2026-08-20T12:00:02.500Z",
5
+ "episodeId": "episode:00000000-0000-4000-8000-000000000099",
6
+ "executionId": "exec:00000000-0000-4000-8000-000000000001",
7
+ "parentExecutionId": null,
8
+ "childId": "d0.1",
9
+ "gate": "episode_cost",
10
+ "cost": 5.2,
11
+ "ceiling": 5,
12
+ "outcome": "continued",
13
+ "newCeiling": 10
14
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "ledgerVersion": 3,
3
+ "event": "episode_outcome",
4
+ "ts": "2026-08-20T12:00:02.750Z",
5
+ "episodeId": "episode:00000000-0000-4000-8000-000000000099",
6
+ "commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
+ "survived": true,
8
+ "ci": "green",
9
+ "amended": false,
10
+ "corrected": false,
11
+ "label": "positive"
12
+ }
@@ -1,3 +1,6 @@
1
- {"v":1,"seq":1,"prev":null,"at":"2026-09-21T00:00:00.000Z","kind":"capability","id":"fixture-capability-decision","body":{"ledgerVersion":3,"event":"capability_decision","executionId":"exec:00000000-0000-4000-8000-000000000001","parentExecutionId":null,"ts":"2026-08-20T12:00:01.000Z","episodeId":"episode:00000000-0000-4000-8000-000000000099","parentId":"d0","childId":"d0.1","depth":1,"agentType":"build","executor":"process","taskFrom":"d0.0","taskFromExecutionId":"exec:00000000-0000-4000-8000-000000000000","taskDigest":"9999999999999999999999999999999999999999999999999999999999999999","correlation":{"schema_version":"1.0","run_id":"run-contract-001","task_id":"task-contract-001","workspace_id":"workspace-contract","context_id":"context-contract","phase":"verify","assurance":"critical","assurance_effective":"critical","policy_label":"policy-contract","assurance_source":"policy","assurance_scope":{"type":"selectors","selectors":["src/**"]},"activated_at":"2026-08-20T12:00:00.000Z","plan_digest":"1111111111111111111111111111111111111111111111111111111111111111","definition_digest":"2222222222222222222222222222222222222222222222222222222222222222","task_digest":"3333333333333333333333333333333333333333333333333333333333333333","base_sha":"4444444444444444444444444444444444444444","head_sha":"5555555555555555555555555555555555555555","tree_sha":"6666666666666666666666666666666666666666","event_seq":21,"last_change_seq":18,"last_authority_seq":20,"check_receipt_id":"7777777777777777777777777777777777777777777777777777777777777777"},"refusal":{"code":"WORKSPACE_WRITE_CONFLICT","message":"workspace-contract already has a governed writer","details":{"workspace_id":"workspace-contract","retryable":true,"holder_depth":1}},"requested":["tool:bash","tool:read"],"parentGrant":["agent:build","tool:bash","tool:read"],"effective":["tool:bash","tool:read"],"denied":[],"clipped":[],"gatedBlocked":[],"blocked":true,"reason":"workspace-contract already has a governed writer","approved":["tool:bash","tool:read"],"approvalSources":{"tool:bash":"persisted","tool:read":"prompt"},"approvalScopes":{"tool:bash":"always","tool:read":"once"},"approvalExpiresAt":{"tool:bash":"2026-09-19T12:00:00.000Z"},"approvalUses":{"tool:read":{"max":1,"remaining":0}},"definitionDigest":{"name":"build","source":"/operator/skills/build/SKILL.md","sha256":"8888888888888888888888888888888888888888888888888888888888888888"}},"digest":"969b6d0deed5685eb1c7c8841ac11340345ef5cac842b08b9b9529c42f7ea9fe"}
2
- {"v":1,"seq":2,"prev":"85a7be60d4eacf737d7b6df196f3940c0e273dacecd69a653f521c9da4de2d7a","at":"2026-09-21T00:00:00.000Z","kind":"lease","id":"fixture-workspace-lease","body":{"ledgerVersion":3,"event":"workspace_lease","ts":"2026-08-20T12:00:02.000Z","episodeId":"episode:00000000-0000-4000-8000-000000000099","executionId":"exec:00000000-0000-4000-8000-000000000001","parentExecutionId":null,"childId":"d0.1","workspaceId":"workspace-contract","root":"/worktrees/contract","access":"write","outcome":"acquired","recovered":"unknown","correlation":{"schema_version":"1.0","run_id":"run-contract-001","task_id":"task-contract-001","workspace_id":"workspace-contract","context_id":"context-contract","phase":"verify","assurance":"critical","assurance_effective":"critical","policy_label":"policy-contract","assurance_source":"policy","assurance_scope":{"type":"selectors","selectors":["src/**"]},"activated_at":"2026-08-20T12:00:00.000Z","plan_digest":"1111111111111111111111111111111111111111111111111111111111111111","definition_digest":"2222222222222222222222222222222222222222222222222222222222222222","task_digest":"3333333333333333333333333333333333333333333333333333333333333333","base_sha":"4444444444444444444444444444444444444444","head_sha":"5555555555555555555555555555555555555555","tree_sha":"6666666666666666666666666666666666666666","event_seq":21,"last_change_seq":18,"last_authority_seq":20,"check_receipt_id":"7777777777777777777777777777777777777777777777777777777777777777"}},"digest":"d1c9f4a6c66858513564d00a77cff75d684f71624da63637ba2b53ba414fc476"}
3
- {"v":1,"seq":3,"prev":"998a929cc0d910e5b6246802deccf990d7fd7db50a4094428b46e64997554ebf","at":"2026-09-21T00:00:00.000Z","kind":"lifecycle","id":"fixture-child-lifecycle","body":{"ledgerVersion":3,"event":"child_lifecycle","ts":"2026-08-20T12:00:03.000Z","episodeId":"episode:00000000-0000-4000-8000-000000000099","executionId":"exec:00000000-0000-4000-8000-000000000001","parentExecutionId":null,"childId":"d0.1","state":"failed","executor":"process","deadlineAt":"2026-08-20T12:10:00.000Z","idleTimeoutMs":900000,"exitCode":null,"signal":null,"aborted":true,"reason":"child did not start","usage":{"input":120,"output":30,"cacheRead":20,"cacheWrite":10,"reasoning":5,"totalTokens":185,"cost":{"input":0.12,"output":0.06,"cacheRead":0.01,"cacheWrite":0.01,"total":0.2}},"correlation":{"schema_version":"1.0","run_id":"run-contract-001","task_id":"task-contract-001","workspace_id":"workspace-contract","context_id":"context-contract","phase":"verify","assurance":"critical","assurance_effective":"critical","policy_label":"policy-contract","assurance_source":"policy","assurance_scope":{"type":"selectors","selectors":["src/**"]},"activated_at":"2026-08-20T12:00:00.000Z","plan_digest":"1111111111111111111111111111111111111111111111111111111111111111","definition_digest":"2222222222222222222222222222222222222222222222222222222222222222","task_digest":"3333333333333333333333333333333333333333333333333333333333333333","base_sha":"4444444444444444444444444444444444444444","head_sha":"5555555555555555555555555555555555555555","tree_sha":"6666666666666666666666666666666666666666","event_seq":21,"last_change_seq":18,"last_authority_seq":20,"check_receipt_id":"7777777777777777777777777777777777777777777777777777777777777777"}},"digest":"05817b67c4549fefaa753a03a80b67e55ebbc276e5cc9985216d8aa42552c579"}
1
+ {"v":1,"seq":1,"prev":null,"at":"2026-09-21T00:00:00.000Z","kind":"capability","id":"fixture-capability-decision","body":{"ledgerVersion":3,"event":"capability_decision","executionId":"exec:00000000-0000-4000-8000-000000000001","parentExecutionId":null,"ts":"2026-08-20T12:00:01.000Z","episodeId":"episode:00000000-0000-4000-8000-000000000099","parentId":"d0","childId":"d0.1","depth":1,"agentType":"build","executor":"process","taskFrom":"d0.0","taskFromExecutionId":"exec:00000000-0000-4000-8000-000000000000","taskDigest":"9999999999999999999999999999999999999999999999999999999999999999","correlation":{"schema_version":"1.0","run_id":"run-contract-001","task_id":"task-contract-001","workspace_id":"workspace-contract","context_id":"context-contract","phase":"verify","assurance":"critical","assurance_effective":"critical","policy_label":"policy-contract","assurance_source":"policy","assurance_scope":{"type":"selectors","selectors":["src/**"]},"activated_at":"2026-08-20T12:00:00.000Z","plan_digest":"1111111111111111111111111111111111111111111111111111111111111111","definition_digest":"2222222222222222222222222222222222222222222222222222222222222222","task_digest":"3333333333333333333333333333333333333333333333333333333333333333","base_sha":"4444444444444444444444444444444444444444","head_sha":"5555555555555555555555555555555555555555","tree_sha":"6666666666666666666666666666666666666666","event_seq":21,"last_change_seq":18,"last_authority_seq":20,"check_receipt_id":"7777777777777777777777777777777777777777777777777777777777777777"},"refusal":{"code":"WORKSPACE_WRITE_CONFLICT","message":"workspace-contract already has a governed writer","details":{"workspace_id":"workspace-contract","retryable":true,"holder_depth":1}},"requested":["tool:bash","tool:read"],"parentGrant":["agent:build","tool:bash","tool:read"],"effective":["tool:bash","tool:read"],"denied":[],"clipped":[],"gatedBlocked":[],"blocked":true,"reason":"workspace-contract already has a governed writer","approved":["tool:bash","tool:read"],"approvalSources":{"tool:bash":"persisted","tool:read":"prompt"},"approvalScopes":{"tool:bash":"always","tool:read":"once"},"approvalExpiresAt":{"tool:bash":"2026-09-19T12:00:00.000Z"},"approvalUses":{"tool:read":{"max":1,"remaining":0}},"definitionDigest":{"name":"build","source":"/operator/skills/build/SKILL.md","sha256":"8888888888888888888888888888888888888888888888888888888888888888"},"definitionHash":"7777777777777777777777777777777777777777777777777777777777777777","definitionPackageVersion":"2.3.1"},"digest":"4a36018bd75320d5f278ac3f31ebd676a0a24e40a779821ac1fcd67b520f8d9c"}
2
+ {"v":1,"seq":2,"prev":"02bdcfc121a09e09df55d592196009d85c4857cdafc6d10ffae52df9ef790cf9","at":"2026-09-21T00:00:00.000Z","kind":"lease","id":"fixture-workspace-lease","body":{"ledgerVersion":3,"event":"workspace_lease","ts":"2026-08-20T12:00:02.000Z","episodeId":"episode:00000000-0000-4000-8000-000000000099","executionId":"exec:00000000-0000-4000-8000-000000000001","parentExecutionId":null,"childId":"d0.1","workspaceId":"workspace-contract","root":"/worktrees/contract","access":"write","outcome":"acquired","recovered":"unknown","correlation":{"schema_version":"1.0","run_id":"run-contract-001","task_id":"task-contract-001","workspace_id":"workspace-contract","context_id":"context-contract","phase":"verify","assurance":"critical","assurance_effective":"critical","policy_label":"policy-contract","assurance_source":"policy","assurance_scope":{"type":"selectors","selectors":["src/**"]},"activated_at":"2026-08-20T12:00:00.000Z","plan_digest":"1111111111111111111111111111111111111111111111111111111111111111","definition_digest":"2222222222222222222222222222222222222222222222222222222222222222","task_digest":"3333333333333333333333333333333333333333333333333333333333333333","base_sha":"4444444444444444444444444444444444444444","head_sha":"5555555555555555555555555555555555555555","tree_sha":"6666666666666666666666666666666666666666","event_seq":21,"last_change_seq":18,"last_authority_seq":20,"check_receipt_id":"7777777777777777777777777777777777777777777777777777777777777777"}},"digest":"846254fb313861742c04f576f6afca484f1e9954461bd55a28d2e46c10c3143a"}
3
+ {"v":1,"seq":3,"prev":"5171a9ea3de47b21d07d72606d69f1529d9b26ded8d0a9e66f249ba0782a6bf4","at":"2026-09-21T00:00:00.000Z","kind":"fact","id":"fixture-episode-cost-gate","body":{"ledgerVersion":3,"event":"cost_gate","ts":"2026-08-20T12:00:02.500Z","episodeId":"episode:00000000-0000-4000-8000-000000000099","executionId":"exec:00000000-0000-4000-8000-000000000001","parentExecutionId":null,"childId":"d0.1","gate":"episode_cost","cost":5.2,"ceiling":5,"outcome":"continued","newCeiling":10},"digest":"144512eeb39ca539e5f27a7113afa5139b1ce507028d81c9fbae45b092149e13"}
4
+ {"v":1,"seq":4,"prev":"b2968d627c54e65c0e98a297c521ad6229367c75df4c68db2a18586eb4729a24","at":"2026-09-21T00:00:00.000Z","kind":"fact","id":"fixture-session-config","body":{"ledgerVersion":3,"event":"session_config","ts":"2026-08-20T12:00:02.750Z","episodeId":"episode:00000000-0000-4000-8000-000000000099","outcome":"changed","trigger":"first-delegation","overrides":{"review":{"model":"anthropic/claude-opus-4-6","thinking":"high"}}},"digest":"a363414f30242ae9a74db705691f5f8768070169e2676d1d7a3143adc6e46800"}
5
+ {"v":1,"seq":5,"prev":"0e3fd664c2dca1fc47d2009379607904458aa3a93dfe6e13a3ea485489398a4d","at":"2026-09-21T00:00:00.000Z","kind":"fact","id":"fixture-episode-outcome","body":{"ledgerVersion":3,"event":"episode_outcome","ts":"2026-08-20T12:00:02.750Z","episodeId":"episode:00000000-0000-4000-8000-000000000099","commit":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","survived":true,"ci":"green","amended":false,"corrected":false,"label":"positive"},"digest":"7617dfb4e545c6a0d54c2daf0d7598a2e191e333d67bb79189c618ea30752772"}
6
+ {"v":1,"seq":6,"prev":"e537315b2ab8675356be15e9b77ce51caceac65e7abc965d2ff3253e1e90bf0e","at":"2026-09-21T00:00:00.000Z","kind":"lifecycle","id":"fixture-child-lifecycle","body":{"ledgerVersion":3,"event":"child_lifecycle","ts":"2026-08-20T12:00:03.000Z","episodeId":"episode:00000000-0000-4000-8000-000000000099","executionId":"exec:00000000-0000-4000-8000-000000000001","parentExecutionId":null,"childId":"d0.1","state":"failed","executor":"process","deadlineAt":"2026-08-20T12:10:00.000Z","idleTimeoutMs":900000,"exitCode":null,"signal":null,"aborted":true,"reason":"child did not start","resolvedModel":{"provider":"openai-codex","modelId":"gpt-5.3-codex"},"modelSource":"definition","thinkingLevel":{"level":"high","source":"advisor"},"thinkingSource":"advisor","tokenDetail":{"inputTokens":120,"outputTokens":30,"cacheReadTokens":20,"cacheWriteTokens":10,"reasoningTokens":5},"usage":{"input":120,"output":30,"cacheRead":20,"cacheWrite":10,"reasoning":5,"totalTokens":185,"cost":{"input":0.12,"output":0.06,"cacheRead":0.01,"cacheWrite":0.01,"total":0.2}},"compactionCount":1,"exportedEnvironment":["PI_DADDY_EPISODE","PI_DADDY_DEFINITION","PI_DADDY_EXECUTION"],"definitionHash":"7777777777777777777777777777777777777777777777777777777777777777","definitionPackageVersion":"2.3.1","correlation":{"schema_version":"1.0","run_id":"run-contract-001","task_id":"task-contract-001","workspace_id":"workspace-contract","context_id":"context-contract","phase":"verify","assurance":"critical","assurance_effective":"critical","policy_label":"policy-contract","assurance_source":"policy","assurance_scope":{"type":"selectors","selectors":["src/**"]},"activated_at":"2026-08-20T12:00:00.000Z","plan_digest":"1111111111111111111111111111111111111111111111111111111111111111","definition_digest":"2222222222222222222222222222222222222222222222222222222222222222","task_digest":"3333333333333333333333333333333333333333333333333333333333333333","base_sha":"4444444444444444444444444444444444444444","head_sha":"5555555555555555555555555555555555555555","tree_sha":"6666666666666666666666666666666666666666","event_seq":21,"last_change_seq":18,"last_authority_seq":20,"check_receipt_id":"7777777777777777777777777777777777777777777777777777777777777777"}},"digest":"c13fc25e8a93c853be54ecebcaf4e9a2d6137bd1c37cc5655d33c71da3877cad"}
@@ -0,0 +1,14 @@
1
+ {
2
+ "ledgerVersion": 3,
3
+ "event": "session_config",
4
+ "ts": "2026-08-20T12:00:02.750Z",
5
+ "episodeId": "episode:00000000-0000-4000-8000-000000000099",
6
+ "outcome": "changed",
7
+ "trigger": "first-delegation",
8
+ "overrides": {
9
+ "review": {
10
+ "model": "anthropic/claude-opus-4-6",
11
+ "thinking": "high"
12
+ }
13
+ }
14
+ }