Skill Tracer
Skills › Compound Engineering › ce-doc-review › modes.md

modes.md

21 lines · skills/ce-doc-review/references/modes.md at 3449230

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Mode detection and the interactive question tool
2

Mode detection and the interactive question tool

Raw lines 1 to 2
3## Interactive mode rules
4
5- **Pre-load the host's blocking question tool already in the current tool list before you ask any question.** If the matching tool is listed but unloaded, use the host's tool-discovery primitive once at the start of the Interactive flow to load that capability — do not search for another host's tool name. Presence in the current tool list is proof; never call a user-facing question tool to discover whether it exists. The routing question, the per-finding walk-through, and the bulk-preview Proceed/Cancel question all depend on it.
6- **The numbered-list fallback applies only when the harness genuinely lacks a blocking question tool** — no matching tool is in the current list, a real question call errors, or the runtime mode does not expose one. In those cases, present the options as a numbered list on the host's user-visible chat surface and wait for the reply. A question that calls for a user decision must either call the tool or fall back loudly. Rendering it as narrative text because the tool feels inconvenient, because the model is in report-formatting mode, or because the instruction was buried in a long skill is a bug.
7

Interactive mode rules

  • Pre-load the host's blocking question tool already in the current tool list before you ask any question. If the matching tool is listed but unloaded, use the host's tool-discovery primitive once at the start of the Interactive flow to load that capability — do not search for another host's tool name. Presence in the current tool list is proof; never call a user-facing question tool to discover whether it exists. The routing question, the per-finding walk-through, and the bulk-preview Proceed/Cancel question all depend on it.
  • The numbered-list fallback applies only when the harness genuinely lacks a blocking question tool — no matching tool is in the current list, a real question call errors, or the runtime mode does not expose one. In those cases, present the options as a numbered list on the host's user-visible chat surface and wait for the reply. A question that calls for a user decision must either call the tool or fall back loudly. Rendering it as narrative text because the tool feels inconvenient, because the model is in report-formatting mode, or because the instruction was buried in a long skill is a bug.
Raw lines 3 to 7
Involves a person and wait :6
8## Phase 0: Detect Mode
9
10Arguments may contain a document path, a mode token, or both; both tokens together is not a conflict. Tokens starting with `mode:` are flags, not paths — strip them, and use any remaining token as the document path for Phase 1 (getting the document).
12`mode:non-interactive` (or its deprecated alias `mode:headless`) sets **non-interactive mode**. This mode changes how the findings that were not applied are delivered; it does not change how findings are classified. Use the same judgment about which tier each finding belongs in:
14- fixes that synthesis classifies as Apply are applied and reported in the change list (same as interactive)
15- everything else — the grouped confirmation, decisions, and FYI observations — is returned as structured text with the original classifications intact, for the caller to handle. No blocking-question prompts, no interactive routing.
16- proposed fixes and decisions that were not applied are also recorded in the document, per `references/open-questions-defer.md`, so they outlive this session, unless the request restricts edits to the document
17- Phase 5 (routing) returns immediately with "Review complete" (no routing question, no terminal question)
19**Non-interactive argument contract:** `mode:non-interactive <document-path>`, for example `mode:non-interactive <path-to-doc>.{md,html}`. `mode:headless` is a deprecated alias for the same contract.
21Absent either token, run interactive, with the routing question, walk-through, and bulk-preview behaviors documented in `references/walkthrough.md` and `references/bulk-preview.md`.

Phase 0: Detect Mode

Arguments may contain a document path, a mode token, or both; both tokens together is not a conflict. Tokens starting with mode: are flags, not paths — strip them, and use any remaining token as the document path for Phase 1 (getting the document).

mode:non-interactive (or its deprecated alias mode:headless) sets non-interactive mode. This mode changes how the findings that were not applied are delivered; it does not change how findings are classified. Use the same judgment about which tier each finding belongs in:

  • fixes that synthesis classifies as Apply are applied and reported in the change list (same as interactive)
  • everything else — the grouped confirmation, decisions, and FYI observations — is returned as structured text with the original classifications intact, for the caller to handle. No blocking-question prompts, no interactive routing.
  • proposed fixes and decisions that were not applied are also recorded in the document, per references/open-questions-defer.md, so they outlive this session, unless the request restricts edits to the document
  • Phase 5 (routing) returns immediately with "Review complete" (no routing question, no terminal question)

Non-interactive argument contract: mode:non-interactive <document-path>, for example mode:non-interactive <path-to-doc>.{md,html}. mode:headless is a deprecated alias for the same contract.

Absent either token, run interactive, with the routing question, walk-through, and bulk-preview behaviors documented in references/walkthrough.md and references/bulk-preview.md.

Raw lines 8 to 21