-
Notifications
You must be signed in to change notification settings - Fork 3
feat(cli): revamp webviewer app scaffolding #151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5544f68
feat(cli): revamp webviewer app scaffolding
eluce2 c95f25d
feat(cli): add TYPEGEN_VERSION to globals and update related configur…
eluce2 35077ea
Use release tags for ProofKit dependency installs
eluce2 f66c1db
feat(cli): add --force init option for non-empty dirs
eluce2 d784828
fix: resolve lint/test failures across cli and typegen
eluce2 eed0b5b
fix(cli): treat existing .gitignore as meaningful scaffold content
eluce2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| --- | ||
| name: create-changeset | ||
| description: Analyze git changes and create changesets for package releases. Use when preparing pull requests, creating PRs, when branch has commits ready for review, or when user mentions changeset or version bump. | ||
| --- | ||
| # Create Changeset Skill | ||
|
|
||
| ## Purpose | ||
|
|
||
| This skill automatically analyzes branch changes and creates appropriate changesets for package releases in this monorepo. It examines git history, determines version bump types based on Conventional Commits, and generates properly formatted changeset files. | ||
|
|
||
| ## When to Invoke | ||
|
|
||
| Automatically invoke this skill when: | ||
| - User is preparing to create a pull request | ||
| - User mentions "PR", "pull request", or "ready for review" | ||
| - Branch has commits ready for review | ||
| - User explicitly mentions "changeset" or "version bump" | ||
|
|
||
| Do NOT invoke when: | ||
| - User is only pushing changes without creating a PR | ||
| - Only documentation files have changed (README, .md files) | ||
| - Only CI/CD configuration has changed (.github/workflows/) | ||
| - Only development tool configuration has changed (eslint, prettier, etc.) | ||
| - Commits are only `docs:`, `chore:`, `ci:`, or `test:` types that don't affect packages | ||
|
|
||
| ## Pre-execution Validation | ||
|
|
||
| Before creating a changeset, check if a changeset file already exists for the current changes: | ||
| - Look for `.changeset/*.md` files (excluding README.md) | ||
| - If exists, ask user: "A changeset already exists. Create another one?" | ||
|
|
||
| ## Implementation Steps | ||
|
|
||
| ### 1. Check Current State | ||
|
|
||
| Execute `git log main..HEAD` (or `origin/main..HEAD`) to check for committed changes on the branch. If no commits exist, exit early without creating a changeset. | ||
|
|
||
| ### 2. Analyze Changes | ||
|
|
||
| Use `git diff main...HEAD` (or `origin/main...HEAD`) to analyze **committed changes only**. | ||
|
|
||
| Identify which packages are affected by checking files under `packages/*/`. Review commit messages using `git log main..HEAD --oneline` (or `origin/main..HEAD`). | ||
|
|
||
| ### 3. Determine Version Bump Type | ||
|
|
||
| Analyze commit messages following Conventional Commits 1.0.0 format: | ||
|
|
||
| - **major**: Contains `BREAKING CHANGE` in commit body, or breaking changes detected in code | ||
| - API signature changes | ||
| - Removed exports or features | ||
| - Incompatible behavior changes | ||
| - **minor**: Starts with `feat:` or `feat(scope):` - new features (backward compatible) | ||
| - New components or functionality | ||
| - New props or options (with defaults) | ||
| - New exports | ||
| - **patch**: Starts with `fix:` or `fix(scope):` - bug fixes and minor improvements | ||
| - Bug fixes | ||
| - Performance improvements | ||
| - Minor style updates | ||
| - **skip**: Other types (`chore:`, `docs:`, `ci:`, `test:`) typically don't require changesets unless they affect package functionality | ||
|
|
||
| Review actual code changes to confirm the appropriate version bump. **When in doubt between minor and patch, prefer patch for safety.** | ||
|
|
||
| If the version bump is ambiguous or unclear: | ||
| - Ask user for clarification | ||
| - Explain the reasoning behind the suggested bump type | ||
| - Allow user to override the suggestion | ||
|
|
||
| If all commits are types that don't require changesets (`docs:`, `chore:`, `ci:`, `test:`), exit early without creating a changeset. | ||
|
|
||
| ### 4. Generate Changeset | ||
|
|
||
| Create a changeset file with a descriptive filename in `.changeset/` directory. | ||
|
|
||
| **Filename format:** | ||
| - Use kebab-case with `.md` extension | ||
| - Examples: `.changeset/add-new-button.md`, `.changeset/fix-layout-bug.md`, `.changeset/update-icon-props.md` | ||
|
|
||
| **File content format:** | ||
| ```markdown | ||
| --- | ||
| "@proofkit/package-name": major|minor|patch | ||
| --- | ||
|
|
||
| Clear description of the change | ||
| ``` | ||
|
|
||
| **Example for single package:** | ||
| ```markdown | ||
| --- | ||
| "@proofkit/cli": minor | ||
| --- | ||
|
|
||
| Add new Button variant for secondary actions | ||
| ``` | ||
|
|
||
| **Example for multiple packages:** | ||
| ```markdown | ||
| --- | ||
| "@proofkit/cli": minor | ||
| "@proofkit/typegen": patch | ||
| --- | ||
|
|
||
| - @proofkit/cli: Add new Button variant for secondary actions | ||
| - @proofkit/typegen: Fix color token contrast ratio | ||
| ``` | ||
|
|
||
| **Important guidelines:** | ||
| - The description should be user-friendly as it will appear in CHANGELOG | ||
| - **Use the same language as the commit messages** (Japanese or English). If commit messages are mixed, prefer Japanese. | ||
| - Split changesets into separate files when the same package has changes with different purposes (e.g., new feature + bug fix, breaking change + internal refactoring) | ||
| - This creates individual top-level items in release notes, making it easier for readers to understand the intent of each change | ||
| - Example: Create `.changeset/add-secondary-button.md` for a new feature and `.changeset/fix-button-layout.md` for a bug fix, even if both target the same package | ||
|
|
||
| ### 5. Lint Changeset | ||
|
|
||
| Execute `pnpm textlint .changeset/<filename>.md` to validate the changeset file. | ||
|
|
||
| **Error handling:** | ||
| - If linting errors occur, attempt to auto-fix common issues: | ||
| - Spacing and punctuation | ||
| - Common grammar mistakes | ||
| - Re-run textlint after auto-fix | ||
| - If errors persist: | ||
| - Display error details to user | ||
| - Ask user for guidance on how to fix | ||
| - Do NOT proceed to commit until lint passes | ||
|
|
||
| ### 6. Verify and Commit | ||
|
|
||
| Display the generated changeset for review: | ||
| - Show the file path | ||
| - Show the file content | ||
| - Confirm it accurately reflects the changes | ||
|
|
||
| Once verified, commit the changeset file: | ||
| ```bash | ||
| git add .changeset/<filename>.md | ||
| git commit -m "chore: add changeset" | ||
| ``` | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| "@proofkit/cli": minor | ||
| "@proofkit/typegen": minor | ||
| "@proofkit/fmdapi": patch | ||
| "@proofkit/fmodata": patch | ||
| "@proofkit/webviewer": patch | ||
| --- | ||
|
|
||
| - cli: Revamp the WebViewer Vite template and harden `proofkit init` (ignore hidden files, improve non-interactive prompts, stop generating Cursor rules). | ||
| - cli: Install typegen skills locally when scaffolding projects. | ||
| - typegen: Add optional `fmHttp` config for using an FM HTTP proxy during metadata fetching. | ||
| - fmdapi/fmodata/webviewer: Add initial Codex skills for client and integration workflows. |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid shell-redirection placeholders in runnable commands
Using
<filename>in command examples is unsafe for copy/paste execution (<...>is interpreted as input redirection). Please switch to a concrete variable style to avoid broken runs.Suggested doc fix
Also applies to: 138-139
🤖 Prompt for AI Agents