climaybe 1.7.2 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -7
- package/bin/version.txt +1 -1
- package/package.json +6 -7
- package/src/commands/add-cursor-skill.js +12 -7
- package/src/commands/init.js +10 -5
- package/src/cursor/rules/00-rule-index.mdc +24 -0
- package/src/cursor/rules/accessibility-rules.mdc +527 -0
- package/src/cursor/rules/commit-rules.mdc +286 -0
- package/src/cursor/rules/cursor-rule-template.mdc +66 -0
- package/src/cursor/rules/examples/section-example.liquid +52 -0
- package/src/cursor/rules/examples/snippet-example.liquid +83 -0
- package/src/cursor/rules/figma-design-system.mdc +182 -0
- package/src/cursor/rules/global-rules-reference.mdc +62 -0
- package/src/cursor/rules/javascript-standards.mdc +1125 -0
- package/src/cursor/rules/js-refactor-tasks.mdc +123 -0
- package/src/cursor/rules/linear-task-creation.mdc +105 -0
- package/src/cursor/rules/liquid-doc-rules.mdc +595 -0
- package/src/cursor/rules/liquid.mdc +228 -0
- package/src/cursor/rules/project-overview.mdc +81 -0
- package/src/cursor/rules/schemas.mdc +150 -0
- package/src/cursor/rules/sections.mdc +25 -0
- package/src/cursor/rules/snippets.mdc +134 -0
- package/src/cursor/rules/tailwindcss-rules.mdc +410 -0
- package/src/cursor/skills/accessibility-pass/SKILL.md +54 -0
- package/src/cursor/skills/changelog-release/SKILL.md +50 -0
- package/src/cursor/skills/commit/SKILL.md +27 -0
- package/src/cursor/skills/commit-in-groups/SKILL.md +55 -0
- package/src/cursor/skills/linear-create-task/SKILL.md +81 -0
- package/src/cursor/skills/liquid-doc-comments/SKILL.md +37 -0
- package/src/cursor/skills/locale-translation-prep/SKILL.md +49 -0
- package/src/cursor/skills/schema-section-change/SKILL.md +39 -0
- package/src/cursor/skills/section-from-spec/SKILL.md +39 -0
- package/src/cursor/skills/theme-check-fix/SKILL.md +47 -0
- package/src/index.js +3 -2
- package/src/lib/commit-tooling.js +0 -44
- package/src/lib/config.js +1 -1
- package/src/lib/cursor-bundle.js +47 -0
- package/src/lib/prompts.js +3 -2
- package/src/workflows/shared/version-bump.yml +5 -2
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Shopify CI/CD CLI — scaffolds GitHub Actions workflows, branch strategy, and s
|
|
|
5
5
|
**Commit linting and AI-assisted commits are available as optional setup steps:**
|
|
6
6
|
|
|
7
7
|
- **Conventional commit linting:** During `climaybe init`, you can choose to automatically install and configure [commitlint](https://commitlint.js.org/) and [Husky](https://typicode.github.io/husky) to enforce [Conventional Commits](https://www.conventionalcommits.org/) in your theme repository.
|
|
8
|
-
- **Cursor
|
|
8
|
+
- **Cursor rules + skills:** You can opt in to installing Electric Maybe’s bundled [Cursor](https://cursor.com/) project rules and agent skills under `.cursor/rules/` and `.cursor/skills/` (Liquid, JS, a11y, commits, changelog, Linear, etc.).
|
|
9
9
|
|
|
10
10
|
Both options streamline commit message quality and team workflows but are fully optional during setup.
|
|
11
11
|
|
|
@@ -42,12 +42,12 @@ Interactive setup that configures your repo for CI/CD.
|
|
|
42
42
|
4. Asks whether to enable optional **preview + cleanup** workflows (default: yes)
|
|
43
43
|
5. Asks whether to enable optional **build + Lighthouse** workflows (default: yes)
|
|
44
44
|
6. Asks whether to enable **commitlint + Husky** (enforce [conventional commits](https://www.conventionalcommits.org/) on `git commit`)
|
|
45
|
-
7. Asks whether to
|
|
45
|
+
7. Asks whether to install **Cursor rules + skills** (`.cursor/rules/`, `.cursor/skills/`) — Electric Maybe conventions for themes and AI workflows
|
|
46
46
|
8. Based on store count, sets up **single-store** or **multi-store** mode
|
|
47
47
|
9. Writes `package.json` config
|
|
48
48
|
10. Scaffolds GitHub Actions workflows
|
|
49
49
|
11. Creates git branches and store directories (multi-store)
|
|
50
|
-
12. Optionally installs commitlint, Husky, and the Cursor
|
|
50
|
+
12. Optionally installs commitlint, Husky, and the Cursor bundle (rules + skills)
|
|
51
51
|
|
|
52
52
|
### `climaybe add-store`
|
|
53
53
|
|
|
@@ -109,14 +109,16 @@ Set up **only** commitlint + Husky (conventional commits enforced on `git commit
|
|
|
109
109
|
npx climaybe setup-commitlint
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
### `climaybe add-cursor
|
|
112
|
+
### `climaybe add-cursor`
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
Install Electric Maybe **Cursor rules and skills** into `.cursor/rules/` and `.cursor/skills/`. Use this if you skipped the bundle at init or want to refresh from the version of climaybe you have installed.
|
|
115
115
|
|
|
116
116
|
```bash
|
|
117
|
-
npx climaybe add-cursor
|
|
117
|
+
npx climaybe add-cursor
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
+
The previous command name `add-cursor-skill` still works as an alias. Re-running replaces the bundled rule and skill files with the copies shipped by your installed climaybe version (same idea as `update-workflows`).
|
|
121
|
+
|
|
120
122
|
## Configuration
|
|
121
123
|
|
|
122
124
|
The CLI writes config into the `config` field of your `package.json`:
|
|
@@ -288,7 +290,7 @@ Add the following secrets to your GitHub repository (or use **GitLab CI/CD varia
|
|
|
288
290
|
|
|
289
291
|
- **Branch:** Single default branch `main`. Feature branches open as PRs into `main`.
|
|
290
292
|
- **Versioning:** [SemVer](https://semver.org/). Versions are **bumped automatically** when PRs are merged to `main` using [conventional commits](https://www.conventionalcommits.org/): `fix:` → patch, `feat:` → minor, `BREAKING CHANGE` or `feat!:` → major.
|
|
291
|
-
- **Flow:** Merge to `main` → [Release version](.github/workflows/release-version.yml) runs semantic-release (bumps `package.json`, pushes tag)
|
|
293
|
+
- **Flow:** Merge to `main` → [Release version](.github/workflows/release-version.yml) runs semantic-release (bumps `package.json`, publishes to npm, pushes tag). Optional: tag push runs [Verify release tag](.github/workflows/verify-release-tag.yml) for an extra test pass and tag vs `package.json` check (no publish). Prefer [npm Trusted Publisher](https://docs.npmjs.com/trusted-publishers) (workflow file `release-version.yml`) so no long-lived `NPM_TOKEN` is needed for CI; see [CONTRIBUTING.md](CONTRIBUTING.md). Do not create tags manually; only the Release version workflow creates tags so that tag and package version stay in sync.
|
|
292
294
|
- **CI:** Every PR and push to `main` runs tests on Node 20 and 22 ([CI workflow](.github/workflows/ci.yml)).
|
|
293
295
|
|
|
294
296
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for branch, PR, and conventional-commit details.
|
package/bin/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.8.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "climaybe",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Shopify CI/CD CLI — scaffolds workflows, branch strategy, and store config for single-store and multi-store theme repos",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
},
|
|
30
30
|
"bugs": "https://github.com/electricmaybe/climaybe/issues",
|
|
31
31
|
"homepage": "https://github.com/electricmaybe/climaybe#readme",
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public",
|
|
34
|
+
"provenance": true
|
|
35
|
+
},
|
|
32
36
|
"scripts": {
|
|
33
37
|
"test": "node scripts/run-tests.js 2>&1 | tee test.log",
|
|
34
38
|
"prepare": "husky",
|
|
@@ -56,12 +60,7 @@
|
|
|
56
60
|
}
|
|
57
61
|
],
|
|
58
62
|
"@semantic-release/release-notes-generator",
|
|
59
|
-
|
|
60
|
-
"@semantic-release/npm",
|
|
61
|
-
{
|
|
62
|
-
"npmPublish": false
|
|
63
|
-
}
|
|
64
|
-
],
|
|
63
|
+
"@semantic-release/npm",
|
|
65
64
|
[
|
|
66
65
|
"@semantic-release/git",
|
|
67
66
|
{
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import pc from 'picocolors';
|
|
2
2
|
import { writeConfig } from '../lib/config.js';
|
|
3
|
-
import {
|
|
3
|
+
import { scaffoldCursorBundle } from '../lib/cursor-bundle.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* Can be run standalone or after init
|
|
6
|
+
* Install Electric Maybe Cursor rules and skills (.cursor/rules, .cursor/skills).
|
|
7
|
+
* Can be run standalone or after init if Cursor bundle was skipped.
|
|
8
8
|
*/
|
|
9
9
|
export async function addCursorSkillCommand() {
|
|
10
|
-
console.log(pc.bold('\n climaybe — Add Cursor
|
|
10
|
+
console.log(pc.bold('\n climaybe — Add Cursor rules + skills\n'));
|
|
11
11
|
|
|
12
12
|
writeConfig({ cursor_skills: true });
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const ok = scaffoldCursorBundle();
|
|
15
|
+
if (ok) {
|
|
16
|
+
console.log(pc.green(' Installed .cursor/rules and .cursor/skills from climaybe bundle.'));
|
|
17
|
+
console.log(pc.dim(' See .cursor/rules/00-rule-index.mdc for which rules apply when.\n'));
|
|
18
|
+
} else {
|
|
19
|
+
console.log(pc.red(' Cursor bundle not found in this climaybe install.'));
|
|
20
|
+
console.log(pc.dim(' Reinstall climaybe or report an issue.\n'));
|
|
21
|
+
}
|
|
17
22
|
}
|
package/src/commands/init.js
CHANGED
|
@@ -15,7 +15,8 @@ import { readConfig, writeConfig } from '../lib/config.js';
|
|
|
15
15
|
import { ensureGitRepo, ensureInitialCommit, ensureStagingBranch, createStoreBranches, getSuggestedTagForRelease } from '../lib/git.js';
|
|
16
16
|
import { scaffoldWorkflows } from '../lib/workflows.js';
|
|
17
17
|
import { createStoreDirectories } from '../lib/store-sync.js';
|
|
18
|
-
import { scaffoldCommitlint
|
|
18
|
+
import { scaffoldCommitlint } from '../lib/commit-tooling.js';
|
|
19
|
+
import { scaffoldCursorBundle } from '../lib/cursor-bundle.js';
|
|
19
20
|
import {
|
|
20
21
|
isGhAvailable,
|
|
21
22
|
hasGitHubRemote,
|
|
@@ -87,7 +88,7 @@ async function runInitFlow() {
|
|
|
87
88
|
includeBuild: enableBuildWorkflows,
|
|
88
89
|
});
|
|
89
90
|
|
|
90
|
-
// 7. Optional commitlint + Husky and Cursor
|
|
91
|
+
// 7. Optional commitlint + Husky and Cursor rules + skills bundle
|
|
91
92
|
if (enableCommitlint) {
|
|
92
93
|
console.log(pc.dim(' Setting up commitlint + Husky...'));
|
|
93
94
|
if (scaffoldCommitlint()) {
|
|
@@ -97,8 +98,12 @@ async function runInitFlow() {
|
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
if (enableCursorSkills) {
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
const cursorOk = scaffoldCursorBundle();
|
|
102
|
+
if (cursorOk) {
|
|
103
|
+
console.log(pc.green(' Electric Maybe Cursor rules + skills → .cursor/rules, .cursor/skills'));
|
|
104
|
+
} else {
|
|
105
|
+
console.log(pc.yellow(' Cursor bundle not found in package (skipped).'));
|
|
106
|
+
}
|
|
102
107
|
}
|
|
103
108
|
|
|
104
109
|
// Done
|
|
@@ -117,7 +122,7 @@ async function runInitFlow() {
|
|
|
117
122
|
console.log(pc.dim(` Preview workflows: ${enablePreviewWorkflows ? 'enabled' : 'disabled'}`));
|
|
118
123
|
console.log(pc.dim(` Build workflows: ${enableBuildWorkflows ? 'enabled' : 'disabled'}`));
|
|
119
124
|
console.log(pc.dim(` commitlint + Husky: ${enableCommitlint ? 'enabled' : 'disabled'}`));
|
|
120
|
-
console.log(pc.dim(` Cursor
|
|
125
|
+
console.log(pc.dim(` Cursor rules + skills: ${enableCursorSkills ? 'installed' : 'skipped'}`));
|
|
121
126
|
|
|
122
127
|
const suggestedTag = getSuggestedTagForRelease();
|
|
123
128
|
const tagLabel = suggestedTag === 'v1.0.0' ? 'Tag your first release' : 'Tag your next release';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Index of project rules — read the relevant rule file when performing the listed activities
|
|
3
|
+
globs:
|
|
4
|
+
- "**/*"
|
|
5
|
+
alwaysApply: true
|
|
6
|
+
---
|
|
7
|
+
# Rule Index
|
|
8
|
+
|
|
9
|
+
When you perform any of the following, **read and apply** the corresponding rule file from `.cursor/rules/`:
|
|
10
|
+
|
|
11
|
+
- **Git commits, commit messages** → `commit-rules.mdc`
|
|
12
|
+
- **Accessibility, a11y, focus, WCAG, UI behavior** → `accessibility-rules.mdc`
|
|
13
|
+
- **JavaScript, web components, _scripts/, *.js** → `javascript-standards.mdc`
|
|
14
|
+
- **Tailwind CSS, theme tokens, Liquid/CSS classes, _styles/** → `tailwindcss-rules.mdc`
|
|
15
|
+
- **Liquid syntax and usage** → `liquid.mdc`
|
|
16
|
+
- **Section files (sections/*.liquid)** → `sections.mdc`
|
|
17
|
+
- **Snippets (snippets/*.liquid)** → `snippets.mdc`
|
|
18
|
+
- **Schema definitions (section/layout schemas)** → `schemas.mdc`
|
|
19
|
+
- **Liquid documentation comments** → `liquid-doc-rules.mdc`
|
|
20
|
+
- **JS refactor tasks / current refactoring work** → `js-refactor-tasks.mdc`
|
|
21
|
+
- **Adding or editing Cursor rules** → `cursor-rule-template.mdc`
|
|
22
|
+
- **Overview of global rules and sync** → `global-rules-reference.mdc` (optional)
|
|
23
|
+
|
|
24
|
+
Use the Read tool to load the relevant rule file when the task matches one of the above. Project overview and this index are always in context; other rules are applied when their scope applies.
|