| name | research-loop |
| description | Run one cycle of the Empathy Ledger wiki research loop. Lints the wiki, surfaces the highest-priority gap, drafts fill content, queues the result for elder review. |
research-loop
Modeled on the ACT Knowledge Ops Loop. Six steps. One cycle per invocation.
When to invoke
- Manually via
/wiki-loop slash command
- On a recurring schedule (weekly cadence is the default — overlong cycles produce stale graphs)
- After a new transcript, archive reply, or Trove batch lands and you want it threaded into the wiki
Inputs
wiki/ directory at repo root
- Optional argument: a specific cluster slug, person slug, or research-thread slug to focus on
The six steps
1. Capture
Check wiki/raw/ for any new captured material since the last loop. If new files exist without wiki/sources/ summaries, generate them. Walk recent git log for thoughts/shared/ additions; offer to migrate any new transcripts or archive replies into raw/ + sources/.
2. Compile
For each new source, identify the people / clusters / country / events it references. If a referenced page exists, append a "this source mentions you" line to its Sources section. If a referenced page does not exist, add it to wiki/research/<cluster>-open-threads.md with a status of pending-compile.
3. Lint
Run node scripts/wiki-lint.mjs --write-report. Read the resulting wiki/output/lint-YYYY-MM-DD.md. Identify the top 5 highest-priority gaps using this priority order:
- Broken wikilinks from primary cluster or person pages (these block reader navigation)
- Stubs (< 400b) on referenced pages
- Missing sources for cited claims
- Orphans on people/cluster/country pages
4. Sync
Compare wiki/clusters/*.md chapter lists to the chapters arrays in src/cluster-configs.ts. Any divergence is a sync gap — wiki is the source of truth, cluster-configs is the published artifact. If there's drift, generate the diff and offer to write a migration patch (do not apply automatically).
5. Publish
The 10-years SPA reads from cluster-configs.ts + Supabase, not directly from wiki. Verify the dev server is running on port 4173 and the latest cluster-configs build matches what's in the wiki.
6. Learn
- Identify any recurring questions (questions asked across multiple transcripts or research threads).
- For each, check if a
wiki/synthesis/<question>.md page exists. If not, draft one.
- For every gap fill drafted in this cycle, run
node scripts/wiki-grade.mjs <page> --report to grade it against the v1 anti-fabrication rubric. The grader checks every cited surname, date, place, and Trove citation against the page's resolved sources. Critical issues block the elder-review queue.
- Update
wiki/dashboards/research-loop-status.md with: cycle date, gaps closed this cycle, gaps remaining, archive-reply status, grader pass rate.
Output
Three things, every cycle:
- Cycle log entry in
wiki/dashboards/research-loop-status.md — date, what closed, what remains
- Gap fills — pages drafted this cycle (in
wiki/people/, wiki/sources/, etc.)
- Next-cycle queue — top 3 priorities for the next loop, written to
wiki/research/next-cycle.md
Stop criteria
- All broken wikilinks resolve, OR
- The next gap requires elder confirmation that hasn't happened yet, OR
- 10 gap fills drafted in one cycle (cap to prevent runaway sessions)
Fallback
If you can't make progress (e.g., archive replies haven't come back, elder review is pending), append a cycle skipped entry to the dashboard with the reason. Do not invent fill content. Anti-fabrication rule from SOUL.md: empty fields stay empty, "for elder review" tag for inferred claims.
Cultural protocol
- Never publish sacred-tagged content from
synthesis/ or decisions/ without elder sign-off via Rachel Atkinson.
- Always cite source via wikilink to
sources/.
- Three sacred items: Lucy at Blencoe Falls 1880s, Mulrunji Doomadgee 2004, Fantome Island leprosarium imagery.
Loop cadence
| Cadence | Suitable for |
|---|
| On-demand | After a new transcript / archive reply / Trove batch |
| Weekly | Default rhythm |
| Monthly | If the wiki is stable and waiting on long archive turnaround |