CLAUDE.md §Discussion Pipeline for the full architecture.
List Discussions
Returns
{ discussions: [...], total, limit, offset }.
Get Discussion
Create Discussion
founder or team_lead role.
title— optional display namescopeType—department,project, orgoal(optional; sets thread-level scope)scopeId— ID of the scoped entity (optional)tags— optional string arrayentry— optional first entry created alongside the thread (see Add Entry below)
201 with the created discussion.
Update Discussion
founder or team_lead role. Updatable fields: title, status (active | archived), tags.
Add Entry
founder or team_lead role.
inputType—paste|write|voice|mcp(required)rawContent— raw text content; it may be empty when an attachment is presenttitle— optional entry titledepartmentId/projectId/goalId— entry-level scope override. Entry scope takes priority over thread scope (Decision #61)sourceInfo— arbitrary metadata (used by MCP push to carry caller context)
attachments accepts up to
five references, each containing exactly one usable assetId or artifactId.
clientSubmissionId is an optional stable retry identity up to 200 characters.
Returns 201 for a new entry and 200 when replaying a previously accepted
clientSubmissionId. Authorization is checked before replay lookup. A replay
returns the existing entry and does not duplicate it.
Agent mentions in accepted text are resolved and written to a durable mention
outbox in the same transaction as the entry. Delivery is retried and replay-safe;
it is durable processing, not a guarantee that an agent executes exactly once.
Extraction runs asynchronously — poll the discussion to see extractionStatus
updates on the entry. Reconnecting clients can catch up with
GET .../entries?sinceSeq={n}.
Reprocess Entry
founder role. Re-runs LLM extraction on a failed or completed entry. Returns the new extraction result.
Reprocess All Entries
founder role. Reprocesses all entries in the thread. Returns { reprocessed: N }.
Update Extracted Item
founder or team_lead role. Edit a pending extracted item before approving it. Accepts any subset of the item’s fields.
Approve / Reject Items
founder role. Batch approval/rejection of extracted items. Creates tasks and memory items for approved items.
approved— create task or memory item as-isedited— applyeditsthen createrejected— dismiss the item
dependencies array wires blocking relationships between approved items. Both items must have been approved in this call (or previously).
Returns:
Add Annotation
founder or team_lead role. Adds an inline annotation to a character range of an entry.
anchorStart and anchorEnd are character offsets into the entry’s rawContent.
Returns 201 with the annotation.
Link Entry to Different Discussion
founder role. Moves an entry from its current discussion to a different one.
Scope Versions
Scope versions turn a messy discussion into a reviewed handoff. A discussion can have multiple scope versions over time; after an accepted version, a later re-scope uses only the newer source range. Read routes remain company-scoped:Create Draft
201 when a new draft is created, 200 when an existing draft is
returned, and 409 when the thread cannot be scoped directly.
Review Or Edit Scope Items
draft, accepted, or rejected.
Create One Output
sourceDiscussionId,
scopeVersionId, and a scope handoff context bundle. For memory cards, the
optional memoryStatus controls whether the memory is saved as pending or
approved:
memoryStatus: "approved" is allowed only when the current board user passes
the normal memory approval policy for the candidate layer and department.
Unauthorized approved saves return a permission error; callers should offer
pending as the safe fallback.
Apply, Accept, Reject, Complete
apply creates outputs for accepted cards without accepting the whole version.
accept accepts selected cards and applies them. reject rejects the draft.
complete marks an already-accepted/applied version complete.
All successful scope mutations write activity log entries with the discussion,
scope version, item IDs, created task IDs, memory IDs, and artifact link IDs
where relevant.
Extraction Item Types
Extracted items have atype field:
Extraction Status
Each entry tracks its extraction lifecycle:Scope Fallback
Discussion scope resolves in this order (Decision #61):- Per-item founder override (highest priority)
- Entry-level scope (
departmentId/projectId/goalIdon the entry) - Thread-level scope (
scopeType/scopeIdon the discussion) null(company-wide)
Thread Operations
The current Discussions UI is a Threads workspace. In addition to basic thread, entry, extraction, and scope-version routes, the server exposes thread operations for inbox intake, lifecycle, ownership, participation, routing, and crew workflow.Inbox Intake
Lifecycle and Ownership
Participants, Routing, and Crew Controls
autonomyLevel accepts 0, 1, 2, or null. It does not accept 3.
Scope Item Workflow
scopeItemId in the request body. Scope dependency routes wire extracted-item dependencies before creating work. Per-item routing lives under /items/{itemId}/routing.
Links, Proposals, and Catch-up
sinceSeq returns catch-up entries ordered by sequence for clients that reconnect after missing live events.
Extraction Runtime
Extraction is CLI-only. Discussion extraction,debrief-push, file import, and crew memory-extract tools all run through the same local CLI extraction path. AoA does not expose an extraction engine-status endpoint and does not fall back to hosted provider keys for extraction. Embeddings are the only hosted runtime API key use.
Failures are stored on the entry and surfaced to the founder with actionable setup copy. Typical failure classes include missing CLI, unauthenticated CLI, timeout, nonzero exit, and unparseable output. Retry through the Discussion UI after fixing the local CLI problem.
Memory embedding re-index routes are documented in docs/api/memory.md.