The full develop-validate-test-review-improve loop. Use as the primary workflow after implementing any feature or fix.
Run the full agent development loop: plan -> validate -> test -> review -> improve (repeat until all pass).
Project config: Read
harness.config.shat the project root to getHARNESS_PROJECT_SLUGand command prefixes.
TEST PLAN --> VALIDATE --> TEST --> REVIEW --> (all pass?) --> DOC CHECK --> DONE
^ | no | no
+---------- IMPROVE <--------------+<-------------+
Max iterations: 5. If not converging, stop and report what was tried.
Analyze what changed and produce a test contract and a doc contract.
Run git diff main --name-only to identify changed files. Group changes into independently testable features F1, F2, ..., Fn.
Score each feature:
| Axis | Low | Medium | High |
|---|---|---|---|
| Blast radius | Internal helper | Single endpoint | Cross-service, user-facing |
| Likelihood of failure | Simple CRUD | New logic, follows patterns | New integration, async |
| Detection difficulty | Loud crash (500) | Wrong response shape | Silent wrong data |
Any axis High -> CRITICAL. Two Medium -> HIGH. Otherwise MEDIUM/LOW.
CRITICAL/HIGH: happy path + boundary + error + auth. MEDIUM: happy path + 1 error. LOW: 1 smoke test.
Write to /tmp/.test-contract-officeplane.md:
# Test Contract — [feature description]
Generated: [timestamp]
## Features
| # | Feature | Risk | Required Layers |
|---|---------|------|-----------------|
| F1 | ... | CRITICAL | pytest, manual |
## Required Test Cases
- [ ] F1: Happy path — [description] [pytest] CRITICAL
- [ ] F1: Error path — [description] [pytest] HIGH
Write to /tmp/.doc-contract-officeplane.md:
# Doc Contract — [feature description]
Generated: [timestamp]
## Required Doc Updates
- [ ] CLAUDE.md updated for new endpoint [HIGH]
- [ ] docs/ updated [MEDIUM]
## Not Applicable
- ...
./scripts/check-all.sh
Pipeline: ruff check -> ruff format -> pytest -> tsc -> eslint -> build.
Hard failure -> fix and re-run. Advisory warnings -> note and continue.
docker compose exec -T api python -m pytest tests/ -x -q
If frontend changed:
cd ui && npm run build
Use curl against localhost:8001 for API endpoints. Check every [manual] item in the contract.
If any test fails -> fix, return to Step 1.
Run specialized agent reviews based on what changed:
.py files -> arch-guardian, security-auditor.ts/.tsx files -> ui-guardianWhen delegating to test-inspector, include:
Read the test contract at
/tmp/.test-contract-officeplane.md. For each unchecked CRITICAL/HIGH item, verify whether a test exists. If covered, change- [ ]to- [x]. Uncovered CRITICAL/HIGH = FAIL.
Run applicable reviewers in parallel.
Any FAIL -> fix, return to Step 1. Only WARN -> continue.
For major features only — delegate to entropy-sweeper with --dry-run.
Verify the doc contract at /tmp/.doc-contract-officeplane.md:
- [ ] item, check if the doc was updatedWhen all checks pass:
touch /tmp/.claude-reviewed-officeplane