| id | 2607082050 | |
|---|---|---|
| title | APM coexistence: `mdsmith init --apm`, guide, and kind pack | |
| status | 🔲 | |
| model | sonnet | |
| summary | Add an `mdsmith init --apm` template that scaffolds the APM kind pack (`.mdsmith/kinds/apm-*`) plus the `ignore:`/`overrides:` posture that keeps `mdsmith fix` off APM's hash-pinned deployed files, and document it in a coexist guide. Opportunities C-2, A-1, A-2, L-1. | |
| depends-on |
|
Let one command set up a repo that runs both mdsmith
and APM. mdsmith init --apm scaffolds the kind pack
that lints the .apm/ sources and the
ignore:/overrides: posture that keeps mdsmith fix off APM's hash-pinned deployed files. A guide
documents what the template writes and why.
APM deploys
third-party Markdown into committed paths
(.github/prompts/, .claude/rules/,
.agents/skills/, and more) and pins a SHA-256 per
file in apm.lock.yaml. A repo-wide mdsmith fix
rewrites those bytes and trips apm audit --ci. The
same files follow their package's conventions, not
the consumer's, so mdsmith check fails on files the
team cannot edit. Both problems are laid out in the
APM workflows analysis
and catalogued as C-2, L-1, A-1, and A-2 in the
opportunity catalogue.
The .apm/ source tree is the opposite case: it is
the author's own Markdown, with contractual front
matter APM's docs state but never enforce. mdsmith
kinds are the checker — the pattern the repo already
runs for its own skill and plan kinds.
Both halves are expressible in config today. But no
command assembles them, so every team rediscovers the
boundary by hand.
mdsmith init already
scaffolds config two ways. --from-markdownlint
converts a peer config. --wordlists writes the
curated .mdsmith/wordlists/ files, additively, and
never clobbers an existing setup. --apm follows the
--wordlists model.
- Foreign managed-region support inside the compiled
files. That is
plan 2607082049;
the template
ignore:s the compiled root files until it lands. - Schema grammar changes. Closed frontmatter and filename agreement are plan 2607082051; the kind pack uses only today's grammar.
- Running APM, or editing
apm.yml. The template writes mdsmith config only.
- Add
--apmtomdsmith init, modeled on--wordlists: additive, refuses to clobber, works on an already-initialized project. - Have
--apmwrite the kind pack as.mdsmith/kinds/files —apm-skill,apm-prompt,apm-instruction,apm-agent— each withpath-patternand an inline frontmatter schema matching the primitive contracts, plus per-kindmax-file-lengthandtoken-budget(500 lines / 5000 tokens forSKILL.md, 300 lines for agents). Theapm-promptkind opts its content rules into the${input:name}token. - Have
--apmwrite the coexistence posture: theignore:list naming APM's deploy directories andoverrides:disabling fix-capable rules on the compiled root files (AGENTS.md,CLAUDE.md,GEMINI.md,.github/copilot-instructions.md). On a fresh repo it lands in a new.mdsmith.yml; on an existing one it prints the block to merge, never rewriting the file — the--wordlistsrule. - Scope the
ignore:set to the harness directories actually present, reusing the filesystem detectionapm targetsuses (.claude/present → claude dirs), so the config names only real paths. - Write
docs/guides/coexist-with-apm.md: the ownership table (APM-deployed, APM-compiled,.apm/source, hand-authored), what--apmwrites, and theapm audit --ci+mdsmith checkCI ordering. Follow the Prettier guide and Vale + remark guide. - Add the guide to the guides catalog, cross-link the
research README, and document
--apmin the init reference and its--wordlistsneighbor. - Verify end to end: run
mdsmith init --apmin a scratch.apm/fixture and confirmmdsmith checkpasses on a conformant tree and flags a missingdescription. - Run
mdsmith fix PLAN.mdandmdsmith check ..
-
mdsmith init --apmwrites theapm-*kind files and the coexistence posture, and refuses to clobber an existing.mdsmith.yml. - After
mdsmith init --apm,mdsmith fixdoes not rewrite a file under.github/prompts/. - The kind pack flags a
.apm/skills/x/SKILL.mdmissingnameordescription. - The kind pack flags an
.apm/agents/x.agent.mdbody over 300 lines. - The
ignore:set names only harness directories present in the repo. -
docs/guides/coexist-with-apm.mdexists, is reachable from the guides catalog and research README, and the init reference lists--apm. - All tests pass:
go test ./... -
go tool -modfile=tools/go.mod golangci-lint runreports no issues. -
mdsmith check .— 0 failures.