@awak-app/simy-cli 0.7.15 → 0.7.17
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 +225 -98
- package/package.json +5 -3
- package/src/agent.js +129 -7
- package/src/backend-executable.js +7 -6
- package/src/bounded-local-task-subtask-pool.js +32 -6
- package/src/bounded-local-task-subtasks-contract.js +1 -1
- package/src/cli-contract.js +1 -1
- package/src/codex-plugins/simy/.codex-plugin/plugin.json +2 -2
- package/src/codex-plugins/simy/hooks/README.md +8 -3
- package/src/codex-plugins/simy/hooks/delivery-loop.mjs +302 -78
- package/src/codex-plugins/simy/hooks/hooks.json +1 -1
- package/src/codex-plugins/simy/hooks/loop-kernel/conformance.json +136 -0
- package/src/codex-plugins/simy/hooks/loop-kernel/index.mjs +42 -0
- package/src/codex-plugins/simy/hooks/loop-kernel/outcome-review.mjs +31 -0
- package/src/codex-plugins/simy/hooks/loop-kernel/pin.json +6 -0
- package/src/codex-plugins/simy/hooks/loop-kernel/policy.json +141 -0
- package/src/codex-plugins/simy/hooks/loop-kernel/task-pool.mjs +34 -0
- package/src/codex-plugins/simy/hooks/loop-kernel/work-frontier.mjs +132 -0
- package/src/codex-plugins/simy/hooks/loop-kernel.mjs +6 -0
- package/src/codex-plugins/simy/hooks/outcome-progress.mjs +16 -5
- package/src/codex-plugins/simy/hooks/purpose-completion-contract.mjs +10 -0
- package/src/codex-plugins/simy/hooks/purpose-cycle.mjs +12 -11
- package/src/codex-plugins/simy/hooks/purpose-evidence.mjs +28 -38
- package/src/codex-plugins/simy/hooks/purpose-rule-policy.mjs +1 -2
- package/src/codex-plugins/simy/hooks/purpose-rule-review.mjs +5 -63
- package/src/codex-plugins/simy/hooks/purpose-search.mjs +21 -4
- package/src/codex-plugins/simy/hooks/result-cycle.mjs +166 -0
- package/src/codex-plugins/simy/hooks/scene-reasoning.mjs +98 -12
- package/src/codex-plugins/simy/hooks/user-experience.mjs +26 -0
- package/src/codex-plugins/simy/hooks/work-frontier.mjs +2 -0
- package/src/codex-plugins/simy/skills/diagnose/SKILL.md +10 -4
- package/src/coding-run-recovery.js +4 -2
- package/src/delivery-hooks/claude-workflow.md +10 -7
- package/src/delivery-hooks/command.js +76 -10
- package/src/delivery-hooks/consistency-monitor.js +20 -4
- package/src/delivery-hooks/consult.js +60 -0
- package/src/delivery-hooks/diagnosis.js +2 -2
- package/src/delivery-hooks/legacy-hook-routing.js +46 -8
- package/src/delivery-hooks/local-runtime.js +81 -1
- package/src/delivery-hooks/local-supervisor.js +13 -4
- package/src/delivery-hooks/repair-continuation.js +80 -0
- package/src/delivery-hooks/repair.js +164 -0
- package/src/delivery-hooks/supervisor-handover.js +84 -0
- package/src/delivery-hooks/supervisor-owner.js +3 -2
- package/src/delivery-hooks/supervisor-service.js +38 -6
- package/src/delivery-hooks/supervisor-watchdog.js +15 -4
- package/src/delivery-hooks/supervisor.js +151 -18
- package/src/desktop-access.js +2 -1
- package/src/desktop-host.js +35 -2
- package/src/durable-local-task-worker.js +372 -58
- package/src/execution-capability-contract.js +15 -1
- package/src/index.js +3 -3
- package/src/local-photos-read.swift +33 -0
- package/src/local-photos.js +47 -0
- package/src/local-task-attachment-store.js +31 -0
- package/src/local-task-destination.js +174 -0
- package/src/local-task.js +119 -7
- package/src/native-delegation-contract.js +68 -0
- package/src/native-provider-identity.js +60 -0
- package/src/orchestrator/audit.js +24 -323
- package/src/orchestrator/budget.js +22 -11
- package/src/orchestrator/charter-validation.js +3 -41
- package/src/orchestrator/checklist-continuation.js +2 -14
- package/src/orchestrator/completion-contract.js +4 -49
- package/src/orchestrator/contract.js +5 -9
- package/src/orchestrator/delivery/WORKFLOW.md +30 -710
- package/src/orchestrator/delivery/references/acceptance-evidence.md +4 -216
- package/src/orchestrator/delivery/references/change-boundary-matrix.md +4 -103
- package/src/orchestrator/delivery/references/chrome-user-verification.md +5 -133
- package/src/orchestrator/delivery/references/cross-repository-control.md +4 -74
- package/src/orchestrator/delivery/references/delivery-levels.md +3 -117
- package/src/orchestrator/delivery/references/local-sqm-evidence.md +1 -1
- package/src/orchestrator/delivery/references/minimum-completion.md +4 -144
- package/src/orchestrator/delivery/references/pr-closure.md +4 -200
- package/src/orchestrator/delivery/references/shared-system-specifications.md +4 -161
- package/src/orchestrator/delivery/references/state-and-receipts.md +4 -245
- package/src/orchestrator/delivery/references/state-model.md +4 -185
- package/src/orchestrator/delivery/references/ux-specification.md +4 -95
- package/src/orchestrator/delivery-level.js +2 -10
- package/src/orchestrator/evidence.js +2 -3
- package/src/orchestrator/independent-audit.js +15 -164
- package/src/orchestrator/instruction.js +19 -254
- package/src/orchestrator/loop.js +35 -95
- package/src/orchestrator/outcome-monitor.js +21 -0
- package/src/orchestrator/pr-closure.js +2 -16
- package/src/orchestrator/recovery.js +32 -2
- package/src/orchestrator/ux-specification.js +3 -12
- package/src/provider-delegation.js +336 -0
- package/src/runner.js +5 -2
- package/src/session-supervision/acceptance-reads.js +34 -0
- package/src/session-supervision/artifact-observer.js +138 -0
- package/src/session-supervision/browser-cdp.js +59 -0
- package/src/session-supervision/browser-recovery.js +97 -0
- package/src/session-supervision/codex-app-server.js +61 -22
- package/src/session-supervision/completion-artifacts.js +44 -0
- package/src/session-supervision/consistency-auditor.js +8 -11
- package/src/session-supervision/continuation-analysis.js +47 -28
- package/src/session-supervision/final-response-recovery.js +5 -0
- package/src/session-supervision/index.js +22 -5
- package/src/session-supervision/interaction-proxy.js +250 -0
- package/src/session-supervision/interaction-task.js +189 -0
- package/src/session-supervision/native-interaction.js +102 -0
- package/src/session-supervision/provider-failure.js +40 -0
- package/src/session-supervision/purpose-instruction.js +14 -14
- package/src/session-supervision/purpose-recovery.js +32 -12
- package/src/session-supervision/purpose-verification.js +50 -216
- package/src/session-supervision/recovery-frontier.js +55 -0
- package/src/session-supervision/stop-notifications.js +8 -8
- package/src/sqm/agent-skill.js +1 -1
- package/src/sqm/checkers.js +12 -6
- package/src/sqm/claude-plugin-update.js +22 -8
- package/src/sqm/claude-plugin.js +6 -0
- package/src/sqm/local-tests.js +2 -1
- package/src/sqm/plugin-cache.js +67 -0
- package/src/sqm/proof.js +25 -0
- package/src/sqm/report.js +1 -0
- package/src/sqm/workflow-onboarding.js +3 -39
- package/src/sqm/workflow-update.js +17 -6
- package/src/startup-preflight.js +2 -20
- package/src/team-status-fence-store.js +32 -0
- package/src/team-threads.js +457 -0
|
@@ -1,118 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Proportionate verification
|
|
2
|
+
Choose checks that can reveal defects in the requested behavior. A wording fix may need only a diff and rendered-output check; persistence, authorization, payments and migrations need the relevant failure, isolation, retry and recovery paths exercised. Use judgment rather than a numbered minimum level.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
the controller proceeds on reversible assumptions. They do not change the goal,
|
|
5
|
-
completion predicate, authority boundaries, or truthfulness of evidence.
|
|
6
|
-
|
|
7
|
-
Numbering version: `assurance-ascending-v2`. Level 5 is the highest assurance;
|
|
8
|
-
level 1 is the lightest. These numbers describe assurance, not task priority.
|
|
9
|
-
|
|
10
|
-
## AI selection without a confirmation gate
|
|
11
|
-
|
|
12
|
-
AI selects the proportionate effective level after understanding the task and
|
|
13
|
-
checking the highest applicable safety floor. Preserve explicit user selections
|
|
14
|
-
and mandatory verification; a reversible selection needs no human confirmation.
|
|
15
|
-
Record AI as the decision maker, the rationale, applicable risk and uncertainty.
|
|
16
|
-
Do not fabricate a user message or approval reference. Refresh the decision on
|
|
17
|
-
material scope/risk changes without adding a second continuation request.
|
|
18
|
-
|
|
19
|
-
Show all five levels only when requested. Estimates help planning but missing
|
|
20
|
-
numeric estimates or a complete comparison table do not block implementation.
|
|
21
|
-
Unknown facts prompt research, and ambiguous historical numbering uses source
|
|
22
|
-
reconciliation and a conservative assurance floor. Irreversible operations still
|
|
23
|
-
require the relevant exact decision; an assurance level never creates credentials
|
|
24
|
-
or overrides provider permission, user stops, rejections or budget limits.
|
|
25
|
-
|
|
26
|
-
## The five levels
|
|
27
|
-
|
|
28
|
-
| Level | Name | Intended work | Verification and review policy |
|
|
29
|
-
| --- | --- | --- | --- |
|
|
30
|
-
| 5 | 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. Use separate independent design, implementation-boundary, and final PR/evidence reviews plus every repository gate. |
|
|
31
|
-
| 4 | Protected | Persistence, permissions, shared contracts, external side effects, cross-repository changes, and medium-risk migrations | Verify both evidence layers, shared boundaries, retry/idempotency, staged rollout and recovery. Require independent boundary/design and final candidate/integration review; combine them only when the reviewed inputs are exactly identical. |
|
|
32
|
-
| 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. One independent final-candidate review may cover design, implementation, affected views and evidence; repeat only when its bound identity changes. |
|
|
33
|
-
| 2 | Fast | Small, isolated, reversible UI or implementation changes | Run the direct regression and real affected path, adding shared-boundary checks only when touched. Use a scoped independent diff/actual-path review when repository policy or material ambiguity requires it. |
|
|
34
|
-
| 1 | Fastest | Copy, documentation, comments, metadata, or similarly trivial changes with no runtime/data/security effect | Verify the artifact, final diff, packaging/link integrity and repository-mandated checks. Independent review is needed only when governing policy requires it or material ambiguity remains. |
|
|
35
|
-
|
|
36
|
-
Level 3 is the recommendation when no task-specific signal favors another level.
|
|
37
|
-
Faster levels reduce work only by declaring genuinely unaffected lanes not
|
|
38
|
-
applicable in the frozen charter with a source and reason. They cannot convert a
|
|
39
|
-
failed, unavailable, stale, or skipped applicable check into non-applicability.
|
|
40
|
-
|
|
41
|
-
## Task-specific duration estimates
|
|
42
|
-
|
|
43
|
-
For every level, give a numeric lower-to-upper range in hours for the same frozen
|
|
44
|
-
task scope and delivery endpoint. Do not hardcode universal durations, product
|
|
45
|
-
examples or multipliers by level. Derive estimates from discovered change
|
|
46
|
-
boundaries, implementation work, applicable checks, review passes, environment
|
|
47
|
-
setup, likely repair/retest work and available run history. Explain assumptions,
|
|
48
|
-
evidence, uncertainty and confidence; estimates are not measured results or
|
|
49
|
-
deadlines. Use read-only discovery to narrow uncertainty before selection.
|
|
50
|
-
|
|
51
|
-
Distinguish hands-on/execution time from CI, queue, reviewer, approval and external
|
|
52
|
-
waiting time. Compute elapsed ranges using the dependency critical path, accounting
|
|
53
|
-
for parallel work without adding overlapping durations twice. Show known waiting
|
|
54
|
-
ranges separately and the resulting elapsed range. If an external wait has no
|
|
55
|
-
defensible bound, show a conditional numeric execution range plus explicitly
|
|
56
|
-
unbounded/unknown waiting time; do not invent a finite total. If even execution
|
|
57
|
-
cannot yet be estimated, retain that level's row as estimate pending with the
|
|
58
|
-
missing input and next discovery step. Continue reversible work; complete numeric estimates are not a selection gate.
|
|
59
|
-
Unavailable levels have conditional estimates for comparison only, not permission
|
|
60
|
-
to execute below the risk floor. A stricter level cannot appear faster by silently
|
|
61
|
-
omitting required work; explain any overlap or inversion from verified reuse,
|
|
62
|
-
parallelism or uncertainty. Refresh estimates when scope, evidence reuse,
|
|
63
|
-
environment or review needs change. Estimates authorize neither paid services
|
|
64
|
-
nor additional work and do not weaken checks to fit the range.
|
|
65
|
-
|
|
66
|
-
## Safety floors
|
|
67
|
-
|
|
68
|
-
The minimum permitted assurance level is determined by the highest applicable risk:
|
|
69
|
-
|
|
70
|
-
| Risk trigger | Minimum permitted assurance level |
|
|
71
|
-
| --- | --- |
|
|
72
|
-
| Authentication or authorization policy; payments; secrets or sensitive personal data; destructive/irreversible operations; production security/configuration; data-loss migration risk | 5 |
|
|
73
|
-
| Persistence or ownership; externally visible side effects; shared API/schema contracts; cross-repository rollout; reversible migration; meaningful concurrency/idempotency risk | 4 |
|
|
74
|
-
| Ordinary runtime behavior with bounded and reversible impact | 3 |
|
|
75
|
-
| Isolated reversible presentation or implementation behavior without persistent, permission, contract, or external effects | 2 |
|
|
76
|
-
| Non-runtime copy, documentation, comments, or metadata only | 1 |
|
|
77
|
-
|
|
78
|
-
When several triggers apply, use the highest numbered floor. Governing
|
|
79
|
-
instructions or a verified project policy may require a safer level. The user may
|
|
80
|
-
always choose a higher numbered, safer level. The effective level is the maximum
|
|
81
|
-
of the requested level, risk floor and governing-policy floor.
|
|
82
|
-
|
|
83
|
-
## Existing selections and historical receipts
|
|
84
|
-
|
|
85
|
-
Do not reinterpret an old number using the new direction. Preserve original
|
|
86
|
-
receipts and their version/source. For a verified legacy descending-assurance
|
|
87
|
-
selection, map old to new as 1→5, 2→4, 3→3, 4→2, 5→1, record both meanings and
|
|
88
|
-
explain the conversion. Keep the same assurance scope; this is not a fresh grant
|
|
89
|
-
of authority or evidence. If the old numbering cannot be established, research its source and use a conservative assurance floor while preserving the ambiguous historical receipt. AI re-evaluates reversible assurance decisions; do not ask the user to resolve numbering bookkeeping.
|
|
90
|
-
|
|
91
|
-
## What never varies
|
|
92
|
-
|
|
93
|
-
Every level preserves:
|
|
94
|
-
|
|
95
|
-
- frozen success criteria and independent acceptance sources;
|
|
96
|
-
- shared system As-Is/To-Be and consistency of affected cross-view links;
|
|
97
|
-
- the frozen risk-proportionate review plan and every governing repository review;
|
|
98
|
-
- SQM only under explicit opt-in, with identity-bound proof and historical coverage reported;
|
|
99
|
-
- honest state transitions and current revision/context binding;
|
|
100
|
-
- required user/system evidence for applicable outcomes;
|
|
101
|
-
- protection of user work, secrets, data integrity, and tenant boundaries;
|
|
102
|
-
- explicit failure, pending, skipped, and non-applicable reporting;
|
|
103
|
-
- repository-required tests, reviews, CI, and approval/authority boundaries.
|
|
104
|
-
|
|
105
|
-
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.
|
|
106
|
-
|
|
107
|
-
## Reuse instead of duplicate ceremony
|
|
108
|
-
|
|
109
|
-
Freeze the review and SQM plan in the charter. Reuse a passing review or SQM
|
|
110
|
-
proof only when its repository, head, base, working-tree/diff, specification,
|
|
111
|
-
policy, knowledge bundle, evidence and relevant environment identities are exactly
|
|
112
|
-
unchanged and the proof remains verifiable. A PR URL alone is not a changed input.
|
|
113
|
-
Rerun the affected review or SQM phase when any bound identity changes or when a
|
|
114
|
-
PR-only scanner, policy or integration check first becomes applicable.
|
|
115
|
-
|
|
116
|
-
Do not reopen or re-attest every shared view. Inspect the changed views and their
|
|
117
|
-
declared dependency links; retain unchanged views by exact revision. Do not turn a
|
|
118
|
-
failed, unavailable or applicable gate into `not_applicable` to save time.
|
|
4
|
+
No comparison table, hour estimate, selection receipt or independent review is required by this guide. Honor explicit user verification preferences. Ask only for a material unresolved choice that cannot be inferred or investigated. A verification preference never grants permission for an external action or overrides a user stop or budget.
|
|
@@ -30,5 +30,5 @@ dev origin when testing dev. SQM analysis must already be enabled for the organi
|
|
|
30
30
|
|
|
31
31
|
An identical record from the same user returns the same job. Changed evidence
|
|
32
32
|
creates a new digest/job and retains the earlier revision. Keep the returned job ID
|
|
33
|
-
for monitoring in SQM.
|
|
33
|
+
for monitoring in SQM. Submitting a local result does not require a separate review;
|
|
34
34
|
local success never proves deployment or production impact.
|
|
@@ -1,146 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Completion
|
|
2
|
+
Finish when the requested endpoint works, including explicit corrections and applicable constraints. Use direct checks of actual behavior and relevant test results. Repair concrete failures; a returned success flag or completed process alone is insufficient.
|
|
2
3
|
|
|
3
|
-
|
|
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.
|
|
4
|
+
There is no mandatory minimum evidence package, matrix, screenshot, diagram, score or second reviewer. Legacy validator commands remain available for explicitly supplied legacy files but do not gate ordinary execution or completion.
|
|
8
5
|
|
|
9
|
-
|
|
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
|
-
CLI runtime delivery/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 <cli-package>/src/orchestrator/delivery/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 with the same task identity and progress checks. 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, risk-proportionate independent
|
|
143
|
-
reviews and explicitly opted-in, identity-aware 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 workflow and cannot claim an enforced host hook.
|
|
6
|
+
Respect real permissions, user stops, budgets and unknown external effects. If dependent work cannot proceed, continue independent authorized work and identify the actual unresolved condition. Do not claim deployment from local success or a PR.
|
|
@@ -1,202 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Closing a pull request
|
|
2
|
+
Close a PR only when authorized. Verify which PR it is and why closing it fits the request: completed, superseded, duplicated or intentionally cancelled. Check that useful unfinished behavior is not accidentally lost. A request to inspect or compare PRs alone does not authorize closing, commenting, merging or deployment.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
`src/orchestrator/pr-closure.js`. It is not a local Codex skill or a GitHub hook.
|
|
5
|
-
It adds a closure safety gate to the existing delivery workflow, not a new remote
|
|
6
|
-
mutation tool, permission or terminal state. Closing a PR never proves delivery.
|
|
4
|
+
Use current remote state and the actual replacement behavior where relevant. No before/after table, separate approval, review receipt or closure evidence package is required. Existing clear authorization need not be requested again.
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
table -> real outcome verification -> independent review -> decision -> freshness
|
|
10
|
-
and authority recheck -> authorized close -> remote read-back and durable receipt.
|
|
11
|
-
When blocked, stop the close, not independent authorized investigation. Reuse the
|
|
12
|
-
run's attempt/time/cost limits; do not repeat unchanged failed checks indefinitely.
|
|
13
|
-
|
|
14
|
-
## 1. Define the scope and reason
|
|
15
|
-
|
|
16
|
-
Record repository/PR, purpose, beneficiary, source requirements and non-goals.
|
|
17
|
-
Distinguish merged, duplicate/fully superseded, transfer to unfinished work, and
|
|
18
|
-
intentional cancellation/retirement. An already merged PR needs its actual merge
|
|
19
|
-
identity verified, not a manual unmerged close. Merge is not deployment.
|
|
20
|
-
|
|
21
|
-
An audit/table request is read-only. Record close and comment-posting authority
|
|
22
|
-
separately; a factual same-PR comment must be covered by explicit authorization
|
|
23
|
-
or governing policy. Otherwise prepare an unposted draft. Do not infer authority
|
|
24
|
-
to merge successors, deploy, delete branches or reopen an already closed PR.
|
|
25
|
-
An existing clear authorization need not be requested twice; a newly discovered
|
|
26
|
-
loss of functionality requires an informed decision on that consequence.
|
|
27
|
-
|
|
28
|
-
## 2. Freeze requirements and comparison identities
|
|
29
|
-
|
|
30
|
-
Use original requests, acceptance criteria and approved decisions as the oracle,
|
|
31
|
-
not the closing comment or candidate's own tests alone. Reuse stable acceptance
|
|
32
|
-
IDs from the delivery charter. Independently reconcile the original sources with
|
|
33
|
-
the ID list so an omitted requirement cannot disappear before validation.
|
|
34
|
-
|
|
35
|
-
Record full old PR head and merge-base SHAs, current target base, successor and
|
|
36
|
-
companion heads, exact integrated candidate, PR/merge state, build/runtime identity,
|
|
37
|
-
flags, permissions/tenant, environment and observation time. Track deployed state
|
|
38
|
-
separately; never infer it from a branch. Preserve a recoverable reference to
|
|
39
|
-
unmerged source before cleanup. An SHA without retrievable objects is not backup.
|
|
40
|
-
|
|
41
|
-
Keep requested, intended-in-code, observed-in-runtime, absent and unknown distinct.
|
|
42
|
-
An unavailable old environment does not prove a feature never existed. Old missing
|
|
43
|
-
code does not waive an explicit requirement, and labels do not prove old guarantees.
|
|
44
|
-
|
|
45
|
-
## 3. Persist the before/after table
|
|
46
|
-
|
|
47
|
-
Use [UX behavioral completeness](ux-specification.md) for both sides of the
|
|
48
|
-
comparison. A concise table cell must link to the complete interaction contract;
|
|
49
|
-
do not reduce the comparison to feature labels or omit divergent branches.
|
|
50
|
-
|
|
51
|
-
Use the existing [acceptance evidence](acceptance-evidence.md) and stable IDs.
|
|
52
|
-
Keep separate bound results for each context and link the comparison to them;
|
|
53
|
-
do not overwrite base-only results with combined or live results. Persist outside
|
|
54
|
-
chat and retain failed/pending rows. Minimum comparison columns:
|
|
55
|
-
|
|
56
|
-
| ID / requirement source | Persona, condition, required outcome | Old PR intended / observed | Current base alone | Base + successors | Deployed target | Decision, gap, owner, remediation PR | Evidence |
|
|
57
|
-
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
58
|
-
| Stable criterion | Trigger, real entry, action, result, next action | Exact revision, evidence level | Exact revision, evidence level | Exact integrated identity | Observed identity or unknown | Retained / approved change / transferred / missing / unknown | Source locations, raw results, artifact hashes, times |
|
|
59
|
-
|
|
60
|
-
For each affected journey cover real navigation, discoverability, first use and
|
|
61
|
-
empty data, flags/roles/ownership; transferred input/context, confirmation, state
|
|
62
|
-
changes, actual execution, usable output and next action; persistence, reload and
|
|
63
|
-
session return, history/sync, privacy and data migration; loading, no-match,
|
|
64
|
-
permission denial, error, cancellation and retry/recovery. Include accessibility
|
|
65
|
-
and device variants when affected. Extra clicks or lost controls may be regressions
|
|
66
|
-
even if an API is unchanged.
|
|
67
|
-
|
|
68
|
-
For workflow products, separately account for existing-workflow reuse, composition,
|
|
69
|
-
conversational design of a saved workflow, immediate ad-hoc work without saving a
|
|
70
|
-
workflow, and background discovery/learning. Explicitly test the no-workflow or
|
|
71
|
-
no-match branch: can the user ask for help, preserve intent, clarify/design/execute
|
|
72
|
-
as required and obtain a usable result? A catalog recommender or background
|
|
73
|
-
learning is not proof of conversational/ad-hoc fallback. Classify each capability
|
|
74
|
-
against authoritative requirements; do not invent an old capability or silently
|
|
75
|
-
exclude one because old code lacked it.
|
|
76
|
-
|
|
77
|
-
Inventory every changed file, including deletions/renames, contracts, flags, tests
|
|
78
|
-
and affected consumers outside the diff. Map each to criteria or a justified
|
|
79
|
-
non-behavioral classification. Trace all requirements forward to proof, removed
|
|
80
|
-
behavior back to retained behavior or approved retirement, and added permissions,
|
|
81
|
-
data collection, automation, costs, defaults or steps back to authorized scope.
|
|
82
|
-
Identical blobs, ancestry and file counts prove accounting, not UX equivalence.
|
|
83
|
-
|
|
84
|
-
### Yellow/red rows must become remediation PR work
|
|
85
|
-
|
|
86
|
-
Display unresolved partial/changed/unverified outcomes as yellow (🟡), and verified
|
|
87
|
-
missing/regressed outcomes as red (❌). Keep factual behavior, evidence sufficiency
|
|
88
|
-
and approved scope separate; uncertainty alone is not proof of a product defect.
|
|
89
|
-
For every yellow/red row, create a new remediation PR for the required repair or
|
|
90
|
-
verification within the active task's implementation/commit/push/PR authority.
|
|
91
|
-
Group rows only when they form one coherent behavior change; do not mechanically
|
|
92
|
-
create one PR per row or combine unrelated fixes. Use a Draft PR while unfinished.
|
|
93
|
-
Before creation, check existing remediation PRs: reuse an exact open match with
|
|
94
|
-
explicit criterion coverage rather than creating duplicate competing work. A broad
|
|
95
|
-
successor link does not count without that mapping.
|
|
96
|
-
|
|
97
|
-
Record criterion IDs, original PR, observed gap/evidence, required outcome, owner,
|
|
98
|
-
repository/base, tests/E2E and acceptance gates in each remediation PR. Add its real
|
|
99
|
-
URL and state to every covered table row; include dependencies and re-evaluation
|
|
100
|
-
triggers. Evidence-only yellow rows need the missing verification, not speculative
|
|
101
|
-
product changes. AI resolves reversible product choices from the original purpose, with recorded assumptions and rollback. Only irreversible or explicitly reserved choices remain `needs_decision`; do not change the original goal just to open a PR. If implementation or publication is
|
|
102
|
-
unauthorized, blocked or outside the current budget, record a concrete PR plan and
|
|
103
|
-
the missing decision/authority, but do not claim a PR exists. A plan/issue alone
|
|
104
|
-
does not satisfy the requested PR handoff or justify `transfer_ready`.
|
|
105
|
-
|
|
106
|
-
Independent review must reconcile all yellow/red IDs with the actual remediation
|
|
107
|
-
PRs and explicitly named blockers before the original PR can be closed by transfer.
|
|
108
|
-
Creating a PR is not fixing the issue: keep the row non-green until its required
|
|
109
|
-
revision-bound checks pass. Approved changes/retirements may resolve a row only
|
|
110
|
-
with the product decision and applicable safety evidence; preserve its history.
|
|
111
|
-
|
|
112
|
-
## 4. Verify the actual consumer and independent postconditions
|
|
113
|
-
|
|
114
|
-
Trace normal production entry -> caller -> UI/service -> backend -> persisted
|
|
115
|
-
result -> next user action. Verify actual imports, routes, permissions and flags.
|
|
116
|
-
A surviving component/API used only in fixtures is not a production experience.
|
|
117
|
-
Test the unchanged old candidate where feasible, base alone and exact integrated
|
|
118
|
-
candidate. Inspect the combined behavior, not just mergeability or individual CI.
|
|
119
|
-
Reuse valid bound evidence; do not inflate counts with unnecessary reruns.
|
|
120
|
-
|
|
121
|
-
For browser behavior, use [normal-user verification](chrome-user-verification.md)
|
|
122
|
-
on the complete production-like stack with authorized services and safe fixtures.
|
|
123
|
-
Capture meaningful visible states, errors and correlated technical postconditions
|
|
124
|
-
for the same input/run. Mocked/component E2E, direct API calls and static analysis
|
|
125
|
-
are supporting evidence, not substitutes. Only an exact-runtime live journey proves
|
|
126
|
-
live inheritance. Do not imply that local or merged verification is deployed proof.
|
|
127
|
-
For docs/CLI/library/API work use the actual artifact, command or downstream
|
|
128
|
-
consumer; record why browser checks are inapplicable. Unavailable checks are pending,
|
|
129
|
-
not inapplicable. Never make production writes solely to satisfy this procedure.
|
|
130
|
-
|
|
131
|
-
Preserve initial failures. Classify product, environment and oracle failures with
|
|
132
|
-
independent evidence. Changed assertions/fixtures create a different tested
|
|
133
|
-
candidate and require independent oracle review; do not credit their passes to
|
|
134
|
-
the unchanged original PR. A stale label alone does not explain a missing route.
|
|
135
|
-
|
|
136
|
-
## 5. Independent review and decision
|
|
137
|
-
|
|
138
|
-
Before the close action, a separate reviewer receives original requirements,
|
|
139
|
-
candidate revisions, complete file inventory, table and raw artifacts, without
|
|
140
|
-
a prescribed verdict. Review omissions, reachability, fallback, integrated results,
|
|
141
|
-
unapproved scope and unfinished dependencies. Record identity-bound findings in
|
|
142
|
-
the existing independent-review receipt. A comment claiming a review occurred is
|
|
143
|
-
not review evidence. Repair only within authority; re-review changed inputs.
|
|
144
|
-
The normal post-execution CLI audit is not a substitute for review before closing.
|
|
145
|
-
|
|
146
|
-
Store these labels in the closure record, not in the delivery-state enum:
|
|
147
|
-
|
|
148
|
-
| Decision | Required evidence and permitted action |
|
|
149
|
-
| --- | --- |
|
|
150
|
-
| `close_ready` | All requirements accounted for, candidate evidence and independent review pass; no hidden loss or pending implementation. State separately whether base-only or live. Deployment may remain an explicit delivery obligation. |
|
|
151
|
-
| `transfer_ready` | Every pending outcome/risk has an accepted owner or authorized assignment, actual open remediation PR with criterion coverage, acceptance gate and re-evaluation trigger; explicit informed administrative-close authorization. No unmapped yellow/red row or unresolved handoff blocker. Not full inheritance/completed delivery. |
|
|
152
|
-
| `retirement_ready` | Explicit product decision retires named outcomes; necessary user-data/migration/safety obligations verified or safely assigned before close. Not equivalence. |
|
|
153
|
-
| `needs_decision` | Irreversible consequences or an explicitly reserved choice need human selection. AI resolves reversible trade-offs using grounded purpose, alternatives and rollback; do not leave PR closure waiting solely for a preference. |
|
|
154
|
-
| `blocked` | Missing/stale evidence, review, authority, classification or handoff, or unsafe consequence prevents the proposed action/claim. |
|
|
155
|
-
|
|
156
|
-
Unknown/failed applicable rows cannot support `close_ready`. A deliberately
|
|
157
|
-
authorized transfer keeps them non-green and visible. Verify the successor exists,
|
|
158
|
-
is open and carries the actual pending criteria; a link alone is insufficient.
|
|
159
|
-
Do not invent an owner's acceptance. Transfer cannot waive mandatory security,
|
|
160
|
-
privacy, data-integrity or external-contract constraints. Retain the actual highest
|
|
161
|
-
proven delivery state, independently of the closure-task disposition.
|
|
162
|
-
|
|
163
|
-
## 6. Freshness check, authorized action and read-back
|
|
164
|
-
|
|
165
|
-
Immediately before mutation refresh old head, target base, all successor heads and
|
|
166
|
-
states, integrated identity, checks/review inputs, flags/environment and authority.
|
|
167
|
-
Any changed bound input invalidates affected verification/review under
|
|
168
|
-
[state and receipts](state-and-receipts.md). Inspect and reverify before continuing;
|
|
169
|
-
checking only the old head is insufficient. Use conditional updates if available;
|
|
170
|
-
otherwise read immediately before/after, record residual races and stop on drift.
|
|
171
|
-
|
|
172
|
-
Prepare a factual explanation: reason, exact identities, comparison/evidence/review
|
|
173
|
-
links, approved changes, pending obligations/owners, deployment status and recovery
|
|
174
|
-
reference. Do not say nothing remains if work is unknown or unmerged. Missing close
|
|
175
|
-
authority blocks closing; missing posting authority retains a draft. If policy
|
|
176
|
-
requires a posted explanation, missing posting authority also blocks closing.
|
|
177
|
-
|
|
178
|
-
After an authorized close, read back state, close/merge timestamps and identities,
|
|
179
|
-
any authorized posted explanation, and successor status (open or demonstrably
|
|
180
|
-
resolved). Reconcile ambiguous responses before retrying to avoid duplicate
|
|
181
|
-
actions/comments. On unexpected concurrent changes, preserve evidence and report;
|
|
182
|
-
do not silently reopen or declare success. Audit previously closed PRs read-only,
|
|
183
|
-
separating the historical decision's evidence from today's state.
|
|
184
|
-
|
|
185
|
-
## 7. Durable receipt and handoff
|
|
186
|
-
|
|
187
|
-
Add a `closure` section to the existing completion/handoff evidence record, reusing
|
|
188
|
-
its run/input digest, idempotency key and append-only rules. Record target/reason,
|
|
189
|
-
decision, comparison/context digests, criterion/file coverage, all non-green rows,
|
|
190
|
-
review and artifact references/hashes, human decisions and separate authorities,
|
|
191
|
-
pre/post state/timestamps, mutation identity, comment ID/URL or unposted draft,
|
|
192
|
-
pending owners/gates/triggers, yellow/red-ID-to-remediation-PR mappings and blocked
|
|
193
|
-
PR plans, and source recovery references. Record unperformed
|
|
194
|
-
actions as unperformed; reconcile retries with the same logical action identity.
|
|
195
|
-
This documented section is not a new automatically validated CLI schema.
|
|
196
|
-
|
|
197
|
-
Preserve the table, relevant raw proof, review and recoverable unmerged source in
|
|
198
|
-
an approved durable location before deleting temporary worktrees. Verify links
|
|
199
|
-
remain accessible and remove secrets/unrelated personal data. Never remove the
|
|
200
|
-
only evidence/source copy. Administrative closure can finish a scoped closure task,
|
|
201
|
-
not unfinished feature delivery. Promise ongoing monitoring only if authorized and
|
|
202
|
-
actually configured; otherwise hand off to the recorded owner/tracking item.
|
|
6
|
+
Read back the remote result before reporting success. Reconcile an unknown close result before repeating it. Closing or merging a PR does not establish that its functionality is deployed or usable.
|