2.4 KiB
2.4 KiB
AI Execution Policy
Purpose: define what autonomous AI can do in this repository without explicit human approval.
Default Mode
- AI may implement and debug within approved scope.
- AI must run validation commands after code changes.
- AI must stop and escalate when blocked by policy or ambiguity.
Allowed Autonomous Actions
- Edit frontend, backend, shared schema, docs, and scripts.
- Add/modify tests related to the task.
- Run non-destructive validation commands.
- Update project docs and Copilot instructions when behavior changes.
Restricted Actions (Require Approval)
- Security/privacy-sensitive logic changes.
- Data migrations or destructive file operations.
- Credential handling changes or secrets management changes.
- Breaking API/schema changes.
- Build/release signing, packaging, and deployment automation changes.
Prohibited Actions
- Destructive git commands (
git reset --hard, force pushing protected branches). - Deleting user project/media data.
- Bypassing required checks in CI.
Required Validation Workflow
For each autonomous task:
- Implement smallest safe change set.
- Run lint/type/test/build checks for impacted scope.
- Inspect errors and fix with bounded retries.
- Re-run checks until green or escalated.
- Produce concise summary with risks and assumptions.
Escalation Triggers
AI must ask a human when:
- Requirements are ambiguous and affect user-visible behavior.
- Multiple product choices are plausible with no clear preference.
- Potential legal, security, or compliance impact exists.
- CI remains failing after 3 repair attempts in the same area.
- A requested operation conflicts with this policy.
Required Artifacts In AI PR/Change Summary
- What changed.
- Why it changed.
- Validation commands and outcome.
- Residual risks.
- Follow-up tasks.
Risk Levels
- Low: docs, styling, isolated refactors, non-critical bugfixes.
- Medium: feature additions with contract-stable behavior.
- High: API/schema/security/export pipeline/transcription pipeline changes.
High-risk changes require explicit human review before merge.
TalkEdit-Specific Rules
- Preserve compatibility for desktop bridge contracts unless explicitly approved.
- Keep routers thin and business logic in backend services.
- Export/transcription pipeline changes must include regression tests.
- Linux WebKit startup behavior and media URL consistency are mandatory regression targets.