@cassiomc1/forgeloop 1.10.0 → 1.10.2

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 (67) hide show
  1. package/DOCS_INDEX.md +12 -1
  2. package/LOOP_ENGINEERING.md +4 -4
  3. package/LOOP_SYSTEM_DESIGN.md +23 -0
  4. package/QUALITY_SCORECARD.md +2 -2
  5. package/README.md +22 -8
  6. package/docs/ADVISORY_CONTEXT.md +24 -0
  7. package/docs/AGENT_PROTOCOL_SUMMARY.md +1 -1
  8. package/docs/ARTIFACT_REFERENCE.md +15 -0
  9. package/docs/CODE_ATTESTATION.md +9 -0
  10. package/docs/DOCUMENTATION_GUIDE.md +4 -4
  11. package/docs/EXECUTION_PROFILE_BENCHMARKS.md +10 -0
  12. package/docs/MCP.md +13 -1
  13. package/docs/PACKAGE_CONTENTS.md +88 -0
  14. package/docs/RELEASE_CHECKLIST.md +10 -2
  15. package/docs/REVISION_PROVIDERS.md +9 -0
  16. package/docs/RIPWIRE_ADAPTER.md +189 -0
  17. package/docs/TROUBLESHOOTING.md +12 -0
  18. package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +13 -2
  19. package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +6 -6
  20. package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +10 -1
  21. package/docs/assets/diagrams/forgeloop-engineering-flow.html +22 -11
  22. package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
  23. package/docs/assets/diagrams/forgeloop-engineering-flow.svg +17 -8
  24. package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +14 -3
  25. package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +6 -6
  26. package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +10 -1
  27. package/docs/diagrams/README.md +26 -0
  28. package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +383 -57
  29. package/docs/diagrams/forgeloop-engineering-flow.workflow.json +374 -55
  30. package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +328 -47
  31. package/docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json +4 -4
  32. package/docs/diagrams/reviews/forgeloop-engineering-flow.review.json +4 -4
  33. package/docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json +4 -4
  34. package/package.json +14 -4
  35. package/scripts/CI_VALIDATORS.md +24 -0
  36. package/scripts/check-critical-coverage.mjs +9 -0
  37. package/src/adapters/ripwire/normalize.js +352 -0
  38. package/src/adapters/ripwire/process.js +248 -0
  39. package/src/adapters/ripwire/provider.js +245 -0
  40. package/src/commands/doctor.js +11 -10
  41. package/src/core/actions.js +2 -2
  42. package/src/core/advisory-context/service.js +36 -14
  43. package/src/core/approvals.js +2 -2
  44. package/src/core/artifacts.js +3 -3
  45. package/src/core/checks.js +0 -33
  46. package/src/core/completion.js +2 -2
  47. package/src/core/events.js +5 -5
  48. package/src/core/execution-profile.js +18 -5
  49. package/src/core/handoff-acceptance.js +10 -1
  50. package/src/core/next-action-pending-actions.js +255 -0
  51. package/src/core/next-action-phases.js +26 -764
  52. package/src/core/next-action-planned-phase.js +51 -0
  53. package/src/core/next-action-quality-guidance.js +19 -0
  54. package/src/core/next-action-recovery-phases.js +97 -0
  55. package/src/core/next-action-refresh.js +20 -0
  56. package/src/core/next-action-review-phase.js +189 -0
  57. package/src/core/next-action-verification-phase.js +192 -0
  58. package/src/core/task-recovery.js +2 -2
  59. package/src/core/transaction-maintenance.js +70 -0
  60. package/src/core/transaction.js +31 -10
  61. package/src/core/work-state.js +20 -11
  62. package/src/integration.d.ts +30 -3
  63. package/src/integration.js +2 -0
  64. package/src/core/cli-metadata.js +0 -23
  65. package/src/core/decision-classification.js +0 -55
  66. package/src/core/gates.js +0 -57
  67. package/src/core/workflow-compatibility.js +0 -151
@@ -3,7 +3,7 @@
3
3
  "diagram_type": "workflow",
4
4
  "meta": {
5
5
  "title": "ForgeLoop Evidence-First Engineering Flow",
6
- "subtitle": "Typed intent scoped work observed evidence validator-backed closure",
6
+ "subtitle": "Structured intent \u2192 project-bound work \u2192 observed evidence \u2192 valid closure",
7
7
  "animation": "trace",
8
8
  "visual_preset": "signal-flow",
9
9
  "quality_profile": "showcase",
@@ -11,84 +11,401 @@
11
11
  {
12
12
  "id": "contract-to-work",
13
13
  "label": "Contract to work",
14
- "focus": ["request", "profile", "contract", "route", "gates", "preflight", "work"],
15
- "note": "Follow how a request becomes scoped, routed, and safe to execute."
14
+ "focus": [
15
+ "request",
16
+ "profile",
17
+ "contract",
18
+ "route",
19
+ "gates",
20
+ "preflight",
21
+ "work"
22
+ ],
23
+ "note": "Structured obligations and explicit risks set the profile; exclusions do not create required actions."
16
24
  },
17
25
  {
18
26
  "id": "evidence-to-close",
19
27
  "label": "Evidence to close",
20
- "focus": ["work", "evidence", "review", "valid"],
28
+ "focus": [
29
+ "work",
30
+ "evidence",
31
+ "review",
32
+ "valid"
33
+ ],
21
34
  "note": "See the evidence and review boundary that makes completion trustworthy."
22
35
  },
23
36
  {
24
37
  "id": "recovery-loop",
25
38
  "label": "Recovery loop",
26
- "focus": ["evidence", "diagnose", "correct", "preflight", "blocked"],
27
- "note": "Failures return to diagnosis and correction before another claim is made."
39
+ "focus": [
40
+ "evidence",
41
+ "diagnose",
42
+ "correct",
43
+ "preflight",
44
+ "blocked"
45
+ ],
46
+ "note": "Before execution, blocked refresh needs a valid ledger and revised route. Later failures use diagnosis and correction."
28
47
  }
29
48
  ],
30
49
  "legend": {
31
50
  "mode": "auto",
32
51
  "entries": {
33
- "frontend": { "label": "Human-facing surface" },
34
- "backend": { "label": "ForgeLoop state" },
35
- "database": { "label": "Durable evidence" },
36
- "cloud": { "label": "External boundary" },
37
- "security": { "label": "Policy or gate" },
38
- "messagebus": { "label": "Recovery signal" },
39
- "external": { "label": "Request or result" }
52
+ "frontend": {
53
+ "label": "Human-facing surface"
54
+ },
55
+ "backend": {
56
+ "label": "ForgeLoop state"
57
+ },
58
+ "database": {
59
+ "label": "Durable evidence"
60
+ },
61
+ "cloud": {
62
+ "label": "External boundary"
63
+ },
64
+ "security": {
65
+ "label": "Policy or gate"
66
+ },
67
+ "messagebus": {
68
+ "label": "Recovery signal"
69
+ },
70
+ "external": {
71
+ "label": "Request or result"
72
+ }
40
73
  }
41
74
  },
42
- "viewBox": [720, 900]
75
+ "viewBox": [
76
+ 850,
77
+ 900
78
+ ]
43
79
  },
44
80
  "lanes": [
45
- { "id": "intent", "label": "Intent + Context" },
46
- { "id": "policy", "label": "Policy Boundary" },
47
- { "id": "execution", "label": "Resumable Execution" },
48
- { "id": "evidence", "label": "Evidence Ledger" },
49
- { "id": "recovery", "label": "Recovery + Stops", "variant": "exception" },
50
- { "id": "closure", "label": "Review + Closure" }
81
+ {
82
+ "id": "intent",
83
+ "label": "Intent + Context"
84
+ },
85
+ {
86
+ "id": "policy",
87
+ "label": "Policy Boundary"
88
+ },
89
+ {
90
+ "id": "execution",
91
+ "label": "Resumable Execution"
92
+ },
93
+ {
94
+ "id": "evidence",
95
+ "label": "Evidence Ledger"
96
+ },
97
+ {
98
+ "id": "recovery",
99
+ "label": "Recovery + Stops",
100
+ "variant": "exception"
101
+ },
102
+ {
103
+ "id": "closure",
104
+ "label": "Review + Closure"
105
+ }
51
106
  ],
52
107
  "phases": [
53
- { "id": "discover", "label": "Discover + scope", "fromCol": 0, "toCol": 2 },
54
- { "id": "authorize", "label": "Route + authorize", "fromCol": 3, "toCol": 4, "variant": "emphasis" },
55
- { "id": "verify", "label": "Execute + verify", "fromCol": 5, "toCol": 5, "variant": "dashed" }
108
+ {
109
+ "id": "discover",
110
+ "label": "Discover + scope",
111
+ "fromCol": 0,
112
+ "toCol": 2
113
+ },
114
+ {
115
+ "id": "authorize",
116
+ "label": "Route + authorize",
117
+ "fromCol": 3,
118
+ "toCol": 4,
119
+ "variant": "emphasis"
120
+ },
121
+ {
122
+ "id": "verify",
123
+ "label": "Execute + verify",
124
+ "fromCol": 5,
125
+ "toCol": 5,
126
+ "variant": "dashed"
127
+ }
56
128
  ],
57
129
  "groups": [
58
- { "id": "contract_boundary", "label": "Contract boundary", "lane": "policy", "fromCol": 3, "toCol": 5, "variant": "emphasis" },
59
- { "id": "evidence_boundary", "label": "Evidence boundary", "lane": "evidence", "fromCol": 4, "toCol": 5, "variant": "dashed" },
60
- { "id": "recovery_path", "label": "Reconcile before retry", "lane": "recovery", "fromCol": 0, "toCol": 2, "variant": "security" }
130
+ {
131
+ "id": "contract_boundary",
132
+ "label": "Contract boundary",
133
+ "lane": "policy",
134
+ "fromCol": 3,
135
+ "toCol": 5,
136
+ "variant": "emphasis"
137
+ },
138
+ {
139
+ "id": "evidence_boundary",
140
+ "label": "Evidence boundary",
141
+ "lane": "evidence",
142
+ "fromCol": 4,
143
+ "toCol": 5,
144
+ "variant": "dashed"
145
+ },
146
+ {
147
+ "id": "recovery_path",
148
+ "label": "Reconcile before retry",
149
+ "lane": "recovery",
150
+ "fromCol": 0,
151
+ "toCol": 2,
152
+ "variant": "security"
153
+ }
154
+ ],
155
+ "mainPath": [
156
+ "request",
157
+ "profile",
158
+ "contract",
159
+ "route",
160
+ "gates",
161
+ "preflight",
162
+ "work",
163
+ "evidence",
164
+ "review",
165
+ "valid"
61
166
  ],
62
- "mainPath": ["request", "profile", "contract", "route", "gates", "preflight", "work", "evidence", "review", "valid"],
63
167
  "nodes": [
64
- { "id": "request", "lane": "intent", "col": 0, "type": "external", "label": "Request", "sublabel": "intent", "width": 50 },
65
- { "id": "profile", "lane": "intent", "col": 1, "type": "backend", "label": "Profile", "sublabel": "discover", "width": 50 },
66
- { "id": "contract", "lane": "intent", "col": 2, "type": "security", "label": "Contract", "sublabel": "scope", "tag": "saved", "width": 50 },
67
- { "id": "route", "lane": "policy", "col": 2, "type": "security", "label": "Route", "sublabel": "guides", "tag": "fail closed", "width": 50 },
68
- { "id": "gates", "lane": "policy", "col": 3, "type": "security", "label": "Claims", "sublabel": "Task + gates", "width": 62 },
69
- { "id": "preflight", "lane": "policy", "col": 4, "type": "security", "label": "READY", "sublabel": "binding", "tag": "Preflight", "width": 60 },
70
- { "id": "work", "lane": "execution", "col": 4, "type": "backend", "label": "Execution", "sublabel": "checkpoint", "width": 62 },
71
- { "id": "evidence", "lane": "evidence", "col": 4, "type": "database", "label": "Evidence", "sublabel": "scope + checks", "tag": "observed", "width": 70 },
72
- { "id": "review", "lane": "closure", "col": 5, "type": "backend", "label": "Review", "sublabel": "drift", "width": 50 },
73
- { "id": "valid", "lane": "evidence", "col": 5, "type": "database", "label": "VALID", "sublabel": "completion", "tag": "claim", "width": 50 },
74
- { "id": "diagnose", "lane": "recovery", "col": 2, "type": "messagebus", "label": "Diagnose", "sublabel": "failure", "width": 50 },
75
- { "id": "correct", "lane": "recovery", "col": 1, "type": "backend", "label": "Correct", "sublabel": "repair", "width": 50 },
76
- { "id": "blocked", "lane": "recovery", "col": 0, "type": "security", "label": "Blocked", "sublabel": "stop", "width": 50 }
168
+ {
169
+ "id": "request",
170
+ "lane": "intent",
171
+ "col": 0,
172
+ "type": "external",
173
+ "label": "Request",
174
+ "sublabel": "intent",
175
+ "width": 50
176
+ },
177
+ {
178
+ "id": "profile",
179
+ "lane": "intent",
180
+ "col": 1,
181
+ "type": "backend",
182
+ "label": "Profile",
183
+ "sublabel": "discover",
184
+ "width": 50
185
+ },
186
+ {
187
+ "id": "contract",
188
+ "lane": "intent",
189
+ "col": 2,
190
+ "type": "security",
191
+ "label": "Contract",
192
+ "sublabel": "scope",
193
+ "tag": "saved",
194
+ "width": 50
195
+ },
196
+ {
197
+ "id": "route",
198
+ "lane": "policy",
199
+ "col": 2,
200
+ "type": "security",
201
+ "label": "Route",
202
+ "sublabel": "guides",
203
+ "tag": "fail closed",
204
+ "width": 50
205
+ },
206
+ {
207
+ "id": "gates",
208
+ "lane": "policy",
209
+ "col": 3,
210
+ "type": "security",
211
+ "label": "Claims",
212
+ "sublabel": "Task + gates",
213
+ "width": 62
214
+ },
215
+ {
216
+ "id": "preflight",
217
+ "lane": "policy",
218
+ "col": 4,
219
+ "type": "security",
220
+ "label": "READY",
221
+ "sublabel": "binding",
222
+ "tag": "Preflight",
223
+ "width": 60
224
+ },
225
+ {
226
+ "id": "work",
227
+ "lane": "execution",
228
+ "col": 4,
229
+ "type": "backend",
230
+ "label": "Execution",
231
+ "sublabel": "root + task",
232
+ "width": 62
233
+ },
234
+ {
235
+ "id": "evidence",
236
+ "lane": "evidence",
237
+ "col": 4,
238
+ "type": "database",
239
+ "label": "Evidence",
240
+ "sublabel": "run-check",
241
+ "tag": "observed",
242
+ "width": 70
243
+ },
244
+ {
245
+ "id": "review",
246
+ "lane": "closure",
247
+ "col": 5,
248
+ "type": "backend",
249
+ "label": "Review",
250
+ "sublabel": "drift",
251
+ "width": 50
252
+ },
253
+ {
254
+ "id": "valid",
255
+ "lane": "evidence",
256
+ "col": 5,
257
+ "type": "database",
258
+ "label": "VALID",
259
+ "sublabel": "completion",
260
+ "tag": "claim",
261
+ "width": 50
262
+ },
263
+ {
264
+ "id": "diagnose",
265
+ "lane": "recovery",
266
+ "col": 2,
267
+ "type": "messagebus",
268
+ "label": "Diagnose",
269
+ "sublabel": "failure",
270
+ "width": 50
271
+ },
272
+ {
273
+ "id": "correct",
274
+ "lane": "recovery",
275
+ "col": 1,
276
+ "type": "backend",
277
+ "label": "Correct",
278
+ "sublabel": "repair",
279
+ "width": 50
280
+ },
281
+ {
282
+ "id": "blocked",
283
+ "lane": "recovery",
284
+ "col": 0,
285
+ "type": "security",
286
+ "label": "Blocked",
287
+ "sublabel": "stop",
288
+ "width": 50
289
+ }
77
290
  ],
78
291
  "edges": [
79
- { "id": "request-profile", "from": "request", "to": "profile", "variant": "emphasis" },
80
- { "id": "profile-contract", "from": "profile", "to": "contract", "variant": "default" },
81
- { "id": "contract-route", "from": "contract", "to": "route", "variant": "emphasis", "fromSide": "bottom", "toSide": "top", "route": "drop" },
82
- { "id": "route-gates", "from": "route", "to": "gates", "variant": "emphasis" },
83
- { "id": "gates-preflight", "from": "gates", "to": "preflight", "variant": "security", "fromSide": "bottom", "toSide": "bottom", "route": "bottom-channel", "channelY": 312 },
84
- { "id": "preflight-work", "from": "preflight", "to": "work", "variant": "emphasis", "fromSide": "bottom", "toSide": "top", "route": "drop" },
85
- { "id": "work-evidence", "from": "work", "to": "evidence", "variant": "dashed", "fromSide": "bottom", "toSide": "top", "route": "drop" },
86
- { "id": "evidence-review", "from": "evidence", "to": "review", "variant": "emphasis", "fromSide": "left", "toSide": "left", "route": "return-left", "channelX": 360 },
87
- { "id": "review-valid", "from": "review", "to": "valid", "variant": "emphasis", "fromSide": "right", "toSide": "right", "route": "outside-right", "channelX": 760 },
88
- { "id": "evidence-diagnose", "from": "evidence", "to": "diagnose", "variant": "security", "role": "error", "fromSide": "left", "toSide": "right", "route": "return-left", "channelX": 360 },
89
- { "id": "diagnose-correct", "from": "diagnose", "to": "correct", "variant": "dashed", "role": "branch", "fromSide": "left", "toSide": "right", "route": "return-left" },
90
- { "id": "correct-evidence", "from": "correct", "to": "evidence", "variant": "security", "role": "return", "fromSide": "left", "toSide": "left", "route": "return-left", "channelX": 160 },
91
- { "id": "correct-blocked", "from": "correct", "to": "blocked", "variant": "dashed", "role": "branch", "fromSide": "left", "toSide": "right", "route": "return-left" }
292
+ {
293
+ "id": "request-profile",
294
+ "from": "request",
295
+ "to": "profile",
296
+ "variant": "emphasis"
297
+ },
298
+ {
299
+ "id": "profile-contract",
300
+ "from": "profile",
301
+ "to": "contract",
302
+ "variant": "default"
303
+ },
304
+ {
305
+ "id": "contract-route",
306
+ "from": "contract",
307
+ "to": "route",
308
+ "variant": "emphasis",
309
+ "fromSide": "bottom",
310
+ "toSide": "top",
311
+ "route": "drop"
312
+ },
313
+ {
314
+ "id": "route-gates",
315
+ "from": "route",
316
+ "to": "gates",
317
+ "variant": "emphasis"
318
+ },
319
+ {
320
+ "id": "gates-preflight",
321
+ "from": "gates",
322
+ "to": "preflight",
323
+ "variant": "security",
324
+ "fromSide": "bottom",
325
+ "toSide": "bottom",
326
+ "route": "bottom-channel",
327
+ "channelY": 312
328
+ },
329
+ {
330
+ "id": "preflight-work",
331
+ "from": "preflight",
332
+ "to": "work",
333
+ "variant": "emphasis",
334
+ "fromSide": "bottom",
335
+ "toSide": "top",
336
+ "route": "drop"
337
+ },
338
+ {
339
+ "id": "work-evidence",
340
+ "from": "work",
341
+ "to": "evidence",
342
+ "variant": "dashed",
343
+ "fromSide": "bottom",
344
+ "toSide": "top",
345
+ "route": "drop"
346
+ },
347
+ {
348
+ "id": "evidence-review",
349
+ "from": "evidence",
350
+ "to": "review",
351
+ "variant": "emphasis",
352
+ "fromSide": "left",
353
+ "toSide": "left",
354
+ "route": "return-left",
355
+ "channelX": 360
356
+ },
357
+ {
358
+ "id": "review-valid",
359
+ "from": "review",
360
+ "to": "valid",
361
+ "variant": "emphasis",
362
+ "fromSide": "right",
363
+ "toSide": "right",
364
+ "route": "outside-right",
365
+ "channelX": 760
366
+ },
367
+ {
368
+ "id": "evidence-diagnose",
369
+ "from": "evidence",
370
+ "to": "diagnose",
371
+ "variant": "security",
372
+ "role": "error",
373
+ "fromSide": "left",
374
+ "toSide": "right",
375
+ "route": "return-left",
376
+ "channelX": 360
377
+ },
378
+ {
379
+ "id": "diagnose-correct",
380
+ "from": "diagnose",
381
+ "to": "correct",
382
+ "variant": "dashed",
383
+ "role": "branch",
384
+ "fromSide": "left",
385
+ "toSide": "right",
386
+ "route": "return-left"
387
+ },
388
+ {
389
+ "id": "correct-evidence",
390
+ "from": "correct",
391
+ "to": "evidence",
392
+ "variant": "security",
393
+ "role": "return",
394
+ "fromSide": "left",
395
+ "toSide": "left",
396
+ "route": "return-left",
397
+ "channelX": 160
398
+ },
399
+ {
400
+ "id": "correct-blocked",
401
+ "from": "correct",
402
+ "to": "blocked",
403
+ "variant": "dashed",
404
+ "role": "branch",
405
+ "fromSide": "left",
406
+ "toSide": "right",
407
+ "route": "return-left"
408
+ }
92
409
  ],
93
410
  "cards": [
94
411
  {
@@ -98,7 +415,8 @@
98
415
  "Execution starts only after PREFLIGHT_READY",
99
416
  "Workspace binding is optional but blocks mismatched execution",
100
417
  "Failures return to diagnosis before another claim",
101
- "Completion is validator-backed, not inferred from a screenshot"
418
+ "Completion is validator-backed, not inferred from a screenshot",
419
+ "Blocked pre-execution refresh requires a valid ledger and revised route"
102
420
  ]
103
421
  },
104
422
  {
@@ -108,7 +426,8 @@
108
426
  "Verification scope narrows only through a fresh canonical boundary",
109
427
  "run-check binds exact commands to an execution reference",
110
428
  "record-check covers manual observations",
111
- "Drift reopens verification instead of being hidden"
429
+ "Drift reopens verification instead of being hidden",
430
+ "Matching task IDs never authorize cross-project transaction reuse"
112
431
  ]
113
432
  },
114
433
  {