Effort: extensive
Build an autonomous agent that, given a topic + 5-50 SciDEX artifacts
(any mix of hypotheses, debates, papers, notebooks, open questions,
markets), writes a one-page polished brief suitable for a researcher,
funder, or journalist. Output is itself a versioned artifact
(brief artifact_type) with full provenance edges back to every input
artifact, so it can be discussed (Q-DSC) and ranked (Q-PERC) like
anything else.
This closes the loop: SciDEX produces tons of micro-content but no
one is synthesizing macro-narratives. A brief-writer agent turns the
firehose into prose a human can read in 60 seconds.
scidex/agora/brief_writer.py.compose_brief(topic: str, artifact_ids: list[str], audience:
Literal['researcher', 'funder', 'journalist'] = 'researcher')
-> dict returns {'brief_md': str, 'sources': list[dict],
'token_cost': int, 'composer_persona': str}.artifact_registry.get,scidex.routing.llm_router,scripts/write_brief.py --topic 'tau propagation' --artifactsbrief artifact viaregister_artifact, with artifact_links of typesynthesizes pointing at every input artifact (one row permetadata.audience, metadata.topic,metadata.composer_persona, metadata.input_artifact_ids.
POST /api/brief/compose accepting{topic, artifact_ids, audience} and returning the brief id +GET /brief/{artifact_id} rendering the brief'sscidex-brief-writer-daily.timer selects the top-3 most-activesynthesizes links and the canned Markdown.
scidex/agora/synthesis_engine.py for the existingtitle + composite_score + 1-paragraph
summary, instruction tail with the mandatory sections.
compose_brief with retries on truncation; assertlen(brief_md) > 800 and len(brief_md) < 6000.
artifact_commit.commit_artifact per theq-synth-whats-changed for the topic-momentumq-synth-whats-changed (sibling) — supplies daily topic-momentumscidex.routing.llm_router — token-budgeted LLM call.All acceptance criteria implemented:
scidex/agora/brief_writer.py
compose_brief(topic, artifact_ids, audience) fetches each artifact viaartifact_registry.get_artifact, builds a structured 7-section prompt withfrom llm import complete with max_tokens=8192, retries up to 3× onbrief artifact, and createssynthesizes links to every input artifact. Returns{brief_md, brief_artifact_id, sources, token_cost, composer_persona}.scripts/write_brief.py
python scripts/write_brief.py --topic X --artifacts a,b,c --audience researcher --out ---json for full JSON output.scripts/run_daily_briefs.py
compose_brief.deploy/scidex-brief-writer-daily.{service,timer}
scripts/run_daily_briefs.py.Persistent=true.scidex/atlas/artifact_registry.py
'brief' to ARTIFACT_TYPES set.api.py
POST /api/brief/compose — accepts {topic, artifact_ids, audience},GET /brief/{artifact_id} — renders brief Markdown to HTML with Sourcestests/test_brief_writer.py
synthesizes links, sourcesDesign notes:
scidex.routing.llm_router referenced in spec does not exist as a separatescidex.core.llm.complete — used directly per thesynthesis_engine.py.
artifact_commit.commit_artifact applies to filesystem-submodule artifactsQuality bar (manual review): pending production deployment — LLM
environment not available in this worktree. Tests cover the full
compose-and-register path with a canned LLM response.