Add causal-edge mode to deep-research-community (Edison, one community) - #225
Merged
Conversation
Extend the Edison deep-research skill with a causal-graph mode that, for a single community, extracts a source-backed causal interaction graph: interaction nodes (type, scope, source->target taxa, metabolites/processes, sign) + directed causal edges. Maps onto the schema: nodes -> ecological_interactions[], edges -> EcologicalInteraction.downstream[] (InteractionDownstream). - templates/community_causal_graph_research.md: new causal template (same placeholders as the mechanism template, so the existing render/template_vars machinery is reused unchanged). Demands verbatim snippets + CURIEs per node and per edge; asks for a node table, edge table, and a DOT/adjacency sketch. - scripts/research_community_edison.py: add --label to suffix output filenames so a causal run (label=causal) does NOT overwrite the default mechanism run for the same community+job; label recorded in the meta yaml. - justfile: `just research-community-causal <target>` (causal template + --label causal), same Edison plumbing/provenance as research-community-edison. - skill.md: document the causal-edge mode (when to use, output naming, schema mapping, curator hand-off). Verified: causal template renders against a real community (10360 chars, all placeholders resolve); `just research-community-causal <stem> --dry-run` writes `<stem>-edison-literature-causal(-meta).*` without touching the mechanism run and spends no credits. Reuses the vendored _edison_capture provenance bundle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Extends the Edison
deep-research-communityskill with a causal-edge mode:for a single community, it asks Edison (PaperQA3) to build a source-backed causal
interaction graph — interaction nodes (type, scope, source→target taxa,
metabolites/processes, +/− sign) and directed causal edges ("A enables/drives/
suppresses B").
Maps straight onto the schema:
ecological_interactions[](interaction_type,scope,source_taxon→target_taxon,metabolites,biological_processes)EcologicalInteraction.downstream[](InteractionDownstream:target+causal-link
description)Changes
templates/community_causal_graph_research.md— new causal template. Reusesthe same placeholders as the mechanism template, so the existing
render_query/template_varsmachinery is unchanged. Requires a verbatimsnippet + CURIEs per node and per edge; asks for a node table, an edge table,
and a DOT/adjacency sketch; flags hypothesized vs demonstrated edges.
scripts/research_community_edison.py— add--labelto suffix outputfilenames, so a causal run (
--label causal) does not overwrite the defaultmechanism run for the same community+job. Label is recorded in the meta yaml.
justfile—just research-community-causal <target>(causal template +--label causal), same Edison plumbing/provenance asresearch-community-edison.and the unchanged curator hand-off (never mutate
kb/communities/).Verified
resolve).
just research-community-causal <stem> --dry-runwrites<stem>-edison-literature-causal(-meta).*— doesn't touch the mechanism run,spends no credits.
_edison_captureprovenance bundle; scoped to onecommunity at a time (as requested).
Scope note: research/report only — like the base skill, it does not write to
kb/communities/; a curator applies the reviewedecological_interactionsblock.🤖 Generated with Claude Code