---
name: detail-cadence
description: Canonical cadence of the SECOND pass of the two-pass BA phases (use cases, business rules) — how many items the model drafts before it stops, and where the human gate sits. Pinned once by the user, derived worklist, one write per batch.
phase: '*'
kind: companion
section_label: '_WORKFLOW — DETAIL CADENCE'
---

# Detail cadence (cross-phase)

Two BA phases are built in **two passes**: an INVENTORY pass that proposes the
candidates, then a DETAIL pass that fills each one in. The inventory pass is
consistent between them. The detail pass was not — it had four undesigned
behaviours (one gate per item in use cases, one gate per scope in rules, no gate
at all in the orphan `modeling-*` path, none in a `/ba-loop` subagent), and the
user was never asked which one they wanted.

This file is the canonical methodology (repo-only — the installer does not
deploy `_workflow/`). Each deployed carrier embeds the table below inline; it is
drift-locked across all carriers by `lib/__tests__/detail-cadence-drift.test.ts`.

## The 3 cadences

<!-- detail-cadence:v1 — drift-tested against lib/detail-cadence.ts (edit ALL carriers or the suite fails) -->
| Cadence | What the model does | Where the human gate sits |
|---|---|---|
| **Pas à pas** | One item at a time: full draft, validation, write, next | One AskUserQuestion **per item** |
| **Par lot** | Draft every remaining item of the pinned scope internally, then present a compact recap + the open arbitrations | **One** AskUserQuestion for the whole batch, **one** write |
| **Enchaîné** | Draft and write the whole scope without stopping, then run the deterministic audit and publish its verdict + the arbitrations | None mid-run — the gate is the audit verdict + the arbitration list, after the fact |
<!-- /detail-cadence:v1 -->

Machine keys (`--cadence <key>`): `step` / `batch` / `chained`. **Default:
`batch`.** Cadence names are client-facing French labels and stay verbatim.

**`Enchaîné` is NOT `/ba-loop`.** `/ba-loop` chains PHASES across MODULES in
subagents; a cadence stays inside ONE phase and ONE pinned scope, in the main
conversation. When the user wants the whole phase run unattended across modules,
the answer is `/ba-loop`, not a cadence.

## When the cadence is pinned

- **At the entry of the detail pass**, once the worklist is computed — not right
  after the scope cascade, where the number of items is not yet known.
- **Worklist < 2 items → do not ask.** Behave as `Pas à pas`. A question about
  how to pace one item is pure friction.
- **The phrasing already names it → do not ask.** "détaille tout" / "enchaîne"
  → `Enchaîné`; "un par un" / "je valide chaque" → `Pas à pas`; an explicit
  `--cadence`.
- **Once pinned, it holds for the run**, like the scope lock. The user may
  switch mid-run by saying so ("repasse en pas à pas") — honour it from the next
  item on, never retroactively.
- **Non-interactive caller → never ask.** In a `/ba-loop` subagent, or any
  context where AskUserQuestion is forbidden, the cadence is `Enchaîné` by
  default. A skill that asked there would deadlock on a question it may not put.

## The five invariants (they are what make `Par lot` and `Enchaîné` acceptable)

Without them, the batch cadences ship worse specs faster.

### 1. The worklist is DERIVED, never remembered

There is no progress file, no cursor, no per-item status — consistent with
`ba-files.md` ("The `.smartstack/ba/` markdown tree IS the state"). An
interruption loses nothing: the next run recomputes.

| Phase | An item is still TODO when |
|---|---|
| use cases | its `Flux principal` carries no non-placeholder step (`lib/ba-use-cases.undetailedUseCases` — an em dash or `(aucun)` is NOT a step) |
| business rules | it has no `Condition`, or no valid/invalid example |

⚠ The placeholder reading is load-bearing. The inventory pass writes the Cockburn
fields "left as `—`", and the parser keeps that value — so a length test reads
every discovery-level item as already done and the detail pass details nothing.
This exact drift shipped as a fail-open in the audit rule BR-009.

### 2. ONE write per section and per batch

The authoritative docs are rewritten IN FULL by `Write` — "omitting a UC deletes
it". Writing after each item multiplies the exposure to that loss by the number
of items. In `Par lot` / `Enchaîné`, hold the drafts in memory and write the
complete file ONCE, at the end of the batch.

### 3. The batch never crosses the pinned scope

Use cases: one section. Rules: the selected scope. Moving to the next section or
module stays a user decision — never chain onto it because the batch finished.

### 4. Arbitrations are published, never resolved in silence

Any item where you had to invent a threshold, a trigger, a duration, or lean on
an actor the docs do not list is named by its code, with the open question, at
the end of the batch. In `Pas à pas` the per-item gate already carries this; in
the two batch cadences it is the ONLY thing standing between "the user
validated" and "the user rubber-stamped".

### 5. `Enchaîné` pays for its missing gate

- The anti-extrapolation discipline of `completeAuto-discipline.md` applies
  **verbatim**: no item without a verbatim trace in the tree.
- The run ends with the DETERMINISTIC audit for the dimension, and its verdict is
  published. Never announce "done" without a verdict.

## Phases that carry the cadence

| Phase | Carrier | Worklist unit |
|---|---|---|
| use cases (`create-use-case`) | `levels/detail.md` | one UC of the pinned section |
| business rules (`create-business-rules`) | `levels/elaborate.md` | one rule of the pinned scope |

## Phases WITHOUT a cadence (deliberate — do not add them)

- **RBAC, screens, data model** — they iterate per actor × action, per screen or
  per entity, not over an inventory of items awaiting detail. "How many before
  the gate" has no referent there; their existing protocols stand.
- **`ba-modeling-inventory` / `ba-modeling-detail`** — the optional two-pass fast
  path is an orphan: nothing reads its `_inventory.md` (no CLI, no audit, absent
  from the authority matrix in `ba-files.md`), and `modeling-detail` carries no
  AskUserQuestion at all. Known inconsistency, deliberately left alone here
  rather than half-wired.
