Skip to content

T-NLKF-converge-obsidian-bases

Status: closed/done · Impact: medium · Complexity: large

The monorepo carries two independent implementations of the same idea: @sksizer/obsidian-bases (packages/ts/obsidian-bases/ — the canonical one) and the vendored @augment/obsidian-bases (packages/ts/obsidian-bases-augment/, brought over by T-LVLY as an explicitly temporary bridge). Port every @augment consumer onto the @sksizer implementation and delete the duplicate. This is the core “share libraries” payoff of the adoption.

LocationRole today
packages/ts/obsidian-bases/src/index.ts@sksizer/obsidian-bases public surface: .base parsing, filters, formulas, views over a markdown vault (src/base/, src/expr/, src/query.ts, src/vault/)
packages/ts/obsidian-bases-augment/The vendored duplicate (exists once T-LVLY lands); README banner names this task as its deletion
packages/ts/obsidian-bases-augment/demo/Its Nuxt demo (exists once T-UPV1 lands) — the only real consumer
package.jsonRoot workspaces carries the demo’s entry, which must be repointed when the demo moves

Consumer surface, from a grep of the source repo at pinned rev acedcf77652e2e7c481e95123c486c2befe2c423 (all inside the obsidian-bases demo):

Used @augment symbolSite (within the demo)
VaultDatabase, FileIndexer, QueryBuilderserver/utils/vault-manager.ts
parseExpression, parseBaseFileserver/api/query.post.ts
Filter, SortOrder (types)server/api/query.post.ts
IndexedNote (type)app/app.vue

augmented_web declared the dep without importing it; T-KTGF drops it with grep proof. If that verification instead found real usage, this task inherits those sites too.

  • The demo lives at packages/ts/obsidian-bases/demo/ and runs entirely on @sksizer/obsidian-bases.
  • packages/ts/obsidian-bases-augment/ is deleted.
  • No @augment/obsidian-bases string remains anywhere in the repo (deps or imports).
  • Any capability the demo needed that @sksizer/obsidian-bases lacked exists there now as a tested, exported API — extend the canonical package rather than keeping the fork alive.
  1. Enumerate the exact exports of @sksizer/obsidian-bases (src/index.ts) and map each used @augment symbol from the table above to its counterpart: parseBaseFile → the src/base/ parser, parseExpressionsrc/expr/, VaultDatabase/FileIndexersrc/vault/ indexing, QueryBuildersrc/query.ts, plus the Filter/SortOrder/IndexedNote type equivalents.
  2. For each gap (no counterpart, or shape mismatch a thin adapter can’t bridge): add a minimal exported API to @sksizer/obsidian-bases with tests. Additive changes only — no breaking changes to existing consumers of the package.
  3. Port the demo’s server/utils/vault-manager.ts, server/api/query.post.ts, and app/app.vue onto the mapped APIs; keep its vaults/ fixtures as the functional check.
  4. Move the demo dir packages/ts/obsidian-bases-augment/demo/packages/ts/obsidian-bases/demo/; update the root workspaces entry.
  5. Delete packages/ts/obsidian-bases-augment/.
  6. Sweep: grep -r "@augment/obsidian-bases" over the repo must return nothing outside git history.
LocationKindChange
packages/ts/obsidian-bases/src/modifyAdditive exports + tests for any mapped gaps
packages/ts/obsidian-bases/demo/newThe demo, relocated and ported to @sksizer/obsidian-bases
packages/ts/obsidian-bases-augment/deleteThe duplicate implementation and its README banner
package.jsonmodifyRepoint the demo’s workspaces entry
bun.lockmodifyWorkspace membership change
  • AC-1: grep -r "@augment/obsidian-bases" --exclude-dir=node_modules over the repo returns nothing.
  • AC-2: packages/ts/obsidian-bases-augment/ no longer exists.
  • AC-3: The relocated demo builds, and its query API boots and answers against the vaults/ fixtures.
  • AC-4: bun test passes in packages/ts/obsidian-bases/, including tests for any newly added exports.
  • AC-5: Existing @sksizer/obsidian-bases consumers are untouched (no breaking API changes).
  • Porting @sksizer/obsidian-bases features into the deleted fork (direction is one-way).
  • Broader vault-tooling convergence (vault-path, dir-aspect) — T-JCML.
  • T-KTGF — resolves whether augmented_web is a real consumer.
  • T-UPV1 — lands the demo this task ports.
  • Duplicate spotted during adoption planning 2026-07-18: the two implementations share the goal but not the code (different module layouts, no common history).

Captured by /sdlc:task-work on 2026-07-19. PR: pending.

  • AC-1: agent-manual — git grep -n "@augment/obsidian-bases" clean across all code/deps/imports/config; grep -c on regenerated bun.lock = 0. The literal string remains only in four docs/planning/tasks/ specs (this task plus siblings T-KTGF/T-LVLY/T-UPV1), which the ## Proposed scoping (“no @augment/obsidian-bases string remains … (deps or imports)”) and the “git history is fine” carve-out place out of scope. (deferred-user — confirm the planning-prose references are acceptable, or decide to scrub the siblings separately.)
  • AC-2: agent-manual — packages/ts/obsidian-bases-augment/ no longer exists (git rm -r); verified absent.
  • AC-3: agent-manual — bun run build in the relocated demo exits 0 (Nitro bundle incl. ported query.post/vault-index routes); a functional driver script ran the ported vault-manager + query-runner against the real vaults/ fixtures across all three query modes and returned correct non-empty results; strict tsc --noEmit on the ported server TS passed. (deferred-user — full Nuxt SFC-level vue-tsc/nuxi typecheck could not run in the sandbox; spot-check the demo UI.)
  • AC-4: auto — bun test in packages/ts/obsidian-bases/: 98 pass / 0 fail (92 pre-existing + 6 new queryVault tests in src/query.test.ts).
  • AC-5: auto — additive exports only; no existing export signature changed; tsc --noEmit clean; all 92 pre-existing package tests still pass.
  • The one genuine capability gap (paged/sorted ad-hoc query) collapsed to a single small tested export (queryVault); the rest of the OO→functional port bridged cleanly via existing @sksizer exports (scanVault, parseBase, parseExpression, runView).
  • A demo-side DTO adapter (noteToDto) projected VaultNote onto the UI’s expected shape, so app.vue (~1500 lines) changed only its import source — no UI rewrite.
  • The baseline-gated quality gate came back OK 10/10 with zero new drift, cleanly separating this branch’s changes from the 13 pre-existing bun test ./.claude findings.
  • Repo-wide pre-commit hook project-check-task-state-origin failed on an unrelated active branch (task/T-AZKG’s stray state-only “record PR” commit), blocking commits on every branch — worked around with LEFTHOOK_EXCLUDE=project-check-task-state-origin — the check should scope to the branch being committed (or to HEAD’s ancestry) rather than failing globally on another live session’s branch; alternatively Step 10.4’s append_pr_url must reliably land the prs: commit on main, never on a task branch. → T-WLNF-scope-task-state-origin-to-branch
  • The autonomy: autonomous/pr auto-define body edit (path-citation fix) committed on the task branch is discarded by start_task’s reset --hard origin/main, so it never persists and the readiness stamp lands on main against the still-original body — task-work’s Step 5a auto-define should land its body edit on origin/main (as the stamp does) so it survives the reset and main stays self-consistent. → T-RNHP-autonomy-body-fill-lands-on-main
  • Step 3a captured the quality baseline into the main repo’s .sdlc/quality-baselines/ but Step 7’s gate defaulted to the worktree’s .sdlc/ and errored baseline not found — task-work Step 7 should pass --baseline-dir <main-repo>/.sdlc/quality-baselines by default since .sdlc/ is per-worktree and the baseline is captured in the superproject. → T-F1WJ-quality-run-resolves-superproject-baseline
  • The pre-commit hook is slow (~2-3 min; project-check-apps-imports scans all monorepo apps), timing out a foreground commit at the 2-min tool limit — the apps-imports check could scope to staged paths. → T-W6NY-apps-imports-check-scopes-to-staged
  • AC-1 as written (“grep … returns nothing”) conflicts with the ## Proposed “(deps or imports)” scoping and with the planning-prose references that must survive — future sweep-style ACs should state the exclusion inline (e.g. “outside docs/planning/ and git history”). → T-12HH-sweep-acs-state-exclusions-inline

T-KTGF, T-UPV1


← Back to Tasks