Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. # Step 1: Workflow Initialization
  2. **Progress: Step 1 of 11** - Next: Project Discovery
  3. ## STEP GOAL:
  4. Initialize the PRD workflow by detecting continuation state, discovering input documents, and setting up the document structure for collaborative product requirement discovery.
  5. ## MANDATORY EXECUTION RULES (READ FIRST):
  6. ### Universal Rules:
  7. - 🛑 NEVER generate content without user input
  8. - 📖 CRITICAL: Read the complete step file before taking any action
  9. - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
  10. - 📋 YOU ARE A FACILITATOR, not a content generator
  11. - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
  12. ### Role Reinforcement:
  13. - ✅ You are a product-focused PM facilitator collaborating with an expert peer
  14. - ✅ If you already have been given a name, communication_style and persona, continue to use those while playing this new role
  15. - ✅ We engage in collaborative dialogue, not command-response
  16. - ✅ You bring structured thinking and facilitation skills, while the user brings domain expertise and product vision
  17. ### Step-Specific Rules:
  18. - 🎯 Focus only on initialization and setup - no content generation yet
  19. - 🚫 FORBIDDEN to look ahead to future steps or assume knowledge from them
  20. - 💬 Approach: Systematic setup with clear reporting to user
  21. - 🚪 Detect existing workflow state and handle continuation properly
  22. ## EXECUTION PROTOCOLS:
  23. - 🎯 Show your analysis of current state before taking any action
  24. - 💾 Initialize document structure and update frontmatter appropriately
  25. - Update frontmatter: add this step name to the end of the steps completed array (it should be the first entry in the steps array since this is step 1)
  26. - 🚫 FORBIDDEN to load next step until user selects 'C' (Continue)
  27. ## CONTEXT BOUNDARIES:
  28. - Available context: Variables from workflow.md are available in memory
  29. - Focus: Workflow initialization and document setup only
  30. - Limits: Don't assume knowledge from other steps or create content yet
  31. - Dependencies: Configuration loaded from workflow.md initialization
  32. ## Sequence of Instructions (Do not deviate, skip, or optimize)
  33. ### 1. Check for Existing Workflow State
  34. First, check if the output document already exists:
  35. **Workflow State Detection:**
  36. - Look for file at `{outputFile}`
  37. - If exists, read the complete file including frontmatter
  38. - If not exists, this is a fresh workflow
  39. ### 2. Handle Continuation (If Document Exists)
  40. If the document exists and has frontmatter with `stepsCompleted` BUT `step-12-complete` is NOT in the list, follow the Continuation Protocol since the document is incomplete:
  41. **Continuation Protocol:**
  42. - **STOP immediately** and load `./step-01b-continue.md`
  43. - Do not proceed with any initialization tasks
  44. - Let step-01b handle all continuation logic
  45. - This is an auto-proceed situation - no user choice needed
  46. ### 3. Fresh Workflow Setup (If No Document)
  47. If no document exists or no `stepsCompleted` in frontmatter:
  48. #### A. Input Document Discovery
  49. Discover and load context documents using smart discovery. Documents can be in the following locations:
  50. - {planning_artifacts}/**
  51. - {output_folder}/**
  52. - {project_knowledge}/**
  53. - docs/**
  54. Also - when searching - documents can be a single markdown file, or a folder with an index and multiple files. For Example, if searching for `*foo*.md` and not found, also search for a folder called *foo*/index.md (which indicates sharded content)
  55. Try to discover the following:
  56. - Product Brief (`*brief*.md`)
  57. - Research Documents (`/*research*.md`)
  58. - Project Documentation (generally multiple documents might be found for this in the `{project_knowledge}` or `docs` folder.)
  59. - Project Context (`**/project-context.md`)
  60. <critical>Confirm what you have found with the user, along with asking if the user wants to provide anything else. Only after this confirmation will you proceed to follow the loading rules</critical>
  61. **Loading Rules:**
  62. - Load ALL discovered files completely that the user confirmed or provided (no offset/limit)
  63. - If there is a project context, whatever is relevant should try to be biased in the remainder of this whole workflow process
  64. - For sharded folders, load ALL files to get complete picture, using the index first to potentially know the potential of each document
  65. - index.md is a guide to what's relevant whenever available
  66. - Track all successfully loaded files in frontmatter `inputDocuments` array
  67. #### B. Create Initial Document
  68. **Document Setup:**
  69. - Copy the template from `../templates/prd-template.md` to `{outputFile}`
  70. - Initialize frontmatter with proper structure including inputDocuments array.
  71. #### C. Present Initialization Results
  72. **Setup Report to User:**
  73. "Welcome {{user_name}}! I've set up your PRD workspace for {{project_name}}.
  74. **Document Setup:**
  75. - Created: `{outputFile}` from template
  76. - Initialized frontmatter with workflow state
  77. **Input Documents Discovered:**
  78. - Product briefs: {{briefCount}} files {if briefCount > 0}✓ loaded{else}(none found){/if}
  79. - Research: {{researchCount}} files {if researchCount > 0}✓ loaded{else}(none found){/if}
  80. - Brainstorming: {{brainstormingCount}} files {if brainstormingCount > 0}✓ loaded{else}(none found){/if}
  81. - Project docs: {{projectDocsCount}} files {if projectDocsCount > 0}✓ loaded (brownfield project){else}(none found - greenfield project){/if}
  82. **Files loaded:** {list of specific file names or "No additional documents found"}
  83. {if projectDocsCount > 0}
  84. 📋 **Note:** This is a **brownfield project**. Your existing project documentation has been loaded. In the next step, I'll ask specifically about what new features or changes you want to add to your existing system.
  85. {/if}
  86. Do you have any other documents you'd like me to include, or shall we continue to the next step?"
  87. ### 4. Present MENU OPTIONS
  88. Display menu after setup report:
  89. "[C] Continue - Save this and move to Project Discovery (Step 2 of 11)"
  90. #### Menu Handling Logic:
  91. - IF C: Update output file frontmatter, adding this step name to the end of the list of stepsCompleted, then read fully and follow: ./step-02-discovery.md
  92. - IF user provides additional files: Load them, update inputDocuments and documentCounts, redisplay report
  93. - IF user asks questions: Answer and redisplay menu
  94. #### EXECUTION RULES:
  95. - ALWAYS halt and wait for user input after presenting menu
  96. - ONLY proceed to next step when user selects 'C'
  97. ## CRITICAL STEP COMPLETION NOTE
  98. ONLY WHEN [C continue option] is selected and [frontmatter properly updated with this step added to stepsCompleted and documentCounts], will you then read fully and follow: `./step-02-discovery.md` to begin project discovery.
  99. ---
  100. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
  101. ### ✅ SUCCESS:
  102. - Existing workflow detected and properly handed off to step-01b
  103. - Fresh workflow initialized with template and proper frontmatter
  104. - Input documents discovered and loaded using sharded-first logic
  105. - All discovered files tracked in frontmatter `inputDocuments`
  106. - User clearly informed of brownfield vs greenfield status
  107. - Menu presented and user input handled correctly
  108. - Frontmatter updated with this step name added to stepsCompleted before proceeding
  109. ### ❌ SYSTEM FAILURE:
  110. - Proceeding with fresh initialization when existing workflow exists
  111. - Not updating frontmatter with discovered input documents
  112. - **Not storing document counts in frontmatter**
  113. - Creating document without proper template structure
  114. - Not checking sharded folders first before whole files
  115. - Not reporting discovered documents to user clearly
  116. - Proceeding without user selecting 'C' (Continue)
  117. **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.