@awak-app/simy-cli 0.5.10 → 0.5.12

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/README.md CHANGED
@@ -424,6 +424,19 @@ Deploy this CLI and the web capability proxy before enabling the backend scope
424
424
  requirement. Older clients receive an explicit upgrade error, never an expanded
425
425
  organization-wide bundle.
426
426
 
427
+ ### Minimum functional completion
428
+
429
+ Every CLI coding-loop promotion now requires a current two-layer observation
430
+ matrix: the requested operation and result, plus independently checked final
431
+ postcondition and integration. See the [minimum completion contract](src/codex-plugins/simy/skills/agentic-delivery-loop/references/minimum-completion.md)
432
+ for the executable format. Missing mappings, mismatching observations, changed
433
+ artifacts or stale revisions block promotion even when the executor reports
434
+ success. Independent review checks original-request coverage and the test oracle.
435
+
436
+ Existing v2 run history is retained; resumed/rechecked runs need the new evidence.
437
+ The same checker ships in the standalone Delivery Loop skill, but it does not
438
+ control the host's final response or establish deployment completion.
439
+
427
440
  ### Submit repaired local delivery evidence to SQM
428
441
 
429
442
  The bundled Delivery Loop maintains an external acceptance checklist with separate
@@ -444,3 +457,13 @@ session. `--dry-run` previews the exact document without uploading it. See the
444
457
  [local evidence contract](src/codex-plugins/simy/skills/agentic-delivery-loop/references/local-sqm-evidence.md).
445
458
  The receipt identifies the source digest and analysis job; it is not a declaration
446
459
  that an incident or blocking rule has been published.
460
+
461
+ ## Delivery Loop shared specification
462
+
463
+ The [Delivery Loop system specification](docs/systems/delivery-loop/README.md)
464
+ explains its purpose, As-Is and proposed To-Be through twelve linked views. Keep
465
+ these as shared team documents; each change updates affected views and checks
466
+ cross-view consistency. The skill requires independent design, implementation-to-
467
+ To-Be and PR reviews, plus explicitly opted-in SQM before and after PR creation.
468
+ The [workflow reference](src/codex-plugins/simy/skills/agentic-delivery-loop/references/shared-system-specifications.md)
469
+ explains baseline updates, historical regression coverage and evidence limits.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awak-app/simy-cli",
3
- "version": "0.5.10",
3
+ "version": "0.5.12",
4
4
  "description": "Local SIMY executor for non-coding Local Tasks and Agentic Loop runs.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -40,7 +40,7 @@
40
40
  "check:auto-update": "node --check ./src/auto-update.js && node --check ./scripts/auto-update-e2e.js && npm run check:sqm",
41
41
  "check:sqm": "node --check ./src/sqm/canonical.js && node --check ./src/sqm/validation.js && node --check ./src/sqm/reliability.js && node --check ./src/sqm/repository.js && node --check ./src/sqm/checkers.js && node --check ./src/sqm/bundle-store.js && node --check ./src/sqm/proof.js && node --check ./src/sqm/evidence-client.js && node --check ./src/sqm/session.js && node --check ./src/sqm/index.js && node --check ./src/sqm/command.js && node --check ./src/sqm/agent-skill.js && node --check ./src/sqm/workflow-onboarding.js && node --check ./src/sqm/workflow-update.js && node --check ./src/sqm/review-worker.js && node --check ./scripts/sqm-complete-loop-e2e.js && node --check ./scripts/sqm-local-review-e2e.js",
42
42
  "check:real-provider-syntax": "node --check ./scripts/real-codex-probe.js && node --check ./scripts/real-claude-probe.js && node --check ./scripts/real-provider-console-fixture.js && node --check ./scripts/real-provider-console-e2e.js",
43
- "check:syntax": "node --check ./src/index.js && node --check ./src/install-update.js && node --check ./src/agent.js && node --check ./src/browser.js && node --check ./src/web-api.js && node --check ./src/durable-local-task-worker.js && node --check ./src/durable-local-task-steps-contract.js && node --check ./src/bounded-local-task-subtasks-contract.js && node --check ./src/bounded-local-task-subtask-pool.js && node --check ./src/local-task-artifact-contract.js && node --check ./src/execution-capability-contract.js && node --check ./src/shutdown.js && node --check ./src/run-registry.js && node --check ./src/direct-executor.js && node --check ./src/execution-guardrail.js && node --check ./src/backend-executable.js && node --check ./src/provider-stream.js && node --check ./src/console/index.js && node --check ./src/console/app.js && node --check ./src/console/commands.js && node --check ./src/local-attachments.js && node --check ./src/repository-inventory.js && node --check ./src/session-store.js && node --check ./src/web-origin.js && node --check ./src/workspace-context.js && node --check ./src/orchestrator/index.js && node --check ./src/orchestrator/shared.js && node --check ./src/orchestrator/recovery.js && node --check ./src/orchestrator/risk.js && node --check ./src/orchestrator/contract.js && node --check ./src/orchestrator/completion-contract.js && node --check ./src/orchestrator/instruction.js && node --check ./src/orchestrator/problem-solving.js && node --check ./src/orchestrator/budget.js && node --check ./src/orchestrator/execution-io.js && node --check ./src/orchestrator/presentation.js && node --check ./src/orchestrator/result.js && node --check ./src/orchestrator/retry.js && node --check ./src/orchestrator/evidence.js && node --check ./src/orchestrator/independent-audit.js && node --check ./src/orchestrator/audit.js && node --check ./src/orchestrator/loop.js && node --check ./src/runner.js && node --check ./scripts/fixtures/completion-contract-fixture.js && node --check ./scripts/fixtures/fake-coding-backend.js && node --check ./scripts/e2e-terminal-evidence.js && node --check ./scripts/audit-gate-e2e.js && node --check ./scripts/completion-contract-e2e.js && node --check ./scripts/retry-circuit-e2e.js && node --check ./scripts/follow-up-charter-e2e.js && node --check ./scripts/task-routing-e2e.js && node --check ./scripts/executor-version-preflight-e2e.js && node --check ./scripts/blocked-recovery-e2e.js && node --check ./scripts/process-localization-e2e.js && node --check ./scripts/hypothesis-retries-e2e.js && node --check ./scripts/budget-enforcement-e2e.js && node --check ./scripts/local-task-default-workspace-e2e.js && node --check ./scripts/local-task-idempotency-e2e.js && node --check ./scripts/console-e2e-fixture.js && node --check ./scripts/console-e2e.js && node --check ./scripts/console-recovery-e2e-fixture.js && node --check ./scripts/console-recovery-e2e.js && node --check ./scripts/real-provider-console-fixture.js && node --check ./scripts/real-provider-console-e2e.js && node --check ./scripts/fullstack-cli-smoke.js && node --check ./scripts/check-package-contents.js",
43
+ "check:syntax": "node --check ./src/index.js && node --check ./src/install-update.js && node --check ./src/agent.js && node --check ./src/browser.js && node --check ./src/web-api.js && node --check ./src/durable-local-task-worker.js && node --check ./src/durable-local-task-steps-contract.js && node --check ./src/bounded-local-task-subtasks-contract.js && node --check ./src/bounded-local-task-subtask-pool.js && node --check ./src/local-task-artifact-contract.js && node --check ./src/execution-capability-contract.js && node --check ./src/shutdown.js && node --check ./src/run-registry.js && node --check ./src/direct-executor.js && node --check ./src/execution-guardrail.js && node --check ./src/backend-executable.js && node --check ./src/provider-stream.js && node --check ./src/console/index.js && node --check ./src/console/app.js && node --check ./src/console/commands.js && node --check ./src/local-attachments.js && node --check ./src/repository-inventory.js && node --check ./src/session-store.js && node --check ./src/web-origin.js && node --check ./src/workspace-context.js && node --check ./src/orchestrator/index.js && node --check ./src/orchestrator/shared.js && node --check ./src/orchestrator/recovery.js && node --check ./src/orchestrator/risk.js && node --check ./src/orchestrator/contract.js && node --check ./src/orchestrator/completion-contract.js && node --check ./src/orchestrator/minimum-completion.js && node --check ./src/codex-plugins/simy/skills/agentic-delivery-loop/scripts/check-minimum-completion.mjs && node --check ./src/orchestrator/instruction.js && node --check ./src/orchestrator/problem-solving.js && node --check ./src/orchestrator/budget.js && node --check ./src/orchestrator/execution-io.js && node --check ./src/orchestrator/presentation.js && node --check ./src/orchestrator/result.js && node --check ./src/orchestrator/retry.js && node --check ./src/orchestrator/evidence.js && node --check ./src/orchestrator/independent-audit.js && node --check ./src/orchestrator/audit.js && node --check ./src/orchestrator/loop.js && node --check ./src/runner.js && node --check ./scripts/fixtures/completion-contract-fixture.js && node --check ./scripts/fixtures/fake-coding-backend.js && node --check ./scripts/e2e-terminal-evidence.js && node --check ./scripts/audit-gate-e2e.js && node --check ./scripts/completion-contract-e2e.js && node --check ./scripts/retry-circuit-e2e.js && node --check ./scripts/follow-up-charter-e2e.js && node --check ./scripts/task-routing-e2e.js && node --check ./scripts/executor-version-preflight-e2e.js && node --check ./scripts/blocked-recovery-e2e.js && node --check ./scripts/process-localization-e2e.js && node --check ./scripts/hypothesis-retries-e2e.js && node --check ./scripts/budget-enforcement-e2e.js && node --check ./scripts/local-task-default-workspace-e2e.js && node --check ./scripts/local-task-idempotency-e2e.js && node --check ./scripts/console-e2e-fixture.js && node --check ./scripts/console-e2e.js && node --check ./scripts/console-recovery-e2e-fixture.js && node --check ./scripts/console-recovery-e2e.js && node --check ./scripts/real-provider-console-fixture.js && node --check ./scripts/real-provider-console-e2e.js && node --check ./scripts/fullstack-cli-smoke.js && node --check ./scripts/check-package-contents.js",
44
44
  "check:package": "node ./scripts/check-package-contents.js",
45
45
  "build:macos-installer:dev": "bash packaging/build-macos-arm64.sh --unsigned-dev",
46
46
  "build:macos-installer": "bash packaging/build-macos-arm64.sh --production",
@@ -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.10";
16
+ export const CLI_VERSION = "0.5.12";
17
17
  export const CLI_API_CONTRACT_VERSION = 10;
18
18
 
19
19
  export function withCliContract(
@@ -7,8 +7,11 @@ description: Drive complex repository changes from a frozen success charter and
7
7
 
8
8
  Use one Codex task as the controller for the complete delivery lifecycle. Shell,
9
9
  browser, API, log, database, and artifact operations may all run in the same
10
- task. Treat implementer, user actor, evidence collector, and verifier as logical
11
- roles; they do not require separate agents.
10
+ task. The controller coordinates implementation and evidence collection. Every
11
+ review verdict must come from an independent agent/session that did not author
12
+ the reviewed implementation or specification; self-checks are useful diagnostics,
13
+ not review approval. Give reviewers original sources and raw evidence, not a
14
+ prescribed conclusion. The controller retains transition and authority ownership.
12
15
 
13
16
  ## Confirm the delivery level in chat
14
17
 
@@ -30,9 +33,20 @@ external-message authority and never weakens repository-required gates.
30
33
 
31
34
  ## Freeze the delivery charter
32
35
 
36
+ Start with the beneficiary's experience, not the proposed solution. Read-only
37
+ discovery may supply facts, but before solution design or coding freeze a compact
38
+ experience contract: who is in what situation, what they are trying to achieve,
39
+ the complete usable outcome, what they should understand and do next at each
40
+ observable moment, recovery and forbidden experiences, and how each moment will
41
+ be observed. Give each moment a stable UX/acceptance ID and carry those same IDs
42
+ through the shared To-Be, implementation mapping, and results matrix. Do not use
43
+ a list of components, endpoints, screens, or tasks as a substitute for the
44
+ end-to-end experience.
45
+
33
46
  Before material action, record:
34
47
 
35
- - objective and user-visible success conditions;
48
+ - objective, beneficiary, and the frozen experience contract with user-visible
49
+ success conditions;
36
50
  - authoritative acceptance sources that are independent of the candidate
37
51
  implementation, plus architecture boundaries and dependency direction;
38
52
  - repositories, latest base branches, dedicated worktrees, environments, and
@@ -51,11 +65,41 @@ Do not silently weaken explicit conditions. Add discoveries as a charter patch.
51
65
  A scope or success-condition change needs user direction when it materially
52
66
  changes the requested result.
53
67
 
68
+ ## Maintain the system's shared specification
69
+
70
+ Before implementation, read [shared system specifications](references/shared-system-specifications.md).
71
+ Find the team's canonical specification for this system; create it once if absent.
72
+ Reconcile the frozen experience contract with the current As-Is, then update only
73
+ the affected To-Be views. Preserve the purpose, beneficiary, current pain,
74
+ intended user experience, observable success, and stable UX/acceptance IDs.
75
+ Maintain the twelve-view inventory, stable IDs and cross-view impact links in the
76
+ shared source, not twelve new task-local copies. Unaffected views retain their
77
+ version; unknown As-Is facts remain unknown. Review changes through the team's
78
+ normal version control and preserve concurrent work.
79
+
80
+ Use independent agents for design review (including consistency across diagram
81
+ kinds), implementation-to-To-Be review, and final PR/evidence review at **every**
82
+ level. Reviewers inspect the full affected path and unchanged linked views. Fix
83
+ findings and obtain independent re-review. A changed requirement or baseline
84
+ invalidates affected approval; do not rewrite To-Be to disguise a failed result.
85
+
86
+ PR creation and post-creation verification include the SQM loop described in the
87
+ reference. Announce this requirement when starting Delivery Loop. Running SQM
88
+ still follows its explicit opt-in/authority rules; if opt-in or access is absent,
89
+ retain the unmet SQM gate and continue independent work. Ordinary PR work outside
90
+ Delivery Loop does not activate this workflow. Record known incident coverage and
91
+ unknown coverage separately; a green proof with no applicable rules does not prove
92
+ that historical failures cannot recur.
93
+
54
94
  ## Maintain the acceptance checklist outside the conversation
55
95
 
56
96
  Before implementation, read [acceptance evidence](references/acceptance-evidence.md)
57
97
  and persist a criterion-by-criterion checklist. Bind the criteria and both
58
98
  verification layers to independent acceptance sources in a frozen charter.
99
+ Use the experience contract as the user-facing slice of these same criteria, not
100
+ as a parallel checklist. Every observable moment from the real trigger through a
101
+ usable outcome and applicable recovery path must map to at least one criterion;
102
+ working components do not prove that the combined experience is complete.
59
103
  Use a separate current-results matrix for observations, status, evidence,
60
104
  unmet reasons, and next actions. Render a readable table alongside the JSON;
61
105
  checklists held only in chat or the model's memory are insufficient.
@@ -72,11 +116,36 @@ values, ownership, authorization, and duplication. HTTP 500/network failures are
72
116
  failure evidence; absence of a 500 or presence of a 200 does not prove persistence.
73
117
  Record justified non-applicability before execution, not after a failed test.
74
118
 
119
+ After building the exact candidate in the production-like local environment,
120
+ execute the complete experience and regenerate the readable table. It must let a
121
+ reviewer compare, for every stable ID, the persona/context and expected visible
122
+ outcome, the actual user observation, the independent technical postcondition or
123
+ integration result, evidence, status, and the next repair. Inspect the table as a
124
+ whole to catch gaps between individually working parts. Any missing, pending,
125
+ failed, stale, or unverifiable applicable experience row blocks
126
+ `user_like_local_verified` and returns the loop to the smallest affected repair.
127
+
75
128
  Run the packaged acceptance validator before promoting a relevant verification
76
129
  gate and before issuing the completion receipt. A missing, pending, failed, stale,
77
130
  or unverifiable applicable row prevents promotion. Matrix completeness is one
78
131
  necessary gate, not proof of deployment, authority, or overall completion.
79
132
 
133
+ ## Enforce the minimum functional floor
134
+
135
+ At every delivery level, use [minimum completion](references/minimum-completion.md)
136
+ for requested-outcome verification. Map all requirements to implementation and
137
+ actual operation/result plus independent postcondition/integration observations.
138
+ For persistence, require reload/session return and stored values/ownership. A
139
+ working control, success message or HTTP 200 alone is insufficient.
140
+
141
+ The bundled minimum checker extends the acceptance matrix with structured
142
+ observations. Compare the original request to the stable criterion-ID list independently so
143
+ omitted requirements cannot disappear before validation. A missing, failed or
144
+ stale floor check prevents verified completion at any level. The CLI now enforces
145
+ this before implementation/PR promotion and on recheck; the standalone command
146
+ validates evidence but cannot intercept the host application's final response.
147
+ Do not call a standalone result host-enforced completion or overall delivery.
148
+
80
149
  ## Check existing rules before implementation
81
150
 
82
151
  Before implementation, publish a compact rule inventory in the charter record.
@@ -221,13 +290,13 @@ Run focused regression tests first, then formatting, lint, type checking, unit
221
290
  tests, and the actual affected runtime. Apply only the relevant lanes from
222
291
  [the change-boundary matrix](references/change-boundary-matrix.md).
223
292
 
224
- For medium/high-risk work, run an independent blocker/P1 review after local
225
- verification. Fix findings narrowly and re-review only the fixes and directly
226
- affected behavior.
293
+ After local verification at every level, have an independent agent compare the
294
+ implementation and observed user outcomes to the frozen To-Be and original request.
295
+ Include cross-view consistency, omissions and applicable historical regressions.
296
+ Fix findings narrowly and independently re-review the affected behavior.
227
297
 
228
298
  Give the independent verifier the acceptance sources and raw evidence, not just
229
- the implementer's summary. Use a separate session/agent as required by risk and
230
- repository rules; another model can help but model count is not quality evidence.
299
+ the implementer's summary. Use a separate session/agent for every review; another model can help but model count is not quality evidence.
231
300
 
232
301
  Treat deleted tests, weakened assertions, changed expected values, disabled
233
302
  checks, and relaxed CI or security policy as changes to the verification
@@ -239,9 +308,12 @@ production configuration, and CI or security-policy changes.
239
308
 
240
309
  ### 4. Coordinate through Draft PR and integration state
241
310
 
311
+ Before creating a PR, pass the independent To-Be review and pre-PR SQM loop.
242
312
  After authority for the required remote changes exists, record reproduction,
243
313
  tests, evidence, companion revisions, skipped checks, and remaining gates in the
244
- Draft PR. Before Ready or merge, combine the latest base with required companion
314
+ Draft PR. After creation, run a fresh SQM loop bound to the actual PR head/base
315
+ and have an independent agent review the PR diff, proofs and incident coverage.
316
+ Before Ready or merge, combine the latest base with required companion
245
317
  and parallel changes, rerun the affected path, and confirm current CI and
246
318
  mergeability. Without combined-state proof, report `pr_only_verified`, not
247
319
  `integration_verified`.
@@ -254,6 +326,12 @@ the charter permits, then have Codex operate the user's Chrome through the
254
326
  browser extension as a normal user. Do not replace this gate with direct API
255
327
  calls or a fixed selector-only test.
256
328
 
329
+ Immediately after the journey, refresh and inspect the experience/acceptance table
330
+ for the same candidate revision, environment, fixture, and input. Compare the
331
+ entire trigger-to-usable-outcome path, including what the user understands and can
332
+ do next, with the frozen experience contract. Do not promote the local journey
333
+ because its individual controls, requests, or services worked in isolation.
334
+
257
335
  Read [Codex Chrome user verification](references/chrome-user-verification.md)
258
336
  before running this phase.
259
337
 
@@ -295,7 +373,9 @@ and validation ordering still require Delivery Loop execution controls.
295
373
  ### 8. Clean up and issue the receipt
296
374
 
297
375
  Remove scoped fixtures and prove the residual count is zero. Deliver a compact
298
- completion receipt containing repository revisions, PR and CI, independent
376
+ completion receipt containing shared-spec baseline/To-Be revisions and status,
377
+ cross-view and implementation review results, pre/post-PR SQM proofs and historical
378
+ coverage gaps, repository revisions, PR and CI, independent
299
379
  review, container/runtime results, local Chrome evidence, merge and deployment
300
380
  identity, deployed Chrome evidence, artifacts, cleanup, skipped gates, and
301
381
  residual risk. Convert recurring findings into the smallest maintainable rule,
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## Before implementation
4
4
 
5
+ Freeze the user experience before proposing the solution. Read-only discovery may
6
+ inform it, but the first authored success record states the beneficiary and
7
+ context, their goal, the complete usable outcome, what they should see,
8
+ understand, and be able to do next at each observable moment, applicable recovery
9
+ and forbidden experiences, and how those moments will be observed. Assign stable
10
+ UX/acceptance IDs. A screen, component, endpoint, task, or stored row is an
11
+ implementation detail unless it is tied to this experience.
12
+
5
13
  The controller externalizes every acceptance condition with a stable ID, observable
6
14
  outcome, source independent of the candidate, and required checks. For each
7
15
  verification gate, freeze its applicable criteria in `charter.json` and record the
@@ -9,6 +17,13 @@ SHA-256 of the exact file bytes in the controller-owned snapshot. Reconcile the
9
17
  gate charters against the overall delivery charter so no requirement disappears.
10
18
  Do not choose a convenient subset after observing failures.
11
19
 
20
+ Use these criteria as the structured form of the experience contract rather than
21
+ creating a second UX checklist. Cover the full path from its real trigger to its
22
+ usable outcome and the applicable recovery path. When several parts must work
23
+ together for the beneficiary to succeed, include an end-to-end criterion in
24
+ addition to narrower diagnostic criteria. Independent coverage review compares
25
+ the experience contract and original request to the frozen rows before coding.
26
+
12
27
  Each criterion has two layers:
13
28
 
14
29
  - `user`: a goal-driven user journey with visible interactions and evidence of the
@@ -49,6 +64,15 @@ After every evaluated action (test, repair, review or changed inputs):
49
64
  All rows, including pending/failed ones, stay visible. A green matrix cannot advance
50
65
  an unrelated gate or prove merge/deployment. Validate again for the final environment.
51
66
 
67
+ After the exact candidate is built in a production-like local environment, run
68
+ the complete experience and regenerate `checklist.md` for that same revision,
69
+ environment, fixture, and input. Read the user and system rows together as a
70
+ single experience table: expected outcome, actual user observation, independent
71
+ postcondition/integration result, evidence, status, and next repair. Missing,
72
+ pending, failed, stale, or unverifiable applicable rows prevent
73
+ `user_like_local_verified`. Individually working components cannot override a
74
+ failed or absent end-to-end row.
75
+
52
76
  ## File contract
53
77
 
54
78
  Charter example (illustrative values must be replaced with actual requirements):
@@ -59,7 +83,7 @@ Charter example (illustrative values must be replaced with actual requirements):
59
83
  "run_id": "save-run-42",
60
84
  "criteria": [{
61
85
  "id": "SAVE-1",
62
- "outcome": "The owner can recover the saved note after returning",
86
+ "outcome": "An owner returning to the task sees the saved note, understands it was retained, and can continue editing",
63
87
  "acceptance_source": "Approved issue acceptance criteria, revision 3",
64
88
  "layers": {
65
89
  "user": {"applicability": "required", "method": "Save in Chrome, reload, sign in again and compare the note"},
@@ -126,5 +150,6 @@ a collector told the truth, a criterion is adequate, or a system is deployed.
126
150
  Hashes are not signatures. The controller must protect the frozen digest, verify
127
151
  requirement coverage and genuine non-applicability, and inspect raw evidence.
128
152
  Independent review checks the oracle and findings; the validator is an additional
129
- gate within this skill, not a globally installed hook or the CLI orchestrator's
130
- completion authority.
153
+ gate within this skill, not a globally installed hook. The CLI now additionally
154
+ uses [minimum completion](minimum-completion.md) to enforce current functional
155
+ evidence at its promotion boundary; this basic validator alone is insufficient.
@@ -39,7 +39,7 @@ messages.
39
39
  | --- | --- | --- | --- |
40
40
  | 1 | Maximum assurance | Authentication, payments, destructive or irreversible changes, production security/configuration, sensitive data, and risky migrations | Exercise all affected and adjacent invariants, failure/recovery and rollback paths; require the broadest applicable independent review and repository gates. |
41
41
  | 2 | Protected | Persistence, permissions, shared contracts, external side effects, cross-repository changes, and medium-risk migrations | Verify both evidence layers for every affected outcome, shared boundaries, retry/idempotency and recovery; require independent review of the change and affected integrations. |
42
- | 3 | Balanced (default) | Normal features and bug fixes with bounded, reversible impact | Run focused regressions, applicable static checks, the real affected runtime and main user journey; use risk- and repository-required independent review. |
42
+ | 3 | Balanced (default) | Normal features and bug fixes with bounded, reversible impact | Run focused regressions, applicable static checks, the real affected runtime and main user journey; require independent design/To-Be/PR review, scoped to the affected path. |
43
43
  | 4 | Fast | Small, isolated, reversible UI or implementation changes | Run the direct regression and real affected path; add broader checks only for touched shared boundaries; keep mandatory review and evidence gates. |
44
44
  | 5 | Fastest | Copy, documentation, comments, metadata, or similarly trivial changes with no runtime/data/security effect | Verify the changed artifact, final diff, packaging/link integrity where applicable, and every repository-mandated check; do not claim untested runtime behavior. |
45
45
 
@@ -69,8 +69,12 @@ always choose a lower numbered, safer level.
69
69
  Every level preserves:
70
70
 
71
71
  - frozen success criteria and independent acceptance sources;
72
+ - shared system As-Is/To-Be, cross-view consistency and independent agent reviews;
73
+ - pre/post-PR SQM gates under explicit opt-in, with historical coverage reported;
72
74
  - honest state transitions and current revision/context binding;
73
75
  - required user/system evidence for applicable outcomes;
74
76
  - protection of user work, secrets, data integrity, and tenant boundaries;
75
77
  - explicit failure, pending, skipped, and non-applicable reporting;
76
78
  - repository-required tests, reviews, CI, and approval/authority boundaries.
79
+
80
+ All levels retain the [minimum functional floor](minimum-completion.md): requirement mapping, actual operation/result, and independent postcondition/integration observations. Persistence requires reload and stored-state checks. Non-runtime work verifies its real consumer/artifact; no imaginary DB or API checks are added. The minimum checker has no level-based bypass.
@@ -0,0 +1,146 @@
1
+ # Minimum functional completion
2
+
3
+ Every level must prove that the requested work exists, actual operations reach
4
+ the intended result, and necessary persistence/integration works. Speed changes
5
+ adjacent verification breadth, never this floor. The CLI requires this matrix for
6
+ all coding-loop attempts, including legacy v2 resumes/rechecks. No opt-out field
7
+ in an executor result or assurance-level selection disables the gate.
8
+
9
+ ## Collect real observations
10
+
11
+ Before implementation, reconcile the original request, acceptance criteria and
12
+ planned operations against the frozen experience contract. Preserve every
13
+ observable moment from the real trigger to a usable result, including applicable
14
+ recovery and forbidden experiences; a missing requirement must
15
+ be added through the controller's charter process, not omitted from the matrix.
16
+ The independent auditor compares original-request coverage and checks the oracle
17
+ against raw evidence. Machine mapping checks cannot discover an omitted idea in
18
+ natural language or authenticate what an evidence collector observed.
19
+
20
+ For each stable criterion ID record implementation_refs (repository-relative file
21
+ paths). New UX-first charters preserve the IDs supplied by the experience
22
+ contract; legacy charters without explicit IDs retain deterministic `AC-N` IDs.
23
+ Then:
24
+
25
+ - user/operation: operate the actual UI or CLI/consumer. Expected is true; actual
26
+ is whether the intended operation really executed, not just whether a click
27
+ command succeeded. Include screenshots/traces where relevant.
28
+ - user/result: observe the requested visible outcome, including reload and session
29
+ return for a saving feature. Compare expected and actual values, user
30
+ understanding, and the next action the experience makes available.
31
+ - system/postcondition: independently inspect the final state; for persistence,
32
+ include the saved values and ownership, not a toast or HTTP status.
33
+ - system/integration: inspect the necessary combined path through APIs, storage,
34
+ workers or consumers. Job acceptance is not job completion. Use the same input
35
+ and execution context across layers; cite trace/runtime identities in subject
36
+ and additional evidence.
37
+
38
+ For document-only work these mean opening the actual consumer and checking content,
39
+ links and packaged bytes. No DB/API is required if none participates. Both generic
40
+ layers remain required; there is no post-failure waiver. Tests, permissions or
41
+ runtime unavailable means pending/blocked. Never fabricate expected/actual equality.
42
+ Passing narrower rows for controls, APIs, services, or artifacts cannot substitute
43
+ for the end-to-end row when the requested experience depends on their combination.
44
+
45
+ ## Executable contract
46
+
47
+ `check-minimum-completion.mjs` and `check-acceptance.mjs` ship together under the
48
+ installed skill's scripts directory. The CLI instruction supplies controller input
49
+ JSON; save it as charter.json for the standalone command. It contains id,
50
+ requirement, repository, acceptance_criteria, completion_contract (version 2), and
51
+ thread_state.original_request. For standalone use the controller freezes the same
52
+ fields independently of implementation. The matrix otherwise follows
53
+ [acceptance evidence](acceptance-evidence.md).
54
+
55
+ To derive the frozen specification/context, import `minimumCharter(charter)` and
56
+ `minimumContext(charter, fullHeadSha)` from the minimum script; import `sha256`
57
+ and `contextDigest` from check-acceptance.mjs. The charter digest is
58
+ `sha256(Buffer.from(JSON.stringify(minimumCharter(charter))))`.
59
+ The context digest is `contextDigest(minimumContext(charter, fullHeadSha))`.
60
+ The CLI derives both itself; it never takes expected digests from executor output.
61
+
62
+ The current CLI context is one local checkout, its full HEAD, controller charter
63
+ ID and request digest. A clean checkout is required and checked again after
64
+ collection. This is not automatic multi-repository deployment identity discovery.
65
+ For companion services, verify the combined path and record the pinned service
66
+ identities in the evidence; the independent reviewer must validate their current
67
+ identity. Do not claim that this single-checkout gate automatically re-reads a
68
+ companion service's Git HEAD or production environment.
69
+
70
+ Every matrix row uses the same stable criterion ID and adds
71
+ `implementation_refs: ["src/example.js"]`. Each required
72
+ user/system cell's **first** evidence file is JSON with this shape (user example):
73
+
74
+ ```json
75
+ {
76
+ "criterion_id": "AC-1",
77
+ "context_sha256": "<current context digest>",
78
+ "checks": {
79
+ "operation": {"subject": "Save clicked and request observed for fixture run", "expected": true, "actual": true},
80
+ "result": {"subject": "Note after reload and session return", "expected": "requested text", "actual": "requested text"}
81
+ }
82
+ }
83
+ ```
84
+
85
+ The system file uses `postcondition` and `integration` instead. Each has `subject`,
86
+ non-null `expected` and actual observed `actual`. Values may be objects/arrays to
87
+ compare saved values and ownership together. The checker compares values exactly;
88
+ missing fields or mismatches fail regardless of a cell's passed flag. Additional
89
+ cell evidence may contain screenshots or logs; all artifact hashes are validated.
90
+ Keep raw evidence local and use synthetic data, never credentials/personal data.
91
+
92
+ Store matrix and evidence under ui_evidence_root, or under repository `.artifacts`
93
+ when no root was specified. All artifact paths are relative to the matrix directory.
94
+ Return `delivery_evidence_path` in SIMY_RESULT_JSON, absolute under that root or
95
+ relative to it. Source mappings must resolve to files inside the current repository.
96
+ Evidence must be bounded regular files; path escapes/symlinks are rejected.
97
+
98
+ Standalone invocation, with controller-owned trusted digests:
99
+
100
+ ```text
101
+ node <installed-skill>/scripts/check-minimum-completion.mjs charter.json matrix.json context.json <trusted-charter-sha256> <trusted-context-sha256>
102
+ ```
103
+
104
+ Exit 0 is evidence_complete; 1 is evidence_incomplete; 2 means invalid/unavailable
105
+ inputs. JSON includes a readable checklist and floor failures. Check the top-level
106
+ status, not only individual base-matrix rows. The standalone checker validates
107
+ mapping structure; only the CLI additionally resolves mappings in its checkout.
108
+ Neither file hashes nor a passed report authenticate the collector or prove an
109
+ oracle matches the original requirement. Independent coverage/oracle review is
110
+ required by the CLI and must inspect the raw evidence. The standalone command
111
+ cannot stop Codex/Claude's final chat response and does not install global hooks.
112
+
113
+ ## State, review and recovery
114
+
115
+ The CLI's implementation gate includes the minimum report before independent
116
+ review. The review returns coverage_review with requirements_complete,
117
+ unmapped_requirements and a concrete observation. The controller binds that
118
+ review to the matrix digest, then recollects evidence. Changing the matrix after
119
+ review requires a new review; changing HEAD or dirtying the tree invalidates the
120
+ proof. A concurrent call using the same run ID is rejected, including cloned snapshots.
121
+ A repeated start rechecks evidence without executing the implementation again;
122
+ explicit resume remains the repair path. Cross-process
123
+ execution remains subject to existing runner/host ownership controls.
124
+
125
+ PR recheck clears prior completion flags and reruns the floor. Missing evidence
126
+ never promotes an old successful audit. The old history is retained; do not rewrite
127
+ it as verified under the new floor. Fix the named criterion, collect fresh evidence
128
+ and resume within the retry budget. Reconcile ambiguous external side effects
129
+ before retrying. The minimum pass is a prerequisite for existing CI/review/authority
130
+ gates, not merge, deployment or a complete production delivery.
131
+
132
+ Rollback: restoring the older CLI removes this additional enforcement. Retain the
133
+ versioned evidence/history and report that limitation; never relabel old evidence
134
+ as verified by this floor. Monitor minimum-completion findings and subsequent
135
+ reviewer-discovered gaps through existing local run records; no new telemetry or
136
+ external provider calls are introduced.
137
+
138
+ ## Shared specifications and independent review
139
+
140
+ The floor's stable criterion rows trace back to requirement IDs in the team's shared
141
+ As-Is/To-Be specification. Follow [shared system specifications](shared-system-specifications.md)
142
+ for purpose, user experience, cross-view consistency, independent reviews and
143
+ pre/post-PR SQM. These are controller workflow obligations, not fields magically
144
+ validated by the minimum checker. The CLI gate verifies minimum structured evidence;
145
+ it does not launch every design review or SQM phase on its own. Standalone hosts
146
+ remain responsible for executing this skill and cannot claim an enforced host hook.
@@ -0,0 +1,151 @@
1
+ # Shared system specifications and delivery review
2
+
3
+ Read before planning a Delivery Loop change. The specification belongs to the
4
+ system and its team, not to a single run. Use existing team paths and conventions;
5
+ if none exist, start `docs/systems/<system-id>/` with an index and the applicable
6
+ views below. Repository paths here are a convention, not a demand to move existing
7
+ documents or to create a new service. Keep one canonical source for each concept.
8
+
9
+ ## Shared baseline and proposed change
10
+
11
+ The system index records its owner/maintainers, repository/document links, stable
12
+ system ID, As-Is source revision(s) and environment, verified date, and gaps.
13
+ Distinguish source-code behavior, locally observed behavior, and deployed behavior.
14
+ An old design or green PR is not proof of current production behavior.
15
+
16
+ At the start of each run:
17
+
18
+ 1. Freeze the experience contract from the original request before proposing a
19
+ solution: beneficiary/context, goal, complete usable outcome, observable
20
+ moments with what the person sees, understands, and can do next, recovery and
21
+ forbidden experiences, and the observation method. Read-only discovery may
22
+ inform this record. Give every moment a stable UX/acceptance ID.
23
+ 2. Read the existing index and current linked views. Reconcile relevant As-Is with
24
+ code and actual behavior; label unknowns, cite evidence, and correct documented
25
+ drift without claiming that the drift was part of the requested feature.
26
+ 3. Reconcile why the change matters against that contract: current difficulty,
27
+ observable success, and non-goals. Preserve the user's original request as an
28
+ independent acceptance source; do not replace their outcome with a component
29
+ or implementation inventory.
30
+ 4. Prepare a proposed To-Be on a branch/change proposal linked from the shared
31
+ system index. Record its baseline revision, affected stable IDs, before/after
32
+ behavior, dependencies and acceptance oracles. Reuse unchanged views by reference;
33
+ do not copy the whole specification into every run or generate empty diagrams.
34
+ 5. Link each experience ID to workflow, screen/control, state/sequence, API/event,
35
+ data/relationship, permission and runtime boundaries as applicable. Map these
36
+ stable system IDs to the run's criterion rows and implementation/evidence locations.
37
+ 6. Obtain independent design review before implementation. Supply the original
38
+ request, shared baseline, To-Be and linked unchanged views. Missing evidence or
39
+ contradictory views remains pending/failed, never silently accepted.
40
+
41
+ After the exact local candidate is built, update the existing acceptance matrix
42
+ and its readable table for those same experience IDs. Compare expected experience,
43
+ actual user observation, independent system result, evidence, status, and next
44
+ repair across the whole journey. This is a view of the canonical acceptance data,
45
+ not another specification. A gap between working parts blocks local user-journey
46
+ promotion even if every part passed a narrower test.
47
+
48
+ The twelve-view index must account for every category: present (with a canonical
49
+ link), unchanged (with a revision), not applicable (with a reason), or unknown
50
+ (with an owner/next action). Only create/update a diagram where it describes a
51
+ real system concept. For CLI/skill systems, chat/terminal interactions can be the
52
+ interface views; do not invent application screens, APIs, tables or infrastructure.
53
+
54
+ | View | Primary content | Consistency checks against other views |
55
+ | --- | --- | --- |
56
+ | art-01-screen-inventory-final | Screens or user interaction surfaces and stable IDs | Every referenced screen/control in workflows, transitions and wireframes exists |
57
+ | art-02-screen-transitions | Navigation, entry/exit, failure/recovery | Reachable inventory entries, correct permission guards and state conditions |
58
+ | art-03-wireframes | Controls, content, empty/loading/error/success states | Each action has a requirement, transition and downstream sequence; no dead control |
59
+ | art-04-functional-requirements | Purpose, beneficiary, outcomes, invariants, acceptance | Every request maps to implementation and evidence through the other affected views |
60
+ | art-05-state-machines | Legal states, guards, terminal outcomes, retry/cancel | Sequences/events trigger legal transitions; UI messages match actual final state |
61
+ | art-06-permissions | Actor/role, action, resource, authority boundary | UI guards, API checks, ownership and execution roles agree |
62
+ | art-07-user-workflows | User goal, steps, completion and recovery experience | Requirements covered end to end through screens, APIs, persistence and runtime |
63
+ | art-08-data-dictionary | Fields, meaning, type, requiredness, lifecycle and owner | API/event payloads, ER cardinality and state invariants use the same definitions |
64
+ | art-09-sequences | Calls/events through components, errors, asynchronous completion | API names/payloads, states, authorization and deployed component boundaries agree |
65
+ | art-10-api-design | Existing APIs, commands or file contracts, errors and compatibility | Sequence inputs/outputs, data meanings and permission checks agree |
66
+ | art-11-er-diagram | Entities, relationships, ownership and cardinality | Dictionary and API reads/writes agree; label logical artifact models as non-DB |
67
+ | art-12-infrastructure | Repositories, execution environments, services and trust boundaries | Every sequence participant has an actual host/owner; revision/rollout dependencies align |
68
+
69
+ ## Review evidence and neutral agents
70
+
71
+ All reviews use independent agents/sessions, including design, cross-view
72
+ consistency, implementation-versus-To-Be, verification changes and PR review.
73
+ An agent must not approve work it authored. A reviewer can re-review fixes to its
74
+ findings if it did not implement the fixes. Supply raw sources, not desired answers;
75
+ require inspected references, discrepancies, uncertainty and a reasoned verdict.
76
+ Use the repository-required model (gpt-5.5 / xhigh where mandated and available).
77
+ If independent review is unavailable, report that gate as blocked.
78
+
79
+ Persist a compact review receipt: reviewer/session identity, review kind, original
80
+ request and shared baseline/To-Be references, candidate revisions, inspected views
81
+ and evidence, findings, result, and re-review links. An independent reviewer checks:
82
+
83
+ - coverage of the original request, user benefit and acceptance oracles;
84
+ - consistency for every affected cross-view link, including unchanged neighbors;
85
+ - behavior after actual operation, reload/session return and final persistence or
86
+ integration outcome where applicable;
87
+ - implementation and tests against the proposed To-Be, not just against each other;
88
+ - missing/extra functionality, stale evidence and unresolved historical regressions.
89
+
90
+ A diagram syntax/link checker helps, but cannot replace semantic cross-view review.
91
+ Do not declare neutral review merely by renaming the implementer's role.
92
+
93
+ ## SQM before and after PR creation
94
+
95
+ Use the installed SQM loop skill. Respect explicit SQM opt-in, existing session and
96
+ service authority. Explain unavailable gates; do not install global hooks, weaken
97
+ rules, force an upload or switch organizations to obtain a pass.
98
+
99
+ For each phase use fresh, separate local paths outside the diff (for example an
100
+ ignored `.artifacts/delivery/<run>/sqm/pre-pr/` or `post-pr/` directory):
101
+
102
+ ```sh
103
+ simy sqm min-check --base <actual-pr-base> --output <phase>/min.json
104
+ simy sqm check --base <actual-pr-base> --min-result <phase>/min.json --proof <phase>/proof.json --signed-evidence <phase>/proof.json.signed.json
105
+ ```
106
+
107
+ Use supported no-upload options when required by the authorized sharing scope.
108
+ Read the proof and verify its repository, head, base, working-tree/diff identity,
109
+ knowledge bundle version/digest and `outcome.status == passed`; verify the bound
110
+ signature using SQM tooling. Exit zero alone is insufficient. Do not edit or commit
111
+ between min-check and check. Pin the commit before the pre-PR check; writing proof
112
+ into the committed diff would invalidate its identity.
113
+
114
+ Before the pre-PR phase, inventory relevant known incidents from the team's shared
115
+ incident records, SQM knowledge and repository regression history. Record incident
116
+ or source ID, failure boundary, applicable/unaffected/unknown classification,
117
+ regression command and result, SQM rule match/coverage, and residual gaps. Link this
118
+ ledger from the shared specification so the next task can reuse and improve it.
119
+ Separate confirmed incidents from synthetic risk scenarios; never invent history.
120
+ A zero-match/no-applicable-rules proof does not establish historical coverage.
121
+ Use concrete regressions for relevant uncovered incidents and have an independent
122
+ reviewer assess coverage; keep missing incident history or untested boundaries
123
+ visible. No finite test promises absence of all future bugs.
124
+
125
+ Pre-PR: implementation-to-To-Be review and relevant regressions pass, then run SQM;
126
+ repair findings within the bounded loop, re-review changed work, and rerun against
127
+ the final candidate before creation. On unavailable/failed proof, withhold creation
128
+ and report the exact blocker while continuing independent authorized preparation.
129
+
130
+ Post-PR: fetch the actual PR head/base and check out/verify that combination, run
131
+ both SQM phases again into new paths, inspect proof and current CI, and obtain
132
+ independent PR/evidence review. The pre-PR proof cannot stand in for this run.
133
+ If it fails, retain the PR as draft/not-ready with unmet gates recorded, repair and
134
+ rerun affected independent reviews and SQM. A changed head/base/spec or relevant
135
+ bundle invalidates affected approvals and proofs; preserve old receipts as history.
136
+ Promote Ready only with current required gates, including applicable combined-state
137
+ verification. Merge and deployment still require their own authority and evidence.
138
+
139
+ ## Team maintenance after verification
140
+
141
+ Merge reviewed specification changes with the corresponding implementation through
142
+ the normal team review process. Record proposed, implemented locally, merged and
143
+ verified-in-environment status separately. Advance As-Is only for the revision and
144
+ environment actually verified; a merged To-Be is not automatically production As-Is.
145
+ Preserve the prior baseline and decisions in version history. If another change
146
+ updates a shared view, reconcile its semantics and re-review affected links even
147
+ when Git reports no textual conflict. Do not overwrite concurrent edits.
148
+
149
+ Each run stores pointers, deltas and evidence in its receipt, not another competing
150
+ master specification. Record unresolved drift with an owner, source and next action.
151
+ Never lower the intended outcome merely to make an implementation match a diagram.