agents: require red-proof in TDD cycle

This commit is contained in:
2026-05-05 09:07:42 -04:00
parent 252229593d
commit 069276b8ee

View File

@@ -8,9 +8,11 @@ It is read by agents working on the Memex / Passepartout project.
All development MUST follow this cycle, beginning to end:
1. **Start in REPL** — Everything begins and ends in the Passepartout REPL (port 9105)
2. **TDD in REPL**:
1. Write a test (use `passepartout: deftest` or equivalent)
2. Run the test → it should FAIL
2. **TDD in REPL** — Red-Green-Refactor cycle:
1. Write a FAILING test first (use `(passepartout:deftest name ...)` or `fiveam:test`)
2. **Prove RED**: Run `(passepartout:run-test 'test-name)` — it MUST fail.
If it passes before code exists, the test is broken or testing nothing.
Record the failure output.
3. Develop code in REPL to make the test pass
4. Use lisp-structural-check to validate code while developing
5. Evaluate forms with `eval-defun` or equivalent
@@ -140,6 +142,7 @@ The TUI process has its own REPL for live development:
## When Done Means
- Red proof recorded: Test was run and confirmed FAILING before implementation code existed
- Tests pass: `(passepartout:run-tests)` returns success
- Code validated: `lisp-structural-check` returns `(values t nil)`
- Org reflected: Code exists in .org source file
@@ -148,7 +151,7 @@ The TUI process has its own REPL for live development:
## Boundaries
- **Always do**: Use REPL first for all development, use TDD, validate with lisp-structural-check
- **Always do**: Use REPL first for all development, use TDD, prove tests fail FIRST before writing code, validate with lisp-structural-check
- **Ask first**: Before editing .lisp directly (skip org), before deploying, before git commit
- **Never do**: Edit .lisp files manually (they're autogenerated), skip validation before commit