@awak-app/simy-cli 0.5.13 → 0.5.14

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awak-app/simy-cli",
3
- "version": "0.5.13",
3
+ "version": "0.5.14",
4
4
  "description": "Local SIMY executor for non-coding Local Tasks and Agentic Loop runs.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,7 +13,7 @@ import {
13
13
  } from "./durable-local-task-steps-contract.js";
14
14
  import { buildExecutionCapabilityContract } from "./execution-capability-contract.js";
15
15
 
16
- export const CLI_VERSION = "0.5.13";
16
+ export const CLI_VERSION = "0.5.14";
17
17
  export const CLI_API_CONTRACT_VERSION = 10;
18
18
 
19
19
  export function withCliContract(
@@ -229,6 +229,63 @@ Reuse this record in implementation and review. Recheck only affected entries
229
229
  when rules, scope, revisions, execution paths, or authority change; patch the
230
230
  charter and invalidate affected evidence under the existing receipt contract.
231
231
 
232
+ ## Check equivalent-purpose consistency
233
+
234
+ Before changing behavior, contracts, validation, policy, or trust-boundary rules
235
+ that affect users, API consumers, data integrity, or security, identify every
236
+ relevant surface and execution path that serves the same user purpose. Group
237
+ those paths by semantic intent, then record for each path its persona, current
238
+ source of truth, precedence, fallback, enforcement location, and observed
239
+ behavior. Include client and server paths, platform variants, account, tenant,
240
+ app, device, or system preferences, caches, and legacy defaults when they can
241
+ affect the result. Use code, configuration, schemas, tests, documentation, and
242
+ runtime evidence; matching labels alone are not proof that the same rule is
243
+ enforced.
244
+
245
+ For each equivalent-purpose group, verify whether all paths consume one
246
+ canonical rule with the same precedence and fallback semantics. When they do
247
+ not, determine whether the divergence is intentional and supported by an
248
+ authoritative product decision. Also check that tests cover the shared contract
249
+ at every affected boundary. A language choice that follows the device or OS on
250
+ one surface and an in-app preference on another is one instance of this class,
251
+ not a language-specific exception. Input validation split between frontend and
252
+ backend is another: identify the canonical validation contract separately from
253
+ where it is enforced. Multiple enforcement points may be correct when the
254
+ frontend provides timely feedback and the backend protects the trust boundary,
255
+ but equivalent rules must not drift.
256
+
257
+ If competing sources or behaviors exist and no authoritative choice resolves
258
+ them, do not silently select the most common implementation or whichever path
259
+ is easiest to change. Produce a human-decision packet containing:
260
+
261
+ - the shared purpose, affected personas, surfaces, and current divergence;
262
+ - each viable unification option, including preserving an intentional
263
+ divergence when that is genuinely valid;
264
+ - for each option, user benefit, user and operational risk, compatibility and
265
+ migration effects, fallback behavior, reversibility, support and maintenance
266
+ cost, security and trust-boundary constraints, validation plan, and material
267
+ evidence gaps;
268
+ - a recommendation and rationale when the evidence supports one, clearly
269
+ separated from the decision itself.
270
+
271
+ Require an explicit human selection even when one option is recommended. Mark
272
+ the affected decision `needs_hil` and the dependent implementation
273
+ `partially_blocked`; continue independent authorized work, but do not implement
274
+ the behavior choice, define its test oracle, migrate data, or advance the
275
+ affected scope to Ready or merge. A timeout or missing response is not approval.
276
+ Human choice does not override mandatory security, privacy, data-integrity, or
277
+ external-contract constraints; exclude unsafe or non-compliant options from the
278
+ viable set and explain why. For example, client-only validation is not viable
279
+ when untrusted input reaches a server-side trust boundary.
280
+
281
+ Record the selected option as a revision-bound `HumanDecisionReceipt` and patch
282
+ the charter with the canonical source, precedence, fallback, affected consumers,
283
+ migration and rollout constraints, enforcement locations, verification plan,
284
+ and rollback condition. Then implement every affected path against that decision
285
+ and add boundary tests that fail if the paths drift again. A later change to the
286
+ decision or its canonical rule invalidates dependent evidence and requires a new
287
+ decision when the trade-off materially changes.
288
+
232
289
  ## Keep delivery states distinct
233
290
 
234
291
  Track and report the highest state actually proven:
@@ -12,8 +12,9 @@ Persist one controller-owned snapshot with at least:
12
12
  - frozen experience-contract identities, their mapping to acceptance rows, and
13
13
  the current readable local-experience table path and digest;
14
14
  - acceptance-source identities and digests, architecture boundaries, applicable
15
- rule decisions, risk tier, requested/effective delivery levels, the safety
16
- ceiling reason, and chat-confirmation receipt;
15
+ rule decisions, human-decision receipt IDs, approved canonical sources and
16
+ their precedence and fallback semantics, risk tier, requested/effective
17
+ delivery levels, the safety ceiling reason, and chat-confirmation receipt;
17
18
  - repository, base SHA, head SHA, companion SHAs, merge SHA, image digests, and
18
19
  deployed revision;
19
20
  - target environments, user journey, user/tenant fixture identities, and
@@ -36,6 +37,7 @@ an integrity failure.
36
37
  Use the smallest applicable receipts rather than free-form completion claims:
37
38
 
38
39
  - `CharterReceipt`
40
+ - `HumanDecisionReceipt`
39
41
  - `FailureReproductionReceipt`
40
42
  - `ImplementationReceipt`
41
43
  - `LocalVerificationReceipt`
@@ -66,6 +68,29 @@ Each receipt should contain:
66
68
  network traces, DB rows, artifact hashes, CI/deploy URLs, and timestamps;
67
69
  - a typed error category and retryability when unsuccessful.
68
70
 
71
+ A `HumanDecisionReceipt` additionally stores or immutably references the exact
72
+ decision packet presented to the human. Preserve the question and scope; every
73
+ option's user benefit, user and operational risk, compatibility and migration
74
+ effects, fallback behavior, reversibility, support and maintenance cost,
75
+ security and trust-boundary constraints, validation plan, and material evidence
76
+ gaps; any excluded unsafe or non-compliant option and its reason; and any
77
+ recommendation separately from the decision. Record the selected option's exact
78
+ text and stable ID or digest, conditions attached to the selection, decision
79
+ maker, timestamp, and a stable approval reference such as a message or turn ID
80
+ or an immutable transcript or artifact digest, with its channel and context when
81
+ applicable. The selection may reference a viable presented option or an explicit
82
+ user-authored modification or combination. When the user's decision is clear,
83
+ executable, and introduces no undisclosed material trade-off, update the packet
84
+ and record that same message as approval without requesting confirmation again.
85
+ If the decision is ambiguous or introduces a material trade-off not yet explained,
86
+ clarify only the unresolved point before proceeding with dependent work. Mandatory
87
+ security, privacy, data-integrity, and external-contract constraints still apply.
88
+
89
+ A successful `HumanDecisionReceipt` requires an explicit selection. Until then,
90
+ store the pending decision packet in the snapshot and publish the monitor verdict
91
+ `needs_hil` with action `request_hil`; never synthesize or infer approval from a
92
+ recommendation, silence, or an implementation pattern.
93
+
69
94
  ## Monitor verdict and policy action
70
95
 
71
96
  The semantic monitor may emit:
@@ -104,6 +129,7 @@ Evidence is revision-bound:
104
129
  | Change | Invalidate |
105
130
  |---|---|
106
131
  | Charter or explicit success conditions | All affected downstream gates |
132
+ | Human decision, canonical source, precedence, or fallback | All dependent implementation and verification evidence |
107
133
  | Acceptance source, test oracle, assertion, or CI/security gate changes | The affected gate and all dependent downstream evidence |
108
134
  | Head SHA or generated source changes | Local, CI, integration, container, and live evidence |
109
135
  | Base SHA or companion revision changes | Integration and later evidence |