@compilr-dev/sdk 0.9.24 → 0.9.26

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.
@@ -106,6 +106,15 @@ Specialized agents may be available:
106
106
  - **Architect** — system design, technical decisions
107
107
  - **PM** — requirements, backlog management, priorities
108
108
  Suggest delegation when a task would benefit from focused expertise.`,
109
+ tagline: 'Build a web app, API, CLI, or library — from idea to running code.',
110
+ bestFor: 'you have an idea and want compilr.dev to help you ship it.',
111
+ produces: [
112
+ 'Application model + entities',
113
+ 'PRD + architecture',
114
+ 'Working code (scaffolded)',
115
+ 'Backlog of features',
116
+ 'Session notes',
117
+ ],
109
118
  };
110
119
  // =============================================================================
111
120
  // General (blank slate)
@@ -134,6 +143,9 @@ You are assisting with a general-purpose project. Adapt your approach to whateve
134
143
  - Use work items to track tasks and progress
135
144
  - Use documents to store important artifacts
136
145
  - Suggest team agents if the project would benefit from specialization`,
146
+ tagline: 'An empty workspace — define your own workflow as you go.',
147
+ bestFor: "you don't see a fit above and want a blank slate.",
148
+ produces: ['Notes & documents', 'Conversations with agents', 'Whatever you build'],
137
149
  };
138
150
  // =============================================================================
139
151
  // Research Paper / Academic
@@ -288,6 +300,15 @@ Suggest delegation when a task would benefit from focused expertise. For example
288
300
  - \`/draft-section\` — write a section using outline + claims + sources (when available)
289
301
  - \`/peer-review\` — validate argument structure and consistency (when available)
290
302
  - \`/session-notes\` — summarize work done in this session`,
303
+ tagline: 'Write an academic paper, thesis, or research report — outline to bibliography.',
304
+ bestFor: "you're writing something with a literature review and citations.",
305
+ produces: [
306
+ 'Outline + abstract',
307
+ 'Literature review',
308
+ 'Drafted sections',
309
+ 'Bibliography (BibTeX-ready)',
310
+ 'Session notes',
311
+ ],
291
312
  };
292
313
  // =============================================================================
293
314
  // Business Plan / Startup
@@ -401,6 +422,15 @@ You are assisting with a business plan or startup project. Your role is to help
401
422
  - **Analyst** — market research, competitive intelligence, data analysis
402
423
  - **Strategist** — business model, go-to-market, positioning
403
424
  - **Writer** — pitch narrative, executive summary, investor communication`,
425
+ tagline: 'Build a business plan, market analysis, and pitch deck — from idea to investor-ready.',
426
+ bestFor: "you're planning a venture, raising money, or entering a new market.",
427
+ produces: [
428
+ 'Executive summary',
429
+ 'Market & competitor analysis',
430
+ 'Financial model',
431
+ 'Positioning matrix',
432
+ 'Pitch outline',
433
+ ],
404
434
  };
405
435
  // =============================================================================
406
436
  // Content / Blog / Marketing
@@ -528,6 +558,15 @@ This project uses a Brand Model that captures visual identity (logos, colors, fo
528
558
  - **Visual Director** — visual briefs from Brand Model guidelines
529
559
  - **Editor** — voice consistency, brand alignment, quality review
530
560
  Suggest delegation when a task benefits from focused expertise.`,
561
+ tagline: 'Plan and write articles, blog posts, and social content — at the pace of a publication.',
562
+ bestFor: "you're producing content on a calendar and want help shipping it.",
563
+ produces: [
564
+ 'Editorial calendar',
565
+ 'Article drafts',
566
+ 'Headlines & social variants',
567
+ 'SEO outlines',
568
+ 'Style guide',
569
+ ],
531
570
  };
532
571
  // =============================================================================
533
572
  // Technical Documentation
@@ -613,6 +652,15 @@ You are assisting with a technical documentation project. Your role is to help t
613
652
  - **Writer** — drafting documentation, tutorials, guides
614
653
  - **Editor** — clarity, consistency, grammar, readability
615
654
  - **Reviewer** — technical accuracy, completeness, correctness`,
655
+ tagline: 'Write API docs, user guides, and tutorials that read like a real product.',
656
+ bestFor: 'your project needs docs, or docs ARE the project.',
657
+ produces: [
658
+ 'Getting started guide',
659
+ 'API reference',
660
+ 'Tutorials',
661
+ 'Concept explanations',
662
+ 'Changelog drafts',
663
+ ],
616
664
  };
617
665
  // =============================================================================
618
666
  // Course / Training Material
@@ -725,6 +773,15 @@ This project uses a Curriculum Model that tracks the course structure: modules (
725
773
  - **Instructor** — curriculum design, sequencing, pedagogy
726
774
  - **Content Designer** — lesson planning, exercises, assessments
727
775
  - **Reviewer** — pedagogical quality, balance, difficulty calibration`,
776
+ tagline: 'Design a course, training program, or curriculum — from outcomes to assessments.',
777
+ bestFor: "you're teaching something and need to structure modules + lessons.",
778
+ produces: [
779
+ 'Curriculum outline',
780
+ 'Module + lesson plans',
781
+ 'Exercises & worked examples',
782
+ 'Assessments / quizzes',
783
+ 'Instructor notes',
784
+ ],
728
785
  };
729
786
  // =============================================================================
730
787
  // Book
@@ -838,4 +895,13 @@ This project uses a Book Model that tracks: chapters (with scenes), characters (
838
895
  - **Plotter** — story architecture, beats, pacing, plot threads
839
896
  - **Character Dev** — characters, arcs, relationships, dialogue voice
840
897
  - **Scene Writer** — scene construction, setting, POV, transitions`,
898
+ tagline: 'Plan and write a book — fiction or non-fiction, outline to manuscript.',
899
+ bestFor: "you're writing a book and want help with structure, characters, or chapters.",
900
+ produces: [
901
+ 'Outline + chapter map',
902
+ 'Character profiles (fiction)',
903
+ 'Drafted chapters',
904
+ 'Beat-by-beat structure',
905
+ 'Revision notes',
906
+ ],
841
907
  };
@@ -100,4 +100,15 @@ export interface ProjectTypeConfig {
100
100
  systemPromptContext: string;
101
101
  /** Rich multi-line system prompt section for the default agent. Takes precedence over systemPromptContext. */
102
102
  systemPromptSection?: string;
103
+ /** One-sentence value prop for the project-type picker. Punchier than
104
+ * `description`, written for someone who doesn't know the term yet.
105
+ * Used in the New Project / Import Project wizards. */
106
+ tagline?: string;
107
+ /** "Best when…" trigger phrase a user can self-recognize.
108
+ * Example: "you're starting from a literature review and need a paper". */
109
+ bestFor?: string;
110
+ /** Concrete outputs the user will produce in this project type. 3-5 short
111
+ * items shown as bullets in the picker's detail panel. Mined from
112
+ * documentTemplates / projectActions / domain models. */
113
+ produces?: string[];
103
114
  }
@@ -168,10 +168,11 @@ export const TOOL_USAGE_HINTS_MODULE = {
168
168
  export const PLATFORM_TOOL_HINTS_MODULE = {
169
169
  id: 'platform-tool-hints',
170
170
  name: 'Platform Tool Hints',
171
- estimatedTokens: 120,
171
+ estimatedTokens: 200,
172
172
  conditions: { enableMetaTools: true },
173
173
  content: `## Platform Tool Hints
174
174
 
175
+ - **CRITICAL — Filesystem vs Database**: Project documents (PRD, design, outline, analysis, plan, session-notes) and backlog items live in the **database**, not the filesystem. Use \`project_document_*\` and \`workitem_*\` tools — NEVER \`write_file\` / \`bash mkdir\` / \`edit\` for project artifacts. Source code uses filesystem tools as normal. See the "Filesystem vs Database (Hard Rule)" section below for the wrong-vs-right table.
175
176
  - **workitem_* vs todo_***: workitem_* tools manage PERSISTENT backlog items (database). todo_* tools manage ephemeral session tasks (footer display). Use workitem_claim/workitem_handoff for persistent ownership, todo_claim/todo_handoff for session tasks.
176
177
  - **project_id**: All project/workitem/document/plan tools default to the active project. Only pass project_id to target a different project.
177
178
  - **Plan status flow**: draft → approved → in_progress → completed. Any → abandoned. abandoned → draft.
@@ -206,7 +207,7 @@ Common operations:
206
207
  export const TOOL_USAGE_META_MODULE = {
207
208
  id: 'tool-usage-meta',
208
209
  name: 'Tool Usage (Meta)',
209
- estimatedTokens: 250,
210
+ estimatedTokens: 450,
210
211
  conditions: { enableMetaTools: true },
211
212
  content: `### Specialized Tools
212
213
 
@@ -221,20 +222,44 @@ Key categories:
221
222
  - **Runners**: run_tests, run_lint
222
223
  - **Anchors**: anchor_add, anchor_list, anchor_remove
223
224
 
224
- ### Document Storage (CRITICAL)
225
-
226
- Project documents (drafts, outlines, analyses, plans) are stored in the **database**, not the filesystem.
227
- - **Read**: \`project_document_get({ doc_type: "outline" })\` or \`project_document_list()\`
228
- - **Write (new)**: \`project_document_add({ doc_type: "outline", title: "...", content: "..." })\`
229
- - **Patch (update without reading)**: \`project_document_patch({ doc_type: "draft", operation: "append", content: "## New Section\\n..." })\`
230
- - Operations: \`append\`, \`prepend\`, \`replace_section\` (with \`section_heading\`)
231
- - Prefer patch over add when updating large documents — avoids reading the full content into context
232
- - Do NOT use write_file or edit for project documents always use these database tools
233
- - **Software doc_types**: prd, architecture, design, notes, plan
234
- - **Research doc_types**: outline, literature-review, abstract, methodology, bibliography
235
- - **Business doc_types**: executive-summary, market-analysis, financial-model, pitch
236
- - **Content doc_types**: editorial-calendar, article
237
- - **General doc_types**: draft, review, session-notes, chapter, notes`,
225
+ ### CRITICAL: Filesystem vs Database (Hard Rule)
226
+
227
+ **Project documents and project data live in the DATABASE. Source code lives in the FILESYSTEM. Never mix these.**
228
+
229
+ This is a non-negotiable project standard. Using filesystem tools (\`write_file\`, \`edit\`, \`bash mkdir\`) for project artifacts is a violation that breaks the integration with the rest of the workspace (no Documents panel visibility, no agent shared context, no exports, no version tracking).
230
+
231
+ **Decision heuristic ask before writing:**
232
+
233
+ 1. *"Is this source code or a config file (e.g., \`src/main.ts\`, \`package.json\`, \`.env\`)?"*
234
+ If YES, use filesystem tools (\`write_file\`, \`edit\`, \`bash\`).
235
+ 2. *"Is this a project artifact (PRD, design doc, draft, outline, analysis, plan, backlog item, session notes)?"*
236
+ If YES, you **MUST** use the corresponding database tool (\`project_document_*\`, \`workitem_*\`). Filesystem ops for these are forbidden.
237
+
238
+ **Wrong vs Right:**
239
+
240
+ | Task | ❌ WRONG | ✅ RIGHT |
241
+ |------|----------|---------|
242
+ | Create PRD | \`bash mkdir -p .compilr/requirements\` + \`write_file ".compilr/PRD.md"\` | \`project_document_add({ doc_type: "prd", title: "...", content: "..." })\` |
243
+ | Read design doc | \`read_file "docs/design.md"\` | \`project_document_get({ doc_type: "design" })\` |
244
+ | Update outline | \`edit "outline.md" ...\` | \`project_document_patch({ doc_type: "outline", operation: "append", content: "..." })\` |
245
+ | Save session notes | \`write_file "notes.md" ...\` | \`project_document_add({ doc_type: "session-notes", ... })\` |
246
+ | List backlog | \`read_file "backlog.csv"\` | \`workitem_query()\` |
247
+ | Add backlog item | \`edit "backlog.md" ...\` | \`workitem_add({ ... })\` |
248
+
249
+ **Operations:**
250
+ - **Read**: \`project_document_get({ doc_type: "..." })\` or \`project_document_list()\`
251
+ - **Write (new)**: \`project_document_add({ doc_type: "...", title: "...", content: "..." })\`
252
+ - **Patch (update without reading)**: \`project_document_patch({ doc_type: "...", operation: "append" | "prepend" | "replace_section", content: "...", section_heading?: "..." })\`
253
+ - Prefer patch over add when updating large documents — avoids loading full content into context
254
+
255
+ **Always query before writing.** Before adding a document or work item, run \`project_document_list()\` or \`workitem_query()\` first to check for existing entries — avoids duplicates.
256
+
257
+ **doc_types by project type:**
258
+ - **Software**: prd, architecture, design, notes, plan
259
+ - **Research**: outline, literature-review, abstract, methodology, bibliography
260
+ - **Business**: executive-summary, market-analysis, financial-model, pitch
261
+ - **Content**: editorial-calendar, article
262
+ - **General**: draft, review, session-notes, chapter, notes`,
238
263
  };
239
264
  /**
240
265
  * Token delegation module - always included
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/sdk",
3
- "version": "0.9.24",
3
+ "version": "0.9.26",
4
4
  "description": "Universal agent runtime for building AI-powered applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",