ima-claude 2.9.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/LICENSE +21 -0
- package/README.md +463 -0
- package/dist/cli.js +1064 -0
- package/package.json +49 -0
- package/platforms/claude/adapter.ts +115 -0
- package/platforms/junie/adapter.ts +254 -0
- package/platforms/junie/agents-template.md +113 -0
- package/platforms/junie/hook-translations.md +84 -0
- package/platforms/shared/detector.ts +27 -0
- package/platforms/shared/installer.ts +202 -0
- package/platforms/shared/types.ts +78 -0
- package/plugins/ima-claude/.claude-plugin/plugin.json +25 -0
- package/plugins/ima-claude/agents/explorer.md +30 -0
- package/plugins/ima-claude/agents/implementer.md +30 -0
- package/plugins/ima-claude/agents/memory.md +42 -0
- package/plugins/ima-claude/agents/reviewer.md +53 -0
- package/plugins/ima-claude/agents/tester.md +33 -0
- package/plugins/ima-claude/agents/wp-developer.md +46 -0
- package/plugins/ima-claude/hooks/README.md +145 -0
- package/plugins/ima-claude/hooks/atlassian_prereqs.py +112 -0
- package/plugins/ima-claude/hooks/block_sed_edits.py +59 -0
- package/plugins/ima-claude/hooks/bootstrap.sh +90 -0
- package/plugins/ima-claude/hooks/bootstrap_utility_check.py +94 -0
- package/plugins/ima-claude/hooks/composer_autoload_check.py +70 -0
- package/plugins/ima-claude/hooks/docs_organization.py +104 -0
- package/plugins/ima-claude/hooks/enforce_rg_over_grep.py +56 -0
- package/plugins/ima-claude/hooks/fp_utility_check.py +90 -0
- package/plugins/ima-claude/hooks/hook_logger.py +69 -0
- package/plugins/ima-claude/hooks/hooks.json +239 -0
- package/plugins/ima-claude/hooks/jira_issue_fetch.py +79 -0
- package/plugins/ima-claude/hooks/jquery_in_wordpress.py +92 -0
- package/plugins/ima-claude/hooks/memory_bootstrap.py +79 -0
- package/plugins/ima-claude/hooks/memory_store_reminder.py +75 -0
- package/plugins/ima-claude/hooks/prompt_coach.py +125 -0
- package/plugins/ima-claude/hooks/prompt_coach_digest.md +48 -0
- package/plugins/ima-claude/hooks/prompt_coach_system.md +30 -0
- package/plugins/ima-claude/hooks/sequential_thinking_check.py +81 -0
- package/plugins/ima-claude/hooks/serena_over_grep.py +96 -0
- package/plugins/ima-claude/hooks/serena_over_read.py +66 -0
- package/plugins/ima-claude/hooks/serena_project_check.py +133 -0
- package/plugins/ima-claude/hooks/sql_injection_check.py +73 -0
- package/plugins/ima-claude/hooks/task_master_after_plan.py +31 -0
- package/plugins/ima-claude/hooks/task_master_before_impl.py +93 -0
- package/plugins/ima-claude/hooks/tavily_extract_advanced.py +48 -0
- package/plugins/ima-claude/hooks/vestige_before_external.py +86 -0
- package/plugins/ima-claude/hooks/webfetch_to_tavily.py +42 -0
- package/plugins/ima-claude/hooks/websearch_to_tavily.py +41 -0
- package/plugins/ima-claude/hooks/wp_security_check.py +150 -0
- package/plugins/ima-claude/personalities/README.md +45 -0
- package/plugins/ima-claude/personalities/enable-40k.md +69 -0
- package/plugins/ima-claude/personalities/enable-templars.md +69 -0
- package/plugins/ima-claude/skills/.research-summary.md +340 -0
- package/plugins/ima-claude/skills/architect/SKILL.md +304 -0
- package/plugins/ima-claude/skills/compound-bridge/SKILL.md +200 -0
- package/plugins/ima-claude/skills/discourse/SKILL.md +440 -0
- package/plugins/ima-claude/skills/discourse-admin/SKILL.md +192 -0
- package/plugins/ima-claude/skills/discourse-admin/references/api-endpoints.md +441 -0
- package/plugins/ima-claude/skills/discourse-admin/references/gotchas.md +107 -0
- package/plugins/ima-claude/skills/discourse-admin/references/staging-defaults.md +98 -0
- package/plugins/ima-claude/skills/discourse-admin/scripts/discourse-admin.py +319 -0
- package/plugins/ima-claude/skills/docs-organize/SKILL.md +254 -0
- package/plugins/ima-claude/skills/docs-organize/templates/active-README.md +50 -0
- package/plugins/ima-claude/skills/docs-organize/templates/archive-README.md +57 -0
- package/plugins/ima-claude/skills/docs-organize/templates/docs-README.md +43 -0
- package/plugins/ima-claude/skills/docs-organize/templates/phase-archive-README.md +83 -0
- package/plugins/ima-claude/skills/docs-organize/templates/section-README.md +48 -0
- package/plugins/ima-claude/skills/docs-organize/templates/transient-README.md +79 -0
- package/plugins/ima-claude/skills/docs-organize/templates/transient-gitignore +9 -0
- package/plugins/ima-claude/skills/ember-discourse/SKILL.md +496 -0
- package/plugins/ima-claude/skills/functional-programmer/SKILL.md +258 -0
- package/plugins/ima-claude/skills/ima-bootstrap/SKILL.md +278 -0
- package/plugins/ima-claude/skills/ima-bootstrap/references/bootstrap-patterns.md +356 -0
- package/plugins/ima-claude/skills/ima-bootstrap/references/ima-brand.md +273 -0
- package/plugins/ima-claude/skills/ima-bootstrap/references/theme-integration.md +212 -0
- package/plugins/ima-claude/skills/ima-brand/SKILL.md +108 -0
- package/plugins/ima-claude/skills/ima-brand/references/brand-identity.md +140 -0
- package/plugins/ima-claude/skills/ima-brand/references/digital-standards.md +180 -0
- package/plugins/ima-claude/skills/ima-brand/references/visual-system.md +173 -0
- package/plugins/ima-claude/skills/ima-forms-expert/SKILL.md +175 -0
- package/plugins/ima-claude/skills/ima-forms-expert/references/container-components.md +154 -0
- package/plugins/ima-claude/skills/ima-forms-expert/references/examples.md +328 -0
- package/plugins/ima-claude/skills/ima-forms-expert/references/field-components.md +298 -0
- package/plugins/ima-claude/skills/ima-forms-expert/references/form-factory.md +193 -0
- package/plugins/ima-claude/skills/ima-forms-expert/references/quick-reference.md +153 -0
- package/plugins/ima-claude/skills/ima-forms-expert/references/validation-engine.md +336 -0
- package/plugins/ima-claude/skills/jira-checkpoint/SKILL.md +178 -0
- package/plugins/ima-claude/skills/jquery/SKILL.md +413 -0
- package/plugins/ima-claude/skills/js-fp/SKILL.md +463 -0
- package/plugins/ima-claude/skills/js-fp/core-principles.md +487 -0
- package/plugins/ima-claude/skills/js-fp/examples/pure-functions.js +260 -0
- package/plugins/ima-claude/skills/js-fp/examples/tests/pure-functions.test.js +262 -0
- package/plugins/ima-claude/skills/js-fp/references/anti-patterns.md +120 -0
- package/plugins/ima-claude/skills/js-fp/references/performance-patterns.md +116 -0
- package/plugins/ima-claude/skills/js-fp/references/testing-patterns.md +134 -0
- package/plugins/ima-claude/skills/js-fp-api/SKILL.md +280 -0
- package/plugins/ima-claude/skills/js-fp-api/examples/crud-endpoint.js +258 -0
- package/plugins/ima-claude/skills/js-fp-api/references/middleware-patterns.md +134 -0
- package/plugins/ima-claude/skills/js-fp-api/references/security-sql.md +110 -0
- package/plugins/ima-claude/skills/js-fp-api/references/validation-patterns.md +165 -0
- package/plugins/ima-claude/skills/js-fp-react/SKILL.md +447 -0
- package/plugins/ima-claude/skills/js-fp-react/examples/ProductCard.tsx +65 -0
- package/plugins/ima-claude/skills/js-fp-react/references/hooks-advanced.md +136 -0
- package/plugins/ima-claude/skills/js-fp-react/references/performance-patterns.md +175 -0
- package/plugins/ima-claude/skills/js-fp-vue/SKILL.md +322 -0
- package/plugins/ima-claude/skills/js-fp-vue/references/complete-examples.md +397 -0
- package/plugins/ima-claude/skills/js-fp-vue/references/composables-advanced.md +282 -0
- package/plugins/ima-claude/skills/js-fp-vue/references/reactivity-patterns.md +348 -0
- package/plugins/ima-claude/skills/js-fp-vue/references/testing.md +314 -0
- package/plugins/ima-claude/skills/js-fp-wordpress/SKILL.md +301 -0
- package/plugins/ima-claude/skills/js-fp-wordpress/references/ajax-patterns.md +192 -0
- package/plugins/ima-claude/skills/js-fp-wordpress/references/event-patterns.md +136 -0
- package/plugins/ima-claude/skills/js-fp-wordpress/references/wp-integration.md +248 -0
- package/plugins/ima-claude/skills/livecanvas/SKILL.md +209 -0
- package/plugins/ima-claude/skills/livecanvas/references/livecanvas-features.md +311 -0
- package/plugins/ima-claude/skills/livecanvas/references/loops-and-logic.md +730 -0
- package/plugins/ima-claude/skills/livecanvas/references/picostrap.md +227 -0
- package/plugins/ima-claude/skills/mcp-atlassian/SKILL.md +339 -0
- package/plugins/ima-claude/skills/mcp-context7/SKILL.md +109 -0
- package/plugins/ima-claude/skills/mcp-memory/SKILL.md +182 -0
- package/plugins/ima-claude/skills/mcp-qdrant/SKILL.md +233 -0
- package/plugins/ima-claude/skills/mcp-sequential/SKILL.md +149 -0
- package/plugins/ima-claude/skills/mcp-serena/SKILL.md +174 -0
- package/plugins/ima-claude/skills/mcp-tavily/SKILL.md +118 -0
- package/plugins/ima-claude/skills/mcp-vestige/SKILL.md +259 -0
- package/plugins/ima-claude/skills/php-authnet/SKILL.md +275 -0
- package/plugins/ima-claude/skills/php-authnet/references/api-reference.md +624 -0
- package/plugins/ima-claude/skills/php-authnet/references/sandbox-testing.md +424 -0
- package/plugins/ima-claude/skills/php-fp/SKILL.md +333 -0
- package/plugins/ima-claude/skills/php-fp/examples/pure-functions.php +403 -0
- package/plugins/ima-claude/skills/php-fp/examples/tests/PureFunctionsTest.php +515 -0
- package/plugins/ima-claude/skills/php-fp/references/core-principles.md +277 -0
- package/plugins/ima-claude/skills/php-fp/references/testing-patterns.md +374 -0
- package/plugins/ima-claude/skills/php-fp-wordpress/SKILL.md +216 -0
- package/plugins/ima-claude/skills/php-fp-wordpress/references/fp-patterns.md +275 -0
- package/plugins/ima-claude/skills/php-fp-wordpress/references/plugin-architecture.md +295 -0
- package/plugins/ima-claude/skills/php-fp-wordpress/references/security-examples.md +203 -0
- package/plugins/ima-claude/skills/php-fp-wordpress/references/testing-strategy.md +259 -0
- package/plugins/ima-claude/skills/phpunit-wp/SKILL.md +716 -0
- package/plugins/ima-claude/skills/playwright/SKILL.md +434 -0
- package/plugins/ima-claude/skills/playwright/references/accessibility-testing.md +153 -0
- package/plugins/ima-claude/skills/playwright/references/ci-cd.md +268 -0
- package/plugins/ima-claude/skills/playwright/references/network-mocking.md +270 -0
- package/plugins/ima-claude/skills/playwright/references/visual-regression.md +215 -0
- package/plugins/ima-claude/skills/py-fp/SKILL.md +663 -0
- package/plugins/ima-claude/skills/py-fp/examples/pure-functions.py +185 -0
- package/plugins/ima-claude/skills/py-fp/examples/tests/test_pure_functions.py +244 -0
- package/plugins/ima-claude/skills/py-fp/references/core-principles.md +381 -0
- package/plugins/ima-claude/skills/py-fp/references/testing-patterns.md +283 -0
- package/plugins/ima-claude/skills/quasar-fp/SKILL.md +327 -0
- package/plugins/ima-claude/skills/quasar-fp/metadata.json +85 -0
- package/plugins/ima-claude/skills/quasar-fp/references/component-patterns.md +257 -0
- package/plugins/ima-claude/skills/quasar-fp/references/theme-integration.md +233 -0
- package/plugins/ima-claude/skills/quasar-fp/references/utility-classes.md +237 -0
- package/plugins/ima-claude/skills/quickstart/SKILL.md +129 -0
- package/plugins/ima-claude/skills/rails/SKILL.md +359 -0
- package/plugins/ima-claude/skills/resume-session/SKILL.md +68 -0
- package/plugins/ima-claude/skills/rg/SKILL.md +205 -0
- package/plugins/ima-claude/skills/ruby-fp/SKILL.md +336 -0
- package/plugins/ima-claude/skills/save-session/SKILL.md +81 -0
- package/plugins/ima-claude/skills/scorecard/SKILL.md +96 -0
- package/plugins/ima-claude/skills/skill-analyzer/SKILL.md +127 -0
- package/plugins/ima-claude/skills/skill-analyzer/references/advanced-checklist.md +44 -0
- package/plugins/ima-claude/skills/skill-analyzer/references/core-checklist.md +60 -0
- package/plugins/ima-claude/skills/skill-analyzer/scripts/analyze_skill.py +418 -0
- package/plugins/ima-claude/skills/skill-creator/LICENSE.txt +202 -0
- package/plugins/ima-claude/skills/skill-creator/SKILL.md +343 -0
- package/plugins/ima-claude/skills/skill-creator/references/output-patterns.md +82 -0
- package/plugins/ima-claude/skills/skill-creator/references/workflows.md +28 -0
- package/plugins/ima-claude/skills/skill-creator/scripts/init_skill.py +303 -0
- package/plugins/ima-claude/skills/skill-creator/scripts/package_skill.py +110 -0
- package/plugins/ima-claude/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/plugins/ima-claude/skills/task-master/SKILL.md +51 -0
- package/plugins/ima-claude/skills/task-planner/SKILL.md +228 -0
- package/plugins/ima-claude/skills/task-runner/SKILL.md +192 -0
- package/plugins/ima-claude/skills/unit-testing/SKILL.md +198 -0
- package/plugins/ima-claude/skills/unit-testing/references/mock-patterns.md +181 -0
- package/plugins/ima-claude/skills/unit-testing/references/tdd-workflow.md +177 -0
- package/plugins/ima-claude/skills/unit-testing/references/test-strategy.md +126 -0
- package/plugins/ima-claude/skills/wp-local/SKILL.md +246 -0
- package/plugins/ima-claude/skills/wp-local/references/configuration.md +198 -0
- package/plugins/ima-claude/skills/wp-local/references/wp-cli-reference.md +406 -0
- package/plugins/ima-claude/skills/wp-local/scripts/wp-local.sh +61 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# IMA Visual System
|
|
2
|
+
|
|
3
|
+
Source: IMA Brand Book v4.0, pages 11-25 and 27.
|
|
4
|
+
|
|
5
|
+
For SCSS implementation (variables, mixins, classes), see the `ima-bootstrap` skill.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Color Palette
|
|
10
|
+
|
|
11
|
+
### Primary Colors
|
|
12
|
+
|
|
13
|
+
| Name | Hex | CMYK | RGB | Usage |
|
|
14
|
+
|------|-----|------|-----|-------|
|
|
15
|
+
| Trustworthy Indigo | `#00066F` | 100/98/20/25 | 0, 6, 111 | Primary brand color — headers, titles, trust elements |
|
|
16
|
+
| Aquatic Pulse | `#00B8B8` | 78/0/22/26 | 0, 184, 184 | Interactive elements — buttons, CTAs, links |
|
|
17
|
+
| Guidance Sky | `#A2CFF0` | 33/12/0/4 | 162, 207, 240 | Light backgrounds, soft accents |
|
|
18
|
+
|
|
19
|
+
### Secondary Colors
|
|
20
|
+
|
|
21
|
+
| Name | Hex | CMYK | RGB | Usage |
|
|
22
|
+
|------|-----|------|-----|-------|
|
|
23
|
+
| Vital Gold | `#FFCC00` | 0/17/100/0 | 255, 204, 0 | Warnings, attention, prescriber tags |
|
|
24
|
+
| Red Ribbon | `#DD153B` | 0/87/62/11 | 221, 21, 59 | Urgency, errors, critical alerts |
|
|
25
|
+
| Plum Velvet | `#7B024D` | 30/92/18/22 | 123, 2, 77 | Accent, distinction, premium feel |
|
|
26
|
+
|
|
27
|
+
### Grayscale
|
|
28
|
+
|
|
29
|
+
| Name | Hex | Usage |
|
|
30
|
+
|------|-----|-------|
|
|
31
|
+
| Calm Stone | `#919396` | Form labels, secondary text, muted elements |
|
|
32
|
+
| Clarity Wash | `#F2F3F5` | Backgrounds, cards, light sections |
|
|
33
|
+
| Slate Neutral | `#8A93A5` | Alternative gray, subtle borders |
|
|
34
|
+
| Gravel | `#494949` | Dark gray, body text alternative |
|
|
35
|
+
| White | `#FFFFFF` | Clean backgrounds, inverse text |
|
|
36
|
+
| Black | `#000000` | Maximum contrast text |
|
|
37
|
+
|
|
38
|
+
### Special
|
|
39
|
+
|
|
40
|
+
| Name | Value | Usage |
|
|
41
|
+
|------|-------|-------|
|
|
42
|
+
| Accessible Teal | `#007BB4` | High-contrast alternative for WCAG compliance |
|
|
43
|
+
| Brand Gradient | `150deg, #00066F → #00B8B8` | Hero sections, overlays, premium elements |
|
|
44
|
+
|
|
45
|
+
### Color Application Rules
|
|
46
|
+
|
|
47
|
+
- **Primary brand color (Indigo)**: Use for headings, titles, and trust-building elements. Conveys authority.
|
|
48
|
+
- **Interactive elements (Aquatic Pulse)**: Buttons, links, CTAs. Users learn to associate teal with action.
|
|
49
|
+
- **Never use red/gold for decorative purposes**: Red = urgency/error, Gold = warning/attention. These carry semantic meaning.
|
|
50
|
+
- **Print vs Digital**: CMYK values for print, hex/RGB for digital. Always use the exact values — don't approximate.
|
|
51
|
+
- **Gradient usage**: Hero banners, footer backgrounds, overlay on dark photography. Not for small elements or text backgrounds.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Typography
|
|
56
|
+
|
|
57
|
+
### Font Families
|
|
58
|
+
|
|
59
|
+
| Font | Role | Weights | Fallback |
|
|
60
|
+
|------|------|---------|----------|
|
|
61
|
+
| **Lato** | Headings, buttons, labels | Bold (700), Black (900), Semi Bold (600) | sans-serif |
|
|
62
|
+
| **Proxima Nova** | Body text, forms (preferred) | Regular (400), Bold (700) | Open Sans, sans-serif |
|
|
63
|
+
| **Open Sans** | Body text, forms (free alternative) | Regular (400), Bold (700) | sans-serif |
|
|
64
|
+
|
|
65
|
+
### Type Hierarchy
|
|
66
|
+
|
|
67
|
+
| Element | Font | Weight | Size | Style |
|
|
68
|
+
|---------|------|--------|------|-------|
|
|
69
|
+
| H1 / Page header | Lato | Black (900) | 40px | Uppercase |
|
|
70
|
+
| H2 / Section header | Lato | Bold (700) | 32px | — |
|
|
71
|
+
| H3 / Subsection | Lato | Regular (400) | 28px | — |
|
|
72
|
+
| H4 / Section header (small) | Lato | Bold (700) | 20px | — |
|
|
73
|
+
| Body text | Proxima Nova / Open Sans | Regular (400) | 16px | — |
|
|
74
|
+
| Button text | Lato | Bold (700) | 18px | Uppercase |
|
|
75
|
+
| Form labels | Open Sans | Regular (400) | 14px | — |
|
|
76
|
+
| Provider/doctor title | Lato | Semi Bold (600) | 32px | — |
|
|
77
|
+
|
|
78
|
+
### Typography Rules
|
|
79
|
+
|
|
80
|
+
- **Headings are always Lato** — never use Proxima Nova/Open Sans for headings
|
|
81
|
+
- **Body is always Proxima Nova or Open Sans** — never use Lato for body paragraphs
|
|
82
|
+
- **Uppercase**: Only for H1/page headers and button text. Don't uppercase body text or H2-H4
|
|
83
|
+
- **Line height**: 1.0 for headers, 1.5 for body text
|
|
84
|
+
- **Letter spacing**: Default. Don't add custom letter-spacing
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Logo System
|
|
89
|
+
|
|
90
|
+
### Logo Variants
|
|
91
|
+
|
|
92
|
+
| Variant | Name | Description | Primary Use |
|
|
93
|
+
|---------|------|-------------|-------------|
|
|
94
|
+
| Primary | Horizontal lockup | IMA logo + "Independent Medical Alliance" side by side | Website header, documents, letterhead |
|
|
95
|
+
| Secondary | Vertical/stacked lockup | IMA logo above "Independent Medical Alliance" | Social media profiles, square spaces |
|
|
96
|
+
| Tertiary | IMA lettermark | Just the "IMA" letters in brand styling | Favicons, small spaces, app icons |
|
|
97
|
+
|
|
98
|
+
### Lockup Color Variants
|
|
99
|
+
|
|
100
|
+
| Lockup | Background | Usage |
|
|
101
|
+
|--------|-----------|-------|
|
|
102
|
+
| Hero | Brand gradient | Hero sections, premium placements |
|
|
103
|
+
| Blue | White/light | Standard usage on light backgrounds |
|
|
104
|
+
| Black | White/light | Monochrome/formal contexts |
|
|
105
|
+
| Black Text | White/light | Logo mark colored + black text |
|
|
106
|
+
| Inverse | Dark/gradient | Dark backgrounds, footer, overlay on photos |
|
|
107
|
+
|
|
108
|
+
### Logo Rules
|
|
109
|
+
|
|
110
|
+
**Clear space**: Maintain minimum clear space around the logo equal to the height of the "I" in IMA. No text, images, or other elements may intrude into this space.
|
|
111
|
+
|
|
112
|
+
**Minimum size**: 200px width for primary and secondary lockups. Below 200px, use the IMA lettermark (tertiary) instead.
|
|
113
|
+
|
|
114
|
+
**Brand family logos**: IMA Journal and IMA Action have their own lockups that follow the same system.
|
|
115
|
+
|
|
116
|
+
### Proper Logo Usage
|
|
117
|
+
|
|
118
|
+
| Background | Logo Variant | Notes |
|
|
119
|
+
|-----------|-------------|-------|
|
|
120
|
+
| White / light solid | Blue or Black lockup | Standard usage |
|
|
121
|
+
| Dark solid | Inverse lockup | White text on dark |
|
|
122
|
+
| Brand gradient | Hero lockup | Designed specifically for gradient |
|
|
123
|
+
| Photo overlay | Inverse lockup | Ensure sufficient contrast with overlay/scrim |
|
|
124
|
+
| Colored solid (brand colors) | Inverse lockup | Only on brand colors, not arbitrary colors |
|
|
125
|
+
|
|
126
|
+
### Improper Logo Usage (Never Do)
|
|
127
|
+
|
|
128
|
+
- **Stretch or distort** — Always maintain original aspect ratio
|
|
129
|
+
- **Recolor** — Only use approved lockup color variants
|
|
130
|
+
- **Place on busy/patterned backgrounds** — Logo must be clearly readable
|
|
131
|
+
- **Rotate or skew** — Logo must always be level/horizontal
|
|
132
|
+
- **Add shadows or effects** — No drop shadows, glows, outlines, or 3D effects
|
|
133
|
+
- **Display below minimum size** — Use lettermark for small applications
|
|
134
|
+
- **Crop or obscure** — Full logo must be visible
|
|
135
|
+
- **Place too close to other elements** — Respect the clear space rules
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Imagery Guidelines
|
|
140
|
+
|
|
141
|
+
### Photography Style
|
|
142
|
+
|
|
143
|
+
- **Authentic**: Real people, not overly staged stock photography
|
|
144
|
+
- **Professional**: Well-lit, high quality, properly composed
|
|
145
|
+
- **Healthcare-appropriate**: Clinical settings should feel welcoming, not sterile
|
|
146
|
+
- **Diverse**: Represent the diversity of IMA's global community
|
|
147
|
+
- **Warm lighting**: Natural light preferred, warm tones over cold/clinical
|
|
148
|
+
|
|
149
|
+
### Photography by Content Type
|
|
150
|
+
|
|
151
|
+
| Content Type | Image Style | Notes |
|
|
152
|
+
|-------------|------------|-------|
|
|
153
|
+
| Patient stories | Warm, personal, relatable | Real patients when possible (with consent) |
|
|
154
|
+
| Medical content | Professional, clinical-but-approachable | Healthcare settings, doctors, labs |
|
|
155
|
+
| Community / events | Candid, energetic, inclusive | Group shots, event photography |
|
|
156
|
+
| Research / science | Clean, precise, data-oriented | Lab settings, infographics, data viz |
|
|
157
|
+
| Fundraising | Emotional, hopeful, impact-focused | People helped, community impact |
|
|
158
|
+
|
|
159
|
+
### Image Treatment
|
|
160
|
+
|
|
161
|
+
- **Color overlay**: Brand gradient overlay for hero images (opacity: 60-80%)
|
|
162
|
+
- **Duotone**: Indigo + Teal for stylized feature images
|
|
163
|
+
- **Never**: Over-saturate, use filters that alter skin tones, or use low-resolution images
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Iconography
|
|
168
|
+
|
|
169
|
+
- **Style**: Clean, simple line icons or flat icons
|
|
170
|
+
- **Color**: Brand colors only — Indigo, Teal, or White (on dark backgrounds)
|
|
171
|
+
- **Weight**: Consistent stroke weight within a set (2px recommended)
|
|
172
|
+
- **Usage**: Supporting content, navigation, feature highlights — not decorative filler
|
|
173
|
+
- **Avoid**: Overly detailed icons, 3D icons, clipart, emoji as icons in formal content
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ima-forms-expert
|
|
3
|
+
description: |
|
|
4
|
+
WordPress form component library with Bootstrap 5 integration, validators-at-registration
|
|
5
|
+
architecture (v1.4.0+), and security-first patterns. Use when: building custom forms
|
|
6
|
+
with IMA Forms components (ima_forms_* functions), implementing form validation,
|
|
7
|
+
adding field types (text, email, phone, select, checkbox, repeater, consent agreement),
|
|
8
|
+
creating dynamic repeater fields, handling AJAX form submissions, or integrating forms
|
|
9
|
+
with ACF/custom post types. Key features: validators built as closures at field registration
|
|
10
|
+
(single source of truth), enhanced email validation with disposable domain blocking,
|
|
11
|
+
template-driven validation where "template IS the definition".
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# IMA Forms Expert
|
|
15
|
+
|
|
16
|
+
WordPress form component library with Bootstrap 5 + functional programming patterns.
|
|
17
|
+
|
|
18
|
+
## When to Use This Skill
|
|
19
|
+
|
|
20
|
+
- Building custom forms using IMA Forms component library
|
|
21
|
+
- Implementing template-driven validation (v1.3.0+)
|
|
22
|
+
- Understanding validators-at-registration architecture (v1.4.0+)
|
|
23
|
+
- Adding field types or container components
|
|
24
|
+
- Creating repeater/dynamic field patterns
|
|
25
|
+
- Integrating forms with WordPress (ACF, custom post types, AJAX)
|
|
26
|
+
- Debugging form submission issues
|
|
27
|
+
|
|
28
|
+
## Core Principles
|
|
29
|
+
|
|
30
|
+
- **Template IS the definition**: Field rendering auto-registers validation specs + validators
|
|
31
|
+
- **Validators at registration**: Field functions build closures at registration time (v1.4.0)
|
|
32
|
+
- **Security by default**: Nonce verification, sanitization, escaping
|
|
33
|
+
- **Component-based**: Reusable field and container components
|
|
34
|
+
- **Bootstrap 5 native**: Uses Bootstrap utilities and components
|
|
35
|
+
|
|
36
|
+
## Architecture (v1.4.0 - Unified Validator Registry)
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
ima-forms/
|
|
40
|
+
├── ima-forms.php # Plugin initialization
|
|
41
|
+
├── includes/
|
|
42
|
+
│ ├── functions-core.php # Security chokepoint, higher-order functions
|
|
43
|
+
│ ├── functions-registry.php # Field spec registry (stores validators)
|
|
44
|
+
│ ├── functions-validation-engine.php # Runs validators, sanitizes data
|
|
45
|
+
│ ├── functions-fields.php # Field rendering + validator building
|
|
46
|
+
│ ├── functions-containers.php # Container/layout components
|
|
47
|
+
│ ├── functions-validators.php # Pure validation functions
|
|
48
|
+
│ ├── functions-sanitizers.php # Context-appropriate sanitization
|
|
49
|
+
│ ├── functions-form.php # Form factory (v1.2.0)
|
|
50
|
+
│ └── forms/ # Form implementations
|
|
51
|
+
├── templates/
|
|
52
|
+
│ ├── fields/ # Field templates
|
|
53
|
+
│ ├── containers/ # Container templates
|
|
54
|
+
│ └── forms/ # Complete form templates
|
|
55
|
+
└── assets/js/ # Vanilla JS (repeater, consent, AJAX)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Validators-at-Registration Pattern (v1.4.0)
|
|
59
|
+
|
|
60
|
+
**Key change from v1.3.0**: Validators are now built as closures at field registration time, not rebuilt by the engine via type-switching.
|
|
61
|
+
|
|
62
|
+
```php
|
|
63
|
+
// Inside ima_forms_email_field_register():
|
|
64
|
+
$validators = [];
|
|
65
|
+
|
|
66
|
+
if ($required) {
|
|
67
|
+
$validators[] = fn($v) => ima_forms_validate_required($v, $label);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
$validators[] = function($v) use ($label, $enhanced) {
|
|
71
|
+
if (empty($v)) return null;
|
|
72
|
+
return ima_forms_validate_email_enhanced((string) $v, $label, $enhanced);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
ima_forms_register_field_spec($name, [
|
|
76
|
+
'type' => 'email',
|
|
77
|
+
'label' => $label,
|
|
78
|
+
'required' => $required,
|
|
79
|
+
'validators' => $validators, // Closures stored at registration!
|
|
80
|
+
]);
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Benefits**:
|
|
84
|
+
- Single source of truth: field function defines validation once
|
|
85
|
+
- No type switching: validators are closures, just iterate and run
|
|
86
|
+
- Testable: validators are pure functions captured at registration time
|
|
87
|
+
|
|
88
|
+
## Key Patterns
|
|
89
|
+
|
|
90
|
+
### Template-Driven Validation
|
|
91
|
+
|
|
92
|
+
Field functions auto-register specs + validators. Validate entire form in one call:
|
|
93
|
+
|
|
94
|
+
```php
|
|
95
|
+
$result = ima_forms_validate_form('templates/forms/my-form', $_POST, 'my-form');
|
|
96
|
+
|
|
97
|
+
if (!$result['valid']) {
|
|
98
|
+
wp_send_json_error(['errors' => $result['errors']], 400);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
$sanitized = $result['sanitized']; // Ready to use
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
→ **Details**: See [references/validation-engine.md](references/validation-engine.md)
|
|
105
|
+
|
|
106
|
+
### Enhanced Email Validation
|
|
107
|
+
|
|
108
|
+
Blocks disposable domains, detects typos:
|
|
109
|
+
|
|
110
|
+
```php
|
|
111
|
+
ima_forms_email_field([
|
|
112
|
+
'name' => 'email',
|
|
113
|
+
'enhanced_validation' => true, // gmial.com → suggests gmail.com
|
|
114
|
+
]);
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Quick Start Example
|
|
118
|
+
|
|
119
|
+
```php
|
|
120
|
+
// Template: templates/forms/contact.php
|
|
121
|
+
ima_forms_form(['id' => 'contact', 'action' => 'contact_submit'], function() use ($data, $errors) {
|
|
122
|
+
ima_forms_text_field(['name' => 'name', 'label' => 'Name', 'required' => true, ...]);
|
|
123
|
+
ima_forms_email_field(['name' => 'email', 'required' => true, 'enhanced_validation' => true, ...]);
|
|
124
|
+
ima_forms_textarea_field(['name' => 'message', 'required' => true, ...]);
|
|
125
|
+
ima_forms_submit_button(['text' => 'Send']);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// AJAX Handler
|
|
129
|
+
function contact_submit_handler() {
|
|
130
|
+
if (!wp_verify_nonce($_POST['nonce'], 'ima_forms_ajax')) {
|
|
131
|
+
wp_send_json_error(['message' => 'Security check failed.'], 403);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
$result = ima_forms_validate_form('templates/forms/contact', $_POST, 'contact');
|
|
135
|
+
|
|
136
|
+
if (!$result['valid']) {
|
|
137
|
+
wp_send_json_error(['errors' => $result['errors']], 400);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Process $result['sanitized']...
|
|
141
|
+
wp_send_json_success(['message' => 'Sent!']);
|
|
142
|
+
}
|
|
143
|
+
add_action('wp_ajax_contact_submit', 'contact_submit_handler');
|
|
144
|
+
add_action('wp_ajax_nopriv_contact_submit', 'contact_submit_handler');
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Reference Files
|
|
148
|
+
|
|
149
|
+
| File | Read When |
|
|
150
|
+
|------|-----------|
|
|
151
|
+
| [validation-engine.md](references/validation-engine.md) | Using `ima_forms_validate_form()`, understanding validator registry, custom validators |
|
|
152
|
+
| [field-components.md](references/field-components.md) | Adding specific field types, customizing field behavior, repeaters |
|
|
153
|
+
| [container-components.md](references/container-components.md) | Using cards, sections, column layouts, fieldsets |
|
|
154
|
+
| [examples.md](references/examples.md) | Implementing complete new forms, testing patterns, anti-patterns |
|
|
155
|
+
| [quick-reference.md](references/quick-reference.md) | Function signatures, version features, filters |
|
|
156
|
+
|
|
157
|
+
## Common Tasks
|
|
158
|
+
|
|
159
|
+
| Task | Approach |
|
|
160
|
+
|------|----------|
|
|
161
|
+
| Add a simple form | Use `ima_forms_form()` + field components + `ima_forms_validate_form()` |
|
|
162
|
+
| Add custom validation | Filter: `add_filter('ima_forms_validate_{form-id}', ...)` |
|
|
163
|
+
| Block spam emails | Set `enhanced_validation => true` on email fields |
|
|
164
|
+
| Add repeater rows | Use `ima_forms_repeater()` with row callback |
|
|
165
|
+
| Create multi-column layout | Use `ima_forms_column_layout(['columns' => 3, ...])` |
|
|
166
|
+
| Debug validation | Use `ima_forms_debug_field_specs()` or `ima_forms_debug_validation_summary($specs)` |
|
|
167
|
+
|
|
168
|
+
## Success Indicators
|
|
169
|
+
|
|
170
|
+
- ✅ Template-driven validation (no manual field maps)
|
|
171
|
+
- ✅ Enhanced email validation on user-facing forms
|
|
172
|
+
- ✅ Standardized form wrappers (`ima_forms_form()`)
|
|
173
|
+
- ✅ Nonce verification in all AJAX handlers
|
|
174
|
+
- ✅ Sanitized data used for processing (never raw `$_POST`)
|
|
175
|
+
- ✅ Validators built at registration, not in engine
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Container Components Reference
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- [Form Wrapper](#form-wrapper)
|
|
6
|
+
- [Submit Button](#submit-button)
|
|
7
|
+
- [Card Wrapper](#card-wrapper)
|
|
8
|
+
- [Section with Heading](#section-with-heading)
|
|
9
|
+
- [Column Layout](#column-layout)
|
|
10
|
+
- [Fieldset](#fieldset)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Form Wrapper
|
|
15
|
+
|
|
16
|
+
Complete form container with AJAX support:
|
|
17
|
+
|
|
18
|
+
```php
|
|
19
|
+
ima_forms_form([
|
|
20
|
+
'id' => 'my-form',
|
|
21
|
+
'action' => 'my_ajax_action', // AJAX action name
|
|
22
|
+
'method' => 'post',
|
|
23
|
+
'class' => 'ima-form w-100', // Default: full width
|
|
24
|
+
'nonce_action' => 'my_form_submit',
|
|
25
|
+
'nonce_name' => 'nonce',
|
|
26
|
+
'enqueue_base' => true, // Auto-enqueue ima-forms-base.js
|
|
27
|
+
], function() {
|
|
28
|
+
// Form fields here
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Auto-generated elements**:
|
|
33
|
+
- `.ima-form-errors` - Error container (populated by JS)
|
|
34
|
+
- `.ima-form-success` - Success container
|
|
35
|
+
- Nonce field
|
|
36
|
+
- `data-action` attribute for JS handler
|
|
37
|
+
|
|
38
|
+
## Submit Button
|
|
39
|
+
|
|
40
|
+
```php
|
|
41
|
+
ima_forms_submit_button([
|
|
42
|
+
'text' => 'Submit Form',
|
|
43
|
+
'processing_text' => 'Submitting...',
|
|
44
|
+
'class' => 'btn btn-primary',
|
|
45
|
+
'show_spinner' => true,
|
|
46
|
+
'disabled' => false,
|
|
47
|
+
'wrapper_class' => 'mt-4',
|
|
48
|
+
]);
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Features**:
|
|
52
|
+
- Shows spinner during submission
|
|
53
|
+
- Disables button during processing
|
|
54
|
+
- Text changes to `processing_text` when submitting
|
|
55
|
+
|
|
56
|
+
## Card Wrapper
|
|
57
|
+
|
|
58
|
+
Bootstrap card with optional header:
|
|
59
|
+
|
|
60
|
+
```php
|
|
61
|
+
ima_forms_card([
|
|
62
|
+
'title' => 'Personal Information',
|
|
63
|
+
'description' => 'Please provide your contact details',
|
|
64
|
+
'card_class' => 'shadow-sm',
|
|
65
|
+
'wrapper_class' => 'mb-4',
|
|
66
|
+
'show_header' => true,
|
|
67
|
+
], function() use ($data, $errors) {
|
|
68
|
+
ima_forms_text_field([...]);
|
|
69
|
+
ima_forms_email_field([...]);
|
|
70
|
+
});
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Section with Heading
|
|
74
|
+
|
|
75
|
+
Semantic section with heading and optional separator:
|
|
76
|
+
|
|
77
|
+
```php
|
|
78
|
+
ima_forms_section([
|
|
79
|
+
'heading' => 'Contact Information',
|
|
80
|
+
'description' => 'How can we reach you?',
|
|
81
|
+
'heading_tag' => 'h3',
|
|
82
|
+
'heading_class' => 'mb-3',
|
|
83
|
+
'show_separator' => true,
|
|
84
|
+
'wrapper_class' => 'mb-4',
|
|
85
|
+
], function() use ($data, $errors) {
|
|
86
|
+
// Fields here
|
|
87
|
+
});
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Column Layout
|
|
91
|
+
|
|
92
|
+
Responsive multi-column layout:
|
|
93
|
+
|
|
94
|
+
```php
|
|
95
|
+
ima_forms_column_layout([
|
|
96
|
+
'columns' => 3, // 1-6 columns
|
|
97
|
+
'breakpoint' => 'md', // Collapse below: sm, md, lg, xl, xxl
|
|
98
|
+
'gap' => 3, // Bootstrap gap (0-5)
|
|
99
|
+
'wrapper_class' => 'mb-3',
|
|
100
|
+
], function() use ($data, $errors) {
|
|
101
|
+
// Fields render side-by-side (desktop) or stacked (mobile)
|
|
102
|
+
ima_forms_text_field([
|
|
103
|
+
'name' => 'city',
|
|
104
|
+
'label' => 'City',
|
|
105
|
+
'wrapper_class' => 'mb-0', // Remove bottom margin in columns
|
|
106
|
+
...
|
|
107
|
+
]);
|
|
108
|
+
ima_forms_state_select_field([
|
|
109
|
+
'name' => 'state',
|
|
110
|
+
'wrapper_class' => 'mb-0',
|
|
111
|
+
...
|
|
112
|
+
]);
|
|
113
|
+
ima_forms_text_field([
|
|
114
|
+
'name' => 'zip',
|
|
115
|
+
'label' => 'ZIP',
|
|
116
|
+
'wrapper_class' => 'mb-0',
|
|
117
|
+
...
|
|
118
|
+
]);
|
|
119
|
+
});
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Breakpoint behavior**:
|
|
123
|
+
| Breakpoint | Stacks below |
|
|
124
|
+
|------------|--------------|
|
|
125
|
+
| `sm` | 576px |
|
|
126
|
+
| `md` | 768px |
|
|
127
|
+
| `lg` | 992px |
|
|
128
|
+
| `xl` | 1200px |
|
|
129
|
+
| `xxl` | 1400px |
|
|
130
|
+
|
|
131
|
+
## Fieldset
|
|
132
|
+
|
|
133
|
+
Semantic grouping with legend:
|
|
134
|
+
|
|
135
|
+
```php
|
|
136
|
+
ima_forms_fieldset([
|
|
137
|
+
'legend' => 'Shipping Address',
|
|
138
|
+
'description' => 'Where should we ship your order?',
|
|
139
|
+
'fieldset_class' => 'mb-4',
|
|
140
|
+
'disabled' => false,
|
|
141
|
+
], function() use ($data, $errors) {
|
|
142
|
+
// Address fields
|
|
143
|
+
});
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Use fieldset when**:
|
|
147
|
+
- Grouping related fields semantically
|
|
148
|
+
- Need to disable a group of fields together
|
|
149
|
+
- Accessibility requirements (screen readers)
|
|
150
|
+
|
|
151
|
+
**Use card when**:
|
|
152
|
+
- Visual grouping with styling
|
|
153
|
+
- Collapsible sections
|
|
154
|
+
- Decorative separation
|