You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. ---
  2. name: 'step-01b-resume'
  3. description: 'Resume interrupted workflow from last completed step'
  4. outputFile: '{test_artifacts}/automation-summary.md'
  5. ---
  6. # Step 1b: Resume Workflow
  7. ## STEP GOAL
  8. Resume an interrupted workflow by loading the existing output document, displaying progress, and routing to the next incomplete step.
  9. ## MANDATORY EXECUTION RULES
  10. - 📖 Read the entire step file before acting
  11. - ✅ Speak in `{communication_language}`
  12. ---
  13. ## EXECUTION PROTOCOLS:
  14. - 🎯 Follow the MANDATORY SEQUENCE exactly
  15. - 📖 Load the next step only when instructed
  16. ## CONTEXT BOUNDARIES:
  17. - Available context: Output document with progress frontmatter
  18. - Focus: Load progress and route to next step
  19. - Limits: Do not re-execute completed steps
  20. - Dependencies: Output document must exist from a previous run
  21. ## MANDATORY SEQUENCE
  22. **CRITICAL:** Follow this sequence exactly.
  23. ### 1. Load Output Document
  24. Read `{outputFile}` and parse YAML frontmatter for:
  25. - `stepsCompleted` — array of completed step names
  26. - `lastStep` — last completed step name
  27. - `lastSaved` — timestamp of last save
  28. **If `{outputFile}` does not exist**, display:
  29. "⚠️ **No previous progress found.** There is no output document to resume from. Please use **[C] Create** to start a fresh workflow run."
  30. **THEN:** Halt. Do not proceed.
  31. ---
  32. ### 2. Display Progress Dashboard
  33. Display progress with ✅/⬜ indicators:
  34. 1. ✅/⬜ Preflight & Context (step-01-preflight-and-context)
  35. 2. ✅/⬜ Identify Targets (step-02-identify-targets)
  36. 3. ✅/⬜ Generate Tests + Aggregate (step-03c-aggregate)
  37. 4. ✅/⬜ Validate & Summarize (step-04-validate-and-summarize)
  38. ---
  39. ### 3. Route to Next Step
  40. Based on `lastStep`, load the next incomplete step:
  41. - `'step-01-preflight-and-context'` → load `./step-02-identify-targets.md`
  42. - `'step-02-identify-targets'` → load `./step-03-generate-tests.md`
  43. - `'step-03c-aggregate'` → load `./step-04-validate-and-summarize.md`
  44. - `'step-04-validate-and-summarize'` → **Workflow already complete.** Display: "✅ **All steps completed.** Use **[V] Validate** to review outputs or **[E] Edit** to make revisions." Then halt.
  45. **If `lastStep` does not match any value above**, display: "⚠️ **Unknown progress state** (`lastStep`: {lastStep}). Please use **[C] Create** to start fresh." Then halt.
  46. **Otherwise**, load the identified step file, read completely, and execute.
  47. The existing content in `{outputFile}` provides context from previously completed steps.
  48. ---
  49. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
  50. ### ✅ SUCCESS:
  51. - Output document loaded and parsed correctly
  52. - Progress dashboard displayed accurately
  53. - Routed to correct next step
  54. ### ❌ SYSTEM FAILURE:
  55. - Not loading output document
  56. - Incorrect progress display
  57. - Routing to wrong step
  58. **Master Rule:** Resume MUST route to the exact next incomplete step. Never re-execute completed steps.