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.
| Location | Role 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.json | Declares 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.md | An app architecture doc whose tree diagram still lists frontmatter-validator/ |
Proposed
Section titled “Proposed”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.
Approach
Section titled “Approach”-
@augmented/render(B-P784). Confirm the orphan:grep -rn "@augmented/render"acrossapps/andpackages/(excludingpackages/ts/render/itself andnode_modules) returns no source import. Deletepackages/ts/render/. Drop the"@augmented/render": "workspace:*"dependency line fromapps/learn_web/package.json, and drop the now-dead../../packages/node/render/distfragment from that file’sdevwatch script.renderis a member only via thepackages/ts/*glob, so the directory delete removes it — no explicit rootworkspacesentry to strip (verify). -
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. Deletepackages/rust/frontmatter-validator/. It is covered by thepackages/rust/*members glob, so there is no explicitCargo.tomlmember entry to remove (verify). Drop the stalefrontmatter-validator/line from the tree diagram inapps/augmented-books/docs/architecture/project-structure.md.cargo metadatare-resolves the lock additively (a removed path only drops packages; no version moves). -
obsidian-bases-augmenthusk — already removed; verify only. The directory was deleted by09d8f775(“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 nopackages/ts/obsidian-bases-augment*entry survives in rootpackage.jsonworkspacesor.moon/workspace.ymlglobs — remove if any surface. -
Re-resolve. Run root
bun install(absorbs the dropped TS members and the removedlearn_webdep) andcargo metadata --locked(exit 0). Runmoon query projectsand confirm none ofrender,frontmatter-validator,obsidian-bases-augmentis listed. -
Update living docs referencing the removed packages. Drop the
frontmatter-validator/line fromapps/augmented-books/docs/architecture/project-structure.md; regenerate any generated package roster (sdlc docs generate).
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
packages/ts/render/ | delete | Remove the @augmented/render orphan package |
apps/learn_web/package.json | modify | Drop the dead @augmented/render dependency line and the stale packages/node/render/dist watch fragment from the dev script |
packages/rust/frontmatter-validator/ | delete | Remove the zero-consumer Rust crate (subset of markdown-contract) |
apps/augmented-books/docs/architecture/project-structure.md | modify | Drop the stale frontmatter-validator/ line from the tree diagram |
apps/augmented-books/docs/architecture/project-structure.md | modify | Remove the frontmatter-validator/ entry from the package tree (this task deletes that crate) |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
packages/ts/render/,packages/rust/frontmatter-validator/, andpackages/ts/obsidian-bases-augment/no longer exist. - AC-2:
grep -rn "@augmented/render"(excludingnode_modules) returns zero hits in source/config; likewisegrep -rn "validate-frontmatter"finds no build/CI consumer andgrep -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.jsonno longer names@augmented/render, and neither rootpackage.jsonworkspacesnor.moon/workspace.ymlglobs name the removed dirs. - AC-4:
bun installcompletes clean andcargo metadata --lockedexits 0. - AC-5:
moon query projectslists none ofrender,frontmatter-validator,obsidian-bases-augment. - AC-6: no living doc (architecture docs, generated rosters) references
@augmented/render,frontmatter-validator, orobsidian-bases-augmentafter removal (historical planning records under docs/planning/{tasks,backlog} are exempt).
Out of scope
Section titled “Out of scope”- Relocating the surviving augmented apps/packages — that is
T-C9RD. - The
solutions/tier definition in D-0001 — that isT-1YSW. - The per-package share/fold evaluation of the surviving packages (backlog B-6V5U / B-UEE4).
@sksizer/obsidian-bases(the surviving, independent implementation) and itsdemo/— untouched; only the-augmenthusk is removed.- T-M2OV-pre-merge-frontmatter-validation-gate assumes the
validate-frontmattercrate this task removes; perB-8IUOit must re-point atmarkdown-contract. Re-pointing T-M2OV is that task’s job, not this one — flagged here so the removal doesn’t silently break its premise.
Dependencies
Section titled “Dependencies”- none — this is pure removal of zero-consumer dead weight;
T-C9RDdepends on it so the migration never relocates deleted code.
Discovery context
Section titled “Discovery context”- B-P784 (retire
@augmented/render) and B-8IUO (retire Rustfrontmatter-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-basesconsumers onto@sksizer/obsidian-bases. - Scope narrowed at pickup (2026-07-19). The husk was already deleted by
09d8f775before this task was picked up, so its## Todayand## Files to touchrows were removed (they resolveddirectory-missingand failed the readiness gate) and Approach step 3 became a verify-only assertion. The AC-1/AC-2 clauses namingobsidian-bases-augmentare deliberately kept as regression assertions. Two removals remain:renderandfrontmatter-validator.
Post-mortem
Section titled “Post-mortem”Captured by /sdlc:task-work on 2026-07-19. PR: pending.
Acceptance criteria coverage
Section titled “Acceptance criteria coverage”- AC-1: auto — all three directories absent on disk (
render,frontmatter-validatordeleted here;obsidian-bases-augmentalready gone via 09d8f775, asserted as a regression check). - AC-2: auto —
grep -rnover source/config extensions, excludingnode_modulesanddocs/planning/, returns 0 hits for@augmented/render,validate-frontmatter, and@augment/obsidian-bases. - AC-3: auto —
apps/learn_web/package.jsonno longer names@augmented/render, and thepackages/node/render/distwatch fragment is gone from itsdevscript. - AC-4: auto —
cargo metadata --lockedexits 0;bun installidempotent on re-run. Both lockfile deltas are deletions-only (bun.lock0/+56−,Cargo.lock0/+168−), proving no version moved. - AC-5: auto —
moon query projectswent 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.mdreference was reworded by judgment (it sits outside the repo-rootdocs/planning/exemption).
What worked
Section titled “What worked”sdlc task gap-reportcaught the staleobsidian-bases-augmentcitation 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 projectsas a membership assertion gave a crisp before/after count rather than a subjective “looks gone”.
Friction and automation gaps
Section titled “Friction and automation gaps”- The task cited
packages/ts/obsidian-bases-augment/in both## Todayand## Files to touch, but 09d8f775 had already deleted it.gap-reportflagged itdirectory-missing— but only AFTER the lease was acquired and the worktree built, so a scope-narrowing commit had to land onorigin/mainmid-flow. Step 2’s relevance check should rungap-reportBEFORE 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/renderleft a gitignorednode_modules/residue, so the directory still existed on disk and moon’spackages/ts/*glob kept discovering the project — AC-5 failed untilrm -rfcleared it. A package-removal recipe should pairgit rm -rwith an untracked-residue sweep;git rmalone 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
Spawned follow-up tasks
Section titled “Spawned follow-up tasks”- T-QOL7-gap-report-runs-before-lease-acquire (https://github.com/sksizer/dev/pull/1023) [open/ready] — move the gap-report call into Step 2’s relevance check, ahead of the Step 2a lease acquire, spawned.
- T-LDWC-package-removal-sweeps-untracked-residue (https://github.com/sksizer/dev/pull/1027)
[open/ready] — pair
git rm -rwith an untracked-residue sweep, spawned. - T-1HA7-fast-pre-pr-quality-subset (https://github.com/sksizer/dev/pull/1028) [open/ready] — fast pre-PR quality subset; one task covering the 10-minute-timeout bullet recorded in both this post-mortem and T-1YSW-amend-d0001-solutions-tier, spawned.