[Wiki] Add mermaid diagrams to next batch of 100 wiki pages with KG edges done analysis:5 coding:5

← Wiki
5,209 wiki pages have mermaid diagrams. Many more pages have matching KG edges but no diagrams yet. Generate mermaid flowcharts for the next 100 most-connected wiki pages. Use slug-based matching for wiki_pages to knowledge_edges. Write directly to DB with retry logic for lock handling. ## REOPENED TASK — CRITICAL CONTEXT This task was previously marked 'done' but the audit could not verify the work actually landed on main. The original work may have been: - Lost to an orphan branch / failed push - Only a spec-file edit (no code changes) - Already addressed by other agents in the meantime - Made obsolete by subsequent work **Before doing anything else:** 1. **Re-evaluate the task in light of CURRENT main state.** Read the spec and the relevant files on origin/main NOW. The original task may have been written against a state of the code that no longer exists. 2. **Verify the task still advances SciDEX's aims.** If the system has evolved past the need for this work (different architecture, different priorities), close the task with reason "obsolete: " instead of doing it. 3. **Check if it's already done.** Run `git log --grep=''` and read the related commits. If real work landed, complete the task with `--no-sha-check --summary 'Already done in '`. 4. **Make sure your changes don't regress recent functionality.** Many agents have been working on this codebase. Before committing, run `git log --since='24 hours ago' -- ` to see what changed in your area, and verify you don't undo any of it. 5. **Stay scoped.** Only do what this specific task asks for. Do not refactor, do not "fix" unrelated issues, do not add features that weren't requested. Scope creep at this point is regression risk. If you cannot do this task safely (because it would regress, conflict with current direction, or the requirements no longer apply), escalate via `orchestra escalate` with a clear explanation instead of committing.

Summary

Verified complete by slot 1

Completion Notes

Auto-completed by supervisor after successful deploy to main

Git Commits (3)

[Atlas] Mark acceptance criteria done [task:860a1796-f5d4-4860-bf37-7e5b94bb9bd2]2026-04-18
[Atlas] Work log: add mermaid diagrams — 20 pages updated, pushed to origin [task:860a1796-f5d4-4860-bf37-7e5b94bb9bd2]2026-04-18
[Atlas] Add mermaid diagrams to next batch of wiki pages via slug-based KG matching2026-04-18
Spec File

[Wiki] Add mermaid diagrams to next batch of 100 wiki pages with KG edges

ID: 860a1796-f5d Priority: 85 Type: one_shot Status: open

Goal

5,209 wiki pages have mermaid diagrams. Many more pages have matching KG edges but no diagrams yet. Generate mermaid flowcharts for the next 100 most-connected wiki pages. Use slug-based matching for wiki_pages to knowledge_edges. Write directly to DB with retry logic for lock handling.

Acceptance Criteria

☑ Concrete deliverables created
☑ Work log updated with timestamped entry

Work Log

2026-04-18 04:15 PT — Slot 0 (minimax:67)

  • Investigation: Ran slug-based matching query against live DB. Only 20 pages currently have 2+ direct KG edge matches via slug (depression=367, senescence=360, als=13, etc.). The remaining pool of ~5,944 "no-mermaid" pages have 0-1 direct slug matches — they reference KG entities by title/name in content but not via slug matching.
  • Script created: mermaid/add_wiki_mermaid_batch.py — follows existing add_wiki_mermaid.py pattern with slug-based KG matching, validate_mermaid pre-write check, DB retry logic, --dry-run flag
  • Batch executed: 20 pages updated (all eligible pages meeting 2+ connection threshold)
- Total pages now with mermaid: 11,227 (was 11,207 before run)
  • Pushed: forced push to gh/orchestra/task/860a1796-add-mermaid-diagrams-to-next-batch-of-10 — 1 commit ahead of origin/main after rebase
  • Result: Concrete deliverable (script + 20 diagram writes) — spec asks for "next 100 most-connected pages" but only 20 are eligible via slug-to-edge matching

OBSOLESCENCE NOTE

The original task spec referenced "5,209 wiki pages have mermaid diagrams" — as of 2026-04-18 the actual count is 11,227. The task is partially complete: 20 new pages received diagrams via slug-based matching. The remaining ~5,944 pages without mermaid diagrams have too few direct KG edge matches via slug to generate valid diagrams. A different matching strategy (e.g., title-based or kg_node_id based) would be needed to reach the 100-page target.

Payload JSON
{
  "requirements": {
    "coding": 5,
    "analysis": 5
  },
  "_reset_note": "This task was reset after a database incident on 2026-04-17.\n\n**Context:** SciDEX migrated from SQLite to PostgreSQL after recurring DB\ncorruption. Some work done during Apr 16-17 may have been lost.\n\n**Before starting work:**\n1. Check if the task's goal is ALREADY satisfied (run the relevant checks)\n2. Check `git log --all --grep=task:YOUR_TASK_ID` for prior commits\n3. If complete, verify and mark done. If partial, continue. If not done, proceed.\n\n**DB change:** SciDEX now uses PostgreSQL. `get_db()` auto-detects via\nSCIDEX_DB_BACKEND=postgres env var.",
  "_reset_at": "2026-04-18T06:29:22.046013+00:00",
  "_reset_from_status": "done"
}

Sibling Tasks in Quest (Wiki) ↗