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

Go Strike Your Own

~11 min · build-your-own, conceptual-opensourcing, closer, where-to-next

Level 0Cold Flint
0 XP0/34 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete
"You didn't come here for a repo. You came for enough of the shape to make your own spark."

You Have the Shape

By now you have every piece: how to claim a system-wide chord with Carbon, how to read a selection out of any app through Accessibility (and probe the opaque ones), how to borrow a brain across a narrow seam, how to prove a target before you paste and fall to the clipboard when you can't, and how to hold a broad permission with narrow hands. Those aren't a description of Flint so much as a kit for a category of tool: the system-wide, hotkey-shaped gesture over borrowed intelligence. You have the shape. The rest is assembly.

The Minimum Viable Strike

The smallest honest version fits in one small class. A hotkey center registers a chord. The chord captures the target (refusing secure fields), renders a prompt, borrows a brain, and places the result through the guarded insertion path. That's a working strike — everything else in Flint is refinement around this core: the palette, the per-macro vault dial, the opaque-target reproduction, the remote wire. Start from the minimum, get one clean replacement with one clean undo, and grow only the parts you actually need.

MINIMUM VIABLE STRIKE
---------------------
1. register a chord            (Carbon: Track 2)
2. capture selection + target  (AX / copy probe: Track 3)
     refuse secure fields      (Track 7)
3. render {input}, borrow brain (apply-free: Track 4/5)
4. prove target, then insert    (guarded insertion: Track 6)
     or fall to the clipboard

Everything else is refinement around these four steps.

Borrow Any Brain

Flint borrows a specific family brain, but the seam is generic on purpose: anything that turns a prompt into transformed text can sit behind that applyFree call — a local model on your own machine, your own small server, whatever you own and trust. The lesson isn't 'use this brain'; it's 'keep the seam narrow so the brain is swappable.' Build the gesture once, and the intelligence becomes a decision you can revisit forever without touching the parts that grab and place the text.

A small tool you built yourself is worth more than a large one you configured. The reason to build your own strike isn't that no product does text transformation — plenty do. It's that owning the loop end to end leaves you with the understanding, the trust, and the freedom to change it, none of which a configured product gives you. Build the small thing, own the whole loop, and keep the lessons; that trade beats renting convenience every time the job is one you do constantly.
This is where the fire family points you next. Flint is the strike; its siblings are other gestures over the same borrowed brain — the voice-side dictation layer that inserts what you say, the editor-side rewrite that lives one keystroke deep inside your writing. Each is the same lesson pointed at a different surface: own the gesture, borrow the intelligence, prove before you act. You've built the strike in your head. Go strike your own — the flint was never the code, it was knowing where to hit.

Code

The whole quest, assembled into one minimum strike·swift
final class MiniFlint {
    let hotkeys = HotkeyCenter()          // Track 2
    let brain: BrainClient                // Track 4: borrowed, swappable

    func bind(keyCode: UInt32, mods: UInt32, template: String) {
        hotkeys.register(id: 1, keyCode: keyCode, carbonModifiers: mods) {
            Task { await self.strike(template: template) }
        }
    }

    func strike(template: String) async {
        guard AXIsProcessTrusted() else { return }         // Track 7: guard the cost
        guard let target = snapshot(), !target.isSecure    // Track 3 + 7
        else { return }
        let prompt = template.replacingOccurrences(         // Track 5
            of: "{input}", with: target.selection ?? "")
        let result = await brain.applyFree(prompt: prompt, // Track 4
                                           vault: .bypassVault)
        place(result, into: target)                        // Track 6: prove, then
    }                                                      //   insert or clipboard
}
// Four tracks of ideas, one small class. That's your spark. Now grow it.

External links

Exercise

Sketch the minimum viable strike for a gesture you'd actually use — it doesn't have to be text. Name your four steps (claim a trigger, capture the input, borrow or compute the transformation, place the result safely) and, for each, the one hard question you'd have to answer that a framework won't answer for you. Then decide the single refinement you'd add first once the minimum works.
Hint
The four steps map directly onto the quest: a trigger (a chord, a menu, an event), capturing the input safely (and refusing what you must not touch), the transformation (borrowed across a narrow seam or computed locally), and placing the result with proof-then-fallback. The hard questions are the boundary, the refusal, the proof, and the restraint — the same four the whole quest answered for text. Your first refinement is whichever of Flint's extras (palette, per-item tuning, opaque-target handling) your specific gesture needs most.

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.