@tacuchi/agent-workflow-cli 21.5.0 → 21.7.0

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 (101) hide show
  1. package/dist/application/artifacts-service.js +10 -0
  2. package/dist/application/artifacts-service.js.map +1 -1
  3. package/dist/application/capability/design-handler.js +224 -12
  4. package/dist/application/capability/design-handler.js.map +1 -1
  5. package/dist/application/capability/dispatcher.js +20 -6
  6. package/dist/application/capability/dispatcher.js.map +1 -1
  7. package/dist/application/capability/durable-effect.js +23 -157
  8. package/dist/application/capability/durable-effect.js.map +1 -1
  9. package/dist/application/checkpoint-service.js +49 -3
  10. package/dist/application/checkpoint-service.js.map +1 -1
  11. package/dist/application/checkpoint-write-service.js +5 -0
  12. package/dist/application/checkpoint-write-service.js.map +1 -1
  13. package/dist/application/design/design-gate-service.js +18 -0
  14. package/dist/application/design/design-gate-service.js.map +1 -1
  15. package/dist/application/design/design-index-service.js +2 -0
  16. package/dist/application/design/design-index-service.js.map +1 -1
  17. package/dist/application/design/design-resolver-service.js +18 -1
  18. package/dist/application/design/design-resolver-service.js.map +1 -1
  19. package/dist/application/design/design-simple-service.js +217 -0
  20. package/dist/application/design/design-simple-service.js.map +1 -0
  21. package/dist/application/flow/advance.js +96 -11
  22. package/dist/application/flow/advance.js.map +1 -1
  23. package/dist/application/flow/flow-service.js +12 -1
  24. package/dist/application/flow/flow-service.js.map +1 -1
  25. package/dist/application/flow/internal-actions.js +221 -0
  26. package/dist/application/flow/internal-actions.js.map +1 -0
  27. package/dist/application/flow/internal-drive.js +293 -0
  28. package/dist/application/flow/internal-drive.js.map +1 -0
  29. package/dist/application/flow/submit.js +242 -84
  30. package/dist/application/flow/submit.js.map +1 -1
  31. package/dist/application/local-proposal.js +171 -0
  32. package/dist/application/local-proposal.js.map +1 -0
  33. package/dist/application/parsers/decisiones.js +13 -0
  34. package/dist/application/parsers/decisiones.js.map +1 -1
  35. package/dist/application/paths-service.js +11 -1
  36. package/dist/application/paths-service.js.map +1 -1
  37. package/dist/application/resume-service.js +22 -26
  38. package/dist/application/resume-service.js.map +1 -1
  39. package/dist/application/semantic-operation/protocol.js +10 -2
  40. package/dist/application/semantic-operation/protocol.js.map +1 -1
  41. package/dist/application/session-artifacts.js +53 -0
  42. package/dist/application/session-artifacts.js.map +1 -1
  43. package/dist/application/session-close-service.js +5 -0
  44. package/dist/application/session-close-service.js.map +1 -1
  45. package/dist/application/session-narrative.js +294 -0
  46. package/dist/application/session-narrative.js.map +1 -0
  47. package/dist/application/status-service.js +1 -0
  48. package/dist/application/status-service.js.map +1 -1
  49. package/dist/application/workline-index-service.js +2 -0
  50. package/dist/application/workline-index-service.js.map +1 -1
  51. package/dist/cli/commands/capability.js +1 -1
  52. package/dist/cli/commands/capability.js.map +1 -1
  53. package/dist/cli/commands/designs.js +4 -1
  54. package/dist/cli/commands/designs.js.map +1 -1
  55. package/dist/cli/commands/flow.js +14 -0
  56. package/dist/cli/commands/flow.js.map +1 -1
  57. package/dist/cli/commands/session-artifacts.js +55 -2
  58. package/dist/cli/commands/session-artifacts.js.map +1 -1
  59. package/dist/cli/tui/components/git-flow-actions.js +233 -15
  60. package/dist/cli/tui/components/git-flow-actions.js.map +1 -1
  61. package/dist/cli/tui/tabs/project-tab.js +9 -10
  62. package/dist/cli/tui/tabs/project-tab.js.map +1 -1
  63. package/dist/domain/design/capability.js +35 -4
  64. package/dist/domain/design/capability.js.map +1 -1
  65. package/dist/domain/design/direct.js.map +1 -1
  66. package/dist/domain/design/expansion.js +137 -0
  67. package/dist/domain/design/expansion.js.map +1 -0
  68. package/dist/domain/design/manifest.js +61 -8
  69. package/dist/domain/design/manifest.js.map +1 -1
  70. package/dist/domain/design/reference.js +57 -10
  71. package/dist/domain/design/reference.js.map +1 -1
  72. package/dist/domain/design/simple.js +164 -0
  73. package/dist/domain/design/simple.js.map +1 -0
  74. package/dist/domain/flow/answer.js +90 -12
  75. package/dist/domain/flow/answer.js.map +1 -1
  76. package/dist/domain/flow/authority.js +266 -60
  77. package/dist/domain/flow/authority.js.map +1 -1
  78. package/dist/domain/flow/authorization.js +36 -15
  79. package/dist/domain/flow/authorization.js.map +1 -1
  80. package/dist/domain/flow/directive.js +10 -6
  81. package/dist/domain/flow/directive.js.map +1 -1
  82. package/dist/domain/flow/execution-result.js +72 -0
  83. package/dist/domain/flow/execution-result.js.map +1 -0
  84. package/dist/domain/flow/run-state.js +165 -13
  85. package/dist/domain/flow/run-state.js.map +1 -1
  86. package/dist/domain/host-verification.js +8 -8
  87. package/dist/domain/host-verification.js.map +1 -1
  88. package/dist/domain/proposal.js +91 -0
  89. package/dist/domain/proposal.js.map +1 -0
  90. package/dist/domain/session/narrative.js +126 -0
  91. package/dist/domain/session/narrative.js.map +1 -0
  92. package/package.json +1 -1
  93. package/skills/w/SKILL.md +1 -1
  94. package/skills/w/loops/CHASSIS.md +1 -1
  95. package/skills/w/loops/plan-new-loop/LOOP.md +5 -6
  96. package/skills/w/loops/plan-refine-loop/LOOP.md +7 -7
  97. package/skills/w/loops/spec-refine-loop/LOOP.md +6 -4
  98. package/skills/w/modules/DESIGN-REFERENCES.md +50 -56
  99. package/skills/w/roles/design/CONTRACT.md +73 -6
  100. package/skills/w/roles/design/ROLE.md +21 -3
  101. package/skills/w/schemas/design/design-manifest.v1.schema.json +4 -0
@@ -24,7 +24,7 @@
24
24
  import { WORKLINE_FLOWS } from "../../application/capability/compose.js";
25
25
  import { canonicalJson, semanticDigest } from "../../application/semantic-operation/protocol.js";
26
26
  import { isEffectClass } from "../capability/effects.js";
27
- export const FLOW_RUN_STATE_VERSION = 4;
27
+ export const FLOW_RUN_STATE_VERSION = 6;
28
28
  /** The CLI-owned run state inside the session folder. Machine-local, dotted. */
29
29
  export const FLOW_RUN_STATE_FILE = ".flow-run.json";
30
30
  /**
@@ -75,7 +75,9 @@ export function newRunState(flow, session) {
75
75
  boundary: null,
76
76
  pending_action: null,
77
77
  observations: [],
78
+ events: [],
78
79
  authorizations: [],
80
+ proposal: null,
79
81
  effects: { planned: [], approved: [], applied: [] },
80
82
  attempts: [],
81
83
  });
@@ -130,7 +132,42 @@ export function withBoundary(state, boundary) {
130
132
  * something the engine no longer expects.
131
133
  */
132
134
  export function withPendingAction(state, pending) {
133
- return sealRunState({ ...withoutSeal(state), pending_action: pending });
135
+ // Re-emitting the SAME action must not forget that it was already begun. Every
136
+ // advance recomputes the boundary, so a caller that came back after a crash
137
+ // passes through here before the re-entry is decided — and a mark reset on the
138
+ // way in would make the run look untouched at exactly the moment it is not.
139
+ const current = state.pending_action;
140
+ const attempted = pending !== null &&
141
+ current !== null &&
142
+ current.transition === pending.transition &&
143
+ current.digest === pending.digest &&
144
+ current.attempted;
145
+ return sealRunState({
146
+ ...withoutSeal(state),
147
+ pending_action: pending === null ? null : { ...pending, attempted },
148
+ });
149
+ }
150
+ /**
151
+ * Mark the pending action as begun, in its own write, BEFORE anything happens.
152
+ *
153
+ * Separate from {@link withPendingAction} on purpose: emitting a boundary and
154
+ * starting to materialize it are two moments, and collapsing them would record
155
+ * the intent at a time when nothing has yet been risked — which is precisely when
156
+ * the mark is worthless. Recording it afterwards is worse: the crash it exists to
157
+ * survive happens in between.
158
+ */
159
+ export function withActionAttempted(state) {
160
+ const pending = state.pending_action;
161
+ if (pending === null || pending.attempted)
162
+ return state;
163
+ return sealRunState({
164
+ ...withoutSeal(state),
165
+ pending_action: { ...pending, attempted: true },
166
+ });
167
+ }
168
+ /** Append one material event to the run's trace, re-sealing the result. */
169
+ export function withEvent(state, event) {
170
+ return sealRunState({ ...withoutSeal(state), events: [...state.events, event] });
134
171
  }
135
172
  /** Keep a validated observation for the rule that consumes it later. */
136
173
  export function withObservation(state, observation) {
@@ -147,24 +184,41 @@ export function withAttempt(state, attempt) {
147
184
  return sealRunState({ ...withoutSeal(state), attempts: [...state.attempts, attempt] });
148
185
  }
149
186
  /**
150
- * Grant the run an authorization the person just gave.
187
+ * Grant the run an authorization the person just gave, over its exact seal.
151
188
  *
152
- * The classes land in BOTH `authorizations` — what the run may exercise from here
153
- * on — and `effects.approved` — the ledger moment. The two are the same split the
189
+ * The classes land in the ledger's `approved` moment too — the same split the
154
190
  * capability contract already makes between the request's authorizations and the
155
- * receipt's approved effects, and the directive enforces `approved authorizations`.
191
+ * receipt's approved effects. What changed is the first half: the run no longer
192
+ * holds a bare class, it holds a grant that names what it was given over, so a
193
+ * later transition with a different seal is not covered by it.
194
+ *
195
+ * Re-granting the same seal REPLACES rather than accumulates: an approval given
196
+ * twice over the identical proposal is one approval, and a list that grew each
197
+ * time would make "how wide is this grant" depend on how many times somebody
198
+ * retried.
156
199
  */
157
- export function withApproval(state, effects) {
200
+ export function withApproval(state, grant) {
158
201
  return sealRunState({
159
202
  ...withoutSeal(state),
160
- authorizations: union(state.authorizations, effects),
203
+ authorizations: [...state.authorizations.filter((held) => held.digest !== grant.digest), grant],
161
204
  effects: {
162
- planned: union(state.effects.planned, effects),
163
- approved: union(state.effects.approved, effects),
205
+ planned: union(state.effects.planned, grant.classes),
206
+ approved: union(state.effects.approved, grant.classes),
164
207
  applied: [...state.effects.applied],
165
208
  },
166
209
  });
167
210
  }
211
+ /**
212
+ * Seat the exact local change awaiting its decision, or clear it.
213
+ *
214
+ * Cleared after it is published — and that is not housekeeping: a proposal left
215
+ * standing after its bytes landed would be a preview of a change that is already
216
+ * on disk, and the next boundary that asks "is there something to approve?" would
217
+ * answer yes about the past.
218
+ */
219
+ export function withProposal(state, proposal) {
220
+ return sealRunState({ ...withoutSeal(state), proposal });
221
+ }
168
222
  function union(current, added) {
169
223
  return [...new Set([...current, ...added])];
170
224
  }
@@ -258,14 +312,31 @@ function checkShape(parsed) {
258
312
  if (parsed.boundary !== null && typeof parsed.boundary !== "string") {
259
313
  return invalid("declara una frontera que no es un identificador");
260
314
  }
315
+ return checkRecordShape(parsed, invalid);
316
+ }
317
+ /**
318
+ * The half of the shape that is records rather than the cursor.
319
+ *
320
+ * Split from {@link checkShape} only so each half stays readable; the order is
321
+ * still the contract — every one of these is refused before the seal is judged,
322
+ * because a file whose fields cannot be trusted must not be graded on whether its
323
+ * digest matches.
324
+ */
325
+ function checkRecordShape(parsed, invalid) {
261
326
  if (!isPendingAction(parsed.pending_action)) {
262
327
  return invalid("declara una acción pendiente sin transición o sin sello");
263
328
  }
264
329
  if (!isObservationArray(parsed.observations)) {
265
330
  return invalid("trae observaciones que no son señales declaradas por transición");
266
331
  }
267
- if (!isEffectClassArray(parsed.authorizations)) {
268
- return invalid("declara autorizaciones que no son clases de efecto");
332
+ if (!isEventArray(parsed.events)) {
333
+ return invalid("trae una traza material con un evento incompleto");
334
+ }
335
+ if (!isGrantArray(parsed.authorizations)) {
336
+ return invalid("declara una autorización sin el sello sobre el que fue otorgada");
337
+ }
338
+ if (!isProposal(parsed.proposal)) {
339
+ return invalid("declara una propuesta local sin sus bytes, sus destinos o su sello");
269
340
  }
270
341
  if (!isEffectLedger(parsed.effects))
271
342
  return invalid("no trae el registro de efectos completo");
@@ -287,6 +358,54 @@ function isStringArray(value) {
287
358
  function isEffectClassArray(value) {
288
359
  return Array.isArray(value) && value.every(isEffectClass);
289
360
  }
361
+ /**
362
+ * A grant is only trustworthy if it says what it was given OVER.
363
+ *
364
+ * The seal is the field that makes it scoped, so a persisted grant without one is
365
+ * exactly the old class-only authorization wearing a new name — refused rather
366
+ * than read as covering everything.
367
+ */
368
+ function isGrantArray(value) {
369
+ if (!Array.isArray(value))
370
+ return false;
371
+ return value.every((entry) => isRecord(entry) &&
372
+ typeof entry.digest === "string" &&
373
+ entry.digest.length > 0 &&
374
+ isStringArray(entry.destinations) &&
375
+ isEffectClassArray(entry.classes));
376
+ }
377
+ function isProposal(value) {
378
+ if (value === null)
379
+ return true;
380
+ if (!isRecord(value))
381
+ return false;
382
+ return (typeof value.operation === "string" &&
383
+ typeof value.digest === "string" &&
384
+ isProposalArtifacts(value.artifacts) &&
385
+ isProposalBases(value.bases) &&
386
+ isProposalScope(value.scope) &&
387
+ isEffectClassArray(value.effects) &&
388
+ isEffectClassArray(value.requires_approval));
389
+ }
390
+ /** A proposal with no artifacts proposes nothing: there would be nothing to seal. */
391
+ function isProposalArtifacts(value) {
392
+ if (!Array.isArray(value) || value.length === 0)
393
+ return false;
394
+ return value.every((entry) => isRecord(entry) &&
395
+ typeof entry.path === "string" &&
396
+ typeof entry.content === "string" &&
397
+ typeof entry.overwrite === "boolean");
398
+ }
399
+ function isProposalBases(value) {
400
+ if (!Array.isArray(value))
401
+ return false;
402
+ return value.every((entry) => isRecord(entry) && typeof entry.path === "string" && typeof entry.digest === "string");
403
+ }
404
+ function isProposalScope(value) {
405
+ if (!isRecord(value))
406
+ return false;
407
+ return typeof value.sensitive_sources === "boolean" && typeof value.scope_expanded === "boolean";
408
+ }
290
409
  function isEffectLedger(value) {
291
410
  if (!isRecord(value))
292
411
  return false;
@@ -297,7 +416,40 @@ function isEffectLedger(value) {
297
416
  function isPendingAction(value) {
298
417
  if (value === null)
299
418
  return true;
300
- return (isRecord(value) && typeof value.transition === "string" && typeof value.digest === "string");
419
+ return (isRecord(value) &&
420
+ typeof value.transition === "string" &&
421
+ typeof value.digest === "string" &&
422
+ typeof value.attempted === "boolean");
423
+ }
424
+ /**
425
+ * Whether the trace is well-formed, per kind.
426
+ *
427
+ * Checked by discriminant rather than by "has some fields": an `executed` event
428
+ * missing its seal and a `failed` one missing its recovery are the two shapes that
429
+ * would make the trace unusable for the thing it exists for — proving what came
430
+ * back, and saying what to do about what did not.
431
+ */
432
+ function isEventArray(value) {
433
+ if (!Array.isArray(value))
434
+ return false;
435
+ return value.every((entry) => {
436
+ if (!isRecord(entry))
437
+ return false;
438
+ if (typeof entry.transition !== "string" || typeof entry.operation !== "string")
439
+ return false;
440
+ if (entry.kind === "executed") {
441
+ return (typeof entry.summary === "string" &&
442
+ typeof entry.output_digest === "string" &&
443
+ isEffectClassArray(entry.effects) &&
444
+ isStringArray(entry.evidence));
445
+ }
446
+ if (entry.kind === "failed") {
447
+ return (typeof entry.code === "string" &&
448
+ typeof entry.message === "string" &&
449
+ typeof entry.recovery === "string");
450
+ }
451
+ return false;
452
+ });
301
453
  }
302
454
  function isObservationArray(value) {
303
455
  if (!Array.isArray(value))
@@ -1 +1 @@
1
- {"version":3,"file":"run-state.js","sourceRoot":"","sources":["../../../src/domain/flow/run-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAoB,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAI3E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAExC,gFAAgF;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAyBpD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEvC,sEAAsE;AACtE,MAAM,UAAU,UAAU,CAAC,KAAmB,EAAE,UAAkB;IAChE,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC,MAAM,CAAC;AACtF,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAAC,KAAmB;IAChD,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC/D,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAC;AAClC,CAAC;AAuED,gFAAgF;AAChF,SAAS,WAAW,CAAC,KAAmB;IACtC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACzC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAmC;IAC9D,O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AI,OAAO,KAAK,CAAC,qBAAqB,KAAK,QAAQ,CAAC,CAC5F,CAAC;AACJ,CAAC"}
@@ -8,13 +8,13 @@
8
8
  //
9
9
  // A host absent from this record has simply never been verified by a run.
10
10
  export const HOST_VERIFICATIONS = {
11
- "claude-code": { version: "2.1.222", at: "2026-08-05", depth: "install" },
12
- codex: { version: "0.146.0", at: "2026-08-05", depth: "install" },
13
- oz: { version: "0.2026.07.29.09.05.stable_02", at: "2026-08-05", depth: "invocation" },
14
- warp: { version: null, at: "2026-08-05", depth: "install" },
15
- gemini: { version: "1.0.16", at: "2026-08-05", depth: "install" },
16
- opencode: { version: "1.18.5", at: "2026-08-05", depth: "invocation" },
17
- crush: { version: "0.87.0", at: "2026-08-05", depth: "invocation" },
18
- kimi: { version: "0.31.1", at: "2026-08-05", depth: "install" },
11
+ "claude-code": { version: "2.1.226", at: "2026-08-10", depth: "install" },
12
+ codex: { version: "0.147.0", at: "2026-08-10", depth: "install" },
13
+ oz: { version: "0.2026.08.05.09.03.stable_01", at: "2026-08-10", depth: "invocation" },
14
+ warp: { version: null, at: "2026-08-10", depth: "install" },
15
+ gemini: { version: "1.0.16", at: "2026-08-10", depth: "install" },
16
+ opencode: { version: "1.18.15", at: "2026-08-10", depth: "invocation" },
17
+ crush: { version: "0.88.1", at: "2026-08-10", depth: "invocation" },
18
+ kimi: { version: "0.34.0", at: "2026-08-10", depth: "install" },
19
19
  };
20
20
  //# sourceMappingURL=host-verification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"host-verification.js","sourceRoot":"","sources":["../../src/domain/host-verification.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,2EAA2E;AAC3E,8EAA8E;AAC9E,+EAA+E;AAC/E,gFAAgF;AAChF,8CAA8C;AAC9C,EAAE;AACF,0EAA0E;AAiB1E,MAAM,CAAC,MAAM,kBAAkB,GAAoD;IACjF,aAAa,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY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,EAAE,KAAK,EAAE,YAAY,EAAE;IACtF,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE;IAC3D,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE;IACjE,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IACvE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IACnE,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE;CAChE,CAAC"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * The exact local change somebody is about to approve — bytes, destinations,
3
+ * bases, scope and effects — under ONE seal.
4
+ *
5
+ * Before this, "what was approved" was two different things depending on who
6
+ * asked. The capability path sealed the artifacts and kept the base, the scope
7
+ * and the effect classes outside the seal; the flow sealed the effect CLASSES of
8
+ * a transition and no bytes at all. Both are approvals, and neither could answer
9
+ * the question the whole handshake exists for: *is this still the same thing the
10
+ * person said yes to?* A base that moved, a destination that changed, a scope
11
+ * that widened or one more effect class would all have slipped through one of the
12
+ * two.
13
+ *
14
+ * So the proposal is one record and the seal covers all of it. Anything material
15
+ * that changes produces a different digest, which is what makes "an identical
16
+ * retry never asks again, and any material change always does" a property of the
17
+ * data rather than a rule somebody has to remember to apply.
18
+ *
19
+ * The preview is DERIVED here and never stored twice: what is shown and what is
20
+ * sealed have to come from the same bytes, or the preview becomes a second
21
+ * description of the change that can disagree with it.
22
+ */
23
+ import { semanticDigest } from "../application/semantic-operation/protocol.js";
24
+ /**
25
+ * The one way to digest a base.
26
+ *
27
+ * Two conventions for "the digest of this file" is a comparison that fails for a
28
+ * reason nobody can see: one side would seal one form and the other recompute the
29
+ * other, and every publication would look stale.
30
+ */
31
+ export function baseDigest(text) {
32
+ return semanticDigest(text);
33
+ }
34
+ export function sealProposal(input) {
35
+ const artifacts = input.artifacts.map((a) => ({
36
+ path: a.path,
37
+ content: a.content,
38
+ overwrite: a.overwrite,
39
+ }));
40
+ const body = {
41
+ operation: input.operation,
42
+ artifacts,
43
+ preview: previewOf(artifacts),
44
+ bases: [...(input.bases ?? [])],
45
+ scope: {
46
+ sensitive_sources: input.scope?.sensitive_sources === true,
47
+ scope_expanded: input.scope?.scope_expanded === true,
48
+ },
49
+ effects: [...input.effects],
50
+ requires_approval: [...input.requiresApproval],
51
+ };
52
+ return { ...body, digest: proposalDigest(body) };
53
+ }
54
+ export function previewOf(artifacts) {
55
+ return artifacts.map((a) => ({
56
+ path: a.path,
57
+ bytes: Buffer.byteLength(a.content, "utf8"),
58
+ overwrite: a.overwrite,
59
+ }));
60
+ }
61
+ /**
62
+ * The seal, over the SET rather than the order it was listed in.
63
+ *
64
+ * Sorting is the same reason `effectApprovalDigest` sorts its classes: two
65
+ * publications of identical content that happened to enumerate their files in a
66
+ * different order are the same proposal, and asking a second time for it would be
67
+ * the "identical retry never re-asks" rule failing on a detail nobody can see.
68
+ * Content travels as its own digest so the seal stays a fixed size whatever the
69
+ * dossier weighs.
70
+ */
71
+ export function proposalDigest(body) {
72
+ return semanticDigest({
73
+ operation: body.operation,
74
+ artifacts: [...body.artifacts]
75
+ .map((a) => ({
76
+ path: a.path,
77
+ content_digest: semanticDigest(a.content),
78
+ overwrite: a.overwrite,
79
+ }))
80
+ .sort((a, b) => a.path.localeCompare(b.path)),
81
+ bases: [...body.bases].sort((a, b) => a.path.localeCompare(b.path)),
82
+ scope: body.scope,
83
+ effects: [...body.effects].sort(),
84
+ requires_approval: [...body.requires_approval].sort(),
85
+ });
86
+ }
87
+ /** The destinations a grant over this proposal covers, and nothing wider. */
88
+ export function destinationsOf(proposal) {
89
+ return [...new Set(proposal.artifacts.map((a) => a.path))].sort();
90
+ }
91
+ //# sourceMappingURL=proposal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proposal.js","sourceRoot":"","sources":["../../src/domain/proposal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAoB/E;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;AA8CD,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC5C,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,SAAS,EAAE,CAAC,CAAC,SAAS;KACvB,CAAC,CAAC,CAAC;IACJ,MAAM,IAAI,GAAG;QACX,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,SAAS;QACT,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC;QAC7B,KAAK,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QAC/B,KAAK,EAAE;YACL,iBAAiB,EAAE,KAAK,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI;YAC1D,cAAc,EAAE,KAAK,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI;SACrD;QACD,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;QAC3B,iBAAiB,EAAE,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC;KAC/C,CAAC;IACF,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,SAAsC;IAC9D,OAAO,SAAS,CAAC,G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AAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACpE,CAAC"}
@@ -0,0 +1,126 @@
1
+ /**
2
+ * What a session says it did, in the order it happened, with a source per fact.
3
+ *
4
+ * The memory of a run is spread across artifacts on purpose — `SESSION.md` holds
5
+ * the objective and the done-condition, `CHECKPOINT.md` the progress, `DECISION.md`
6
+ * the reasons, the run state what really executed — and each of them is the PRIMARY
7
+ * place for what it owns. What was missing is not another store: it is the reading
8
+ * that puts them in order for somebody who was not there.
9
+ *
10
+ * So this is a PROJECTION and never a second memory. Two rules make that true and
11
+ * both are structural:
12
+ *
13
+ * - **Every fact carries its source.** {@link NarrativeSource} names the artifact
14
+ * and the heading it came from, so any line here can be walked back to the file
15
+ * that owns it. A fact this type could not attribute would be a narrative
16
+ * somebody maintains by hand, which is the drift it exists to remove.
17
+ * - **Nothing is authored here.** Each field is read from its owner. The narrative
18
+ * can go stale against its sources, and the answer to that is to rebuild it —
19
+ * never to edit it, which is why the block it renders says so out loud.
20
+ *
21
+ * The four states are the distinction a reader actually needs: what was PLANNED,
22
+ * what was APPLIED, what FAILED, and what is CLOSED. Collapsing planned and
23
+ * applied is what makes a checklist unreadable — a ticked box and a proven result
24
+ * are different claims.
25
+ */
26
+ export const NARRATIVE_STATES = ["planificado", "aplicado", "fallido", "cerrado"];
27
+ /** How far along the session itself is — derived, never declared. */
28
+ export const SESSION_PHASES = ["abierta", "reanudada", "cerrada"];
29
+ /**
30
+ * The markers that delimit the CLI-managed block inside `SESSION.md`.
31
+ *
32
+ * Comment markers rather than a heading boundary, because the upsert has to be
33
+ * exact: a block delimited by "the next `##`" would swallow whatever a person
34
+ * wrote after it the first time the two got out of order. HTML comments also keep
35
+ * the file readable as Markdown, which is the whole point of writing it there.
36
+ */
37
+ export const NARRATIVE_BEGIN = "<!-- aw:recorrido -->";
38
+ export const NARRATIVE_END = "<!-- /aw:recorrido -->";
39
+ const MANAGED_NOTE = "> Bloque administrado por el CLI: proyecta las fuentes que enlaza y se reescribe solo. Editarlo a mano no cambia nada — corregí la fuente.";
40
+ export function renderNarrativeBlock(narrative, options = {}) {
41
+ const lines = [NARRATIVE_BEGIN, "## Recorrido", "", MANAGED_NOTE, ""];
42
+ const detail = options.detail === true;
43
+ lines.push(`- **Estado:** ${narrative.phase}`);
44
+ if (narrative.objective !== null) {
45
+ lines.push(`- **Objetivo:** ${line(narrative.objective, detail)}`);
46
+ }
47
+ if (narrative.next !== null) {
48
+ lines.push(`- **Siguiente paso:** ${line(narrative.next, detail)}`);
49
+ }
50
+ section(lines, "Qué pasó", narrative.sequence, detail);
51
+ section(lines, "Tareas", narrative.tasks, detail);
52
+ section(lines, "Decisiones y por qué", narrative.decisions, detail);
53
+ section(lines, "Resultados", narrative.results, detail);
54
+ section(lines, "Evidencia", narrative.evidence, detail);
55
+ section(lines, "Pendiente", narrative.pending, detail);
56
+ if (narrative.links.length > 0) {
57
+ lines.push("", "### Detalle");
58
+ for (const link of narrative.links)
59
+ lines.push(`- [${link.label}](${link.path})`);
60
+ }
61
+ lines.push("", NARRATIVE_END);
62
+ return lines.join("\n");
63
+ }
64
+ /** A section, omitted entirely when it has nothing to say. */
65
+ function section(lines, title, facts, detail) {
66
+ if (facts.length === 0)
67
+ return;
68
+ lines.push("", `### ${title}`);
69
+ for (const fact of facts)
70
+ lines.push(`- ${line(fact, detail)}`);
71
+ }
72
+ /**
73
+ * One fact: its state, its sentence, and where it came from.
74
+ *
75
+ * The ARTIFACT always travels — knowing which file owns a line is what makes it
76
+ * checkable, and a filename is not jargon. What waits for `detail` is the rest:
77
+ * the heading inside it, the transition names, the digests. A reader deciding
78
+ * what to do next is not helped by a sha, and a reader auditing the run cannot do
79
+ * without one; the flag is the difference between the two, not a shorter version
80
+ * of the same text.
81
+ */
82
+ function line(fact, detail) {
83
+ if (!detail)
84
+ return `${fact.text} _(${fact.state} · ${fact.source.artifact})_`;
85
+ const where = fact.source.locator === null
86
+ ? fact.source.artifact
87
+ : `${fact.source.artifact} › ${fact.source.locator}`;
88
+ const technical = fact.detail === null ? "" : ` · ${fact.detail}`;
89
+ return `${fact.text} _(${fact.state} · ${where}${technical})_`;
90
+ }
91
+ /**
92
+ * Put the block into a `SESSION.md`, replacing any block already there.
93
+ *
94
+ * Idempotent by construction: the markers bound exactly what this function wrote
95
+ * last time, so re-rendering never nests, duplicates or eats a neighbouring
96
+ * section. A document without the markers gets the block appended — never
97
+ * inserted in the middle, where it would land ahead of sections a loop is still
98
+ * filling.
99
+ */
100
+ export function upsertNarrativeBlock(document, block) {
101
+ const begin = document.indexOf(NARRATIVE_BEGIN);
102
+ const end = document.indexOf(NARRATIVE_END);
103
+ if (begin !== -1 && end !== -1 && end > begin) {
104
+ const before = document.slice(0, begin);
105
+ const after = document.slice(end + NARRATIVE_END.length);
106
+ return `${before}${block}${after}`;
107
+ }
108
+ const base = document.endsWith("\n") ? document : `${document}\n`;
109
+ return `${base}\n${block}\n`;
110
+ }
111
+ /**
112
+ * The document without its managed block — what a reader authored.
113
+ *
114
+ * Used where the block must not be read back as content: rebuilding a narrative
115
+ * from a `SESSION.md` that already contains one would let the projection feed on
116
+ * itself, and the circular reading is exactly the defect this whole contract
117
+ * removes.
118
+ */
119
+ export function stripNarrativeBlock(document) {
120
+ const begin = document.indexOf(NARRATIVE_BEGIN);
121
+ const end = document.indexOf(NARRATIVE_END);
122
+ if (begin === -1 || end === -1 || end < begin)
123
+ return document;
124
+ return `${document.slice(0, begin)}${document.slice(end + NARRATIVE_END.length)}`;
125
+ }
126
+ //# sourceMappingURL=narrative.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"narrative.js","sourceRoot":"","sources":["../../../src/domain/session/narrative.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE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e,CAAC,CAAC;IAChD,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5C,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,GAAG,GAAG,KAAK;QAAE,OAAO,QAAQ,CAAC;IAC/D,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;AACpF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tacuchi/agent-workflow-cli",
3
- "version": "21.5.0",
3
+ "version": "21.7.0",
4
4
  "description": "Runtime CLI for Workline — the stages + loops + artifacts system for agent work. Bundles the universal `w` skill set under `skills/w/` (slash commands `/w:*`: spec-new/spec-refine, plan-new/plan-exec, quick, persist, workspace-init, export-*); `self install --target <host>` copies SKILL + commands + hooks into the host. Pluggable capability skills via `.workflow/skills.toml`. Multi-empresa parametrization via `profile.json` cascade. Namespace auto-detected from any `.<ns>/sessions/` dir in CWD; default `workflow`.",
5
5
  "type": "module",
6
6
  "bin": {
package/skills/w/SKILL.md CHANGED
@@ -195,7 +195,7 @@ One language per plane — never mix them:
195
195
  | Doctrine (this bundle: chassis, loops, commands, roles, exports, harness) | **English** |
196
196
  | **Section headings** of artifacts and docs (`## Requirement`, `## Completed`, …) | **English** (parse contract) |
197
197
  | Everything **user-facing**: structured-choice questions, reports, dashboards, the **content** the AI writes into artifacts and `docs/` deliverables, commit messages | **the user's language** (this product: Spanish) |
198
- | Literal option labels (`Continuar`, `Compactar`, `Cerrar`, `Aceptar recomendaciones`, `Guardar plan`, …) | canonical product strings — use them **verbatim** |
198
+ | Literal option labels (`Continuar`, `Compactar`, `Cerrar`, `Aceptar recomendaciones`, `Aprobar y guardar`, `Refinar`, …) | canonical product strings — use them **verbatim** |
199
199
  | Domain terms (class/route/table names, e.g. the QTC fleet) | the domain's ubiquitous language (Spanish) — never translated |
200
200
 
201
201
  ### The 6 hard invariants
@@ -104,7 +104,7 @@ Investigation is **inline**: an activity **inside the run's current session**, n
104
104
  - **Recommendation:** exactly one option is *recommended*, it comes first, and it comes from research; the human ratifies or corrects it, never starts cold.
105
105
  - **Text fallback:** answer by label; `Aceptar recomendaciones` accepts all first options. Never require composite coordinates such as `1A, 2A, 3A`.
106
106
 
107
- > Canonical labels (`Continuar`, `Compactar`, `Cerrar`, `Aceptar recomendaciones`, `Guardar plan`, …) stay verbatim; other user-facing text follows [`SKILL.md`](../SKILL.md) § *Language policy*.
107
+ > Canonical labels (`Continuar`, `Compactar`, `Cerrar`, `Aprobar y guardar`, `Refinar`, …) stay verbatim; other user-facing text follows [`SKILL.md`](../SKILL.md) § *Language policy*.
108
108
 
109
109
  ## Compact / resume
110
110
 
@@ -176,12 +176,11 @@ plan-new-loop(spec):
176
176
  - minimality: no solution/phase/task heavier than Final behavior requires
177
177
  - (UI) every screen/UI task pins an exact root against a declared baseline · that closure is handoff · nothing outside it was promoted
178
178
  whatever fails → comes back as a gap
179
- if split accepted: work = N sibling plans
180
- structured_choice(content: [Guardar planes, Preguntar algo más], flow: [Compactar, Cerrar])
181
- Guardar planes mint + write each sibling
182
- else:
183
- structured_choice(content: [Guardar plan, Preguntar algo más], flow: [Compactar, Cerrar])
184
- Guardar → write docs/plans/PPP-plan-<slug>.md (confirmation if it exists)
179
+ hand the CLI the exact bytes of the plan — and of the siblings, if the split was accepted
180
+ the CLI seals them into ONE proposal and shows its preview: destination, weight, what it replaces
181
+ structured_choice(content: [Aprobar y guardar, Refinar], flow: [Compactar, Cerrar])
182
+ Aprobar y guardar → the CLI writes every file of the preview, together or not at all
183
+ Refinar → nothing is written and the generation stays open
185
184
  finalize: CHECKPOINT persisted (+ BACKLOG only if something is deferred) + close session + report
186
185
  ```
187
186
 
@@ -46,7 +46,7 @@ can establish.
46
46
  `docs/plans/PPP-plan-*.md` (glob — locates the plan by number; or the exact path from the command argument). **Always the plan itself**: this loop edits it in place; there is no separate "refined" file. Provenance is irrelevant — generated by `plan-new`, **hand-written, or adopted** from a host planner (`plan-new` mode 4 / `persist`); existence is the only requirement.
47
47
 
48
48
  ## Writes
49
- Updates `docs/plans/PPP-plan-<slug>.md` **in place** (when the user picks `Guardar plan refinado`): completes/adjusts sections and **adds** `## Refinement decisions`. Since it overwrites an existing doc, it asks the user's **confirmation**. On an accepted split (§ *Split gate — refine semantics*) it also **creates** the extracted sibling plans (newly minted `docs/plans` files). It writes `docs/plans` and, when the refine **touches UI**, the **revision it publishes** — scoped to the artifacts the delta actually affects — of the design package under `docs/designs` (chassis § *docs/ boundary*; see [`DESIGN-REFERENCES.md`](../../modules/DESIGN-REFERENCES.md)). It never graduates/exports anything else to `docs/` — that is separate `export-*` work.
49
+ Updates `docs/plans/PPP-plan-<slug>.md` **in place** (when the user picks `Aprobar y guardar`): completes/adjusts sections and **adds** `## Refinement decisions`. Since it overwrites an existing doc, the preview says so and the person approves it **once**. On an accepted split (§ *Split gate — refine semantics*) the same proposal also **creates** the extracted sibling plans (newly minted `docs/plans` files) — one preview, one decision, one all-or-nothing write. It writes `docs/plans` and, when the refine **touches UI**, the **revision it publishes** — scoped to the artifacts the delta actually affects — of the design package under `docs/designs` (chassis § *docs/ boundary*; see [`DESIGN-REFERENCES.md`](../../modules/DESIGN-REFERENCES.md)). It never graduates/exports anything else to `docs/` — that is separate `export-*` work.
50
50
 
51
51
  ## Inherits
52
52
 
@@ -157,12 +157,12 @@ plan-refine-loop(plan):
157
157
  # spec-less plan (adopted/hand-written): criteria anchor to the plan's own Final behavior block/Validations (see Delta 2)
158
158
  - re-refine's own check: the plan is REALIGNED with what changed
159
159
  whatever fails → comes back as a gap
160
- if split accepted (plan-new-loop § Split gate (multi-plan)): work = original reduced + extracted siblings
161
- structured_choice(content: [Guardar planes, Preguntar algo más], flow: [Compactar, Cerrar])
162
- Guardar planes edit original reduced (confirmation) + write extracted siblings + record in Refinement decisions
163
- else:
164
- structured_choice(content: [Guardar plan refinado, Preguntar algo más], flow: [Compactar, Cerrar])
165
- Guardar edit in place (with confirmation) + insert/update Refinement decisions
160
+ if split accepted (plan-new-loop § Split gate (multi-plan)): the bytes carry the original reduced + the extracted siblings
161
+ hand the CLI the exact bytes of the refined plan, already normalized and with its Refinement decisions
162
+ the CLI seals them into ONE proposal and shows its preview: destination, weight, what it replaces
163
+ structured_choice(content: [Aprobar y guardar, Refinar], flow: [Compactar, Cerrar])
164
+ Aprobar y guardar the CLI writes every file of the preview, together or not at all
165
+ Refinar nothing is written and the refinement stays open
166
166
  finalize: CHECKPOINT persisted (+ BACKLOG only if something is deferred) + close session + report
167
167
  ```
168
168