@awak-app/simy-cli 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awak-app/simy-cli",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Local SIMY executor for non-coding Local Tasks and Agentic Loop runs.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,6 +15,7 @@
15
15
  "test": "node --test",
16
16
  "test:e2e:console": "node ./scripts/console-e2e.js",
17
17
  "test:e2e:sqm-complete-loop": "node ./scripts/sqm-complete-loop-e2e.js",
18
+ "test:e2e:sqm-local-review": "node ./scripts/sqm-local-review-e2e.js",
18
19
  "test:e2e:console:narrow": "CLI_E2E_COLUMNS=78 CLI_E2E_ROWS=40 node ./scripts/console-e2e.js",
19
20
  "test:e2e:console:no-color": "CLI_E2E_NO_COLOR=1 node ./scripts/console-e2e.js",
20
21
  "test:e2e:console:recovery": "node ./scripts/console-recovery-e2e.js",
@@ -37,7 +38,7 @@
37
38
  "test:e2e:console:fullstack": "node ./scripts/fullstack-cli-smoke.js",
38
39
  "check": "npm run check:auto-update && node --check ./src/desktop-executor.js && node --check ./src/local-task.js && node --check ./scripts/desktop-executor-e2e.js && node --check ./scripts/pre-guardrail-e2e.js && node --check ./scripts/fixtures/fake-desktop-provider.js && npm run check:syntax && npm run check:real-provider-syntax && npm test && npm run check:package",
39
40
  "check:auto-update": "node --check ./src/auto-update.js && node --check ./scripts/auto-update-e2e.js && npm run check:sqm",
40
- "check:sqm": "node --check ./src/sqm/canonical.js && node --check ./src/sqm/validation.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 ./scripts/sqm-complete-loop-e2e.js",
41
+ "check:sqm": "node --check ./src/sqm/canonical.js && node --check ./src/sqm/validation.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/review-worker.js && node --check ./scripts/sqm-complete-loop-e2e.js && node --check ./scripts/sqm-local-review-e2e.js",
41
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",
42
43
  "check:syntax": "node --check ./src/index.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
44
  "check:package": "node ./scripts/check-package-contents.js"
package/src/agent.js CHANGED
@@ -115,6 +115,11 @@ import {
115
115
  normalizeLocalTaskScenarioPack,
116
116
  validateLocalTaskScenarioInputs,
117
117
  } from "./local-task-scenario-packs.js";
118
+ import { inspectSqmAgentSkill, installSqmAgentSkill } from "./sqm/agent-skill.js";
119
+ import {
120
+ createSqmLocalReviewApi,
121
+ createSqmLocalReviewWorker,
122
+ } from "./sqm/review-worker.js";
118
123
 
119
124
  const DEVICE_HEARTBEAT_INTERVAL_MS = 20_000;
120
125
 
@@ -143,6 +148,10 @@ export async function startAgent({
143
148
  });
144
149
  await localTaskAttachmentStore.cleanupExpired?.();
145
150
  const authNonce = randomBytes(16).toString("base64url");
151
+ const sqmAgentIntegration = dependencies.sqmAgentIntegration || {
152
+ inspect: () => inspectSqmAgentSkill({ home: dependencies.home }),
153
+ install: (options) => installSqmAgentSkill({ home: dependencies.home, ...options }),
154
+ };
146
155
  let session = await readSession(apiOrigin, sessionRoot);
147
156
  if (session && sessionRequiresWebAuthorization(session, apiOrigin)) session = null;
148
157
  await cleanupExpiredRuns();
@@ -168,23 +177,39 @@ export async function startAgent({
168
177
  );
169
178
  const installMode = updateManager?.snapshot?.()?.install_mode ?? null;
170
179
  const inspectedCapabilities = await readCapabilities(dependencies);
180
+ const durableControlPlane =
181
+ inspectedCapabilities?.features?.local_task_control_plane === true;
182
+ const hasSqmLocalReview = Object.hasOwn(
183
+ inspectedCapabilities?.features || {},
184
+ "sqm_local_review",
185
+ );
171
186
  const contractSourceCapabilities =
172
- inspectedCapabilities?.features?.local_task_control_plane === true
187
+ durableControlPlane || hasSqmLocalReview
173
188
  ? {
174
189
  ...inspectedCapabilities,
175
190
  features: {
176
- ...inspectedCapabilities.features,
177
- local_task_control_plane: daemon,
178
- pipeline_local_task_artifacts:
179
- daemon &&
180
- inspectedCapabilities.features.pipeline_local_task_artifacts === true,
181
- durable_local_task_attachments: daemon,
182
- durable_local_task_steps:
183
- daemon &&
184
- inspectedCapabilities.features.durable_local_task_steps === true,
185
- bounded_local_task_subtasks:
186
- daemon &&
187
- inspectedCapabilities.features.bounded_local_task_subtasks === true,
191
+ ...inspectedCapabilities?.features,
192
+ ...(durableControlPlane
193
+ ? {
194
+ local_task_control_plane: daemon,
195
+ pipeline_local_task_artifacts:
196
+ daemon &&
197
+ inspectedCapabilities.features.pipeline_local_task_artifacts === true,
198
+ durable_local_task_attachments: daemon,
199
+ durable_local_task_steps:
200
+ daemon &&
201
+ inspectedCapabilities.features.durable_local_task_steps === true,
202
+ bounded_local_task_subtasks:
203
+ daemon &&
204
+ inspectedCapabilities.features.bounded_local_task_subtasks === true,
205
+ }
206
+ : {}),
207
+ ...(hasSqmLocalReview
208
+ ? {
209
+ sqm_local_review:
210
+ daemon && inspectedCapabilities?.features?.sqm_local_review === true,
211
+ }
212
+ : {}),
188
213
  },
189
214
  }
190
215
  : inspectedCapabilities;
@@ -211,6 +236,7 @@ export async function startAgent({
211
236
  let heartbeatTimer = null;
212
237
  let heartbeatInFlight = null;
213
238
  let durableLocalTaskWorker = null;
239
+ let sqmLocalReviewWorker = null;
214
240
 
215
241
  const restoreRemoteRuns = async () => {
216
242
  if (!isSessionValid(session, Date.now(), apiOrigin) || !session?.device_id) return;
@@ -254,7 +280,10 @@ export async function startAgent({
254
280
  }),
255
281
  )
256
282
  .then(async () => {
257
- if (durableLocalTaskWorker) await durableLocalTaskWorker.poll();
283
+ const sqmResult = sqmLocalReviewWorker
284
+ ? await sqmLocalReviewWorker.poll()
285
+ : null;
286
+ if (!sqmResult && durableLocalTaskWorker) await durableLocalTaskWorker.poll();
258
287
  return true;
259
288
  })
260
289
  .finally(() => {
@@ -362,6 +391,27 @@ export async function startAgent({
362
391
  });
363
392
  }
364
393
 
394
+ if (daemon && availableCapabilities?.features?.sqm_local_review === true) {
395
+ const sqmApi =
396
+ dependencies.sqmLocalReviewApi ||
397
+ createSqmLocalReviewApi({
398
+ getConnection: () => ({
399
+ apiOrigin,
400
+ apiBaseUrl: session?.api_base_url,
401
+ token: session?.token,
402
+ }),
403
+ fetchImpl: dependencies.fetch || globalThis.fetch,
404
+ });
405
+ const createWorker =
406
+ dependencies.createSqmLocalReviewWorker || createSqmLocalReviewWorker;
407
+ sqmLocalReviewWorker = createWorker({
408
+ api: sqmApi,
409
+ beginWork: () => acquireUpdateWork(updateManager),
410
+ runReview: dependencies.runSqmLocalReview,
411
+ onError: (error) => reportSqmLocalReviewError(error, quiet),
412
+ });
413
+ }
414
+
365
415
  const selectRepository = async (run, repository) => {
366
416
  if (run) ensureAcceptingNewWork(updateManager);
367
417
  const selected = repository?.local_path
@@ -435,6 +485,34 @@ export async function startAgent({
435
485
  json(res, 200, refreshAvailableCapabilities());
436
486
  return;
437
487
  }
488
+ if (url.pathname === "/v1/integrations/sqm-agent") {
489
+ if (!isSessionValid(session, Date.now(), apiOrigin) || !session?.device_id) {
490
+ json(res, 401, { error: "Reconnect SIMY CLI before managing the SQM agent skill." });
491
+ return;
492
+ }
493
+ if (req.method === "GET") {
494
+ json(res, 200, await sqmAgentIntegration.inspect());
495
+ return;
496
+ }
497
+ if (req.method === "POST") {
498
+ const body = await readJson(req);
499
+ if (body.confirmed !== true) {
500
+ json(res, 400, {
501
+ error: "Explicit confirmation is required before installing the SIMY plugin, agent skills, and PR hooks.",
502
+ });
503
+ return;
504
+ }
505
+ try {
506
+ const installed = await sqmAgentIntegration.install({
507
+ platforms: Array.isArray(body.platforms) ? body.platforms : undefined,
508
+ });
509
+ json(res, 200, installed);
510
+ } catch (error) {
511
+ json(res, 400, { error: error instanceof Error ? error.message : String(error) });
512
+ }
513
+ return;
514
+ }
515
+ }
438
516
  if (
439
517
  req.method === "POST" &&
440
518
  url.pathname === "/v1/local-tasks/attachments/stage"
@@ -1482,8 +1560,9 @@ export async function startAgent({
1482
1560
  if (shutdownPromise) return shutdownPromise;
1483
1561
  shutdownPromise = (async () => {
1484
1562
  if (heartbeatTimer) clearInterval(heartbeatTimer);
1485
- await durableLocalTaskWorker?.close?.();
1486
1563
  updateManager?.stop?.();
1564
+ await sqmLocalReviewWorker?.close?.();
1565
+ await durableLocalTaskWorker?.close?.();
1487
1566
  registry.close();
1488
1567
  localTaskRegistry.close();
1489
1568
  })();
@@ -1499,6 +1578,7 @@ export async function startAgent({
1499
1578
  directRegistry,
1500
1579
  localTaskRegistry,
1501
1580
  durableLocalTaskWorker,
1581
+ sqmLocalReviewWorker,
1502
1582
  shutdown,
1503
1583
  webOrigin: apiOrigin,
1504
1584
  get loginUrl() {
@@ -1716,6 +1796,13 @@ function reportDurableLocalTaskError(error, quiet) {
1716
1796
  );
1717
1797
  }
1718
1798
 
1799
+ function reportSqmLocalReviewError(error, quiet) {
1800
+ if (quiet) return;
1801
+ console.error(
1802
+ `SIMY SQM Local Review worker: ${error instanceof Error ? error.message : String(error)}`,
1803
+ );
1804
+ }
1805
+
1719
1806
  function reportStartupConnectionError(error, quiet) {
1720
1807
  if (quiet) return;
1721
1808
  console.error(
@@ -1808,6 +1895,8 @@ async function capabilities() {
1808
1895
  durable_local_task_scenario_packs: true,
1809
1896
  durable_local_task_steps: true,
1810
1897
  bounded_local_task_subtasks: true,
1898
+ sqm_agent_skill_management: true,
1899
+ sqm_local_review: codex.compatible,
1811
1900
  },
1812
1901
  session_ttl_hours: 48,
1813
1902
  };
@@ -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.0";
16
+ export const CLI_VERSION = "0.5.1";
17
17
  export const CLI_API_CONTRACT_VERSION = 10;
18
18
 
19
19
  export function withCliContract(
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "simy",
3
+ "version": "0.1.0",
4
+ "description": "Run SIMY quality, delivery, and pull request review workflows from the current Codex thread.",
5
+ "author": {
6
+ "name": "Specialist Doctors Inc.",
7
+ "url": "https://github.com/SpecialistDoctors-Inc"
8
+ },
9
+ "repository": "https://github.com/SpecialistDoctors-Inc/simy-cli",
10
+ "license": "UNLICENSED",
11
+ "keywords": ["simy", "sqm", "delivery", "pull-request"],
12
+ "skills": "./skills/",
13
+ "interface": {
14
+ "displayName": "SIMY",
15
+ "shortDescription": "Quality, delivery, and PR workflows for SIMY.",
16
+ "longDescription": "SIMY turns the current Codex thread into a bounded quality check, a full evidence-driven delivery loop, or a read-only pull request review.",
17
+ "developerName": "Specialist Doctors Inc.",
18
+ "category": "Developer Tools",
19
+ "capabilities": ["Quality", "Delivery", "Review"],
20
+ "defaultPrompt": [
21
+ "Run the SIMY SQM Loop for the current thread.",
22
+ "Run the SIMY Delivery Loop for the current thread.",
23
+ "Review the current pull request with SIMY."
24
+ ]
25
+ }
26
+ }
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: agentic-delivery-loop
3
+ description: Drive complex repository changes from a frozen success charter and failing reproduction through bounded repair loops, local verification, production-like containers, Codex-controlled Chrome user journeys, PR and integration gates, authorized merge and deployment, exact-revision live verification, cleanup, and a completion receipt. Use when implementation must converge autonomously with real user-facing evidence. Do not use for read-only reviews or one-shot low-risk edits.
4
+ ---
5
+
6
+ # Agentic Delivery Loop
7
+
8
+ Use one Codex task as the controller for the complete delivery lifecycle. Shell,
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.
12
+
13
+ ## Freeze the delivery charter
14
+
15
+ Before material action, record:
16
+
17
+ - objective and user-visible success conditions;
18
+ - repositories, latest base branches, dedicated worktrees, environments, and
19
+ the exact user journey;
20
+ - required evidence and applicable change boundaries;
21
+ - exclusions and authority boundaries, especially merge, deployment,
22
+ production writes, paid APIs, external messages, and fixture cleanup;
23
+ - attempt, time, and cost budgets. Default to at most three evaluated repair
24
+ attempts when the user has not set a budget.
25
+
26
+ Do not silently weaken explicit conditions. Add discoveries as a charter patch.
27
+ A scope or success-condition change needs user direction when it materially
28
+ changes the requested result.
29
+
30
+ ## Keep delivery states distinct
31
+
32
+ Track and report the highest state actually proven:
33
+
34
+ `chartered -> reproduction_verified -> implemented -> locally_verified -> pr_ci_green -> integration_verified -> user_like_local_verified -> merged -> deployed_exact_revision -> health_verified -> live_verified -> cleanup_verified -> done`
35
+
36
+ Mark a non-applicable gate explicitly with a reason. Never infer a later state
37
+ from an earlier one. In particular:
38
+
39
+ - local or container evidence is not deployed evidence;
40
+ - green PR CI is not integration verification;
41
+ - merge is not deployment;
42
+ - a healthy deployment is not a verified user journey;
43
+ - a locally verified Chrome journey is `user_like_local_verified`, not
44
+ `live_verified`;
45
+ - lack of merge authority ends at `ready_waiting_authority`, not `done`.
46
+
47
+ ## Run one controlled loop
48
+
49
+ For each attempt:
50
+
51
+ 1. **Observe:** load the current snapshot and revision-bound evidence.
52
+ 2. **Evaluate:** identify progress, missing evidence, goal drift, or a repeated
53
+ failure fingerprint.
54
+ 3. **Decide:** apply deterministic policy for `continue`, `retry_current`,
55
+ `propose_replan`, `request_hil`, `abort`, or `complete`.
56
+ 4. **Act:** execute one complete, smallest coherent candidate or verification
57
+ action.
58
+ 5. **Verify:** inspect evidence independent of the action's success claim.
59
+ 6. **Reduce:** append a typed receipt and atomically advance the snapshot.
60
+
61
+ An LLM may propose hypotheses, repairs, or verdicts, but it must not directly
62
+ override state transitions, retry budgets, authorization, or evidence gates.
63
+ Only the controller promotes a candidate or terminalizes the run.
64
+
65
+ Read [state and receipts](references/state-and-receipts.md) when the task has
66
+ multiple attempts, resumes a prior run, spans repositories, or performs merge,
67
+ deployment, paid, external, or concurrent operations.
68
+
69
+ ## Execute the delivery phases
70
+
71
+ ### 1. Reproduce the real failure
72
+
73
+ Prefer the real payload, logs, persisted state, browser sequence, environment,
74
+ and user identity. Preserve a failure receipt that distinguishes the original
75
+ boundary from a simplified unit fixture.
76
+
77
+ ### 2. Isolate and implement
78
+
79
+ Start from the latest required base in a dedicated worktree. Preserve user
80
+ changes. Build the smallest behaviorally correct patch and add a regression
81
+ that fails against the pre-fix behavior at the escaped boundary.
82
+
83
+ ### 3. Verify locally by change boundary
84
+
85
+ Run focused regression tests first, then formatting, lint, type checking, unit
86
+ tests, and the actual affected runtime. Apply only the relevant lanes from
87
+ [the change-boundary matrix](references/change-boundary-matrix.md).
88
+
89
+ For medium/high-risk work, run an independent blocker/P1 review after local
90
+ verification. Fix findings narrowly and re-review only the fixes and directly
91
+ affected behavior.
92
+
93
+ ### 4. Coordinate through Draft PR and integration state
94
+
95
+ Record reproduction, tests, evidence, companion revisions, skipped checks, and
96
+ remaining gates in the Draft PR. Before Ready or merge, combine the latest base
97
+ with required companion and parallel changes, rerun the affected path, and
98
+ confirm current CI and mergeability. Without combined-state proof, report
99
+ `pr_only_verified`, not `integration_verified`.
100
+
101
+ ### 5. Run the Codex-controlled Chrome user journey
102
+
103
+ For user-facing or browser-mediated behavior, build and start the complete
104
+ production-like local stack from exact candidate revisions, use real APIs when
105
+ the charter permits, then have Codex operate the user's Chrome through the
106
+ browser extension as a normal user. Do not replace this gate with direct API
107
+ calls or a fixed selector-only test.
108
+
109
+ Read [Codex Chrome user verification](references/chrome-user-verification.md)
110
+ before running this phase.
111
+
112
+ ### 6. Merge and deploy only with authority
113
+
114
+ After authorization, use the repository's required merge method and verify the
115
+ remote merge result. Wait until the target environment reports the exact merge
116
+ revision or a verifiably derived image digest. Confirm health and runtime
117
+ identity before live verification.
118
+
119
+ ### 7. Verify the deployed user journey
120
+
121
+ Repeat the relevant Chrome journey against the deployed environment. Include
122
+ refresh, session return, delayed responses, follow-up lineage, authorization,
123
+ and artifact download/open checks when applicable. Capture screenshots and
124
+ video when visible or timing-dependent behavior matters.
125
+
126
+ If this fails, retain `merged` and `deployed_exact_revision`; do not reset
127
+ history or claim `done`. Save the exact revision, environment, input, Run ID,
128
+ timestamps, visible state, network evidence, and logs, then add a boundary
129
+ regression before re-entering implementation.
130
+
131
+ ### 8. Clean up and issue the receipt
132
+
133
+ Remove scoped fixtures and prove the residual count is zero. Deliver a compact
134
+ completion receipt containing repository revisions, PR and CI, independent
135
+ review, container/runtime results, local Chrome evidence, merge and deployment
136
+ identity, deployed Chrome evidence, artifacts, cleanup, skipped gates, and
137
+ residual risk.
138
+
139
+ ## Stop deliberately
140
+
141
+ Use exactly one disposition:
142
+
143
+ - `verified_complete`: every applicable gate passed with evidence;
144
+ - `best_available`: the bounded loop produced a safe useful result but named
145
+ criteria remain unmet;
146
+ - `blocked`: missing authority, input, dependency, or safety precondition
147
+ prevents progress;
148
+ - `failed`: no safe useful candidate remains within budget;
149
+ - `cancelled`: the user stopped or replaced the task.
150
+
151
+ Stop after the attempt budget, two consecutive non-improving candidates, or an
152
+ A-B-A failure pattern without a materially different safe repair. Deliver the
153
+ best verified candidate, not merely the latest attempt.
154
+
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Agentic Delivery Loop"
3
+ short_description: "Converge code changes through real live proof"
4
+ default_prompt: "Use $agentic-delivery-loop to take this change from reproduction through verified delivery."
5
+
@@ -0,0 +1,67 @@
1
+ # Change-Boundary Verification Matrix
2
+
3
+ Apply only the lanes touched by the change, plus shared boundaries needed to
4
+ prove the user outcome.
5
+
6
+ ## Common foundation
7
+
8
+ - Preserve a failing reproduction or explain why it cannot be captured.
9
+ - Run focused regressions, formatting, lint, type checks, unit tests, and the
10
+ real affected build/runtime in that order when available.
11
+ - Inspect the final diff for scope, secrets, generated files, and unrelated
12
+ churn.
13
+ - Use current source and dependency revisions in every evidence receipt.
14
+
15
+ ## UI and user-state changes
16
+
17
+ - Render the actual UI in a browser.
18
+ - Exercise refresh during and after completion, back/forward navigation,
19
+ another session and return, delayed stream/poll responses, and stale-cache or
20
+ replica responses where relevant.
21
+ - Verify follow-up and parent/child lineage, optimistic state reconciliation,
22
+ authorization, and tenant separation.
23
+ - Capture and inspect screenshots; capture video for streaming, recovery,
24
+ animation, or timing-dependent behavior.
25
+
26
+ ## Generated artifacts
27
+
28
+ - Download through the user-facing path.
29
+ - Verify non-empty bytes, expected type, stable hash, and ownership/tenant.
30
+ - Open with the real consumer. Render every page/slide/sheet when layout
31
+ matters and inspect the rendered output.
32
+ - Confirm final-result metadata and artifact storage agree.
33
+
34
+ ## Runtime and packaging
35
+
36
+ - Build the exact production Dockerfile/image, not only a development image.
37
+ - Start the real entrypoint and execute a representative app-server turn.
38
+ - Check required binaries, fonts, renderers, runtime dependencies, health,
39
+ signals, and restart behavior inside the image.
40
+ - Record the image digest and bind later evidence to it.
41
+
42
+ ## Backend, database, and asynchronous work
43
+
44
+ - Apply migrations against an isolated representative database and verify
45
+ rollback/compatibility expectations where required.
46
+ - Exercise the real API, authentication, authorization/RLS, persistence,
47
+ replay/idempotency, retries, concurrency, queue/worker delivery, and late
48
+ updates.
49
+ - Confirm visible state against persisted rows and runtime logs using the same
50
+ Run ID.
51
+
52
+ ## Cross-repository changes
53
+
54
+ - Pin every repository and contract revision.
55
+ - Identify required merge/deploy order and backward-compatibility window.
56
+ - Compose companion and parallel changes before Ready.
57
+ - Run the user journey against the combined revisions and record all SHAs and
58
+ image digests.
59
+
60
+ ## External providers
61
+
62
+ - Use real APIs only when the charter permits cost and side effects.
63
+ - Prefer scoped sandbox accounts, dedicated users/tenants, unique Run IDs, and
64
+ explicit cleanup.
65
+ - Require human authorization for production messages, destructive writes, or
66
+ other consequential effects not already authorized.
67
+
@@ -0,0 +1,136 @@
1
+ # Codex Chrome User Verification
2
+
3
+ Read this before running a local production-like or deployed user journey with
4
+ Codex controlling the user's Chrome through the browser extension.
5
+
6
+ ## Meaning of this gate
7
+
8
+ This is goal-driven user simulation, not a direct API test and not merely a
9
+ fixed selector script. Codex receives a user outcome, perceives the real page,
10
+ and operates Chrome through normal visible interactions. Deterministic checks
11
+ then judge the resulting evidence.
12
+
13
+ Use distinct claims:
14
+
15
+ - `user_like_local_verified`: the exact candidate revisions passed in a local
16
+ production-like stack through Chrome;
17
+ - `live_verified`: the exact deployed revision passed in the target shared or
18
+ production environment through Chrome.
19
+
20
+ ## Prepare the local environment
21
+
22
+ Prefer a Compose-style environment bundle over one monolithic container. Use
23
+ the production Dockerfiles and exact candidate revisions for applicable
24
+ services such as:
25
+
26
+ ```text
27
+ web
28
+ API / orchestration
29
+ backend or edge functions
30
+ agent runtime
31
+ database and authentication
32
+ queue and workers
33
+ object storage
34
+ supporting renderers or processors
35
+ ```
36
+
37
+ Run Chrome on the host and route it to the environment through stable local
38
+ URLs. Account for container networking: `127.0.0.1` inside a container is not
39
+ the host. Use the platform's supported host gateway or service DNS and record
40
+ the resolved endpoints.
41
+
42
+ Start services, apply migrations and seeds, verify health, and record service
43
+ SHAs plus image digests before opening the user journey.
44
+
45
+ ## Connect Codex to Chrome
46
+
47
+ Use the Chrome/browser-control skill available in the current environment. The
48
+ user's Chrome profile must have the ChatGPT browser extension installed and
49
+ connected through the desktop app's Computer Use settings. Use the explicitly
50
+ selected Chrome surface; do not silently substitute another browser.
51
+
52
+ Use a dedicated verification profile and allowlist only the required local,
53
+ dev, and external-provider domains. Do not inspect cookies, passwords, browser
54
+ history, or profile storage. If authentication blocks the task, ask the user to
55
+ sign in in the selected Chrome profile and resume from the same journey.
56
+
57
+ ## Define the user scenario
58
+
59
+ Give the browser actor a natural-language goal and observable success criteria,
60
+ not internal API steps. Example shape:
61
+
62
+ ```text
63
+ Open the application, complete <real user objective>, wait for completion,
64
+ refresh the page, leave and return through another session, follow up on the
65
+ result, download the final artifact, and open it.
66
+ ```
67
+
68
+ The actor should use visible UI interactions. Direct API, database, and log
69
+ access are secondary evidence and diagnosis channels, not substitutes for the
70
+ browser journey.
71
+
72
+ ## Use real APIs safely
73
+
74
+ When permitted, use the actual model/provider and real integration APIs to
75
+ exercise streaming, tool calls, latency, rate limits, and output variability.
76
+ Require:
77
+
78
+ - sandbox or dedicated verification accounts;
79
+ - scoped credentials and tenant/user fixtures;
80
+ - unique Run IDs and timestamps;
81
+ - attempt, time, and spend caps;
82
+ - dedicated Slack/Gmail/calendar or other external destinations;
83
+ - reconciliation before retrying an ambiguous external effect;
84
+ - recorded cleanup and residual count zero.
85
+
86
+ Do not broaden existing authority. External messages, production writes,
87
+ destructive operations, and new paid effects still require the applicable
88
+ authorization.
89
+
90
+ ## Execute and collect evidence
91
+
92
+ Codex may orchestrate the full sequence in one task:
93
+
94
+ 1. Build/start/restart services from the shell.
95
+ 2. Confirm health and runtime identity.
96
+ 3. Operate the application through Chrome.
97
+ 4. Capture screenshots and video when supported and relevant.
98
+ 5. Record visible messages, navigation, refresh/session behavior, download
99
+ paths, browser console/network failures, and timestamps.
100
+ 6. Correlate the visible result with backend logs, persisted state, Run IDs,
101
+ queue/worker activity, and artifact hashes.
102
+ 7. Evaluate the evidence against the frozen charter.
103
+ 8. On failure, classify the boundary, add a pre-fix regression, patch the
104
+ smallest surface, rebuild changed images, and repeat within budget.
105
+
106
+ The same Codex task may perform actor and verifier phases, but the verifier must
107
+ use recorded observable evidence rather than accepting the actor's completion
108
+ claim.
109
+
110
+ ## Default acceptance predicate
111
+
112
+ Tailor this to the charter:
113
+
114
+ ```text
115
+ chrome_user_journey_passed =
116
+ visible_result_confirmed
117
+ && refresh_persistence_confirmed
118
+ && session_return_confirmed
119
+ && follow_up_lineage_confirmed_when_applicable
120
+ && backend_run_id_matched
121
+ && no_unexpected_console_or_network_failure
122
+ && artifact_download_open_hash_confirmed_when_applicable
123
+ && fixture_cleanup_confirmed
124
+ ```
125
+
126
+ Save the browser profile label, target URL/environment, source revisions, image
127
+ digests, user/tenant fixture, Run ID, start/end time, screenshots/video,
128
+ download hashes, and skipped checks in the receipt.
129
+
130
+ ## After deployment
131
+
132
+ First verify that the target environment serves the exact merge revision or
133
+ derived image digest. Then repeat the smallest user journey that still crosses
134
+ the changed boundary. A preview, local environment, or healthy endpoint cannot
135
+ establish `live_verified` for another deployed environment.
136
+