Skip to content

Obsidian-first graph vault + corpus migration - #11

Merged
arozumenko merged 20 commits into
mainfrom
feat/obsidian-vault
Aug 10, 2026
Merged

Obsidian-first graph vault + corpus migration#11
arozumenko merged 20 commits into
mainfrom
feat/obsidian-vault

Conversation

@arozumenko

Copy link
Copy Markdown
Contributor

Summary

Makes a tests/ tree open as a complete, graph-connected Obsidian vault, and adds a tool to migrate/repair an existing corpus into that shape. Design + plan under docs/superpowers/.

The graph was empty in Obsidian because cases had no [[wikilinks]]. Rather than wikilink case front-matter (requirements are GitHub issue refs like OWNER/REPO#N, incompatible with [[…]]), the edge direction is flipped: requirements stays bare (OQL-safe), and generated requirement proxy notes link back to their covering cases. Obsidian edges are undirected, so this clusters the graph with zero front-matter mangling.

Part A — vault generator (generic)

  • onetest-tms/scripts/_vault.py, run by build-index.sh after _index.py, generates id-less hub notes (invisible to index/OQL/coverage by construction):
    • Requirement proxy notes tests/_meta/requirements/<safe>.md — list [[<ID>]] covering cases + a derived clickable GitHub issue URL (OWNER/REPO#N.../issues/N).
    • Recursive _index.md MOCs + root MOC for suite navigation.
    • Idempotent regeneration with marker-gated pruning of stale generated notes.
  • Docs: new docs/reference/obsidian-vault.md; test-case-format.md + tests/README.md + skill guidance updated (cases carry aliases: [<ID>], keep requirements bare).

Part B — corpus repair (_migrate.py + migrate-vault.sh, dry-run by default)

  • BOM/leading-blank front-matter fix.
  • Duplicate-ID reassignment: keep canonical (smallest path), renumber the rest from max_seq+1; rename file, rewrite id:/duplicate_of: (quote-tolerant).
  • Idempotent aliases: [<ID>] insertion.
  • .onetest/fields.yml: canonical type allow-list covering the corpus.
  • Validated (dry-run) against a real 2,789-case corpus: 33 FM-fixes, 207 reassignments, corpus byte-for-byte unchanged.

Testing

  • python3 onetest-tms/test/test_vault.py and python3 onetest-tms/test/test_migrate.py — all pass, output pristine (stdlib unittest, no deps, Python 3.9).
  • Existing _index.py/OQL behavior preserved (no normalization added).

Notes / follow-ups

  • .github/workflows/build-index.yml is still a stub; wiring it to run + commit is a documented follow-up.
  • Minor logged items: whole-file id: regex in apply_reassign (low risk for test-case bodies); no-underscore slug fallback; safe_name could collide for refs differing only by /-.

🤖 Generated with Claude Code

arozumenko and others added 20 commits August 7, 2026 19:58
Wikilink traceability in front-matter (aliases + [[REQ]] links),
auto-generated requirement proxy + MOC hub notes via build-index,
external resources split into graph nodes vs clickable URL properties.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Flip to proxy->case edges (requirements stay bare GitHub refs, URL derived),
drop index normalization, and add Part B data-repair for the Elitea corpus
(BOM fix, 169 duplicate-ID reassignment, aliases, enum reconcile).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Part A: _vault.py proxy/MOC generator (proxy->case edges, URL derivation),
build-index wiring, docs, skill. Part B: _migrate.py corpus repair
(BOM fix, duplicate-ID reassignment, aliases) + migrate-vault.sh, enum reconcile.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…utput)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A5 wrongly treated the existing references/test-case-format.md as missing and
overwrote its full field table/body-sections/example. Restore that content and
augment it with the Obsidian vault fields (aliases, plain-ref requirements,
automation_url/doc_url, don't-hand-edit-generated-notes).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Document the migration mechanics (_migrate.py / migrate-vault.sh: dry-run,
BOM fix, duplicate-ID reassignment, aliases, then build) and day-to-day vault
usage after the TMS changes; index both from docs/README and the vault reference.
@arozumenko
arozumenko merged commit 06374d0 into main Aug 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant