您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

step-01-load-context.md 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. ---
  2. name: 'step-01-load-context'
  3. description: 'Load NFR requirements, evidence sources, and knowledge base'
  4. nextStepFile: '{skill-root}/steps-c/step-02-define-thresholds.md'
  5. knowledgeIndex: './resources/tea-index.csv'
  6. outputFile: '{test_artifacts}/nfr-assessment.md'
  7. ---
  8. # Step 1: Load Context & Knowledge Base
  9. ## STEP GOAL
  10. Gather NFR requirements, evidence sources, and knowledge fragments needed for the evidence audit.
  11. ## MANDATORY EXECUTION RULES
  12. - 📖 Read the entire step file before acting
  13. - ✅ Speak in `{communication_language}`
  14. - 🚫 Halt if implementation or evidence is unavailable
  15. ---
  16. ## EXECUTION PROTOCOLS:
  17. - 🎯 Follow the MANDATORY SEQUENCE exactly
  18. - 💾 Record outputs before proceeding
  19. - 📖 Load the next step only when instructed
  20. ## CONTEXT BOUNDARIES:
  21. - Available context: config, loaded artifacts, and knowledge fragments
  22. - Focus: this step's goal only
  23. - Limits: do not execute future steps
  24. - Dependencies: prior steps' outputs (if any)
  25. ## MANDATORY SEQUENCE
  26. **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
  27. ## 1. Prerequisites
  28. - Implementation accessible for evaluation
  29. - Evidence sources available (test results, metrics, logs)
  30. If missing: **HALT** and request the missing inputs.
  31. ---
  32. ## 2. Load Configuration
  33. From `{config_source}`:
  34. - Read `tea_browser_automation`
  35. ---
  36. ### Tiered Knowledge Loading
  37. Load fragments based on their `tier` classification in `tea-index.csv`:
  38. 1. **Core tier** (always load): Foundational fragments required for this workflow
  39. 2. **Extended tier** (load on-demand): Load when deeper analysis is needed or when the user's context requires it
  40. 3. **Specialized tier** (load only when relevant): Load only when the specific use case matches (e.g., contract-testing only for microservices, email-auth only for email flows)
  41. > **Context Efficiency**: Loading only core fragments reduces context usage by 40-50% compared to loading all fragments.
  42. ## 3. Load Knowledge Base Fragments
  43. From `{knowledgeIndex}` load:
  44. - `adr-quality-readiness-checklist.md`
  45. - `ci-burn-in.md`
  46. - `test-quality.md`
  47. - `playwright-config.md`
  48. - `error-handling.md`
  49. **Playwright CLI (if `tea_browser_automation` is "cli" or "auto"):**
  50. - `playwright-cli.md`
  51. **MCP Patterns (if `tea_browser_automation` is "mcp" or "auto"):**
  52. - (existing MCP-related fragments, if any are added in future)
  53. ---
  54. ## 4. Load Artifacts
  55. If available, read:
  56. - `tech-spec.md` (primary NFRs)
  57. - `PRD.md` (product-level NFRs)
  58. - `story` or `test-design` docs (feature-level NFRs)
  59. ---
  60. ## 5. Confirm Inputs
  61. Summarize loaded NFR sources and evidence availability.
  62. ---
  63. ## 6. Save Progress
  64. **Save this step's accumulated work to `{outputFile}`.**
  65. - **If `{outputFile}` does not exist** (first save), create it using the workflow template (if available) with YAML frontmatter:
  66. ```yaml
  67. ---
  68. stepsCompleted: ['step-01-load-context']
  69. lastStep: 'step-01-load-context'
  70. lastSaved: '{date}'
  71. ---
  72. ```
  73. Then write this step's output below the frontmatter.
  74. - **If `{outputFile}` already exists**, update:
  75. - Add `'step-01-load-context'` to `stepsCompleted` array (only if not already present)
  76. - Set `lastStep: 'step-01-load-context'`
  77. - Set `lastSaved: '{date}'`
  78. - Append this step's output to the appropriate section of the document.
  79. **Update `inputDocuments`**: Set `inputDocuments` in the output template frontmatter to the list of artifact paths loaded in this step (e.g., knowledge fragments, test design documents, configuration files).
  80. Load next step: `{nextStepFile}`
  81. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
  82. ### ✅ SUCCESS:
  83. - Step completed in full with required outputs
  84. ### ❌ SYSTEM FAILURE:
  85. - Skipped sequence steps or missing outputs
  86. **Master Rule:** Skipping steps is FORBIDDEN.