C.W.K.
Stream
Lesson 04 of 04 · published

CMD+K Is a Client, Not a Feature

~10 min · cmd-k, prompt-macro, reuse, four-pillars

Level 0Cold Draft
0 XP0/33 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete
"CMD+K didn't build an AI editor. It put a new window onto one that already existed."

Not a New Feature — a New Client

It's easy to describe CMD+K as "Rekindle's AI rewrite feature," but that framing hides the actual architecture. CMD+K is a new client of cwkPippa's Prompt Macro — the same macro engine other surfaces already use — exposed thinly on the inline editing surface. Rekindle didn't build a rewrite engine; it built a doorway to one that already exists in the brain it binds to. The judgment lives in cwkPippa; CMD+K is just where you reach it from inside a line of prose.

What "Reuse the Engine" Buys

Reusing the Prompt Macro instead of reinventing it pays on every axis. There's one macro engine to maintain, not two that drift apart. Improvements to Prompt Macro upstream arrive in Rekindle for free. And the behavior is consistent — a macro means the same thing in Rekindle as everywhere else in the family. This is the family's Reuse pillar in action: when the capability already exists in the brain, a new surface is a client, never a fork.

// CMD+K is a thin client: it calls the EXISTING Prompt Macro and
// renders the result as an inline diff. No new judgment engine.
const rewrite = await promptMacro.run({ macro: "polish", text: selection });
showInlineDiff(view, { from, to, replacement: rewrite });

// The engine lives in cwkPippa. CMD+K is just a new doorway to it.

The UX Is Borrowed Too

Even the interaction is borrowed, not invented: Cursor's CMD+K is the UX inspiration — select, invoke, see a proposal, accept or reject inline. Rekindle takes that shape and points it at the Prompt Macro. So CMD+K borrows on two levels at once: the engine from cwkPippa (reuse), and the interaction shape from Cursor (a proven pattern). Neither is reinvented. That double-borrow is why a feature that feels like magic was cheap to build — it's a thin bridge between two things that already worked.

Code

A thin client over the existing Prompt Macro·typescript
// CMD+K does NOT contain a rewrite engine. It calls the one that
// already exists in cwkPippa, then renders the result inline.
async function runCmdK(view, selection) {
  const { from, to } = selection;
  const rewrite = await promptMacro.run({
    macro: "polish",          // an existing macro in cwkPippa
    text: view.state.sliceDoc(from, to),
  });
  // Show it as an inline diff (Track 4's decoration job) — mutate on accept.
  showInlineDiff(view, { from, to, replacement: rewrite });
}

// Engine: reused from cwkPippa. Interaction: borrowed from Cursor.
// Rekindle's job is only the thin bridge between them.

External links

Exercise

Think of a capability that exists in one part of a system you know (a search, a formatter, an auth check). Now imagine adding it to a new screen. Sketch it two ways: as a reimplementation, and as a thin client of the existing capability. List what the client version saves you over the next year of maintenance. That list is why CMD+K is a client.
Hint
The client version saves you: one place to fix bugs, one place to improve, guaranteed-consistent behavior, and no drift between two copies. The reimplementation buys you short-term independence and a long-term second thing to keep in sync — usually a bad trade inside one system.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.