its-magic 0.1.2-55 → 0.1.2
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 +1 -1
- package/scripts/check_intake_template_parity.py +96 -0
- package/template/.cursor/commands/architecture.md +4 -0
- package/template/.cursor/commands/auto.md +110 -15
- package/template/.cursor/commands/discovery.md +4 -0
- package/template/.cursor/commands/execute.md +343 -291
- package/template/.cursor/commands/intake.md +4 -0
- package/template/.cursor/commands/map-codebase.md +4 -0
- package/template/.cursor/commands/memory-audit.md +4 -0
- package/template/.cursor/commands/milestone-complete.md +4 -0
- package/template/.cursor/commands/milestone-start.md +4 -0
- package/template/.cursor/commands/pause.md +4 -0
- package/template/.cursor/commands/phase-context.md +4 -0
- package/template/.cursor/commands/plan-verify.md +4 -0
- package/template/.cursor/commands/qa.md +226 -222
- package/template/.cursor/commands/quick.md +13 -0
- package/template/.cursor/commands/refresh-context.md +4 -0
- package/template/.cursor/commands/release.md +505 -487
- package/template/.cursor/commands/research.md +4 -0
- package/template/.cursor/commands/resume.md +4 -0
- package/template/.cursor/commands/security-review.md +4 -0
- package/template/.cursor/commands/sprint-plan.md +4 -0
- package/template/.cursor/commands/status-reconcile.md +4 -0
- package/template/.cursor/commands/verify-work.md +4 -0
- package/template/.cursor/dev-environment.json.example +22 -0
- package/template/.cursor/scratchpad.local.example.md +40 -3
- package/template/.cursor/scratchpad.md +324 -262
- package/template/.cursorignore +1 -0
- package/template/docs/engineering/auto-orchestration-reference.md +121 -14
- package/template/docs/engineering/context/installer-owned-paths.manifest +4 -1
- package/template/docs/engineering/runbook.md +207 -4
- package/template/scripts/check_intake_template_parity.py +96 -0
- package/template/scripts/dev_environment_lib.py +463 -0
- package/template/scripts/pack_json_validate.py +130 -0
- package/template/scripts/project_readme_coverage_lib.py +417 -0
- package/template/scripts/readme_feature_coverage_lib.py +2 -2
- package/template/scripts/validate_project_readme_coverage.py +151 -0
|
@@ -1,291 +1,343 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "its-magic execute: implement tasks with artifacts and state updates."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /execute
|
|
6
|
-
|
|
7
|
-
## Subagents
|
|
8
|
-
- dev
|
|
9
|
-
|
|
10
|
-
## Execution model
|
|
11
|
-
- Run `/execute` in a fresh Dev subagent context.
|
|
12
|
-
- After writing outputs, stop and hand off to `/qa` in a new subagent/chat.
|
|
13
|
-
- When fixing QA findings, each new `/execute` run is a new Dev subagent.
|
|
14
|
-
|
|
15
|
-
## Isolation evidence write requirement (US-0048 / DEC-0029)
|
|
16
|
-
|
|
17
|
-
At the end of `/execute`, append an isolation evidence entry to
|
|
18
|
-
`docs/engineering/state.md`:
|
|
19
|
-
|
|
20
|
-
- `phase_id=execute`
|
|
21
|
-
- `role=dev`
|
|
22
|
-
- `fresh_context_marker=<new marker for this subagent>`
|
|
23
|
-
- `timestamp=<ISO UTC>`
|
|
24
|
-
- `evidence_ref=<primary output ref>` (recommended: `handoffs/dev_to_qa.md` and the target sprint `sprints/Sxxxx/summary.md`)
|
|
25
|
-
|
|
26
|
-
In an execute↔QA implementation loop (`AUTO_IMPLEMENTATION_LOOP=1`), each new
|
|
27
|
-
`/execute` cycle must have a new `fresh_context_marker` (marker reuse is treated
|
|
28
|
-
as stale isolation evidence).
|
|
29
|
-
|
|
30
|
-
## Inputs
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
**`
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
no
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
##
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
**
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
**`
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
-
|
|
146
|
-
(
|
|
147
|
-
|
|
148
|
-
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
- If `
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
- If
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
`
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
-
|
|
229
|
-
-
|
|
230
|
-
-
|
|
231
|
-
-
|
|
232
|
-
|
|
233
|
-
- `
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
-
|
|
246
|
-
-
|
|
247
|
-
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
- `
|
|
251
|
-
- `
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
(
|
|
279
|
-
|
|
280
|
-
-
|
|
281
|
-
`
|
|
282
|
-
(
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
`
|
|
286
|
-
|
|
287
|
-
-
|
|
288
|
-
`
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
1
|
+
---
|
|
2
|
+
description: "its-magic execute: implement tasks with artifacts and state updates."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /execute
|
|
6
|
+
|
|
7
|
+
## Subagents
|
|
8
|
+
- dev
|
|
9
|
+
|
|
10
|
+
## Execution model
|
|
11
|
+
- Run `/execute` in a fresh Dev subagent context.
|
|
12
|
+
- After writing outputs, stop and hand off to `/qa` in a new subagent/chat.
|
|
13
|
+
- When fixing QA findings, each new `/execute` run is a new Dev subagent.
|
|
14
|
+
|
|
15
|
+
## Isolation evidence write requirement (US-0048 / DEC-0029)
|
|
16
|
+
|
|
17
|
+
At the end of `/execute`, append an isolation evidence entry to
|
|
18
|
+
`docs/engineering/state.md`:
|
|
19
|
+
|
|
20
|
+
- `phase_id=execute`
|
|
21
|
+
- `role=dev`
|
|
22
|
+
- `fresh_context_marker=<new marker for this subagent>`
|
|
23
|
+
- `timestamp=<ISO UTC>`
|
|
24
|
+
- `evidence_ref=<primary output ref>` (recommended: `handoffs/dev_to_qa.md` and the target sprint `sprints/Sxxxx/summary.md`)
|
|
25
|
+
|
|
26
|
+
In an execute↔QA implementation loop (`AUTO_IMPLEMENTATION_LOOP=1`), each new
|
|
27
|
+
`/execute` cycle must have a new `fresh_context_marker` (marker reuse is treated
|
|
28
|
+
as stale isolation evidence).
|
|
29
|
+
|
|
30
|
+
## Inputs
|
|
31
|
+
|
|
32
|
+
- **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
|
|
33
|
+
and the story section anchor in vision/architecture/decisions when a heading exists; forbid
|
|
34
|
+
full-file reads when a section heading exists.
|
|
35
|
+
- `sprints/S0001/tasks.md`
|
|
36
|
+
- `handoffs/tl_to_dev.md`
|
|
37
|
+
- Optional: `handoffs/qa_to_dev.md` when fixing QA findings
|
|
38
|
+
- Optional (remote-enabled mode only): `.cursor/remote.json`
|
|
39
|
+
|
|
40
|
+
## Outputs (artifacts)
|
|
41
|
+
- Code changes
|
|
42
|
+
- `sprints/S0001/summary.md`
|
|
43
|
+
- `docs/engineering/state.md`
|
|
44
|
+
- `handoffs/dev_to_qa.md` (if ready)
|
|
45
|
+
- Optional (when enabled):
|
|
46
|
+
- `docs/engineering/compatibility-signals.md`
|
|
47
|
+
- `docs/engineering/compatibility-report.md`
|
|
48
|
+
|
|
49
|
+
## Stop conditions
|
|
50
|
+
- Decision gate triggered
|
|
51
|
+
- Missing task definition or unclear scope
|
|
52
|
+
|
|
53
|
+
Release gate semantics (US-0039): mandatory gates (check-in test, QA, UAT) and no-bypass/override contract are enforced at `/release`; see `.cursor/commands/release.md` and `.cursor/commands/qa.md`.
|
|
54
|
+
|
|
55
|
+
### Browser UAT self-test (US-0093)
|
|
56
|
+
|
|
57
|
+
When **`UAT_BROWSER_PROBE_MODE=cursor`** (default) and acceptance steps classify as **`browser_smoke`**
|
|
58
|
+
(or automatable **`manual_operator`** re-routed per **DEC-0079** §4), execute the **Cursor browser MCP**
|
|
59
|
+
sequence during `/execute` when web UI verification applies (**BUG-0006**: **`scripts/uat_probe_lib.py`**
|
|
60
|
+
never invokes MCP — subagent only):
|
|
61
|
+
|
|
62
|
+
1. **Resolve target URL** — `docs/engineering/runtime-connectivity.md` first `http(s)://`; else
|
|
63
|
+
`package.json` dev/start + **`DEV_SERVER_PORT`** scratchpad override.
|
|
64
|
+
2. **`browser_navigate`** — load URL; respect enterprise origin allowlist.
|
|
65
|
+
3. **Step plan** — map automatable verbs to **`browser_click`** / **`browser_type`** / **`browser_scroll`**;
|
|
66
|
+
**never** fill password/credential fields; **never** read **`.env`** paths.
|
|
67
|
+
4. **`browser_screenshot`** — write to **`sprints/Sxxxx/evidence/browser/<probe_id>-<seq>.png`** (max **5**).
|
|
68
|
+
5. **Console + network evidence** — counts + summary path refs only (no inline secrets).
|
|
69
|
+
6. **Verdict** — set **`passed`**, **`reason_code`**, **`browser_evidence_refs`** on the matching
|
|
70
|
+
**`probe_results[]`** row in **`uat.json`**. **`passed=true`** in **`cursor`** mode requires
|
|
71
|
+
non-empty **`navigation_url`** + at least one screenshot or console/network summary path — else
|
|
72
|
+
downgrade to **`UAT_BROWSER_PROBE_FAILED`**.
|
|
73
|
+
7. **Fallback trigger** — MCP unavailable → record **`UAT_BROWSER_UNAVAILABLE`**; when
|
|
74
|
+
**`UAT_BROWSER_FALLBACK_CHAIN=1`**, stdlib HTTP/Playwright fallback runs via **`uat_probe_lib.py`**.
|
|
75
|
+
Both fail → **`UAT_BROWSER_PROBE_FAILED`** (no silent PASS).
|
|
76
|
+
|
|
77
|
+
Optional validation: **`python scripts/uat_probe_lib.py --merge-result <fragment.json>`** —
|
|
78
|
+
evidence-required-on-PASS in **`cursor`** mode. No auto-read **`.env`**, no credential auto-fill,
|
|
79
|
+
no intake evidence mutation.
|
|
80
|
+
|
|
81
|
+
## Intake evidence tooling reference (US-0078 / DEC-0060)
|
|
82
|
+
|
|
83
|
+
Stories that harden intake persistence ship **`scripts/intake_evidence_lib.py`**,
|
|
84
|
+
**`scripts/intake_evidence_validate.py`**, and **`tests/intake_evidence_fixtures_test.py`**
|
|
85
|
+
(invoked from **`tests/run-tests.ps1`** / **`tests/run-tests.sh`** §26k). See
|
|
86
|
+
**`docs/engineering/architecture.md`** **`# US-0078`** and **`decisions/DEC-0060.md`**.
|
|
87
|
+
|
|
88
|
+
## Bug issue tooling reference (US-0079 / DEC-0061)
|
|
89
|
+
|
|
90
|
+
Ship **`scripts/bug_issue_lib.py`**, **`scripts/bug_issue_validate.py`**, **`scripts/intake_bug_routing_guard.py`**, and **`tests/bug_issue_fixtures_test.py`** (§26L in **`tests/run-tests.ps1`** / **`tests/run-tests.sh`**). See **`docs/engineering/architecture.md`** **`# US-0079`** and **`decisions/DEC-0061.md`**.
|
|
91
|
+
|
|
92
|
+
## Token-cost evidence (US-0080 / DEC-0062)
|
|
93
|
+
|
|
94
|
+
When persisting token metrics for an orchestrated run: use append-only
|
|
95
|
+
**`handoffs/token_cost_runs/<orchestrator_run_id>.md`** (or **`.jsonl`**) per
|
|
96
|
+
**`DEC-0062`** §3; set **`token_cost_evidence_ref`** on **`docs/engineering/state.md`**
|
|
97
|
+
checkpoints when rows exist. **`run_class_hash`** comparability for **AC-2** uses
|
|
98
|
+
**`scripts/token_cost_lib.py`** / **`scripts/token_cost_compare.py`**; active/`template/`
|
|
99
|
+
parity for listed paths: **`python scripts/check_token_cost_parity.py --repo .`**
|
|
100
|
+
(§26M in **`tests/run-tests.ps1`** / **`tests/run-tests.sh`**).
|
|
101
|
+
|
|
102
|
+
## Canonical status contract (US-0045)
|
|
103
|
+
|
|
104
|
+
- Story status authority is `docs/product/backlog.md` (including **`BUG-####`** under **`## Bug issues (canonical)`** per **DEC-0061**).
|
|
105
|
+
- `docs/product/acceptance.md` and `docs/engineering/state.md` are derived and
|
|
106
|
+
must not be treated as canonical readiness sources when contradictory.
|
|
107
|
+
- `/execute` must not start/continue implementation solely based on
|
|
108
|
+
non-canonical status evidence.
|
|
109
|
+
|
|
110
|
+
## Browser UAT self-test (US-0093)
|
|
111
|
+
|
|
112
|
+
When acceptance steps classify as **`browser_smoke`** (or automatable **`manual_operator`**
|
|
113
|
+
reclassified per **DEC-0079** §4) and **`UAT_BROWSER_PROBE_MODE=cursor`**, execute the **Cursor
|
|
114
|
+
browser MCP** sequence during execute-phase verification — **lib never calls MCP directly**
|
|
115
|
+
(**BUG-0006**):
|
|
116
|
+
|
|
117
|
+
1. **Resolve target URL** — `docs/engineering/runtime-connectivity.md` first `http(s)://`; else
|
|
118
|
+
dev-server port from `package.json` + scratchpad **`DEV_SERVER_PORT`**.
|
|
119
|
+
2. **`browser_navigate`** — respect origin allowlist.
|
|
120
|
+
3. **Step plan** — **`browser_click`** / **`browser_type`** / **`browser_scroll`** when
|
|
121
|
+
automatable; **never** fill password/credential fields or read **`.env`**.
|
|
122
|
+
4. **`browser_screenshot`** → **`sprints/Sxxxx/evidence/browser/<probe_id>-<seq>.png`** (max **5**).
|
|
123
|
+
5. Console + network summary path refs only (no inline secrets).
|
|
124
|
+
6. Write **`browser_evidence_refs`** to **`uat.json`** `probe_results[]`; mirror
|
|
125
|
+
**Runtime browser evidence** in **`qa-findings.md`**.
|
|
126
|
+
7. MCP unavailable → **`UAT_BROWSER_UNAVAILABLE`** + stdlib fallback when
|
|
127
|
+
**`UAT_BROWSER_FALLBACK_CHAIN=1`**; validate with
|
|
128
|
+
**`python scripts/uat_probe_lib.py --merge-result <fragment.json>`**.
|
|
129
|
+
|
|
130
|
+
Reason codes: **`UAT_BROWSER_UNAVAILABLE`**, **`UAT_BROWSER_PROBE_FAILED`**,
|
|
131
|
+
**`UAT_BROWSER_PROBE_TIMEOUT`**. **No silent PASS** without agent evidence in **`cursor`** mode.
|
|
132
|
+
|
|
133
|
+
## Steps
|
|
134
|
+
1. Implement one task at a time.
|
|
135
|
+
2. Update summary and engineering state.
|
|
136
|
+
3. Handoff to QA when ready.
|
|
137
|
+
4. If `AUTO_INSTALL_DEPS=1` in `.cursor/scratchpad.md`, install dependencies
|
|
138
|
+
via the appropriate package manager without prompting.
|
|
139
|
+
5. Mode-aware remote-config validation (DEC-0016):
|
|
140
|
+
- If `REMOTE_EXECUTION=0`, skip all remote-config checks (zero overhead).
|
|
141
|
+
- If `REMOTE_EXECUTION=1`, fail fast on `.cursor/remote.json` contract errors
|
|
142
|
+
before remote execution is attempted.
|
|
143
|
+
- Required root fields: `version` (integer), `defaultTarget` (string),
|
|
144
|
+
`targets` (array).
|
|
145
|
+
- Required target fields: `id` (string), `type` (`docker|ssh|vm`),
|
|
146
|
+
`enabled` (boolean), `host` (string), `port` (integer 1..65535),
|
|
147
|
+
`workspaceRoot` (string).
|
|
148
|
+
- Optional target field: `auth` object with `mode` (`none|env`).
|
|
149
|
+
- If `auth.mode=env`, sensitive values must be env-var references only
|
|
150
|
+
(for example `tokenEnv`, `passwordEnv`, `privateKeyPathEnv`).
|
|
151
|
+
- `defaultTarget` must match an existing enabled target `id`.
|
|
152
|
+
- Secret-like inline literals are forbidden in committed config.
|
|
153
|
+
6. Remote validation errors must use actionable fail-fast format:
|
|
154
|
+
`[REMOTE_CONFIG_ERROR] <path>: expected <rule>, got <actual>. Fix: <hint>.`
|
|
155
|
+
- Missing file: `.cursor/remote.json` not found.
|
|
156
|
+
- Malformed JSON: parse failure with syntax location.
|
|
157
|
+
- Invalid enum/type/value: include field path and allowed/expected values.
|
|
158
|
+
- Security violation: inline secret-like value detected.
|
|
159
|
+
Use remediation hints that either fix config or disable remote mode
|
|
160
|
+
(`REMOTE_EXECUTION=0`) when remote execution is not needed.
|
|
161
|
+
7. If `RUN_TESTS_ON_EDIT=1`, run configured tests after meaningful edits.
|
|
162
|
+
8. If `LOOP_UNTIL_GREEN=1`, fix failing tests in small iterations until green,
|
|
163
|
+
or stop and document blockers in `docs/engineering/state.md`.
|
|
164
|
+
9. If `AUTO_PAUSE_REQUEST=1` and boundary rules permit, checkpoint via `/pause`.
|
|
165
|
+
10. Sync policy evaluation contract (US-0038):
|
|
166
|
+
- Evaluate sync eligibility only at completed phase boundaries.
|
|
167
|
+
- Do not evaluate on partial/intra-phase edits (deterministic boundary-only behavior).
|
|
168
|
+
- If policy mode is `disabled|manual`, keep near-zero overhead and do not
|
|
169
|
+
auto-trigger push behavior.
|
|
170
|
+
11. Team-scope guardrails for bulk execute mode (US-0047 / DEC-0024):
|
|
171
|
+
- When `TEAM_MODE=1` and `AUTO_TEAM_SCOPE_ENFORCE=1`, only execute tasks that
|
|
172
|
+
match current member scope (`TEAM_MEMBER`, `ACTIVE_TASK_IDS`).
|
|
173
|
+
- For out-of-scope tasks, do not write code or artifacts; emit deterministic
|
|
174
|
+
reason code and follow configured stop/skip policy.
|
|
175
|
+
12. When ready to push, suggest `scripts/validate-and-push` to run the full
|
|
176
|
+
quality chain locally before CI.
|
|
177
|
+
13. Optional compatibility observability execution contract (US-0034):
|
|
178
|
+
- If `CROSS_REPO_OBSERVABILITY=0`, skip all compatibility checks (zero
|
|
179
|
+
required overhead).
|
|
180
|
+
- If `CROSS_REPO_OBSERVABILITY=1`, append/update compatibility signals and
|
|
181
|
+
findings in canonical artifacts (`compatibility-signals.md`,
|
|
182
|
+
`compatibility-report.md`) including severity, impacted modules,
|
|
183
|
+
evidence refs, and recommended actions.
|
|
184
|
+
14. Optional component-scoped execution guardrails (US-0035):
|
|
185
|
+
- If `COMPONENT_SCOPE_MODE=0`, add zero required scope overhead.
|
|
186
|
+
- If `COMPONENT_SCOPE_MODE=1`, enforce scope-first execution:
|
|
187
|
+
- do not intentionally modify out-of-scope components unless escalation is
|
|
188
|
+
explicitly approved and recorded,
|
|
189
|
+
- any detected unapproved out-of-scope impact must be flagged for decision
|
|
190
|
+
gate handling before release.
|
|
191
|
+
15. Optional spec-pack (US-0031):
|
|
192
|
+
- If `SPEC_PACK_MODE=0`, add no required spec-pack steps (zero overhead).
|
|
193
|
+
- If `SPEC_PACK_MODE=1`, update Technical Specification artifact for target
|
|
194
|
+
story at canonical path when implementation details change; see runbook
|
|
195
|
+
for required sections and ownership.
|
|
196
|
+
16. Optional user-guide (US-0032):
|
|
197
|
+
- If `USER_GUIDE_MODE=0`, add no required user-guide steps or blocking checks (zero overhead).
|
|
198
|
+
- If `USER_GUIDE_MODE=1`, create or update user guide at
|
|
199
|
+
`docs/user-guides/US-xxxx.md` for target story; see runbook for minimum schema.
|
|
200
|
+
17. Optional remote runtime execution context (US-0064):
|
|
201
|
+
- If release target runtime metadata indicates `runtime.mode=remote`, record
|
|
202
|
+
remote execution/debug context in handoff outputs and state evidence
|
|
203
|
+
references.
|
|
204
|
+
- If remote execution is required but connectivity metadata is incomplete,
|
|
205
|
+
fail fast with `REMOTE_CONNECTIVITY_CONFIG_INVALID`.
|
|
206
|
+
- Never expose secrets in execution outputs; only sanitized endpoint data and
|
|
207
|
+
env-reference names are allowed.
|
|
208
|
+
17b. Remote evidence cues (US-0084):
|
|
209
|
+
- When `REMOTE_EXECUTION=1`, cite an **environment label** in
|
|
210
|
+
`handoffs/dev_to_qa.md` (e.g. `WSL`, `ssh:SSH_HOST` as the **env var name**,
|
|
211
|
+
`dockerOverSsh`) and state **where tests ran** (local vs remote host).
|
|
212
|
+
- Do not paste private keys, tokens, or resolved secret **values**; use
|
|
213
|
+
`python scripts/remote_config_summary.py` for a names-only summary when needed.
|
|
214
|
+
18. Runtime QA autopilot execution contract (US-0065 / DEC-0047):
|
|
215
|
+
- Treat runtime verification as mandatory for generated-project scope; static
|
|
216
|
+
checks alone are not sufficient evidence for PASS readiness.
|
|
217
|
+
- Follow canonical stage order:
|
|
218
|
+
`startup -> readiness/connectivity -> log scan -> bounded retry -> verdict`.
|
|
219
|
+
- Record runtime execution evidence in execute outputs:
|
|
220
|
+
- startup command and selected stack profile,
|
|
221
|
+
- runtime mode (`local|remote`) and endpoint/health snapshot,
|
|
222
|
+
- retry ledger (`attempt`, `delay_ms`, `outcome`),
|
|
223
|
+
- log severity summary (`info|warn|error|fatal` counts),
|
|
224
|
+
- final runtime verdict with deterministic reason code.
|
|
225
|
+
- Supported stack profiles (minimum): `node`, `python`, `go`, `java`, `dotnet`.
|
|
226
|
+
- If stack profile cannot be resolved deterministically, fail closed with
|
|
227
|
+
`RUNTIME_STACK_PROFILE_UNRESOLVED` and remediation guidance.
|
|
228
|
+
- Bounded retry policy:
|
|
229
|
+
- retries are allowed only for transient startup/connectivity failures,
|
|
230
|
+
- retry attempts must not exceed configured max,
|
|
231
|
+
- critical log signals are non-transient and fail closed immediately.
|
|
232
|
+
- Runtime failure reason-code baseline:
|
|
233
|
+
- `RUNTIME_STARTUP_FAILED`
|
|
234
|
+
- `RUNTIME_ENDPOINT_UNREACHABLE`
|
|
235
|
+
- `RUNTIME_LOG_CRITICAL_DETECTED`
|
|
236
|
+
- `RUNTIME_RETRY_BUDGET_EXHAUSTED`
|
|
237
|
+
- `RUNTIME_STACK_PROFILE_UNRESOLVED`
|
|
238
|
+
- When HTTP/UI context is detected, include webapp runtime evidence path for
|
|
239
|
+
QA handoff (browser-surface checks plus console/network error signals).
|
|
240
|
+
19. Generated baseline test scaffolding contract (US-0066 / DEC-0048):
|
|
241
|
+
- Resolve deterministic stack/project profile before scaffold generation:
|
|
242
|
+
`node|python|go|java|dotnet` (minimum supported set).
|
|
243
|
+
- Generate baseline tests only when missing; create minimal runnable assets for
|
|
244
|
+
unit, integration, and acceptance layers using stable paths.
|
|
245
|
+
- Record generated-test evidence in execute outputs:
|
|
246
|
+
- resolved stack profile,
|
|
247
|
+
- generated paths inventory (`unit|integration|acceptance`),
|
|
248
|
+
- scaffold command/actions and outcome.
|
|
249
|
+
- Deterministic runbook baseline wiring:
|
|
250
|
+
- if `TEST_COMMAND` is missing/unset, write stack baseline command,
|
|
251
|
+
- if `TEST_COMMAND` is user-authored and non-empty, preserve it.
|
|
252
|
+
- Fail-closed diagnostics for generation/profile failures:
|
|
253
|
+
- `TEST_SCAFFOLD_STACK_UNRESOLVED`
|
|
254
|
+
- `TEST_SCAFFOLD_UNSUPPORTED_STACK`
|
|
255
|
+
- `TEST_SCAFFOLD_GENERATION_FAILED`
|
|
256
|
+
- Non-destructive precedence is mandatory:
|
|
257
|
+
- preserve existing user-authored test files and config by default,
|
|
258
|
+
- fill only missing baseline scaffold assets.
|
|
259
|
+
- Rerun behavior must be idempotent:
|
|
260
|
+
- no duplicate scaffold files on repeated `/execute`,
|
|
261
|
+
- no oscillating `TEST_COMMAND` rewrites between runs.
|
|
262
|
+
- Runtime boundary:
|
|
263
|
+
- static generated-test PASS is necessary but not sufficient for QA PASS;
|
|
264
|
+
runtime startup/connectivity/log verdict remains governed by `US-0065`.
|
|
265
|
+
20. User-visible internal metadata guard (US-0071 / DEC-0053):
|
|
266
|
+
- Before completing `/execute`, run `python scripts/check-user-visible-metadata.py`
|
|
267
|
+
from the repository root (or `python scripts/check-user-visible-metadata.py --repo <root>`).
|
|
268
|
+
- On failure, stop with `USER_VISIBLE_INTERNAL_METADATA_DETECTED` and use the
|
|
269
|
+
remediation contract in `docs/engineering/runbook.md` (evidence ref, token
|
|
270
|
+
class, neutral operator copy). Do not ship planning tokens in scanned
|
|
271
|
+
operator-visible strings.
|
|
272
|
+
- If you add a new operator-facing script or binary path, update inclusive
|
|
273
|
+
scan roots in `scripts/check-user-visible-metadata.py` **and** this runbook
|
|
274
|
+
section together or fail closed with `METADATA_SANITIZATION_SCOPE_AMBIGUOUS`
|
|
275
|
+
semantics at QA/release.
|
|
276
|
+
21. Documentation profile validation (US-0077 / DEC-0059):
|
|
277
|
+
- When you change `README.md`, `docs/developer/README.md`, scratchpad profile keys
|
|
278
|
+
(`DOC_AUDIENCE_PROFILE`, `DOC_DETAIL_LEVEL`), or `scripts/doc_profile_lib.py` /
|
|
279
|
+
`scripts/validate_doc_profile.py`, run `python scripts/validate_doc_profile.py --repo <root>`.
|
|
280
|
+
- Fail closed on `DOC_PROFILE_INVALID`, `DOC_PROFILE_MERGE_ERROR`,
|
|
281
|
+
`DOC_SECTION_MISSING:*`, `DOC_SECTION_BUDGET_EXCEEDED`, or `DOC_TEMPLATE_PARITY_FAIL`
|
|
282
|
+
(see `docs/engineering/runbook.md`).
|
|
283
|
+
22. Triad hot-surface enforcement (DEC-0054):
|
|
284
|
+
- Before completing `/execute`, run
|
|
285
|
+
`python scripts/enforce-triad-hot-surface.py --check` from repository root
|
|
286
|
+
(or `--repo <root>`).
|
|
287
|
+
- If the check fails, run `python scripts/enforce-triad-hot-surface.py --rollover`
|
|
288
|
+
then `--check` again; if still failing, stop with `STATE_ARCHIVE_REQUIRED` or
|
|
289
|
+
`ARTIFACT_HOT_SURFACE_OVERSIZE` (no successful execute completion on oversize
|
|
290
|
+
triad hot files).
|
|
291
|
+
- When your edits touched any triad path (`docs/engineering/state.md`,
|
|
292
|
+
`handoffs/po_to_tl.md`, `docs/engineering/architecture.md`), ensure rollover
|
|
293
|
+
evidence (`boundary`, `moved`, `retained`, `pack_ref`) is recorded in the
|
|
294
|
+
execute checkpoint when packs were written.
|
|
295
|
+
23. Project README bootstrap + per-story catalog delta (US-0097 / DEC-0083):
|
|
296
|
+
- **23 preamble**: Read merged scratchpad `FRAMEWORK_KIT_REPO` (default `0`).
|
|
297
|
+
When `1` (its-magic kit repo only), skip **23a** and **23b** — consumer repos
|
|
298
|
+
never set `FRAMEWORK_KIT_REPO=1`. Read `PROJECT_README_ENFORCE` for delta context.
|
|
299
|
+
- **23a Bootstrap**: When root `README.md` is missing or matches placeholder
|
|
300
|
+
sentinels **S1–S4** (framework H1, `<!-- readme-feature-coverage-catalog -->`,
|
|
301
|
+
`Feature coverage catalog (US-0091)` heading, or byte-match to `template/README.md`),
|
|
302
|
+
materialize the project scaffold from `docs/product/vision.md` (H1 + 1–3 sentence
|
|
303
|
+
purpose, `## For users`, `## For developers`, `## Features`,
|
|
304
|
+
`<!-- project-readme-feature-catalog -->`, pointer to `its_magic/README.md`).
|
|
305
|
+
Operator-authored roots (**S5**) are never overwritten. Fail closed →
|
|
306
|
+
`PROJECT_README_BOOTSTRAP_SKIPPED` when bootstrap required but not performed.
|
|
307
|
+
- **23b Per-story delta (mandatory)**: Before `/execute` PASS for a shipped story,
|
|
308
|
+
add or update ≥1 user-facing catalog bullet under
|
|
309
|
+
`<!-- project-readme-feature-catalog -->` containing `\bUS-xxxx\b` for each
|
|
310
|
+
`user_visible: true` story in scope. Fail closed → `PROJECT_README_DELTA_SKIPPED`.
|
|
311
|
+
Hybrid/ambiguous roots → `PROJECT_README_MIGRATION_AMBIGUOUS` or
|
|
312
|
+
`PROJECT_README_SENTINEL_CONFLICT` (see runbook migration §). Inconclusive
|
|
313
|
+
classifier → `PROJECT_README_PLACEHOLDER_UNRESOLVED`.
|
|
314
|
+
- **23c Hygiene compose**: Prose edits in root `README.md` are subject to step **20**
|
|
315
|
+
(**US-0071**) — do not run duplicate hygiene when README is unchanged this phase.
|
|
316
|
+
- Active + `template/.cursor/commands/execute.md` byte-identical step **23** block.
|
|
317
|
+
|
|
318
|
+
24. Dev environment auto-launch profile (US-0098 / DEC-0084):
|
|
319
|
+
- **24 preamble**: Read merged scratchpad `DEV_AUTO_LAUNCH_PROFILE` (default `off`) and
|
|
320
|
+
optional `DEV_ENVIRONMENT_CONFIG` (default `.cursor/dev-environment.json`). When `off`,
|
|
321
|
+
skip **24a–24d** with zero overhead — manual workflows unchanged.
|
|
322
|
+
- **24a Gate + profile load**: Validate profile path via `scripts/dev_environment_lib.py`
|
|
323
|
+
`load_profile`; names-only schema check. Fail closed → `DEV_ENV_PROFILE_INVALID` or
|
|
324
|
+
`DEV_ENV_PROFILE_MISSING`. Never read `.env`.
|
|
325
|
+
- **24b Detect + persist**: Run `detect_mode(repo, profile, scratchpad)` per detection
|
|
326
|
+
precedence (**US-0086** remote wins over **docker-host-local**). Merge fields idempotently
|
|
327
|
+
into profile file.
|
|
328
|
+
- **24c Relaunch (bounded)**: When touched files match Tier A/B/C via `classify_touched_files`
|
|
329
|
+
or explicit operator refresh (**exact literal** `refresh dev environment` — case-sensitive
|
|
330
|
+
whole phrase): run `build_relaunch_plan` recipe; bounded retries (`retry_count` max **2**;
|
|
331
|
+
delays **5s** then **15s**). Bind-mount skip default: source-only docker changes emit
|
|
332
|
+
`DEV_ENV_RELAUNCH_SKIPPED_NO_SURFACE` unless `rebuild_recipe.restart_on_source_change=true`
|
|
333
|
+
or explicit refresh.
|
|
334
|
+
- **24d Connect + handoff**: Append **Dev environment relaunch** + **Connect** sections to
|
|
335
|
+
`handoffs/dev_to_qa.md` with evidence tuple fields: `dev_auto_launch_profile`,
|
|
336
|
+
`runtime_mode`, `relaunch_tier`, `relaunch_command`, `relaunch_outcome`, `retry_count`,
|
|
337
|
+
`reason_code`. Use `format_connect_block` — mandatory fields: `runtime_mode`,
|
|
338
|
+
`connect_endpoint`, `health_path`, `service_id`/`container_id`, `target_id`, `env_refs`,
|
|
339
|
+
`relaunch_outcome`. Names-only — no secret values.
|
|
340
|
+
- Orthogonal to step **18** (**US-0065**) runtime QA autopilot and step **17** (**US-0084**)
|
|
341
|
+
remote cues (compose when both fire).
|
|
342
|
+
- Active + `template/.cursor/commands/execute.md` byte-identical step **24** block.
|
|
343
|
+
|