Skip to main content

Coordinator

Hosted coordinator brain — initiative-wide reasoning over Project Tracker state, with every consult persisted as a coordinator.consults row plus an audit entry.

📄️Agent-facing index-first knowledge-base retrieval (PLT-283)

Agent-facing index-first knowledge-base retrieval (PLT-283). Runs the same `queryKnowledgeBase` read the coordinator brain uses, under the calling agent’s own auth, so the wiki RLS + an UNCLASSIFIED classification cap scope every read to what the caller may see. Returns the rendered KB section (index + recent synthesis pages, capped to the coordinator context budget) plus a citations array. Backs the `query_knowledge_base` MCP tool and the `pt query-kb` CLI.

📄️List the coordinator decision log for one initiative the caller belongs to — the persisted `coordinator.consults` rows, paginated and sortable by recency / cost / actor

List the coordinator decision log for one initiative the caller belongs to — the persisted `coordinator.consults` rows, paginated and sortable by recency / cost / actor. Backs the Directory decision-log feed (PLT-208 slice 2). Membership is enforced by RLS + an explicit check: a non-member receives 403, not an empty list. When the initiative classification exceeds the viewer clearance, entries are returned with `masked: true` and `questionExcerpt: null` (PLT-212). SECRET-classified reads are written to the audit log regardless of masking outcome.

📄️Month-to-date coordinator spend for an initiative — per-user and initiative-wide token + USD totals, aggregated from `coordinator.consults` (SUM of `tokens_in` / `tokens_out` / `usd_cents` since the start of the current month, grouped by user)

Month-to-date coordinator spend for an initiative — per-user and initiative-wide token + USD totals, aggregated from `coordinator.consults` (SUM of `tokens_in` / `tokens_out` / `usd_cents` since the start of the current month, grouped by user). Backs the cost tiles in Directory's coordinator chat header. Tenant + initiative isolation is enforced by the `consults_tenant_read` RLS policy, so a non-member reads all-zero totals.

📄️Staging step of the artifact-promotion ladder (PLT-210): writes a `coordinator.pending_actions` row from one of a persisted consult’s `suggestedActions` (referenced by `consultId` + `actionIndex`) and returns the staged id + preview for the confirm modal

Staging step of the artifact-promotion ladder (PLT-210): writes a `coordinator.pending_actions` row from one of a persisted consult’s `suggestedActions` (referenced by `consultId` + `actionIndex`) and returns the staged id + preview for the confirm modal. This is the ONLY route that creates pending actions; it never runs a side effect — execution is the separate `[id]/execute` step.