@cassiomc1/forgeloop 1.14.0 → 2.0.0-rc.4

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 (250) hide show
  1. package/CONTRIBUTING.md +11 -7
  2. package/DOCS_INDEX.md +2 -1
  3. package/ENG/c-development-eng.md +2 -2
  4. package/ENG/cpp-development-eng.md +2 -2
  5. package/ENG/dotnet-aspnetcore-development-eng.md +7 -1
  6. package/ENG/flutter-development-eng.md +4 -2
  7. package/ENG/go-development-eng.md +2 -2
  8. package/ENG/java-development-eng.md +3 -3
  9. package/ENG/nodejs-backend-development-eng.md +8 -4
  10. package/ENG/php-development-eng.md +3 -3
  11. package/ENG/python-development-eng.md +205 -0
  12. package/ENG/rust-development-eng.md +42 -1
  13. package/ENG/sql-development-eng.md +4 -4
  14. package/ENG/swift-development-eng.md +5 -4
  15. package/ENG/test-code-eng.md +1 -1
  16. package/ENG/typescript-development-eng.md +4 -4
  17. package/GUIDE_ROUTER.md +6 -0
  18. package/LICENSE +133 -21
  19. package/LOOP_SYSTEM_DESIGN.md +10 -10
  20. package/README.md +30 -40
  21. package/THIRD_PARTY_NOTICES.md +3 -4
  22. package/completions/_forgeloop +11 -3
  23. package/completions/forgeloop.bash +19 -3
  24. package/completions/forgeloop.fish +61 -1
  25. package/docs/AGENT_PROTOCOL_SUMMARY.md +50 -40
  26. package/docs/ARTIFACT_REFERENCE.md +50 -37
  27. package/docs/CLI_REFERENCE.md +147 -3
  28. package/docs/DOCUMENTATION_GUIDE.md +6 -4
  29. package/docs/GETTING_STARTED.md +3 -3
  30. package/docs/PACKAGE_CONTENTS.md +14 -13
  31. package/docs/RELEASE_CHECKLIST.md +110 -10
  32. package/docs/SELF_HOSTED_TESTS.md +121 -0
  33. package/docs/TROUBLESHOOTING.md +33 -0
  34. package/docs/documentation-manifest.json +25 -12
  35. package/package.json +15 -10
  36. package/schemas/task-bundle.schema.json +7 -2
  37. package/scripts/generate-agent-protocol-summary.mjs +2 -2
  38. package/scripts/run-mcp-clean-tests.mjs +30 -0
  39. package/src/adapters/agent-browser/provider.js +14 -11
  40. package/src/adapters/emulated-services/provider.js +11 -4
  41. package/src/adapters/temporary-paths.js +18 -0
  42. package/src/cli.js +146 -210
  43. package/src/commands/action-show.js +5 -2
  44. package/src/commands/advance.js +5 -1
  45. package/src/commands/baseline.js +13 -11
  46. package/src/commands/checkpoint-revalidate.js +24 -8
  47. package/src/commands/complete.js +19 -3
  48. package/src/commands/contract-create.js +3 -1
  49. package/src/commands/doctor.js +36 -13
  50. package/src/commands/gate-record.js +20 -31
  51. package/src/commands/gate-revalidate.js +11 -13
  52. package/src/commands/handoff-list.js +6 -1
  53. package/src/commands/handoff-show.js +6 -1
  54. package/src/commands/migrate-protocol.js +2 -2
  55. package/src/commands/model-route.js +9 -1
  56. package/src/commands/next.js +7 -1
  57. package/src/commands/policy-diff.js +25 -4
  58. package/src/commands/progress.js +17 -11
  59. package/src/commands/record-diagnosis.js +3 -0
  60. package/src/commands/semantic-plan.js +26 -2
  61. package/src/commands/status.js +6 -1
  62. package/src/commands/storage-backup.js +15 -0
  63. package/src/commands/storage-migrate.js +5 -0
  64. package/src/commands/storage-migration-resume.js +5 -0
  65. package/src/commands/storage-migration-status.js +44 -0
  66. package/src/commands/storage-restore-resume.js +7 -0
  67. package/src/commands/storage-restore.js +8 -0
  68. package/src/commands/task-abandon.js +1 -1
  69. package/src/commands/task-list.js +8 -43
  70. package/src/commands/task-migrate.js +3 -3
  71. package/src/commands/task-recover.js +10 -2
  72. package/src/commands/task-scope.js +18 -2
  73. package/src/commands/task-show.js +16 -2
  74. package/src/commands/validate-protocol.js +29 -14
  75. package/src/commands/validate-receipt.js +8 -1
  76. package/src/config/guides.json +4 -0
  77. package/src/core/action-ledger-projection.js +10 -3
  78. package/src/core/actions.js +38 -75
  79. package/src/core/activation.js +11 -3
  80. package/src/core/approvals.js +17 -51
  81. package/src/core/artifact-registry.js +59 -2
  82. package/src/core/artifacts.js +81 -27
  83. package/src/core/attachment-paths.js +45 -0
  84. package/src/core/attestation-coverage.js +6 -1
  85. package/src/core/attestation-verifier.js +21 -2
  86. package/src/core/attestation.js +17 -6
  87. package/src/core/audit.js +6 -1
  88. package/src/core/bundles.js +160 -66
  89. package/src/core/checkpoint-revalidation.js +12 -10
  90. package/src/core/cli-command-definitions.js +109 -7
  91. package/src/core/code-manifest.js +9 -3
  92. package/src/core/command-executors.js +182 -126
  93. package/src/core/command-input.js +21 -1
  94. package/src/core/completion-artifacts.js +85 -36
  95. package/src/core/completion-ownership.js +19 -8
  96. package/src/core/completion-recovery-rebind.js +11 -1
  97. package/src/core/completion.js +60 -9
  98. package/src/core/conformance.js +2 -1
  99. package/src/core/continuity-lint.js +13 -2
  100. package/src/core/continuity-reconciliation.js +16 -3
  101. package/src/core/continuity.js +16 -8
  102. package/src/core/contract-bootstrap-recovery.js +42 -41
  103. package/src/core/contract-revision.js +8 -9
  104. package/src/core/decision/artifact.js +2 -1
  105. package/src/core/decision/events.js +9 -6
  106. package/src/core/decision/resolver.js +19 -11
  107. package/src/core/decision/service.js +63 -38
  108. package/src/core/decision/task-bindings.js +6 -1
  109. package/src/core/diagnosis-model.js +11 -0
  110. package/src/core/diagnosis.js +10 -1
  111. package/src/core/diagnostic-projection.js +29 -12
  112. package/src/core/diagnostic-record.js +28 -3
  113. package/src/core/efficiency.js +6 -1
  114. package/src/core/events.js +316 -97
  115. package/src/core/execution-prerequisites.js +22 -13
  116. package/src/core/execution.js +26 -40
  117. package/src/core/filesystem.js +11 -0
  118. package/src/core/gate-artifact.js +105 -19
  119. package/src/core/gate-provenance.js +6 -5
  120. package/src/core/handoff.js +26 -14
  121. package/src/core/history.js +39 -35
  122. package/src/core/hypothesis-projection.js +32 -0
  123. package/src/core/information-gain-projection.js +104 -100
  124. package/src/core/inspect.js +12 -3
  125. package/src/core/integration-invocation-policy.js +10 -0
  126. package/src/core/integration-resources.js +41 -34
  127. package/src/core/ledger-event-collection.js +189 -0
  128. package/src/core/ledger-relations.js +23 -0
  129. package/src/core/native-storage.js +12 -0
  130. package/src/core/next-action-continuity.js +31 -9
  131. package/src/core/next-action-phases.js +1 -1
  132. package/src/core/next-action-review-phase.js +2 -2
  133. package/src/core/next-action-verification-phase.js +2 -1
  134. package/src/core/next-action.js +21 -2
  135. package/src/core/phase.js +138 -93
  136. package/src/core/policy-engine.js +12 -13
  137. package/src/core/preflight-consistency.js +72 -59
  138. package/src/core/preflight-loaders.js +19 -12
  139. package/src/core/preflight-model.js +6 -1
  140. package/src/core/preflight.js +29 -12
  141. package/src/core/progress.js +21 -10
  142. package/src/core/protocol-info.js +3 -0
  143. package/src/core/protocol-migration.js +7 -6
  144. package/src/core/reconcile-closure.js +162 -24
  145. package/src/core/recovery-history.js +66 -47
  146. package/src/core/reflection.js +72 -77
  147. package/src/core/responsibility.js +25 -13
  148. package/src/core/route-artifact.js +13 -3
  149. package/src/core/runtime-context.js +5 -0
  150. package/src/core/schema-validation.js +8 -3
  151. package/src/core/settlement.js +12 -1
  152. package/src/core/signing/bundle-file.js +53 -0
  153. package/src/core/signing/bundle-reference.js +15 -0
  154. package/src/core/signing/sigstore.js +60 -33
  155. package/src/core/signing/statement-file.js +27 -0
  156. package/src/core/storage-runtime-registry.js +41 -0
  157. package/src/core/structural-quality/artifacts.js +20 -14
  158. package/src/core/structural-quality/service.js +81 -56
  159. package/src/core/target-layout.js +1 -1
  160. package/src/core/task-claim-state.js +52 -18
  161. package/src/core/task-command.js +21 -1
  162. package/src/core/task-conflict-inspection.js +112 -107
  163. package/src/core/task-descriptor.js +29 -22
  164. package/src/core/task-discovery.js +288 -90
  165. package/src/core/task-lock.js +66 -306
  166. package/src/core/task-migration-validation.js +5 -5
  167. package/src/core/task-migration.js +17 -287
  168. package/src/core/task-snapshot.js +51 -8
  169. package/src/core/task-storage-migration.js +18 -0
  170. package/src/core/templates.js +20 -8
  171. package/src/core/test-intelligence/prune.js +5 -1
  172. package/src/core/trace.js +154 -99
  173. package/src/core/trajectory-evaluation.js +15 -3
  174. package/src/core/trajectory-metrics.js +47 -32
  175. package/src/core/transaction.js +16 -288
  176. package/src/core/verification-scope.js +20 -12
  177. package/src/core/work-state.js +100 -59
  178. package/src/repository-index/binary-manager.js +15 -7
  179. package/src/storage/artifact-bytes.js +22 -0
  180. package/src/storage/attachment-binding.js +11 -0
  181. package/src/storage/attachment-files.js +82 -0
  182. package/src/storage/attachment-references.js +36 -0
  183. package/src/storage/backup.js +53 -0
  184. package/src/storage/capabilities.js +31 -0
  185. package/src/storage/connection-owner.js +119 -0
  186. package/src/storage/connection.js +376 -0
  187. package/src/storage/existing-project-scope.js +45 -0
  188. package/src/storage/export-destination.js +44 -0
  189. package/src/storage/exporter.js +284 -0
  190. package/src/storage/file-durability.js +46 -0
  191. package/src/storage/importer.js +461 -0
  192. package/src/storage/index.js +74 -0
  193. package/src/storage/leases.js +63 -0
  194. package/src/storage/ledger-event-snapshot.js +150 -0
  195. package/src/storage/ledger-relations.js +220 -0
  196. package/src/storage/legacy-maintenance-boundary.js +18 -0
  197. package/src/storage/legacy-signature.js +115 -0
  198. package/src/storage/maintenance-handoff.js +129 -0
  199. package/src/storage/maintenance-owner.js +42 -0
  200. package/src/storage/maintenance.js +310 -0
  201. package/src/storage/metadata-json.js +35 -0
  202. package/src/storage/migration-activate.js +59 -0
  203. package/src/storage/migration-archive.js +57 -0
  204. package/src/storage/migration-attachment-root.js +61 -0
  205. package/src/storage/migration-candidate.js +398 -0
  206. package/src/storage/migration-publication.js +143 -0
  207. package/src/storage/migration-rollback-admission.js +54 -0
  208. package/src/storage/migration-rollback-preparation.js +132 -0
  209. package/src/storage/migration-rollback-publication.js +183 -0
  210. package/src/storage/migration-rollback-release.js +66 -0
  211. package/src/storage/migration-rollback-source-stage.js +103 -0
  212. package/src/storage/migration-rollback.js +43 -0
  213. package/src/storage/migration-source-partition.js +56 -0
  214. package/src/storage/migration-source.js +255 -0
  215. package/src/storage/migration-terminal.js +39 -0
  216. package/src/storage/migration-validation.js +75 -0
  217. package/src/storage/migration.js +43 -0
  218. package/src/storage/operational-attachments.js +49 -0
  219. package/src/storage/operational-context.js +50 -0
  220. package/src/storage/project-backup.js +98 -0
  221. package/src/storage/project-bootstrap.js +24 -0
  222. package/src/storage/project-boundary.js +79 -0
  223. package/src/storage/project-read-snapshot.js +18 -0
  224. package/src/storage/project-replacement.js +137 -0
  225. package/src/storage/project-restore.js +203 -0
  226. package/src/storage/record-definitions.js +45 -0
  227. package/src/storage/repository.js +507 -0
  228. package/src/storage/restore-execution-provenance.js +26 -0
  229. package/src/storage/restore-journal.js +62 -0
  230. package/src/storage/restore-layout.js +30 -0
  231. package/src/storage/restore-preparation.js +84 -0
  232. package/src/storage/restore-replacement-archive.js +162 -0
  233. package/src/storage/restore-replacement-owner.js +31 -0
  234. package/src/storage/restore-replacement-preparation.js +128 -0
  235. package/src/storage/restore-replacement.js +142 -0
  236. package/src/storage/restore-terminal.js +32 -0
  237. package/src/storage/runtime.js +31 -0
  238. package/src/storage/schema.js +214 -0
  239. package/src/storage/singleton-import.js +84 -0
  240. package/src/storage/snapshot-continuity.js +16 -0
  241. package/src/storage/snapshot.js +36 -0
  242. package/src/storage/storage-marker.js +79 -0
  243. package/src/storage/task-guards.js +107 -0
  244. package/src/storage/topology.js +42 -0
  245. package/src/storage/transaction.js +179 -0
  246. package/src/storage/unit-of-work.js +667 -0
  247. package/src/storage/windows-process-incarnation.js +206 -0
  248. package/.forgeloop/forgeloop.gitignore +0 -4
  249. package/LICENSE-DOCS.md +0 -13
  250. package/src/core/transaction-maintenance.js +0 -70
package/LICENSE CHANGED
@@ -1,21 +1,133 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Cassio
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ # PolyForm Noncommercial License 1.0.0
2
+
3
+ <https://polyformproject.org/licenses/noncommercial/1.0.0>
4
+
5
+ ## Acceptance
6
+
7
+ In order to get any license under these terms, you must agree
8
+ to them as both strict obligations and conditions to all
9
+ your licenses.
10
+
11
+ ## Copyright License
12
+
13
+ The licensor grants you a copyright license for the
14
+ software to do everything you might do with the software
15
+ that would otherwise infringe the licensor's copyright
16
+ in it for any permitted purpose. However, you may
17
+ only distribute the software according to [Distribution
18
+ License](#distribution-license) and make changes or new works
19
+ based on the software according to [Changes and New Works
20
+ License](#changes-and-new-works-license).
21
+
22
+ ## Distribution License
23
+
24
+ The licensor grants you an additional copyright license
25
+ to distribute copies of the software. Your license
26
+ to distribute covers distributing the software with
27
+ changes and new works permitted by [Changes and New Works
28
+ License](#changes-and-new-works-license).
29
+
30
+ ## Notices
31
+
32
+ You must ensure that anyone who gets a copy of any part of
33
+ the software from you also gets a copy of these terms or the
34
+ URL for them above, as well as copies of any plain-text lines
35
+ beginning with `Required Notice:` that the licensor provided
36
+ with the software. For example:
37
+
38
+ > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
39
+
40
+ ## Changes and New Works License
41
+
42
+ The licensor grants you an additional copyright license to
43
+ make changes and new works based on the software for any
44
+ permitted purpose.
45
+
46
+ ## Patent License
47
+
48
+ The licensor grants you a patent license for the software that
49
+ covers patent claims the licensor can license, or becomes able
50
+ to license, that you would infringe by using the software.
51
+
52
+ ## Noncommercial Purposes
53
+
54
+ Any noncommercial purpose is a permitted purpose.
55
+
56
+ ## Personal Uses
57
+
58
+ Personal use for research, experiment, and testing for
59
+ the benefit of public knowledge, personal study, private
60
+ entertainment, hobby projects, amateur pursuits, or religious
61
+ observance, without any anticipated commercial application,
62
+ is use for a permitted purpose.
63
+
64
+ ## Noncommercial Organizations
65
+
66
+ Use by any charitable organization, educational institution,
67
+ public research organization, public safety or health
68
+ organization, environmental protection organization,
69
+ or government institution is use for a permitted purpose
70
+ regardless of the source of funding or obligations resulting
71
+ from the funding.
72
+
73
+ ## Fair Use
74
+
75
+ You may have "fair use" rights for the software under the
76
+ law. These terms do not limit them.
77
+
78
+ ## No Other Rights
79
+
80
+ These terms do not allow you to sublicense or transfer any of
81
+ your licenses to anyone else, or prevent the licensor from
82
+ granting licenses to anyone else. These terms do not imply
83
+ any other licenses.
84
+
85
+ ## Patent Defense
86
+
87
+ If you make any written claim that the software infringes or
88
+ contributes to infringement of any patent, your patent license
89
+ for the software granted under these terms ends immediately. If
90
+ your company makes such a claim, your patent license ends
91
+ immediately for work on behalf of your company.
92
+
93
+ ## Violations
94
+
95
+ The first time you are notified in writing that you have
96
+ violated any of these terms, or done anything with the software
97
+ not covered by your licenses, your licenses can nonetheless
98
+ continue if you come into full compliance with these terms,
99
+ and take practical steps to correct past violations, within
100
+ 32 days of receiving notice. Otherwise, all your licenses
101
+ end immediately.
102
+
103
+ ## No Liability
104
+
105
+ ***As far as the law allows, the software comes as is, without
106
+ any warranty or condition, and the licensor will not be liable
107
+ to you for any damages arising out of these terms or the use
108
+ or nature of the software, under any kind of legal claim.***
109
+
110
+ ## Definitions
111
+
112
+ The **licensor** is the individual or entity offering these
113
+ terms, and the **software** is the software the licensor makes
114
+ available under these terms.
115
+
116
+ **You** refers to the individual or entity agreeing to these
117
+ terms.
118
+
119
+ **Your company** is any legal entity, sole proprietorship,
120
+ or other kind of organization that you work for, plus all
121
+ organizations that have control over, are under the control of,
122
+ or are under common control with that organization. **Control**
123
+ means ownership of substantially all the assets of an entity,
124
+ or the power to direct its management and policies by vote,
125
+ contract, or otherwise. Control can be direct or indirect.
126
+
127
+ **Your licenses** are all the licenses granted to you for the
128
+ software under these terms.
129
+
130
+ **Use** means anything you do with the software requiring one
131
+ of your licenses.
132
+
133
+ Required Notice: Copyright (c) 2026 Cassio Marques Campos
@@ -24,7 +24,7 @@ The system should use every guide that materially helps the task without loading
24
24
  - The loop continues while safe progress is possible. Repetition without new evidence triggers hypothesis reassessment or a blocked result, not infinite retries.
25
25
  - Third-party provenance and reuse boundaries remain part of every portable copy.
26
26
  - Qwen-MM-Plugins is an optional, task-scoped capability extension: the agent checks native support first, installs the smallest missing capability when needed, and verifies it before use; it is not a package or runtime dependency.
27
- - Canonical documents are installed under `.forgeloop/kit/`; root native adapters remain small discovery shims; project-scoped configuration remains under `.forgeloop/`; and modern mutable task protocol state is isolated under `.forgeloop/task-state/<taskKey>/`.
27
+ - Canonical documents are installed under `.forgeloop/kit/`; root native adapters remain small discovery shims; project-scoped configuration remains under `.forgeloop/`; operational task records use `.forgeloop/state.sqlite` in SQLite mode. `.forgeloop/task-state/<taskKey>/` remains the logical and portable export path for task artifacts. Legacy filesystem mode remains a separate compatibility path, and SQLite capability still reports `soleSQLiteWriter: false` while legacy writers remain.
28
28
  - `PREFLIGHT_READY` is a resumable protocol checkpoint reconciled with work state, activation events, fingerprints, and the append-only hash chain.
29
29
 
30
30
  ## Alternatives considered
@@ -446,15 +446,15 @@ The validator also exercises seven routing scenarios:
446
446
  The npm CLI installs the kit into the current directory or an existing
447
447
  directory selected with `--path` when the package is available in the npm
448
448
  registry. If it is not available yet, the same commands can run as
449
- `node src/cli.js ...` from a repository checkout. The CLI maps canonical
450
- documents into `.forgeloop/kit/`, keeps only native instruction shims at the
451
- target root, and leaves project-scoped configuration under `.forgeloop/` while
452
- isolating modern mutable task protocol state (contract, route, gate, state,
453
- event, preflight, receipt, and recovery artifacts) under
454
- `.forgeloop/task-state/<taskKey>/`. Legacy singleton artifacts remain under
455
- `.forgeloop/` for compatibility and migration only. Manual copying must
456
- preserve that target layout; copying package-source root files directly is not
457
- equivalent to `forgeloop init`.
449
+ `node src/cli.js ...` from a repository checkout. The CLI maps canonical documents into `.forgeloop/kit/`, keeps only native
450
+ instruction shims at the target root, and leaves project-scoped configuration
451
+ under `.forgeloop/`. In SQLite mode, mutable task records are stored in
452
+ `.forgeloop/state.sqlite`; `.forgeloop/task-state/<taskKey>/` is the logical
453
+ task-artifact and portable export path, not a claim that each artifact exists
454
+ as a live filesystem file. Legacy filesystem mode remains a separate
455
+ compatibility path, and SQLite mode must not share writable operational state
456
+ with it. Manual copying must preserve the target layout; copying package-source
457
+ root files directly is not equivalent to `forgeloop init`.
458
458
 
459
459
  Recovery uses a relational state model: `work-state.json` owns the lifecycle
460
460
  phase, `task.json` retains historical claims, `recovery.json` records current
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # ForgeLoop — Verifiable Engineering Protocol
2
2
 
3
3
  <p align="center">
4
- <img src="./docs/assets/forgeloop-architecture.svg" alt="ForgeLoop Architecture" width="100%">
4
+ <img src="./docs/assets/forgeloop-architecture.png" alt="ForgeLoop architecture infographic" width="100%">
5
5
  </p>
6
6
 
7
7
  [![CodeQL](https://github.com/cassiomc1/forgeloop/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/cassiomc1/forgeloop/actions/workflows/codeql.yml)
@@ -11,16 +11,9 @@
11
11
  [![Package smoke](https://github.com/cassiomc1/forgeloop/actions/workflows/package-smoke.yml/badge.svg?branch=main)](https://github.com/cassiomc1/forgeloop/actions/workflows/package-smoke.yml)
12
12
  [![Release notes](https://github.com/cassiomc1/forgeloop/actions/workflows/release-notes.yml/badge.svg?branch=main)](https://github.com/cassiomc1/forgeloop/actions/workflows/release-notes.yml)
13
13
 
14
- ForgeLoop is the deterministic governor for AI-assisted engineering. Jev is the
15
- mandatory bounded System One semantic input; the host coding model is System Two
16
- implementation. ForgeLoop alone owns lifecycle, claims, gates, evidence,
17
- completion, recovery, and publication truth.
14
+ ForgeLoop governs AI-assisted engineering. Jev supplies bounded semantic input; the host model implements changes. ForgeLoop owns lifecycle, claims, gates, evidence, completion, recovery, and publication truth.
18
15
 
19
- Operational sources are indexed in [`DOCS_INDEX.md`](./DOCS_INDEX.md).
20
- [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) is canonical;
21
- [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md) defines discovery,
22
- [`PROJECT_PROFILE.md`](./PROJECT_PROFILE.md) stores project facts, and
23
- [`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md) selects relevant guides.
16
+ Sources: [`DOCS_INDEX.md`](./DOCS_INDEX.md); canonical [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md); discovery [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md); project facts [`PROJECT_PROFILE.md`](./PROJECT_PROFILE.md); guides [`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md).
24
17
 
25
18
  ## Where should I start?
26
19
 
@@ -40,14 +33,10 @@ Operational sources are indexed in [`DOCS_INDEX.md`](./DOCS_INDEX.md).
40
33
  - **Troubleshooting & error codes** → [`docs/TROUBLESHOOTING.md`](./docs/TROUBLESHOOTING.md)
41
34
  - **Code attestation & revision coverage** → [`docs/CODE_ATTESTATION.md`](./docs/CODE_ATTESTATION.md)
42
35
  - **System architecture & safety** → [`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md) & [`THREAT_MODEL.md`](./THREAT_MODEL.md)
43
- - **Documentation index & ownership** → [`DOCS_INDEX.md`](./DOCS_INDEX.md)
44
36
 
45
37
  ## Real execution proof
46
38
 
47
- The repository-only [execution PoC](https://github.com/cassiomc1/forgeloop/blob/main/poc/README.md) covers workload, protocol
48
- artifacts, trusted provenance, receipts, evidence, and audit. It reached
49
- validator-backed `COMPLETE / VALID` and preserves a later
50
- `E_RECEIPT_PATH_MISMATCH` after publication changed the repository.
39
+ The repository-only [execution PoC](https://github.com/cassiomc1/forgeloop/blob/main/poc/README.md) demonstrates workload, protocol artifacts, trusted provenance, receipts, evidence, audit, and validator-backed `COMPLETE / VALID`.
51
40
 
52
41
  - [Canonical technical audit](https://github.com/cassiomc1/forgeloop/blob/main/poc/reports/poc-20260826-real-execution-technical-audit-v2.md)
53
42
  - [Evidence package](https://github.com/cassiomc1/forgeloop/tree/main/poc/evidence/poc-20260826-real-execution/)
@@ -76,29 +65,40 @@ validator-backed `COMPLETE / VALID` and preserves a later
76
65
  | SQL | [guide](./ENG/sql-development-eng.md) |
77
66
  | Go | [guide](./ENG/go-development-eng.md) |
78
67
  | TypeScript | [guide](./ENG/typescript-development-eng.md) |
68
+ | Python | [guide](./ENG/python-development-eng.md) |
79
69
  | PHP | [guide](./ENG/php-development-eng.md) |
80
70
  | Swift | [guide](./ENG/swift-development-eng.md) |
81
71
  | Structural quality feedback | [`docs/STRUCTURAL_QUALITY.md`](./docs/STRUCTURAL_QUALITY.md) |
82
72
 
83
- Routing uses bounded structural evidence for Flutter, .NET, Node.js, Rust, C,
84
- C++, Java, Go, TypeScript, PHP, and Swift; SQL is a scoped schema/query/
85
- migration overlay. Source extensions, build tooling, lockfiles, compiler/JDK/
86
- runtime images, and prose alone fail where the specialist contract requires
87
- stronger project identity. The public project-evidence schema remains v1.
73
+ Routing uses bounded structural evidence; SQL remains a schema/query/migration
74
+ overlay. Extensions, tool files, lockfiles, runtime images, and prose alone do
75
+ not establish project identity. Public project evidence remains v1.
76
+
77
+ ## Distribution and license
78
+
79
+ GitHub hosts source and issues. The core npm package is publicly available;
80
+ the MCP companion retains restricted distribution. The owner-selected default
81
+ `latest` channel targets `2.0.0-rc.2`, which remains a release candidate with
82
+ incomplete stable SQLite acceptance.
83
+ ForgeLoop-owned source and documentation are licensed under the
84
+ [PolyForm Noncommercial License 1.0.0](./LICENSE). Commercial use is not granted
85
+ by this license. Third-party notices are documented in
86
+ [`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md).
88
87
 
89
88
  ## Quickstart
90
89
 
91
90
  ### Installation
92
91
 
93
- Install the ForgeLoop CLI globally to make the `forgeloop` command available
94
- in your terminal:
92
+ After your organization grants access, configure npm authentication and install:
95
93
 
96
94
  ```bash
97
95
  npm install --global @cassiomc1/forgeloop
98
96
  forgeloop --version
99
97
  ```
100
98
 
101
- Then, inside your project repository:
99
+ Requires Node 24.19.0+ with `node:sqlite`. Migrate legacy state explicitly.
100
+
101
+ Inside your project:
102
102
 
103
103
  ```bash
104
104
  forgeloop init
@@ -106,13 +106,6 @@ forgeloop doctor
106
106
  forgeloop search "example"
107
107
  ```
108
108
 
109
- If you prefer not to install globally, use `npx`:
110
-
111
- ```bash
112
- npx @cassiomc1/forgeloop init
113
- npx @cassiomc1/forgeloop doctor
114
- ```
115
-
116
109
  ### 60-second demonstration
117
110
 
118
111
  In a disposable directory, initialize the kit and create an isolated task.
@@ -211,20 +204,18 @@ forgeloop protocol-info --json
211
204
  | Validate completion | Yes | Provides real work and evidence |
212
205
  | Schedule agents or LLM inference | No | External to the protocol |
213
206
 
214
- For a concrete exchange between tools, see
215
- [cross-harness continuity](./docs/CROSS_HARNESS_CONTINUITY.md).
216
-
217
- From a published package, initialize a target project with:
207
+ From the privately delivered package, initialize a target project with:
218
208
 
219
209
  ```bash
220
210
  npx @cassiomc1/forgeloop init
221
211
  npx @cassiomc1/forgeloop doctor
222
212
  ```
223
213
 
224
- The CLI installs canonical documents under `.forgeloop/kit/`, keeps small
225
- native discovery shims at the project root, stores project-scoped
226
- configuration under `.forgeloop/`, and stores task-scoped protocol artifacts
227
- under `.forgeloop/task-state/<taskKey>/`.
214
+ The CLI installs canonical documents under `.forgeloop/kit/`, keeps native
215
+ discovery shims at the project root, and stores project configuration under
216
+ `.forgeloop/`. Task artifacts use `.forgeloop/task-state/<taskKey>/` as their
217
+ logical portable export path; SQLite mode stores mutable records in
218
+ `.forgeloop/state.sqlite`.
228
219
  `update` preserves target-specific profile facts and locally modified files.
229
220
 
230
221
  ForgeLoop adapts protocol depth to task risk and scope, preserving verifiable
@@ -256,8 +247,7 @@ host-reported or `UNKNOWN`; values are never estimated.
256
247
  capability, but advisory recall remains Integration API only. The stock CLI
257
248
  does not auto-recall providers and does not expose a `context-recall` command.
258
249
 
259
- Before npm publication, the same source checkout can be exercised without a
260
- network or package lookup:
250
+ Validate the source checkout offline before any private release:
261
251
 
262
252
  ```bash
263
253
  node src/cli.js init
@@ -7,10 +7,9 @@ for reuse.
7
7
 
8
8
  ## Collection license
9
9
 
10
- The CLI and validator code are licensed under the MIT License in `LICENSE`.
11
- Original documentation is offered under CC BY 4.0 as described in
12
- `LICENSE-DOCS.md`. Those notices do not apply to adapted or external material;
13
- review the applicable source terms before redistributing such material.
10
+ ForgeLoop-owned source and documentation are licensed under the
11
+ [PolyForm Noncommercial License 1.0.0](./LICENSE). The notices below apply only to third-party
12
+ components, adapted sources, vendored tools, and external references.
14
13
 
15
14
  ## Adapted and editorial sources
16
15
 
@@ -1,7 +1,7 @@
1
1
  #compdef forgeloop
2
2
  # Generated by scripts/generate-shell-completions.mjs. Do not edit.
3
3
  _arguments \
4
- '1:command:(action-authorize action-propose action-reconcile action-record action-show action-verify activate advance approval-request approval-resolve attestation-create attestation-status attestation-verify attestation-verify-range audit baseline bundle checkpoint-revalidate clear-continuity clear-state complete context-plan continuity contract-create contract-revise decision-show decision-status discover doctor efficiency eval gate-record gate-revalidate handoff-accept handoff-create handoff-list handoff-show history index-rebuild index-setup index-start index-status index-stop init inspect metrics migrate-protocol model-route next policy policy-diff policy-discover policy-status preflight prepare-completion profile-interview progress protocol-info quality-baseline quality-status quality-verify reconcile-closure reconcile-continuity record-check record-continuity record-decision-criterion record-diagnosis record-hypothesis-disposition record-intervention record-terminal-result reflect report responsibility-set responsibility-status route rule-verify run-action run-check search semantic-plan status task-abandon task-create task-list task-lock-status task-migrate task-migrate-contract-bootstrap-repair task-recover task-repair-contract-bootstrap task-repair-legacy-recovery task-resume task-scope task-show task-unlock test-inventory test-prune-plan test-prune-probe test-utility trace update usage-record validate-protocol validate-receipt validate-state verify-scope workspace-bind workspace-status)' \
4
+ '1:command:(action-authorize action-propose action-reconcile action-record action-show action-verify activate advance approval-request approval-resolve attestation-create attestation-status attestation-verify attestation-verify-range audit baseline bundle checkpoint-revalidate clear-continuity clear-state complete context-plan continuity contract-create contract-revise decision-show decision-status discover doctor efficiency eval gate-record gate-revalidate handoff-accept handoff-create handoff-list handoff-show history index-rebuild index-setup index-start index-status index-stop init inspect metrics migrate-protocol model-route next policy policy-diff policy-discover policy-status preflight prepare-completion profile-interview progress protocol-info quality-baseline quality-status quality-verify reconcile-closure reconcile-continuity record-check record-continuity record-decision-criterion record-diagnosis record-hypothesis-disposition record-intervention record-terminal-result reflect report responsibility-set responsibility-status route rule-verify run-action run-check search semantic-plan status storage-backup storage-migrate storage-migration-resume storage-migration-status storage-restore storage-restore-resume storage-rollback storage-rollback-resume task-abandon task-create task-list task-lock-status task-migrate task-migrate-contract-bootstrap-repair task-recover task-repair-contract-bootstrap task-repair-legacy-recovery task-resume task-scope task-show task-unlock test-inventory test-prune-plan test-prune-probe test-utility trace update usage-record validate-protocol validate-receipt validate-state verify-scope workspace-bind workspace-status)' \
5
5
  '*::options:->options'
6
6
  case $words[2] in
7
7
  action-authorize) _arguments '--action[durable action ID]' '--approval[current fingerprint-bound approval]' '--help[show this help]' '--json[emit structured output as JSON]' '--path[target project directory (default: current directory)]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' ;;
@@ -50,7 +50,7 @@ case $words[2] in
50
50
  init) _arguments '--dry-run[perform deterministic init planning and conflict detection without writing]' '--help[show this help]' '--path[target project directory (default: current directory)]' '--version[show the installed package version]' ;;
51
51
  inspect) _arguments '--contract-file[current JSON contract used for freshness comparison]' '--help[show this help]' '--json[emit structured output as JSON]' '--path[target project directory (default: current directory)]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' ;;
52
52
  metrics) _arguments '--help[show this help]' '--json[emit trajectory metrics as JSON]' '--path[target project directory (default: current directory)]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' ;;
53
- migrate-protocol) _arguments '--dry-run[show migration actions without writing or deleting artifacts]' '--help[show this help]' '--json[emit structured migration result as JSON]' '--path[target project directory (default: current directory)]' '--to[target supported protocol version]' '--version[show the installed package version]' ;;
53
+ migrate-protocol) _arguments '--destination[retained source and publication evidence destination]' '--dry-run[show migration actions without writing or deleting artifacts]' '--help[show this help]' '--json[emit structured migration result as JSON]' '--path[target project directory (default: current directory)]' '--to[target supported protocol version]' '--version[show the installed package version]' '--writers-quiesced[confirm all legacy writers are stopped and excluded]' ;;
54
54
  model-route) _arguments '--ambiguous[declare unresolved ambiguity]' '--architecture-change[declare an architectural change]' '--behavior-change[declare behavior change]' '--decision[persisted Jev decision artifact ID]' '--executable-change[declare executable/configuration change]' '--generation-required[declare that generation is required]' '--help[show this help]' '--json[emit model-route projection as JSON]' '--path[target project directory (default: current directory)]' '--platform[affected platform]' '--risk[task risk]' '--surface[affected surface]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' '--work[declared work type]' ;;
55
55
  next) _arguments '--compact[emit a bounded next-action projection]' '--explain[include bounded read-only blocker and recovery explanation]' '--help[show this help]' '--json[emit structured output as JSON]' '--path[target project directory (default: current directory)]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' ;;
56
56
  policy) _arguments '--help[show this help]' '--json[emit structured output as JSON]' '--path[target project directory (default: current directory)]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' ;;
@@ -85,11 +85,19 @@ case $words[2] in
85
85
  search) _arguments '--after-context[lines of context after matches]' '--before-context[lines of context before matches]' '--context[lines of context before and after matches]' '--files-with-matches[return matching file paths only]' '--fixed-strings[treat the pattern as a literal string]' '--glob[include files matching a glob]' '--help[show this help]' '--ignore-case[search case-insensitively]' '--json[emit normalized provider-neutral search JSON]' '--max-count[maximum matches per file]' '--path[target project directory (default: current directory)]' '--smart-case[use case-insensitive search only for lowercase patterns]' '--stats[include observed native search statistics]' '--type[include files of a tgrep type]' '--version[show the installed package version]' '--word-regexp[match whole words only]' ;;
86
86
  semantic-plan) _arguments '--decision[persisted Jev decision artifact ID]' '--help[show this help]' '--input[bounded failure, diagnosis, or review context]' '--json[emit semantic plan projection as JSON]' '--kind[bounded semantic planning projection]' '--path[target project directory (default: current directory)]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' ;;
87
87
  status) _arguments '--contract-file[current JSON contract used for freshness comparison]' '--help[show this help]' '--json[emit structured output as JSON]' '--path[target project directory (default: current directory)]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' ;;
88
+ storage-backup) _arguments '--destination[new backup file or attachment-inclusive directory relative to the project; parent directory must exist]' '--help[show this help]' '--include-attachments[create a new backup directory including all canonically referenced attachment bytes]' '--json[emit backup metadata]' '--path[target project directory (default: current directory)]' '--version[show the installed package version]' ;;
89
+ storage-migrate) _arguments '--destination[new retained migration directory relative to the project; missing parent directories are created]' '--help[show this help]' '--json[emit migration publication and verification metadata]' '--path[target project directory (default: current directory)]' '--version[show the installed package version]' '--writers-quiesced[assert that all writers, including older clients, have been externally stopped]' ;;
90
+ storage-migration-resume) _arguments '--destination[retained migration directory relative to the project]' '--expected-owner[exact retained maintenance owner reported by storage-migration-status]' '--help[show this help]' '--json[emit recovery verification metadata]' '--path[target project directory (default: current directory)]' '--reconcile-unbound-handoff[preserve an unbound legacy handoff by atomic archival before resuming the exact dead owner]' '--version[show the installed package version]' '--writers-quiesced[assert that all writers, including older clients, have been externally stopped]' ;;
91
+ storage-migration-status) _arguments '--help[show this help]' '--json[emit bootstrap storage layout and retained maintenance ownership]' '--path[target project directory (default: current directory)]' '--version[show the installed package version]' ;;
92
+ storage-restore) _arguments '--help[show this help]' '--json[emit restore activation metadata]' '--path[target project directory (default: current directory)]' '--replace-active[explicitly select active replacement with retained outgoing authority]' '--source[verified attachment-inclusive backup directory; absolute or relative to the target project]' '--version[show the installed package version]' '--writers-quiesced[assert that all writers have been externally stopped]' ;;
93
+ storage-restore-resume) _arguments '--expected-owner[exact retained maintenance owner UUID]' '--help[show this help]' '--json[emit restore recovery metadata]' '--operation[exact retained restore journal operation UUID]' '--path[target project directory (default: current directory)]' '--replace-active[explicitly select active replacement with retained outgoing authority]' '--version[show the installed package version]' '--writers-quiesced[assert that all writers have been externally stopped]' ;;
94
+ storage-rollback) _arguments '--destination[retained published migration directory relative to the project]' '--help[show this help]' '--json[emit restoration and target-validation metadata]' '--legacy-root[clean supported pinned legacy checkout used for actual target validation]' '--native-writes-excluded[assert that native writes have been excluded since migration; snapshot equality alone does not prove this]' '--path[target project directory (default: current directory)]' '--version[show the installed package version]' '--writers-quiesced[assert that all writers, including older clients, have been externally stopped and excluded]' ;;
95
+ storage-rollback-resume) _arguments '--destination[retained migration with recorded rollback preparation, staging or publication]' '--expected-owner[exact retained dead local owner reported by storage-migration-status]' '--help[show this help]' '--json[emit restoration and target-validation metadata]' '--legacy-root[clean supported pinned legacy checkout used for actual target validation]' '--native-writes-excluded[assert that native writes have been excluded since migration; snapshot equality alone does not prove this]' '--path[target project directory (default: current directory)]' '--version[show the installed package version]' '--writers-quiesced[assert that all writers, including older clients, have been externally stopped and excluded]' ;;
88
96
  task-abandon) _arguments '--acknowledge-abandonment[explicitly acknowledge abandonment of an active task (required; not completion authority)]' '--help[show this help]' '--json[emit structured abandonment output as JSON]' '--path[target project directory (default: current directory)]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' ;;
89
97
  task-create) _arguments '--claim[scoped file path or directory prefix claimed for mutation]' '--contract-file[path to initial contract file]' '--help[show this help]' '--json[emit structured output as JSON]' '--path[target project directory (default: current directory)]' '--preset[bounded contract preset: documentation, bug, feature, or release]' '--preview[preview the contract without creating lifecycle state]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' ;;
90
98
  task-list) _arguments '--active[only return healthy tasks with active ownership and a non-terminal phase]' '--help[show this help]' '--json[emit structured output as JSON]' '--limit[maximum tasks to return]' '--offset[number of sorted tasks to skip]' '--path[target project directory (default: current directory)]' '--phase[only return tasks in this lifecycle phase]' '--version[show the installed package version]' ;;
91
99
  task-lock-status) _arguments '--help[show this help]' '--json[emit structured output as JSON]' '--path[target project directory (default: current directory)]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' ;;
92
- task-migrate) _arguments '--dry-run[show planned migration actions without moving files]' '--help[show this help]' '--json[emit structured output as JSON]' '--path[target project directory (default: current directory)]' '--version[show the installed package version]' ;;
100
+ task-migrate) _arguments '--destination[retained source and publication evidence destination]' '--dry-run[show planned migration actions without moving files]' '--help[show this help]' '--json[emit structured output as JSON]' '--path[target project directory (default: current directory)]' '--version[show the installed package version]' '--writers-quiesced[confirm all legacy writers are stopped and excluded]' ;;
93
101
  task-migrate-contract-bootstrap-repair) _arguments '--acknowledge-migration[fresh explicit caller acknowledgement of the exact legacy marker migration (required)]' '--help[show this help]' '--json[emit structured migration output as JSON]' '--path[target project directory (default: current directory)]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' ;;
94
102
  task-recover) _arguments '--acknowledge-recovery[acknowledge release of claims for a STALE or ABANDONED task (required; not host attestation)]' '--help[show this help]' '--json[emit structured output as JSON]' '--operator-authorized[deprecated alias for --acknowledge-recovery; does not attest operator authority]' '--path[target project directory (default: current directory)]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' ;;
95
103
  task-repair-contract-bootstrap) _arguments '--acknowledge-repair[explicit caller acknowledgement of the exact append-only repair (required)]' '--help[show this help]' '--json[emit structured repair output as JSON]' '--path[target project directory (default: current directory)]' '--task[task ID to operate on (when omitted, resolved from context or single active task)]' '--version[show the installed package version]' ;;
@@ -87,6 +87,14 @@ _forgeloop() {
87
87
  search) command="search" ;;
88
88
  semantic-plan) command="semantic-plan" ;;
89
89
  status) command="status" ;;
90
+ storage-backup) command="storage-backup" ;;
91
+ storage-migrate) command="storage-migrate" ;;
92
+ storage-migration-resume) command="storage-migration-resume" ;;
93
+ storage-migration-status) command="storage-migration-status" ;;
94
+ storage-restore) command="storage-restore" ;;
95
+ storage-restore-resume) command="storage-restore-resume" ;;
96
+ storage-rollback) command="storage-rollback" ;;
97
+ storage-rollback-resume) command="storage-rollback-resume" ;;
90
98
  task-abandon) command="task-abandon" ;;
91
99
  task-create) command="task-create" ;;
92
100
  task-list) command="task-list" ;;
@@ -116,7 +124,7 @@ _forgeloop() {
116
124
  esac
117
125
  done
118
126
  if [[ -z "\${command}" && "\${cur}" != -* ]]; then
119
- COMPREPLY=( $(compgen -W 'action-authorize action-propose action-reconcile action-record action-show action-verify activate advance approval-request approval-resolve attestation-create attestation-status attestation-verify attestation-verify-range audit baseline bundle checkpoint-revalidate clear-continuity clear-state complete context-plan continuity contract-create contract-revise decision-show decision-status discover doctor efficiency eval gate-record gate-revalidate handoff-accept handoff-create handoff-list handoff-show history index-rebuild index-setup index-start index-status index-stop init inspect metrics migrate-protocol model-route next policy policy-diff policy-discover policy-status preflight prepare-completion profile-interview progress protocol-info quality-baseline quality-status quality-verify reconcile-closure reconcile-continuity record-check record-continuity record-decision-criterion record-diagnosis record-hypothesis-disposition record-intervention record-terminal-result reflect report responsibility-set responsibility-status route rule-verify run-action run-check search semantic-plan status task-abandon task-create task-list task-lock-status task-migrate task-migrate-contract-bootstrap-repair task-recover task-repair-contract-bootstrap task-repair-legacy-recovery task-resume task-scope task-show task-unlock test-inventory test-prune-plan test-prune-probe test-utility trace update usage-record validate-protocol validate-receipt validate-state verify-scope workspace-bind workspace-status' -- "$cur") )
127
+ COMPREPLY=( $(compgen -W 'action-authorize action-propose action-reconcile action-record action-show action-verify activate advance approval-request approval-resolve attestation-create attestation-status attestation-verify attestation-verify-range audit baseline bundle checkpoint-revalidate clear-continuity clear-state complete context-plan continuity contract-create contract-revise decision-show decision-status discover doctor efficiency eval gate-record gate-revalidate handoff-accept handoff-create handoff-list handoff-show history index-rebuild index-setup index-start index-status index-stop init inspect metrics migrate-protocol model-route next policy policy-diff policy-discover policy-status preflight prepare-completion profile-interview progress protocol-info quality-baseline quality-status quality-verify reconcile-closure reconcile-continuity record-check record-continuity record-decision-criterion record-diagnosis record-hypothesis-disposition record-intervention record-terminal-result reflect report responsibility-set responsibility-status route rule-verify run-action run-check search semantic-plan status storage-backup storage-migrate storage-migration-resume storage-migration-status storage-restore storage-restore-resume storage-rollback storage-rollback-resume task-abandon task-create task-list task-lock-status task-migrate task-migrate-contract-bootstrap-repair task-recover task-repair-contract-bootstrap task-repair-legacy-recovery task-resume task-scope task-show task-unlock test-inventory test-prune-plan test-prune-probe test-utility trace update usage-record validate-protocol validate-receipt validate-state verify-scope workspace-bind workspace-status' -- "$cur") )
120
128
  return
121
129
  fi
122
130
  case "\${command}" in
@@ -166,7 +174,7 @@ _forgeloop() {
166
174
  init) COMPREPLY=( $(compgen -W '--dry-run --help --path --version' -- "$cur") );;
167
175
  inspect) COMPREPLY=( $(compgen -W '--contract-file --help --json --path --task --version' -- "$cur") );;
168
176
  metrics) COMPREPLY=( $(compgen -W '--help --json --path --task --version' -- "$cur") );;
169
- migrate-protocol) COMPREPLY=( $(compgen -W '--dry-run --help --json --path --to --version' -- "$cur") );;
177
+ migrate-protocol) COMPREPLY=( $(compgen -W '--destination --dry-run --help --json --path --to --version --writers-quiesced' -- "$cur") );;
170
178
  model-route) COMPREPLY=( $(compgen -W '--ambiguous --architecture-change --behavior-change --decision --executable-change --generation-required --help --json --path --platform --risk --surface --task --version --work' -- "$cur") );;
171
179
  next) COMPREPLY=( $(compgen -W '--compact --explain --help --json --path --task --version' -- "$cur") );;
172
180
  policy) COMPREPLY=( $(compgen -W '--help --json --path --task --version' -- "$cur") );;
@@ -201,11 +209,19 @@ _forgeloop() {
201
209
  search) COMPREPLY=( $(compgen -W '--after-context --before-context --context --files-with-matches --fixed-strings --glob --help --ignore-case --json --max-count --path --smart-case --stats --type --version --word-regexp' -- "$cur") );;
202
210
  semantic-plan) COMPREPLY=( $(compgen -W '--decision --help --input --json --kind --path --task --version' -- "$cur") );;
203
211
  status) COMPREPLY=( $(compgen -W '--contract-file --help --json --path --task --version' -- "$cur") );;
212
+ storage-backup) COMPREPLY=( $(compgen -W '--destination --help --include-attachments --json --path --version' -- "$cur") );;
213
+ storage-migrate) COMPREPLY=( $(compgen -W '--destination --help --json --path --version --writers-quiesced' -- "$cur") );;
214
+ storage-migration-resume) COMPREPLY=( $(compgen -W '--destination --expected-owner --help --json --path --reconcile-unbound-handoff --version --writers-quiesced' -- "$cur") );;
215
+ storage-migration-status) COMPREPLY=( $(compgen -W '--help --json --path --version' -- "$cur") );;
216
+ storage-restore) COMPREPLY=( $(compgen -W '--help --json --path --replace-active --source --version --writers-quiesced' -- "$cur") );;
217
+ storage-restore-resume) COMPREPLY=( $(compgen -W '--expected-owner --help --json --operation --path --replace-active --version --writers-quiesced' -- "$cur") );;
218
+ storage-rollback) COMPREPLY=( $(compgen -W '--destination --help --json --legacy-root --native-writes-excluded --path --version --writers-quiesced' -- "$cur") );;
219
+ storage-rollback-resume) COMPREPLY=( $(compgen -W '--destination --expected-owner --help --json --legacy-root --native-writes-excluded --path --version --writers-quiesced' -- "$cur") );;
204
220
  task-abandon) COMPREPLY=( $(compgen -W '--acknowledge-abandonment --help --json --path --task --version' -- "$cur") );;
205
221
  task-create) COMPREPLY=( $(compgen -W '--claim --contract-file --help --json --path --preset --preview --task --version' -- "$cur") );;
206
222
  task-list) COMPREPLY=( $(compgen -W '--active --help --json --limit --offset --path --phase --version' -- "$cur") );;
207
223
  task-lock-status) COMPREPLY=( $(compgen -W '--help --json --path --task --version' -- "$cur") );;
208
- task-migrate) COMPREPLY=( $(compgen -W '--dry-run --help --json --path --version' -- "$cur") );;
224
+ task-migrate) COMPREPLY=( $(compgen -W '--destination --dry-run --help --json --path --version --writers-quiesced' -- "$cur") );;
209
225
  task-migrate-contract-bootstrap-repair) COMPREPLY=( $(compgen -W '--acknowledge-migration --help --json --path --task --version' -- "$cur") );;
210
226
  task-recover) COMPREPLY=( $(compgen -W '--acknowledge-recovery --help --json --operator-authorized --path --task --version' -- "$cur") );;
211
227
  task-repair-contract-bootstrap) COMPREPLY=( $(compgen -W '--acknowledge-repair --help --json --path --task --version' -- "$cur") );;
@@ -1,5 +1,5 @@
1
1
  # Generated by scripts/generate-shell-completions.mjs. Do not edit.
2
- complete -c forgeloop -f -n '__fish_use_subcommand' -a 'action-authorize action-propose action-reconcile action-record action-show action-verify activate advance approval-request approval-resolve attestation-create attestation-status attestation-verify attestation-verify-range audit baseline bundle checkpoint-revalidate clear-continuity clear-state complete context-plan continuity contract-create contract-revise decision-show decision-status discover doctor efficiency eval gate-record gate-revalidate handoff-accept handoff-create handoff-list handoff-show history index-rebuild index-setup index-start index-status index-stop init inspect metrics migrate-protocol model-route next policy policy-diff policy-discover policy-status preflight prepare-completion profile-interview progress protocol-info quality-baseline quality-status quality-verify reconcile-closure reconcile-continuity record-check record-continuity record-decision-criterion record-diagnosis record-hypothesis-disposition record-intervention record-terminal-result reflect report responsibility-set responsibility-status route rule-verify run-action run-check search semantic-plan status task-abandon task-create task-list task-lock-status task-migrate task-migrate-contract-bootstrap-repair task-recover task-repair-contract-bootstrap task-repair-legacy-recovery task-resume task-scope task-show task-unlock test-inventory test-prune-plan test-prune-probe test-utility trace update usage-record validate-protocol validate-receipt validate-state verify-scope workspace-bind workspace-status'
2
+ complete -c forgeloop -f -n '__fish_use_subcommand' -a 'action-authorize action-propose action-reconcile action-record action-show action-verify activate advance approval-request approval-resolve attestation-create attestation-status attestation-verify attestation-verify-range audit baseline bundle checkpoint-revalidate clear-continuity clear-state complete context-plan continuity contract-create contract-revise decision-show decision-status discover doctor efficiency eval gate-record gate-revalidate handoff-accept handoff-create handoff-list handoff-show history index-rebuild index-setup index-start index-status index-stop init inspect metrics migrate-protocol model-route next policy policy-diff policy-discover policy-status preflight prepare-completion profile-interview progress protocol-info quality-baseline quality-status quality-verify reconcile-closure reconcile-continuity record-check record-continuity record-decision-criterion record-diagnosis record-hypothesis-disposition record-intervention record-terminal-result reflect report responsibility-set responsibility-status route rule-verify run-action run-check search semantic-plan status storage-backup storage-migrate storage-migration-resume storage-migration-status storage-restore storage-restore-resume storage-rollback storage-rollback-resume task-abandon task-create task-list task-lock-status task-migrate task-migrate-contract-bootstrap-repair task-recover task-repair-contract-bootstrap task-repair-legacy-recovery task-resume task-scope task-show task-unlock test-inventory test-prune-plan test-prune-probe test-utility trace update usage-record validate-protocol validate-receipt validate-state verify-scope workspace-bind workspace-status'
3
3
  complete -c forgeloop -f -n '__fish_seen_subcommand_from action-authorize' -l 'action' -d 'durable action ID'
4
4
  complete -c forgeloop -f -n '__fish_seen_subcommand_from action-authorize' -l 'approval' -d 'current fingerprint-bound approval'
5
5
  complete -c forgeloop -f -n '__fish_seen_subcommand_from action-authorize' -l 'help' -d 'show this help'
@@ -312,12 +312,14 @@ complete -c forgeloop -f -n '__fish_seen_subcommand_from metrics' -l 'json' -d '
312
312
  complete -c forgeloop -f -n '__fish_seen_subcommand_from metrics' -l 'path' -d 'target project directory (default: current directory)'
313
313
  complete -c forgeloop -f -n '__fish_seen_subcommand_from metrics' -l 'task' -d 'task ID to operate on (when omitted, resolved from context or single active task)'
314
314
  complete -c forgeloop -f -n '__fish_seen_subcommand_from metrics' -l 'version' -d 'show the installed package version'
315
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from migrate-protocol' -l 'destination' -d 'retained source and publication evidence destination'
315
316
  complete -c forgeloop -f -n '__fish_seen_subcommand_from migrate-protocol' -l 'dry-run' -d 'show migration actions without writing or deleting artifacts'
316
317
  complete -c forgeloop -f -n '__fish_seen_subcommand_from migrate-protocol' -l 'help' -d 'show this help'
317
318
  complete -c forgeloop -f -n '__fish_seen_subcommand_from migrate-protocol' -l 'json' -d 'emit structured migration result as JSON'
318
319
  complete -c forgeloop -f -n '__fish_seen_subcommand_from migrate-protocol' -l 'path' -d 'target project directory (default: current directory)'
319
320
  complete -c forgeloop -f -n '__fish_seen_subcommand_from migrate-protocol' -l 'to' -d 'target supported protocol version'
320
321
  complete -c forgeloop -f -n '__fish_seen_subcommand_from migrate-protocol' -l 'version' -d 'show the installed package version'
322
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from migrate-protocol' -l 'writers-quiesced' -d 'confirm all legacy writers are stopped and excluded'
321
323
  complete -c forgeloop -f -n '__fish_seen_subcommand_from model-route' -l 'ambiguous' -d 'declare unresolved ambiguity'
322
324
  complete -c forgeloop -f -n '__fish_seen_subcommand_from model-route' -l 'architecture-change' -d 'declare an architectural change'
323
325
  complete -c forgeloop -f -n '__fish_seen_subcommand_from model-route' -l 'behavior-change' -d 'declare behavior change'
@@ -592,6 +594,62 @@ complete -c forgeloop -f -n '__fish_seen_subcommand_from status' -l 'json' -d 'e
592
594
  complete -c forgeloop -f -n '__fish_seen_subcommand_from status' -l 'path' -d 'target project directory (default: current directory)'
593
595
  complete -c forgeloop -f -n '__fish_seen_subcommand_from status' -l 'task' -d 'task ID to operate on (when omitted, resolved from context or single active task)'
594
596
  complete -c forgeloop -f -n '__fish_seen_subcommand_from status' -l 'version' -d 'show the installed package version'
597
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-backup' -l 'destination' -d 'new backup file or attachment-inclusive directory relative to the project; parent directory must exist'
598
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-backup' -l 'help' -d 'show this help'
599
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-backup' -l 'include-attachments' -d 'create a new backup directory including all canonically referenced attachment bytes'
600
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-backup' -l 'json' -d 'emit backup metadata'
601
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-backup' -l 'path' -d 'target project directory (default: current directory)'
602
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-backup' -l 'version' -d 'show the installed package version'
603
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migrate' -l 'destination' -d 'new retained migration directory relative to the project; missing parent directories are created'
604
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migrate' -l 'help' -d 'show this help'
605
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migrate' -l 'json' -d 'emit migration publication and verification metadata'
606
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migrate' -l 'path' -d 'target project directory (default: current directory)'
607
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migrate' -l 'version' -d 'show the installed package version'
608
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migrate' -l 'writers-quiesced' -d 'assert that all writers, including older clients, have been externally stopped'
609
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migration-resume' -l 'destination' -d 'retained migration directory relative to the project'
610
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migration-resume' -l 'expected-owner' -d 'exact retained maintenance owner reported by storage-migration-status'
611
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migration-resume' -l 'help' -d 'show this help'
612
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migration-resume' -l 'json' -d 'emit recovery verification metadata'
613
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migration-resume' -l 'path' -d 'target project directory (default: current directory)'
614
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migration-resume' -l 'reconcile-unbound-handoff' -d 'preserve an unbound legacy handoff by atomic archival before resuming the exact dead owner'
615
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migration-resume' -l 'version' -d 'show the installed package version'
616
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migration-resume' -l 'writers-quiesced' -d 'assert that all writers, including older clients, have been externally stopped'
617
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migration-status' -l 'help' -d 'show this help'
618
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migration-status' -l 'json' -d 'emit bootstrap storage layout and retained maintenance ownership'
619
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migration-status' -l 'path' -d 'target project directory (default: current directory)'
620
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-migration-status' -l 'version' -d 'show the installed package version'
621
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore' -l 'help' -d 'show this help'
622
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore' -l 'json' -d 'emit restore activation metadata'
623
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore' -l 'path' -d 'target project directory (default: current directory)'
624
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore' -l 'replace-active' -d 'explicitly select active replacement with retained outgoing authority'
625
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore' -l 'source' -d 'verified attachment-inclusive backup directory; absolute or relative to the target project'
626
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore' -l 'version' -d 'show the installed package version'
627
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore' -l 'writers-quiesced' -d 'assert that all writers have been externally stopped'
628
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore-resume' -l 'expected-owner' -d 'exact retained maintenance owner UUID'
629
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore-resume' -l 'help' -d 'show this help'
630
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore-resume' -l 'json' -d 'emit restore recovery metadata'
631
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore-resume' -l 'operation' -d 'exact retained restore journal operation UUID'
632
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore-resume' -l 'path' -d 'target project directory (default: current directory)'
633
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore-resume' -l 'replace-active' -d 'explicitly select active replacement with retained outgoing authority'
634
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore-resume' -l 'version' -d 'show the installed package version'
635
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-restore-resume' -l 'writers-quiesced' -d 'assert that all writers have been externally stopped'
636
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback' -l 'destination' -d 'retained published migration directory relative to the project'
637
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback' -l 'help' -d 'show this help'
638
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback' -l 'json' -d 'emit restoration and target-validation metadata'
639
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback' -l 'legacy-root' -d 'clean supported pinned legacy checkout used for actual target validation'
640
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback' -l 'native-writes-excluded' -d 'assert that native writes have been excluded since migration; snapshot equality alone does not prove this'
641
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback' -l 'path' -d 'target project directory (default: current directory)'
642
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback' -l 'version' -d 'show the installed package version'
643
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback' -l 'writers-quiesced' -d 'assert that all writers, including older clients, have been externally stopped and excluded'
644
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback-resume' -l 'destination' -d 'retained migration with recorded rollback preparation, staging or publication'
645
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback-resume' -l 'expected-owner' -d 'exact retained dead local owner reported by storage-migration-status'
646
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback-resume' -l 'help' -d 'show this help'
647
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback-resume' -l 'json' -d 'emit restoration and target-validation metadata'
648
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback-resume' -l 'legacy-root' -d 'clean supported pinned legacy checkout used for actual target validation'
649
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback-resume' -l 'native-writes-excluded' -d 'assert that native writes have been excluded since migration; snapshot equality alone does not prove this'
650
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback-resume' -l 'path' -d 'target project directory (default: current directory)'
651
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback-resume' -l 'version' -d 'show the installed package version'
652
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from storage-rollback-resume' -l 'writers-quiesced' -d 'assert that all writers, including older clients, have been externally stopped and excluded'
595
653
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-abandon' -l 'acknowledge-abandonment' -d 'explicitly acknowledge abandonment of an active task (required; not completion authority)'
596
654
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-abandon' -l 'help' -d 'show this help'
597
655
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-abandon' -l 'json' -d 'emit structured abandonment output as JSON'
@@ -620,11 +678,13 @@ complete -c forgeloop -f -n '__fish_seen_subcommand_from task-lock-status' -l 'j
620
678
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-lock-status' -l 'path' -d 'target project directory (default: current directory)'
621
679
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-lock-status' -l 'task' -d 'task ID to operate on (when omitted, resolved from context or single active task)'
622
680
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-lock-status' -l 'version' -d 'show the installed package version'
681
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from task-migrate' -l 'destination' -d 'retained source and publication evidence destination'
623
682
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-migrate' -l 'dry-run' -d 'show planned migration actions without moving files'
624
683
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-migrate' -l 'help' -d 'show this help'
625
684
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-migrate' -l 'json' -d 'emit structured output as JSON'
626
685
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-migrate' -l 'path' -d 'target project directory (default: current directory)'
627
686
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-migrate' -l 'version' -d 'show the installed package version'
687
+ complete -c forgeloop -f -n '__fish_seen_subcommand_from task-migrate' -l 'writers-quiesced' -d 'confirm all legacy writers are stopped and excluded'
628
688
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-migrate-contract-bootstrap-repair' -l 'acknowledge-migration' -d 'fresh explicit caller acknowledgement of the exact legacy marker migration (required)'
629
689
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-migrate-contract-bootstrap-repair' -l 'help' -d 'show this help'
630
690
  complete -c forgeloop -f -n '__fish_seen_subcommand_from task-migrate-contract-bootstrap-repair' -l 'json' -d 'emit structured migration output as JSON'