Files
TalkEdit/AI_dev_plan.md

130 lines
3.4 KiB
Markdown
Raw Normal View History

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