feat(scripts): promote docs frontmatter fields from recommended to required - #2603
Open
Jamie Kim (jkim323) wants to merge 8 commits into
Open
feat(scripts): promote docs frontmatter fields from recommended to required#2603Jamie Kim (jkim323) wants to merge 8 commits into
Jamie Kim (jkim323) wants to merge 8 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2603 +/- ##
==========================================
+ Coverage 83.10% 83.12% +0.01%
==========================================
Files 164 164
Lines 22254 22284 +30
Branches 29 29
==========================================
+ Hits 18495 18524 +29
- Misses 3756 3757 +1
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Contributor
Eval Execution✅ Status: Passed
No changed AI artifacts required evaluation. |
…om/microsoft/hve-core into feat/2467-require-docs-frontmatter
…ocs-frontmatter # Conflicts: # docs/architecture/ai-artifacts.md # docs/architecture/workflows.md # docs/contributing/ai-artifacts-common.md # docs/contributing/custom-agents.md # docs/contributing/instructions.md # docs/contributing/prompts.md # docs/contributing/release-process.md # docs/getting-started/collections.md # docs/getting-started/methods/cli-plugins.md # docs/reference/README.md # docs/reference/instructions/README.md # docs/reference/instructions/design-thinking/dt-coach-telemetry.md # docs/reference/skills/README.md # docs/reference/skills/installer/hve-core-installer.md # scripts/tests/docs/Generate-AssetDocs.Tests.ps1
Upstream #2577 added package pages without keywords, which this branch now requires for docs/**.
Jamie Kim (jkim323)
marked this pull request as ready for review
August 5, 2026 06:04
Katrien De Graeve (katriendg)
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Promotes
author,ms.date,ms.topic, andkeywordsfrom recommended to required for every page underdocs/**, and closes thedocs/reference/**validation gap introduced by #2389.Schema
docs-frontmatter.schema.jsonrequiredgrows from["title", "description"]to["title", "description", "author", "ms.date", "ms.topic", "keywords"].authorgainsminLength: 1, and the four property descriptions change fromRecommended:toRequired:. A missing trailing newline is also fixed.Validator
Test-DocsFileFieldsreplaces its split required/suggested logic with a single$requiredFieldslist that mirrors the schemarequiredarray, sodocs/**is governed identically whether or not schema validation is enabled. This mirroring is load-bearing: PR CI runs the validator without-EnableSchemaValidation, so the script path is what actually enforces the new fields.ADR pages matching
docs/planning/adrs/NNNN-*.mdare carved out of thekeywordsrequirement.adr-frontmatter.schema.jsonis a closed schema (additionalProperties: false) that categorizes withtagsand declares nokeywordsproperty, so requiring it there would be unsatisfiable.Exclusion move
docs/reference/**is removed fromExcludePathsinValidate-MarkdownFrontmatter.ps1, returning the asset-catalog tree to frontmatter validation. It is added toFooterExcludePathsbecause generated pages carry no Copilot attribution footer and the generator does not emit one.Generator
New-DocFrontmattergains required-Topic(constrained by aValidateSetmatching the schema enum, so generator output cannot drift from the schema) and-Keywords, plus an optional-Authordefaulting toMicrosoft. A new pure helperGet-AssetDocKeywordderives each page's keywords from asset kind, owning collection segment, and artifact key, deduplicated case-insensitively and order-stable. Index pages pass explicit keywords. Call sites use splatting so the preserved-date and advanced-date paths stay in sync.asset-doc.template.mdis updated to match.Backfill
262 generated pages under
docs/reference/**, plus legacy pages underdocs/templates/,docs/contributing/,docs/planning/, anddocs/docusaurus/, now carry all six fields. This lets the repo-wide required check pass without a big-bang failure rather than scoping enforcement to changed files only.Documentation
docs/contributing/documentation-maintenance.mdgains a Requirements section listing all six fields with their constraints, the ADRtags-not-keywordsexception, and a note thatdocs/reference/frontmatter is generator-owned and must not be hand-edited.Breaking change
keywordswas previously unchecked entirely — neither required nor warned — so anydocs/**page missing it now fails validation.New-DocFrontmatterandNew-IndexContentalso gain mandatory parameters. All in-repo pages and callers are updated in this PR; external callers of those functions would need updating.Related Issue(s)
Closes #2467
docs/reference/**exclusion introduced by feat(docs): scaffold asset docs pages and wire Docusaurus Asset Catalog #2389Type of Change
Select all that apply:
Code & Documentation:
Infrastructure & Configuration:
AI Artifacts:
hve-builderand addressed all actionable findings.github/instructions/*.instructions.md).github/prompts/*.prompt.md).github/agents/*.agent.md).github/skills/*/SKILL.md).github/hooks/*/*.json)evals/)Other:
.ps1,.sh,.py)Sample Prompts (for AI Artifact Contributions)
User Request:
Execution Flow:
Output Artifacts:
Success Indicators:
For detailed contribution requirements, see:
Testing
Automated validation run locally against this branch:
npm run lint:frontmatternpm run test:ps -- -TestPath scripts/tests/linting/npm run test:ps -- -TestPath scripts/tests/docs/npm run lint:asset-docsnpm run lint:jsonnpm run lint:adr-consistencynpm run lint:frontmatterruns with-WarningsAsErrors -EnableSchemaValidation, so the run above exercises both the script-level required-field checks and the tightened schema across the whole repository.New test coverage added in this PR:
New-DocFrontmatteremits all six fields, honors an explicit author, and rejects a topic outside the schema enum.Get-AssetDocKeywordcombines kind, collection, and key; omits the collection segment for assets directly under the kind directory; deduplicates case-insensitively.Test-DocsFileFieldsreturns one error per missing required field, errors on an emptykeywordsarray, skipskeywordsforChecklist
Required Checks
AI Artifact Contributions
hve-builderreview mode to review contributionhve-builderreviewRequired Local Checks
The following local-safe validation commands must pass before merging:
npm run validate:localnpm run validate:docsnpm run spell-checknpm run lint:md-linksSecurity Considerations
Additional Notes