@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.
Files changed (74) hide show
  1. package/dist/actions/registry.d.ts +1 -1
  2. package/dist/actions/registry.js +1 -1
  3. package/dist/guide/shared-content.js +42 -9
  4. package/dist/index.d.ts +12 -8
  5. package/dist/index.js +7 -5
  6. package/dist/platform/tools/canvas-tools.js +11 -11
  7. package/dist/project-types/action-meta.d.ts +21 -7
  8. package/dist/project-types/action-meta.js +44 -213
  9. package/dist/project-types/index.d.ts +5 -3
  10. package/dist/project-types/index.js +3 -2
  11. package/dist/project-types/macro-meta.d.ts +39 -0
  12. package/dist/project-types/{skill-meta.js → macro-meta.js} +203 -12
  13. package/dist/project-types/macro-relevance.d.ts +47 -0
  14. package/dist/project-types/macro-relevance.js +58 -0
  15. package/dist/project-types/types.d.ts +23 -4
  16. package/dist/skills/book-macros.d.ts +10 -0
  17. package/dist/skills/{book-skills.js → book-macros.js} +6 -6
  18. package/dist/skills/business-macros.d.ts +11 -0
  19. package/dist/skills/{business-skills.js → business-macros.js} +7 -7
  20. package/dist/skills/canvas-exemplars.d.ts +2 -2
  21. package/dist/skills/canvas-exemplars.js +4 -4
  22. package/dist/skills/canvas-icons.d.ts +1 -1
  23. package/dist/skills/canvas-icons.js +2 -2
  24. package/dist/skills/canvas-macros.d.ts +11 -0
  25. package/dist/skills/{canvas-skills.js → canvas-macros.js} +11 -11
  26. package/dist/skills/content-macros.d.ts +10 -0
  27. package/dist/skills/{content-skills.js → content-macros.js} +6 -6
  28. package/dist/skills/course-macros.d.ts +9 -0
  29. package/dist/skills/{course-skills.js → course-macros.js} +5 -5
  30. package/dist/skills/index.d.ts +6 -2
  31. package/dist/skills/index.js +4 -2
  32. package/dist/skills/macro-invocation.d.ts +78 -0
  33. package/dist/skills/macro-invocation.js +286 -0
  34. package/dist/skills/macro-list.d.ts +54 -0
  35. package/dist/skills/macro-list.js +84 -0
  36. package/dist/skills/operations.js +4 -4
  37. package/dist/skills/platform-macros.d.ts +27 -0
  38. package/dist/skills/platform-macros.js +94 -0
  39. package/dist/skills/prompt-resolver.d.ts +8 -2
  40. package/dist/skills/prompt-resolver.js +14 -8
  41. package/dist/skills/research-macros.d.ts +10 -0
  42. package/dist/skills/{research-skills.js → research-macros.js} +6 -6
  43. package/dist/skills/resolver.d.ts +15 -9
  44. package/dist/skills/resolver.js +13 -13
  45. package/dist/skills/software-macros.d.ts +14 -0
  46. package/dist/skills/{software-skills.js → software-macros.js} +37 -37
  47. package/dist/skills/types.d.ts +2 -2
  48. package/dist/skills/types.js +4 -4
  49. package/dist/team/agent-templates.d.ts +0 -1
  50. package/dist/team/agent-templates.js +0 -2
  51. package/dist/team/custom-agents.d.ts +1 -2
  52. package/dist/team/custom-agents.js +1 -2
  53. package/dist/team/index.d.ts +3 -3
  54. package/dist/team/index.js +1 -1
  55. package/dist/team/{skill-requirements.d.ts → macro-requirements.d.ts} +20 -14
  56. package/dist/team/{skill-requirements.js → macro-requirements.js} +28 -22
  57. package/dist/team/macro-tool-gap.d.ts +3 -3
  58. package/dist/team/macro-tool-gap.js +6 -6
  59. package/dist/team/team-agent.d.ts +6 -7
  60. package/dist/team/team-agent.js +6 -14
  61. package/dist/team/types.d.ts +8 -7
  62. package/dist/team/workshop-data.d.ts +17 -5
  63. package/dist/team/workshop-data.js +13 -13
  64. package/package.json +1 -1
  65. package/dist/project-types/skill-meta.d.ts +0 -17
  66. package/dist/skills/book-skills.d.ts +0 -10
  67. package/dist/skills/business-skills.d.ts +0 -11
  68. package/dist/skills/canvas-skills.d.ts +0 -11
  69. package/dist/skills/content-skills.d.ts +0 -10
  70. package/dist/skills/course-skills.d.ts +0 -9
  71. package/dist/skills/platform-skills.d.ts +0 -20
  72. package/dist/skills/platform-skills.js +0 -87
  73. package/dist/skills/research-skills.d.ts +0 -10
  74. package/dist/skills/software-skills.d.ts +0 -14
@@ -1,11 +1,17 @@
1
1
  /**
2
- * Unified skill prompt resolver — used by both CLI and Desktop.
2
+ * Unified slash-command prompt resolver — used by both CLI and Desktop.
3
3
  *
4
- * Resolves a slash command name to a skill prompt using:
4
+ * Resolves a slash command name to a prompt using:
5
5
  * 1. Binding resolution (config.json slashCommands)
6
6
  * 2. 5-layer priority: project → user → SDK platform → agents builtin → agents-coding
7
7
  *
8
8
  * Also provides getAllAvailableSkills() for autocomplete/picker display.
9
+ *
10
+ * ⚠️ DELIBERATELY NOT RENAMED YET. This module spans BOTH populations: layer 4 is platform
11
+ * macros, but layers 2–3 read the user's and project's `SKILL.md` directories, so today an
12
+ * installed skill is also reachable by typing its name. That conflation is what M5 removes, by
13
+ * moving user-authored macros to `commands/` and leaving `skills/` to skills alone. Naming this
14
+ * module before that split would name the wrong shape; the rename follows M5, not this group.
9
15
  */
10
16
  import type { ForkedFromMarker } from './types.js';
11
17
  /** Result of resolving a skill prompt */
@@ -1,17 +1,23 @@
1
1
  /**
2
- * Unified skill prompt resolver — used by both CLI and Desktop.
2
+ * Unified slash-command prompt resolver — used by both CLI and Desktop.
3
3
  *
4
- * Resolves a slash command name to a skill prompt using:
4
+ * Resolves a slash command name to a prompt using:
5
5
  * 1. Binding resolution (config.json slashCommands)
6
6
  * 2. 5-layer priority: project → user → SDK platform → agents builtin → agents-coding
7
7
  *
8
8
  * Also provides getAllAvailableSkills() for autocomplete/picker display.
9
+ *
10
+ * ⚠️ DELIBERATELY NOT RENAMED YET. This module spans BOTH populations: layer 4 is platform
11
+ * macros, but layers 2–3 read the user's and project's `SKILL.md` directories, so today an
12
+ * installed skill is also reachable by typing its name. That conflation is what M5 removes, by
13
+ * moving user-authored macros to `commands/` and leaving `skills/` to skills alone. Naming this
14
+ * module before that split would name the wrong shape; the rename follows M5, not this group.
9
15
  */
10
16
  import { readFileSync, existsSync, readdirSync } from 'node:fs';
11
17
  import { join } from 'node:path';
12
18
  import { parseSkillMarkdown } from './loader.js';
13
19
  import { resolveBinding, getSkillsDir, readScopeConfigSync } from './paths.js';
14
- import { platformSkills } from './platform-skills.js';
20
+ import { platformMacros } from './platform-macros.js';
15
21
  // Re-export builtinSkills from agents (available via SDK re-export)
16
22
  // The SDK re-exports builtinSkills from @compilr-dev/agents
17
23
  import { builtinSkills } from '@compilr-dev/agents';
@@ -99,10 +105,10 @@ export function resolveSkillPrompt(name, projectDir, sources) {
99
105
  return { prompt, skillName: name, isBound: false, source: 'user' };
100
106
  }
101
107
  }
102
- // 4. SDK platform skills
103
- const sdkSkill = platformSkills.find((s) => s.name === name);
104
- if (sdkSkill) {
105
- return { prompt: sdkSkill.prompt, skillName: name, isBound: false, source: 'sdk' };
108
+ // 4. SDK platform macros
109
+ const sdkMacro = platformMacros.find((s) => s.name === name);
110
+ if (sdkMacro) {
111
+ return { prompt: sdkMacro.prompt, skillName: name, isBound: false, source: 'sdk' };
106
112
  }
107
113
  // 5. Additional sources
108
114
  if (sources?.factorySkills) {
@@ -178,7 +184,7 @@ export function getAllAvailableSkills(projectDir, sources) {
178
184
  }
179
185
  }
180
186
  // 2. SDK platform skills
181
- for (const skill of platformSkills) {
187
+ for (const skill of platformMacros) {
182
188
  if (!seen.has(skill.name)) {
183
189
  seen.add(skill.name);
184
190
  entries.push({ name: skill.name, description: skill.description, source: 'sdk' });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Research Paper Macros
3
+ *
4
+ * outline, literature-review, draft-section, peer-review, research-scaffold
5
+ */
6
+ export declare const outlineMacro: import("@compilr-dev/agents").Skill;
7
+ export declare const literatureReviewMacro: import("@compilr-dev/agents").Skill;
8
+ export declare const draftSectionMacro: import("@compilr-dev/agents").Skill;
9
+ export declare const peerReviewMacro: import("@compilr-dev/agents").Skill;
10
+ export declare const researchScaffoldMacro: import("@compilr-dev/agents").Skill;
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Research Paper Skills
2
+ * Research Paper Macros
3
3
  *
4
4
  * outline, literature-review, draft-section, peer-review, research-scaffold
5
5
  */
6
6
  import { defineSkill } from '@compilr-dev/agents';
7
- export const outlineSkill = defineSkill({
7
+ export const outlineMacro = defineSkill({
8
8
  name: 'outline',
9
9
  description: 'Build or refine the research paper structure — define sections, formulate claims with evidence requirements, and map sources to claims. Use when starting a new paper or restructuring an existing one. Produces a ResearchModel outline stored in the project database.',
10
10
  prompt: `You are in OUTLINE MODE. Your goal is to help the user build or refine a structured outline for their research paper using the Research Model.
@@ -148,7 +148,7 @@ Create one work item per section:
148
148
  ✓ User has reviewed and approved the outline`,
149
149
  tags: ['research', 'planning', 'outline'],
150
150
  });
151
- export const literatureReviewSkill = defineSkill({
151
+ export const literatureReviewMacro = defineSkill({
152
152
  name: 'literature-review',
153
153
  description: 'Systematically analyze sources from the Knowledge Base — extract key findings, link evidence to claims in the outline, assess source quality, and identify coverage gaps. Use after the outline exists and sources have been added to the Knowledge Base.',
154
154
  prompt: `You are in LITERATURE REVIEW MODE. Your goal is to systematically analyze the sources in the Knowledge Base and connect them to the Research Model's sections and claims.
@@ -252,7 +252,7 @@ If multiple sources have been analyzed, provide a thematic synthesis:
252
252
  ✓ User has reviewed the source-claim mappings`,
253
253
  tags: ['research', 'analysis', 'sources'],
254
254
  });
255
- export const draftSectionSkill = defineSkill({
255
+ export const draftSectionMacro = defineSkill({
256
256
  name: 'draft-section',
257
257
  description: 'Draft a specific paper section using the outline structure, claims, and linked sources. Use when the outline and literature review are complete for the target section. Produces academic prose with inline citations following the selected citation style.',
258
258
  prompt: `You are in DRAFT SECTION MODE. Your goal is to write or revise a section of the research paper, guided by the Research Model's outline, claims, and linked sources.
@@ -364,7 +364,7 @@ Report to the user:
364
364
  ✓ User has reviewed the draft`,
365
365
  tags: ['research', 'writing', 'drafting'],
366
366
  });
367
- export const peerReviewSkill = defineSkill({
367
+ export const peerReviewMacro = defineSkill({
368
368
  name: 'peer-review',
369
369
  description: 'Peer review the research paper — validate argument structure, find logical gaps, check claim-evidence consistency, assess citation coverage, and verify cross-section coherence. Use before submission to identify weaknesses. Produces a structured review report with actionable issues.',
370
370
  prompt: `You are in PEER REVIEW MODE. Your goal is to critically evaluate the research paper's argument structure, identify gaps, and check consistency — like an academic peer reviewer.
@@ -513,7 +513,7 @@ For issues that affect the Research Model:
513
513
  ✓ User has received the review summary`,
514
514
  tags: ['research', 'review', 'quality'],
515
515
  });
516
- export const researchScaffoldSkill = defineSkill({
516
+ export const researchScaffoldMacro = defineSkill({
517
517
  name: 'research-scaffold',
518
518
  description: 'Scaffold a new research paper project from a template — APA journal article, IEEE conference paper, thesis/dissertation, literature review, or lab report. Use when starting a fresh research project. Creates the ResearchModel with template-appropriate sections, citation style, and document structure.',
519
519
  prompt: `You are in RESEARCH SCAFFOLD MODE. Your goal is to help the user set up a new research paper project using a template.
@@ -6,7 +6,7 @@
6
6
  * 5-layer priority (first match by name wins):
7
7
  * 1. project (<projectDir>/.compilr/skills/)
8
8
  * 2. user (~/.compilr-dev/skills/)
9
- * 3. sdk (platformSkills)
9
+ * 3. sdk (platformMacros)
10
10
  * 4. agents (builtinSkills)
11
11
  * 5. agents-coding (codingSkills)
12
12
  *
@@ -28,8 +28,14 @@ export interface SkillEligibilityContext {
28
28
  agentId?: string;
29
29
  /** Tool names this agent has access to. */
30
30
  toolNames?: ReadonlySet<string> | readonly string[];
31
- /** Explicit skill allowlist on the agent (legacy enabledSkills). */
32
- enabledSkills?: readonly string[];
31
+ /**
32
+ * Skills this agent may choose. `undefined` = no allowlist, `[]` = none.
33
+ *
34
+ * ⚠️ NAMED FOR WHAT IT HOLDS. This was called `enabledSkills` and documented "legacy", while
35
+ * every caller fed it `grantedSkills` — the exact field-name reuse that inverted the contract
36
+ * and stripped every custom agent's skills in 0.25.0, preserved in the type that caused it.
37
+ */
38
+ grantedSkills?: readonly string[];
33
39
  /** Active project category ('software', 'research', 'business', ...). */
34
40
  projectType?: string;
35
41
  }
@@ -62,11 +68,11 @@ export declare function resolveSkillsForAgent(skills: CustomSkill[], context: Sk
62
68
  * than once. Every judgement lives here: which fields of the agent matter, and what an absent
63
69
  * allowlist means.
64
70
  *
65
- * ⚠️ READS `grantedSkills`, NOT `enabledSkills`. Those are different fields for different things.
66
- * `enabledSkills` holds COMMANDS — the 13 its picker offers are `code-review`, `debug`, `design`,
67
- * `prd` and friends, all slash commands a user types — and 0.25.0 wired Skills enforcement onto
68
- * it, so ticking "Code Review" wrote a name no installed skill has and the agent silently got
69
- * zero skills.
71
+ * ⚠️ READS `grantedSkills`. There used to be a second field, `enabledSkills`, holding MACRO ids —
72
+ * the 13 its picker offered were `code-review`, `debug`, `design`, `prd` and friends, all things
73
+ * a user types — and 0.25.0 wired Skills enforcement onto it, so ticking "Code Review" wrote a
74
+ * name no installed skill has and the agent silently got zero skills. That field is deleted, and
75
+ * the reason it must never come back in another guise is the whole point of this comment.
70
76
  *
71
77
  * `grantedSkills` follows the MCP contract: `undefined` = never asked, reaches everything
72
78
  * eligible; `[]` = granted nothing. That reading is legitimate here precisely because the field
@@ -79,7 +85,7 @@ export declare function resolveSkillsForAgent(skills: CustomSkill[], context: Sk
79
85
  export declare function resolveSkillsForTeamAgent(pool: CustomSkill[], agent: {
80
86
  id: string;
81
87
  role?: string;
82
- /** Skills this agent may choose. NOT `enabledSkills`, which holds Commands. */
88
+ /** Skills this agent may choose. undefined = never asked, [] = none. */
83
89
  grantedSkills?: readonly string[];
84
90
  }, opts?: {
85
91
  projectType?: string;
@@ -6,7 +6,7 @@
6
6
  * 5-layer priority (first match by name wins):
7
7
  * 1. project (<projectDir>/.compilr/skills/)
8
8
  * 2. user (~/.compilr-dev/skills/)
9
- * 3. sdk (platformSkills)
9
+ * 3. sdk (platformMacros)
10
10
  * 4. agents (builtinSkills)
11
11
  * 5. agents-coding (codingSkills)
12
12
  *
@@ -48,12 +48,12 @@ export function resolveSkillsForAgent(skills, context) {
48
48
  const toolSet = context.toolNames instanceof Set ? context.toolNames : new Set(context.toolNames ?? []);
49
49
  /*
50
50
  ⚠️ THIS SET COMES FROM `grantedSkills`, WHICH IS NEW — so `[]` correctly means "granted
51
- nothing", the MCP contract. It does NOT come from `enabledSkills`, which holds Commands and
52
- has always documented empty as "all skills"; 0.25.0 conflated the two and every custom agent
53
- silently lost its skills. `resolveSkillsForTeamAgent` is the only caller that maps a field
54
- onto this context, which is where that distinction is kept.
51
+ nothing", the MCP contract. It must NEVER be fed `enabledSkills`, which holds MACRO ids and
52
+ has always documented empty as "all"; 0.25.0 conflated the two and every custom agent
53
+ silently lost its skills. The field is now named `grantedSkills` on both sides, so the two
54
+ cannot be mixed up by a caller that does not read this comment.
55
55
  */
56
- const allowlist = context.enabledSkills ? new Set(context.enabledSkills) : null;
56
+ const allowlist = context.grantedSkills ? new Set(context.grantedSkills) : null;
57
57
  return skills.filter((skill) => {
58
58
  if (skill.enabled === false)
59
59
  return false;
@@ -79,7 +79,7 @@ export function resolveSkillsForAgent(skills, context) {
79
79
  return false;
80
80
  }
81
81
  }
82
- // Stage 1.4 — Agent's explicit enabledSkills allowlist (legacy mechanism).
82
+ // Stage 1.4 — the agent's explicit grant.
83
83
  if (allowlist && !allowlist.has(skill.name))
84
84
  return false;
85
85
  return true;
@@ -94,11 +94,11 @@ export function resolveSkillsForAgent(skills, context) {
94
94
  * than once. Every judgement lives here: which fields of the agent matter, and what an absent
95
95
  * allowlist means.
96
96
  *
97
- * ⚠️ READS `grantedSkills`, NOT `enabledSkills`. Those are different fields for different things.
98
- * `enabledSkills` holds COMMANDS — the 13 its picker offers are `code-review`, `debug`, `design`,
99
- * `prd` and friends, all slash commands a user types — and 0.25.0 wired Skills enforcement onto
100
- * it, so ticking "Code Review" wrote a name no installed skill has and the agent silently got
101
- * zero skills.
97
+ * ⚠️ READS `grantedSkills`. There used to be a second field, `enabledSkills`, holding MACRO ids —
98
+ * the 13 its picker offered were `code-review`, `debug`, `design`, `prd` and friends, all things
99
+ * a user types — and 0.25.0 wired Skills enforcement onto it, so ticking "Code Review" wrote a
100
+ * name no installed skill has and the agent silently got zero skills. That field is deleted, and
101
+ * the reason it must never come back in another guise is the whole point of this comment.
102
102
  *
103
103
  * `grantedSkills` follows the MCP contract: `undefined` = never asked, reaches everything
104
104
  * eligible; `[]` = granted nothing. That reading is legitimate here precisely because the field
@@ -112,7 +112,7 @@ export function resolveSkillsForTeamAgent(pool, agent, opts = {}) {
112
112
  return resolveSkillsForAgent(pool, {
113
113
  role: agent.role,
114
114
  agentId: agent.id,
115
- enabledSkills: agent.grantedSkills,
115
+ grantedSkills: agent.grantedSkills,
116
116
  projectType: opts.projectType,
117
117
  toolNames: opts.toolNames,
118
118
  });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Software Development Macros
3
+ *
4
+ * design, sketch, prd, refine, refine-item, architecture, session-notes, build, scaffold
5
+ */
6
+ export declare const designMacro: import("@compilr-dev/agents").Skill;
7
+ export declare const refineMacro: import("@compilr-dev/agents").Skill;
8
+ export declare const sketchMacro: import("@compilr-dev/agents").Skill;
9
+ export declare const refineItemMacro: import("@compilr-dev/agents").Skill;
10
+ export declare const architectureMacro: import("@compilr-dev/agents").Skill;
11
+ export declare const prdMacro: import("@compilr-dev/agents").Skill;
12
+ export declare const sessionNotesMacro: import("@compilr-dev/agents").Skill;
13
+ export declare const buildMacro: import("@compilr-dev/agents").Skill;
14
+ export declare const scaffoldMacro: import("@compilr-dev/agents").Skill;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Software Development Skills
2
+ * Software Development Macros
3
3
  *
4
4
  * design, sketch, prd, refine, refine-item, architecture, session-notes, build, scaffold
5
5
  */
@@ -7,7 +7,7 @@ import { defineSkill } from '@compilr-dev/agents';
7
7
  // =============================================================================
8
8
  // From @compilr-dev/agents (7 skills)
9
9
  // =============================================================================
10
- export const designSkill = defineSkill({
10
+ export const designMacro = defineSkill({
11
11
  name: 'design',
12
12
  description: 'Interactive requirements gathering session that produces 5-15 actionable backlog items. Use when starting a new project from scratch or when the user has an idea but no clear requirements. Asks structured questions about goals, users, features, and constraints.',
13
13
  prompt: `You are in DESIGN MODE. Your goal is to gather enough information to populate the project backlog with 5-15 actionable items.
@@ -18,9 +18,9 @@ export const designSkill = defineSkill({
18
18
  - Need to create initial backlog
19
19
 
20
20
  ## When NOT to Use
21
- - Project already has requirements → use refine skill
22
- - Quick project outline needed → use sketch skill
23
- - Just need to update PRD → use prd skill
21
+ - Project already has requirements → tell the user to run /refine
22
+ - Quick project outline needed → tell the user to run /sketch
23
+ - Just need to update PRD → tell the user to run /prd
24
24
 
25
25
  ## PHASES
26
26
 
@@ -92,7 +92,7 @@ When you have enough information:
92
92
  ✓ User has approved the backlog`,
93
93
  tags: ['planning', 'requirements'],
94
94
  });
95
- export const refineSkill = defineSkill({
95
+ export const refineMacro = defineSkill({
96
96
  name: 'refine',
97
97
  description: 'Iteratively refine and expand existing project requirements. Use when the project already has an initial design or backlog but needs deeper detail, edge cases, or new features explored. Walks through each area asking targeted follow-up questions.',
98
98
  prompt: `You are in REFINE MODE. Your goal is to deepen and expand existing requirements based on user feedback.
@@ -104,9 +104,9 @@ export const refineSkill = defineSkill({
104
104
  - Adding missing items to backlog
105
105
 
106
106
  ## When NOT to Use
107
- - No backlog exists yet → use design skill
108
- - Quick outline needed → use sketch skill
109
- - Refining single item → use refine-item skill
107
+ - No backlog exists yet → tell the user to run /design
108
+ - Quick outline needed → tell the user to run /sketch
109
+ - Refining single item → tell the user to run /refine-item
110
110
 
111
111
  ## STARTUP
112
112
 
@@ -171,7 +171,7 @@ For complex features:
171
171
  ✓ No open questions remain`,
172
172
  tags: ['planning', 'requirements'],
173
173
  });
174
- export const sketchSkill = defineSkill({
174
+ export const sketchMacro = defineSkill({
175
175
  name: 'sketch',
176
176
  description: 'Quick lightweight project outline using a few simple questions. Use for rapid brainstorming or when the user wants a fast first pass before committing to a full design session. Produces a high-level summary, not detailed backlog items.',
177
177
  prompt: `You are in SKETCH MODE. Ask 6 quick questions, then create backlog items.
@@ -182,9 +182,9 @@ export const sketchSkill = defineSkill({
182
182
  - Initial brainstorming session
183
183
 
184
184
  ## When NOT to Use
185
- - Detailed requirements needed → use design skill
186
- - Project already has backlog → use refine skill
187
- - Single item focus → use refine-item skill
185
+ - Detailed requirements needed → tell the user to run /design
186
+ - Project already has backlog → tell the user to run /refine
187
+ - Single item focus → tell the user to run /refine-item
188
188
 
189
189
  STEPS:
190
190
  1. Use todo_write with 6 tasks (one per question)
@@ -210,7 +210,7 @@ RULES:
210
210
  - For fresh projects, ALWAYS add CHORE-001 scaffolding as first item`,
211
211
  tags: ['planning', 'requirements'],
212
212
  });
213
- export const refineItemSkill = defineSkill({
213
+ export const refineItemMacro = defineSkill({
214
214
  name: 'refine-item',
215
215
  description: 'Deep-dive refinement of a single backlog work item. Use when an item needs more detail — acceptance criteria, implementation notes, subtask breakdown, or dependency analysis. Reads the item from the database and produces an updated version.',
216
216
  prompt: `You are in FOCUSED REFINE MODE. Your goal is to refine a specific backlog item.
@@ -221,9 +221,9 @@ export const refineItemSkill = defineSkill({
221
221
  - Changing priority of specific item
222
222
 
223
223
  ## When NOT to Use
224
- - Multiple items need refinement → use refine skill
225
- - No items exist yet → use design or sketch skill
226
- - Ready to implement → use build skill
224
+ - Multiple items need refinement → tell the user to run /refine
225
+ - No items exist yet → tell the user to run /design or /sketch
226
+ - Ready to implement → tell the user to run /build
227
227
 
228
228
  ## STARTUP
229
229
 
@@ -278,7 +278,7 @@ Based on user's choice:
278
278
  ✓ Changes are summarized`,
279
279
  tags: ['planning', 'requirements'],
280
280
  });
281
- export const architectureSkill = defineSkill({
281
+ export const architectureMacro = defineSkill({
282
282
  name: 'architecture',
283
283
  description: 'Create or update architecture documentation including ADRs, system diagrams, data models, and API designs. Use after requirements are defined. Reads the current backlog and project documents to produce architecture artifacts stored as project documents.',
284
284
  prompt: `You are in ARCHITECTURE MODE. Your goal is to create architecture documentation.
@@ -290,9 +290,9 @@ export const architectureSkill = defineSkill({
290
290
  - Recording technical decisions
291
291
 
292
292
  ## When NOT to Use
293
- - Need product requirements → use design or prd skill
294
- - Need to implement features → use build skill
295
- - Just want to understand existing code → use explain skill
293
+ - Need product requirements → tell the user to run /design or /prd
294
+ - Need to implement features → tell the user to run /build
295
+ - Just want to understand existing code → tell the user to run /explain
296
296
 
297
297
  ## DOCUMENT TYPE: {{doc_type}}
298
298
  {{#if custom_topic}}Custom Topic: {{custom_topic}}{{/if}}
@@ -423,7 +423,7 @@ Generate appropriate documentation.
423
423
  ✓ User has reviewed the output`,
424
424
  tags: ['architecture', 'documentation'],
425
425
  });
426
- export const prdSkill = defineSkill({
426
+ export const prdMacro = defineSkill({
427
427
  name: 'prd',
428
428
  description: 'Create, amend, or enhance the Product Requirements Document. Use when formalizing requirements into a structured PRD with sections for overview, user personas, functional requirements, non-functional requirements, and success metrics. Stored as a project document.',
429
429
  prompt: `You are in PRD MODE. Your goal is to update or enhance the existing Product Requirements Document.
@@ -434,9 +434,9 @@ export const prdSkill = defineSkill({
434
434
  - Refining vision or scope
435
435
 
436
436
  ## When NOT to Use
437
- - No PRD exists yet → use design skill first
438
- - Need architecture docs → use architecture skill
439
- - Need session summary → use session-notes skill
437
+ - No PRD exists yet → tell the user to run /design first
438
+ - Need architecture docs → tell the user to run /architecture
439
+ - Need session summary → tell the user to run /session-notes
440
440
 
441
441
  ## STARTUP
442
442
 
@@ -508,7 +508,7 @@ Based on section selected:
508
508
  ✓ Related backlog updates are suggested if needed`,
509
509
  tags: ['planning', 'requirements'],
510
510
  });
511
- export const sessionNotesSkill = defineSkill({
511
+ export const sessionNotesMacro = defineSkill({
512
512
  name: 'session-notes',
513
513
  description: 'Create structured session notes capturing work done, decisions made, and open questions. Use at the end of a work session to document progress. Reviews conversation history and produces a formatted summary stored as a project document.',
514
514
  prompt: `You are in SESSION NOTES MODE. Your goal is to create a structured summary of the current session.
@@ -519,8 +519,8 @@ export const sessionNotesSkill = defineSkill({
519
519
  - Need to capture decisions for future reference
520
520
 
521
521
  ## When NOT to Use
522
- - Need product requirements → use prd skill
523
- - Need architecture docs → use architecture skill
522
+ - Need product requirements → tell the user to run /prd
523
+ - Need architecture docs → tell the user to run /architecture
524
524
  - In the middle of active work
525
525
 
526
526
  ## STARTUP
@@ -602,7 +602,7 @@ CRITICAL: session notes are database documents. NEVER write a .md file (no write
602
602
  ✓ User has reviewed the note`,
603
603
  tags: ['documentation', 'session'],
604
604
  });
605
- export const buildSkill = defineSkill({
605
+ export const buildMacro = defineSkill({
606
606
  name: 'build',
607
607
  description: 'Implement a backlog work item end-to-end — read requirements, write code, run tests, and update the item status. Use when an item is ready to build. Follows a structured workflow: understand → plan → implement → verify → mark complete.',
608
608
  tags: ['implementation', 'coding'],
@@ -614,10 +614,10 @@ export const buildSkill = defineSkill({
614
614
  - Ready to write code for a feature
615
615
 
616
616
  ## When NOT to Use
617
- - Item is too vague → use refine-item skill first
618
- - No backlog exists → use design or sketch skill
619
- - Just exploring code → use code-navigation skill
620
- - Need to fix a bug → use debug skill
617
+ - Item is too vague → tell the user to run /refine-item first
618
+ - No backlog exists → tell the user to run /design or /sketch
619
+ - Just exploring code → tell the user to run /code-navigation
620
+ - Need to fix a bug → tell the user to run /debug
621
621
 
622
622
  ## CRITICAL: PROJECT DIRECTORY
623
623
 
@@ -699,7 +699,7 @@ Before implementing, read these files for context:
699
699
  - Always run tests before marking complete`,
700
700
  version: '1.0.0',
701
701
  });
702
- export const scaffoldSkill = defineSkill({
702
+ export const scaffoldMacro = defineSkill({
703
703
  name: 'scaffold',
704
704
  description: 'Generate a complete project scaffold from the Application Model or tech stack selection. Use after the design phase to create the initial codebase — directory structure, configuration, boilerplate, and starter components. Supports multiple toolkits (React+Node, Next+Prisma, FastAPI, Go, static landing).',
705
705
  tags: ['setup', 'foundation', 'scaffolding'],
@@ -711,9 +711,9 @@ export const scaffoldSkill = defineSkill({
711
711
  - Need basic project structure
712
712
 
713
713
  ## When NOT to Use
714
- - Project already has structure → use build skill
715
- - Need requirements first → use design skill
716
- - Modifying existing project → use appropriate skill
714
+ - Project already has structure → tell the user to run /build
715
+ - Need requirements first → tell the user to run /design
716
+ - Modifying existing project → tell the user to run /appropriate
717
717
 
718
718
  ## FACTORY CHECK (TRY THIS FIRST)
719
719
 
@@ -86,5 +86,5 @@ export interface CustomSkill {
86
86
  * A second copy of a list is a list that will disagree with the first. Deriving it costs one
87
87
  * import and cannot go stale.
88
88
  */
89
- export declare const RESERVED_SKILL_NAMES: readonly string[];
90
- export declare function isReservedSkillName(name: string): boolean;
89
+ export declare const RESERVED_MACRO_NAMES: readonly string[];
90
+ export declare function isReservedMacroName(name: string): boolean;
@@ -9,7 +9,7 @@
9
9
  * extensions live under the optional `compilr:` block, which
10
10
  * Anthropic-compatible runtimes ignore.
11
11
  */
12
- import { platformSkills } from './platform-skills.js';
12
+ import { platformMacros } from './platform-macros.js';
13
13
  /**
14
14
  * SDK skill names that are reserved — user/project skills cannot use these.
15
15
  *
@@ -27,7 +27,7 @@ import { platformSkills } from './platform-skills.js';
27
27
  * A second copy of a list is a list that will disagree with the first. Deriving it costs one
28
28
  * import and cannot go stale.
29
29
  */
30
- export const RESERVED_SKILL_NAMES = platformSkills.map((s) => s.name);
31
- export function isReservedSkillName(name) {
32
- return RESERVED_SKILL_NAMES.includes(name);
30
+ export const RESERVED_MACRO_NAMES = platformMacros.map((s) => s.name);
31
+ export function isReservedMacroName(name) {
32
+ return RESERVED_MACRO_NAMES.includes(name);
33
33
  }
@@ -21,7 +21,6 @@ export interface AgentTemplate {
21
21
  personality?: string;
22
22
  systemPromptAddition?: string;
23
23
  toolProfile?: string;
24
- enabledSkills?: string[];
25
24
  modelTier?: string;
26
25
  }
27
26
  /** List all saved templates */
@@ -60,7 +60,6 @@ export function saveTemplate(name, agent, description) {
60
60
  personality: agent.personality,
61
61
  systemPromptAddition: agent.systemPromptAddition,
62
62
  toolProfile: agent.toolConfig?.profile,
63
- enabledSkills: agent.enabledSkills,
64
63
  modelTier: agent.modelTier,
65
64
  };
66
65
  templates.push(template);
@@ -101,7 +100,6 @@ export function createAgentFromTemplate(template, agentId, existingAgents) {
101
100
  mascot: assignMascot(existingAgents),
102
101
  createdAt: new Date().toISOString(),
103
102
  toolConfig: template.toolProfile ? { profile: template.toolProfile } : undefined,
104
- enabledSkills: template.enabledSkills,
105
103
  modelTier: template.modelTier,
106
104
  };
107
105
  }
@@ -17,7 +17,6 @@ export interface CustomAgentDefinition {
17
17
  mascot: string;
18
18
  createdAt: string;
19
19
  toolConfig?: ToolConfig;
20
- enabledSkills?: string[];
21
20
  modelTier?: ModelTier;
22
21
  /** Custom instructions appended to the agent's system prompt (max 2000 chars) */
23
22
  systemPromptAddition?: string;
@@ -97,4 +96,4 @@ export declare function isAgentIdTaken(id: string, existingCustomAgents: CustomA
97
96
  /**
98
97
  * Create a new CustomAgentDefinition with auto-assigned mascot.
99
98
  */
100
- export declare function createCustomAgentDefinition(id: string, displayName: string, specialty: string, personality: string | undefined, existingAgents: CustomAgentDefinition[], toolConfig?: ToolConfig, enabledSkills?: string[], modelTier?: ModelTier, systemPromptAddition?: string): CustomAgentDefinition;
99
+ export declare function createCustomAgentDefinition(id: string, displayName: string, specialty: string, personality: string | undefined, existingAgents: CustomAgentDefinition[], toolConfig?: ToolConfig, modelTier?: ModelTier, systemPromptAddition?: string): CustomAgentDefinition;
@@ -191,7 +191,7 @@ export function isAgentIdTaken(id, existingCustomAgents, teamAgentIds, predefine
191
191
  /**
192
192
  * Create a new CustomAgentDefinition with auto-assigned mascot.
193
193
  */
194
- export function createCustomAgentDefinition(id, displayName, specialty, personality, existingAgents, toolConfig, enabledSkills, modelTier, systemPromptAddition) {
194
+ export function createCustomAgentDefinition(id, displayName, specialty, personality, existingAgents, toolConfig, modelTier, systemPromptAddition) {
195
195
  return {
196
196
  id,
197
197
  displayName,
@@ -200,7 +200,6 @@ export function createCustomAgentDefinition(id, displayName, specialty, personal
200
200
  mascot: assignMascot(existingAgents),
201
201
  createdAt: new Date().toISOString(),
202
202
  toolConfig: toolConfig ?? createDefaultToolConfig(),
203
- enabledSkills: enabledSkills ?? [], // Empty = all skills
204
203
  modelTier: modelTier ?? 'balanced', // Default tier
205
204
  systemPromptAddition: systemPromptAddition?.trim() || undefined,
206
205
  };
@@ -26,7 +26,7 @@ export type { AgentTemplate } from './agent-templates.js';
26
26
  export { listTemplates, getTemplate, saveTemplate, updateTemplate, deleteTemplate, createAgentFromTemplate, } from './agent-templates.js';
27
27
  export type { PlanSubmitInfo, PlanSubmitResult, PlanModeExitInfo, PlanModeCallbacks, } from './plan-mode.js';
28
28
  export { PLAN_MODE_BLOCKED_TOOLS, PLAN_MODE_DENIAL_MESSAGE, PLAN_MODE_PROMPT, isToolAllowedInPlanMode, getPlanModePrompt, } from './plan-mode.js';
29
- export type { AgentWorkshopData, WorkshopRoleDef, WorkshopToolProfile, WorkshopModelTier, WorkshopSkillDef, } from './workshop-data.js';
29
+ export type { AgentWorkshopData, WorkshopRoleDef, WorkshopToolProfile, WorkshopModelTier, WorkshopMacroDef, } from './workshop-data.js';
30
30
  export { buildAgentWorkshopData, buildSuggestedRolesMap } from './workshop-data.js';
31
31
  export type { ITeamPersistence, IArtifactStorage, ISessionRegistry } from './interfaces.js';
32
32
  export type { ParsedMention, ParsedInput } from './mention-parser.js';
@@ -39,8 +39,8 @@ export { wouldCreateLoop, recordAssignment, getAssignmentHistory, clearAssignmen
39
39
  export { DelegationTracker } from './delegation-tracker.js';
40
40
  export type { Delegation, DelegationStatus, DelegationResult, CompletionEvent, CreateDelegationOptions, DelegationStats, DelegationTrackerEvents, } from './delegation-tracker.js';
41
41
  export { setActiveSharedContext, getActiveSharedContext, recordTeamActivity } from './activity.js';
42
- export type { SkillToolRequirement } from './skill-requirements.js';
43
- export { SKILL_REQUIREMENTS, getDefinedSkillNames, getSkillRequirements, checkSkillCompatibility, getCompatibleSkills, getAllRequiredTools, getSkillsByCategory, } from './skill-requirements.js';
42
+ export type { MacroToolRequirement } from './macro-requirements.js';
43
+ export { MACRO_REQUIREMENTS, getDefinedMacroNames, getMacroRequirements, checkMacroCompatibility, getCompatibleMacros, getAllRequiredTools, getMacrosByCategory, } from './macro-requirements.js';
44
44
  export { resolveAgentIdCollision } from './collision-utils.js';
45
45
  export { createDelegationStatusTool, createHandoffTool, createDelegateTool, createDelegateBackgroundTool, } from './delegation-tools.js';
46
46
  export type { HandoffResult, HandoffToolConfig, DelegateResult, DelegateToolConfig, DelegateBackgroundResult, DelegateBackgroundToolConfig, } from './delegation-tools.js';
@@ -30,7 +30,7 @@ export { wouldCreateLoop, recordAssignment, getAssignmentHistory, clearAssignmen
30
30
  export { DelegationTracker } from './delegation-tracker.js';
31
31
  // Activity recording
32
32
  export { setActiveSharedContext, getActiveSharedContext, recordTeamActivity } from './activity.js';
33
- export { SKILL_REQUIREMENTS, getDefinedSkillNames, getSkillRequirements, checkSkillCompatibility, getCompatibleSkills, getAllRequiredTools, getSkillsByCategory, } from './skill-requirements.js';
33
+ export { MACRO_REQUIREMENTS, getDefinedMacroNames, getMacroRequirements, checkMacroCompatibility, getCompatibleMacros, getAllRequiredTools, getMacrosByCategory, } from './macro-requirements.js';
34
34
  // Collision utils
35
35
  export { resolveAgentIdCollision } from './collision-utils.js';
36
36
  // Delegation & Handoff tools (factory functions)