Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

5 дней назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. # Step 1: Architecture Workflow Initialization
  2. ## MANDATORY EXECUTION RULES (READ FIRST):
  3. - 🛑 NEVER generate content without user input
  4. - 📖 CRITICAL: ALWAYS read the complete step file before taking any action - partial understanding leads to incomplete decisions
  5. - 🔄 CRITICAL: When loading next step with 'C', ensure the entire file is read and understood before proceeding
  6. - ✅ ALWAYS treat this as collaborative discovery between architectural peers
  7. - 📋 YOU ARE A FACILITATOR, not a content generator
  8. - 💬 FOCUS on initialization and setup only - don't look ahead to future steps
  9. - 🚪 DETECT existing workflow state and handle continuation properly
  10. - ⚠️ ABSOLUTELY NO TIME ESTIMATES - AI development speed has fundamentally changed
  11. - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
  12. ## EXECUTION PROTOCOLS:
  13. - 🎯 Show your analysis before taking any action
  14. - 💾 Initialize document and update frontmatter
  15. - 📖 Set up frontmatter `stepsCompleted: [1]` before loading next step
  16. - 🚫 FORBIDDEN to load next step until setup is complete
  17. ## CONTEXT BOUNDARIES:
  18. - Variables from workflow.md are available in memory
  19. - Previous context = what's in output document + frontmatter
  20. - Don't assume knowledge from other steps
  21. - Input document discovery happens in this step
  22. ## YOUR TASK:
  23. Initialize the Architecture workflow by detecting continuation state, discovering input documents, and setting up the document for collaborative architectural decision making.
  24. ## INITIALIZATION SEQUENCE:
  25. ### 1. Check for Existing Workflow
  26. First, check if the output document already exists:
  27. - Look for existing {planning_artifacts}/`*architecture*.md`
  28. - If exists, read the complete file(s) including frontmatter
  29. - If not exists, this is a fresh workflow
  30. ### 2. Handle Continuation (If Document Exists)
  31. If the document exists and has frontmatter with `stepsCompleted`:
  32. - **STOP here** and load `./step-01b-continue.md` immediately
  33. - Do not proceed with any initialization tasks
  34. - Let step-01b handle the continuation logic
  35. ### 3. Fresh Workflow Setup (If No Document)
  36. If no document exists or no `stepsCompleted` in frontmatter:
  37. #### A. Input Document Discovery
  38. Discover and load context documents using smart discovery. Documents can be in the following locations:
  39. - {planning_artifacts}/**
  40. - {output_folder}/**
  41. - {project_knowledge}/**
  42. - {project-root}/docs/**
  43. 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)
  44. Try to discover the following:
  45. - Product Brief (`*brief*.md`)
  46. - Product Requirements Document (`*prd*.md`)
  47. - UX Design (`*ux-design*.md`) and other
  48. - Research Documents (`*research*.md`)
  49. - Project Documentation (generally multiple documents might be found for this in the `{project_knowledge}` or `{project-root}/docs` folder.)
  50. - Project Context (`**/project-context.md`)
  51. <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>
  52. **Loading Rules:**
  53. - Load ALL discovered files completely that the user confirmed or provided (no offset/limit)
  54. - If there is a project context, whatever is relevant should try to be biased in the remainder of this whole workflow process
  55. - For sharded folders, load ALL files to get complete picture, using the index first to potentially know the potential of each document
  56. - index.md is a guide to what's relevant whenever available
  57. - Track all successfully loaded files in frontmatter `inputDocuments` array
  58. #### B. Validate Required Inputs
  59. Before proceeding, verify we have the essential inputs:
  60. **PRD Validation:**
  61. - If no PRD found: "Architecture requires a PRD to work from. Please run the PRD workflow first or provide the PRD file path."
  62. - Do NOT proceed without PRD
  63. **Other Input that might exist:**
  64. - UX Spec: "Provides UI/UX architectural requirements"
  65. #### C. Create Initial Document
  66. Copy the template from `../architecture-decision-template.md` to `{planning_artifacts}/architecture.md`
  67. #### D. Complete Initialization and Report
  68. Complete setup and report to user:
  69. **Document Setup:**
  70. - Created: `{planning_artifacts}/architecture.md` from template
  71. - Initialized frontmatter with workflow state
  72. **Input Documents Discovered:**
  73. Report what was found:
  74. "Welcome {{user_name}}! I've set up your Architecture workspace for {{project_name}}.
  75. **Documents Found:**
  76. - PRD: {number of PRD files loaded or "None found - REQUIRED"}
  77. - UX Design: {number of UX files loaded or "None found"}
  78. - Research: {number of research files loaded or "None found"}
  79. - Project docs: {number of project files loaded or "None found"}
  80. - Project context: {project_context_rules count of rules for AI agents found}
  81. **Files loaded:** {list of specific file names or "No additional documents found"}
  82. Ready to begin architectural decision making. Do you have any other documents you'd like me to include?
  83. [C] Continue to project context analysis
  84. ## SUCCESS METRICS:
  85. ✅ Existing workflow detected and handed off to step-01b correctly
  86. ✅ Fresh workflow initialized with template and frontmatter
  87. ✅ Input documents discovered and loaded using sharded-first logic
  88. ✅ All discovered files tracked in frontmatter `inputDocuments`
  89. ✅ PRD requirement validated and communicated
  90. ✅ User confirmed document setup and can proceed
  91. ## FAILURE MODES:
  92. ❌ Proceeding with fresh initialization when existing workflow exists
  93. ❌ Not updating frontmatter with discovered input documents
  94. ❌ Creating document without proper template
  95. ❌ Not checking sharded folders first before whole files
  96. ❌ Not reporting what documents were found to user
  97. ❌ Proceeding without validating PRD requirement
  98. ❌ **CRITICAL**: Reading only partial step file - leads to incomplete understanding and poor decisions
  99. ❌ **CRITICAL**: Proceeding with 'C' without fully reading and understanding the next step file
  100. ❌ **CRITICAL**: Making decisions without complete understanding of step requirements and protocols
  101. ## NEXT STEP:
  102. After user selects [C] to continue, only after ensuring all the template output has been created, then load `./step-02-context.md` to analyze the project context and begin architectural decision making.
  103. Remember: Do NOT proceed to step-02 until user explicitly selects [C] from the menu and setup is confirmed!