fix: auto-approve phase 3 rewrite

This commit is contained in:
User
2026-07-14 13:51:39 +02:00
parent c7d586aaf7
commit 1b1554b353
5 changed files with 169 additions and 13 deletions
@@ -0,0 +1,15 @@
# F3 Rewrite Auto-Approval Design
## Goal
Remove the redundant human confirmation titled "Conferma riscrittura della domanda" while retaining Phase 3, its deterministic `question.md` artifact, and its audit trail.
## Design
The existing privileged `rewrite_question` tool becomes the owner of F3 completion. It writes `question.md`, records `question_rewritten` with the full rewritten question, then advances F3. It refuses calls outside F3. The orchestration skill calls this tool directly and must not emit `reviewer_decide` or `reviewer_confirm` in F3.
If the write fails, it records nothing. If decision recording fails, it does not advance. If the advance fails, the persisted artifact and decision remain for a safe retry. Phase numbers, workflow YAML, artifact paths, decision type, and old sessions remain compatible.
## Tests
Gate coverage will verify ordered CLI calls and F3-only protection. The existing Python phase tests will verify the unchanged workflow invariant.