@blockbite/agent-context 0.1.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.
Files changed (37) hide show
  1. package/examples/README.md +23 -0
  2. package/examples/dynamic-template-reference/fields.yaml +61 -0
  3. package/examples/dynamic-template-reference/manifest.json +8 -0
  4. package/examples/dynamic-template-reference/module.ts +12 -0
  5. package/examples/dynamic-template-reference/recipe.json +5 -0
  6. package/examples/dynamic-template-reference/seeds.json +44 -0
  7. package/examples/dynamic-template-reference/style.css +156 -0
  8. package/examples/dynamic-template-reference/template.liquid +59 -0
  9. package/index.json +239 -0
  10. package/mcp-tools.json +222 -0
  11. package/package.json +24 -0
  12. package/references/block-dsl.md +257 -0
  13. package/references/islands.md +111 -0
  14. package/references/tailwind-utilities.md +108 -0
  15. package/skills/analyze-template/SKILL.md +20 -0
  16. package/skills/block-style/SKILL.md +101 -0
  17. package/skills/connect/SKILL.md +25 -0
  18. package/skills/connection-status/SKILL.md +38 -0
  19. package/skills/create-template-draft/SKILL.md +55 -0
  20. package/skills/design-tokens/SKILL.md +54 -0
  21. package/skills/document-blueprint/SKILL.md +166 -0
  22. package/skills/figma-design-to-code/SKILL.md +126 -0
  23. package/skills/figma-site-builder/SKILL.md +209 -0
  24. package/skills/frame-draft-link/SKILL.md +77 -0
  25. package/skills/islands-list/SKILL.md +24 -0
  26. package/skills/project-select/SKILL.md +19 -0
  27. package/skills/projects-list/SKILL.md +17 -0
  28. package/skills/render-preview/SKILL.md +20 -0
  29. package/skills/sandbox-status/SKILL.md +18 -0
  30. package/skills/site-motion-pass/SKILL.md +88 -0
  31. package/skills/site-reviewer/SKILL.md +107 -0
  32. package/skills/sync-plan/SKILL.md +20 -0
  33. package/skills/template-figma/SKILL.md +123 -0
  34. package/skills/template-new/SKILL.md +221 -0
  35. package/skills/template-preview/SKILL.md +115 -0
  36. package/skills/template-refine/SKILL.md +135 -0
  37. package/skills/update-template-draft/SKILL.md +36 -0
@@ -0,0 +1,23 @@
1
+ # BlockBite Template Examples
2
+
3
+ These examples are bundled with the agent plugin so agents can quickly learn the
4
+ expected BlockBite dynamic-template package shape before creating a new section.
5
+
6
+ Use `dynamic-template-reference/` as the canonical reference:
7
+
8
+ - `template.liquid` shows the runtime data pattern:
9
+ `bb_seed`, `bb_source`, and `live | ternary`. It also includes short Liquid
10
+ comments that explain what agents should copy.
11
+ - `fields.yaml` defines top-level fields and repeated `subcollections`.
12
+ - `seeds.json` mirrors the schema with preview/sample data.
13
+ - `style.css` keeps template-owned styles scoped with semantic class names and
14
+ a root class.
15
+ - `module.ts` keeps optional interaction code local to the template, instead of
16
+ using global scripts.
17
+ - `manifest.json` wires the package files together.
18
+ - `recipe.json` gives the human-facing name and description.
19
+
20
+ When a user asks for an island, header, hero, nav, footer, or reusable section,
21
+ create a package under `templates/<slug>/` using this shape. Do not hand-write
22
+ `islands/<slug>/island-pattern.html`; that compiled-blocks output is generated
23
+ by the BlockBite editor/compiler.
@@ -0,0 +1,61 @@
1
+ version: 1
2
+
3
+ # Top-level fields are available as props.fields.<handle> in template.liquid.
4
+ fields:
5
+ - handle: "eyebrow"
6
+ type: string
7
+ label: "Eyebrow"
8
+ required: false
9
+ - handle: "heading"
10
+ type: string
11
+ label: "Heading"
12
+ required: true
13
+ - handle: "intro"
14
+ type: string
15
+ label: "Intro"
16
+ required: false
17
+ - handle: "primary_cta_label"
18
+ type: string
19
+ label: "Primary CTA Label"
20
+ required: false
21
+ - handle: "primary_cta_url"
22
+ type: string
23
+ label: "Primary CTA URL"
24
+ required: false
25
+ - handle: "secondary_cta_label"
26
+ type: string
27
+ label: "Secondary CTA Label"
28
+ required: false
29
+ - handle: "secondary_cta_url"
30
+ type: string
31
+ label: "Secondary CTA URL"
32
+ required: false
33
+
34
+ # Repeated rows are grouped under props.subcollections.<handle>.
35
+ subcollections:
36
+ highlights:
37
+ label: "Highlights"
38
+ fields:
39
+ - handle: "icon"
40
+ type: string
41
+ label: "Icon"
42
+ required: false
43
+ - handle: "title"
44
+ type: string
45
+ label: "Title"
46
+ required: true
47
+ - handle: "text"
48
+ type: string
49
+ label: "Text"
50
+ required: false
51
+ stats:
52
+ label: "Stats"
53
+ fields:
54
+ - handle: "value"
55
+ type: string
56
+ label: "Value"
57
+ required: true
58
+ - handle: "label"
59
+ type: string
60
+ label: "Label"
61
+ required: true
@@ -0,0 +1,8 @@
1
+ {
2
+ "template": "template.liquid",
3
+ "recipe": "recipe.json",
4
+ "fields": "fields.yaml",
5
+ "seeds": "seeds.json",
6
+ "scriptModule": "module.ts",
7
+ "style": "style.css"
8
+ }
@@ -0,0 +1,12 @@
1
+ // Optional template behavior belongs beside the template, not in global scripts.
2
+ document.addEventListener('DOMContentLoaded', () => {
3
+ const cards = document.querySelectorAll<HTMLElement>('[data-reference-card]');
4
+ if (!cards.length) return;
5
+
6
+ cards.forEach((card) => {
7
+ card.addEventListener('click', () => {
8
+ cards.forEach((item) => item.classList.remove('is-active'));
9
+ card.classList.add('is-active');
10
+ });
11
+ });
12
+ });
@@ -0,0 +1,5 @@
1
+ {
2
+ "version": 1,
3
+ "name": "Dynamic Template Reference",
4
+ "description": "A generic BlockBite dynamic-template section that demonstrates fields, subcollections, scoped CSS, local TypeScript behavior, and seed-backed previews."
5
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "fields": {
3
+ "eyebrow": "Reference section",
4
+ "heading": "Build reusable BlockBite sections",
5
+ "intro": "Use this package shape when creating headers, heroes, feature rows, cards, FAQs, or any reusable dynamic-template section.",
6
+ "primary_cta_label": "Start from this pattern",
7
+ "primary_cta_url": "#",
8
+ "secondary_cta_label": "Review the docs",
9
+ "secondary_cta_url": "#"
10
+ },
11
+ "subcollections": {
12
+ "highlights": [
13
+ {
14
+ "icon": "01",
15
+ "title": "Resolve preview data first",
16
+ "text": "Load seeds.json with bb_seed, resolve live data with bb_source, then render through one props object."
17
+ },
18
+ {
19
+ "icon": "02",
20
+ "title": "Model repeated content",
21
+ "text": "Use subcollections for cards, steps, stats, navigation items, FAQ rows, and similar repeating content."
22
+ },
23
+ {
24
+ "icon": "03",
25
+ "title": "Keep styles scoped",
26
+ "text": "Use semantic class names in style.css and keep optional interactivity in module.ts beside the template."
27
+ }
28
+ ],
29
+ "stats": [
30
+ {
31
+ "value": "7",
32
+ "label": "Package files"
33
+ },
34
+ {
35
+ "value": "2",
36
+ "label": "Data scopes"
37
+ },
38
+ {
39
+ "value": "1",
40
+ "label": "Preview link"
41
+ }
42
+ ]
43
+ }
44
+ }
@@ -0,0 +1,156 @@
1
+ /* Keep template-owned styles scoped to the section root. */
2
+ .bb-reference-section {
3
+ max-width: 1120px;
4
+ margin: 0 auto;
5
+ padding: 64px 24px;
6
+ color: #111827;
7
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
8
+ }
9
+
10
+ .bb-reference-section__header {
11
+ max-width: 760px;
12
+ margin: 0 auto 40px;
13
+ text-align: center;
14
+ }
15
+
16
+ .bb-reference-section__eyebrow {
17
+ margin: 0 0 12px;
18
+ color: #2563eb;
19
+ font-size: 0.78rem;
20
+ font-weight: 700;
21
+ letter-spacing: 0.12em;
22
+ text-transform: uppercase;
23
+ }
24
+
25
+ .bb-reference-section__title {
26
+ margin: 0;
27
+ font-size: clamp(2.25rem, 6vw, 4.75rem);
28
+ line-height: 0.95;
29
+ letter-spacing: -0.06em;
30
+ }
31
+
32
+ .bb-reference-section__intro {
33
+ margin: 20px auto 0;
34
+ max-width: 640px;
35
+ color: #4b5563;
36
+ font-size: 1.08rem;
37
+ line-height: 1.65;
38
+ }
39
+
40
+ .bb-reference-section__actions {
41
+ display: flex;
42
+ flex-wrap: wrap;
43
+ justify-content: center;
44
+ gap: 14px;
45
+ margin-top: 28px;
46
+ }
47
+
48
+ .bb-reference-section__button,
49
+ .bb-reference-section__link {
50
+ display: inline-flex;
51
+ align-items: center;
52
+ justify-content: center;
53
+ min-height: 44px;
54
+ border-radius: 999px;
55
+ font-weight: 700;
56
+ text-decoration: none;
57
+ }
58
+
59
+ .bb-reference-section__button {
60
+ padding: 0 22px;
61
+ background: #111827;
62
+ color: #ffffff;
63
+ }
64
+
65
+ .bb-reference-section__link {
66
+ padding: 0 12px;
67
+ color: #2563eb;
68
+ }
69
+
70
+ .bb-reference-section__grid {
71
+ display: grid;
72
+ grid-template-columns: repeat(3, minmax(0, 1fr));
73
+ gap: 18px;
74
+ }
75
+
76
+ .bb-reference-section__card {
77
+ min-height: 220px;
78
+ padding: 24px;
79
+ border: 1px solid #e5e7eb;
80
+ border-radius: 24px;
81
+ background: #ffffff;
82
+ box-shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
83
+ transition:
84
+ border-color 180ms ease,
85
+ box-shadow 180ms ease,
86
+ transform 180ms ease;
87
+ }
88
+
89
+ .bb-reference-section__card.is-active,
90
+ .bb-reference-section__card:hover {
91
+ border-color: #93c5fd;
92
+ box-shadow: 0 22px 60px rgba(37, 99, 235, 0.16);
93
+ transform: translateY(-3px);
94
+ }
95
+
96
+ .bb-reference-section__icon {
97
+ display: inline-flex;
98
+ align-items: center;
99
+ justify-content: center;
100
+ width: 44px;
101
+ height: 44px;
102
+ border-radius: 14px;
103
+ background: #eff6ff;
104
+ color: #2563eb;
105
+ font-weight: 800;
106
+ }
107
+
108
+ .bb-reference-section__card-title {
109
+ margin: 24px 0 10px;
110
+ font-size: 1.2rem;
111
+ }
112
+
113
+ .bb-reference-section__card-text {
114
+ margin: 0;
115
+ color: #4b5563;
116
+ line-height: 1.6;
117
+ }
118
+
119
+ .bb-reference-section__stats {
120
+ display: grid;
121
+ grid-template-columns: repeat(3, minmax(0, 1fr));
122
+ gap: 1px;
123
+ margin: 28px 0 0;
124
+ overflow: hidden;
125
+ border: 1px solid #e5e7eb;
126
+ border-radius: 22px;
127
+ background: #e5e7eb;
128
+ }
129
+
130
+ .bb-reference-section__stat {
131
+ padding: 22px;
132
+ background: #f9fafb;
133
+ text-align: center;
134
+ }
135
+
136
+ .bb-reference-section__stat-value {
137
+ font-size: 2rem;
138
+ font-weight: 800;
139
+ line-height: 1;
140
+ }
141
+
142
+ .bb-reference-section__stat-label {
143
+ margin: 8px 0 0;
144
+ color: #6b7280;
145
+ }
146
+
147
+ @media (max-width: 760px) {
148
+ .bb-reference-section {
149
+ padding: 44px 18px;
150
+ }
151
+
152
+ .bb-reference-section__grid,
153
+ .bb-reference-section__stats {
154
+ grid-template-columns: 1fr;
155
+ }
156
+ }
@@ -0,0 +1,59 @@
1
+ {% comment %}
2
+ Reference pattern for agents:
3
+ - Load seed data for previews with bb_seed.
4
+ - Resolve live item data with bb_source.
5
+ - Use the same props object for preview and live rendering.
6
+ {% endcomment %}
7
+ {% assign seed_data = "seeds.json" | bb_seed %}
8
+ {% assign data = item | bb_source %}
9
+ {% assign props = live | ternary: data, seed_data %}
10
+
11
+ <section class="bb-reference-section" data-reference-section>
12
+ <div class="bb-reference-section__header">
13
+ {% if props.fields.eyebrow %}
14
+ <p class="bb-reference-section__eyebrow">{{ props.fields.eyebrow }}</p>
15
+ {% endif %}
16
+
17
+ <h2 class="bb-reference-section__title">{{ props.fields.heading }}</h2>
18
+ <p class="bb-reference-section__intro">{{ props.fields.intro }}</p>
19
+
20
+ <div class="bb-reference-section__actions">
21
+ {% if props.fields.primary_cta_label %}
22
+ <a class="bb-reference-section__button" href="{{ props.fields.primary_cta_url }}">
23
+ {{ props.fields.primary_cta_label }}
24
+ </a>
25
+ {% endif %}
26
+
27
+ {% if props.fields.secondary_cta_label %}
28
+ <a class="bb-reference-section__link" href="{{ props.fields.secondary_cta_url }}">
29
+ {{ props.fields.secondary_cta_label }}
30
+ </a>
31
+ {% endif %}
32
+ </div>
33
+ </div>
34
+
35
+ {% comment %}
36
+ Repeated content belongs in subcollections. Keep seeds.json in the same
37
+ shape so template previews work without live WordPress content.
38
+ {% endcomment %}
39
+ <div class="bb-reference-section__grid">
40
+ {% for highlight in props.subcollections.highlights %}
41
+ <article class="bb-reference-section__card" data-reference-card>
42
+ <span class="bb-reference-section__icon">{{ highlight.icon }}</span>
43
+ <h3 class="bb-reference-section__card-title">{{ highlight.title }}</h3>
44
+ <p class="bb-reference-section__card-text">{{ highlight.text }}</p>
45
+ </article>
46
+ {% endfor %}
47
+ </div>
48
+
49
+ <dl class="bb-reference-section__stats">
50
+ {% for stat in props.subcollections.stats %}
51
+ <div class="bb-reference-section__stat">
52
+ <dt class="bb-reference-section__stat-value">{{ stat.value }}</dt>
53
+ <dd class="bb-reference-section__stat-label">{{ stat.label }}</dd>
54
+ </div>
55
+ {% endfor %}
56
+ </dl>
57
+ </section>
58
+
59
+ <script type="module" src="{{ "module.ts" | bb_asset_url }}"></script>
package/index.json ADDED
@@ -0,0 +1,239 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "recommendedStart": "Read this file first, then read the relevant SKILL.md files. Generated copies install skill paths next to this index.",
4
+ "skills": {
5
+ "connect": {
6
+ "path": "skills/connect/SKILL.md",
7
+ "tools": [
8
+ "blockbite-connection-status",
9
+ "blockbite-projects-list",
10
+ "blockbite-project-select"
11
+ ]
12
+ },
13
+ "projects-list": {
14
+ "path": "skills/projects-list/SKILL.md",
15
+ "tools": ["blockbite-projects-list"]
16
+ },
17
+ "project-select": {
18
+ "path": "skills/project-select/SKILL.md",
19
+ "tools": [
20
+ "blockbite-projects-list",
21
+ "blockbite-project-select",
22
+ "blockbite-connection-status"
23
+ ]
24
+ },
25
+ "connection-status": {
26
+ "path": "skills/connection-status/SKILL.md",
27
+ "tools": ["blockbite-connection-status"]
28
+ },
29
+ "islands-list": {
30
+ "path": "skills/islands-list/SKILL.md",
31
+ "tools": ["blockbite-islands-list"]
32
+ },
33
+ "template-new": {
34
+ "path": "skills/template-new/SKILL.md",
35
+ "tools": [
36
+ "blockbite-workspace-status",
37
+ "blockbite-template-scaffold",
38
+ "blockbite-template-create-draft",
39
+ "blockbite-workspace-write",
40
+ "blockbite-template-analyze",
41
+ "blockbite-template-render-preview",
42
+ "blockbite-validate-workspace",
43
+ "blockbite-build-status",
44
+ "blockbite-build-run"
45
+ ]
46
+ },
47
+ "template-refine": {
48
+ "path": "skills/template-refine/SKILL.md",
49
+ "tools": [
50
+ "blockbite-template-update-draft",
51
+ "blockbite-template-analyze",
52
+ "blockbite-workspace-read",
53
+ "blockbite-workspace-patch",
54
+ "blockbite-template-render-preview",
55
+ "blockbite-validate-workspace",
56
+ "blockbite-build-status",
57
+ "blockbite-build-run"
58
+ ]
59
+ },
60
+ "template-figma": {
61
+ "path": "skills/template-figma/SKILL.md",
62
+ "tools": [
63
+ "blockbite-agent-onboarding",
64
+ "blockbite-workspace-status",
65
+ "blockbite-template-scaffold",
66
+ "blockbite-template-create-draft",
67
+ "blockbite-workspace-write",
68
+ "blockbite-workspace-patch",
69
+ "blockbite-template-render-preview",
70
+ "blockbite-asset-import",
71
+ "blockbite-validate-workspace",
72
+ "blockbite-build-status",
73
+ "blockbite-build-run"
74
+ ]
75
+ },
76
+ "template-preview": {
77
+ "path": "skills/template-preview/SKILL.md",
78
+ "tools": [
79
+ "blockbite-workspace-read",
80
+ "blockbite-workspace-write",
81
+ "blockbite-workspace-patch",
82
+ "blockbite-template-render-preview",
83
+ "blockbite-validate-workspace",
84
+ "blockbite-build-status",
85
+ "blockbite-build-run"
86
+ ]
87
+ },
88
+ "block-style": {
89
+ "path": "skills/block-style/SKILL.md",
90
+ "tools": [
91
+ "blockbite-workspace-read",
92
+ "blockbite-workspace-write",
93
+ "blockbite-workspace-patch",
94
+ "blockbite-build-status",
95
+ "blockbite-build-run"
96
+ ]
97
+ },
98
+ "design-tokens": {
99
+ "path": "skills/design-tokens/SKILL.md",
100
+ "tools": [
101
+ "blockbite-design-token-write",
102
+ "blockbite-build-status",
103
+ "blockbite-build-run"
104
+ ]
105
+ },
106
+ "document-blueprint": {
107
+ "path": "skills/document-blueprint/SKILL.md",
108
+ "tools": [
109
+ "blockbite-workspace-read",
110
+ "blockbite-workspace-write",
111
+ "blockbite-workspace-patch",
112
+ "blockbite-template-render-preview",
113
+ "blockbite-validate-workspace"
114
+ ]
115
+ },
116
+ "figma-design-to-code": {
117
+ "path": "skills/figma-design-to-code/SKILL.md",
118
+ "tools": [
119
+ "blockbite-agent-onboarding",
120
+ "blockbite-workspace-status",
121
+ "blockbite-template-scaffold",
122
+ "blockbite-template-create-draft",
123
+ "blockbite-workspace-read",
124
+ "blockbite-workspace-write",
125
+ "blockbite-workspace-patch",
126
+ "blockbite-template-render-preview",
127
+ "blockbite-asset-import",
128
+ "blockbite-validate-workspace",
129
+ "blockbite-build-status",
130
+ "blockbite-build-run"
131
+ ]
132
+ },
133
+ "site-motion-pass": {
134
+ "path": "skills/site-motion-pass/SKILL.md",
135
+ "tools": [
136
+ "blockbite-workspace-read",
137
+ "blockbite-workspace-write",
138
+ "blockbite-workspace-patch",
139
+ "blockbite-template-render-preview",
140
+ "blockbite-build-status",
141
+ "blockbite-build-run"
142
+ ]
143
+ },
144
+ "site-reviewer": {
145
+ "path": "skills/site-reviewer/SKILL.md",
146
+ "tools": [
147
+ "blockbite-template-analyze",
148
+ "blockbite-template-render-preview",
149
+ "blockbite-validate-workspace",
150
+ "blockbite-sync-plan-create",
151
+ "blockbite-sync-plan-diff"
152
+ ]
153
+ },
154
+ "analyze-template": {
155
+ "path": "skills/analyze-template/SKILL.md",
156
+ "tools": ["blockbite-template-analyze"]
157
+ },
158
+ "render-preview": {
159
+ "path": "skills/render-preview/SKILL.md",
160
+ "tools": ["blockbite-template-render-preview"]
161
+ },
162
+ "frame-draft-link": {
163
+ "path": "skills/frame-draft-link/SKILL.md",
164
+ "tools": ["blockbite-workspace-write"]
165
+ },
166
+ "figma-site-builder": {
167
+ "path": "skills/figma-site-builder/SKILL.md",
168
+ "tools": [
169
+ "blockbite-agent-onboarding",
170
+ "blockbite-workspace-status",
171
+ "blockbite-build-status",
172
+ "blockbite-workspace-list",
173
+ "blockbite-workspace-read",
174
+ "blockbite-workspace-search",
175
+ "blockbite-template-scaffold",
176
+ "blockbite-template-create-draft",
177
+ "blockbite-workspace-write",
178
+ "blockbite-workspace-patch",
179
+ "blockbite-template-render-preview",
180
+ "blockbite-validate-workspace",
181
+ "blockbite-sandbox-status",
182
+ "blockbite-build-run",
183
+ "blockbite-asset-import",
184
+ "blockbite-design-token-write"
185
+ ]
186
+ },
187
+ "create-template-draft": {
188
+ "path": "skills/create-template-draft/SKILL.md",
189
+ "tools": [
190
+ "blockbite-agent-onboarding",
191
+ "blockbite-workspace-status",
192
+ "blockbite-sandbox-status",
193
+ "blockbite-template-scaffold",
194
+ "blockbite-template-create-draft",
195
+ "blockbite-workspace-write",
196
+ "blockbite-workspace-patch",
197
+ "blockbite-template-render-preview",
198
+ "blockbite-validate-workspace",
199
+ "blockbite-build-status",
200
+ "blockbite-build-run",
201
+ "blockbite-asset-import"
202
+ ]
203
+ },
204
+ "update-template-draft": {
205
+ "path": "skills/update-template-draft/SKILL.md",
206
+ "tools": [
207
+ "blockbite-agent-onboarding",
208
+ "blockbite-template-update-draft",
209
+ "blockbite-template-analyze",
210
+ "blockbite-workspace-read",
211
+ "blockbite-workspace-write",
212
+ "blockbite-workspace-patch",
213
+ "blockbite-template-render-preview",
214
+ "blockbite-validate-workspace",
215
+ "blockbite-sandbox-status",
216
+ "blockbite-build-status",
217
+ "blockbite-build-run",
218
+ "blockbite-asset-import"
219
+ ]
220
+ },
221
+ "sandbox-status": {
222
+ "path": "skills/sandbox-status/SKILL.md",
223
+ "tools": ["blockbite-sandbox-status"]
224
+ },
225
+ "sync-plan": {
226
+ "path": "skills/sync-plan/SKILL.md",
227
+ "tools": ["blockbite-sync-plan-create", "blockbite-sync-plan-diff"]
228
+ }
229
+ },
230
+ "references": {
231
+ "block-dsl": "references/block-dsl.md",
232
+ "tailwind-utilities": "references/tailwind-utilities.md",
233
+ "islands": "references/islands.md"
234
+ },
235
+ "examples": {
236
+ "dynamic-template-reference": "examples/dynamic-template-reference"
237
+ },
238
+ "mcpTools": "mcp-tools.json"
239
+ }