K12 Workflows
Workflow Summary
The K12 domain now exposes two workflow layers:
- 3 production document workflows used by standard integrations
- 6 evaluation and testing workflows used for multi-turn scenario replay, scoring, and scenario mining
That means the current K12 workflow surface is larger than the older “three async workflows” model.
| Workflow Family | Count | Typical Use |
|---|---|---|
| Production workflows | 3 | Annex editing, QRG generation, and QRG editing |
| Evaluation workflows | 6 | Multi-turn annex/QRG replay, named scenario execution, batch testing, and scenario mining |
Production Workflows
These are the workflows external integrators normally care about first.
| Workflow | Purpose | Kickoff Endpoint | Status Endpoint | Result Endpoint | Cancel Endpoint |
|---|---|---|---|---|---|
| EOP Editing | Edit district planning, facility planning, hazard annexes, functional annexes, and role-suggestion variants | Use the scenario-specific EOP kickoff tools | k12-annex-editing-status | k12-annex-editing-result | k12-cancel-task-request |
| QRG Generation | Generate QRGs from an EOP | k12-qrg-generation-kickoff | k12-qrg-generation-status | k12-qrg-generation-result | k12-qrg-cancel |
| QRG Editing | Edit a section of an existing QRG | k12-qrg-editing-kickoff | k12-qrg-editing-status | k12-qrg-editing-result | k12-qrg-cancel |
Production flow at a glance
These workflows are independent. You can have EOP edits, QRG generation jobs, and QRG edit jobs in flight at the same time.
EOP Editing Workflow
Kickoff routes
The EOP editing workflow now has dedicated kickoff endpoints for each major editing mode:
k12-district-planning-kickoffk12-facility-planning-kickoffk12-functional-annex-kickoffk12-hazard-annex-kickoffk12-functional-annex-suggest-roles-kickoffk12-hazard-annex-suggest-roles-kickoff
The older k12-annex-editing-kickoff route still exists for compatibility, but new integrations should prefer the dedicated kickoff endpoint that matches the editing intent.
Standard sequence
- Call the scenario-specific kickoff tool that matches the editing task.
- Receive a
requestIdwith statusaccepted. - Poll
k12-annex-editing-statuswith therequestIduntil the status reachessuccessorerror. - Call
k12-annex-editing-resultto retrieve the edited content.
Cancellation:
- use
k12-cancel-task-requestwith therequestId
What this workflow covers
This single production workflow is the async execution layer underneath:
- district planning edits
- facility planning edits
- functional annex edits
- hazard annex edits
- functional annex role suggestion
- hazard annex role suggestion
- the legacy annex route
So the kickoff surface has become more specialized, even though the underlying async tracking pattern is still unified.
QRG Generation Workflow
Standard sequence
- Call
k12-qrg-generation-kickoffwith the EOP ID, user, role, and optional generation configuration. - Receive a
requestIdwith statusaccepted. - Poll
k12-qrg-generation-statusuntil the status reachesSUCCESSorERROR. - Call
k12-qrg-generation-resultto retrieve the generated QRGs.
Cancellation:
- use
k12-qrg-cancelwithjobType: "generation"
What it does internally
This workflow orchestrates the QRG pipeline:
- category classification
- audience/group extraction
- role mapping
- content generation
The caller still interacts with it as a single async workflow.
QRG Editing Workflow
Standard sequence
- Call
k12-qrg-editing-kickoffwith the QRG metadata, target phase, current content, and editing instruction. - Receive a
requestIdwith statusaccepted. - Poll
k12-qrg-editing-statusuntil the status reachessuccessorerror. - Call
k12-qrg-editing-resultto retrieve the updated section.
Cancellation:
- use
k12-qrg-cancelwithjobType: "editing"
Evaluation And Testing Workflows
In addition to the production workflows, the K12 domain now registers six evaluation-oriented workflows:
| Workflow | Purpose |
|---|---|
| Annex turn-based conversation | Run an explicit multi-turn annex conversation payload |
| QRG turn-based conversation | Run an explicit multi-turn QRG conversation payload |
| Annex turn-based named scenario | Run a checked-in annex scenario by scenarioId |
| QRG turn-based named scenario | Run a checked-in QRG scenario by scenarioId |
| Annex turn-based scenario batch | Run a selected list of annex scenarios and aggregate results |
| Annex scenario mining | Mine draft annex scenarios from historical interaction data |
These are primarily used for:
- QA
- regression testing
- implementation validation
- operator-driven testing through the internal K12 harness
They are not the normal document-editing integration path for end-user applications.
Current turn-based routes
| Workflow Path | Purpose |
|---|---|
/k12/workflows/annex-turn-based-conversation | Run an explicit multi-turn annex conversation and return the completed evaluation payload |
/k12/workflows/qrg-turn-based-conversation | Run an explicit multi-turn QRG conversation and return the completed evaluation payload |
/k12/workflows/annex-turn-based-scenario | Run a named checked-in annex scenario by scenarioId |
/k12/workflows/qrg-turn-based-scenario | Run a named checked-in QRG scenario by scenarioId |
/k12/workflows/annex-turn-based-scenario-batch | Run a selected list of annex scenarios and aggregate pass/fail counts |
/k12/workflows/annex-turn-based-scenario-mining | Mine draft annex scenarios from historical interaction data |
Evaluation flow at a glance
Async vs Synchronous Behavior
The production workflows and the evaluation workflows do not all behave the same way.
Async workflows
These are kickoff/status/result workflows:
- EOP Editing
- QRG Generation
- QRG Editing
They return quickly with a tracking identifier, then require polling.
Synchronous workflows
These execute the full request before returning:
annex-turn-based-conversationqrg-turn-based-conversationannex-turn-based-scenarioqrg-turn-based-scenarioannex-turn-based-scenario-batchannex-turn-based-scenario-mining
Implications:
- turn-based routes can take much longer than kickoff/status/result routes
- long multi-turn scenarios are expected to feel slower
- scenario batch runs should use an explicit
scenarioIdssubset instead of an unbounded catalog run
Optional synchronous annex editing
The production annex editing workflow also supports a synchronous shortcut:
- pass
waitForResult: truein the kickoff payload
When you do that, the kickoff call waits for the job to complete and returns the full result instead of only the tracking fields.
Status Lifecycle
Production workflow statuses
| Status | EOP Editing | QRG Generation | QRG Editing |
|---|---|---|---|
| Job accepted | accepted | accepted | accepted |
| Work in progress | processing | PROCESSING | processing |
| Completed | success | SUCCESS | success |
| Failed | error | ERROR | error |
| Cancelled | cancelled | CANCELLED | cancelled |
QRG Generation uses UPPERCASE status values. EOP Editing and QRG Editing use lowercase.
Evaluation workflow statuses
The turn-based routes do not use a separate status/result polling lifecycle. They return a completed response body directly, including:
- per-turn results
- aggregate pass/fail counts
- evaluation summaries
- mined draft scenarios, depending on the route
What Changed From The Older Model
The older external overview implied:
- only 3 K12 workflows existed
- only annex turn-based testing mattered
- the EOP workflow was a single generic kickoff surface
The current system is broader:
- the K12 domain registers 9 workflows
- the EOP kickoff surface now has dedicated planning, annex, and suggest-roles routes
- QRG turn-based evaluation workflows exist alongside annex turn-based workflows
- annex scenario mining is part of the registered workflow surface