@awak-app/simy-cli 0.4.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/README.md +44 -13
- package/package.json +3 -2
- package/src/agent.js +104 -15
- package/src/auto-update.js +256 -9
- package/src/cli-contract.js +1 -1
- package/src/codex-plugins/simy/.codex-plugin/plugin.json +26 -0
- package/src/codex-plugins/simy/skills/agentic-delivery-loop/SKILL.md +154 -0
- package/src/codex-plugins/simy/skills/agentic-delivery-loop/agents/openai.yaml +5 -0
- package/src/codex-plugins/simy/skills/agentic-delivery-loop/references/change-boundary-matrix.md +67 -0
- package/src/codex-plugins/simy/skills/agentic-delivery-loop/references/chrome-user-verification.md +136 -0
- package/src/codex-plugins/simy/skills/agentic-delivery-loop/references/state-and-receipts.md +142 -0
- package/src/codex-plugins/simy/skills/pr-review/SKILL.md +18 -0
- package/src/codex-plugins/simy/skills/pr-review/agents/openai.yaml +6 -0
- package/src/codex-plugins/simy/skills/sqm-loop/SKILL.md +21 -0
- package/src/codex-plugins/simy/skills/sqm-loop/agents/openai.yaml +6 -0
- package/src/index.js +138 -67
- package/src/orchestrator/completion-contract.js +15 -1
- package/src/sqm/agent-skill.js +373 -0
- package/src/sqm/bundle-store.js +42 -0
- package/src/sqm/review-worker.js +278 -0
|
@@ -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
|
+
|
package/src/codex-plugins/simy/skills/agentic-delivery-loop/references/change-boundary-matrix.md
ADDED
|
@@ -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
|
+
|
package/src/codex-plugins/simy/skills/agentic-delivery-loop/references/chrome-user-verification.md
ADDED
|
@@ -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
|
+
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# State and Receipt Contract
|
|
2
|
+
|
|
3
|
+
Read this reference for multi-attempt, resumable, cross-repository, concurrent,
|
|
4
|
+
merge, deployment, paid, or externally mutating work.
|
|
5
|
+
|
|
6
|
+
## Delivery snapshot
|
|
7
|
+
|
|
8
|
+
Persist one controller-owned snapshot with at least:
|
|
9
|
+
|
|
10
|
+
- `run_id`, `state`, monotonic `revision`, and terminal disposition;
|
|
11
|
+
- immutable explicit conditions and their stable digest;
|
|
12
|
+
- repository, base SHA, head SHA, companion SHAs, merge SHA, image digests, and
|
|
13
|
+
deployed revision;
|
|
14
|
+
- target environments, user journey, user/tenant fixture identities, and
|
|
15
|
+
required artifacts;
|
|
16
|
+
- applicable gates and their current status;
|
|
17
|
+
- attempt number, retry/time/cost budgets, and failure fingerprints;
|
|
18
|
+
- append-only receipt IDs, evidence references, timestamps, and cleanup state.
|
|
19
|
+
|
|
20
|
+
Use compare-and-set or an equivalent single-writer protocol. Replaying the same
|
|
21
|
+
receipt must be a no-op. Reusing an idempotency key with different content is
|
|
22
|
+
an integrity failure.
|
|
23
|
+
|
|
24
|
+
## Typed receipts
|
|
25
|
+
|
|
26
|
+
Use the smallest applicable receipts rather than free-form completion claims:
|
|
27
|
+
|
|
28
|
+
- `CharterReceipt`
|
|
29
|
+
- `FailureReproductionReceipt`
|
|
30
|
+
- `ImplementationReceipt`
|
|
31
|
+
- `LocalVerificationReceipt`
|
|
32
|
+
- `IndependentReviewReceipt`
|
|
33
|
+
- `PRCIReceipt`
|
|
34
|
+
- `IntegrationVerificationReceipt`
|
|
35
|
+
- `ContainerEnvironmentReceipt`
|
|
36
|
+
- `ChromeUserJourneyReceipt`
|
|
37
|
+
- `MergeReceipt`
|
|
38
|
+
- `DeploymentIdentityReceipt`
|
|
39
|
+
- `HealthReceipt`
|
|
40
|
+
- `LiveEvidenceReceipt`
|
|
41
|
+
- `CleanupReceipt`
|
|
42
|
+
- `CompletionReceipt`
|
|
43
|
+
- `FailureReceipt`
|
|
44
|
+
|
|
45
|
+
Each receipt should contain:
|
|
46
|
+
|
|
47
|
+
- schema version, Run ID, module, result ID, input digest, idempotency key, and
|
|
48
|
+
production time;
|
|
49
|
+
- `success`, `retryable_error`, or `terminal_error`;
|
|
50
|
+
- source revisions and environment identity;
|
|
51
|
+
- executed action and observed result;
|
|
52
|
+
- evidence references such as commands, exit codes, logs, screenshots, video,
|
|
53
|
+
network traces, DB rows, artifact hashes, CI/deploy URLs, and timestamps;
|
|
54
|
+
- a typed error category and retryability when unsuccessful.
|
|
55
|
+
|
|
56
|
+
## Monitor verdict and policy action
|
|
57
|
+
|
|
58
|
+
The semantic monitor may emit:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
status:
|
|
62
|
+
on_track
|
|
63
|
+
insufficient_evidence
|
|
64
|
+
goal_drift
|
|
65
|
+
retryable_failure
|
|
66
|
+
needs_hil
|
|
67
|
+
blocked
|
|
68
|
+
completed
|
|
69
|
+
|
|
70
|
+
recommended_action:
|
|
71
|
+
continue
|
|
72
|
+
retry_current
|
|
73
|
+
propose_replan
|
|
74
|
+
request_hil
|
|
75
|
+
abort
|
|
76
|
+
complete
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The deterministic policy gate checks authorization, applicable state routes,
|
|
80
|
+
revision identity, evidence completeness, idempotency, retry budget, repeated
|
|
81
|
+
failure fingerprints, and external-effect ambiguity before accepting the
|
|
82
|
+
recommendation.
|
|
83
|
+
|
|
84
|
+
Do not expose hidden chain-of-thought. Publish only the typed verdict, concise
|
|
85
|
+
reason, selected action, and evidence references.
|
|
86
|
+
|
|
87
|
+
## Evidence invalidation
|
|
88
|
+
|
|
89
|
+
Evidence is revision-bound:
|
|
90
|
+
|
|
91
|
+
| Change | Invalidate |
|
|
92
|
+
|---|---|
|
|
93
|
+
| Charter or explicit success conditions | All affected downstream gates |
|
|
94
|
+
| Head SHA or generated source changes | Local, CI, integration, container, and live evidence |
|
|
95
|
+
| Base SHA or companion revision changes | Integration and later evidence |
|
|
96
|
+
| Container image digest changes | Container user journey and later runtime evidence |
|
|
97
|
+
| Merge SHA changes | Deployment identity and live evidence |
|
|
98
|
+
| Deployed revision changes | Health and live evidence |
|
|
99
|
+
| Browser profile, tenant, or fixture changes | Affected user-journey evidence |
|
|
100
|
+
|
|
101
|
+
Do not discard historical receipts; mark them superseded for the current gate.
|
|
102
|
+
|
|
103
|
+
## Failure handling
|
|
104
|
+
|
|
105
|
+
Classify failures before retrying:
|
|
106
|
+
|
|
107
|
+
- code defect;
|
|
108
|
+
- stale or wrong revision;
|
|
109
|
+
- environment/configuration drift;
|
|
110
|
+
- weak or contaminated fixture;
|
|
111
|
+
- external provider, authorization, rate limit, or timeout;
|
|
112
|
+
- contract/schema drift;
|
|
113
|
+
- persistence, concurrency, projection, cache, or replica race;
|
|
114
|
+
- evidence collection failure.
|
|
115
|
+
|
|
116
|
+
Retry only when the classification and policy permit it. Reconcile ambiguous
|
|
117
|
+
external effects before retrying. Preserve passing work and repair the smallest
|
|
118
|
+
affected surface. Repeated fingerprints require root-cause repair, replan, or
|
|
119
|
+
human input rather than identical retries.
|
|
120
|
+
|
|
121
|
+
## Completion predicate
|
|
122
|
+
|
|
123
|
+
For the full delivery mode:
|
|
124
|
+
|
|
125
|
+
```text
|
|
126
|
+
done =
|
|
127
|
+
reproduction_verified
|
|
128
|
+
&& locally_verified
|
|
129
|
+
&& pr_ci_green
|
|
130
|
+
&& integration_verified
|
|
131
|
+
&& user_like_local_verified
|
|
132
|
+
&& merged
|
|
133
|
+
&& deployed_exact_revision
|
|
134
|
+
&& health_verified
|
|
135
|
+
&& live_verified
|
|
136
|
+
&& cleanup_verified
|
|
137
|
+
&& completion_receipt_created
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Remove only genuinely non-applicable terms and record why. If merge or deploy
|
|
141
|
+
is outside current authority, stop at the highest proven pre-authority state.
|
|
142
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pr-review
|
|
3
|
+
description: Review the current or specified pull request for correctness, regressions, security, evidence gaps, and SIMY repository-policy violations. Use when the user asks SIMY to review a PR. Do not use for implementing fixes unless separately requested.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SIMY pull request review
|
|
7
|
+
|
|
8
|
+
Use the current Codex thread to resolve the intended behavior, then inspect the actual pull request and repository evidence.
|
|
9
|
+
|
|
10
|
+
## Review contract
|
|
11
|
+
|
|
12
|
+
- Resolve the PR from an explicit URL/number or the current branch. If it cannot be resolved unambiguously, ask for the smallest missing identifier.
|
|
13
|
+
- Read applicable `AGENTS.md` instructions, the complete diff, changed-file context, tests, and current check state.
|
|
14
|
+
- Focus on behaviorally meaningful findings: correctness, authorization and tenant boundaries, data loss, concurrency and retries, compatibility, security, and missing regression evidence.
|
|
15
|
+
- Report findings first, ordered by severity, with precise file and line references. Explain impact and the smallest credible fix.
|
|
16
|
+
- Distinguish verified defects from questions or residual risks. If there are no findings, say so and name the remaining verification gaps.
|
|
17
|
+
- Do not edit code, post a review, approve, merge, deploy, or send external messages unless the user separately authorizes that action.
|
|
18
|
+
- Never call a PR merged merely because auto-merge is enabled; verify its remote state and `mergedAt` when merge status matters.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sqm-loop
|
|
3
|
+
description: Run the SIMY Software Quality Monitor against the repository and changes discussed in the current Codex thread. Use when the user asks SIMY to start SQM, quality-check the current work, or prepare a PR quality proof.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SIMY SQM Loop
|
|
7
|
+
|
|
8
|
+
Treat the current Codex thread, its attachments, and the active repository as the request context. Convert that context into explicit quality expectations, then verify the actual repository state; do not merely summarize the conversation.
|
|
9
|
+
|
|
10
|
+
## Run the quality loop
|
|
11
|
+
|
|
12
|
+
1. Identify the repository root and the user-visible behavior or incident discussed in the current thread.
|
|
13
|
+
2. Preserve unrelated user changes and follow repository instructions.
|
|
14
|
+
3. Run `simy sqm min-check` from the repository root.
|
|
15
|
+
4. Run `simy sqm check --proof proof.json --signed-evidence proof.json.signed.json`.
|
|
16
|
+
5. Read `proof.json` and require `outcome.status` to be `passed` before reporting success or proposing a pull request.
|
|
17
|
+
6. Report the checked repository/revision, proof paths, outcome, blockers, and any evidence gap.
|
|
18
|
+
|
|
19
|
+
If implementation is required before the check can pass, obtain or confirm the user's change authorization and make the smallest relevant repair. A request to run SQM alone does not authorize unrelated edits, a PR, merge, deployment, or external messages.
|
|
20
|
+
|
|
21
|
+
Do not substitute an informal LLM review for SQM. If the CLI is unavailable, authentication is missing, or the proof is not passed, stop at the highest verified state and report the exact blocker.
|