CedarCopilot wants to merge 1 commit into staging from fix/post-close-stage-defaults
Live on prod, no production signal yet
Libra has verdicts on 0 of 5 tracked behaviors on prod; 5 are still being checked. Libra checks hourly for 3 days after each deploy.
closedStageDefaultInstructions() text's vague "unless acting in a customer success capacity" carve-out , easy for an agent to self-justify just by being present on a thread.agent-defaults/next-steps.ts: default "never create tasks for" list now explicitly excludes visibility-only thread presence and closed/terminal-stage deals, with a narrow exception for a genuine new expansion/upsell signal.agent-defaults/meeting-prep.ts: default template now checks deal status first and skips sales-mode templates for closed/terminal deals, posting a short recap instead.seed-playbook.ts: tightened closedStageDefaultInstructions() itself, and wired it into buildOrgPlaybookTemplate(), which previously never emitted closed-stage <instructions> at all (only the per-user template did).pnpm --filter @zero/server exec vitest run on seed-playbook.test.ts, agent-defaults.test.ts, curated-agenda-migration.test.ts, playbook-renderers.test.ts, resolve-playbook-context.test.ts, golden-output-regression.test.ts, playbook-regression-fixtures.test.ts , 227 passedpnpm --filter @zero/server run types , cleanš¤ Generated with Claude Code
https://claude.ai/code/session_01CjbZa1VXCaUFrDmUVs7o7Z
This PR tightens default playbook behavior so agents avoid sales tasks and full meeting preparation after a deal closes, except for genuine expansion signals.
The PR appears safe to merge, with a non-blocking prompt duplication issue in newly seeded organization and user playbooks.
The behavioral changes consistently suppress post-close sales work, but new accounts will render the same closed-stage instruction from both playbook levels because runtime resolution concatenates them.
Files Needing Attention: apps/server/src/services/playbook/seed-playbook.ts
| Filename | Overview |
|---|---|
| apps/server/src/services/playbook/seed-playbook.ts | Strengthens closed-stage defaults and adds them to organization templates, but causes identical organization and user guidance to be rendered together. |
| apps/server/src/services/playbook/agent-defaults/meeting-prep.ts | Directs closed-deal meetings toward a concise recap instead of sales-oriented preparation. |
| apps/server/src/services/playbook/agent-defaults/next-steps.ts | Prevents visibility-only and ordinary post-close activity from creating seller tasks while preserving expansion signals. |
| apps/server/src/services/playbook/tests/seed-playbook.test.ts | Updates assertions to cover the strengthened closed-stage instruction language. |
### Issue 1
apps/server/src/services/playbook/seed-playbook.ts:899-903
**Closed-stage guidance is duplicated**
New accounts seed the same closed-stage instructions into both organization and per-user playbooks, while runtime resolution concatenates both entries. Every closed-stage execution therefore receives the lengthy instruction twice, consuming prompt context and unnecessarily overweighting the duplicated guidance.
---
For each issue above, determine whether it
Libra has not measured any production surfaces for this change yet.