English · 한국어
Claude Code Skill · Machine in the Loop

You hold the keyboard.
The machine works the loop.

jarvis is a watch loop that stays at your side while you write code yourself, watching the changes and automatically waking the pair navigator Jarvis only at the moments that matter. The human writes the code; the AI stays an observer.

/loop /jarvis strength=medium risk=**/*payment* debounce=90s
Why We Built It · The Philosophy

Machine in the Loop

An approach to AI pair development that preserves authorship. jarvis isn't just an automation tool — it starts from a single stance: the author of the code must remain the human, all the way through.

Why 'Jarvis' · The Name

Jarvis amplifies Tony Stark's abilities. But the one who suits up, fights, and makes the calls is always Tony — he takes information and assistance from Jarvis, but he never hands over the controls. Jarvis lifts him up from the side; the decisions and the actions are Tony's.

Today's coding agents tend to go the opposite way. Not because automation is too capable, but because they build a "it's my code, yet I'm not in the cockpit" structure — one that pushes the human out of the decision loop.

That's why the name is Jarvis — an AI that keeps the human in the cockpit.

Get Started · Quick Start

Up and watching in three steps

Install, restart, launch. The first run asks you for a strength once — then jarvis watches your changes while you write the code, and wakes a pair-navigator only when it matters. It never edits your code.

1

Install into your project

The installer asks you to pick a language — English / Korean.

curl -fsSL https://raw.githubusercontent.com/pinguding/Project-Machine-in-the-loop/main/install.sh | bash
2

Restart Claude Code

Hooks and the status line load at session start.

3

Start the watch

/loop /jarvis

That's it. Jarvis wakes only when new change has accrued, a risk path was touched, or a commit boundary was crossed.

Common variations
/loop /jarvis strength=high # check small changes often /loop /jarvis strength=low # only big chunks, rarely /loop /jarvis risk=**/*payment* # risk paths warn immediately, any size /loop /jarvis mirror=off # turn off the gray-zone mirror (on by default) /loop /jarvis plan=PROJ-1234 # opt into plan mode, based on that Jira ticket
Stop / pause

interrupt the loop (Esc)

Resume

/loop /jarvis · restores saved settings

Full reset

/jarvis-reset

⚠️ Launch as /loop /jarvis with no interval. /loop 5m /jarvis runs on a fixed schedule and ignores jarvis's own active / idle / strength pacing.
The Two Loops

Human in the loop ✗ vs Machine in the loop ✓

✗ Human in the loop

The AI writes; the human reviews and approves

Reviewing as an observer creates false metacognition. Understanding accumulates inside the tool rather than in the person, and errors become already-committed code that someone has to unwind.

✓ Machine in the loop

The human writes; the machine assists from inside the loop

The implementation lives on as long-term memory in the human's hands. The machine stays an observer, pointing the way — but the human holds the keyboard all the way through.

Background배경

As AI full-automation development spreads fast, the author of code generation is shifting from human to AI. The conventional "Human in the loop" is a structure where the AI produces code and the human reviews and approves it.

Problem문제

This structure works against the developer's grasp of the logic. As automation cycles pile up, the developer knows the overall context but loses awareness of the detailed logic.

More dangerous still, reviewing as an "observer" rather than an "author" creates the illusion of "knowing" — false metacognition — and this blind spot accelerates as scale and change grow.

A developer who has lost the context drifts toward ever more abstract instructions, and after rounds of ping-pong with the AI the result veers off, so the cost of starting over compounds.

Approach접근

We flip the roles to build Machine-in-the-loop instead of Human-in-the-loop. The author of the development is the human, and the machine assists from inside the loop.

The human writing the code directly is the founding principle, while the AI continuously observes the logic in progress and offers Review · Navigation · Warning — but it intervenes in the code only when the user asks. Otherwise it stays an observer.

Crucially, Navigation offers reference knowledge and patterns, not a finished answer — it shows without spoon-feeding, preserving authorship.

Mechanism작동 원리

Because the human writes it directly, the implementation's locations and the path through the algorithm remain as long, concrete long-term memory — the exact opposite of false metacognition.

The cost of errors is also asymmetric. An AI hallucination can simply be ignored by the author, but a full-automation error becomes already-committed code that someone has to find and unwind. When the human slips, the AI actively leaves a warning.

Impact기대 효과

The developer can focus more on the real work, and the anxiety over black-boxed logic disappears.

On speed, it won't turn a day's work into ten minutes — it turns an 8-hour job into 3–4 hours, but sustains that consistently. Even as scale grows and change accelerates, context forgetting and loss shrink, so we can always give the AI clear instructions.

And the developer can take responsibility for their own code.

A Guide, Not a Producer

Jarvis gives the human only three things. What they share is — they're all guidance, not production.

Flagging what's missing

"I think this part is left out"

Suggesting a better approach

"This logic would be more efficient"

Pointing to the next step

"Next, I think you could do this"

The pair-coding roles, exactly as they are. The driver (the human) holds the keyboard and types the code directly — forever the human's seat. The navigator (Jarvis) reviews, looks ahead, and suggests direction. There is only one rule: "The navigator never takes the keyboard."
The litmus test — with every feature we add, we ask: ① Does this seat the human deeper in the cockpit, or push them out of it? ② Did Tony say to go (is it always-allowed, delegated, or forbidden)? If it doesn't pass, then however convenient it is, it isn't Jarvis.
How It Works

Watch cheaply, wake only on new change, risk, or commit

Polling itself is a single git diff, so it barely uses any tokens. The expensive Jarvis review runs only when new change has accrued since the last review, a risk path changed, or a commit boundary is crossed, keeping token consumption to a minimum.

1

Measure

On every wake, gauge the working tree's changed lines, risky-path changes, and the current HEAD. Almost zero tokens.

2

Judge boundaries

Was a new commit made? Were changes reverted? Compare against the marker (.jarvis/baseline) and auto-correct.

3

Gate + debounce

If any one of new change, risk, or commit boundary is met, it's a review candidate. But if a conversation is underway, hold, then flush the accumulated changes all at once when it settles.

4

Gather conventions → Jarvis

Collect the changed files' AGENTS.md, README, and per-path rules, pass them as context, and call Jarvis. The result is wrapped in markers.

5

Schedule the next wake

It picks its own next interval with ScheduleWakeup, riding on /loop's self-paced mode. Launch it as /loop /jarvis.

Core Features

Reacts to risk, not volume

GATE📏

New-change gate

When new change has accrued since the last review (any amount — no fixed line/file threshold), it reviews. It fires once per accrual, never re-reviewing the same change. The AI shows up only after the human has personally written something.

RISK🎯

Risky-path trigger

Risky paths like payments and login warn instantly the moment even one line changes, regardless of volume. It never misses the "small but fatal."

COMMIT🔒

Enforced commit-boundary observation

When a new commit is detected, it checks once regardless of accrued volume. The moment just before a slip gets sealed into code is the golden time for a warning.

DEBOUNCE⏸️

Conversation debounce

It defers reviews during a live conversation, then delivers the accumulated changes all at once when the conversation settles. It doesn't break your flow.

CONTEXT📚

Automatic convention gathering

It gathers the changed files' nearest AGENTS.md, directory README, and per-path team rules and injects them into Jarvis. It reviews knowing even "this package's rules."

LOOP♾️

Self-paced watch

Launched as /loop /jarvis, ScheduleWakeup picks each next interval itself — it keeps watching with no further input.

PERSONA🎭

Navigator personalization

Fill in the empty persona.md to set who Jarvis looks like, and what it's sensitive to. Navigation tuned to your own hands, not a vague, universal context.

FOCUS🔬

Focus areas

Collect "what especially deserves attention in this project" under .claude/jarvis/focus/, and it looks through that as a priority lens over the general catalog.

MIRROR🪞

Gray-zone mirror

When a large share of the accumulated changes is generated code, it reflects, in a single line, whether you've actually grasped it. It neither blocks nor fixes — just a mirror, so responsibility opens its eyes.

PLAN🗺

Plan mode

Optionally turn a source (Jira / Confluence / Notion / a doc / your own words) into a plan + checklist you approve, then every gated review checks your code against the checklist — what's missing per item, what's falsely "done." You author the plan and sequence the work; jarvis only drafts and recommends. Fully opt-in.

Transparency

The Jarvis output marker

An AI-generated review is visually distinct from ordinary conversation. What's between the markers is Jarvis speaking; what's outside is the watch's operational messaging. The closing line reminds you of authorship every time.

# Once the conversation settles, the held review flushes ╭─🤖 JARVIS ─────────────── (jarvis auto-observe) The input may be empty, and checkout.total() references the empty array as-is, which could lead to a crash — worth checking this path on empty input. · ref: packages/checkout/AGENTS.md (edge-case rules) ╰─🤖 JARVIS ─────────────── you hold the keyboard · the call is yours
It stays an observer. Jarvis doesn't fix the code itself. It only reviews, flags, and suggests the next step, and it switches to implementation only when the human delegates with "go fix this." It neither spoon-feeds the answer nor probes you with a quiz — it flags the concern with a dry memo. To preserve authorship.
Plan Mode

Navigate against a spec, not just code smells

On the first /loop /jarvis — before the strength question — it asks "Draft a plan + checklist for this work?" Say no and nothing changes. Say yes, and every gated review checks your code against a checklist you approved.

1

Pick a source

A Jira ticket, Confluence / Notion page, an existing doc — or write it in your own words. (Jira/Confluence needs the Atlassian MCP; otherwise it falls back to a doc path or direct dictation.)

2

Approve the draft

jarvis-plan drafts a plan + a detailed checklist. You edit, resequence, cut, add — and approve. Only then are they written to .jarvis/.

3

Watch against it

Each gated review flags what's missing per item and any item you ticked that the code doesn't back up. Status line shows · plan 3/7. When all items look done, a final review — then it recommends closing; you confirm.

You author the plan; jarvis only drafts it. If the machine designed the work and you merely executed it, the gray zone would just move upstream into the design — so the human edits and approves before anything hits disk. You own the checkmarks and the sequence: jarvis reports what looks done and recommends a starting point, but ticking items and deciding what's first stay with you. It flags a premature "done" — it never certifies one.
Configuration

Tune it in a single line of args

/loop /jarvis strength=high risk=**/*payment* debounce=90s

⚠️ Don't give /loop its own interval. Launch as /loop /jarvis (no interval) so it self-paces — the active/idle/strength args drive the cadence via ScheduleWakeup. /loop 5m /jarvis runs on a fixed schedule and ignores them.

KeyMeaningDefault
strengthStrength preset — bundles the polling-interval knobs below (low/medium/high)medium
riskRisky-path glob — warns instantly, regardless of volumeoff
debounceQuiet time before a conversation is considered settled90s
activeWake interval when the working tree has changes / right after a review4m
idleWake interval when the working tree is clean25m
warmupNumber of fast-polling ticks right after first load3
pathsRestrict the watched pathsall
focusFocus-area directory — a set of docs viewed as a priority lens.claude/jarvis/focus/
mirrorGray-zone mirror — a one-line memo when generated code runs high (non-enforcing)on
planPlan mode — asks on first boot; off to skip, or a source (plan=PROJ-1, URL, path) to opt in directlyask on boot
💡 Polling tightly doesn't add nagging. Because Jarvis falls silent on its own below its own severity bar, tighter polling only adds call cost — it makes no noise. If you want faster response, raise the strength without worry.
The Closing Question

“During the few hours an AI service is down,
should our work be down too?”

The deeper we lean on full automation, the more those few hours leave us unable to do anything — because the understanding has accumulated inside the tool rather than in the person. For our hands to keep moving, unshaken, even when the tool briefly disappears, shouldn't our understanding of the code accumulate more inside us than inside the tool?

jarvis is one answer to that question.