Goal
Enrich a fixed demo set of 20 high-value wiki pages covering neurodegeneration mechanisms, genes, and pathways so each page visibly exposes an infobox, a pathway diagram, and relevant SciDEX links. The deliverable is the live PostgreSQL-backed wiki content, updated through journaled writes with a reproducible script committed to the repo.
Acceptance Criteria
☑ A deterministic target list of 20 wiki slugs is defined for the requested topics
☑ Every selected page exposes an infobox via stored frontmatter or inline infobox markup after the update
☑ Every selected page contains at least one fenced mermaid diagram after the update
☑ Every selected page contains in-body links to relevant hypotheses and analyses
☑ Updates are applied via save_wiki_page() and verified from PostgreSQL
☑ Work log records the mapping, execution, and verification results
Approach
Resolve the requested topic names to concrete wiki slugs already present in wiki_pages.
Build a repeatable enrichment script that appends a standardized SciDEX links section, adds curated mermaid diagrams where fenced diagrams are missing, and patches infobox coverage where the target pages still lack one.
Run the script against PostgreSQL, verify the 20 selected pages, and commit the script plus spec updates.Dependencies
Dependents
Work Log
2026-04-24 09:10 PT — Slot codex
- Started task in worktree
/home/ubuntu/scidex/.orchestra-worktrees/task-d16-08-7273E0A5.
- Read
AGENTS.md, CLAUDE.md, and planning docs relevant to Atlas/wiki quality.
- Audited current
wiki_pages state in PostgreSQL for the requested topics.
- Resolved the requested demo set to these slugs:
-
genes-trem2 -
genes-apoe -
mechanisms-braak-staging-tau-propagation -
mechanisms-neuroinflammation -
cell-types-microglia -
mechanisms-autophagy -
mechanisms-amyloid-cascade-hypothesis -
proteins-alpha-synuclein -
mechanisms-bbb-breakdown-ad -
entities-glymphatic-system -
entities-mitochondria -
genes-parp1 -
genes-lrp1 -
genes-smpd1 -
genes-cyp46a1 -
entities-complement-system -
senescence -
mechanisms-epigenetic-clocks-brain-aging -
genes-gba -
mechanisms-als-tdp43-pathway
- Found existing hypothesis/analysis cross-links in
artifact_links for all 20 selected slugs.
- Found missing fenced mermaid diagrams on 7 pages:
-
mechanisms-braak-staging-tau-propagation -
mechanisms-neuroinflammation -
proteins-alpha-synuclein -
mechanisms-bbb-breakdown-ad -
entities-glymphatic-system -
entities-complement-system -
mechanisms-als-tdp43-pathway
- Planned implementation: add a reproducible enrichment script that appends a standardized
SciDEX Links section to all 20 pages and adds curated mermaid sections only to the 7 pages still missing fenced diagrams.
2026-04-24 09:34 PT — Slot codex
- Added
scripts/enrich_demo_wiki_pages_d16_08_7273E0A5.py to apply journaled wiki-page updates for the 20-page demo set.
- Script behavior:
- appends a standardized
## SciDEX Links section with top linked hypotheses and analyses for each selected slug
- adds curated fenced mermaid diagrams to the 7 pages that were still missing
`
mermaid blocks
- preserves existing page content and uses
save_wiki_page() for updates
- Executed:
python3 scripts/enrich_demo_wiki_pages_d16_08_7273E0A5.py
- PostgreSQL verification after execution confirmed all 20 slugs now contain:
- a fenced mermaid block
-
## SciDEX Links - at least one
/hypothesis/ link
- at least one
/analyses/ link
-
curl -i http://localhost:8000/api/wiki/mechanisms-bbb-breakdown-ad →
HTTP/1.1 200 OK -
curl -i http://localhost:8000/api/wiki/mechanisms-als-tdp43-pathway →
HTTP/1.1 200 OK
- Result: 20 demo wiki pages enriched in PostgreSQL; 7 pages gained new fenced mermaid diagrams and all 20 pages gained in-body SciDEX cross-link sections.
2026-04-24 08:46 PT — Slot codex
- Re-audited the 20-page set against the literal task wording and found two mechanism pages (
mechanisms-neuroinflammation, mechanisms-autophagy) still lacked any infobox markup/frontmatter even though mermaid and SciDEX links were present.
- Extended
scripts/enrich_demo_wiki_pages_d16_08_7273E0A5.py so the demo enrichment is idempotent across all three requested elements:
- inserts a standardized infobox block only when a target page still lacks any infobox markup
- preserves the existing mermaid/link enrichment behavior and journaled
save_wiki_page() writes
- Executed the updated script:
python3 scripts/enrich_demo_wiki_pages_d16_08_7273E0A5.py
- updated
mechanisms-neuroinflammation - updated
mechanisms-autophagy
- PostgreSQL verification confirmed all 20 selected slugs now expose:
- infobox content (
frontmatter_json or inline
.infobox markup)
- a fenced mermaid block
-
## SciDEX Links with both hypothesis and analysis links
-
curl -i http://localhost:8000/api/wiki/mechanisms-neuroinflammation →
HTTP/1.1 200 OK -
curl -i http://localhost:8000/api/wiki/mechanisms-autophagy →
HTTP/1.1 200 OK
- Result: the full 20-page demo set now satisfies the requested infobox + mermaid + cross-link bundle, with the enrichment logic captured in a repeatable repo script.
2026-04-24 10:07 PT — Slot codex
- Resumed the task and audited the actual worktree state before pushing.
- Found the repo artifacts for this task still uncommitted:
-
scripts/enrich_demo_wiki_pages_d16_08_7273E0A5.py -
docs/planning/specs/d16_08_7273E0A5_demo_wiki_mermaid_crosslinks_spec.md
- Re-verified the current PostgreSQL-backed wiki state directly with:
-
python3 scripts/enrich_demo_wiki_pages_d16_08_7273E0A5.py --dry-run → all 20 pages reported
SKIP ... already enriched - SQL audit against
wiki_pages.content_md /
frontmatter_json →
verified=20/20 for infobox + mermaid + SciDEX links
-
curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/api/wiki/mechanisms-neuroinflammation →
200 -
curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/api/wiki/mechanisms-autophagy →
200 -
curl -s http://localhost:8000/wiki/entities-glymphatic-system | rg '/hypothesis/|/analyses/' → linked analysis/hypothesis URLs present in rendered page HTML
- Result: the shared PostgreSQL content is already enriched and the repo now only needs the reproducible script + spec history committed and pushed so the task has durable source control evidence.
2026-04-24 10:24 PT — Slot codex
- Re-ran the task verifier before commit:
-
python3 scripts/enrich_demo_wiki_pages_d16_08_7273E0A5.py --dry-run → all 20 target pages
SKIP ... already enriched - SQL audit against
wiki_pages returned
verified_rows=20 and
all_pass=true for infobox + mermaid + SciDEX links coverage
- Re-checked rendered HTML evidence:
-
curl http://localhost:8000/wiki/entities-glymphatic-system exposed both
/hypothesis/... and
/analyses/... links in the live page output
- Final repo deliverables for commit remain:
- reproducible enrichment script in
scripts/enrich_demo_wiki_pages_d16_08_7273E0A5.py - durable execution/verification history in this spec file
2026-04-24 09:18 PT — Slot codex
- Retried after merge-gate rejection that flagged unrelated branch state, not a wiki-content failure.
- Rebased the three task commits onto current
origin/main so the branch diff now contains only:
-
scripts/enrich_demo_wiki_pages_d16_08_7273E0A5.py -
docs/planning/specs/d16_08_7273E0A5_demo_wiki_mermaid_crosslinks_spec.md
- Verified the prior rejection is addressed:
-
git diff --name-only origin/main..HEAD -- .orchestra-slot.json → no diff
-
.orchestra-slot.json is no longer part of the branch
- Re-ran substantive verification on the rebased branch:
-
python3 scripts/enrich_demo_wiki_pages_d16_08_7273E0A5.py --dry-run → all 20 target pages
SKIP ... already enriched - PostgreSQL audit using
strpos(...) checks over
wiki_pages →
verified=20/20 for infobox + mermaid + SciDEX links coverage
-
curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/api/wiki/mechanisms-neuroinflammation →
200 -
curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/api/wiki/entities-glymphatic-system →
200
- Result: branch hygiene fixed, rejected
.orchestra-slot.json churn removed, and the demo-wiki deliverable remains verified on the current main base.
2026-04-24 09:19 PT — Slot codex
- Retried from the current task branch after the previous auto-deploy failure.
- Confirmed the wiki deliverable still stands on the live PostgreSQL-backed content:
-
python3 scripts/enrich_demo_wiki_pages_d16_08_7273E0A5.py --dry-run → all 20 target pages
SKIP ... already enriched - direct PostgreSQL audit over the 20 target slugs returned
count=20,
missing=[],
all_pass=True for infobox + mermaid +
## SciDEX Links + hypothesis link + analysis link coverage
- API smoke checks stayed healthy for:
-
mechanisms-neuroinflammation -
mechanisms-autophagy -
entities-glymphatic-system -
mechanisms-bbb-breakdown-ad -
mechanisms-als-tdp43-pathway all with
HTTP 200
- Audited the worktree/index after the failed retry and found staged deletion noise for the task files plus staged
.orchestra-slot.json churn from the harness.
- Planned fix for this retry: restore the index to match the intended task scope, keep
.orchestra-slot.json out of the branch, then re-stage only the enrichment script and this spec before rebasing/pushing again.