@compilr-dev/sdk 0.6.0 → 0.6.2

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.
@@ -7,23 +7,85 @@
7
7
  /** All known action metadata, keyed by action/skill ID */
8
8
  export const ACTION_META_REGISTRY = {
9
9
  // ── Software project actions ─────────────────────────────────────────────
10
- 'design': { id: 'design', label: 'Design', icon: 'Wand2', description: 'Design the app' },
11
- 'prd': { id: 'prd', label: 'PRD', icon: 'FileText', description: 'Write requirements' },
12
- 'architecture': { id: 'architecture', label: 'Architecture', icon: 'Network', description: 'System architecture' },
13
- 'refine': { id: 'refine', label: 'Refine', icon: 'RefreshCw', description: 'Refine backlog' },
14
- 'scaffold': { id: 'scaffold', label: 'Scaffold', icon: 'Layers', description: 'Generate code' },
15
- 'session-notes': { id: 'session-notes', label: 'Notes', icon: 'StickyNote', description: 'Session summary' },
10
+ design: { id: 'design', label: 'Design', icon: 'Wand2', description: 'Design the app' },
11
+ prd: { id: 'prd', label: 'PRD', icon: 'FileText', description: 'Write requirements' },
12
+ architecture: {
13
+ id: 'architecture',
14
+ label: 'Architecture',
15
+ icon: 'Network',
16
+ description: 'System architecture',
17
+ },
18
+ refine: { id: 'refine', label: 'Refine', icon: 'RefreshCw', description: 'Refine backlog' },
19
+ scaffold: { id: 'scaffold', label: 'Scaffold', icon: 'Layers', description: 'Generate code' },
20
+ 'session-notes': {
21
+ id: 'session-notes',
22
+ label: 'Notes',
23
+ icon: 'StickyNote',
24
+ description: 'Session summary',
25
+ },
16
26
  // ── Research project actions ─────────────────────────────────────────────
17
- 'research-scaffold': { id: 'research-scaffold', label: 'New Paper', icon: 'Layers', description: 'Set up from a template' },
18
- 'outline': { id: 'outline', label: 'Outline', icon: 'BookOpen', description: 'Build paper outline' },
19
- 'literature-review': { id: 'literature-review', label: 'Lit Review', icon: 'Search', description: 'Analyze sources' },
20
- 'draft-section': { id: 'draft-section', label: 'Draft', icon: 'PenTool', description: 'Write a section' },
21
- 'peer-review': { id: 'peer-review', label: 'Review', icon: 'ShieldCheck', description: 'Review the paper' },
27
+ 'research-scaffold': {
28
+ id: 'research-scaffold',
29
+ label: 'New Paper',
30
+ icon: 'Layers',
31
+ description: 'Set up from a template',
32
+ },
33
+ outline: {
34
+ id: 'outline',
35
+ label: 'Outline',
36
+ icon: 'BookOpen',
37
+ description: 'Build paper outline',
38
+ },
39
+ 'literature-review': {
40
+ id: 'literature-review',
41
+ label: 'Lit Review',
42
+ icon: 'Search',
43
+ description: 'Analyze sources',
44
+ },
45
+ 'draft-section': {
46
+ id: 'draft-section',
47
+ label: 'Draft',
48
+ icon: 'PenTool',
49
+ description: 'Write a section',
50
+ },
51
+ 'peer-review': {
52
+ id: 'peer-review',
53
+ label: 'Review',
54
+ icon: 'ShieldCheck',
55
+ description: 'Review the paper',
56
+ },
22
57
  // ── Work item actions ────────────────────────────────────────────────────
23
- 'build': { id: 'build', label: 'Build', icon: 'Hammer', description: 'Implement this item', category: 'development', suggestedRole: 'developer' },
24
- 'refine-item': { id: 'refine-item', label: 'Refine', icon: 'RefreshCw', description: 'Add detail to this item', category: 'planning', suggestedRole: 'pm' },
25
- 'code-review': { id: 'code-review', label: 'Review', icon: 'Search', description: 'Review code for this item', category: 'development', suggestedRole: 'qa' },
26
- 'explain': { id: 'explain', label: 'Explain', icon: 'BookOpen', description: 'Explain this item', category: 'documentation' },
58
+ build: {
59
+ id: 'build',
60
+ label: 'Build',
61
+ icon: 'Hammer',
62
+ description: 'Implement this item',
63
+ category: 'development',
64
+ suggestedRole: 'developer',
65
+ },
66
+ 'refine-item': {
67
+ id: 'refine-item',
68
+ label: 'Refine',
69
+ icon: 'RefreshCw',
70
+ description: 'Add detail to this item',
71
+ category: 'planning',
72
+ suggestedRole: 'pm',
73
+ },
74
+ 'code-review': {
75
+ id: 'code-review',
76
+ label: 'Review',
77
+ icon: 'Search',
78
+ description: 'Review code for this item',
79
+ category: 'development',
80
+ suggestedRole: 'qa',
81
+ },
82
+ explain: {
83
+ id: 'explain',
84
+ label: 'Explain',
85
+ icon: 'BookOpen',
86
+ description: 'Explain this item',
87
+ category: 'documentation',
88
+ },
27
89
  };
28
90
  /**
29
91
  * Resolve action IDs to ActionMeta objects.
@@ -142,7 +142,11 @@ export const researchConfig = {
142
142
  { role: 'editor', label: 'Editor', description: 'Style, clarity, grammar, consistency' },
143
143
  ],
144
144
  documentTemplates: [
145
- { type: 'research-model', label: 'Research Model', description: 'Paper structure, claims, and sources' },
145
+ {
146
+ type: 'research-model',
147
+ label: 'Research Model',
148
+ description: 'Paper structure, claims, and sources',
149
+ },
146
150
  { type: 'outline', label: 'Outline', description: 'Paper structure and sections' },
147
151
  {
148
152
  type: 'literature-review',
@@ -154,8 +158,15 @@ export const researchConfig = {
154
158
  { type: 'bibliography', label: 'Bibliography', description: 'References and citations' },
155
159
  { type: 'session-notes', label: 'Session Notes', description: 'Summary of work done' },
156
160
  ],
157
- projectActions: ['research-scaffold', 'outline', 'literature-review', 'draft-section', 'peer-review', 'session-notes'],
158
- workItemActions: ['draft-section', 'explain'],
161
+ projectActions: [
162
+ 'research-scaffold',
163
+ 'outline',
164
+ 'literature-review',
165
+ 'draft-section',
166
+ 'peer-review',
167
+ 'session-notes',
168
+ ],
169
+ workItemActions: ['draft-section', 'refine-item', 'explain'],
159
170
  workItemLabels: {
160
171
  feature: { short: 'SC', full: 'Section' },
161
172
  bug: { short: 'RV', full: 'Revision' },
@@ -5,7 +5,7 @@
5
5
  * document templates, and skills. The underlying platform is the same
6
6
  * for all types.
7
7
  */
8
- export type { ProjectTypeConfig, ProjectPhase, SuggestedAgent, DocumentTemplate, ActionMeta, SkillMeta } from './types.js';
8
+ export type { ProjectTypeConfig, ProjectPhase, SuggestedAgent, DocumentTemplate, ActionMeta, SkillMeta, } from './types.js';
9
9
  export { generalConfig, softwareConfig, researchConfig, businessPlanConfig, contentConfig, techDocsConfig, courseConfig, } from './configs.js';
10
10
  export { SKILL_META_REGISTRY, getSkillMeta, getAllSkillMeta } from './skill-meta.js';
11
11
  export { ACTION_META_REGISTRY, resolveActionMeta } from './action-meta.js';
@@ -22,9 +22,17 @@ export const PROJECT_TYPES = [
22
22
  techDocsConfig,
23
23
  courseConfig,
24
24
  ];
25
+ /** Type aliases — legacy or alternative IDs that map to a canonical config */
26
+ const TYPE_ALIASES = {
27
+ 'generated': 'web', // Legacy: factory-scaffolded projects before type selection
28
+ 'cli': 'web',
29
+ 'api': 'web',
30
+ 'library': 'web',
31
+ };
25
32
  /** Get a project type config by ID. Falls back to general. */
26
33
  export function getProjectTypeConfig(typeId) {
27
- return PROJECT_TYPES.find((t) => t.id === typeId) ?? generalConfig;
34
+ const resolved = TYPE_ALIASES[typeId] ?? typeId;
35
+ return PROJECT_TYPES.find((t) => t.id === resolved) ?? generalConfig;
28
36
  }
29
37
  /** Get project types grouped by category. */
30
38
  export function getProjectTypesByCategory() {
@@ -7,28 +7,148 @@
7
7
  /** All skill UI metadata — platform skills + builtin skills */
8
8
  export const SKILL_META_REGISTRY = {
9
9
  // ── Platform Skills (SDK) ────────────────────────────────────────────────
10
- 'design': { id: 'design', label: 'Design App', description: 'Guide through project design', icon: 'Wand2', category: 'design' },
11
- 'sketch': { id: 'sketch', label: 'Quick Sketch', description: 'Quick project outline', icon: 'Pencil', category: 'design' },
12
- 'prd': { id: 'prd', label: 'Write PRD', description: 'Product requirements document', icon: 'FileText', category: 'planning' },
13
- 'refine': { id: 'refine', label: 'Refine Backlog', description: 'Expand and refine requirements', icon: 'RefreshCw', category: 'planning' },
14
- 'refine-item': { id: 'refine-item', label: 'Refine Item', description: 'Add detail to a work item', icon: 'RefreshCw', category: 'planning' },
15
- 'architecture': { id: 'architecture', label: 'Architecture', description: 'System architecture design', icon: 'Network', category: 'design' },
16
- 'session-notes': { id: 'session-notes', label: 'Session Notes', description: 'Summarize work done', icon: 'StickyNote', category: 'documentation' },
17
- 'build': { id: 'build', label: 'Build', description: 'Implement a feature', icon: 'Hammer', category: 'development' },
18
- 'scaffold': { id: 'scaffold', label: 'Scaffold', description: 'Generate project code', icon: 'Layers', category: 'development' },
10
+ design: {
11
+ id: 'design',
12
+ label: 'Design App',
13
+ description: 'Guide through project design',
14
+ icon: 'Wand2',
15
+ category: 'design',
16
+ },
17
+ sketch: {
18
+ id: 'sketch',
19
+ label: 'Quick Sketch',
20
+ description: 'Quick project outline',
21
+ icon: 'Pencil',
22
+ category: 'design',
23
+ },
24
+ prd: {
25
+ id: 'prd',
26
+ label: 'Write PRD',
27
+ description: 'Product requirements document',
28
+ icon: 'FileText',
29
+ category: 'planning',
30
+ },
31
+ refine: {
32
+ id: 'refine',
33
+ label: 'Refine Backlog',
34
+ description: 'Expand and refine requirements',
35
+ icon: 'RefreshCw',
36
+ category: 'planning',
37
+ },
38
+ 'refine-item': {
39
+ id: 'refine-item',
40
+ label: 'Refine Item',
41
+ description: 'Add detail to a work item',
42
+ icon: 'RefreshCw',
43
+ category: 'planning',
44
+ },
45
+ architecture: {
46
+ id: 'architecture',
47
+ label: 'Architecture',
48
+ description: 'System architecture design',
49
+ icon: 'Network',
50
+ category: 'design',
51
+ },
52
+ 'session-notes': {
53
+ id: 'session-notes',
54
+ label: 'Session Notes',
55
+ description: 'Summarize work done',
56
+ icon: 'StickyNote',
57
+ category: 'documentation',
58
+ },
59
+ build: {
60
+ id: 'build',
61
+ label: 'Build',
62
+ description: 'Implement a feature',
63
+ icon: 'Hammer',
64
+ category: 'development',
65
+ },
66
+ scaffold: {
67
+ id: 'scaffold',
68
+ label: 'Scaffold',
69
+ description: 'Generate project code',
70
+ icon: 'Layers',
71
+ category: 'development',
72
+ },
19
73
  // ── Research Skills ──────────────────────────────────────────────────────
20
- 'outline': { id: 'outline', label: 'Paper Outline', description: 'Build paper structure', icon: 'BookOpen', category: 'research' },
21
- 'literature-review': { id: 'literature-review', label: 'Lit Review', description: 'Analyze sources', icon: 'Search', category: 'research' },
22
- 'draft-section': { id: 'draft-section', label: 'Draft Section', description: 'Write a paper section', icon: 'PenTool', category: 'research' },
23
- 'peer-review': { id: 'peer-review', label: 'Peer Review', description: 'Validate argument structure', icon: 'ShieldCheck', category: 'research' },
24
- 'research-scaffold': { id: 'research-scaffold', label: 'New Paper', description: 'Set up from a template', icon: 'Layers', category: 'research' },
74
+ outline: {
75
+ id: 'outline',
76
+ label: 'Paper Outline',
77
+ description: 'Build paper structure',
78
+ icon: 'BookOpen',
79
+ category: 'research',
80
+ },
81
+ 'literature-review': {
82
+ id: 'literature-review',
83
+ label: 'Lit Review',
84
+ description: 'Analyze sources',
85
+ icon: 'Search',
86
+ category: 'research',
87
+ },
88
+ 'draft-section': {
89
+ id: 'draft-section',
90
+ label: 'Draft Section',
91
+ description: 'Write a paper section',
92
+ icon: 'PenTool',
93
+ category: 'research',
94
+ },
95
+ 'peer-review': {
96
+ id: 'peer-review',
97
+ label: 'Peer Review',
98
+ description: 'Validate argument structure',
99
+ icon: 'ShieldCheck',
100
+ category: 'research',
101
+ },
102
+ 'research-scaffold': {
103
+ id: 'research-scaffold',
104
+ label: 'New Paper',
105
+ description: 'Set up from a template',
106
+ icon: 'Layers',
107
+ category: 'research',
108
+ },
25
109
  // ── Builtin Skills (agents library) ──────────────────────────────────────
26
- 'code-review': { id: 'code-review', label: 'Code Review', description: 'Review code quality', icon: 'Search', category: 'development' },
27
- 'debug': { id: 'debug', label: 'Debug', description: 'Find and fix bugs', icon: 'Bug', category: 'development' },
28
- 'explain': { id: 'explain', label: 'Explain', description: 'Explain code or concept', icon: 'BookOpen', category: 'documentation' },
29
- 'refactor': { id: 'refactor', label: 'Refactor', description: 'Improve code structure', icon: 'Scissors', category: 'development' },
30
- 'security-review': { id: 'security-review', label: 'Security Review', description: 'Check for vulnerabilities', icon: 'Shield', category: 'analysis' },
31
- 'planning': { id: 'planning', label: 'Planning', description: 'Plan implementation approach', icon: 'ListTodo', category: 'planning' },
110
+ 'code-review': {
111
+ id: 'code-review',
112
+ label: 'Code Review',
113
+ description: 'Review code quality',
114
+ icon: 'Search',
115
+ category: 'development',
116
+ },
117
+ debug: {
118
+ id: 'debug',
119
+ label: 'Debug',
120
+ description: 'Find and fix bugs',
121
+ icon: 'Bug',
122
+ category: 'development',
123
+ },
124
+ explain: {
125
+ id: 'explain',
126
+ label: 'Explain',
127
+ description: 'Explain code or concept',
128
+ icon: 'BookOpen',
129
+ category: 'documentation',
130
+ },
131
+ refactor: {
132
+ id: 'refactor',
133
+ label: 'Refactor',
134
+ description: 'Improve code structure',
135
+ icon: 'Scissors',
136
+ category: 'development',
137
+ },
138
+ 'security-review': {
139
+ id: 'security-review',
140
+ label: 'Security Review',
141
+ description: 'Check for vulnerabilities',
142
+ icon: 'Shield',
143
+ category: 'analysis',
144
+ },
145
+ planning: {
146
+ id: 'planning',
147
+ label: 'Planning',
148
+ description: 'Plan implementation approach',
149
+ icon: 'ListTodo',
150
+ category: 'planning',
151
+ },
32
152
  };
33
153
  /**
34
154
  * Get skill metadata by ID.
@@ -48,7 +48,13 @@ export const ROLE_EXPERTISE = {
48
48
  'business analysis',
49
49
  'stakeholder communication',
50
50
  ],
51
- researcher: ['source analysis', 'literature review', 'evidence evaluation', 'citation', 'synthesis'],
51
+ researcher: [
52
+ 'source analysis',
53
+ 'literature review',
54
+ 'evidence evaluation',
55
+ 'citation',
56
+ 'synthesis',
57
+ ],
52
58
  reviewer: ['argument validation', 'consistency checking', 'gap detection', 'peer review'],
53
59
  editor: ['writing quality', 'grammar', 'style', 'clarity', 'tone'],
54
60
  writer: ['content creation', 'drafting', 'storytelling', 'copywriting'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/sdk",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "Universal agent runtime for building AI-powered applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",