Motif Synthesis Draft - AI-drafted description from the motif's own evidence #126

Open
opened 2026-07-15 20:35:37 +00:00 by claude-bot · 0 comments
Contributor

Feature idea (Fable ideation, rank #3) · Effort: M · Value: High

Pitch
One button on a motif: "Draft a synthesis" - the AI reads the member entries (+ entry_motifs.notes and connection types) and proposes a description/summary the researcher edits and approves; never auto-saved.

Why it matters
Her actual job is turning hundreds of atomic observations into publishable prose. The gap between "37 entries in a motif" and "a paragraph explaining the motif" is exactly where a local LLM helps most - and motifs.description is often empty (v2 P4 even shipped a "Needs details" filter for title-only motifs).

How it fits
The chat plumbing exists for all three providers - ollamaChat/openaiChat in api/src/services/ai.ts (currently only image description/tag prompts). Add synthesizeMotif() feeding member entries (from entry_motifs) plus contradicts/exemplifies edges into a prompt, via a new POST /api/ai/synthesize/:motifId behind the existing aiRateLimit in routes/ai.ts. Output lands in a draft field the UI shows for edit-then-save into motifs.description (sanitized on write per lib/sanitize.ts), audit-logged. Honors "AI is optional / user approves everything."

Why it was likely missed
All shipped AI features are per-item enrichment at capture time (describe this image, tag this text, embed this entry). Cross-entry synthesis is a different mental category; the app predates thinking of the LLM as a reasoning aid rather than a metadata generator.

Acceptance criteria

  • A motif can generate a draft synthesis from its members; nothing is saved without explicit approval.
  • Accepted text is sanitized on write and audit-logged.
  • Works across the configured providers; absent AI, the button is disabled with a note.

From the 2026-07-15 codebase audit - Fable feature-ideation pass. Companion report: docs/.internal/report-2026-07-15.md (gitignored).

**Feature idea** (Fable ideation, rank #3) · **Effort:** M · **Value:** High **Pitch** One button on a motif: "Draft a synthesis" - the AI reads the member entries (+ `entry_motifs.notes` and connection types) and proposes a description/summary the researcher edits and approves; never auto-saved. **Why it matters** Her actual job is turning hundreds of atomic observations into publishable prose. The gap between "37 entries in a motif" and "a paragraph explaining the motif" is exactly where a local LLM helps most - and `motifs.description` is often empty (v2 P4 even shipped a "Needs details" filter for title-only motifs). **How it fits** The chat plumbing exists for all three providers - `ollamaChat`/`openaiChat` in `api/src/services/ai.ts` (currently only image description/tag prompts). Add `synthesizeMotif()` feeding member entries (from `entry_motifs`) plus `contradicts`/`exemplifies` edges into a prompt, via a new `POST /api/ai/synthesize/:motifId` behind the existing `aiRateLimit` in `routes/ai.ts`. Output lands in a draft field the UI shows for edit-then-save into `motifs.description` (sanitized on write per `lib/sanitize.ts`), audit-logged. Honors "AI is optional / user approves everything." **Why it was likely missed** All shipped AI features are per-item enrichment at capture time (describe this image, tag this text, embed this entry). Cross-entry synthesis is a different mental category; the app predates thinking of the LLM as a reasoning aid rather than a metadata generator. **Acceptance criteria** - [ ] A motif can generate a draft synthesis from its members; nothing is saved without explicit approval. - [ ] Accepted text is sanitized on write and audit-logged. - [ ] Works across the configured providers; absent AI, the button is disabled with a note. --- _From the 2026-07-15 codebase audit - Fable feature-ideation pass. Companion report: `docs/.internal/report-2026-07-15.md` (gitignored)._
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/TeaLeaves#126
No description provided.