@compilr-dev/sdk 0.5.1 → 0.5.3
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/platform/types.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type WorkItemType = 'feature' | 'bug' | 'tech-debt' | 'chore';
|
|
|
19
19
|
export type WorkItemStatus = 'backlog' | 'in_progress' | 'completed' | 'skipped';
|
|
20
20
|
export type WorkItemPriority = 'critical' | 'high' | 'medium' | 'low';
|
|
21
21
|
export type GuidedStep = 'plan' | 'implement' | 'test' | 'commit' | 'review';
|
|
22
|
-
export type DocumentType = 'prd' | 'architecture' | 'design' | 'notes' | 'plan' | 'app-model';
|
|
22
|
+
export type DocumentType = 'prd' | 'architecture' | 'design' | 'notes' | 'plan' | 'app-model' | 'research-model';
|
|
23
23
|
export type PlanStatus = 'draft' | 'approved' | 'in_progress' | 'completed' | 'abandoned';
|
|
24
24
|
export interface Project {
|
|
25
25
|
id: number;
|
|
@@ -142,6 +142,7 @@ 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: 'outline', label: 'Outline', description: 'Paper structure and sections' },
|
|
146
147
|
{
|
|
147
148
|
type: 'literature-review',
|
|
@@ -162,6 +163,70 @@ export const researchConfig = {
|
|
|
162
163
|
chore: { short: 'TK', full: 'Task' },
|
|
163
164
|
},
|
|
164
165
|
systemPromptContext: 'This is an academic research project. The user is writing a research paper or thesis. Focus on academic rigor, proper citations, and structured argumentation.',
|
|
166
|
+
systemPromptSection: `## Project Context: Research Paper
|
|
167
|
+
|
|
168
|
+
You are assisting with an academic research project. Your role is to help the user develop a well-structured, properly cited research paper.
|
|
169
|
+
|
|
170
|
+
### Research Workflow
|
|
171
|
+
The typical research workflow progresses through these phases:
|
|
172
|
+
1. **Topic Definition** — Define research questions and scope
|
|
173
|
+
2. **Literature Review** — Find, analyze, and synthesize sources
|
|
174
|
+
3. **Outline** — Build the paper's argument structure
|
|
175
|
+
4. **Drafting** — Write sections guided by the outline and sources
|
|
176
|
+
5. **Review** — Validate argument, check consistency, identify gaps
|
|
177
|
+
6. **Revision** — Refine based on review feedback
|
|
178
|
+
|
|
179
|
+
The user may be at any stage. Assess where they are before suggesting next steps.
|
|
180
|
+
|
|
181
|
+
### Research Model
|
|
182
|
+
This project uses a **Research Model** — a structured representation of the paper stored as a document (doc_type: "research-model"). It tracks:
|
|
183
|
+
- **Sections** — the paper's hierarchical structure, each with a purpose and status
|
|
184
|
+
- **Claims** — assertions made within sections, with evidence strength ratings
|
|
185
|
+
- **Sources** — reference material from the Knowledge Base, linked to claims
|
|
186
|
+
- **Research Questions** — the driving questions the paper addresses
|
|
187
|
+
|
|
188
|
+
Use the research model tools to read and update this model:
|
|
189
|
+
- \`research_model_get\` — read the model (use scope: "overview" for a quick summary)
|
|
190
|
+
- \`research_model_update\` — add/modify sections, claims, sources, questions
|
|
191
|
+
- \`research_model_validate\` — check for structural errors and research-quality warnings
|
|
192
|
+
|
|
193
|
+
Always consult the model before making structural suggestions. Update it when the user makes decisions about paper structure.
|
|
194
|
+
|
|
195
|
+
### Working with Sources
|
|
196
|
+
Reference material is stored in the project's Knowledge Base. When the user uploads or imports a source:
|
|
197
|
+
- Extract key findings relevant to their research questions
|
|
198
|
+
- Identify which claims the source supports or contradicts
|
|
199
|
+
- Link the source to the appropriate claims via \`research_model_update\` (claim_link_source)
|
|
200
|
+
- Mark the source as analyzed when done
|
|
201
|
+
|
|
202
|
+
### Writing Conventions
|
|
203
|
+
- Every claim that isn't the author's original analysis should be traceable to a source
|
|
204
|
+
- Use formal academic tone unless the user indicates otherwise
|
|
205
|
+
- Maintain consistent terminology across sections
|
|
206
|
+
- Distinguish between the user's original analysis and source-derived information
|
|
207
|
+
- Follow the project's citation style (check the model's citationStyle field)
|
|
208
|
+
|
|
209
|
+
### Work Items
|
|
210
|
+
Work items in this project represent:
|
|
211
|
+
- **Section** (type: feature) — a section to draft or revise
|
|
212
|
+
- **Revision** (type: bug) — an issue to fix in the argument or content
|
|
213
|
+
- **Reference** (type: tech-debt) — a source to find or analyze
|
|
214
|
+
- **Task** (type: chore) — general administrative work
|
|
215
|
+
|
|
216
|
+
### Team Agents
|
|
217
|
+
Specialized agents may be available on the team:
|
|
218
|
+
- **Researcher** — deep analysis of sources, literature synthesis, evidence evaluation
|
|
219
|
+
- **Reviewer** — argument validation, gap detection, consistency checking
|
|
220
|
+
- **Editor** — style, clarity, grammar, voice consistency
|
|
221
|
+
|
|
222
|
+
Suggest delegation when a task would benefit from focused expertise. For example, delegate source analysis to the Researcher, or argument review to the Reviewer.
|
|
223
|
+
|
|
224
|
+
### Available Skills
|
|
225
|
+
- \`/outline\` — build or refine the paper's section structure
|
|
226
|
+
- \`/literature-review\` — analyze sources and link to claims (when available)
|
|
227
|
+
- \`/draft-section\` — write a section using outline + claims + sources (when available)
|
|
228
|
+
- \`/peer-review\` — validate argument structure and consistency (when available)
|
|
229
|
+
- \`/session-notes\` — summarize work done in this session`,
|
|
165
230
|
};
|
|
166
231
|
// =============================================================================
|
|
167
232
|
// Business Plan / Startup
|
|
@@ -68,6 +68,8 @@ export interface ProjectTypeConfig {
|
|
|
68
68
|
short: string;
|
|
69
69
|
full: string;
|
|
70
70
|
}>>;
|
|
71
|
-
/** Context line injected into the system prompt */
|
|
71
|
+
/** Context line injected into the system prompt (one-liner, deprecated — use systemPromptSection) */
|
|
72
72
|
systemPromptContext: string;
|
|
73
|
+
/** Rich multi-line system prompt section for the default agent. Takes precedence over systemPromptContext. */
|
|
74
|
+
systemPromptSection?: string;
|
|
73
75
|
}
|