# Test Plan Template ## Feature ## Scope ## Contract Under Test - Preconditions: - Inputs: - Outputs: - Postconditions: - Invariants: - Failure modes: - Side effects: ## Test Types ## Test Cases ## Regression Risks ## Acceptance Validation - [ ] Contract boundaries are verified. - [ ] Failure modes are covered. - [ ] Postconditions are observable. ## Example Feature: Export a territory Contract under test: - Preconditions: The territory exists and the user is authorized. - Inputs: Territory ID. - Outputs: A downloadable ZIP file. - Postconditions: The ZIP contains the generated XLSX and PDFs. - Invariants: The exported files are named consistently. - Failure modes: Missing territory, file write failure, or export timeout. - Side effects: Temporary export files may be created and cleaned up after download. Test focus: - Verify the export is rejected when the territory is missing. - Verify the ZIP contains both the spreadsheet and the PDFs. - Verify failed file writes are reported as errors. - Verify cleanup happens after download. --- ## Self-Evolution Protocol This file is allowed to improve over time, but only through a controlled change process. ### When to propose an update An agent may propose an update when it learns: - A recurring mistake should be prevented. - A better workflow has been proven useful. - A project-specific convention has become stable. - A prompt pattern produced better results. - A tool, framework, library, or deployment rule changed. - The Product Owner approved a new standard. ### How to update this file Agents must not silently rewrite this file. They must create an improvement proposal using: `./.ai/evolution/improvement-proposal-template.md` Every proposal must include: - File to update - Current problem - Proposed change - Reason - Risk - Rollback plan - Product Owner approval status ### Learning Log Add durable lessons here only after they are proven useful. | Date | Lesson Learned | Change Made | Approved By | |---|---|---|---| | YYYY-MM-DD | Initial baseline created. | Created file. | Product Owner |