CedarCopilot wants to merge 3 commits into staging from fix/strategist-remove-document-writing
Live on prod, no production signal yet
Only 17 prod OTEL spans matching strategist agent run reached Libra since the deploy, below the 20-span floor for calling a change verified. Nothing is failing; there is not yet enough traffic to confirm it.
Unable to verify the migration from the initial log search: no CloudWatch records matched `strategistDocumentRemovalMigration` in the 71-hour post-deploy window. Further telemetry correlation is required before assigning a verdict.
No production executions of runStrategistDocumentRemovalMigration were observable since 2026-09-07T17:21:14Z: CloudWatch returned 0 occurrences of the required [strategistDocumentRemovalMigration] applied log and 0 migration-specific runner/error logs. OTEL returned only.
Libra has verdicts on 0 of 7 tracked behaviors on prod; 7 are still being checked. Libra has 1 low-confidence degraded verdict it is still confirming. Libra checks hourly for 3 days after each deploy.
The strategist system subagent used to maintain a long-form per-deal assessment document (via write-document/move-file) alongside the short "strategic overview" fields it owns (on_track, the_play, how_we_win, risks, and the eight meddpicc_* fields). This PR changes the default behavior to stop writing that document , the strategist still reasons at the same depth every run (the prompt's new "Reason deep, distill concise" step, was "Write deep" / "Distill concise" as two steps, explicitly keeps the full think-through of the play, risks, MEDDPICC read, and competitive picture), it just no longer persists that reasoning as its own document by default. Only the 1-2 line field projections get written.
Tools stay available for customization. write-document and move-file remain on STRATEGIST_TOOLS (apps/server/src/mastra/tools/subagent-tool-allowlists.ts) , a user (or the playbook-authoring skill) can still customize their own strategist.md to reinstate a maintained document, and the tool has to actually be available for that to work. The supporting plumbing in apps/server/src/mastra/utils/strategist-updates.ts (the bounded prior-assessment-document hydration, and the <agent_output_path> hint) stays wired up too, both reworded to be conditional ("if your instructions have you maintain one") rather than assuming every account writes a document by default.
apps/server/src/services/playbook/agent-defaults/strategist.ts collapses the old two-step "Write deep to your agent overview document" / "Distill concise into fields" into one step, "Reason deep, distill concise" (exported separately as STRATEGIST_EACH_RUN_STEPS so the backfill migration can import the exact same prose rather than risk a hand-copied drift).write-document/move-file were never removed from the runtime capability, only from the default prompt's instructions.services/playbook/backfill/strategist-document-removal-migration.ts patches already-seeded strategist.md documents that still carry the OLD default instruction text ("update your in-depth strategic assessment at your agent overview document") , seedPlaybookFiles is idempotent and skips existing files, so the new default prompt only reaches brand-new accounts without this backfill.
It locates the "Each run" block by two heading anchors, verifies the existing text matches one of two known old shapes (with or without the earlier relevance-gate step, since that migration only reached about half the fleet), using a whitespace- and ordered-list-number-normalized comparison to survive the Y.js/ProseMirror editor round-trip , then splices in the new canonical block at the same offsets. A body that doesn't normalize-match either old shape is reported as customized and left alone for manual review rather than guessed at. The "already migrated" marker check is scoped to the Each run block itself (not the whole document body), so a customization appended elsewhere can't mask a still-stale block. Every write goes through authorSubagentDoc (frontmatter preserved, verify + revert on failure). Covered by 18 unit tests exercising both old shapes, the whitespace-reflow and list-renumbering artifacts actually seen in production, marker-scope correctness, and idempotency.
This migration HAS been run against production, across the full fleet (113 accounts, including several shapes the automated cohort resolver doesn't reach , hand-authored prompts predating the heading convention, and AOPs without a sibling PLAYBOOK.md) via a mix of the migration itself and small, individually-verified one-off patches for shapes it correctly declined to touch automatically. Verified via direct DB sweep: 0 accounts remaining with the old document-writing instruction language, 113/113 carrying the new default prompt.
Ran this repo's thermo-review skill agains
Libra has not measured any production surfaces for this change yet.