Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

step-01b-resume.md 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ---
  2. name: 'step-01b-resume'
  3. description: 'Resume interrupted workflow from last completed step'
  4. outputFile: '{test_artifacts}/test-design-progress.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. - `workflowStatus` — overall workflow state (`in-progress` or `completed`)
  26. - `totalSteps` — total number of create-mode workflow steps
  27. - `stepsCompleted` — array of completed step names
  28. - `lastStep` — last completed step name
  29. - `nextStep` — next step file to execute
  30. - `lastSaved` — timestamp of last save
  31. If `workflowStatus`, `totalSteps`, or `nextStep` are missing (legacy progress file), infer them from `lastStep` using this mapping:
  32. - `'step-01-detect-mode'` → `workflowStatus: 'in-progress'`, `totalSteps: 5`, `nextStep: './step-02-load-context.md'`
  33. - `'step-02-load-context'` → `workflowStatus: 'in-progress'`, `totalSteps: 5`, `nextStep: './step-03-risk-and-testability.md'`
  34. - `'step-03-risk-and-testability'` → `workflowStatus: 'in-progress'`, `totalSteps: 5`, `nextStep: './step-04-coverage-plan.md'`
  35. - `'step-04-coverage-plan'` → `workflowStatus: 'in-progress'`, `totalSteps: 5`, `nextStep: './step-05-generate-output.md'`
  36. - `'step-05-generate-output'` → `workflowStatus: 'completed'`, `totalSteps: 5`, `nextStep: ''`
  37. **If `{outputFile}` does not exist**, display:
  38. "⚠️ **No previous progress found.** There is no output document to resume from. Please use **[C] Create** to start a fresh workflow run."
  39. **THEN:** Halt. Do not proceed.
  40. ---
  41. ### 2. Display Progress Dashboard
  42. Display:
  43. "📋 **Workflow Resume — Test Design and Risk Assessment**
  44. **Workflow status:** {workflowStatus}
  45. **Last saved:** {lastSaved}
  46. **Last completed step:** {lastStep}
  47. **Next step:** {nextStep || 'None'}
  48. **Steps completed:** {stepsCompleted.length} of {totalSteps}"
  49. ---
  50. ### 3. Route to Next Step
  51. If `workflowStatus` is `'completed'`, display:
  52. "✅ **All steps completed.** Use **[V] Validate** to review outputs or **[E] Edit** to make revisions."
  53. **THEN:** Halt.
  54. If `nextStep` is one of the known create-mode step files below, load it, read completely, and execute:
  55. - `./step-02-load-context.md`
  56. - `./step-03-risk-and-testability.md`
  57. - `./step-04-coverage-plan.md`
  58. - `./step-05-generate-output.md`
  59. **If `nextStep` is empty or does not match a known step file**, display:
  60. "⚠️ **Unknown progress state** (`workflowStatus`: {workflowStatus}, `lastStep`: {lastStep}, `nextStep`: {nextStep}). Please use **[C] Create** to start fresh."
  61. **THEN:** Halt.
  62. The existing content in `{outputFile}` provides context from previously completed steps.
  63. ---
  64. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
  65. ### ✅ SUCCESS:
  66. - Output document loaded and parsed correctly
  67. - Explicit or legacy progress state resolved correctly
  68. - Progress dashboard displayed accurately
  69. - Routed to correct next step
  70. ### ❌ SYSTEM FAILURE:
  71. - Not loading output document
  72. - Incorrect progress display
  73. - Routing to wrong step
  74. - Re-executing completed steps
  75. **Master Rule:** Resume MUST route to the exact next incomplete step. Never re-execute completed steps.