mindsystem-cc 3.10.1 → 3.12.0

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 (34) hide show
  1. package/README.md +1 -1
  2. package/agents/ms-designer.md +8 -8
  3. package/agents/ms-executor.md +14 -163
  4. package/agents/ms-plan-checker.md +2 -3
  5. package/agents/ms-plan-writer.md +6 -21
  6. package/agents/ms-roadmapper.md +1 -18
  7. package/agents/ms-verify-fixer.md +1 -1
  8. package/commands/ms/design-phase.md +9 -14
  9. package/commands/ms/execute-phase.md +0 -9
  10. package/commands/ms/help.md +1 -8
  11. package/commands/ms/new-project.md +3 -40
  12. package/commands/ms/review-design.md +4 -7
  13. package/commands/ms/verify-work.md +1 -1
  14. package/mindsystem/references/design-directions.md +1 -1
  15. package/mindsystem/references/mock-patterns.md +48 -0
  16. package/mindsystem/references/plan-format.md +2 -129
  17. package/mindsystem/references/scope-estimation.md +3 -36
  18. package/mindsystem/templates/config.json +0 -13
  19. package/mindsystem/templates/design.md +1 -1
  20. package/mindsystem/templates/phase-prompt.md +6 -142
  21. package/mindsystem/templates/roadmap.md +1 -1
  22. package/mindsystem/templates/summary.md +24 -0
  23. package/mindsystem/workflows/execute-phase.md +4 -99
  24. package/mindsystem/workflows/execute-plan.md +12 -523
  25. package/mindsystem/workflows/generate-mocks.md +74 -0
  26. package/mindsystem/workflows/mockup-generation.md +11 -5
  27. package/mindsystem/workflows/plan-phase.md +15 -60
  28. package/mindsystem/workflows/transition.md +1 -10
  29. package/mindsystem/workflows/verify-work.md +97 -17
  30. package/package.json +1 -1
  31. package/scripts/__pycache__/compare_mockups.cpython-314.pyc +0 -0
  32. package/scripts/compare_mockups.py +219 -0
  33. package/mindsystem/references/checkpoint-detection.md +0 -50
  34. package/mindsystem/references/checkpoints.md +0 -788
@@ -77,12 +77,6 @@ SUMMARY naming follows same pattern:
77
77
 
78
78
  Confirm with user if ambiguous.
79
79
 
80
- <config-check>
81
- ```bash
82
- cat .planning/config.json 2>/dev/null
83
- ```
84
- </config-check>
85
-
86
80
  ```
87
81
  ⚡ Auto-approved: Execute {phase}-{plan}-PLAN.md
88
82
  [Plan X of Y for Phase Z]
@@ -90,7 +84,7 @@ cat .planning/config.json 2>/dev/null
90
84
  Starting execution...
91
85
  ```
92
86
 
93
- Proceed directly to parse_segments step.
87
+ Proceed directly to execution.
94
88
  </step>
95
89
 
96
90
  <step name="record_start_time">
@@ -104,166 +98,6 @@ PLAN_START_EPOCH=$(date +%s)
104
98
  Store in shell variables for duration calculation at completion.
105
99
  </step>
106
100
 
107
- <step name="parse_segments">
108
- **Intelligent segmentation: Parse plan into execution segments.**
109
-
110
- Plans are divided into segments by checkpoints. Each segment is routed to optimal execution context (subagent or main).
111
-
112
- **1. Check for checkpoints:**
113
-
114
- ```bash
115
- # Find all checkpoints and their types
116
- grep -n "type=\"checkpoint" .planning/phases/XX-name/{phase}-{plan}-PLAN.md
117
- ```
118
-
119
- **2. Analyze execution strategy:**
120
-
121
- **If NO checkpoints found:**
122
-
123
- - **Fully autonomous plan** - spawn single subagent for entire plan
124
- - Subagent gets fresh 200k context, executes all tasks, creates SUMMARY, commits
125
- - Main context: Just orchestration (~5% usage)
126
-
127
- **If checkpoints found, parse into segments:**
128
-
129
- Segment = tasks between checkpoints (or start→first checkpoint, or last checkpoint→end)
130
-
131
- **For each segment, determine routing:**
132
-
133
- ```
134
- Segment routing rules:
135
-
136
- IF segment has no prior checkpoint:
137
- → SUBAGENT (first segment, nothing to depend on)
138
-
139
- IF segment follows checkpoint:human-verify:
140
- → SUBAGENT (verification is just confirmation, doesn't affect next work)
141
-
142
- IF segment follows checkpoint:decision OR checkpoint:human-action:
143
- → MAIN CONTEXT (next tasks need the decision/result)
144
- ```
145
-
146
- **3. Execution pattern:**
147
-
148
- **Pattern A: Fully autonomous (no checkpoints)**
149
-
150
- ```
151
- Spawn subagent → execute all tasks → SUMMARY → commit → report back
152
- ```
153
-
154
- **Pattern B: Segmented with verify-only checkpoints**
155
-
156
- ```
157
- Segment 1 (tasks 1-3): Spawn subagent → execute → report back
158
- Checkpoint 4 (human-verify): Main context → you verify → continue
159
- Segment 2 (tasks 5-6): Spawn NEW subagent → execute → report back
160
- Checkpoint 7 (human-verify): Main context → you verify → continue
161
- Aggregate results → SUMMARY → commit
162
- ```
163
-
164
- **Pattern C: Decision-dependent (must stay in main)**
165
-
166
- ```
167
- Checkpoint 1 (decision): Main context → you decide → continue in main
168
- Tasks 2-5: Main context (need decision from checkpoint 1)
169
- No segmentation benefit - execute entirely in main
170
- ```
171
-
172
- **4. Why this works:**
173
-
174
- **Segmentation benefits:**
175
-
176
- - Fresh context for each autonomous segment (0% start every time)
177
- - Main context only for checkpoints (~10-20% total)
178
- - Can handle 10+ task plans if properly segmented
179
- - Quality impossible to degrade in autonomous segments
180
-
181
- **When segmentation provides no benefit:**
182
-
183
- - Checkpoint is decision/human-action and following tasks depend on outcome
184
- - Better to execute sequentially in main than break flow
185
-
186
- **5. Implementation:**
187
-
188
- **For fully autonomous plans:**
189
-
190
- ```
191
- 1. Run init_agent_tracking step first (see step below)
192
-
193
- 2. Use Task tool with subagent_type="ms-executor":
194
-
195
- Prompt: "Execute plan at .planning/phases/{phase}-{plan}-PLAN.md
196
-
197
- This is an autonomous plan (no checkpoints). Execute all tasks, create SUMMARY.md in phase directory, commit with message following plan's commit guidance.
198
-
199
- Follow all deviation rules and authentication gate protocols from the plan.
200
-
201
- When complete, report: plan name, tasks completed, SUMMARY path, commit hash."
202
-
203
- 3. After Task tool returns with agent_id:
204
-
205
- a. Write agent_id to current-agent-id.txt:
206
- echo "[agent_id]" > .planning/current-agent-id.txt
207
-
208
- b. Append spawn entry to agent-history.json:
209
- {
210
- "agent_id": "[agent_id from Task response]",
211
- "task_description": "Execute full plan {phase}-{plan} (autonomous)",
212
- "phase": "{phase}",
213
- "plan": "{plan}",
214
- "segment": null,
215
- "timestamp": "[ISO timestamp]",
216
- "status": "spawned",
217
- "completion_timestamp": null
218
- }
219
-
220
- 4. Wait for subagent to complete
221
-
222
- 5. After subagent completes successfully:
223
-
224
- a. Update agent-history.json entry:
225
- - Find entry with matching agent_id
226
- - Set status: "completed"
227
- - Set completion_timestamp: "[ISO timestamp]"
228
-
229
- b. Clear current-agent-id.txt:
230
- rm .planning/current-agent-id.txt
231
-
232
- 6. Report completion to user
233
- ```
234
-
235
- **For segmented plans (has verify-only checkpoints):**
236
-
237
- ```
238
- Execute segment-by-segment:
239
-
240
- For each autonomous segment:
241
- Spawn subagent with prompt: "Execute tasks [X-Y] from plan at .planning/phases/{phase}-{plan}-PLAN.md. Read the plan for full context and deviation rules. Do NOT create SUMMARY or commit - just execute these tasks and report results."
242
-
243
- Wait for subagent completion
244
-
245
- For each checkpoint:
246
- Execute in main context
247
- Wait for user interaction
248
- Continue to next segment
249
-
250
- After all segments complete:
251
- Aggregate all results
252
- Create SUMMARY.md
253
- Commit with all changes
254
- ```
255
-
256
- **For decision-dependent plans:**
257
-
258
- ```
259
- Execute in main context (standard flow below)
260
- No subagent routing
261
- Quality maintained through small scope (2-3 tasks per plan)
262
- ```
263
-
264
- See step name="segment_execution" for detailed segment execution loop.
265
- </step>
266
-
267
101
  <step name="init_agent_tracking">
268
102
  **Initialize agent tracking for subagent resume capability.**
269
103
 
@@ -312,194 +146,6 @@ If agent-history.json has more than `max_entries`:
312
146
  - Pattern C (main context): Skip - no subagents spawned
313
147
  </step>
314
148
 
315
- <step name="segment_execution">
316
- **Detailed segment execution loop for segmented plans.**
317
-
318
- **This step applies ONLY to segmented plans (Pattern B: has checkpoints, but they're verify-only).**
319
-
320
- For Pattern A (fully autonomous) and Pattern C (decision-dependent), skip this step.
321
-
322
- **Execution flow:**
323
-
324
- ````
325
- 1. Parse plan to identify segments:
326
- - Read plan file
327
- - Find checkpoint locations: grep -n "type=\"checkpoint" PLAN.md
328
- - Identify checkpoint types: grep "type=\"checkpoint" PLAN.md | grep -o 'checkpoint:[^"]*'
329
- - Build segment map:
330
- * Segment 1: Start → first checkpoint (tasks 1-X)
331
- * Checkpoint 1: Type and location
332
- * Segment 2: After checkpoint 1 → next checkpoint (tasks X+1 to Y)
333
- * Checkpoint 2: Type and location
334
- * ... continue for all segments
335
-
336
- 2. For each segment in order:
337
-
338
- A. Determine routing (apply rules from parse_segments):
339
- - No prior checkpoint? → Subagent
340
- - Prior checkpoint was human-verify? → Subagent
341
- - Prior checkpoint was decision/human-action? → Main context
342
-
343
- B. If routing = Subagent:
344
- ```
345
- Spawn Task tool with subagent_type="ms-executor":
346
-
347
- Prompt: "Execute tasks [task numbers/names] from plan at [plan path].
348
-
349
- **Context:**
350
- - Read the full plan for objective, context files, and deviation rules
351
- - You are executing a SEGMENT of this plan (not the full plan)
352
- - Other segments will be executed separately
353
-
354
- **Your responsibilities:**
355
- - Execute only the tasks assigned to you
356
- - Follow all deviation rules and authentication gate protocols
357
- - Track deviations for later Summary
358
- - DO NOT create SUMMARY.md (will be created after all segments complete)
359
- - DO NOT commit (will be done after all segments complete)
360
-
361
- **Report back:**
362
- - Tasks completed
363
- - Files created/modified
364
- - Deviations encountered
365
- - Any issues or blockers"
366
-
367
- **After Task tool returns with agent_id:**
368
-
369
- 1. Write agent_id to current-agent-id.txt:
370
- echo "[agent_id]" > .planning/current-agent-id.txt
371
-
372
- 2. Append spawn entry to agent-history.json:
373
- {
374
- "agent_id": "[agent_id from Task response]",
375
- "task_description": "Execute tasks [X-Y] from plan {phase}-{plan}",
376
- "phase": "{phase}",
377
- "plan": "{plan}",
378
- "segment": [segment_number],
379
- "timestamp": "[ISO timestamp]",
380
- "status": "spawned",
381
- "completion_timestamp": null
382
- }
383
-
384
- Wait for subagent to complete
385
- Capture results (files changed, deviations, etc.)
386
-
387
- **After subagent completes successfully:**
388
-
389
- 1. Update agent-history.json entry:
390
- - Find entry with matching agent_id
391
- - Set status: "completed"
392
- - Set completion_timestamp: "[ISO timestamp]"
393
-
394
- 2. Clear current-agent-id.txt:
395
- rm .planning/current-agent-id.txt
396
-
397
- ```
398
-
399
- C. If routing = Main context:
400
- Execute tasks in main using standard execution flow (step name="execute")
401
- Track results locally
402
-
403
- D. After segment completes (whether subagent or main):
404
- Continue to next checkpoint/segment
405
-
406
- 3. After ALL segments complete:
407
-
408
- A. Aggregate results from all segments:
409
- - Collect files created/modified from all segments
410
- - Collect deviations from all segments
411
- - Collect decisions from all checkpoints
412
- - Merge into complete picture
413
-
414
- B. Create SUMMARY.md:
415
- - Use aggregated results
416
- - Document all work from all segments
417
- - Include deviations from all segments
418
- - Note which segments were subagented
419
-
420
- C. Commit:
421
- - Stage all files from all segments
422
- - Stage SUMMARY.md
423
- - Commit with message following plan guidance
424
- - Include note about segmented execution if relevant
425
-
426
- D. Report completion
427
-
428
- **Example execution trace:**
429
-
430
- ````
431
-
432
- Plan: 01-02-PLAN.md (8 tasks, 2 verify checkpoints)
433
-
434
- Parsing segments...
435
-
436
- - Segment 1: Tasks 1-3 (autonomous)
437
- - Checkpoint 4: human-verify
438
- - Segment 2: Tasks 5-6 (autonomous)
439
- - Checkpoint 7: human-verify
440
- - Segment 3: Task 8 (autonomous)
441
-
442
- Routing analysis:
443
-
444
- - Segment 1: No prior checkpoint → SUBAGENT ✓
445
- - Checkpoint 4: Verify only → MAIN (required)
446
- - Segment 2: After verify → SUBAGENT ✓
447
- - Checkpoint 7: Verify only → MAIN (required)
448
- - Segment 3: After verify → SUBAGENT ✓
449
-
450
- Execution:
451
- [1] Spawning subagent for tasks 1-3...
452
- → Subagent completes: 3 files modified, 0 deviations
453
- [2] Executing checkpoint 4 (human-verify)...
454
- ╔═══════════════════════════════════════════════════════╗
455
- ║ CHECKPOINT: Verification Required ║
456
- ╚═══════════════════════════════════════════════════════╝
457
-
458
- Progress: 3/8 tasks complete
459
- Task: Verify database schema
460
-
461
- Built: User and Session tables with relations
462
-
463
- How to verify:
464
- 1. Check src/db/schema.ts for correct types
465
-
466
- ────────────────────────────────────────────────────────
467
- → YOUR ACTION: Type "approved" or describe issues
468
- ────────────────────────────────────────────────────────
469
- User: "approved"
470
- [3] Spawning subagent for tasks 5-6...
471
- → Subagent completes: 2 files modified, 1 deviation (added error handling)
472
- [4] Executing checkpoint 7 (human-verify)...
473
- User: "approved"
474
- [5] Spawning subagent for task 8...
475
- → Subagent completes: 1 file modified, 0 deviations
476
-
477
- Aggregating results...
478
-
479
- - Total files: 6 modified
480
- - Total deviations: 1
481
- - Segmented execution: 3 subagents, 2 checkpoints
482
-
483
- Creating SUMMARY.md...
484
- Committing...
485
- ✓ Complete
486
-
487
- ````
488
-
489
- **Benefits of this pattern:**
490
- - Main context usage: ~20% (just orchestration + checkpoints)
491
- - Subagent 1: Fresh 0-30% (tasks 1-3)
492
- - Subagent 2: Fresh 0-30% (tasks 5-6)
493
- - Subagent 3: Fresh 0-20% (task 8)
494
- - All autonomous work: Peak quality
495
- - Can handle large plans with many tasks if properly segmented
496
-
497
- **When NOT to use segmentation:**
498
- - Plan has decision/human-action checkpoints that affect following tasks
499
- - Following tasks depend on checkpoint outcome
500
- - Better to execute in main sequentially in those cases
501
- </step>
502
-
503
149
  <step name="load_prompt">
504
150
  Read the plan prompt:
505
151
  ```bash
@@ -555,14 +201,6 @@ Execute each task in the prompt. **Deviations are normal** - handle them automat
555
201
  - Track task completion and commit hash for Summary documentation
556
202
  - Continue to next task
557
203
 
558
- **If `type="checkpoint:*"`:**
559
-
560
- - STOP immediately (do not continue to next task)
561
- - Execute checkpoint_protocol (see below)
562
- - Wait for user response
563
- - Verify if possible (check files, env vars, etc.)
564
- - Only after user confirmation: continue to next task
565
-
566
204
  3. Run overall verification checks from `<verification>` section
567
205
  4. Confirm all success criteria from `<success_criteria>` section met
568
206
  5. Document all deviations in Summary (automatic - see deviation_documentation below)
@@ -586,7 +224,7 @@ This is NOT a failure. Authentication gates are expected and normal. Handle them
586
224
 
587
225
  1. **Recognize it's an auth gate** - Not a bug, just needs credentials
588
226
  2. **STOP current task execution** - Don't retry repeatedly
589
- 3. **Create dynamic checkpoint:human-action** - Present it to user immediately
227
+ 3. **Use AskUserQuestion** - Present it to user immediately
590
228
  4. **Provide exact authentication steps** - CLI commands, where to get keys
591
229
  5. **Wait for user to authenticate** - Let them complete auth flow
592
230
  6. **Verify authentication works** - Test that credentials are valid
@@ -601,7 +239,7 @@ Running: vercel --yes
601
239
 
602
240
  Error: Not authenticated. Please run 'vercel login'
603
241
 
604
- [Create checkpoint dynamically]
242
+ [Present via AskUserQuestion]
605
243
 
606
244
  ╔═══════════════════════════════════════════════════════╗
607
245
  ║ CHECKPOINT: Action Required ║
@@ -765,7 +403,7 @@ Apply these rules automatically. Track all deviations for Summary documentation.
765
403
 
766
404
  **Trigger:** Fix/addition requires significant structural modification
767
405
 
768
- **Action:** STOP, present to user, wait for decision
406
+ **Action:** STOP, report via AskUserQuestion, wait for decision
769
407
 
770
408
  **Examples:**
771
409
 
@@ -807,9 +445,9 @@ Proceed with proposed change? (yes / different approach / defer)
807
445
 
808
446
  **RULE PRIORITY (when multiple could apply):**
809
447
 
810
- 1. **If Rule 4 applies** → STOP and ask (architectural decision)
448
+ 1. **If Rule 4 applies** → STOP and report to user (architectural decision)
811
449
  2. **If Rules 1-3 apply** → Fix automatically, track for Summary
812
- 3. **If genuinely unsure which rule** → Apply Rule 4 (ask user)
450
+ 3. **If genuinely unsure which rule** → Apply Rule 4 (stop and report)
813
451
 
814
452
  **Edge case guidance:**
815
453
 
@@ -1030,160 +668,6 @@ TASK_COMMITS+=("Task ${TASK_NUM}: ${TASK_COMMIT}")
1030
668
 
1031
669
  </task_commit>
1032
670
 
1033
- <step name="checkpoint_protocol">
1034
- When encountering `type="checkpoint:*"`:
1035
-
1036
- **Critical: Claude automates everything with CLI/API before checkpoints.** Checkpoints are for verification and decisions, not manual work.
1037
-
1038
- **Display checkpoint clearly:**
1039
-
1040
- ```
1041
- ╔═══════════════════════════════════════════════════════╗
1042
- ║ CHECKPOINT: [Type] ║
1043
- ╚═══════════════════════════════════════════════════════╝
1044
-
1045
- Progress: {X}/{Y} tasks complete
1046
- Task: [task name]
1047
-
1048
- [Display task-specific content based on type]
1049
-
1050
- ────────────────────────────────────────────────────────
1051
- → YOUR ACTION: [Resume signal instruction]
1052
- ────────────────────────────────────────────────────────
1053
- ```
1054
-
1055
- **For checkpoint:human-verify (90% of checkpoints):**
1056
-
1057
- ```
1058
- Built: [what was automated - deployed, built, configured]
1059
-
1060
- How to verify:
1061
- 1. [Step 1 - exact command/URL]
1062
- 2. [Step 2 - what to check]
1063
- 3. [Step 3 - expected behavior]
1064
-
1065
- ────────────────────────────────────────────────────────
1066
- → YOUR ACTION: Type "approved" or describe issues
1067
- ────────────────────────────────────────────────────────
1068
- ```
1069
-
1070
- **For checkpoint:decision (9% of checkpoints):**
1071
-
1072
- ```
1073
- Decision needed: [decision]
1074
-
1075
- Context: [why this matters]
1076
-
1077
- Options:
1078
- 1. [option-id]: [name]
1079
- Pros: [pros]
1080
- Cons: [cons]
1081
-
1082
- 2. [option-id]: [name]
1083
- Pros: [pros]
1084
- Cons: [cons]
1085
-
1086
- [Resume signal - e.g., "Select: option-id"]
1087
- ```
1088
-
1089
- **For checkpoint:human-action (1% - rare, only for truly unavoidable manual steps):**
1090
-
1091
- ```
1092
- I automated: [what Claude already did via CLI/API]
1093
-
1094
- Need your help with: [the ONE thing with no CLI/API - email link, 2FA code]
1095
-
1096
- Instructions:
1097
- [Single unavoidable step]
1098
-
1099
- I'll verify after: [verification]
1100
-
1101
- [Resume signal - e.g., "Type 'done' when complete"]
1102
- ```
1103
-
1104
- **After displaying:** WAIT for user response. Do NOT hallucinate completion. Do NOT continue to next task.
1105
-
1106
- **After user responds:**
1107
-
1108
- - Run verification if specified (file exists, env var set, tests pass, etc.)
1109
- - If verification passes or N/A: continue to next task
1110
- - If verification fails: inform user, wait for resolution
1111
-
1112
- See ~/.claude/mindsystem/references/checkpoints.md for complete checkpoint guidance.
1113
- </step>
1114
-
1115
- <step name="checkpoint_return_for_orchestrator">
1116
- **When spawned by an orchestrator (execute-phase or execute-plan command):**
1117
-
1118
- If you were spawned via Task tool and hit a checkpoint, you cannot directly interact with the user. Instead, RETURN to the orchestrator with structured checkpoint state so it can present to the user and spawn a fresh continuation agent.
1119
-
1120
- **Return format for checkpoints:**
1121
-
1122
- **Required in your return:**
1123
-
1124
- 1. **Completed Tasks table** - Tasks done so far with commit hashes and files created
1125
- 2. **Current Task** - Which task you're on and what's blocking it
1126
- 3. **Checkpoint Details** - User-facing content (verification steps, decision options, or action instructions)
1127
- 4. **Awaiting** - What you need from the user
1128
-
1129
- **Example return:**
1130
-
1131
- ```
1132
- ## CHECKPOINT REACHED
1133
-
1134
- **Type:** human-action
1135
- **Plan:** 01-01
1136
- **Progress:** 1/3 tasks complete
1137
-
1138
- ### Completed Tasks
1139
-
1140
- | Task | Name | Commit | Files |
1141
- |------|------|--------|-------|
1142
- | 1 | Initialize Next.js 15 project | d6fe73f | package.json, tsconfig.json, app/ |
1143
-
1144
- ### Current Task
1145
-
1146
- **Task 2:** Initialize Convex backend
1147
- **Status:** blocked
1148
- **Blocked by:** Convex CLI authentication required
1149
-
1150
- ### Checkpoint Details
1151
-
1152
- **Automation attempted:**
1153
- Ran `npx convex dev` to initialize Convex backend
1154
-
1155
- **Error encountered:**
1156
- "Error: Not authenticated. Run `npx convex login` first."
1157
-
1158
- **What you need to do:**
1159
- 1. Run: `npx convex login`
1160
- 2. Complete browser authentication
1161
- 3. Run: `npx convex dev`
1162
- 4. Create project when prompted
1163
-
1164
- **I'll verify after:**
1165
- `cat .env.local | grep CONVEX` returns the Convex URL
1166
-
1167
- ### Awaiting
1168
-
1169
- Type "done" when Convex is authenticated and project created.
1170
- ```
1171
-
1172
- **After you return:**
1173
-
1174
- The orchestrator will:
1175
- 1. Parse your structured return
1176
- 2. Present checkpoint details to the user
1177
- 3. Collect user's response
1178
- 4. Spawn a FRESH continuation agent with your completed tasks state
1179
-
1180
- You will NOT be resumed. A new agent continues from where you stopped, using your Completed Tasks table to know what's done.
1181
-
1182
- **How to know if you were spawned:**
1183
-
1184
- If you're reading this workflow because an orchestrator spawned you, the orchestrator's prompt will include checkpoint return instructions. Follow those instructions when you hit a checkpoint.
1185
- </step>
1186
-
1187
671
  <step name="verification_failure_gate">
1188
672
  If any task verification fails:
1189
673
 
@@ -1330,7 +814,12 @@ Before writing summary content, populate frontmatter fields from execution conte
1330
814
  5. **Decisions:**
1331
815
  - key-decisions: Extract from "Decisions Made" section
1332
816
 
1333
- 6. **Metrics:**
817
+ 6. **Verification hints (required):**
818
+ - mock_hints.transient_states: Reflect on what you built. Any UI with async loading, animations, or transitions that produce brief intermediate states? List each with component file and trigger.
819
+ - mock_hints.external_data: Any feature that fetches from an API? List the source, data type, and rendering components.
820
+ - If no UI work, no async operations, no external data: write `mock_hints: none` with a brief reason comment (e.g., `mock_hints: none # no transient states or external data dependencies`). Always populate — `none` tells verify-work to skip mock analysis.
821
+
822
+ 7. **Metrics:**
1334
823
  - duration: From $DURATION variable
1335
824
  - completed: From $PLAN_END_TIME (date only, format YYYY-MM-DD)
1336
825
 
@@ -112,9 +112,83 @@ Common mock types and what they enable:
112
112
  | `empty_response` | Empty states, placeholder UI, "no results" | `forceEmpty` |
113
113
  | `loading_state` | Loading spinners, skeleton screens | `forceLoading`, `mockLoadingDelay` |
114
114
  | `offline` | Offline UI, cached data, sync indicators | `forceOffline` |
115
+ | `transient_state` | Brief async states (loading skeletons, transitions) | `forceTransient`, `mockTransientDelay` |
116
+ | `external_data` | Features depending on API data that may not exist locally | `forceMockData`, `mockDataSet` |
115
117
 
116
118
  </mock_types>
117
119
 
120
+ <transient_state_patterns>
121
+
122
+ **Transient states are UI states that appear briefly during async operations.** Loading skeletons, shimmer effects, transition animations — they resolve too fast to observe and test manually.
123
+
124
+ **Two mock strategies:**
125
+
126
+ **1. Extended delay strategy (default):**
127
+
128
+ Add a configurable delay before the real data returns. The transient state stays visible long enough to test.
129
+
130
+ ```dart
131
+ // Flutter — Completer-based delay
132
+ Future<List<Recipe>> getRecipes() async {
133
+ // TEST OVERRIDE - Extend loading state for testing
134
+ if (TestOverrides.forceTransientState) {
135
+ await Future.delayed(TestOverrides.mockTransientDelay); // default 5s
136
+ }
137
+ // Real implementation continues...
138
+ final response = await _api.get('/recipes');
139
+ return response.data.map((j) => Recipe.fromJson(j)).toList();
140
+ }
141
+ ```
142
+
143
+ ```typescript
144
+ // React/Next.js — Promise delay
145
+ async function getRecipes(): Promise<Recipe[]> {
146
+ // TEST OVERRIDE - Extend loading state for testing
147
+ if (testOverrides.forceTransientState) {
148
+ await new Promise(resolve => setTimeout(resolve, testOverrides.mockTransientDelayMs));
149
+ }
150
+ // Real implementation continues...
151
+ const response = await fetch('/api/recipes');
152
+ return response.json();
153
+ }
154
+ ```
155
+
156
+ **When to use:** Testing that the loading UI (skeleton, spinner) displays correctly while waiting.
157
+
158
+ **2. Never-resolve strategy:**
159
+
160
+ The async call never completes. The transient state stays permanently visible.
161
+
162
+ ```dart
163
+ // Flutter — Completer that never completes
164
+ Future<List<Recipe>> getRecipes() async {
165
+ // TEST OVERRIDE - Never resolve, keep loading state visible
166
+ if (TestOverrides.forceTransientState && TestOverrides.mockTransientDelay == Duration.zero) {
167
+ await Completer<void>().future; // Never completes
168
+ }
169
+ // Real implementation continues...
170
+ }
171
+ ```
172
+
173
+ ```typescript
174
+ // JS — Promise that never resolves
175
+ async function getRecipes(): Promise<Recipe[]> {
176
+ // TEST OVERRIDE - Never resolve, keep loading state visible
177
+ if (testOverrides.forceTransientState && testOverrides.mockTransientDelayMs === 0) {
178
+ await new Promise(() => {}); // Never resolves
179
+ }
180
+ // Real implementation continues...
181
+ }
182
+ ```
183
+
184
+ **When to use:** Testing that the loading UI itself is correct (layout, styling, animation) without it disappearing.
185
+
186
+ **Choosing between strategies:**
187
+ - Testing the transition (loading → loaded): Use extended delay (5s default)
188
+ - Testing the loading UI appearance: Use never-resolve (set delay to 0)
189
+
190
+ </transient_state_patterns>
191
+
118
192
  <toggle_instructions_template>
119
193
 
120
194
  **Format for each mock state:**