Skip to content

feat: AI rewrite trigger (:rw / :rwq) — unbuilt; spec lost, decisions preserved #487

Open

Description

@Data-Wise

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

  1. Re-derive the three open questions. The originals were spec §9 and their detail is gone;
    what survives is their subjects — model choice for :rw vs :rwq, trigger naming, and
    whether a doctor health check ships in the first PR or a fast-follow.
  2. Build: Espanso YAML config matching :rw / :rwq → rewrite shell script → Gemini API
    key in Keychain (via the existing sec dispatcher).
  3. Acceptance: manual test in ≥2 Electron apps. The original acceptance criteria lived in
    the lost feature-request doc and need restating.
  4. 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

  1. changed the title [-]feat: AI rewrite trigger (:rw / :rwq) — spec ready, handoff for implementation[/-] [+]feat: AI rewrite trigger (`:rw` / `:rwq`) — unbuilt; spec lost, decisions preserved[/+] on Sep 5, 2026
  2. Data-Wise commented on Sep 5, 2026

    @Data-Wise
    OwnerAuthor

    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, the feature/ai-rewrite-trigger branch, and both doc files are gone. The branch was never pushed, so deleting the worktree destroyed its only copy; git fsck --lost-found finds 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions