ima-claude 2.18.0 → 2.25.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 +55 -9
- package/dist/cli.js +5 -1
- package/package.json +1 -1
- package/plugins/ima-claude/.claude-plugin/plugin.json +2 -2
- package/plugins/ima-claude/agents/explorer.md +29 -15
- package/plugins/ima-claude/agents/implementer.md +58 -13
- package/plugins/ima-claude/agents/memory.md +19 -19
- package/plugins/ima-claude/agents/reviewer.md +56 -34
- package/plugins/ima-claude/agents/tester.md +59 -16
- package/plugins/ima-claude/agents/wp-developer.md +66 -21
- package/plugins/ima-claude/hooks/bootstrap.sh +42 -44
- package/plugins/ima-claude/hooks/prompt_coach_digest.md +14 -17
- package/plugins/ima-claude/hooks/prompt_coach_system.md +10 -12
- package/plugins/ima-claude/personalities/README.md +17 -6
- package/plugins/ima-claude/personalities/enable-efficient.md +61 -0
- package/plugins/ima-claude/personalities/enable-terse.md +71 -0
- package/plugins/ima-claude/skills/agentic-workflows/SKILL.md +97 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/phases/deliver.md +181 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/phases/draft.md +99 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/phases/gather.md +130 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/phases/outline.md +106 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/phases/review.md +137 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/standards/draft-format.md +159 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/standards/editorial-standards.md +160 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/standards/outline-format.md +110 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/templates/avada-construction-guide.md +263 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/templates/avada-webinar-example.txt +275 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/templates/cta-block-catalog.md +169 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/templates/espo-email-preparation.md +241 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/templates/webinar-recap-email-espo.html +339 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/templates/webinar-reminder-email-espo.html +458 -0
- package/plugins/ima-claude/skills/agentic-workflows/references/workflows/editorial/webinar-summary.md +81 -0
- package/plugins/ima-claude/skills/architect/SKILL.md +54 -168
- package/plugins/ima-claude/skills/compound-bridge/SKILL.md +41 -94
- package/plugins/ima-claude/skills/design-to-code/SKILL.md +91 -0
- package/plugins/ima-claude/skills/design-to-code/references/guardrails.md +46 -0
- package/plugins/ima-claude/skills/design-to-code/references/phase-a-design-to-prompt.md +141 -0
- package/plugins/ima-claude/skills/design-to-code/references/phase-b-prompt-to-code.md +155 -0
- package/plugins/ima-claude/skills/design-to-code/references/prompt-template.md +95 -0
- package/plugins/ima-claude/skills/discourse/SKILL.md +79 -194
- package/plugins/ima-claude/skills/discourse-admin/SKILL.md +41 -103
- package/plugins/ima-claude/skills/docs-organize/SKILL.md +63 -203
- package/plugins/ima-claude/skills/ember-discourse/SKILL.md +90 -200
- package/plugins/ima-claude/skills/espocrm/SKILL.md +14 -23
- package/plugins/ima-claude/skills/espocrm-api/SKILL.md +79 -192
- package/plugins/ima-claude/skills/functional-programmer/SKILL.md +33 -237
- package/plugins/ima-claude/skills/gh-cli/SKILL.md +26 -65
- package/plugins/ima-claude/skills/ima-bootstrap/SKILL.md +71 -104
- package/plugins/ima-claude/skills/ima-bootstrap/references/ima-brand.md +32 -22
- package/plugins/ima-claude/skills/ima-brand/SKILL.md +18 -23
- package/plugins/ima-claude/skills/ima-copywriting/SKILL.md +68 -179
- package/plugins/ima-claude/skills/ima-doc2pdf/SKILL.md +32 -102
- package/plugins/ima-claude/skills/ima-editorial-scorecard/SKILL.md +38 -63
- package/plugins/ima-claude/skills/ima-editorial-workflow/SKILL.md +69 -114
- package/plugins/ima-claude/skills/ima-email-creator/SKILL.md +16 -22
- package/plugins/ima-claude/skills/ima-forms-expert/SKILL.md +21 -37
- package/plugins/ima-claude/skills/jira-checkpoint/SKILL.md +39 -120
- package/plugins/ima-claude/skills/jquery/SKILL.md +107 -233
- package/plugins/ima-claude/skills/js-fp/SKILL.md +75 -296
- package/plugins/ima-claude/skills/js-fp-api/SKILL.md +52 -162
- package/plugins/ima-claude/skills/js-fp-react/SKILL.md +47 -270
- package/plugins/ima-claude/skills/js-fp-vue/SKILL.md +55 -209
- package/plugins/ima-claude/skills/js-fp-wordpress/SKILL.md +59 -204
- package/plugins/ima-claude/skills/livecanvas/SKILL.md +19 -32
- package/plugins/ima-claude/skills/mcp-atlassian/SKILL.md +146 -136
- package/plugins/ima-claude/skills/mcp-atlassian/references/direct-api-attachments.md +115 -0
- package/plugins/ima-claude/skills/mcp-atlassian/references/direct-api-auth.md +103 -0
- package/plugins/ima-claude/skills/mcp-atlassian/references/direct-api-bulk.md +149 -0
- package/plugins/ima-claude/skills/mcp-atlassian/references/direct-api-misc.md +195 -0
- package/plugins/ima-claude/skills/mcp-atlassian/references/direct-api-sprints.md +158 -0
- package/plugins/ima-claude/skills/mcp-context7/SKILL.md +32 -64
- package/plugins/ima-claude/skills/mcp-gitea/SKILL.md +98 -188
- package/plugins/ima-claude/skills/mcp-github/SKILL.md +60 -124
- package/plugins/ima-claude/skills/mcp-memory/SKILL.md +1 -177
- package/plugins/ima-claude/skills/mcp-qdrant/SKILL.md +58 -115
- package/plugins/ima-claude/skills/mcp-sequential/SKILL.md +32 -87
- package/plugins/ima-claude/skills/mcp-serena/SKILL.md +54 -80
- package/plugins/ima-claude/skills/mcp-tavily/SKILL.md +40 -63
- package/plugins/ima-claude/skills/mcp-vestige/SKILL.md +75 -116
- package/plugins/ima-claude/skills/php-authnet/SKILL.md +32 -65
- package/plugins/ima-claude/skills/php-fp/SKILL.md +50 -129
- package/plugins/ima-claude/skills/php-fp-wordpress/SKILL.md +25 -73
- package/plugins/ima-claude/skills/phpunit-wp/SKILL.md +103 -463
- package/plugins/ima-claude/skills/playwright/SKILL.md +69 -220
- package/plugins/ima-claude/skills/prompt-starter/SKILL.md +35 -82
- package/plugins/ima-claude/skills/prompt-starter/references/code-review.md +38 -0
- package/plugins/ima-claude/skills/py-fp/SKILL.md +78 -384
- package/plugins/ima-claude/skills/quasar-fp/SKILL.md +54 -255
- package/plugins/ima-claude/skills/quickstart/SKILL.md +7 -11
- package/plugins/ima-claude/skills/rails/SKILL.md +63 -184
- package/plugins/ima-claude/skills/resume-session/SKILL.md +14 -35
- package/plugins/ima-claude/skills/rg/SKILL.md +61 -146
- package/plugins/ima-claude/skills/ruby-fp/SKILL.md +66 -163
- package/plugins/ima-claude/skills/save-session/SKILL.md +10 -39
- package/plugins/ima-claude/skills/scorecard/SKILL.md +24 -38
- package/plugins/ima-claude/skills/skill-analyzer/SKILL.md +42 -71
- package/plugins/ima-claude/skills/skill-creator/SKILL.md +79 -250
- package/plugins/ima-claude/skills/task-master/SKILL.md +11 -31
- package/plugins/ima-claude/skills/task-planner/SKILL.md +44 -153
- package/plugins/ima-claude/skills/task-runner/SKILL.md +61 -143
- package/plugins/ima-claude/skills/unit-testing/SKILL.md +59 -134
- package/plugins/ima-claude/skills/wp-ddev/SKILL.md +38 -120
- package/plugins/ima-claude/skills/wp-local/SKILL.md +26 -108
|
@@ -5,175 +5,96 @@ description: "FP patterns for JavaScript in WordPress/Bootstrap context - ecosys
|
|
|
5
5
|
|
|
6
6
|
# JavaScript FP - WordPress/Bootstrap
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
**"In WordPress, jQuery IS native. Use what's simple and matches the ecosystem."**
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
jQuery is always available (WordPress core dependency, 0 additional bytes). The js-fp "Native patterns > FP utilities" rule targets custom `pipe()`/`curry()` abstractions — not established ecosystem libraries like jQuery. Builds on `../js-fp/SKILL.md`.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
- Need guidance on jQuery vs Vanilla JS decisions
|
|
14
|
-
- Implementing pure business logic in browser JavaScript
|
|
15
|
-
- Working with Gravity Forms, ACF, or other jQuery-dependent plugins
|
|
16
|
-
- Creating form handlers, AJAX operations, or DOM interactions
|
|
12
|
+
## Decision Matrix
|
|
17
13
|
|
|
18
|
-
|
|
14
|
+
| Context | Recommendation |
|
|
15
|
+
|---------|---------------|
|
|
16
|
+
| New isolated component | Vanilla JS |
|
|
17
|
+
| AJAX operations | jQuery `$.ajax` |
|
|
18
|
+
| Integrating with WP plugins | jQuery |
|
|
19
|
+
| Animation | CSS transitions |
|
|
20
|
+
| Pure business logic | Vanilla JS (no DOM, fully testable) |
|
|
21
|
+
| DOM event delegation | Either |
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
## jQuery Is Already Loaded — Arguments That Don't Apply
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
## TL;DR Decision Matrix
|
|
27
|
-
|
|
28
|
-
| Context | Recommendation | Rationale |
|
|
29
|
-
|---------|---------------|-----------|
|
|
30
|
-
| **New isolated component** | Vanilla JS | No jQuery event coupling needed |
|
|
31
|
-
| **AJAX operations** | jQuery `$.ajax` | Cleaner than `fetch` + error handling |
|
|
32
|
-
| **DOM event delegation** | Either | Both work well |
|
|
33
|
-
| **Integrating with WP plugins** | jQuery | Match ecosystem patterns |
|
|
34
|
-
| **Animation** | CSS transitions | Neither jQuery nor vanilla JS |
|
|
35
|
-
| **Pure business logic** | Vanilla JS | No DOM, fully testable |
|
|
36
|
-
|
|
37
|
-
## Critical Context: WordPress Reality Check
|
|
38
|
-
|
|
39
|
-
**jQuery IS guaranteed available** in WordPress because:
|
|
40
|
-
1. WordPress core depends on jQuery
|
|
41
|
-
2. Bootstrap 5 JavaScript works with or without jQuery
|
|
42
|
-
3. Gravity Forms, ACF, and most plugins use jQuery
|
|
43
|
-
4. The overhead argument is **irrelevant** - it's already loaded (0 additional bytes)
|
|
44
|
-
|
|
45
|
-
### Arguments That DON'T Apply Here
|
|
46
|
-
|
|
47
|
-
| Common Argument | Why It Doesn't Apply |
|
|
48
|
-
|-----------------|---------------------|
|
|
49
|
-
| "jQuery adds bundle size" | Already loaded - 0 additional bytes |
|
|
25
|
+
| Argument | Why It Fails Here |
|
|
26
|
+
|----------|------------------|
|
|
27
|
+
| "jQuery adds bundle size" | Already loaded — 0 additional bytes |
|
|
50
28
|
| "jQuery is a dependency" | Already a core WordPress dependency |
|
|
51
|
-
| "Modern browsers don't need jQuery" | True, but jQuery is still there |
|
|
52
29
|
| "jQuery is slower" | Negligible for DOM operations |
|
|
53
30
|
|
|
54
31
|
## Practical Guidelines
|
|
55
32
|
|
|
56
|
-
###
|
|
33
|
+
### Don't Rewrite Working jQuery
|
|
57
34
|
|
|
58
|
-
|
|
35
|
+
YAGNI applies. Working jQuery code stays:
|
|
59
36
|
|
|
60
37
|
```javascript
|
|
61
|
-
// KEEP: Working jQuery AJAX handler
|
|
62
38
|
(function($) {
|
|
63
39
|
'use strict';
|
|
64
40
|
|
|
65
41
|
$('.ima-form').on('submit', function(e) {
|
|
66
42
|
e.preventDefault();
|
|
67
|
-
var $form = $(this);
|
|
68
|
-
|
|
69
43
|
$.ajax({
|
|
70
44
|
url: imaAjax.url,
|
|
71
45
|
type: 'POST',
|
|
72
|
-
data: $
|
|
46
|
+
data: $(this).serialize(),
|
|
73
47
|
success: function(response) {
|
|
74
|
-
$
|
|
48
|
+
$(this).find('.ima-response').html(response.message);
|
|
75
49
|
}
|
|
76
50
|
});
|
|
77
51
|
});
|
|
78
52
|
|
|
79
53
|
})(jQuery);
|
|
80
|
-
|
|
81
|
-
// DON'T: Rewrite to vanilla "just because" - No benefit, adds risk
|
|
82
54
|
```
|
|
83
55
|
|
|
84
|
-
###
|
|
56
|
+
### Choose Based on Context
|
|
85
57
|
|
|
86
58
|
```javascript
|
|
87
|
-
// jQuery:
|
|
59
|
+
// jQuery: WordPress plugin integration (must use jQuery for GF events)
|
|
88
60
|
(function($) {
|
|
89
61
|
'use strict';
|
|
90
|
-
|
|
91
|
-
// Gravity Forms event - MUST use jQuery
|
|
92
62
|
$(document).on('gform_post_render', function(event, formId) {
|
|
93
63
|
initImaFields($('#gform_' + formId));
|
|
94
64
|
});
|
|
95
|
-
|
|
96
65
|
})(jQuery);
|
|
97
66
|
|
|
98
|
-
// Vanilla JS: Isolated component
|
|
67
|
+
// Vanilla JS: Isolated component, no WP plugin interaction
|
|
99
68
|
(function() {
|
|
100
69
|
'use strict';
|
|
101
|
-
|
|
102
|
-
class RepeaterController {
|
|
103
|
-
constructor(element) {
|
|
104
|
-
this.container = element;
|
|
105
|
-
this.template = element.querySelector('[data-repeater-template]');
|
|
106
|
-
this.init();
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
init() {
|
|
110
|
-
this.container.addEventListener('click', this.handleClick.bind(this));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// Pure method - no DOM side effects
|
|
114
|
-
generateRowId() {
|
|
115
|
-
return 'row_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
70
|
document.querySelectorAll('[data-repeater-container]').forEach(function(el) {
|
|
120
71
|
new RepeaterController(el);
|
|
121
72
|
});
|
|
122
|
-
|
|
123
73
|
})();
|
|
124
74
|
```
|
|
125
75
|
|
|
126
|
-
###
|
|
127
|
-
|
|
128
|
-
```javascript
|
|
129
|
-
// AVOID: Mixing jQuery and vanilla in same file
|
|
130
|
-
(function($) {
|
|
131
|
-
document.querySelectorAll('.foo').forEach(function(el) { // Vanilla
|
|
132
|
-
$(el).on('click', handler); // jQuery - inconsistent!
|
|
133
|
-
});
|
|
134
|
-
})(jQuery);
|
|
135
|
-
|
|
136
|
-
// GOOD: Consistent jQuery throughout
|
|
137
|
-
(function($) {
|
|
138
|
-
'use strict';
|
|
139
|
-
$('.foo').each(function() {
|
|
140
|
-
$(this).on('click', handler);
|
|
141
|
-
});
|
|
142
|
-
})(jQuery);
|
|
76
|
+
### Consistent Within Files
|
|
143
77
|
|
|
144
|
-
|
|
145
|
-
(function() {
|
|
146
|
-
'use strict';
|
|
147
|
-
document.querySelectorAll('.foo').forEach(function(el) {
|
|
148
|
-
el.addEventListener('click', handler);
|
|
149
|
-
});
|
|
150
|
-
})();
|
|
151
|
-
```
|
|
78
|
+
Pick one approach per file. No mixing jQuery and vanilla selectors in the same scope.
|
|
152
79
|
|
|
153
80
|
## Pure Business Logic Pattern
|
|
154
81
|
|
|
155
|
-
|
|
82
|
+
Extract pure functions from DOM-dependent code.
|
|
156
83
|
|
|
157
84
|
```javascript
|
|
158
85
|
(function($) {
|
|
159
86
|
'use strict';
|
|
160
87
|
|
|
161
|
-
//
|
|
88
|
+
// PURE: Testable without DOM
|
|
162
89
|
function calculatePricing(quantity, unitPrice, discountPercent) {
|
|
163
90
|
var subtotal = Math.max(0, quantity) * Math.max(0, unitPrice);
|
|
164
|
-
var
|
|
165
|
-
return {
|
|
166
|
-
subtotal: subtotal,
|
|
167
|
-
discountAmount: discountAmount,
|
|
168
|
-
total: subtotal - discountAmount
|
|
169
|
-
};
|
|
91
|
+
var discount = subtotal * (Math.min(100, Math.max(0, discountPercent)) / 100);
|
|
92
|
+
return { subtotal, discountAmount: discount, total: subtotal - discount };
|
|
170
93
|
}
|
|
171
94
|
|
|
172
|
-
function formatCurrency(amount) {
|
|
173
|
-
return '$' + amount.toFixed(2);
|
|
174
|
-
}
|
|
95
|
+
function formatCurrency(amount) { return '$' + amount.toFixed(2); }
|
|
175
96
|
|
|
176
|
-
// DOM wrapper
|
|
97
|
+
// IMPURE: DOM wrapper — side effects isolated here
|
|
177
98
|
function PriceCalculator($container) {
|
|
178
99
|
this.$container = $container;
|
|
179
100
|
this.$container.on('change', 'input', this.update.bind(this));
|
|
@@ -185,117 +106,51 @@ Functional programming patterns for JavaScript in WordPress environments where j
|
|
|
185
106
|
unitPrice: parseFloat(this.$container.find('#unit-price').val()) || 0,
|
|
186
107
|
discount: parseFloat(this.$container.find('#discount').val()) || 0
|
|
187
108
|
};
|
|
188
|
-
|
|
189
|
-
|
|
109
|
+
this.$container.find('#total').text(formatCurrency(
|
|
110
|
+
calculatePricing(values.quantity, values.unitPrice, values.discount).total
|
|
111
|
+
));
|
|
190
112
|
};
|
|
191
113
|
|
|
192
|
-
// Export for testing
|
|
193
114
|
if (typeof module !== 'undefined' && module.exports) {
|
|
194
|
-
module.exports = { calculatePricing
|
|
115
|
+
module.exports = { calculatePricing, formatCurrency };
|
|
195
116
|
}
|
|
196
117
|
|
|
197
118
|
})(jQuery);
|
|
198
119
|
```
|
|
199
120
|
|
|
200
|
-
## Anti-Patterns
|
|
201
|
-
|
|
202
|
-
### Rewriting Working jQuery for No Benefit
|
|
203
|
-
|
|
204
|
-
```javascript
|
|
205
|
-
// DON'T: Same functionality, more code, no benefit
|
|
206
|
-
// Before (working): $('.btn').on('click', handler);
|
|
207
|
-
// After (unnecessary):
|
|
208
|
-
document.querySelectorAll('.btn').forEach(function(btn) {
|
|
209
|
-
btn.addEventListener('click', handler);
|
|
210
|
-
});
|
|
211
|
-
```
|
|
121
|
+
## Anti-Patterns
|
|
212
122
|
|
|
213
|
-
|
|
123
|
+
- Rewriting working jQuery to vanilla for no benefit
|
|
124
|
+
- Using `document.addEventListener('gform_post_render', ...)` — GF fires on jQuery only
|
|
125
|
+
- Custom `pipe`/`compose` utilities — use direct function calls instead
|
|
214
126
|
|
|
215
|
-
|
|
216
|
-
// DON'T: Ignore GF jQuery events (this won't work!)
|
|
217
|
-
document.addEventListener('gform_post_render', function() {});
|
|
127
|
+
## File Organization
|
|
218
128
|
|
|
219
|
-
// DO: Use jQuery for GF integration
|
|
220
|
-
$(document).on('gform_post_render', function(event, formId) {});
|
|
221
129
|
```
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
// INSTEAD: Direct function calls
|
|
230
|
-
function processFormData(data) {
|
|
231
|
-
var sanitized = sanitizeData(data);
|
|
232
|
-
var validated = validateData(sanitized);
|
|
233
|
-
return formatData(validated);
|
|
234
|
-
}
|
|
130
|
+
plugin-name/assets/js/
|
|
131
|
+
├── plugin-base.js # jQuery — AJAX, GF integration
|
|
132
|
+
├── plugin-admin.js # jQuery — Admin UI
|
|
133
|
+
├── plugin-repeater.js # Vanilla — Isolated component
|
|
134
|
+
└── pure/
|
|
135
|
+
├── formatting.js # Pure functions (testable)
|
|
136
|
+
└── calculations.js # Pure functions (testable)
|
|
235
137
|
```
|
|
236
138
|
|
|
237
139
|
## Quality Gates
|
|
238
140
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
5. **Testability**: Can pure functions be tested without DOM?
|
|
246
|
-
6. **YAGNI**: Are we adding complexity without clear benefit?
|
|
141
|
+
1. Needs jQuery-plugin interaction (GF, ACF)? → Use jQuery
|
|
142
|
+
2. Existing working code? → Enhance, don't rewrite
|
|
143
|
+
3. Business logic separated from DOM operations?
|
|
144
|
+
4. File uses one approach consistently?
|
|
145
|
+
5. Pure functions testable without DOM?
|
|
146
|
+
6. Adding complexity without clear benefit? → YAGNI
|
|
247
147
|
|
|
248
148
|
## Reference Files
|
|
249
149
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
### Event Patterns
|
|
258
|
-
**File**: [references/event-patterns.md](references/event-patterns.md)
|
|
259
|
-
**When**: Need event delegation or DOMContentLoaded patterns
|
|
260
|
-
**Contains**: jQuery delegation, vanilla delegation, document ready patterns
|
|
261
|
-
|
|
262
|
-
### WordPress Integration
|
|
263
|
-
**File**: [references/wp-integration.md](references/wp-integration.md)
|
|
264
|
-
**When**: Integrating with Gravity Forms, ACF, or WordPress admin
|
|
265
|
-
**Contains**: GF hooks, ACF hooks, admin JS, pure logic extraction, testing
|
|
266
|
-
|
|
267
|
-
### PHP Integration
|
|
268
|
-
**File**: `../php-fp-wordpress/SKILL.md`
|
|
269
|
-
**When**: Need server-side integration patterns
|
|
270
|
-
**Contains**: WordPress AJAX handlers, security practices, PHP/JS coordination
|
|
271
|
-
|
|
272
|
-
### Core FP Principles
|
|
273
|
-
**File**: `../js-fp/SKILL.md`
|
|
274
|
-
**When**: Need foundational FP patterns
|
|
275
|
-
**Contains**: Purity, composition, dependency injection, immutability, testing
|
|
276
|
-
|
|
277
|
-
## File Organization
|
|
278
|
-
|
|
279
|
-
```
|
|
280
|
-
plugin-name/
|
|
281
|
-
└── assets/
|
|
282
|
-
└── js/
|
|
283
|
-
├── plugin-base.js # jQuery - AJAX, GF integration
|
|
284
|
-
├── plugin-admin.js # jQuery - Admin UI interactions
|
|
285
|
-
├── plugin-repeater.js # Vanilla - Isolated component
|
|
286
|
-
└── pure/
|
|
287
|
-
├── formatting.js # Pure functions (testable)
|
|
288
|
-
└── calculations.js # Pure functions (testable)
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
## Success Metrics
|
|
292
|
-
|
|
293
|
-
- **Ecosystem Fit**: JavaScript integrates smoothly with WordPress/plugins
|
|
294
|
-
- **Consistency**: Files use one approach throughout
|
|
295
|
-
- **Testability**: Pure business logic has unit tests
|
|
296
|
-
- **Maintainability**: Clear separation of concerns
|
|
297
|
-
- **Pragmatism**: Working code not rewritten without benefit
|
|
298
|
-
|
|
299
|
-
## Philosophy
|
|
300
|
-
|
|
301
|
-
*"In WordPress, jQuery IS native. Use what's simple and matches the ecosystem. Separate pure business logic for testability, but don't fight the platform. Working code > ideological purity."*
|
|
150
|
+
| File | Load When |
|
|
151
|
+
|------|-----------|
|
|
152
|
+
| `references/ajax-patterns.md` | jQuery $.ajax, vanilla fetch, error handling, retry |
|
|
153
|
+
| `references/event-patterns.md` | Event delegation, DOMContentLoaded, document ready |
|
|
154
|
+
| `references/wp-integration.md` | GF hooks, ACF hooks, admin JS, pure logic extraction |
|
|
155
|
+
| `../php-fp-wordpress/SKILL.md` | Server-side: AJAX handlers, security, PHP/JS coordination |
|
|
156
|
+
| `../js-fp/SKILL.md` | Core FP: purity, composition, DI, testing |
|
|
@@ -12,10 +12,9 @@ description: >-
|
|
|
12
12
|
|
|
13
13
|
# LiveCanvas
|
|
14
14
|
|
|
15
|
-
Visual page builder for WordPress. Pure HTML/Bootstrap — no proprietary markup
|
|
16
|
-
Content lives in the WordPress database (`wp_posts`), not PHP template files.
|
|
15
|
+
Visual page builder for WordPress. Pure HTML/Bootstrap — no proprietary markup. Content lives in `wp_posts`, not PHP template files.
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
Use `ima-bootstrap` skill for Bootstrap 5.3 utilities, grid, and IMA brand integration — applies directly here.
|
|
19
18
|
|
|
20
19
|
## Mental Model
|
|
21
20
|
|
|
@@ -23,22 +22,20 @@ Content lives in the WordPress database (`wp_posts`), not PHP template files.
|
|
|
23
22
|
LiveCanvas Page = HTML + Bootstrap classes + <tangible> blocks for dynamic data
|
|
24
23
|
```
|
|
25
24
|
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
25
|
+
- Static content: Bootstrap HTML directly
|
|
26
|
+
- Dynamic content: Loops & Logic tags in `<tangible>` blocks
|
|
27
|
+
- Logic/conditions: L&L replaces PHP (think Handlebars/Twig)
|
|
28
|
+
- No custom CSS framework: theme's Bootstrap is the only framework
|
|
30
29
|
|
|
31
30
|
## Page Structure
|
|
32
31
|
|
|
33
|
-
Every LiveCanvas page follows this hierarchy:
|
|
34
|
-
|
|
35
32
|
```html
|
|
36
33
|
<main>
|
|
37
34
|
<section> <!-- Full-width, not nestable -->
|
|
38
|
-
<div class="container">
|
|
35
|
+
<div class="container">
|
|
39
36
|
<div class="row">
|
|
40
37
|
<div class="col-lg-6">
|
|
41
|
-
<div class="lc-block">
|
|
38
|
+
<div class="lc-block">
|
|
42
39
|
<h2 editable="inline">Heading</h2>
|
|
43
40
|
</div>
|
|
44
41
|
</div>
|
|
@@ -53,15 +50,13 @@ Every LiveCanvas page follows this hierarchy:
|
|
|
53
50
|
</main>
|
|
54
51
|
```
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
- `lc-block` divs are the smallest building blocks
|
|
60
|
-
- `editable="inline"` for single-line text, `editable="rich"` for rich text
|
|
53
|
+
- `<section>` always direct children of `<main>`, edge-to-edge
|
|
54
|
+
- Standard grid: `.container` > `.row` > `.col-*`
|
|
55
|
+
- `editable="inline"` for single-line, `editable="rich"` for rich text
|
|
61
56
|
|
|
62
57
|
## Dynamic Content with Loops & Logic
|
|
63
58
|
|
|
64
|
-
Wrap L&L markup in `<tangible
|
|
59
|
+
Wrap L&L markup in `<tangible>`. Add `class="live-refresh"` for editor preview.
|
|
65
60
|
|
|
66
61
|
```html
|
|
67
62
|
<tangible class="live-refresh">
|
|
@@ -82,7 +77,7 @@ Wrap L&L markup in `<tangible>` tags. Add `class="live-refresh"` for real-time p
|
|
|
82
77
|
| Tag | Purpose | Example |
|
|
83
78
|
|-----|---------|---------|
|
|
84
79
|
| `<Loop>` | Query & iterate | `<Loop type="post" count="5">` |
|
|
85
|
-
| `<Field>` | Output
|
|
80
|
+
| `<Field>` | Output value | `<Field title />` |
|
|
86
81
|
| `<If>` / `<Else />` | Conditions | `<If field="image" exists>` |
|
|
87
82
|
| `<Set>` / `<Get>` | Variables | `<Set name="total">0</Set>` |
|
|
88
83
|
| `<Date>` | Date formatting | `<Date format="F j, Y" />` |
|
|
@@ -90,7 +85,7 @@ Wrap L&L markup in `<tangible>` tags. Add `class="live-refresh"` for real-time p
|
|
|
90
85
|
| `<Math>` | Arithmetic | `<Math>price * 1.1</Math>` |
|
|
91
86
|
| `<Template>` | Reuse saved template | `<Template name="card" />` |
|
|
92
87
|
|
|
93
|
-
|
|
88
|
+
Tags inside attributes — use `{}` instead of `<>`:
|
|
94
89
|
```html
|
|
95
90
|
<a href="{Field url}"><Field title /></a>
|
|
96
91
|
<img src="{Field image_url}" alt="{Field title}" />
|
|
@@ -163,15 +158,11 @@ Wrap L&L markup in `<tangible>` tags. Add `class="live-refresh"` for real-time p
|
|
|
163
158
|
|
|
164
159
|
## Reusable Sections
|
|
165
160
|
|
|
166
|
-
Save
|
|
167
|
-
```
|
|
168
|
-
[lc_html_section id="123"]
|
|
169
|
-
```
|
|
170
|
-
Edits propagate everywhere the section is used.
|
|
161
|
+
Save section to library. Recall elsewhere: `[lc_html_section id="123"]` — edits propagate everywhere.
|
|
171
162
|
|
|
172
163
|
## LiveCanvas Shortcodes (Legacy)
|
|
173
164
|
|
|
174
|
-
|
|
165
|
+
Prefer L&L for new work. Shortcodes maintained for backward compatibility.
|
|
175
166
|
|
|
176
167
|
| Shortcode | Purpose |
|
|
177
168
|
|-----------|---------|
|
|
@@ -186,13 +177,11 @@ Still supported alongside L&L. Use for simple field output without `<tangible>`
|
|
|
186
177
|
| `[lc_if]` | Conditional |
|
|
187
178
|
| `[lc_get_posts]` | Post query loop |
|
|
188
179
|
|
|
189
|
-
**Prefer L&L for new work** — shortcodes are maintained for backward compatibility.
|
|
190
|
-
|
|
191
180
|
## When to Use What
|
|
192
181
|
|
|
193
182
|
| Need | Use |
|
|
194
183
|
|------|-----|
|
|
195
|
-
| Static layout, typography, spacing | Bootstrap classes
|
|
184
|
+
| Static layout, typography, spacing | Bootstrap classes (see `ima-bootstrap`) |
|
|
196
185
|
| Dynamic post loops, conditions | L&L `<tangible>` blocks |
|
|
197
186
|
| Simple single-field output | L&L `<Field>` or legacy shortcode |
|
|
198
187
|
| ACF field display | L&L ACF tags |
|
|
@@ -202,8 +191,6 @@ Still supported alongside L&L. Use for simple field output without `<tangible>`
|
|
|
202
191
|
|
|
203
192
|
## Reference Files
|
|
204
193
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
- **[Loops & Logic Reference](references/loops-and-logic.md)** — Complete L&L syntax: all tags, Loop query parameters, Field types, If conditions, ACF integration, variables, Date/Format/Math, List/Map, WooCommerce
|
|
208
|
-
- **[LiveCanvas Features](references/livecanvas-features.md)** — Editor workflow, all shortcodes with parameters, WooCommerce shortcodes, Forms API, reusable sections, keyboard shortcuts, template assignment
|
|
194
|
+
- **[Loops & Logic Reference](references/loops-and-logic.md)** — Complete L&L syntax: all tags, Loop query params, Field types, If conditions, ACF integration, variables, Date/Format/Math, List/Map, WooCommerce
|
|
195
|
+
- **[LiveCanvas Features](references/livecanvas-features.md)** — Editor workflow, shortcodes with params, WooCommerce shortcodes, Forms API, reusable sections, keyboard shortcuts, template assignment
|
|
209
196
|
- **[PicoStrap Integration](references/picostrap.md)** — Theme architecture, SCSS pipeline, NinjaBootstrap utilities, child theme setup, dark mode, customizer options
|