Skip to content

[𝍋 MCP Server Tool] Add pwa-kit-create-app guideline tool @@W-18812373@@ #2663

Merged
bendvc merged 10 commits intofeature/pwa-developer-agent-onlyfrom
bendvc/W-18812373_add-project-creation-tool
Jun 30, 2025
Merged

[𝍋 MCP Server Tool] Add pwa-kit-create-app guideline tool @@W-18812373@@ #2663
bendvc merged 10 commits intofeature/pwa-developer-agent-onlyfrom
bendvc/W-18812373_add-project-creation-tool

Conversation

@bendvc
Copy link
Contributor

@bendvc bendvc commented Jun 26, 2025

Description

This PR introduces a new project creation tool that improves the developer experience when bootstrapping new PWA Kit apps.

Previously, project creation was tightly coupled to a CLI script with little flexibility or structure. This update extracts and formalizes that logic into a new module that can be reused, extended, and tested more easily. It lays the foundation for deeper integration with automated agents and developer tools.

This change:

  • Introduces a dedicated createProject() utility that handles the full lifecycle of creating a new app
  • Refactors the CLI entry point to delegate behavior to this tool
  • Aligns with the emerging MCP (Model Context Protocol) ecosystem by structuring logic in a way that agents can reason about and invoke

No new dependencies were introduced.

NOTE: Before this tool can work, the associated changes to the project generator in this PR have to be merged and released.

Types of Changes

  • Bug fix
  • New feature
  • Documentation update
  • Breaking change
  • Other changes

Changes

  • Added scripts/project/create.js, a modular entry point for project creation
  • Migrated CLI logic from create-mobify-app.js to use createProject()
  • Cleaned up parameter passing to improve clarity and testability
  • Added internal JSDoc to describe the shape of expected input and behavior

How to Test-Drive This PR

  1. Pull this branch.

  2. Run the CLI:

    node scripts/create-mobify-app.js --name my-new-app
  3. Verify that the project is scaffolded correctly and that the output matches the previous behavior.

  4. (Optional) Call createProject() directly in a test script to validate its programmatic interface.

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes

Accessibility Compliance

  • There are no changes to UI

Localization

  • No UI text updates included in this PR

Let me know if you want to highlight specific use cases for createProject() like agent integrations or test automation!

Add new guideline tool for pwa-kit project generation
@bendvc bendvc requested a review from a team as a code owner June 26, 2025 17:51
@bendvc bendvc added the skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated label Jun 26, 2025
@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Jun 26, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@bendvc bendvc changed the base branch from develop to feature/pwa-developer-agent-only June 26, 2025 18:29

## Overview

This document defines the behavior agents must follow when using the \`@salesforce/pwa-kit-create-app\` CLI tool to generate new PWA Kit projects. The CLI supports both **presets** and **templates** for project creation, and agents must clearly distinguish between these two modes of operation.
Copy link
Contributor

@yhsieh1 yhsieh1 Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you have a section explains presets and templates options? So that agent knows the difference if asked.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The agent in fact already knows that because it has imported program.json from the create-app package itself which has all the schema's and data for presets and templates.

I did this so that the information defined by the create-app project stays co-located with that project and not in ours where it can become out-of-sync. This way if some we add a feature by means of new template type or preset, or argument to the create app project, the mcp will ingest that information without having to make a change to the tool.

Copy link
Contributor

@yhsieh1 yhsieh1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please make sure tests and build failures are fixed in the coming PR.

@bendvc bendvc merged commit c89dec5 into feature/pwa-developer-agent-only Jun 30, 2025
9 of 35 checks passed
@bendvc bendvc deleted the bendvc/W-18812373_add-project-creation-tool branch July 16, 2025 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants