@compilr-dev/sdk 0.7.7 → 0.7.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.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Research Paper Skills
3
+ *
4
+ * outline, literature-review, draft-section, peer-review, research-scaffold
5
+ */
6
+ export declare const outlineSkill: import("@compilr-dev/agents").Skill;
7
+ export declare const literatureReviewSkill: import("@compilr-dev/agents").Skill;
8
+ export declare const draftSectionSkill: import("@compilr-dev/agents").Skill;
9
+ export declare const peerReviewSkill: import("@compilr-dev/agents").Skill;
10
+ export declare const researchScaffoldSkill: import("@compilr-dev/agents").Skill;
@@ -0,0 +1,569 @@
1
+ /**
2
+ * Research Paper Skills
3
+ *
4
+ * outline, literature-review, draft-section, peer-review, research-scaffold
5
+ */
6
+ import { defineSkill } from '@compilr-dev/agents';
7
+ export const outlineSkill = defineSkill({
8
+ name: 'outline',
9
+ description: 'Build or refine the research paper structure — sections, claims, source mapping',
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.
11
+
12
+ ## When to Use
13
+ - Starting a new research paper — no outline exists yet
14
+ - Restructuring an existing paper — user wants to reorganize sections
15
+ - Evolving a paper — new sources or insights change the direction
16
+ - Importing structure — user has an existing paper and wants to model it
17
+
18
+ ## Step 1: Assess Current State
19
+
20
+ Start by reading the current state:
21
+ 1. Use \`research_model_get\` with scope: "overview" to check if a model exists
22
+ 2. If it exists, review sections, questions, and sources already defined
23
+ 3. Check the Knowledge Base (read pinned content) for available sources
24
+ 4. Check existing work items with \`workitem_query\`
25
+
26
+ Tell the user what you found:
27
+ - "You have X sections, Y sources, Z research questions defined" (if model exists)
28
+ - "No research model found yet — let's build one from scratch" (if new)
29
+
30
+ ## Step 2: Gather Context (only ask what you don't already know)
31
+
32
+ Ask in batches of 2-3 questions:
33
+ - **Research topic:** What is the main topic or research question?
34
+ - **Scope:** What type of paper? (journal article, thesis chapter, full thesis, literature review, lab report)
35
+ - **Citation style:** APA, MLA, Chicago, IEEE, Harvard?
36
+ - **Audience:** Who is this for? (academic journal, conference, class assignment)
37
+ - **Constraints:** Any required sections or structure mandated by the target venue?
38
+
39
+ If the model already has a title and citation style set, skip those questions.
40
+
41
+ After gathering answers, save the metadata:
42
+ - \`research_model_update\` with op: "set_title"
43
+ - \`research_model_update\` with op: "set_citation_style"
44
+ - \`research_model_update\` with op: "set_authors" (if provided)
45
+ - \`research_model_update\` with op: "set_keywords" (if provided)
46
+
47
+ ## Step 3: Propose Research Questions
48
+
49
+ Based on the topic and available sources, propose:
50
+ - One main research question
51
+ - 2-4 sub-questions the paper will address
52
+
53
+ Present them to the user for review. After confirmation, save each:
54
+ - \`research_model_update\` with op: "question_add", question: { question: "..." }
55
+
56
+ ## Step 4: Propose Section Structure
57
+
58
+ Based on the questions, scope, and sources, propose an outline. Adapt to the paper type:
59
+
60
+ **Journal article (5-7 sections):**
61
+ 1. Introduction — state the problem, thesis, and contribution
62
+ 2. Literature Review / Related Work — what's known, what's the gap
63
+ 3. Methodology — research approach
64
+ 4. Results / Findings — present the evidence
65
+ 5. Discussion — interpret results, implications, limitations
66
+ 6. Conclusion — summarize contributions, future work
67
+
68
+ **Thesis (chapters with subsections):**
69
+ - Chapters as top-level sections, subsections as children
70
+ - Include: Abstract, Acknowledgments if appropriate
71
+
72
+ **Literature review (thematic):**
73
+ - Organized by themes, not methodology/results
74
+ - Each theme is a section with sub-themes as subsections
75
+
76
+ **Lab report:**
77
+ - Hypothesis, Method, Results, Discussion, Conclusion
78
+
79
+ Present the outline to the user. For each section include:
80
+ - Title
81
+ - Purpose (what this section argues or establishes — not just "discusses X" but "argues that X because Y")
82
+ - Estimated word count (if appropriate for the scope)
83
+
84
+ After user confirms/adjusts, save each section:
85
+ - \`research_model_update\` with op: "section_add", section: { title, purpose, order, parentId, targetWordCount }
86
+
87
+ For subsections, use parentId referencing the parent section's ID.
88
+
89
+ ## Step 5: Map Sources to Sections (if sources exist in KB)
90
+
91
+ If the Knowledge Base has sources:
92
+ 1. Review available source descriptions/pinned content
93
+ 2. For each section, suggest which sources might be relevant
94
+ 3. Create initial claim sketches for key arguments
95
+ 4. Link sources to claims
96
+
97
+ For each claim:
98
+ - \`research_model_update\` with op: "claim_add", sectionId: "...", claim: { statement: "..." }
99
+
100
+ For each source link (only if source is already in the model):
101
+ - \`research_model_update\` with op: "claim_link_source", sectionId: "...", claimId: "...", sourceRef: { sourceId: "..." }, relation: "supporting"
102
+
103
+ If no sources exist yet, skip this step and note: "Add sources to the Knowledge Base and run /literature-review to link them."
104
+
105
+ ## Step 6: Generate Work Items
106
+
107
+ Create one work item per section:
108
+ - Use \`workitem_create\` for each section
109
+ - Type: "feature" (displayed as "Section" in research projects)
110
+ - Title: "Draft: {section title}"
111
+ - Description: Include section purpose, key claims to address, relevant sources
112
+ - Priority based on writing order:
113
+ - Methodology → high (write first, grounds the paper)
114
+ - Literature Review → high (needed early)
115
+ - Results / Findings → medium
116
+ - Discussion → medium
117
+ - Introduction → low (easier to write once you know what you're introducing)
118
+ - Conclusion → low (summary of everything else)
119
+
120
+ ## Step 7: Validate and Summarize
121
+
122
+ 1. Run \`research_model_validate\` to check for issues
123
+ 2. Present a summary:
124
+ - Paper title and scope
125
+ - Research questions
126
+ - Section outline with purposes
127
+ - Source mapping (if any)
128
+ - Work items created
129
+ - Any warnings from validation (unsupported claims, empty sections — expected at this stage)
130
+
131
+ ## Rules
132
+ - This is INTERACTIVE. Ask questions, propose, get feedback, iterate. Do NOT generate the entire outline in one shot.
133
+ - Respect existing model state. If sections already exist, propose modifications rather than replacing everything.
134
+ - Each section's purpose should clearly state what it argues or establishes.
135
+ - Claims are hypotheses at this stage — mark them as unsupported until sources are linked.
136
+ - Use the ask_user tool to present options when choices are needed.
137
+ - If the user says "skip" or "later", move to the next step.
138
+ - Total interaction should be 8-15 questions max.
139
+
140
+ ## Completion Criteria
141
+ ✓ Paper title and citation style are set
142
+ ✓ Research questions are defined
143
+ ✓ Section structure matches the paper scope
144
+ ✓ Each section has a clear purpose
145
+ ✓ Sources mapped to sections (if available)
146
+ ✓ Work items created for each section
147
+ ✓ Model validates without structural errors
148
+ ✓ User has reviewed and approved the outline`,
149
+ tags: ['research', 'planning', 'outline'],
150
+ });
151
+ export const literatureReviewSkill = defineSkill({
152
+ name: 'literature-review',
153
+ description: 'Analyze sources from the Knowledge Base — extract findings, link to claims, identify gaps',
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.
155
+
156
+ ## When to Use
157
+ - Sources have been added to the Knowledge Base but not yet analyzed
158
+ - The Research Model has sections/claims that need source support
159
+ - User wants to understand how sources relate to their argument
160
+ - User wants to identify gaps in their source coverage
161
+
162
+ ## Prerequisites
163
+ - A Research Model should exist (run /outline first if not)
164
+ - Sources should be in the Knowledge Base (upload PDFs, paste text, or import URLs)
165
+
166
+ ## Step 1: Assess Current State
167
+
168
+ 1. Use \`research_model_get\` with scope: "overview" to see the current model
169
+ 2. Use \`research_model_get\` with scope: "sources" to see which sources are already registered and analyzed
170
+ 3. Review the Knowledge Base content (pinned items are in context; read non-pinned files as needed)
171
+
172
+ Report to the user:
173
+ - "You have X sources in the model, Y analyzed, Z unanalyzed"
174
+ - "The Knowledge Base has N files available"
175
+ - "X claims currently lack source support"
176
+
177
+ ## Step 2: Register New Sources
178
+
179
+ For each KB document not yet in the Research Model:
180
+ 1. Read the document content (use \`read_file\` if not pinned)
181
+ 2. Extract citation information: authors, title, year, venue, type
182
+ 3. Register it: \`research_model_update\` with op: "source_add", source: { citeKey, citation: { type, title, authors, year, venue } }
183
+ 4. Note: generate a short, memorable citeKey (e.g., "smith2024", "jones-ml-2023")
184
+
185
+ Ask the user to confirm the extracted citation info for each source, or batch-confirm if there are many.
186
+
187
+ ## Step 3: Analyze Each Source
188
+
189
+ For each unanalyzed source:
190
+ 1. Read the full content from the KB
191
+ 2. Extract key findings relevant to the paper's research questions
192
+ 3. Identify the source's methodology and limitations
193
+ 4. Determine relevance: primary (directly addresses research questions), secondary (provides context), or background (general knowledge)
194
+ 5. Update the source: \`research_model_update\` with op: "source_update", sourceId: "...", updates: { keyFindings: [...], relevance: "primary|secondary|background", analyzed: true, tags: [...] }
195
+
196
+ Present a summary of each source's key findings to the user.
197
+
198
+ ## Step 4: Link Sources to Claims
199
+
200
+ For each section in the model:
201
+ 1. Read the section's existing claims (\`research_model_get\` with sectionId)
202
+ 2. For each claim, identify which analyzed sources support or contradict it
203
+ 3. Link them: \`research_model_update\` with op: "claim_link_source", sectionId, claimId, sourceRef: { sourceId, relevance: "brief note" }, relation: "supporting" or "contradicting"
204
+ 4. Update evidence strength based on the linked sources:
205
+ - strong: multiple supporting sources, no contradictions
206
+ - moderate: at least one supporting source
207
+ - weak: tangential support only
208
+ - contested: sources disagree
209
+ - unsupported: no sources linked
210
+
211
+ If a source suggests a claim that doesn't exist yet, propose adding it:
212
+ - \`research_model_update\` with op: "claim_add", sectionId, claim: { statement, type: "derived" }
213
+
214
+ ## Step 5: Identify Gaps
215
+
216
+ After linking sources to claims, analyze gaps:
217
+ 1. Run \`research_model_validate\` to get warnings
218
+ 2. Report:
219
+ - **Unsupported claims** — claims with no source references (need more sources or should be marked as original analysis)
220
+ - **Orphan sources** — sources not linked to any claim (may not be relevant, or claims are missing)
221
+ - **Thin sections** — sections with few claims or few sources
222
+ - **Missing perspectives** — if all sources agree, note the lack of counter-arguments
223
+
224
+ Suggest next steps:
225
+ - "Section X needs more sources on [topic] — consider searching for..."
226
+ - "Source Y has findings relevant to Section Z but no claim captures this yet"
227
+ - "The paper lacks counter-arguments on [claim] — consider adding a limitations discussion"
228
+
229
+ ## Step 6: Synthesize Themes
230
+
231
+ If multiple sources have been analyzed, provide a thematic synthesis:
232
+ - Group sources by the themes they address
233
+ - Note where sources agree, where they disagree, and what's novel
234
+ - Map themes to research questions
235
+ - Suggest how themes should be organized in the Literature Review section
236
+
237
+ ## Rules
238
+ - Analyze sources ONE AT A TIME — don't rush through multiple sources
239
+ - Ask the user to confirm citation info before saving (batch OK for many sources)
240
+ - Always distinguish between the source's claims and the user's interpretation
241
+ - Note methodological differences between sources when relevant
242
+ - Use citeKeys consistently when referencing sources
243
+ - If a source is irrelevant to the research, say so — not every KB file needs to be in the model
244
+ - Keep evidence strength assessments conservative — "moderate" is better than over-claiming "strong"
245
+
246
+ ## Completion Criteria
247
+ ✓ All relevant KB sources are registered in the model
248
+ ✓ Each source has been analyzed (keyFindings, relevance, tags)
249
+ ✓ Sources are linked to relevant claims
250
+ ✓ Evidence strength updated for linked claims
251
+ ✓ Gaps identified and reported
252
+ ✓ User has reviewed the source-claim mappings`,
253
+ tags: ['research', 'analysis', 'sources'],
254
+ });
255
+ export const draftSectionSkill = defineSkill({
256
+ name: 'draft-section',
257
+ description: 'Draft a paper section using the outline, claims, and linked sources',
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.
259
+
260
+ ## When to Use
261
+ - A section has status "outlined" and needs its first draft
262
+ - A section needs revision based on reviewer feedback
263
+ - The user wants to expand a section with more detail
264
+
265
+ ## Step 1: Select the Section
266
+
267
+ 1. Use \`research_model_get\` with scope: "sections" to see all sections and their status
268
+ 2. If the user didn't specify which section, suggest the next logical one:
269
+ - Methodology first (grounds the paper)
270
+ - Literature Review (needed early)
271
+ - Results / Findings (core content)
272
+ - Discussion (interpretation)
273
+ - Introduction and Conclusion last (summaries)
274
+ 3. Confirm the section choice with the user
275
+
276
+ ## Step 2: Gather Section Context
277
+
278
+ For the chosen section:
279
+ 1. Use \`research_model_get\` with sectionId to get the section's purpose, claims, and notes
280
+ 2. Read any existing draft file (if the section has been drafted before)
281
+ 3. For each claim with linked sources, read the source content from KB to understand the evidence
282
+ 4. Check the citation style from the model: \`research_model_get\` with scope: "overview"
283
+
284
+ Summarize to the user:
285
+ - "Section: {title}"
286
+ - "Purpose: {purpose}"
287
+ - "Claims to address: {list}"
288
+ - "Sources available: {list with citeKeys}"
289
+
290
+ ## Step 3: Draft the Section
291
+
292
+ Write the section following these guidelines:
293
+
294
+ **Structure:**
295
+ - Start with a topic sentence that states the section's purpose
296
+ - Address each claim in the section in a logical order
297
+ - Use transitions between paragraphs
298
+ - End with a connection to the next section (or summary for final sections)
299
+
300
+ **Citations:**
301
+ - Use the project's citation style for in-text citations
302
+ - APA: (Author, Year) or Author (Year)
303
+ - MLA: (Author Page) or Author (Page)
304
+ - IEEE: [citeKey] or [N]
305
+ - Chicago: (Author Year) or Author (Year)
306
+ - Harvard: (Author Year) or Author (Year)
307
+ - Cite sources for every non-original claim
308
+ - When multiple sources support a claim, cite them together
309
+
310
+ **Academic Tone:**
311
+ - Formal but clear — avoid jargon without definition
312
+ - Use hedging language where appropriate ("suggests", "indicates", "appears to")
313
+ - Distinguish between established facts and interpretations
314
+ - Use active voice for the author's contributions, passive for general findings
315
+
316
+ **Length:**
317
+ - Respect the section's targetWordCount if set
318
+ - If not set, aim for appropriate length based on scope:
319
+ - Journal article section: 500-1500 words
320
+ - Thesis chapter: 2000-5000 words
321
+ - Literature review section: 800-2000 words
322
+
323
+ ## Step 4: Write the File
324
+
325
+ 1. Determine the file path: \`{project_path}/sections/{section_order}-{section_slug}.md\`
326
+ - e.g., \`sections/01-introduction.md\`, \`sections/03-methodology.md\`
327
+ 2. Write the draft using \`write_file\` or \`edit_file\` (if revising)
328
+ 3. Include a header comment: \`<!-- Section: {title} | Status: drafted | Rev: {model revision} -->\`
329
+
330
+ ## Step 5: Update the Model
331
+
332
+ After writing:
333
+ 1. Update section status: \`research_model_update\` with op: "section_update", sectionId, updates: { status: "drafted", actualWordCount: N }
334
+ 2. If new claims emerged during writing, add them: \`research_model_update\` with op: "claim_add"
335
+ 3. If evidence strength changed based on closer reading, update claims
336
+
337
+ ## Step 6: Generate Bibliography (if needed)
338
+
339
+ If this is the first section being drafted or the user requests it:
340
+ 1. Use \`bibliography_generate\` with format: "markdown" to produce the references list
341
+ 2. Write it to \`{project_path}/sections/references.md\`
342
+
343
+ ## Step 7: Summary
344
+
345
+ Report to the user:
346
+ - Section drafted: title, word count, file path
347
+ - Claims addressed: list with evidence strength
348
+ - Citations used: list of citeKeys
349
+ - Suggestions: any gaps noticed, claims that need more support
350
+
351
+ ## Rules
352
+ - NEVER fabricate citations — only cite sources that exist in the Research Model
353
+ - If a claim lacks source support, note it explicitly rather than inventing a reference
354
+ - Maintain consistency with previously drafted sections (terminology, tense, voice)
355
+ - If the section has subsections in the model, draft them as ## subheadings
356
+ - Read existing drafted sections first to maintain consistent style
357
+ - Ask the user about tone preferences if this is the first section being drafted
358
+
359
+ ## Completion Criteria
360
+ ✓ Section file written with proper citations
361
+ ✓ Model updated (status: drafted, actualWordCount)
362
+ ✓ All claims in the section are addressed in the text
363
+ ✓ In-text citations match the project's citation style
364
+ ✓ User has reviewed the draft`,
365
+ tags: ['research', 'writing', 'drafting'],
366
+ });
367
+ export const peerReviewSkill = defineSkill({
368
+ name: 'peer-review',
369
+ description: 'Validate argument structure, find logical gaps, check consistency across sections',
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.
371
+
372
+ ## When to Use
373
+ - One or more sections have been drafted
374
+ - The user wants feedback before submitting/finalizing
375
+ - After significant revisions to check nothing was broken
376
+ - To identify areas that need more work
377
+
378
+ ## Step 1: Assess What's Available
379
+
380
+ 1. Use \`research_model_get\` with scope: "overview" for the big picture
381
+ 2. Use \`research_model_get\` with scope: "sections" to see status of each section
382
+ 3. Run \`research_model_validate\` for structural issues and warnings
383
+
384
+ Report to the user:
385
+ - "X sections drafted, Y still outlined, Z sources linked"
386
+ - Any structural errors from validation
387
+ - Which sections are ready for review
388
+
389
+ If no sections are drafted yet, tell the user: "There's nothing to review yet — run /draft-section first."
390
+
391
+ ## Step 2: Argument Structure Review
392
+
393
+ Read each drafted section (use \`read_file\` on the section files) and evaluate:
394
+
395
+ **Thesis & Research Questions:**
396
+ - Is the main thesis clearly stated in the Introduction?
397
+ - Does each section contribute to answering the research questions?
398
+ - Are the research questions actually addressed by the paper's content?
399
+
400
+ **Logical Flow:**
401
+ - Does the argument progress logically from Introduction → Literature Review → Methodology → Results → Discussion → Conclusion?
402
+ - Does each section build on what came before?
403
+ - Are there logical jumps or non-sequiturs between sections?
404
+
405
+ **Claim Validation:**
406
+ For each claim in the Research Model:
407
+ - Is it actually stated in the draft text?
408
+ - Is it supported by the cited sources?
409
+ - Is the evidence strength rating accurate given the sources?
410
+ - Are there unsupported assertions presented as established facts?
411
+
412
+ Rate each issue found:
413
+ - **Critical** — breaks the argument (e.g., unsupported central claim, circular reasoning)
414
+ - **Major** — weakens the argument significantly (e.g., missing counter-arguments, logical gap)
415
+ - **Minor** — should be fixed but doesn't break the argument (e.g., vague language, minor inconsistency)
416
+
417
+ ## Step 3: Gap Detection
418
+
419
+ Check for missing elements:
420
+
421
+ **Source Gaps:**
422
+ - Claims that should have citations but don't
423
+ - Sections that rely on very few sources
424
+ - Important counter-arguments not addressed
425
+ - Methodology claims without justification
426
+
427
+ **Structural Gaps:**
428
+ - Research questions not addressed by any section
429
+ - Sections that don't connect to the overall argument
430
+ - Missing limitations discussion
431
+ - Missing future work section (if appropriate)
432
+
433
+ **Content Gaps:**
434
+ - Definitions used but never introduced
435
+ - Acronyms used without expansion
436
+ - Figures/tables referenced but not present
437
+ - Promises made in the Introduction but not delivered
438
+
439
+ ## Step 4: Consistency Check
440
+
441
+ Across all drafted sections, check:
442
+
443
+ **Terminology:**
444
+ - Is the same concept referred to consistently? (e.g., not "users" in one place and "participants" in another without reason)
445
+ - Are technical terms used with consistent meaning?
446
+
447
+ **Tense:**
448
+ - Literature review: past tense for completed studies
449
+ - Methodology: past tense for what was done, present for general statements
450
+ - Results: past tense for findings
451
+ - Discussion: present tense for interpretations
452
+
453
+ **Voice & Tone:**
454
+ - Is the level of formality consistent?
455
+ - Is the author's voice consistent (not shifting between confident and hedging without reason)?
456
+
457
+ **Numbers & Data:**
458
+ - Do statistics match between text and any tables/figures?
459
+ - Are numbers formatted consistently?
460
+
461
+ ## Step 5: Cross-Reference Check
462
+
463
+ - "As discussed in Section X" — does Section X actually discuss that?
464
+ - "See Table N" / "See Figure N" — do they exist?
465
+ - Citations in text match sources in the Research Model
466
+ - Consistent use of citation style throughout
467
+
468
+ ## Step 6: Generate Review Report
469
+
470
+ Structure the report as:
471
+
472
+ ### Strengths
473
+ - What the paper does well (2-3 points)
474
+
475
+ ### Critical Issues
476
+ - Issues that must be addressed (with specific locations)
477
+
478
+ ### Major Issues
479
+ - Significant improvements needed
480
+
481
+ ### Minor Issues
482
+ - Small fixes and suggestions
483
+
484
+ ### Recommendations
485
+ - Prioritized list of what to fix first
486
+ - Suggested order of revisions
487
+
488
+ Write the report to \`{project_path}/reviews/peer-review-{date}.md\`
489
+
490
+ ## Step 7: Update Model
491
+
492
+ For issues that affect the Research Model:
493
+ 1. Update claim evidence strength if ratings were inaccurate
494
+ 2. Add new claims if the review identified missing arguments
495
+ 3. Create work items (type: "bug" / displayed as "Revision") for each critical and major issue:
496
+ - \`workitem_create\` with type: "bug", title: "Review: {brief issue}", description: detailed issue + suggested fix
497
+
498
+ ## Rules
499
+ - Be constructive, not destructive — every critique should include a suggestion for improvement
500
+ - Reference specific sections, claims, and sources by ID/citeKey
501
+ - Don't rewrite the paper — point out issues and let the author fix them
502
+ - Distinguish between opinion ("I would suggest...") and errors ("This claim is unsupported")
503
+ - If the argument is sound, say so — don't manufacture problems
504
+ - Focus on the argument, not the writing style (that's the Editor's job)
505
+
506
+ ## Completion Criteria
507
+ ✓ All drafted sections reviewed
508
+ ✓ Argument structure evaluated (thesis, logical flow, claim support)
509
+ ✓ Gaps identified (source, structural, content)
510
+ ✓ Consistency checked (terminology, tense, cross-references)
511
+ ✓ Review report written to file
512
+ ✓ Revision work items created for critical/major issues
513
+ ✓ User has received the review summary`,
514
+ tags: ['research', 'review', 'quality'],
515
+ });
516
+ export const researchScaffoldSkill = defineSkill({
517
+ name: 'research-scaffold',
518
+ description: 'Scaffold a research paper project from a template (APA, IEEE, Thesis, Literature Review, Lab Report)',
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.
520
+
521
+ ## Available Templates
522
+
523
+ | Template | ID | Best For |
524
+ |----------|-----|----------|
525
+ | APA Research Paper | \`apa-paper\` | Social sciences, psychology, education |
526
+ | IEEE Conference Paper | \`ieee-paper\` | Engineering, computer science |
527
+ | Thesis / Dissertation | \`thesis\` | Graduate work, multi-chapter |
528
+ | Literature Review | \`literature-review\` | Standalone review papers |
529
+ | Lab Report | \`lab-report\` | Scientific experiments |
530
+
531
+ ## Step 1: Gather Info
532
+
533
+ Ask the user (if not already provided):
534
+ 1. What is the paper topic / title?
535
+ 2. Which template best fits their needs? (describe the options briefly)
536
+ 3. What citation style? (default depends on template — APA for most, IEEE for engineering)
537
+
538
+ ## Step 2: Scaffold
539
+
540
+ Call the \`research_scaffold\` tool with:
541
+ - \`template\`: the template ID
542
+ - \`title\`: the paper title
543
+ - \`citation_style\`: if different from template default
544
+ - \`output_dir\`: the project path
545
+
546
+ This creates:
547
+ - A Research Model with pre-defined sections
548
+ - Folder structure (sections/, figures/, references/, knowledge/)
549
+ - Section stub files (one per section)
550
+ - COMPILR.md with project context
551
+ - Bibliography file (.bib)
552
+ - Work items for each section (type: "Section")
553
+
554
+ ## Step 3: Confirm and Guide
555
+
556
+ After scaffolding, tell the user:
557
+ - What was created (sections, files, work items)
558
+ - Suggested next steps:
559
+ 1. "Add your source material to the Knowledge Base"
560
+ 2. "Run /outline to customize the section structure"
561
+ 3. "Run /literature-review to analyze your sources"
562
+ 4. "Run /draft-section to start writing"
563
+
564
+ ## Rules
565
+ - If a Research Model already exists, warn the user and don't overwrite
566
+ - Use dry_run first if the user seems uncertain
567
+ - The scaffold is a starting point — the user can customize everything after`,
568
+ tags: ['research', 'scaffold', 'setup'],
569
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Software Development Skills
3
+ *
4
+ * design, sketch, prd, refine, refine-item, architecture, session-notes, build, scaffold
5
+ */
6
+ export declare const designSkill: import("@compilr-dev/agents").Skill;
7
+ export declare const refineSkill: import("@compilr-dev/agents").Skill;
8
+ export declare const sketchSkill: import("@compilr-dev/agents").Skill;
9
+ export declare const refineItemSkill: import("@compilr-dev/agents").Skill;
10
+ export declare const architectureSkill: import("@compilr-dev/agents").Skill;
11
+ export declare const prdSkill: import("@compilr-dev/agents").Skill;
12
+ export declare const sessionNotesSkill: import("@compilr-dev/agents").Skill;
13
+ export declare const buildSkill: import("@compilr-dev/agents").Skill;
14
+ export declare const scaffoldSkill: import("@compilr-dev/agents").Skill;