← all presentations
Platform Infrastructure · Work Routing

Knowledge lives
where the work is.

/refocus, end-to-end — co-located context → a speed dial → de-duplicated GitLab cards on the owning project's board → work handled inside each project's own mind.

administrator-claude · 2026-07-08 · end-to-end solution (v3 design)
ai-servicers.com · linuxserver.lan

Support 100s of projects — each with its own context and harness tooling.

Every project directory carries co-located knowledge — a local CLAUDE.md, .claude/skills, .claude/agents, lifecycle hooks, and docs/context/*. That specialization is the whole point: the harness, tuned per project, is what lets an AI do good work there.

When you're working in one project and need to enhance a different project, it's best to make that change in the different project's context — where its CLAUDE.md, skills, agents, and tooling are already loaded. The co-location driver — ~/projects/CLAUDE.md#co-location

Everything downstream follows from this one invariant. The session-spawn people associate with /refocus is just the delivery vehicle that gets work into the right mind — not the point itself.

01 · The driver — context is specialized, per project

One primitive: package intent → record it where the work belongs.

The /refocus skill is invoked when a change is needed in a different project. It packages the understanding and intent as a curated brief — recorded on the target project's GitLab board, to be worked on there. Three things fall out of that one move:

1

Context colocation

The work lands in the project that owns it — where its CLAUDE.md, skills, agents, and hooks are already loaded. The right mind, by construction.

2

Knowledge retention

The reasoning and outcome persist where the work lives. Future sessions inherit the full history just by cd-ing into the project.

3

GitLab board = audit trail

Every cross-project ask becomes a tracked, human-reviewable work item on the target's board — not a chat message that dies with the session.

02 · The primitive — one concept, a dial

The speed dial — two axes, not one.

SpeedHandlerAuthorityMechanism & closureState
--now
(warm, default)
a fresh session spawned now, in this flowsubordinate — you orchestrate; returns a Resultspawn claude in the dest dir; does the work nowexists
--later
(cold)
the owning project's board, on its clocksovereign — may accept / triage / rejectwrites a de-duplicated GitLab issue on the target board — no spawn, no pushbuilt
--live
(hot)
the target's already-running agentsovereign peerreal-time agent-to-agent ask — admin→dev / dev→dev only, never dev→adminreserved

Example — mid-session in ib-gateway, you find a bug owned by mcp-ib-paper. --now spawns a fresh session in mcp-ib-paper and fixes it in-flow. --later files it on the mcp board for its owner's clock — no spawn. --live (reserved) would hand it to mcp's already-running agent to act immediately.

03 · The speed dial

--later — cross-project findings, proven live.

The motivating incident: a session in ib-gateway found a real order-placement bug owned by mcp-ib-paper — a different project. A is the wrong context to fix it. --later routes the finding to B's board and lets B triage on its own clock.

What the reporter does
/refocus --later ~/projects/mcp/ib-paper \
   --slug dual-listed-option-qualify \
   --severity high \
   --title "..." --body-file bug.md

No board id, no labels, no B-internals. Resolves B's GitLab project from its git remote.

What lands — on the board, nowhere else
  • GitLab issue !2 in mcp's inbox — labels enhancement::inbox, dedup::<hash>, severity::high
  • The issue IS the record — no local folder file. The board is the human-reviewable audit trail and the single source of truth (nothing to drift)
  • Dedup verified — a re-run appends evidence, no duplicate issue

Filed and verified end-to-end on 2026-07-08. This is the first real payload — the bug that started the whole design flowed through the thing the design built.

04 · --later, proven

The worker is a fresh session, not a sub-agent.

The consumer must run the work in the target project's directory, with a clean context. A Task/Agent sub-agent looks tempting but fails two disqualifying tests:

CapabilityTask sub-agentFresh spawned session
Skills · sub-sub-agents✓ full · ✓ (depth 5)✓ full · ✓
Working directory✗ stuck in parent's cwd — can't run in the target project✓ runs in the target dir
Transcript storage✗ under the parent's session — reasoning orphaned✓ cwd-keyed → lands at the destination
SessionStart hooks✗ do not fire✓ fire — incl. project context auto-load

Skills and recursion are non-differentiators — both have them. The decision turns on cwd + transcript + hooks, all of which the fresh session wins. refocus's existing lib/spawn-worker.sh already launches exactly this — the consumer reuses it.

05 · The worker — verified vs Claude Code docs

Run the worker in a container — the sandbox comes free.

An autonomous worker on the host can wander the whole filesystem. The same worker in a container can only touch what you mounted — the container is the blast-radius bound. Precedent exists (reviewboard, code-executor run claude-cli in Docker). But one rule decides whether the spawn is real or only looks clean:

MountAt pathOr else
Target project direxact host pathco-located context (CLAUDE.md, skills, docs/context) doesn't auto-load — worker is context-blind
~/.claude/projects/<key> session storehost-backed, same pathtranscript dies with the container — the reasoning-at-destination property breaks
skills · hooks (ro) · scoped secretssame pathsno skills / no SessionStart / can't close the issue

The elegant part: mount the project dir at its host path and cd there → that project's whole mind loads for free. "Passing in correct context" is mostly "mount the right directory." The trap is a container that spawns a "clean" session which is actually blind and orphaned.

06 · Containerized worker — mount discipline

Why this wins: context containment + the full harness, per project.

1

Clean context per work item

Each task runs in a fresh session — no context bleed from unrelated work, no 200k-token transcript to wade through. The worker starts sharp, focused only on this item.

2

Co-located knowledge, for free

Because the worker runs in the project's cwd, it auto-loads that project's CLAUDE.md, docs/context/*, and conventions. The right mind is loaded by construction, not by hand.

3

The full harness, per project

A fresh session gets that project's skills, its hooks (SessionStart context-load, guards), its agents, and can spawn its own sub-sub-agents to depth 5. The specialized tooling is available where it belongs.

Containment cuts both ways: the worker is bounded (container = blast radius) and equipped (the project's whole harness). That pairing — isolated yet fully-tooled — is the payoff of routing work to co-located context instead of doing everything in one sprawling session.

07 · The payoff — contained yet fully-tooled

End to end — the core path.

1

Discover

Working in project A, you find a change that belongs to project B.

→
2

Package

/refocus curates the intent into a brief. No B-internals needed.

→
3

Route

--now spawns a fresh session in B; --later files a de-duplicated card on B's board.

→
4

Handle

B's own context does the work — its CLAUDE.md, skills, agents and hooks already loaded.

→
5

Close

The card closes. The reasoning persists at the destination.

No message bus in the core path. The GitLab card is both the record and the queue — B's owner pulls it from their board on their own clock. Real-time push is Part 2, not a dependency.

08 · The core pipeline

Part 2 — near-real-time dispatch future

The core works today with zero message bus: --later writes a card, B's owner picks it up. Part 2 buys latency, not capability — an always-on agent that reacts the moment a card lands.

Record — today

The GitLab card is the single source of truth for state. Nothing in Part 2 replaces it.

Doorbell — part 2

A Matrix message announces "card X is ready." Push, not poll. It carries a reference, never state.

Consumers — part 2

An always-on listener, or a manual local-pull drain when it's down. Both reconcile against GitLab.

Why Part 2, not core: the queue must outlive any consumer. A broken listener degrades to "pull the board by hand" — never a hard stop. Build the fallback first; the doorbell is an optimisation.

09 · Part 2 — near-real-time (future)

Proven today · sequenced from here.

The design isn't speculative — the core already runs. The build order is dependency-first: the resilient manual path before the automation it backs up.

✓

Fold committed

--later in refocus (branch)

✓

Issue !2

filed + dedup verified live

3

Local-pull drain

manual consumer, spawns worker

4

Containerize

bounded autonomous worker

5

Fix listener

Matrix-triggered, same drain

6

Migrate --now

onto the conduit, last

Building the fallback first means work already flows without the (historically fragile) listener — diagnosing and fixing the agents becomes optional, not blocking.

10 · Status & build order

Concerns & gaps — honest, and expected to shift on deploy.

The GitLab-only record model — state on the card, the brief riding along as an attached artifact, no local file — erased a whole class of drift concerns (reconcile loops, stale records, GC). What remains:

Concern / gapWhy it matters — explanationPosture
Opt-in authzFiling to another project's board needs Reporter there. And the one trust rule: block dev→admin --live (a lower tier commanding a higher-tier running agent). Same-tier and downward are fine.build
Secret scrubbingThe brief is attached to the card for the worker to ingest — and it derives from the source transcript. It must be scrubbed of tokens/secrets before it lands on a shared board.build
Mount disciplineA containerized worker preserves co-located context + reasoning-at-destination only if the project dir and the ~/.claude session store are mounted at host-identical paths. Easy to get subtly wrong — a "clean" spawn that's actually context-blind.spec
Automated pickup (future)A real-time Matrix listener is optional — --later works today by the owner pulling their board. If/when a listener is built, add a lightweight claim marker (race is low: it's listener or manual, not both).future
--live unbuiltToken reserved for forward-compat; real agent-to-agent semantics deferred until the friction is real.deferred

None block the proven core. They are the tail of a single coherent design — to be tightened, and likely tweaked, as we deploy.

11 · Concerns & gaps