@compilr-dev/sdk 0.10.41 → 0.11.0

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.
@@ -60,10 +60,14 @@ When you have enough information:
60
60
  - Nice-to-haves (type: feature, priority: medium/low)
61
61
  - Technical setup tasks (type: chore, priority: high)
62
62
  - Known risks/unknowns (type: tech-debt, priority: medium)
63
- 4. Update the PRD.md file with gathered requirements:
64
- - Use the edit tool to update PRD.md (located in .compilr/requirements/PRD.md or {project}-docs/00-requirements/PRD.md)
63
+ 4. Save the PRD to the project DATABASE (never a file):
64
+ - Check for an existing PRD first: project_document_get({ doc_type: "prd" })
65
+ - If none exists, create it:
66
+ project_document_add({ doc_type: "prd", title: "Product Requirements Document", content: "<full markdown>" })
67
+ - If one exists, update it section by section:
68
+ project_document_patch({ doc_type: "prd", operation: "replace_section", section_heading: "## <heading>", content: "..." })
65
69
  - Fill in: Problem Statement, Goals, User Stories, Functional Requirements
66
- - Keep the existing structure, just replace placeholder text
70
+ - CRITICAL: project documents live in the database. NEVER use write_file / edit / bash mkdir to create a PRD.md file on disk.
67
71
  5. Present the backlog and PRD summary to user for confirmation
68
72
  - If CHORE-001 was added, mention: "Run /scaffold to create the project foundation"
69
73
  6. If the project involves managing entities (CRUD operations on things like users, orders, products):
@@ -83,7 +87,7 @@ When you have enough information:
83
87
  ✓ MVP features are defined
84
88
  ✓ Backlog has 5-15 items
85
89
  ✓ For fresh projects: CHORE-001 scaffolding item is first (critical priority)
86
- ✓ PRD.md is populated with requirements
90
+ ✓ PRD saved to the database (doc_type: prd) — not written to a file
87
91
  ✓ If entity-based: user informed about /scaffold auto-generation
88
92
  ✓ User has approved the backlog`,
89
93
  tags: ['planning', 'requirements'],
@@ -440,11 +444,12 @@ export const prdSkill = defineSkill({
440
444
  - "Read current PRD"
441
445
  - "Identify section to update"
442
446
  - "Gather updates"
443
- - "Write updated PRD"
447
+ - "Save updated PRD"
444
448
 
445
- 2. Read the existing PRD.md:
446
- - Location: .compilr/requirements/PRD.md or {project}-docs/00-requirements/PRD.md
447
- - If no PRD exists, inform the user to run /design first
449
+ 2. Read the existing PRD from the project DATABASE:
450
+ - Use project_document_get({ doc_type: "prd" })
451
+ - If it returns no document, inform the user to run /design first
452
+ - The PRD is a database document, NOT a file — never read PRD.md from disk
448
453
 
449
454
  3. Present current PRD sections to user using ask_user_simple:
450
455
  - Question: "Which section would you like to update?"
@@ -482,21 +487,23 @@ Based on section selected:
482
487
  - What to add/change
483
488
  - What to remove
484
489
  - Any clarifications
485
- 3. Use the edit tool to update PRD.md
490
+ 3. Save the change to the database with project_document_patch:
491
+ - project_document_patch({ doc_type: "prd", operation: "replace_section", section_heading: "## <heading>", content: "..." })
492
+ - Use operation "append" / "prepend" to add new content without replacing
486
493
  4. Show the updated section for confirmation
487
494
 
488
495
  ## RULES
489
496
 
490
- 1. ALWAYS read the existing PRD first
497
+ 1. ALWAYS read the existing PRD first (project_document_get)
491
498
  2. Use ask_user_simple for section selection
492
499
  3. Use ask_user for gathering detailed updates
493
- 4. Preserve sections you're not updating
494
- 5. Use edit tool (not write_file) to update specific sections
500
+ 4. Preserve sections you're not updating (patch one section at a time)
501
+ 5. CRITICAL: the PRD lives in the database. Save with project_document_patch / project_document_add — NEVER write_file / edit / a PRD.md file on disk
495
502
  6. Keep formatting consistent with existing document
496
503
  7. If scope changes affect backlog, suggest running /refine
497
504
 
498
505
  ## COMPLETION CRITERIA
499
- ✓ PRD.md is updated with changes
506
+ ✓ PRD is updated in the database (doc_type: prd)
500
507
  ✓ User has reviewed the updates
501
508
  ✓ Related backlog updates are suggested if needed`,
502
509
  tags: ['planning', 'requirements'],
@@ -532,7 +539,7 @@ export const sessionNotesSkill = defineSkill({
532
539
 
533
540
  ## SESSION NOTE STRUCTURE
534
541
 
535
- Create a markdown file with this structure:
542
+ Compose a markdown note with this structure (it will be saved to the database, not a file):
536
543
 
537
544
  \`\`\`markdown
538
545
  # Session Note - {{title}}
@@ -573,13 +580,12 @@ Create a markdown file with this structure:
573
580
  *Generated by /note*
574
581
  \`\`\`
575
582
 
576
- ## FILE LOCATION
583
+ ## WHERE TO SAVE
577
584
 
578
- Save the note to:
579
- - Single repo: \`.compilr/sessions/{{YYYY-MM-DD}}-{{slug}}.md\`
580
- - Two repo: \`{{project}}-docs/04-session-notes/{{YYYY-MM-DD}}-{{slug}}.md\`
585
+ Save the note to the project DATABASE with:
586
+ project_document_add({ doc_type: "notes", title: "Session Note — {{title}}", content: "<full markdown>" })
581
587
 
582
- Create the directory if it doesn't exist.
588
+ CRITICAL: session notes are database documents. NEVER write a .md file (no write_file / edit / bash mkdir, no .compilr/sessions/ or {{project}}-docs/ paths).
583
589
 
584
590
  ## RULES
585
591
 
@@ -591,7 +597,7 @@ Create the directory if it doesn't exist.
591
597
  6. If user provides a title, use it; otherwise generate one from the summary
592
598
 
593
599
  ## COMPLETION CRITERIA
594
- ✓ Session note file is created
600
+ ✓ Session note saved to the database (doc_type: notes)
595
601
  ✓ All sections are filled in
596
602
  ✓ User has reviewed the note`,
597
603
  tags: ['documentation', 'session'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/sdk",
3
- "version": "0.10.41",
3
+ "version": "0.11.0",
4
4
  "description": "Universal agent runtime for building AI-powered applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",