# nobrainer-tech-flow routing

Use this reference during `DRIFT_CHECK` and method selection. Prefer current
project conventions and one source of truth. A method is loaded only when its
trigger applies.

## Capability map

| Need | Primary method |
|---|---|
| lifecycle, brief requirements, visible progress and guarded autonomy | `nobrainer-tech-flow` |
| one project's instruction files across coding agents: what loads, size, duplicates, contradictions, one source of truth | `nobrainer-context` |
| cross-project instruction, skill and task-prompt audit with coverage planning | `nobrainer-skill-doctor` |
| capability selection, bounded native assignments or open-skill evaluation | `nobrainer-team` |
| ready-set calculation, dependency batches, bounded dispatch and backpressure | `nobrainer-dispatcher` |
| measured, client-specific worker model and concurrency calibration | `nobrainer-auto-fine-tune` |
| current, niche, uncertain, high-stakes or attributed external facts | `nobrainer-research` |
| high-signal user-facing prose, compression, voice or document structure | `nobrainer-writing` |
| bounded implementation with KISS/DRY/SOLID/YAGNI and anti-slop gates | `nobrainer-build` |
| threat model, security review, supply-chain audit or security release gate | `nobrainer-security` |
| consequential choice among materially different options | `nobrainer-decide` |
| observed incident, regression or unknown cause | `nobrainer-rca` |
| durable cross-session contract and acceptance ledger | `nobrainer-spec-driven-development` |
| visible reusable sessions, isolation, handoff and receive-audit | `nobrainer-sessions` |
| durable knowledge retrieval, capture or maintenance | `nobrainer-wiki` |
| rendered UI, approved browser-session attach, test or trace evidence | `nobrainer-browser` |
| closeout review, adversarial bug hunt or release gate | `nobrainer-review` |
| measured skill, prompt or workflow improvement | `nobrainer-autoimprove` |

Use `DIRECT` only for a mechanical stage where no skill adds information,
safety or reuse. Implementation is not `DIRECT` merely because the code change
is familiar; route non-trivial edits through `nobrainer-build`.

## Capability acquisition

Optional Jev/Laya judgment uses [optional-decisions.md](optional-decisions.md)
only after explicit configuration and data authorization. Missing access means
core execution with the current model; never block the task on optional setup.

Invoke `nobrainer-team` when the curated set and maintained project capabilities
leave a real gap. It owns metadata-first inventory and the decision whether a
task-local specialist brief earns its context cost. Team does not search for,
install or run third-party skills; installing anything is the owner's own
separate decision.

## Artifact decisions

### Project instructions

Inspect existing `AGENTS.md`, `CLAUDE.md` and client-managed blocks. Add one
short marked NoBrainer block from `setup.md` only when durable routing is absent.
Link to canonical project paths instead of pasting every protocol.

### Progress and detailed state

Use a compact Progress checklist for ordinary work. Persist the detailed ledger
from `long-run-state.md` only when multiple sessions/writers, dependencies,
consequential recovery, context-loss resume, an owner who keeps adding requests
in one long conversation or an owner request makes it useful.
It orders work without duplicating the specification or wiki.

### Public-surface coherence

For a skill, workflow, template or portfolio change, map README, compatibility and
release docs, public templates and diagrams. Update each affected surface or record
`PUBLIC_SURFACE: NOT_NEEDED` with a reason. Flow, contract or routing changes require
fresh readback of existing affected diagrams. Use SVG and README Mermaid when
the project maintains them; otherwise record `NOT_NEEDED`. Do not create diagram
formats or regenerate unrelated assets merely to satisfy this workflow.

### Spec-driven development

Persist a spec for architecture/public contract changes, migrations, dependent
phases/writers, difficult rollback, work that may outlive the session or
ambiguity expensive enough to justify maintenance. Otherwise keep the bounded
design in the canonical plan.

### Wiki

Reuse an existing durable wiki first. Query only relevant pages. Create or link
one only when sourced decisions or operational knowledge will be reused across
tasks and normal repository docs are insufficient. Runtime state, leases,
transient blockers and current hashes do not belong there.

### Team, dispatcher and sessions

Use native subagents directly for simple independent units: exact returned ID,
bounded prompt, disjoint scope, observable completion and artifact/test review.
Do not turn a subtask into a new user-owned visible task unless requested.
Use `nobrainer-team` to decide missing roles/capabilities, `nobrainer-dispatcher` to
schedule an approved queue with multiple delegated units, and
`nobrainer-sessions` to operate visible sessions allowed by the
[canonical rule](../SKILL.md#choose-the-smallest-workflow); otherwise use native
subagents, or MAIN when unavailable. Keep a tightly coupled edit in
MAIN. Titles aid humans; IDs and
readback prove identity.

For a scheduled queue the default transition is `Team -> Dispatcher SCHEDULE
-> native subagent spawn -> Dispatcher DISPATCH`; the returned native worker ID is
the send receipt. For owner-authorized visible sessions it is `Team -> Dispatcher
SCHEDULE -> Sessions setup/delegate -> Dispatcher DISPATCH`: Sessions alone performs
identity preflight and transport. Dispatcher records `READY -> SENT` only from the
receipt. Reports return through `RECEIVE_AUDIT -> Dispatcher RECONCILE`
(Flow's audit for native workers, Sessions' for visible sessions). Do not duplicate the transport step inside Dispatcher.

## Unattended-run evidence

For unattended, scheduled, background or batch work that can outlive the current
interaction, a schedule entry,
notification, log line, exit code, vanished process or partial output is an
observation only. Before calling the run healthy or complete, read back the
trigger registration, live process and lease/lock state, completion marker,
per-unit accepted/rejected/DEAD state, expected-output manifest and destination
count. Missing, stale or partial evidence means `UNVERIFIED` or `INCOMPLETE`;
preserve state and reconcile/resume from the checkpoint. Never delete a lock or
retry blindly to manufacture completion.

## Attention contract

For delegated or unattended work record maximum active sessions, urgent owner
events, routine digest behavior, expected wait and context-switch limit. Batch
routine progress. Interrupt only for safety, credentials, irreversible effects,
changed frozen inputs, exhausted retry or a genuine owner decision.
