Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ---
  2. name: 'step-01b-resume'
  3. description: 'Resume interrupted workflow from last completed step'
  4. outputFile: '{test_artifacts}/framework-setup-progress.md'
  5. ---
  6. # Step 1b: Resume Workflow
  7. ## STEP GOAL
  8. Resume an interrupted workflow by loading the existing progress document, verifying previously created artifacts still exist on disk, 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. Do not skip, reorder, or improvise.
  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. Verify Previously Created Artifacts
  33. Since this workflow creates code files, verify that artifacts from completed steps still exist on disk:
  34. - If `step-01-preflight` completed: Confirm `package.json` still exists
  35. - If `step-03-scaffold-framework` completed: Confirm directory structure and config files exist
  36. - If `step-04-docs-and-scripts` completed: Confirm `{test_dir}/README.md` exists
  37. If any expected artifacts are missing, warn the user and suggest re-running from the step that created them.
  38. ---
  39. ### 3. Display Progress Dashboard
  40. Display:
  41. "📋 **Workflow Resume — Test Framework Setup**
  42. **Last saved:** {lastSaved}
  43. **Steps completed:** {stepsCompleted.length} of 5
  44. 1. ✅/⬜ Preflight Checks (step-01-preflight)
  45. 2. ✅/⬜ Select Framework (step-02-select-framework)
  46. 3. ✅/⬜ Scaffold Framework (step-03-scaffold-framework)
  47. 4. ✅/⬜ Docs & Scripts (step-04-docs-and-scripts)
  48. 5. ✅/⬜ Validate & Summary (step-05-validate-and-summary)"
  49. ---
  50. ### 4. Route to Next Step
  51. Based on `lastStep`, load the next incomplete step:
  52. - `'step-01-preflight'` → `./step-02-select-framework.md`
  53. - `'step-02-select-framework'` → `./step-03-scaffold-framework.md`
  54. - `'step-03-scaffold-framework'` → `./step-04-docs-and-scripts.md`
  55. - `'step-04-docs-and-scripts'` → `./step-05-validate-and-summary.md`
  56. - `'step-05-validate-and-summary'` → **Workflow already complete.** Display: "✅ **All steps completed.** Use **[V] Validate** to review outputs or **[E] Edit** to make revisions." Then halt.
  57. **If `lastStep` does not match any value above**, display: "⚠️ **Unknown progress state** (`lastStep`: {lastStep}). Please use **[C] Create** to start fresh." Then halt.
  58. **Otherwise**, load the identified step file, read completely, and execute.
  59. The existing content in `{outputFile}` provides context from previously completed steps.
  60. ---
  61. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
  62. ### ✅ SUCCESS:
  63. - Output document loaded and parsed correctly
  64. - Previously created artifacts verified on disk
  65. - Progress dashboard displayed accurately
  66. - Routed to correct next step
  67. ### ❌ SYSTEM FAILURE:
  68. - Not loading output document
  69. - Not verifying existing artifacts
  70. - Incorrect progress display
  71. - Routing to wrong step
  72. - Re-executing completed steps
  73. **Master Rule:** Resume MUST route to the exact next incomplete step. Never re-execute completed steps.