Skip to content

T-J5DI-remove-clear-duplicate-augmented-packages

Status: closed/done · Impact: low · Complexity: small

The convergence audit’s clear-duplicate findings (backlog B-P784, B-8IUO) plus the obsidian-bases-augment husk are dead weight the migration should not carry. Remove all three now, before T-C9RD relocates the augmented family into solutions/augmented/, so the migration never has to move code that is about to be deleted. Each removal is verified zero-consumer first.

LocationRole today
packages/ts/render/@augmented/render (547 LOC) — an orphan: declared in apps/learn_web/package.json but imported by no source in the repo (B-P784)
apps/learn_web/package.jsonDeclares the dead @augmented/render dependency (line 24) and a stale ../../packages/node/render/dist watch in its dev script (line 8)
packages/rust/frontmatter-validator/validate-frontmatter bin (271 LOC), zero runtime consumers, a strict subset of markdown-contract; a workspace member only via the packages/rust/* glob — no explicit Cargo.toml member entry (B-8IUO)
apps/augmented-books/docs/architecture/project-structure.mdAn app architecture doc whose tree diagram still lists frontmatter-validator/

The three directories are gone; no dangling workspace member, glob, or dependency references them; bun install and cargo metadata --locked re-resolve clean; moon query projects no longer lists them.

  1. @augmented/render (B-P784). Confirm the orphan: grep -rn "@augmented/render" across apps/ and packages/ (excluding packages/ts/render/ itself and node_modules) returns no source import. Delete packages/ts/render/. Drop the "@augmented/render": "workspace:*" dependency line from apps/learn_web/package.json, and drop the now-dead ../../packages/node/render/dist fragment from that file’s dev watch script. render is a member only via the packages/ts/* glob, so the directory delete removes it — no explicit root workspaces entry to strip (verify).

  2. frontmatter-validator (B-8IUO). Confirm zero runtime consumers: grep -rn "frontmatter-validator\|validate-frontmatter" finds only its own dir, docs, and backlog — no build/CI dependency. Delete packages/rust/frontmatter-validator/. It is covered by the packages/rust/* members glob, so there is no explicit Cargo.toml member entry to remove (verify). Drop the stale frontmatter-validator/ line from the tree diagram in apps/augmented-books/docs/architecture/project-structure.md. cargo metadata re-resolves the lock additively (a removed path only drops packages; no version moves).

  3. obsidian-bases-augment husk — already removed; verify only. The directory was deleted by 09d8f775 (“chore: delete vendored obsidian-bases fork and regen lockfile”) before this task was picked up. No deletion is needed. Assert the end state instead: packages/ts/obsidian-bases-augment/ does not exist, grep -rn "@augment/obsidian-bases" finds no live consumer (T-NLKF ported them off it), and no packages/ts/obsidian-bases-augment* entry survives in root package.json workspaces or .moon/workspace.yml globs — remove if any surface.

  4. Re-resolve. Run root bun install (absorbs the dropped TS members and the removed learn_web dep) and cargo metadata --locked (exit 0). Run moon query projects and confirm none of render, frontmatter-validator, obsidian-bases-augment is listed.

  5. Update living docs referencing the removed packages. Drop the frontmatter-validator/ line from apps/augmented-books/docs/architecture/project-structure.md; regenerate any generated package roster (sdlc docs generate).

LocationKindChange
packages/ts/render/deleteRemove the @augmented/render orphan package
apps/learn_web/package.jsonmodifyDrop the dead @augmented/render dependency line and the stale packages/node/render/dist watch fragment from the dev script
packages/rust/frontmatter-validator/deleteRemove the zero-consumer Rust crate (subset of markdown-contract)
apps/augmented-books/docs/architecture/project-structure.mdmodifyDrop the stale frontmatter-validator/ line from the tree diagram
apps/augmented-books/docs/architecture/project-structure.mdmodifyRemove the frontmatter-validator/ entry from the package tree (this task deletes that crate)
  • AC-1: packages/ts/render/, packages/rust/frontmatter-validator/, and packages/ts/obsidian-bases-augment/ no longer exist.
  • AC-2: grep -rn "@augmented/render" (excluding node_modules) returns zero hits in source/config; likewise grep -rn "validate-frontmatter" finds no build/CI consumer and grep -rn "@augment/obsidian-bases" finds no live consumer.
  • AC-3: No dangling workspace member, glob, or dependency references any of the three: apps/learn_web/package.json no longer names @augmented/render, and neither root package.json workspaces nor .moon/workspace.yml globs name the removed dirs.
  • AC-4: bun install completes clean and cargo metadata --locked exits 0.
  • AC-5: moon query projects lists none of render, frontmatter-validator, obsidian-bases-augment.
  • AC-6: no living doc (architecture docs, generated rosters) references @augmented/render, frontmatter-validator, or obsidian-bases-augment after removal (historical planning records under docs/planning/{tasks,backlog} are exempt).
  • Relocating the surviving augmented apps/packages — that is T-C9RD.
  • The solutions/ tier definition in D-0001 — that is T-1YSW.
  • The per-package share/fold evaluation of the surviving packages (backlog B-6V5U / B-UEE4).
  • @sksizer/obsidian-bases (the surviving, independent implementation) and its demo/ — untouched; only the -augment husk is removed.
  • T-M2OV-pre-merge-frontmatter-validation-gate assumes the validate-frontmatter crate this task removes; per B-8IUO it must re-point at markdown-contract. Re-pointing T-M2OV is that task’s job, not this one — flagged here so the removal doesn’t silently break its premise.
  • none — this is pure removal of zero-consumer dead weight; T-C9RD depends on it so the migration never relocates deleted code.
  • B-P784 (retire @augmented/render) and B-8IUO (retire Rust frontmatter-validator) are the audit’s clear-duplicate findings, carried out of the superseded T-JCML audit (PR #972) into the migration epic.
  • The obsidian-bases-augment husk is the leftover of T-NLKF, which ported @augment/obsidian-bases consumers onto @sksizer/obsidian-bases.
  • Scope narrowed at pickup (2026-07-19). The husk was already deleted by 09d8f775 before this task was picked up, so its ## Today and ## Files to touch rows were removed (they resolved directory-missing and failed the readiness gate) and Approach step 3 became a verify-only assertion. The AC-1/AC-2 clauses naming obsidian-bases-augment are deliberately kept as regression assertions. Two removals remain: render and frontmatter-validator.

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

  • AC-1: auto — all three directories absent on disk (render, frontmatter-validator deleted here; obsidian-bases-augment already gone via 09d8f775, asserted as a regression check).
  • AC-2: auto — grep -rn over source/config extensions, excluding node_modules and docs/planning/, returns 0 hits for @augmented/render, validate-frontmatter, and @augment/obsidian-bases.
  • AC-3: auto — apps/learn_web/package.json no longer names @augmented/render, and the packages/node/render/dist watch fragment is gone from its dev script.
  • AC-4: auto — cargo metadata --locked exits 0; bun install idempotent on re-run. Both lockfile deltas are deletions-only (bun.lock 0/+56−, Cargo.lock 0/+168−), proving no version moved.
  • AC-5: auto — moon query projects went 101 → 100 ids; none of the three is listed, and the surviving augmented packages are intact.
  • AC-6: auto + agent-manual — grep-verified no living doc cites the removed packages; the apps/determined/docs/planning/rust-backends/CRATES.md reference was reworded by judgment (it sits outside the repo-root docs/planning/ exemption).
  • sdlc task gap-report caught the stale obsidian-bases-augment citation deterministically, before any implementation work was dispatched.
  • The deletions-only lockfile assertion (0 additions across both lockfiles) is a cheap, strong proof that a removal re-resolved additively. Worth reusing as a standard check on any package-removal task.
  • moon query projects as a membership assertion gave a crisp before/after count rather than a subjective “looks gone”.
  • The task cited packages/ts/obsidian-bases-augment/ in both ## Today and ## Files to touch, but 09d8f775 had already deleted it. gap-report flagged it directory-missing — but only AFTER the lease was acquired and the worktree built, so a scope-narrowing commit had to land on origin/main mid-flow. Step 2’s relevance check should run gap-report BEFORE Step 2a’s lease acquire, so touchpoint drift is caught before any side effect. → T-QOL7-gap-report-runs-before-lease-acquire
  • git rm -r packages/ts/render left a gitignored node_modules/ residue, so the directory still existed on disk and moon’s packages/ts/* glob kept discovering the project — AC-5 failed until rm -rf cleared it. A package-removal recipe should pair git rm -r with an untracked-residue sweep; git rm alone does not satisfy a glob-discovery assertion. → T-LDWC-package-removal-sweeps-untracked-residue
  • The quality gate still exceeds the 10-minute inline command timeout and has to be backgrounded and polled. Same gap recorded in T-1YSW-amend-d0001-solutions-tier; unchanged here. → T-1HA7-fast-pre-pr-quality-subset

← Back to Tasks