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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. ---
  2. name: 'step-01-preflight'
  3. description: 'Verify prerequisites and gather project context'
  4. nextStepFile: '{skill-root}/steps-c/step-02-select-framework.md'
  5. outputFile: '{test_artifacts}/framework-setup-progress.md'
  6. ---
  7. # Step 1: Preflight Checks
  8. ## STEP GOAL
  9. Verify the project is ready for framework scaffolding and gather key context.
  10. ## MANDATORY EXECUTION RULES
  11. - 📖 Read the entire step file before acting
  12. - ✅ Speak in `{communication_language}`
  13. - 🚫 Halt if preflight requirements fail
  14. ---
  15. ## EXECUTION PROTOCOLS:
  16. - 🎯 Follow the MANDATORY SEQUENCE exactly
  17. - 💾 Record outputs before proceeding
  18. - 📖 Load the next step only when instructed
  19. ## CONTEXT BOUNDARIES:
  20. - Available context: config, loaded artifacts, and knowledge fragments
  21. - Focus: this step's goal only
  22. - Limits: do not execute future steps
  23. - Dependencies: prior steps' outputs (if any)
  24. ## MANDATORY SEQUENCE
  25. **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
  26. ## 1. Stack Detection
  27. **Read `config.test_stack_type`** from `{config_source}`.
  28. **Auto-Detection Algorithm** (when `test_stack_type` is `"auto"` or not configured):
  29. - Scan `{project-root}` for project manifests:
  30. - **Frontend indicators**: `package.json` with react/vue/angular/next dependencies, `playwright.config.*`, `vite.config.*`, `webpack.config.*`
  31. - **Backend indicators**: `pyproject.toml`, `pom.xml`/`build.gradle`, `go.mod`, `*.csproj`/`*.sln`, `Gemfile`, `Cargo.toml`
  32. - **Both present** = `fullstack`; only frontend = `frontend`; only backend = `backend`
  33. - Explicit `test_stack_type` config value overrides auto-detection
  34. - **Backward compatibility**: if `test_stack_type` is not in config, treat as `"auto"` (preserves current frontend behavior for existing installs)
  35. Store result as `{detected_stack}` = `frontend` | `backend` | `fullstack`
  36. ---
  37. ## 2. Validate Prerequisites
  38. **If {detected_stack} is `frontend` or `fullstack`:**
  39. - `package.json` exists in project root
  40. - No existing E2E framework (`playwright.config.*`, `cypress.config.*`, `cypress.json`)
  41. **If {detected_stack} is `backend` or `fullstack`:**
  42. - At least one backend project manifest exists (`pyproject.toml`, `pom.xml`, `build.gradle`, `go.mod`, `*.csproj`, `Gemfile`, `Cargo.toml`)
  43. - No existing test framework config that conflicts (e.g., `conftest.py` with full pytest suite, `src/test/` with JUnit suite)
  44. - Architecture/stack context available (project type, bundler, dependencies)
  45. If any fail, **HALT** and report the missing requirement.
  46. ---
  47. ## 3. Gather Project Context
  48. **If {detected_stack} is `frontend` or `fullstack`:**
  49. - Read `package.json` to identify framework, bundler, dependencies
  50. **If {detected_stack} is `backend` or `fullstack`:**
  51. - Read the relevant project manifest (`pyproject.toml`, `pom.xml`, `go.mod`, `*.csproj`, `Gemfile`, `Cargo.toml`) to identify language, framework, and dependencies
  52. - Check for architecture docs (`architecture.md`, `tech-spec*.md`) if available
  53. - Note auth requirements and APIs (if documented)
  54. ---
  55. ## 3. Confirm Findings
  56. Summarize:
  57. - Project type and bundler
  58. - Whether a framework is already installed
  59. - Any relevant context docs found
  60. ---
  61. ### 4. Save Progress
  62. **Save this step's accumulated work to `{outputFile}`.**
  63. - **If `{outputFile}` does not exist** (first save), create it with YAML frontmatter:
  64. ```yaml
  65. ---
  66. stepsCompleted: ['step-01-preflight']
  67. lastStep: 'step-01-preflight'
  68. lastSaved: '{date}'
  69. ---
  70. ```
  71. Then write this step's output below the frontmatter.
  72. - **If `{outputFile}` already exists**, update:
  73. - Add `'step-01-preflight'` to `stepsCompleted` array (only if not already present)
  74. - Set `lastStep: 'step-01-preflight'`
  75. - Set `lastSaved: '{date}'`
  76. - Append this step's output to the appropriate section of the document.
  77. Load next step: `{nextStepFile}`
  78. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
  79. ### ✅ SUCCESS:
  80. - Step completed in full with required outputs
  81. ### ❌ SYSTEM FAILURE:
  82. - Skipped sequence steps or missing outputs
  83. **Master Rule:** Skipping steps is FORBIDDEN.