@compilr-dev/sdk 0.5.7 → 0.5.8

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, } 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, } 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: ['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' },
@@ -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, } from './platform-skills.js';
@@ -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, } from './platform-skills.js';
@@ -20,8 +20,9 @@ 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;
23
24
  /**
24
- * All platform-specific skills (11 total).
25
+ * All platform-specific skills (13 total).
25
26
  * These skills reference platform tools (backlog, workitems, documents, projects)
26
27
  * and belong in the SDK rather than in generic agent/coding libraries.
27
28
  */
@@ -1206,11 +1206,160 @@ 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
+ });
1209
1358
  // =============================================================================
1210
1359
  // Aggregate export
1211
1360
  // =============================================================================
1212
1361
  /**
1213
- * All platform-specific skills (11 total).
1362
+ * All platform-specific skills (13 total).
1214
1363
  * These skills reference platform tools (backlog, workitems, documents, projects)
1215
1364
  * and belong in the SDK rather than in generic agent/coding libraries.
1216
1365
  */
@@ -1227,4 +1376,5 @@ export const platformSkills = [
1227
1376
  outlineSkill,
1228
1377
  literatureReviewSkill,
1229
1378
  draftSectionSkill,
1379
+ peerReviewSkill,
1230
1380
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/sdk",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "Universal agent runtime for building AI-powered applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",