@compilr-dev/sdk 0.26.0 → 0.28.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/dist/actions/registry.d.ts +1 -1
- package/dist/actions/registry.js +1 -1
- package/dist/guide/shared-content.js +42 -9
- package/dist/index.d.ts +12 -8
- package/dist/index.js +7 -5
- package/dist/platform/tools/canvas-tools.js +11 -11
- package/dist/project-types/action-meta.d.ts +21 -7
- package/dist/project-types/action-meta.js +44 -213
- package/dist/project-types/index.d.ts +5 -3
- package/dist/project-types/index.js +3 -2
- package/dist/project-types/macro-meta.d.ts +39 -0
- package/dist/project-types/{skill-meta.js → macro-meta.js} +203 -12
- package/dist/project-types/macro-relevance.d.ts +47 -0
- package/dist/project-types/macro-relevance.js +58 -0
- package/dist/project-types/types.d.ts +23 -4
- package/dist/skills/book-macros.d.ts +10 -0
- package/dist/skills/{book-skills.js → book-macros.js} +6 -6
- package/dist/skills/business-macros.d.ts +11 -0
- package/dist/skills/{business-skills.js → business-macros.js} +7 -7
- package/dist/skills/canvas-exemplars.d.ts +2 -2
- package/dist/skills/canvas-exemplars.js +4 -4
- package/dist/skills/canvas-icons.d.ts +1 -1
- package/dist/skills/canvas-icons.js +2 -2
- package/dist/skills/canvas-macros.d.ts +11 -0
- package/dist/skills/{canvas-skills.js → canvas-macros.js} +11 -11
- package/dist/skills/content-macros.d.ts +10 -0
- package/dist/skills/{content-skills.js → content-macros.js} +6 -6
- package/dist/skills/course-macros.d.ts +9 -0
- package/dist/skills/{course-skills.js → course-macros.js} +5 -5
- package/dist/skills/index.d.ts +6 -2
- package/dist/skills/index.js +4 -2
- package/dist/skills/macro-invocation.d.ts +78 -0
- package/dist/skills/macro-invocation.js +286 -0
- package/dist/skills/macro-list.d.ts +54 -0
- package/dist/skills/macro-list.js +84 -0
- package/dist/skills/operations.js +4 -4
- package/dist/skills/platform-macros.d.ts +27 -0
- package/dist/skills/platform-macros.js +94 -0
- package/dist/skills/prompt-resolver.d.ts +8 -2
- package/dist/skills/prompt-resolver.js +14 -8
- package/dist/skills/research-macros.d.ts +10 -0
- package/dist/skills/{research-skills.js → research-macros.js} +6 -6
- package/dist/skills/resolver.d.ts +15 -9
- package/dist/skills/resolver.js +13 -13
- package/dist/skills/software-macros.d.ts +14 -0
- package/dist/skills/{software-skills.js → software-macros.js} +37 -37
- package/dist/skills/types.d.ts +2 -2
- package/dist/skills/types.js +4 -4
- package/dist/team/agent-templates.d.ts +0 -1
- package/dist/team/agent-templates.js +0 -2
- package/dist/team/custom-agents.d.ts +1 -2
- package/dist/team/custom-agents.js +1 -2
- package/dist/team/index.d.ts +3 -3
- package/dist/team/index.js +1 -1
- package/dist/team/{skill-requirements.d.ts → macro-requirements.d.ts} +20 -14
- package/dist/team/{skill-requirements.js → macro-requirements.js} +28 -22
- package/dist/team/macro-tool-gap.d.ts +3 -3
- package/dist/team/macro-tool-gap.js +6 -6
- package/dist/team/team-agent.d.ts +6 -7
- package/dist/team/team-agent.js +6 -14
- package/dist/team/types.d.ts +8 -7
- package/dist/team/workshop-data.d.ts +17 -5
- package/dist/team/workshop-data.js +13 -13
- package/package.json +1 -1
- package/dist/project-types/skill-meta.d.ts +0 -17
- package/dist/skills/book-skills.d.ts +0 -10
- package/dist/skills/business-skills.d.ts +0 -11
- package/dist/skills/canvas-skills.d.ts +0 -11
- package/dist/skills/content-skills.d.ts +0 -10
- package/dist/skills/course-skills.d.ts +0 -9
- package/dist/skills/platform-skills.d.ts +0 -20
- package/dist/skills/platform-skills.js +0 -87
- package/dist/skills/research-skills.d.ts +0 -10
- package/dist/skills/software-skills.d.ts +0 -14
|
@@ -1,16 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Macro Metadata Registry — the single registry for every macro we ship.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* 55 entries: 42 platform macros, the 6 agents-library builtins they do not shadow, and the 7
|
|
5
|
+
* from agents-coding. Every id here is a MACRO — a named prompt the user invokes — never an
|
|
6
|
+
* installed Skill, which carries its own description in its SKILL.md.
|
|
7
|
+
*
|
|
8
|
+
* ⚠️ THERE USED TO BE THREE OF THESE. This one (unread, reachable only through an IPC channel
|
|
9
|
+
* nothing called), ACTION_META_REGISTRY (live, shorter labels), and a third inside Desktop
|
|
10
|
+
* (live, the slash menu). Each was missing what the others had: this one lacked all 8 canvas
|
|
11
|
+
* and 7 agents-coding macros, Desktop's lacked all 20 business/content/course/book ones. The
|
|
12
|
+
* failure mode was never an error — a macro with no entry renders as its raw id with a generic
|
|
13
|
+
* icon, so a business-plan project listed `business-vision`, `market-analysis`, … verbatim.
|
|
14
|
+
*
|
|
15
|
+
* `shortLabel` is why the merge is not lossy: ACTION_META's labels were shorter ON PURPOSE
|
|
16
|
+
* (a button in a row of six cannot say "Competitor Analysis"), so both survive here. Every one
|
|
17
|
+
* of its 35 labels is reproducible as `shortLabel ?? label`, asserted before it was deleted.
|
|
18
|
+
*
|
|
19
|
+
* Coverage is enforced, in both directions, by tests/skills/macro-meta-coverage.test.ts —
|
|
20
|
+
* derived from the macro sources themselves, never a hand-written list, because a hand-written
|
|
21
|
+
* list is precisely what produced three maps.
|
|
22
|
+
*
|
|
23
|
+
* Spec: project-docs/00-requirements/compilr-dev-sdk/macro-metadata-consolidation.md
|
|
6
24
|
*/
|
|
7
|
-
/** All
|
|
8
|
-
export const
|
|
9
|
-
// ── Platform
|
|
25
|
+
/** All macro UI metadata — platform macros + the agents library's builtins. */
|
|
26
|
+
export const MACRO_META_REGISTRY = {
|
|
27
|
+
// ── Platform Macros (SDK) ────────────────────────────────────────────────
|
|
10
28
|
design: {
|
|
11
29
|
id: 'design',
|
|
12
30
|
label: 'Design App',
|
|
31
|
+
shortLabel: 'Design',
|
|
13
32
|
description: 'Guide through project design',
|
|
33
|
+
shortDescription: 'Design the app',
|
|
14
34
|
icon: 'Wand2',
|
|
15
35
|
category: 'design',
|
|
16
36
|
},
|
|
@@ -24,21 +44,28 @@ export const SKILL_META_REGISTRY = {
|
|
|
24
44
|
prd: {
|
|
25
45
|
id: 'prd',
|
|
26
46
|
label: 'Write PRD',
|
|
47
|
+
shortLabel: 'PRD',
|
|
27
48
|
description: 'Product requirements document',
|
|
49
|
+
shortDescription: 'Write requirements',
|
|
28
50
|
icon: 'FileText',
|
|
29
51
|
category: 'planning',
|
|
30
52
|
},
|
|
31
53
|
refine: {
|
|
32
54
|
id: 'refine',
|
|
33
55
|
label: 'Refine Backlog',
|
|
56
|
+
shortLabel: 'Refine',
|
|
34
57
|
description: 'Expand and refine requirements',
|
|
58
|
+
shortDescription: 'Refine backlog',
|
|
35
59
|
icon: 'RefreshCw',
|
|
36
60
|
category: 'planning',
|
|
37
61
|
},
|
|
38
62
|
'refine-item': {
|
|
39
63
|
id: 'refine-item',
|
|
40
64
|
label: 'Refine Item',
|
|
65
|
+
shortLabel: 'Refine',
|
|
41
66
|
description: 'Add detail to a work item',
|
|
67
|
+
shortDescription: 'Add detail to this item',
|
|
68
|
+
suggestedRole: 'pm',
|
|
42
69
|
icon: 'RefreshCw',
|
|
43
70
|
category: 'planning',
|
|
44
71
|
},
|
|
@@ -46,13 +73,16 @@ export const SKILL_META_REGISTRY = {
|
|
|
46
73
|
id: 'architecture',
|
|
47
74
|
label: 'Architecture',
|
|
48
75
|
description: 'System architecture design',
|
|
76
|
+
shortDescription: 'System architecture',
|
|
49
77
|
icon: 'Network',
|
|
50
78
|
category: 'design',
|
|
51
79
|
},
|
|
52
80
|
'session-notes': {
|
|
53
81
|
id: 'session-notes',
|
|
54
82
|
label: 'Session Notes',
|
|
83
|
+
shortLabel: 'Notes',
|
|
55
84
|
description: 'Summarize work done',
|
|
85
|
+
shortDescription: 'Session summary',
|
|
56
86
|
icon: 'StickyNote',
|
|
57
87
|
category: 'documentation',
|
|
58
88
|
},
|
|
@@ -60,6 +90,8 @@ export const SKILL_META_REGISTRY = {
|
|
|
60
90
|
id: 'build',
|
|
61
91
|
label: 'Build',
|
|
62
92
|
description: 'Implement a feature',
|
|
93
|
+
shortDescription: 'Implement this item',
|
|
94
|
+
suggestedRole: 'developer',
|
|
63
95
|
icon: 'Hammer',
|
|
64
96
|
category: 'development',
|
|
65
97
|
},
|
|
@@ -67,6 +99,7 @@ export const SKILL_META_REGISTRY = {
|
|
|
67
99
|
id: 'scaffold',
|
|
68
100
|
label: 'Scaffold',
|
|
69
101
|
description: 'Generate project code',
|
|
102
|
+
shortDescription: 'Generate code',
|
|
70
103
|
icon: 'Layers',
|
|
71
104
|
category: 'development',
|
|
72
105
|
},
|
|
@@ -74,7 +107,9 @@ export const SKILL_META_REGISTRY = {
|
|
|
74
107
|
outline: {
|
|
75
108
|
id: 'outline',
|
|
76
109
|
label: 'Paper Outline',
|
|
110
|
+
shortLabel: 'Outline',
|
|
77
111
|
description: 'Build paper structure',
|
|
112
|
+
shortDescription: 'Build paper outline',
|
|
78
113
|
icon: 'BookOpen',
|
|
79
114
|
category: 'research',
|
|
80
115
|
},
|
|
@@ -88,14 +123,18 @@ export const SKILL_META_REGISTRY = {
|
|
|
88
123
|
'draft-section': {
|
|
89
124
|
id: 'draft-section',
|
|
90
125
|
label: 'Draft Section',
|
|
126
|
+
shortLabel: 'Draft',
|
|
91
127
|
description: 'Write a paper section',
|
|
128
|
+
shortDescription: 'Write a section',
|
|
92
129
|
icon: 'PenTool',
|
|
93
130
|
category: 'research',
|
|
94
131
|
},
|
|
95
132
|
'peer-review': {
|
|
96
133
|
id: 'peer-review',
|
|
97
134
|
label: 'Peer Review',
|
|
135
|
+
shortLabel: 'Review',
|
|
98
136
|
description: 'Validate argument structure',
|
|
137
|
+
shortDescription: 'Review the paper',
|
|
99
138
|
icon: 'ShieldCheck',
|
|
100
139
|
category: 'research',
|
|
101
140
|
},
|
|
@@ -110,42 +149,54 @@ export const SKILL_META_REGISTRY = {
|
|
|
110
149
|
'business-vision': {
|
|
111
150
|
id: 'business-vision',
|
|
112
151
|
label: 'Business Vision',
|
|
152
|
+
shortLabel: 'Vision',
|
|
113
153
|
description: 'Define business identity and value proposition',
|
|
154
|
+
shortDescription: 'Define your business',
|
|
114
155
|
icon: 'Target',
|
|
115
156
|
category: 'planning',
|
|
116
157
|
},
|
|
117
158
|
'market-analysis': {
|
|
118
159
|
id: 'market-analysis',
|
|
119
160
|
label: 'Market Analysis',
|
|
161
|
+
shortLabel: 'Market',
|
|
120
162
|
description: 'Analyze market size, trends, and segments',
|
|
163
|
+
shortDescription: 'Analyze the market',
|
|
121
164
|
icon: 'TrendingUp',
|
|
122
165
|
category: 'analysis',
|
|
123
166
|
},
|
|
124
167
|
'competitor-analysis': {
|
|
125
168
|
id: 'competitor-analysis',
|
|
126
169
|
label: 'Competitor Analysis',
|
|
170
|
+
shortLabel: 'Competitors',
|
|
127
171
|
description: 'Map competitive landscape',
|
|
172
|
+
shortDescription: 'Map competition',
|
|
128
173
|
icon: 'Swords',
|
|
129
174
|
category: 'analysis',
|
|
130
175
|
},
|
|
131
176
|
'financial-model': {
|
|
132
177
|
id: 'financial-model',
|
|
133
178
|
label: 'Financial Model',
|
|
179
|
+
shortLabel: 'Financials',
|
|
134
180
|
description: 'Build revenue and cost projections',
|
|
181
|
+
shortDescription: 'Build projections',
|
|
135
182
|
icon: 'DollarSign',
|
|
136
183
|
category: 'analysis',
|
|
137
184
|
},
|
|
138
185
|
'pitch-outline': {
|
|
139
186
|
id: 'pitch-outline',
|
|
140
187
|
label: 'Pitch Outline',
|
|
188
|
+
shortLabel: 'Pitch',
|
|
141
189
|
description: 'Structure an investor pitch',
|
|
190
|
+
shortDescription: 'Structure a pitch',
|
|
142
191
|
icon: 'Rocket',
|
|
143
192
|
category: 'planning',
|
|
144
193
|
},
|
|
145
194
|
'business-review': {
|
|
146
195
|
id: 'business-review',
|
|
147
196
|
label: 'Business Review',
|
|
197
|
+
shortLabel: 'Review',
|
|
148
198
|
description: 'Validate the business plan',
|
|
199
|
+
shortDescription: 'Validate the plan',
|
|
149
200
|
icon: 'ShieldCheck',
|
|
150
201
|
category: 'analysis',
|
|
151
202
|
},
|
|
@@ -153,35 +204,45 @@ export const SKILL_META_REGISTRY = {
|
|
|
153
204
|
'brand-setup': {
|
|
154
205
|
id: 'brand-setup',
|
|
155
206
|
label: 'Brand Setup',
|
|
207
|
+
shortLabel: 'Brand',
|
|
156
208
|
description: 'Define brand identity, voice, and visual guidelines',
|
|
209
|
+
shortDescription: 'Set up brand identity',
|
|
157
210
|
icon: 'Palette',
|
|
158
211
|
category: 'planning',
|
|
159
212
|
},
|
|
160
213
|
'content-strategy': {
|
|
161
214
|
id: 'content-strategy',
|
|
162
215
|
label: 'Content Strategy',
|
|
216
|
+
shortLabel: 'Strategy',
|
|
163
217
|
description: 'Define content pillars and cadence',
|
|
218
|
+
shortDescription: 'Define pillars',
|
|
164
219
|
icon: 'Target',
|
|
165
220
|
category: 'planning',
|
|
166
221
|
},
|
|
167
222
|
'content-calendar': {
|
|
168
223
|
id: 'content-calendar',
|
|
169
224
|
label: 'Content Calendar',
|
|
225
|
+
shortLabel: 'Calendar',
|
|
170
226
|
description: 'Plan content for a period',
|
|
227
|
+
shortDescription: 'Plan content',
|
|
171
228
|
icon: 'Calendar',
|
|
172
229
|
category: 'planning',
|
|
173
230
|
},
|
|
174
231
|
'create-content': {
|
|
175
232
|
id: 'create-content',
|
|
176
233
|
label: 'Create Content',
|
|
234
|
+
shortLabel: 'Create',
|
|
177
235
|
description: 'Write copy and visual brief',
|
|
236
|
+
shortDescription: 'Write content',
|
|
178
237
|
icon: 'PenTool',
|
|
179
238
|
category: 'development',
|
|
180
239
|
},
|
|
181
240
|
'content-review': {
|
|
182
241
|
id: 'content-review',
|
|
183
242
|
label: 'Content Review',
|
|
243
|
+
shortLabel: 'Review',
|
|
184
244
|
description: 'Review for brand consistency',
|
|
245
|
+
shortDescription: 'Check quality',
|
|
185
246
|
icon: 'CheckCircle',
|
|
186
247
|
category: 'analysis',
|
|
187
248
|
},
|
|
@@ -190,27 +251,34 @@ export const SKILL_META_REGISTRY = {
|
|
|
190
251
|
id: 'curriculum-design',
|
|
191
252
|
label: 'Curriculum',
|
|
192
253
|
description: 'Define modules and learning objectives',
|
|
254
|
+
shortDescription: 'Define structure',
|
|
193
255
|
icon: 'School',
|
|
194
256
|
category: 'planning',
|
|
195
257
|
},
|
|
196
258
|
'lesson-plan': {
|
|
197
259
|
id: 'lesson-plan',
|
|
198
260
|
label: 'Lesson Plan',
|
|
261
|
+
shortLabel: 'Lessons',
|
|
199
262
|
description: 'Break modules into lessons',
|
|
263
|
+
shortDescription: 'Plan lessons',
|
|
200
264
|
icon: 'BookOpen',
|
|
201
265
|
category: 'planning',
|
|
202
266
|
},
|
|
203
267
|
'assessment-design': {
|
|
204
268
|
id: 'assessment-design',
|
|
205
269
|
label: 'Assessment',
|
|
270
|
+
shortLabel: 'Assess',
|
|
206
271
|
description: 'Create quizzes and exercises',
|
|
272
|
+
shortDescription: 'Create assessments',
|
|
207
273
|
icon: 'ClipboardCheck',
|
|
208
274
|
category: 'planning',
|
|
209
275
|
},
|
|
210
276
|
'course-review': {
|
|
211
277
|
id: 'course-review',
|
|
212
278
|
label: 'Course Review',
|
|
279
|
+
shortLabel: 'Review',
|
|
213
280
|
description: 'Pedagogical quality check',
|
|
281
|
+
shortDescription: 'Quality check',
|
|
214
282
|
icon: 'CheckCircle',
|
|
215
283
|
category: 'analysis',
|
|
216
284
|
},
|
|
@@ -218,7 +286,9 @@ export const SKILL_META_REGISTRY = {
|
|
|
218
286
|
'book-outline': {
|
|
219
287
|
id: 'book-outline',
|
|
220
288
|
label: 'Book Outline',
|
|
289
|
+
shortLabel: 'Outline',
|
|
221
290
|
description: 'Define structure, beats, and chapters',
|
|
291
|
+
shortDescription: 'Plan structure',
|
|
222
292
|
icon: 'BookOpen',
|
|
223
293
|
category: 'planning',
|
|
224
294
|
},
|
|
@@ -226,13 +296,16 @@ export const SKILL_META_REGISTRY = {
|
|
|
226
296
|
id: 'character-design',
|
|
227
297
|
label: 'Characters',
|
|
228
298
|
description: 'Build character profiles and relationships',
|
|
299
|
+
shortDescription: 'Build cast',
|
|
229
300
|
icon: 'Users',
|
|
230
301
|
category: 'planning',
|
|
231
302
|
},
|
|
232
303
|
'plot-threads': {
|
|
233
304
|
id: 'plot-threads',
|
|
234
305
|
label: 'Plot Threads',
|
|
306
|
+
shortLabel: 'Threads',
|
|
235
307
|
description: 'Define and track narrative threads',
|
|
308
|
+
shortDescription: 'Map plot lines',
|
|
236
309
|
icon: 'GitBranch',
|
|
237
310
|
category: 'planning',
|
|
238
311
|
},
|
|
@@ -240,13 +313,16 @@ export const SKILL_META_REGISTRY = {
|
|
|
240
313
|
id: 'scene-breakdown',
|
|
241
314
|
label: 'Scenes',
|
|
242
315
|
description: 'Break chapters into scenes',
|
|
316
|
+
shortDescription: 'Detail scenes',
|
|
243
317
|
icon: 'Layers',
|
|
244
318
|
category: 'development',
|
|
245
319
|
},
|
|
246
320
|
'book-review': {
|
|
247
321
|
id: 'book-review',
|
|
248
322
|
label: 'Book Review',
|
|
323
|
+
shortLabel: 'Review',
|
|
249
324
|
description: 'Structural review of the book',
|
|
325
|
+
shortDescription: 'Structure check',
|
|
250
326
|
icon: 'CheckCircle',
|
|
251
327
|
category: 'analysis',
|
|
252
328
|
},
|
|
@@ -254,7 +330,10 @@ export const SKILL_META_REGISTRY = {
|
|
|
254
330
|
'code-review': {
|
|
255
331
|
id: 'code-review',
|
|
256
332
|
label: 'Code Review',
|
|
333
|
+
shortLabel: 'Review',
|
|
257
334
|
description: 'Review code quality',
|
|
335
|
+
shortDescription: 'Review code for this item',
|
|
336
|
+
suggestedRole: 'qa',
|
|
258
337
|
icon: 'Search',
|
|
259
338
|
category: 'development',
|
|
260
339
|
},
|
|
@@ -269,6 +348,7 @@ export const SKILL_META_REGISTRY = {
|
|
|
269
348
|
id: 'explain',
|
|
270
349
|
label: 'Explain',
|
|
271
350
|
description: 'Explain code or concept',
|
|
351
|
+
shortDescription: 'Explain this item',
|
|
272
352
|
icon: 'BookOpen',
|
|
273
353
|
category: 'documentation',
|
|
274
354
|
},
|
|
@@ -293,16 +373,127 @@ export const SKILL_META_REGISTRY = {
|
|
|
293
373
|
icon: 'ListTodo',
|
|
294
374
|
category: 'planning',
|
|
295
375
|
},
|
|
376
|
+
// ── Canvas (Desktop renders these; the CLI filters them by the `canvas` tag) ──
|
|
377
|
+
canvas: {
|
|
378
|
+
id: 'canvas',
|
|
379
|
+
label: 'Visual Canvas',
|
|
380
|
+
description: 'Author or edit a visual canvas',
|
|
381
|
+
icon: 'Image',
|
|
382
|
+
category: 'design',
|
|
383
|
+
},
|
|
384
|
+
infographic: {
|
|
385
|
+
id: 'infographic',
|
|
386
|
+
label: 'Infographic',
|
|
387
|
+
description: 'Author an infographic canvas',
|
|
388
|
+
icon: 'Image',
|
|
389
|
+
category: 'design',
|
|
390
|
+
},
|
|
391
|
+
carousel: {
|
|
392
|
+
id: 'carousel',
|
|
393
|
+
label: 'Carousel Deck',
|
|
394
|
+
description: 'Author a slide carousel',
|
|
395
|
+
icon: 'Images',
|
|
396
|
+
category: 'design',
|
|
397
|
+
},
|
|
398
|
+
board: {
|
|
399
|
+
id: 'board',
|
|
400
|
+
label: 'Infinite Board',
|
|
401
|
+
description: 'Author an infinite board',
|
|
402
|
+
icon: 'LayoutDashboard',
|
|
403
|
+
category: 'design',
|
|
404
|
+
},
|
|
405
|
+
'canvas-styles': {
|
|
406
|
+
id: 'canvas-styles',
|
|
407
|
+
label: 'Canvas Styles',
|
|
408
|
+
description: 'Pick a canvas aesthetic',
|
|
409
|
+
icon: 'Palette',
|
|
410
|
+
category: 'design',
|
|
411
|
+
},
|
|
412
|
+
'canvas-exemplar-infographic': {
|
|
413
|
+
id: 'canvas-exemplar-infographic',
|
|
414
|
+
label: 'Example: Infographic',
|
|
415
|
+
description: 'Worked infographic to read first',
|
|
416
|
+
icon: 'Image',
|
|
417
|
+
category: 'design',
|
|
418
|
+
},
|
|
419
|
+
'canvas-exemplar-app-screen': {
|
|
420
|
+
id: 'canvas-exemplar-app-screen',
|
|
421
|
+
label: 'Example: App Screen',
|
|
422
|
+
description: 'Worked app-screen mock to read first',
|
|
423
|
+
icon: 'LayoutDashboard',
|
|
424
|
+
category: 'design',
|
|
425
|
+
},
|
|
426
|
+
'canvas-icons': {
|
|
427
|
+
id: 'canvas-icons',
|
|
428
|
+
label: 'Canvas Icons',
|
|
429
|
+
description: 'The canvas icon set',
|
|
430
|
+
icon: 'Shapes',
|
|
431
|
+
category: 'design',
|
|
432
|
+
},
|
|
433
|
+
// ── agents-coding ────────────────────────────────────────────────────────
|
|
434
|
+
'git-workflow': {
|
|
435
|
+
id: 'git-workflow',
|
|
436
|
+
label: 'Git Workflow',
|
|
437
|
+
description: 'Git operations with safety checks',
|
|
438
|
+
icon: 'GitBranch',
|
|
439
|
+
category: 'development',
|
|
440
|
+
},
|
|
441
|
+
'test-driven': {
|
|
442
|
+
id: 'test-driven',
|
|
443
|
+
label: 'Test-Driven',
|
|
444
|
+
description: 'Test-driven development workflow',
|
|
445
|
+
icon: 'TestTube',
|
|
446
|
+
category: 'development',
|
|
447
|
+
},
|
|
448
|
+
'code-navigation': {
|
|
449
|
+
id: 'code-navigation',
|
|
450
|
+
label: 'Code Navigation',
|
|
451
|
+
description: 'Navigate and understand a codebase',
|
|
452
|
+
icon: 'Compass',
|
|
453
|
+
category: 'analysis',
|
|
454
|
+
},
|
|
455
|
+
'pr-workflow': {
|
|
456
|
+
id: 'pr-workflow',
|
|
457
|
+
label: 'PR Workflow',
|
|
458
|
+
description: 'Create and review pull requests',
|
|
459
|
+
icon: 'GitPullRequest',
|
|
460
|
+
category: 'development',
|
|
461
|
+
},
|
|
462
|
+
'project-onboarding': {
|
|
463
|
+
id: 'project-onboarding',
|
|
464
|
+
label: 'Onboard Project',
|
|
465
|
+
description: 'Get oriented in a new project',
|
|
466
|
+
icon: 'BookOpen',
|
|
467
|
+
category: 'analysis',
|
|
468
|
+
},
|
|
469
|
+
'code-optimization': {
|
|
470
|
+
id: 'code-optimization',
|
|
471
|
+
label: 'Optimize',
|
|
472
|
+
description: 'Performance optimization workflow',
|
|
473
|
+
icon: 'Zap',
|
|
474
|
+
category: 'development',
|
|
475
|
+
},
|
|
476
|
+
'dependency-management': {
|
|
477
|
+
id: 'dependency-management',
|
|
478
|
+
label: 'Dependencies',
|
|
479
|
+
description: 'Maintain project dependencies',
|
|
480
|
+
icon: 'Package',
|
|
481
|
+
category: 'development',
|
|
482
|
+
},
|
|
296
483
|
};
|
|
297
484
|
/**
|
|
298
|
-
* Get
|
|
485
|
+
* Get macro metadata by ID.
|
|
486
|
+
*
|
|
487
|
+
* No internal caller: `buildMacroList` and `resolveActionMeta` read the registry directly.
|
|
488
|
+
* Kept as public API of a published package — but do not read its existence as evidence that
|
|
489
|
+
* something depends on it. The IPC channel that used to was deleted for being dead.
|
|
299
490
|
*/
|
|
300
|
-
export function
|
|
301
|
-
return
|
|
491
|
+
export function getMacroMeta(macroId) {
|
|
492
|
+
return MACRO_META_REGISTRY[macroId];
|
|
302
493
|
}
|
|
303
494
|
/**
|
|
304
|
-
* Get all
|
|
495
|
+
* Get all macro metadata entries.
|
|
305
496
|
*/
|
|
306
|
-
export function
|
|
307
|
-
return Object.values(
|
|
497
|
+
export function getAllMacroMeta() {
|
|
498
|
+
return Object.values(MACRO_META_REGISTRY);
|
|
308
499
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which macros matter for a project type.
|
|
3
|
+
*
|
|
4
|
+
* ⚠️ THIS REPLACES A HAND-WRITTEN COPY, AND THE COPY HAD DRIFTED BADLY. Desktop kept a
|
|
5
|
+
* `TYPE_RELEVANT_SKILLS` table listing macro ids per project type — a second copy of
|
|
6
|
+
* `ProjectTypeConfig.projectActions`, which the SDK already declares. By the time it was found:
|
|
7
|
+
*
|
|
8
|
+
* - business-plan, content and course promoted NONE of their own domain macros. A business
|
|
9
|
+
* plan offered canvas, explain and session-notes; its six business macros were not promoted
|
|
10
|
+
* and, having no metadata entry either, listed below as raw ids.
|
|
11
|
+
* - `book` had no entry at all, so a book project fell through to an unordered list.
|
|
12
|
+
* - it keyed `cli`, `api` and `library`, which are not project types and never matched.
|
|
13
|
+
*
|
|
14
|
+
* None of that was reachable by a compiler. The list is derived here instead, and the guard in
|
|
15
|
+
* tests/project-types/macro-relevance.test.ts asserts every id it can emit is a real macro with
|
|
16
|
+
* metadata, and that every project type is covered.
|
|
17
|
+
*
|
|
18
|
+
* Spec: project-docs/00-requirements/compilr-dev-sdk/macro-metadata-consolidation.md
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* What the HOST can do, not what the user wants.
|
|
22
|
+
*
|
|
23
|
+
* A terminal cannot draw a canvas, so the CLI passes `canvas: false` and the canvas macros are
|
|
24
|
+
* never promoted there. This is the one thing that legitimately differs between the two hosts,
|
|
25
|
+
* so it is a parameter rather than a per-host list — neither host gets to re-decide the rest.
|
|
26
|
+
*/
|
|
27
|
+
export interface MacroCapabilities {
|
|
28
|
+
/**
|
|
29
|
+
* The host can render a canvas.
|
|
30
|
+
*
|
|
31
|
+
* Three states, and they differ in MEMBERSHIP, not just ordering:
|
|
32
|
+
* `true` — Desktop. Canvas macros are listed and promoted.
|
|
33
|
+
* `false` — the CLI. Canvas macros are EXCLUDED. A terminal cannot draw one, and the
|
|
34
|
+
* CLI's resolver already refuses them, so listing them offers something that
|
|
35
|
+
* then answers "Unknown command" — the exact bug the CLI had fixed for
|
|
36
|
+
* disabled skills and still had here.
|
|
37
|
+
* `undefined` — no opinion: listed, not promoted. What a plain `buildMacroList()` does.
|
|
38
|
+
*/
|
|
39
|
+
canvas?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Macro ids relevant to a project type, most relevant first.
|
|
43
|
+
*
|
|
44
|
+
* Returns `[]` for an unknown or absent type, which callers should read as "no opinion about
|
|
45
|
+
* ordering" rather than "nothing is relevant".
|
|
46
|
+
*/
|
|
47
|
+
export declare function getRelevantMacros(projectTypeId?: string, capabilities?: MacroCapabilities): string[];
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which macros matter for a project type.
|
|
3
|
+
*
|
|
4
|
+
* ⚠️ THIS REPLACES A HAND-WRITTEN COPY, AND THE COPY HAD DRIFTED BADLY. Desktop kept a
|
|
5
|
+
* `TYPE_RELEVANT_SKILLS` table listing macro ids per project type — a second copy of
|
|
6
|
+
* `ProjectTypeConfig.projectActions`, which the SDK already declares. By the time it was found:
|
|
7
|
+
*
|
|
8
|
+
* - business-plan, content and course promoted NONE of their own domain macros. A business
|
|
9
|
+
* plan offered canvas, explain and session-notes; its six business macros were not promoted
|
|
10
|
+
* and, having no metadata entry either, listed below as raw ids.
|
|
11
|
+
* - `book` had no entry at all, so a book project fell through to an unordered list.
|
|
12
|
+
* - it keyed `cli`, `api` and `library`, which are not project types and never matched.
|
|
13
|
+
*
|
|
14
|
+
* None of that was reachable by a compiler. The list is derived here instead, and the guard in
|
|
15
|
+
* tests/project-types/macro-relevance.test.ts asserts every id it can emit is a real macro with
|
|
16
|
+
* metadata, and that every project type is covered.
|
|
17
|
+
*
|
|
18
|
+
* Spec: project-docs/00-requirements/compilr-dev-sdk/macro-metadata-consolidation.md
|
|
19
|
+
*/
|
|
20
|
+
import { PROJECT_TYPES } from './index.js';
|
|
21
|
+
import { platformMacros } from '../skills/platform-macros.js';
|
|
22
|
+
/** Macros that apply to any project where code is involved. */
|
|
23
|
+
const SOFTWARE_MACROS = ['build', 'code-review', 'debug'];
|
|
24
|
+
/** Applies everywhere: explaining something is not domain-specific. */
|
|
25
|
+
const UNIVERSAL_MACROS = ['explain'];
|
|
26
|
+
/**
|
|
27
|
+
* The canvas macros a user would reach for, derived from tags rather than named.
|
|
28
|
+
*
|
|
29
|
+
* `canvas` minus `reference`: the exemplars and the icon set are material the AGENT reads via
|
|
30
|
+
* canvas_guide, and nobody opens "canvas icons" from a slash menu. Desktop expressed that by
|
|
31
|
+
* omitting three names from a hand-written list and explaining it in a comment — which is not a
|
|
32
|
+
* rule a new canvas macro can inherit. The tag is.
|
|
33
|
+
*/
|
|
34
|
+
function promotableCanvasMacros() {
|
|
35
|
+
return platformMacros
|
|
36
|
+
.filter((m) => (m.tags ?? []).includes('canvas') && !(m.tags ?? []).includes('reference'))
|
|
37
|
+
.map((m) => m.name);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Macro ids relevant to a project type, most relevant first.
|
|
41
|
+
*
|
|
42
|
+
* Returns `[]` for an unknown or absent type, which callers should read as "no opinion about
|
|
43
|
+
* ordering" rather than "nothing is relevant".
|
|
44
|
+
*/
|
|
45
|
+
export function getRelevantMacros(projectTypeId, capabilities = {}) {
|
|
46
|
+
if (!projectTypeId)
|
|
47
|
+
return [];
|
|
48
|
+
const config = PROJECT_TYPES.find((t) => t.id === projectTypeId);
|
|
49
|
+
if (!config)
|
|
50
|
+
return [];
|
|
51
|
+
const ordered = [...config.projectActions];
|
|
52
|
+
if (config.category === 'software')
|
|
53
|
+
ordered.push(...SOFTWARE_MACROS);
|
|
54
|
+
if (capabilities.canvas)
|
|
55
|
+
ordered.push(...promotableCanvasMacros());
|
|
56
|
+
ordered.push(...UNIVERSAL_MACROS);
|
|
57
|
+
return [...new Set(ordered)];
|
|
58
|
+
}
|
|
@@ -66,16 +66,35 @@ export interface ActionMeta {
|
|
|
66
66
|
suggestedRole?: string;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
-
* UI metadata for a
|
|
69
|
+
* UI metadata for a macro.
|
|
70
70
|
*/
|
|
71
|
-
export interface
|
|
71
|
+
export interface MacroMeta {
|
|
72
72
|
id: string;
|
|
73
|
+
/** Full name, for menus and lists: "Business Vision". */
|
|
73
74
|
label: string;
|
|
75
|
+
/**
|
|
76
|
+
* Short name for an action button sitting in a row of six: "Vision".
|
|
77
|
+
* Falls back to `label`. This is why merging the old ACTION_META_REGISTRY into this one
|
|
78
|
+
* could not simply drop its labels — they were shorter ON PURPOSE, not drifted.
|
|
79
|
+
*/
|
|
80
|
+
shortLabel?: string;
|
|
81
|
+
/** Full sentence, for menus and lists: "Analyze market size, trends, and segments". */
|
|
74
82
|
description: string;
|
|
75
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* Terse, imperative phrasing for an action button: "Analyze the market". For a work-item
|
|
85
|
+
* action it is scoped to the item — "Implement this item", not "Implement a feature".
|
|
86
|
+
* Falls back to `description`. Like `shortLabel`, this was a deliberate second phrasing in
|
|
87
|
+
* the registry this one absorbed, not drift: 33 of its 35 entries differed.
|
|
88
|
+
*/
|
|
89
|
+
shortDescription?: string;
|
|
90
|
+
/** Lucide icon name. The CLI ignores it; that is the only per-host difference here. */
|
|
76
91
|
icon: string;
|
|
77
|
-
category:
|
|
92
|
+
category: MacroCategory;
|
|
93
|
+
/** Agent role suggested to own this when it is offered as a work-item action. */
|
|
94
|
+
suggestedRole?: string;
|
|
78
95
|
}
|
|
96
|
+
/** The categories a macro can be filed under. Shared, so a host cannot be missing one. */
|
|
97
|
+
export type MacroCategory = 'design' | 'development' | 'planning' | 'documentation' | 'analysis' | 'research';
|
|
79
98
|
/**
|
|
80
99
|
* Full project type configuration.
|
|
81
100
|
*/
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Book Macros
|
|
3
|
+
*
|
|
4
|
+
* book-outline, character-design, plot-threads, scene-breakdown, book-review
|
|
5
|
+
*/
|
|
6
|
+
export declare const bookOutlineMacro: import("@compilr-dev/agents").Skill;
|
|
7
|
+
export declare const characterDesignMacro: import("@compilr-dev/agents").Skill;
|
|
8
|
+
export declare const plotThreadsMacro: import("@compilr-dev/agents").Skill;
|
|
9
|
+
export declare const sceneBreakdownMacro: import("@compilr-dev/agents").Skill;
|
|
10
|
+
export declare const bookReviewMacro: import("@compilr-dev/agents").Skill;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Book
|
|
2
|
+
* Book Macros
|
|
3
3
|
*
|
|
4
4
|
* book-outline, character-design, plot-threads, scene-breakdown, book-review
|
|
5
5
|
*/
|
|
6
6
|
import { defineSkill } from '@compilr-dev/agents';
|
|
7
|
-
export const
|
|
7
|
+
export const bookOutlineMacro = defineSkill({
|
|
8
8
|
name: 'book-outline',
|
|
9
9
|
description: 'Define the book structure — story template selection, beat sheet, chapter breakdown, and narrative arc. Use when starting a new book or restructuring an existing one. Produces a BookModel outline stored in the project database.',
|
|
10
10
|
prompt: `You are in BOOK OUTLINE MODE. Help the user structure their book.
|
|
@@ -45,7 +45,7 @@ Create one "Chapter" work item per chapter.
|
|
|
45
45
|
- Beat percentages are guidelines, not rigid rules`,
|
|
46
46
|
tags: ['book', 'planning', 'structure'],
|
|
47
47
|
});
|
|
48
|
-
export const
|
|
48
|
+
export const characterDesignMacro = defineSkill({
|
|
49
49
|
name: 'character-design',
|
|
50
50
|
description: 'Build detailed character profiles including backstory, traits, motivations, arcs, and relationship maps. Use after the outline exists. Creates or updates character entries in the BookModel with connections between characters.',
|
|
51
51
|
prompt: `You are in CHARACTER DESIGN MODE. Help the user build their cast.
|
|
@@ -82,7 +82,7 @@ This feeds the Character Map visualization.
|
|
|
82
82
|
- For non-fiction: "characters" are key concepts with relationships`,
|
|
83
83
|
tags: ['book', 'characters'],
|
|
84
84
|
});
|
|
85
|
-
export const
|
|
85
|
+
export const plotThreadsMacro = defineSkill({
|
|
86
86
|
name: 'plot-threads',
|
|
87
87
|
description: 'Define and track plot threads across chapters — main plot, subplots, and thematic threads. Use when the outline and characters exist but narrative threads need explicit tracking. Maps each thread to the chapters where it appears.',
|
|
88
88
|
prompt: `You are in PLOT THREADS MODE. Map the story's narrative threads.
|
|
@@ -118,7 +118,7 @@ Report issues and suggest fixes.
|
|
|
118
118
|
- For non-fiction: threads are argument lines`,
|
|
119
119
|
tags: ['book', 'plotting'],
|
|
120
120
|
});
|
|
121
|
-
export const
|
|
121
|
+
export const sceneBreakdownMacro = defineSkill({
|
|
122
122
|
name: 'scene-breakdown',
|
|
123
123
|
description: 'Break a chapter into detailed scenes with setting, characters present, POV, conflict, and beats. Use when a chapter outline exists but needs scene-level granularity before drafting. Produces scene entries linked to the chapter in the BookModel.',
|
|
124
124
|
prompt: `You are in SCENE BREAKDOWN MODE. Detail a chapter's scenes.
|
|
@@ -151,7 +151,7 @@ Save: \`book_model_update\` op: "scene_add"
|
|
|
151
151
|
- End chapters on moments of tension or decision`,
|
|
152
152
|
tags: ['book', 'scenes'],
|
|
153
153
|
});
|
|
154
|
-
export const
|
|
154
|
+
export const bookReviewMacro = defineSkill({
|
|
155
155
|
name: 'book-review',
|
|
156
156
|
description: 'Structural review of the entire book — validates beat sheet completeness, character arc consistency, thread coverage across chapters, and pacing balance. Use after substantial content exists to find structural gaps before drafting or revision.',
|
|
157
157
|
prompt: `You are in BOOK REVIEW MODE. Evaluate the book's structure.
|