@compilr-dev/sdk 0.5.7 → 0.5.9
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/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ export type { AskUserQuestion, AskUserInput, AskUserResult, AskUserHandler, AskU
|
|
|
61
61
|
export { createPlatformTools, createProjectTools, createWorkItemTools, createDocumentTools, createPlanTools, createBacklogTools, createAnchorTools, createArtifactTools, createEpisodeTools, ProjectAnchorStore, } from './platform/index.js';
|
|
62
62
|
export type { ProjectAnchorStoreConfig } from './platform/index.js';
|
|
63
63
|
export { STEP_ORDER, GUIDED_STEP_CRITERIA, getNextStep, isValidTransition, getStepCriteria, formatStepDisplay, getStepNumber, } from './platform/index.js';
|
|
64
|
-
export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, } from './skills/index.js';
|
|
64
|
+
export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, peerReviewSkill, researchScaffoldSkill, } from './skills/index.js';
|
|
65
65
|
export { ACTION_REGISTRY, getActionsForContext, getActionById, resolveActionPrompt, buildContextSummary, getSuggestedRole, } from './actions/index.js';
|
|
66
66
|
export type { ActionContext, ActionDefinition } from './actions/index.js';
|
|
67
67
|
export { PROJECT_TYPES, getProjectTypeConfig, getProjectTypesByCategory, generalConfig, softwareConfig, researchConfig, businessPlanConfig, contentConfig, techDocsConfig, courseConfig, } from './project-types/index.js';
|
package/dist/index.js
CHANGED
|
@@ -139,7 +139,7 @@ export { STEP_ORDER, GUIDED_STEP_CRITERIA, getNextStep, isValidTransition, getSt
|
|
|
139
139
|
// =============================================================================
|
|
140
140
|
// Platform Skills (platform-specific prompt expansions)
|
|
141
141
|
// =============================================================================
|
|
142
|
-
export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, } from './skills/index.js';
|
|
142
|
+
export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, peerReviewSkill, researchScaffoldSkill, } from './skills/index.js';
|
|
143
143
|
// =============================================================================
|
|
144
144
|
// Contextual Actions (skill invocations with context)
|
|
145
145
|
// =============================================================================
|
|
@@ -154,7 +154,7 @@ export const researchConfig = {
|
|
|
154
154
|
{ type: 'bibliography', label: 'Bibliography', description: 'References and citations' },
|
|
155
155
|
{ type: 'session-notes', label: 'Session Notes', description: 'Summary of work done' },
|
|
156
156
|
],
|
|
157
|
-
projectActions: ['outline', 'literature-review', 'draft-section', 'session-notes'],
|
|
157
|
+
projectActions: ['research-scaffold', 'outline', 'literature-review', 'draft-section', 'peer-review', 'session-notes'],
|
|
158
158
|
workItemActions: ['draft-section', 'explain'],
|
|
159
159
|
workItemLabels: {
|
|
160
160
|
feature: { short: 'SC', full: 'Section' },
|
package/dist/skills/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Platform Skills — barrel export
|
|
3
3
|
*/
|
|
4
|
-
export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, } from './platform-skills.js';
|
|
4
|
+
export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, peerReviewSkill, researchScaffoldSkill, } from './platform-skills.js';
|
package/dist/skills/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Platform Skills — barrel export
|
|
3
3
|
*/
|
|
4
|
-
export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, } from './platform-skills.js';
|
|
4
|
+
export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, peerReviewSkill, researchScaffoldSkill, } from './platform-skills.js';
|
|
@@ -20,8 +20,10 @@ export declare const scaffoldSkill: Skill;
|
|
|
20
20
|
export declare const outlineSkill: Skill;
|
|
21
21
|
export declare const literatureReviewSkill: Skill;
|
|
22
22
|
export declare const draftSectionSkill: Skill;
|
|
23
|
+
export declare const peerReviewSkill: Skill;
|
|
24
|
+
export declare const researchScaffoldSkill: Skill;
|
|
23
25
|
/**
|
|
24
|
-
* All platform-specific skills (
|
|
26
|
+
* All platform-specific skills (14 total).
|
|
25
27
|
* These skills reference platform tools (backlog, workitems, documents, projects)
|
|
26
28
|
* and belong in the SDK rather than in generic agent/coding libraries.
|
|
27
29
|
*/
|
|
@@ -1206,11 +1206,214 @@ Report to the user:
|
|
|
1206
1206
|
✓ User has reviewed the draft`,
|
|
1207
1207
|
tags: ['research', 'writing', 'drafting'],
|
|
1208
1208
|
});
|
|
1209
|
+
export const peerReviewSkill = defineSkill({
|
|
1210
|
+
name: 'peer-review',
|
|
1211
|
+
description: 'Validate argument structure, find logical gaps, check consistency across sections',
|
|
1212
|
+
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.
|
|
1213
|
+
|
|
1214
|
+
## When to Use
|
|
1215
|
+
- One or more sections have been drafted
|
|
1216
|
+
- The user wants feedback before submitting/finalizing
|
|
1217
|
+
- After significant revisions to check nothing was broken
|
|
1218
|
+
- To identify areas that need more work
|
|
1219
|
+
|
|
1220
|
+
## Step 1: Assess What's Available
|
|
1221
|
+
|
|
1222
|
+
1. Use \`research_model_get\` with scope: "overview" for the big picture
|
|
1223
|
+
2. Use \`research_model_get\` with scope: "sections" to see status of each section
|
|
1224
|
+
3. Run \`research_model_validate\` for structural issues and warnings
|
|
1225
|
+
|
|
1226
|
+
Report to the user:
|
|
1227
|
+
- "X sections drafted, Y still outlined, Z sources linked"
|
|
1228
|
+
- Any structural errors from validation
|
|
1229
|
+
- Which sections are ready for review
|
|
1230
|
+
|
|
1231
|
+
If no sections are drafted yet, tell the user: "There's nothing to review yet — run /draft-section first."
|
|
1232
|
+
|
|
1233
|
+
## Step 2: Argument Structure Review
|
|
1234
|
+
|
|
1235
|
+
Read each drafted section (use \`read_file\` on the section files) and evaluate:
|
|
1236
|
+
|
|
1237
|
+
**Thesis & Research Questions:**
|
|
1238
|
+
- Is the main thesis clearly stated in the Introduction?
|
|
1239
|
+
- Does each section contribute to answering the research questions?
|
|
1240
|
+
- Are the research questions actually addressed by the paper's content?
|
|
1241
|
+
|
|
1242
|
+
**Logical Flow:**
|
|
1243
|
+
- Does the argument progress logically from Introduction → Literature Review → Methodology → Results → Discussion → Conclusion?
|
|
1244
|
+
- Does each section build on what came before?
|
|
1245
|
+
- Are there logical jumps or non-sequiturs between sections?
|
|
1246
|
+
|
|
1247
|
+
**Claim Validation:**
|
|
1248
|
+
For each claim in the Research Model:
|
|
1249
|
+
- Is it actually stated in the draft text?
|
|
1250
|
+
- Is it supported by the cited sources?
|
|
1251
|
+
- Is the evidence strength rating accurate given the sources?
|
|
1252
|
+
- Are there unsupported assertions presented as established facts?
|
|
1253
|
+
|
|
1254
|
+
Rate each issue found:
|
|
1255
|
+
- **Critical** — breaks the argument (e.g., unsupported central claim, circular reasoning)
|
|
1256
|
+
- **Major** — weakens the argument significantly (e.g., missing counter-arguments, logical gap)
|
|
1257
|
+
- **Minor** — should be fixed but doesn't break the argument (e.g., vague language, minor inconsistency)
|
|
1258
|
+
|
|
1259
|
+
## Step 3: Gap Detection
|
|
1260
|
+
|
|
1261
|
+
Check for missing elements:
|
|
1262
|
+
|
|
1263
|
+
**Source Gaps:**
|
|
1264
|
+
- Claims that should have citations but don't
|
|
1265
|
+
- Sections that rely on very few sources
|
|
1266
|
+
- Important counter-arguments not addressed
|
|
1267
|
+
- Methodology claims without justification
|
|
1268
|
+
|
|
1269
|
+
**Structural Gaps:**
|
|
1270
|
+
- Research questions not addressed by any section
|
|
1271
|
+
- Sections that don't connect to the overall argument
|
|
1272
|
+
- Missing limitations discussion
|
|
1273
|
+
- Missing future work section (if appropriate)
|
|
1274
|
+
|
|
1275
|
+
**Content Gaps:**
|
|
1276
|
+
- Definitions used but never introduced
|
|
1277
|
+
- Acronyms used without expansion
|
|
1278
|
+
- Figures/tables referenced but not present
|
|
1279
|
+
- Promises made in the Introduction but not delivered
|
|
1280
|
+
|
|
1281
|
+
## Step 4: Consistency Check
|
|
1282
|
+
|
|
1283
|
+
Across all drafted sections, check:
|
|
1284
|
+
|
|
1285
|
+
**Terminology:**
|
|
1286
|
+
- Is the same concept referred to consistently? (e.g., not "users" in one place and "participants" in another without reason)
|
|
1287
|
+
- Are technical terms used with consistent meaning?
|
|
1288
|
+
|
|
1289
|
+
**Tense:**
|
|
1290
|
+
- Literature review: past tense for completed studies
|
|
1291
|
+
- Methodology: past tense for what was done, present for general statements
|
|
1292
|
+
- Results: past tense for findings
|
|
1293
|
+
- Discussion: present tense for interpretations
|
|
1294
|
+
|
|
1295
|
+
**Voice & Tone:**
|
|
1296
|
+
- Is the level of formality consistent?
|
|
1297
|
+
- Is the author's voice consistent (not shifting between confident and hedging without reason)?
|
|
1298
|
+
|
|
1299
|
+
**Numbers & Data:**
|
|
1300
|
+
- Do statistics match between text and any tables/figures?
|
|
1301
|
+
- Are numbers formatted consistently?
|
|
1302
|
+
|
|
1303
|
+
## Step 5: Cross-Reference Check
|
|
1304
|
+
|
|
1305
|
+
- "As discussed in Section X" — does Section X actually discuss that?
|
|
1306
|
+
- "See Table N" / "See Figure N" — do they exist?
|
|
1307
|
+
- Citations in text match sources in the Research Model
|
|
1308
|
+
- Consistent use of citation style throughout
|
|
1309
|
+
|
|
1310
|
+
## Step 6: Generate Review Report
|
|
1311
|
+
|
|
1312
|
+
Structure the report as:
|
|
1313
|
+
|
|
1314
|
+
### Strengths
|
|
1315
|
+
- What the paper does well (2-3 points)
|
|
1316
|
+
|
|
1317
|
+
### Critical Issues
|
|
1318
|
+
- Issues that must be addressed (with specific locations)
|
|
1319
|
+
|
|
1320
|
+
### Major Issues
|
|
1321
|
+
- Significant improvements needed
|
|
1322
|
+
|
|
1323
|
+
### Minor Issues
|
|
1324
|
+
- Small fixes and suggestions
|
|
1325
|
+
|
|
1326
|
+
### Recommendations
|
|
1327
|
+
- Prioritized list of what to fix first
|
|
1328
|
+
- Suggested order of revisions
|
|
1329
|
+
|
|
1330
|
+
Write the report to \`{project_path}/reviews/peer-review-{date}.md\`
|
|
1331
|
+
|
|
1332
|
+
## Step 7: Update Model
|
|
1333
|
+
|
|
1334
|
+
For issues that affect the Research Model:
|
|
1335
|
+
1. Update claim evidence strength if ratings were inaccurate
|
|
1336
|
+
2. Add new claims if the review identified missing arguments
|
|
1337
|
+
3. Create work items (type: "bug" / displayed as "Revision") for each critical and major issue:
|
|
1338
|
+
- \`workitem_create\` with type: "bug", title: "Review: {brief issue}", description: detailed issue + suggested fix
|
|
1339
|
+
|
|
1340
|
+
## Rules
|
|
1341
|
+
- Be constructive, not destructive — every critique should include a suggestion for improvement
|
|
1342
|
+
- Reference specific sections, claims, and sources by ID/citeKey
|
|
1343
|
+
- Don't rewrite the paper — point out issues and let the author fix them
|
|
1344
|
+
- Distinguish between opinion ("I would suggest...") and errors ("This claim is unsupported")
|
|
1345
|
+
- If the argument is sound, say so — don't manufacture problems
|
|
1346
|
+
- Focus on the argument, not the writing style (that's the Editor's job)
|
|
1347
|
+
|
|
1348
|
+
## Completion Criteria
|
|
1349
|
+
✓ All drafted sections reviewed
|
|
1350
|
+
✓ Argument structure evaluated (thesis, logical flow, claim support)
|
|
1351
|
+
✓ Gaps identified (source, structural, content)
|
|
1352
|
+
✓ Consistency checked (terminology, tense, cross-references)
|
|
1353
|
+
✓ Review report written to file
|
|
1354
|
+
✓ Revision work items created for critical/major issues
|
|
1355
|
+
✓ User has received the review summary`,
|
|
1356
|
+
tags: ['research', 'review', 'quality'],
|
|
1357
|
+
});
|
|
1358
|
+
export const researchScaffoldSkill = defineSkill({
|
|
1359
|
+
name: 'research-scaffold',
|
|
1360
|
+
description: 'Scaffold a research paper project from a template (APA, IEEE, Thesis, Literature Review, Lab Report)',
|
|
1361
|
+
prompt: `You are in RESEARCH SCAFFOLD MODE. Your goal is to help the user set up a new research paper project using a template.
|
|
1362
|
+
|
|
1363
|
+
## Available Templates
|
|
1364
|
+
|
|
1365
|
+
| Template | ID | Best For |
|
|
1366
|
+
|----------|-----|----------|
|
|
1367
|
+
| APA Research Paper | \`apa-paper\` | Social sciences, psychology, education |
|
|
1368
|
+
| IEEE Conference Paper | \`ieee-paper\` | Engineering, computer science |
|
|
1369
|
+
| Thesis / Dissertation | \`thesis\` | Graduate work, multi-chapter |
|
|
1370
|
+
| Literature Review | \`literature-review\` | Standalone review papers |
|
|
1371
|
+
| Lab Report | \`lab-report\` | Scientific experiments |
|
|
1372
|
+
|
|
1373
|
+
## Step 1: Gather Info
|
|
1374
|
+
|
|
1375
|
+
Ask the user (if not already provided):
|
|
1376
|
+
1. What is the paper topic / title?
|
|
1377
|
+
2. Which template best fits their needs? (describe the options briefly)
|
|
1378
|
+
3. What citation style? (default depends on template — APA for most, IEEE for engineering)
|
|
1379
|
+
|
|
1380
|
+
## Step 2: Scaffold
|
|
1381
|
+
|
|
1382
|
+
Call the \`research_scaffold\` tool with:
|
|
1383
|
+
- \`template\`: the template ID
|
|
1384
|
+
- \`title\`: the paper title
|
|
1385
|
+
- \`citation_style\`: if different from template default
|
|
1386
|
+
- \`output_dir\`: the project path
|
|
1387
|
+
|
|
1388
|
+
This creates:
|
|
1389
|
+
- A Research Model with pre-defined sections
|
|
1390
|
+
- Folder structure (sections/, figures/, references/, knowledge/)
|
|
1391
|
+
- Section stub files (one per section)
|
|
1392
|
+
- COMPILR.md with project context
|
|
1393
|
+
- Bibliography file (.bib)
|
|
1394
|
+
- Work items for each section (type: "Section")
|
|
1395
|
+
|
|
1396
|
+
## Step 3: Confirm and Guide
|
|
1397
|
+
|
|
1398
|
+
After scaffolding, tell the user:
|
|
1399
|
+
- What was created (sections, files, work items)
|
|
1400
|
+
- Suggested next steps:
|
|
1401
|
+
1. "Add your source material to the Knowledge Base"
|
|
1402
|
+
2. "Run /outline to customize the section structure"
|
|
1403
|
+
3. "Run /literature-review to analyze your sources"
|
|
1404
|
+
4. "Run /draft-section to start writing"
|
|
1405
|
+
|
|
1406
|
+
## Rules
|
|
1407
|
+
- If a Research Model already exists, warn the user and don't overwrite
|
|
1408
|
+
- Use dry_run first if the user seems uncertain
|
|
1409
|
+
- The scaffold is a starting point — the user can customize everything after`,
|
|
1410
|
+
tags: ['research', 'scaffold', 'setup'],
|
|
1411
|
+
});
|
|
1209
1412
|
// =============================================================================
|
|
1210
1413
|
// Aggregate export
|
|
1211
1414
|
// =============================================================================
|
|
1212
1415
|
/**
|
|
1213
|
-
* All platform-specific skills (
|
|
1416
|
+
* All platform-specific skills (14 total).
|
|
1214
1417
|
* These skills reference platform tools (backlog, workitems, documents, projects)
|
|
1215
1418
|
* and belong in the SDK rather than in generic agent/coding libraries.
|
|
1216
1419
|
*/
|
|
@@ -1227,4 +1430,6 @@ export const platformSkills = [
|
|
|
1227
1430
|
outlineSkill,
|
|
1228
1431
|
literatureReviewSkill,
|
|
1229
1432
|
draftSectionSkill,
|
|
1433
|
+
peerReviewSkill,
|
|
1434
|
+
researchScaffoldSkill,
|
|
1230
1435
|
];
|