@W-20592401 PWA Kit Development Guidelines Tool#213
Merged
Conversation
…-developer-tooling into t/commerce/W-20592401/pwa-guidelines-tool
patricksullivansf
approved these changes
Feb 25, 2026
Comment on lines
+24
to
+27
| // Resolve the content directory from the package root | ||
| const require = createRequire(import.meta.url); | ||
| const packageRoot = path.dirname(require.resolve('@salesforce/b2c-dx-mcp/package.json')); | ||
| const CONTENT_DIR = path.join(packageRoot, 'content', 'pwav3'); |
Contributor
There was a problem hiding this comment.
nit: i bet we use this everywhere, is it worth a util helper?
Contributor
Author
There was a problem hiding this comment.
I will keep this as future improvement.
Comment on lines
+96
to
+103
| const SECTION_CONTENT: Record<SectionKey, string> = Object.fromEntries( | ||
| SECTIONS_METADATA.map((section) => { | ||
| const filename = `${section.key}.md`; | ||
| const filePath = path.join(CONTENT_DIR, filename); | ||
| const content = readFileSync(filePath, 'utf8'); | ||
| return [section.key, content]; | ||
| }), | ||
| ) as Record<SectionKey, string>; |
Contributor
There was a problem hiding this comment.
nit: if i am reading this correctly it seems to be loading all the content at MCP start-up? As our MCP content library grows we might want to switch to on-demand or lazy loading.
Contributor
Author
There was a problem hiding this comment.
yeah, good suggestion. I will keep this in future improvement.
Contributor
There was a problem hiding this comment.
sneaking a tighter coverage limit huh?
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.
Summary
Tool Overview
pwakit_development_guidelinesisGA: false(requires--allow-non-ga-tools)src/tools/pwav3/pwa-kit-development-guidelines.tscontent/pwav3/*.mdPurpose
Returns PWA Kit v3 development guidelines and best practices. Intended to be used first before writing PWA Kit code. Covers architecture rules, coding standards, React components, data fetching, routing, configuration, and framework constraints.
Testing
MCP Prompts (with
--allow-non-ga-tools)Use these prompts against a running MCP server to verify the tool in context.
Default behavior (no sections)
Expected: Content for quick-reference, components, data-fetching, routing.
Single section
Expected: Content for the requested section only.
Multiple sections
Expected: Combined content with
---separators and display instructions.Topic-specific
Expected: Relevant section(s) returned; content matches the topic.
Dependencies
3pl-approvedis set by a maintainerpnpm test)pnpm run format)