2026-11-27 · openai/gpt-6-luna
3 seeds · build-doen, resume-builder · source: decisions
Seed 0
Escalations · 53 questions · chance: 35%
| Arm | Right | Right where no memory was wrong / reverse |
|---|---|---|
| stateless | 62% | |
| search | 72% | +7 / −2 |
| memory | 62% | +5 / −5 |
| structured | 72% | +6 / −1 |
| dream | 64% | +5 / −4 |
| promoted | 68% | +6 / −3 |
| wiki | 66% | +4 / −2 |
| transfer | 62% | +2 / −2 |
Final memories
build-doen · memory
Doen is a spec framework for product engineers (designers, software engineers, product owners): one durable intent artifact, constraint/discretion split, escalation of genuine intent calls, and guidance from precedent. Direction (2026-10-02): retire heuristic flywheel as abstract-rule distillation; 228 rules yielded 5 useful ones with circular success metric (docs/design-principles.md). Priorities: (1) Capture human reasoning: all 25 recorded decisions were agent-raised; 9 product initiatives yielded none; product-call precedent is empty. (2) Ground generated artifacts: executor verification is rigorous, but outputs cite nonexistent schema/surfaces and fabricate outcomes—especially harmful to designers. (3) Improve precedent retrieval once product corpus exists; baseline usefulness 18%. Jev is not verifier for this audience (auto-approves test criteria 71%; excludes human_judgment); value is drafting, groundedness, conflict detection, precedent weighing. Memory experiment decision: despite no replay arm beating always-answer-"built", build live executor memory as a measured, capped experiment. Randomly hold out initiatives with no memory; predeclare outcome measures and kill rule before serving. Everything served to executors must be visible to the person. Rationale: flywheel failed because it could not evaluate heuristic correctness, not because memory was served. Couple serving with measurement: score live predictions against the person's choice, compare holdout, and let people inspect outcomes and retire wrong heuristics. Replay alone is limited by record size and misses decision conversations; capture executor notes at the moment of the answer. Case-specific product preferences (avoid overgeneralizing): initiative lifecycle: hide Learn in Draft/Building; show only in Learn. Draft authoring: people may add/edit spec items from initiative page; executors draft from brief, later changes via proposals. Initiatives may start from project page. Creation: description/type required, title and line-list fields optional; use first description line as title stand-in and allow executor rename. Research findings: last-write-wins; executor owns working doc, MCP overwrites human edits with disclosure. Hide importance recommendations only when exactly one initiative. Sparse-data verification: realistic-input property tests plus separate live recompute; dispersion may emerge over time. Embedding migration 1536→3072: extend to halfvec+HNSW immediately, not temporarily unindexed retrieval. Drift: fold initiative_created into dismissed without extra trace when no longer actionable; pending/approved count. Preserve valuable data. Heuristic corpus: preserve coverage; unclustered ≠ low value. Auto-admit sound standalone, scoped, condition-bearing rules; uncertain remain raw. Dream-pass merges/generalizations auto-confirm above confidence threshold, borderline queue; humans can override. Retirement human-gated; retain restorable rejected sentinel. Supersedes confirmed constraint item_b52be75cb614. Evaluation: deterministic metrics in backend/tests/bench and default suite.
build-doen · structured
- Tie visibility and editing rights to lifecycle relevance; prefer simple explicit gates over costly inference. Evidence: Learn is hidden in Draft/Building and shown in Learn; “more than one initiative” beat completion-date drift or a hybrid. Draft spec items are person-editable, while post-draft changes remain executor proposals. No contrary evidence. Traps: event-history precision may be needless; executor authorship of the initial draft does not rule out human shaping beforehand. - Preserve meaningful human agency and material capabilities at the stage where they matter, while keeping clear executor boundaries later. Evidence: people regained draft editing after removing Advisor had left them unable; initiative creation can begin with description alone; post-draft changes remain executor proposals. No contrary evidence. Trap: autonomy is not excluding human participation or carrying draft permissions beyond their lifecycle. - Avoid requiring information upfront when a useful, honest provisional representation can bridge the gap until the responsible actor supplies it. Evidence: title is optional; the project list uses description’s first line as fallback, and executor can rename it while drafting. Missing description and unknown project remain invalid. No contrary evidence. Trap: a clear temporary suggestion is not license to invent definitive values or make every field optional. - Keep requirements and latitude consistent with settled decisions; update dependent descriptions and criteria when decisions change. Evidence: title optionality was reflected in dialog latitude and creation criteria. No contrary evidence. Trap: stale criteria can silently reintroduce rejected constraints. - Prefer simple ownership and sequencing when overwrite is acceptable; preserve established tool contracts, using a dedicated tool when a write path has distinct semantics. Evidence: accepted last-write-wins for executor-owned research_findings, rejected merge/version tracking and human-edit locks; chose submit_research_findings over extending submit_evidence. No contrary evidence. Trap: separate tools need a meaningful ownership boundary. - Protect criteria’s intended outcome, not literal wording: use trustworthy existing evidence and repair stale assumptions, but don’t weaken guarantees or close criteria on proxies that miss the real outcome. Leave open/needs_judgment when evidence is unavailable or out of scope. Evidence: repaired broken fixtures/assertions; replaced impossible “required CI” wording with deterministic default-suite bench gate; kept a production snapshot open after a local proxy. No contrary evidence. Trap: a convenient proxy is not proof of the outcome. - Treat failed measurement systems as a reason to improve the decision loop, not automatically to abandon the underlying capability. A bounded live experiment can be justified before offline replay beats a baseline when
build-doen · dream
## Decision patterns - Preserve intent over stale literal wording. Repair broken tests/interfaces to exercise the intended guard; deliberate contract reversals may require assertion changes, not weakened tests. Keep acceptance checks open where evidence is unavailable, especially post-deploy behavior. Do not deploy unilaterally; distinguish mechanical correctness from real-world impact. - Use project evidence and current measurements. Correct stale baselines, use established channels when named infrastructure does not exist, and document measured values rather than inventing infrastructure. - Prefer structural, in-scope fixes over workarounds; assess stranded proposals and avoid algorithm scope creep. Keep default gates deterministic and cassette-replayed; live/paid-model evaluations stay opt-in unless explicitly authorized as a controlled experiment. Amend impossible CI wording to name the actual gate. - Reduce manual corpus gates: admit only confident, sound, scoped, condition-bearing rules; confirm above threshold, escalate borderline cases, allow human override. Retirement remains human-gated; rejected sentinel is restorable. - Respect explicit owner reversals and capability requests. Distinguish human shaping during draft from executor proposals after draft. Align criteria with the agreed UI contract: optional inputs must not remain required. Description may be required while title is optional; absent title falls back to description’s first line. - For product-facing live experiments, the owner may authorize serving despite an inconclusive offline replay when serving is coupled to measurement that addresses the replay’s blind spots. Predeclare outcome measures and kill rule, use a random no-memory holdout, cap memory, and show the person everything served so they can judge and retire wrong heuristics. ## Project context Doen is a shared durable product-intent spec for designers, engineers, and product owners: constraint/discretion split, genuine escalation, and precedent guidance. It is not an abstract engineering-rule distiller; heuristic flywheel is retiring (228 rules yielded 5 usable ones; circular success metric). Priorities: capture human reasoning (currently absent), ground generated artifacts, then retrieve precedent once a product corpus exists. Jev helps draft, ground, detect conflicts, and weigh precedent—not verify behavior or human-judgment-heavy product work. ## Precedents - Learn model is not rendered in Draft/Building; rendered in Learn. Complete-stage behavior unresolved. - Research findings are executor working documents, pure last-write-wins (MCP may overwrite human edits); dedicated `submit_research_findings(initiative_id, findings)`. - Importance recommendation hidden only with exactly one initiative. - Dispersion: realistic event-count sweeps (>20 distinct scores) plus live recompute correctness; current corpus may not disperse, future events affect it. - 1536→3072 embeddings: use `halfvec` + HNSW in migration to avoid unindexed retrieval; not general preemptive
build-doen · promoted
{
"index": "Doen is a shared spec framework for product engineers: preserve durable intent, separate constraints from discretion, escalate genuine intent calls, and use comparable precedent. Prioritize capturing shaping reasoning, grounding artifacts in real project evidence, then improving retrieval; avoid abstract-rule distillation. Interpret requirements by protected behavior, not literal wording. Prefer deterministic, low-friction gates; live-model evals stay opt-in. Preserve production capability through migrations; investigate plausible fixable regressions; accept bounded fidelity loss when complexity outweighs signal. Open `approach` for strategy/product agency; `precedent` for UI; `research` for writes; `verify` for evidence; `migration` for infrastructure; `quality` for regressions; `signals` for fidelity; `corpus` for curation; `gates`",
"notes": {
"approach": "Doen serves designers, engineers, and product owners with one durable intent artifact: distinguish constraints from discretion, escalate genuine intent calls, and guide from comparable precedent. Priorities: capture shaping decisions (agent-raised decisions dominate; product precedent is sparse), ground generated specs/records in repository evidence, then improve retrieval. Jev drafts, grounds, detects conflicts, and weighs precedent; it is not a verifier of product judgment. Avoid abstract engineering-rule distillation: the heuristic flywheel was retired after 228 rules yielded 5 useful ones and a circular success metric. Prefer real, deterministic, low-friction safeguards over nominal process or costly/flaky checks. People may start initiatives with minimal friction and add/edit spec items during Draft; executors draft from the brief, and after Draft changes go through executor proposals.",
"precedent": "Learn module is truly hidden in Draft/Building and rendered only in Learn; this is not a universal UI rule. Hide importance recommendation only when a project has exactly one initiative. Do not substitute completion-after-creation or hybrid visibility conditions.",
"research": "`research_findings` is executor-owned working content; humans annotate after investigation concludes. Web/MCP writes are pure last-write-wins, so executor writes can overwrite human edits; document this plainly in MCP description. No locks/versioning absent clear need. Use dedicated `submit_research_findings(initiative_id, findings)`, not a change to `submit_evidence`.",
"verify": "Separate proof of measurement mechanics from real outcomes. For live-data score dispersion beyond six values, corpus has only six distinct raw event-count combinations (78/98 heuristics have one confirmation, zero citations; no `drafting` citations). Reweighting cannot yield more scores than distinct inputs. Verify mechanism by sweeping realistic event counts through formula and requiring >20 distinct scores, plus correctness evidence for live recompute; accept that corpus dispersion awaits future events. For deployment- or execution-dependent evidence, record available durable SQL evidence in `RESEARCH_LOG.md`, remeasure mutable baselines at decision/build time, and leave criterion open/needs_judgment until the real observation exists. Do not substitute local predicate comparisons for deployment outcomes.",
"migration": "For 1536\u21923072 embeddings, preserve indexed retrieval rather than ship an unindexed window or defer restoration. Extend migration to `halfvec` + HNSW (plain pgvector `vector` indexing caps at 2000 dimensions). Generally preserve production capabilities through migrations; temporary regressions or deferred restoration need authorization.",
"quality": "Jev dedup was materially worse than StructuredLLM on the same 186 gold cases (55.91% vs 67.74%; ~22 more errors), violating the confirmed not-worse bar. Iterate on plausible, in-scope rubric fixes and remeasure same cases before deciding; escalate fundamental limits or authority boundaries. Do not accept a regression merely because suspected bias is fixable until remeasured.",
"signals": "When collapsing DriftReportStatus, user accepted folding `initiative_created` into `dismissed` without a trace, though BD-51 then stops counting those resolved reports as recurring-drift instances. Pending/approved still count. In narrow, low-volume cases, bounded fidelity loss can be preferable to schema complexity when the signal is marginal.",
"corpus": "Reduce recurring human maintenance without sacrificing coverage. Jev may auto-admit unclustered rules only when confidently judged sound, well-scoped, and condition-bearing; uncertain rules stay raw. Jev may confirm merge/generalisation proposals above a confidence threshold; borderline cases queue for human judgment, with override. Retirements remain human-gated because removal feels irreversible, while rejected sentinel is restorable. Human is override, not routine gatekeeper; this supersedes earlier all-human-gated constraints.",
"gates": "Keep deterministic checks in the default cassette-replayed bench; live-LLM evaluations are opt-in, not default paid/flaky gates. Split deterministic over-generalisation checks into the bench and amend criteria to match the real gate; do not invent CI infrastructure. If a protective test/eval is broken by a stale interface, repair it in scope when that restores the intended assertion; confirm it actually runs and passes. Do not weaken assertions to pass. A test encoding a deliberately reversed contract must change; distinguish intentional contract updates from weakening. Scheduling live evals is a separate decision.",
"scope": "Interpret constraints"
}
}build-doen · wiki
{
"Doen product philosophy": {
"body": "Doen is a shared spec framework for product engineers\u2014designers, software engineers, and product owners. Its durable artifact is product intent: distinguish firm constraints from discretion, escalate genuine intent calls, and use precedent as guidance rather than authority. Doen is not an abstract engineering-rule distiller; retire the heuristic flywheel (docs/design-principles.md, 2026-10-02), whose 228 rules produced only 5 usable ones and whose success metric was circular.\n\nPreserve human intent while adapting to actual evidence and current product facts. Automate bounded, repeatable work; keep meaningful judgment and irreversible choices visible. Resolve consequential workflow or architectural gaps when a viable in-scope fix exists, rather than shipping a known degradation by default. Priorities: capture human reasoning, ground specs and generated artifacts, then improve precedent retrieval once a useful product corpus exists.",
"links": [
"Capture human reasoning and precedent",
"Grounding and verification",
"Product UX and tool contracts",
"Heuristic corpus stewardship",
"Execution gates and contract changes"
]
},
"Capture human reasoning and precedent": {
"body": "Capture human reasoning during shaping before optimizing retrieval. Product precedent is sparse: all 25 recorded decisions were agent-raised, while 9 initiatives captured none; retrieval's measured usefulness baseline was 18%. A reliable capture path is more valuable than better search over an empty corpus.\n\nPrecedent informs but does not replace intent. Specs should distinguish constraints from discretion and explicitly surface genuine intent questions. Keep criteria open when they require a real post-ship human or executor outcome; do not turn a proxy into proof. See [[Grounding and verification]].",
"links": [
"Doen product philosophy",
"Grounding and verification"
]
},
"Grounding and verification": {
"body": "Ground specs and generated artifacts, not only executor behavior: tests may miss fabricated citations, nonexistent product surfaces, or false claims of learning. Jev can draft and ground specs, detect conflicts, and weigh precedent; it does not verify product criteria. Human product judgment remains explicit (`human_judgment` is unsupported), and tests may auto-approve.\n\nMatch evidence to the claim. If live inputs are too sparse for a dispersion criterion, test the mechanism over realistic inputs and separately verify live recomputation correctness. Arithmetic/count tests establish arithmetic, not behavior change. Local old-vs-new comparisons do not establish a criterion requiring deployment evidence. Record available pre-deploy evidence and leave post-deploy outcomes open until observed. Use established measurement channels and refresh stale baselines; do not require nonexistent dashboards or stores.",
"links": [
"Doen product philosophy",
"Capture human reasoning and precedent",
"Execution gates and contract changes"
]
},
"Product UX and tool contracts": {
"body": "Prefer stage-appropriate absence over disabled controls: Learn is not rendered in Draft or Building and appears only in Learn. Keep fields and tools simple and discoverable. `research_findings` is the executor's working document; MCP writes are last-write-wins and may overwrite human edits. State this clearly rather than adding locks or versioning without a clear benefit; people annotate after investigation concludes. For distinct operations, prefer a dedicated tool (`submit_research_findings`) over changing an existing tool's contract. Show importance recommendation unless the project has exactly one initiative; do not substitute an unrelated drift-detection condition.\n\nWhen a product decision changes, update every spec item and latitude that contradicts it. If title is explicitly optional, require description and type only, use the description's first line as a temporary display title, and describe title as optional throughout.",
"links": [
"Doen product philosophy",
"Human agency in product workflows",
"Grounding and verification"
]
},
"Human agency in product workflows": {
"body": "Restore human agency when the app otherwise leaves a desired capability unavailable. People can start initiatives from the project page and add/edit spec items while an initiative is in Draft; executors still draft from the person's brief, and after Draft spec changes go through executor proposals. The brief is separate from the spec and is not editable after creation. New initiatives need a description and Build/Research choice (Build default); title and line-list fields are optional. An omitted title can temporarily derive from the description's first line, then the executor may rename it.\n\nKeep the workflow boundary explicit: human shaping is available before building, without making humans the sole author of executor-produced drafts.",
"links": [
"Doen product philosophy",
"Product UX and tool contracts"
]
},
"Heuristic corpus stewardship": {
"body": "Avoid human-maintenance gates that stall the corpus. Jev may auto-admit an unclustered rule only when it judges the rule sound, well-scoped, and condition-bearing; otherwise leave it raw. Jev may confirm merge and generalization proposals above a confidence threshold; uncertain proposals go to a human, who can override. This replaces routine human promotion/merge gates without making every raw rule guidance. Keep retirement human-gated: removing guidance feels irreversible, unlike adding or merging it.\n\nEnsure pending proposals remain eligible for later judgment, not just the pass that created them. Widening the evaluated set can fix stranded work without changing algorithm order or the per-proposal decision rule. Do not confuse a scheduling change with repairing a structurally unreachable proposal.",
"links": [
"Doen product philosophy",
"Execution gates and contract changes"
]
},
"Execution gates and contract changes": {
"body": "Prefer deterministic, repeatable default-suite checks as merge gates. Put cassette-replayed metrics in `backend/tests/bench`; keep paid or nondeterministic live-model evaluations opt-in in `tests/evals`. If CI is unavailable, implement a real deterministic gate and amend criteria to match; do not invent infrastructure or make live LLM calls merge arbiters. Repair a broken guard when relied on, even if that requires updating a stale test interface; preserve the deterministic/live-eval boundary. Honor revised contracts in tests: fixture-only changes should preserve assertions, but when a contract is deliberately reversed, assertions should move toward the new contract rather than be weakened. For controlled evaluations, a plausible in-scope fix warrants iteration and remeasurement on the same",
"links": [
"Doen product philosophy",
"Grounding and verification",
"Heuristic corpus stewardship"
]
}
}build-doen · transfer
(from resume-builder) Product principles: AI supports; users own/edit professional history and are never blocked by generation/export. Warn clearly about risks, then trust user choice. Localization is core: adapt resume structure, length, format, and cultural expectations to target markets. Prefer scoped changes for committed requirements; preserve cheap historical state that cannot be reconstructed. Stale/unsatisfiable specs are defects, not mandates to restore retired functionality. Verify schema, code, migrations, and behavior before substituting nearby features or adding persistence. Do not reintroduce removed concepts without a fresh product case. Reads must not write (RB-8). Overview: Title, Created, Last edited, Actions (archived also Archived); score/scorer/API removed RB-9/migration 0004. Compliance persists only at targeted-generation completion; GET recomputes without saving. Amend stale score references; do not substitute compliance. Resume content is one freely editable Markdown document; convert structured JSON to {markdown: "..."}. Resolve generation/provenance, guards, keyword evidence, compliance, RB-14 outline, supported Markdown, ATS-safe rendering (RB-10). Profiles are career library; resumes directly editable. Keep resumes.profile_id NOT NULL, seed profile from first resume, preserve provenance/write-back and profile/resume version drift. Keep skills/profile_skills separate when canonical aliases and resume_keywords.skill_id are committed. Guidance (RB-9): anchored keyword suggestions only; atomic accept, durable dismissal, stale-anchor validation at read/accept, derived queue. Items: anchor quote + occurrence, claim, proposed_change, reason; dismissal key hashes category + normalized quote. No whole-doc GenAI, deterministic checks, or compliance findings. Compliance separate: ERROR blocks generated writes, warnings don't; surface all findings. Empty queue without target is correct. RB-10 formatting, RB-11 quantification. One-at-a-time means one answer/card, not necessarily one document marker. RB-18 shipped/verified scope remains unless superseded. Guided Assistant RB-21: distinct initiative with durable per-resume thread, per-requirement status, skipped/dismissed decisions, context registry/provenance, fact capture, placeholders, continuous evaluation, proposal diff/apply/undo. Replaces RB-20 unpublished findings column/prose panel and folds RB-18/19 suggestions panel into thread; suggestions are proposal cards (Apply, Not now, Undo). Access via agenda, queue popover, or document marks; no duplicate panel. Marks are location cues; clicking acts normally (caret, no auto-open/request), scopes composer to line with chips. Select work in conversation/agenda/popover/chips. Rewrite 29 browser tests for thread behavior. Advert edits: preserve every decided requirement (including “I don't have this”) by durable item_key = hash(category + requirement id), never wording; reworded same requirement keeps decision. Close/remove open items for absent requirements; genuinely new requirements open. Don't clear all or ask user: requirements belong to advert. Model routing decision: use existing Jev/System One for classification, OpenRouter for all user-facing generated prose; no new modelresume-builder · memory
Product principles: AI supports; users own/edit professional history and are never blocked by generation/export. Warn clearly about risks, then trust user choice. Localization is core: adapt resume structure, length, format, and cultural expectations to target markets. Prefer scoped changes for committed requirements; preserve cheap historical state that cannot be reconstructed. Stale/unsatisfiable specs are defects, not mandates to restore retired functionality. Verify schema, code, migrations, and behavior before substituting nearby features or adding persistence. Do not reintroduce removed concepts without a fresh product case. Reads must not write (RB-8). Overview: Title, Created, Last edited, Actions (archived also Archived); score/scorer/API removed RB-9/migration 0004. Compliance persists only at targeted-generation completion; GET recomputes without saving. Amend stale score references; do not substitute compliance. Resume content is one freely editable Markdown document; convert structured JSON to {markdown: "..."}. Resolve generation/provenance, guards, keyword evidence, compliance, RB-14 outline, supported Markdown, ATS-safe rendering (RB-10). Profiles are career library; resumes directly editable. Keep resumes.profile_id NOT NULL, seed profile from first resume, preserve provenance/write-back and profile/resume version drift. Keep skills/profile_skills separate when canonical aliases and resume_keywords.skill_id are committed. Guidance (RB-9): anchored keyword suggestions only; atomic accept, durable dismissal, stale-anchor validation at read/accept, derived queue. Items: anchor quote + occurrence, claim, proposed_change, reason; dismissal key hashes category + normalized quote. No whole-doc GenAI, deterministic checks, or compliance findings. Compliance separate: ERROR blocks generated writes, warnings don't; surface all findings. Empty queue without target is correct. RB-10 formatting, RB-11 quantification. One-at-a-time means one answer/card, not necessarily one document marker. RB-18 shipped/verified scope remains unless superseded. Guided Assistant RB-21: distinct initiative with durable per-resume thread, per-requirement status, skipped/dismissed decisions, context registry/provenance, fact capture, placeholders, continuous evaluation, proposal diff/apply/undo. Replaces RB-20 unpublished findings column/prose panel and folds RB-18/19 suggestions panel into thread; suggestions are proposal cards (Apply, Not now, Undo). Access via agenda, queue popover, or document marks; no duplicate panel. Marks are location cues; clicking acts normally (caret, no auto-open/request), scopes composer to line with chips. Select work in conversation/agenda/popover/chips. Rewrite 29 browser tests for thread behavior. Advert edits: preserve every decided requirement (including “I don't have this”) by durable item_key = hash(category + requirement id), never wording; reworded same requirement keeps decision. Close/remove open items for absent requirements; genuinely new requirements open. Don't clear all or ask user: requirements belong to advert. Model routing decision: use existing Jev/System One for classification, OpenRouter for all user-facing generated prose; no new model client. Coverageresume-builder · structured
- Optimize for the intended workflow, not the smallest implementation or preservation of prior contracts; accept bounded complexity when it enables durable use, and remove structures that obstruct it. Evidence: whole-document editing supports cross-section selection/undo/movement; free Markdown need not have recognized sections; one role/context/thread per resume; validated JSONB settings read together. No known contradiction. Traps: “one editor” does not mean fixed fields; readable headings aren’t contractual boundaries; resolve downstream spec impacts explicitly. - Keep authorship and access user-controlled while letting AI interpret content downstream. Evidence: users manage base history; AI infers structure, compliance, and evidence from free text; approved suggestions persist through guidance; users can download resumes with marked/countable placeholders instead of being blocked. No known contradiction. Traps: user control neither requires manually encoded semantics nor makes AI a prerequisite; warnings inform, not authorize withholding work; distinguish analysis from approved changes. - Make the assistant lead a bounded, actionable workflow; chat-like presentation is not permission for general-purpose free chat. Evidence: chose C2’s ranked agenda, user steering, concrete action each turn, intent routing, and defined fallback; rejected fixed wizard and open chat. No known contradiction. Traps: blank-thread prompts, unrestricted instructions, or optional guidance undermine the product; guidance is the product, chat its form. - Keep one authoritative guidance surface when surfaces read the same queue, while preserving useful document-location cues and separate settings surfaces. Evidence: removed duplicate suggestions panel; proposals retain diff, reason, Apply/Not now/Undo; marks show work location, and caret clicks place caret/scope composer rather than opening suggestions. Later chose updated C2 two-tab Assistant/Document rail, moving document properties into Document and Auto adjust into formatting row. No contradiction: settings are not guidance; exclusions are context-specific. Traps: don’t duplicate guidance or infer all tabs are forbidden; marks aren’t suggestion-opening controls. Follow the owner’s updated prototype closely when directed. - Preserve user-authored or endorsed knowledge across reprocessing; reconcile derived work to the latest source instead of resetting or asking needless questions. Evidence: advert re-extraction preserves requirement answers by stable category+requirement-id item_key, including rewording; removes obsolete open items and adds new ones open. Gap answers describe the person, not the advert. Context fields still prompt before overwriting user-typed values. No contradiction. Traps: changed source is not permission to erase durable user facts; don’t extend this rule to typed context fields. - Match model/provider to task shape and cost: use a native typed classifier for bounded decisions, keep deterministic/cheap paths first, and reserve model
resume-builder · dream
Profiles are the career library; resumes are editable variants with provenance/write-back. Keep resumes.profile_id NOT NULL; seed a profile from the first resume. Targeting uses user-authored material. Normalize skills/aliases; resume_keywords.skill_id references canonical skills. Increment profiles.version on profile/entry/bullet writes; stamp resumes.profile_version at generation and compare. Use PostgreSQL JSONB with SQLite variants for existing tests; real-Postgres-only behaviors get dedicated integration coverage. Resume content is free text `{markdown: "..."}`: no mandatory sections, slots, or inferred structure. RB-12's rigid Tiptap schema shipped/verified, then was superseded—not a defect. Render editing surface from renderer HTML for parity; structural edits update JSON then re-fetch rendered body. Browser/caret behavior warrants Playwright E2E. RB-9 score/scorer/endpoints/API field/JSONB removed; never reintroduce score. Overview tables show title, created/updated, actions (+ archived_at for archived). Stale score clauses in c0016c64455f, 3af0c51be139, ca36c0e23494 and duplicate wording in 558a165bdbe0 are superseded. Compliance is distinct: errors block generation before resume write; warnings do not. Successful targeted generation stores findings; GET recomputes without persistence. Reads never write. Concurrency token hashes client-editable state (content, presentation, title, status, template_key, region_code), not updated_at/derived values. Idle-gap always snapshots; simultaneous triggers coalesce into one row retaining every trigger flag. Cross-user/nonexistent resources 404; unauthenticated 401. Worker should build from repo root, share API code (no copied duplicate), with Railway pointed to root/explicit Dockerfile. Prompts belong under app/prompts; move shared SYSTEM_PROMPT there behavior-preservingly. Guidance is derived, not authoritative; check staleness on read/accept, not autosave. Anchor `{quote, occurrence}`; accept transactionally replaces exact text, mismatch drops stale item. Dismissal key hashes category + normalized quote. Five fields remain; anchor is not a section/entry/bullet. Queue acceptance/dismissal is durable/apply mechanism. Calibration findings stay ephemeral; explicit accept converts one into guidance, never directly applies/persists finding. Actionable findings need exact anchor and replacement; unresolvable anchors have no accept; gaps need insertion context or no button. After accept adopt returned content/version to avoid autosave 409. Guidance UI: RB-21 guided assistant replaces unpublished RB-20 findings UI outright; retain backend/job profile/OpenRouter calibration/refusals/anchor validation/finding-to-guidance path. Guided chat, not general chat or blank prompt: ranked assistant-led agenda, user steering, every turn ends in concrete action. Input disabled until role exists; typed text routes to target/goal via known intents, never free model instruction. Narrow vague requests; clarify ambiguous targets; derive chips from current state. Assistant is sole guidance surface; remove RB-18/RB-19 suggestions panel. Proposals in thread as cards (diff, reason, Apply, Not now, Undo), reachable from agenda, queue popover, or document mark. Clicking marked text places caret. Classification:resume-builder · promoted
{
"index": "Users own truthful career history and resumes; AI assists, never invents unsupported claims or gates access/export. Prefer small reversible changes, one coherent convention; inspect repo and prioritize owner\u2019s updated prototype over stale specs. Resume is pure free-text Markdown; downstream structure is AI-interpreted. C2 is guided assistance, not general chat. Open `product` for UX/principles; `career` for profile ownership/duplication; `document` for Markdown/rendering/guidance; `backend` for tokens, drift, revisions, security/compliance; `data-tests` for skills/JSONB/testing; `build` for worker/prompts/frontend tests.",
"notes": {
"product": "Users own/edit resumes and truthful career history. AI reviews, enhances and localizes on demand, never inventing unsupported claims or gating access/export. Localization adapts structure, length, formatting and cultural expectations to market. Prefer smallest reversible change and one convention; inspect repository, and treat owner\u2019s updated prototype/instruction as stronger evidence than stale spec. C2 is the core: guided chat-like assistant, not general chat or blank prompt. Assistant leads with ranked agenda; typed input redirects to target/goal, routed to known actions; clarify missing targets, narrow vague asks, derive chips from state, provide fallback. Keep guidance readily available. One Assistant/Document two-tab rail is compatible: Document contains settings, not guidance; remove top-toolbar properties, put Auto adjust in formatting row; avoid clutter/sideways typography wall. Use Tailwind and shadcn. RB-9 score is retired; no score in overview.",
"career": "Profiles are durable career library; resumes are directly editable documents. Keep resumes.profile_id NOT NULL and seed profile from first resume. Preserve source_entry_id/source_bullet_id provenance and offer promotion of edits back to profile; targeting may use union of career material. Pure-Markdown resumes invalidate old field-level provenance assumptions. One resume = one role/context/thread. Duplicate for another role; inherit document/context (including job target/profile), but not thread or requirement decisions; start fresh. Copy roots at original. Immediate role prompt discretionary.",
"document": "resumes.content = {markdown: \"...\"}, pure free-text Markdown, no required/recognized sections or inferred fields; downstream structure uses GenAI. Decision 15 supersedes RB-12 structured schema (which remains shipped/verified); convert existing JSON rows, revise provenance/evaluation/compliance and renderer. RB-10 remains ATS-safety authority. Guidance has one queue for document-changing proposals, including keywords and calibration-derived suggestions. Exact {quote, occurrence} anchor plus replacement; apply atomically, stale/missing anchors dropped/refused (409), dismissal durable; unresolved findings cannot be accepted. Calibration response itself remains unpersisted; grounded findings may produce queue items only with resolvable quote/replacement. One proposal card at a time in thread, no separate findings/suggestions panel; reach via agenda, queue popover, marks. Marks: one quiet, layout-neutral dotted underline per anchored line; click selects/cycles items on line and caret behaves normally. Watch whether card changes while editing feels helpful or startling. Never block download; prominently mark/count placeholders.",
"backend": "Concurrency token hashes client-editable state only: content, presentation, title, status, template_key, region_code\u2014not updated_at or derived/read-triggered writes. Identical state may share token. profiles.version increments on profile/entry/bullet write; resumes.profile_version captures generation version; drift is inequality, not timestamps. Continuous autosave writes content without revisions; every idle-gap timeout creates exactly one revision. Overlapping triggers produce one row carrying all triggers and metadata; preserve explicit action snapshots. Ownership queries scope by user_id; foreign and missing both 404, unauthenticated 401 separately. Compliance ERROR blocks generation, warning does not; persist findings, prompt for market-required missing data.",
"data-tests": "Keep skills + profile_skills and normalize resume_keywords.skill_id; aliases (K8s/Kubernetes) and shared vocabulary/cross-user analytics justify it. SQLAlchemy PostgreSQL JSONB columns use JSONB().with_variant(sqlite.JSON, 'sqlite') to preserve Postgres semantics and existing SQLite tests; add dedicated Postgres integration coverage for CHECK and in-place JSONB mutation. Do not split ORM metadata or migrate whole suite. Markdown remains JSONB; conversion is data work, not required column-type migration. Browser behavior (especially contentEditable/caret/accessibility) merits Playwright against live stack; add @playwright/test, axe-core, config and make target. Server invariants remain pytest/API assertions.",
"build": "Worker uses shared API code: build from repo root, copy api/ and worker/, add api/ to PYTHONPATH, merge AI dependencies into worker requirements; Railway worker points to repo root with explicit Dockerfile path. Delete stale worker/app/shared duplicate. Shared-package extraction remains separate future refactor. Establish one prompt convention at api/app/prompts; move SYSTEM_PROMPT there while preserving name/module/text and tests, rather than competing inline/file conventions."
}
}resume-builder · wiki
{
"Product model and variants": {
"body": "The product balances a canonical career library for targeting with user-owned, editable resume documents. Every resume has a profile; seed one from the first resume. Preserve provenance where useful and make promoting edits back to the profile explicit. A resume variant targets one role; duplicate it for another rather than mixing role-specific advice. Duplicate the document and relevant role context, but reset role-specific thread and requirement decisions.",
"links": [
"Free-text resumes",
"Profile vocabulary and drift",
"Guided assistant"
]
},
"Free-text resumes": {
"body": "Storage is `resumes.content = {markdown: ...}`: one free-text Markdown document, with no required headings, fields, sections, or structural contract. This deliberately supersedes the former structured Tiptap schema; convert existing records and render/edit Markdown. Do not restore section semantics or a draggable outline. Generation, provenance, keywords, compliance, and formatting must interpret Markdown, using GenAI where needed. Expand Markdown deliberately; ATS safety remains authoritative.",
"links": [
"Product model and variants",
"Profile vocabulary and drift",
"Guidance queue and adoption",
"Compliance and export",
"Editing and concurrency"
]
},
"Profile vocabulary and drift": {
"body": "Keep `skills` and `profile_skills` where canonical vocabulary, alias resolution, or cross-user analytics are committed needs; aliases normalize variants, and resume keywords reference canonical skills. Avoid tables for hypothetical futures. Preserve generation-time profile state: increment `profiles.version` on profile, entry, or bullet writes and copy it to the resume at generation. Compare counters, not timestamps, which miss child edits.",
"links": [
"Product model and variants",
"Free-text resumes"
]
},
"Guidance queue and adoption": {
"body": "Guidance is the single path for document changes; suggestions are advisory, not scores or compliance verdicts, and nothing applies until adopted. Anchor by exact quote plus occurrence. Accept atomically replaces only that occurrence; if stale or missing, drop it rather than guessing. Dismissal identity hashes category plus normalized quote. Resolve stale items on read/accept, not autosave. Producers include keyword and calibration findings; adoptable findings need a resolvable quote and exact replacement. Calibration output itself remains transient; only derived queued/adopted guidance persists. No target means no keyword suggestions. Queue selection may be user-activated; otherwise server order is default.",
"links": [
"Free-text resumes",
"Guidance marks",
"Guided assistant",
"Compliance and export",
"Editing and concurrency"
]
},
"Guidance marks": {
"body": "Map all open, valid suggestions in the document while keeping decisions one-at-a-time. Mark each anchored line with a quiet, layout-neutral dotted underline, quieter than the active item\u2019s solid underline/tint; avoid borders and layout shifts. Count marked lines, not suggestions; queue count communicates item count. Clicking a marked line places the caret normally. Marks locate proposals; in the assistant design, select/review proposals through agenda, queue popover, or chips rather than hijacking ordinary editing clicks. Stale anchors are never marked.",
"links": [
"Guidance queue and adoption",
"Guided assistant",
"Editing and concurrency"
]
},
"Compliance and export": {
"body": "Only compliance ERROR findings block generation; warnings are stored and surfaced but do not make a market unusable. Interpret Markdown, not removed section fields. Keep compliance distinct from advisory guidance. No resume score/scorer/endpoints/API field, and do not substitute a compliance column in overview tables: show title, created, last edited, actions (plus archived date in archived table). Users can always download. Unfilled placeholders must be conspicuously marked and counted at export, but never block it.",
"links": [
"Free-text resumes",
"Guidance queue and adoption",
"Guided assistant"
]
},
"Guided assistant": {
"body": "The assistant is a guided, chat-like experience, not a general chatbot or fixed wizard. It leads with a ranked agenda; the user steers; each turn ends in a concrete action. Never show a blank thread awaiting an idea or pass typed text as unrestricted model instruction. Enable input once a role exists; route text to known action/target/goal, clarify missing targets, ground vague asks in high-impact fixes, and use a defined fallback. Generate chips from resume state; never invent claims. The thread is the sole guidance surface: proposal cards show diff, reason, Apply, Not now, Undo; reach them through agenda, queue popover, or document marks. Findings feed the same queue. Preserve decided advert requirement answers, including \u201cI don\u2019t have this,\u201d across re-extraction using stable item keys based on category and requirement ID, not wording; close vanished open gaps and add genuinely new ones.",
"links": [
"Product model and variants",
"Guidance queue and adoption",
"Guidance marks",
"Compliance and export",
"Account preferences",
"Editing and concurrency"
]
},
"Account preferences": {
"body": "Account-level assistant/context defaults (language, tone, market) belong in the existing `users.preferences` JSONB document, validated by a Pydantic model in `app/schemas/jsonb.py`, not free-form dicts, typed columns, or a new profile column. They evolve with registry entries, are consumed together, and are not queried across users. Keep them user-scoped so profile switching does not alter defaults. Distinguish from `profiles.languages` (spoken languages). Account defaults yield to per-resume overrides such as `region_code`.",
"links": [
"Guided assistant",
"Product model and variants"
]
},
"Editing and concurrency": {
"body": "Prefer renderer-owned HTML for visual parity where feasible; browser editing must preserve caret behavior and render consistently with Markdown. Concurrency tokens cover client-editable state (content, presentation, title, status, template, region), not `updated_at` or derived writes: feedback reads/recomputation must not invalidate a writer. Adopt returned content/version after guidance acceptance to avoid stale autosave conflicts. Structural edits update local content then re-render. Scope data access by owner and make cross-user indistinguishable from missing (404; unauthenticated 401).",
"links": [
"Free-text resumes",
"Guidance queue and adoption",
"Guidance marks",
"Autosave and revision snapshots",
"Testing and database"
]
},
"Autosave and revision snapshots": {
"body": "Continuous autosave and revision checkpoints are separate. Autosave persists active typing without snapshots; each idle-gap timeout creates exactly one revision. If checkpoint conditions coincide, write one row and record every condition that fired; do not deduplicate based on content. Verify browser editing and assert revision counts server-side.",
"links": [
"Editing and concurrency",
"Testing and database"
]
},
"Testing and database": {
"body": "Keep existing SQLite tests unchanged by using PostgreSQL JSONB with a SQLite JSON variant; add a dedicated Postgres fixture for behavior SQLite cannot verify (such as CHECK constraints and in-place JSONB mutation). Use Playwright",
"links": [
"Editing and concurrency",
"Autosave and revision snapshots"
]
}
}resume-builder · transfer
(from build-doen) Doen is a spec framework for product engineers (designers, software engineers, product owners): one durable intent artifact, constraint/discretion split, escalation of genuine intent calls, and guidance from precedent. Direction (2026-10-02): retire heuristic flywheel as abstract-rule distillation; 228 rules yielded 5 useful ones with circular success metric (docs/design-principles.md). Priorities: (1) Capture human reasoning: all 25 recorded decisions were agent-raised; 9 product initiatives yielded none; product-call precedent is empty. (2) Ground generated artifacts: executor verification is rigorous, but outputs cite nonexistent schema/surfaces and fabricate outcomes—especially harmful to designers. (3) Improve precedent retrieval once product corpus exists; baseline usefulness 18%. Jev is not verifier for this audience (auto-approves test criteria 71%; excludes human_judgment); value is drafting, groundedness, conflict detection, precedent weighing. Memory experiment decision: despite no replay arm beating always-answer-"built", build live executor memory as a measured, capped experiment. Randomly hold out initiatives with no memory; predeclare outcome measures and kill rule before serving. Everything served to executors must be visible to the person. Rationale: flywheel failed because it could not evaluate heuristic correctness, not because memory was served. Couple serving with measurement: score live predictions against the person's choice, compare holdout, and let people inspect outcomes and retire wrong heuristics. Replay alone is limited by record size and misses decision conversations; capture executor notes at the moment of the answer. Case-specific product preferences (avoid overgeneralizing): initiative lifecycle: hide Learn in Draft/Building; show only in Learn. Draft authoring: people may add/edit spec items from initiative page; executors draft from brief, later changes via proposals. Initiatives may start from project page. Creation: description/type required, title and line-list fields optional; use first description line as title stand-in and allow executor rename. Research findings: last-write-wins; executor owns working doc, MCP overwrites human edits with disclosure. Hide importance recommendations only when exactly one initiative. Sparse-data verification: realistic-input property tests plus separate live recompute; dispersion may emerge over time. Embedding migration 1536→3072: extend to halfvec+HNSW immediately, not temporarily unindexed retrieval. Drift: fold initiative_created into dismissed without extra trace when no longer actionable; pending/approved count. Preserve valuable data. Heuristic corpus: preserve coverage; unclustered ≠ low value. Auto-admit sound standalone, scoped, condition-bearing rules; uncertain remain raw. Dream-pass merges/generalizations auto-confirm above confidence threshold, borderline queue; humans can override. Retirement human-gated; retain restorable rejected sentinel. Supersedes confirmed constraint item_b52be75cb614. Evaluation: deterministic metrics in backend/tests/bench and default suite.
Dream stages (recorded from runs after 2026-11-27)
build-doen · dream · dream at call 5
## Decision precedent - **Learn-stage visibility:** In “Add Learn Stage to Initiative Lifecycle,” hide Learn in Draft/Building and render it in Learn. Preserve the specified read-only behavior in Complete. Rationale: the learn model should not be rendered in Draft/Building. - **Research findings write semantics:** In “Add Research Findings Freetext Field,” use pure last-write-wins: executor/MCP writes overwrite even after a human edit. Document this clearly in the MCP tool description. The field is the executor’s working document; humans annotate after investigation concludes. Avoid locks or merge/version tracking absent clear benefit. - **Research findings MCP API:** Use dedicated `submit_research_findings(initiative_id, findings)`, not an optional parameter on `submit_evidence`. Keep the existing tool contract stable; a dedicated tool is more discoverable and explicit. - **Importance recommendation visibility:** In “Initiative Importance Validation on Assessment,” hide the recommendation only when the project has exactly one initiative. This was chosen over completed-after-creation-date and hybrid rules. No rationale was provided; treat as specific precedent, not a general principle. - **Heuristic score dispersion verification:** For “Shaping Edits as Heuristic Feedback,” the live corpus had only six distinct raw event-count combinations, so reweighting could not produce more than six live score values. Verify the mechanism instead: sweep realistic survived/removed/citation event counts through the rebalanced formula and require >20 distinct scores, plus evidence that the live recompute preserves correctness. Accept that live dispersion depends on future events. ## Limited recurring signal For the research-findings workflow, favor explicit, discoverable interfaces and simple semantics; avoid changing stable contracts or adding complexity without clear benefit. This is specific to the recorded tool/field decisions, not a universal product rule.
build-doen · dream · dream at call 10
## Decision precedents - **Learn visibility:** Do not render the learn model in Draft/Building; render it only in Learn. No decision here establishes Complete-stage behavior. - **Research findings:** Use pure last-write-wins, including executor/MCP overwrites after human edits; document this clearly. Findings are executor working documents that humans annotate after investigation. Use dedicated `submit_research_findings(initiative_id, findings)`, not an optional `submit_evidence` parameter. Prefer explicit interfaces and stable contracts over unnecessary complexity. - **Importance recommendation:** Hide only when the project has exactly one initiative. This was a specific choice; no broader rationale was recorded. - **Heuristic scores:** For the six live raw event-count combinations, test the rebalanced scoring mechanism with realistic event-count sweeps yielding >20 distinct scores, and verify live recompute correctness. Live dispersion depends on future events. - **Embedding migration:** For 1536→3072 dimensions, extend the migration to `halfvec` + HNSW rather than leave production retrieval unindexed. Preserve the existing indexed retrieval architecture; this is not a general rule for preemptive optimization. - **Benchmark misses:** When a controlled benchmark misses an explicit bar and a plausible in-scope fix exists, iterate and remeasure against the same benchmark before accepting regression, rolling back, or adding flags. For Jev dedup, revise the nearest-neighbor confirms/supersedes bias and remeasure on the same 186 cases. - **Signal/schema cost:** In the narrow DriftReport case, collapse `initiative_created` into `dismissed` and accept that BD-51 no longer counts those resolved reports. At low usage and recurrence, do not add schema merely to preserve marginal signal; this is not blanket approval of fidelity loss. - **Corpus admission:** Avoid human queues that recreate excessive maintenance overhead. Let Jev auto-admit only standalone rules it judges sound, well-scoped, and condition-bearing; otherwise leave them raw. Human is an override, not a gatekeeper. - **Merge and retirement:** Jev may confirm its own merge/generalization proposals above a confidence threshold; borderline cases go to human judgment, and humans can override. A gate with low human throughput can become a stall. Keep retirement human-gated: removal feels irreversible, while a restorable rejected sentinel supports trust. ## Cross-decision pattern Prefer targeted, simple changes that preserve useful existing contracts or architecture; accept scoped tradeoffs when the added complexity is not worth marginal benefit. Keep human attention for uncertain or consequential judgments, rather than making humans a bottleneck for routine work.
build-doen · dream · dream at call 15
## Decision patterns - Preserve the intent of a criterion, not stale literal wording: repair broken tests/interfaces when required to exercise the intended guard; record deliberate contract-reversal assertion changes as in-scope, not weakened tests. Keep consequential acceptance checks open when the evidence they require (e.g. production post-deploy) does not yet exist; do not deploy unilaterally. - Prefer fixing a structural failure within scope over a one-off workaround: evaluate stranded pending proposals, not just newly created ones. Avoid scope creep into the underlying algorithm where possible. - Keep default gates deterministic and cassette-replayed; live-model evaluations remain opt-in. Amend impossible CI language to name the actual bench gate rather than requiring paid/nondeterministic judgments. - Reduce manual corpus-maintenance gates: Jev may admit only confident, sound, scoped, condition-bearing standalone rules; it may confirm merges/generalizations above threshold, with borderline cases escalated and human override. Retirement remains human-gated; rejected sentinel is restorable. ## Specific precedents - Learn model: hide entirely in Draft/Building; render only in Learn. Complete-stage behavior is unresolved. - Research findings are executor working documents with pure last-write-wins, including MCP overwriting human edits; document this. Use dedicated `submit_research_findings(initiative_id, findings)`, not an optional `submit_evidence` parameter; favor explicit stable interfaces. - Importance recommendation: hide only when the project has exactly one initiative; no broader rationale was given. - Heuristic-score dispersion: verify mechanism via realistic event-count sweeps (>20 distinct scores) and live recompute correctness; live dispersion depends on future events. - 1536→3072 embeddings: use `halfvec` + HNSW in the migration to preserve indexed retrieval; not a general preemptive-optimization rule. - Benchmark regression: when an explicit bar is missed and an in-scope fix is plausible, iterate and remeasure on the same benchmark before accepting, rolling back, or flagging. Jev dedup: revise nearest-neighbor confirms/supersedes bias and remeasure the same 186 cases. - DriftReport: collapse `initiative_created` into `dismissed`, accepting that BD-51 no longer counts those resolved reports; marginal signal did not justify schema. - Corpus admission: no human promotion queue; human overrides rather than gatekeeps. Retirement remains human-gated. - Broken false-approval eval: fix stale tuple unpacking and verify the human_judgment assertion; do not add live paid evals to default suite. - Test fixtures: fixture-only changes where possible; when a test encodes a reversed contract, update its assertions toward the new contract rather than weakening them. -
build-doen · dream · dream at call 20
## Decision patterns - Preserve intent over stale literal wording. Repair broken tests/interfaces to exercise the intended guard; deliberate contract reversals may require assertion changes, not weakened tests. - Keep consequential acceptance checks open when evidence is unavailable, especially post-deploy or post-pass behavior. Do not deploy unilaterally; distinguish mechanical correctness from real-world impact. - Use project evidence and current measurements. Correct stale baselines, use established channels when named infrastructure does not exist, and document measured values rather than inventing infrastructure. - Prefer structural, in-scope fixes over one-off workarounds; assess stranded pending proposals. Avoid algorithm scope creep. - Keep default gates deterministic and cassette-replayed; live/paid-model evaluations remain opt-in. Amend impossible CI wording to name the actual gate. - Reduce manual corpus gates: admit only confident, sound, scoped, condition-bearing rules; confirm above threshold, escalate borderline cases, allow human override. Retirement remains human-gated; rejected sentinel is restorable. - Respect explicit product-owner reversals and human capability requests. Distinguish human shaping during draft from executor proposals after draft. - Align constraints and latitude with the agreed UI contract. For low-friction inputs, description may be required while title is optional; use its first line as a readable temporary title until executor names it. Criteria must not still require an optional title. ## Project context Doen is a shared durable product-intent spec for designers, engineers, and product owners: constraint/discretion split, genuine escalation, and precedent guidance. It is not an abstract engineering-rule distiller; heuristic flywheel is being retired (228 rules yielded 5 usable ones; circular success metric). Priorities: capture human reasoning (currently absent), ground generated artifacts, then retrieve precedent once a product corpus exists. Jev helps draft, ground, detect conflicts, and weigh precedent—not verify behavior or human-judgment-heavy product work. ## Precedents - Learn model is not rendered in Draft/Building; rendered in Learn. Complete-stage behavior unresolved. - Research findings are executor working documents, pure last-write-wins (MCP may overwrite human edits); dedicated `submit_research_findings(initiative_id, findings)`. - Importance recommendation hidden only with exactly one initiative. - Dispersion: realistic event-count sweeps (>20 distinct scores) plus live recompute correctness; current corpus may not disperse, future events affect it. - 1536→3072 embeddings: use `halfvec` + HNSW in migration to avoid unindexed retrieval; not general preemptive optimization. - If explicit benchmark bar is missed and an in-scope fix is plausible, iterate and remeasure on same benchmark. Jev dedup: revise nearest-neighbor confirms/supersedes bias; remeasure same 186 cases. - DriftReport: collapse `initiative_created` into `dismissed`, accepting BD-51 no longer
build-doen · promoted · dream at call 5
Doen is a spec framework for product engineers. Favor durable intent, explicit discretion/constraints, escalation for genuine human intent calls, and comparable precedent—not abstract rule distillation. Prioritize capturing shaping decisions (product precedent is sparse), grounding generated artifacts, then improving precedent retrieval. Jev is unsuitable as a product verifier where human judgment matters. Open `approach` for strategy and anti-patterns; `precedents` for decided product behaviors; `research` for ownership/write semantics; `verification` for criterion-testing precedent. ## approach Doen serves designers, software engineers, and product owners with one durable intent artifact, explicit constraint/discretion boundaries, escalation for genuine intent calls, and guidance from comparable precedent. Priorities: capture human reasoning during shaping (25 recorded decisions were agent-raised; 9 product initiatives yielded none, leaving product precedent empty); ground generated artifacts (some cited nonexistent entities or claimed unobserved outcomes); improve precedent retrieval after corpus grows (18% useful baseline). Jev is not a product-audience verifier: it often auto-approves criteria and is designed to exclude human judgment. Better fits are drafting, groundedness checks, conflict detection, and precedent weighing. Avoid abstract engineering-rule distillation: the heuristic flywheel was retired after 228 rules produced 5 useful rules and a circular success metric (docs/design-principles.md, “Retiring the heuristic flywheel”). ## precedents Learn visibility: hide the learn module entirely in Draft/Building; render only in Learn (not a universal UI rule). Importance recommendation visibility: hide only when project has exactly one initiative; do not base it on completion-after-creation or a hybrid rule. ## research `research_findings` is executor-owned working content; humans annotate after investigation concludes. Web edits and MCP writes use pure last-write-wins, so an executor write may overwrite a human edit. Document this clearly in MCP description; avoid locks/versioning absent clear need. Use a dedicated `submit_research_findings(initiative_id, findings)` MCP tool rather than changing `submit_evidence`'s contract; explicit and discoverable. ## verification For the criterion requiring live-data dispersion beyond six distinct score values: the current corpus has only six distinct raw event-count combinations (78/98 heuristics have one confirmation and zero citations; no `drafting` citations). Reweighting cannot create more scores than distinct input combinations. Verify the mechanism with a test sweeping realistic survived/removed/citation event counts through the rebalanced formula and requiring >20 distinct scores, plus correctness evidence for the live recompute. Accept that live-corpus dispersion requires future shaping-verdict and citation events.
build-doen · promoted · dream at call 10
Doen is a spec framework for product engineers: preserve durable intent, explicit discretion, escalation for genuine intent calls, and comparable precedent. Capture product reasoning, ground artifacts, then improve retrieval; avoid abstract-rule distillation. Prefer preserving production capability during migrations, investigate fixable benchmark regressions within scope, and avoid complexity for marginal signal. Open `approach` for strategy; `precedents` for UI choices; `research` for writes; `verify` for criterion testing; `infra`/`quality` for migration and classifier decisions; `corpus` for curation automation; `signals` for accepted fidelity loss. ## approach Doen serves designers, engineers, and product owners with one durable intent artifact, explicit constraint/discretion boundaries, escalation for genuine intent calls, and guidance from comparable precedent. Priorities: capture shaping decisions (25 recorded decisions were agent-raised; 9 product initiatives yielded none), ground generated artifacts (some cited nonexistent entities or claimed unobserved outcomes), then improve retrieval (18% useful baseline). Jev is not a product-audience verifier where human judgment matters; use it for drafting, groundedness, conflict detection, and precedent weighing. Avoid abstract engineering-rule distillation: the heuristic flywheel was retired after 228 rules yielded 5 useful rules and a circular success metric (docs/design-principles.md, “Retiring the heuristic flywheel”). ## precedents Learn module: truly hide in Draft/Building; render only in Learn (not a universal UI rule). Importance recommendation: hide only when project has exactly one initiative; do not substitute completion-after-creation or hybrid conditions. ## research `research_findings` is executor-owned working content; humans annotate after investigation concludes. Web edits and MCP writes are pure last-write-wins: executor writes may overwrite human edits. State this clearly in the MCP description; no locks/versioning absent clear need. Use dedicated `submit_research_findings(initiative_id, findings)`, not a change to `submit_evidence`. ## verify For criterion requiring live-data dispersion beyond six score values: corpus has only six distinct raw event-count combinations (78/98 heuristics have one confirmation, zero citations; no `drafting` citations). Reweighting cannot create more scores than distinct inputs. Verify mechanism with a test sweeping realistic survived/removed/citation counts through the rebalanced formula and requiring >20 distinct scores, plus correctness evidence for live recompute. Live-corpus dispersion awaits future shaping-verdict/citation events. ## infra For 1536→3072 embedding migration, user chose to preserve indexed retrieval rather than ship an unindexed window or defer. Extend migration to `halfvec` + HNSW (plain pgvector `vector` indexing caps at 2000 dimensions). More generally, preserve production capabilities through migrations; no temporary regressions or deferred restoration without authorization. ## quality Jev dedup benchmark was materially worse than StructuredLLM on 186 gold cases (55.91% vs 67.74%; ~22 extra errors), failing the confirmed bar that Jev not be worse. Chosen response: iterate on the rubric and remeasure the same cases before deciding; suspected bias was plausibly fixable and rubric wording was within granted discretion. For provider/prompt substitutions, investigate plausible fixable benchmark regressions and remeasure; escalate fundamental limits or authority boundaries. ## signals When collapsing DriftReportStatus, user accepted folding `initiative_created` into `dismissed` without retaining a trace, despite BD-51 then no longer counting those resolved reports as recurring-drift instances. Narrow slice and marginal signal did not justify schema complexity; pending/approved reports still count. In narrow, low-volume cases, balance fidelity against complexity and tolerate bounded information loss when acceptable. ## corpus Reduce recurring human maintenance without sacrificing coverage/quality. Jev may auto-admit an unclustered rule only when confidently judged sound, well-scoped, and condition-bearing; uncertain rules stay raw. Human is override, not gatekeeper. Jev may confirm merge/generalisation proposals above a confidence threshold; borderline cases queue for human judgment, with override. Keep retirements human-gated: removal feels irreversible, while rejected sentinel is restorable. This supersedes the prior rule that promotion/merges must always be human-gated.
build-doen · promoted · dream at call 15
Doen is a product-engineering spec framework: preserve durable intent, explicit discretion, escalation for genuine intent calls, and comparable precedent. Capture shaping reasoning, ground artifacts, then improve retrieval; avoid abstract-rule distillation. Interpret requirements by the behavior they protect, not literal implementation wording. Prefer deterministic, low-friction gates; live-model evaluations stay opt-in. Preserve production capability through migrations; investigate plausible, fixable benchmark regressions; tolerate bounded information loss when complexity outweighs signal. Open `approach` for strategy; `precedent` for UI; `research` for writes; `verify` for criteria; `migration` for infrastructure; `quality` for benchmark/eval choices; `signals` for fidelity tradeoffs; `corpus` for curation; `gates` for testing and scope interpretation. ## approach Doen serves designers, engineers, and product owners with one durable intent artifact: distinguish constraints from discretion, escalate genuine intent calls, and guide from comparable precedent. Priorities: capture shaping decisions (agent-raised decisions dominate; product precedent is sparse), ground generated specs/records in repository evidence, then improve retrieval. Jev drafts, grounds, detects conflicts, and weighs precedent; it is not a verifier of product judgment. Avoid abstract engineering-rule distillation: the heuristic flywheel was retired after 228 rules yielded 5 useful ones and a circular success metric. Prefer real, deterministic, low-friction safeguards over nominal process or costly/flaky checks. ## precedent Learn module is truly hidden in Draft/Building and rendered only in Learn; this is not a universal UI rule. Hide importance recommendation only when a project has exactly one initiative. Do not substitute completion-after-creation or hybrid visibility conditions. ## research `research_findings` is executor-owned working content; humans annotate after investigation concludes. Web/MCP writes are pure last-write-wins, so executor writes can overwrite human edits; document this plainly in MCP description. No locks/versioning absent clear need. Use dedicated `submit_research_findings(initiative_id, findings)`, not a change to `submit_evidence`. ## verify For the criterion requiring live-data score dispersion beyond six values, corpus has only six distinct raw event-count combinations (78/98 heuristics have one confirmation, zero citations; no `drafting` citations). Reweighting cannot yield more scores than distinct inputs. Verify mechanism by sweeping realistic event counts through formula and requiring >20 distinct scores, plus correctness evidence for live recompute; accept that corpus dispersion awaits future events. For deployment-dependent evidence, do not substitute local predicate comparisons: submit what exists and leave criterion open/needs_judgment until deployment supplies the observation. ## migration For 1536→3072 embeddings, preserve indexed retrieval rather than ship an unindexed window or defer restoration. Extend migration to `halfvec` + HNSW (plain pgvector `vector` indexing caps at 2000 dimensions). Generally preserve production capabilities through migrations; temporary regressions or deferred restoration need authorization. ## quality Jev dedup was materially worse than StructuredLLM on the same 186 gold cases (55.91% vs 67.74%; ~22 more errors), violating the confirmed not-worse bar. Iterate on plausible, in-scope rubric fixes and remeasure same cases before deciding; escalate fundamental limits or authority boundaries. Do not accept a regression merely because suspected bias is fixable until remeasured. ## signals When collapsing DriftReportStatus, user accepted folding `initiative_created` into `dismissed` without a trace, though BD-51 then stops counting those resolved reports as recurring-drift instances. Pending/approved still count. In narrow, low-volume cases, bounded fidelity loss can be preferable to schema complexity when the signal is marginal. ## corpus Reduce recurring human maintenance without sacrificing coverage. Jev may auto-admit unclustered rules only when confidently judged sound, well-scoped, and condition-bearing; uncertain rules stay raw. Jev may confirm merge/generalisation proposals above a confidence threshold; borderline cases queue for human judgment, with override. Retirements remain human-gated because removal feels irreversible, while rejected sentinel is restorable. Human is override, not routine gatekeeper; this supersedes earlier all-human-gated constraints. ## gates Keep deterministic checks in the default cassette-replayed bench; live-LLM evaluations are opt-in, not default paid/flaky gates. Split deterministic over-generalisation checks into the bench and amend criteria to match the real gate; do not invent CI infrastructure. If a protective test/eval is broken by a stale interface, repair it in scope when that restores the intended assertion; confirm it actually runs and passes. Do not weaken assertions to pass. A test encoding a deliberately reversed contract must change; distinguish intentional contract updates from weakening. Scheduling live evals is a separate decision. ## scope Interpret constraints by the behavior they protect, not overly literally. Widening a verdict step to judge all pending eligible proposals can be in scope when it preserves step order, decision rule, and never-raises contract; one-off backfills that leave a recurring defect are not equivalent. Do not claim deployment-level
build-doen · promoted · dream at call 20
Doen is a shared spec framework for product engineers: preserve durable intent, separate constraints from discretion, escalate genuine intent calls, and use comparable precedent. Prioritize capturing shaping reasoning, grounding artifacts in real project evidence, then improving retrieval; avoid abstract-rule distillation. Interpret requirements by protected behavior, not literal wording. Prefer deterministic, low-friction gates; live-model evals stay opt-in. Preserve production capability through migrations; investigate plausible fixable regressions; accept bounded fidelity loss when complexity outweighs signal. Open `approach` for strategy/product agency; `precedent` for UI; `research` for writes; `verify` for evidence; `migration` for infrastructure; `quality` for regressions; `signals` for fidelity; `corpus` for curation; `gates` ## approach Doen serves designers, engineers, and product owners with one durable intent artifact: distinguish constraints from discretion, escalate genuine intent calls, and guide from comparable precedent. Priorities: capture shaping decisions (agent-raised decisions dominate; product precedent is sparse), ground generated specs/records in repository evidence, then improve retrieval. Jev drafts, grounds, detects conflicts, and weighs precedent; it is not a verifier of product judgment. Avoid abstract engineering-rule distillation: the heuristic flywheel was retired after 228 rules yielded 5 useful ones and a circular success metric. Prefer real, deterministic, low-friction safeguards over nominal process or costly/flaky checks. People may start initiatives with minimal friction and add/edit spec items during Draft; executors draft from the brief, and after Draft changes go through executor proposals. ## precedent Learn module is truly hidden in Draft/Building and rendered only in Learn; this is not a universal UI rule. Hide importance recommendation only when a project has exactly one initiative. Do not substitute completion-after-creation or hybrid visibility conditions. ## research `research_findings` is executor-owned working content; humans annotate after investigation concludes. Web/MCP writes are pure last-write-wins, so executor writes can overwrite human edits; document this plainly in MCP description. No locks/versioning absent clear need. Use dedicated `submit_research_findings(initiative_id, findings)`, not a change to `submit_evidence`. ## verify Separate proof of measurement mechanics from real outcomes. For live-data score dispersion beyond six values, corpus has only six distinct raw event-count combinations (78/98 heuristics have one confirmation, zero citations; no `drafting` citations). Reweighting cannot yield more scores than distinct inputs. Verify mechanism by sweeping realistic event counts through formula and requiring >20 distinct scores, plus correctness evidence for live recompute; accept that corpus dispersion awaits future events. For deployment- or execution-dependent evidence, record available durable SQL evidence in `RESEARCH_LOG.md`, remeasure mutable baselines at decision/build time, and leave criterion open/needs_judgment until the real observation exists. Do not substitute local predicate comparisons for deployment outcomes. ## migration For 1536→3072 embeddings, preserve indexed retrieval rather than ship an unindexed window or defer restoration. Extend migration to `halfvec` + HNSW (plain pgvector `vector` indexing caps at 2000 dimensions). Generally preserve production capabilities through migrations; temporary regressions or deferred restoration need authorization. ## quality Jev dedup was materially worse than StructuredLLM on the same 186 gold cases (55.91% vs 67.74%; ~22 more errors), violating the confirmed not-worse bar. Iterate on plausible, in-scope rubric fixes and remeasure same cases before deciding; escalate fundamental limits or authority boundaries. Do not accept a regression merely because suspected bias is fixable until remeasured. ## signals When collapsing DriftReportStatus, user accepted folding `initiative_created` into `dismissed` without a trace, though BD-51 then stops counting those resolved reports as recurring-drift instances. Pending/approved still count. In narrow, low-volume cases, bounded fidelity loss can be preferable to schema complexity when the signal is marginal. ## corpus Reduce recurring human maintenance without sacrificing coverage. Jev may auto-admit unclustered rules only when confidently judged sound, well-scoped, and condition-bearing; uncertain rules stay raw. Jev may confirm merge/generalisation proposals above a confidence threshold; borderline cases queue for human judgment, with override. Retirements remain human-gated because removal feels irreversible, while rejected sentinel is restorable. Human is override, not routine gatekeeper; this supersedes earlier all-human-gated constraints. ## gates Keep deterministic checks in the default cassette-replayed bench; live-LLM evaluations are opt-in, not default paid/flaky gates. Split deterministic over-generalisation checks into the bench and amend criteria to match the real gate; do not invent CI infrastructure. If a protective test/eval is broken by a stale interface, repair it in scope when that restores the intended assertion; confirm it actually runs and passes. Do not weaken assertions to pass. A test encoding a deliberately reversed contract must change; distinguish intentional contract updates from weakening. Scheduling live evals is a separate decision. ## scope Interpret constraints
build-doen · wiki · dream at call 5
## Doen product philosophy Doen is a spec framework for product engineers—designers, software engineers, and product owners. Its core is one durable intent artifact with explicit boundaries between constraints and discretion, escalation for genuine intent calls, and guidance from precedent. It is not an abstract engineering-rule distiller. Retire the heuristic flywheel: 228 rules produced only 5 usable ones, and its success metric was circular (docs/design-principles.md, 2026-10-02). Product decisions should preserve human intent rather than turn uncertain product judgment into automatic rules. See [[Capture human reasoning and precedent]], [[Grounding and verification]], and [[Product UX and tool contracts]]. ## Capture human reasoning and precedent Capture human reasoning before optimizing its retrieval. The recorded corpus is currently empty of product precedent; all 25 recorded decisions were agent-raised, while 9 initiatives yielded zero captured decisions. Prioritize creating a reliable capture path before investing heavily in retrieval. Once a corpus exists, improve retrieval from its 18% useful baseline. Precedent should guide decisions, not substitute for intent. Doen's durable spec should distinguish firm constraints from areas of discretion and identify genuine intent questions for escalation. See [[Doen product philosophy]] and [[Grounding and verification]]. ## Grounding and verification Ground specs and generated artifacts: checks that only verify executor behavior can miss fabricated citations or surfaces and false claims of learning. Jev helps draft and ground specs, detect conflicts, and weigh precedent; it does not verify product criteria. It often auto-approves tests, and `human_judgment` is unsupported, so keep human product judgment explicit rather than treating Jev as an acceptance authority. When live data cannot satisfy a criterion because its available input combinations are too limited, verify the mechanism with a test that sweeps realistic inputs and demonstrates the criterion can be achieved; separately show that recomputation on live data remains correct. In the recorded scoring case, live data had only six distinct raw event-count combinations, making >20 live scores impossible at that time. The accepted verification was a property test yielding >20 distinct scores across realistic survived/removed/citation counts, plus correctness evidence for the live recompute; future events may create live dispersion. See [[Capture human reasoning and precedent]]. ## Product UX and tool contracts Prefer stage-appropriate absence to controls that are visible but disabled when inapplicable: the Learn module should not render in Draft or Building, and appears only in Learn. Keep field ownership simple. `research_findings` is the executor's working document; MCP writes use pure last-write-wins and can overwrite human edits. Document this clearly rather than adding locks or version tracking without a clear benefit; humans annotate after the investigation concludes. Preserve tool contracts. For meaningfully distinct operations, prefer a dedicated, discoverable tool over adding an optional parameter to an existing tool: `submit_research_findings` was chosen rather than changing `submit_evidence`. Show the importance recommendation unless the project has exactly one initiative; do not use the BD-46 completion-date drift-detection rule. See [[Doen product philosophy]].
build-doen · wiki · dream at call 10
## Doen product philosophy Doen is a shared spec framework for product engineers—designers, software engineers, and product owners. Its central artifact is durable product intent, with explicit boundaries between firm constraints and discretion, escalation for genuine intent calls, and precedent as guidance rather than authority. It is not an abstract engineering-rule distiller. Retire the heuristic flywheel: 228 rules produced only 5 usable ones, and its success metric was circular (docs/design-principles.md, 2026-10-02). Preserve human intent; do not turn uncertain product judgment into automatic rules. Resolve consequential production-workflow or architectural gaps when a viable fix is available. See [[Capture human reasoning and precedent]], [[Grounding and verification]], [[Product UX and tool contracts]], and [[Heuristic corpus stewardship]]. ## Capture human reasoning and precedent Capture human reasoning during shaping before optimizing its retrieval. The recorded corpus is nearly empty of product precedent: all 25 recorded decisions were agent-raised, while 9 initiatives yielded zero captured decisions. Prioritize a reliable capture path. Retrieval improvement matters once a useful product corpus exists; its measured baseline was 18% useful. Precedent should inform decisions, not substitute for intent. Durable specs should distinguish constraints from discretion and identify genuine intent questions for escalation. See [[Doen product philosophy]] and [[Grounding and verification]]. ## Grounding and verification Ground specs and generated artifacts, not just executor behavior: checks can miss fabricated citations, nonexistent product surfaces, or false claims of learning. Jev helps draft and ground specs, detect conflicts, and weigh precedent; it is not the verifier of product criteria. It may auto-approve tests, and `human_judgment` is unsupported, so keep human product judgment explicit. When a live corpus cannot meet a criterion because its input combinations are too sparse, verify the mechanism with a realistic input sweep and separately verify correctness on live data. In the scoring case, only six raw event-count combinations existed, so >20 live score values were impossible then. A property test produced >20 distinct scores across realistic survived/removed/citation counts, alongside evidence that live recomputation was correct. Future events may create live dispersion. See [[Capture human reasoning and precedent]] and [[Product UX and tool contracts]]. ## Product UX and tool contracts Prefer stage-appropriate absence over visible disabled controls: Learn is not rendered in Draft or Building and appears only in Learn. Keep field ownership simple. `research_findings` is the executor's working document; MCP writes use last-write-wins and may overwrite human edits. Document this clearly rather than adding locks or version tracking without clear benefit; humans annotate after investigation concludes. Preserve tool contracts. For meaningfully distinct operations, prefer a dedicated, discoverable tool over an optional parameter on an existing one: `submit_research_findings` was chosen instead of changing `submit_evidence`. Show the importance recommendation unless the project has exactly one initiative. Do not substitute the BD-46 completion-date drift-detection rule. See [[Doen product philosophy]] and [[Grounding and verification]]. ## Heuristic corpus stewardship Avoid human-maintenance gates that stall the corpus. Jev may auto-admit an unclustered rule only when it judges the rule sound, well-scoped, and condition-bearing; otherwise leave it raw. Jev may confirm merge and generalization proposals above a confidence threshold. Send genuinely uncertain proposals to a human, who can override. This replaces a human promotion gate while preserving a quality judgment; it does not make all raw rules guidance. Keep retirement human-gated. Removing a rule feels irreversible, unlike adding or merging guidance; do not extend the automation used for admission and merges to retirement. The governing principle is to automate routine, confidence-bounded work while reserving human attention for uncertain judgments and removals. See [[Doen product philosophy]] and [[Capture human reasoning and precedent]]. ## Evidence-led change and bounded fidelity For controlled evaluations, a plausible fix within spec discretion is a reason to iterate and re-measure on the same benchmark—not to accept regression or immediately replace the incumbent. In the dedup comparison, Jev scored 55.91% versus 67.74% for the prior path; the chosen next step was rubric iteration and a repeat comparison. Preserve the incumbent until evidence supports replacement; do not accept a measured regression for secondary benefits. Weigh fidelity against scope and signal value. Preserve important production invariants when a viable implementation exists: the 1536→3072 embedding migration was extended to halfvec + HNSW rather than accepting a period without indexes. Conversely, bounded information loss can be acceptable for a narrow, already-acted-on, unlikely-to-recur signal if preserving it adds disproportionate complexity. A drift report resolved by creating an initiative was folded into dismissed without extra tracking; the lost recurrence signal was judged marginal because the human had already acted. See [[Doen product philosophy]] and [[Grounding and verification]].
build-doen · wiki · dream at call 15
## Doen product philosophy Doen is a shared spec framework for product engineers—designers, software engineers, and product owners. Its central artifact is durable product intent: explicit boundaries between firm constraints and discretion, escalation for genuine intent calls, and precedent as guidance rather than authority. It is not an abstract engineering-rule distiller. Retire the heuristic flywheel: 228 rules yielded only 5 usable ones, and its success metric was circular (docs/design-principles.md, 2026-10-02). Preserve human intent without turning uncertain product judgment into automatic rules. Resolve consequential production-workflow or architectural gaps when a viable fix exists. Automate repeatable, bounded work; keep meaningful intent calls and irreversible choices visible to people. See [[Capture human reasoning and precedent]], [[Grounding and verification]], [[Product UX and tool contracts]], and [[Heuristic corpus stewardship]]. ## Capture human reasoning and precedent Capture human reasoning during shaping before optimizing retrieval. The recorded corpus is nearly empty of product precedent: all 25 recorded decisions were agent-raised, and 9 initiatives yielded zero captured decisions. Prioritize a reliable capture path. Retrieval improvement matters after a useful product corpus exists; its measured baseline was 18% useful. Precedent informs but does not replace intent. Specs should distinguish constraints from discretion and name genuine intent questions for escalation. See [[Doen product philosophy]] and [[Grounding and verification]]. ## Grounding and verification Ground specs and generated artifacts, not only executor behavior: tests can miss fabricated citations, nonexistent product surfaces, or false claims of learning. Jev helps draft and ground specs, detect conflicts, and weigh precedent; it is not a verifier of product criteria. It may auto-approve tests, and `human_judgment` is unsupported, so keep human product judgment explicit. Match evidence to the claim. When live inputs are too sparse to meet a dispersion criterion, verify the mechanism with a realistic input sweep and separately verify correctness on live data. In the scoring case, six raw event-count combinations made >20 live scores impossible; a property test established >20 distinct scores across realistic counts, alongside correct live recomputation. Conversely, local old-vs-new predicate comparisons do not substitute for a criterion requiring post-deployment evidence: leave that criterion open until deployment and measurement. See [[Capture human reasoning and precedent]] and [[Execution gates and contract changes]]. ## Product UX and tool contracts Prefer stage-appropriate absence over disabled controls: Learn is not rendered in Draft or Building and appears only in Learn. Keep field ownership simple. `research_findings` is the executor's working document; MCP writes are last-write-wins and may overwrite human edits. Document this clearly rather than adding locks or version tracking without clear benefit; humans annotate after investigation concludes. Preserve stable, discoverable tool contracts. For meaningfully distinct operations, prefer a dedicated tool over an optional parameter on an existing one: `submit_research_findings` was chosen instead of changing `submit_evidence`. Show the importance recommendation unless the project has exactly one initiative; do not substitute the BD-46 completion-date drift-detection rule. See [[Doen product philosophy]] and [[Grounding and verification]]. ## Heuristic corpus stewardship Avoid human-maintenance gates that stall the corpus. Jev may auto-admit an unclustered rule only when it judges it sound, well-scoped, and condition-bearing; otherwise leave it raw. Jev may confirm merge and generalization proposals above a confidence threshold. Send genuinely uncertain proposals to a human, who can override. This replaces a human promotion gate while preserving a quality judgment; it does not make all raw rules guidance. Keep retirement human-gated. Removing a rule feels irreversible, unlike adding or merging guidance; do not extend automation to retirement. Automate routine, confidence-bounded work while reserving human attention for uncertain judgments and removals. Do not confuse scheduling with the mechanism: pending proposals must remain eligible for later judgment, not only be judged in the pass that created them. Widening the set of existing proposals evaluated can preserve the algorithm's step order and decision rule while fixing stranded work. See [[Doen product philosophy]] and [[Execution gates and contract changes]]. ## Execution gates and contract changes Prefer deterministic, repeatable default-suite checks as merge gates. Put cassette-replayed metrics in `backend/tests/bench`; keep paid or nondeterministic live-model evaluations opt-in in `tests/evals`. If CI is unavailable, implement the real deterministic gate and amend the criterion/spec rather than inventing CI or making live LLM calls merge arbiters. Do not use local proxies where a criterion explicitly requires deployment evidence. See [[Grounding and verification]]. Honor revised contracts, including updating tests that encode old contracts. Interpret constraints by purpose, not hyper-literally: a stale test interface can be repaired while preserving its intended assertion; when a contract is deliberately reversed, assertions should move toward the new contract, not be weakened. A broken guard should be repaired when the work relies on it, while preserving the deterministic/live-eval boundary. For controlled evaluations, a plausible fix within spec discretion is a reason to iterate and re-measure on the same benchmark—not accept a regression or immediately replace the incumbent. In the dedup comparison, Jev scored 55.91% versus 67.74% for the prior path; the chosen next step was rubric iteration and repeat comparison. Preserve the incumbent until evidence supports replacement. Balance fidelity against scope and signal value. Preserve important production
build-doen · wiki · dream at call 20
## Doen product philosophy Doen is a shared spec framework for product engineers—designers, software engineers, and product owners. Its durable artifact is product intent: distinguish firm constraints from discretion, escalate genuine intent calls, and use precedent as guidance rather than authority. Doen is not an abstract engineering-rule distiller; retire the heuristic flywheel (docs/design-principles.md, 2026-10-02), whose 228 rules produced only 5 usable ones and whose success metric was circular. Preserve human intent while adapting to actual evidence and current product facts. Automate bounded, repeatable work; keep meaningful judgment and irreversible choices visible. Resolve consequential workflow or architectural gaps when a viable in-scope fix exists, rather than shipping a known degradation by default. Priorities: capture human reasoning, ground specs and generated artifacts, then improve precedent retrieval once a useful product corpus exists. ## Capture human reasoning and precedent Capture human reasoning during shaping before optimizing retrieval. Product precedent is sparse: all 25 recorded decisions were agent-raised, while 9 initiatives captured none; retrieval's measured usefulness baseline was 18%. A reliable capture path is more valuable than better search over an empty corpus. Precedent informs but does not replace intent. Specs should distinguish constraints from discretion and explicitly surface genuine intent questions. Keep criteria open when they require a real post-ship human or executor outcome; do not turn a proxy into proof. See [[Grounding and verification]]. ## Grounding and verification Ground specs and generated artifacts, not only executor behavior: tests may miss fabricated citations, nonexistent product surfaces, or false claims of learning. Jev can draft and ground specs, detect conflicts, and weigh precedent; it does not verify product criteria. Human product judgment remains explicit (`human_judgment` is unsupported), and tests may auto-approve. Match evidence to the claim. If live inputs are too sparse for a dispersion criterion, test the mechanism over realistic inputs and separately verify live recomputation correctness. Arithmetic/count tests establish arithmetic, not behavior change. Local old-vs-new comparisons do not establish a criterion requiring deployment evidence. Record available pre-deploy evidence and leave post-deploy outcomes open until observed. Use established measurement channels and refresh stale baselines; do not require nonexistent dashboards or stores. ## Product UX and tool contracts Prefer stage-appropriate absence over disabled controls: Learn is not rendered in Draft or Building and appears only in Learn. Keep fields and tools simple and discoverable. `research_findings` is the executor's working document; MCP writes are last-write-wins and may overwrite human edits. State this clearly rather than adding locks or versioning without a clear benefit; people annotate after investigation concludes. For distinct operations, prefer a dedicated tool (`submit_research_findings`) over changing an existing tool's contract. Show importance recommendation unless the project has exactly one initiative; do not substitute an unrelated drift-detection condition. When a product decision changes, update every spec item and latitude that contradicts it. If title is explicitly optional, require description and type only, use the description's first line as a temporary display title, and describe title as optional throughout. ## Human agency in product workflows Restore human agency when the app otherwise leaves a desired capability unavailable. People can start initiatives from the project page and add/edit spec items while an initiative is in Draft; executors still draft from the person's brief, and after Draft spec changes go through executor proposals. The brief is separate from the spec and is not editable after creation. New initiatives need a description and Build/Research choice (Build default); title and line-list fields are optional. An omitted title can temporarily derive from the description's first line, then the executor may rename it. Keep the workflow boundary explicit: human shaping is available before building, without making humans the sole author of executor-produced drafts. ## Heuristic corpus stewardship Avoid human-maintenance gates that stall the corpus. Jev may auto-admit an unclustered rule only when it judges the rule sound, well-scoped, and condition-bearing; otherwise leave it raw. Jev may confirm merge and generalization proposals above a confidence threshold; uncertain proposals go to a human, who can override. This replaces routine human promotion/merge gates without making every raw rule guidance. Keep retirement human-gated: removing guidance feels irreversible, unlike adding or merging it. Ensure pending proposals remain eligible for later judgment, not just the pass that created them. Widening the evaluated set can fix stranded work without changing algorithm order or the per-proposal decision rule. Do not confuse a scheduling change with repairing a structurally unreachable proposal. ## Execution gates and contract changes Prefer deterministic, repeatable default-suite checks as merge gates. Put cassette-replayed metrics in `backend/tests/bench`; keep paid or nondeterministic live-model evaluations opt-in in `tests/evals`. If CI is unavailable, implement a real deterministic gate and amend criteria to match; do not invent infrastructure or make live LLM calls merge arbiters. Repair a broken guard when relied on, even if that requires updating a stale test interface; preserve the deterministic/live-eval boundary. Honor revised contracts in tests: fixture-only changes should preserve assertions, but when a contract is deliberately reversed, assertions should move toward the new contract rather than be weakened. For controlled evaluations, a plausible in-scope fix warrants iteration and remeasurement on the same
resume-builder · dream · dream at call 5
Resume platform decisions - Use a dual model: profiles are the comprehensive career library; resumes are directly editable, user-facing documents. Preserve source_entry_id/source_bullet_id provenance so users can promote resume edits into the profile. Keep resumes.profile_id NOT NULL and seed a profile from the user's first resume. Targeting needs the union of user-authored material. - Track variant drift with profiles.version and resumes.profile_version. Increment the profile version on any profile, entry, or bullet write; copy it to the resume at generation time. Drift is a version mismatch. Do not rely on profiles.updated_at: child edits may not update it. - Retain skills + profile_skills because the committed RB-5 spec requires shared canonical vocabulary/analytics: skills.aliases resolves variants (e.g. K8s/Kubernetes), and resume_keywords.skill_id references skills. Without that concrete need, profiles.skills JSONB would be the simpler option. - For JSONB columns, use SQLAlchemy JSONB().with_variant(sqlite.JSON, 'sqlite'). PostgreSQL retains real JSONB in production, migrations, and PostgreSQL tests; keep the existing SQLite suite/conftest unchanged. Use a dedicated PostgreSQL fixture for criteria depending on actual PostgreSQL behavior (notably the shares CHECK constraint and in-place JSONB mutation). Resume editor revision behavior - Separate continuous autosave during active typing from discrete idle-gap behavior. Continuous autosave persists content and creates no snapshot. Each idle-gap timeout creates exactly one revision snapshot, even if content matches the latest snapshot; do not suppress it based on content equality. Decision-making pattern - Honor concrete product/spec commitments and existing constraints; prefer the narrow implementation that satisfies both over hypothetical simplification or broad test/schema changes. Keep separate mechanisms distinct when their specified behaviors differ.
resume-builder · dream · dream at call 10
Resume platform - Keep a dual model: profiles are the comprehensive career library; resumes are directly editable documents. Preserve source_entry_id/source_bullet_id provenance so edits can be promoted to profiles. Keep resumes.profile_id NOT NULL and seed a profile from the first resume. Targeting uses the union of user-authored material. - Track variant drift with profiles.version and resumes.profile_version. Increment profile version on profile, entry, or bullet writes; stamp resumes at generation. Drift is a version mismatch, not profiles.updated_at. - Retain skills + profile_skills for canonical vocabulary/analytics; aliases resolve variants and resume_keywords.skill_id references skills. - Use SQLAlchemy JSONB().with_variant(sqlite.JSON, 'sqlite'); preserve PostgreSQL JSONB in production/migrations and use a dedicated PG fixture for behavior SQLite cannot verify. Resume editing and compliance - Continuous autosave does not create snapshots. Each idle-gap timeout creates exactly one revision, even if content matches the latest snapshot. Simultaneous checkpoint triggers coalesce into one revision while recording all trigger conditions. - Compliance errors block generation before a resume row is written; warnings do not. Persist all findings in resumes.compliance and surface them in the editor. Required-field errors should prompt the user. Authorization and privacy - Return 404 for nonexistent and cross-user resources; scope ownership by user_id in service queries so foreign rows are never loaded. Unauthenticated requests remain 401. RB-2's privacy decision supersedes conflicting RB-3 403 wording. Scope and shared worker code - Prefer the smallest reversible implementation that satisfies confirmed constraints; avoid repo-wide refactors unless needed to resolve durable inconsistency. Build the targeted-resume worker from repo root: copy api/ and worker/, put api/ on PYTHONPATH, and merge required AI dependencies into worker requirements. Reuse JevClient, OpenRouter client, ReviewAction, and check_compliance() without forks. Delete stale worker/app/shared/ duplicate. Railway uses repo-root build context and explicit worker Dockerfile path. Shared-package extraction remains separate (docs/todo.md). - Establish one prompt convention at api/app/prompts/ when a confirmed constraint requires it, even if absent initially; move existing inline prompts rather than create competing locations. A shared-module edit is acceptable if strictly behavior-preserving: retain public constant name/module/text and verify consumers/tests remain unchanged. Decision pattern Honor concrete shipped/spec commitments and existing constraints. Prefer narrow, reversible changes; preserve distinct mechanisms as specified, coalesce simultaneous triggers into one auditable event, and resolve conflicts using the rationale and privacy/consistency implications of verified decisions—not merely literal wording.
resume-builder · dream · dream at call 15
Product model: Profiles are the career library; resumes are directly editable variants. Keep resumes.profile_id NOT NULL and seed a profile from the first resume. Preserve the promotion/provenance intent (source_entry_id/source_bullet_id) where applicable, but pure free-text storage means RB-4’s structured provenance/guard design must be revisited. Targeting draws on the union of user-authored material.
Resume content/editing: Direction is pure free text: resumes.content = {markdown: "..."}, with no required headings, sections, field slots, or inferred structure. For structure-dependent work (compliance, bullet/keyword evidence, ordering), ask genai to interpret the document. Migrate existing structured rows and replace the structured renderer path with Markdown rendering. RB-12’s rigid single Tiptap editor is shipped/verified, not a defect; this is a later change of direction. Revisit RB-4 provenance, RB-5 keyword evidence, compliance section_order/included_fields, and RB-14 outline assumptions. Keep ATS safety (RB-10) in view. Earlier structured-field/renderer/no-migration constraints are superseded.
Data: Keep skills + profile_skills; aliases resolve variants and resume_keywords.skill_id references canonical skills. Track drift with profiles.version (increment on profile/entry/bullet writes) and resumes.profile_version stamped at generation; compare versions, not updated_at. Use JSONB().with_variant(sqlite.JSON, 'sqlite'); preserve PostgreSQL JSONB and use dedicated Postgres coverage for behavior SQLite cannot verify.
Resume behavior/security: Autosave does not snapshot; each idle-gap timeout creates one revision, even unchanged. Simultaneous conditions coalesce into one revision while retaining all fired-condition flags. Compliance ERRORs block generation before resume-row write; warnings do not. Persist findings and prompt for required-field errors. Concurrency tokens hash only client-editable state (content, presentation, title, status, template_key, region_code), not updated_at; identical states yield identical tokens. Feedback reads may update scores without invalidating writers. Authorization: 404 for nonexistent and cross-user resources, ownership scoped by user_id in service queries; unauthenticated is 401.
Implementation/testing: For worker access to shared AI code, build from repo root, include api/ and worker/, add api/ to PYTHONPATH and AI dependencies; Railway worker uses repo-root context plus explicit Dockerfile. Establish one prompts convention under api/app/prompts, including moving SYSTEM_PROMPT without behavior change. Use Playwright against the running stack for browser/cross-tier guarantees, axe on live editor, persisted content via API; revision invariants in pytest. Prefer small, reversible changes satisfying confirmed constraints.resume-builder · dream · dream at call 20
Product model: Profiles are the career library; resumes are directly editable variants with provenance/write-back path. Keep resumes.profile_id NOT NULL; seed profile from first resume. Targeting draws on union of user-authored material. Skills + profile_skills stay normalized; aliases resolve variants and resume_keywords.skill_id references canonical skills. Drift uses profiles.version incremented on profile/entry/bullet writes and resumes.profile_version stamped at generation; compare versions, not updated_at. Resume content is free text `{markdown:"..."}`—no required sections/slots or inferred structure. Downstream structure-dependent requirements ask genai. RB-12's rigid single Tiptap schema/editor was shipped and verified, not a defect; free-text is a subsequent product direction that supersedes its schema. Preserve ATS safety. No score: RB-9 removed scorer, endpoints, API field and JSONB column; never show/reinstate it. Overview tables show title, created_at, updated_at, actions (+ archived_at for archived); amend stale score clauses in c0016c64455f, 3af0c51be139, ca36c0e23494 and duplicate-copy wording in 558a165bdbe0. Compliance is distinct from score: errors block generation before resume write, warnings do not; persist findings on successful targeted generation and prompt for required-field errors. GET recomputes without persistence; reads must not write (RB-8 concurrency-token lesson). Concurrency token hashes client-editable state (content, presentation, title, status, template_key, region_code), not updated_at or derived values. Idle-gap timeout always creates one revision snapshot, even unchanged; coalesce simultaneous checkpoint causes into one row while retaining fired-trigger flags. Cross-user and nonexistent resources both return 404 (unauthenticated 401). Guidance is derived, not authoritative; validate staleness on read/accept, not autosave. Anchor `{quote, occurrence}`; exact-substring match and occurrence index; accept transactionally replaces quote with proposed_change; mismatch drops stale item. Dismissal key=hash(category+normalized quote). Five fields remain; anchor is not a section/entry/bullet. RB-9 producer scope is keywords only: genuine guidance with proposed_change editing user's sentence to include target term and anchor quoting line. No job target => positive empty state; keep compliance verdicts separate. RB-10 formatting, RB-11 quantification; avoid premature whole-document genai checks. Guidance UI: one active card, never a suggestion list. Quiet, layout-neutral dotted underline on each anchored line, quieter than active line's solid underline/tint; text-decoration/inset shadow, not border. Count criterion is every anchored line marked; panel count gives suggestion total. Clicking marked text activates a suggestion and places caret normally; repeated clicks cycle items on that line. Open queue exposes anchors; server order is default, client can select active item. Suppress stale marks per-item. Watch whether card changes during editing is helpful or startling. Keep PostgreSQL JSONB with SQLite variant; retain Postgres coverage. Worker should build from repo root toresume-builder · dream · dream at call 25
Profiles are the career library; resumes are directly editable variants with provenance/write-back. Keep resumes.profile_id NOT NULL; seed a profile from the first resume. Targeting uses all user-authored material. Keep normalized skills/aliases and resume_keywords.skill_id → canonical skills. Increment profiles.version on profile/entry/bullet writes; stamp resumes.profile_version at generation and compare. Resume content is free text `{markdown: "..."}`: no mandatory sections, slots or inferred structure; ask genai for downstream structure. RB-12’s rigid Tiptap schema was shipped/verified, not a defect; free text supersedes it. RB-9 removed scorer, endpoints, API field and JSONB score column; never reintroduce score. Overview tables show title, created/updated, actions (+ archived_at for archived); stale score clauses in c0016c64455f, 3af0c51be139, ca36c0e23494 and duplicate wording in 558a165bdbe0 are superseded. Compliance is distinct from score: errors block generation before resume write; warnings do not. Persist findings only for successful targeted generation. GET recomputes without persistence; reads never write. Concurrency token hashes client-editable state (content, presentation, title, status, template_key, region_code), not updated_at or derived values. Idle-gap always snapshots; simultaneous triggers coalesce to one row retaining all trigger flags. Cross-user/nonexistent resources 404; unauthenticated 401. Guidance is derived, not authoritative; check staleness on read/accept, not autosave. Anchor `{quote, occurrence}`; accept transactionally replaces exact text, mismatch drops stale item. Dismissal key = hash(category + normalized quote). Five fields remain; anchor is not a section/entry/bullet. RB-9 began with keyword-only production; RB-10 formatting and RB-11 quantification. Queue acceptance/dismissal is the durable/apply mechanism. Calibration findings stay ephemeral; explicit accept converts one into a guidance item, never directly applies/persists the finding. Actionable findings need exact anchor and replacement; unresolvable anchors have no accept; gaps need insertion context or no button. After accept adopt returned content/version to avoid autosave 409. Guidance UI has one active card, not a suggestion list; quiet dotted underline per anchored line, panel counts suggestions. Clicking marked text activates/cycles items on that line and places the caret; open queue exposes anchors, client may select active, suppress stale marks per item. RB-21 guided assistant is new, not RB-20 polish: it replaces RB-20 findings UI outright (unpublished, no dual-surface migration), while retaining backend, stored job profile, OpenRouter calibration, pre-call refusals, anchor validation and finding-to-guidance path. One resume = one role/context/thread; duplicate for another role, but do not copy thread/requirement decisions. Placeholder export is warned/count-marked, never blocked; users can always download. Prefer minimal, reversible scope-respecting changes. JSONB uses SQLite variants to preserve existing tests; real Postgres-only behavior gets Postgres tests. Worker buildsresume-builder · dream · dream at call 30
Profiles are the career library; resumes are editable variants with provenance/write-back. Keep resumes.profile_id NOT NULL; seed a profile from the first resume. Targeting uses user-authored material. Normalize skills/aliases; resume_keywords.skill_id references canonical skills. Increment profiles.version on profile/entry/bullet writes; stamp resumes.profile_version at generation and compare. Use PostgreSQL JSONB with SQLite variants for existing tests; real-Postgres-only behaviors get dedicated integration coverage. Resume content is free text `{markdown: "..."}`: no mandatory sections, slots, or inferred structure. RB-12's rigid Tiptap schema shipped/verified, then was superseded—not a defect. Render editing surface from renderer HTML for parity; structural edits update JSON then re-fetch rendered body. Browser/caret behavior warrants Playwright E2E. RB-9 score/scorer/endpoints/API field/JSONB removed; never reintroduce score. Overview tables show title, created/updated, actions (+ archived_at for archived). Stale score clauses in c0016c64455f, 3af0c51be139, ca36c0e23494 and duplicate wording in 558a165bdbe0 are superseded. Compliance is distinct: errors block generation before resume write; warnings do not. Successful targeted generation stores findings; GET recomputes without persistence. Reads never write. Concurrency token hashes client-editable state (content, presentation, title, status, template_key, region_code), not updated_at/derived values. Idle-gap always snapshots; simultaneous triggers coalesce into one row retaining every trigger flag. Cross-user/nonexistent resources 404; unauthenticated 401. Worker should build from repo root, share API code (no copied duplicate), with Railway pointed to root/explicit Dockerfile. Prompts belong under app/prompts; move shared SYSTEM_PROMPT there behavior-preservingly. Guidance is derived, not authoritative; check staleness on read/accept, not autosave. Anchor `{quote, occurrence}`; accept transactionally replaces exact text, mismatch drops stale item. Dismissal key hashes category + normalized quote. Five fields remain; anchor is not a section/entry/bullet. Queue acceptance/dismissal is durable/apply mechanism. Calibration findings stay ephemeral; explicit accept converts one into guidance, never directly applies/persists finding. Actionable findings need exact anchor and replacement; unresolvable anchors have no accept; gaps need insertion context or no button. After accept adopt returned content/version to avoid autosave 409. Guidance UI: RB-21 guided assistant replaces unpublished RB-20 findings UI outright; retain backend/job profile/OpenRouter calibration/refusals/anchor validation/finding-to-guidance path. Guided chat, not general chat or blank prompt: ranked assistant-led agenda, user steering, every turn ends in concrete action. Input disabled until role exists; typed text routes to target/goal via known intents, never free model instruction. Narrow vague requests; clarify ambiguous targets; derive chips from current state. Assistant is sole guidance surface; remove RB-18/RB-19 suggestions panel. Proposals in thread as cards (diff, reason, Apply, Not now, Undo), reachable from agenda, queue popover, or document mark. Clicking marked text places caret andresume-builder · promoted · dream at call 5
Favor user-driven workflows: users own and edit career history/resumes; AI assists on demand, never gates. Keep resumes editable over a durable career profile, with provenance and promotion back. Track variant drift with explicit versions. Use normalized skills when shared vocabulary/analytics matter. Preserve SQLite suite compatibility while validating PostgreSQL-only behavior separately. Open `product` for workflow/localization direction; `career-model` for profile/resume structure; `drift` for versioning; `skills` for normalization; `db-tests` for JSONB/testing; `revisions` for autosave/snapshot behavior. ## product Prefer user-driven workflows. Users own/edit professional history and resumes; AI is an on-demand reviewer, enhancer, and localizer, never a gate. Localization adapts structure, length, formatting, and cultural expectations to target markets. ## career-model Profiles are the durable career library; resumes remain directly editable documents. Keep resumes.profile_id NOT NULL and seed a profile from the first resume. Preserve source_entry_id/source_bullet_id provenance and offer promotion of resume edits back to the profile. This supports targeting against the union of career material while retaining the resume as the editing surface. ## drift Track variants with explicit counters: profiles.version increments on every profile, entry, or bullet write; resumes.profile_version captures the profile version at generation. Drift is version inequality. Prefer this to timestamps (child edits may not update profile.updated_at) or postponing tracking. ## skills Keep skills + profile_skills and normalize resume_keywords.skill_id when shared vocabulary, alias resolution, or cross-user analytics are required. The committed spec requires aliases (e.g. K8s/Kubernetes -> canonical term) and a skill_id FK, so JSONB simplification is not appropriate here. ## db-tests For SQLAlchemy PostgreSQL JSONB columns, use JSONB().with_variant(sqlite.JSON, 'sqlite') to retain real PostgreSQL behavior and keep existing SQLite tests unchanged. Add dedicated PostgreSQL integration coverage for behavior SQLite cannot validate, including CHECK constraints and in-place JSONB mutation. Do not split ORM metadata or move the whole suite to Postgres without need. ## revisions Separate continuous autosave from idle-gap snapshots. Autosave writes content without creating revisions. Each idle-gap timeout creates exactly one revision row, even if another snapshot trigger occurred recently. Keep explicit user-action snapshots distinct as specified.
resume-builder · promoted · dream at call 10
Users own editable resumes and durable career profiles; AI assists on demand. Prefer smallest reversible changes, but establish one consistent convention and preserve shared-module interfaces/behavior with unchanged tests. Protect ownership routes with scoped queries and 404 for foreign/nonexistent resources; compliance errors block, warnings remain visible. Track profile drift explicitly; preserve SQLite compatibility while testing PostgreSQL-specific behavior separately. Open `product` for workflow/localization and implementation style; `career-model` for profile/resume structure; `drift` for versioning; `skills` for normalization; `db-tests` for SQL types/testing; `revisions` for checkpoint rules; `security-compliance` for access/status and findings; `worker-prompts` for shared code, prompts, and deployment. ## product Users own and edit professional history and resumes; AI is on-demand reviewer/enhancer/localizer, never a gate. Localization adapts structure, length, formatting, and cultural expectations to target markets. Prefer the smallest reversible change satisfying constraints, while establishing one coherent convention rather than leaving competing patterns. Specs may describe nonexistent conventions: choose intentionally, then apply consistently. Shared-module changes are acceptable if public names/interfaces and exact behavior remain unchanged; keep regression tests unchanged. Separate unrelated repo-wide refactors; remove stale duplicates and record operational/deployment consequences. ## career-model Profiles are the durable career library; resumes remain directly editable documents. Keep resumes.profile_id NOT NULL and seed a profile from the first resume. Preserve source_entry_id/source_bullet_id provenance and offer promotion of resume edits back to the profile. Targeting can use the union of career material while the resume remains the editing surface. ## drift Use explicit counters: profiles.version increments on every profile, entry, or bullet write; resumes.profile_version captures the profile version at generation. Drift is version inequality. Prefer this to timestamps because child edits may not update profile.updated_at, or postponing tracking. ## skills Keep skills + profile_skills and normalize resume_keywords.skill_id when shared vocabulary, alias resolution, or cross-user analytics matter. The committed spec requires aliases (e.g. K8s/Kubernetes -> canonical term) and a skill_id FK, so JSONB simplification is inappropriate. ## db-tests For SQLAlchemy PostgreSQL JSONB columns use JSONB().with_variant(sqlite.JSON, 'sqlite') to preserve real PostgreSQL behavior and unchanged SQLite tests. Add dedicated PostgreSQL integration coverage for behavior SQLite cannot validate, including CHECK constraints and in-place JSONB mutation. Do not split ORM metadata or move the whole suite to Postgres without need. ## revisions Continuous autosave writes content without creating revisions. Each idle-gap timeout creates exactly one revision row, even if another snapshot trigger occurred recently. If multiple checkpoint conditions fire together, create exactly one row and record every fired trigger plus complete metadata. Keep explicit user-action snapshots distinct as specified. ## security-compliance Ownership-protected routes scope database queries by user_id so foreign rows are never loaded; return 404 for both foreign and nonexistent resources (RB-2 pattern supersedes RB-3 inherited 403). Test unauthenticated 401 separately. Compliance ERRORs block writing/generation; warnings do not. Persist all findings to resumes.compliance and surface them in the editor. Prompt users to resolve blocking market-required fields; warnings preserve usability. ## worker-prompts Worker pipeline: build from repository root, copy api/ and worker/, add api/ to PYTHONPATH, and merge required AI dependencies. Delete stale worker/app/shared/ duplicate. Railway worker must use repo-root context and explicit Dockerfile path. Keep prompts in one api/app/prompts/ convention; move SYSTEM_PROMPT there while preserving its public name, module interface, exact text, and behavior, with existing tests unchanged.
resume-builder · promoted · dream at call 15
Users own/edit resumes and durable career history; AI assists on demand, never gates. Prefer the smallest reversible change, one coherent convention, and preserve shared interfaces/behavior with unchanged regression tests. Resume format has changed: pure free-text Markdown, no recognized sections; downstream structure is AI-interpreted. Open `product` for workflow/style; `career-model` for profile ownership; `resume-format` for current document/editor direction and superseded designs; `drift` for versioning/tokens; `skills` for normalization; `db-tests` for SQL/testing; `revisions` for snapshots; `security-compliance` for access/findings; `worker-prompts` for shared code/deployment; `frontend-tests` for browser coverage.
## product
Users own and manually manage professional history and resumes; AI is an on-demand reviewer, enhancer, and localizer, never a gate. Localization adapts structure, length, formatting, and cultural norms by market. Prefer the smallest reversible change satisfying constraints while establishing one coherent convention. Specs may describe nonexistent conventions: choose intentionally, apply consistently. Shared-module changes are acceptable if public names/interfaces and exact behavior remain unchanged; keep regression tests unchanged. Separate unrelated repo-wide refactors; remove stale duplicates and record operational consequences.
## career-model
Profiles are the durable career library; resumes remain directly editable documents. Keep resumes.profile_id NOT NULL and seed a profile from the first resume. Preserve source_entry_id/source_bullet_id provenance and offer promotion of resume edits back to the profile. Targeting may use the union of career material while the resume remains the editing surface. Resume content's current pure-Markdown direction means older field-level provenance assumptions need reconsideration; see `resume-format`.
## resume-format
Current product direction (decision 15, superseding RB-12's structured schema): resumes.content = {markdown: "..."}, one pure free-text Markdown document. No recognized section boundaries, required headings, or inferred fields; downstream needs (compliance, keyword/evidence attribution, evaluation, formatting) use GenAI understanding. RB-12 remains shipped/verified, not defective. Resolve data conversion of existing JSON rows and revise generation provenance/guards, keyword acceptance/evidence, compliance section-order/included-field checks, and RB-14 outline; broaden Markdown deliberately, with RB-10 authoritative for ATS safety. Decision 14 chose one Tiptap editor for the whole resume, but its custom structural schema is superseded by this free-text model. Decision 11's renderer-HTML/contentEditable editing strategy and RB-12 structured renderer assumptions are likewise superseded; update rendering for Markdown. No schema DDL is implied, but existing data needs conversion.
## drift
Explicit drift counters: profiles.version increments on every profile, entry, or bullet write; resumes.profile_version captures profile version at generation. Drift is inequality, preferred over timestamps because child edits may not update profiles.updated_at. Concurrency tokens hash client-editable state, not updated_at: include content, presentation, title, status, template_key, region_code; derived/read-triggered writes must not invalidate tokens. Identical client-editable state may correctly yield the same token.
## skills
Keep skills + profile_skills and normalize resume_keywords.skill_id when shared vocabulary, alias resolution, or cross-user analytics matter. Committed spec requires aliases (e.g. K8s/Kubernetes -> canonical term) and skill_id FK, so JSONB simplification is inappropriate. Pure free-text resumes change how evidence is found/attributed, not the canonical skill vocabulary decision.
## db-tests
For SQLAlchemy PostgreSQL JSONB columns use JSONB().with_variant(sqlite.JSON, 'sqlite') to preserve real PostgreSQL behavior and unchanged SQLite tests. Add dedicated PostgreSQL integration coverage for behavior SQLite cannot validate, including CHECK constraints and in-place JSONB mutation. Do not split ORM metadata or move the whole suite to Postgres without need. Markdown content remains JSONB, so conversion is data work rather than a required column-type migration.
## revisions
Continuous autosave writes content without creating revisions. Each idle-gap timeout creates exactly one revision row, even if another snapshot trigger occurred recently. If multiple checkpoint conditions fire together, create one row and record every fired trigger plus complete metadata. Keep explicit user-action snapshots distinct as specified.
## security-compliance
Ownership-protected routes scope queries by user_id so foreign rows are never loaded; return 404 for foreign and nonexistent resources (RB-2 pattern supersedes RB-3 inherited 403). Test unauthenticated 401 separately. Compliance ERRORs block writing/generation; warnings remain visible and do not block. Persist all findings in resumes.compliance; prompt users to resolve blocking market-required fields. Pure Markdown invalidates old section-order/included-field assumptions: redefine those checks using document understanding rather than assuming structured fields.
## worker-prompts
Worker pipeline: build from repository root, copy api/ and worker/, add api/ to PYTHONPATH, and merge required AI dependencies. Delete stale worker/app/shared/ duplicate. Railway worker uses repo-root context and explicit Dockerfile path. Keep prompts in one api/app/prompts/ convention; move SYSTEM_PROMPT there preserving public name, module interface, exact text, behavior, and unchanged tests.
## frontend-tests
For browser-dependent,resume-builder · promoted · dream at call 20
Users own and edit resumes and durable career history; AI assists on demand, never gates. Prefer the smallest reversible change, one coherent convention, and preserve shared interfaces/behavior with unchanged regression tests. Resume content is pure free-text Markdown with no recognized sections; downstream structure is AI-interpreted. Open `product` for workflow and guidance; `career-model` for profile ownership; `resume-format` for document/editor direction and superseded designs; `drift` for tokens; `skills` for normalization; `db-tests` for SQL/testing; `revisions` for snapshots; `security-compliance` for access/findings; `worker-prompts` for shared code/deployment; `frontend-tests` for browser coverage.
## product
Users own and manually manage professional history and resumes; AI is an on-demand reviewer, enhancer, and localizer, never a gate. Localization adapts structure, length, formatting, and norms by market. Prefer the smallest reversible change satisfying constraints and one coherent convention; specs may describe nonexistent conventions, so choose intentionally. Shared-module changes are acceptable if public names/interfaces and exact behavior remain unchanged; keep regression tests unchanged. RB-9 score is retired; guidance is advisory, distinct from compliance. RB-9 guidance producer is keywords only; no job target means empty queue. Show exactly one suggestion card; expose open queue/anchors, allow client-selected active item (server order default), suppress stale anchors per item. Anchors are exact {quote, occurrence}; accept is atomic scoped exact replacement; stale quote drops at read/accept, not autosave. Dismissal key hashes category + normalized quote. Document marks: one layout-neutral dotted underline per anchored line, quieter than active underline/tint; panel count communicates suggestion count. Clicking a marked line activates/cycles suggestions on it and places caret normally. Watch whether card changes during editing feels helpful or startling.
## career-model
Profiles are the durable career library; resumes remain directly editable documents. Keep resumes.profile_id NOT NULL and seed a profile from the first resume. Preserve source_entry_id/source_bullet_id provenance and offer promotion of resume edits back to the profile. Targeting may use union of career material while resume remains editing surface. Pure-Markdown resumes invalidate older field-level provenance assumptions; reconsider them.
## resume-format
Decision 15 supersedes RB-12 structured schema: resumes.content = {markdown: "..."}, one pure free-text Markdown document, no recognized section boundaries, required headings, or inferred fields. Downstream needs use GenAI understanding. RB-12 remains shipped/verified, not defective. Resolve conversion of existing JSON rows and revise generation provenance/guards, keyword evidence, compliance section/order checks, and RB-14 outline; broaden Markdown deliberately, with RB-10 authoritative for ATS safety. No schema DDL is implied, but existing data needs conversion. Earlier decision 14's custom structural Tiptap schema, decision 11's renderer-HTML/contentEditable strategy, and RB-12 structured renderer assumptions are superseded; update rendering for Markdown.
## drift
profiles.version increments on every profile, entry, or bullet write; resumes.profile_version captures profile version at generation. Drift is inequality, preferred over timestamps because child edits may not update profiles.updated_at. Concurrency tokens hash client-editable state, not updated_at: include content, presentation, title, status, template_key, region_code; derived/read-triggered writes must not invalidate tokens. Identical client-editable state may correctly yield the same token.
## skills
Keep skills + profile_skills and normalize resume_keywords.skill_id when shared vocabulary, alias resolution, or cross-user analytics matter. Committed spec requires aliases (e.g. K8s/Kubernetes -> canonical term) and skill_id FK, so JSONB simplification is inappropriate. Pure free-text resumes change evidence finding/attribution, not canonical skill vocabulary.
## db-tests
For SQLAlchemy PostgreSQL JSONB columns use JSONB().with_variant(sqlite.JSON, 'sqlite') to preserve real PostgreSQL behavior and unchanged SQLite tests. Add dedicated PostgreSQL integration coverage for behavior SQLite cannot validate, including CHECK constraints and in-place JSONB mutation. Do not split ORM metadata or move whole suite to Postgres without need. Markdown content remains JSONB, so conversion is data work rather than required column-type migration.
## revisions
Continuous autosave writes content without creating revisions. Each idle-gap timeout creates exactly one revision row, even if another snapshot trigger occurred recently. If multiple checkpoint conditions fire together, create one row and record every fired trigger plus complete metadata. Keep explicit user-action snapshots distinct as specified.
## security-compliance
Ownership-protected routes scope queries by user_id so foreign rows are never loaded; return 404 for foreign and nonexistent resources (RB-2 pattern supersedes RB-3 inherited 403). Test unauthenticated 401 separately. Compliance ERRORs block writing/generation; warnings remain visible and do not block. Persist all findings in resumes.compliance; prompt users to resolve blocking market-required fields. Pure Markdown invalidates old section-order/included-field assumptions: redefine checks using document understanding.
## worker-prompts
Worker pipeline: build from repository root, copy api/ andresume-builder · promoted · dream at call 25
Users own/edit resumes and career history; AI assists, never gates. Prefer small reversible changes, one coherent convention, preserve shared interfaces and regression tests. Resume content is pure free-text Markdown; downstream structure is AI-interpreted. Open `product` for guidance/C2/duplication; `career-model` for profile ownership; `resume-format` for document direction; `drift` for versioning; `skills` for normalization; `db-tests` for SQL/testing; `revisions` for snapshots; `security-compliance` for access/findings; `worker-prompts` for shared code/prompts; `frontend-tests` for browser coverage.
## product
Users own and edit resumes; AI advice is optional and never gates access/export. Localization adapts to market. RB-9 score is retired; compliance is distinct (errors block generation, warnings do not). Guidance uses one queue for document-changing suggestions: exact {quote, occurrence} anchors + replacement; accept is atomic, stale/missing anchors are dropped/refused (409), dismissal durable. Use it for calibration findings too—not bespoke apply controls; unresolved findings cannot be accepted. Exactly one suggestion card; document marks can map all open items, with client selection and server-order default. One layout-neutral, quiet dotted underline per anchored line; clicking selects/cycles suggestions on that line and places caret normally. Keep an eye on whether card changes while editing feel helpful or startling. RB-20 is shipped backend foundation; its prose findings UI is removed. C2 assistant preserves structured requirement contract, fact-capture loop, per-resume thread, per-requirement status, and skipped/dismissed decisions; chat bubbles alone are insufficient. One resume = one role/context/thread. Duplicate for another role; inherit document/context (including job target/profile), not thread or requirement decisions; start fresh. Duplicate roots at original; immediate role prompt discretionary. Users can always download; warn prominently/count unfilled placeholders, never block export. Prefer smallest reversible change and one coherent convention; specs may invent conventions, so inspect repository.
## career-model
Profiles are durable career library; resumes are directly editable documents. Keep resumes.profile_id NOT NULL and seed profile from first resume. Preserve source_entry_id/source_bullet_id provenance and offer promotion of edits back to profile. Targeting can use union of career material while resume remains editing surface. Pure-Markdown resumes invalidate old field-level provenance assumptions; reconsider them.
## resume-format
Decision 15 supersedes RB-12 structured schema: resumes.content = {markdown: "..."}, one pure free-text Markdown document, no required/recognized sections or inferred fields; downstream structure uses GenAI. RB-12 remains shipped/verified, not defective. Convert existing JSON rows; revise generation provenance/guards, keyword evidence, compliance section/order checks, and RB-14 outline. No schema DDL implied; Markdown broadening is deliberate, RB-10 authoritative for ATS safety. Earlier custom Tiptap schema (decision 14), renderer-HTML/contentEditable (11), and RB-12 renderer assumptions are superseded; update rendering for Markdown.
## drift
profiles.version increments on every profile, entry, or bullet write; resumes.profile_version captures version at generation. Drift = inequality; prefer over timestamps because child edits may not update profiles.updated_at. Concurrency tokens hash client-editable state, not updated_at: include content, presentation, title, status, template_key, region_code. Derived/read-triggered writes must not invalidate tokens. Identical client-editable state can share token.
## skills
Keep skills + profile_skills and normalize resume_keywords.skill_id where shared vocabulary, alias resolution, or cross-user analytics matter. Committed spec requires aliases (e.g. K8s/Kubernetes -> canonical term) and skill_id FK; JSONB simplification is inappropriate. Free-text resumes change evidence finding/attribution, not canonical skill vocabulary.
## db-tests
For SQLAlchemy PostgreSQL JSONB use JSONB().with_variant(sqlite.JSON, 'sqlite') to preserve PostgreSQL behavior and unchanged SQLite tests. Add dedicated PostgreSQL integration coverage for CHECK constraints and in-place JSONB mutation. Do not split ORM metadata or move whole suite to Postgres unnecessarily. Markdown content remains JSONB; conversion is data work, not required column-type migration.
## revisions
Continuous autosave writes content without revisions. Each idle-gap timeout creates exactly one revision row, even if another snapshot trigger occurred recently. If checkpoint conditions overlap, write one row and record every fired trigger plus complete metadata. Keep explicit user-action snapshots distinct as specified.
## security-compliance
Ownership-protected routes scope queries by user_id so foreign rows are never loaded; foreign and nonexistent resources both return 404 (RB-2 pattern supersedes RB-3 inherited 403); test unauthenticated 401 separately. Compliance ERRORs block writing/generation; warnings remain visible and do not block. Persist all findings in resumes.compliance and prompt users to resolve blocking market-required fields. Free Markdown invalidates old section-order/included-field assumptions; redefine checks via document understanding.
## worker-prompts
Worker pipeline uses shared API code: build worker from repo root, copy api/ and worker/, add api/ to PYTHONPATH,resume-builder · promoted · dream at call 30
Users own truthful career history and resumes; AI assists, never invents unsupported claims or gates access/export. Prefer small reversible changes, one coherent convention; inspect repo and prioritize owner’s updated prototype over stale specs. Resume is pure free-text Markdown; downstream structure is AI-interpreted. C2 is guided assistance, not general chat. Open `product` for UX/principles; `career` for profile ownership/duplication; `document` for Markdown/rendering/guidance; `backend` for tokens, drift, revisions, security/compliance; `data-tests` for skills/JSONB/testing; `build` for worker/prompts/frontend tests.
## product
Users own/edit resumes and truthful career history. AI reviews, enhances and localizes on demand, never inventing unsupported claims or gating access/export. Localization adapts structure, length, formatting and cultural expectations to market. Prefer smallest reversible change and one convention; inspect repository, and treat owner’s updated prototype/instruction as stronger evidence than stale spec. C2 is the core: guided chat-like assistant, not general chat or blank prompt. Assistant leads with ranked agenda; typed input redirects to target/goal, routed to known actions; clarify missing targets, narrow vague asks, derive chips from state, provide fallback. Keep guidance readily available. One Assistant/Document two-tab rail is compatible: Document contains settings, not guidance; remove top-toolbar properties, put Auto adjust in formatting row; avoid clutter/sideways typography wall. Use Tailwind and shadcn. RB-9 score is retired; no score in overview.
## career
Profiles are durable career library; resumes are directly editable documents. Keep resumes.profile_id NOT NULL and seed profile from first resume. Preserve source_entry_id/source_bullet_id provenance and offer promotion of edits back to profile; targeting may use union of career material. Pure-Markdown resumes invalidate old field-level provenance assumptions. One resume = one role/context/thread. Duplicate for another role; inherit document/context (including job target/profile), but not thread or requirement decisions; start fresh. Copy roots at original. Immediate role prompt discretionary.
## document
resumes.content = {markdown: "..."}, pure free-text Markdown, no required/recognized sections or inferred fields; downstream structure uses GenAI. Decision 15 supersedes RB-12 structured schema (which remains shipped/verified); convert existing JSON rows, revise provenance/evaluation/compliance and renderer. RB-10 remains ATS-safety authority. Guidance has one queue for document-changing proposals, including keywords and calibration-derived suggestions. Exact {quote, occurrence} anchor plus replacement; apply atomically, stale/missing anchors dropped/refused (409), dismissal durable; unresolved findings cannot be accepted. Calibration response itself remains unpersisted; grounded findings may produce queue items only with resolvable quote/replacement. One proposal card at a time in thread, no separate findings/suggestions panel; reach via agenda, queue popover, marks. Marks: one quiet, layout-neutral dotted underline per anchored line; click selects/cycles items on line and caret behaves normally. Watch whether card changes while editing feels helpful or startling. Never block download; prominently mark/count placeholders.
## backend
Concurrency token hashes client-editable state only: content, presentation, title, status, template_key, region_code—not updated_at or derived/read-triggered writes. Identical state may share token. profiles.version increments on profile/entry/bullet write; resumes.profile_version captures generation version; drift is inequality, not timestamps. Continuous autosave writes content without revisions; every idle-gap timeout creates exactly one revision. Overlapping triggers produce one row carrying all triggers and metadata; preserve explicit action snapshots. Ownership queries scope by user_id; foreign and missing both 404, unauthenticated 401 separately. Compliance ERROR blocks generation, warning does not; persist findings, prompt for market-required missing data.
## data-tests
Keep skills + profile_skills and normalize resume_keywords.skill_id; aliases (K8s/Kubernetes) and shared vocabulary/cross-user analytics justify it. SQLAlchemy PostgreSQL JSONB columns use JSONB().with_variant(sqlite.JSON, 'sqlite') to preserve Postgres semantics and existing SQLite tests; add dedicated Postgres integration coverage for CHECK and in-place JSONB mutation. Do not split ORM metadata or migrate whole suite. Markdown remains JSONB; conversion is data work, not required column-type migration. Browser behavior (especially contentEditable/caret/accessibility) merits Playwright against live stack; add @playwright/test, axe-core, config and make target. Server invariants remain pytest/API assertions.
## build
Worker uses shared API code: build from repo root, copy api/ and worker/, add api/ to PYTHONPATH, merge AI dependencies into worker requirements; Railway worker points to repo root with explicit Dockerfile path. Delete stale worker/app/shared duplicate. Shared-package extraction remains separate future refactor. Establish one prompt convention at api/app/prompts; move SYSTEM_PROMPT there while preserving name/module/text and tests, rather than competing inline/file conventions.resume-builder · wiki · dream at call 5
## Profiles and editable resumes Treat the career library and resume as complementary product surfaces, not competing sources of truth. Profiles are the canonical union of user-authored experience and support targeting; resumes remain directly editable documents. Preserve provenance such as source_entry_id/source_bullet_id and offer explicit promotion of resume edits back to the profile. Keep resumes.profile_id NOT NULL and bootstrap a profile from the user's first resume. Do not make resumes generated-only snapshots or profiles optional/derived. See also: [[Profile drift tracking]], [[Skills normalization]]. ## Skills normalization Normalize skills in shared tables when a committed requirement calls for shared vocabulary or cross-user analytics; otherwise prefer simpler storage. Here the committed spec requires canonical terms and alias resolution: skills.aliases maps variants (for example, K8s) to a normalized term, profile_skills associates skills with profiles, and resume_keywords.skill_id references the vocabulary. Therefore keep skills and profile_skills separate rather than storing an unstructured profiles.skills array. Do not justify complexity solely with hypothetical future uses. See also: [[Profiles and editable resumes]]. ## Profile drift tracking Capture the profile state used to generate each resume variant because historical state cannot reliably be reconstructed later. Increment profiles.version on profile, entry, or bullet writes; copy that value to resumes.profile_version at generation. Drift is detected by comparing the current profile version with the resume's recorded version. Do not substitute updated_at: child edits may not update the profile timestamp. See also: [[Profiles and editable resumes]]. ## JSONB with SQLite test compatibility When the production schema requires PostgreSQL JSONB but the existing test suite creates all models on SQLite, use JSONB().with_variant(sqlite.JSON, 'sqlite') on each JSONB column. This preserves JSONB in PostgreSQL while allowing unchanged SQLite tests to run. Verify PostgreSQL-specific behavior (such as CHECK constraints and in-place JSONB mutation) in a dedicated PostgreSQL fixture; SQLite is not evidence for those behaviors. Avoid rewriting the whole suite or splitting ORM metadata. See also: [[Testing database-specific behavior]]. ## Testing database-specific behavior Keep existing tests unchanged when an explicit constraint requires it, and isolate tests for database-specific semantics in a dedicated fixture using the relevant database. SQLite compatibility should not be mistaken for validation of PostgreSQL-only behavior. For JSONB, retain a SQLite type variant for the ordinary suite and verify PostgreSQL constraints and mutation behavior against PostgreSQL. See also: [[JSONB with SQLite test compatibility]]. ## Autosave and revision snapshots Treat continuous autosave and revision history as separate mechanisms. Autosave persists active typing without creating snapshots. Each idle-gap timeout is its own revision trigger and creates exactly one revision row, even if content-based deduplication might otherwise suppress it. Follow explicit trigger/count rules rather than inferring snapshot policy from autosave behavior.
resume-builder · wiki · dream at call 10
## Profiles and editable resumes Treat the career library and resume as complementary: profiles are the canonical union of authored experience for targeting; resumes remain directly editable documents. Preserve source_entry_id/source_bullet_id provenance and offer explicit promotion of resume edits back to the profile. Keep resumes.profile_id NOT NULL and bootstrap a profile from the user's first resume. Never make resumes generated-only snapshots or profiles optional/derived. Related: [[Profile drift tracking]], [[Skills normalization]]. ## Skills normalization Use shared vocabulary tables when a committed requirement calls for canonical terms, alias resolution, or cross-user analytics; otherwise prefer simple storage and don't justify complexity with hypothetical future uses. Here keep skills and profile_skills separate: skills.aliases maps variants (e.g. K8s) to normalized terms, profile_skills associates skills with profiles, and resume_keywords.skill_id references the vocabulary. Related: [[Profiles and editable resumes]]. ## Profile drift tracking Preserve the profile state used to generate each resume variant; historical state cannot be reconstructed later. Increment profiles.version on profile, entry, or bullet writes, and copy that version to resumes.profile_version at generation. Detect drift by comparing versions. Do not rely on updated_at: child edits may not update the parent timestamp. Related: [[Profiles and editable resumes]]. ## Database-specific testing Keep existing tests unchanged when constraints require it. For production PostgreSQL JSONB with SQLite test compatibility, define each column as JSONB().with_variant(sqlite.JSON, 'sqlite'); do not split ORM metadata or rewrite the whole suite. SQLite compatibility is not validation of PostgreSQL-only behavior: use a dedicated PostgreSQL fixture for constraints and in-place JSONB mutation. Related: [[Testing database-specific behavior]]. ## Testing database-specific behavior Isolate tests for database-specific semantics in a fixture using the relevant database. SQLite is suitable for the unchanged ordinary suite via type variants, but cannot establish PostgreSQL-only constraint or mutation behavior. Related: [[Database-specific testing]]. ## Autosave and revision snapshots Treat continuous autosave and revision checkpoints as separate mechanisms: autosave persists active typing without snapshots; each idle-gap timeout creates exactly one revision. When checkpoint conditions overlap at the same moment, treat them as one event and write one row, recording every fired condition. Follow explicit trigger/count rules rather than deduplicating based on content. ## Authorization and resource privacy For authenticated requests, scope ownership in service-layer queries by user_id so foreign rows are never loaded. Return 404 for both nonexistent and cross-user resources across routes (including resumes and profiles), preventing existence leaks; unauthenticated requests remain 401. Test unauthenticated and cross-user cases separately. Where inherited specs conflict, the verified 404 policy takes precedence over 403 wording. ## Resume compliance Block generation only on ERROR findings. Persist and surface all compliance findings, including warnings; warnings alone do not prevent use of a market. When errors block generation, prompt users to resolve them. This preserves meaningful regional requirements (for example, required nationality) without making warning-only markets unusable. ## Small reversible infrastructure changes Prefer the smallest reversible change that unblocks a feature over a repo-wide refactor. For worker access to shared API code, build from repo root with an explicit worker Dockerfile, copy API and worker, add API to PYTHONPATH, and install required AI dependencies. Remove stale hand-copied shared duplicates rather than forking modules. Keep shared-package extraction as a separate initiative. ## Prompt conventions Establish one repository-wide prompt convention even if a spec falsely claims it already exists. Create prompts/ and migrate existing prompt constants there rather than introducing a competing convention. Preserve public names, module access, and exact prompt text where practical; keep migrations behavior-preserving and verify existing dependents still pass.
resume-builder · wiki · dream at call 15
## Profiles and free-text resumes
Profiles and resumes serve different jobs: profiles are the canonical union of authored career experience for targeting; resumes are directly editable documents, not generated-only snapshots. Keep resumes.profile_id NOT NULL and bootstrap a profile from the first resume. Preserve source provenance and offer explicit promotion of resume edits to the profile, but do not assume provenance must be encoded as per-bullet structured fields: the current product direction makes resumes.content a single Markdown document, and provenance/loss-guard requirements must be adapted to that model. Human input is primary; AI interpretation and assistance are on demand and must not block editing. Related: [[Profile drift tracking]], [[Skills vocabulary and analysis]], [[Free-text resume format and rendering]].
## Free-text resume format and rendering
Current direction supersedes RB-12's shipped structured Tiptap schema: resumes.content is one Markdown document, with no required headings, sections, fields, or recognized structural contract. Use one free-text editor; do not restore H2-as-section rules or a draggable section outline. Existing JSONB records need conversion to {markdown: "..."}; the renderer must render Markdown rather than walk the old article/section/entry tree. Expand supported Markdown deliberately; RB-10 remains authority for ATS safety. Localization, compliance, keyword/evidence analysis, and formatting must interpret the document with GenAI instead of depending on structural fields. Rework dependent specs (generation/provenance and loss guards, keyword acceptance/evidence attribution, compliance section_order/included_fields, outline). RB-12 remains shipped and verified; this is a direction change, not a defect. Related: [[Profiles and free-text resumes]], [[Resume compliance]], [[Browser verification and edit concurrency]].
## Skills vocabulary and analysis
Use shared vocabulary tables when committed requirements call for canonical terms, alias resolution, or cross-user analytics; otherwise prefer simple storage over complexity justified only by hypothetical future use. Keep skills and profile_skills separate: skills.aliases maps variants (such as K8s) to normalized terms, profile_skills associates skills with profiles, and resume_keywords.skill_id references the vocabulary. This committed normalization requirement remains valid, but resume evidence and keyword attribution must not depend on named sections or structured bullets under the free-text resume direction; downstream analysis interprets Markdown. Related: [[Profiles and free-text resumes]].
## Profile drift tracking
Preserve the profile state used to generate each resume variant; historical state cannot be reconstructed later. Increment profiles.version on profile, entry, or bullet writes, and copy that version to resumes.profile_version at generation. Detect drift by comparing versions, not updated_at: child edits may not update the parent timestamp. Adapt the generation mechanism to the current Markdown resume model without dropping the historical-state guarantee. Related: [[Profiles and free-text resumes]].
## Database-specific testing
Keep existing tests unchanged when database constraints require compatibility. For production PostgreSQL JSONB with SQLite test compatibility, define each column as JSONB().with_variant(sqlite.JSON, 'sqlite'); do not split ORM metadata or rewrite the whole suite. SQLite compatibility is not validation of PostgreSQL-only behavior: use a dedicated PostgreSQL fixture for constraints and in-place JSONB mutation. Related: [[Browser verification and edit concurrency]].
## Autosave and revision snapshots
Treat continuous autosave and revision checkpoints as separate mechanisms: autosave persists active typing without snapshots; each idle-gap timeout creates exactly one revision. If checkpoint conditions overlap at the same moment, write one row and record every fired condition. Follow explicit trigger/count rules rather than deduplicating based on content.
## Authorization and resource privacy
For authenticated requests, scope ownership in service-layer queries by user_id so foreign rows are never loaded. Return 404 for nonexistent and cross-user resources across routes (including resumes and profiles), preventing existence leaks; unauthenticated requests remain 401. Test unauthenticated and cross-user cases separately. Where inherited specs conflict, verified 404 policy takes precedence over 403 wording.
## Resume compliance
Block generation only on ERROR findings. Persist and surface all compliance findings, including warnings; warnings alone do not prevent use of a market. When errors block generation, prompt users to resolve them. This preserves meaningful regional requirements (for example, required nationality) without making warning-only markets unusable. Under the free-text resume direction, do not rely on structured section_order or included_fields; adapt compliance interpretation to Markdown. Related: [[Free-text resume format and rendering]].
## Small reversible infrastructure changes
Prefer the smallest reversible change that unblocks a feature over a repo-wide refactor. For worker access to shared API code, build from repo root with an explicit worker Dockerfile, copy API and worker, add API to PYTHONPATH, and install required AI dependencies. Remove stale hand-copied shared duplicates rather than forking modules. Keep shared-package extraction as a separate initiative. Railway's worker service must use the repo root and explicit Dockerfile path. Related: [[Prompt conventions]].
## Prompt conventions
Establish one repository-wide prompt convention even if a spec falsely claims it already exists. Create prompts/ and migrate existing prompt constants there rather than introducing a competing convention. Preserve public names, module access, and exact prompt text where practical; keep migrations behavior-preserving and verify existing dependents still pass. Related: [[Small reversible infrastructure changes]].
## Browser verification and edit concurrency
Prefer Playwright against the running stack for editing behavior and cross-tier checks; verify persistence via API and server invariants. Use a real browser for caret, selection, keyboard, accessibility, and conflict behavior rather than relying on a DOM simulation. Keep frontend tests focused on browser behavior; assert database-only invariants in the server test suite. Concurrency hashes cover client-editableresume-builder · wiki · dream at call 20
## Profiles and free-text resumes
Profiles are the canonical career library: the union of authored experience used for targeting. Resumes are user-owned, directly editable documents, not generated-only snapshots. Keep resumes.profile_id NOT NULL and bootstrap a profile from the first resume. Preserve source provenance and offer explicit promotion of resume edits to the profile, but adapt these safeguards to one Markdown document rather than requiring per-bullet fields. Human input is primary; AI is on-demand assistance and must not block editing. Localization may adapt structure, length, formatting, and conventions to a target market. Related: [[Free-text resume format and rendering]], [[Profile vocabulary and drift]].
## Free-text resume format and rendering
Current direction is resumes.content as one Markdown document, with no required headings, sections, fields, or recognized structural contract. This supersedes RB-12's shipped structured Tiptap schema; that was a direction change, not a defect. Convert existing JSONB records to {markdown: "..."}; render Markdown, not the old article/section/entry tree. Use a free-text editor; do not restore H2 section semantics or a draggable section outline. Expand supported Markdown deliberately; RB-10 remains authority on ATS safety. Generation/provenance, keyword evidence, compliance, and formatting must interpret Markdown (with GenAI where needed), not depend on structural fields. Related: [[Profiles and free-text resumes]], [[Guidance queue]], [[Compliance and derived signals]], [[Editing and verification]].
## Profile vocabulary and drift
Keep skills and profile_skills separate where committed needs require canonical terms, alias resolution, or cross-user analytics. skills.aliases maps variants (e.g. K8s) to normalized terms; profile_skills associates skills with profiles; resume_keywords.skill_id references the vocabulary. Avoid complexity justified only by hypothetical future use. Preserve the profile state used to generate each resume variant: increment profiles.version on profile, entry, or bullet writes and copy it to resumes.profile_version at generation. Compare versions for drift, not updated_at, which may miss child edits. Adapt generation to Markdown without losing this historical-state guarantee. Related: [[Profiles and free-text resumes]], [[Free-text resume format and rendering]].
## Guidance queue
Guidance is an advisory queue, not a score or compliance verdict. The producer scope is keywords only: no whole-document GenAI suggestions, deterministic checks, or compliance findings. With no job target, the queue is empty. Items use an exact-text anchor {quote, occurrence}; accept atomically replaces only that exact occurrence with proposed_change. If stale or absent, drop it rather than applying elsewhere. Resolve staleness on read/accept, not autosave. Dismissal identity hashes category plus normalized quote. The panel presents one card at a time; server order is the default, while document selection can choose the active item. Related: [[Free-text resume format and rendering]], [[Guidance document marks]], [[Compliance and derived signals]].
## Guidance document marks
The document surface may mark all open guidance items while preserving the one-card-at-a-time decision surface. Use a quiet, layout-neutral dotted underline on each anchored line, quieter than the active line's solid underline/tint; avoid borders or layout shifts (text-decoration or inset shadow). Visible-mark count means marked lines, not suggestions. Clicking a marked line selects its suggestion and places the caret normally; repeated clicks cycle through suggestions sharing that line. The panel count communicates queue size; server order is default. Stale anchors are not marked. Related: [[Guidance queue]], [[Editing and verification]].
## Compliance and derived signals
Block generation only on compliance ERROR findings. Persist and surface every finding, including warnings; warnings alone do not make a market unusable. An error blocks and should prompt the user to resolve it (for example, required nationality). Under free-text direction, do not depend on section_order or included_fields; interpret Markdown. Keep compliance distinct from advisory guidance. Resume score storage, scorer, endpoints, and API field were deliberately removed; do not revive them from stale specs. Overview tables show title, created, last edited, and actions (plus archived date on archived table), with no score or substitute compliance column. Related: [[Free-text resume format and rendering]], [[Guidance queue]].
## Editing and verification
Use Playwright against the running stack for editing behavior and cross-tier checks. Real browser coverage matters for caret, selection, keyboard, accessibility, and conflicts; DOM simulation is not a substitute. Assert persistence via API and server invariants; keep frontend tests focused on browser behavior and database-only invariants in server tests. Concurrency hashes must cover client-editable state (content, presentation, title, status, template, region), not updated_at or derived-value writes: reading/recomputing feedback must not spuriously invalidate a writer. Browser editing should preserve cursor behavior and render consistently with the Markdown renderer. Related: [[Free-text resume format and rendering]], [[Guidance document marks]], [[Autosave and revision snapshots]], [[Database-specific testing]].
## Autosave and revision snapshots
Continuous autosave and revision checkpoints are separate. Autosave persists active typing without creating snapshots; each idle-gap timeout creates exactly one revision. If checkpoint conditions overlap at the same instant, write one row and record every condition that fired. Follow explicit trigger/count rules; do not deduplicate based on content. Verify browser editing in Playwright and assert revision counts as server-side invariants. Related: [[Editing and verification]].
## Authorization and resource privacy
For authenticated requests, scope ownership in service-layer queries by user_id so foreign rows are never loaded. Return 404 for nonexistent and cross-user resources across routes, including resumes and profiles, preventing existence leaks. Unauthenticated requests remain 401. Test unauthenticated andresume-builder · wiki · dream at call 25
## Profiles and resume variants
The product has two complementary sources of value: a canonical career library for targeting, and user-owned editable resume documents. Resumes are not generated-only snapshots; keep resume.profile_id non-null and seed a profile from the first resume. Preserve provenance where useful and make promotion of resume edits explicit. A resume variant is for one role; duplicate it to target another role rather than mixing role-specific advice into one document. Related: [[Free-text resumes]], [[Profile vocabulary and drift]], [[Guided assistant]].
## Free-text resumes
Current direction is resumes.content = {markdown: "..."}: a single free-text Markdown document, with no required headings, fields, sections, or structural contract. This supersedes RB-12's structured Tiptap schema as a deliberate change of direction, not a defect. Convert existing structured JSONB records; render Markdown and use a free-text editing surface. Do not restore section semantics or a draggable section outline. Expand Markdown support deliberately; RB-10 governs ATS safety. Generation, provenance, keyword evidence, compliance, and formatting must interpret Markdown (GenAI where needed), not rely on removed fields. Related: [[Profiles and resume variants]], [[Guidance queue and adoption]], [[Compliance and export]], [[Editing and concurrency]].
## Profile vocabulary and drift
Keep skills and profile_skills separate when committed needs include canonical terms, alias resolution, or cross-user analytics. skills.aliases normalizes variants; resume_keywords.skill_id references the vocabulary. Avoid tables justified only by hypothetical future use. Preserve the profile state used for each generated variant: increment profiles.version on profile, entry, or bullet writes and copy it to resumes.profile_version at generation. Compare counters, not updated_at, which can miss child edits. Adapt generation to Markdown without losing this historical-state guarantee. Related: [[Profiles and resume variants]], [[Free-text resumes]].
## Guidance queue and adoption
Guidance is the single document-change path: advisory suggestions are not scores or compliance verdicts, and no suggestion applies until the user adopts it. Each item has an exact-text anchor {quote, occurrence}; accept atomically replaces only that occurrence with proposed_change. If missing or stale, drop it rather than guessing. Resolve staleness on read/accept, not autosave. Dismissal identity hashes category plus normalized quote. The panel presents one decision at a time; server order is default, but document selection can activate an item. Producers include keywords and calibration findings; findings must provide a resolvable quote and exact replacement to be adoptable. The calibration response itself remains transient; derived guidance is persisted when adopted/queued. No target means no keyword suggestions. Related: [[Free-text resumes]], [[Guidance marks]], [[Guided assistant]], [[Compliance and export]].
## Guidance marks
The document can map all open suggestions while the panel still asks for one decision at a time. Mark each anchored line with a quiet, layout-neutral dotted underline, quieter than the active item's solid underline/tint; avoid borders and layout shifts. Count marked lines, not suggestions. Clicking a marked line selects its suggestion and places the caret normally; repeated clicks cycle through suggestions sharing that line. Stale anchors are never marked. The panel count communicates queue size. Related: [[Guidance queue and adoption]], [[Editing and concurrency]].
## Compliance and export
Block generation only on compliance ERROR findings. Persist and surface all findings; warnings alone do not make a market unusable. An error should prompt resolution (for example, required nationality). Keep compliance separate from advisory guidance, and interpret Markdown rather than removed section_order/included_fields. Resume scores, scorer, endpoints, and API field were deliberately removed: do not revive them or substitute a compliance column in overview tables. Tables show title, created, last edited, actions (and archived date on archived table). Users can always download; unfilled placeholders must be conspicuously marked and counted at export, but never block it. Related: [[Free-text resumes]], [[Guidance queue and adoption]], [[Guided assistant]].
## Guided assistant
RB-21 follows the C2 design as a new initiative, leaving RB-20's shipped backend primitives intact while replacing its unpublished findings column/prose panel outright. The assistant is the only guidance surface. Its durable state includes a per-resume thread, requirement status and skipped/dismissed decisions; context has provenance, agenda is ranked, and fact capture precedes drafting. Support ongoing evaluation, proposal diff/apply/undo, narrowing vague asks, and cover-letter handoff. One resume means one role, context, and thread. Duplicate for another role: carry document and role context as appropriate, but reset thread and requirement decisions because they are role-specific. Related: [[Profiles and resume variants]], [[Guidance queue and adoption]], [[Compliance and export]].
## Editing and concurrency
Use the renderer's own HTML for visual parity where feasible; browser editing must preserve caret behavior and render consistently with Markdown. Concurrency tokens cover client-editable state (content, presentation, title, status, template, region), not updated_at or derived writes: reading/recomputing feedback must not invalidate a writer. Adopt returned content/version after guidance acceptance to avoid stale autosave conflicts. Structural changes update local content then re-render. Related: [[Free-text resumes]], [[Guidance marks]], [[Autosave and revision snapshots]], [[Testing and database]].
## Autosave and revision snapshots
Continuous autosave and revision checkpoints are separate. Autosave persists active typing without snapshots; each idle-gap timeout creates exactly one revision. If checkpoint conditions coincide, write one row and record every condition that fired; do not deduplicate based on content. Verify browser editing and assert revision counts server-side. Related: [[Editing and concurrency]],resume-builder · wiki · dream at call 30
## Product model and variants
The product balances a canonical career library for targeting with user-owned, editable resume documents. Every resume has a profile; seed one from the first resume. Preserve provenance where useful and make promoting edits back to the profile explicit. A resume variant targets one role; duplicate it for another rather than mixing role-specific advice. Duplicate the document and relevant role context, but reset role-specific thread and requirement decisions.
## Free-text resumes
Storage is `resumes.content = {markdown: ...}`: one free-text Markdown document, with no required headings, fields, sections, or structural contract. This deliberately supersedes the former structured Tiptap schema; convert existing records and render/edit Markdown. Do not restore section semantics or a draggable outline. Generation, provenance, keywords, compliance, and formatting must interpret Markdown, using GenAI where needed. Expand Markdown deliberately; ATS safety remains authoritative.
## Profile vocabulary and drift
Keep `skills` and `profile_skills` where canonical vocabulary, alias resolution, or cross-user analytics are committed needs; aliases normalize variants, and resume keywords reference canonical skills. Avoid tables for hypothetical futures. Preserve generation-time profile state: increment `profiles.version` on profile, entry, or bullet writes and copy it to the resume at generation. Compare counters, not timestamps, which miss child edits.
## Guidance queue and adoption
Guidance is the single path for document changes; suggestions are advisory, not scores or compliance verdicts, and nothing applies until adopted. Anchor by exact quote plus occurrence. Accept atomically replaces only that occurrence; if stale or missing, drop it rather than guessing. Dismissal identity hashes category plus normalized quote. Resolve stale items on read/accept, not autosave. Producers include keyword and calibration findings; adoptable findings need a resolvable quote and exact replacement. Calibration output itself remains transient; only derived queued/adopted guidance persists. No target means no keyword suggestions. Queue selection may be user-activated; otherwise server order is default.
## Guidance marks
Map all open, valid suggestions in the document while keeping decisions one-at-a-time. Mark each anchored line with a quiet, layout-neutral dotted underline, quieter than the active item’s solid underline/tint; avoid borders and layout shifts. Count marked lines, not suggestions; queue count communicates item count. Clicking a marked line places the caret normally. Marks locate proposals; in the assistant design, select/review proposals through agenda, queue popover, or chips rather than hijacking ordinary editing clicks. Stale anchors are never marked.
## Compliance and export
Only compliance ERROR findings block generation; warnings are stored and surfaced but do not make a market unusable. Interpret Markdown, not removed section fields. Keep compliance distinct from advisory guidance. No resume score/scorer/endpoints/API field, and do not substitute a compliance column in overview tables: show title, created, last edited, actions (plus archived date in archived table). Users can always download. Unfilled placeholders must be conspicuously marked and counted at export, but never block it.
## Guided assistant
The assistant is a guided, chat-like experience, not a general chatbot or fixed wizard. It leads with a ranked agenda; the user steers; each turn ends in a concrete action. Never show a blank thread awaiting an idea or pass typed text as unrestricted model instruction. Enable input once a role exists; route text to known action/target/goal, clarify missing targets, ground vague asks in high-impact fixes, and use a defined fallback. Generate chips from resume state; never invent claims. The thread is the sole guidance surface: proposal cards show diff, reason, Apply, Not now, Undo; reach them through agenda, queue popover, or document marks. Findings feed the same queue. Preserve decided advert requirement answers, including “I don’t have this,” across re-extraction using stable item keys based on category and requirement ID, not wording; close vanished open gaps and add genuinely new ones.
## Account preferences
Account-level assistant/context defaults (language, tone, market) belong in the existing `users.preferences` JSONB document, validated by a Pydantic model in `app/schemas/jsonb.py`, not free-form dicts, typed columns, or a new profile column. They evolve with registry entries, are consumed together, and are not queried across users. Keep them user-scoped so profile switching does not alter defaults. Distinguish from `profiles.languages` (spoken languages). Account defaults yield to per-resume overrides such as `region_code`.
## Editing and concurrency
Prefer renderer-owned HTML for visual parity where feasible; browser editing must preserve caret behavior and render consistently with Markdown. Concurrency tokens cover client-editable state (content, presentation, title, status, template, region), not `updated_at` or derived writes: feedback reads/recomputation must not invalidate a writer. Adopt returned content/version after guidance acceptance to avoid stale autosave conflicts. Structural edits update local content then re-render. Scope data access by owner and make cross-user indistinguishable from missing (404; unauthenticated 401).
## Autosave and revision snapshots
Continuous autosave and revision checkpoints are separate. Autosave persists active typing without snapshots; each idle-gap timeout creates exactly one revision. If checkpoint conditions coincide, write one row and record every condition that fired; do not deduplicate based on content. Verify browser editing and assert revision counts server-side.
## Testing and database
Keep existing SQLite tests unchanged by using PostgreSQL JSONB with a SQLite JSON variant; add a dedicated Postgres fixture for behavior SQLite cannot verify (such as CHECK constraints and in-place JSONB mutation). Use PlaywrightSeed 1
Escalations · 53 questions · chance: 35%
| Arm | Right | Right where no memory was wrong / reverse |
|---|---|---|
| stateless | 53% | |
| search | 62% | +8 / −3 |
| memory | 60% | +8 / −4 |
| structured | 62% | +8 / −3 |
| dream | 59% | +7 / −4 |
| promoted | 64% | +8 / −2 |
| wiki | 62% | +9 / −4 |
| transfer | 60% | +7 / −3 |
Final memories
build-doen · memory
## Intent and priorities Doen is a durable shared spec for designers, engineers, and product owners: separate constraints from discretion, escalate genuine intent calls, and preserve choices, rejected options, and outcomes as precedent. Do not distill abstract engineering rules; the heuristic flywheel is being retired (docs/design-principles.md, 2026-10-02). ## Current frontier (ordered) 1. Capture human reasoning. All 25 recorded decisions were agent-raised; 9 initiatives yielded none. Product calls during shaping go undocumented. Capture precedes retrieval; the product precedent corpus is empty. 2. Ground generated artifacts. Specs cite nonexistent columns/tables/surfaces and learn records have claimed unrealized outcomes. Verification focuses on executors, not artifacts; designers may miss errors. 3. Improve precedent retrieval once a product corpus exists (prototype/harness baseline: 18% useful). Jev is not the verifier for this audience: it auto-approves test criteria 71% of the time and has no human_judgment category. Useful roles: drafting, groundedness, conflict detection, weighing precedent. ## Contextual decision signals (not universal rules) - Support human authorship during draft shaping when otherwise people have no way to contribute: executor drafts from brief, then people can add/edit spec items directly in app before building; after draft, changes go through executor proposals. Here this restores capability lost with removal of Advisor and complements starting initiatives from project page. Do not generalize to unrestricted post-draft editing. - Initiative creation may allow omitted title when owner wants description-only creation: use description’s first line as provisional readable title; executor may rename while drafting. Criteria require description/type/brief, allow omitted title, reject missing description or unknown project without writes. Keep artifacts consistent; flow-specific, not universal. - If a feature’s model should not exist in a lifecycle stage, prefer not rendering it over disabled/inactive controls. Learn module: hide in Draft/Building; render in Learn only; don’t infer Complete visibility without a separate decision. - For research_findings, prefer simple ownership absent clear benefit from locks/versioning: executor’s working document; humans annotate after investigation. MCP writes are last-write-wins and may overwrite human edits; document this. Prefer a dedicated explicit research-write tool when discoverability and stable contract benefit. - Hide importance recommendations only when a project has exactly one initiative (feature-specific; rationale unknown). - Memory machinery is not categorically forbidden pending a replay win: one decision authorized live executor memory as a bounded experiment because replay is record-limited and misses the decision conversation. Capture executor notes at the moment of choice; cap memory, randomize initiative holdouts with no memory, predeclare outcome measures
build-doen · structured
- **Reduce friction when humans capture intent; keep fields optional when a sensible stand-in preserves usability.** Let people shape intent in their workflow; executors can refine later. **Evidence:** app-based initiative creation, direct Draft editing, description-only creation with first-line provisional title, executor renaming; acceptance criteria updated to allow missing titles. **No contradiction. Trap:** executor authorship later does not imply exclusive authorship; metadata need not gate core intent. Keep lists readable with a stand-in. - **Use simple ownership semantics for executor-owned working documents.** Where human review follows, later executor writes may replace human edits; state this rather than adding locks/version machinery. **Evidence:** research_findings is last-write-wins. **No known contradiction. Trap:** establish ownership and sequence first. - **Keep distinct interfaces and write paths explicit.** Prefer a dedicated, discoverable tool for a capability with its own purpose. **Evidence:** submit_research_findings rather than expanding submit_evidence. **No known contradiction. Trap:** fewer tools is not automatically simpler; optional parameters work for non-distinct capabilities. - **Follow explicit visibility rules; don’t transfer conditions by analogy.** **Evidence:** recommendations hidden only with exactly one initiative; borrowed hybrid condition rejected. **No known contradiction. Trap:** similarity alone proves neither shared rationale nor general simplicity preference. - **Separate mechanism correctness from real-world outcome; ground claims in current evidence.** Use established measurement channels, refresh stale baselines, and keep criteria open until meaningful outcomes occur. **Evidence:** event-count sweep/live recompute, SQL plus RESEARCH_LOG.md, baseline corrected 76→79, nonexistent metric wording removed, after-value pending executor pass. **No known contradiction. Trap:** proxies do not prove impact; don’t invent infrastructure or freeze stale data. - **Protect established guarantees by the invariant they serve, not literal implementation boundaries.** Permit scoped adjacent repairs that restore the guard; preserve unrelated guarantees. **Evidence:** HNSW/halfvec, merge_verdict contract, no-trace status, stale eval unpacking. **No known contradiction. Trap:** wording fidelity can preserve a broken guard; intent is not license for scope creep. - **When a measured change misses its acceptance bar, prefer a bounded, in-scope fix and retest if plausibly fixable.** **Evidence:** Jev dedup scored 55.91% vs 67.74%; chosen response unknown. **Trap:** don’t infer the response from the shortfall alone. - **Do not equate a failed retrospective heuristic flywheel with a reason to avoid live, measurable memory.** If live serving captures decision context replay lacks, allow a capped experiment with randomized no-memory holdout, outcomes and kill rule declared in advance; show people everything served so they can assess and retire wrong guidance. **Evidence:** chose live executor memory despite no replay
build-doen · dream
Decision patterns (contextual, not universal) - Prefer simple, low-maintenance semantics when added schema, locks, or gates have marginal value; accept narrow fidelity loss if key signals remain. Keep tool contracts stable and distinct operations discoverable. Preserve useful production capabilities such as indexes; avoid unindexed retrieval when a viable indexed design exists. - Keep quality bars meaningful. When controlled comparisons show regression, test plausible in-scope fixes on the same cases before accepting/shipping. Test mechanisms with realistic inputs when live data cannot exercise them; separately verify live correctness. Don’t weaken assertions to pass. Repair stale fixtures/signatures for deliberate contract reversals and disclose broad changes. Fix broken safeguards, but keep live, paid, nondeterministic evaluations out of default deterministic gates. - Interpret criteria by intent and align them with settled product choices; update criteria that enforce superseded requirements. Address systemic causes within scope, preserving core algorithms/contracts when changing operational reach or scheduling. - Use durable measurement channels (SQL plus RESEARCH_LOG.md); refresh stale baselines. Keep deployment- or future-execution-dependent outcomes open until observed; local predicates and unit tests do not substitute for production impact. - Delegate routine corpus judgments to Jev: confidently admit sound, scoped, condition-bearing standalone rules; confirm merges/generalizations above a threshold; queue borderline cases for human judgment and allow override. Keep retirement human-gated. - Restore human agency when removing a role/tool otherwise leaves no way to act. People may shape spec items during Draft; after Draft, changes use executor proposals. Executors still draft from the brief. Keep lifecycle-specific UI intentional. - Live learning experiments can be justified before replay beats a baseline when they directly close the measurement loop: cap exposure, randomize a no-memory holdout, declare outcome measures and a kill rule before serving, score predictions against actual human choices, and show people everything served so they can inspect outcomes and retire wrong heuristics. Replay-only evidence can miss context at decision time; capture executor notes as the person decides. Do not treat this as permission for an unmeasured flywheel. Product context: Doen is a shared product-development spec framework for designers, software engineers, and product owners. Prioritize capturing human reasoning, groundedness of generated artifacts, then precedent retrieval. The heuristic flywheel is being retired; do not optimize abstract engineering-rule generation. Jev is useful for drafting, groundedness, conflict detection, and weighing precedent, but not as verifier for product-facing behavior.
build-doen · promoted
{
"index": "Doen serves product engineers through durable intent, explicit constraint/discretion boundaries, escalation of genuine intent calls, and precedent\u2014not abstract rule distillation. Prioritize capturing human reasoning and grounding claims in real project evidence; improve retrieval once precedent exists. Preserve production retrieval integrity and surface material architectural consequences. Within granted discretion, fix regressions and remeasure; preserve test purpose, not stale mechanics. Keep evidence and gates honest about what they observe. Open vision-priorities for framing; jev for role and evaluation; product-behavior-writes for UX/data contracts; verification for tests/evidence; retrieval for migrations; heuristic-governance for corpus automation; decision-signals for judgment patterns.",
"notes": {
"vision-priorities": "Doen serves product engineers (designers, software engineers, product owners) through one durable intent artifact, explicit constraint/discretion boundaries, escalation of genuine intent calls, and precedent. It is not a framework for abstract engineering rules; heuristic flywheel retired 2026-10-02 (docs/design-principles.md). Priorities: capture human reasoning during shaping (all 25 recorded decisions were agent-raised; 9 initiatives yielded none); ground specs and claims in actual project surfaces/data and evidence; improve precedent retrieval once product precedent exists (prototype baseline 18% useful).",
"jev": "Jev helps draft, ground, detect conflicts, and weigh precedent; it does not replace product judgment or verify behavior/human-judgment criteria. It auto-approves criteria often (71% observed), so safeguards matter. Repair broken evaluation guards when they block the intended assertion; don't weaken them. Keep live/paid/nondeterministic evals opt-in, not routine merge gates. On likely-fixable prompt/rubric regressions within granted discretion, iterate and remeasure on the same benchmark before deciding.",
"product-behavior-writes": "Render features only where their model applies: Learn is hidden in Draft/Building, visible in Learn, read-only in Complete. Show importance recommendation except when project has exactly one initiative. research_findings is executor working document: MCP writes are pure last-write-wins and can overwrite human edits; document this clearly. Humans annotate after investigation. Avoid locks/versioning absent clear benefit. Prefer dedicated submit_research_findings tool if preserving submit_evidence contract and improving discoverability. In draft, people can add/edit spec items; after draft, changes go through executor proposals. New initiative needs description and type (Build default); title optional, first description line is stand-in until executor renames. Keep constraints, latitude, and criteria consistent with required/optional decisions.",
"verification": "Match evidence to what criterion asks to observe. Local/simulated comparisons isolate code but do not prove production behavior. If deployment is out of scope and risk unobservable, submit available pre-deploy evidence, leave criterion open/needs_judgment, append post-deploy measure later; do not fail it, assume outcome, or deploy unilaterally. Use actual evidence channels (SQL + RESEARCH_LOG.md), not imagined dashboards; refresh stale baselines. Instrumentation/arithmetic tests do not prove real-world impact. For mathematically impossible sparse-data outcomes, test mechanism with realistic sweeps plus live-recompute correctness; future events may be needed for live effect. Prefer deterministic, cheap merge gates and name actual gate; cassette-replayed checks may gate, live/paid/nondeterministic evals stay opt-in. Repair broken signatures/assertions to test intended purpose, not weaken checks; contract reversal warrants updating tests that encode old contract.",
"retrieval": "Protect production retrieval integrity rather than defer architectural gaps when migration would degrade it. For 1536\u21923072 embedding migration, extend to halfvec + HNSW rather than accept unindexed production retrieval, even temporarily. Specified discretion does not automatically cover material architectural consequences; surface those decisions.",
"heuristic-governance": "Automate admission of unclustered rules only when Jev judges sound, well-scoped, standalone, condition-bearing; confident yes admits, otherwise raw. Jev may confirm merge/generalisation proposals above confidence threshold; borderline cases queue and humans can override. Retirement remains human-gated. This supersedes prior human-gate invariant for admission/merges, not retirement.",
"decision-signals": "Interpret constraints by protected behavior, not over-literally: expanding which existing records a step evaluates can be in scope if order, core algorithm, and per-record decision rule remain unchanged. For likely-fixable regressions within granted discretion, iterate and remeasure same benchmark. Accept narrow fidelity loss rather than schema when affected cases are limited and marginal (e.g. initiative_created folded into dismissed loses a resolved-slice drift signal; no field warranted). Preserve test purpose over stale wording: in-scope contract reversal may require assertion updates; a broken eval signature should be repaired, not left dead. Criterion language should track real evidence channels and actual gates."
}
}build-doen · wiki
{
"Doen product philosophy": {
"body": "Doen is a shared product-spec framework for designers, software engineers, and product owners, not a machine for distilling abstract engineering rules. Durable specs preserve human intent, distinguish constraints from discretion, surface genuine judgment calls, and make precedent useful. Prioritize capturing human product reasoning: the product-precedent corpus is currently empty, and historical decisions were agent-originated. Improve groundedness before retrieval; retrieval is useful only when there is human product reasoning to retrieve. Jev can draft, ground, detect conflicts, and weigh precedent, but cannot verify behavior or substitute for human product judgment. Product owners value shaping a spec directly before building. See [[Grounded claims and open outcomes]], [[Spec creation and editing]], and [[Heuristic guidance lifecycle]].",
"links": []
},
"Grounded claims and open outcomes": {
"body": "Ground claims and artifacts in actual product surfaces, sources, and observed facts; do not invent infrastructure or treat an expected effect as measured. The established measurement path is SQL plus RESEARCH_LOG.md, not an assumed metric store/dashboard. Re-measure baselines when work executes rather than reusing stale numbers. Match evidence to what a criterion is meant to establish: a mechanism/property test can establish behavior across realistic inputs, while a live recompute separately establishes correctness on current data. Sparse inputs may make a desired live outcome mathematically impossible today; test the mechanism and state that the outcome may emerge as events accumulate. For outcomes dependent on deployment or future behavior, record a measured before-value and leave the criterion open/needs_judgment until an authorized deployment or real executor pass supplies the after-value. Append that observation; do not assume it or close on a proxy. Jev can assist with grounding, not independently verify human judgment or production behavior. See [[Verification, tests, and gates]] and [[Quality and implementation discretion]].",
"links": []
},
"Spec creation and editing": {
"body": "A new initiative needs a description and a Build/Research choice (Build by default); title is optional, and the description\u2019s first line can serve as a readable provisional title until the executor names it. Constraints, agent latitude, and acceptance criteria are optional. Keep product copy, constraints, and latitude aligned with the actual decision\u2014do not label an optional title required. Save the person's brief separately from the initially empty spec; the brief is not editable afterward. Executors draft the spec from the brief, while people may add/edit spec items during Draft to shape it before building. After Draft, changes go through executor proposals. See [[Doen product philosophy]] and [[Simple, discoverable contracts]].",
"links": []
},
"Heuristic guidance lifecycle": {
"body": "Do not equate rule volume with useful guidance: 228 rules yielded only five usable ones, and a circular flywheel metric misled. Favor grounded, scoped, condition-bearing guidance over raw counts. A rule without a cluster may still be valuable: Jev may auto-admit it as standalone guidance when confidently judged sound, well-scoped, and condition-bearing; otherwise leave it raw. Preserve clustered and standalone paths. Jev may confirm merge and generalization proposals above a confidence threshold; send borderline cases to a human, who can override. Retirement remains human-gated because removing guidance is consequential. In the verdict step, revisit all pending judgeable proposals, not just those created in the current pass, or proposals can become stranded. Fix recurrence without changing unrelated clustering rules, step order, or decision rules. See [[Doen product philosophy]] and [[Verification, tests, and gates]].",
"links": []
},
"Simple, discoverable contracts": {
"body": "Prefer explicit, stable contracts over hybrid or inferred behavior without demonstrated benefit. Use a purpose-specific operation when it is clearer: research findings use submit_research_findings(initiative_id, findings), not an optional extension to an unrelated evidence tool. Writes are pure last-write-wins, including after human edits; document that overwrite behavior rather than adding locks or version tracking without a clear need. Keep UI visibility rules literal: render Learn only in Learn, read-only in Complete, absent in Draft/Building; hide importance recommendation only when there is exactly one initiative. See [[Spec creation and editing]] and [[Quality and implementation discretion]].",
"links": []
},
"Quality and implementation discretion": {
"body": "Address material quality gaps and prevent temporary regressions in core capabilities. When a plausible, fixable miss is within explicit spec discretion, iterate and remeasure before escalating; a controlled benchmark regression justified rubric/prompt iteration, not immediate abandonment. Preserve important system properties, not just the named mechanism: a vector-dimension migration was extended to retain HNSW indexing rather than leave production unindexed. Conversely, avoid schema/state for marginal fidelity in narrow, low-volume cases; bounded information loss can be preferable to complexity. A resolved drift report was allowed to stop contributing to recurrence rather than adding a field to preserve that distinction. See [[Grounded claims and open outcomes]], [[Verification, tests, and gates]], and [[Simple, discoverable contracts]].",
"links": []
},
"Verification, tests, and gates": {
"body": "Verify a criterion\u2019s purpose, not broken literal wording. Repairing a stale test signature so its intended guard actually runs is not weakening it; explain the deviation and confirm the guard passes. When a spec reverses a contract, update tests that encode the old contract; necessary assertion inversions are not weakened checks. Keep deterministic checks in the default suite/bench so they can genuinely gate changes; live-model evaluations are paid, nondeterministic, and remain opt-in rather than becoming a merge gate. Amend criteria that",
"links": []
}
}build-doen · transfer
(from resume-builder)
Product philosophy: User-driven, AI-supported workflows. Users own/edit professional history and resumes; AI reviews, enhances, and localizes on demand, never gatekeeps. Surface issues and ask rather than silently hide. Profiles are source libraries for targeting. Always allow download of user-owned resumes; warn clearly about risks, never withhold files.
Resume/compliance: One Tiptap editor over free-text Markdown (`resumes.content = {markdown}`); no required headings/schema; GenAI interprets downstream. RB-10 governs ATS safety. Separate blocking compliance from advisory guidance. Run `check_compliance()` before writes: errors block, warnings do not; prompt for genuinely market-required missing fields, not warnings alone. Reads do not persist derived compliance.
Guided experience (C2): Assistant leads with ranked agenda; user steers. No blank thread, arbitrary resume Q&A, or typed text sent as free-form model instruction. Every turn resolves to a concrete action. Disable composer until a role exists; route input to known actions, clarify ambiguous targets, ground vague asks in high-impact fixes, define fallback for unmatched intent. Chips derive from state. Prevent unsupported claims. Assistant/thread is the sole guidance surface.
Layout: Prefer human-updated C2 prototype over older specs where it resolves design distinctions. Two-tab rail: Assistant and Document. Assistant remains prominent; Document holds properties/settings. Remove top properties toolbar; Auto adjust goes in formatting row. Keep Tailwind/shadcn.
Suggestions: No RB-20 findings column or RB-18/19 suggestions panel (avoid duplicate queues). Guidance queue is the sole document-changing suggestion path. Each queued suggestion is a thread proposal card (diff, reason, Apply, Not now, Undo), reachable from agenda, queue popover, or document mark. Keep quiet layout-neutral marks (one per anchored line); click moves caret/scopes composer without opening proposal or hijacking writing. Line-level chips may appear. Preserve/rewrite 29 panel browser tests for thread behavior; old panel criteria remain historically verified.
Queue integrity: Exact anchor quote + occurrence and replacement; scoped acceptance atomically records accepted state; 409 if anchor moved. Dismissal hashes category + normalized quote. Drop stale/unresolvable anchors, never guess. Resolve staleness at read/accept, not autosave. Calibration findings are read-only unless queued; unresolvable anchors cannot be accepted. After accepted content changes, editor adopts returned content/version.
Classification vs prose: Use existing Jev/System One client for classification, OpenRouter for all user-facing generated prose; introduce no model client. Coverage is one typed Noul verdict per requirement (avoids malformed JSON); intent routing keeps fast, free keyword pass and falls back to a Jev Choice only on misses. If `TYPESAFE_API_KEY` is unset, both degrade to current behavior (coverage fallback and ask-user routing).resume-builder · memory
Product philosophy: User-driven, AI-supported workflows. Users own/edit professional history and resumes; AI reviews, enhances, and localizes on demand, never gatekeeps. Surface issues and ask rather than silently hide. Profiles are source libraries for targeting. Always allow download of user-owned resumes; warn clearly about risks, never withhold files.
Resume/compliance: One Tiptap editor over free-text Markdown (`resumes.content = {markdown}`); no required headings/schema; GenAI interprets downstream. RB-10 governs ATS safety. Separate blocking compliance from advisory guidance. Run `check_compliance()` before writes: errors block, warnings do not; prompt for genuinely market-required missing fields, not warnings alone. Reads do not persist derived compliance.
Guided experience (C2): Assistant leads with ranked agenda; user steers. No blank thread, arbitrary resume Q&A, or typed text sent as free-form model instruction. Every turn resolves to a concrete action. Disable composer until a role exists; route input to known actions, clarify ambiguous targets, ground vague asks in high-impact fixes, define fallback for unmatched intent. Chips derive from state. Prevent unsupported claims. Assistant/thread is the sole guidance surface.
Layout: Prefer human-updated C2 prototype over older specs where it resolves design distinctions. Two-tab rail: Assistant and Document. Assistant remains prominent; Document holds properties/settings. Remove top properties toolbar; Auto adjust goes in formatting row. Keep Tailwind/shadcn.
Suggestions: No RB-20 findings column or RB-18/19 suggestions panel (avoid duplicate queues). Guidance queue is the sole document-changing suggestion path. Each queued suggestion is a thread proposal card (diff, reason, Apply, Not now, Undo), reachable from agenda, queue popover, or document mark. Keep quiet layout-neutral marks (one per anchored line); click moves caret/scopes composer without opening proposal or hijacking writing. Line-level chips may appear. Preserve/rewrite 29 panel browser tests for thread behavior; old panel criteria remain historically verified.
Queue integrity: Exact anchor quote + occurrence and replacement; scoped acceptance atomically records accepted state; 409 if anchor moved. Dismissal hashes category + normalized quote. Drop stale/unresolvable anchors, never guess. Resolve staleness at read/accept, not autosave. Calibration findings are read-only unless queued; unresolvable anchors cannot be accepted. After accepted content changes, editor adopts returned content/version.
Classification vs prose: Use existing Jev/System One client for classification, OpenRouter for all user-facing generated prose; introduce no model client. Coverage is one typed Noul verdict per requirement (avoids malformed JSON); intent routing keeps fast, free keyword pass and falls back to a Jev Choice only on misses. If `TYPESAFE_API_KEY` is unset, both degrade to current behavior (coverage fallback and ask-user routing).resume-builder · structured
- Match architecture to committed workflows while preserving canonical data and user control. Evidence: editable resumes write back to a profile library; AI is on-demand. No contradiction. Trap: one source of truth does not require one editing surface, snapshots, or AI-first flows. - Preserve cross-document capabilities and low-cost continuity when existing structures support them; normalize shared entities only for concrete canonicalization/linkage needs. Evidence: targeting unions written material, source IDs enable write-back, profile_id remains required and first run seeds from first resume; skills/profile_skills normalize aliases and resume_keywords links by FK. Trap: resumes as sole durable source fragments targeting; hybrid workflows do not require nullable links or redesign; absent shared needs, consolidation is not mandatory. - Represent historical state explicitly when timestamps cannot recover writes or prior state. Evidence: profile versions copy to resumes and increment on profile/entry/bullet writes. Trap: timestamp comparison seems cheap, but delayed history can prevent backfill. - Define concurrency tokens by client-editable state, not incidental activity. Evidence: hash content, presentation, title, status, template_key, region_code; exclude updated_at. Feedback-read score recomputation must not invalidate editor writes. Trap: endpoint-fresh tokens do not close races; suppressing recomputation leaves scores stale. Identical resulting state may share a token. - Model checkpoint cardinality around events while preserving causes. Evidence: overlapping author-change and idle-gap triggers coalesce into one revision with all triggers; each idle timeout differs from autosave. This contradicted change-gated/explicit-only prediction. Trap: traceability need not mean duplicate rows or lost trigger details. - Honor intended editing freedom; do not impose structure for downstream convenience. Evidence: resumes.content is pure Markdown, without recognized headings/fields, rejecting H2 structure and superseding RB-12's rigid schema. Trap: “one editor” did not mean structured slots. Resolve structure-dependent features in spec, often with GenAI; this is not a blanket preference for unstructured data. - For free-text changes, prefer exact-match anchors that fail visibly over positional/structural anchors that may silently mis-target. Evidence: {quote, occurrence} replaces exact occurrence transactionally or drops stale guidance; dismissal hashes category + normalized quote; calibration findings become guidance only with resolvable exact quote/replacement. Trap: offsets shift; headings may be unavailable; absent content needs a nearby insertion anchor or no apply action. - Keep one established mechanism as the sole path for user-accepted document changes; add producers to it rather than inventing parallel apply paths. Trap: preserve the mechanism, not every producer's separate workflow. - Route work by its actual output and available client: use existing typed/classification mechanisms for boundedresume-builder · dream
## Product and data model - Profiles are career libraries; resumes are editable, role-targeted variants with provenance/write-back. Keep `resumes.profile_id` NOT NULL; seed a profile from the first resume. Track drift with `profiles.version` bumped on profile/entry/bullet writes and copied to `resumes.profile_version`; parent timestamps miss child edits. Keep normalized `skills` + `profile_skills` for shared vocabulary/aliases. - Resume content is free-text Markdown (`{markdown: "..."}`), with no required headings or recognized structure. Use one whole-document editor; convert legacy structured content and use GenAI for downstream structure-dependent tasks. Renderer renders Markdown; RB-10 owns ATS-safe formatting. - Compliance errors block generation; warnings do not. Store/surface findings. Overview tables have no score column. Unfilled placeholders warn but never block PDF export. - Account settings (language, tone, default market) are one Pydantic-validated JSONB `users.preferences` document, not profiles; per-resume values (e.g. `region_code`) override defaults. `profiles.languages` means spoken languages. Duplicating for another role copies document/context but resets thread and requirement decisions. ## Guided assistant - Center of gravity: guided, chat-like workflow, not general chat or fixed wizard; only guidance surface. Lead with ranked agenda; user steers. Never show empty thread awaiting prompt. Every turn ends in concrete action; route typed input to known target/goal, not free instruction. Disable composer until role exists. Narrow vague asks, request missing target, derive chips from state, define unmatched-intent fallback. Ground advice; avoid unsupported claims. - Proposals are thread cards (diff, reason, Apply, Not now, Undo), reachable from agenda, queue popover, or document marks. No duplicate suggestions panel. Preserve C2 mechanisms/backend, refusals, grounding/adopt path, and `app/prompts/tone.txt`; prompts use one `app/prompts/` convention (including moved, behavior-preserving `SYSTEM_PROMPT`). - Document marks locate open work. Clicking marked line places caret and scopes composer there; it does not auto-open suggestion. Use line-level chips, agenda, or queue popover to choose. Keep one-at-a-time decision card; quieter marks map open work, one per anchored line, with cycling when multiple items share a line. RB-18/19 panel criteria/tests remain historical records; rewrite their 29 browser tests for thread behavior, don't delete. - Guidance anchors `{quote, occurrence}`. Accept is scoped atomic find/replace; stale quotes are dropped/conflict, never applied elsewhere. Resolve staleness at read/accept, not autosave; queue is derived. Dismissal key hashes category + normalized quote. Calibration findings can produce guidance items; only queue acceptance changes the document. - On advert re-extraction, preserve decisions for requirements that remain, even if reworded (`item_key` hashes category + requirement ID, not wording). Close open items for removed requirements; add genuinelyresume-builder · promoted
{
"index": "User owns career history and documents; AI is on-demand, grounded, and never a blocker. Follow literal constraints, user approval, safe failure, and the smallest reversible change that establishes a durable convention. Verify shipped code/UI and current schema; specs may be stale. Open `workflow` for product control; `freeform` for document model; `guidance` for suggestions and editing; `assistant` for C2/RB-20/21; `compliance` for verdicts; `drift-skills` for freshness and skills; `editing` for revisions/tokens; `platform` for auth, workers, prompts, DB, E2E.",
"notes": {
"workflow": "Users own and manage career history; AI is an on-demand reviewer, enhancer, and localizer, never a general blocker. Localize structure, length, formatting, and cultural expectations to target market. Profiles are the career library; resumes are directly editable documents with provenance/write-back promotion. Keep resumes.profile_id NOT NULL and seed a profile from the first resume.",
"freeform": "Current model: resumes.content = {markdown: ...}, pure freeform Markdown with no required headings, fields, recognized sections, or covert schema. RB-12's rigid schema shipped and was verified, then superseded; convert existing rows. JSONB needs no DDL, but data conversion is required. Redesign generation, compliance, keyword attribution, rendering, ordering, and outline around document understanding. RB-10 remains authoritative on ATS safety.",
"guidance": "One atomic guidance queue is the sole mechanism for accepted document changes. Anchors are exact-text {quote, occurrence}; stale/unmatched anchors are dropped/rejected, never guessed. Accept replaces scoped text and records acceptance atomically; refresh content/token after accept. Queue is derived and validated on read/accept, not autosave. Producers include keyword suggestions and adopted calibration findings. Calibration responses themselves remain unpersisted. Assistant proposal cards own Apply/Not now/Undo; no duplicate suggestions panel. Marks are one quiet, layout-neutral dotted underline per anchored line; clicking places caret and scopes composer, not opening a proposal. Line chips/popover/conversation choose work; multiple items on a line can be cycled. Panel count is outstanding-item count.",
"assistant": "RB-20 remains shipped/verified backend foundation: per-resume job profile, OpenRouter calibration, preflight refusals, exact-once anchor grounding, adopt-finding path, prompt tone. RB-21 is C2 guided assistant, not free chat: lead with ranked agenda, user steers, each turn ends in concrete action; no blank thread or general resume Q&A. Composer enabled once role exists; clarify missing target, resolve vague asks to grounded high-impact fixes, derive chips from state, route to known intents/fallback. Avoid invented claims. Thread/context/requirements are per resume; duplicate for another role, but do not copy thread or decisions. Findings column and suggestions panel are removed; assistant is sole guidance surface. Requirement decisions survive rewording by durable identity; vanished open items close and new requirements open. User may always export; warn prominently and mark/count placeholders, never block PDF. Account language/tone/default market are validated Pydantic JSONB in existing users.preferences.",
"compliance": "Persist and surface all findings after targeted generation. ERROR blocks generation; warnings do not. Prompt for required-field errors (e.g. missing ME nationality); DE warnings alone do not block. GET recomputes without persisting; reads should not write. Pure Markdown invalidates fixed-field/section checks, so redesign around document understanding. Overview tables omit score; do not substitute compliance. Score/scorer/endpoints were retired; duplicate behavior must not revive score.",
"drift-skills": "Track profile/resume drift with profiles.version incremented on profile/entry/bullet writes and resumes.profile_version captured at generation; compare versions, not timestamps, because parent updated_at misses child edits. Keep normalized skills and profile_skills when shared vocabulary/analytics matter; resolve aliases to canonical skills and reference skills by skill_id.",
"editing": "Continuous autosave writes content and creates no snapshot. Each idle-gap timeout creates exactly one revision; overlapping checkpoint triggers still create one revision while recording every fired trigger. Concurrency tokens hash client-editable state, not updated_at; derived feedback reads/writes must not invalidate an editor token. Reads should not write.",
"platform": "Auth: unauthenticated=401; nonexistent and cross-user=404, never 403. Scope ownership in queries; test unauthenticated and cross-user separately. Worker builds from repo root, copies api/ and worker/, exposes api/ on PYTHONPATH, includes AI dependencies; Railway uses root context plus explicit Dockerfile, and stale duplicated shared modules are removed. Use api/app/prompts/ as single prompt convention; move SYSTEM_PROMPT by behavior-preserving file load, retaining name/module/exact text. PostgreSQL JSONB columns use JSONB().with_variant(sqlite.JSON, 'sqlite'); leave SQLite suite/conftest unchanged and add dedicated PostgreSQL coverage. Use Playwright E2E against running stack for browser/cross-tier flows, axe accessibility, and API persistence checks."
}
}resume-builder · wiki
{
"Product model: profile and resume": {
"body": "Profiles are the career library: the union of experience used for targeting. Resumes are user-owned, directly editable, role-specific documents\u2014not generated-only snapshots. Keep resumes.profile_id NOT NULL and seed a profile from the first resume. Preserve provenance where applicable so edits can be promoted to the profile. AI proposes and assists; it never gates editing or export. Localization may adapt structure, length, formatting, and cultural expectations. One resume has one target/context/thread; duplicate it for another role. Copies inherit document and context, but not conversation or requirement decisions; siblings root at the original.",
"links": [
"Resume document and editing",
"Profile variant drift",
"Skills vocabulary",
"Compliance and export",
"Guided assistant"
]
},
"Resume document and editing": {
"body": "Target storage is resumes.content = {markdown: \"...\"}: pure free text, with no required headings, sections, fields, or rigid slots. This supersedes RB-12's shipped structured schema and the H2 compromise; keep shipped criteria as history, not target behavior. Use one Tiptap editor for the whole document. GenAI handles understanding, evaluation, formatting, and localization rather than a structural contract. Rendering has one source of truth: consume backend renderer HTML/CSS for the editing surface; structural edits change local content then refresh rendered output. Historical structured rows need conversion. Open work includes provenance/guards, keyword evidence, compliance rules, and RB-14 outline behavior. RB-10 remains authority on ATS safety; expand Markdown thoughtfully.",
"links": [
"Product model: profile and resume",
"Skills vocabulary",
"Compliance and export",
"Guidance and document marks",
"Engineering conventions and tests"
]
},
"Profile variant drift": {
"body": "Track whether a resume variant was generated from an older profile state with explicit counters. Increment profiles.version on writes to the profile, entries, or bullets; copy that value to resumes.profile_version at generation. Drift is inequality between current and recorded versions. Do not substitute updated_at: child edits may not touch the parent timestamp, and historical state cannot be reconstructed for backfill.",
"links": [
"Product model: profile and resume",
"Engineering conventions and tests"
]
},
"Skills vocabulary": {
"body": "Keep skills and profile_skills normalized where canonicalization or cross-user analysis is a committed capability. The shared vocabulary is intentional: skills.aliases resolves equivalent terms (e.g. K8s/Kubernetes), and resume_keywords.skill_id references skills. Normalize for concrete capability, not abstract purity. Free-text resumes leave keyword acceptance and evidence attribution open for a new definition; they do not invalidate the vocabulary decision.",
"links": [
"Product model: profile and resume",
"Resume document and editing",
"Guidance and document marks"
]
},
"Compliance and export": {
"body": "Only ERROR findings block generation; warnings do not. Store and surface every finding in resumes.compliance. Required-field errors are real constraints: missing nationality in the ME market should prompt the user to provide it. Free text invalidates current section-order and included-field checks; replacements remain open work, not permission to weaken hard requirements. Compliance GET recomputes without persisting; targeted generation is the persistence path. Score was retired (gauge, scorer, endpoints, API field, and resumes.score JSONB); do not reintroduce it or substitute a compliance overview column without a new decision. Overview tables omit score. Unfilled placeholders are clearly marked and warned/counted on export, but never block download: users can always export.",
"links": [
"Product model: profile and resume",
"Resume document and editing",
"Guidance and document marks",
"Guided assistant",
"Engineering conventions and tests"
]
},
"Guidance and document marks": {
"body": "Guidance is advisory and distinct from hard compliance. Items use exact text anchors {quote, occurrence}, a claim, proposed_change reusing the user's sentence, and a reason. Accept is an atomic scoped find/replace plus status update; stale, ambiguous, or unresolved anchors are never applied elsewhere and have no accept action. Resolve staleness on read/accept, not autosave. Dismissal is durable via hash(category + normalized quote). Producers include the keyword pipeline and accepted calibration findings; calibration itself remains transient/read-only. Gap findings may anchor a placement line or offer no accept action. The queue is one decision/card at a time; no job target means empty queue. Document map: quiet dotted underlines per anchored line for open items; shared lines cycle on click. Clicking places the caret normally. Panel count gives total. This supersedes RB-18's active-item-only document marks, not its historical shipped criteria. Never stretch shipped criteria retroactively.",
"links": [
"Resume document and editing",
"Compliance and export",
"Guided assistant",
"Engineering conventions and tests"
]
},
"Guided assistant": {
"body": "C2/RB-21 replaces RB-20's unpublished findings UI outright\u2014no parity period\u2014while retaining its backend: stored job profile, OpenRouter calibration/refusals, exact-once grounding, adoption into the guidance queue, and tone guidance. The assistant is a guided workflow in a chat-like interface, not general chat or a wizard: lead with ranked concrete fixes; user steers. Never start blank. Typed input redirects toward target and goal, routed to known actions; narrow vague asks, clarify unclear targets, define fallback, end every turn in an action, and avoid unsupported claims. Disable input until a role exists; derive chips from current state. No competing findings or suggestions panel: proposal cards in the thread show diff, reason, Apply, Not now, Undo. Agenda, queue popover, and marks lead to proposals. Marks show open work; clicking marked text places caret and scopes composer to that line, never hijacking writing with a proposal. Preserve prior approval records. Re-extraction matches by category + requirement ID, preserving decisions on matches, closing removed requirements, and adding new open items. Two-tab rail: Assistant and Document; properties in Document tab, Auto adjust in formatting row.",
"links": [
"Product model: profile and resume",
"Guidance and document marks",
"Compliance and export",
"Resume document and editing"
]
},
"Authorization and resource privacy": {
"body": "Unauthenticated requests return 401. Cross-user and nonexistent resources are indistinguishable: return 404 across routes, with ownership scoped in the query so a foreign row is never loaded. Do not return 403 for cross-user resume access; consistent 404 behavior avoids confirming resource existence. Test unauthenticated and cross-user behavior separately.",
"links": [
"Engineering conventions and tests"
]
},
"Engineering conventions and tests": {
"body": "Use JSONB().with_variant(sqlite.JSON, 'sqlite') for JSONB columns. PostgreSQL production/migrations retain real JSONB; SQLite keeps",
"links": [
"Resume document and editing",
"Profile variant drift",
"Compliance and export",
"Guidance and document marks",
"Authorization and resource privacy"
]
}
}resume-builder · transfer
(from build-doen) ## Intent and priorities Doen is a durable shared spec for designers, engineers, and product owners: separate constraints from discretion, escalate genuine intent calls, and preserve choices, rejected options, and outcomes as precedent. Do not distill abstract engineering rules; the heuristic flywheel is being retired (docs/design-principles.md, 2026-10-02). ## Current frontier (ordered) 1. Capture human reasoning. All 25 recorded decisions were agent-raised; 9 initiatives yielded none. Product calls during shaping go undocumented. Capture precedes retrieval; the product precedent corpus is empty. 2. Ground generated artifacts. Specs cite nonexistent columns/tables/surfaces and learn records have claimed unrealized outcomes. Verification focuses on executors, not artifacts; designers may miss errors. 3. Improve precedent retrieval once a product corpus exists (prototype/harness baseline: 18% useful). Jev is not the verifier for this audience: it auto-approves test criteria 71% of the time and has no human_judgment category. Useful roles: drafting, groundedness, conflict detection, weighing precedent. ## Contextual decision signals (not universal rules) - Support human authorship during draft shaping when otherwise people have no way to contribute: executor drafts from brief, then people can add/edit spec items directly in app before building; after draft, changes go through executor proposals. Here this restores capability lost with removal of Advisor and complements starting initiatives from project page. Do not generalize to unrestricted post-draft editing. - Initiative creation may allow omitted title when owner wants description-only creation: use description’s first line as provisional readable title; executor may rename while drafting. Criteria require description/type/brief, allow omitted title, reject missing description or unknown project without writes. Keep artifacts consistent; flow-specific, not universal. - If a feature’s model should not exist in a lifecycle stage, prefer not rendering it over disabled/inactive controls. Learn module: hide in Draft/Building; render in Learn only; don’t infer Complete visibility without a separate decision. - For research_findings, prefer simple ownership absent clear benefit from locks/versioning: executor’s working document; humans annotate after investigation. MCP writes are last-write-wins and may overwrite human edits; document this. Prefer a dedicated explicit research-write tool when discoverability and stable contract benefit. - Hide importance recommendations only when a project has exactly one initiative (feature-specific; rationale unknown). - Memory machinery is not categorically forbidden pending a replay win: one decision authorized live executor memory as a bounded experiment because replay is record-limited and misses the decision conversation. Capture executor notes at the moment of choice; cap memory, randomize initiative holdouts with no memory, predeclare
Dream stages (recorded from runs after 2026-11-27)
build-doen · dream · dream at call 5
Product decision record (5 decisions) - Learn UI: hide the learn model entirely in Draft/Building; render it only in Learn. This is a stage-specific choice, not a general rule for all modules. - Research findings ownership: during investigation, the executor owns the working document. Use pure last-write-wins for later MCP writes, even if that overwrites human edits; clearly document this behavior. Humans annotate after investigation concludes. Locking/versioning was rejected as added complexity without clear benefit. - Research MCP write path: add a dedicated, discoverable `submit_research_findings(initiative_id, findings)` tool rather than extending `submit_evidence`; keep the existing tool contract stable. - Importance recommendation visibility: hide it only when the project has exactly one initiative. No rationale was recorded, so do not infer a broader principle. - Mathematically impossible live-corpus dispersion criterion: preserve the intended >20-distinct-score goal by testing the mechanism over realistic event-count combinations, and separately verify correctness of the live recompute. Accept that live dispersion depends on future data; do not weaken the intent or leave it unverified. These decisions support keeping implementation semantics simple where extra protection lacks clear benefit, and preserving existing contracts when adding research-specific functionality. Treat these as narrow signals, not universal product rules.
build-doen · dream · dream at call 10
Product decision record (signals are narrow; do not universalize): - Learn UI: hide the learn model entirely in Draft/Building; render it only in Learn. - Research findings: the executor owns the working document during investigation; later MCP writes are pure last-write-wins, including over human edits. Humans annotate after investigation. Locking/versioning was rejected as complexity. Use a dedicated, discoverable `submit_research_findings(initiative_id, findings)` and preserve `submit_evidence`'s contract. - Importance recommendation: hide only when there is exactly one initiative. No broader rationale recorded. - Live-corpus dispersion criterion: preserve the >20-distinct-score intent by testing the mechanism across realistic event-count combinations, and separately verify live recompute correctness. Accept that live dispersion depends on future data; do not weaken the criterion or leave it unverified. - 3072-dimension vector indexing: extend the migration to `halfvec` + HNSW rather than ship production retrieval without indexes. - Jev dedup regression: honor the confirmed benchmark acceptance bar; test plausible rubric fixes against the same cases before deciding whether to escalate. - Drift/BD-51: a report resolved via “Create initiative” may become `dismissed` without trace. Accept the narrow fidelity loss: BD-51 is meant to surface unaddressed drift; pending/approved reports still count, and low usage/repeat likelihood did not justify a schema field. - Heuristic corpus admission: remove the unmanageable human promotion queue. Jev may admit unclustered rules only when it judges them sound, well-scoped, and condition-bearing. Unclustered does not mean low-value; the invariant is quality judgment, with the human an override rather than gatekeeper. - Merge/generalization: Jev may confirm above a confidence threshold; borderline proposals queue for human judgment, and humans can override. Focus human attention on uncertainty when routine human gating stalls. Retirement remains human-gated: removing a rule feels less reversible, and a rejected sentinel is more trustworthy with a person behind it. Cross-decision signals: keep semantics/contracts simple when added protection has no clear benefit; distinguish fundamental limitations from fixable architecture gaps and confirmed regressions. Honor acceptance bars and test plausible fixes before escalation. For preserving signal fidelity, weigh its purpose and likely recurrence against schema/maintenance complexity. Automate routine work when human maintenance stalls, while retaining quality judgment, override, and human gates where irreversibility warrants them.
build-doen · dream · dream at call 15
Decision patterns (contextual, not universal): - Prefer simple, low-maintenance semantics over added schema, locks, queues, or workflow gates when their marginal value is small. Accept narrow fidelity loss when the affected cases are rare/low-impact and pending/approved cases still retain the important signal. Keep existing tool contracts stable; use a dedicated, discoverable tool for a distinct operation. - Verify the intended mechanism when current production data cannot satisfy a metric for mathematical reasons: preserve the real threshold, test realistic input combinations, and separately establish correctness on live data. Do not weaken or leave the criterion unverified. Preserve production capabilities such as indexes rather than accepting temporary architectural regressions for convenience. - For measured quality regressions, honor the agreed benchmark bar; first test plausible, in-scope fixes against the same cases before deciding to ship, pause, or escalate. - Delegate corpus judgments to Jev where this removes a burdensome human gate: auto-admit only sound, scoped, condition-bearing rules; confirm merges/generalizations above a confidence threshold, with borderline cases open to human override. Keep retirement human-gated because it is less reversible. - A genuine merge gate should be deterministic and run in the default bench; live-model evals remain opt-in/deeper evidence. Amend criteria to name the actual gate rather than inventing nonexistent CI. Do not put paid, nondeterministic model calls into every default run. - Interpret acceptance criteria by intent, not literal immutability. Repairing stale fixtures/signatures or updating tests for a deliberately reversed contract is acceptable when it restores or strengthens the intended guard, not weakens it. Record broad fixture-only changes and deliberate assertion inversions explicitly. - Separate local evidence about code/predicate changes from deployment or live-impact evidence. Submit measurable pre-deploy evidence, mark deployment-dependent criteria needs_judgment, and leave them open for a real post-deploy observation. - Fix systemic causes rather than one-off symptoms when the fix preserves the initiative's core algorithm and intent. Here, judging all pending eligible proposals was preferred to backfilling only stranded examples. Likewise, repair a broken evaluation needed as a safety guard; do not leave it broken to satisfy wording that forbids test edits, and do not expand its scope into the default suite when it requires live paid calls.
build-doen · dream · dream at call 20
Decision patterns (contextual, not universal) - Prefer simple, low-maintenance semantics when added schema, locks, or gates have marginal value; accept narrow fidelity loss when key signals remain. Keep tool contracts stable and distinct operations discoverable (e.g. dedicated research write tool rather than changing evidence submission). - Preserve useful production capabilities such as indexes; avoid knowingly introducing an unindexed retrieval path when a viable indexed design exists. - Keep quality bars meaningful. When a controlled comparison shows a regression, test plausible in-scope fixes on the same cases before accepting or shipping it. Test mechanisms with realistic inputs when live data cannot yet exercise them; separately verify live-data correctness. - Interpret criteria by intent, not literal immutability. Repair stale fixtures/signatures and tests for deliberate contract reversals; disclose broad fixture changes and assertion inversions. Do not weaken assertions to make work pass. Fix broken evaluations that are needed safeguards, but keep live, paid, nondeterministic evaluations out of default deterministic gates. - Address systemic causes within the intended scope rather than applying one-off workarounds that leave the failure mechanism intact. Preserve the core algorithm and contract when changing operational reach or scheduling. - Use durable measurement channels (SQL plus RESEARCH_LOG.md); refresh stale baselines. Keep deployment- or future-execution-dependent outcomes open until actually observed; local predicate comparisons and unit tests do not substitute for production impact. - Delegate routine corpus judgments to Jev to remove burdensome human gates: confidently admit sound, scoped, condition-bearing standalone rules; confirm merges/generalizations above a threshold; queue borderline cases for human judgment and allow human override. Keep retirement human-gated. - Restore human agency when removing a role/tool otherwise leaves no way to act. People may shape spec items during Draft; after Draft, changes use executor proposals. Executors still draft from the brief. Keep lifecycle-specific UI intentional (the learn model is not rendered before Learn). - Align requirements and latitude with settled product choices. A new initiative needs a description and type, not a title; title is optional and its first description line can stand in until the executor names it. Keep description/type distinct from optional fields.
build-doen · promoted · dream at call 5
Doen is a spec framework for product engineers: durable intent, explicit constraint/discretion, escalation of real intent calls, and precedent—not abstract engineering rules. Prioritize capturing human reasoning and grounding generated artifacts in reality. Keep UI stage-appropriate; prefer simple, explicit data contracts. Open vision for product framing; priorities for roadmap; Jev for verifier role; lifecycle-ui for stage visibility; writes for MCP/data semantics; importance for its visibility rule; verification for sparse-corpus criteria. ## vision Doen serves product engineers (designers, software engineers, product owners) through one durable intent artifact, a constraint/discretion split, escalation of genuine intent calls, and precedent. It is not a framework of abstract engineering rules. Retire the heuristic flywheel: 228 rules produced only 5 useful ones, and its metric was circular (see docs/design-principles.md). ## priorities Top priorities: (1) Capture human reasoning—25 recorded decisions were agent-raised, while 9 initiatives yielded none, leaving product precedent empty. (2) Ground generated specs and learn records in reality, not only executor reports. (3) Improve precedent retrieval once a product corpus exists; current useful baseline is 18%. ## jev Jev is not the verifier for this product-engineer audience: it auto-approves criteria 71% of the time and intentionally excludes human judgment. Its value is drafting, grounding, conflict detection, and weighing precedent. ## lifecycle-ui Render features only in lifecycle stages where their model applies; avoid irrelevant disabled controls. The Learn module is truly hidden/not rendered in Draft and Building, shown in Learn, and read-only in Complete. ## writes For research_findings, the executor owns the working document: MCP writes use pure last-write-wins and may overwrite human edits; document this clearly. Humans annotate after investigation. Avoid locks/versioning without clear benefit. Prefer a dedicated explicit MCP tool for a distinct write path when it preserves existing contracts and improves discoverability (submit_research_findings rather than changing submit_evidence). ## importance Show the importance recommendation except when the project has exactly one initiative. Choose this simple count rule over BD-46's completed-after-creation-date condition or a hybrid. ## verification When a criterion is mathematically impossible on a sparse/current corpus, verify the mechanism with realistic input sweeps plus correctness evidence for the live recompute; accept that the intended live effect may require future events. Example: six raw event-count combinations cannot yield >6 distinct scores regardless of weights; verify >20 distinct scores via a property test sweeping realistic survived/removed/citation counts, and confirm live recompute correctness.
build-doen · promoted · dream at call 10
Doen serves product engineers with durable intent, explicit constraint/discretion, escalation of real intent calls, and precedent—not abstract engineering rules. Prioritize human reasoning capture and grounding generated artifacts in reality; protect production retrieval integrity and surface material architectural consequences. For fixable regressions within discretion, iterate and remeasure. Keep UI stage-appropriate and data contracts simple. Open vision for product framing; priorities for roadmap; jev for verifier role; lifecycle-ui/writes/importance for product behavior; verification for sparse-corpus tests; retrieval for migration integrity; heuristic-governance for corpus automation. ## vision Doen serves product engineers (designers, software engineers, product owners) through one durable intent artifact, explicit constraint/discretion boundaries, escalation of genuine intent calls, and precedent. It is not a framework for abstract engineering rules. Retired heuristic flywheel: 228 rules yielded only 5 useful ones and its success metric was circular (docs/design-principles.md). ## priorities Product frontier, in order: (1) Capture human reasoning during shaping: all 25 recorded decisions were agent-raised; 9 initiatives yielded none, leaving product precedent empty. (2) Ground specs and generated artifacts/learn records in real data and surfaces, not just executor reports. (3) Improve precedent retrieval once product precedent exists; prototype baseline was 18% useful. ## jev Jev is not a verifier for this product-engineer audience: it auto-approves criteria often (71% in the observed evaluation) and intentionally excludes human judgment. Its value is drafting, grounding, conflict detection, and weighing precedent—not replacing product judgment. ## lifecycle-ui Render features only where their model applies; avoid irrelevant disabled controls. Learn is absent in Draft and Building, visible in Learn, and read-only in Complete. ## writes research_findings is the executor's working document: MCP writes are pure last-write-wins and can overwrite human edits; document this clearly. Humans annotate after investigation. Avoid locks/versioning absent clear benefit. For a distinct write path, prefer an explicit dedicated MCP tool (submit_research_findings) when it preserves existing contracts and improves discoverability; do not alter submit_evidence unnecessarily. ## importance Show the importance recommendation except when the project has exactly one initiative. Prefer this simple count rule over completed-after-creation-date logic or a hybrid. ## verification If a criterion is mathematically impossible on a sparse/current corpus, verify the mechanism with realistic input sweeps plus correctness evidence for live recompute; accept that intended live effects may require future events. Example: six raw event-count combinations cannot yield >6 distinct scores regardless of weights; property-test realistic survived/removed/citation counts for >20 distinct scores and verify live recompute correctness. ## retrieval Protect production retrieval integrity rather than defer architectural gaps when migration would degrade it. For the 1536→3072 embedding migration, extend the migration to halfvec + HNSW rather than accept an unindexed production retrieval path, even temporarily. Specified discretion does not automatically cover material architectural consequences; surface those decisions. ## heuristic-governance Automate admission of unclustered rules only when Jev judges them sound, well-scoped, standalone, and condition-bearing; confident yes admits, otherwise leave raw. Jev may confirm merge/generalisation proposals above a confidence threshold; borderline cases remain queued and humans can override. Retirement remains human-gated. This supersedes the prior human-gate invariant for admission and merges, not retirement. ## decision-signals For likely-fixable prompt/rubric regressions within granted discretion, iterate and remeasure on the same benchmark before holding/shipping (e.g. Jev dedup: revise rubric, rerun same 186 cases). Accept narrow fidelity loss rather than add schema when affected cases are limited: collapsing initiative_created into dismissed may lose the recurring-drift signal for that resolved slice; no extra field was warranted.
build-doen · promoted · dream at call 15
Doen serves product engineers through durable intent, explicit constraint/discretion boundaries, escalation of genuine intent calls, and precedent—not abstract rule distillation. Prioritize capturing human reasoning, grounding artifacts in reality, then improving retrieval. Protect production retrieval integrity; surface material architectural consequences. Within discretion, iterate and remeasure fixable regressions. Match evidence and gates to what they truly observe; preserve test purpose, not stale mechanics. Open vision/priorities for framing; jev for Jev’s role; product-behavior/writes for UX and data contracts; verification for tests/evidence/gates; retrieval for migrations; heuristic-governance for corpus automation; decision-signals for judgment patterns. ## vision Doen serves product engineers (designers, software engineers, product owners) through one durable intent artifact, explicit constraint/discretion boundaries, escalation of genuine intent calls, and precedent. It is not a framework for abstract engineering rules. Retired heuristic flywheel: 228 rules yielded only 5 useful ones and its success metric was circular (docs/design-principles.md). ## priorities Product frontier: (1) Capture human reasoning during shaping: all 25 recorded decisions were agent-raised; 9 initiatives yielded none, leaving precedent empty. (2) Ground specs and generated artifacts/learn records in real data and surfaces, not just executor reports. (3) Improve precedent retrieval once product precedent exists; prototype baseline was 18% useful. ## jev Jev helps draft, ground, detect conflicts, and weigh precedent; it does not replace product judgment or verify product intent. It auto-approves criteria often (71% in observed evaluation) and intentionally excludes human judgment. Use it as an assistive judge with safeguards; repair broken evaluation guards when needed, but keep live/paid/nondeterministic evals opt-in rather than making them routine merge gates. ## product-behavior Render features only where their model applies: Learn is absent in Draft/Building, visible in Learn, read-only in Complete. Show importance recommendation except when a project has exactly one initiative; prefer this count rule over date-based or hybrid logic. ## writes research_findings is the executor's working document: MCP writes are pure last-write-wins and can overwrite human edits; document this clearly. Humans annotate after investigation. Avoid locks/versioning absent clear benefit. For a distinct write path, prefer an explicit dedicated MCP tool (submit_research_findings) when it preserves existing contracts and improves discoverability; do not alter submit_evidence unnecessarily. ## verification Match evidence to what a criterion asks to observe. Local/simulated comparisons isolate code changes but do not prove production behavior. If deployment is out of scope and risk is unobservable, submit pre-deploy evidence, leave criterion open/needs_judgment, and append post-deploy measurement later; do not fail it, assume the outcome, or deploy unilaterally. If a metric is mathematically impossible on sparse data, test the mechanism with realistic input sweeps plus live-recompute correctness; future events may be needed for the live effect. Prefer deterministic, cheap merge gates and name the actual gate; cassette-replayed checks may gate, live/paid/nondeterministic evals stay opt-in. Repair broken test signatures/assertions to test their intended purpose; do not weaken checks. A contract reversal warrants updating tests that encode the old contract. ## retrieval Protect production retrieval integrity rather than defer architectural gaps when migration would degrade it. For the 1536→3072 embedding migration, extend it to halfvec + HNSW rather than accept an unindexed production retrieval path, even temporarily. Specified discretion does not automatically cover material architectural consequences; surface those decisions. ## heuristic-governance Automate admission of unclustered rules only when Jev judges them sound, well-scoped, standalone, and condition-bearing; confident yes admits, otherwise leave raw. Jev may confirm merge/generalisation proposals above a confidence threshold; borderline cases remain queued and humans can override. Retirement remains human-gated. This supersedes the prior human-gate invariant for admission and merges, not retirement. ## decision-signals For likely-fixable prompt/rubric regressions within granted discretion, iterate and remeasure on the same benchmark before holding/shipping (e.g. Jev dedup: revise rubric, rerun same 186 cases). Interpret constraints by protected behavior, not overly literally: expanding which existing records a step evaluates can be in scope if order, core algorithm, and per-record decision rule remain unchanged. Accept narrow fidelity loss rather than schema when affected cases are limited and marginal (e.g. collapsing initiative_created into dismissed loses a resolved-slice drift signal; no field warranted).
build-doen · promoted · dream at call 20
Doen serves product engineers through durable intent, explicit constraint/discretion boundaries, escalation of genuine intent calls, and precedent—not abstract rule distillation. Prioritize capturing human reasoning and grounding claims in real project evidence; improve retrieval once precedent exists. Preserve production retrieval integrity and surface material architectural consequences. Within granted discretion, fix regressions and remeasure; preserve test purpose, not stale mechanics. Keep evidence and gates honest about what they observe. Open vision-priorities for framing; jev for role and evaluation; product-behavior-writes for UX/data contracts; verification for tests/evidence; retrieval for migrations; heuristic-governance for corpus automation; decision-signals for judgment patterns. ## vision-priorities Doen serves product engineers (designers, software engineers, product owners) through one durable intent artifact, explicit constraint/discretion boundaries, escalation of genuine intent calls, and precedent. It is not a framework for abstract engineering rules; heuristic flywheel retired 2026-10-02 (docs/design-principles.md). Priorities: capture human reasoning during shaping (all 25 recorded decisions were agent-raised; 9 initiatives yielded none); ground specs and claims in actual project surfaces/data and evidence; improve precedent retrieval once product precedent exists (prototype baseline 18% useful). ## jev Jev helps draft, ground, detect conflicts, and weigh precedent; it does not replace product judgment or verify behavior/human-judgment criteria. It auto-approves criteria often (71% observed), so safeguards matter. Repair broken evaluation guards when they block the intended assertion; don't weaken them. Keep live/paid/nondeterministic evals opt-in, not routine merge gates. On likely-fixable prompt/rubric regressions within granted discretion, iterate and remeasure on the same benchmark before deciding. ## product-behavior-writes Render features only where their model applies: Learn is hidden in Draft/Building, visible in Learn, read-only in Complete. Show importance recommendation except when project has exactly one initiative. research_findings is executor working document: MCP writes are pure last-write-wins and can overwrite human edits; document this clearly. Humans annotate after investigation. Avoid locks/versioning absent clear benefit. Prefer dedicated submit_research_findings tool if preserving submit_evidence contract and improving discoverability. In draft, people can add/edit spec items; after draft, changes go through executor proposals. New initiative needs description and type (Build default); title optional, first description line is stand-in until executor renames. Keep constraints, latitude, and criteria consistent with required/optional decisions. ## verification Match evidence to what criterion asks to observe. Local/simulated comparisons isolate code but do not prove production behavior. If deployment is out of scope and risk unobservable, submit available pre-deploy evidence, leave criterion open/needs_judgment, append post-deploy measure later; do not fail it, assume outcome, or deploy unilaterally. Use actual evidence channels (SQL + RESEARCH_LOG.md), not imagined dashboards; refresh stale baselines. Instrumentation/arithmetic tests do not prove real-world impact. For mathematically impossible sparse-data outcomes, test mechanism with realistic sweeps plus live-recompute correctness; future events may be needed for live effect. Prefer deterministic, cheap merge gates and name actual gate; cassette-replayed checks may gate, live/paid/nondeterministic evals stay opt-in. Repair broken signatures/assertions to test intended purpose, not weaken checks; contract reversal warrants updating tests that encode old contract. ## retrieval Protect production retrieval integrity rather than defer architectural gaps when migration would degrade it. For 1536→3072 embedding migration, extend to halfvec + HNSW rather than accept unindexed production retrieval, even temporarily. Specified discretion does not automatically cover material architectural consequences; surface those decisions. ## heuristic-governance Automate admission of unclustered rules only when Jev judges sound, well-scoped, standalone, condition-bearing; confident yes admits, otherwise raw. Jev may confirm merge/generalisation proposals above confidence threshold; borderline cases queue and humans can override. Retirement remains human-gated. This supersedes prior human-gate invariant for admission/merges, not retirement. ## decision-signals Interpret constraints by protected behavior, not over-literally: expanding which existing records a step evaluates can be in scope if order, core algorithm, and per-record decision rule remain unchanged. For likely-fixable regressions within granted discretion, iterate and remeasure same benchmark. Accept narrow fidelity loss rather than schema when affected cases are limited and marginal (e.g. initiative_created folded into dismissed loses a resolved-slice drift signal; no field warranted). Preserve test purpose over stale wording: in-scope contract reversal may require assertion updates; a broken eval signature should be repaired, not left dead. Criterion language should track real evidence channels and actual gates.
build-doen · wiki · dream at call 5
## Doen product philosophy Doen is a spec framework for product engineers—designers, software engineers, and product owners. Its core product artifact should preserve durable human intent, distinguish hard constraints from areas of discretion, identify when genuine intent questions need escalation, and guide work from precedent. Capture human reasoning first: recorded decisions so far were agent-raised, so they do not yet constitute a product-intent precedent corpus. Jev can help draft, ground claims, detect conflicts, and weigh precedent, but it is not an authority that verifies product intent. See [[Groundedness and precedent]] and [[Heuristics and evidence]]. ## Groundedness and precedent Prioritize whether generated artifacts and claims are grounded before building retrieval over precedent. Retrieval becomes useful when there are actual product-intent decisions to retrieve; agent-raised decisions alone do not establish that corpus. Jev is useful for drafting, groundedness, conflict detection, and weighing precedent, but should not be treated as a product-intent verifier. The durable spec should retain human reasoning and escalate genuine intent calls. See [[Doen product philosophy]]. ## Heuristics and evidence Retire the heuristic flywheel: 228 rules produced only five usable ones (docs/design-principles.md, “Retiring the heuristic flywheel”). Do not assume that accumulating heuristics automatically creates useful product guidance; favor grounded evidence and validated claims. When a metric's live data is too sparse to exhibit the requested behavior mathematically, test the mechanism over realistic input ranges, and separately verify correctness on live data. Accept that the live outcome may emerge only as new events accumulate. See [[Groundedness and precedent]] and [[Sparse-data verification]]. ## Stable, discoverable tool contracts Preserve existing API/tool contracts where possible. Prefer a dedicated, purpose-specific tool when it makes an operation clearer and more discoverable, rather than adding unrelated optional behavior to an existing tool. Avoid locking or versioning semantics unless there is a clear benefit; explicit, simple overwrite behavior can be preferable when it matches the field's role. For research findings, `submit_research_findings(initiative_id, findings)` uses pure last-write-wins, even after human edits; document plainly that a later executor write can overwrite those edits. See [[Simple product rules]]. ## Simple product rules Prefer explicit, simple conditions over added freshness, hybrid, or inferred rules when no rationale supports the added complexity. Examples: hide the importance recommendation only when the project has exactly one initiative; render Learn only in the Learn stage (not Draft or Building), and make it read-only in Complete. For research findings, retain a dedicated write path and clearly documented last-write-wins semantics rather than adding locks or merge/version tracking without a demonstrated need. See [[Stable, discoverable tool contracts]]. ## Sparse-data verification A live corpus may be mathematically incapable of demonstrating a desired metric while it has too few distinct input combinations. Do not claim the mechanism failed or wait indefinitely for organic data if the criterion concerns whether the mechanism can work. Exercise the formula across realistic event-count ranges (for example, a property/sweep test that establishes the requested score dispersion), then independently verify that the live recompute is correct. State that the live metric will emerge as future events accumulate. This was chosen for the score-dispersion criterion with only six raw combinations in the live corpus. See [[Heuristics and evidence]].
build-doen · wiki · dream at call 10
## Doen product philosophy Doen is a spec framework for product engineers—designers, software engineers, and product owners—not a system for distilling abstract engineering rules. Its durable artifact should preserve human intent, distinguish hard constraints from discretion, escalate genuine intent questions, and guide work from precedent. Prioritize capturing human reasoning, then grounding specs and generated artifacts in reality; improve precedent retrieval once a product-intent corpus exists. Agent-raised decisions do not by themselves constitute that corpus. Jev can draft, ground claims, detect conflicts, and weigh precedent, but is not an authority on product judgment. See [[Groundedness and precedent]] and [[Quality, discretion, and complexity]]. ## Groundedness and precedent Ground claims and generated artifacts before investing in retrieval. Retrieval becomes useful when there are actual product-intent decisions to retrieve; an agent-raised decision history is not a substitute for human reasoning. Jev can assist with drafting, grounding, conflict detection, and weighing precedent, but should not be treated as a verifier of product intent. Keep human reasoning and escalation visible in the durable spec. See [[Doen product philosophy]] and [[Evidence and heuristic lifecycle]]. ## Evidence and heuristic lifecycle Do not assume accumulating heuristics creates useful product guidance: 228 rules produced only five usable ones, and the flywheel's success measure was circular. Favor grounded, scoped, condition-bearing guidance over raw rule volume. Remove the human promotion queue when it becomes a maintenance bottleneck: Jev may auto-admit an unclustered rule when confidently judged sound, well-scoped, and condition-bearing; otherwise leave it raw. A lack of cluster is not evidence of low value. Preserve both clustered and standalone paths. Jev may confirm merge and generalisation proposals above a confidence threshold; borderline proposals still go to a human, who can override. Keep retirement human-gated because removing guidance is consequential. See [[Groundedness and precedent]] and [[Verification under sparse data]]. ## Simple, discoverable contracts Prefer explicit, simple rules and stable contracts over hybrid or inferred behavior without a demonstrated benefit. Use a dedicated, purpose-specific tool when it makes an operation clearer and more discoverable, rather than adding unrelated optional behavior to an existing tool. For research findings, retain `submit_research_findings(initiative_id, findings)` as a dedicated path; use pure last-write-wins, including after human edits, and document plainly that a later executor write can overwrite them. Avoid locks or merge/version tracking without a clear need. Examples of simple visibility rules: hide the importance recommendation only when there is exactly one initiative; render Learn only in Learn, not Draft or Building, and make it read-only in Complete. See [[Quality, discretion, and complexity]]. ## Verification under sparse data A live corpus may be mathematically incapable of showing a requested metric when it has too few distinct input combinations. If the criterion tests whether a mechanism can work, exercise its formula over realistic input ranges (for example, a property/sweep test showing the requested score dispersion), then independently verify the live recompute's correctness. Do not call the mechanism failed or wait indefinitely for organic data; state that the live outcome may emerge as events accumulate. This approach was used when six live raw combinations could not produce the requested score dispersion. See [[Evidence and heuristic lifecycle]]. ## Quality, discretion, and complexity Prevent temporary regressions in core capabilities and resolve material quality gaps rather than silently deferring them. When a plausible, fixable miss falls within explicit spec discretion, iterate and remeasure before escalating; a controlled benchmark regression justified prompt/rubric iteration rather than abandoning the change immediately. Preserve important system properties during implementation, not just the named mechanism: a production retrieval migration was extended to keep HNSW indexing instead of accepting an unindexed interval. Conversely, do not add schema/state to preserve marginal fidelity in narrow, low-volume cases; bounded information loss can be preferable to complexity when the signal's value is small. For example, a resolved drift report was allowed to stop contributing to a recurrence signal rather than adding a field to retain that distinction. See [[Doen product philosophy]] and [[Simple, discoverable contracts]].
build-doen · wiki · dream at call 15
## Doen product philosophy Doen is a shared product-spec framework for designers, software engineers, and product owners—not a system for distilling abstract engineering rules. Durable specs preserve human intent, distinguish hard constraints from discretion, surface genuine intent questions, and help work from precedent. Prioritize capturing human product reasoning, then grounding specs and generated artifacts; improve precedent retrieval once a real product-intent corpus exists. Jev can draft, ground claims, detect conflicts, and weigh precedent, but is not an authority or verifier of product judgment. Agent-raised decisions do not substitute for human reasoning. The historical record showed a major gap: 25 recorded decisions across nine initiatives, none human-originated; retrieval was only 18% useful. See [[Groundedness and evidence]], [[Evidence and heuristic lifecycle]], and [[Quality and implementation discretion]]. ## Groundedness and evidence Ground claims and generated artifacts against actual sources and observed facts; specs and learning records have previously asserted nonexistent or unverified facts. Match evidence to what a criterion is meant to establish. A local predicate comparison establishes predicate behavior, not a deployed production outcome. For production-observable criteria, submit available pre-deploy evidence, mark the criterion open/needs judgment, and append post-deploy measurement when deployment occurs. Do not assume the result, deploy unilaterally, or close on an inadequate proxy. Jev can assist with grounding and conflict detection but cannot verify product intent. Retrieval is valuable only when there are human product decisions to retrieve. See [[Doen product philosophy]], [[Verification and criterion intent]], and [[Production observations and deployment]]. ## Evidence and heuristic lifecycle Do not equate heuristic volume with useful product guidance: 228 rules yielded only five usable ones, and a circular flywheel metric proved misleading. Favor grounded, scoped, condition-bearing guidance over raw rule counts. A missing cluster does not imply a rule lacks value: Jev may auto-admit an unclustered rule when confidently judged sound, well-scoped, and condition-bearing; otherwise leave it raw. Preserve clustered and standalone paths. Jev may confirm merge and generalization proposals above a confidence threshold; borderline cases go to a human, who can override. Keep retirement human-gated because removing guidance is consequential. Revisit all pending judgeable proposals during the verdict step, not merely proposals created in the current pass: a pending item otherwise can become stranded. Fix recurrence without changing unrelated clustering rules, step order, or the decision rule. See [[Doen product philosophy]] and [[Verification and criterion intent]]. ## Simple, discoverable contracts Prefer explicit, stable contracts over hybrid or inferred behavior without demonstrated benefit. Use a dedicated purpose-specific tool when it makes an operation clearer and more discoverable. Research findings use `submit_research_findings(initiative_id, findings)` rather than an optional extension to an unrelated evidence tool; writes are pure last-write-wins, even after human edits, and this overwrite behavior must be documented. Avoid locks or version tracking absent a clear need. Keep UI visibility rules literal and easy to explain: render Learn only in Learn (read-only in Complete, absent in Draft/Building); hide importance recommendation only when there is exactly one initiative. See [[Quality and implementation discretion]]. ## Quality and implementation discretion Prevent temporary regressions in core capabilities and address material quality gaps rather than silently deferring them. When a plausible, fixable miss is within explicit spec discretion, iterate and remeasure before escalating; a controlled benchmark regression justified prompt/rubric iteration, not immediate abandonment. Preserve important system properties during implementation, not just the named mechanism: a retrieval-dimension migration was extended to retain HNSW indexing rather than accept an unindexed production interval. Conversely, avoid schema/state for marginal fidelity in narrow, low-volume cases; bounded information loss can be preferable to complexity. A resolved drift report was allowed to stop contributing to recurrence rather than adding a field to preserve that distinction. See [[Simple, discoverable contracts]], [[Verification and criterion intent]], and [[Doen product philosophy]]. ## Verification and criterion intent Verify the purpose of a criterion, not broken literal wording. Repairing a stale test signature so its intended guard actually runs is not weakening the test; explain the deviation and confirm the guard passes. When a spec reverses a contract, update tests that encode the old contract; distinguish necessary assertion changes from weakening checks. Evidence must establish the claim: if sparse live inputs cannot produce a requested metric (for example, only six distinct input combinations), test the mechanism over realistic ranges, then independently verify live recompute correctness and state that the live outcome may emerge as events accumulate. Do not wait indefinitely for organic data or declare failure when the mechanism is mathematically untestable on the current corpus. See [[Groundedness and evidence]], [[Evidence and heuristic lifecycle]], and [[Production observations and deployment]]. ## Production observations and deployment Separate implementation evidence from production outcomes. A local old-versus-new predicate comparison can isolate code behavior but cannot stand in for the post-deployment observation a criterion explicitly requests. Submit a measured pre-deploy baseline, leave the criterion open/needs judgment, and append the post-deploy snapshot after an authorized deployment. Do not close by assuming the effect or deploy outside scope. This protects against treating expected benefits or costs as observed facts. See [[Groundedness and evidence]] and [[Verification and criterion intent]]. ## Deterministic gates and live evaluations Keep default
build-doen · wiki · dream at call 20
## Doen product philosophy Doen is a shared product-spec framework for designers, software engineers, and product owners, not a machine for distilling abstract engineering rules. Durable specs preserve human intent, distinguish constraints from discretion, surface genuine judgment calls, and make precedent useful. Prioritize capturing human product reasoning: the product-precedent corpus is currently empty, and historical decisions were agent-originated. Improve groundedness before retrieval; retrieval is useful only when there is human product reasoning to retrieve. Jev can draft, ground, detect conflicts, and weigh precedent, but cannot verify behavior or substitute for human product judgment. Product owners value shaping a spec directly before building. See [[Grounded claims and open outcomes]], [[Spec creation and editing]], and [[Heuristic guidance lifecycle]]. ## Grounded claims and open outcomes Ground claims and artifacts in actual product surfaces, sources, and observed facts; do not invent infrastructure or treat an expected effect as measured. The established measurement path is SQL plus RESEARCH_LOG.md, not an assumed metric store/dashboard. Re-measure baselines when work executes rather than reusing stale numbers. Match evidence to what a criterion is meant to establish: a mechanism/property test can establish behavior across realistic inputs, while a live recompute separately establishes correctness on current data. Sparse inputs may make a desired live outcome mathematically impossible today; test the mechanism and state that the outcome may emerge as events accumulate. For outcomes dependent on deployment or future behavior, record a measured before-value and leave the criterion open/needs_judgment until an authorized deployment or real executor pass supplies the after-value. Append that observation; do not assume it or close on a proxy. Jev can assist with grounding, not independently verify human judgment or production behavior. See [[Verification, tests, and gates]] and [[Quality and implementation discretion]]. ## Spec creation and editing A new initiative needs a description and a Build/Research choice (Build by default); title is optional, and the description’s first line can serve as a readable provisional title until the executor names it. Constraints, agent latitude, and acceptance criteria are optional. Keep product copy, constraints, and latitude aligned with the actual decision—do not label an optional title required. Save the person's brief separately from the initially empty spec; the brief is not editable afterward. Executors draft the spec from the brief, while people may add/edit spec items during Draft to shape it before building. After Draft, changes go through executor proposals. See [[Doen product philosophy]] and [[Simple, discoverable contracts]]. ## Heuristic guidance lifecycle Do not equate rule volume with useful guidance: 228 rules yielded only five usable ones, and a circular flywheel metric misled. Favor grounded, scoped, condition-bearing guidance over raw counts. A rule without a cluster may still be valuable: Jev may auto-admit it as standalone guidance when confidently judged sound, well-scoped, and condition-bearing; otherwise leave it raw. Preserve clustered and standalone paths. Jev may confirm merge and generalization proposals above a confidence threshold; send borderline cases to a human, who can override. Retirement remains human-gated because removing guidance is consequential. In the verdict step, revisit all pending judgeable proposals, not just those created in the current pass, or proposals can become stranded. Fix recurrence without changing unrelated clustering rules, step order, or decision rules. See [[Doen product philosophy]] and [[Verification, tests, and gates]]. ## Simple, discoverable contracts Prefer explicit, stable contracts over hybrid or inferred behavior without demonstrated benefit. Use a purpose-specific operation when it is clearer: research findings use submit_research_findings(initiative_id, findings), not an optional extension to an unrelated evidence tool. Writes are pure last-write-wins, including after human edits; document that overwrite behavior rather than adding locks or version tracking without a clear need. Keep UI visibility rules literal: render Learn only in Learn, read-only in Complete, absent in Draft/Building; hide importance recommendation only when there is exactly one initiative. See [[Spec creation and editing]] and [[Quality and implementation discretion]]. ## Quality and implementation discretion Address material quality gaps and prevent temporary regressions in core capabilities. When a plausible, fixable miss is within explicit spec discretion, iterate and remeasure before escalating; a controlled benchmark regression justified rubric/prompt iteration, not immediate abandonment. Preserve important system properties, not just the named mechanism: a vector-dimension migration was extended to retain HNSW indexing rather than leave production unindexed. Conversely, avoid schema/state for marginal fidelity in narrow, low-volume cases; bounded information loss can be preferable to complexity. A resolved drift report was allowed to stop contributing to recurrence rather than adding a field to preserve that distinction. See [[Grounded claims and open outcomes]], [[Verification, tests, and gates]], and [[Simple, discoverable contracts]]. ## Verification, tests, and gates Verify a criterion’s purpose, not broken literal wording. Repairing a stale test signature so its intended guard actually runs is not weakening it; explain the deviation and confirm the guard passes. When a spec reverses a contract, update tests that encode the old contract; necessary assertion inversions are not weakened checks. Keep deterministic checks in the default suite/bench so they can genuinely gate changes; live-model evaluations are paid, nondeterministic, and remain opt-in rather than becoming a merge gate. Amend criteria that
resume-builder · dream · dream at call 5
## Product model - Keep both profiles and resumes: profiles are the career library needed for targeting across all user content; resumes are directly editable documents. Preserve provenance (`source_entry_id` / `source_bullet_id`) and offer a path to promote resume edits back to the profile. - Keep `resumes.profile_id` NOT NULL; seed a profile from the user's first resume. - Track profile/resume drift with `profiles.version`, incremented on profile, entry, or bullet writes; copy it to `resumes.profile_version` at generation. Prefer versions over parent timestamps, which miss child edits. - Normalize skills when a shared vocabulary or cross-user analytics is specified. Here, keep `skills` and `profile_skills`: aliases resolve variants such as K8s/Kubernetes, and resume keywords reference canonical skills. JSONB may suit simpler data without those requirements. ## Editor revisions - Separate continuous autosave from idle-gap revisions: active typing autosaves content without creating snapshots; each idle-gap timeout is a distinct trigger that creates exactly one revision row. Do not suppress a timeout's snapshot just because another snapshot was recent. Follow explicit trigger wording rather than a generic “changed since last snapshot” rule. ## Database and tests - Use PostgreSQL JSONB in production and migrations. For SQLite compatibility, use `JSONB().with_variant(sqlite.JSON, 'sqlite')` on each relevant column; retain unified ORM metadata and existing SQLite tests. - Verify behavior that depends on PostgreSQL (such as CHECK constraints and in-place JSONB mutation) with a PostgreSQL-backed fixture; SQLite alone cannot establish those acceptance criteria.
resume-builder · dream · dream at call 10
## Product model - Profiles are the career library; resumes are directly editable documents. Preserve `source_entry_id` / `source_bullet_id` provenance and offer promotion of resume edits back to the profile. Keep `resumes.profile_id` NOT NULL; seed a profile from the first resume. - Track profile drift with `profiles.version`, incremented on profile/entry/bullet writes; copy it to `resumes.profile_version` at generation. Parent timestamps miss child edits. - Keep `skills` + `profile_skills` and canonical aliases when a shared vocabulary/cross-user analytics is committed (including skill FKs); JSONB remains reasonable for simpler, unshared data. ## Generation and compliance - Run `check_compliance()` before writing a generated resume. ERROR findings block generation; warnings do not. Persist all findings in `resumes.compliance` and surface them in the editor. Prompt for required missing fields; conventions are warnings. ## API security and ownership - Return 404 for nonexistent and cross-user resources; scope ownership in queries so foreign rows are never loaded. Unauthenticated requests are 401 and tested separately. Prefer consistent anti-enumeration behavior over conflicting 403 wording. ## Editor revisions - Continuous autosave does not create snapshots. Each checkpoint event creates one revision; overlapping simultaneous triggers coalesce into one row while recording all triggers. Every idle-gap timeout is its own event and creates a revision, even if a recent snapshot exists. ## Shared code and deployment - Targeted-resume worker: build from repo root, copy `api/` and `worker/`, set `PYTHONPATH` to include `api/`, include needed AI dependencies, reuse API JevClient/OpenRouter/ReviewAction/compliance code, and delete stale `worker/app/shared/`. Railway needs repo-root context and an explicit worker Dockerfile. Keep shared-package extraction separate (tracked in `docs/todo.md`). - Establish one prompt convention rather than parallel ones, even if that means behavior-preserving migration of shared code. Preserve public symbol names, module paths, and exact prompt text; verify dependent pipelines/tests remain unchanged. ## Database and tests - Use PostgreSQL JSONB in production and migrations. For SQLite, use `JSONB().with_variant(sqlite.JSON, 'sqlite')` on every relevant column to retain unified ORM metadata and existing SQLite compatibility. Test PostgreSQL-specific constraints and mutation behavior with a dedicated PostgreSQL fixture.
resume-builder · dream · dream at call 15
## Product model
- Profiles are the career library; resumes are directly editable documents with provenance and a promote/write-back path. Keep `resumes.profile_id` NOT NULL and seed a profile from the first resume.
- Track drift with `profiles.version`, incremented on profile/entry/bullet writes and copied to `resumes.profile_version` at generation; parent timestamps miss child edits.
- Keep normalized shared skills tables when a shared vocabulary/analytics are committed (aliases and `resume_keywords.skill_id` depend on them); simpler unshared data can be JSONB.
## Resume editing direction (latest decision supersedes earlier editor decisions)
- `resumes.content = {markdown: "..."}`: one freely editable Markdown document, with no required/recognized headings, resume fields, or section schema. Do not restore RB-12's structured slots or the H2-as-section compromise. Use GenAI/document understanding for downstream features needing interpretation; re-spec them rather than assuming structure.
- This supersedes RB-12's custom-node/field model and the earlier renderer-HTML semantic-node editing approach. Convert existing structured rows; JSONB avoiding DDL does not avoid data conversion. Renderer must render Markdown; RB-10 remains authority for ATS-safe Markdown. Revisit provenance, generation, keyword evidence, compliance, and outline features.
## Generation, access, concurrency
- Run `check_compliance()` before generation: errors block, warnings do not. Persist findings and show them; prompt for required missing fields. Re-spec field/order checks for free-text resumes.
- Return 404 for nonexistent and cross-user resources; scope ownership in queries so foreign rows are never loaded. Unauthenticated remains separately tested as 401. Prefer consistent anti-enumeration behavior over conflicting 403 wording.
- Read-only query parameters are acceptable for needed behavior without schema/migration changes.
- Concurrency tokens represent client-editable state, not incidental row activity: hash content, presentation, title, status, `template_key`, `region_code`; exclude `updated_at` and derived-value writes. Identical state may retain the same token. Don't make feedback reads non-mutating if that leaves derived values stale; returning fresh tokens from touching endpoints doesn't close races.
## Implementation and revisions
- For PostgreSQL JSONB with unchanged SQLite tests, use `JSONB().with_variant(sqlite.JSON, 'sqlite')`; test Postgres-only behavior (e.g. CHECK constraints/in-place mutation) against Postgres.
- When checkpoints overlap, write one revision and record all firing triggers. Continuous autosave creates no snapshot; each idle-gap timeout is its own revision event.
- For the worker's shared API code, the chosen smallest reversible fix is repo-root Docker context, API on `PYTHONPATH`, shared dependencies, and removal of the duplicate worker copy; Railway needs an explicit Dockerfile path.
- Prefer browser-realistic Playwright E2E for caret/selection and accessibility behavior; this was chosen over jsdom/manual-only tests.resume-builder · dream · dream at call 20
## Product and document model - Profiles are the career library; resumes are directly editable variants with provenance and promote/write-back. Keep `resumes.profile_id` NOT NULL and seed a profile from the first resume. Track drift with `profiles.version` bumped for profile/entry/bullet writes and copy to `resumes.profile_version` at generation; parent timestamps miss child edits. - Keep normalized `skills` + `profile_skills`: committed shared vocabulary/aliases and `resume_keywords.skill_id` justify normalization. - Resume content is a single freely editable Markdown document (`{markdown: "..."}`), with no required headings or structural fields. This supersedes the earlier rigid Tiptap schema/renderer assumptions: one Tiptap editor and custom schema for the whole resume, mechanically round-trippable with Markdown; downstream structure-dependent tasks must interpret free text. RB-10 owns ATS-safe formatting. Legacy structured content needs conversion. ## Guidance and editing - Guidance anchors are `{quote, occurrence}`; acceptance performs scoped find/replace atomically, stale quotes are dropped. Resolve staleness at read/accept, not every autosave; queue is derived. Dismissal key hashes category + normalized quote. - RB-9 producer is keyword pipeline only; no generic checks, GenAI, compliance findings, or quantified-impact advice. Keep compliance verdicts separate from advice. Accept applies the proposed edit; durable dismissal, atomic decisions, one-at-a-time card, and complete real items matter. No job target means empty queue; quiet empty state is correct. - Document map may mark all open items while panel still presents one decision at a time. Expose open queue/anchors; client selection can override document-position default. Mark each anchored line, not each suggestion; panel count gives suggestion total. Click selects/cycles items on that line and places caret normally. Decoration is layout-neutral and quieter than active-line emphasis, but visible enough to work as a map; assess card-switching while editing. ## Engineering and product defaults - Compliance errors block generation; warnings persist and display without blocking. Prompt for required missing fields. - Return 404 for nonexistent and cross-user resources; scope ownership in queries so foreign rows are never loaded. Unauthenticated is 401 and separately tested. Prefer consistent anti-enumeration behavior. - Concurrency tokens cover client-editable state (content, presentation, title, status, `template_key`, `region_code`), not `updated_at` or derived writes. Identical state may retain token; avoid read-triggered writes/token invalidation. - Preserve existing SQLite tests with JSONB variants; use dedicated PostgreSQL tests for PostgreSQL-only behavior. - Prefer smallest reversible integration over broad refactors: worker may build from repo root to share API code; shared-package extraction remains separate work. Keep prompt prose in one `app/prompts/` convention, moving shared prompt constants without behavioralresume-builder · dream · dream at call 25
## Product and document model - Profiles are the career library; resumes are editable variants with provenance and promote/write-back. Keep `resumes.profile_id` NOT NULL; seed a profile from the first resume. Track drift with `profiles.version` bumped on profile/entry/bullet writes and copied to `resumes.profile_version` at generation; parent timestamps miss child edits. Keep normalized `skills` + `profile_skills` for shared vocabulary/aliases. - Resume content is pure free-text Markdown (`{markdown: "..."}`), with no required headings or recognized structure; this supersedes RB-12’s structured schema. Keep one editor for the whole document, not separate editors/fields. Convert legacy structured content; downstream structure-dependent tasks use GenAI. Renderer must render Markdown; RB-10 owns ATS-safe formatting. - Compliance errors block generation, warnings do not; store and surface all findings. Overview tables have no score column; do not restore the retired score. ## Guidance and assistant - Guidance anchors are `{quote, occurrence}`. Accept is scoped, atomic find/replace; stale quotes are dropped/conflict, never applied elsewhere. Resolve staleness at read/accept, not autosave; queue is derived. Dismissal key hashes category + normalized quote. Acceptance is the sole document-change path; adopt returned content/version client-side. - RB-9 began keyword-only; calibration findings may also be adopted into the same queue. Calibration responses themselves remain unstored. Actionable findings need an exact verbatim anchor and replacement; unanchored gaps have no action. Keep compliance verdicts separate from advice. - One-at-a-time decision card, but map all open items with quieter marks; selecting a mark activates its item. Marks are per anchored line; clicking may move the caret, and repeated clicks cycle items on that line. - Guided Assistant replaces RB-20’s findings column/panel outright; retain its backend, refusals, grounding/adopt path, and `app/prompts/tone.txt`. Context/thread/requirement decisions are per resume/role. Duplicating for another role copies document/context but resets thread and requirement decisions. Unfilled placeholders warn clearly but never block PDF export. ## Engineering and interaction preferences - Cross-user and nonexistent resources both return 404; unauthenticated remains 401. Version tokens represent editable state, not `updated_at` or derived writes. - Preserve existing SQLite tests with PostgreSQL JSONB `with_variant(sqlite.JSON, 'sqlite')`; use PostgreSQL tests for PostgreSQL-specific behavior. Build worker from repo root to share API code rather than maintain copies. Establish one prompt convention under `app/prompts/`. - Prefer renderer HTML as the editing surface for exact parity and caret stability; read-only render endpoint changes need no schema migration. Use Playwright/browser E2E for real contentEditable/caret/accessibility behavior. Overlapping revision triggers make one snapshot per checkpoint, retaining all fired trigger metadata. - Idle-gapresume-builder · dream · dream at call 30
## Product and data model - Profiles are career libraries; resumes are editable, role-targeted variants with provenance/write-back. Keep `resumes.profile_id` NOT NULL; seed a profile from the first resume. Track drift with `profiles.version` bumped on profile/entry/bullet writes and copied to `resumes.profile_version`; parent timestamps miss child edits. Keep normalized `skills` + `profile_skills` for shared vocabulary/aliases. - Resume content is free-text Markdown (`{markdown: "..."}`), with no required headings or recognized structure. Use one whole-document editor; convert legacy structured content and use GenAI for downstream structure-dependent tasks. Renderer renders Markdown; RB-10 owns ATS-safe formatting. - Compliance errors block generation; warnings do not. Store/surface findings. Overview tables have no score column. Unfilled placeholders warn but never block PDF export. - Account settings (language, tone, default market) are one Pydantic-validated JSONB `users.preferences` document, not profiles; per-resume values (e.g. `region_code`) override defaults. `profiles.languages` means spoken languages. Duplicating for another role copies document/context but resets thread and requirement decisions. ## Guided assistant - Center of gravity: guided, chat-like workflow, not general chat or fixed wizard; only guidance surface. Lead with ranked agenda; user steers. Never show empty thread awaiting prompt. Every turn ends in concrete action; route typed input to known target/goal, not free instruction. Disable composer until role exists. Narrow vague asks, request missing target, derive chips from state, define unmatched-intent fallback. Ground advice; avoid unsupported claims. - Proposals are thread cards (diff, reason, Apply, Not now, Undo), reachable from agenda, queue popover, or document marks. No duplicate suggestions panel. Preserve C2 mechanisms/backend, refusals, grounding/adopt path, and `app/prompts/tone.txt`; prompts use one `app/prompts/` convention (including moved, behavior-preserving `SYSTEM_PROMPT`). - Document marks locate open work. Clicking marked line places caret and scopes composer there; it does not auto-open suggestion. Use line-level chips, agenda, or queue popover to choose. Keep one-at-a-time decision card; quieter marks map open work, one per anchored line, with cycling when multiple items share a line. RB-18/19 panel criteria/tests remain historical records; rewrite their 29 browser tests for thread behavior, don't delete. - Guidance anchors `{quote, occurrence}`. Accept is scoped atomic find/replace; stale quotes are dropped/conflict, never applied elsewhere. Resolve staleness at read/accept, not autosave; queue is derived. Dismissal key hashes category + normalized quote. Calibration findings can produce guidance items; only queue acceptance changes the document. - On advert re-extraction, preserve decisions for requirements that remain, even if reworded (`item_key` hashes category + requirement ID, not wording). Close open items for removed requirements; add genuinelyresume-builder · promoted · dream at call 5
Users own and manage career history; AI assists on demand and must not block. Profiles are the career library; resumes are editable documents. Honor explicit constraints literally and minimize disruption to existing architecture/tests. Open `workflow` for product behavior and localization; `profile-resume` for data model and write-back; `drift-skills` for freshness and skill normalization; `jsonb-tests` for PostgreSQL/SQLite decisions; `editing-revisions` for autosave and snapshots. ## workflow Core workflow is user-driven and AI-supported: users own/manage professional history; AI is an on-demand reviewer, enhancer, and localizer, never a blocker. Manage application materials end-to-end. Localize resume structure, length, formatting, and cultural expectations by market. ## profile-resume Keep both concepts: profiles are the career source/library; resumes are editable documents and the editing surface. `resumes.profile_id` stays NOT NULL; seed a profile from the first resume. Preserve `source_entry_id`/`source_bullet_id` provenance and offer promotion of resume edits back to the profile. This supports targeting across the full career library while matching the resume-centered editing UI. ## drift-skills Track variant drift with `profiles.version`, incremented on profile/entry/bullet writes, and `resumes.profile_version` captured at generation; drift is version inequality, not timestamps (parent `updated_at` misses child edits). Keep normalized `skills` and `profile_skills` tables when shared vocabulary/analytics matter; resolve aliases to canonical skills and reference skills by `skill_id`. ## jsonb-tests For PostgreSQL-specific JSONB while retaining existing SQLite tests, use `JSONB().with_variant(sqlite.JSON, 'sqlite')` on every column. Keep existing suite/conftest unchanged; add a dedicated PostgreSQL fixture for behavior SQLite cannot verify (e.g. CHECK constraints and in-place JSONB mutation). Avoid separate ORM metadata that breaks cross-model FKs and avoid moving the whole suite to Postgres. ## editing-revisions Separate continuous autosave from idle-gap timeout: autosave writes content and creates no snapshot. Each idle-gap timeout is a distinct trigger that always creates exactly one revision snapshot, per the revision rule.
resume-builder · promoted · dream at call 10
Users own career history; AI assists on demand and never blocks. Profiles are the career library; resumes are editable documents. Prefer literal constraints and the smallest reversible change; establish one durable convention rather than competing patterns. Preserve existing public behavior/tests unless a confirmed constraint requires change. Open `workflow` for product/localization and compliance; `profile-resume` for data/write-back; `drift-skills` for freshness/normalization; `jsonb-tests` for DB strategy; `editing-revisions` for checkpoints; `security-architecture` for auth, worker sharing, and prompts. ## workflow User-driven, AI-supported workflow: users own/manage professional history; AI is on-demand reviewer, enhancer, and localizer, never a blocker. Manage application materials end-to-end. Localize resume structure, length, formatting, and cultural expectations by market. Run check_compliance() before writing: ERROR findings block generation; warnings do not. Persist and surface every finding. Prompt for required-field errors (e.g. missing ME nationality); DE warnings alone do not block. ## profile-resume Keep both concepts: profiles are career source/library; resumes are editable documents and editing surface. `resumes.profile_id` stays NOT NULL; seed a profile from the first resume. Preserve `source_entry_id`/`source_bullet_id` provenance and offer promotion of resume edits back to profile. This supports targeting across the full career library and resume-centered UI. ## drift-skills Track variant drift via `profiles.version`, incremented on profile/entry/bullet writes, and `resumes.profile_version` captured at generation; drift is version inequality, not timestamps (parent `updated_at` misses child edits). Keep normalized `skills` and `profile_skills` tables when shared vocabulary/analytics matter; resolve aliases to canonical skills and reference skills by `skill_id`. ## jsonb-tests For PostgreSQL JSONB while retaining existing SQLite tests, use `JSONB().with_variant(sqlite.JSON, 'sqlite')` on every column. Keep existing suite/conftest unchanged; add a dedicated PostgreSQL fixture for behavior SQLite cannot verify (e.g. CHECK constraints and in-place JSONB mutation). Avoid separate ORM metadata that breaks cross-model FKs and avoid moving the whole suite to Postgres. ## editing-revisions Continuous autosave writes content and creates no snapshot. Each idle-gap timeout is a distinct trigger that always creates exactly one revision snapshot. If checkpoint triggers overlap, write one revision, while recording every fired trigger for auditability; do not create duplicate rows. ## security-architecture Authorization: unauthenticated requests return 401; nonexistent and cross-user resources return 404 (never 403). Scope ownership in queries so foreign rows are never loaded. Test unauthenticated and cross-user cases separately. Prefer smallest reversible change meeting confirmed constraints; avoid repo-wide refactors bundled into features, but establish one durable convention rather than competing ones—even with behavior-preserving shared-module edits. Keep public names/text and behavior stable; unchanged tests verify this. Worker/API sharing: build worker from repo root, COPY `api/` and `worker/`, expose `api/` on PYTHONPATH, include required AI dependencies; configure Railway worker with repo-root context and explicit Dockerfile, remove stale duplicated shared modules. Prompt convention: establish `api/app/prompts/` as the single convention and move SYSTEM_PROMPT there as a behavior-preserving file load, retaining its name/module/exact text.
resume-builder · promoted · dream at call 15
Users own career history; AI assists on demand and never blocks. Resumes are pure freeform Markdown (`{markdown: ...}`); do not preserve RB-12's field/section schema or silently impose headings. Prefer literal constraints, smallest reversible change, and one durable convention; preserve public behavior/tests unless a confirmed decision supersedes it. Open `workflow` for user control/localization/compliance; `profile-resume` for career library and write-back; `freeform-editor` for Markdown direction and downstream redesign; `drift-skills` for freshness/normalization; `jsonb-tests` for DB strategy; `editing-revisions` for checkpoints/tokens/E2E; `security-architecture` for auth, worker sharing, prompts.
## workflow
Users own/manage professional history; AI is on-demand reviewer, enhancer, and localizer, never a blocker. Localize resume structure, length, formatting, and cultural expectations by market. Prior compliance decision: persist and surface every finding; ERROR blocks generation, warnings do not. Prompt users for required-field errors (e.g. missing ME nationality); DE warnings alone do not block. The later pure-Markdown decision invalidates fixed-field/section checks: redesign structure-dependent compliance around document understanding rather than quietly restoring a schema.
## profile-resume
Profiles are the career source/library; resumes are user-editable documents. Keep `resumes.profile_id` NOT NULL and seed a profile from the first resume. Preserve source provenance and offer promotion of resume edits back to the profile. This supports targeting across the full career library while keeping the resume the editing surface.
## freeform-editor
Latest decision: `resumes.content = {markdown: ...}` is a pure freeform Markdown document, with no required headings, recognized sections, or field schema. RB-12's rigid schema is shipped/verified, not a defect, but is superseded; convert existing structured rows via data migration (JSONB needs no DDL). Do not quietly retain contracts for sections, fields, outline/order, or per-bullet provenance. Renderer must render Markdown, not traverse `_article/_section/_entry`; expand supported Markdown deliberately, with RB-10 authoritative on ATS safety. Rework generation/provenance, compliance, keyword attribution, rendering, ordering, and outline around AI document understanding. Earlier preference for one ProseMirror editor was driven by stable positions, coherent undo, and cross-document edits; that rationale may remain useful, but its custom field/node schema does not.
## drift-skills
Track profile/resume drift using `profiles.version`, incremented on profile/entry/bullet writes, and `resumes.profile_version` captured at generation; compare versions, not timestamps (parent `updated_at` misses child edits). Keep normalized `skills` and `profile_skills` where shared vocabulary/analytics matter; resolve aliases to canonical skills and reference skills by `skill_id`.
## jsonb-tests
For PostgreSQL JSONB while retaining existing SQLite tests, use `JSONB().with_variant(sqlite.JSON, 'sqlite')` on every column. Keep existing suite/conftest unchanged; add dedicated PostgreSQL coverage for behavior SQLite cannot verify (e.g. CHECK constraints and in-place JSONB mutation). Avoid split ORM metadata that breaks cross-model FKs and avoid moving the whole suite to Postgres.
## editing-revisions
Continuous autosave writes content and creates no snapshot. Each idle-gap timeout is a distinct trigger and creates exactly one revision. If checkpoint triggers overlap, create one revision while recording every fired trigger. Concurrency tokens hash client-editable state, not `updated_at`: derived feedback reads/writes must not invalidate an editor's token.
## security-architecture
Authorization: unauthenticated requests return 401; nonexistent and cross-user resources return 404, never 403. Scope ownership in queries so foreign rows are never loaded; test unauthenticated and cross-user cases separately. Prefer the smallest reversible change, but establish one durable convention rather than competing patterns. Worker/API sharing: build worker from repo root, copy `api/` and `worker/`, expose `api/` on PYTHONPATH, include AI dependencies, configure Railway with root context and explicit Dockerfile, and remove stale duplicated shared modules. Prompts: establish `api/app/prompts/` as the single convention; move `SYSTEM_PROMPT` there via behavior-preserving file load, retaining its name/module/exact text.
## testing
For browser-critical behavior and cross-tier flows, prefer Playwright E2E against the running stack; use axe for accessibility and verify persistence via API. Keep server invariants in pytest; revision-row counts belong in pytest. This is a deliberate choice over jsdom/manual-only testing despite heavier CI.resume-builder · promoted · dream at call 20
User-owned career history; AI assists on demand. Prefer literal constraints, user approval, safe failure, and the smallest reversible change that establishes one durable convention. Verify shipped code/UI and current schema; specs can be stale. Resumes are pure freeform Markdown; downstream systems must understand documents, not restore a hidden schema. Open `workflow` for user control/localization; `profile-resume` for career library/write-back; `freeform-editor` for Markdown; `guidance-surface` for anchored suggestions; `compliance-overview` for verdicts and tables; `drift-skills` for freshness; `jsonb-tests` for DB strategy; `editing-revisions` for checkpoints/tokens; `security-architecture` for auth/workers/prompts; `testing` for E2E.
## workflow
Users own and manage career history; AI is an on-demand reviewer, enhancer, and localizer, never a general blocker. Localize resume structure, length, formatting, and cultural expectations to the target market. Prefer safe, transparent failure and changes grounded in current user content. Keep hard compliance verdicts distinct from advisory suggestions. Open `compliance-overview` for generation and overview-table rules.
## profile-resume
Profiles are the career source/library; resumes are directly editable documents. Keep `resumes.profile_id` NOT NULL and seed a profile from the first resume. Preserve source provenance and offer promotion of resume edits back to the profile. The library enables targeting across all career history while the resume remains the editing surface.
## freeform-editor
Current direction: `resumes.content = {markdown: ...}` is a pure freeform Markdown document: no required headings, recognized sections, fields, or section schema. RB-12's rigid schema was shipped and verified, then superseded; migrate existing structured rows. JSONB needs no DDL, but data conversion is required. Render Markdown rather than traversing `_article/_section/_entry`; redesign generation, compliance, keyword attribution, rendering, ordering, and outline around document understanding. RB-10 remains authoritative on ATS safety. Do not carry forward old custom field/node contracts as if still required.
## guidance-surface
Guidance anchors are `{quote, occurrence}` exact-text references. Accept is an atomic scoped replacement; if stale or unmatched, drop rather than guess. Queue items are derived and validated on read/accept, not autosave. RB-9's producer is keywords only; compliance and other advice stay separate. Panel shows one card at a time, but document surface may map the open queue; client selection can override server-order default, and stale markers are suppressed independently. Mark each anchored line once with a quiet layout-neutral dotted underline, not once per item. Clicking selects/cycles suggestions on that line and places the caret normally; panel count gives outstanding total.
## compliance-overview
Persist and surface every compliance finding after targeted generation. ERROR blocks generation; warnings do not. Prompt for required-field errors (e.g. missing ME nationality); DE warnings alone do not block. GET recomputes findings without persisting, so reads do not write. Pure Markdown invalidates fixed-field/section checks: redesign around document understanding, not a covert schema. Overview tables omit score; do not substitute compliance. Score/scorer/endpoints were retired, and duplicate behavior must not revive score.
## drift-skills
Track profile/resume drift with `profiles.version`, incremented on profile/entry/bullet writes, and `resumes.profile_version` captured at generation; compare versions, not timestamps, since parent `updated_at` misses child edits. Keep normalized `skills` and `profile_skills` where shared vocabulary/analytics matter; resolve aliases to canonical skills and reference skills by `skill_id`.
## jsonb-tests
For PostgreSQL JSONB while retaining existing SQLite tests, use `JSONB().with_variant(sqlite.JSON, 'sqlite')` on every JSONB column. Leave existing suite/conftest unchanged; add dedicated PostgreSQL coverage for behavior SQLite cannot verify (e.g. CHECK constraints and in-place JSONB mutation). Avoid split ORM metadata and do not move the whole suite to Postgres.
## editing-revisions
Continuous autosave writes content and creates no snapshot. Each idle-gap timeout is a distinct trigger and creates exactly one revision. Overlapping checkpoint triggers still create one revision while recording every fired trigger. Concurrency tokens hash client-editable state, not `updated_at`; derived feedback reads/writes must not invalidate an editor's token. Reads should not write.
## security-architecture
Unauthenticated requests return 401; nonexistent and cross-user resources return 404, never 403. Scope ownership in queries so foreign rows are never loaded; test unauthenticated and cross-user cases separately. Worker/API sharing: build worker from repo root, copy `api/` and `worker/`, expose `api/` on PYTHONPATH, include AI dependencies, configure Railway with root context and explicit Dockerfile, and remove stale duplicated shared modules. Use `api/app/prompts/` as the single prompt convention; move `SYSTEM_PROMPT` there by behavior-preserving file load, retaining its name/module/exact text.
## testing
For browser-critical behavior and cross-tier flows, use Playwright E2E against the running stack; use axe for accessibility and verify persistence via API. Keep serverresume-builder · promoted · dream at call 25
User owns career history and documents; AI assists on demand. Prefer literal constraints, user approval, safe failure, and the smallest reversible change establishing one durable convention. Verify shipped code/UI and current schema; specs can be stale. Open `workflow` for product control; `freeform` for resume model; `guidance` for anchored edits; `assistant` for RB-20/RB-21; `compliance` for verdicts/overview; `drift-skills` for freshness and skills; `editing` for revisions/tokens; `platform` for auth, workers, prompts, DB tests, and E2E.
## workflow
Users own and manage career history; AI is an on-demand reviewer, enhancer, and localizer, never a general blocker. Localize resume structure, length, formatting, and cultural expectations to the target market. Profiles are the career library; resumes are directly editable documents with provenance/write-back promotion. Keep resumes.profile_id NOT NULL and seed a profile from the first resume.
## freeform
Current direction is resumes.content = {markdown: ...}, a pure freeform Markdown document: no required headings, recognized sections, fields, or covert schema. RB-12's rigid schema shipped and was verified, then superseded; convert existing rows. JSONB needs no DDL, but data conversion is required. Redesign generation, compliance, keyword attribution, rendering, ordering, and outline around document understanding. RB-10 remains authoritative on ATS safety.
## guidance
One atomic guidance queue is the sole mechanism for accepted document changes. Anchors are {quote, occurrence} exact-text references; stale/unmatched anchors are dropped or rejected (accept must never guess). Accept replaces scoped text and records acceptance atomically; refresh editor content/token after accept. Queue is derived and validated on read/accept, not autosave. Producers include keyword suggestions and calibration findings once adopted; calibration responses themselves remain unpersisted. UI shows one card at a time; document marks one quiet, layout-neutral dotted underline per anchored line. Clicking selects/cycles items on that line and places caret normally; panel count is outstanding-item count. Do not retain duplicate prose findings UI.
## assistant
RB-20 stays shipped/verified as backend foundation: per-resume job profile text, OpenRouter calibration, preflight refusals before model spend, exact-once anchor grounding, adopt-finding path, and prompt tone. RB-21 is the broader C2 guided assistant: durable thread and requirement states, skipped/dismissed decisions, context provenance, fact capture, placeholders, continuous evaluation. Context/thread are per resume, not role; duplicate for another role, but do not copy thread or requirement decisions. Assistant replaces the unpublished findings column/panel outright. Users may always export; warn prominently and mark/count unfilled placeholders, but never block PDF.
## compliance
Persist and surface all findings after targeted generation. ERROR blocks generation; warnings do not. Prompt for required-field errors (e.g. missing ME nationality); DE warnings alone do not block. GET recomputes without persisting; reads should not write. Pure Markdown invalidates fixed-field/section checks, so redesign around document understanding. Overview tables omit score; do not substitute compliance. Score/scorer/endpoints were retired; duplicate behavior must not revive score.
## drift-skills
Track profile/resume drift with profiles.version incremented on profile/entry/bullet writes and resumes.profile_version captured at generation; compare versions, not timestamps, because parent updated_at misses child edits. Keep normalized skills and profile_skills when shared vocabulary/analytics matter; resolve aliases to canonical skills and reference skills by skill_id.
## editing
Continuous autosave writes content and creates no snapshot. Each idle-gap timeout creates exactly one revision; overlapping checkpoint triggers still create one revision while recording every fired trigger. Concurrency tokens hash client-editable state, not updated_at; derived feedback reads/writes must not invalidate an editor token. Reads should not write.
## platform
Auth: unauthenticated=401; nonexistent and cross-user=404, never 403. Scope ownership in queries so foreign rows are never loaded; test unauthenticated and cross-user separately. Worker builds from repo root, copies api/ and worker/, exposes api/ on PYTHONPATH, includes AI dependencies; Railway uses root context plus explicit Dockerfile, and stale duplicated shared modules are removed. Use api/app/prompts/ as single prompt convention; move SYSTEM_PROMPT by behavior-preserving file load, retaining name/module/exact text. PostgreSQL JSONB columns use JSONB().with_variant(sqlite.JSON, 'sqlite'); leave SQLite suite/conftest unchanged and add dedicated PostgreSQL coverage. Use Playwright E2E against running stack for browser/cross-tier flows, axe accessibility, and API persistence checks.resume-builder · promoted · dream at call 30
User owns career history and documents; AI is on-demand, grounded, and never a blocker. Follow literal constraints, user approval, safe failure, and the smallest reversible change that establishes a durable convention. Verify shipped code/UI and current schema; specs may be stale. Open `workflow` for product control; `freeform` for document model; `guidance` for suggestions and editing; `assistant` for C2/RB-20/21; `compliance` for verdicts; `drift-skills` for freshness and skills; `editing` for revisions/tokens; `platform` for auth, workers, prompts, DB, E2E.
## workflow
Users own and manage career history; AI is an on-demand reviewer, enhancer, and localizer, never a general blocker. Localize structure, length, formatting, and cultural expectations to target market. Profiles are the career library; resumes are directly editable documents with provenance/write-back promotion. Keep resumes.profile_id NOT NULL and seed a profile from the first resume.
## freeform
Current model: resumes.content = {markdown: ...}, pure freeform Markdown with no required headings, fields, recognized sections, or covert schema. RB-12's rigid schema shipped and was verified, then superseded; convert existing rows. JSONB needs no DDL, but data conversion is required. Redesign generation, compliance, keyword attribution, rendering, ordering, and outline around document understanding. RB-10 remains authoritative on ATS safety.
## guidance
One atomic guidance queue is the sole mechanism for accepted document changes. Anchors are exact-text {quote, occurrence}; stale/unmatched anchors are dropped/rejected, never guessed. Accept replaces scoped text and records acceptance atomically; refresh content/token after accept. Queue is derived and validated on read/accept, not autosave. Producers include keyword suggestions and adopted calibration findings. Calibration responses themselves remain unpersisted. Assistant proposal cards own Apply/Not now/Undo; no duplicate suggestions panel. Marks are one quiet, layout-neutral dotted underline per anchored line; clicking places caret and scopes composer, not opening a proposal. Line chips/popover/conversation choose work; multiple items on a line can be cycled. Panel count is outstanding-item count.
## assistant
RB-20 remains shipped/verified backend foundation: per-resume job profile, OpenRouter calibration, preflight refusals, exact-once anchor grounding, adopt-finding path, prompt tone. RB-21 is C2 guided assistant, not free chat: lead with ranked agenda, user steers, each turn ends in concrete action; no blank thread or general resume Q&A. Composer enabled once role exists; clarify missing target, resolve vague asks to grounded high-impact fixes, derive chips from state, route to known intents/fallback. Avoid invented claims. Thread/context/requirements are per resume; duplicate for another role, but do not copy thread or decisions. Findings column and suggestions panel are removed; assistant is sole guidance surface. Requirement decisions survive rewording by durable identity; vanished open items close and new requirements open. User may always export; warn prominently and mark/count placeholders, never block PDF. Account language/tone/default market are validated Pydantic JSONB in existing users.preferences.
## compliance
Persist and surface all findings after targeted generation. ERROR blocks generation; warnings do not. Prompt for required-field errors (e.g. missing ME nationality); DE warnings alone do not block. GET recomputes without persisting; reads should not write. Pure Markdown invalidates fixed-field/section checks, so redesign around document understanding. Overview tables omit score; do not substitute compliance. Score/scorer/endpoints were retired; duplicate behavior must not revive score.
## drift-skills
Track profile/resume drift with profiles.version incremented on profile/entry/bullet writes and resumes.profile_version captured at generation; compare versions, not timestamps, because parent updated_at misses child edits. Keep normalized skills and profile_skills when shared vocabulary/analytics matter; resolve aliases to canonical skills and reference skills by skill_id.
## editing
Continuous autosave writes content and creates no snapshot. Each idle-gap timeout creates exactly one revision; overlapping checkpoint triggers still create one revision while recording every fired trigger. Concurrency tokens hash client-editable state, not updated_at; derived feedback reads/writes must not invalidate an editor token. Reads should not write.
## platform
Auth: unauthenticated=401; nonexistent and cross-user=404, never 403. Scope ownership in queries; test unauthenticated and cross-user separately. Worker builds from repo root, copies api/ and worker/, exposes api/ on PYTHONPATH, includes AI dependencies; Railway uses root context plus explicit Dockerfile, and stale duplicated shared modules are removed. Use api/app/prompts/ as single prompt convention; move SYSTEM_PROMPT by behavior-preserving file load, retaining name/module/exact text. PostgreSQL JSONB columns use JSONB().with_variant(sqlite.JSON, 'sqlite'); leave SQLite suite/conftest unchanged and add dedicated PostgreSQL coverage. Use Playwright E2E against running stack for browser/cross-tier flows, axe accessibility, and API persistence checks.resume-builder · wiki · dream at call 5
## Product model: profile and resume Treat the profile and resume as complementary product surfaces, not competing sources. The profile is the career library—the union of a user's experience used for targeting—while resumes are directly editable documents that match the reference UI. Keep `resumes.profile_id` NOT NULL and seed a profile from the first resume. Preserve `source_entry_id` / `source_bullet_id` provenance so users can promote resume edits back into the profile. More generally, keep the workflow user-driven: users own and manually manage professional history; AI is an on-demand reviewer, enhancer, and localizer, never a gate or blocker. ## Skills vocabulary Keep `skills` and `profile_skills` normalized rather than storing profile skills as a JSON array. A shared vocabulary is an intentional product capability: `skills.aliases` canonicalizes equivalent terms (such as K8s and Kubernetes), and `resume_keywords.skill_id` references the shared skill. Prefer normalization when a committed feature needs canonicalization or cross-user analysis, not merely for abstract purity. ## Profile variant drift Track whether a resume variant is based on an older profile state with explicit version counters. Increment `profiles.version` on writes to the profile, entries, or bullets; copy that value to `resumes.profile_version` when generating a resume. Drift is the inequality between the current profile version and the resume's recorded version. Do not substitute `updated_at`: child edits may not update the parent timestamp, and historical profile state cannot be reconstructed later for backfill. ## Database portability and fidelity Use PostgreSQL JSONB while preserving the existing SQLite test suite: declare each column as `JSONB().with_variant(sqlite.JSON, 'sqlite')`. This keeps PostgreSQL production/migration behavior faithful and allows existing SQLite tests to remain unchanged. Behaviors SQLite cannot validate (including the shares CHECK constraint and in-place JSONB mutation) need dedicated PostgreSQL-backed fixtures; do not treat SQLite success as proof of PostgreSQL-specific behavior. ## Revision snapshots Separate continuous autosave from revision creation. Autosave writes document content during active editing without making snapshots. Each idle-gap timeout is its own named trigger and always creates exactly one revision row, even when content matches the preceding snapshot. Keep this distinct from explicit revision actions; do not deduplicate idle-gap snapshots based on content equality.
resume-builder · wiki · dream at call 10
## Product model: profile and resume Treat profiles and resumes as complementary surfaces. The profile is the career library—the union of a user's experience for targeting—while resumes are directly editable documents matching the reference UI. Keep resumes.profile_id NOT NULL; seed a profile from the first resume. Preserve source_entry_id/source_bullet_id provenance so users can promote resume edits back into the profile. Users own and manually manage professional history. AI supports on demand as reviewer, enhancer, and localizer; it is never a gate or blocking generator. Localization may adapt structure, length, formatting, and cultural expectations for the target market. Related decisions: [[Skills vocabulary]], [[Profile variant drift]], [[Revision snapshots]], [[Compliance policy]]. ## Skills vocabulary Keep skills and profile_skills normalized rather than storing profile skills as a JSON array when committed features need canonicalization or cross-user analysis. The shared vocabulary is intentional: skills.aliases canonicalizes equivalent terms (e.g. K8s/Kubernetes), and resume_keywords.skill_id references the shared skill. Prefer normalization for a concrete product capability, not abstract purity alone. Related: [[Product model: profile and resume]]. ## Profile variant drift Track whether a resume variant is based on an older profile state with explicit counters. Increment profiles.version on writes to the profile, entries, or bullets; copy that value to resumes.profile_version when generating a resume. Drift is inequality between current and recorded versions. Do not substitute updated_at: child edits may not update the parent timestamp, and historical state cannot be reconstructed for backfill. Related: [[Product model: profile and resume]]. ## Database portability and fidelity Use PostgreSQL JSONB while preserving the SQLite test suite: declare each column as JSONB().with_variant(sqlite.JSON, 'sqlite'). PostgreSQL production/migrations retain real JSONB; SQLite keeps existing tests runnable. SQLite cannot validate PostgreSQL-specific behavior such as the shares CHECK constraint or in-place JSONB mutation. Add dedicated PostgreSQL-backed fixtures for those behaviors; SQLite success is not proof of PostgreSQL fidelity. ## Revision snapshots Separate continuous autosave from discrete revision checkpoints. Autosave writes content during active editing without making snapshots. Each idle-gap timeout, by itself, always creates exactly one revision row—even if content matches the preceding snapshot; do not deduplicate it by equality. If multiple checkpoint conditions coincide, create only one row for that checkpoint event, and record/flag every condition that fired for auditability. Keep explicit revision actions distinct from autosave and idle-gap triggers. ## Compliance policy Block generation only when compliance returns an ERROR finding. Warnings do not block. Store and surface every finding in resumes.compliance regardless of severity. Required-field errors are real constraints, not defects to bypass: for example, a missing nationality in the ME market should prompt the user to provide it. This keeps warnings actionable without generating documents that violate hard requirements. Related: [[Product model: profile and resume]]. ## Authorization and resource privacy Unauthenticated requests return 401. Cross-user and nonexistent resources are indistinguishable: return 404, never 403. Scope ownership in the query so foreign rows are never loaded; apply this consistently across routes, including sensitive resume data. Test unauthenticated and cross-user cases separately. When inherited specs conflict, treat them as suspect and prioritize consistent privacy and shipped project decisions over copied requirements. ## Worker shared code and deployment For targeted-resume worker work, favor the smallest reversible change: build from repo root, COPY api/ and worker/, add api/ to PYTHONPATH, and merge AI dependencies into worker requirements. Delete stale worker/app/shared duplication rather than fork shared behavior. Configure Railway's worker with repo-root build context and an explicit Dockerfile path. Defer shared-package extraction to its tracked infrastructure initiative; do not pull a repo-wide refactor into feature scope. ## Prompts and conventions Prefer one coherent convention over avoiding a behavior-preserving edit to shared code. Verify claims that a convention exists rather than trusting inherited specs. If a spec names a nonexistent convention (such as prompts/), treat it as a choice about what convention to establish. When creating a prompts directory, consolidate the existing inline prompt into it rather than leaving competing patterns; preserve names, exact prompt text, and behavior, and keep existing dependent tests passing.
resume-builder · wiki · dream at call 15
## Product model: profile and resume
Treat profiles and resumes as complementary surfaces. The profile is the career library—the union of a user's experience for targeting—while resumes are directly editable documents. Keep resumes.profile_id NOT NULL and seed a profile from the first resume. Preserve source_entry_id/source_bullet_id provenance where applicable so edits can be promoted back to the profile. Users own and manage professional history; AI is an on-demand reviewer, enhancer, and localizer, not a gate or blocking generator. Localization may adapt structure, length, formatting, and cultural expectations. The newer free-text resume direction changes the resume content model, not this product relationship.
## Resume document direction
Current target: one Tiptap editor for the entire resume, storing `resumes.content = {markdown: "..."}`. It is pure free text: no recognized section boundaries, fields, required headings, or rigid form slots. This supersedes RB-12's shipped structured schema and the intermediate H2-as-section compromise; those remain historical shipped behavior, not the target. GenAI should handle document understanding, evaluation, formatting, and localization rather than preserve a structural contract. Downstream changes are open implementation/spec work: convert existing structured JSONB rows; render Markdown instead of traversing sections/entries; redefine generation provenance and guards, keyword acceptance/evidence attribution, compliance checks, and RB-14 outline behavior. Expand Markdown support thoughtfully; RB-10 remains authority on ATS safety. Do not treat these open questions as settled behavior. The earlier custom structured ProseMirror schema and field-level constraints are superseded.
## Skills vocabulary
Keep `skills` and `profile_skills` normalized when committed features need canonicalization or cross-user analysis. A shared vocabulary is intentional: `skills.aliases` canonicalizes equivalent terms (such as K8s/Kubernetes), and `resume_keywords.skill_id` references the shared skill. Prefer normalization for a concrete product capability, not abstract purity alone. The future free-text model leaves keyword acceptance and evidence attribution needing a new definition; the normalized vocabulary decision itself remains valid.
## Profile variant drift
Track whether a resume variant is based on an older profile state with explicit counters. Increment `profiles.version` on writes to the profile, entries, or bullets; copy that value to `resumes.profile_version` when generating. Drift is inequality between current and recorded versions. Do not substitute `updated_at`: child edits may not update the parent timestamp, and historical state cannot be reconstructed for backfill.
## Database portability and fidelity
Use `JSONB().with_variant(sqlite.JSON, 'sqlite')` for JSONB columns. PostgreSQL production and migrations retain real JSONB; SQLite keeps the existing test suite runnable. SQLite cannot validate PostgreSQL-specific behavior, including the shares CHECK constraint and in-place JSONB mutation. Add dedicated PostgreSQL-backed fixtures for those behaviors; SQLite success is not proof of PostgreSQL fidelity.
## Revision snapshots
Separate continuous autosave from discrete revision checkpoints. Autosave writes content during active editing without making snapshots. Each idle-gap timeout always creates exactly one revision row, even if content matches the preceding snapshot. If checkpoint conditions coincide, create one row for that checkpoint event and record/flag every condition that fired. Keep explicit revision actions distinct from autosave and idle-gap triggers. Revision/database invariants belong in pytest.
## Compliance policy
Block generation only when compliance returns an ERROR finding; warnings do not block. Store and surface every finding in `resumes.compliance`, regardless of severity. Required-field errors are real constraints, not defects to bypass: for example, missing nationality in the ME market should prompt the user to provide it. The free-text model invalidates current section-order and included-field checks; their replacements are open spec work, not permission to silently weaken hard requirements.
## Authorization and resource privacy
Unauthenticated requests return 401. Cross-user and nonexistent resources are indistinguishable: return 404, never 403. Scope ownership in the query so foreign rows are never loaded; apply consistently across routes, including sensitive resume data. Test unauthenticated and cross-user cases separately. Where inherited specs conflict, treat them as suspect and prioritize consistent privacy and shipped project decisions over copied requirements.
## Worker shared code and deployment
For targeted-resume worker work, favor the smallest reversible change: build from repo root, COPY `api/` and `worker/`, add `api/` to `PYTHONPATH`, and merge AI dependencies into worker requirements. Delete stale `worker/app/shared/` duplication rather than fork shared behavior. Configure Railway's worker with repo-root build context and an explicit Dockerfile path. Defer shared-package extraction to its tracked infrastructure initiative; do not pull a repo-wide refactor into feature scope.
## Prompts and conventions
Prefer one coherent convention over avoiding a behavior-preserving edit to shared code. Verify claims that a convention exists rather than trusting inherited specs. If a spec names a nonexistent convention (such as `prompts/`), treat it as a choice about what convention to establish. When creating a prompts directory, consolidate existing inline prompts into it rather than leaving competing patterns; preserve names, exact prompt text, and behavior, and keep dependent tests passing.
## Editing and testing
Prefer Playwright against the running stack for browser behavior, especially contentEditable/caret interactions; assert persistence through the API. Keep revision counts and database invariants in pytest. Version tokens cover editable state (content, presentation, title, status, template_key, region_code), not `updated_at`; identical state may retain the same token. A derived-value write or panel read must not invalidate a writer. Earlier implementation decisions about rendering structured HTML into an editor and a custom structured node schema predate the pure-Markdown direction; reassess them against that targetresume-builder · wiki · dream at call 20
## Product model: profile and resume
Profiles are the career library: the union of a user's experience for targeting. Resumes are directly editable documents, not generated-only snapshots. Keep resumes.profile_id NOT NULL and seed a profile from the first resume. Preserve source_entry_id/source_bullet_id provenance where applicable so resume edits can be promoted to the profile. Users own and manage their history; AI is an on-demand reviewer, enhancer, and localizer, never a gate or blocking generator. Localization may adapt structure, length, formatting, and cultural expectations. The move to free-text resumes changes the document model, not this relationship.
## Resume document direction
Target: one Tiptap editor for the entire resume, stored as resumes.content = {markdown: "..."}. It is pure free text: no required headings, recognized section boundaries, fields, or rigid slots. This supersedes RB-12's shipped structured schema and the H2-as-section compromise; historical shipped behavior is not the target. GenAI should handle document understanding, evaluation, formatting, and localization rather than maintain a structural contract. Downstream work remains open: convert structured rows; render Markdown; redefine generation provenance/guards, keyword acceptance/evidence attribution, compliance checks, and RB-14 outline behavior. Do not treat replacements as settled. RB-10 remains authority on ATS safety; expand Markdown support thoughtfully.
## Skills vocabulary
Keep skills and profile_skills normalized when committed product capabilities require canonicalization or cross-user analysis. The shared vocabulary is intentional: skills.aliases resolves equivalent terms (e.g. K8s/Kubernetes), and resume_keywords.skill_id references skills. Normalize for a concrete capability, not abstract purity. The free-text resume model leaves keyword acceptance and evidence attribution open for a new definition; it does not invalidate the vocabulary decision.
## Profile variant drift
Track whether a resume variant was generated from an older profile state with explicit counters. Increment profiles.version on writes to the profile, entries, or bullets; copy that value to resumes.profile_version at generation. Drift is inequality between current and recorded versions. Do not substitute updated_at: child edits may not touch the parent timestamp, and historical state cannot be reconstructed for backfill.
## Database portability and fidelity
Use JSONB().with_variant(sqlite.JSON, 'sqlite') for JSONB columns. PostgreSQL production and migrations retain real JSONB; SQLite keeps the existing suite runnable. SQLite cannot validate PostgreSQL-specific behavior such as the shares CHECK constraint or in-place JSONB mutation. Use PostgreSQL-backed fixtures for those invariants; SQLite success is not proof of PostgreSQL fidelity.
## Revision snapshots
Separate continuous autosave from discrete revision checkpoints. Autosave persists active edits without snapshots. Each idle-gap timeout creates exactly one revision row, even if content matches the previous snapshot. Coincident checkpoint conditions produce one row, with every fired condition recorded/flagged. Explicit revision actions remain distinct from autosave and idle-gap triggers. Keep revision/database invariants in pytest.
## Compliance policy
Block generation only on ERROR findings; warnings do not block. Store and surface every finding in resumes.compliance. Required-field errors are real constraints, not defects to bypass: missing nationality in the ME market should prompt the user to provide it. Free text invalidates current section-order and included-field checks; replacement rules are open spec work, not permission to weaken hard requirements. Compliance GET recomputes without persisting; targeted generation is the persistence path. Score was retired (including gauge, scorer, endpoints, API field, and resumes.score JSONB); do not reintroduce it or substitute a compliance overview column without a new decision. Overview tables omit score.
## Guidance and document marks
Guidance is advisory and separate from hard compliance. RB-9's producer is keyword-pipeline-only: no deterministic checks, whole-document GenAI pass, or compliance findings. No job target means an empty queue. Each item uses an exact text anchor {quote, occurrence}, claim, proposed_change reusing the user's sentence with the keyword incorporated, and reason. Accept is atomic scoped find/replace; stale items are dropped. Resolve staleness on read/accept, not autosave. Dismissal is durable using hash(category + normalized quote). One suggestion card is considered at a time; score is not part of guidance. The newer document-mark initiative adds quiet, layout-neutral dotted underlines per anchored line for all open suggestions, not one mark per suggestion. Clicking selects/cycles suggestions on that line and places the caret normally; panel count communicates total. Marks stay quieter than the active line. RB-18's shipped active-item-only behavior remains historical; the new initiative supersedes it on the document surface only.
## Authorization and resource privacy
Unauthenticated requests return 401. Cross-user and nonexistent resources are indistinguishable: return 404, never 403. Scope ownership in the query so foreign rows are never loaded; apply consistently, including sensitive resume data. Test unauthenticated and cross-user cases separately. Where inherited specs conflict, treat them as suspect and prioritize consistent privacy and shipped decisions over copied requirements.
## Worker shared code and deployment
For targeted-resume worker work, favor the smallest reversible change: build from repo root, COPY api/ and worker/, add api/ to PYTHONPATH, and merge AI dependencies into worker requirements. Delete stale worker/app/shared/ duplication rather than fork shared behavior. Configure Railway's worker with repo-root build context and explicit Dockerfile path. Defer shared-package extraction to its tracked infrastructure initiative; avoid repo-wide refactors in feature scope.
## Prompts and conventions
Prefer one coherent convention over avoiding behavior-preserving edits to shared code. Verify that a claimed convention exists rather than trusting inherited specs. If a spec names a nonexistent convention (such asresume-builder · wiki · dream at call 25
## Product model: profile and resume
Profiles are the career library: the union of a user's experience for targeting. Resumes are directly editable, role-specific documents—not generated-only snapshots. Keep resumes.profile_id NOT NULL and seed a profile from the first resume. Preserve source provenance where applicable so users can promote resume edits to the profile. The user owns the history and final document; AI proposes, reviews, enhances, and localizes on demand, never gates editing or export. Users can always export. Localization may adapt structure, length, formatting, and cultural expectations. One resume has one target/context/thread; duplicate it to pursue another role.
## Resume document and editing
Target storage is resumes.content = {markdown: "..."}: pure free text, with no required headings, recognized sections, fields, or rigid slots. This supersedes RB-12's shipped structured schema and the H2-as-section compromise; retain shipped decisions as history, not target behavior. Use one Tiptap editor for the whole document. GenAI handles document understanding, evaluation, formatting, and localization rather than maintaining a structural contract. Rendering should have one source of truth; the chosen parity approach consumes the backend renderer's HTML and stylesheet for the editing surface, with structural edits changing local content then refreshing rendered output. Free text requires renderer support and conversion of historical structured rows. Open work includes provenance/guards, keyword evidence, compliance rules, and RB-14 outline behavior; do not assume replacements are settled. RB-10 remains authority on ATS safety; expand Markdown thoughtfully.
## Skills vocabulary
Keep skills and profile_skills normalized when committed product capabilities require canonicalization or cross-user analysis. The shared vocabulary is intentional: skills.aliases resolves equivalent terms (such as K8s/Kubernetes), and resume_keywords.skill_id references skills. Normalize for concrete capability, not abstract purity. Free-text resumes leave keyword acceptance and evidence attribution open for a new definition; they do not invalidate the vocabulary decision.
## Profile variant drift
Track whether a resume variant was generated from an older profile state with explicit counters. Increment profiles.version on writes to the profile, entries, or bullets; copy that value to resumes.profile_version at generation. Drift is inequality between current and recorded versions. Do not substitute updated_at: child edits may not touch the parent timestamp, and historical state cannot be reconstructed for backfill.
## Database portability and revision snapshots
Use JSONB().with_variant(sqlite.JSON, 'sqlite') for JSONB columns. PostgreSQL production/migrations retain real JSONB; SQLite keeps the existing suite runnable but cannot validate PostgreSQL-specific behavior (for example CHECK constraints or in-place JSONB mutation). Use PostgreSQL fixtures for those invariants. Autosave persists active edits without snapshots. Each idle-gap timeout creates exactly one revision row even if unchanged; simultaneous checkpoint conditions still create one row and retain every fired condition. Explicit revision actions are distinct. Keep revision/database invariants in pytest.
## Compliance and export
Only ERROR findings block generation; warnings do not. Store and surface every finding in resumes.compliance. Required-field errors are real constraints: missing nationality in the ME market should prompt the user to provide it. Free text invalidates current section-order and included-field checks; replacement rules remain open work, not permission to weaken hard requirements. Compliance GET recomputes without persisting; targeted generation is the persistence path. Score was retired (gauge, scorer, endpoints, API field, and resumes.score JSONB); do not reintroduce it or substitute a compliance overview column without a new decision. Overview tables omit score. Unfilled placeholders remain clearly marked and warned/counted on export, but never block download.
## Guidance and document marks
Guidance is advisory and separate from hard compliance. Items use exact text anchors {quote, occurrence}, a claim, proposed_change reusing the user's sentence, and a reason. Accept is an atomic scoped find/replace plus status update; stale, ambiguous, or unresolved anchors are never applied elsewhere and have no accept action. Resolve staleness on read/accept, not autosave. Dismissal is durable via hash(category + normalized quote). Gap findings may anchor a placement line or offer no accept action. Keyword pipeline and accepted calibration findings can produce queue items; calibration itself remains transient/read-only, and adoption routes through the existing queue. The queue is one decision/card at a time; no job target means an empty queue. A later document-map initiative adds quiet dotted underlines per anchored line for all open items, with click/cycling on shared lines and normal caret placement. Panel count gives total. This supersedes RB-18's active-item-only marks on the document surface; its shipped behavior remains historical. Never stretch shipped criteria retroactively.
## Guided assistant
C2/RB-21 replaces RB-20's unpublished findings UI outright—no parity period—while retaining its backend: stored job profile, OpenRouter calibration/refusals, exact-once grounding, adoption into guidance queue, and tone guidance. Assistant direction adds per-resume context/provenance, fact capture, placeholders, continuous checks, proposal lifecycle, handoffs, and durable thread/requirement/dismissal state. A finding accepted by the user becomes a guidance item with an exact anchor and replacement; the calibration response itself is not persisted. Unresolved anchors must not offer accept. Users retain control and can always export, with placeholder warnings/counts rather than export blocking. Context is per resume, not per role: duplicate for another role. Copy document and context fields, but not thread or requirement decisions; copies are siblings rooted at the original.
## Authorization and resource privacy
Unauthenticated requests return 401. Cross-user and nonexistent resources areresume-builder · wiki · dream at call 30
## Product model: profile and resume
Profiles are the career library: the union of experience used for targeting. Resumes are user-owned, directly editable, role-specific documents—not generated-only snapshots. Keep resumes.profile_id NOT NULL and seed a profile from the first resume. Preserve provenance where applicable so edits can be promoted to the profile. AI proposes and assists; it never gates editing or export. Localization may adapt structure, length, formatting, and cultural expectations. One resume has one target/context/thread; duplicate it for another role. Copies inherit document and context, but not conversation or requirement decisions; siblings root at the original.
## Resume document and editing
Target storage is resumes.content = {markdown: "..."}: pure free text, with no required headings, sections, fields, or rigid slots. This supersedes RB-12's shipped structured schema and the H2 compromise; keep shipped criteria as history, not target behavior. Use one Tiptap editor for the whole document. GenAI handles understanding, evaluation, formatting, and localization rather than a structural contract. Rendering has one source of truth: consume backend renderer HTML/CSS for the editing surface; structural edits change local content then refresh rendered output. Historical structured rows need conversion. Open work includes provenance/guards, keyword evidence, compliance rules, and RB-14 outline behavior. RB-10 remains authority on ATS safety; expand Markdown thoughtfully.
## Profile variant drift
Track whether a resume variant was generated from an older profile state with explicit counters. Increment profiles.version on writes to the profile, entries, or bullets; copy that value to resumes.profile_version at generation. Drift is inequality between current and recorded versions. Do not substitute updated_at: child edits may not touch the parent timestamp, and historical state cannot be reconstructed for backfill.
## Skills vocabulary
Keep skills and profile_skills normalized where canonicalization or cross-user analysis is a committed capability. The shared vocabulary is intentional: skills.aliases resolves equivalent terms (e.g. K8s/Kubernetes), and resume_keywords.skill_id references skills. Normalize for concrete capability, not abstract purity. Free-text resumes leave keyword acceptance and evidence attribution open for a new definition; they do not invalidate the vocabulary decision.
## Compliance and export
Only ERROR findings block generation; warnings do not. Store and surface every finding in resumes.compliance. Required-field errors are real constraints: missing nationality in the ME market should prompt the user to provide it. Free text invalidates current section-order and included-field checks; replacements remain open work, not permission to weaken hard requirements. Compliance GET recomputes without persisting; targeted generation is the persistence path. Score was retired (gauge, scorer, endpoints, API field, and resumes.score JSONB); do not reintroduce it or substitute a compliance overview column without a new decision. Overview tables omit score. Unfilled placeholders are clearly marked and warned/counted on export, but never block download: users can always export.
## Guidance and document marks
Guidance is advisory and distinct from hard compliance. Items use exact text anchors {quote, occurrence}, a claim, proposed_change reusing the user's sentence, and a reason. Accept is an atomic scoped find/replace plus status update; stale, ambiguous, or unresolved anchors are never applied elsewhere and have no accept action. Resolve staleness on read/accept, not autosave. Dismissal is durable via hash(category + normalized quote). Producers include the keyword pipeline and accepted calibration findings; calibration itself remains transient/read-only. Gap findings may anchor a placement line or offer no accept action. The queue is one decision/card at a time; no job target means empty queue. Document map: quiet dotted underlines per anchored line for open items; shared lines cycle on click. Clicking places the caret normally. Panel count gives total. This supersedes RB-18's active-item-only document marks, not its historical shipped criteria. Never stretch shipped criteria retroactively.
## Guided assistant
C2/RB-21 replaces RB-20's unpublished findings UI outright—no parity period—while retaining its backend: stored job profile, OpenRouter calibration/refusals, exact-once grounding, adoption into the guidance queue, and tone guidance. The assistant is a guided workflow in a chat-like interface, not general chat or a wizard: lead with ranked concrete fixes; user steers. Never start blank. Typed input redirects toward target and goal, routed to known actions; narrow vague asks, clarify unclear targets, define fallback, end every turn in an action, and avoid unsupported claims. Disable input until a role exists; derive chips from current state. No competing findings or suggestions panel: proposal cards in the thread show diff, reason, Apply, Not now, Undo. Agenda, queue popover, and marks lead to proposals. Marks show open work; clicking marked text places caret and scopes composer to that line, never hijacking writing with a proposal. Preserve prior approval records. Re-extraction matches by category + requirement ID, preserving decisions on matches, closing removed requirements, and adding new open items. Two-tab rail: Assistant and Document; properties in Document tab, Auto adjust in formatting row.
## Authorization and resource privacy
Unauthenticated requests return 401. Cross-user and nonexistent resources are indistinguishable: return 404 across routes, with ownership scoped in the query so a foreign row is never loaded. Do not return 403 for cross-user resume access; consistent 404 behavior avoids confirming resource existence. Test unauthenticated and cross-user behavior separately.
## Engineering conventions and tests
Use JSONB().with_variant(sqlite.JSON, 'sqlite') for JSONB columns. PostgreSQL production/migrations retain real JSONB; SQLite keepsSeed 2
Escalations · 53 questions · chance: 35%
| Arm | Right | Right where no memory was wrong / reverse |
|---|---|---|
| stateless | 60% | |
| search | 70% | +7 / −2 |
| memory | 66% | +5 / −2 |
| structured | 62% | +4 / −3 |
| dream | 64% | +5 / −3 |
| promoted | 64% | +7 / −5 |
| wiki | 66% | +5 / −2 |
| transfer | 59% | +3 / −4 |
Final memories
build-doen · memory
## Product intent Build Doen as one durable intent artifact for product engineers (designers, software engineers, product owners): separate constraints from discretion, escalate genuine intent calls, ground artifacts, and guide from precedent. Jev drafts, grounds, detects conflicts, and weighs precedent; it does not replace human judgment or distill abstract engineering rules. Retire heuristic flywheel (228 rules yielded 5 usable; circular metric; docs/design-principles.md). ## Priorities 1. Capture human product reasoning: initiatives lack recorded human decisions; capture precedes retrieval. 2. Ground generated artifacts in actual data, surfaces, and outcomes. 3. Improve precedent retrieval when a meaningful product corpus exists (baseline usefulness 18%). ## Decision signals - Keep constraints faithful to intended UI/lifecycle; resolve stale contradictions when intent is clear. Align specs, latitude, implementation. - Initiative titles may be optional: require description (and type if specified); use description first line as provisional readable title, not user commitment. Criteria reject missing description, not title. State this across specs/latitude; executor may rename while drafting. - Prefer lifecycle-appropriate absence over inactive UI when feature does not apply. - Keep ownership simple absent coordination benefit; disclose last-write-wins risk without presuming locking/merge/versioning. - Prefer explicit dedicated MCP tools for distinct write paths if contracts hold and discoverability improves. - Restore direct human authoring in draft if removing role/tool prevents shaping specs. Executors draft from brief; people can edit items pre-build, post-draft changes go through executor proposals. - Hide importance recommendation only with exactly one initiative. - Sparse live data need not block metric validation: realistic sweeps/property tests plus separate live recompute; don’t weaken targets. - Avoid explicit production performance/availability regressions in migrations; preserve indexing where practical without forcing unrelated architecture. - If controlled benchmark misses bar and an in-scope fix is indicated, iterate and remeasure same cases. - Accept narrow marginal telemetry loss rather than schema only if event is already acted upon, recurrence unlikely, signal mainly surfaces unresolved cases. - Heuristic corpus: auto-admit only confidently sound, scoped, condition-bearing guidance; propose high-confidence merges; queue borderline cases for review. ## Memory experiments Do not treat replay-only failure to beat “always built” as proof live memory cannot help: replay lacks decision conversations. A live executor-memory experiment is acceptable when capped, randomized against no-memory initiative holdout, outcomes and kill rule declared before serving, and every served memory visible to the person. Capture notes at decision time; score live predictions against the person’s choice, enabling correction/retirement of bad guidance. Visibility and a
build-doen · structured
- **Respect lifecycle boundaries in what the product renders or permits.** Evidence: Learn is hidden in Draft/Building and appears only in Learn; draft spec items are human-editable, while post-draft changes go through executor proposals. No contradiction. **Trap:** visible-but-disabled is not the default; executor ownership is not a universal authoring rule. - **Reduce initiation friction when explicitly valued, with a clear provisional substitute and later owner.** Evidence: optional initiative title; description’s first line stands in until executor names it; criteria corrected to stop treating absence as error. No contradiction. **Trap:** metadata is not universally optional; fallbacks must be unambiguous. - **Keep tool/API contracts stable, but make meaningfully distinct domain actions explicit.** Evidence: chose `submit_research_findings` over extending `submit_evidence`. No contradiction. **Trap:** avoid needless fragmentation. - **Prefer simple ownership conventions over synchronization machinery when roles and timing are clear.** Evidence: executor-owned findings use last-write-wins; humans annotate later. No contradiction. **Trap:** not blanket race tolerance or executor-only authorship. - **Use simple, explicit local conditions for narrow questions.** Evidence: hide importance recommendation only when exactly one initiative; rationale tentative. **Trap:** simplicity alone does not justify conditions. - **Test emergent properties with realistic inputs, and separately verify live correctness.** Evidence: realistic-count score-dispersion tests plus live recompute checks. No contradiction. **Trap:** synthetic tests cannot replace live-result checks. - **Make merge gates deterministic, affordable, and faithful to real infrastructure.** Evidence: cassette-replayed default check, paid/nondeterministic live eval opt-in, criterion amended to actual bench gate; rejected paid evals every run. No contradiction. **Trap:** manual gates/new workflows are not inherently better; separate eval repair from run policy. - **Keep specs, tests, and confirmed behavior aligned; preserve guarantees, not stale wording or textual identity.** Evidence: accepted criterion satisfaction despite assertion change; repaired stale eval unpacking; corrected title-required criterion. No contradiction. **Trap:** weakening guarantees is not repair; literal compliance can miss contradictions or broken tests. - **Interpret constraints by the invariant they protect; prefer intent-complete structural fixes over literal workarounds.** Evidence: accepted widening dream-pass step and BD-105 repair. No contradiction. **Trap:** intent is not license for scope expansion; systemic follow-ups may need separate decisions. - **Do not equate retiring an unvalidated heuristic flywheel with forbidding live memory experiments.** Evidence: despite the replay-only constitution and no arm beating the constant baseline, chose a live serving experiment because it measures predictions against the person’s actual choices and captures decision-time context replay lacks. No contradiction yet. Require capped memory, randomized no-memory holdout, predeclared outcomes and kill
build-doen · dream
Decision memory — Follow intent and accepted behavior, not stale wording mechanically. Preserve behavioral contracts; when they intentionally change, update tests/criteria encoding the old contract rather than weakening assertions. Fix recurring mechanisms, not one-off backfills. Proxies prove mechanisms, not real-world outcomes: record measurable facts and leave production-dependent criteria open until observed. Use durable measurement channels (SQL plus RESEARCH_LOG.md), refresh stale baselines, and don't claim unavailable infrastructure exists. Keep deterministic checks fast and in the default suite; live-model, paid, nondeterministic evaluations remain opt-in. Repair broken eval assertions for important behavior; bench deterministic parts as merge gates. Preserve production retrieval performance/indexing through migrations. Prefer structural fixes that preserve recurrence over resolving only current instances. Human-gate irreversible-feeling removals. Jev may autonomously admit sound standalone guidance and confirm high-confidence merges/generalizations; route borderline cases to people and retain human override. If accuracy regresses, iterate and remeasure within rubric discretion before shipping. Research findings are the executor's working document: MCP writes are last-write-wins; state this explicitly, and avoid locks/versioning absent clear benefit. Use a dedicated research-findings tool when it improves discoverability without changing submit_evidence's contract. Product behavior: hide Learn in Draft/Building; hide importance recommendation only when exactly one initiative exists. During draft, people can add/edit spec items alongside executor's initial draft; later changes go through executor proposals. New initiatives require description and Build/Research (default Build), not title. Title is optional; absent one, use description's first line until executor names/renames it. Constraint, latitude, acceptance-criteria lists are optional. Save brief separately, leave spec empty, and disallow post-creation brief edits. Keep criteria aligned; update stale tests that reject title omission. For consolidated statuses/data, accept narrow fidelity loss over schema complexity when marginal (e.g. resolved initiative-created drift reports). Memory/flywheel decisions: do not treat replay-only failure as proof that serving memory is wrong. The heuristic flywheel failed partly because it could not establish whether its guidance was right. A live memory experiment is acceptable when serving and measurement are one controlled loop: cap memory, randomize initiative holdouts without memory, predeclare outcome measures and a kill rule, and make every served memory visible to the person so they can assess outcomes and retire wrong guidance. Capture reasoning at decision time; replay alone is limited by corpus size and lacks the decision conversation. Keep the distinction clear: memory is an experiment, not an assumed product win; measure against the constant baseline and stop if it fails.
build-doen · promoted
{
"index": "Doen serves product engineers with one durable intent artifact: preserve human reasoning, distinguish constraints from discretion, escalate genuine intent calls, and ground guidance in precedent. Honor explicit product-owner choices and keep specs, UI, and flows consistent. Prefer explicit stable interfaces; protect meaningful production architecture, while accepting narrow fidelity loss when marginal value is low. Use deterministic, affordable repo-real gates; live-LLM evals stay opt-in. Open `purpose` for priorities and Jev\u2019s role; `lifecycle` for UI and authoring; `writes` for MCP contracts; `precedent` for retrieval verification; `architecture` for tradeoffs; `corpus` for curation; `gates` for tests, measurements, and spec interpretation.",
"notes": {
"purpose": "Doen serves product engineers (designers, software engineers, product owners) with one durable intent artifact: distinguish constraints from discretion, escalate genuine intent calls, and guide with precedent. Prioritize capturing human reasoning (25 recorded decisions were agent-raised across 9 initiatives) and grounding generated artifacts in reality; unsupported claims are risky, especially for non-experts. Improve precedent retrieval once a product corpus exists (18% useful baseline). Do not optimize for abstract engineering-rule extraction: the heuristic flywheel was retired (228 rules yielded 5 useful; circular metric; docs/design-principles.md). Jev helps draft, ground, detect conflicts, and weigh precedent; it is not a verifier of human judgment or behavior.",
"lifecycle": "Do not render Learn in Draft or Building; show it only in Learn. Hide importance recommendation only when the project has exactly one initiative; no lifecycle condition or hybrid logic. Prefer simple, explicit, discoverable interfaces and stable contracts. Honor explicit owner choices and keep constraints, latitude, UI and flow aligned. Reduce startup friction: only description and type required for new initiative; title optional, with description\u2019s first line as readable provisional title. In draft, people can add/edit spec items directly; executors may draft from briefs. After draft, changes go through executor proposals, not unrestricted authorship.",
"writes": "Research findings are the executor's working document with pure last-write-wins semantics: later executor writes can overwrite human edits. Humans generally annotate after investigation; document overwrite behavior clearly. Use dedicated submit_research_findings(initiative_id, findings), not an optional expansion of submit_evidence; preserve existing contract and make the path discoverable.",
"precedent": "Improve retrieval when a product corpus exists (18% useful baseline). Separate score-dispersion mechanism from corpus state: if live inputs lack variation, verify formula with realistic event-count sweep yielding >20 distinct scores, plus live recompute correctness. Do not require live data itself to exceed six distinct scores when six raw input combinations mathematically cap dispersion.",
"architecture": "Protect production integrity and meaningful architecture. For 1536\u21923072 embeddings, extend migration to halfvec + HNSW rather than accept a temporarily unindexed retrieval path. For measured migrations/classifier changes, fix in-scope issues and remeasure before deciding; demonstrated regression prompted rubric iteration and repeat benchmark, not immediate acceptance or replacement. Weigh scope and marginal value: limited fidelity loss is acceptable for narrow, low-signal cases when complexity is unjustified (e.g. no schema field to preserve marginal drift-loop signal).",
"corpus": "Preserve coverage: unclustered rules may still be citable; absence from clusters does not imply low value. Remove human promotion queue. Dream pass asks Jev whether each standalone unclustered rule is sound, well-scoped, condition-bearing guidance; confident yes may admit automatically, otherwise leave raw. Jev may confirm merge/generalization proposals above confidence threshold; borderline proposals remain for human review, humans can override. Retirement remains human-gated because removal is harder to trust and reverse. This supersedes earlier human-gate constraints for promotion and merge/generalization, not retirement. Evaluate all pending judgeable proposals, not just those created in current pass, to avoid stranding proposals.",
"gates": "Prefer deterministic, affordable, repo-real gates: cassette-replayed deterministic checks in default bench; live-LLM evals opt-in, non-blocking, out of default runs. Amend specs to name actual gates; lack of eval scheduling is a separate decision. Avoid paid, nondeterministic judgments blocking merges or uncalibrated thresholds that add flakiness. Preserve criterion intent rather than literal wording that defeats work; do not weaken assertions. Repairing stale/broken test interface so intended guard runs is not weakening it. When contract deliberately reverses, rewrite tests encoding old contract and record necessary assertion inversions as intentional exceptions, distinct from weakening checks. Use actual measurement channels (SQL and RESEARCH_LOG.md), refresh stale baselines, and leave post-deploy/post-pass outcomes open until observed; a local comparison is not deployment evidence."
}
}build-doen · wiki
{
"Doen product principles": {
"body": "Doen is a durable shared spec for designers, engineers, and product owners. Make intent explicit, separate constraints from discretion, and use precedent as evidence\u2014not as a substitute for judgment. Escalate genuine intent choices and surface architectural consequences not covered by the spec rather than silently treating them as discretion.\n\nBuild for real product work, not abstract rule production. The retired engineering-heuristics flywheel extracted 228 rules but produced only 5 useful ones, and its circular success metric did not demonstrate product value. Current priorities are capturing human reasoning during shaping, grounding generated artifacts in reality, and improving precedent retrieval when a useful product corpus exists. The precedent corpus is currently empty; retrieval optimization is not yet the leading problem.\n\nAll 25 recorded decisions were agent-raised and 9 initiatives yielded none: proactively capturing human reasoning is a process need. Jev can assist product work but is not a verifier of product intent. See [Human judgment and Jev], [Product shaping and initiative entry], and [Grounded evidence and verification].",
"links": [
"Human judgment and Jev",
"Product shaping and initiative entry",
"Grounded evidence and verification"
]
},
"Human judgment and Jev": {
"body": "Product intent belongs to people. Agents should surface genuine ambiguity and support decisions with grounded evidence and relevant precedent. Automated approval criteria are not human validation. Jev can draft, check groundedness, detect conflicts, and weigh precedent; it does not verify product work. Its 71% auto-approval of test criteria and zero human_judgment reflected poor fit for judging intent, not evidence that people validated the work.\n\nHuman involvement is not a universal gate. Preserve it for genuine intent decisions, uncertain cases, and actions whose removal feels difficult to reverse. Routine, reversible maintenance can be automated at high confidence, with human override. Focus human attention on uncertainty rather than mechanical throughput. See [Heuristic corpus stewardship] for corpus decisions and [Jev classifier evaluation] for comparative measurement.",
"links": [
"Doen product principles",
"Heuristic corpus stewardship",
"Jev classifier evaluation",
"Grounded evidence and verification"
]
},
"Heuristic corpus stewardship": {
"body": "Keep guidance coverage independent of clustering: an unclustered rule is not necessarily low-value, and clustering is uncorrelated with value. Without a human promotion queue, Jev may admit an unclustered rule as citable guidance only when it confidently judges the rule sound, well-scoped, and condition-bearing; otherwise leave it raw. The invariant is sound judgment, not human-only authorship, with human override available.\n\nJev may confirm merge and generalisation proposals above a confidence threshold; borderline cases go to human review. Retirement remains human-gated because removal feels less reversible, even if a rejected sentinel could restore a rule.\n\nPreserve intended algorithm semantics while repairing structural defects that prevent the operation from ever occurring\u2014for example, pending proposals must remain eligible for verdicts on later passes. See [Jev classifier evaluation] when changing judgment rules and [Product retrieval integrity] for production retrieval concerns.",
"links": [
"Human judgment and Jev",
"Jev classifier evaluation",
"Product retrieval integrity"
]
},
"Product retrieval integrity": {
"body": "Preserve indexed production retrieval. A migration that changes embedding dimensions or storage types must account for index support rather than silently leaving production queries on full scans. If necessary, extend the migration with an indexed compatible representation (for example, halfvec with HNSW) rather than accepting an unindexed production window. A small corpus does not erase an architectural change. Surface consequences outside the explicit spec and resolve them before production migration.",
"links": [
"Doen product principles",
"Heuristic corpus stewardship"
]
},
"Jev classifier evaluation": {
"body": "When replacing a classifier, compare it with the existing path on identical representative historical cases and candidate sets. One controlled comparison found Jev family-level dedup accuracy of 55.91%, below the old path's 67.74%. The decision was to iterate on the rubric and remeasure\u2014not ship the regression or conclude Jev is fundamentally unsuitable. When exact rubric wording is within granted discretion, test plausible prompt-level causes against the same benchmark before making a broader product decision.\n\nMeasure changes against a stable comparison, not an incomparable new sample. A result that misses the bar is evidence to investigate and iterate; it is not by itself proof that the approach is irredeemable.",
"links": [
"Human judgment and Jev",
"Heuristic corpus stewardship",
"Grounded evidence and verification"
]
},
"Product shaping and initiative entry": {
"body": "Restore direct human agency during shaping. Executors may draft a spec from the brief; people can add or edit spec items while it is in Draft. Once drafting is over, later changes route through executor proposals. The brief and the spec are distinct: creating an initiative stores the person's brief separately and leaves the spec empty for shaping.\n\nStarting an initiative should require only a description and a Build/Research choice (default Build). A title is optional; absent one, the description's first line is a provisional title until the executor names it. Constraints, latitude, and acceptance criteria are optional. Keep interfaces and specs consistent with these required/optional distinctions; stale requirements are not harmless copy.",
"links": [
"Doen product principles",
"Human judgment and Jev",
"Learn-stage lifecycle"
]
},
"Research findings and MCP writes": {
"body": "Research findings are the executor's working document. People may annotate after investigation concludes, but MCP writes are pure last-write-wins: a later executor write can overwrite human UI edits. Document this clearly; there are no locks, merges, or version tracking. Keep the stable generic submit_evidence contract unchanged. Use a dedicated, discoverable research-specific MCP write tool rather than adding an optional research field to the generic tool.",
"links": [
"Doen product principles",
"Grounded evidence and verification"
]
},
"Learn-stage lifecycle": {
"body": "The learn model must not be rendered in Draft or Building. Render and display it only in Learn; in Complete, it",
"links": [
"Doen product principles",
"Product shaping and initiative entry"
]
}
}build-doen · transfer
(from resume-builder) Product principles: Users own and manually manage professional history; AI reviews, enhances, and localizes on demand without blocking edits/access. Localization adapts structure, length, formatting, and cultural expectations by market. Favor user freedom and document understanding over rigid forms. Warn clearly, then trust users; never withhold a document based on product judgment. When specs conflict with shipped schema/behavior or a human-updated prototype, verify lifecycle and honor the latest explicit decision; don't invent fields or revive retired functionality. Stay with Tailwind and shadcn when asked. Resume model: `resumes.content = {markdown: "..."}`—one free-form Markdown document, no required structure. Tiptap edits freely; AI handles compliance/order, bullet quality, keyword evidence/location, and formatting. RB-12 schema is historical; migrate rows to Markdown, no JSONB DDL. Renderer consumes Markdown. Remove structured assumptions from specs (RB-4 provenance/loss guards, RB-5 keyword evidence, RB-14 outline, RB-10 ATS rendering authority). Guidance queue is derived, not authoritative. RB-9 queue: one-at-a-time answer surface, atomic accept, durable dismissal. Producers include keyword pipeline/calibration, not separate document mutation paths; don't fold compliance or deterministic/document-wide checks into keyword pipeline. Items need anchor `{quote, occurrence}`, claim, proposed_change, reason, category. Accept replaces exact quote atomically; stale quote: discard/409, never guess. Dismissal key hashes category + normalized quote. Acceptance edits Markdown; refresh editor content/version from response. No job target means empty queue. Calibration findings are read-only/unpersisted; actionable findings require exact verbatim anchor and replacement; unresolved anchors have no accept. Reads do not write. No score (retired; migration 0004 dropped it); compliance persists only at targeted-generation completion, GET recomputes without persisting. Guided Assistant: RB-21 replaces RB-20's unpublished findings column/prose panel: one guidance surface, not parallel surfaces. C2 is assistant-led guided workflow, not general chat/fixed wizard: ranked agenda, never blank prompt; each turn ends in concrete action. Composer is redirect-only, disabled until role exists; route typed input to target/known goal, clarify unclear targets, narrow vague requests to grounded high-impact fixes, define fallback. Suggestions derive from current state; don't invent claims. Proposals are thread cards with diff/reason/Apply/Not now/Undo, reached via agenda, queue popover, or document mark. Remove RB-18/19 suggestions panel; marks remain for location; clicking marked line places caret and scopes composer, without hijacking writing or auto-opening proposal. Follow updated C2 prototype: two-tab rail (Assistant, Document); move document properties from top toolbar. Classification/model choice: Use existing Jev/System One client for coverage verdicts and fallback intent classification; OpenRouter remains the path for all user-facing generated prose. Coverage is one typed Noul per requirementresume-builder · memory
Product principles: Users own and manually manage professional history; AI reviews, enhances, and localizes on demand without blocking edits/access. Localization adapts structure, length, formatting, and cultural expectations by market. Favor user freedom and document understanding over rigid forms. Warn clearly, then trust users; never withhold a document based on product judgment. When specs conflict with shipped schema/behavior or a human-updated prototype, verify lifecycle and honor the latest explicit decision; don't invent fields or revive retired functionality. Stay with Tailwind and shadcn when asked. Resume model: `resumes.content = {markdown: "..."}`—one free-form Markdown document, no required structure. Tiptap edits freely; AI handles compliance/order, bullet quality, keyword evidence/location, and formatting. RB-12 schema is historical; migrate rows to Markdown, no JSONB DDL. Renderer consumes Markdown. Remove structured assumptions from specs (RB-4 provenance/loss guards, RB-5 keyword evidence, RB-14 outline, RB-10 ATS rendering authority). Guidance queue is derived, not authoritative. RB-9 queue: one-at-a-time answer surface, atomic accept, durable dismissal. Producers include keyword pipeline/calibration, not separate document mutation paths; don't fold compliance or deterministic/document-wide checks into keyword pipeline. Items need anchor `{quote, occurrence}`, claim, proposed_change, reason, category. Accept replaces exact quote atomically; stale quote: discard/409, never guess. Dismissal key hashes category + normalized quote. Acceptance edits Markdown; refresh editor content/version from response. No job target means empty queue. Calibration findings are read-only/unpersisted; actionable findings require exact verbatim anchor and replacement; unresolved anchors have no accept. Reads do not write. No score (retired; migration 0004 dropped it); compliance persists only at targeted-generation completion, GET recomputes without persisting. Guided Assistant: RB-21 replaces RB-20's unpublished findings column/prose panel: one guidance surface, not parallel surfaces. C2 is assistant-led guided workflow, not general chat/fixed wizard: ranked agenda, never blank prompt; each turn ends in concrete action. Composer is redirect-only, disabled until role exists; route typed input to target/known goal, clarify unclear targets, narrow vague requests to grounded high-impact fixes, define fallback. Suggestions derive from current state; don't invent claims. Proposals are thread cards with diff/reason/Apply/Not now/Undo, reached via agenda, queue popover, or document mark. Remove RB-18/19 suggestions panel; marks remain for location; clicking marked line places caret and scopes composer, without hijacking writing or auto-opening proposal. Follow updated C2 prototype: two-tab rail (Assistant, Document); move document properties from top toolbar. Classification/model choice: Use existing Jev/System One client for coverage verdicts and fallback intent classification; OpenRouter remains the path for all user-facing generated prose. Coverage is one typed Noul per requirement (no OpenRouterresume-builder · structured
- **Keep human-owned source material independently editable; AI supports rather than blocks the user.** Evidence: editable resumes coexist with career-history sources; AI is on-demand and drafts are downloadable. No contradiction. Trap: canonical data need not be the editing surface; sync need not be automatic. - **Preserve document freedom unless downstream contracts require structure.** Evidence: free-text Markdown coexists with normalized skills for aliases/references; AI handles ordering/localization. No contradiction. Trap: don't impose obsolete structure or collapse entities still used downstream. - **Prefer explicit, low-friction synchronization and lifecycle signals; preserve history that cannot be reconstructed.** Evidence: provenance, user-controlled promotion, write-back pointers, drift versions, and re-fetching rendered HTML after structural edits. No contradiction. Trap: avoid schema growth or auto-sync by default; preserve caret state; timestamps cannot recover history. - **Define concurrency against client-editable state, not incidental row activity.** Evidence: tokens hash content/presentation; feedback reads may recompute scores without invalidating writers. No contradiction. Trap: identical state shares a token; SQLite timestamps can collide. - **Anchor text edits and guidance to exact source; fail visibly when anchors go stale.** Evidence: quote plus occurrence, atomic scoped replacement, source-anchored guidance; calibration findings require exact anchor/replacement. No contradiction. Trap: repeated text needs identity; never guess. Dismissal surviving regenerated wording does not authorize stale edits; gaps need insertion anchors or no accept action. - **Route approved changes through one established apply path; separate producers from mechanism.** Evidence: calibration/keyword pipelines produce guidance; accepted items persist while calibration responses remain ephemeral. No contradiction. Trap: AI output can yield user-authorized edits, but no parallel apply path or acceptance without resolvable anchor/replacement; adopt returned content/token after acceptance. - **Consolidate duplicate review surfaces, but keep guidance immediately discoverable and editing uninterrupted.** Evidence: C2 folds findings and suggestions into thread proposal cards with diff/reason/Apply/Not now/Undo; marks locate context, text clicks place caret, and line-scoped chips avoid hijacking writing. No contradiction. Trap: don't preserve redundant panels or auto-open proposals on mark-click; don't make users hunt for guidance. - **Follow the owner's latest concrete prototype/instruction over older scope language; interpret exclusions by their rationale and the specific design they exclude.** Evidence: owner explicitly updated C2 and asked for close implementation; chose Assistant/Document tabs, moving properties into Document and Auto adjust into formatting row. This supersedes the earlier out-of-scope line, which referred to direction A making guidance a hidden tab. Trap: don't treat an old exclusion as a blanket ban on a related design, or preserve duplicate homes for
resume-builder · dream
Product model: `profiles` are career libraries; `resumes` are editable, role-specific documents with deliberate promotion/write-back and source provenance. Keep `resumes.profile_id` NOT NULL (seed a profile from first resume). Profiles use integer `version` counters copied to resumes at generation; compare versions, not timestamps. Preserve canonical skills tables, IDs, aliases and shared vocabulary. Resume content is free-text Markdown (`{markdown: ...}`): no required sections or field schema; downstream evaluation/formatting uses GenAI. Supersedes RB-12's structured model: convert existing rows without DDL. Revisit field-based provenance/guards, keyword evidence, compliance structure and outline/reordering assumptions. Keep ATS-safe formatting and quantification guidance within RB-10/RB-11. One editor for the whole resume, not per-field/section editors. Concurrency: tokens hash client-editable state, not `updated_at` or read-side derived writes. Autosave does not create revisions; each idle-gap timeout creates one snapshot. Simultaneous checkpoint triggers create one revision flagged for every trigger. After accepted change, adopt returned content/token to avoid stale autosave conflicts. Scope ownership reads so cross-user and nonexistent resources both return 404; unauthenticated is 401. Guidance queue is derived, not authoritative. Anchors are exact `{quote, occurrence}`; accept is scoped atomic replacement, stale anchors are dropped, not applied. Resolve staleness on read/accept, not autosave. Dismissal identity hashes category plus normalized quote. Accept updates resume content; no job target can mean an empty queue. Unresolved findings have no accept action; calibration responses themselves remain unpersisted. Requirement item keys use category + stable requirement ID, not wording; retain decisions for surviving requirements. Guided Assistant is the sole guidance surface: proposal cards in-thread with diff/reason, Apply, Not now and Undo, reached from agenda, queue popover or document cues. Remove separate suggestions panel; preserve document marks as location cues. Clicking marked text behaves normally (caret stays, composer scopes to line); don't auto-open a card or hijack typing. Marks may be dense. Rewrite 29 RB-18/19 browser tests for thread behavior, not delete them. Assistant is guided, not general-purpose chat. One role/context/thread per resume; duplicate for another role, but don't copy thread/requirement decisions. Unfilled placeholders warn but never block PDF export. Follow updated C2 prototype: two-tab rail (Assistant, Document); move properties into Document and Auto adjust into formatting row; don't follow older out-of-scope line. Assistant model routing: use existing Jev/System One client for classification, OpenRouter for all user-facing prose. Coverage verdicts are one typed Noul per requirement. Keyword intent routing stays free/fast first; only on keyword miss use a Jev Choice rather than asking user by default. If `TYPESAFE_API_KEY` is unset, bothresume-builder · promoted
{
"index": "Users own career history and documents; AI advises on demand and never edits autonomously or blocks export. Only compliance ERRORs block generation. Resumes are editable free-form Markdown; downstream structure is AI-interpreted. Prefer minimal reversible changes, except establish one convention where drift risk is real. Open `core` for product principles; `model` for domain/drift; `content` for Markdown; `workflow` for compliance/auth/infra; `editor` for rendering/concurrency; `guidance` for anchors/marks; `assistant` for RB-21/C2; `tests` for test strategy; `revisions` for snapshots; `overview` for table scope.",
"notes": {
"core": "Users own and manually manage professional history and documents. AI is an on-demand reviewer/enhancer/localizer, never an autonomous editor or gatekeeper. Adapt to target-market norms, but never withhold documents/exports by product judgment. Warn/count placeholders and mark them in-document; export remains available.",
"model": "Profiles are the career library; resumes are directly editable targeted documents with explicit promote/write-back and source_entry_id/source_bullet_id provenance. resumes.profile_id stays NOT NULL; first run seeds profile from first resume. Keep skills + profile_skills; RB-5 requires aliases normalization and resume_keywords.skill_id. Drift: increment profiles.version on any profile/entry/bullet write, copy to resumes.profile_version at generation; compare versions, not updated_at.",
"content": "A resume is one free-form Markdown document: {markdown:\"...\"}; no required headings, sections, fields, slots, or structured editor schema. This supersedes RB-12's shipped structure; convert existing JSONB rows. Downstream semantics (compliance, keywords, order, evidence/provenance) must be interpreted by GenAI. RB-10 remains ATS-safety authority; revisit dependent generation, keyword, compliance, outline, rendering/PDF, and supported-Markdown specs.",
"workflow": "User-driven. check_compliance before generation writes: ERROR blocks; warnings persist in resumes.compliance and surface in editor. Germany warnings proceed; missing required Middle East nationality blocks/prompts. Auth: unauthenticated 401; foreign and nonexistent both 404; ownership-scoped queries must not load foreign rows, test separately. Worker builds from repo-root Docker context, copies api/ and worker/, adds api/ to PYTHONPATH and AI deps; delete stale worker/app/shared. Railway uses repo root + explicit Dockerfile. Shared-package extraction is separate. Establish api/app/prompts/, move SYSTEM_PROMPT preserving name/module exposure/exact text/behavior; review tests unchanged.",
"editor": "One Tiptap editor for the entire free-form Markdown; no structured schema or per-section editors. For parity, use backend render_resume_html(standalone=False) HTML with editable semantic nodes/path attributes; structural edits update local Markdown and re-fetch rendered body. Read-only render endpoint needs no migration. Concurrency token hashes client-editable content, presentation, title, status, template_key, region_code; exclude updated_at/derived values so read-triggered writes don't invalidate edits.",
"guidance": "Guidance is advisory, distinct from hard compliance. Queue acceptance atomically replaces exact text occurrence and marks accepted; anchor={quote, occurrence}; stale anchors drop at read/accept, not autosave. Dismissal hashes category + normalized quote. Producers: keywords and calibration findings; findings need resolvable exact anchor/replacement to become queue items, otherwise no accept action. Keep one proposal queue/apply path. RB-18/19 remain shipped: one active card, all open anchors marked; one quiet dotted underline per anchored line, click selects/cycles suggestions on line and places caret normally.",
"assistant": "RB-20 remains shipped/verified backend foundation (job_profile_text, OpenRouter calibration, missing-input/empty-doc guards, exact-once grounding, finding-to-guidance adoption, app/prompts/tone.txt); RB-21 is C2 guided assistant. It replaces RB-20 findings column and RB-18/19 suggestions panel: assistant is sole guidance surface; proposals appear in thread, reachable from agenda, queue popover or document marks. Guided chat, not general chat/wizard: ranked agenda, concrete action each turn, role required before composer, route text to known targets/actions, clarify missing target/vague ask, defined fallback, chips derived from state, no unsupported claims. Durable per-resume thread and requirement decisions; one role/context/thread per resume. Duplicate carries document/context, not thread/decisions. Requirement decisions persist; disappeared open gaps close, new ones open. Account assistant settings live validated JSONB in users.preferences; resume setting overrides default. Follow latest user-updated C2 prototype: Assistant and Document tabs; properties in Document, Auto adjust in formatting row; don't duplicate homes or use dense sideways toolbar. Clicking document mark places caret/scopes composer; it must not hijack writing.",
"tests": "For JSONB use JSONB().with_variant(sqlite.JSON,'sqlite'): retain PostgreSQL JSONB while existing SQLite tests and Base.metadata.create_all stay unchanged. Add separate PostgreSQL fixture for behavior SQLite cannot validate (shares CHECK constraints, in-place JSONB mutation); don't split metadata or rewrite existing suite. Playwright + @axe-core/playwright drives real running stack; reusable config and make target. Assert persisted content via API; server-side revision counts in pytest.",
"revisions": "Continuous autosave updates resume content during active typing and creates no snapshots. Each idle-gap timeout is a distinct trigger and"
}
}resume-builder · wiki
{
"Career ownership and free-text documents": {
"body": "Users own and directly edit career history and application documents. The profile is a reusable career library; each resume is a concrete, editable document, not a locked AI snapshot. Keep resumes.profile_id NOT NULL and seed a profile from the first resume. AI may review, enhance, localize, and assist on demand, but must not gate access to or export of the user's document. Localization adapts structure, length, formatting, and cultural expectations, not merely wording.\n\nResume content is pure Markdown text (currently wrapped as {markdown: ...}), with no required fields, headings, sections, or boundaries. Downstream generation, rendering, evaluation, compliance, and evidence/keyword interpretation must understand Markdown with GenAI rather than rely on a fixed schema. Convert old structured rows. RB-12's structured Tiptap implementation was valid when shipped but is superseded as product direction. RB-10 remains authoritative on ATS-safe formatting. Preserve meaningful provenance without speculative schema additions or restoring structural contracts. Unfilled placeholders warrant a prominent warning, never an export block: users can always download their document. See related pages for drift, compliance, guidance, assistant, and browser invariants.",
"links": [
"Profile versioning",
"Compliance findings",
"Guidance queue and document marks",
"Guided assistant and role context",
"Browser testing, autosave, and history"
]
},
"Guidance queue and document marks": {
"body": "Guidance is advisory and distinct from compliance verdicts. The assistant is the sole guidance surface: proposals appear in-thread; remove the separate RB-18/RB-19 suggestions panel to avoid duplicate queues. Keep one proposal/decision at a time, with Apply, Not now, and Undo. The agenda, queue popover, and document marks are ways to reach work, not parallel answer surfaces. Producers may include keyword findings and calibration/assistant findings explicitly grounded and adopted by the user; do not add generic whole-document advice without an actionable decision. With no job target, keyword guidance is quietly empty.\n\nItems use exact-text anchors {quote, occurrence}; acceptance applies an exact scoped replacement and records the decision atomically. Validate anchors when reading and accepting, not on every autosave. Suppress stale items; if the quote changes between display and acceptance, return 409 rather than risk editing the wrong text. Return updated content/version for the editor. Durable dismissal identifies category plus normalized quote. Unresolvable findings have no accept action; a gap may insert after nearby text or offer no action.\n\nMarks are work-location cues, not proposal launchers. Use one quiet, layout-neutral dotted underline per anchored line, below the active line's solid underline/tint. Clicking text places the caret normally and scopes the composer to that line; it must not open a proposal or hijack typing. Multiple items on a line may be selected/cycled as appropriate. Show outstanding count in the panel/thread, not by counting marks.",
"links": [
"Career ownership and free-text documents",
"Guided assistant and role context",
"Browser testing, autosave, and history"
]
},
"Guided assistant and role context": {
"body": "The assistant is a guided experience in a chat-like interface, not general chat or a fixed wizard. Lead with a ranked agenda; users steer; each turn ends in a concrete action. Never show an empty thread. Composer is disabled until a role exists. Route typed input to known targets/goals, not arbitrary instructions; narrow vague requests to high-impact fixes, clarify target when needed, ground suggestions in document/history, and use a safe fallback rather than invent claims or broad rewrites.\n\nPer resume: one role context, thread, and requirement state. Targeting another role means duplicating the resume; copy document/context but not conversation or requirement decisions. Account-level settings (language, tone, default market) belong in validated users.preferences JSONB; per-resume values such as region override defaults. Context fields retain provenance (advert/profile/user); do not overwrite user-entered facts without asking. Preserve decisions when advert re-extraction rewords a requirement: identity follows category plus requirement ID, not wording. Keep decided requirements, close open items that disappear, and add genuinely new ones as open.\n\nGuidance is the product and the assistant is the only guidance surface. Proposals/diffs/rationale and Apply/Not now/Undo live in-thread, reachable from agenda, queue popover, or document marks. Remove the findings and suggestions panels; marks locate work but never open proposals. Unfilled placeholders are clearly marked and counted, but never block export. Follow the latest human-updated C2 prototype over stale spec language: two rail tabs, Assistant and Document; properties live in Document, Auto adjust in the formatting row. Avoid the crowded sideways-scrolling properties toolbar; use Tailwind and shadcn components.",
"links": [
"Career ownership and free-text documents",
"Guidance queue and document marks",
"Profile versioning"
]
},
"Compliance findings": {
"body": "Compliance is a hard ruleset verdict, separate from advisory guidance. Errors block targeted resume generation; warnings do not. Persist and surface every finding regardless of severity. Missing required information should prompt the user to supply it rather than silently generate a noncompliant document. A market-required nationality may correctly block generation; convention warnings should not. Compliance does not block access to or export of an existing document. With free-text resumes, interpret Markdown rather than obsolete fields. Never imply a check occurred if its result was not persisted.",
"links": [
"Career ownership and free-text documents",
"Guidance queue and document marks"
]
},
"Profile versioning": {
"body": "Track profile drift with an integer generation marker: increment profiles.version on every profile, entry, or bullet write; copy it to resumes.profile_version at generation, then compare. Do not use updated_at: child writes may not update the parent timestamp, and timestamps cannot reconstruct the state used for an older variant. This supports the career-library/document distinction without conflating profile and resume.",
"links": [
"Career ownership and free-text documents"
]
},
"Browser testing, autosave, and history": {
"body": "Use",
"links": [
"Career ownership and free-text documents",
"Guidance queue and document marks",
"Guided assistant and role context"
]
}
}resume-builder · transfer
(from build-doen) ## Product intent Build Doen as one durable intent artifact for product engineers (designers, software engineers, product owners): separate constraints from discretion, escalate genuine intent calls, ground artifacts, and guide from precedent. Jev drafts, grounds, detects conflicts, and weighs precedent; it does not replace human judgment or distill abstract engineering rules. Retire heuristic flywheel (228 rules yielded 5 usable; circular metric; docs/design-principles.md). ## Priorities 1. Capture human product reasoning: initiatives lack recorded human decisions; capture precedes retrieval. 2. Ground generated artifacts in actual data, surfaces, and outcomes. 3. Improve precedent retrieval when a meaningful product corpus exists (baseline usefulness 18%). ## Decision signals - Keep constraints faithful to intended UI/lifecycle; resolve stale contradictions when intent is clear. Align specs, latitude, implementation. - Initiative titles may be optional: require description (and type if specified); use description first line as provisional readable title, not user commitment. Criteria reject missing description, not title. State this across specs/latitude; executor may rename while drafting. - Prefer lifecycle-appropriate absence over inactive UI when feature does not apply. - Keep ownership simple absent coordination benefit; disclose last-write-wins risk without presuming locking/merge/versioning. - Prefer explicit dedicated MCP tools for distinct write paths if contracts hold and discoverability improves. - Restore direct human authoring in draft if removing role/tool prevents shaping specs. Executors draft from brief; people can edit items pre-build, post-draft changes go through executor proposals. - Hide importance recommendation only with exactly one initiative. - Sparse live data need not block metric validation: realistic sweeps/property tests plus separate live recompute; don’t weaken targets. - Avoid explicit production performance/availability regressions in migrations; preserve indexing where practical without forcing unrelated architecture. - If controlled benchmark misses bar and an in-scope fix is indicated, iterate and remeasure same cases. - Accept narrow marginal telemetry loss rather than schema only if event is already acted upon, recurrence unlikely, signal mainly surfaces unresolved cases. - Heuristic corpus: auto-admit only confidently sound, scoped, condition-bearing guidance; propose high-confidence merges; queue borderline cases for review. ## Memory experiments Do not treat replay-only failure to beat “always built” as proof live memory cannot help: replay lacks decision conversations. A live executor-memory experiment is acceptable when capped, randomized against no-memory initiative holdout, outcomes and kill rule declared before serving, and every served memory visible to the person. Capture notes at decision time; score live predictions against the person’s choice, enabling correction/retirement of bad guidance. Visibility
Dream stages (recorded from runs after 2026-11-27)
build-doen · dream · dream at call 5
Doen decision memory UI lifecycle: Do not render a feature/module outside the lifecycle stage where it applies. Learn is hidden in Draft/Building, rendered only in Learn, and read-only in Complete; avoid showing disabled UI in stages where it does not apply. Research findings writes: Use pure last-write-wins. Executor/MCP writes overwrite human edits, which may be lost; document this clearly in MCP tool descriptions. research_findings is the executor’s working document, and humans annotate after investigation concludes. Avoid locking semantics absent clear benefit. MCP API: Favor a dedicated, explicit tool for a distinct write path when this improves discoverability and keeps an established tool contract stable. Chosen: submit_research_findings(initiative_id, findings), rather than adding an optional research_findings parameter to submit_evidence. Initiative Importance Validation: Hide the importance recommendation only when the project has exactly one initiative. Do not condition visibility on whether another initiative completed after this one’s creation date. Treat this as a specific decision, not a broad preference for simpler rules. Verification: When a criterion demands behavior current live data cannot exhibit because its input space is sparse, verify the mechanism with a property/test sweep over realistic inputs and separately confirm correctness on current live data. Do not weaken the criterion to fit today’s corpus or wait indefinitely for organic data growth. Example: heuristic score dispersion—test that the rebalanced formula yields >20 distinct scores across realistic survived/removed/citation event counts, and verify live recompute correctness; accept that actual corpus dispersion will emerge as events accumulate.
build-doen · dream · dream at call 10
Product decision memory - Render the learn model only in the Learn stage; do not show it in Draft/Building. - Research findings are the executor’s working document: MCP writes use pure last-write-wins and may overwrite human edits. Document this in the tool description; humans annotate after investigation. Avoid locks/versioning absent clear benefit. Use a dedicated `submit_research_findings` tool when it makes the distinct write path explicit and discoverable while preserving `submit_evidence`’s contract. - Hide the importance recommendation only when the project has exactly one initiative; do not substitute a completion-date condition. - When sparse live data makes an outcome impossible to observe, verify the mechanism with realistic test inputs and separately establish live correctness. Do not weaken the criterion or wait for the corpus to grow. - Preserve indexed production retrieval through migrations. If the planned representation would leave production unindexed, extend the migration to a supported indexed representation rather than defer indexing. - When a controlled same-case benchmark misses a confirmed non-regression bar, do not ship the regression or assume it is fundamental. Iterate on a plausible fix within approved discretion and remeasure on the identical benchmark (BD-91: 55.91% vs 67.74% over 186 cases; rubric revision was in scope). - Reduce human maintenance and mental overhead in heuristic curation. Unclustered rules may become citable only when Jev confidently judges them sound, well-scoped, condition-bearing guidance; otherwise leave them raw. Cluster membership is not a reliable proxy for value. - Jev may confirm merge/generalisation proposals above a confidence threshold; borderline cases go to humans, who can override. Keep retirement human-gated: removal feels more irreversible, while rejected rules are restorable. The invariant is that every admitted or merged rule is judged sound; the judge need not be human. - A narrow loss of fidelity can be accepted when preserving it adds disproportionate complexity and little value: collapsing `initiative_created` into `dismissed` without trace was accepted because acted-on drift has marginal value to the recurring-drift signal.
build-doen · dream · dream at call 15
Product decision memory — Follow the purpose of constraints and acceptance criteria, not wording mechanically. A scope boundary can permit an in-scope systemic fix when core order, per-item decision rule, and behavioral contract remain intact; prefer fixing recurrence mechanisms over one-off backfills. Repairing stale tests or deliberately rewriting assertions to encode a reversed contract is acceptable when it restores/enforces the intended guard rather than weakening it. Keep genuinely human intent calls open: do not infer deployment or claim production-only outcomes from local proxies; record pre-deploy evidence and leave the criterion open until production can verify it. Research findings are the executor’s working document: MCP writes are pure last-write-wins and may overwrite human edits. Document this; humans annotate after investigation. Avoid locks/versioning absent clear benefit. Prefer a dedicated submit_research_findings path when it improves discoverability without changing submit_evidence’s contract. Keep the learn model hidden in Draft/Building; render it only in Learn. Hide importance recommendation only when there is exactly one initiative. When live data cannot reveal an outcome, test the mechanism with realistic inputs and separately establish live correctness; do not weaken the criterion or wait for data if the mechanism is testable. Preserve indexed production retrieval through migrations, including by adopting a supported indexed representation. On a confirmed same-case benchmark regression, iterate on a plausible in-scope fix and remeasure on the identical benchmark before deciding whether to ship. Reduce human maintenance in heuristic curation: Jev may auto-admit confidently judged sound, scoped standalone rules; uncertain standalone rules stay raw. Jev may confirm merge/generalisation proposals above a confidence threshold, with borderline cases sent to humans. Keep retirement human-gated because removal is less reversible. Accept narrow fidelity loss when its marginal value does not justify disproportionate complexity. Merge gates should be deterministic, fast, and in the default suite. Put deterministic checks in backend/tests/bench; keep live-model, paid, nondeterministic evals opt-in in backend/tests/evals. Live evals provide deeper evidence, not merge arbitration; do not add paid live calls to the default suite.
build-doen · dream · dream at call 20
Decision memory — Follow the intent of constraints and acceptance criteria, not their wording mechanically. Preserve behavioral contracts; when the contract intentionally changes, update tests that encode the old contract rather than weakening assertions. Fix recurring mechanisms instead of relying on one-off backfills. Local proxies prove mechanisms, not real-world outcomes: record measurable facts and leave production-dependent criteria open/needs_judgment until observed. Use durable project measurement channels (SQL plus RESEARCH_LOG.md), refresh stale baselines against current data, and don't claim unavailable infrastructure exists. Keep deterministic checks fast and in the default suite; live-model, paid, nondeterministic evaluations remain opt-in. A broken eval guarding an important behavior should be repaired so its assertion actually runs, not left broken or moved into every default run. Bench the deterministic part as the merge gate. Preserve production retrieval performance/indexing through migrations; don't accept an unindexed interval merely because the current corpus is small. Prefer structural fixes that preserve recurrence over resolving only current instances. Human-gate irreversible-feeling removals (retirement); Jev may autonomously admit sound standalone guidance and confirm sufficiently confident merge/generalization proposals, with borderline cases routed to people and human override retained. When measured accuracy regresses, iterate and remeasure within granted rubric discretion before shipping a replacement. Research findings are the executor's working document: MCP writes are last-write-wins, and this should be explicit; avoid locks/versioning absent clear benefit. Use a dedicated research-findings tool when it improves discoverability without changing submit_evidence's contract. Product behavior: hide Learn entirely in Draft/Building. Hide importance recommendation only when the project has exactly one initiative. During draft, people can add/edit spec items in the app alongside the executor's initial draft; after draft, changes go through executor proposals. New initiatives require description and Build/Research (default Build), not title. Title is optional; the description's first line is a readable stand-in until the executor names/renames it. Constraint, latitude, and acceptance-criteria lists are optional. Save the brief separately, leave the spec empty, and don't allow post-creation brief edits. Keep criteria and latitude wording consistent with required description/type and optional title/lists. When statuses or data are consolidated, accept a narrow fidelity loss rather than schema complexity if the affected signal is marginal and resolved cases no longer need counting (as with initiative-created drift reports).
build-doen · promoted · dream at call 5
Doen is a product-engineering spec framework: preserve durable intent, separate constraints from discretion, escalate real intent calls, and use precedent. Capture human reasoning and ground generated artifacts in reality; don’t optimize for abstract rule extraction. Prefer simple, explicit interfaces and stable contracts. See `purpose` for priorities/Jev, `lifecycle` for UI, `writes` for MCP semantics, `precedent` for retrieval and live-corpus verification. ## purpose Doen serves product engineers (designers, software engineers, product owners) through one durable intent artifact: distinguish constraints from discretion, escalate genuine intent calls, and use precedent. Priorities: capture human reasoning (all 25 recorded decisions were agent-raised; 9 initiatives yielded none); ground generated artifacts in reality (fabricated references/outcomes occurred, especially risky for non-engineers); improve precedent retrieval when a product corpus exists (18% useful baseline). Don’t optimize for abstract engineering-rule extraction: heuristic flywheel retired (228 rules yielded 5 useful; circular metric; docs/design-principles.md). Jev is not the verifier for this audience: it often auto-approves test criteria and excludes human judgment. Its value is drafting, groundedness, conflict detection, and precedent analysis. ## lifecycle Do not render the Learn module in Draft or Building; show it only in Learn. Prefer simple, explicit, discoverable interfaces and stable contracts. Importance recommendation visibility: hide only when the project has exactly one initiative; do not add lifecycle conditions or a hybrid rule. ## writes Research findings are a pure last-write-wins executor working document; subsequent executor writes may overwrite human edits. Humans generally annotate after investigation concludes; document overwrite semantics clearly. Use dedicated `submit_research_findings(initiative_id, findings)`, not an optional expansion of `submit_evidence`; this keeps the existing contract stable and makes the research write path discoverable. ## precedent Improve precedent retrieval when there is a product corpus (baseline usefulness 18%). For score dispersion, distinguish mechanism from current data: if the live corpus lacks input variation, verify the formula with a realistic event-count sweep yielding >20 distinct scores, and verify the live recompute remains correct. Do not require live data itself to exceed six distinct values when its six raw input combinations mathematically cap that result; future events can add dispersion.
build-doen · promoted · dream at call 10
Doen is a product-engineering spec framework: preserve durable human intent, distinguish constraints from discretion, escalate genuine intent calls, and use precedent. Prioritize capturing human reasoning and grounding artifacts in reality; do not optimize for abstract rule extraction. Prefer simple explicit interfaces and stable contracts, but protect meaningful production architecture; accept narrow fidelity loss when value is marginal. See `purpose` for audience/priorities, `lifecycle` for UI, `writes` for MCP contracts, `precedent` for retrieval verification, `architecture` for tradeoffs, and `corpus` for automated curation. ## purpose Doen serves product engineers (designers, software engineers, product owners) through one durable intent artifact: distinguish constraints from discretion, escalate genuine intent calls, and guide with precedent. Prioritize capturing human reasoning (25 recorded decisions were agent-raised; 9 initiatives yielded none) and grounding generated artifacts in reality (unsupported claims have appeared, risky for non-experts). Improve precedent retrieval once a product corpus exists (18% useful baseline). Do not optimize for abstract engineering-rule extraction: the heuristic flywheel was retired (228 rules yielded 5 useful; circular metric; docs/design-principles.md). Jev is not the verifier for this audience; useful for drafting, groundedness, conflict detection, and weighing precedent. ## lifecycle Do not render the Learn module in Draft or Building; show it only in Learn. Importance recommendation visibility: hide only when the project has exactly one initiative; do not add lifecycle conditions or hybrid logic. Prefer simple, explicit, discoverable interfaces and stable contracts. ## writes Research findings are the executor's working document with pure last-write-wins semantics: later executor writes can overwrite human edits. Humans generally annotate after investigation; document overwrite behavior clearly. Use dedicated `submit_research_findings(initiative_id, findings)`, not an optional expansion of `submit_evidence`; this preserves the existing contract and makes the path discoverable. ## precedent Improve precedent retrieval when a product corpus exists (18% useful baseline). Separate score-dispersion mechanism from current corpus data: if live inputs lack variation, verify the formula with a realistic event-count sweep yielding >20 distinct scores, and verify live recompute correctness. Do not require live data itself to exceed six distinct scores when six raw input combinations mathematically cap dispersion. ## architecture Protect production integrity and meaningful architecture. For the 1536→3072 embedding migration, the user chose extending the migration to halfvec + HNSW rather than accepting a temporarily unindexed retrieval path. For measured migrations/classifier changes, fix in-scope issues and remeasure before deciding; a demonstrated regression prompted rubric iteration and a repeat benchmark, not immediate acceptance or replacement. Weigh scope and marginal value; limited fidelity loss can be acceptable for narrow, low-signal cases when complexity is not justified (e.g. no schema field to preserve a marginal drift-loop signal). ## corpus Preserve coverage: unclustered rules may still be citable; exclusion from clusters is not evidence of low value. Remove the human promotion queue. The dream pass asks Jev whether standalone unclustered rules are sound, well-scoped, condition-bearing guidance; confident yes may admit automatically, otherwise leave raw. Jev may confirm merge/generalization proposals above a confidence threshold; borderline proposals remain for human review, and humans can override. Retirement remains human-gated because removal is harder to trust and reverse. This supersedes earlier human-gate constraints for promotion and merge/generalization, not retirement.
build-doen · promoted · dream at call 15
Doen serves product engineers with one durable intent artifact: preserve human reasoning, distinguish constraints from discretion, escalate genuine intent calls, and ground guidance in precedent. Prefer explicit, stable interfaces; protect meaningful production architecture; accept narrow fidelity loss when marginal value is low. Use deterministic, affordable repo-real gates by default; keep live-LLM evals opt-in. Open `purpose` for audience/priorities, `lifecycle` for UI, `writes` for MCP contracts, `precedent` for retrieval verification, `architecture` for tradeoffs, `corpus` for curation, and `gates` for tests/evals and spec interpretation. ## purpose Doen serves product engineers (designers, software engineers, product owners) through one durable intent artifact: distinguish constraints from discretion, escalate genuine intent calls, and guide with precedent. Prioritize capturing human reasoning (25 recorded decisions were agent-raised across 9 initiatives) and grounding generated artifacts in reality; unsupported claims are risky, especially for non-experts. Improve precedent retrieval once a product corpus exists (18% useful baseline). Do not optimize for abstract engineering-rule extraction: the heuristic flywheel was retired (228 rules yielded 5 useful; circular metric; docs/design-principles.md). Jev helps draft, ground, detect conflicts, and weigh precedent; it is not a verifier of human judgment. ## lifecycle Do not render Learn in Draft or Building; show it only in Learn. Hide importance recommendation only when the project has exactly one initiative; no lifecycle condition or hybrid logic. Prefer simple, explicit, discoverable interfaces and stable contracts. ## writes Research findings are the executor's working document with pure last-write-wins semantics: later executor writes can overwrite human edits. Humans generally annotate after investigation; document overwrite behavior clearly. Use dedicated submit_research_findings(initiative_id, findings), not an optional expansion of submit_evidence; preserve the existing contract and make the path discoverable. ## precedent Improve retrieval when a product corpus exists (18% useful baseline). Separate score-dispersion mechanism from corpus state: if live inputs lack variation, verify the formula with a realistic event-count sweep yielding >20 distinct scores, and verify live recompute correctness. Do not require live data itself to exceed six distinct scores when six raw input combinations mathematically cap dispersion. ## architecture Protect production integrity and meaningful architecture. For 1536→3072 embeddings, extend migration to halfvec + HNSW rather than accept a temporarily unindexed retrieval path. For measured migrations/classifier changes, fix in-scope issues and remeasure before deciding; a demonstrated regression prompted rubric iteration and repeat benchmark, not immediate acceptance or replacement. Weigh scope and marginal value: limited fidelity loss is acceptable for narrow, low-signal cases when complexity is unjustified (e.g. no schema field to preserve marginal drift-loop signal). ## corpus Preserve coverage: unclustered rules may still be citable; absence from clusters does not imply low value. Remove human promotion queue. Dream pass asks Jev whether each standalone unclustered rule is sound, well-scoped, condition-bearing guidance; confident yes may admit automatically, otherwise leave raw. Jev may confirm merge/generalization proposals above a confidence threshold; borderline proposals remain for human review, and humans can override. Retirement remains human-gated because removal is harder to trust and reverse. This supersedes earlier human-gate constraints for promotion and merge/generalization, not retirement. Evaluate all pending judgeable proposals, not just those created in the current pass, to avoid stranding proposals. ## gates Prefer deterministic, affordable, repo-real gates: put cassette-replayed deterministic checks in the default bench; keep live-LLM evals opt-in, non-blocking, and out of default runs. Amend specs to name actual gates; lack of eval scheduling is a separate decision. Avoid paid, nondeterministic judgments blocking merges or uncalibrated thresholds that add flakiness. Preserve criterion intent rather than literal wording that defeats the work; do not weaken assertions. Repairing a stale/broken test interface so its intended guard runs is not weakening it. When a contract deliberately reverses, rewrite tests encoding the old contract and record necessary assertion inversions as intentional exceptions, distinct from weakening checks.
build-doen · promoted · dream at call 20
Doen serves product engineers with one durable intent artifact: preserve human reasoning, distinguish constraints from discretion, escalate genuine intent calls, and ground guidance in precedent. Honor explicit product-owner choices and keep specs, UI, and flows consistent. Prefer explicit stable interfaces; protect meaningful production architecture, while accepting narrow fidelity loss when marginal value is low. Use deterministic, affordable repo-real gates; live-LLM evals stay opt-in. Open `purpose` for priorities and Jev’s role; `lifecycle` for UI and authoring; `writes` for MCP contracts; `precedent` for retrieval verification; `architecture` for tradeoffs; `corpus` for curation; `gates` for tests, measurements, and spec interpretation. ## purpose Doen serves product engineers (designers, software engineers, product owners) with one durable intent artifact: distinguish constraints from discretion, escalate genuine intent calls, and guide with precedent. Prioritize capturing human reasoning (25 recorded decisions were agent-raised across 9 initiatives) and grounding generated artifacts in reality; unsupported claims are risky, especially for non-experts. Improve precedent retrieval once a product corpus exists (18% useful baseline). Do not optimize for abstract engineering-rule extraction: the heuristic flywheel was retired (228 rules yielded 5 useful; circular metric; docs/design-principles.md). Jev helps draft, ground, detect conflicts, and weigh precedent; it is not a verifier of human judgment or behavior. ## lifecycle Do not render Learn in Draft or Building; show it only in Learn. Hide importance recommendation only when the project has exactly one initiative; no lifecycle condition or hybrid logic. Prefer simple, explicit, discoverable interfaces and stable contracts. Honor explicit owner choices and keep constraints, latitude, UI and flow aligned. Reduce startup friction: only description and type required for new initiative; title optional, with description’s first line as readable provisional title. In draft, people can add/edit spec items directly; executors may draft from briefs. After draft, changes go through executor proposals, not unrestricted authorship. ## writes Research findings are the executor's working document with pure last-write-wins semantics: later executor writes can overwrite human edits. Humans generally annotate after investigation; document overwrite behavior clearly. Use dedicated submit_research_findings(initiative_id, findings), not an optional expansion of submit_evidence; preserve existing contract and make the path discoverable. ## precedent Improve retrieval when a product corpus exists (18% useful baseline). Separate score-dispersion mechanism from corpus state: if live inputs lack variation, verify formula with realistic event-count sweep yielding >20 distinct scores, plus live recompute correctness. Do not require live data itself to exceed six distinct scores when six raw input combinations mathematically cap dispersion. ## architecture Protect production integrity and meaningful architecture. For 1536→3072 embeddings, extend migration to halfvec + HNSW rather than accept a temporarily unindexed retrieval path. For measured migrations/classifier changes, fix in-scope issues and remeasure before deciding; demonstrated regression prompted rubric iteration and repeat benchmark, not immediate acceptance or replacement. Weigh scope and marginal value: limited fidelity loss is acceptable for narrow, low-signal cases when complexity is unjustified (e.g. no schema field to preserve marginal drift-loop signal). ## corpus Preserve coverage: unclustered rules may still be citable; absence from clusters does not imply low value. Remove human promotion queue. Dream pass asks Jev whether each standalone unclustered rule is sound, well-scoped, condition-bearing guidance; confident yes may admit automatically, otherwise leave raw. Jev may confirm merge/generalization proposals above confidence threshold; borderline proposals remain for human review, humans can override. Retirement remains human-gated because removal is harder to trust and reverse. This supersedes earlier human-gate constraints for promotion and merge/generalization, not retirement. Evaluate all pending judgeable proposals, not just those created in current pass, to avoid stranding proposals. ## gates Prefer deterministic, affordable, repo-real gates: cassette-replayed deterministic checks in default bench; live-LLM evals opt-in, non-blocking, out of default runs. Amend specs to name actual gates; lack of eval scheduling is a separate decision. Avoid paid, nondeterministic judgments blocking merges or uncalibrated thresholds that add flakiness. Preserve criterion intent rather than literal wording that defeats work; do not weaken assertions. Repairing stale/broken test interface so intended guard runs is not weakening it. When contract deliberately reverses, rewrite tests encoding old contract and record necessary assertion inversions as intentional exceptions, distinct from weakening checks. Use actual measurement channels (SQL and RESEARCH_LOG.md), refresh stale baselines, and leave post-deploy/post-pass outcomes open until observed; a local comparison is not deployment evidence.
build-doen · wiki · dream at call 5
## Doen product principles Doen is a spec framework for product engineers—designers, engineers, and product owners. Its core artifact is one durable statement of intent, with explicit boundaries between constraints and discretion. Escalate genuine intent decisions to people; use precedent to guide work, not to replace judgment. Doen is not an abstract engineering-rule distiller. Retire the heuristic flywheel: 228 extracted rules produced only 5 usable rules, and the circular success metric did not establish product value (docs/design-principles.md). Priorities: capture human reasoning before retrieval (all 25 recorded decisions were agent-raised, and 9 initiatives yielded none); ground generated artifacts, since fabricated references or outcomes destroy trust; improve precedent retrieval once a product corpus exists (useful-rate baseline: 18%). Jev should help draft, ground claims, detect conflicts, and weigh precedent—not act as product-work verifier. Its 71% auto-approval of test criteria and zero human_judgment are by design, not evidence it can judge intent. ## Human judgment and Jev Product intent decisions belong with people. Agents should surface real ambiguities for escalation and support the decision with grounded evidence and relevant precedent; do not treat automated criteria approval as human validation. Jev is useful for drafting, checking groundedness, finding conflicts, and weighing precedent. It is not the verifier of product work: 71% of test criteria were auto-approved and human_judgment was zero by design. A key process gap is that all 25 recorded decisions were raised by agents, while 9 initiatives yielded no recorded decisions; capture human reasoning proactively before relying on retrieval. ## Learn-stage lifecycle The learn model must not be rendered in Draft or Building. Render and display it only in Learn; in Complete, it may be read-only. Enforce lifecycle boundaries structurally rather than showing a disabled or inactive Learn interface in earlier stages. ## Research findings and MCP writes Research findings are the executor's working document. Humans may annotate after investigation concludes, but MCP writes use pure last-write-wins: a later executor write can overwrite human UI edits. Document this clearly; there are no locks, merges, or version tracking. Keep the stable generic submit_evidence contract unchanged. Use a dedicated, discoverable research-specific MCP write tool rather than adding an optional research field to the generic tool. ## Verification with sparse data When a live dataset cannot yet produce the desired distribution because too few distinct input combinations exist, verify the mechanism instead of weakening or indefinitely deferring the criterion. Sweep realistic inputs through the formula and test the expected behavior (for the score-dispersion case, >20 distinct scores), then provide correctness evidence for live recomputation. Accept that the desired live outcome will emerge only as data accumulates. Do not claim live dispersion that the current data cannot mathematically support. ## Importance recommendation visibility Show the importance recommendation unless the project has exactly one initiative. The chosen rule is the simple initiative-count condition, not the BD-46 pattern based on whether an initiative completed after the current initiative's creation date.
build-doen · wiki · dream at call 10
## Doen product principles Doen serves product engineers—designers, engineers, and product owners—with one durable statement of intent and explicit boundaries between constraints and discretion. Escalate genuine intent choices; use precedent to inform, not replace, judgment. Surface architectural consequences that go beyond the spec rather than silently treating them as discretion. Do not optimize for abstract engineering-rule distillation: the heuristic flywheel was retired after 228 extracted rules yielded only 5 usable rules, and its circular success metric did not establish product value. Priorities: capture human reasoning during shaping, before retrieval; ground generated artifacts and verify claims; improve precedent retrieval when a useful product corpus exists. All 25 recorded decisions were agent-raised and 9 initiatives yielded none, so proactive capture is a process need. Jev can assist product work but is not a verifier of product intent. ## Human judgment and Jev Product intent belongs to people. Agents should surface genuine ambiguity and support decisions with grounded evidence and relevant precedent; automated criteria approval is not human validation. Jev is useful for drafting, groundedness checks, conflict detection, and weighing precedent—not for verifying product work. Its 71% auto-approval of test criteria and zero human_judgment reflect a poor fit for judging intent, not evidence of human validation. Human involvement is not a default gate for every operation. Preserve it for genuine intent decisions, uncertain cases, and actions whose removal feels hard to reverse; automate routine, reversible maintenance when confidence is high and retain a human override. ## Heuristic corpus stewardship Keep coverage independent of clustering: an unclustered rule is not necessarily low-value, and lack of clustering is uncorrelated with value. Without a human promotion queue, Jev may admit an unclustered rule as citable guidance only when it confidently judges it sound, well-scoped, and condition-bearing; otherwise leave it raw. Jev may confirm merge and generalisation proposals above a confidence threshold; borderline cases go to human review, with human override available. Keep retirement human-gated: removal feels less reversible, even when a rejected sentinel can restore the rule. Focus human attention on uncertain judgments rather than routine maintenance. ## Product retrieval integrity Preserve indexed production retrieval. A migration that changes embedding dimensions or storage types must account for index support rather than silently leaving production queries on full scans; if necessary, extend the migration with an indexed compatible representation (for example, halfvec with HNSW) instead of accepting an unindexed production window. Small current corpus size does not erase an architectural change. Surface consequences outside the explicit spec and resolve them before production migration. ## Jev classifier evaluation When replacing a classifier, compare it against the existing path on the same representative historical cases and candidate sets. A controlled comparison found Jev family-level dedup accuracy of 55.91%, below the old path's 67.74%; the decision was to iterate on the rubric and remeasure, not ship the regression or conclude Jev is fundamentally unsuitable. When exact rubric wording is within granted discretion, treat a plausible prompt-level cause as an iteration to test against the same benchmark before making a broader product decision. ## Research findings and MCP writes Research findings are the executor's working document. Humans may annotate after investigation concludes, but MCP writes use pure last-write-wins: a later executor write can overwrite human UI edits. Document this clearly; there are no locks, merges, or version tracking. Keep the stable generic submit_evidence contract unchanged. Use a dedicated, discoverable research-specific MCP write tool rather than adding an optional research field to the generic tool. ## Learn-stage lifecycle The learn model must not be rendered in Draft or Building. Render and display it only in Learn; in Complete, it may be read-only. Enforce lifecycle boundaries structurally rather than showing a disabled or inactive Learn interface in earlier stages. ## Verification with sparse data When a live dataset cannot produce the desired distribution because too few distinct input combinations exist, verify the mechanism instead of weakening or indefinitely deferring the criterion. Sweep realistic inputs through the formula and test expected behavior (for score dispersion, more than 20 distinct scores), then provide correctness evidence for live recomputation. Accept that the desired live outcome emerges only as data accumulates. Do not claim live dispersion the current data cannot mathematically support. ## Importance recommendation visibility Show the importance recommendation unless the project has exactly one initiative. The chosen rule is the simple initiative-count condition, not the BD-46 pattern based on whether an initiative completed after the current initiative's creation date. ## Schema and signal proportionality Do not add schema or telemetry merely to preserve a narrow signal when the affected cases have already been acted on and are unlikely to recur. Assess the signal's purpose, scope, and volume, and compare the marginal value of fidelity with the cost of permanent complexity. A deliberate, bounded loss of signal fidelity can be preferable when it has little effect on the decision the signal supports.
build-doen · wiki · dream at call 15
## Doen product principles Doen is a durable shared spec for product engineers—designers, engineers, and product owners. Make intent explicit, distinguish constraints from discretion, and use precedent to inform rather than replace human judgment. Escalate genuine intent choices and surface architectural consequences outside the spec instead of silently treating them as discretion. Prioritize capturing human reasoning during shaping, grounding generated artifacts in reality, then improving precedent retrieval when a useful corpus exists. All 25 recorded decisions were agent-raised and 9 initiatives yielded none, making proactive capture a process need. The product precedent corpus is currently empty. Jev can assist product work but is not a verifier of product intent. The abstract engineering-heuristics flywheel was retired: 228 extracted rules yielded only 5 usable rules, and its circular success metric did not establish product value. See [Human judgment and Jev], [Heuristic corpus stewardship], and [Verification and evaluation gates]. ## Human judgment and Jev Product intent belongs to people. Agents should surface genuine ambiguity and support decisions with grounded evidence and relevant precedent; automated criteria approval is not human validation. Jev can draft, check groundedness, detect conflicts, and weigh precedent, but it does not verify product work. Its 71% auto-approval of test criteria and zero human_judgment reflect a poor fit for judging intent, not evidence of human validation. Human involvement is not a default gate for every operation. Preserve it for genuine intent decisions, uncertain cases, and actions whose removal feels hard to reverse. Automate routine, reversible maintenance when confidence is high, with human override. See [Heuristic corpus stewardship] for admission, merge, and retirement boundaries, and [Jev classifier evaluation] for comparative measurement. ## Heuristic corpus stewardship Keep guidance coverage independent of clustering: an unclustered rule is not necessarily low-value, and lack of clustering is uncorrelated with value. Without a human promotion queue, Jev may admit an unclustered rule as citable guidance only when it confidently judges it sound, well-scoped, and condition-bearing; otherwise leave it raw. The governing invariant is sound judgment, not human-only authorship, with human override available. Jev may confirm merge and generalisation proposals above a confidence threshold; borderline cases go to human review. Retirement stays human-gated because removal feels less reversible, even when a rejected sentinel can restore a rule. Focus human attention on uncertain judgments rather than routine maintenance. Evaluate classifier changes against the old path on identical representative cases and candidate sets; see [Jev classifier evaluation]. Preserve algorithm semantics while fixing structural defects that prevent intended operations (for example, ensuring pending proposals can receive verdicts). ## Product retrieval integrity Preserve indexed production retrieval. A migration that changes embedding dimensions or storage types must account for index support rather than silently leaving production queries on full scans. If needed, extend the migration with an indexed compatible representation (for example, halfvec with HNSW) instead of accepting an unindexed production window. Small current corpus size does not erase an architectural change. Surface consequences outside the explicit spec and resolve them before production migration. ## Jev classifier evaluation When replacing a classifier, compare it with the existing path on the same representative historical cases and candidate sets. One controlled comparison found Jev family-level dedup accuracy of 55.91%, below the old path's 67.74%. The decision was to iterate on the rubric and remeasure, not ship the regression or conclude Jev is fundamentally unsuitable. When exact rubric wording is within granted discretion, test plausible prompt-level causes against the same benchmark before making a broader product decision. ## Research findings and MCP writes Research findings are the executor's working document. Humans may annotate after investigation concludes, but MCP writes use pure last-write-wins: a later executor write can overwrite human UI edits. Document this clearly; there are no locks, merges, or version tracking. Keep the stable generic submit_evidence contract unchanged. Use a dedicated, discoverable research-specific MCP write tool rather than adding an optional research field to the generic tool. ## Learn-stage lifecycle The learn model must not be rendered in Draft or Building. Render and display it only in Learn; in Complete, it may be read-only. Enforce lifecycle boundaries structurally rather than showing a disabled or inactive Learn interface in earlier stages. ## Verification and evaluation gates Verify the intended behavior, not brittle wording or a criterion contradicted by reality. Correct specs when acceptance criteria misstate reality; do not weaken checks merely to pass. Repair stale tests when necessary to make the intended guard work. If a spec deliberately reverses a contract, update tests that encode the old contract; changes that enforce the new contract are in scope, not weakened safeguards. Keep deployment-dependent criteria open/needs_judgment until deployment evidence exists; local comparisons are not production outcomes. Prefer deterministic, reproducible gates. Put deterministic checks in the default suite/bench; keep paid or live-model evaluations opt-in rather than flaky, costly merge blockers. A live eval may be repaired to restore its intended guard, but that does not imply adding it to default CI. Keep eval scheduling and ownership separate from whether evals are default gates. When sparse live data cannot produce a desired distribution, test the
build-doen · wiki · dream at call 20
## Doen product principles Doen is a durable shared spec for designers, engineers, and product owners. Make intent explicit, separate constraints from discretion, and use precedent as evidence—not as a substitute for judgment. Escalate genuine intent choices and surface architectural consequences not covered by the spec rather than silently treating them as discretion. Build for real product work, not abstract rule production. The retired engineering-heuristics flywheel extracted 228 rules but produced only 5 useful ones, and its circular success metric did not demonstrate product value. Current priorities are capturing human reasoning during shaping, grounding generated artifacts in reality, and improving precedent retrieval when a useful product corpus exists. The precedent corpus is currently empty; retrieval optimization is not yet the leading problem. All 25 recorded decisions were agent-raised and 9 initiatives yielded none: proactively capturing human reasoning is a process need. Jev can assist product work but is not a verifier of product intent. See [Human judgment and Jev], [Product shaping and initiative entry], and [Grounded evidence and verification]. ## Human judgment and Jev Product intent belongs to people. Agents should surface genuine ambiguity and support decisions with grounded evidence and relevant precedent. Automated approval criteria are not human validation. Jev can draft, check groundedness, detect conflicts, and weigh precedent; it does not verify product work. Its 71% auto-approval of test criteria and zero human_judgment reflected poor fit for judging intent, not evidence that people validated the work. Human involvement is not a universal gate. Preserve it for genuine intent decisions, uncertain cases, and actions whose removal feels difficult to reverse. Routine, reversible maintenance can be automated at high confidence, with human override. Focus human attention on uncertainty rather than mechanical throughput. See [Heuristic corpus stewardship] for corpus decisions and [Jev classifier evaluation] for comparative measurement. ## Heuristic corpus stewardship Keep guidance coverage independent of clustering: an unclustered rule is not necessarily low-value, and clustering is uncorrelated with value. Without a human promotion queue, Jev may admit an unclustered rule as citable guidance only when it confidently judges the rule sound, well-scoped, and condition-bearing; otherwise leave it raw. The invariant is sound judgment, not human-only authorship, with human override available. Jev may confirm merge and generalisation proposals above a confidence threshold; borderline cases go to human review. Retirement remains human-gated because removal feels less reversible, even if a rejected sentinel could restore a rule. Preserve intended algorithm semantics while repairing structural defects that prevent the operation from ever occurring—for example, pending proposals must remain eligible for verdicts on later passes. See [Jev classifier evaluation] when changing judgment rules and [Product retrieval integrity] for production retrieval concerns. ## Product retrieval integrity Preserve indexed production retrieval. A migration that changes embedding dimensions or storage types must account for index support rather than silently leaving production queries on full scans. If necessary, extend the migration with an indexed compatible representation (for example, halfvec with HNSW) rather than accepting an unindexed production window. A small corpus does not erase an architectural change. Surface consequences outside the explicit spec and resolve them before production migration. ## Jev classifier evaluation When replacing a classifier, compare it with the existing path on identical representative historical cases and candidate sets. One controlled comparison found Jev family-level dedup accuracy of 55.91%, below the old path's 67.74%. The decision was to iterate on the rubric and remeasure—not ship the regression or conclude Jev is fundamentally unsuitable. When exact rubric wording is within granted discretion, test plausible prompt-level causes against the same benchmark before making a broader product decision. Measure changes against a stable comparison, not an incomparable new sample. A result that misses the bar is evidence to investigate and iterate; it is not by itself proof that the approach is irredeemable. ## Product shaping and initiative entry Restore direct human agency during shaping. Executors may draft a spec from the brief; people can add or edit spec items while it is in Draft. Once drafting is over, later changes route through executor proposals. The brief and the spec are distinct: creating an initiative stores the person's brief separately and leaves the spec empty for shaping. Starting an initiative should require only a description and a Build/Research choice (default Build). A title is optional; absent one, the description's first line is a provisional title until the executor names it. Constraints, latitude, and acceptance criteria are optional. Keep interfaces and specs consistent with these required/optional distinctions; stale requirements are not harmless copy. ## Research findings and MCP writes Research findings are the executor's working document. People may annotate after investigation concludes, but MCP writes are pure last-write-wins: a later executor write can overwrite human UI edits. Document this clearly; there are no locks, merges, or version tracking. Keep the stable generic submit_evidence contract unchanged. Use a dedicated, discoverable research-specific MCP write tool rather than adding an optional research field to the generic tool. ## Learn-stage lifecycle The learn model must not be rendered in Draft or Building. Render and display it only in Learn; in Complete, it
resume-builder · dream · dream at call 5
Data model: - `profiles` is the career library for targeting; `resumes` are directly editable documents. Preserve `source_entry_id` / `source_bullet_id` provenance and provide deliberate promotion/write-back for resume edits. Keep `resumes.profile_id` NOT NULL; seed a profile from the first resume. - Track profile-to-resume variant drift with integer `profiles.version`, bumped on profile, entry, or bullet writes; copy it to `resumes.profile_version` when generating a variant. Drift is version inequality. Do not rely on `profiles.updated_at` for child edits. - Keep `skills` and `profile_skills` when committed requirements need shared vocabulary or cross-user analytics. For alias normalization and `resume_keywords.skill_id`, retain canonical skill IDs and `skills.aliases`; otherwise prefer fewer tables absent concrete requirements. Editing and revisions: - Separate continuous autosave during active typing (persist content, no revision snapshot) from the idle-gap timeout (a distinct trigger that creates exactly one revision row per timeout). Do not suppress an idle-gap snapshot because another snapshot was recently taken; the timeout itself always triggers one. Testing and database compatibility: - When PostgreSQL JSONB requirements collide with unchanged SQLite tests that call `Base.metadata.create_all`, define each JSONB column as `JSONB().with_variant(sqlite.JSON, 'sqlite')`. Production, migrations, and Postgres retain real JSONB; existing tests stay untouched. - Use a dedicated Postgres-backed fixture for behavior SQLite cannot validate (e.g. CHECK constraints and in-place JSONB mutation). Avoid moving the whole suite to Postgres or splitting ORM metadata.
resume-builder · dream · dream at call 10
Data model: `profiles` is the career library for targeting; `resumes` are directly editable documents. Preserve `source_entry_id`/`source_bullet_id` provenance and provide deliberate promotion/write-back for resume edits. Keep `resumes.profile_id` NOT NULL; seed a profile from the first resume. Track variant drift with integer `profiles.version`, bumped on profile, entry, or bullet writes; copy to `resumes.profile_version` on generation. Drift is version inequality, not `updated_at` (child edits may not update it). Keep skills tables/canonical IDs/aliases when shared vocabulary or analytics require them; here committed alias normalization and `resume_keywords.skill_id` needs justify retaining them. Editing/revisions: Autosave active typing without snapshots. Each checkpoint event produces exactly one revision; coalesce simultaneous triggers into one revision while recording every cause. Idle-gap timeout is its own trigger and always creates a revision, even soon after another snapshot; include coincident causes. Authorization/privacy: Return 404 for nonexistent and cross-user resources; scope ownership in queries so foreign rows are never loaded. Keep 401 for unauthenticated requests; never use 403 for cross-user access. Test unauthenticated and cross-user cases separately. For conflicting specs, prioritize consistent API privacy/security invariants over inherited wording; document superseded criteria and rationale. Testing/database: For PostgreSQL JSONB with unchanged SQLite tests using `Base.metadata.create_all`, use `JSONB().with_variant(sqlite.JSON, 'sqlite')`; production/migrations/Postgres retain JSONB. Use dedicated Postgres fixtures for behavior SQLite cannot validate (e.g. CHECK constraints, in-place JSONB mutation); don't split ORM metadata or move the whole suite. Resume generation/compliance: Severity ERROR blocks generation; warnings do not. Persist all findings to `resumes.compliance` and show them in editor. Required-field errors (e.g. ME nationality) are valid failures; ask the user to supply the field, never bypass compliance. Worker/shared code: Prefer the smallest reversible worker change: build from repo root, COPY `api/` and `worker/`, add `api/` to `PYTHONPATH`, and include required AI dependencies in `worker/requirements.txt`. Keep JevClient, OpenRouter client, ReviewAction, and `check_compliance()` as single sources of truth; delete stale `worker/app/shared/` forks. Railway worker needs repo-root build context and explicit worker Dockerfile. Shared-package extraction is separate (tracked in `docs/todo.md`). Prompts: Establish one `api/app/prompts/` convention for prompt text, including moving `SYSTEM_PROMPT` out of `api/app/ai/review.py` into a file there. Keep its name, module, and exact text; load from the file so behavior and existing review tests remain unchanged. A spec's claim that a directory already exists may be false; establish the intended convention consistently rather than adding competing prompt styles. Touching a shared module is acceptable for a strictly behavior-preserving migration when it prevents lasting convention drift.
resume-builder · dream · dream at call 15
Product/data model: `profiles` is the career library; `resumes` are directly editable documents with deliberate promotion/write-back and `source_entry_id`/`source_bullet_id` provenance. Keep `resumes.profile_id` NOT NULL; seed a profile from the first resume. Track drift with integer `profiles.version`, bumped on profile/entry/bullet writes and copied to `resumes.profile_version` on generation; compare versions, not timestamps. Keep skills tables, canonical IDs, aliases, and shared vocabulary for normalization/analytics. Resume direction: `resumes.content = {markdown: "..."}` is one pure free-text Markdown document: no required or recognized sections, headings, fields, or structural contract. One Tiptap editor means genuinely free text, not rigid slots or one editor per section. Downstream structure-dependent work (generation, formatting, compliance, keyword/evidence attribution) must use GenAI to understand it. RB-12 remains shipped/verified, but its schema and renderer assumptions are superseded; existing structured rows require data conversion even without DDL. Revisit incompatible field-based behavior in provenance/guards, keyword acceptance/evidence, compliance checks, and outline/reordering. Deliberately define supported Markdown; RB-10 remains authority on ATS safety. Concurrency: `version_token` represents client-editable state, not row-touch time. Hash content, presentation, title, status, `template_key`, and `region_code`; exclude `updated_at` to prevent false conflicts from derived writes/SQLite precision. Identical state may produce the same token. Retain score recomputation/persistence behavior. Authorization/privacy: scope ownership in queries so foreign rows are never loaded; return 404 for nonexistent and cross-user resources, 401 unauthenticated, never 403 cross-user. Test these cases separately. Compliance: ERROR findings block generation; warnings do not. Persist and surface all findings. A market-required missing field (e.g. nationality) correctly blocks generation. Database/testing: For PostgreSQL JSONB with SQLite `create_all`, use `JSONB().with_variant(sqlite.JSON, 'sqlite')`; retain PostgreSQL production/migrations and dedicated PostgreSQL tests where SQLite cannot validate behavior. Do not split ORM metadata or move the whole suite. Use Playwright against the running stack when acceptance depends on browser/editor behavior or literal cross-tier parity; jsdom/manual evidence is insufficient. Assert persisted content via API; keep revision-row counts in pytest. Browser coverage may expose pre-existing defects. Revisions: Autosave active typing without snapshots. Each checkpoint event creates one revision; coalesce simultaneous triggers into one row while recording every cause. Idle-gap timeout is its own trigger and always creates a revision, even soon after another snapshot; include coincident causes. Worker/shared code: Prefer the smallest reversible worker change; when shared API code is needed, build worker from repo root with API on `PYTHONPATH` and dependencies, rather than forked shared modules. A broader shared-package extraction is separate work. Prompts: establish one `api/app/prompts/` convention and migrate existing prompt constants behavior-preservingly rather than maintain competing conventions.resume-builder · dream · dream at call 20
Product model: `profiles` is the career library; `resumes` are editable documents with deliberate promotion/write-back and `source_entry_id`/`source_bullet_id` provenance. Keep `resumes.profile_id` NOT NULL (seed profile from first resume). Track drift with integer `profiles.version`, bumped on profile/entry/bullet writes and copied to `resumes.profile_version` at generation; compare versions, not timestamps. Keep skills tables, canonical IDs, aliases, shared vocabulary for normalization/analytics. Resume content is free-text Markdown `{markdown: ...}` with no required/recognized structure; structural downstream work uses GenAI. RB-12 shipped/verified, but its schema/renderer assumptions are superseded; convert existing structured rows even without DDL. Revisit incompatible field-based provenance/guards, keyword/evidence, compliance, outline/reordering. RB-10 governs ATS-safe formatting; RB-11 quantification. Revision policy: every idle-gap timeout creates one revision snapshot; continuous autosave does not. Simultaneous checkpoint conditions produce one revision, retaining all fired-condition flags. RB-9 guidance producer is keywords only: no whole-document GenAI, deterministic checks, or compliance findings. Queue is derived, not authoritative. Items need exact-line anchor `{quote, occurrence}`, claim, reason, status, and `proposed_change` retaining the user's sentence with term worked in. Accept is atomic scoped find/replace; stale quote drops item. Resolve staleness on reads/acceptance, not autosave. Dismissal key hashes category + normalized quote. Accept updates `resumes.content`; no job target means empty queue is normal. Hard compliance verdicts stay separate from advisory guidance. Compliance errors block generation; warnings do not; persist/surface findings, and market-required fields may block. Guidance UI: exactly one active card, while full open queue/anchors are available; server ordering is default, user can select active item. Mark open suggestions on anchored lines with quiet, layout-neutral dotted underlines (text-decoration/inset shadow; no borders), quieter than active solid underline/tint. Count marked lines, not suggestions; panel count gives total. Clicking an anchored line activates its suggestion and places caret normally; repeated clicks cycle suggestions on that line. Stale anchors suppress their marks. This supersedes margin ticks, per-suggestion mark counts, and no-caret-on-mark. Watch whether card changes during editing feels helpful or startling. Scores: overview must not show/restore score; RB-9 removed score, scorer, endpoints/API field. Do not substitute Compliance (only persisted after targeted generation; GET recomputes without persistence, and reads must not write). Overview: title, created, updated, actions; archived adds archived_at. Duplicate copies actual fields (title, content, presentation, compliance, profile_version, job_target_id), never score. Concurrency: `version_token` hashes client-editable state (content, presentation, title, status, `template_key`, `region_code`), excludes `updated_at`; identical state may share token. Ownership queries scope by user: foreign/nonexistent=404, unauthenticated=401, never cross-user 403. Implementation/testing preferences evidenced: reuse one renderer for exact parity; one editor for whole document, notresume-builder · dream · dream at call 25
Product model: `profiles` is the career library; `resumes` are editable documents with deliberate promotion/write-back and `source_entry_id`/`source_bullet_id` provenance. Keep `resumes.profile_id` NOT NULL (seed profile from first resume). Drift: integer `profiles.version`, bump on profile/entry/bullet writes; copy to `resumes.profile_version` at generation; compare versions, not timestamps. Keep canonical skills tables/IDs/aliases/shared vocabulary. Resume content is free-text Markdown `{markdown: ...}`, with no required structure; use GenAI downstream. RB-12 shipped/verified historically, but its structured schema/renderer assumptions are superseded; convert existing structured rows even without DDL. Revisit incompatible field-based provenance/guards, keyword/evidence, compliance, outline/reordering. RB-10 ATS-safe formatting; RB-11 quantification. One Tiptap/ProseMirror editor for the whole resume; avoid editor boundaries. Render from renderer HTML where possible. Browser behavior warrants Playwright E2E; prefer SQLite-compatible type variants for existing tests, with real-Postgres checks for Postgres-only behavior. Revisions: each idle-gap timeout creates one snapshot; continuous autosave does not. Simultaneous checkpoint triggers produce one revision with all flags. Scope ownership reads so cross-user and nonexistent resources both return 404 (unauthenticated 401). Avoid read-side writes that invalidate editor concurrency tokens; hash client-editable state, not `updated_at`. RB-9 guidance producer was keywords only (no whole-doc GenAI, deterministic checks, or compliance), but later calibration findings can become a second producer. Queue is derived, not authoritative. Items use exact-line anchor `{quote, occurrence}`, claim, reason, status, and `proposed_change` retaining user's sentence with term worked in. Accept atomic scoped find/replace; stale quote drops item. Resolve staleness on reads/accept, not autosave. Dismissal key hashes category + normalized quote. Accept updates `resumes.content`; absent job target means empty queue is normal. Calibration response/findings remain read-only/unpersisted; only user-selected, grounded findings become queue items, never direct-apply. Need verbatim anchor + exact replacement; unresolved anchors offer no accept; gaps may anchor preceding line or have no action. After acceptance editor adopts returned content/version token (avoid autosave 409). Compliance verdicts differ from advisory guidance: errors block generation, warnings do not; persist/surface findings; market-required fields may block. No scores/scorer/API; do not substitute Compliance in overview (persisted only after targeted generation; GET recomputes without writing). Guidance UI: one active card, whole queue/anchors; server order default, user-selectable active. Quiet layout-neutral dotted underline on open anchored lines, quieter than active solid underline/tint. Mark lines, not items; panel count is total. Clicking line activates suggestion and places normal caret; repeat clicks cycle. Stale anchors unmarked. Watch whether card changes during editing feels helpful or startling. Guided Assistant: RB-20 remains shipped/verified historical scope, not a requirement to retain its findings column/prose panel. Remove thoseresume-builder · dream · dream at call 30
Product model: `profiles` are career libraries; `resumes` are editable, role-specific documents with deliberate promotion/write-back and source provenance. Keep `resumes.profile_id` NOT NULL (seed a profile from the first resume). Profiles use integer `version` counters copied to resumes at generation; compare versions, not timestamps. Preserve canonical skills tables, IDs, aliases and shared vocabulary. Resume content is free-text Markdown (`{markdown: ...}`): no required sections or field schema; downstream evaluation/formatting uses GenAI. Supersedes RB-12's structured model: convert existing rows without DDL. Revisit field-based provenance/guards, keyword evidence, compliance structure and outline/reordering assumptions. Keep ATS-safe formatting and quantification guidance within RB-10/RB-11. Use one editor for the whole resume, not per-field/section editors. Concurrency: tokens hash client-editable state, not `updated_at` or read-side derived writes. Autosave does not create revisions; each idle-gap timeout creates one snapshot. Simultaneous checkpoint triggers create one revision flagged for every trigger. After an accepted change, adopt returned content/token to avoid stale autosave conflicts. Scope ownership reads so cross-user and nonexistent resources both return 404; unauthenticated is 401. Guidance queue is derived, not authoritative. Anchors are exact `{quote, occurrence}`; accept is scoped atomic replacement, and stale anchors are dropped, not applied. Resolve staleness on read/accept, not autosave. Dismissal identity hashes category plus normalized quote. Accept updates resume content; no job target can mean an empty queue. Keyword guidance began as the sole producer; calibrated findings later became a second producer only when user-selected and grounded, with verbatim anchor and exact replacement. Unresolved findings have no accept action; calibration responses themselves remain unpersisted. Requirement item keys use category + stable requirement ID, not wording; retain decisions for surviving requirements. Guided Assistant is the sole guidance surface: proposal cards in-thread with diff/reason, Apply, Not now and Undo, reached from agenda, queue popover or document cues. Remove the separate suggestions panel; preserve document marks as location cues. Clicking marked text behaves normally (caret stays, composer scopes to line); do not auto-open a card or hijack typing. Marks may be dense. Rewrite the 29 RB-18/19 browser tests for thread behavior, not delete them. Assistant is guided, not general-purpose chat. One role/context/thread per resume; duplicate for another role, but do not copy thread/requirement decisions. Unfilled placeholders warn but never block PDF export. Follow updated C2 prototype: two-tab rail (Assistant, Document); move properties into Document and Auto adjust into formatting row. Do not follow the older out-of-scope line. Other implementation preferences: Playwright real-browser E2E for browser behavior; SQLite-compatible type variants inresume-builder · promoted · dream at call 5
Product decisions: users own and edit professional materials; AI supports without blocking. Profiles are career libraries; resumes are editable targeted documents. Keep only tables justified by committed requirements. Track provenance and profile drift explicitly; timestamps are insufficient. Open `model` for profile/resume and skills choices; `drift` for versioning; `jsonb-tests` for database/testing constraints; `revisions` for autosave snapshots. ## model Profiles are career libraries containing the union of a user's experience; resumes are directly editable, targeted documents. Both are product surfaces, with explicit promote/write-back from resume edits to profile. Every resume has NOT NULL profile_id; first run seeds a profile from the first resume. Preserve source_entry_id/source_bullet_id provenance from resume content to profile entries. Localization adapts resume structure, length, formatting, and cultural norms to target market. Skills remain separate skills + profile_skills tables because committed RB-5 requirements use skills.aliases to normalize variants (e.g. K8s/Kubernetes) and resume_keywords.skill_id; general rule is collapse arguable tables unless a concrete planned requirement justifies them. ## drift Track variants explicitly: profiles.version increments on any profile, entry, or bullet write; copy to resumes.profile_version at generation. Drift is profile.version != resume.profile_version. Do not use updated_at: child edits may not update parent timestamps, and historical state cannot be reconstructed later. ## jsonb-tests For PostgreSQL JSONB columns, use JSONB().with_variant(sqlite.JSON, 'sqlite') so production/migrations/Postgres retain JSONB while existing SQLite tests and Base.metadata.create_all continue unchanged. Add a separate Postgres-backed fixture for behavior SQLite cannot validate, including shares CHECK constraints and in-place JSONB mutation. Do not rewrite the existing test suite or split ORM metadata. ## revisions Continuous autosave writes resume content during active typing without creating snapshots. Each idle-gap timeout is its own distinct trigger and always creates exactly one named revision snapshot, separate from continuous autosave; do not make snapshot creation conditional on comparing content since the prior snapshot.
resume-builder · promoted · dream at call 10
Product: user-owned career library plus editable, targeted resumes; AI assists without blocking except compliance ERRORs. Prefer the smallest reversible change; establish one convention when alternatives risk lasting drift. Cross-user resources return 404 (ownership-scoped queries); unauthenticated returns 401. Keep only tables justified by committed requirements. Open `model` for domain/schema choices; `drift` for profile versioning; `storage-tests` for JSONB/testing; `revisions` for checkpoints; `workflow-api` for compliance, authorization, worker and prompts. ## model Profiles are career libraries (union of experience); resumes are directly editable targeted documents, with explicit promote/write-back. Every resume has NOT NULL profile_id; first run seeds a profile from the first resume. Preserve source_entry_id/source_bullet_id provenance. Localization adapts structure, length, formatting and cultural norms to market. Keep skills + profile_skills: committed RB-5 requires skills.aliases normalization and resume_keywords.skill_id; otherwise collapse arguable tables absent concrete requirements. ## drift Track profile variants with profiles.version, incremented on any profile, entry or bullet write; copy to resumes.profile_version at generation. Drift is version inequality. Do not use updated_at: child edits may not update parent timestamps and historical state cannot be reconstructed. ## storage-tests Use JSONB().with_variant(sqlite.JSON, 'sqlite') for JSONB columns: retain PostgreSQL JSONB in production/migrations while existing SQLite tests and Base.metadata.create_all remain unchanged. Add a separate PostgreSQL fixture for behavior SQLite cannot validate (including shares CHECK constraints and in-place JSONB mutation). Do not rewrite existing test suite or split ORM metadata. ## revisions Continuous autosave updates resume content during active typing and creates no snapshots. Each idle-gap timeout is a distinct trigger and ordinarily creates one named revision, regardless of content comparison. If multiple checkpoint conditions fire together, create exactly one revision record and record every fired condition/trigger; do not create one row per overlapping condition. ## workflow-api Workflow: user-driven, AI-supported; user owns professional history, AI is on-demand reviewer/enhancer/localizer. Generation calls check_compliance before writing resume: ERROR findings block; warnings do not. Persist all findings in resumes.compliance and surface in editor. Germany warning-only generation proceeds; missing required Middle East nationality blocks and should prompt user. Auth: unauthenticated=401; cross-user=404 like nonexistent, with ownership scoped in DB query so foreign rows are never loaded. Test these cases separately; 404 supersedes RB-3's inherited 403 requirement to avoid existence leaks and inconsistent API behavior. Worker constraint resolution: build worker from repo-root Docker context, copy api/ and worker/, add api/ to PYTHONPATH and AI dependencies to worker requirements; delete stale worker/app/shared duplicate. Railway worker must use repo root and explicit Dockerfile path. Shared-package extraction remains a separate infrastructure initiative. Prompts: establish api/app/prompts/, move existing SYSTEM_PROMPT there while preserving its name, module exposure, exact text and behavior; verify existing review tests unchanged.
resume-builder · promoted · dream at call 15
Users own and edit career history; AI assists on demand and blocks only compliance ERRORs. Resumes are editable, targeted documents; prefer minimal reversible changes, but establish one convention where alternatives risk lasting drift. Cross-user resources return 404 via ownership-scoped queries; unauthenticated requests return 401. Keep only requirement-backed tables. Open `model` for domain/schema; `content` for the free-text direction and downstream impacts; `workflow-api` for compliance/auth/infrastructure; `editor` for rendering, browser tests and concurrency tokens. Other notes: `drift`, `storage-tests`, `revisions`.
## model
Profiles are the career library (union of experience); resumes are directly editable targeted documents with explicit promote/write-back and source_entry_id/source_bullet_id provenance. Every resume has NOT NULL profile_id; first run seeds a profile from its first resume. Localization adapts structure, length, formatting and cultural norms to market. Keep skills + profile_skills: RB-5 requires skills.aliases normalization and resume_keywords.skill_id.
## content
Current direction supersedes RB-12's structured schema: resumes.content is one free-form Markdown document (target {markdown: "..."}); no required sections, headings-as-boundaries, fields or rigid slots. Use one Tiptap editor for the entire resume, but do not impose a structured ProseMirror document model. Anything needing semantic structure (compliance, keyword attribution, section/order analysis, generation/evidence) must use GenAI to interpret the document. Treat as product direction change, not an RB-12 defect. Existing structured JSONB rows need data conversion despite no DDL. Revisit dependent specs: generation/provenance, keyword acceptance, compliance, outline/reordering, rendering/PDF, supported Markdown. RB-10 remains authority on ATS safety.
## drift
Track profile variants with profiles.version, incremented on any profile, entry or bullet write; copy to resumes.profile_version at generation. Drift is version inequality. Do not use updated_at: child edits may not update parent timestamps and historical state cannot be reconstructed.
## storage-tests
Use JSONB().with_variant(sqlite.JSON, 'sqlite') for JSONB columns: retain PostgreSQL JSONB in production/migrations while existing SQLite tests and Base.metadata.create_all remain unchanged. Add a separate PostgreSQL fixture for behavior SQLite cannot validate (including shares CHECK constraints and in-place JSONB mutation). Do not rewrite existing test suite or split ORM metadata.
## revisions
Continuous autosave updates resume content during active typing and creates no snapshots. Each idle-gap timeout is a distinct trigger and ordinarily creates one named revision, regardless of content comparison. If multiple checkpoint conditions fire together, create exactly one revision record and record every fired condition/trigger; never create one row per overlapping condition.
## workflow-api
Workflow is user-driven, AI-supported; AI is an on-demand reviewer/enhancer/localizer. Generation calls check_compliance before writing: ERROR findings block; warnings do not. Persist all findings in resumes.compliance and surface in editor. Germany warning-only generation proceeds; missing required Middle East nationality blocks and should prompt user. Auth: unauthenticated=401; cross-user=404 like nonexistent, with ownership scoped in DB query so foreign rows are never loaded. Test separately; 404 supersedes inherited RB-3 403. Worker: repo-root Docker context, copy api/ and worker/, add api/ to PYTHONPATH and AI deps to worker requirements; delete stale worker/app/shared duplicate. Railway worker uses repo root and explicit Dockerfile path. Shared-package extraction is separate. Prompts: establish api/app/prompts/, move existing SYSTEM_PROMPT there preserving name, module exposure, exact text and behavior; existing review tests unchanged.
## editor
Prefer backend-rendered HTML for rendering parity: use render_resume_html(standalone=False) output as the editing surface, with semantic editable nodes/path attributes; structural edits update local content and re-fetch rendered body. The read-only render endpoint addition needs no schema/migration. Use real-browser Playwright E2E (with axe), not jsdom/manual evidence; verify persistence via API and maintain a reusable runnable harness. Concurrency tokens identify client-editable document state: hash content, presentation, title, status, template_key and region_code; exclude updated_at and derived values so read-triggered writes do not invalidate editor writes. Prefer sound token semantics over non-mutating feedback reads or requiring every endpoint to return fresh tokens.resume-builder · promoted · dream at call 20
Users own/edit career history; AI assists on demand and blocks only compliance ERRORs. Resumes are targeted, editable Markdown documents; prefer minimal reversible changes, but establish one convention where alternatives risk drift. Cross-user resources return 404 via ownership-scoped queries; unauthenticated requests return 401. Keep only requirement-backed tables. Open `model` for domain/schema; `content` for Markdown direction and impacts; `workflow-api` for compliance/auth/infrastructure; `editor` for rendering, browser tests and concurrency; `guidance` for suggestions/UI; `overview` for tables. Also: `drift`, `storage-tests`, `revisions`.
## model
Profiles are the career library (union of experience); resumes are directly editable targeted documents with explicit promote/write-back and source_entry_id/source_bullet_id provenance. Every resume has NOT NULL profile_id; first run seeds a profile from its first resume. Localization adapts structure, length, formatting and cultural norms to market. Keep skills + profile_skills: RB-5 requires skills.aliases normalization and resume_keywords.skill_id.
## content
Current direction supersedes RB-12's structured schema: resumes.content is one free-form Markdown document (target {markdown: "..."}); no required sections, headings-as-boundaries, fields or rigid slots. Do not impose a structured ProseMirror document model. Anything needing semantic structure (compliance, keyword attribution, section/order analysis, generation/evidence) must use GenAI to interpret the document. Treat as product direction change, not an RB-12 defect. Existing structured JSONB rows need data conversion despite no DDL. Revisit dependent specs: generation/provenance, keyword acceptance, compliance, outline/reordering, rendering/PDF, supported Markdown. RB-10 remains authority on ATS safety.
## drift
Track profile variants with profiles.version, incremented on any profile, entry or bullet write; copy to resumes.profile_version at generation. Drift is version inequality. Do not use updated_at: child edits may not update parent timestamps and historical state cannot be reconstructed.
## storage-tests
Use JSONB().with_variant(sqlite.JSON, 'sqlite') for JSONB columns: retain PostgreSQL JSONB in production/migrations while existing SQLite tests and Base.metadata.create_all remain unchanged. Add a separate PostgreSQL fixture for behavior SQLite cannot validate (including shares CHECK constraints and in-place JSONB mutation). Do not rewrite existing test suite or split ORM metadata.
## revisions
Continuous autosave updates resume content during active typing and creates no snapshots. Each idle-gap timeout is a distinct trigger and ordinarily creates one named revision, regardless of content comparison. If multiple checkpoint conditions fire together, create exactly one revision record and record every fired condition/trigger; never create one row per overlapping condition.
## workflow-api
Workflow is user-driven; AI is on-demand reviewer/enhancer/localizer. Generation calls check_compliance before writing: ERROR findings block; warnings do not. Persist all findings in resumes.compliance and surface in editor. Germany warning-only generation proceeds; missing required Middle East nationality blocks and should prompt user. Auth: unauthenticated=401; cross-user=404 like nonexistent, with ownership scoped in DB query so foreign rows are never loaded. Test separately; 404 supersedes inherited RB-3 403. Worker: repo-root Docker context, copy api/ and worker/, add api/ to PYTHONPATH and AI deps to worker requirements; delete stale worker/app/shared duplicate. Railway worker uses repo root and explicit Dockerfile path. Shared-package extraction is separate. Prompts: establish api/app/prompts/, move existing SYSTEM_PROMPT there preserving name, module exposure, exact text and behavior; existing review tests unchanged.
## editor
Use one Tiptap editor for the entire free-form Markdown resume; do not revive RB-12's custom structured ProseMirror schema/fields. For rendering parity, prefer backend-rendered HTML from render_resume_html(standalone=False) as editing surface, with semantic editable nodes/path attributes; structural edits update local Markdown and re-fetch rendered body. Read-only render endpoint addition needs no schema/migration. Use real-browser Playwright E2E (with axe), not jsdom/manual evidence; verify persistence via API and maintain a reusable runnable harness. Concurrency tokens hash client-editable state: content, presentation, title, status, template_key and region_code; exclude updated_at and derived values so read-triggered writes do not invalidate editor writes. Prefer sound token semantics over non-mutating feedback reads or requiring every endpoint to return fresh tokens.
## guidance
Guidance is an advisory queue, separate from hard compliance. RB-9 producer is keywords only (no whole-document AI, deterministic checks, or compliance findings); acceptance atomically replaces an exact text occurrence and marks accepted. Anchor={quote, occurrence}; stale anchors drop at read/accept, not autosave. Dismissal hashes category + normalized quote. RB-18/RB-20: panel has one active card; API/open queue exposes anchors; user selection overrides document-position default. Document uses quiet, layout-neutral dotted underline per anchored line, not per suggestion; stale anchors get no mark. Clicking marked line selects its suggestion and places caret normally; repeated clicks cycle suggestions sharingresume-builder · promoted · dream at call 25
Users own career history and documents; AI advises on demand, never edits autonomously or blocks export; only compliance ERRORs block generation. Resumes are editable targeted Markdown; prefer minimal reversible changes, except establish one convention where drift risk is real. Open `core` for product principles; `model` for domain/cardinality/drift; `content` for Markdown; `workflow` for compliance/auth/infra; `editor` for rendering/concurrency; `guidance` for anchors/queue; `assistant` for RB-21/C2; `tests` for test strategy; `revisions` for snapshots; `overview` for table scope.
## core
Users own and manually manage professional history. AI is an on-demand reviewer, enhancer and localizer—not a blocker or autonomous editor. Localization adapts structure, length, formatting and cultural norms to target markets. Never withhold documents/exports based on product judgment: warn and count placeholders, but let users export.
## model
Profiles are the career library; resumes are directly editable targeted documents with explicit promote/write-back and source_entry_id/source_bullet_id provenance. Every resume has NOT NULL profile_id; first run seeds profile from first resume. Keep skills + profile_skills: RB-5 requires skills.aliases normalization and resume_keywords.skill_id. Drift uses profiles.version incremented on any profile/entry/bullet write, copied to resumes.profile_version at generation; compare versions, never updated_at.
## content
Resumes are one free-form Markdown document, target {markdown:"..."}; no required headings, sections, fields, rigid slots or structured ProseMirror schema. This supersedes RB-12 structure, not a defect in its shipped work. Convert existing structured JSONB rows. Any downstream semantic needs (compliance, keyword attribution, section/order, generation/evidence) must use GenAI to interpret. RB-10 remains ATS-safety authority; revisit dependent generation/provenance, keyword, compliance, outline, rendering/PDF and supported-Markdown specs.
## workflow
User-driven workflow; check_compliance before generation writes: ERROR blocks, warnings persist in resumes.compliance and surface in editor; Germany warning-only proceeds, missing required Middle East nationality blocks/prompts. Auth: unauthenticated 401; cross-user 404 like nonexistent, ownership-scoped DB queries must not load foreign rows; test separately. Worker build uses repo-root Docker context, copies api/ and worker/, adds api/ to PYTHONPATH and AI deps; delete stale worker/app/shared. Railway uses repo root + explicit Dockerfile. Shared-package extraction is separate. Establish api/app/prompts/, move SYSTEM_PROMPT preserving name/module exposure/exact text/behavior; review tests unchanged.
## editor
One Tiptap editor for entire free-form Markdown; no custom structured schema or per-section editors. For parity, use backend render_resume_html(standalone=False) HTML with editable semantic nodes/path attributes; structural edits change local Markdown and re-fetch rendered body. Read-only render endpoint needs no migration. Playwright real-browser E2E (with axe), not jsdom/manual evidence; reusable runnable harness. Concurrency token hashes client-editable content, presentation, title, status, template_key, region_code; excludes updated_at/derived values so read-triggered writes don't invalidate edits.
## guidance
Guidance is advisory, distinct from hard compliance. Queue acceptance atomically replaces an exact text occurrence and marks accepted; anchor={quote, occurrence}; stale anchors drop at read/accept, not autosave. Dismissal hashes category + normalized quote. RB-9 producer was keywords only; calibrated findings later chosen as another producer via guidance queue, not a second apply path. Accept-ready items need exact anchor + replacement; omit stale/unresolvable anchors; gaps may anchor preceding line or have no accept action. Editor adopts returned content/version. RB-18 stays shipped: one active card, but document marks all open anchors. RB-19 marks one quiet dotted underline per anchored line; clicking selects/cycles suggestions sharing line and places caret normally.
## assistant
RB-20 remains shipped/verified foundation; new Guided Assistant is RB-21 from C2 UX/design docs, merge design branch into main. Assistant replaces unpublished RB-20 findings column/prose panel outright; sole guidance surface. Keep job_profile_text, OpenRouter calibration, missing-input/empty-document guards, exact-once grounding, guidance-queue adoption and app/prompts/tone.txt. C2 adds durable per-resume thread, per-requirement status and skipped/dismissed decisions. One role/context/thread per resume; duplicate for another role; duplicate carries document/context, not thread or requirement decisions. Placeholder export pill/count and marks warn but never block.
## tests
For JSONB use JSONB().with_variant(sqlite.JSON,'sqlite'): retain PostgreSQL JSONB while existing SQLite tests and Base.metadata.create_all stay unchanged. Add separate PostgreSQL fixture for behavior SQLite cannot validate (shares CHECK constraints, in-place JSONB mutation); don't split metadata or rewrite existing suite. Playwright + @axe-core/playwright drives real running stack; reusable config and make target. Assert persisted content through API; server-side revision counts in pytest.
## revisions
Continuous autosave updates resume content during active typing and creates no snapshots. Each idle-gap timeout is a distinct trigger and ordinarily creates one named revision, regardless of content comparison. If checkpoint conditions overlap, write exactly one revision rowresume-builder · promoted · dream at call 30
Users own career history and documents; AI advises on demand and never edits autonomously or blocks export. Only compliance ERRORs block generation. Resumes are editable free-form Markdown; downstream structure is AI-interpreted. Prefer minimal reversible changes, except establish one convention where drift risk is real. Open `core` for product principles; `model` for domain/drift; `content` for Markdown; `workflow` for compliance/auth/infra; `editor` for rendering/concurrency; `guidance` for anchors/marks; `assistant` for RB-21/C2; `tests` for test strategy; `revisions` for snapshots; `overview` for table scope.
## core
Users own and manually manage professional history and documents. AI is an on-demand reviewer/enhancer/localizer, never an autonomous editor or gatekeeper. Adapt to target-market norms, but never withhold documents/exports by product judgment. Warn/count placeholders and mark them in-document; export remains available.
## model
Profiles are the career library; resumes are directly editable targeted documents with explicit promote/write-back and source_entry_id/source_bullet_id provenance. resumes.profile_id stays NOT NULL; first run seeds profile from first resume. Keep skills + profile_skills; RB-5 requires aliases normalization and resume_keywords.skill_id. Drift: increment profiles.version on any profile/entry/bullet write, copy to resumes.profile_version at generation; compare versions, not updated_at.
## content
A resume is one free-form Markdown document: {markdown:"..."}; no required headings, sections, fields, slots, or structured editor schema. This supersedes RB-12's shipped structure; convert existing JSONB rows. Downstream semantics (compliance, keywords, order, evidence/provenance) must be interpreted by GenAI. RB-10 remains ATS-safety authority; revisit dependent generation, keyword, compliance, outline, rendering/PDF, and supported-Markdown specs.
## workflow
User-driven. check_compliance before generation writes: ERROR blocks; warnings persist in resumes.compliance and surface in editor. Germany warnings proceed; missing required Middle East nationality blocks/prompts. Auth: unauthenticated 401; foreign and nonexistent both 404; ownership-scoped queries must not load foreign rows, test separately. Worker builds from repo-root Docker context, copies api/ and worker/, adds api/ to PYTHONPATH and AI deps; delete stale worker/app/shared. Railway uses repo root + explicit Dockerfile. Shared-package extraction is separate. Establish api/app/prompts/, move SYSTEM_PROMPT preserving name/module exposure/exact text/behavior; review tests unchanged.
## editor
One Tiptap editor for the entire free-form Markdown; no structured schema or per-section editors. For parity, use backend render_resume_html(standalone=False) HTML with editable semantic nodes/path attributes; structural edits update local Markdown and re-fetch rendered body. Read-only render endpoint needs no migration. Concurrency token hashes client-editable content, presentation, title, status, template_key, region_code; exclude updated_at/derived values so read-triggered writes don't invalidate edits.
## guidance
Guidance is advisory, distinct from hard compliance. Queue acceptance atomically replaces exact text occurrence and marks accepted; anchor={quote, occurrence}; stale anchors drop at read/accept, not autosave. Dismissal hashes category + normalized quote. Producers: keywords and calibration findings; findings need resolvable exact anchor/replacement to become queue items, otherwise no accept action. Keep one proposal queue/apply path. RB-18/19 remain shipped: one active card, all open anchors marked; one quiet dotted underline per anchored line, click selects/cycles suggestions on line and places caret normally.
## assistant
RB-20 remains shipped/verified backend foundation (job_profile_text, OpenRouter calibration, missing-input/empty-doc guards, exact-once grounding, finding-to-guidance adoption, app/prompts/tone.txt); RB-21 is C2 guided assistant. It replaces RB-20 findings column and RB-18/19 suggestions panel: assistant is sole guidance surface; proposals appear in thread, reachable from agenda, queue popover or document marks. Guided chat, not general chat/wizard: ranked agenda, concrete action each turn, role required before composer, route text to known targets/actions, clarify missing target/vague ask, defined fallback, chips derived from state, no unsupported claims. Durable per-resume thread and requirement decisions; one role/context/thread per resume. Duplicate carries document/context, not thread/decisions. Requirement decisions persist; disappeared open gaps close, new ones open. Account assistant settings live validated JSONB in users.preferences; resume setting overrides default. Follow latest user-updated C2 prototype: Assistant and Document tabs; properties in Document, Auto adjust in formatting row; don't duplicate homes or use dense sideways toolbar. Clicking document mark places caret/scopes composer; it must not hijack writing.
## tests
For JSONB use JSONB().with_variant(sqlite.JSON,'sqlite'): retain PostgreSQL JSONB while existing SQLite tests and Base.metadata.create_all stay unchanged. Add separate PostgreSQL fixture for behavior SQLite cannot validate (shares CHECK constraints, in-place JSONB mutation); don't split metadata or rewrite existing suite. Playwright + @axe-core/playwright drives real running stack; reusable config and make target. Assert persisted content via API; server-side revision counts in pytest.
## revisions
Continuous autosave updates resume content during active typing and creates no snapshots. Each idle-gap timeout is a distinct trigger andresume-builder · wiki · dream at call 5
## User-led career workflow Users own and manually manage their career history. AI is an on-demand reviewer, enhancer, and localizer—not a gate or blocker. Preserve user control and keep useful editing paths available without requiring AI. Localization is substantive: adapt resume structure, length, formatting, and cultural expectations to the target market, rather than merely translating wording. See [[Career library and resume editing]]. ## Career library and resume editing Treat the profile as the user's career library and the resume as a first-class, directly editable document and primary editing surface. These roles are complementary: targeting can draw on the union of a user's career history, while the UI supports editing a concrete resume. Keep resumes.profile_id NOT NULL; first run seeds a profile from the first resume. Retain source_entry_id/source_bullet_id provenance so users can optionally promote resume edits back to the profile. Prefer using existing provenance over adding schema without a demonstrated need. See [[Profile versioning and variant drift]] and [[Resume revision snapshots]]. ## Profile versioning and variant drift Use an explicit integer generation marker to tell whether a resume variant is stale relative to its source profile. Increment profiles.version on any profile, entry, or bullet write; copy the value to resumes.profile_version when generating the resume. Compare the two values to detect drift. Do not substitute updated_at: edits to child entries or bullets may not update the profile timestamp, and timestamps cannot reconstruct the historical profile state at generation time. See [[Career library and resume editing]]. ## Skills vocabulary and normalization Keep skills and profile_skills as separate tables when shared vocabulary, alias resolution, or cross-user analytics is a real product requirement. Canonicalize aliases (for example, K8s and Kubernetes) to a normalized skill. Resume keyword records should reference skills by skill_id rather than storing an unlinked text/JSON value. The additional relational structure is justified by normalization and analytics needs, not merely by speculative future use. ## PostgreSQL JSONB with SQLite tests For JSONB columns in a codebase whose existing tests create schemas on SQLite, use SQLAlchemy JSONB().with_variant(sqlite.JSON, 'sqlite') on every such column. This keeps PostgreSQL production and migrations on real JSONB while allowing unchanged SQLite tests to compile. Add a PostgreSQL-specific fixture and tests for behavior SQLite cannot validate (such as database CHECK constraints and in-place JSONB mutation). Avoid splitting ORM metadata or moving the whole suite to a mandatory live database when a type variant satisfies both constraints. ## Resume revision snapshots Keep continuous autosave and idle-gap revision creation as separate mechanisms. Autosave persists current resume content during active typing but does not create snapshots. Each idle-gap timeout creates exactly one revision snapshot, even if another trigger recently created one; do not suppress the timeout snapshot based on comparison with the most recent revision. This gives the pause event a predictable history boundary without turning every autosave into a revision.
resume-builder · wiki · dream at call 10
## User-led career workflow Users own and manually manage their career history. AI is an on-demand reviewer, enhancer, and localizer—not a gatekeeper. Preserve useful editing paths that do not require AI. Localization is substantive: adapt resume structure, length, formatting, and cultural expectations to the target market, not just the wording. See [[Career library and resume editing]] and [[Resume compliance and findings]]. ## Career library and resume editing Treat the profile as the user's career library and the resume as a first-class, directly editable document and primary editing surface. These roles complement each other: targeting can draw on the union of career history while users edit a concrete resume. Keep resumes.profile_id NOT NULL; seed a profile from the first resume. Retain source_entry_id/source_bullet_id provenance so users can optionally promote resume edits to the profile. Prefer existing provenance over schema additions without demonstrated need. See [[Profile versioning and variant drift]] and [[Resume revision snapshots]]. ## Profile versioning and variant drift Use an integer generation marker to tell whether a resume variant is stale relative to its source profile. Increment profiles.version on any profile, entry, or bullet write; copy the value to resumes.profile_version when generating the resume, then compare the values. Do not substitute updated_at: child edits may not update the profile timestamp, and timestamps cannot recover the profile state at generation time. See [[Career library and resume editing]]. ## Skills vocabulary and normalization Keep skills and profile_skills as separate tables when shared vocabulary, alias resolution, or cross-user analytics is a committed product requirement. Canonicalize aliases (such as K8s and Kubernetes) to a normalized skill; resume keyword records should reference skills by skill_id, not unlinked text or JSON. Relational structure is justified by actual normalization and analytics needs, not speculative future use. ## PostgreSQL JSONB with SQLite tests When production requires JSONB but existing tests create schemas on SQLite, use SQLAlchemy JSONB().with_variant(sqlite.JSON, 'sqlite') on every such column. This preserves PostgreSQL JSONB in migrations and production while allowing existing SQLite tests to compile unchanged. Add a PostgreSQL-specific fixture for behavior SQLite cannot validate, such as CHECK constraints and in-place JSONB mutation. Avoid split ORM metadata or requiring the whole suite to use a live database when a type variant meets both constraints. ## Resume revision snapshots Keep continuous autosave and idle-gap revision creation separate: autosave persists active edits but does not create snapshots; each idle-gap timeout creates a snapshot even if another trigger created one recently. If multiple checkpoint conditions fire simultaneously, create exactly one revision row for that checkpoint event and record every trigger that fired on it. Do not suppress a distinct timeout snapshot merely because of a recent revision. This keeps history boundaries predictable without snapshotting every autosave. ## Resume compliance and findings Compliance errors block targeted resume writing; warnings do not. Persist and surface every finding, regardless of severity. Required-field errors should prompt the user to provide missing information rather than silently producing a noncompliant resume. Treat warnings as guidance, not generation failure. See [[User-led career workflow]]. ## Resource authorization and privacy For user-owned resources, scope ownership in the database query so a cross-user row is never loaded. Return 404 for cross-user access, matching nonexistent-resource behavior and avoiding disclosure that an ID exists; unauthenticated requests remain 401. Test cross-user and nonexistent cases separately. Apply this consistently across resource routes. ## Worker and API shared code When a worker must reuse API implementations and is built separately, prefer the smallest reversible deployment change over forking shared logic: build from repository root, copy api/ and worker/, put api/ on PYTHONPATH, and add needed AI dependencies to worker requirements. Delete stale duplicated worker/app/shared code. Configure Railway with repository-root context and an explicit Dockerfile path. A shared-package extraction may be a better long-term architecture, but keep it as a separate refactor rather than expanding a feature change. ## Prompt conventions Verify claimed repository conventions before assuming they exist. If a spec mandates a convention absent from the repo, establish one coherent convention rather than creating competing patterns. Consolidate existing prompts into the chosen convention when consistency warrants it, even if that requires a behavior-preserving change to a shared module; preserve names, text, and behavior and retain tests as safeguards.
resume-builder · wiki · dream at call 15
## User-led career workflow
Users own and manually manage their career history. AI is an on-demand reviewer, enhancer, and localizer—not a gatekeeper; preserve useful editing paths that do not require AI. Localization means adapting structure, length, formatting, and cultural expectations to the target market, not merely translating wording. The product balances a reusable career library with directly editable resumes. See [[Resume editing direction]] and [[Compliance findings]].
## Resume editing direction
The resume is a directly editable, free-text Markdown document, not a structured form or heading-delimited schema: resumes.content stores one document as {markdown: ...}, with no required fields, headings, sections, or boundaries. Users can type anywhere. Downstream features that need structure—generation, localization, compliance, keyword/evidence attribution, evaluation—must interpret the document with GenAI rather than rely on fixed fields. Expand Markdown support as needed for free text; RB-10 remains authoritative on ATS safety.
This supersedes RB-12's shipped structured Tiptap schema and field serialization; that implementation was verified, but product direction changed. Renderer must render Markdown rather than traverse article/section/entry nodes. Existing structured rows require conversion even without a DDL change. Revisit generation/provenance, keyword acceptance/evidence, compliance, and draggable section-outline designs: their old structural assumptions no longer hold. Keep the broader ownership model: profile is the career library, resume is the concrete editing surface; resumes.profile_id remains NOT NULL, seeded from the first resume. Preserve source_entry_id/source_bullet_id provenance where it remains meaningful and avoid schema additions without demonstrated need. See [[Profile versioning]], [[Browser testing and concurrency]], and [[User-led career workflow]].
## Profile versioning
Use an integer generation marker to identify resume variants stale relative to their source profile. Increment profiles.version on every profile, entry, or bullet write; copy it to resumes.profile_version when generating, then compare. Do not substitute updated_at: child edits may not update the profile timestamp, and timestamps cannot reconstruct the profile state at generation time. The profile remains a library supporting targeting across the user's career history; the resume remains a directly edited document. See [[Resume editing direction]].
## Skills vocabulary and normalization
Keep skills and profile_skills as separate tables when shared vocabulary, alias resolution, or cross-user analytics is a committed requirement. Canonicalize aliases (for example, K8s and Kubernetes) to one normalized skill; resume keyword records reference skills by skill_id rather than unlinked text or JSON. Relational structure is justified by actual normalization and analytics needs, not speculative future use.
## PostgreSQL JSONB with SQLite tests
When production requires JSONB but existing tests create schemas on SQLite, use SQLAlchemy JSONB().with_variant(sqlite.JSON, 'sqlite') on every such column. Production, migrations, and PostgreSQL retain JSONB while existing SQLite tests compile unchanged. Add PostgreSQL-specific coverage for behavior SQLite cannot validate, such as CHECK constraints and in-place JSONB mutation. Avoid split ORM metadata or requiring the whole suite to use a live database when a type variant meets both constraints.
## Resume revision history
Separate continuous autosave from idle-gap snapshots: autosave persists active edits but creates no revision; each idle-gap timeout creates a snapshot even if another trigger recently created one. If multiple checkpoint conditions fire simultaneously, create exactly one revision row for that checkpoint event and record every trigger that fired. Do not suppress a distinct timeout snapshot due to recency. This creates predictable history boundaries without snapshotting every autosave.
## Compliance findings
Compliance errors block targeted resume writing; warnings do not. Persist and surface every finding regardless of severity. Required-field errors should prompt the user to supply missing information rather than silently generating a noncompliant resume. Warnings are guidance, not generation failure. For unstructured resumes, rules that need document structure must interpret the Markdown rather than depend on obsolete fixed fields. See [[User-led career workflow]] and [[Resume editing direction]].
## Resource authorization and privacy
For user-owned resources, scope ownership in the database query so a cross-user row is never loaded. Return 404 for cross-user access, matching nonexistent-resource behavior and avoiding disclosure that an ID exists; unauthenticated requests remain 401. Test cross-user and nonexistent cases separately. Apply consistently across resource routes; do not return 403 for a foreign resource.
## Worker and API shared code
When a separately built worker must reuse API implementations, prefer the smallest reversible deployment change over forking shared logic: build from repository root, copy api/ and worker/, put api/ on PYTHONPATH, and add required AI dependencies to worker requirements. Delete stale duplicated worker/app/shared code. Configure Railway with repository-root context and an explicit Dockerfile path. A shared-package extraction may be a better long-term architecture, but keep it as a separate refactor rather than expanding a feature change.
## Prompt conventions
Verify claimed repository conventions before assuming they exist. If a spec mandates a convention absent from the repo, establish one coherent convention rather than creating competing patterns. Consolidate existing prompts into the chosen convention when consistency warrants it, even if that requires a behavior-preserving change to a shared module; preserve names, text, and behavior, and retain tests as safeguards.
## Browser testing and concurrency
For behavior-critical frontend acceptance criteria, prefer Playwright against the live stack, especially caret/selection and cross-tier flows. A reusable E2E harness is an acceptable investment. Verify persisted content through the API, browser accessibility in Playwright, and server invariants such as revisionresume-builder · wiki · dream at call 20
## Career ownership and resume editing
Users own and manually manage professional history; AI is an on-demand reviewer, enhancer, and localizer, never a gatekeeper. Preserve useful editing without AI. Localization adapts structure, length, formatting, and cultural expectations—not just wording. The profile is a reusable career library; each resume is a concrete, directly editable document, and resumes.profile_id remains NOT NULL (seed a profile from the first resume). Preserve source provenance where meaningful without speculative schema additions.
Current content model is pure free-text Markdown, stored as resumes.content = {markdown: ...}. No required fields, headings, sections, or boundaries. This supersedes RB-12's shipped structured Tiptap schema and its one-editor custom node model: those were verified implementations, not current product direction. Convert old structured rows; render Markdown, not article/section/entry nodes. Generation, localization, compliance, keyword/evidence attribution, and evaluation must interpret the document with GenAI rather than rely on fixed fields. RB-10 remains authoritative on ATS-safe formatting. Earlier renderer-parity choice (reuse backend-rendered HTML to avoid drift) should be adapted to Markdown rendering, not treated as permission to retain obsolete structure. See [[Profile versioning]], [[Compliance findings]], [[Guidance queue and document marks]], and [[Browser testing and concurrency]].
## Guidance queue and document marks
Advice is separate from compliance. RB-9's keyword pipeline is the sole producer of real five-field guidance; do not add a generic whole-document AI producer or fold compliance findings into the queue. Without a job target, the queue is quietly empty. Users decide one item at a time: durable dismissals hash category plus normalized quote, and acceptance atomically applies the scoped edit and records the decision. Acceptance updates resumes.content.
Free-text anchors are {quote, occurrence}, not section/entry/bullet IDs. Apply via scoped find-and-replace; if the quote is stale, drop the item rather than risk editing the wrong text. Validate staleness on read and accept, not every autosave. This makes the queue derived from current content.
The panel remains one card, not a list. The document may map other open work: expose open_queue; client selection chooses active item, with server order as default. Latest decision: show one quiet, layout-neutral dotted underline per anchored line, not per suggestion; keep it quieter than the active line's solid underline/tint. Clicking a line selects/cycles among suggestions anchored there and places the caret normally. Outstanding count belongs in the panel. Suppress stale markers. Watch whether card switching while editing feels helpful or startling. See [[Career ownership and resume editing]] and [[Browser testing and concurrency]].
## Profile versioning
Track profile drift with an integer generation marker: increment profiles.version on every profile, entry, or bullet write; copy it to resumes.profile_version at generation, then compare. Do not use updated_at: child writes may not update the parent timestamp, and timestamps cannot reconstruct the state used for an older variant. This supports the library/edited-document model without conflating the profile with the resume. See [[Career ownership and resume editing]].
## Compliance findings
Compliance is a hard ruleset verdict, distinct from advisory guidance. Errors block targeted resume writing; warnings do not. Persist and surface every finding regardless of severity. Missing required information should prompt the user to supply it rather than silently generate a noncompliant document. For example, market-specific required nationality may correctly block generation, while convention warnings should not. In free-text resumes, rules needing structure must interpret Markdown rather than read obsolete fixed fields. Do not imply a compliance check happened if results are not persisted. See [[Career ownership and resume editing]] and [[Guidance queue and document marks]].
## Resume revision history
Separate continuous autosave from idle-gap snapshots. Autosave persists edits but creates no revision; each idle-gap timeout creates a snapshot even if a recent snapshot came from another trigger. When checkpoint conditions fire simultaneously, write exactly one revision for that event and record every trigger that fired. Do not suppress a distinct timeout snapshot due to recency. This gives predictable history boundaries without snapshotting every autosave. See [[Browser testing and concurrency]].
## Skills vocabulary and normalization
Keep skills and profile_skills as separate relational tables when shared vocabulary, alias resolution, or cross-user analytics is a committed requirement. Canonicalize aliases (e.g. K8s/Kubernetes) to one normalized skill; resume keyword rows reference skills by skill_id. Relational structure is justified by real normalization/analytics needs, not speculative future use. See [[Guidance queue and document marks]].
## PostgreSQL JSONB with SQLite tests
Where production requires JSONB but existing tests create schemas on SQLite, use SQLAlchemy JSONB().with_variant(sqlite.JSON, 'sqlite') on every such column. PostgreSQL, migrations, and production retain JSONB while SQLite tests compile unchanged. Add PostgreSQL-specific coverage for behavior SQLite cannot validate (e.g. CHECK constraints and in-place JSONB mutation). Avoid split ORM metadata or requiring the entire suite to use a live database when a type variant meets both constraints.
## Resource authorization and privacy
Scope user-owned resources by owner in the database query so a foreign row is never loaded. Return 404 for cross-user access, matching nonexistent-resource behavior and avoiding resource-existence disclosure; unauthenticated requests remain 401. Apply consistently across resource routes; do not return 403 for a foreign resource. Test cross-user and nonexistent cases separately. This supersedes contrary route-specific wording.
## Worker and API shared code
When a separately built worker mustresume-builder · wiki · dream at call 25
## Career ownership and free-text documents
Users own and directly edit their career history and application documents. The profile is a reusable career library; each resume is a concrete document, not a locked AI-generated snapshot. Keep resumes.profile_id NOT NULL, seeding a profile from the first resume. AI reviews, enhances, localizes, and assists on demand; it must not gate access to or export of a user's document. Localization adapts structure, length, formatting, and cultural expectations, not just wording.
The current resume model is resumes.content = {markdown: ...}: pure free text, with no required fields, headings, sections, or boundaries. Downstream generation, rendering, evaluation, compliance, and keyword/evidence interpretation must understand Markdown with GenAI rather than assume fixed fields. Convert old structured rows. RB-12's structured Tiptap implementation was valid when shipped but is superseded as product direction. RB-10 remains authoritative on ATS-safe formatting. Preserve meaningful provenance without speculative schema additions; do not reintroduce a structural contract to support provenance. See [[Profile versioning]], [[Compliance findings]], [[Guidance queue and document marks]], [[Guided assistant and role context]], and [[Browser testing, autosave, and history]].
## Guidance queue and document marks
Advice is distinct from compliance verdicts. Guidance is derived from the current document and has one decision surface: one card at a time, with durable dismissal and atomic acceptance. Producers include the keyword pipeline and calibration findings explicitly adopted by the user; do not add generic whole-document advice without a decision. Without a job target, the keyword queue is quietly empty.
A guidance item has the five-field contract and an exact-text anchor {quote, occurrence}; acceptance applies an exact scoped replacement and records the decision atomically. Durable dismissal hashes category plus normalized quote. Validate anchors when reading and accepting, not every autosave: suppress stale items; if text changes between display and acceptance, reject with 409 rather than risk editing the wrong text. Return updated content/version so the editor can adopt it. Findings need exact replacement text to be adoptable; unresolvable findings have no accept action. A gap may insert after a nearby line or offer no accept. Accepted suggestions persist; raw calibration findings need not.
The panel remains one card, not a list. API exposes open_queue; client selection makes an item active, with server ordering as default. Show one quiet, layout-neutral dotted underline per anchored line, quieter than the active line's solid underline/tint. Clicking selects or cycles among items on that line and places the caret normally. Stale marks are suppressed; show outstanding count in the panel. Watch whether card switching during editing feels helpful or startling. See [[Career ownership and free-text documents]], [[Guided assistant and role context]], and [[Browser testing, autosave, and history]].
## Profile versioning
Track profile drift with an integer generation marker: increment profiles.version on every profile, entry, or bullet write; copy it to resumes.profile_version at generation, then compare. Do not use updated_at: child writes may not update the parent timestamp, and timestamps cannot reconstruct the state used for an older variant. This supports the library/document distinction without conflating profile and resume. See [[Career ownership and free-text documents]].
## Compliance findings
Compliance is a hard ruleset verdict, separate from advisory guidance. Errors block targeted resume generation; warnings do not. Persist and surface every compliance finding regardless of severity. Missing required information should prompt the user to supply it rather than silently generate a noncompliant document. Market-required nationality can correctly block generation; convention warnings should not. This does not block access to or export of an existing document. In free-text resumes, rules requiring structure must interpret Markdown, not obsolete fields. Never imply a compliance check occurred if its results were not persisted. See [[Career ownership and free-text documents]] and [[Guidance queue and document marks]].
## Browser testing, autosave, and history
Use Playwright against the running stack for browser guarantees such as contentEditable cursor behavior, selection, accessibility, and cross-tier flows; jsdom is not a substitute for browser caret semantics. Keep server invariants such as revision-row counts in pytest. The browser harness should be runnable consistently (for example via a Make target).
Concurrency tokens identify editable document state, not arbitrary row activity. Hash content and user-editable presentation/title/status/template/region fields; exclude updated_at so derived reads or writes do not invalidate an editor. A state-identical write need not change the token. Return the fresh content and token after accepted guidance edits to prevent a subsequent autosave conflict.
Continuous autosave persists edits but creates no revision. Each idle-gap timeout is a distinct snapshot trigger, even if another trigger recently created a snapshot. If checkpoint conditions coincide, write exactly one revision and record all triggers that fired. See [[Career ownership and free-text documents]] and [[Guidance queue and document marks]].
## Skills vocabulary and normalization
Keep skills and profile_skills as separate relational tables when shared vocabulary, alias resolution, or cross-user analytics is a committed requirement. Canonicalize aliases (for example K8s/Kubernetes) to one normalized skill; resume keyword rows reference skills by skill_id. Relational structure is justified by actual normalization and analytics needs, not speculative future use. See [[Guidance queue and document marks]].
## PostgreSQL JSONB with SQLite tests
When production requiresresume-builder · wiki · dream at call 30
## Career ownership and free-text documents
Users own and directly edit career history and application documents. The profile is a reusable career library; each resume is a concrete, editable document, not a locked AI snapshot. Keep resumes.profile_id NOT NULL and seed a profile from the first resume. AI may review, enhance, localize, and assist on demand, but must not gate access to or export of the user's document. Localization adapts structure, length, formatting, and cultural expectations, not merely wording.
Resume content is pure Markdown text (currently wrapped as {markdown: ...}), with no required fields, headings, sections, or boundaries. Downstream generation, rendering, evaluation, compliance, and evidence/keyword interpretation must understand Markdown with GenAI rather than rely on a fixed schema. Convert old structured rows. RB-12's structured Tiptap implementation was valid when shipped but is superseded as product direction. RB-10 remains authoritative on ATS-safe formatting. Preserve meaningful provenance without speculative schema additions or restoring structural contracts. Unfilled placeholders warrant a prominent warning, never an export block: users can always download their document. See related pages for drift, compliance, guidance, assistant, and browser invariants.
## Guidance queue and document marks
Guidance is advisory and distinct from compliance verdicts. The assistant is the sole guidance surface: proposals appear in-thread; remove the separate RB-18/RB-19 suggestions panel to avoid duplicate queues. Keep one proposal/decision at a time, with Apply, Not now, and Undo. The agenda, queue popover, and document marks are ways to reach work, not parallel answer surfaces. Producers may include keyword findings and calibration/assistant findings explicitly grounded and adopted by the user; do not add generic whole-document advice without an actionable decision. With no job target, keyword guidance is quietly empty.
Items use exact-text anchors {quote, occurrence}; acceptance applies an exact scoped replacement and records the decision atomically. Validate anchors when reading and accepting, not on every autosave. Suppress stale items; if the quote changes between display and acceptance, return 409 rather than risk editing the wrong text. Return updated content/version for the editor. Durable dismissal identifies category plus normalized quote. Unresolvable findings have no accept action; a gap may insert after nearby text or offer no action.
Marks are work-location cues, not proposal launchers. Use one quiet, layout-neutral dotted underline per anchored line, below the active line's solid underline/tint. Clicking text places the caret normally and scopes the composer to that line; it must not open a proposal or hijack typing. Multiple items on a line may be selected/cycled as appropriate. Show outstanding count in the panel/thread, not by counting marks.
## Guided assistant and role context
The assistant is a guided experience in a chat-like interface, not general chat or a fixed wizard. Lead with a ranked agenda; users steer; each turn ends in a concrete action. Never show an empty thread. Composer is disabled until a role exists. Route typed input to known targets/goals, not arbitrary instructions; narrow vague requests to high-impact fixes, clarify target when needed, ground suggestions in document/history, and use a safe fallback rather than invent claims or broad rewrites.
Per resume: one role context, thread, and requirement state. Targeting another role means duplicating the resume; copy document/context but not conversation or requirement decisions. Account-level settings (language, tone, default market) belong in validated users.preferences JSONB; per-resume values such as region override defaults. Context fields retain provenance (advert/profile/user); do not overwrite user-entered facts without asking. Preserve decisions when advert re-extraction rewords a requirement: identity follows category plus requirement ID, not wording. Keep decided requirements, close open items that disappear, and add genuinely new ones as open.
Guidance is the product and the assistant is the only guidance surface. Proposals/diffs/rationale and Apply/Not now/Undo live in-thread, reachable from agenda, queue popover, or document marks. Remove the findings and suggestions panels; marks locate work but never open proposals. Unfilled placeholders are clearly marked and counted, but never block export. Follow the latest human-updated C2 prototype over stale spec language: two rail tabs, Assistant and Document; properties live in Document, Auto adjust in the formatting row. Avoid the crowded sideways-scrolling properties toolbar; use Tailwind and shadcn components.
## Compliance findings
Compliance is a hard ruleset verdict, separate from advisory guidance. Errors block targeted resume generation; warnings do not. Persist and surface every finding regardless of severity. Missing required information should prompt the user to supply it rather than silently generate a noncompliant document. A market-required nationality may correctly block generation; convention warnings should not. Compliance does not block access to or export of an existing document. With free-text resumes, interpret Markdown rather than obsolete fields. Never imply a check occurred if its result was not persisted.
## Profile versioning
Track profile drift with an integer generation marker: increment profiles.version on every profile, entry, or bullet write; copy it to resumes.profile_version at generation, then compare. Do not use updated_at: child writes may not update the parent timestamp, and timestamps cannot reconstruct the state used for an older variant. This supports the career-library/document distinction without conflating profile and resume.
## Browser testing, autosave, and history
Use