Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

step-01b-resume.md 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ---
  2. name: 'step-01b-resume'
  3. description: 'Resume interrupted workflow from last completed step'
  4. outputFile: '{test_artifacts}/traceability-matrix.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. 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. Display Progress Dashboard
  33. Display:
  34. "📋 **Workflow Resume — Requirements Traceability & Quality Gate**
  35. **Last saved:** {lastSaved}
  36. **Steps completed:** {stepsCompleted.length} of 5
  37. 1. Load Context (step-01-load-context) — {✅ if in stepsCompleted, ⬜ otherwise}
  38. 2. Discover Tests (step-02-discover-tests) — {✅ if in stepsCompleted, ⬜ otherwise}
  39. 3. Map Criteria (step-03-map-criteria) — {✅ if in stepsCompleted, ⬜ otherwise}
  40. 4. Analyze Gaps (step-04-analyze-gaps) — {✅ if in stepsCompleted, ⬜ otherwise}
  41. 5. Gate Decision (step-05-gate-decision) — {✅ if in stepsCompleted, ⬜ otherwise}"
  42. ---
  43. ### 3. Route to Next Step
  44. Based on `lastStep`, load the next incomplete step:
  45. - `'step-01-load-context'` → Load `./step-02-discover-tests.md`
  46. - `'step-02-discover-tests'` → Load `./step-03-map-criteria.md`
  47. - `'step-03-map-criteria'` → Load `./step-04-analyze-gaps.md`
  48. - `'step-04-analyze-gaps'` → Load `./step-05-gate-decision.md`
  49. - `'step-05-gate-decision'` → **Workflow already complete.** Display: "✅ **All steps completed.** Use **[V] Validate** to review outputs or **[E] Edit** to make revisions." Then halt.
  50. **If `lastStep` does not match any value above**, display: "⚠️ **Unknown progress state** (`lastStep`: {lastStep}). Please use **[C] Create** to start fresh." Then halt.
  51. **Otherwise**, load the identified step file, read completely, and execute.
  52. The existing content in `{outputFile}` provides context from previously completed steps. Use it as reference for remaining steps.
  53. ---
  54. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
  55. ### ✅ SUCCESS:
  56. - Output document loaded and parsed correctly
  57. - Progress dashboard displayed accurately
  58. - Routed to correct next step
  59. ### ❌ SYSTEM FAILURE:
  60. - Not loading output document
  61. - Incorrect progress display
  62. - Routing to wrong step
  63. - Re-executing completed steps
  64. **Master Rule:** Resume MUST route to the exact next incomplete step. Never re-execute completed steps.