Skip to content

[PM-05] Add framework validation npm scripts to tools/package.json#815

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-framework-validation-scripts
Draft

[PM-05] Add framework validation npm scripts to tools/package.json#815
Copilot wants to merge 4 commits intomainfrom
copilot/add-framework-validation-scripts

Conversation

Copy link

Copilot AI commented Mar 10, 2026

Adds six npm scripts to tools/package.json for validating and managing the script documentation governance framework (Sprint 3 + Post-Migration Audit).

Description

The framework validation tooling (script-docs.test.js, add-framework-headers.js) existed but had no dedicated npm entry points in tools/package.json, requiring developers to know and type full node invocations manually.

Scope

In scope: tools/package.json, .gitignore

Out of scope: No changes to validation scripts themselves.

Validation

npm run test:script-docs           # ✅ Script documentation checks passed
npm run validate:framework         # ✅ Script documentation checks passed (187 scripts enforced)
npm run validate:framework:indexes # ✅ Script documentation checks passed
npm run validate:framework:write   # ✅ Script documentation checks passed
npm run validate:framework:headers # exits 1 on real header mismatches (expected)
npm run validate:framework:headers:dry-run # shows skipped/would-update output

Follow-up Tasks

none

Type of Change

  • Bug fix (fixes an issue)
  • New content (adds new documentation)
  • Content update (improves existing content)
  • Style/formatting fix
  • Information architecture change
  • Other (please describe)

Tooling: adds npm script aliases for existing framework validation infrastructure.

Related Issues

Related to #

Changes Made

  • test:script-docs — runs script-docs.test.js directly (mirrors test:style, test:mdx naming convention)
  • validate:framework — full enforcement: all 187 scoped scripts checked for compliant headers + index freshness (--enforce-existing --check-indexes)
  • validate:framework:indexes — index-only freshness check (--check-indexes)
  • validate:framework:write — auto-rebuild all script indexes (--write --rebuild-indexes)
  • validate:framework:headers — read-only verify of per-file headers against tasks/reports/script-classifications.json via add-framework-headers.js --verify
  • validate:framework:headers:dry-run — preview mode for the above
  • Added tools/tasks/ to .gitignore to exclude generated audit artifacts

All scripts use cd .. && to switch from the tools/ package root to the repo root, required because both script-docs.test.js and add-framework-headers.js derive REPO_ROOT from process.cwd().

Testing

  • Verified all links work
  • Checked formatting and style

Screenshots (if applicable)

N/A

Checklist

  • My changes follow the style guides
  • I've reviewed the Component Library for available components
  • I've updated related pages if needed
  • I've checked for broken links
  • My changes are clear and easy to understand
  • I've tested locally
  • I've added/updated keywords and metadata if needed

Additional Notes

validate:framework:headers exits 1 when classification data mismatches actual file headers — this is intentional and reflects real drift between script-classifications.json and in-file headers, not a defect in the new scripts.

Original prompt

This section details on the original issue you should resolve

<issue_title>[PM-05] Add framework validation npm scripts to tools/package.json</issue_title>
<issue_description>Tracking issue for PM-05 in the Sprint 3 + Post-Migration Audit stream.

Scope:

  • Implement Add framework validation npm scripts to tools/package.json
  • Keep changes isolated to the task branch/worktree
  • Validate against docs-v2 governance rules before PR</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits March 10, 2026 15:41
Co-authored-by: DeveloperAlly <12529822+DeveloperAlly@users.noreply.github.com>
Co-authored-by: DeveloperAlly <12529822+DeveloperAlly@users.noreply.github.com>
Co-authored-by: DeveloperAlly <12529822+DeveloperAlly@users.noreply.github.com>
Copilot AI changed the title [WIP] Add framework validation npm scripts to package.json [PM-05] Add framework validation npm scripts to tools/package.json Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PM-05] Add framework validation npm scripts to tools/package.json

2 participants