Repository navigation
docs: Replace docmeta with manni and adopt strict manni metadata vocabularies - #1165
Conversation
Swap the deprecated docmeta CLI for @hawkeyexl/manni, validate docs frontmatter against the open and strict core, stewardship, audience, lifecycle, structure, and ai-context vocabularies, and fill their values on every docs page. Maintainer fields live in docs.metadata.yaml; created, last-updated, and owner are stamped from git and CODEOWNERS.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…i-vocabularies # Conflicts: # src/content/docs/docs/governance/get-started/enroll-your-hosts.mdx
|
I noticed that some CI checks failed for this PR. I'm investigating whether the failures are caused by this suggestion. If they're unrelated or pre-existing, I'll leave this suggestion unchanged and create a separate suggestion if a standalone docs fix is needed. |
Resolve pig-cli-reference frontmatter conflict and add vocabulary metadata to the new capture-cloud-agent-traces page.
|
I noticed that some CI checks failed for this PR. I'm investigating whether the failures are caused by this suggestion. If they're unrelated or pre-existing, I'll leave this suggestion unchanged and create a separate suggestion if a standalone docs fix is needed. |
hawkeyexl
left a comment
There was a problem hiding this comment.
Don't define type in the custom frontmatter schema. Instead, use the built-in tgdp schema for the type overlay.
There was a problem hiding this comment.
@Promptless why do we need this file? Don't the manni vocabularies handle these fields already?
There was a problem hiding this comment.
You're asking whether the custom frontmatter schema file is still needed now that the manni vocabularies cover these fields. I'm checking that against the vocabularies and will reply here with the answer and any change to the suggestion.
There was a problem hiding this comment.
So far, the manni core vocabulary already requires title and description, so the custom schema's remaining jobs look like requiring id and checking tags; I'm now moving type to the built-in tgdp schema, which means remapping the type values on 132 pages to TGDP names.
There was a problem hiding this comment.
Mostly, yes. manni:core:1.0.0 already requires title and description, and it checks the format of id and type. I've removed those rules from the custom schema. The built-in tgdp:templates:1.1 schema and its tgdp:templates-strict:1.1 overlay now check type (see the other thread).
The file stays for two rules that nothing else in the stack enforces:
- It makes
idrequired. Core definesidbut doesn't require it, anddocs.metadata.yamllooks up each page's maintainer metadata byid. A page without anidwould silently get no metadata. - It checks the format of
tags, which no manni vocabulary defines.
If you're happy to drop the tags check and move the id requirement elsewhere, the file can go entirely.
One correction to my earlier update: 71 pages got a new type value, not 132. All 132 pages pass manni meta validate.
Docs PR: #1165
There was a problem hiding this comment.
Drop "tags" from here and remove this custom schema.
There was a problem hiding this comment.
Drop the tgdp strict schema, too.
There was a problem hiding this comment.
You want to remove the custom frontmatter schema, including its tags check, and drop the tgdp strict overlay. I'm making both changes now and will reply here with what changed and what the remaining schemas no longer check.
There was a problem hiding this comment.
Done: I deleted the custom frontmatter schema and removed the tgdp:templates-strict:1.1 overlay from manni.config.yaml.
CI no longer checks three things:
tags: Pages keep theirtagslists, but nothing validates them.type:tgdp:templates:1.1still requires a non-emptytype, but the 25 Good Docs Project page types are now only recommended. A typo such astype: how-toopasses CI. Every current page uses a valid type.idon new pages: A new page without anidpasses CI, and itsdocs.metadata.yamlentry then has noidto attach to. Removingidfrom an existing page still fails, because manni reports the leftoverdocs.metadata.yamlentry as an error. AGENTS.md now tells authors to always addid.
All 132 pages pass manni meta validate. I re-requested your review.
Review: https://app.gopromptless.ai/suggestions/8d5c29e5-1932-495d-9f09-0b918851c257
Docs PR: #1165
…a to what manni doesn't cover Stack tgdp:templates:1.1 and tgdp:templates-strict:1.1 in manni.config.yaml, remove type (and the title/description requirements manni:core already enforces) from schemas/custom-frontmatter.schema.json, and move every docs page's type to a Good Docs Project template slug.
|
In reply to this discussion Done. The strict overlay rejects
Each changed page lists Docs PR: #1165 |
There was a problem hiding this comment.
Drop "tags" from here and remove this custom schema.
There was a problem hiding this comment.
Drop the tgdp strict schema, too.
There was a problem hiding this comment.
Drop this schema in favor of manni's built-in starlight schema.
There was a problem hiding this comment.
You want to replace this Starlight schema with the one built into manni. I'm making that change now and will reply here when it's done.
There was a problem hiding this comment.
Done: I deleted schemas/starlight-frontmatter.schema.json, and manni.config.yaml now uses manni's built-in astro:starlight:0.41 schema, which matches the repo's Starlight 0.41.3.
The built-in schema requires title and checks the other Starlight fields when a page sets them. With both schema files deleted, the schemas/ directory is gone, so I also removed schemas/** from the paths that trigger the manni workflow.
Review: https://app.gopromptless.ai/suggestions/8d5c29e5-1932-495d-9f09-0b918851c257
Docs PR: #1165
…-in Starlight schema Remove schemas/custom-frontmatter.schema.json (id requirement and tags check) and schemas/starlight-frontmatter.schema.json, replace the mirror with astro:starlight:0.41, drop tgdp:templates-strict:1.1, and update the manni workflow, AGENTS.md, and ADR 0005 to match.
| npm run lint:md:fix # remark-lint auto-repair (full reflow via --output) | ||
| npm run lint:frontmatter # docmeta: frontmatter validation (needs Node >= 24) | ||
| npm run lint:frontmatter # manni: frontmatter validation (needs Node >= 24) | ||
| npx manni meta derive # restamp created / last-updated / owner after editing a docs page |
There was a problem hiding this comment.
Would it make more sense to run manni check to catch everything that's been configured instead of just metadata?
There was a problem hiding this comment.
You are asking whether this step should run manni check, so it catches every configured check and not only metadata. I am checking what manni check covers and will reply here with the change or an answer.
There was a problem hiding this comment.
In principle, yes. Today manni status lists meta as the only check that is set up, so manni check would run the same validation as manni meta validate. On this branch it also exits 2 under manni 4.8.1: its cite check step reports all 132 docs.metadata.yaml entries as orphans, even though manni meta validate passes all 132 files and cite is not set up. Running manni cite check alone gives the same error, which looks like a manni bug. Switching CI or lint:frontmatter to manni check would break CI now, so both still run manni meta validate. Do you want to switch now and fix cite check upstream, or keep meta validate until manni check runs clean?
| for `type`, such as `concept`, `how-to`, `reference`, `quickstart`, or | ||
| `troubleshooting`; CI doesn't reject other values, so check the spelling. | ||
| Give every page an `id`: the slug without `docs/`, with `/` replaced by | ||
| `-`; keep it when a page moves. CI doesn't require `id`, but |
There was a problem hiding this comment.
I believe ci does require id with the new strict schemas in place.
There was a problem hiding this comment.
You are pointing out that CI may now require id under the new strict schemas. I am checking the schemas and the CI behavior and will reply here with what I find or change.
There was a problem hiding this comment.
Confirmed with manni 4.8.1: removing id fails meta validate, and a new page without id fails the stale check for owner and created. I am updating this line and the matching tradeoff in ADR 0005 to say CI requires id.
There was a problem hiding this comment.
You're right. No schema requires id, but manni meta validate fails without it. A new page with no id fails derived:stale for owner and created, because those values are stored in docs.metadata.yaml under the page's id. A page that drops its id leaves its docs.metadata.yaml entry orphaned. AGENTS.md line 141, the ADR 0005 tradeoff, and the PR description now say that CI requires id and explain why.
`manni check` reports stale stamps but never restamps, so `meta derive` stays the fix. Pass page paths: a bare `manni check` exits 2 because its cite check can't match the ids in docs.metadata.yaml to pages (a manni bug). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Proposed changes
Replaces the deprecated docmeta setup with the
manniCLI (@hawkeyexl/manni4.8.1,manni meta validate). Docs frontmatter is now validated against the open and strict versions of six manni vocabularies: core, stewardship (1.1.0), audience, lifecycle, structure, and ai-context. Values are filled on all 131 pages insrc/content/docs. The vocabulary is namedaudience, notaudiences.audiencesis one of its fields.Tooling
docmeta.config.yamlis replaced bymanni.config.yaml. It setsdefaults: false, so it dropsgoogle:okf:0.1and the other manni defaults, and runs each requested vocabulary followed by its-strictoverlay. Starlight frontmatter is checked by manni's built-inastro:starlight:0.41schema, so the hand-authoredschemas/starlight-frontmatter.schema.jsonmirror is removed.typecomes from manni's built-in Good Docs Project schema,tgdp:templates:1.1. It requires a non-emptytypeand recommends the 25 TGDP template slugs without enforcing them; thetgdp:templates-strict:1.1overlay is not used. Pages moved fromlanding/guide/referencetoconcept(18),how-to(41),reference(61),installation-guide(6),quickstart(2),troubleshooting(2),glossary(1), andcontact-support(1). Each changed page lists/typein itsmeta-provenanceentry for review. Thetagslists still carry the old type words.schemas/directory is gone.manni:core:1.0.0requirestitleanddescriptionand checks the form ofid. No schema requiresid, butmanni meta validatestill fails without it (see below). Nothing checkstags..github/workflows/docmeta.ymlis renamed tomanni.yml. The workflow checks out the PR head with full history, because manni compares derived stamps against git.lint:frontmatter, AGENTS.md, and the ADR index are updated. The new ADR 0005 records the decision and supersedes Starport ADR 0006, plus part of ADR 0004.Where values go. manni marks each field as page or external, and this PR follows those marks:
id,keywords,language,audiences,intent,lifecycle,last-updated,applies-to,concepts,prerequisites/next-steps/related-pages(by pageid),risks, andsample-questions.docs.metadata.yamlholds maintainer metadata, keyed by pageid:owner,created,personas,journeys,visibility,source-of-truth(where a page documents a specific repo or file), andmeta-provenance.created,last-updated, andownercome from git history and CODEOWNERS throughmanni meta derive. CI fails if a stamp goes stale, so after a change to a page's body, runnpx manni meta deriveand commit the result.meta-provenanceentry. Delete a page's entry once you've reviewed it.Intentionally left unset
authors,reviewed-by,last-reviewed, andprovenancechange at merge time, so they'd need a derive run onmainto stay accurate.stakeholders,review-interval, andverified-againstare team decisions that no evidence records.Checklist
Verification:
npx manni meta validate: 132 files passed, 0 errors, no location warnings.npx manni meta derive --check: clean.npm run lint:md: clean.npm run build: succeeds, and page routes are unchanged.npm run test:smoke: 28 of 28 tests pass.npx manni meta validatepasses 132 of 132 files. A page with notypefailstgdp:templates:1.1. A misspelledtypesuch ashow-toonow passes. Deletingidfrom an existing page still fails, because itsdocs.metadata.yamlentry no longer matches a page. A new page withoutidfailsderived:staleforownerandcreated, because derive has nodocs.metadata.yamlentry to stamp.After
mainwas merged into this branch (bringing in #1047),npx manni meta derivere-stampedlast-updatedon the four governance pages whose bodies #1047 changed:supported-agents,trace-object-and-sources,how-it-works, andkey-concepts.After the next
mainmerge (bringing in #1103 and #1125),npx manni meta derivere-stampedlast-updatedonremediate-findingsandpig-cli-reference, whose bodies those PRs changed. This fixes the stale-stamp failure in thevalidatecheck. Validation now covers 132 files, including the newcapture-cloud-agent-tracespage.Review feedback (Manny)
typein the custom frontmatter schema. Use the built-in tgdp schema for thetypeoverlay."typeis gone from the custom schema, andmanni.config.yamlstackstgdp:templates:1.1andtgdp:templates-strict:1.1before the extension seam. Because the strict overlay doesn't acceptlandingorguide, every page'stypewas moved to a TGDP slug.title,description, and the form ofidandtype, so the schema now drops those rules. It stays for the two rules nothing else enforces: requiringid, and thetagscheck. (Superseded by the next round.)schemas/custom-frontmatter.schema.jsonis deleted, along with itstagscheck andidrequirement. Pages keep theirtagslists, but nothing validates them. A new page withoutidnow passes CI, and its maintainer metadata indocs.metadata.yamlthen has nothing to join on. AGENTS.md tells authors to addidanyway.tgdp:templates-strict:1.1is gone frommanni.config.yaml.typeis still required, but any non-empty string passes. All pages already use TGDP slugs.schemas/starlight-frontmatter.schema.jsonis deleted, and the config usesastro:starlight:0.41, which matches the repo's Starlight 0.41.3. The manni workflow no longer runs onschemas/**changes. ADR 0005 and AGENTS.md describe the new schema set.id, butmanni meta validatefails without it. A new page withoutidfailsderived:staleforownerandcreated, and an existing page that drops itsidleaves an orphaneddocs.metadata.yamlentry. AGENTS.md and the ADR 0005 tradeoff now say CI fails withoutid.manni checkto catch everything that's been configured instead of just metadata?"manni statusreportsmetaas the only check set up, somanni checkwould currently run the same validation. On this branch, though,manni checkexits 2: itscite checkstep can't run and reports all 132docs.metadata.yamlentries as orphans, even thoughmanni meta validatepasses 132 of 132 files. CI andlint:frontmatterkeepmanni meta validateuntilmanni checkruns clean here.