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 0
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 retrieval of Doen’s heuristic corpus by upgrading its embeddings, using the existing BD-73 reranker, and adding a signal that brings long-unused heuristics forward for review. Add an on-demand MCP tool and matching project UI trigger for a corpus-health pass that surfaces and classifies heuristics as enforceable, verifiable, or advisable. Enforceable-shaped heuristics should be clearly highlighted for human consideration, not promoted automatically.

Constraints:
- Use an embedding model and dimensions that agree with the persisted vectors and query vectors. Complete the agreed re-embedding before serving retrieval against the new dimensions; do not leave a mixed-model corpus.
- Use the existing embedding provider configuration in `backend/app/config.py` and the existing reranker in `backend/app/services/reranker.py`. Preserve the reranker’s bounded candidate window and fallback to the pre-rerank order on failure.
- Keep the heuristic corpus human-governed: a health pass may surface candidates or create the existing gardener’s human-gated merge proposals, but must not silently delete, merge, reject, or promote heuristics.
- Use Doen’s existing heuristic extraction and gardener machinery rather than introducing a separate source of heuristic content or an autonomous promotion workflow.
- Have the MCP tool and UI trigger invoke the same health-pass behavior. Make failures visible to the caller rather than reporting a successful pass with missing results.
- Update the MCP contract and project documentation for any new MCP surface or user-facing workflow.

Discretion:
- Choose the internal service and response shape for the health pass, while keeping the MCP and UI paths consistent.
- Choose safe batching, progress reporting, and operational handling for the embedding backfill, provided the completed migration leaves the agreed corpus consistently embedded.
- Place the UI trigger within the existing project heuristics experience, unless the owner prefers another location.
- Add focused tests and document operational steps for the re-embedding and dimension migration.

Acceptance criteria:
- The configured embedding model and database vector dimensions agree, and the agreed corpus has been re-embedded successfully. Retrieval and embedding writes work after migration.
- A paraphrase retrieval evaluation demonstrates that heuristics are recalled for queries expressing their underlying principles. The evaluation reports comparable retrieval measures before and after the change.
- The existing reranker is enabled as agreed, improves or preserves specificity in the evaluation, and falls back safely when unavailable or when its response is malformed.
- Long-unused heuristics can be surfaced as review candidates with enough information for a human to understand why each was surfaced; they are not silently removed from retrieval or the corpus.
- The MCP tool and project UI trigger run the same pass and expose its results, including the enforceable, verifiable, and advisable classifications and a distinct presentation for enforceable-shaped candidates.
- No heuristic is promoted into a spec constraint or lint check without a human action. Any merge proposals continue to use the existing human confirmation gate.
- Tests cover embedding migration/backfill behavior, staleness selection, classification/result handling, reranker behavior, and both on-demand entry points.

Open questions:
- Should the health pass cover one project’s heuristics, as the existing gardener does, or the global heuristic corpus? Should it also re-run extraction from completed initiatives, or operate only on heuristics already in the corpus?
- What does “full corpus re-embed” include: the heuristic vectors only, or also vectors in `decisions` and `memory` and centroids in `heuristic_labels`? What deployment window or downtime is acceptable for the dimension migration and backfill?
- Which signal defines “unused” for staleness: time since last citation, time since retrieval impression, or both? Should decay alter retrieval ranking, select review candidates only, or do both? What threshold or decay period should be used, and what human review action clears staleness?
- What definitions should distinguish enforceable, verifiable, and advisable? Should the pass only highlight enforceable-shaped heuristics, or should it provide a human-confirmed action to add one to a particular initiative’s constraints? Lint checks do not appear to be an existing Doen feature; should implementing a lint destination be in scope?
- Should enabling BD-73 make reranking the default for all deployments and all retrieval result types, or only for heuristic retrieval / the hosted configuration? What cost or latency trade-off is acceptable?
- What measurable evaluation target should define success for paraphrase recall and specificity? The initiative describes the desired direction but does not set a metric threshold or regression tolerance.
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: False, leaned: neither. The draft covers the embedding dimension migration and backfill, but does not raise whether indexes should remain available after the migration. Its indexing-related requirements do not address the 3072-dimension index gap or require an indexed representation such as halfvec + HNSW.
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: False, leaned: neither. The draft covers the embedding/dimension migration mechanism and requires that configured model and DB vector dimensions agree, but it never raises the question of whether the vector index (HNSW) survives the migration or how to handle an unindexed window. That specific question was not before the person as a constraint, discretion item, criterion, or open question, so it was not raised and the draft leans neither.
Every decision is recorded with what was ruled out and why. That record is the evidence.