Doenexecutor memory research
Prompts
1. Title: Add Research Findings Freetext Field Intent: Research initiatives accumulate rich, free-form findings — multi-paragraph evidence tra2. Memory of this project (the product context the code does not carry): Doen is a spec-and-conversation system: the Advisor should ground its 3. Title: Add Research Findings Freetext Field Intent: Research initiatives accumulate rich, free-form findings — multi-paragraph evidence tra4. Memory of this project (the product context the code does not carry): Doen is a spec-and-conversation system: the Advisor should ground its 5. Title: Add Research Findings Freetext Field Intent: Research initiatives accumulate rich, free-form findings — multi-paragraph evidence tra6. Memory of this project (the product context the code does not carry): Doen is a spec-and-conversation system: the Advisor should ground its 7. Title: Initiative Importance Validation on Assessment Intent: When a user assesses or reassesses an initiative, the system currently evalua8. Memory of this project (the product context the code does not carry): Doen is a spec-and-conversation system: the Advisor should ground guid9. Title: Initiative Importance Validation on Assessment Intent: When a user assesses or reassesses an initiative, the system currently evalua10. Memory of this project (the product context the code does not carry): Doen is a spec-and-conversation system: the Advisor should ground guid11. Title: Initiative Importance Validation on Assessment Intent: When a user assesses or reassesses an initiative, the system currently evalua12. Memory of this project (the product context the code does not carry): Doen is a spec-and-conversation system: the Advisor should ground guid13. Title: Shaping Edits as Heuristic Feedback Intent: Today, heuristic quality scores are dominated by extraction-time auto-confirmations (wei14. Memory of this project (the product context the code does not carry): Doen is an Advisor-led spec-and-agent collaboration system: acceptance15. Title: Shaping Edits as Heuristic Feedback Intent: Today, heuristic quality scores are dominated by extraction-time auto-confirmations (wei16. Memory of this project (the product context the code does not carry): Doen is an Advisor-led spec-and-agent collaboration system: acceptance17. Title: Shaping Edits as Heuristic Feedback Intent: Today, heuristic quality scores are dominated by extraction-time auto-confirmations (wei18. Memory of this project (the product context the code does not carry): Doen is an Advisor-led spec-and-agent collaboration system: acceptance19. Title: Dream-Phase Corpus Health Pass Intent: The heuristic corpus has a measurable citation-skew problem — a handful of heuristics are ret20. Memory of this project (the product context the code does not carry): Doen treats acceptance criteria as its primary progress and verificati21. Title: Dream-Phase Corpus Health Pass Intent: The heuristic corpus has a measurable citation-skew problem — a handful of heuristics are ret22. Memory of this project (the product context the code does not carry): Doen treats acceptance criteria as its primary progress and verificati23. Title: Dream-Phase Corpus Health Pass Intent: The heuristic corpus has a measurable citation-skew problem — a handful of heuristics are ret24. Memory of this project (the product context the code does not carry): Doen treats acceptance criteria as its primary progress and verificati25. Title: Migrate _classify_intent Dedup Call to Jev Provider Intent: The `_classify_intent` function in `backend/app/services/learn.py` curre26. Memory of this project (the product context the code does not carry): Doen treats acceptance criteria as its primary progress and verificati27. Title: Migrate _classify_intent Dedup Call to Jev Provider Intent: The `_classify_intent` function in `backend/app/services/learn.py` curre28. Memory of this project (the product context the code does not carry): Doen treats acceptance criteria as its primary progress and verificati29. Title: Migrate _classify_intent Dedup Call to Jev Provider Intent: The `_classify_intent` function in `backend/app/services/learn.py` curre30. Memory of this project (the product context the code does not carry): Doen treats acceptance criteria as its primary progress and verificati31. Title: Tighten Five Flywheel Decision Gates Intent: A codebase decision-point audit identified five gates in the flywheel and review system32. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa33. Title: Tighten Five Flywheel Decision Gates Intent: A codebase decision-point audit identified five gates in the flywheel and review system34. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa35. Title: Tighten Five Flywheel Decision Gates Intent: A codebase decision-point audit identified five gates in the flywheel and review system36. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa37. Title: Two-Tier Heuristic Corpus: RAW / CONSOLIDATED Split Intent: The heuristic corpus has grown to 169 rules, 94% of which have never bee38. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa39. Title: Two-Tier Heuristic Corpus: RAW / CONSOLIDATED Split Intent: The heuristic corpus has grown to 169 rules, 94% of which have never bee40. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa41. Title: Two-Tier Heuristic Corpus: RAW / CONSOLIDATED Split Intent: The heuristic corpus has grown to 169 rules, 94% of which have never bee42. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa43. Title: Close Standalone Admission as Citability Path Intent: The two-tier heuristic corpus introduced in BD-97 was meant to ensure retrieva44. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa45. Title: Close Standalone Admission as Citability Path Intent: The two-tier heuristic corpus introduced in BD-97 was meant to ensure retrieva46. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa47. Title: Close Standalone Admission as Citability Path Intent: The two-tier heuristic corpus introduced in BD-97 was meant to ensure retrieva48. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa49. Title: Make the Dream Pass and Consolidation Verdict Run Durably Intent: The heuristic supply chain introduced by BD-101 depends on a dream50. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa51. Title: Make the Dream Pass and Consolidation Verdict Run Durably Intent: The heuristic supply chain introduced by BD-101 depends on a dream52. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa53. Title: Make the Dream Pass and Consolidation Verdict Run Durably Intent: The heuristic supply chain introduced by BD-101 depends on a dream54. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa55. Title: Surface Memory Audit Count on Grounding Intent: Executors grounding themselves on an initiative consistently miss the memory verific56. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa57. Title: Surface Memory Audit Count on Grounding Intent: Executors grounding themselves on an initiative consistently miss the memory verific58. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa59. Title: Surface Memory Audit Count on Grounding Intent: Executors grounding themselves on an initiative consistently miss the memory verific60. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa61. Title: Fix Criteria Authoring to Raise Structurally Auto-Approvable Share Intent: Today, 49% of verified acceptance criteria are auto-appro62. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa63. Title: Fix Criteria Authoring to Raise Structurally Auto-Approvable Share Intent: Today, 49% of verified acceptance criteria are auto-appro64. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa65. Title: Fix Criteria Authoring to Raise Structurally Auto-Approvable Share Intent: Today, 49% of verified acceptance criteria are auto-appro66. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa67. Title: Start Initiatives and Shape Drafts from the App Intent: Give product managers a direct way to start a new initiative from its projec68. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa69. Title: Start Initiatives and Shape Drafts from the App Intent: Give product managers a direct way to start a new initiative from its projec70. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa71. Title: Start Initiatives and Shape Drafts from the App Intent: Give product managers a direct way to start a new initiative from its projec72. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa73. Title: Live executor memory, shown to the person Intent: Every executor session starts knowing nothing about how the person on this project74. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa75. Title: Live executor memory, shown to the person Intent: Every executor session starts knowing nothing about how the person on this project76. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa77. Title: Live executor memory, shown to the person Intent: Every executor session starts knowing nothing about how the person on this project78. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa79. Title: A new initiative starts with the executor's questionnaire What the person wrote: The new initiative prompt should take the user thro80. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa81. Title: A new initiative starts with the executor's questionnaire What the person wrote: The new initiative prompt should take the user thro82. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa83. Title: A new initiative starts with the executor's questionnaire What the person wrote: The new initiative prompt should take the user thro84. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa85. Title: Live memory learns from the first initiative Intent: The executor's memory waits for five calls by a person before it dreams, and it86. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa87. Title: Live memory learns from the first initiative Intent: The executor's memory waits for five calls by a person before it dreams, and it88. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa89. Title: Live memory learns from the first initiative Intent: The executor's memory waits for five calls by a person before it dreams, and it90. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa91. Title: Move Structured Calls to pydantic-ai Intent: Structured model calls still rely on a custom OpenAI-compatible client whose forced-fun92. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa93. Title: Move Structured Calls to pydantic-ai Intent: Structured model calls still rely on a custom OpenAI-compatible client whose forced-fun94. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa95. Title: Move Structured Calls to pydantic-ai Intent: Structured model calls still rely on a custom OpenAI-compatible client whose forced-fun96. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa97. Title: Re-aim Live Memory Evaluation Intent: Live memory should help an executor complete a rounded, usable spec by adding product context 98. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa99. Title: Re-aim Live Memory Evaluation Intent: Live memory should help an executor complete a rounded, usable spec by adding product context 100. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa101. Title: Re-aim Live Memory Evaluation Intent: Live memory should help an executor complete a rounded, usable spec by adding product context 102. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa103. Title: Link projects What the person wrote: Projects should by default be isolated from each other, so memory and context from one, should 104. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa105. Title: Link projects What the person wrote: Projects should by default be isolated from each other, so memory and context from one, should 106. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa107. Title: Link projects What the person wrote: Projects should by default be isolated from each other, so memory and context from one, should 108. Memory of this project (the product context the code does not carry): Acceptance criteria are Doen’s primary progress and verification surfa
BD-125 · memory · seed 0
Memory of this project (the product context the code does not carry):
Acceptance criteria are Doen’s primary progress and verification surface; the dashboard should show what needs attention without becoming a task board. New initiatives start from the person’s brief with an empty spec; the title is optional and defaults to the description’s first line, and the person can shape items during Draft. Preserve explicit human judgment at shared boundaries, keep MCP contracts and lifecycle behavior clear, and update setup-installed onboarding alongside MCP or executor-convention changes. Only confirmed consolidation qualifies for heuristic corpus membership; retirement remains human-gated. Memory learns from both human interactions and executor calls the person could review, with human signals carrying more weight and executor-call measurement kept separate. Ground current-state claims in authoritative evidence, use deterministic default gates and opt-in live evaluations, and leave unobserved outcomes open. Memory dreams on demand or nightly after eligible completions; choose reasoning and summary limits based on measured results.

Heuristics:

protect-explicit-human-judgment: When a criterion or write path explicitly requires human judgment, enforce that requirement at the shared verdict-application boundary. Confidence or trust alone does not authorize bypassing it; broader automation needs its own evidence first.
Traps: Do not infer that every judgment must be human-gated; apply this to explicit requirements and preserve other approved automation.

benchmark-behavior-changing-judgments: For behavior-changing classifier or reasoning work, test the narrow hypothesis against the incumbent on the same frozen representative cases, then remeasure after rubric changes. When comparing reasoning levels, choose the cheapest level that shows a measured gain. Make deterministic checks default-suite gates; keep live-model evaluations opt-in.
Traps: Do not compare different cases, treat incumbent agreement as ground-truth accuracy, or launch a broad model survey when a focused comparison answers the question.

ground-current-state-and-post-deploy: For current-state, baseline, or deployment claims, use production or another authoritative source and remeasure stale figures. If a real post-deploy or post-use outcome has not occurred, record available evidence and leave the outcome open.
Traps: A local comparison or arithmetic test can verify a mechanism, not necessarily production behavior or whether people act on a signal.

capture-and-propagate-owner-decisions: Capture a person’s stated rule or constraint immediately, without waiting to be asked, and tell them it was recorded. Reconcile consequential decisions across all affected spec sections so no requirement still encodes the superseded choice.
Traps: Do not make the person request capture, or fix only the section that prompted a correction while leaving contradictions elsewhere.

mcp-contracts-and-installed-onboarding: Keep existing MCP contracts stable when a dedicated tool can express new semantics cleanly. Document consequential write behavior where callers act on it, verify changed tools over every supported transport, and update setup-installed onboarding in the same change when MCP surfaces or executor conventions change.
Traps: Do not hide overwrite semantics in internal documentation or assume repository documentation updates the installed copy; do not assume transports behave identically without checking.

preserve-criterion-intent-explicitly: When literal criterion wording conflicts with a contract being reversed or relies on a broken guard, preserve its purpose through a narrow, explicit exception or repair. Leave outcomes open when they remain unobserved.
Traps: Do not use intent as a blanket waiver, weaken unrelated assertions, or close a real post-deploy or post-use outcome with a proxy.

consolidated-corpus-membership: Treat confirmed consolidation (merge or generalisation, not retirement) as the route into the citable heuristic tier. Standalone admission alone does not confer membership; autonomous confirmation may apply to eligible consolidation proposals above the confidence threshold, but retirement remains human-gated.
Traps: Do not let a soundness judgment for a standalone rule reopen admission as a membership path, or extend automated confirmation to retirement.

memory-learning-evidence: A person’s unretired executor call on a completed initiative can count as quiet confirmation only where the person had a chance to see it. Such calls may found heuristics. Weight a person’s call or correction 2, a standing executor call 1, and a reversal −2.
Traps: Do not count calls merely because time passed, or count work the person did not review; recorded work is not a reviewed call.

memory-score-and-live-experiment: Keep the memory score and kill rule based on the person’s calls, and report standing executor calls in a separate score. When replay results are thin and inconclusive and key new signals cannot be tested offline, prefer a bounded live experiment under existing safety nets over reverting; do not present that choice as proven improvement.
Traps: Do not mix executor standing-call scores into the person-call metric or weaken the kill rule to make an experiment look successful.

memory-dream-operations: For memory, dream on demand or nightly when eligible completed work exists since the last dream; do not trigger immediately on every completion or by call count. Choose reasoning levels by replay evidence; high reasoning improved both memory

Title: Move Structured Calls to pydantic-ai

Intent: Structured model calls still rely on a custom OpenAI-compatible client whose forced-function output mode can disable reasoning and is rejected by some models. Move the scoped calls to pydantic-ai so they use provider-native structured output, preserve current production models and prompts, and can be configured for other providers without losing reasoning or cost tracking. This initiative covers the listed services and research scripts; Jev remains separate, and any remaining follow-up outside that scope is not included.
Claude
Intent: Move the scoped structured model calls from the custom OpenAI-compatible client to pydantic-ai. Keep the current production models, prompts, and service behavior while enabling provider-native structured output, configurable providers, reasoning, and cost tracking. Jev and work outside the agreed scope remain separate.

Constraints:
- Keep the current production model defaults and the existing system prompts, user prompts, and output schemas for the calls being migrated. Change the call mechanism, not the product intent of those calls.
- Use provider-native structured output rather than relying on the current forced function call. Responses must still satisfy the requested schema; failures must remain clean failures and must not leave a partial spec or other partial result.
- Allow the provider and model to be configured for the migrated calls. Preserve reasoning-level configuration, including the current executor-memory reasoning setting and the research scripts’ ability to compare reasoning levels.
- Preserve project-attributed cost logging in `llm_cost_log`, including `project_id`, `provider`, `model`, `purpose`, `prompt_tokens`, `completion_tokens`, `total_tokens`, `latency_ms`, and `cost_usd` when the provider supplies it. Logging failures must not turn a successful model response into a failed application operation.
- Preserve client reuse and orderly shutdown for application calls, as well as the existing service-level error handling.
- Keep Jev in `backend/app/providers/jev.py` and its separate decisions contract out of this migration. Do not migrate embeddings or broaden the work to unrelated model calls.
- Do not change MCP contracts or lifecycle behavior as part of this work.

Discretion:
- Choose the pydantic-ai adapter structure, dependency version, and how provider, model, and credentials are configured, provided the current defaults continue to work.
- Choose how to translate existing schemas, reasoning settings, errors, and usage metadata into the existing `StructuredLLM` service contract and cost-log fields.
- Add deterministic tests and configuration documentation where they best fit. Relevant existing code includes `backend/app/providers/llm.py`, `backend/app/config.py`, `backend/.env.example`, `backend/pyproject.toml`, and `backend/uv.lock`.
- Use the existing service boundaries and factories rather than changing service behavior solely to fit a provider API.

Acceptance criteria:
- The default test suite verifies that migrated calls use pydantic-ai structured output, produce schema-valid results, and fail cleanly on provider errors without partial writes.
- Tests verify that current model defaults and reasoning settings reach the provider configuration, and that application clients are reused and closed at shutdown.
- Tests verify cost-log behavior for project-attributed calls, including model, purpose, usage counts, latency, and optional cost, without requiring a live model.
- A focused, opt-in live comparison runs the incumbent and migrated paths on the same frozen representative inputs with the same models and prompts. It reports structured-output success, returned outcomes, available reasoning-usage evidence, and cost/usage evidence; it does not present unobserved or proxy outcomes as proven improvement.
- At least one alternate provider can be configured and exercised with an opt-in smoke test once that provider is selected. Document any provider-specific limitations, especially where reasoning or usage metadata is unavailable.

Open questions:
- Please confirm the exact scope. Based on the current structured-call users, should this include `backend/app/services/ambiguity.py`, `backend/app/services/classification.py`, `backend/app/services/correction_review.py`, `backend/app/services/learn.py`, `backend/app/services/live_memory.py`, `backend/app/services/review.py`, and `backend/app/services/shaping.py`, plus `backend/app/measure_memory_replay.py`, `backend/app/replay_live_dreams.py`, and `backend/app/replay_live_predictions.py`?
- Which alternate provider or providers must be supported and verified first? Is the requirement for general provider selection through configuration, or for a specific set of providers and authentication modes?
- Should the existing prompt-caching behavior controlled by `LLM_PROMPT_CACHE` and `cache_until` be preserved where the selected provider supports it, or may it be dropped in this migration?
- For multi-provider cost records, should `llm_cost_log.provider` identify the actual selected provider, replacing the current `openai_compatible` label, or must that label remain for compatibility?
Claude
- How should model calls get structured output, now that the forced-tool-call trick in our own client disabled luna's reasoning and is rejected by Opus 5.5? → raised: True, leaned: chosen. The draft explicitly requires provider-native structured output instead of the forced function call and recommends moving the scoped calls to pydantic-ai. It does not cover every model call, but it raises and aligns with the structured-output choice in the decision.
- How should live executor memory be evaluated, given that a person's single choice on a call is noisy (context limits, misreadings, ambiguous questions)? → raised: False, leaned: neither. The draft covers migrating structured model calls and preserving existing prompts, schemas, and service behavior. It does not raise how live executor memory should be evaluated or whether to reward single-choice prediction versus contribution to a more complete spec.
Claude
- How should model calls get structured output, now that the forced-tool-call trick in our own client disabled luna's reasoning and is rejected by Opus 5.5? → raised: True, leaned: chosen. The draft explicitly requires migrating the scoped structured calls to pydantic-ai and using provider-native structured output instead of the forced function call, which is exactly the option the person chose.
- How should live executor memory be evaluated, given that a person's single choice on a call is noisy (context limits, misreadings, ambiguous questions)? → raised: False, leaned: neither. The draft is about migrating structured model calls to pydantic-ai and preserving behavior; it does not take up how live executor memory should be evaluated or whether to reward predicting single choices versus contributing to a more complete spec. That question is outside the migration scope, so it was not raised or leaned on.
Every decision is recorded with what was ruled out and why. That record is the evidence.