2.2 KiB
F3 Rewrite Auto-Approval Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Remove the F3 reviewer confirmation while preserving the persisted rewrite and normal phase transition.
Architecture: rewrite_question owns the ordered document write, decision recording, and phase advance. The F3 skill calls it once, without a reviewer widget.
Tech Stack: JavaScript Pi extension, Python tht CLI, Node test runner, pytest.
Global Constraints
- Preserve the eight phase numbers,
question.md, andquestion_rewrittenledger type. - Never write decisions or advance phases outside F3.
- Use
thtcommands with--sessionafter the command group.
Task 1: Test and implement automatic F3 completion
Files:
-
Modify:
harness/.pi/extensions/tht-gate.js -
Test:
harness/.pi/extensions/gate/__tests__/gate_rewrite_auto_approval.test.js -
Add a fake Pi integration test that invokes the registered
rewrite_questiontool at F3 and asserts these calls in order:session set-question,decision add question_rewritten,phase advance. -
Run
cd harness && npm test -- --test-name-pattern="rewrite question"and observe failure because the current tool only writes the document. -
Make
rewrite_questionreject non-F3 sessions, record the decision after a successful write, advance after a successful decision, and return a no-widget completion message. -
Re-run the focused test and then
cd harness && npm test.
Task 2: Remove the F3 reviewer instruction
Files:
-
Modify:
harness/.pi/skills/tht-sessione/SKILL.md -
Replace the F3
reviewer_decideandreviewer_confirmprocedure with one directrewrite_questioncall and an explicit prohibition on reviewer widgets.
Task 3: Verify workflow compatibility
Files:
-
Test:
harness/tests/test_workflow.py -
Test:
harness/tests/test_phase_effective.py -
Run
cd harness && .venv/bin/pytest -q tests/test_workflow.py tests/test_phase_effective.py. -
Run
cd harness && .venv/bin/pytest -q.