@haposoft/cafekit 0.8.10 → 0.8.12

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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: hapo:develop
3
- description: "Code execution engine: Reads specs and implements code end-to-end with automatic code review and self-healing."
4
- argument-hint: "[feature-name|specs-directory-path]"
3
+ description: "Code execution engine: Reads specs and implements code end-to-end with automatic code review, self-healing, and visual implementation notes."
4
+ argument-hint: "[feature-name|specs-directory-path] [task-file] [--flash] [--no-notes]"
5
5
  ---
6
6
 
7
7
  # Develop — Feature Implementation (Task-Orchestrated Build)
@@ -16,6 +16,9 @@ Reads the project specification (`hapo:specs`) and implements code through a dis
16
16
  /hapo:develop <feature name>
17
17
  /hapo:develop specs/<feature-name>
18
18
  /hapo:develop <feature name> <specific-task-file.md>
19
+ /hapo:develop <feature name> --flash
20
+ /hapo:develop <feature name> <specific-task-file.md> --flash
21
+ /hapo:develop <feature name> --no-notes
19
22
  ```
20
23
 
21
24
  ## Execution Modes
@@ -25,7 +28,7 @@ Triggered by `/hapo:develop <feature> <task-file>`.
25
28
 
26
29
  - Load exactly one task file.
27
30
  - Implement only that task packet.
28
- - STOP immediately after the task is verified and synchronized.
31
+ - STOP immediately after the task is verified and synchronized, or flash-synchronized when `--flash` is active.
29
32
  - Never auto-chain into the next task.
30
33
 
31
34
  ### 2. Full-Spec Mode
@@ -37,6 +40,28 @@ Triggered by `/hapo:develop <feature>` or `/hapo:develop specs/<feature>`.
37
40
  - Sync state.
38
41
  - Recompute the queue and continue.
39
42
  - STOP the overall run on the first blocked task, unresolved gate failure, or missing proof.
43
+ - In `--flash` mode, missing full test proof does not stop the loop; record `FLASH_UNVERIFIED` and continue to the next unblocked task.
44
+
45
+ ### 3. Flash Mode
46
+ Triggered by adding `--flash` to either specific-task or full-spec mode.
47
+
48
+ - Optimize for fast implementation, not full verification.
49
+ - Still load the approved spec, scout every task, obey scope, and implement real code.
50
+ - Skip dedicated test suites, E2E/browser/manual QA loops, full task evidence execution, and code-review retry loops.
51
+ - Run only cheap preflight checks when available and fast: syntax, typecheck, or build commands that do not require installing dependencies or starting external services.
52
+ - Never weaken, delete, or rewrite tests to avoid running them.
53
+ - Sync completed implementation with an explicit `FLASH_UNVERIFIED` receipt; do not claim production-ready quality.
54
+ - Final output MUST recommend `/hapo:test <feature>` before merge, release, or publish.
55
+
56
+ ### 4. Implementation Notes
57
+ Enabled by default for all develop modes. Disable only with `--no-notes`.
58
+
59
+ - Maintain `specs/<feature-name>/implementation-notes.html`.
60
+ - Use `references/implementation-notes-template.html` when the file does not exist.
61
+ - Keep the file self-contained: inline CSS, no JS, no external fonts, no network assets.
62
+ - Style notes as readable Claude Code-like blocks: compact cards, left accent bars, category badges, monospace file paths, and a task timeline.
63
+ - Record decisions and caveats while implementing, not only at the end.
64
+ - Do not use notes to justify scope changes that alter the approved contract. If the contract changes, stop and route back to `/hapo:specs update`.
40
65
 
41
66
  <HARD-GATE>
42
67
  DO NOT write implementation code until an approved spec exists.
@@ -46,6 +71,7 @@ DO NOT write implementation code until an approved spec exists.
46
71
  <DEFINITION-OF-DONE>
47
72
  A task is NOT done because code compiles or a placeholder renders.
48
73
  A task is done only when the task file's Completion Criteria AND Evidence section are satisfied with real execution proof. Existing specs may use `Task Test Plan & Verification Evidence` or legacy `Verification & Evidence`; treat those as the same contract.
74
+ `--flash` is the only exception: it records fast implementation closeout with `FLASH_UNVERIFIED`, not full Definition of Done.
49
75
  </DEFINITION-OF-DONE>
50
76
 
51
77
  <CONTRACT-FIDELITY>
@@ -73,9 +99,13 @@ flowchart TD
73
99
  B -->|Missing| Z[Stop: Run /hapo:specs]
74
100
  B -->|Ready| C[Step 2: Task-Aware Scout (inspector)]
75
101
  C --> D[Step 3: Implement Code (god-developer)]
76
- D --> E[Step 4: Quality Gate: Test + Spec Review + Code Review + Evidence]
77
- E -->|Fail| D
78
- E -->|Pass| F[Step 5: State Sync + Incremental Docs Sync]
102
+ D --> E{Flash Mode?}
103
+ E -->|No| Q[Step 4: Quality Gate: Test + Spec Review + Code Review + Evidence]
104
+ E -->|Yes| R[Step 4F: Flash Gate: Minimal Preflight + Scope Sanity]
105
+ Q -->|Fail| D
106
+ Q -->|Pass| F[Step 5: State Sync + Incremental Docs Sync]
107
+ R -->|Syntax/compile fail| D
108
+ R -->|Flash closeout| F
79
109
  F --> H{More tasks?}
80
110
  H -->|Yes| B
81
111
  H -->|No| G[Final Integration Scout + Report Completion]
@@ -85,6 +115,10 @@ flowchart TD
85
115
  - Identify input: Open `specs/<feature-name>/spec.json`.
86
116
  - Check `ready_for_implementation` status. If not ready, notify user.
87
117
  - Load `task_registry` and verify it matches the requested task file(s). If registry is missing or stale, route to `/hapo:sync audit <feature>` before coding.
118
+ - Unless `--no-notes` is present, initialize or update `specs/<feature-name>/implementation-notes.html`:
119
+ - If missing, create it from `references/implementation-notes-template.html`.
120
+ - Replace template placeholders for feature name, spec path, creation timestamp, and current mode.
121
+ - If present, preserve existing note cards and update the summary/timeline/status fields.
88
122
  - **Task Scoping (CRITICAL):**
89
123
  - If the user specifies a particular task file (e.g., `task-R0-02...md`), load **ONLY** that specific file into working memory.
90
124
  - If no specific task is mentioned, DO NOT load all tasks into working memory. Resolve the next single unblocked `pending` task from `task_registry` and load only that task packet.
@@ -121,6 +155,14 @@ flowchart TD
121
155
  - Act as `god-developer` OR directly write code, executing tasks specified in the loaded Markdown file(s) sequentially.
122
156
  - **Important:** You may create and modify files directly, but must faithfully follow the design from the Spec.
123
157
  - You MUST use the Step 2 scout report as implementation context. If code reality contradicts the task packet, stop and reconcile the spec before coding.
158
+ - Unless `--no-notes` is present, append a note card to `implementation-notes.html` whenever any of these occurs:
159
+ - `decision`: a necessary implementation choice not specified by the spec
160
+ - `spec-gap`: missing or ambiguous spec detail discovered during implementation
161
+ - `codebase-reality`: existing code requires a different integration path than the task implied
162
+ - `tradeoff`: a conscious simplicity, performance, UX, or maintainability tradeoff
163
+ - `scope-escape`: a file or behavior outside Related Files must be touched for reachability/compile/integration
164
+ - `risk`: known residual risk, edge case, or deferred follow-up
165
+ - `verification`: command result, skipped check, manual proof, or evidence caveat
124
166
  - Progress tracking: Temporarily change `[ ]` to `[/]` in Spec files while coding is in progress. Do NOT mark `[x]` before Step 4 passes.
125
167
  - **Task Boundary Protocol (CRITICAL):**
126
168
  - Default editable scope is `Related Files` from the task packet.
@@ -141,6 +183,8 @@ flowchart TD
141
183
  The moment you finish coding, DO NOT proceed further. Switch to `references/quality-gate.md` and run the automatic review loop.
142
184
  **Mantra:** Scope/spec compliance first, code quality second. All feedback from code-auditor must be addressed thoroughly: Score >= 9.5 & Zero Critical issues.
143
185
 
186
+ If `--flash` is active, use **Step 4F: Flash Gate** instead of the full automatic review loop.
187
+
144
188
  - Passing Step 4 requires ALL of the following:
145
189
  1. Automated verification passes, including preflight compile/typecheck/build health and every exact command named in the task's `Evidence` section (or `Task Test Plan & Verification Evidence` / legacy `Verification & Evidence`)
146
190
  2. Spec compliance review passes: every scoped requirement and active task criterion is implemented, with no extras and no omissions
@@ -153,8 +197,28 @@ The moment you finish coding, DO NOT proceed further. Switch to `references/qual
153
197
  - If the implementation silently replaced a named contract choice or relies on cross-service process-local stand-ins, the task is still FAIL.
154
198
  - Only escalate to the user after 3 consecutive failed review rounds.
155
199
 
200
+ ### Step 4F: Flash Gate (`--flash` only)
201
+ Flash mode is an explicit speed trade-off requested by the user.
202
+
203
+ - Skip:
204
+ - dedicated test commands from task Evidence
205
+ - full test-runner delegation
206
+ - E2E/browser/manual QA loops
207
+ - full code-auditor retry loop
208
+ - screenshot, accessibility, performance, and visual verification unless the active task is purely visual and can be checked cheaply
209
+ - Still perform:
210
+ - task-aware scout from Step 2
211
+ - active task scope sanity check against Completion Criteria
212
+ - reachability sanity check for runtime-facing files: imported, mounted, registered, routed, or invoked where applicable
213
+ - cheap compile/syntax/typecheck/build command when it is already available and expected to run quickly
214
+ - If the cheap preflight fails, return to Step 3 and fix before syncing.
215
+ - If no cheap preflight exists or it would require slow setup/external services, record `Preflight: skipped in --flash mode`.
216
+ - Flash output MUST log: `⚡ Step 4 Flash Gate: tests skipped by --flash; preflight=<pass|skipped>; evidence=FLASH_UNVERIFIED`.
217
+ - Flash output MUST NOT say `Test PASS`, `Evidence PASS`, `Auto-Approved`, or `production-ready`.
218
+
156
219
  ### Step 5: State Sync + Task-Level Docs Sync
157
220
  - Only after Step 4 passes may you mark task checkboxes completed and sync `spec.json` progress/timestamps/task_registry.
221
+ - In `--flash` mode, Step 4F may sync the task only as a fast implementation closeout with an explicit `FLASH_UNVERIFIED` receipt.
158
222
  - If verification is partial or blocked by environment, keep the task in `pending` or `in_progress` and record the blocker instead of pretending completion.
159
223
  - A completed task MUST leave behind:
160
224
  - markdown `**Status:** done`
@@ -162,7 +226,14 @@ The moment you finish coding, DO NOT proceed further. Switch to `references/qual
162
226
  - `completed_at` + `last_updated_at`
163
227
  - synchronized top-level `updated_at`
164
228
  - a human-readable verification receipt inside the task's `Evidence` section showing which commands ran, their outcomes, and what proof was observed
229
+ - In `--flash` mode, the receipt MUST include `Mode: --flash`, `Tests: skipped by user request`, `Evidence: FLASH_UNVERIFIED`, and `Next verification: /hapo:test <feature>`.
165
230
  - Verification receipts with `PRECHECK_FAIL`, `FAIL`, `UNVERIFIED`, or an explicit note that the implementation intentionally simplified a named contract MUST NOT be synchronized as `done`.
231
+ - Exception: `FLASH_UNVERIFIED` is allowed only when `--flash` is explicitly present. It records fast implementation completion, not full verification completion.
232
+ - Unless `--no-notes` is present, update `implementation-notes.html` before reporting the task:
233
+ - Mark the task block as `done`, `blocked`, or `flash_unverified`.
234
+ - Add a `verification` note with exact commands run or `Tests skipped by --flash`.
235
+ - If no implementation note was needed for the task, add a compact `decision` note: `No spec gaps, tradeoffs, scope escapes, or deferred risks recorded for this task.`
236
+ - Add `Next verification: /hapo:test <feature>` when any evidence is skipped, partial, or `FLASH_UNVERIFIED`.
166
237
  - After syncing the active task, run a **Task Closeout Docs Checkpoint**
167
238
  - Task Closeout Docs Checkpoint:
168
239
  - Evaluate `Docs impact: none | minor | major` based on real behavior changes from the just-completed task
@@ -183,3 +254,4 @@ The moment you finish coding, DO NOT proceed further. Switch to `references/qual
183
254
  ## Attached References
184
255
  - `references/quality-gate.md` - Rules for the Code Review loop.
185
256
  - `references/subagent-patterns.md` - Standard prompts for calling subagents.
257
+ - `references/implementation-notes-template.html` - Self-contained visual implementation notes template.
@@ -0,0 +1,320 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Implementation Notes - {{FEATURE_NAME}}</title>
7
+ <style>
8
+ :root {
9
+ color-scheme: light;
10
+ --bg: #f7faf9;
11
+ --panel: #ffffff;
12
+ --ink: #17211d;
13
+ --muted: #63736d;
14
+ --line: #dfe8e4;
15
+ --soft: #eef7f3;
16
+ --brand: #087a5a;
17
+ --brand-2: #0ea5a0;
18
+ --decision: #0f766e;
19
+ --spec-gap: #b45309;
20
+ --tradeoff: #7c3aed;
21
+ --scope: #be123c;
22
+ --risk: #dc2626;
23
+ --verify: #2563eb;
24
+ --codebase: #475569;
25
+ --flash: #c2410c;
26
+ --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
27
+ }
28
+
29
+ * { box-sizing: border-box; }
30
+
31
+ body {
32
+ margin: 0;
33
+ background:
34
+ radial-gradient(circle at top left, rgba(14, 165, 160, 0.16), transparent 34rem),
35
+ linear-gradient(180deg, #f8fffd 0%, var(--bg) 34%, #eef7f3 100%);
36
+ color: var(--ink);
37
+ font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
38
+ line-height: 1.55;
39
+ }
40
+
41
+ main {
42
+ width: min(1120px, calc(100% - 32px));
43
+ margin: 0 auto;
44
+ padding: 32px 0 56px;
45
+ }
46
+
47
+ .hero {
48
+ border: 1px solid var(--line);
49
+ border-radius: 16px;
50
+ background: rgba(255, 255, 255, 0.9);
51
+ box-shadow: var(--shadow);
52
+ padding: 28px;
53
+ display: grid;
54
+ gap: 18px;
55
+ }
56
+
57
+ .eyebrow {
58
+ color: var(--brand);
59
+ font-size: 12px;
60
+ font-weight: 760;
61
+ letter-spacing: 0.08em;
62
+ text-transform: uppercase;
63
+ }
64
+
65
+ h1, h2, h3 { margin: 0; line-height: 1.15; }
66
+ h1 { font-size: clamp(30px, 5vw, 52px); letter-spacing: 0; }
67
+ h2 { font-size: 22px; }
68
+ h3 { font-size: 16px; }
69
+
70
+ .summary {
71
+ display: grid;
72
+ grid-template-columns: repeat(4, minmax(0, 1fr));
73
+ gap: 12px;
74
+ }
75
+
76
+ .metric {
77
+ border: 1px solid var(--line);
78
+ border-radius: 12px;
79
+ background: var(--soft);
80
+ padding: 12px 14px;
81
+ min-height: 76px;
82
+ }
83
+
84
+ .metric span {
85
+ display: block;
86
+ color: var(--muted);
87
+ font-size: 12px;
88
+ margin-bottom: 6px;
89
+ }
90
+
91
+ .metric strong {
92
+ display: block;
93
+ font-size: 15px;
94
+ overflow-wrap: anywhere;
95
+ }
96
+
97
+ .layout {
98
+ display: grid;
99
+ grid-template-columns: 280px minmax(0, 1fr);
100
+ gap: 20px;
101
+ margin-top: 20px;
102
+ align-items: start;
103
+ }
104
+
105
+ aside, .content-panel {
106
+ border: 1px solid var(--line);
107
+ border-radius: 16px;
108
+ background: rgba(255, 255, 255, 0.92);
109
+ box-shadow: var(--shadow);
110
+ }
111
+
112
+ aside {
113
+ padding: 18px;
114
+ position: sticky;
115
+ top: 18px;
116
+ }
117
+
118
+ .toc {
119
+ list-style: none;
120
+ padding: 0;
121
+ margin: 14px 0 0;
122
+ display: grid;
123
+ gap: 8px;
124
+ }
125
+
126
+ .toc a {
127
+ display: block;
128
+ color: var(--ink);
129
+ text-decoration: none;
130
+ border: 1px solid var(--line);
131
+ border-radius: 10px;
132
+ padding: 9px 10px;
133
+ background: #fbfefd;
134
+ font-size: 14px;
135
+ }
136
+
137
+ .toc a:hover { border-color: var(--brand-2); color: var(--brand); }
138
+
139
+ .content-panel {
140
+ padding: 20px;
141
+ display: grid;
142
+ gap: 16px;
143
+ }
144
+
145
+ .task-block {
146
+ border: 1px solid var(--line);
147
+ border-radius: 14px;
148
+ overflow: hidden;
149
+ background: #fff;
150
+ }
151
+
152
+ .task-header {
153
+ display: flex;
154
+ justify-content: space-between;
155
+ gap: 14px;
156
+ align-items: flex-start;
157
+ padding: 16px 18px;
158
+ background: linear-gradient(90deg, rgba(8, 122, 90, 0.1), rgba(14, 165, 160, 0.04));
159
+ border-bottom: 1px solid var(--line);
160
+ }
161
+
162
+ .task-meta {
163
+ color: var(--muted);
164
+ font-size: 13px;
165
+ margin-top: 6px;
166
+ }
167
+
168
+ .status {
169
+ border-radius: 999px;
170
+ padding: 5px 10px;
171
+ background: #ecfdf5;
172
+ color: var(--brand);
173
+ border: 1px solid rgba(8, 122, 90, 0.22);
174
+ font-size: 12px;
175
+ font-weight: 720;
176
+ white-space: nowrap;
177
+ }
178
+
179
+ .notes {
180
+ padding: 16px;
181
+ display: grid;
182
+ gap: 12px;
183
+ }
184
+
185
+ .note {
186
+ border: 1px solid var(--line);
187
+ border-left: 5px solid var(--brand);
188
+ border-radius: 12px;
189
+ padding: 14px 14px 14px 16px;
190
+ background: #fbfefd;
191
+ display: grid;
192
+ gap: 10px;
193
+ }
194
+
195
+ .note.decision { border-left-color: var(--decision); }
196
+ .note.spec-gap { border-left-color: var(--spec-gap); }
197
+ .note.tradeoff { border-left-color: var(--tradeoff); }
198
+ .note.scope-escape { border-left-color: var(--scope); }
199
+ .note.risk { border-left-color: var(--risk); }
200
+ .note.verification { border-left-color: var(--verify); }
201
+ .note.codebase-reality { border-left-color: var(--codebase); }
202
+ .note.flash { border-left-color: var(--flash); }
203
+
204
+ .note-head {
205
+ display: flex;
206
+ justify-content: space-between;
207
+ gap: 10px;
208
+ align-items: center;
209
+ }
210
+
211
+ .badge {
212
+ display: inline-flex;
213
+ align-items: center;
214
+ border-radius: 999px;
215
+ padding: 4px 9px;
216
+ font-size: 12px;
217
+ font-weight: 780;
218
+ background: #eef7f3;
219
+ color: var(--brand);
220
+ border: 1px solid var(--line);
221
+ }
222
+
223
+ .note time {
224
+ color: var(--muted);
225
+ font-size: 12px;
226
+ }
227
+
228
+ .note p { margin: 0; }
229
+
230
+ .details {
231
+ display: grid;
232
+ grid-template-columns: repeat(2, minmax(0, 1fr));
233
+ gap: 10px;
234
+ }
235
+
236
+ .detail {
237
+ border-radius: 10px;
238
+ background: #f8fbfa;
239
+ border: 1px solid var(--line);
240
+ padding: 10px;
241
+ font-size: 13px;
242
+ }
243
+
244
+ .detail strong {
245
+ display: block;
246
+ color: var(--muted);
247
+ font-size: 11px;
248
+ text-transform: uppercase;
249
+ letter-spacing: 0.04em;
250
+ margin-bottom: 4px;
251
+ }
252
+
253
+ code {
254
+ font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
255
+ font-size: 0.92em;
256
+ background: #eef7f3;
257
+ border: 1px solid var(--line);
258
+ border-radius: 6px;
259
+ padding: 1px 5px;
260
+ }
261
+
262
+ .empty {
263
+ color: var(--muted);
264
+ border: 1px dashed var(--line);
265
+ border-radius: 12px;
266
+ padding: 18px;
267
+ background: #fbfefd;
268
+ }
269
+
270
+ @media (max-width: 860px) {
271
+ main { width: min(100% - 20px, 1120px); padding-top: 18px; }
272
+ .summary, .layout, .details { grid-template-columns: 1fr; }
273
+ aside { position: static; }
274
+ .task-header, .note-head { flex-direction: column; align-items: flex-start; }
275
+ }
276
+ </style>
277
+ </head>
278
+ <body>
279
+ <main>
280
+ <section class="hero">
281
+ <div class="eyebrow">CafeKit Implementation Notes</div>
282
+ <h1>{{FEATURE_NAME}}</h1>
283
+ <div class="summary">
284
+ <div class="metric"><span>Spec path</span><strong><code>{{SPEC_PATH}}</code></strong></div>
285
+ <div class="metric"><span>Mode</span><strong>{{MODE}}</strong></div>
286
+ <div class="metric"><span>Last updated</span><strong>{{UPDATED_AT}}</strong></div>
287
+ <div class="metric"><span>Verification</span><strong>{{VERIFICATION_STATUS}}</strong></div>
288
+ </div>
289
+ </section>
290
+
291
+ <div class="layout">
292
+ <aside>
293
+ <h2>Task Timeline</h2>
294
+ <ul class="toc">
295
+ <!-- TASK_TOC_START -->
296
+ <li><a href="#task-current">Current task</a></li>
297
+ <!-- TASK_TOC_END -->
298
+ </ul>
299
+ </aside>
300
+
301
+ <section class="content-panel">
302
+ <!-- NOTES_START -->
303
+ <article class="task-block" id="task-current">
304
+ <div class="task-header">
305
+ <div>
306
+ <h2>Current Task</h2>
307
+ <div class="task-meta">Add task id, title, and active task file here.</div>
308
+ </div>
309
+ <span class="status">in_progress</span>
310
+ </div>
311
+ <div class="notes">
312
+ <div class="empty">No implementation decisions recorded yet.</div>
313
+ </div>
314
+ </article>
315
+ <!-- NOTES_END -->
316
+ </section>
317
+ </div>
318
+ </main>
319
+ </body>
320
+ </html>
@@ -8,6 +8,8 @@ Green tests are NOT enough. The gate requires four proofs:
8
8
  3. Code quality review
9
9
  4. Task evidence (completion criteria + runtime/artifact/reachability proof from the task file)
10
10
 
11
+ `--flash` is the explicit fast path. It bypasses this full gate and uses the Flash Gate defined below.
12
+
11
13
  ## Automation Semantics
12
14
 
13
15
  - If the task names exact commands in `Evidence` (or `Task Test Plan & Verification Evidence` / legacy `Verification & Evidence`), those exact commands are mandatory and must run before any fallback repo defaults.
@@ -21,6 +23,29 @@ Green tests are NOT enough. The gate requires four proofs:
21
23
  - Scope fidelity is mandatory: missing scoped behavior, extra unapproved behavior, or task output that exists only as orphaned/unreachable code is a review failure even when build/tests pass.
22
24
  - Runtime-facing artifacts must be reachable from the real entrypoint/caller named by the task or the task-aware scout report.
23
25
 
26
+ ## Flash Gate (`--flash`)
27
+
28
+ Use this only when `/hapo:develop ... --flash` is present.
29
+
30
+ - Skip dedicated test commands, E2E/browser/manual QA, full task evidence execution, test-runner delegation, and code-auditor retry loops.
31
+ - Do not report `Test PASS`, `Evidence PASS`, `Auto-Approved`, or `production-ready`.
32
+ - Still perform a scope sanity check against active task Completion Criteria.
33
+ - Still perform a reachability sanity check for runtime-facing files: imported, mounted, registered, routed, or invoked where applicable.
34
+ - Run a cheap compile/syntax/typecheck/build command only when available and expected to complete quickly without dependency install or external services.
35
+ - If the cheap preflight fails, return to implementation; do not sync.
36
+ - If the cheap preflight is unavailable or too slow, record `Preflight: skipped in --flash mode`.
37
+ - Sync only with receipt fields:
38
+ - `Mode: --flash`
39
+ - `Tests: skipped by user request`
40
+ - `Evidence: FLASH_UNVERIFIED`
41
+ - `Next verification: /hapo:test <feature>`
42
+
43
+ Terminal log:
44
+
45
+ ```text
46
+ ⚡ Step 4 Flash Gate: tests skipped by --flash; preflight=<pass|skipped>; evidence=FLASH_UNVERIFIED
47
+ ```
48
+
24
49
  ## Quality Cycle
25
50
 
26
51
  Maximum retry counter: **3 attempts**. Exceeding 3 triggers a collapse warning.