3.4 KiB
3.4 KiB
AI Dev Plan (Must-Haves Only)
Purpose
This is the minimum implementation needed for AI to reliably build, test, and debug TalkEdit with high confidence.
Target: reliable 80-90% autonomous implementation/debugging on scoped tasks.
Must-Have Pillars
1. Single Validation Command
Required:
- One command that runs lint, build, backend tests, and smoke checks.
- Works locally and in CI.
Current status:
- Implemented via scripts/validate-all.sh.
- Enforced in CI via .github/workflows/validate-all.yml.
2. CI Quality Gate
Required:
- Pull requests fail if validation fails.
- Failures produce diagnostics artifacts.
Current status:
- Implemented in .github/workflows/validate-all.yml.
- Diagnostics collected by scripts/collect-diagnostics.sh on failure.
3. Spec Requirement for Feature Changes
Required:
- Feature code changes must include a spec file update.
- Spec format must be standardized.
Current status:
- Implemented via scripts/check-feature-spec.sh.
- Spec template exists at docs/spec-template.md.
- Specs folder guidance exists at docs/specs/README.md.
4. Backend Contract Test Coverage
Required:
- Router-level contract tests for success and error paths.
- Tests are deterministic and mock heavy services.
Current status:
- Implemented in backend/tests/test_router_contracts.py.
- Cache utility baseline tests implemented in backend/tests/test_cache_utils.py.
5. Error-Tolerant Router Contracts
Required:
- Expected client errors must remain 4xx.
- Server failures must return 5xx with useful detail.
Current status:
- Implemented for captions/export HTTPException passthrough.
- Covered by contract tests.
6. Basic Autonomy Policy
Required:
- Clear autonomous scope and escalation rules.
- Clear restrictions for high-risk changes.
Current status:
- Implemented in docs/ai-policy.md.
Must-Have Remaining Work
No remaining must-have items.
Completed in this pass:
- Added lightweight frontend tests and integrated them into scripts/validate-all.sh.
- Added pull request template with required spec link and acceptance criteria checklist.
- Added endpoint-level contract assertions for /file range requests and /audio/waveform cache-hit/cache-miss behavior.
- Confirmed scripts/validate-all.sh passes end-to-end with frontend tests + expanded backend contracts.
Out of Scope for Must-Have Baseline
Useful later, but not required for strong day-to-day autonomous implementation:
- Full quality dashboards.
- Advanced autonomy telemetry.
- Complete long-term governance expansion.
- High-autonomy optimization beyond 90% reliability target.
Definition of Done (Must-Have Plan)
Must-have plan is complete when all are true:
- scripts/validate-all.sh passes locally and in CI.
- Feature PRs without spec updates are blocked.
- Backend router contracts cover core success and error paths.
- Frontend has at least one stable test command integrated into validation.
- AI policy + diagnostics workflow are active.
Current State Summary
Completed:
- Validation and CI enforcement.
- Diagnostics capture.
- Spec policy and templates.
- Backend contract test foundation (including AI endpoints).
- Core router error-path correctness.
- Autonomy policy baseline.
- Frontend test command integrated into validation.
- PR template requirement added.
- /file and /audio/waveform contract assertions implemented.
Remaining:
- No must-have items remaining.