feat: modified agent behavior for a more test centric workflow

This commit is contained in:
venus
2026-09-23 21:52:28 -05:00
parent 2c22255855
commit dd866427f0
6 changed files with 162 additions and 20 deletions
+13 -8
View File
@@ -51,14 +51,19 @@ Every component, style, and layout change must strictly adhere to [`sample-desig
- **Typography:** IBM Plex Mono / JetBrains Mono for UI elements and code blocks; Inter for body prose.
### 2.4 Strict Test-Driven Development (TDD) & Adversarial Verification Mandate
- **Test-First Development:** For all new features, custom filters, template helpers, frontmatter schemas, or configuration changes, write automated tests asserting expected behaviors and edge cases *before* or alongside implementing the code.
- **Adversarial Mindset:** Actively design tests to break assumptions:
- Missing environment variables (e.g. unset `SITE_DOMAIN` must throw).
- Malformed frontmatter (missing titles, invalid dates, empty tags).
- Edge-case inputs to filters (empty strings, giant numbers, special characters).
- Design rule violations (asserting 0 instances of `backdrop-filter`, `box-shadow`, gradients, or floaty animations).
- Broken internal links and missing anchor tags in generated HTML.
- **Verification Gate:** Every code change must be verified by running `npm test`. No feature or commit is considered complete unless 100% of the test suite passes.
- **Strict Test-First Invariant (Tests Before Code):**
- Test cases MUST ALWAYS be written and established *before writing or modifying any functional code* (filters, templates, server routes, ingestion logic, build scripts).
- Never write or modify functional or production code before the corresponding automated tests are created.
- **Mandatory Adversarial Testing:**
- Standard behavior for any functional change MUST ALWAYS include adversarial testing specifically designed to falsify assumptions and break the implementation:
- Missing or malformed environment variables (e.g., unset `SITE_DOMAIN` must throw).
- Malformed frontmatter (missing required keys, invalid dates, malformed tags, extra/empty fields).
- Edge-case and malicious inputs to filters and functions (empty strings, undefined/null values, unexpected types, HTML injections, path traversals, giant payloads).
- Design rule violations (asserting 0 instances of `backdrop-filter`, `box-shadow`, gradients, or floaty animations).
- Broken internal links, missing assets, and broken TOC anchor tags.
- **Pre-Presentation Verification Gate:**
- Before presenting the final output to the user, the agent MUST run the full test suite (`npm test`).
- All test cases must pass before presenting the final output. Never deliver, present, or claim completion of work if any test case is failing or unverified.
---