loopforge 3.9.4 → 4.0.7

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 (283) hide show
  1. package/README.md +236 -112
  2. package/dist/audit.d.ts +73 -15
  3. package/dist/audit.d.ts.map +1 -1
  4. package/dist/audit.js +131 -61
  5. package/dist/audit.js.map +1 -1
  6. package/dist/canonical-state.d.ts +114 -40
  7. package/dist/canonical-state.d.ts.map +1 -1
  8. package/dist/canonical-state.js +276 -182
  9. package/dist/canonical-state.js.map +1 -1
  10. package/dist/cli.d.ts.map +1 -1
  11. package/dist/cli.js +41 -12
  12. package/dist/cli.js.map +1 -1
  13. package/dist/cognitive-governance.d.ts +0 -2
  14. package/dist/cognitive-governance.d.ts.map +1 -1
  15. package/dist/cognitive-governance.js +0 -4
  16. package/dist/cognitive-governance.js.map +1 -1
  17. package/dist/committed-round.d.ts +97 -156
  18. package/dist/committed-round.d.ts.map +1 -1
  19. package/dist/committed-round.js +223 -419
  20. package/dist/committed-round.js.map +1 -1
  21. package/dist/constraint-lifecycle.d.ts +73 -0
  22. package/dist/constraint-lifecycle.d.ts.map +1 -0
  23. package/dist/constraint-lifecycle.js +174 -0
  24. package/dist/constraint-lifecycle.js.map +1 -0
  25. package/dist/context-boundary.d.ts +83 -0
  26. package/dist/context-boundary.d.ts.map +1 -0
  27. package/dist/context-boundary.js +101 -0
  28. package/dist/context-boundary.js.map +1 -0
  29. package/dist/contract-items.d.ts +12 -8
  30. package/dist/contract-items.d.ts.map +1 -1
  31. package/dist/contract-items.js +31 -26
  32. package/dist/contract-items.js.map +1 -1
  33. package/dist/contract-requirement.d.ts +47 -0
  34. package/dist/contract-requirement.d.ts.map +1 -0
  35. package/dist/contract-requirement.js +51 -0
  36. package/dist/contract-requirement.js.map +1 -0
  37. package/dist/criterion-status.d.ts +35 -0
  38. package/dist/criterion-status.d.ts.map +1 -0
  39. package/dist/criterion-status.js +89 -0
  40. package/dist/criterion-status.js.map +1 -0
  41. package/dist/enforcement-gate.d.ts +26 -38
  42. package/dist/enforcement-gate.d.ts.map +1 -1
  43. package/dist/enforcement-gate.js +196 -319
  44. package/dist/enforcement-gate.js.map +1 -1
  45. package/dist/engine.d.ts +9 -103
  46. package/dist/engine.d.ts.map +1 -1
  47. package/dist/engine.js +27 -897
  48. package/dist/engine.js.map +1 -1
  49. package/dist/errors.d.ts +41 -0
  50. package/dist/errors.d.ts.map +1 -0
  51. package/dist/errors.js +69 -0
  52. package/dist/errors.js.map +1 -0
  53. package/dist/evidence-claims.d.ts +33 -31
  54. package/dist/evidence-claims.d.ts.map +1 -1
  55. package/dist/evidence-claims.js +58 -72
  56. package/dist/evidence-claims.js.map +1 -1
  57. package/dist/evidence-posture-view.d.ts +19 -0
  58. package/dist/evidence-posture-view.d.ts.map +1 -0
  59. package/dist/evidence-posture-view.js +116 -0
  60. package/dist/evidence-posture-view.js.map +1 -0
  61. package/dist/evidence-posture.d.ts +73 -0
  62. package/dist/evidence-posture.d.ts.map +1 -0
  63. package/dist/evidence-posture.js +281 -0
  64. package/dist/evidence-posture.js.map +1 -0
  65. package/dist/evidence-provider.d.ts +55 -37
  66. package/dist/evidence-provider.d.ts.map +1 -1
  67. package/dist/evidence-provider.js +182 -332
  68. package/dist/evidence-provider.js.map +1 -1
  69. package/dist/explain.d.ts +166 -27
  70. package/dist/explain.d.ts.map +1 -1
  71. package/dist/explain.js +372 -58
  72. package/dist/explain.js.map +1 -1
  73. package/dist/field-accounting.d.ts.map +1 -1
  74. package/dist/field-accounting.js +3 -22
  75. package/dist/field-accounting.js.map +1 -1
  76. package/dist/generate-schema.js +13 -8
  77. package/dist/generate-schema.js.map +1 -1
  78. package/dist/git-boundary.d.ts +128 -0
  79. package/dist/git-boundary.d.ts.map +1 -0
  80. package/dist/git-boundary.js +625 -0
  81. package/dist/git-boundary.js.map +1 -0
  82. package/dist/git-facts.d.ts +22 -0
  83. package/dist/git-facts.d.ts.map +1 -0
  84. package/dist/git-facts.js +29 -0
  85. package/dist/git-facts.js.map +1 -0
  86. package/dist/git-motion.d.ts +37 -0
  87. package/dist/git-motion.d.ts.map +1 -0
  88. package/dist/git-motion.js +59 -0
  89. package/dist/git-motion.js.map +1 -0
  90. package/dist/history.d.ts +44 -0
  91. package/dist/history.d.ts.map +1 -0
  92. package/dist/history.js +77 -0
  93. package/dist/history.js.map +1 -0
  94. package/dist/index.d.ts +19 -9
  95. package/dist/index.d.ts.map +1 -1
  96. package/dist/index.js +12 -4
  97. package/dist/index.js.map +1 -1
  98. package/dist/init.d.ts +16 -0
  99. package/dist/init.d.ts.map +1 -1
  100. package/dist/init.js +80 -14
  101. package/dist/init.js.map +1 -1
  102. package/dist/loop-compiler.d.ts +39 -23
  103. package/dist/loop-compiler.d.ts.map +1 -1
  104. package/dist/loop-compiler.js +368 -565
  105. package/dist/loop-compiler.js.map +1 -1
  106. package/dist/loop-store.d.ts +6 -5
  107. package/dist/loop-store.d.ts.map +1 -1
  108. package/dist/loop-store.js +153 -35
  109. package/dist/loop-store.js.map +1 -1
  110. package/dist/mcp/round-lifecycle.d.ts +255 -81
  111. package/dist/mcp/round-lifecycle.d.ts.map +1 -1
  112. package/dist/mcp/round-lifecycle.js +1552 -539
  113. package/dist/mcp/round-lifecycle.js.map +1 -1
  114. package/dist/mcp/server.d.ts.map +1 -1
  115. package/dist/mcp/server.js +42 -18
  116. package/dist/mcp/server.js.map +1 -1
  117. package/dist/mcp/session.d.ts +81 -39
  118. package/dist/mcp/session.d.ts.map +1 -1
  119. package/dist/mcp/session.js +956 -282
  120. package/dist/mcp/session.js.map +1 -1
  121. package/dist/mcp/submission-boundary.d.ts +23 -31
  122. package/dist/mcp/submission-boundary.d.ts.map +1 -1
  123. package/dist/mcp/submission-boundary.js +242 -92
  124. package/dist/mcp/submission-boundary.js.map +1 -1
  125. package/dist/mcp/submission-handle.d.ts +66 -0
  126. package/dist/mcp/submission-handle.d.ts.map +1 -0
  127. package/dist/mcp/submission-handle.js +173 -0
  128. package/dist/mcp/submission-handle.js.map +1 -0
  129. package/dist/mcp/tools.d.ts +17 -7
  130. package/dist/mcp/tools.d.ts.map +1 -1
  131. package/dist/mcp/tools.js +707 -244
  132. package/dist/mcp/tools.js.map +1 -1
  133. package/dist/open-question.d.ts +7 -0
  134. package/dist/open-question.d.ts.map +1 -0
  135. package/dist/open-question.js +14 -0
  136. package/dist/open-question.js.map +1 -0
  137. package/dist/policy-metrics.d.ts +31 -21
  138. package/dist/policy-metrics.d.ts.map +1 -1
  139. package/dist/policy-metrics.js +117 -64
  140. package/dist/policy-metrics.js.map +1 -1
  141. package/dist/policy.d.ts +11 -39
  142. package/dist/policy.d.ts.map +1 -1
  143. package/dist/policy.js +12 -12
  144. package/dist/policy.js.map +1 -1
  145. package/dist/progress.d.ts +45 -0
  146. package/dist/progress.d.ts.map +1 -0
  147. package/dist/progress.js +136 -0
  148. package/dist/progress.js.map +1 -0
  149. package/dist/prompt-assembler.d.ts +20 -6
  150. package/dist/prompt-assembler.d.ts.map +1 -1
  151. package/dist/prompt-assembler.js +475 -479
  152. package/dist/prompt-assembler.js.map +1 -1
  153. package/dist/prompt-coverage.d.ts +0 -6
  154. package/dist/prompt-coverage.d.ts.map +1 -1
  155. package/dist/prompt-coverage.js +4 -8
  156. package/dist/prompt-coverage.js.map +1 -1
  157. package/dist/prompt-freshness.d.ts +6 -17
  158. package/dist/prompt-freshness.d.ts.map +1 -1
  159. package/dist/prompt-freshness.js +27 -22
  160. package/dist/prompt-freshness.js.map +1 -1
  161. package/dist/prompt-policy.d.ts +14 -7
  162. package/dist/prompt-policy.d.ts.map +1 -1
  163. package/dist/prompt-policy.js +21 -5
  164. package/dist/prompt-policy.js.map +1 -1
  165. package/dist/protocol.d.ts +843 -424
  166. package/dist/protocol.d.ts.map +1 -1
  167. package/dist/protocol.js +73 -102
  168. package/dist/protocol.js.map +1 -1
  169. package/dist/recovery-guidance.d.ts +13 -0
  170. package/dist/recovery-guidance.d.ts.map +1 -0
  171. package/dist/recovery-guidance.js +15 -0
  172. package/dist/recovery-guidance.js.map +1 -0
  173. package/dist/recovery.d.ts +68 -0
  174. package/dist/recovery.d.ts.map +1 -0
  175. package/dist/recovery.js +234 -0
  176. package/dist/recovery.js.map +1 -0
  177. package/dist/replay.d.ts +42 -8
  178. package/dist/replay.d.ts.map +1 -1
  179. package/dist/replay.js +311 -84
  180. package/dist/replay.js.map +1 -1
  181. package/dist/result-facts.d.ts +45 -0
  182. package/dist/result-facts.d.ts.map +1 -0
  183. package/dist/result-facts.js +86 -0
  184. package/dist/result-facts.js.map +1 -0
  185. package/dist/round-contract.d.ts +38 -8
  186. package/dist/round-contract.d.ts.map +1 -1
  187. package/dist/round-contract.js +71 -31
  188. package/dist/round-contract.js.map +1 -1
  189. package/dist/round-coordinator.d.ts +41 -89
  190. package/dist/round-coordinator.d.ts.map +1 -1
  191. package/dist/round-coordinator.js +250 -267
  192. package/dist/round-coordinator.js.map +1 -1
  193. package/dist/round-driver.d.ts +56 -16
  194. package/dist/round-driver.d.ts.map +1 -1
  195. package/dist/round-driver.js +225 -39
  196. package/dist/round-driver.js.map +1 -1
  197. package/dist/round-facts.d.ts +33 -52
  198. package/dist/round-facts.d.ts.map +1 -1
  199. package/dist/round-facts.js +51 -160
  200. package/dist/round-facts.js.map +1 -1
  201. package/dist/round-guidance.d.ts +56 -0
  202. package/dist/round-guidance.d.ts.map +1 -0
  203. package/dist/round-guidance.js +161 -0
  204. package/dist/round-guidance.js.map +1 -0
  205. package/dist/round-outcome.d.ts +21 -0
  206. package/dist/round-outcome.d.ts.map +1 -0
  207. package/dist/round-outcome.js +31 -0
  208. package/dist/round-outcome.js.map +1 -0
  209. package/dist/round-transaction.d.ts +168 -21
  210. package/dist/round-transaction.d.ts.map +1 -1
  211. package/dist/round-transaction.js +837 -38
  212. package/dist/round-transaction.js.map +1 -1
  213. package/dist/self-eval.d.ts +37 -61
  214. package/dist/self-eval.d.ts.map +1 -1
  215. package/dist/self-eval.js +413 -392
  216. package/dist/self-eval.js.map +1 -1
  217. package/dist/storage.d.ts +16 -0
  218. package/dist/storage.d.ts.map +1 -1
  219. package/dist/storage.js +54 -4
  220. package/dist/storage.js.map +1 -1
  221. package/dist/subgoal-state.d.ts +2 -3
  222. package/dist/subgoal-state.d.ts.map +1 -1
  223. package/dist/subgoal-state.js +2 -3
  224. package/dist/subgoal-state.js.map +1 -1
  225. package/dist/submission-guidance.d.ts +29 -21
  226. package/dist/submission-guidance.d.ts.map +1 -1
  227. package/dist/submission-guidance.js +308 -260
  228. package/dist/submission-guidance.js.map +1 -1
  229. package/dist/submission-receipt.d.ts +16 -8
  230. package/dist/submission-receipt.d.ts.map +1 -1
  231. package/dist/submission-receipt.js +145 -51
  232. package/dist/submission-receipt.js.map +1 -1
  233. package/dist/token-utils.d.ts +28 -7
  234. package/dist/token-utils.d.ts.map +1 -1
  235. package/dist/token-utils.js +27 -11
  236. package/dist/token-utils.js.map +1 -1
  237. package/dist/transaction-identity.d.ts +9 -0
  238. package/dist/transaction-identity.d.ts.map +1 -0
  239. package/dist/transaction-identity.js +69 -0
  240. package/dist/transaction-identity.js.map +1 -0
  241. package/dist/verification-actions.d.ts.map +1 -1
  242. package/dist/verification-actions.js +10 -11
  243. package/dist/verification-actions.js.map +1 -1
  244. package/dist/verification-gate.d.ts +23 -47
  245. package/dist/verification-gate.d.ts.map +1 -1
  246. package/dist/verification-gate.js +202 -423
  247. package/dist/verification-gate.js.map +1 -1
  248. package/dist/version.d.ts +1 -1
  249. package/dist/version.js +1 -1
  250. package/dist/working-memory.d.ts +187 -0
  251. package/dist/working-memory.d.ts.map +1 -0
  252. package/dist/working-memory.js +767 -0
  253. package/dist/working-memory.js.map +1 -0
  254. package/dist/workspace-checkpoint.d.ts +88 -0
  255. package/dist/workspace-checkpoint.d.ts.map +1 -0
  256. package/dist/workspace-checkpoint.js +326 -0
  257. package/dist/workspace-checkpoint.js.map +1 -0
  258. package/dist/workspace-restore.d.ts +68 -0
  259. package/dist/workspace-restore.d.ts.map +1 -0
  260. package/dist/workspace-restore.js +604 -0
  261. package/dist/workspace-restore.js.map +1 -0
  262. package/dist/workspace.d.ts +0 -9
  263. package/dist/workspace.d.ts.map +1 -1
  264. package/dist/workspace.js +0 -17
  265. package/dist/workspace.js.map +1 -1
  266. package/loop_policy.json +4 -18
  267. package/package.json +68 -68
  268. package/skills/forge/SKILL.md +212 -0
  269. package/skills/forge/references/evidence-and-contracts.md +204 -0
  270. package/skills/forge/references/recovery-and-views.md +188 -0
  271. package/dist/cognitive-facts.d.ts +0 -30
  272. package/dist/cognitive-facts.d.ts.map +0 -1
  273. package/dist/cognitive-facts.js +0 -113
  274. package/dist/cognitive-facts.js.map +0 -1
  275. package/dist/loop-extras-parser.d.ts +0 -81
  276. package/dist/loop-extras-parser.d.ts.map +0 -1
  277. package/dist/loop-extras-parser.js +0 -213
  278. package/dist/loop-extras-parser.js.map +0 -1
  279. package/dist/loop-projection.d.ts +0 -6
  280. package/dist/loop-projection.d.ts.map +0 -1
  281. package/dist/loop-projection.js +0 -28
  282. package/dist/loop-projection.js.map +0 -1
  283. package/skills/perception/SKILL.md +0 -389
package/README.md CHANGED
@@ -1,18 +1,19 @@
1
- # LoopForge package
1
+ # LoopForge
2
2
 
3
- The `loopforge` package is the TypeScript runtime behind LoopForge. It keeps
4
- round state durable, collects machine evidence, verifies submitted claims, and
5
- compiles the next prompt. The external coding Agent still owns planning, file
6
- changes, tool use, and execution.
3
+ LoopForge is durable round infrastructure for coding agents. It records which
4
+ rounds were committed, keeps machine observations with those records, and
5
+ prepares each next prompt from committed state. The external agent retains
6
+ control of task interpretation, planning, workspace changes, and recovery
7
+ choices.
7
8
 
8
- For the product model and the contract mental model, read the
9
- [root README](../README.md) or [中文说明](../README.zh-CN.md). This document is
10
- the package and integration reference.
9
+ The package runs as an MCP server or as a TypeScript library. It requires
10
+ Node.js 18 or newer and has zero runtime dependencies. The version in
11
+ `package.json` is the package version source.
11
12
 
12
- **Requirements:** Node.js >= 18. Zero runtime dependencies. The package version
13
- is defined only by the `version` field in `package.json`.
13
+ For the product rationale and responsibility boundary, see the
14
+ [project README](../README.md) or [Chinese overview](../README.zh-CN.md).
14
15
 
15
- ## Install and run
16
+ ## Install and connect
16
17
 
17
18
  ```bash
18
19
  npm install -g loopforge
@@ -20,7 +21,8 @@ loopforge init --client claude
20
21
  claude mcp add loopforge -- npx loopforge mcp
21
22
  ```
22
23
 
23
- The CLI provides the following entry points:
24
+ `loopforge init` supports `claude`, `codex`, and `generic` clients. The CLI
25
+ entry points are:
24
26
 
25
27
  ```text
26
28
  loopforge mcp [--workspace DIR]
@@ -30,133 +32,255 @@ loopforge inspect LOOP_ID [--round N] [--prompt] [--json]
30
32
  loopforge explain LOOP_ID [--round N] [--json]
31
33
  ```
32
34
 
33
- `loopforge mcp` starts the synchronous MCP server. `init` installs the client
34
- configuration, `doctor` reports local readiness, `inspect` reads persisted loop
35
- state, and `explain` shows why a committed round received its disposition.
36
-
37
- The two directory flags answer different questions and are not
38
- interchangeable:
39
-
40
- - `--target DIR` is where the **client skill** is installed
41
- (`DIR/perception/SKILL.md`). Without it, the skill goes to the client's own
42
- skills directory.
43
- - `--workspace DIR` is the **runtime boundary**: `loop_policy.json`,
44
- `.loopforge/`, evidence commands, and every workspace check resolve against
45
- it. Without it, the current directory is used.
46
-
47
- `loopforge mcp --workspace DIR` switches to that directory before the server
48
- reads its policy or resolves its store root, which is why the policy it uses is
49
- always the one in the workspace it was started against.
50
-
51
- ## MCP integration
52
-
53
- The MCP server exposes nine tools:
54
-
55
- - `loopforge_start` creates a session and returns the first prompt.
56
- - `loopforge_next` submits the structured evaluation for the held round.
57
- - `loopforge_status` returns session, loop, audit, or explain views.
58
- - `loopforge_stop` intentionally stops a session.
59
- - `loopforge_pause` pauses a session at a round boundary.
60
- - `loopforge_resume` reconstructs a durable session.
61
- - `loopforge_replay` reads the committed timeline and round diffs.
62
- - `loopforge_gate_check` preflights a high-risk action.
63
- - `loopforge_gate_resolve` records the decision for an opened user gate.
64
-
65
- The two gate tools are opt-in through `policy.gate.enabled` and are hidden from
66
- `tools/list` when disabled. A gate decision is an auditable process record. It
67
- does not prove that a human was present because the Agent submits the resolve
68
- call.
69
-
70
- Every `loopforge_next` submission must include the four strict evaluation
71
- fields: `success`, `output_summary`, `constraint_violations`, and
72
- `should_continue`. `round_contract`, `subgoal_updates`, and
73
- `execution_report.contract_item_claims` are also strict structural boundaries.
74
- Malformed payloads return a retryable error for the same `roundId` without
75
- writing session state, a round, gate records, rejection counters, or metrics.
76
- Agent reports remain claims. Only independent observations can support a
77
- verified fact.
78
-
79
- Prepared responses carry `submission_guidance` with the real contract item and
80
- sub-goal ids, real criterion ids/text, usable commands and the fields that apply
81
- now. The prompt's evaluation block uses a compact trigger checklist rather than
82
- a field catalog; omitting an optional field whose event did not happen remains
83
- correct. Each submission returns `submission_receipt`, which separates saved
84
- reports, derived-state effects and machine verification; a rejected attempt is
85
- never shown as applied. `execution_report.files_changed` is the boundary net
86
- change from round preparation, including deletions — a commit alone adds no
87
- entry when content is unchanged. The receipt's `files_reconciliation` compares
88
- the report with the derived round delta's `changedFiles`; raw observation
89
- `files` is display data only. A missing or unobservable boundary is `null`,
90
- never the dirty list and never an empty diff. A worker's
91
- `discoveredConstraints` stays a report; only top-level `discovered_constraints`
92
- promotes it into the active set. Unknown or retired optional fields are
93
- diagnosed and dropped, never silently accepted; field metrics separate
94
- attempted from retained values. A success claim with an empty report is a
95
- reporting gap (warn), not an acceptance gate.
35
+ `mcp` starts the synchronous JSON-RPC server over stdio. `doctor` checks local
36
+ readiness and configured evidence capabilities without running evidence
37
+ commands. `inspect` reads stored state, and `explain` shows why a committed
38
+ round received its disposition.
39
+
40
+ `--target` selects where the Forge skill directory is installed. `--workspace`
41
+ selects the runtime boundary for policy, storage, evidence commands, and
42
+ workspace checks. If omitted, the current directory is used. A normal `init`
43
+ leaves an existing Forge skill untouched; if the installed files differ from
44
+ the packaged skill (for example after an upgrade), `init` reports `Stale:` and
45
+ `loopforge doctor` warns, but neither overwrites your tree. `--force` replaces
46
+ the package-owned skill tree (including its `references/` files).
47
+
48
+ ## MCP workflow
49
+
50
+ The core loop is `loopforge_start` followed by `loopforge_next` for each held
51
+ round. Every response that holds a round returns a `submissionHandle` and the
52
+ durable `loopId`; keep both. Pass the handle unchanged to `loopforge_next`,
53
+ `loopforge_checkpoint`, and `loopforge_gate_check`. Never edit or reconstruct
54
+ it. A rejection keeps the logical round but returns a new handle; an invalid
55
+ evaluation keeps the same handle. A stale handle never submits work: if only the
56
+ handle was lost while the current prompt is still in context, re-anchor it with
57
+ `loopforge_status` using the live `sessionId` or durable `loopId`; if the prompt
58
+ was also lost, or status reports no live session or no current handle, use
59
+ `loopforge_resume` with the `loopId`. After a process restart,
60
+ `loopforge_resume` requires the `loopId` (not `sessionId`).
61
+ A submission is either an evaluation or an Agent-requested recovery, never
62
+ both. Invalid core fields can be corrected for the same round without
63
+ committing that attempt.
64
+
65
+ Every returned prompt declares its derived context strategy in the header.
66
+ `fresh_invocation` is clean context: the host starts a new model conversation,
67
+ so the previous model transcript, tool outputs and uncommitted reasoning are
68
+ not carried. It is not a host-runtime restart requirement and not a workspace
69
+ reset: the same `loopId`, logical session and current modified workspace
70
+ continue, and a host process that stays alive may keep the MCP connection and
71
+ tool processes warm and the installed skill files available. LoopForge does not
72
+ manage provider prompt/KV caches or implicit Agent habits; continuity that must
73
+ survive belongs in the prompt's committed projection, and host-side state
74
+ outside it is explicit host configuration, not a LoopForge fact.
75
+ `fresh_invocation` is used for the first round, the next round, recovery redo,
76
+ rejection escalation and invocation recovery, and may describe the SAME logical
77
+ round. `same_round_retry` (in-context repair) continues the original invocation
78
+ with the failure lessons injected. If that invocation is gone, call
79
+ `loopforge_resume` with `invocationLost: true`: LoopForge recompiles the SAME
80
+ round and attempt as `fresh_invocation` / `invocation_recovery` at L2, with
81
+ Machine Evidence, bounded Working Memory and the rejection lessons. Prompt
82
+ density and context boundary are independent; use the returned `contextMode`
83
+ and `contextReason` at any L0/L1/L2 density. Only recovery restores a
84
+ checkpoint.
85
+
86
+ ### Host invocation contract
87
+
88
+ A clean context is a model-conversation boundary, not a host restart. The host
89
+ may keep its MCP connection, tool processes, installed skill files and modified
90
+ workspace warm across invocations; it must start a clean model conversation and
91
+ must not carry the previous transcript, tool logs or uncommitted reasoning into
92
+ it. A warm runtime is not model memory: the new conversation knows only what
93
+ the prompt and the host's stable environment provide. LoopForge does not manage
94
+ provider prompt/KV caches or infer Agent habits; only committed facts and the
95
+ bounded projections LoopForge returns are guaranteed. Anything else that must
96
+ survive belongs to explicit host configuration.
97
+
98
+ ### Stable environment vs per-round payload
99
+
100
+ An adapter can treat the MCP `initialize` result's `instructions`, the
101
+ `tools/list` schemas and the installed skill files as the stable environment,
102
+ and each `loopforge_start` / `loopforge_next` / `loopforge_resume` prompt plus
103
+ `submission_guidance` and `submissionHandle` as the per-round payload. Reuse the
104
+ stable environment while the LoopForge version, tool list and policy are
105
+ unchanged; refresh it when they change. A kept-warm runtime must not carry
106
+ execution-affecting mutable state (for example shell variables or REPL values)
107
+ into a new round; the adapter isolates or resets that state. A cache miss must
108
+ never change round governance.
109
+
110
+ `loopforge_next` and `loopforge_resume` accept an optional
111
+ `currentUserInstruction`. It is host input for that invocation and never
112
+ rewrites the loop task, objective, criteria, constraints or Round Contract;
113
+ omitting it makes the prompt state that none was provided.
114
+
115
+ Round results keep three kinds of facts separate: the **Agent report**
116
+ (`success_claim`, `outcome`, `blocker`), the **LoopForge decision** (`action`,
117
+ `loop_stop_reason`, `enforcement_reason`), and the persisted **Machine
118
+ evidence** (the round's `evidencePosture`). Explain, a terminal `stopDetail` and
119
+ `resume` of a stopped loop render the same blocks. `completed` means the Agent's
120
+ stop declaration passed the gates; it does not imply machine-backed success.
121
+ `outcome` is the Agent's ONE round conclusion; there is no separate Agent stop
122
+ reason, and `blocker` is its text explanation.
123
+
124
+ A clean-context prompt carries compact Machine Evidence (the previous committed
125
+ round's evidence posture: workspace/change counts, provider and command
126
+ statuses, contract item statuses, and stable finding ids) plus bounded Working
127
+ Memory compiled from committed reports, assumptions, open questions, consumed
128
+ recoveries, and contract redirects. Machine Evidence is protected and informs
129
+ verification. Working Memory is optional, indivisible, and may be dropped whole
130
+ if the prompt budget cannot fit it; the artifact records whether it rendered
131
+ and its source/rendered/omitted counts. L1 and L2 include the same full fixed
132
+ Working Memory projection, while L0 remains compact. The default prompt
133
+ ceilings are 5,000 / 50,000 / 100,000 characters for L0 / L1 / L2. They are
134
+ safety ceilings, not targets for routine memory omission. Working Memory is
135
+ derived from the canonical state, never a second history, and does not feed a
136
+ gate. Older history is available through `loopforge_replay` (`start`/`end`;
137
+ default last 10 committed positions, at most 50 in an explicit window) and
138
+ `loopforge_status view: "explain"`.
139
+
140
+ The four required evaluation fields are `outcome`, `output_summary`,
141
+ `constraint_violations`, and `should_continue`. They are the Agent's report,
142
+ not evidence. `outcome` is one of `success | partial | failed | blocked`;
143
+ `success` requires `should_continue=false`, and `blocked` additionally requires
144
+ a non-empty `blocker`. Optional fields let the Agent report events such as
145
+ changed files, discovered constraints, and one `execution_report.claims`
146
+ channel (`cr-` criterion claims are advisory, `rci-` active-contract item
147
+ claims are strict). `objective_refinement` evolves only the overall working
148
+ objective; it never changes operator acceptance, criteria or hard constraints.
149
+ `subtask_boundary` / `subtask_boundary_label` declare an L2 rehydration boundary;
150
+ they are not a workspace checkpoint. `retroactiveClaims` remains a separate
151
+ free-text claim channel checked against a prior round's Git evidence. LoopForge returns guidance with the real references and
152
+ currently applicable fields, plus a receipt that distinguishes saved reports
153
+ from derived effects and machine verification. Read surfaces use
154
+ `agentSuccessClaim`/`agentOutcome` for the Agent's claim and
155
+ `evidencePosture`/`machineBackedSuccess` for machine facts; they are never
156
+ merged. Optional fields are not a completion checklist.
157
+
158
+ The server also provides status, stop, pause, resume, and replay tools. Two gate
159
+ tools are available only when `policy.gate.enabled` is true. See the MCP tool
160
+ schemas for exact input and output shapes.
161
+
162
+ ## Evidence and contracts
163
+
164
+ Configured observations and commands let LoopForge compare Agent reports with
165
+ machine-visible facts. Git observes the complete tracked and non-ignored
166
+ untracked workspace boundary. Explicitly configured commands run with an
167
+ executable and argument list, without a shell, and are restricted to the
168
+ workspace. Command evidence is disabled by default. Unavailable or unknown
169
+ observations remain unknown; they are not treated as a pass or an empty diff.
170
+
171
+ An Agent may propose a Round Contract for a bounded deliverable. Its acceptance
172
+ items bind to configured verification commands. LoopForge validates the
173
+ structure, references, and bindings; the Agent's optional `scope` is a
174
+ report-only intent statement (drift is an info fact, not a rejection). An item
175
+ becomes verified when the Agent claims it is met and all bound commands pass in
176
+ the closing round with the declared binding intact. A command disabled or
177
+ reconfigured later does not rewrite that historical observation; only command
178
+ observations are test facts, never an Agent-reported test count. LoopForge does
179
+ not judge whether the deliverable or its tests are semantically appropriate.
180
+
181
+ With an after-capable command configured, a continuing round that has a
182
+ successor available must leave an ACTIVE contract for the next round: omit
183
+ `round_contract` to continue the current contract, or declare the next slice.
184
+ The Agent decides whether the current logical round ends through
185
+ `should_continue`; a contract scopes the successor round's bounded work and
186
+ acceptance conditions. It does not decide the round boundary. `maxRounds` is
187
+ LoopForge's hard stop.
188
+ The final configured round has no successor consumer, so it may omit the
189
+ proposal even when the Agent reports `should_continue=true`; LoopForge then
190
+ stops at the configured round limit. A different proposal while the
191
+ contract is open is rejected as `contract_premature` unless it carries
192
+ `round_contract.supersedes` targeting the exact active `rc-*` id; a successor
193
+ for a closed contract must change the acceptance items or it is rejected as
194
+ `contract_successor_unchanged`. Stopping and blocked rounds cannot leave a
195
+ proposal (`contract_on_stop`). The old contract closes as `superseded`; its item
196
+ statuses remain in audit/explain, the workspace is not restored, and the
197
+ redirect round cannot be `completed`. A stale target or unchanged items is
198
+ `contract_invalid`. `scope` is report-only and, like `supersedes`, never
199
+ participates in `rc-*` identity.
200
+
201
+ Progress is a Git workspace fact with an explicit coverage range. The stall rule
202
+ and prompt freshness consume only that fixed coverage. A custom observation is
203
+ an ordinary report: it is shown in replay and explain as raw observation data,
204
+ but it cannot supply a progress fact or affect stall, freshness, or any other
205
+ decision.
206
+
207
+ ## Recovery and durable history
208
+
209
+ The Agent may request recovery to a workspace checkpoint: the automatic
210
+ before-image of a prepared round or an explicit mid-round savepoint created with
211
+ `loopforge_checkpoint`. LoopForge resolves the checkpoint through the current
212
+ branch's transaction refs, records a rollback directive, then executes and
213
+ verifies the restore itself against the manifest's complete Git boundary and
214
+ recorded HEAD. Only after verification does it issue the redo prompt; a failed
215
+ restore leaves the directive pending and the session resumable. LoopForge does
216
+ not choose the target or interpret the Agent's reason. Machine-triggered
217
+ backtracks use the same restore protocol. Redo uses a child branch and is
218
+ excluded from the active branch history. The directive preserves the abandoned
219
+ approaches, wrong assumptions, machine-observed vs Agent-reported skipped
220
+ files, compact trigger findings and the Recovery Brief; the Brief states the
221
+ real restore marker (or `restore NOT verified`). A same-round redo replaces
222
+ that numeric round's feedback slot, so the abandoned evaluation is not retained
223
+ as a second copy. Explain, replay, audit and the receipt expose the committed
224
+ checkpoints/restore marker and the directive digest.
225
+
226
+ Committed typed round documents in the Vault are the factual source.
227
+ `CommittedRoundView` is the shared history read model, and `CanonicalLoopState`
228
+ is compiled from committed facts. Prompts, status views, replay, audit, explain,
229
+ and the optional state file are read or derived views. The state file is
230
+ regenerable and is not a second source of truth.
231
+
232
+ The prompt contains current governance facts, compact Machine Evidence, and a
233
+ bounded Agent-report Working Memory. It is not a replay of external memory or
234
+ an unbounded conversation summary. LoopForge does not execute the coding task,
235
+ automatically plan or decompose it, or guarantee task completion.
96
236
 
97
237
  ## TypeScript API
98
238
 
99
- The package exports the runtime in separate entry points:
239
+ The package exposes these entry points:
100
240
 
101
241
  ```text
102
- loopforge protocol types, policy, store, compiler, engine, evidence,
103
- transactions, metrics, and MCP classes
104
- loopforge/compiler compiler helpers
105
- loopforge/replay ReplayBackend
242
+ loopforge engine, protocol, policy, storage, compiler, evidence, MCP
243
+ loopforge/compiler prompt compiler helpers
244
+ loopforge/replay read-only ReplayBackend
106
245
  loopforge/mcp MCP server entry point
107
246
  ```
108
247
 
109
- The main exports include `createEngine` and `LoopForgeEngine` for an in-process
110
- engine, `FileLoopStore` for durable JSON storage, `compileLoop` for compiling a
111
- prompt from committed facts, `ReplayBackend` for read-only history queries,
112
- `McpServer` for the MCP transport, and `SessionManager` for durable MCP
113
- sessions. Type declarations are emitted alongside the runtime in `dist/`.
114
-
115
- Example import:
248
+ The main entry exports `createEngine`, `LoopForgeEngine`, `FileLoopStore`,
249
+ `compileLoop`, `ReplayBackend`, `McpServer`, `SessionManager`, and protocol
250
+ types. Type declarations are emitted in `dist/`.
116
251
 
117
252
  ```ts
118
253
  import { createEngine, FileLoopStore, compileLoop } from "loopforge";
119
254
  ```
120
255
 
121
- Use the generated `.d.ts` files in `dist/` for the exact signatures and input
122
- types. The public protocol constructors and types are exported from the main
123
- entry point.
124
-
125
- ## Persistence and policy
256
+ Use the generated declarations for exact signatures and input types.
126
257
 
127
- LoopForge stores durable loop data under `.loopforge/loops/` and derived human
128
- state under `.loopforge/state/`. Committed typed round documents are the source
129
- of truth. The state file can be regenerated and must not be treated as a second
130
- history.
258
+ ## Policy and storage
131
259
 
132
- Runtime behavior is controlled by `loop_policy.json`, read from the workspace
133
- the process was started in. Evidence commands are explicitly configured, run
134
- without a shell, and restricted to the workspace. The default policy keeps the
135
- optional user gate disabled.
260
+ Runtime policy is read from `loop_policy.json` in the selected workspace. A
261
+ missing file uses defaults; a present but invalid file is reported as
262
+ `policy_invalid`. Durable loop data is stored under `.loopforge/loops/`, with
263
+ regenerable state views under `.loopforge/state/`.
136
264
 
137
- A **missing** policy file is normal: the defaults apply. A file that exists but
138
- cannot be read or parsed is reported as `policy_invalid` with its path rather
139
- than silently ignored — a configuration nobody chose must not look like a
140
- working one. `loopforge doctor` reports the policy, the store root, provider
141
- registration, every configured command's static validity, and the current
142
- evidence posture; it never executes a command.
265
+ Evidence commands are explicitly configured and disabled by default. The
266
+ optional user gate is also disabled by default. `loopforge doctor` reports
267
+ policy validity, storage readiness, provider registration, command
268
+ configuration, and evidence posture; it does not execute commands.
143
269
 
144
270
  ## Development
145
271
 
146
- Run these commands from this directory:
272
+ Run from this directory:
147
273
 
148
274
  ```bash
149
275
  npm run check
150
276
  npm run build
151
277
  npm test
152
- npm pack --dry-run --json
153
278
  npm run verify:artifacts
154
- git diff --check
155
279
  ```
156
280
 
157
- The build generates `../loopforge-protocol.json` and `dist/`. Change protocol
158
- types in `src/protocol.ts` first, then run the build. Do not edit generated
159
- artifacts by hand.
281
+ The build generates `../loopforge-protocol.json` and `dist/`. Edit protocol
282
+ types in `src/protocol.ts` first, then build to regenerate artifacts. Do not
283
+ edit generated files by hand.
160
284
 
161
285
  ## License
162
286
 
package/dist/audit.d.ts CHANGED
@@ -1,23 +1,36 @@
1
- /** v2.12: Read-only, replayable end-of-loop audit — the verification view.
1
+ /** v2.12/v4.0.3: Read-only, replayable end-of-loop audit — the verification
2
+ * view.
2
3
  *
3
4
  * Positioning vs loopforge_replay: replay is the factual timeline (what
4
5
  * happened per round); audit is the assessment layer (which claims are
5
6
  * machine-verified, which gates were decided, is the sequence intact).
6
7
  * Everything is derived from committed vault entries — audit never writes.
7
8
  *
8
- * v3.8: the CONTRACT ITEM axis is the primary completion basis. The criterion
9
- * claims stay as an advisory second view — a criterion claim is an agent
10
- * statement whose machine backing is mediated by the contract items, so it
11
- * cannot be the completion signal. Both axes read the same committed-round
12
- * model and the same item reducer the coordinator and explain use.
9
+ * v4.0.3: every round reports the SAME persisted evidence posture. A claim is
10
+ * `verified` only when a machine criterion fact backs its criterion; Agent
11
+ * reports never upgrade themselves. `evidenceVerdict` is the terminal
12
+ * posture, while `verdict` is the verification view over structure + posture.
13
13
  */
14
14
  import type { LoopStore } from "./loop-store.js";
15
15
  import type { VaultEntry } from "./loop-store.js";
16
- import type { ContractItemStatus, SubmissionDiagnostic } from "./protocol.js";
16
+ import type { ContractItemStatus, EvidencePosture, EvidencePostureStatus, FilesReconciliation, SubmissionDiagnostic } from "./protocol.js";
17
17
  import type { SubmissionReceipt } from "./protocol.js";
18
18
  export interface AuditRound {
19
19
  round: number;
20
- outcome: string;
20
+ /** v4.0.3: Agent claim; never a machine verdict. */
21
+ agentSuccessClaim: boolean;
22
+ agentOutcome: string;
23
+ /** v4.0.6: the Agent's blocker text, verbatim (report only). */
24
+ blocker: string | null;
25
+ /** v4.0.6: the Agent's committed working-objective refinement, if any. */
26
+ objectiveRefinement: string | null;
27
+ /** v4.0.6: the committed redirect derived from the proposal's `supersedes`. */
28
+ contractRedirect: {
29
+ contract_id: string;
30
+ reason?: string;
31
+ } | null;
32
+ machineBackedSuccess: boolean;
33
+ evidencePosture: EvidencePosture | null;
21
34
  claims: Array<{
22
35
  text: string;
23
36
  status: "verified" | "unverified";
@@ -38,12 +51,32 @@ export interface AuditRound {
38
51
  status: ContractItemStatus;
39
52
  }>;
40
53
  } | null;
41
- /** v3.9.1: compact submission accounting. The full receipt is available in
42
- * explain/status; audit keeps the fields that matter for its verdict. */
54
+ /** v4.0.3: committed recovery material that history can still discover. */
55
+ checkpoints: Array<{
56
+ checkpoint_id: string;
57
+ role: "before" | "mid";
58
+ round: number;
59
+ content_hash: string;
60
+ }>;
61
+ restore: {
62
+ directive_transaction_id: string;
63
+ redo_round: number;
64
+ verified_at: number;
65
+ } | null;
66
+ restore_verified: boolean;
67
+ /** v3.9.1/v4.0.3: compact submission accounting. */
43
68
  submission: {
69
+ record: SubmissionReceipt["record"];
70
+ entered_history: boolean;
44
71
  diagnostics: SubmissionDiagnostic[];
45
72
  saved_not_expanded: string[];
46
73
  effects: SubmissionReceipt["effects"];
74
+ verification: {
75
+ evidence_posture: EvidencePosture;
76
+ checks: SubmissionReceipt["verification"]["checks"];
77
+ };
78
+ files_reconciliation: FilesReconciliation;
79
+ recovery_checkpoint: SubmissionReceipt["recovery_checkpoint"] | null;
47
80
  prompt: {
48
81
  level: string;
49
82
  dropped_sections: string[];
@@ -58,15 +91,15 @@ export interface AuditGate {
58
91
  decidedAt: string;
59
92
  round: number;
60
93
  }
61
- /** v3.8: One contract's outcome over the loaned loop, keyed by its content-
62
- * addressed id. Re-declaring the same contract later extends the same entry —
63
- * the identity says it IS the same contract. */
94
+ /** v3.8: One contract's outcome over the loop, keyed by its content-addressed
95
+ * id. Re-declaring the same contract later extends the same entry — the
96
+ * identity says it IS the same contract. */
64
97
  export interface AuditContract {
65
98
  contract_id: string;
66
99
  declared_at_round: number;
67
100
  first_active_round: number;
68
101
  last_active_round: number;
69
- closure: "open" | "verified" | "blocked";
102
+ closure: "open" | "verified" | "blocked" | "superseded";
70
103
  closed_at_round: number | null;
71
104
  /** Item statuses as of the last round the contract was execution-relevant. */
72
105
  items: Array<{
@@ -79,6 +112,8 @@ export interface AuditContractSummary {
79
112
  contracts: AuditContract[];
80
113
  /** Contracts whose final closure is still `open`. */
81
114
  open: number;
115
+ /** v3.9.9: contracts the Agent explicitly abandoned via a transition. */
116
+ superseded: number;
82
117
  verifiedItems: number;
83
118
  insufficientItems: number;
84
119
  contradictedItems: number;
@@ -86,14 +121,37 @@ export interface AuditContractSummary {
86
121
  }
87
122
  export interface AuditResult {
88
123
  loopId: string;
124
+ /** Verification-view verdict: `passed` requires the structure to be intact
125
+ * AND the terminal evidence posture to be verified/not_applicable. */
89
126
  verdict: "passed" | "incomplete" | "contradicted";
127
+ /** v4.0.3: the terminal posture itself, unmodified. */
128
+ evidenceVerdict: EvidencePostureStatus | null;
90
129
  rounds: AuditRound[];
130
+ /** v3.9.6: committed rollback directives — events, never normal rounds. */
131
+ rollbacks: Array<{
132
+ round: number;
133
+ transactionId: string;
134
+ origin: "agent" | "machine";
135
+ redoRound: number;
136
+ targetCheckpointId: string;
137
+ reason: string;
138
+ observedSkippedFiles: string[];
139
+ reportedSkippedFiles: string[];
140
+ skippedFiles: string[];
141
+ abandonedRounds: number[];
142
+ failedRounds: number[];
143
+ /** v4.0.3: Agent reports preserved by the rollback. */
144
+ preservedDiscoveries: string[];
145
+ approaches: string[];
146
+ wrongAssumptions: string[];
147
+ }>;
91
148
  gates: AuditGate[];
92
149
  unresolvedUserGates: string[];
93
150
  /** v3.8: the verification skeleton — the primary completion basis. */
94
151
  contracts: AuditContractSummary;
95
152
  /** Advisory second axis: criterion claims, not the completion signal.
96
- * `declared` and `evidenced` are both DISTINCT-id counts, so they compare. */
153
+ * `declared` comes from the immutable operator objective; `evidenced` is the
154
+ * machine-verified set. Both are distinct-id counts. */
97
155
  criteria: {
98
156
  declared: number;
99
157
  evidenced: number;
@@ -1 +1 @@
1
- {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQlD,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGvD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,UAAU,GAAG,YAAY,CAAA;KAAE,CAAC,CAAC;IACnE,MAAM,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC,CAAC;IACxF;8DAC0D;IAC1D,QAAQ,EAAE;QACR,EAAE,EAAE,MAAM,CAAC;QACX,iBAAiB,EAAE,MAAM,CAAC;QAC1B,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,KAAK,CAAC;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,kBAAkB,CAAA;SAAE,CAAC,CAAC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