Runtime Configuration (Step 0 — before any processing)
Read these files to configure domain-specific behavior:
-
ops/derivation-manifest.md— vocabulary mapping, platform hints- Use
vocabulary.notesfor the notes folder name - Use
vocabulary.note/vocabulary.note_pluralfor note type references - Use
vocabulary.reweavefor the process verb in output - Use
vocabulary.topic_map/vocabulary.topic_map_pluralfor MOC references - Use
vocabulary.cmd_verifyfor the next-phase suggestion
- Use
-
ops/config.yaml— processing depth, pipeline chainingprocessing.depth: deep | standard | quickprocessing.chaining: manual | suggested | automaticprocessing.reweave.scope: related | broad | full
If these files don't exist, use universal defaults.
Processing depth adaptation:
| Depth | Reweave Behavior |
|---|---|
| deep | Full reconsideration. Search extensively for newer related {vocabulary.note_plural}. Consider splits, rewrites, challenges. Evaluate claim sharpening. Multiple search passes. |
| standard | Balanced review. Search semantic neighbors and same-{vocabulary.topic_map} {vocabulary.note_plural}. Add connections, sharpen if needed. |
| quick | Minimal backward pass. Add obvious connections only. No rewrites or splits. |
Reweave scope:
| Scope | Behavior |
|---|---|
| related | Search {vocabulary.note_plural} directly related to the target (same {vocabulary.topic_map}, semantic neighbors) |
| broad | Search across all {vocabulary.topic_map_plural} and semantic space for potential connections |
| full | Complete review including potential splits, rewrites, and claim challenges |
EXECUTE NOW
Target: $ARGUMENTS
Parse immediately:
- If target contains
[[note name]]or note name: reweave that specific {vocabulary.note} - If target contains
--handoff: output RALPH HANDOFF block at end - If target is empty: find {vocabulary.note_plural} that most need reweaving (oldest, sparsest, most outdated)
- If target is "recent" or "--since Nd": reweave {vocabulary.note_plural} not touched in N days
- If target is "sparse": find {vocabulary.note_plural} with fewest connections
Execute these steps:
- Read the target {vocabulary.note} fully — understand its current claim, connections, and age
- Ask the reweave question: "If I wrote this {vocabulary.note} today, with everything I now know, what would be different?"
- If a task file exists (pipeline execution): read it to see what /reflect discovered. The Reflect section shows which connections were just added and which {vocabulary.topic_map_plural} were updated — this is your starting context for the backward pass.
- Search for newer related {vocabulary.note_plural} — use dual discovery (semantic search + {vocabulary.topic_map} browsing) to find {vocabulary.note_plural} created AFTER the target that should connect
- Evaluate what needs changing:
- Add connections to newer {vocabulary.note_plural} that did not exist when this was written
- Sharpen the claim if understanding has evolved
- Consider splitting if the {vocabulary.note} now covers what should be separate ideas
- Challenge the claim if new evidence contradicts it
- Rewrite prose if understanding is deeper now
- Make the changes — edit the {vocabulary.note} with new connections (inline links with context), improved prose, sharper claim if needed
- Update {vocabulary.topic_map_plural} — if the {vocabulary.note}'s topic membership changed, update relevant {vocabulary.topic_map_plural}
- If task file exists: update the {vocabulary.reweave} section
- Report — structured summary of what changed and why
- If
--handoffin target: output RALPH HANDOFF block
START NOW. Reference below explains methodology — use to guide, not as output.
Reweave
Revisit old {vocabulary.note_plural} with everything you know today. {vocabulary.note_plural} are living documents — they grow, get rewritten, split apart, sharpen their claims. This is the backward pass that keeps the network alive.
Philosophy
{vocabulary.note_plural} are living documents, not finished artifacts.
A {vocabulary.note} written last month was written with last month's understanding. Since then:
- New {vocabulary.note_plural} exist that relate to it
- Understanding of the topic deepened
- The claim might need sharpening or challenging
- What was one idea might now be three
- Connections that were not obvious then are obvious now
Reweaving is not just "add backward links." It is completely reconsidering the {vocabulary.note} based on current knowledge. Ask: "If I wrote this {vocabulary.note} today, what would be different?"
"The {vocabulary.note} you wrote yesterday is a hypothesis. Today's knowledge is the test."
What Reweaving Can Do
| Action | When to Do It |
|---|---|
| Add connections | Newer {vocabulary.note_plural} exist that should link here |
| Rewrite content | Understanding evolved, prose should reflect it |
| Sharpen the claim | Title is too vague to be useful |
| Split the {vocabulary.note} | Multiple claims bundled together |
| Challenge the claim | New evidence contradicts the original |
| Improve the description | Better framing emerged |
| Update examples | Better illustrations exist now |
Reweaving is NOT just Phase 4 of /reflect applied backward. It is a full reconsideration.
Invocation Patterns
/reweave [[note]]
Fully reconsider a specific {vocabulary.note} against current knowledge.
/reweave (no argument)
Scan for candidates needing reweaving, present ranked list.
/reweave --sparse
Process {vocabulary.note_plural} flagged as sparse by /health.
/reweave --since Nd
Reweave all {vocabulary.note_plural} not updated in N days.
How to find candidates:
# Find notes not modified in 30 days
find {vocabulary.notes}/ -name "*.md" -mtime +30 -type f
/reweave --handoff [[note]]
External loop mode for /ralph:
- Execute full workflow as normal
- At the end, output structured RALPH HANDOFF block
- Used when running isolated phases with fresh context per task
Workflow
Phase 1: Understand the {vocabulary.note} as It Exists
Read the target {vocabulary.note} completely. Understand:
- What claim does it make?
- What reasoning supports the claim?
- What connections does it have?
- When was it written/last modified?
- What was the context when it was created?
Also read the task file if one exists (pipeline execution). The task file's Reflect section shows:
- What connections /reflect just added
- Which {vocabulary.topic_map_plural} were updated
- What synthesis opportunities were flagged
- What the discovery trace looked like
This context prevents redundant work — you know what /reflect already found, so you can focus on what it missed or what needs deeper reconsideration.
Phase 2: Gather Current Knowledge (Dual Discovery)
Use the same dual discovery pattern as /reflect — {vocabulary.topic_map} exploration AND semantic search in parallel.
Path 1: {vocabulary.topic_map} Exploration — curated navigation
From the {vocabulary.note}'s Topics footer, identify which {vocabulary.topic_map}(s) it belongs to:
- Read the relevant {vocabulary.topic_map}(s)
- What synthesis exists that might affect this {vocabulary.note}?
- What newer {vocabulary.note_plural} in Core Ideas should this {vocabulary.note} reference?
- What tensions involve this {vocabulary.note}?
Path 2: Semantic Search — find what {vocabulary.topic_map_plural} might miss
Three-tier fallback for semantic search:
Tier 1 — MCP tools (preferred): Use mcp__qmd__deep_search (hybrid search with expansion + reranking):
- query: "[{vocabulary.note}'s core concepts and mechanisms]"
- limit: 15
Tier 2 — bash qmd with lock serialization: If MCP tools fail or are unavailable:
LOCKDIR="ops/queue/.locks/qm