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.
Files changed (37) hide show
  1. package/package.json +1 -1
  2. package/scripts/check_intake_template_parity.py +96 -0
  3. package/template/.cursor/commands/architecture.md +4 -0
  4. package/template/.cursor/commands/auto.md +110 -15
  5. package/template/.cursor/commands/discovery.md +4 -0
  6. package/template/.cursor/commands/execute.md +343 -291
  7. package/template/.cursor/commands/intake.md +4 -0
  8. package/template/.cursor/commands/map-codebase.md +4 -0
  9. package/template/.cursor/commands/memory-audit.md +4 -0
  10. package/template/.cursor/commands/milestone-complete.md +4 -0
  11. package/template/.cursor/commands/milestone-start.md +4 -0
  12. package/template/.cursor/commands/pause.md +4 -0
  13. package/template/.cursor/commands/phase-context.md +4 -0
  14. package/template/.cursor/commands/plan-verify.md +4 -0
  15. package/template/.cursor/commands/qa.md +226 -222
  16. package/template/.cursor/commands/quick.md +13 -0
  17. package/template/.cursor/commands/refresh-context.md +4 -0
  18. package/template/.cursor/commands/release.md +505 -487
  19. package/template/.cursor/commands/research.md +4 -0
  20. package/template/.cursor/commands/resume.md +4 -0
  21. package/template/.cursor/commands/security-review.md +4 -0
  22. package/template/.cursor/commands/sprint-plan.md +4 -0
  23. package/template/.cursor/commands/status-reconcile.md +4 -0
  24. package/template/.cursor/commands/verify-work.md +4 -0
  25. package/template/.cursor/dev-environment.json.example +22 -0
  26. package/template/.cursor/scratchpad.local.example.md +40 -3
  27. package/template/.cursor/scratchpad.md +324 -262
  28. package/template/.cursorignore +1 -0
  29. package/template/docs/engineering/auto-orchestration-reference.md +121 -14
  30. package/template/docs/engineering/context/installer-owned-paths.manifest +4 -1
  31. package/template/docs/engineering/runbook.md +207 -4
  32. package/template/scripts/check_intake_template_parity.py +96 -0
  33. package/template/scripts/dev_environment_lib.py +463 -0
  34. package/template/scripts/pack_json_validate.py +130 -0
  35. package/template/scripts/project_readme_coverage_lib.py +417 -0
  36. package/template/scripts/readme_feature_coverage_lib.py +2 -2
  37. package/template/scripts/validate_project_readme_coverage.py +151 -0
@@ -13,6 +13,10 @@ description: "its-magic intake: clarify idea and capture story + acceptance."
13
13
  in a new subagent/chat.
14
14
 
15
15
  ## Inputs
16
+
17
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
18
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
19
+ full-file reads when a section heading exists.
16
20
  - User idea (text or voice transcription)
17
21
  - Constraints, audience, success criteria
18
22
 
@@ -9,6 +9,10 @@ description: "its-magic map codebase: analyze existing project before changes."
9
9
  - curator
10
10
 
11
11
  ## Inputs
12
+
13
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
14
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
15
+ full-file reads when a section heading exists.
12
16
  - Existing repository code and docs
13
17
 
14
18
  ## Outputs (artifacts)
@@ -16,6 +16,10 @@ description: "its-magic memory-audit: read-only check for memory drift between a
16
16
  - Can be run at any phase: pre-handoff, pre-QA, pre-release, or ad-hoc.
17
17
 
18
18
  ## Inputs
19
+
20
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
21
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
22
+ full-file reads when a section heading exists.
19
23
  Read these files to build the audit picture:
20
24
 
21
25
  - `docs/engineering/state.md` — current project status and progress snapshot
@@ -9,6 +9,10 @@ description: "its-magic milestone complete: finalize milestone summary."
9
9
  - curator
10
10
 
11
11
  ## Inputs
12
+
13
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
14
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
15
+ full-file reads when a section heading exists.
12
16
  - `milestones/M0001/summary.md`
13
17
  - `handoffs/release_notes.md`
14
18
 
@@ -9,6 +9,10 @@ description: "its-magic milestone start: create milestone tracking files."
9
9
  - curator
10
10
 
11
11
  ## Inputs
12
+
13
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
14
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
15
+ full-file reads when a section heading exists.
12
16
  - Milestone name, goals, scope
13
17
 
14
18
  ## Outputs (artifacts)
@@ -23,6 +23,10 @@ At the end of `/pause`, append an isolation evidence entry to
23
23
  - `evidence_ref=handoffs/resume_brief.md`
24
24
 
25
25
  ## Inputs
26
+
27
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
28
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
29
+ full-file reads when a section heading exists.
26
30
  - Current sprint progress and state
27
31
  - Optional intent: immediate pause or graceful pause after current boundary
28
32
 
@@ -9,6 +9,10 @@ description: "its-magic phase context: capture phase preferences and constraints
9
9
  - tech-lead
10
10
 
11
11
  ## Inputs
12
+
13
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
14
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
15
+ full-file reads when a section heading exists.
12
16
  - Phase name (intake, discovery, architecture, sprint-plan, execute, qa, release)
13
17
  - Preferences, constraints, UX requirements
14
18
 
@@ -12,6 +12,10 @@ description: "its-magic plan verify: verify sprint tasks against acceptance."
12
12
  - After writing outputs, stop and hand off to `/execute` in a new subagent/chat.
13
13
 
14
14
  ## Inputs
15
+
16
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
17
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
18
+ full-file reads when a section heading exists.
15
19
  - `sprints/S0001/tasks.md`
16
20
  - `docs/product/acceptance.md`
17
21
  - `docs/engineering/architecture.md`
@@ -1,222 +1,226 @@
1
- ---
2
- description: "its-magic QA: test plan, findings, verify fixes."
3
- ---
4
-
5
- # /qa
6
-
7
- ## Subagents
8
- - qa
9
-
10
- ## Execution model
11
- - Run `/qa` in a fresh QA subagent context.
12
- - After writing outputs, stop and hand off to `/execute` (if issues) or
13
- `/verify-work` (if clear) in a new subagent/chat.
14
- - Each QA pass in the implementation loop must be a new QA subagent.
15
-
16
- ## Isolation evidence write requirement (US-0048 / DEC-0029)
17
-
18
- At the end of `/qa`, append an isolation evidence entry to
19
- `docs/engineering/state.md`:
20
-
21
- - `phase_id=qa`
22
- - `role=qa`
23
- - `fresh_context_marker=<new marker for this subagent>`
24
- - `timestamp=<ISO UTC>`
25
- - `evidence_ref=<primary output ref>` (recommended: `sprints/Sxxxx/qa-findings.md` and/or `handoffs/qa_to_dev.md`)
26
-
27
- In an execute↔QA implementation loop (`AUTO_IMPLEMENTATION_LOOP=1`), each new
28
- `/qa` cycle must have a new `fresh_context_marker` (marker reuse is treated as
29
- stale isolation evidence).
30
-
31
- ## Inputs
32
- - `handoffs/dev_to_qa.md`
33
- - `sprints/S0001/summary.md`
34
-
35
- ## Outputs (artifacts)
36
- - `sprints/S0001/qa-findings.md`
37
- - `handoffs/qa_to_dev.md` (if issues)
38
- - `docs/engineering/state.md`
39
-
40
- ## Stop conditions
41
- - Critical defects require decision
42
- - Missing test plan coverage
43
-
44
- ## Release gate prerequisite (US-0039)
45
-
46
- QA completion evidence is required before `/release` may proceed. Record findings in
47
- `sprints/Sxxxx/qa-findings.md`; unresolved blocking findings block release with
48
- `RELEASE_QA_BLOCKERS_OPEN`. When clear, handoff to `/verify-work` so release gate can
49
- verify no unresolved blockers.
50
-
51
- ## Self-verify UAT probes (US-0092 / DEC-0078)
52
-
53
- Share the **`scripts/uat_probe_lib.py`** resolver with **`/verify-work`**: derive
54
- acceptance steps, execute probes where stack profile resolves, record evidence in
55
- **`sprints/Sxxxx/uat.json`** `probe_results[]` and **`sprints/Sxxxx/qa-findings.md`**.
56
- Fail closed with **`UAT_PROBE_UNRESOLVED`** (not PASS) when no probe maps.
57
- Forbidden: auto-read **`.env`**, mutate intake evidence — **`UAT_PROBE_FORBIDDEN`**.
58
-
59
- Reason codes extend with **`UAT_BROWSER_UNAVAILABLE`**, **`UAT_BROWSER_PROBE_FAILED`**,
60
- **`UAT_BROWSER_PROBE_TIMEOUT`** (**US-0093** / **DEC-0079**).
61
-
62
- ### Browser UAT self-test (US-0093)
63
-
64
- When **`UAT_BROWSER_PROBE_MODE=cursor`** (default) and step classifies as **`browser_smoke`**
65
- (or automatable **`manual_operator`** reclassified per **DEC-0079** §4), execute the **Cursor
66
- browser MCP** sequence **lib never calls MCP directly** (**BUG-0006**):
67
-
68
- 1. **Resolve target URL** `docs/engineering/runtime-connectivity.md` first `http(s)://`; else
69
- dev-server port from `package.json` + scratchpad **`DEV_SERVER_PORT`**.
70
- 2. **`browser_navigate`**load health/app URL; respect enterprise origin allowlist.
71
- 3. **Step plan** — map acceptance verbs to **`browser_click`** / **`browser_type`** /
72
- **`browser_scroll`** when automatable; **never** fill password/credential fields or read **`.env`**.
73
- 4. **`browser_screenshot`** write to **`sprints/Sxxxx/evidence/browser/<probe_id>-<seq>.png`**
74
- (max **5** per probe).
75
- 5. **Console + network evidence** — counts + summary path refs only (no inline secrets).
76
- 6. **Verdict** set **`passed`**, **`reason_code`**, **`browser_evidence_refs`** in
77
- **`uat.json`** `probe_results[]`; **`passed=true`** in **`cursor`** mode **requires** non-empty
78
- **`navigation_url`** + at least one screenshot or console/network summary path — else
79
- **`UAT_BROWSER_PROBE_FAILED`**. Mirror under **`qa-findings.md`** **Runtime browser evidence**.
80
- 7. **Fallback** — MCP unavailable → record **`UAT_BROWSER_UNAVAILABLE`**, run stdlib fallback when
81
- **`UAT_BROWSER_FALLBACK_CHAIN=1`**; validate via
82
- **`python scripts/uat_probe_lib.py --merge-result <fragment.json>`**.
83
-
84
- **No silent PASS** — stdlib alone does **not** PASS **`browser_smoke`** in **`cursor`** mode
85
- without agent **`browser_evidence_refs`**. Security: no auto-read **`.env`**, no credential
86
- auto-fill, no intake evidence mutation — **`UAT_PROBE_FORBIDDEN`** unchanged.
87
-
88
- ## Steps
89
- 0. If `SECURITY_REVIEW=1`, verify `docs/engineering/security-review.md` exists
90
- and has no unresolved `critical` findings before proceeding. If unresolved
91
- critical findings exist, stop at a decision gate.
92
- 1. Define a test plan and run verification using the runbook commands
93
- (`TEST_COMMAND`, `LINT_COMMAND`, `TYPECHECK_COMMAND` in `docs/engineering/runbook.md`).
94
- - `TEST_COMMAND` is mandatory baseline evidence for push eligibility.
95
- - Optional checks run only when configured and should be reported as
96
- `pass|fail|skipped` deterministically.
97
- - **User-visible metadata guard (US-0071 / DEC-0053):** run
98
- `python scripts/check-user-visible-metadata.py` (see runbook). On failure,
99
- record blocking findings with reason `USER_VISIBLE_INTERNAL_METADATA_DETECTED`,
100
- cite `path:line:column` evidence, token class, and remediation per runbook.
101
- If the checker entrypoint is missing, fail closed with
102
- `METADATA_SANITIZATION_POLICY_MISSING`.
103
- 2. Record findings and severity.
104
- - Explicitly classify blockers that must prevent auto-push:
105
- unresolved blocking QA findings and unresolved critical issues.
106
- 3. Update state and handoff to dev if needed.
107
- - For sync-policy evidence, include deterministic `reason_code` guidance:
108
- - `PRE_QA_AUTOPUSH_FORBIDDEN` (feature work before QA completion)
109
- - `BLOCKING_QA_FINDINGS` (open blockers/criticals)
110
- - `SYNC_PUSHED` (eligible + checks passed + branch safe)
111
- 4. If `AUTO_IMPLEMENTATION_LOOP=1` and blocking issues exist, handoff to dev and
112
- return to `/execute` automatically (bounded by `AUTO_LOOP_MAX_CYCLES`).
113
- 5. Follow with `/verify-work` for user acceptance when blocking issues are closed.
114
- 6. If `AUTO_PAUSE_REQUEST=1` at safe boundary, run `/pause` before next phase.
115
- 7. Before pushing, suggest running `scripts/validate-and-push` to catch failures
116
- locally before they reach CI. If CI fails, the auto-fix job in
117
- `.github/workflows/ci.yml` attempts automatic lint/format fixes and retries.
118
- 8. Optional compatibility observability QA checks (US-0034):
119
- - If `CROSS_REPO_OBSERVABILITY=0`, add zero required compatibility overhead.
120
- - If `CROSS_REPO_OBSERVABILITY=1`, verify compatibility artifacts exist and
121
- are current (`docs/engineering/compatibility-signals.md`,
122
- `docs/engineering/compatibility-report.md`) with traceable references to
123
- story/sprint/task context.
124
- - If unresolved critical compatibility findings exist and
125
- `COMPATIBILITY_GATE_ON_CRITICAL=1`, mark as release-blocking and require
126
- decision gate before `/release`.
127
- 9. Optional component-scope protection checks (US-0035):
128
- - If `COMPONENT_SCOPE_MODE=0`, add zero required protection overhead.
129
- - If `COMPONENT_SCOPE_MODE=1`, verify unaffected-component protection checks
130
- for declared `non_target_components` and record evidence in
131
- `docs/engineering/component-scope-report.md`.
132
- - If unapproved out-of-scope impact is detected, mark as blocking and require
133
- decision gate before `/release`.
134
- 10. Optional spec-pack verification (US-0031):
135
- - If `SPEC_PACK_MODE=0`, add no required spec-pack checks (zero overhead).
136
- - If `SPEC_PACK_MODE=1`, verify target-story spec-pack artifacts exist and
137
- required sections are populated; report gaps in qa-findings; see runbook
138
- for minimum sections and traceability.
139
- 11. Optional user-guide verification (US-0032):
140
- - If `USER_GUIDE_MODE=0`, add no required user-guide checks or blocking (zero overhead).
141
- - If `USER_GUIDE_MODE=1`, verify target-story user guide exists at
142
- `docs/user-guides/US-xxxx.md` and required sections are present; report
143
- gaps in qa-findings; see runbook for minimum schema.
144
- 12. Optional remote runtime QA/debug contract (US-0064):
145
- - When remote runtime metadata exists in
146
- `docs/engineering/release-targets.json` for active target context,
147
- validate remote endpoint reachability/debug evidence per configured
148
- `runtime.mode`.
149
- - Include local vs remote QA context and sanitized endpoint details in
150
- `sprints/Sxxxx/qa-findings.md`.
151
- - If remote connectivity config is incomplete for required remote checks,
152
- mark blocking with deterministic reason code
153
- `REMOTE_CONNECTIVITY_CONFIG_INVALID`.
154
- - **US-0084**: when `REMOTE_EXECUTION=1`, expect **`handoffs/dev_to_qa.md`**
155
- to carry an **environment label** (`WSL`, `ssh:<hostEnv>`, `dockerOverSsh`, …)
156
- and **test locus** (local vs remote); reject evidence that pastes secret
157
- values (keys/passwords) — **names-only** refs align with
158
- `python scripts/remote_config_summary.py` output.
159
- 13. Runtime QA autopilot contract (US-0065 / DEC-0047):
160
- - Runtime truth path is mandatory for generated-project QA:
161
- `startup -> readiness/connectivity -> log scan -> bounded retry -> verdict`.
162
- - PASS requires runtime startup and endpoint/process reachability evidence.
163
- - Deterministic failure outcomes:
164
- - startup command/process fails: `RUNTIME_STARTUP_FAILED`
165
- - endpoint/process unreachable after retries:
166
- `RUNTIME_ENDPOINT_UNREACHABLE`
167
- - critical runtime log signals detected:
168
- `RUNTIME_LOG_CRITICAL_DETECTED`
169
- - retry budget exhausted without recovery:
170
- `RUNTIME_RETRY_BUDGET_EXHAUSTED`
171
- - stack profile unresolved for runtime checks:
172
- `RUNTIME_STACK_PROFILE_UNRESOLVED`
173
- - Runtime profile resolution must be stack-aware for:
174
- `node|python|go|java|dotnet` at minimum.
175
- - Unknown/ambiguous stacks must fail closed with
176
- `RUNTIME_STACK_PROFILE_UNRESOLVED` (no silent generic PASS fallback).
177
- - Bounded retry loop requirements:
178
- - retry only transient startup/connectivity failures,
179
- - enforce configured attempt cap (`attempt <= max`),
180
- - write per-attempt ledger evidence (`attempt`, `delay_ms`, `outcome`),
181
- - stop retrying on non-transient critical log failures.
182
- - Required QA runtime evidence schema fields in `sprints/Sxxxx/qa-findings.md`:
183
- - `runtime_startup_command`
184
- - `runtime_stack_profile`
185
- - `runtime_mode` (`local|remote`)
186
- - `runtime_health_target` (process/endpoint)
187
- - `runtime_health_result`
188
- - `runtime_log_summary` (severity counts + key signals)
189
- - `runtime_retry_count`
190
- - `runtime_retry_ledger`
191
- - `runtime_final_verdict` (`pass|fail`)
192
- - `runtime_reason_code`
193
- - `runtime_evidence_refs`
194
- - Webapp runtime verification path (when applicable):
195
- - run browser-surface check for expected app load path,
196
- - capture console error summary and failed network request summary,
197
- - include results in runtime evidence fields.
198
- - Optional debug escalation path:
199
- - use only for reproducible runtime failures,
200
- - keep instrumentation bounded and reversible,
201
- - record debug actions/evidence and cleanup confirmation.
202
- 14. Generated baseline test auto-run contract (US-0066 / DEC-0048):
203
- - For generated-project QA scope, run baseline tests automatically using the
204
- resolved `TEST_COMMAND`; do not treat baseline tests as optional.
205
- - Deterministic generated-test evidence fields in `sprints/Sxxxx/qa-findings.md`:
206
- - `generated_test_stack_profile`
207
- - `generated_test_command`
208
- - `generated_test_result` (`pass|fail`)
209
- - `generated_test_output_ref`
210
- - `generated_test_paths_ref`
211
- - `generated_test_reason_code`
212
- - Deterministic scaffold failure outcomes:
213
- - unresolved profile: `TEST_SCAFFOLD_STACK_UNRESOLVED`
214
- - unsupported profile: `TEST_SCAFFOLD_UNSUPPORTED_STACK`
215
- - generation/run failure: `TEST_SCAFFOLD_GENERATION_FAILED`
216
- - Non-destructive baseline guardrails:
217
- - preserve user-authored tests/config/commands,
218
- - validate generated scaffold behavior as fill-missing/idempotent only.
219
- - Runtime integration boundary:
220
- - generated-test PASS does not override runtime-autopilot failures from
221
- `US-0065`; non-starting apps cannot PASS QA.
222
-
1
+ ---
2
+ description: "its-magic QA: test plan, findings, verify fixes."
3
+ ---
4
+
5
+ # /qa
6
+
7
+ ## Subagents
8
+ - qa
9
+
10
+ ## Execution model
11
+ - Run `/qa` in a fresh QA subagent context.
12
+ - After writing outputs, stop and hand off to `/execute` (if issues) or
13
+ `/verify-work` (if clear) in a new subagent/chat.
14
+ - Each QA pass in the implementation loop must be a new QA subagent.
15
+
16
+ ## Isolation evidence write requirement (US-0048 / DEC-0029)
17
+
18
+ At the end of `/qa`, append an isolation evidence entry to
19
+ `docs/engineering/state.md`:
20
+
21
+ - `phase_id=qa`
22
+ - `role=qa`
23
+ - `fresh_context_marker=<new marker for this subagent>`
24
+ - `timestamp=<ISO UTC>`
25
+ - `evidence_ref=<primary output ref>` (recommended: `sprints/Sxxxx/qa-findings.md` and/or `handoffs/qa_to_dev.md`)
26
+
27
+ In an execute↔QA implementation loop (`AUTO_IMPLEMENTATION_LOOP=1`), each new
28
+ `/qa` cycle must have a new `fresh_context_marker` (marker reuse is treated as
29
+ stale isolation evidence).
30
+
31
+ ## Inputs
32
+
33
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
34
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
35
+ full-file reads when a section heading exists.
36
+ - `handoffs/dev_to_qa.md`
37
+ - `sprints/S0001/summary.md`
38
+
39
+ ## Outputs (artifacts)
40
+ - `sprints/S0001/qa-findings.md`
41
+ - `handoffs/qa_to_dev.md` (if issues)
42
+ - `docs/engineering/state.md`
43
+
44
+ ## Stop conditions
45
+ - Critical defects require decision
46
+ - Missing test plan coverage
47
+
48
+ ## Release gate prerequisite (US-0039)
49
+
50
+ QA completion evidence is required before `/release` may proceed. Record findings in
51
+ `sprints/Sxxxx/qa-findings.md`; unresolved blocking findings block release with
52
+ `RELEASE_QA_BLOCKERS_OPEN`. When clear, handoff to `/verify-work` so release gate can
53
+ verify no unresolved blockers.
54
+
55
+ ## Self-verify UAT probes (US-0092 / DEC-0078)
56
+
57
+ Share the **`scripts/uat_probe_lib.py`** resolver with **`/verify-work`**: derive
58
+ acceptance steps, execute probes where stack profile resolves, record evidence in
59
+ **`sprints/Sxxxx/uat.json`** `probe_results[]` and **`sprints/Sxxxx/qa-findings.md`**.
60
+ Fail closed with **`UAT_PROBE_UNRESOLVED`** (not PASS) when no probe maps.
61
+ Forbidden: auto-read **`.env`**, mutate intake evidence — **`UAT_PROBE_FORBIDDEN`**.
62
+
63
+ Reason codes extend with **`UAT_BROWSER_UNAVAILABLE`**, **`UAT_BROWSER_PROBE_FAILED`**,
64
+ **`UAT_BROWSER_PROBE_TIMEOUT`** (**US-0093** / **DEC-0079**).
65
+
66
+ ### Browser UAT self-test (US-0093)
67
+
68
+ When **`UAT_BROWSER_PROBE_MODE=cursor`** (default) and step classifies as **`browser_smoke`**
69
+ (or automatable **`manual_operator`** reclassified per **DEC-0079** §4), execute the **Cursor
70
+ browser MCP** sequence **lib never calls MCP directly** (**BUG-0006**):
71
+
72
+ 1. **Resolve target URL** `docs/engineering/runtime-connectivity.md` first `http(s)://`; else
73
+ dev-server port from `package.json` + scratchpad **`DEV_SERVER_PORT`**.
74
+ 2. **`browser_navigate`** load health/app URL; respect enterprise origin allowlist.
75
+ 3. **Step plan** — map acceptance verbs to **`browser_click`** / **`browser_type`** /
76
+ **`browser_scroll`** when automatable; **never** fill password/credential fields or read **`.env`**.
77
+ 4. **`browser_screenshot`** write to **`sprints/Sxxxx/evidence/browser/<probe_id>-<seq>.png`**
78
+ (max **5** per probe).
79
+ 5. **Console + network evidence** counts + summary path refs only (no inline secrets).
80
+ 6. **Verdict** — set **`passed`**, **`reason_code`**, **`browser_evidence_refs`** in
81
+ **`uat.json`** `probe_results[]`; **`passed=true`** in **`cursor`** mode **requires** non-empty
82
+ **`navigation_url`** + at least one screenshot or console/network summary path — else
83
+ **`UAT_BROWSER_PROBE_FAILED`**. Mirror under **`qa-findings.md`** **Runtime browser evidence**.
84
+ 7. **Fallback**MCP unavailable record **`UAT_BROWSER_UNAVAILABLE`**, run stdlib fallback when
85
+ **`UAT_BROWSER_FALLBACK_CHAIN=1`**; validate via
86
+ **`python scripts/uat_probe_lib.py --merge-result <fragment.json>`**.
87
+
88
+ **No silent PASS** — stdlib alone does **not** PASS **`browser_smoke`** in **`cursor`** mode
89
+ without agent **`browser_evidence_refs`**. Security: no auto-read **`.env`**, no credential
90
+ auto-fill, no intake evidence mutation **`UAT_PROBE_FORBIDDEN`** unchanged.
91
+
92
+ ## Steps
93
+ 0. If `SECURITY_REVIEW=1`, verify `docs/engineering/security-review.md` exists
94
+ and has no unresolved `critical` findings before proceeding. If unresolved
95
+ critical findings exist, stop at a decision gate.
96
+ 1. Define a test plan and run verification using the runbook commands
97
+ (`TEST_COMMAND`, `LINT_COMMAND`, `TYPECHECK_COMMAND` in `docs/engineering/runbook.md`).
98
+ - `TEST_COMMAND` is mandatory baseline evidence for push eligibility.
99
+ - Optional checks run only when configured and should be reported as
100
+ `pass|fail|skipped` deterministically.
101
+ - **User-visible metadata guard (US-0071 / DEC-0053):** run
102
+ `python scripts/check-user-visible-metadata.py` (see runbook). On failure,
103
+ record blocking findings with reason `USER_VISIBLE_INTERNAL_METADATA_DETECTED`,
104
+ cite `path:line:column` evidence, token class, and remediation per runbook.
105
+ If the checker entrypoint is missing, fail closed with
106
+ `METADATA_SANITIZATION_POLICY_MISSING`.
107
+ 2. Record findings and severity.
108
+ - Explicitly classify blockers that must prevent auto-push:
109
+ unresolved blocking QA findings and unresolved critical issues.
110
+ 3. Update state and handoff to dev if needed.
111
+ - For sync-policy evidence, include deterministic `reason_code` guidance:
112
+ - `PRE_QA_AUTOPUSH_FORBIDDEN` (feature work before QA completion)
113
+ - `BLOCKING_QA_FINDINGS` (open blockers/criticals)
114
+ - `SYNC_PUSHED` (eligible + checks passed + branch safe)
115
+ 4. If `AUTO_IMPLEMENTATION_LOOP=1` and blocking issues exist, handoff to dev and
116
+ return to `/execute` automatically (bounded by `AUTO_LOOP_MAX_CYCLES`).
117
+ 5. Follow with `/verify-work` for user acceptance when blocking issues are closed.
118
+ 6. If `AUTO_PAUSE_REQUEST=1` at safe boundary, run `/pause` before next phase.
119
+ 7. Before pushing, suggest running `scripts/validate-and-push` to catch failures
120
+ locally before they reach CI. If CI fails, the auto-fix job in
121
+ `.github/workflows/ci.yml` attempts automatic lint/format fixes and retries.
122
+ 8. Optional compatibility observability QA checks (US-0034):
123
+ - If `CROSS_REPO_OBSERVABILITY=0`, add zero required compatibility overhead.
124
+ - If `CROSS_REPO_OBSERVABILITY=1`, verify compatibility artifacts exist and
125
+ are current (`docs/engineering/compatibility-signals.md`,
126
+ `docs/engineering/compatibility-report.md`) with traceable references to
127
+ story/sprint/task context.
128
+ - If unresolved critical compatibility findings exist and
129
+ `COMPATIBILITY_GATE_ON_CRITICAL=1`, mark as release-blocking and require
130
+ decision gate before `/release`.
131
+ 9. Optional component-scope protection checks (US-0035):
132
+ - If `COMPONENT_SCOPE_MODE=0`, add zero required protection overhead.
133
+ - If `COMPONENT_SCOPE_MODE=1`, verify unaffected-component protection checks
134
+ for declared `non_target_components` and record evidence in
135
+ `docs/engineering/component-scope-report.md`.
136
+ - If unapproved out-of-scope impact is detected, mark as blocking and require
137
+ decision gate before `/release`.
138
+ 10. Optional spec-pack verification (US-0031):
139
+ - If `SPEC_PACK_MODE=0`, add no required spec-pack checks (zero overhead).
140
+ - If `SPEC_PACK_MODE=1`, verify target-story spec-pack artifacts exist and
141
+ required sections are populated; report gaps in qa-findings; see runbook
142
+ for minimum sections and traceability.
143
+ 11. Optional user-guide verification (US-0032):
144
+ - If `USER_GUIDE_MODE=0`, add no required user-guide checks or blocking (zero overhead).
145
+ - If `USER_GUIDE_MODE=1`, verify target-story user guide exists at
146
+ `docs/user-guides/US-xxxx.md` and required sections are present; report
147
+ gaps in qa-findings; see runbook for minimum schema.
148
+ 12. Optional remote runtime QA/debug contract (US-0064):
149
+ - When remote runtime metadata exists in
150
+ `docs/engineering/release-targets.json` for active target context,
151
+ validate remote endpoint reachability/debug evidence per configured
152
+ `runtime.mode`.
153
+ - Include local vs remote QA context and sanitized endpoint details in
154
+ `sprints/Sxxxx/qa-findings.md`.
155
+ - If remote connectivity config is incomplete for required remote checks,
156
+ mark blocking with deterministic reason code
157
+ `REMOTE_CONNECTIVITY_CONFIG_INVALID`.
158
+ - **US-0084**: when `REMOTE_EXECUTION=1`, expect **`handoffs/dev_to_qa.md`**
159
+ to carry an **environment label** (`WSL`, `ssh:<hostEnv>`, `dockerOverSsh`, …)
160
+ and **test locus** (local vs remote); reject evidence that pastes secret
161
+ values (keys/passwords) **names-only** refs align with
162
+ `python scripts/remote_config_summary.py` output.
163
+ 13. Runtime QA autopilot contract (US-0065 / DEC-0047):
164
+ - Runtime truth path is mandatory for generated-project QA:
165
+ `startup -> readiness/connectivity -> log scan -> bounded retry -> verdict`.
166
+ - PASS requires runtime startup and endpoint/process reachability evidence.
167
+ - Deterministic failure outcomes:
168
+ - startup command/process fails: `RUNTIME_STARTUP_FAILED`
169
+ - endpoint/process unreachable after retries:
170
+ `RUNTIME_ENDPOINT_UNREACHABLE`
171
+ - critical runtime log signals detected:
172
+ `RUNTIME_LOG_CRITICAL_DETECTED`
173
+ - retry budget exhausted without recovery:
174
+ `RUNTIME_RETRY_BUDGET_EXHAUSTED`
175
+ - stack profile unresolved for runtime checks:
176
+ `RUNTIME_STACK_PROFILE_UNRESOLVED`
177
+ - Runtime profile resolution must be stack-aware for:
178
+ `node|python|go|java|dotnet` at minimum.
179
+ - Unknown/ambiguous stacks must fail closed with
180
+ `RUNTIME_STACK_PROFILE_UNRESOLVED` (no silent generic PASS fallback).
181
+ - Bounded retry loop requirements:
182
+ - retry only transient startup/connectivity failures,
183
+ - enforce configured attempt cap (`attempt <= max`),
184
+ - write per-attempt ledger evidence (`attempt`, `delay_ms`, `outcome`),
185
+ - stop retrying on non-transient critical log failures.
186
+ - Required QA runtime evidence schema fields in `sprints/Sxxxx/qa-findings.md`:
187
+ - `runtime_startup_command`
188
+ - `runtime_stack_profile`
189
+ - `runtime_mode` (`local|remote`)
190
+ - `runtime_health_target` (process/endpoint)
191
+ - `runtime_health_result`
192
+ - `runtime_log_summary` (severity counts + key signals)
193
+ - `runtime_retry_count`
194
+ - `runtime_retry_ledger`
195
+ - `runtime_final_verdict` (`pass|fail`)
196
+ - `runtime_reason_code`
197
+ - `runtime_evidence_refs`
198
+ - Webapp runtime verification path (when applicable):
199
+ - run browser-surface check for expected app load path,
200
+ - capture console error summary and failed network request summary,
201
+ - include results in runtime evidence fields.
202
+ - Optional debug escalation path:
203
+ - use only for reproducible runtime failures,
204
+ - keep instrumentation bounded and reversible,
205
+ - record debug actions/evidence and cleanup confirmation.
206
+ 14. Generated baseline test auto-run contract (US-0066 / DEC-0048):
207
+ - For generated-project QA scope, run baseline tests automatically using the
208
+ resolved `TEST_COMMAND`; do not treat baseline tests as optional.
209
+ - Deterministic generated-test evidence fields in `sprints/Sxxxx/qa-findings.md`:
210
+ - `generated_test_stack_profile`
211
+ - `generated_test_command`
212
+ - `generated_test_result` (`pass|fail`)
213
+ - `generated_test_output_ref`
214
+ - `generated_test_paths_ref`
215
+ - `generated_test_reason_code`
216
+ - Deterministic scaffold failure outcomes:
217
+ - unresolved profile: `TEST_SCAFFOLD_STACK_UNRESOLVED`
218
+ - unsupported profile: `TEST_SCAFFOLD_UNSUPPORTED_STACK`
219
+ - generation/run failure: `TEST_SCAFFOLD_GENERATION_FAILED`
220
+ - Non-destructive baseline guardrails:
221
+ - preserve user-authored tests/config/commands,
222
+ - validate generated scaffold behavior as fill-missing/idempotent only.
223
+ - Runtime integration boundary:
224
+ - generated-test PASS does not override runtime-autopilot failures from
225
+ `US-0065`; non-starting apps cannot PASS QA.
226
+
@@ -13,6 +13,19 @@ description: "its-magic quick: execute a small task without full planning."
13
13
 
14
14
  ## Inputs
15
15
  - Task description
16
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at `docs/engineering/phase-context.md`
17
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
18
+ full-file reads when a section heading exists.
19
+
20
+ ## `/auto` routing (US-0096 / DEC-0082)
21
+
22
+ When **`DELIVERY_MODE=mega_quick`** and eligibility passes, **`/auto`** materializes this
23
+ command only (`resolved_phase_plan = ["quick"]`). See **`.cursor/commands/auto.md`** §
24
+ **`mega_quick` routing** for seven **`MEGA_QUICK_*`** fail-closed codes and
25
+ **`DELIVERY_MODE_INELIGIBLE`** handling.
26
+
27
+ Artifacts under **`sprints/quick/Qxxxx/`**: **`task.json`** + **`summary.md`**. Second spawn
28
+ only on test failure. Closure requires **`acceptance_met: true`** + green tests.
16
29
 
17
30
  ## Outputs (artifacts)
18
31
  - `sprints/quick/Q0001/task.json`
@@ -12,6 +12,10 @@ description: "its-magic refresh context: compact state and decisions."
12
12
  - After writing outputs, stop. Next phase starts in a new subagent/chat.
13
13
 
14
14
  ## Inputs
15
+
16
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
17
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
18
+ full-file reads when a section heading exists.
15
19
  - Current sprint artifacts
16
20
  - Decisions and handoffs
17
21