Skip to content
GitHub
Operations

Authoring Loop

Generated

This page is generated from qa/operations/specs/authoring-loop.md — the source of truth. Edit the spec, not this page.

Last run: not yet recorded (run the replay suite to populate status).

Overview

The conversational authoring loop is the primary alpha flow: the operator chats with the Assistant on its dedicated page, shares source material via the single composer (paste a link inline, drag a document onto it), the agent ingests / distills / generates and proposes rules, and the operator reviews each proposal (approve / request revision / reject) in the right-rail proposed-rules list. This exercises the real agent + codegen path; the LLM responses are served from cassettes (replay mode), so the run is deterministic. Source documents and rule text come from the deterministic fixtures so prompts are byte-reproducible.

Preconditions

  • Signed in as the seeded operator.
  • The stack is in cassette replay mode (no live LLM calls); fixtures seeded.
  • A ruleset exists; the Assistant page is open for it (reach it from the topbar “Assistant” button or the ⌘K command palette while on /worlds/{id}).

Scenarios

1. Chat a turn with the Assistant

  • Type an authoring instruction (e.g. “Draft filing-threshold rules from the attached source”)
  • Send the message
  • Expected: The operator turn appears in the transcript; the assistant’s response streams in and completes as an assistant turn.

2. Drag a source document onto the composer

  • Drag the fixture source document onto the single composer
  • Expected: The attachment appears as a chip with the document label and a remove control (no separate “Attach document” control).
  • Paste a source URL into the composer message input
  • Expected: The URL is auto-detected and staged as an attachment chip (no separate “Add link” control).

4. Remove a staged attachment

  • With an attachment staged, activate its remove control
  • Expected: The attachment chip is removed from the staged set.

5. The agent proposes rules

  • After a chat turn that distills the attached source, view the proposed-rules panel
  • Expected: One or more proposed rules appear, each with its text, provenance tier, and cited-source count, and review actions (Approve / Request revision / Reject).

6. Approve a proposed rule

  • For a proposed rule, activate Approve
  • Expected: The rule is approved into the ruleset (approve needs no rationale); the proposed-rule row reflects the recorded outcome.

7. Reject requires a rationale

  • For a proposed rule, activate Reject
  • Expected: A rationale editor is armed and the confirm control is disabled until a rationale is entered; after entering one, confirming records the rejection.

8. Request revision with a rationale

  • For a proposed rule, activate Request revision, enter a rationale, and confirm
  • Expected: A revision request is recorded for that candidate.

9. Multi-turn context is retained

  • Send a follow-up chat turn referencing the prior turn
  • Expected: The transcript retains the prior turns and the agent responds in context.

Test Data

LabelValueNotes
Source documentqa-filing-threshold.md (fixture)From tools/dev/qa_fixtures.py
Rule textA taxpayer with gross income below the filing threshold need not file.Fixture rule text
Reject rationaleNot supported by the cited source.Drives scenario 7