Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

step-01-load-context.md 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. ---
  2. name: 'step-01-load-context'
  3. description: 'Resolve coverage oracle, load knowledge base, and gather related artifacts'
  4. nextStepFile: '{skill-root}/steps-c/step-02-discover-tests.md'
  5. knowledgeIndex: './resources/tea-index.csv'
  6. outputFile: '{test_artifacts}/traceability-matrix.md'
  7. ---
  8. # Step 1: Resolve Coverage Oracle & Load Knowledge Base
  9. ## STEP GOAL
  10. Resolve the best available coverage oracle, capture confidence and provenance, and gather supporting artifacts for traceability.
  11. ## MANDATORY EXECUTION RULES
  12. - 📖 Read the entire step file before acting
  13. - ✅ Speak in `{communication_language}`
  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, source tree, 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. Resolve Coverage Oracle
  27. At least one of the following must be usable:
  28. - Formal requirements (story/epic acceptance criteria, PRD, test design)
  29. - Contract/spec artifacts (OpenAPI, GraphQL schema, protobuf, etc.)
  30. - External pointers to a requirements source that can be resolved through installed adapters/MCPs
  31. - Analyzable source code that supports synthetic journey/requirement inference
  32. Tests exist OR gaps are explicitly acknowledged.
  33. Resolve the oracle in this order:
  34. 1. **Formal requirements first**
  35. - Story/epic acceptance criteria
  36. - PRD / test design / tech spec
  37. - Inline requirements provided by the user
  38. 2. **Contract/spec artifacts second**
  39. - OpenAPI / Swagger
  40. - GraphQL schema or SDL
  41. - Other machine-readable contract definitions
  42. 3. **External pointers third**
  43. - Placeholder files that point to external trackers or docs such as Jira, Linear, Confluence, shared docs, or other systems of record
  44. - Follow the pointer automatically only when a compatible adapter/plugin/MCP is available in the active runtime
  45. - Record `externalPointerStatus` as one of: `not_used`, `resolved`, `skipped`, or `unavailable`
  46. 4. **Synthetic oracle last**
  47. - If no formal oracle exists and `allow_synthetic_oracle` is enabled, inspect `{source_dir}` to infer a provisional trace target
  48. - For UI apps, infer journeys from:
  49. - routes/pages/screens/layout entry points
  50. - navigation flows and feature entry links
  51. - forms, submit actions, create/update/delete paths
  52. - auth/session/logout/role-gated flows
  53. - loading, empty, validation, error, and permission-denied states
  54. - feature flags and major conditional branches
  55. - Deduplicate the inferred items into a compact, traceable list (prefer 5-12 items)
  56. - Assign stable IDs such as `J-01`, `J-02`, etc.
  57. - Assign provisional priorities using `test-priorities-matrix.md`
  58. - `P0`: auth, checkout/payment, destructive data changes, revenue-critical, hard blockers to core use
  59. - `P1`: primary user journeys and common CRUD paths
  60. - `P2`: secondary workflows and edge scenarios
  61. - `P3`: low-risk polish or optional flows
  62. Record the resolved oracle metadata in step output/frontmatter using consistent keys:
  63. - `coverageBasis` (`acceptance_criteria` | `synthetic_requirements` | `openapi_endpoints` | `user_journeys`) — the type of oracle selected for coverage tracing
  64. - `oracleResolutionMode` (`formal_requirements` | `spec_artifact` | `external_pointer` | `synthetic_source`) — how the oracle was discovered/resolved
  65. - `oracleConfidence` (`high` | `medium` | `low`) — confidence in the resolved oracle as a coverage source
  66. - `oracleSources` — list of artifact paths, URIs, or references used to resolve the oracle
  67. - `externalPointerStatus` (`not_used` | `resolved` | `skipped` | `unavailable`) — status of external pointer resolution when pointer files are present
  68. If none of the four oracle types can be resolved, **HALT** and request the smallest missing clarification needed to continue.
  69. ---
  70. ## 2. Load Knowledge Base
  71. From `{knowledgeIndex}` load:
  72. - `test-priorities-matrix.md`
  73. - `risk-governance.md`
  74. - `probability-impact.md`
  75. - `test-quality.md`
  76. - `selective-testing.md`
  77. ---
  78. ## 3. Load Artifacts
  79. If available:
  80. - Story file and acceptance criteria
  81. - Test design doc (priorities)
  82. - Tech spec / PRD
  83. - OpenAPI or similar contract/spec files
  84. - Placeholder files that reference external requirements systems
  85. - Route maps, page/screen registries, and other source files used for synthetic journey inference
  86. Summarize what was found and explicitly state the resolved oracle, its confidence, and why that oracle was selected.
  87. ---
  88. ### 4. Save Progress
  89. **Save this step's accumulated work to `{outputFile}`.**
  90. - **If `{outputFile}` does not exist** (first save), create it using the workflow template (if available) with YAML frontmatter:
  91. ```yaml
  92. ---
  93. stepsCompleted: ['step-01-load-context']
  94. lastStep: 'step-01-load-context'
  95. lastSaved: '{date}'
  96. coverageBasis: '{resolved coverage_basis}'
  97. oracleConfidence: '{resolved oracle_confidence}'
  98. oracleResolutionMode: '{resolved oracle_resolution_mode}'
  99. oracleSources: ['{resolved oracle source 1}', '{resolved oracle source 2}']
  100. externalPointerStatus: '{resolved external_pointer_status}'
  101. ---
  102. ```
  103. Then write this step's output below the frontmatter.
  104. - **If `{outputFile}` already exists**, update:
  105. - Add `'step-01-load-context'` to `stepsCompleted` array (only if not already present)
  106. - Set `lastStep: 'step-01-load-context'`
  107. - Set `lastSaved: '{date}'`
  108. - Set `coverageBasis` to the resolved oracle basis
  109. - Set `oracleConfidence` to the resolved oracle confidence
  110. - Set `oracleResolutionMode` to the resolved oracle resolution mode
  111. - Set `oracleSources` to the resolved oracle sources
  112. - Set `externalPointerStatus` to the resolved external pointer status
  113. - Append this step's output to the appropriate section of the document.
  114. Load next step: `{nextStepFile}`
  115. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
  116. ### ✅ SUCCESS:
  117. - Step completed in full with required outputs
  118. ### ❌ SYSTEM FAILURE:
  119. - Skipped sequence steps or missing outputs
  120. **Master Rule:** Skipping steps is FORBIDDEN.