T-HY7N-agentpants-drop-mdc
State: closed/wontdo · Impact: medium · Complexity: medium
The standalone Agent Pants app renders skill previews and help pages with @nuxtjs/mdc and a
hand-written regex frontmatter parser. D-A27T-suspenders-skill-experience-module marks the app
reference-only, so this task is a capped, viewer-only deletion: MdViewer plus
markdown-util replace the MDC stack, and the task stops if file: wiring blows the budget.
| Location | Role today |
|---|---|
apps/agentpants/src-nuxt/app/components/preview/RenderedMarkdown.vue | Regex frontmatter table plus <MDC :value="body"> |
apps/agentpants/src-nuxt/app/components/preview/RenderedMarkdown.stories.ts | Story noting MDC is unavailable in Storybook |
apps/agentpants/src-nuxt/app/components/preview/Pane.vue | Mounts PreviewRenderedMarkdown and PreviewCodeMirrorViewer |
apps/agentpants/src-nuxt/app/pages/help/[entity].vue | <MDC :value="markdown">; scrolls to the hash anchor after MDC renders |
apps/agentpants/src-nuxt/scripts/check-help-links.ts | Slugs help headings with github-slugger to verify anchors |
apps/agentpants/src-nuxt/nuxt.config.ts | Extends @determined/ui; modules includes @nuxtjs/mdc |
apps/agentpants/src-nuxt/package.json | @nuxtjs/mdc, @tailwindcss/typography; check:help-links script |
apps/agentpants/src-nuxt/app/assets/css/main.css | prose rules |
apps/agentpants/src-nuxt/app/utils/browser-mock.ts | Contains prose markup |
apps/agentpants/bun.lock | Isolated lockfile, checked by .github/workflows/lockfile-drift.yml |
.github/workflows/agentpants-ci.yml | App CI |
Proposed
Section titled “Proposed”RenderedMarkdown.vue splits frontmatter with split() from @sksizer/markdown-util, renders
the YAML rows from that string, and renders the body with MdViewer. help/[entity].vue
renders with MdViewer; obsidian-md’s remarkHeadingIds uses github-slugger, so the
anchors check-help-links.ts computes keep matching. @nuxtjs/mdc leaves modules and
package.json. @sksizer/markdown-ui and its transitives are wired by file: with overrides.
@tailwindcss/typography is removed only if no prose class survives outside the two replaced
files.
Approach
Section titled “Approach”- Budget check first: wire
@sksizer/markdown-ui,@sksizer/obsidian-md,@sksizer/obsidian-editor,@sksizer/markdown-utilbyfile:withoverridesinsrc-nuxt/package.json; add the layer toextends; addvite.resolve.dedupeforvue,@codemirror/state,@codemirror/view,@lezer/commonandoptimizeDeps.include: ['unified', 'extend', 'debug']; runnuxt devandnuxt build. If either fails on duplicate@codemirror/stateor CJS pre-bundling after those two settings, fall back to wiring only@sksizer/obsidian-mdand@sksizer/markdown-utiland render withObsidianMarkdownfrom@sksizer/obsidian-md/vue. If that also fails to build, close the taskclosed/wontfixciting D-A27T-suspenders-skill-experience-module. RenderedMarkdown.vue: replace the regex parser withsplit(); render the body viaMdViewer(orObsidianMarkdownon the fallback path). Update the story comment.help/[entity].vue: render via the same component; scroll to the hash after therenderedevent.- Remove
@nuxtjs/mdcfrommodulesandpackage.json. Grepproseundersrc-nuxt/app; if the only hits were the two replaced files, delete theproserules inmain.css, the markup inbrowser-mock.tsand@tailwindcss/typography. cd apps/agentpants && bun install; commitbun.lock;bun install --frozen-lockfile.- Verify:
bun run typecheck,bun run test,bun run check:help-linksinsrc-nuxt;nuxi analyzeshows nomdcchunk;moon run :check :test --affected. Flip the agentpants row of the duplicates ledger indocs/LIBRARIES.md.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
apps/agentpants/src-nuxt/package.json | modify | Add file: packages and overrides; delete @nuxtjs/mdc (and @tailwindcss/typography per step 4) |
apps/agentpants/src-nuxt/nuxt.config.ts | modify | Extend the layer; drop the @nuxtjs/mdc module; dedupe, optimizeDeps |
apps/agentpants/src-nuxt/app/components/preview/RenderedMarkdown.vue | modify | split() frontmatter; MdViewer body |
apps/agentpants/src-nuxt/app/components/preview/RenderedMarkdown.stories.ts | modify | Story comment no longer cites MDC |
apps/agentpants/src-nuxt/app/pages/help/[entity].vue | modify | MdViewer; hash scroll on rendered |
apps/agentpants/src-nuxt/app/assets/css/main.css | modify | Delete prose rules if step 4 allows |
apps/agentpants/src-nuxt/app/utils/browser-mock.ts | modify | Delete prose markup if step 4 allows |
apps/agentpants/bun.lock | modify | Regenerated |
docs/LIBRARIES.md | modify | Agentpants render-site row flips to resolved |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
grep -rn "@nuxtjs/mdc\|<MDC" apps/agentpants/src-nuxt --include=*.vue --include=*.ts --include=*.jsonreturns nothing andapps/agentpants/bun.lockhas no@nuxtjs/mdcentry. - AC-2:
RenderedMarkdown.vuecontains noindexOf('---'and importssplitfrom@sksizer/markdown-util. - AC-3:
bun run check:help-linkspasses and clicking a help anchor scrolls to its heading. - AC-4:
bun run typecheckandbun run testpass inapps/agentpants/src-nuxt;bun install --frozen-lockfilepasses inapps/agentpants;agentpants-ci.ymlis green. - AC-5: If the fallback in Approach step 1 closes the task, the closing note records which build error stopped it.
Out of scope
Section titled “Out of scope”CodeMirrorViewer.vueandDiffViewer.vue; the read-only code viewer stays.- Any editor in
apps/agentpants; the app is reference-only. - The determined agent-pants experience (T-FQ5M-agent-pants-adopts-markdown-ui).
Dependencies
Section titled “Dependencies”- T-A0HT-md-ui-layer-skeleton supplies
MdViewer. - D-A27T-suspenders-skill-experience-module: do not extend the app; deletion only.
- D-4QGN-markdown-dialect-and-compatibility-profile: frontmatter split by
markdown-util. D-7VMX-markdown-ecosystem-strategyd.10: the MDC stack and regex parser are deleted.
Discovery context
Section titled “Discovery context”Member of milestone M-931L; wave 4b of D-K3EM-markdown-editor-chrome-and-plugin-environment.