Fix PR review comments: remove code duplication and improve test assertions#8
Merged
Merged
Conversation
… test assertions Co-authored-by: mdaashir <85205726+mdaashir@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Specification-Driven Development framework and SpecKit integration
Fix PR review comments: remove code duplication and improve test assertions
Jan 15, 2026
mdaashir
approved these changes
Jan 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses feedback from PR #7 by eliminating code duplication, fixing a typo, and strengthening test assertions to validate exact tool counts.
Changes:
- Centralized
getMajorVersionutility function into a sharedscripts/utils.jsmodule - Fixed markdown heading typo in accessibility expert agent specification
- Enhanced test assertions to validate exactly 12 tool registrations
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/utils.js | New utility module containing shared getMajorVersion function with documentation |
| scripts/validate-frontmatter.js | Removed duplicate getMajorVersion function, now imports from utils |
| scripts/functional-tests.js | Removed duplicate getMajorVersion function and added assertions to verify exact count of 12 tool registrations |
| resources/specs/001-accessibility-expert-agent/spec.md | Fixed markdown heading from o# to # |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const match = version.match(/^[~^>=<]*(\d+)/); | ||
| return match ? parseInt(match[1], 10) : null; | ||
| } | ||
| const { getMajorVersion } = require('./utils'); |
There was a problem hiding this comment.
Unused variable getMajorVersion.
Suggested change
| const { getMajorVersion } = require('./utils'); |
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.
Addresses review feedback on PR #7 regarding code duplication, a typo, and insufficient test validation.
Changes
scripts/utils.js- CentralizesgetMajorVersionutility instead of duplicating acrossvalidate-frontmatter.jsandfunctional-tests.jso#→#in001-accessibility-expert-agent/spec.mdvscode.lm.registerToolcalls in extension.js✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.