Repository navigation
feat: AI rewrite trigger (:rw / :rwq) — unbuilt; spec lost, decisions preserved #487
Description
AI Rewrite Trigger (:rw / :rwq) — unbuilt
Body rewritten 2026-09-05. The original was a session handoff pointing at a worktree,
branch, and spec file that no longer exist. Those pointers are removed below so a future
session does not try to resume from them. Nothing about this feature was ever built or
rejected — it is still wanted, it just has to start from the decisions recorded here.
The problem
Apple Intelligence's Writing Tools right-click menu does not work inside Electron apps
(Claude Desktop, Claude Code) — those apps use custom text fields rather than native AppKit
components, so the system menu never appears. :rw / :rwq would provide an
app-independent rewrite trigger via Espanso.
What is lost, and what is not
Lost. docs/specs/SPEC-ai-rewrite-trigger.md and
docs/FEATURE-REQUEST-ai-rewrite-trigger.md were written and committed only to
feature/ai-rewrite-trigger, which was never pushed (1 local commit). The worktree was
deleted on 2026-07-07 during a cleanup sweep, taking the branch's only copy with it. Verified
2026-09-05: no such branch locally or on origin, neither file on dev, and
git fsck --lost-found surfaces no recoverable dangling commit. A pushed branch would have
survived; an unpushed one did not.
Not lost. The four decisions the spec existed to record were also summarized in this
issue, so they survive:
| Decision | Ruling |
|---|---|
| Which repo owns it | flow-cli — a rewrite trigger is OS-layer, not Claude Code orchestration (craft) or skill content (savant) |
| Backend | Gemini API direct for both triggers — zero Anthropic token cost, and the existing Google allocation makes cost a non-issue |
| Scope | :rws, :rwp, and a model router are explicitly parked — do not build them in the first pass |
| Backend to avoid | Not Antigravity CLI (agy) — it drops stdout under non-TTY capture ($(...) hangs or dies silently; it leaves a descendant attached to stdout), which is exactly how Espanso would invoke it. Independently hit and worked around in PR #491 via temp-file capture |
What a fresh start needs
- Re-derive the three open questions. The originals were spec §9 and their detail is gone;
what survives is their subjects — model choice for:rwvs:rwq, trigger naming, and
whether adoctorhealth check ships in the first PR or a fast-follow. - Build: Espanso YAML config matching
:rw/:rwq→ rewrite shell script → Gemini API
key in Keychain (via the existingsecdispatcher). - Acceptance: manual test in ≥2 Electron apps. The original acceptance criteria lived in
the lost feature-request doc and need restating. - Push the branch this time — see above.
Status
Open and unbuilt. No worktree, no branch, no spec. Close this only as a decision not to build
the feature, not as "already done."
Activity
docs(status): resync .STATUS after two-month gap (v7.16.0 -> v7.17.2)
[-]feat: AI rewrite trigger (:rw / :rwq) — spec ready, handoff for implementation[/-][+]feat: AI rewrite trigger (`:rw` / `:rwq`) — unbuilt; spec lost, decisions preserved[/+]Data-Wise commentedon Sep 5, 2026
Rewrote the title and body (2026-09-05). The previous version said "spec ready, handoff for implementation" and told a resuming session to
cd ~/.git-worktrees/flow-cli/feature-ai-rewrite-trigger— that worktree, thefeature/ai-rewrite-triggerbranch, and both doc files are gone. The branch was never pushed, so deleting the worktree destroyed its only copy;git fsck --lost-foundfinds nothing recoverable.The original body is preserved in this issue's edit history. Nothing was decided against here — the four architecture/backend rulings are carried into the new body, and the feature remains open and unbuilt.
chore: record 2026-09-05 backlog cleanup in .STATUS; ignore .token-op…
docs: optimize CLAUDE.md and record session wrap-up in .STATUS
fix(zsh): harden _radian_version_check against a contaminated version…
docs: add session-close report for 2026-09-14