climaybe 1.7.3 β 1.8.1
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 +8 -6
- package/bin/version.txt +1 -1
- package/package.json +1 -1
- 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/build/reusable-build.yml +1 -1
- package/src/workflows/shared/version-bump.yml +5 -2
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: JavaScript component refactor tasks and improvement tracking
|
|
3
|
+
globs:
|
|
4
|
+
- "**/*.js"
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
# JavaScript Component Refactor Tasks
|
|
8
|
+
|
|
9
|
+
This document tracks JavaScript components that need refactoring to match our gold standard and maintains a prioritized list of improvements.
|
|
10
|
+
|
|
11
|
+
## π Gold Standard Reference: `_scripts/electric-modal.js`
|
|
12
|
+
|
|
13
|
+
The canonical implementation is **`_scripts/electric-modal.js`**. Read that file when implementing or refactoring web components. It exemplifies:
|
|
14
|
+
|
|
15
|
+
- β
**Comprehensive JSDoc comments** with @param, @returns, @private tags
|
|
16
|
+
- β
**Private fields/methods** using # syntax for encapsulation
|
|
17
|
+
- β
**Proper error handling** with try-catch and error events
|
|
18
|
+
- β
**Clean lifecycle** (connectedCallback/disconnectedCallback)
|
|
19
|
+
- β
**Resource cleanup** (timeouts, event listeners, focus trap)
|
|
20
|
+
- β
**Accessibility** (focus management, ARIA, escape/click-outside)
|
|
21
|
+
- β
**Performance** (animation timing, scroll lock)
|
|
22
|
+
|
|
23
|
+
See also `javascript-standards.mdc` for the full checklist.
|
|
24
|
+
|
|
25
|
+
## π¨ High Priority Refactors
|
|
26
|
+
|
|
27
|
+
### 1. `product--form.js` - NEEDS MAJOR REFACTOR
|
|
28
|
+
**Issues:**
|
|
29
|
+
- β Inconsistent error handling
|
|
30
|
+
- β Complex nested logic without proper organization
|
|
31
|
+
- β Hardcoded magic numbers (e.g. timeouts)
|
|
32
|
+
- β Align JSDoc and lifecycle with electric-modal.js patterns
|
|
33
|
+
|
|
34
|
+
**Priority:** HIGH - Core e-commerce functionality
|
|
35
|
+
|
|
36
|
+
## π Medium / Lower Priority Refactors
|
|
37
|
+
|
|
38
|
+
### 2. `header.js` - NEEDS REVIEW
|
|
39
|
+
**Status:** Large file; ensure cleanup, JSDoc, and private # usage match gold standard.
|
|
40
|
+
**Priority:** MEDIUM
|
|
41
|
+
|
|
42
|
+
### 3. `quick-atc-modal.js` - NEEDS REVIEW
|
|
43
|
+
**Status:** Modal usage; align with electric-modal patterns and error handling.
|
|
44
|
+
**Priority:** MEDIUM
|
|
45
|
+
|
|
46
|
+
### 4. `electric-section.js` / `electric-section-refactored.js` - NEEDS REVIEW
|
|
47
|
+
**Status:** Section behavior; ensure lifecycle and cleanup.
|
|
48
|
+
**Priority:** MEDIUM
|
|
49
|
+
|
|
50
|
+
### 5. Other `_scripts/*.js` components
|
|
51
|
+
**Status:** Review as touched; add JSDoc, # private methods, and cleanup where missing.
|
|
52
|
+
**Priority:** LOW
|
|
53
|
+
|
|
54
|
+
## π Refactor Checklist Template
|
|
55
|
+
|
|
56
|
+
For each component refactor, ensure:
|
|
57
|
+
|
|
58
|
+
### Documentation
|
|
59
|
+
- [ ] **JSDoc class description** with @example usage
|
|
60
|
+
- [ ] **Method documentation** with @param, @returns, @private tags
|
|
61
|
+
- [ ] **Property documentation** with @type annotations
|
|
62
|
+
- [ ] **Clear inline comments** for complex logic
|
|
63
|
+
|
|
64
|
+
### Code Structure
|
|
65
|
+
- [ ] **Private methods** using # syntax for encapsulation
|
|
66
|
+
- [ ] **Consistent naming** following camelCase convention
|
|
67
|
+
- [ ] **Proper lifecycle** (connectedCallback/disconnectedCallback)
|
|
68
|
+
- [ ] **Resource cleanup** (timers, observers, event listeners)
|
|
69
|
+
- [ ] **Error boundaries** with try-catch blocks
|
|
70
|
+
|
|
71
|
+
### Error Handling
|
|
72
|
+
- [ ] **Graceful error handling** with user-friendly messages
|
|
73
|
+
- [ ] **Custom error events** for parent component communication
|
|
74
|
+
- [ ] **Console error logging** with component context
|
|
75
|
+
- [ ] **Fallback behavior** when operations fail
|
|
76
|
+
|
|
77
|
+
### Performance
|
|
78
|
+
- [ ] **Debouncing** for frequent operations (input, scroll, resize)
|
|
79
|
+
- [ ] **Efficient DOM queries** (cache selectors when possible)
|
|
80
|
+
- [ ] **Memory leak prevention** (cleanup intervals, observers)
|
|
81
|
+
- [ ] **Lazy initialization** where appropriate
|
|
82
|
+
|
|
83
|
+
### Accessibility
|
|
84
|
+
- [ ] **ARIA attributes** for dynamic content
|
|
85
|
+
- [ ] **Keyboard navigation** support
|
|
86
|
+
- [ ] **Screen reader** announcements for state changes
|
|
87
|
+
- [ ] **Focus management** for interactive elements
|
|
88
|
+
|
|
89
|
+
### Testing Considerations
|
|
90
|
+
- [ ] **Error scenarios** handled gracefully
|
|
91
|
+
- [ ] **Edge cases** considered (empty data, network failures)
|
|
92
|
+
- [ ] **Browser compatibility** (modern ES6+ features)
|
|
93
|
+
- [ ] **Mobile responsiveness** for touch interactions
|
|
94
|
+
|
|
95
|
+
## π― Implementation Strategy
|
|
96
|
+
|
|
97
|
+
### Phase 1: Critical
|
|
98
|
+
1. `product--form.js` - Core product form / ATC
|
|
99
|
+
|
|
100
|
+
### Phase 2: Important
|
|
101
|
+
2. `header.js`, `quick-atc-modal.js`, `electric-section.js` / `electric-section-refactored.js`
|
|
102
|
+
|
|
103
|
+
### Phase 3: As touched
|
|
104
|
+
3. Other `_scripts/*.js` β add JSDoc, # private methods, cleanup when editing
|
|
105
|
+
|
|
106
|
+
## π Notes for Developers
|
|
107
|
+
|
|
108
|
+
### When Refactoring:
|
|
109
|
+
1. **Keep the existing API** - Don't break existing HTML usage
|
|
110
|
+
2. **Add JSDoc first** - Document before refactoring logic
|
|
111
|
+
3. **Test thoroughly** - Ensure no regression in functionality
|
|
112
|
+
4. **Update this document** - Mark completed tasks and add new findings
|
|
113
|
+
|
|
114
|
+
### Code Review Focus:
|
|
115
|
+
1. **Documentation quality** - Is it clear and comprehensive?
|
|
116
|
+
2. **Error handling** - Are all failure modes covered?
|
|
117
|
+
3. **Performance impact** - Any new bottlenecks introduced?
|
|
118
|
+
4. **Accessibility** - Does it work with screen readers and keyboard?
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
**Last Updated:** 2025-08-08
|
|
123
|
+
**Next Review:** Weekly during refactor phase
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Linear MCP task creation guide β IDs, labels, milestones, conventions for Electric Maybe workspace
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Linear Task Creation Guide β Electric Maybe
|
|
7
|
+
|
|
8
|
+
## Project & Team
|
|
9
|
+
- **Team:** Electric Maybe (`e0b0fceb-1d21-4499-a097-d6c584105d83`)
|
|
10
|
+
- **Assignee (berk):** `51fcfa70-5c0f-446d-9e31-f56874a9f689`
|
|
11
|
+
|
|
12
|
+
## Voldt Redesign Project
|
|
13
|
+
- **Project ID:** `21e19dac-de22-470c-806b-3c1c21ddf414`
|
|
14
|
+
- **Merch Dev milestone:** `eac0d544-51ed-4092-8db1-117945add622` β Home, Search, Collection, Product Card
|
|
15
|
+
- **Core Commerce Dev milestone:** `9c7af7d1-d08c-4677-ba1c-b156fa8c6365` β Product, Cart, Footer, Header
|
|
16
|
+
- **Content Dev milestone:** `ce2d15ca-eb37-4ff5-b3d3-2baa5c4348fa` β Static pages, Blog, Article, post-launch
|
|
17
|
+
|
|
18
|
+
## Label Groups (always use IDs, never names)
|
|
19
|
+
|
|
20
|
+
### team β
|
|
21
|
+
| Label | ID |
|
|
22
|
+
|---|---|
|
|
23
|
+
| dev | `997107d8-b85f-4226-98b1-6845690aeada` |
|
|
24
|
+
| design | `edd64501-4a86-4218-a0ce-8b05385f42c0` |
|
|
25
|
+
|
|
26
|
+
### from β
|
|
27
|
+
| Label | ID |
|
|
28
|
+
|---|---|
|
|
29
|
+
| project-requirement | `817e3412-be75-460c-bd33-bbf049db1383` |
|
|
30
|
+
| bug-discovered | `2bd676f3-1a3a-4d71-b292-85e0972e8d6a` |
|
|
31
|
+
| internal-decision | `229959c5-26f4-4953-a37e-9f549dabb4aa` |
|
|
32
|
+
| client-request | `ede85833-b384-4b6a-ba47-fc3b2df77aaa` |
|
|
33
|
+
| qa-found | `3becefb6-578a-4d5e-94c3-13f61644f03c` |
|
|
34
|
+
|
|
35
|
+
### is a β
|
|
36
|
+
| Label | ID |
|
|
37
|
+
|---|---|
|
|
38
|
+
| fix | `0697690e-c953-4a5e-acb6-8669cb9b46d9` |
|
|
39
|
+
| feat | `d7d634d4-c488-492f-b495-577a52efb3ac` |
|
|
40
|
+
| change | `a2742790-c830-4ada-9f1c-c816c8cd66ed` |
|
|
41
|
+
| QA | `cab19198-9b25-40b4-9fe8-a7743aee2b78` |
|
|
42
|
+
| chore | `64164907-7198-46b2-b483-6fe573230619` |
|
|
43
|
+
| revision | `f96f00f9-7614-4537-9142-10cef4c6a0b4` |
|
|
44
|
+
| template | `da50e144-cb4c-4678-bffb-a0e7266d018f` |
|
|
45
|
+
|
|
46
|
+
### risk level β
|
|
47
|
+
Risk = how much testing is needed / how likely to introduce bugs.
|
|
48
|
+
|
|
49
|
+
| Label | ID |
|
|
50
|
+
|---|---|
|
|
51
|
+
| ! (safe) | `ce9f11e1-45d6-4a1e-a2d9-f7a1c46eb1a3` |
|
|
52
|
+
| !! (moderate) | `add74e2d-6972-4da2-b6d3-e95525818db8` |
|
|
53
|
+
| !!! (high) | `098f2894-9697-433e-b4a2-c0f606be55b7` |
|
|
54
|
+
|
|
55
|
+
### at β (EXCLUSIVE β only ONE per issue)
|
|
56
|
+
| Label | ID |
|
|
57
|
+
|---|---|
|
|
58
|
+
| index template | `de83c4db-0674-45d4-a0fb-d942be41de1a` |
|
|
59
|
+
| searchbar | `636b0ca1-f5ea-4254-b5ff-ee8473f74e57` |
|
|
60
|
+
| search template | `205ae777-f40e-457e-8f5f-0bf76bc911b7` |
|
|
61
|
+
| collection template | `a9ec25ac-5436-4ea0-833c-bef2d6d4b30a` |
|
|
62
|
+
| product template | `fca9875a-ba61-49b8-b45c-0c7ebbeafeb2` |
|
|
63
|
+
| cart template | `7fff4ea1-7522-4b19-84f7-a8fcd68eb459` |
|
|
64
|
+
| pages template | `82bd6de5-b6dc-44af-808f-1888faafc822` |
|
|
65
|
+
| blog template | `21dce2ec-2395-46cd-b730-fa39e287b6b5` |
|
|
66
|
+
| article template | `e1ef0385-90a1-43ad-8f72-43509926041a` |
|
|
67
|
+
| s--header | `33c5a132-00ec-4301-9d7b-41bfc38f61ac` |
|
|
68
|
+
| s--footer | `af8456e0-c202-41c1-be24-59350e7155fb` |
|
|
69
|
+
| s--reviews | `5cd84073-5a4d-4a37-a327-d8a4234530f6` |
|
|
70
|
+
| s--featured-collection | `c6b43594-c7c8-43ab-9de4-eb81d7f4cb24` |
|
|
71
|
+
| s--faq-list | `e77e99b6-1dca-40ab-9b86-388d7dbdd677` |
|
|
72
|
+
| s--blog-posts | `2cadd6ab-9a5c-440e-995f-df39a71dc5c0` |
|
|
73
|
+
| s--contact-form | `383a1a02-dd55-465a-b0e2-bde4a2d7f432` |
|
|
74
|
+
| s--image-with-text-overlay | `3ba3599b-9157-4422-8944-7e12ca974eea` |
|
|
75
|
+
| m--product-card | `d27901e1-74f2-43e3-9107-b3f953095aa8` |
|
|
76
|
+
| m--product-form | `e5b467f1-16b3-4cbd-9a87-2ec356c95ade` |
|
|
77
|
+
| m--slider-navigation | `b598da2b-eedf-4447-8a01-f88befe91c4a` |
|
|
78
|
+
| m--accordion | `8d423794-2d1e-4110-a154-cd9c2811f849` |
|
|
79
|
+
| a--video | `016eb37b-0158-4c13-86d6-d4fd233064d4` |
|
|
80
|
+
| a--image | `e47974ad-4e09-45f6-bdc5-6ff6605b7587` |
|
|
81
|
+
| new-section | `933bc015-52df-42d4-a2cc-3d51ed021de9` |
|
|
82
|
+
| general DX | `80aa82d7-4af7-418c-9173-183514408baf` |
|
|
83
|
+
| general UI/UX | `c47e0a02-0008-460c-a947-2474d5b615a0` |
|
|
84
|
+
| general research | `deb588c1-2f87-4ecb-ad6c-70071adbb30d` |
|
|
85
|
+
|
|
86
|
+
## Task Creation Rules
|
|
87
|
+
|
|
88
|
+
1. **Language:** All titles and descriptions in Turkish.
|
|
89
|
+
2. **Descriptions:** Write brief PRDs with "Kapsam" (scope) and "ΓΓΆzΓΌm Γnerisi" (suggested solution). Analyze the codebase for relevant files and include them.
|
|
90
|
+
3. **Estimation:** Use points 1, 2, 3, 5, 8 based on complexity.
|
|
91
|
+
4. **Status:** All tasks start as "To-do".
|
|
92
|
+
5. **Labels:** Always use label **IDs** (not names). Apply exactly 5 labels per task: one from each group (team, from, is a, at, risk level). The "at" group is exclusive β only one allowed per issue.
|
|
93
|
+
6. **Hierarchy:** Group related tasks under parent issues using `parentId` for subtasks.
|
|
94
|
+
7. **Project + Milestone:** Always set `project` and `milestone` on creation to avoid bulk-fixing later.
|
|
95
|
+
8. **Meeting notes:** Integrate into relevant template tasks as subtasks. If global, create as parent-level tasks.
|
|
96
|
+
9. **Skip empty categories** β if a template header has no tasks listed, don't create it.
|
|
97
|
+
10. **Non-theme tasks** (metafield creation, data migration, etc.) β just write a PRD, no codebase analysis needed.
|
|
98
|
+
|
|
99
|
+
## Gotchas
|
|
100
|
+
|
|
101
|
+
- Linear API rejects label names containing `β` or emoji β always use UUIDs from the tables above.
|
|
102
|
+
- The "at" label group is **exclusive** (one label per issue). If a task spans two components, pick the most relevant one.
|
|
103
|
+
- Always pass `project` ID during `create_issue` to avoid updating dozens of tasks after the fact.
|
|
104
|
+
- Search for users by email fragment if display name doesn't match.
|
|
105
|
+
- When creating many tasks, create all parents first to get their IDs, then create subtasks in parallel.
|