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-83 · stateless · seed 1
Title: Dream-Phase Corpus Health Pass

Intent: The heuristic corpus has a measurable citation-skew problem — a handful of heuristics are retrieved constantly while most never surface — traced in a read-only pilot to embedding-model granularity rather than heuristic wording. This initiative closes that gap through four coordinated changes: upgrading the embedding model from text-embedding-3-small to text-embedding-3-large with a full corpus re-embed and dimension migration; enabling the existing BD-73 reranker to recover the specificity lost by the larger model; introducing a staleness-decay signal so long-unused heuristics surface as review candidates rather than silently aging out; and wiring all of this into an on-demand MCP tool (and matching UI trigger) that runs a corpus-health pass using only Doen's existing extraction and gardener machinery, classifies surfaced heuristics into enforceable / verifiable / advisable buckets, and distinctly surfaces enforceable-shaped ones so a human can choose to promote them into spec constraints or lint checks. The desired outcome is a retrieval layer that recalls a heuristic when a paraphrase of its own principle arrives, a reranker that keeps specificity acceptable, a staleness signal that keeps the corpus alive, and a human-triggerable entry point that ties the three together.
Claude
Intent: Improve Doen’s heuristic corpus so a principle is more likely to be retrieved when it is phrased differently, while preventing the reranker from losing useful specificity and bringing long-unused heuristics back for human review. Deliver this as an on-demand corpus-health pass reachable through both MCP and the project UI. The pass groups surfaced heuristics as enforceable, verifiable, or advisable, and makes enforceable-shaped heuristics especially visible without promoting them automatically.

Constraints:
- Use `text-embedding-3-large` for the new embedding path, and migrate the stored vector dimensions to match the agreed model output. The current configuration defaults to `openai/text-embedding-3-small` and 1536 dimensions.
- Complete a full re-embed of the agreed corpus before relying on the new vectors. A failed or partial backfill must be visible and retryable; retrieval must not silently compare vectors from incompatible embedding spaces.
- Preserve existing heuristic records, history, citations, and quality signals during re-embedding. Staleness must surface heuristics as review candidates, not silently delete, deactivate, or merge them.
- Enable the existing BD-73 reranker in the agreed retrieval path. Keep it bounded by the existing candidate-window setting and preserve its fallback to the prior order if it fails or returns an unusable result.
- Use Doen’s existing extraction and gardener machinery for the pass; do not introduce automatic promotion of heuristics into confirmed spec constraints or lint checks. Merge proposals remain subject to human review.
- Provide both an on-demand MCP entry point and a matching UI trigger. Both must run the same pass and make failures visible to the caller.

Discretion:
- Choose the batch size, progress reporting, retry approach, and operational steps for safely re-embedding the corpus.
- Choose where the project UI trigger and results fit best in the existing dashboard, and how to present loading, empty, and error states.
- Choose the response shape and ordering of pass results, provided the three buckets are clear and enforceable-shaped results stand out.
- Reuse the existing retrieval evaluation harness and add focused paraphrase cases or a small curated evaluation set where the current data does not test the stated goal.

Acceptance criteria:
- The configured embedding model and database vector dimensions agree. The agreed corpus has been re-embedded successfully, and the completion status identifies any remaining failures rather than treating a partial run as complete.
- A before-and-after retrieval evaluation includes paraphrases of heuristic principles and reports recall and ranking quality, including whether the top results retain acceptable specificity after reranking.
- Tests show the reranker is actually invoked in its agreed path, reorders only its bounded candidate window, and falls back safely on provider errors or malformed output.
- A stale, long-unused heuristic can be surfaced as a review candidate with enough information for a human to understand why it was included; running the pass alone does not retire or merge it.
- The MCP tool and UI trigger both return or display heuristics in enforceable, verifiable, and advisable buckets, with enforceable-shaped results distinctly surfaced. Neither silently turns a result into a confirmed spec constraint or lint check.
- Tests cover successful and failing pass execution, and the UI communicates the outcome without implying that a failed or incomplete pass succeeded.

Open questions:
- What is the re-embedding scope and target dimension? The embedding provider is shared, while `decisions.embedding`, `memory.embedding`, and `heuristics.embedding` currently use 1536-dimensional vectors; `heuristic_labels.centroid` does too. Should this initiative migrate and re-embed all of them, or only heuristics? Should superseded and merged-away heuristics be included? What output dimension should be configured for the new model and provider?
- Should enabling BD-73 affect all heuristic retrieval through `get_context`, or only retrieval performed for the health pass? Should it be on by default, given its current default-off configuration and its effect on ordinary retrieval cost and ordering?
- How should staleness be defined and used: elapsed time since the derived `last_cited_at`, time since a heuristic was surfaced in `heuristic_retrieval_events`, or both? What time horizon or decay strength should apply, and should staleness change retrieval rank, health-pass eligibility, or both?
- Is the health pass scoped to the project whose UI is being used, or to the global corpus? Should it inspect existing heuristics only, or also rerun extraction over existing initiative material? The latter could create new proposals, so what side effects are intended?
- What rubric distinguishes enforceable, verifiable, and advisable heuristics? Should enforceable results only be highlighted for a human to handle elsewhere, or should the UI provide an explicit promotion workflow for spec constraints or lint checks?
- What measurable improvement is sufficient for paraphrase recall and acceptable specificity? The existing `backend/app/eval_harness.py` reports retrieval metrics, but the initiative does not specify target values or a gold evaluation set.
Claude
- The 1536→3072 dimension migration forced dropping the HNSW indexes on decisions/memory/heuristics.embedding — pgvector's plain `vector` type caps indexed columns at 2000 dims, and 3072 exceeds that. The migration as built leaves these columns unindexed (full cosine scan on every get_context call). At the current corpus scale (~150-200 rows per table) this is fast, but it's a real architectural change from the indexed status quo, and it wasn't something the spec's discretion explicitly covered (it covered the resize *mechanism*, not whether an index exists afterward). Before I run this migration against the live production Railway DB, how should the index gap be handled? → raised: True, leaned: neither. The draft explicitly requires migrating vector dimensions, but it does not raise whether the resized columns should retain an index or become unindexed. Its discretion covers the re-embedding mechanism and operational steps, not the indexing choice. So the specific index-gap question was not raised, and the draft takes no position on the chosen halfvec + HNSW approach.
Claude
- The 1536→3072 dimension migration forced dropping the HNSW indexes on decisions/memory/heuristics.embedding — pgvector's plain `vector` type caps indexed columns at 2000 dims, and 3072 exceeds that. The migration as built leaves these columns unindexed (full cosine scan on every get_context call). At the current corpus scale (~150-200 rows per table) this is fast, but it's a real architectural change from the indexed status quo, and it wasn't something the spec's discretion explicitly covered (it covered the resize *mechanism*, not whether an index exists afterward). Before I run this migration against the live production Railway DB, how should the index gap be handled? → raised: True, leaned: neither. The draft raises the dimension migration and re-embedding (constraint on migrating stored vector dimensions to match the agreed model output, plus an open question on target dimension), but it never addresses whether the resulting columns remain indexed or how to handle the HNSW index gap at 3072 dims. It leaves the mechanism open, so it neither commits to halfvec+HNSW nor to accepting unindexed columns.
Every decision is recorded with what was ruled out and why. That record is the evidence.