@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.
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, peerReviewSkill, researchScaffoldSkill, businessVisionSkill, marketAnalysisSkill, competitorAnalysisSkill, financialModelSkill, pitchOutlineSkill, businessReviewSkill, brandSetupSkill, contentStrategySkill, contentCalendarSkill, createContentSkill, contentReviewSkill, } from './skills/index.js';
64
+ export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, peerReviewSkill, researchScaffoldSkill, businessVisionSkill, marketAnalysisSkill, competitorAnalysisSkill, financialModelSkill, pitchOutlineSkill, businessReviewSkill, brandSetupSkill, contentStrategySkill, contentCalendarSkill, createContentSkill, contentReviewSkill, curriculumDesignSkill, lessonPlanSkill, assessmentDesignSkill, courseReviewSkill, bookOutlineSkill, characterDesignSkill, plotThreadsSkill, sceneBreakdownSkill, bookReviewSkill, } 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, getEnrichedProjectTypeConfig, getProjectTypesByCategory, generalConfig, softwareConfig, researchConfig, businessPlanConfig, contentConfig, techDocsConfig, courseConfig, ACTION_META_REGISTRY, SKILL_META_REGISTRY, resolveActionMeta, getSkillMeta, getAllSkillMeta, } 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, peerReviewSkill, researchScaffoldSkill, businessVisionSkill, marketAnalysisSkill, competitorAnalysisSkill, financialModelSkill, pitchOutlineSkill, businessReviewSkill, brandSetupSkill, contentStrategySkill, contentCalendarSkill, createContentSkill, contentReviewSkill, } from './skills/index.js';
142
+ export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, peerReviewSkill, researchScaffoldSkill, businessVisionSkill, marketAnalysisSkill, competitorAnalysisSkill, financialModelSkill, pitchOutlineSkill, businessReviewSkill, brandSetupSkill, contentStrategySkill, contentCalendarSkill, createContentSkill, contentReviewSkill, curriculumDesignSkill, lessonPlanSkill, assessmentDesignSkill, courseReviewSkill, bookOutlineSkill, characterDesignSkill, plotThreadsSkill, sceneBreakdownSkill, bookReviewSkill, } from './skills/index.js';
143
143
  // =============================================================================
144
144
  // Contextual Actions (skill invocations with context)
145
145
  // =============================================================================
@@ -120,6 +120,8 @@ export class SQLiteDocumentRepository {
120
120
  'research-model': 0,
121
121
  'business-model': 0,
122
122
  'brand-model': 0,
123
+ 'curriculum-model': 0,
124
+ 'book-model': 0,
123
125
  };
124
126
  for (const row of results) {
125
127
  counts[row.doc_type] = row.count;
@@ -18,6 +18,8 @@ const DOC_TYPE_ENUM = [
18
18
  'research-model',
19
19
  'business-model',
20
20
  'brand-model',
21
+ 'curriculum-model',
22
+ 'book-model',
21
23
  ];
22
24
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
23
25
  export function createDocumentTools(config) {
@@ -10,7 +10,7 @@
10
10
  * - Data models: camelCase properties (output types)
11
11
  * - Input types: snake_case properties (matching CLI tool input schemas)
12
12
  */
13
- export type ProjectType = 'general' | 'web' | 'cli' | 'library' | 'api' | 'research' | 'business-plan' | 'content' | 'tech-docs' | 'course';
13
+ export type ProjectType = 'general' | 'web' | 'cli' | 'library' | 'api' | 'research' | 'business-plan' | 'content' | 'tech-docs' | 'course' | 'book';
14
14
  export type ProjectStatus = 'active' | 'paused' | 'completed' | 'archived';
15
15
  export type RepoPattern = 'single' | 'two-repo';
16
16
  export type WorkflowMode = 'flexible' | 'guided';
@@ -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' | 'research-model' | 'business-model' | 'brand-model';
22
+ export type DocumentType = 'prd' | 'architecture' | 'design' | 'notes' | 'plan' | 'app-model' | 'research-model' | 'business-model' | 'brand-model' | 'curriculum-model' | 'book-model';
23
23
  export type PlanStatus = 'draft' | 'approved' | 'in_progress' | 'completed' | 'abandoned';
24
24
  export interface Project {
25
25
  id: number;
@@ -64,6 +64,17 @@ export const ACTION_META_REGISTRY = {
64
64
  'content-calendar': { id: 'content-calendar', label: 'Calendar', icon: 'Calendar', description: 'Plan content' },
65
65
  'create-content': { id: 'create-content', label: 'Create', icon: 'PenTool', description: 'Write content' },
66
66
  'content-review': { id: 'content-review', label: 'Review', icon: 'CheckCircle', description: 'Check quality' },
67
+ // ── Book actions ─────────────────────────────────────────────────────────
68
+ 'book-outline': { id: 'book-outline', label: 'Outline', icon: 'BookOpen', description: 'Plan structure' },
69
+ 'character-design': { id: 'character-design', label: 'Characters', icon: 'Users', description: 'Build cast' },
70
+ 'plot-threads': { id: 'plot-threads', label: 'Threads', icon: 'GitBranch', description: 'Map plot lines' },
71
+ 'scene-breakdown': { id: 'scene-breakdown', label: 'Scenes', icon: 'Layers', description: 'Detail scenes' },
72
+ 'book-review': { id: 'book-review', label: 'Review', icon: 'CheckCircle', description: 'Structure check' },
73
+ // ── Course / Training actions ─────────────────────────────────────────────
74
+ 'curriculum-design': { id: 'curriculum-design', label: 'Curriculum', icon: 'School', description: 'Define structure' },
75
+ 'lesson-plan': { id: 'lesson-plan', label: 'Lessons', icon: 'BookOpen', description: 'Plan lessons' },
76
+ 'assessment-design': { id: 'assessment-design', label: 'Assess', icon: 'ClipboardCheck', description: 'Create assessments' },
77
+ 'course-review': { id: 'course-review', label: 'Review', icon: 'CheckCircle', description: 'Quality check' },
67
78
  'financial-model': { id: 'financial-model', label: 'Financials', icon: 'DollarSign', description: 'Build projections' },
68
79
  'pitch-outline': { id: 'pitch-outline', label: 'Pitch', icon: 'Rocket', description: 'Structure a pitch' },
69
80
  'business-review': { id: 'business-review', label: 'Review', icon: 'ShieldCheck', description: 'Validate the plan' },
@@ -9,3 +9,4 @@ export declare const businessPlanConfig: ProjectTypeConfig;
9
9
  export declare const contentConfig: ProjectTypeConfig;
10
10
  export declare const techDocsConfig: ProjectTypeConfig;
11
11
  export declare const courseConfig: ProjectTypeConfig;
12
+ export declare const bookConfig: ProjectTypeConfig;
@@ -577,47 +577,47 @@ export const courseConfig = {
577
577
  {
578
578
  id: 'curriculum',
579
579
  label: 'Curriculum',
580
- description: 'Define learning objectives',
580
+ description: 'Define modules and learning objectives',
581
581
  completionCheck: 'has-document',
582
- completionDocType: 'syllabus',
582
+ completionDocType: 'curriculum-model',
583
583
  },
584
584
  {
585
585
  id: 'lessons',
586
- label: 'Lessons',
587
- description: 'Create lesson content',
586
+ label: 'Lesson Plans',
587
+ description: 'Break modules into lessons',
588
588
  completionCheck: 'has-workitems',
589
589
  },
590
590
  {
591
- id: 'exercises',
592
- label: 'Exercises',
593
- description: 'Create practice exercises',
591
+ id: 'content',
592
+ label: 'Content',
593
+ description: 'Write lesson materials',
594
594
  completionCheck: 'has-workitems',
595
595
  },
596
596
  {
597
597
  id: 'assessment',
598
598
  label: 'Assessment',
599
- description: 'Create quizzes and tests',
599
+ description: 'Create exercises and quizzes',
600
600
  completionCheck: 'manual',
601
601
  },
602
- ],
603
- suggestedAgents: [
604
- { role: 'instructor', label: 'Instructor', description: 'Course design and lesson planning' },
605
602
  {
606
- role: 'content-designer',
607
- label: 'Content Designer',
608
- description: 'Exercise and assessment creation',
603
+ id: 'review',
604
+ label: 'Review',
605
+ description: 'Pedagogical quality review',
606
+ completionCheck: 'manual',
609
607
  },
610
- { role: 'reviewer', label: 'Reviewer', description: 'Content review and quality assurance' },
608
+ ],
609
+ suggestedAgents: [
610
+ { role: 'instructor', label: 'Instructor', description: 'Curriculum design, sequencing, pedagogy' },
611
+ { role: 'content-designer', label: 'Content Designer', description: 'Lesson planning, exercises, assessments' },
612
+ { role: 'reviewer', label: 'Reviewer', description: 'Pedagogical quality, balance, coverage' },
611
613
  ],
612
614
  documentTemplates: [
613
- { type: 'syllabus', label: 'Syllabus', description: 'Course overview and objectives' },
614
- { type: 'lesson', label: 'Lesson', description: 'Lesson content' },
615
- { type: 'exercise', label: 'Exercise', description: 'Practice exercise' },
616
- { type: 'assessment', label: 'Assessment', description: 'Quiz or test' },
615
+ { type: 'curriculum-model', label: 'Curriculum', description: 'Course structure, modules, lessons, assessments' },
616
+ { type: 'notes', label: 'Lesson Notes', description: 'Lesson content and materials' },
617
617
  { type: 'session-notes', label: 'Session Notes', description: 'Summary of work done' },
618
618
  ],
619
- projectActions: ['session-notes'],
620
- workItemActions: ['explain'],
619
+ projectActions: ['curriculum-design', 'lesson-plan', 'assessment-design', 'course-review', 'session-notes'],
620
+ workItemActions: ['refine-item', 'explain'],
621
621
  workItemLabels: {
622
622
  feature: { short: 'LS', full: 'Lesson' },
623
623
  bug: { short: 'FX', full: 'Fix' },
@@ -625,34 +625,121 @@ export const courseConfig = {
625
625
  chore: { short: 'TK', full: 'Task' },
626
626
  },
627
627
  systemPromptContext: 'This is an educational project. The user is creating a course or training material. Focus on clear explanations, progressive complexity, and effective learning design.',
628
- systemPromptSection: `## Project Context: Course / Training Material
628
+ systemPromptSection: `## Project Context: Course / Training
629
+
630
+ You are assisting with an educational project. Your role is to help the user create an effective, well-structured curriculum. You are a **curriculum designer**, not a subject matter expert — the user provides domain knowledge via the Knowledge Base.
629
631
 
630
- You are assisting with an educational project. Your role is to help the user create an effective, well-structured learning experience.
632
+ ### Curriculum Model
633
+ This project uses a Curriculum Model that tracks the course structure: modules (with learning objectives), lessons (typed: theory, hands-on, demo, discussion, reading), and assessments (quiz, exercise, project). Always read the model before making suggestions.
631
634
 
632
635
  ### Workflow
633
- 1. **Curriculum Design** — Define learning objectives, prerequisites, progression
634
- 2. **Module Structure** — Organize into modules/lessons with clear scope
635
- 3. **Content Creation** — Write lessons with explanations, examples, visuals
636
- 4. **Exercises** — Create practice activities, coding challenges, projects
637
- 5. **Assessment** — Design quizzes, tests, rubrics
638
- 6. **Review** — Pedagogical review, difficulty calibration, accessibility
636
+ 1. **Curriculum Design** — Define modules, learning objectives, prerequisites, progression
637
+ 2. **Lesson Plans** — Break modules into typed lessons with time estimates
638
+ 3. **Content** — Write lesson materials (user provides domain expertise, you help structure)
639
+ 4. **Assessment** — Design quizzes, exercises, projects linked to objectives
640
+ 5. **Review** — Check pedagogical quality, balance, coverage
639
641
 
640
642
  ### Work Items
641
- - **Lesson** (type: feature) — a lesson or module to create
642
- - **Fix** (type: bug) — corrections, confusing explanations to clarify
643
- - **Refactor** (type: tech-debt) — restructuring content flow or difficulty curve
644
- - **Task** (type: chore) — formatting, media assets, publishing
643
+ - **Lesson** (type: feature) — a lesson to develop
644
+ - **Fix** (type: bug) — corrections, unclear explanations
645
+ - **Refactor** (type: tech-debt) — restructuring content flow
646
+ - **Task** (type: chore) — formatting, media, publishing
647
+
648
+ ### Pedagogical Principles
649
+ - Every module needs clear learning objectives (what can the student DO after?)
650
+ - Balance theory and practice — at least 40% hands-on
651
+ - Build progressively — prerequisites before advanced concepts
652
+ - Assess what you teach — every objective should be testable
653
+ - Vary lesson types to maintain engagement
654
+ - Check time balance — modules should be roughly similar in length
645
655
 
646
- ### Writing Conventions
647
- - Start every lesson with clear learning objectives (use Bloom's taxonomy)
648
- - Build knowledge progressively prerequisites before advanced concepts
649
- - Include hands-on exercises for every concept taught
650
- - Use varied examples — abstract + concrete, simple + complex
651
- - Provide "check your understanding" moments before moving forward
652
- - Consider different learning styles (reading, doing, watching)
656
+ ### Team Agents
657
+ - **Instructor** curriculum design, sequencing, pedagogy
658
+ - **Content Designer**lesson planning, exercises, assessments
659
+ - **Reviewer** pedagogical quality, balance, difficulty calibration`,
660
+ };
661
+ // =============================================================================
662
+ // Book
663
+ // =============================================================================
664
+ export const bookConfig = {
665
+ id: 'book',
666
+ label: 'Book',
667
+ description: 'Plan and write fiction or non-fiction books',
668
+ icon: 'BookOpen',
669
+ category: 'writing',
670
+ phases: [
671
+ {
672
+ id: 'outline',
673
+ label: 'Outline',
674
+ description: 'Define structure, beats, and chapters',
675
+ completionCheck: 'has-document',
676
+ completionDocType: 'book-model',
677
+ },
678
+ {
679
+ id: 'characters',
680
+ label: 'Characters',
681
+ description: 'Build character profiles and relationships',
682
+ completionCheck: 'has-workitems',
683
+ },
684
+ {
685
+ id: 'scenes',
686
+ label: 'Scenes',
687
+ description: 'Break chapters into scenes',
688
+ completionCheck: 'has-workitems',
689
+ },
690
+ { id: 'draft', label: 'Draft', description: 'Write chapter drafts', completionCheck: 'has-workitems' },
691
+ { id: 'review', label: 'Review', description: 'Structural review', completionCheck: 'manual' },
692
+ ],
693
+ suggestedAgents: [
694
+ { role: 'plotter', label: 'Plotter', description: 'Story architecture, beats, pacing, plot threads' },
695
+ { role: 'character-dev', label: 'Character Dev', description: 'Characters, arcs, relationships, voice' },
696
+ { role: 'scene-writer', label: 'Scene Writer', description: 'Scene construction, setting, POV, transitions' },
697
+ ],
698
+ documentTemplates: [
699
+ { type: 'book-model', label: 'Book Model', description: 'Story structure, characters, plot threads, beats' },
700
+ { type: 'notes', label: 'Chapter Draft', description: 'Chapter content' },
701
+ { type: 'session-notes', label: 'Session Notes', description: 'Summary of work done' },
702
+ ],
703
+ projectActions: ['book-outline', 'character-design', 'plot-threads', 'scene-breakdown', 'book-review', 'session-notes'],
704
+ workItemActions: ['refine-item', 'explain'],
705
+ workItemLabels: {
706
+ feature: { short: 'CH', full: 'Chapter' },
707
+ bug: { short: 'RV', full: 'Revision' },
708
+ 'tech-debt': { short: 'RS', full: 'Research' },
709
+ chore: { short: 'TK', full: 'Task' },
710
+ },
711
+ systemPromptContext: 'This is a book project. The user is writing a fiction or non-fiction book. Focus on narrative structure, character development, and story pacing.',
712
+ systemPromptSection: `## Project Context: Book
713
+
714
+ You are assisting with a book project. Your role is to help the user plan and structure their book — fiction or non-fiction. You are a **story architect**, helping with structure, not writing prose for the user.
715
+
716
+ ### Book Model
717
+ This project uses a Book Model that tracks: chapters (with scenes), characters (with relationships and arcs), plot threads, themes, settings, and a beat sheet (story structure). Always read the model before making suggestions.
718
+
719
+ ### Workflow
720
+ 1. **Outline** — Define the book's structure using a story template (Hero's Journey, Three-Act, etc.)
721
+ 2. **Characters** — Build character profiles, arcs, and relationship maps
722
+ 3. **Plot Threads** — Define main plot and subplots, map to chapters
723
+ 4. **Scenes** — Break chapters into detailed scenes with characters, settings, and threads
724
+ 5. **Draft** — User writes chapter content (you help structure, not generate prose)
725
+ 6. **Review** — Check structural integrity: beat coverage, character arc completion, plot thread balance
726
+
727
+ ### Work Items
728
+ - **Chapter** (type: feature) — a chapter to write
729
+ - **Revision** (type: bug) — structural issues to fix
730
+ - **Research** (type: tech-debt) — worldbuilding, reference material
731
+ - **Task** (type: chore) — formatting, notes, organization
732
+
733
+ ### Storytelling Principles
734
+ - Every scene should advance at least one plot thread
735
+ - Characters need arcs — they should change by the end
736
+ - Balance showing vs telling
737
+ - Maintain consistent POV within scenes
738
+ - Pacing: alternate tension and relief
739
+ - Subplots should connect to the main theme
653
740
 
654
741
  ### Team Agents
655
- - **Instructor** — curriculum design, lesson planning, pedagogy
656
- - **Writer** — content creation, explanations, narratives
657
- - **Reviewer** — accuracy, difficulty assessment, completeness`,
742
+ - **Plotter** — story architecture, beats, pacing, plot threads
743
+ - **Character Dev** — characters, arcs, relationships, dialogue voice
744
+ - **Scene Writer** — scene construction, setting, POV, transitions`,
658
745
  };
@@ -6,7 +6,7 @@
6
6
  * for all types.
7
7
  */
8
8
  export type { ProjectTypeConfig, ProjectPhase, SuggestedAgent, DocumentTemplate, ActionMeta, SkillMeta, } from './types.js';
9
- export { generalConfig, softwareConfig, researchConfig, businessPlanConfig, contentConfig, techDocsConfig, courseConfig, } from './configs.js';
9
+ export { generalConfig, softwareConfig, researchConfig, businessPlanConfig, contentConfig, techDocsConfig, courseConfig, bookConfig, } from './configs.js';
10
10
  export { SKILL_META_REGISTRY, getSkillMeta, getAllSkillMeta } from './skill-meta.js';
11
11
  export { ACTION_META_REGISTRY, resolveActionMeta } from './action-meta.js';
12
12
  import type { ProjectTypeConfig } from './types.js';
@@ -6,12 +6,12 @@
6
6
  * for all types.
7
7
  */
8
8
  // Configs
9
- export { generalConfig, softwareConfig, researchConfig, businessPlanConfig, contentConfig, techDocsConfig, courseConfig, } from './configs.js';
9
+ export { generalConfig, softwareConfig, researchConfig, businessPlanConfig, contentConfig, techDocsConfig, courseConfig, bookConfig, } from './configs.js';
10
10
  // Action & Skill metadata
11
11
  export { SKILL_META_REGISTRY, getSkillMeta, getAllSkillMeta } from './skill-meta.js';
12
12
  export { ACTION_META_REGISTRY, resolveActionMeta } from './action-meta.js';
13
13
  import { resolveActionMeta } from './action-meta.js';
14
- import { generalConfig, softwareConfig, researchConfig, businessPlanConfig, contentConfig, techDocsConfig, courseConfig, } from './configs.js';
14
+ import { generalConfig, softwareConfig, researchConfig, businessPlanConfig, contentConfig, techDocsConfig, courseConfig, bookConfig, } from './configs.js';
15
15
  /** All registered project types */
16
16
  export const PROJECT_TYPES = [
17
17
  softwareConfig,
@@ -21,6 +21,7 @@ export const PROJECT_TYPES = [
21
21
  contentConfig,
22
22
  techDocsConfig,
23
23
  courseConfig,
24
+ bookConfig,
24
25
  ];
25
26
  /** Type aliases — legacy or alternative IDs that map to a canonical config */
26
27
  const TYPE_ALIASES = {
@@ -119,6 +119,17 @@ export const SKILL_META_REGISTRY = {
119
119
  'content-calendar': { id: 'content-calendar', label: 'Content Calendar', description: 'Plan content for a period', icon: 'Calendar', category: 'planning' },
120
120
  'create-content': { id: 'create-content', label: 'Create Content', description: 'Write copy and visual brief', icon: 'PenTool', category: 'development' },
121
121
  'content-review': { id: 'content-review', label: 'Content Review', description: 'Review for brand consistency', icon: 'CheckCircle', category: 'analysis' },
122
+ // ── Course / Training Skills ─────────────────────────────────────────────
123
+ 'curriculum-design': { id: 'curriculum-design', label: 'Curriculum', description: 'Define modules and learning objectives', icon: 'School', category: 'planning' },
124
+ 'lesson-plan': { id: 'lesson-plan', label: 'Lesson Plan', description: 'Break modules into lessons', icon: 'BookOpen', category: 'planning' },
125
+ 'assessment-design': { id: 'assessment-design', label: 'Assessment', description: 'Create quizzes and exercises', icon: 'ClipboardCheck', category: 'planning' },
126
+ 'course-review': { id: 'course-review', label: 'Course Review', description: 'Pedagogical quality check', icon: 'CheckCircle', category: 'analysis' },
127
+ // ── Book Skills ──────────────────────────────────────────────────────────
128
+ 'book-outline': { id: 'book-outline', label: 'Book Outline', description: 'Define structure, beats, and chapters', icon: 'BookOpen', category: 'planning' },
129
+ 'character-design': { id: 'character-design', label: 'Characters', description: 'Build character profiles and relationships', icon: 'Users', category: 'planning' },
130
+ 'plot-threads': { id: 'plot-threads', label: 'Plot Threads', description: 'Define and track narrative threads', icon: 'GitBranch', category: 'planning' },
131
+ 'scene-breakdown': { id: 'scene-breakdown', label: 'Scenes', description: 'Break chapters into scenes', icon: 'Layers', category: 'development' },
132
+ 'book-review': { id: 'book-review', label: 'Book Review', description: 'Structural review of the book', icon: 'CheckCircle', category: 'analysis' },
122
133
  // ── Builtin Skills (agents library) ──────────────────────────────────────
123
134
  'code-review': {
124
135
  id: 'code-review',
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Book Skills
3
+ *
4
+ * book-outline, character-design, plot-threads, scene-breakdown, book-review
5
+ */
6
+ export declare const bookOutlineSkill: import("@compilr-dev/agents").Skill;
7
+ export declare const characterDesignSkill: import("@compilr-dev/agents").Skill;
8
+ export declare const plotThreadsSkill: import("@compilr-dev/agents").Skill;
9
+ export declare const sceneBreakdownSkill: import("@compilr-dev/agents").Skill;
10
+ export declare const bookReviewSkill: import("@compilr-dev/agents").Skill;
@@ -0,0 +1,195 @@
1
+ /**
2
+ * Book Skills
3
+ *
4
+ * book-outline, character-design, plot-threads, scene-breakdown, book-review
5
+ */
6
+ import { defineSkill } from '@compilr-dev/agents';
7
+ export const bookOutlineSkill = defineSkill({
8
+ name: 'book-outline',
9
+ description: 'Define book structure — beats, chapters, and story template',
10
+ prompt: `You are in BOOK OUTLINE MODE. Help the user structure their book.
11
+
12
+ ## Step 1: Book Overview
13
+ 1. Use \`book_model_get\` scope: "overview" to check existing state
14
+ 2. Ask: title, genre, mode (fiction/non-fiction), logline (one sentence), target word count
15
+ 3. Save: \`book_model_update\` op: "set_book_info"
16
+
17
+ ## Step 2: Choose Story Structure
18
+ Ask which template to use (or custom):
19
+ - **Three-Act Structure** — Setup, Confrontation, Resolution
20
+ - **Hero's Journey** — 12 stages from Ordinary World to Return
21
+ - **Save the Cat** — 15 beats (Opening Image to Final Image)
22
+ - **Seven-Point** — Hook, Plot Turns, Pinch Points, Midpoint, Resolution
23
+ - **Kishōtenketsu** — Introduction, Development, Twist, Conclusion
24
+ - **Non-fiction: Argument** — Thesis, Evidence, Counter, Synthesis
25
+ - **Non-fiction: Transformation** — Where You Are, Why Stuck, Framework, Apply, Where You'll Be
26
+ - **Custom** — user defines their own beats
27
+
28
+ Save beats: \`book_model_update\` op: "beat_add" for each
29
+
30
+ ## Step 3: Chapter Breakdown
31
+ Map beats to chapters:
32
+ - Each major beat gets at least one chapter
33
+ - Suggest chapter count based on target word count
34
+ - For each chapter: title, synopsis, which beat it fulfills
35
+
36
+ Save: \`book_model_update\` op: "chapter_add" for each
37
+
38
+ ## Step 4: Generate Work Items
39
+ Create one "Chapter" work item per chapter.
40
+
41
+ ## Rules
42
+ - Interactive — discuss structure before committing
43
+ - For fiction: ask about POV style (first/third, single/multiple)
44
+ - For non-fiction: ask about the core argument or transformation
45
+ - Beat percentages are guidelines, not rigid rules`,
46
+ tags: ['book', 'planning', 'structure'],
47
+ });
48
+ export const characterDesignSkill = defineSkill({
49
+ name: 'character-design',
50
+ description: 'Build character profiles, arcs, and relationship maps',
51
+ prompt: `You are in CHARACTER DESIGN MODE. Help the user build their cast.
52
+
53
+ ## Step 1: Read Context
54
+ 1. \`book_model_get\` scope: "characters" for existing characters
55
+ 2. \`book_model_get\` scope: "overview" for book context
56
+
57
+ ## Step 2: Define Characters
58
+ For each character ask:
59
+ - Name, role (protagonist/antagonist/supporting/minor)
60
+ - Brief description
61
+ - Arc: how do they change from beginning to end?
62
+ - Key traits, motivations, flaws
63
+
64
+ Save: \`book_model_update\` op: "character_add"
65
+
66
+ ## Step 3: Map Relationships
67
+ For each significant relationship:
68
+ - Who relates to whom?
69
+ - Type: ally, rival, mentor, family, love, colleague
70
+ - Optional label for nuance
71
+
72
+ Save: \`book_model_update\` op: "character_update" with relationships
73
+
74
+ ## Step 4: Scene Appearances
75
+ Ask which chapters/scenes each character appears in.
76
+ This feeds the Character Map visualization.
77
+
78
+ ## Rules
79
+ - Protagonist needs a clear arc (internal change)
80
+ - Antagonist should have understandable motivations
81
+ - Every character should serve the story — no passengers
82
+ - For non-fiction: "characters" are key concepts with relationships`,
83
+ tags: ['book', 'characters'],
84
+ });
85
+ export const plotThreadsSkill = defineSkill({
86
+ name: 'plot-threads',
87
+ description: 'Define and track plot threads across chapters',
88
+ prompt: `You are in PLOT THREADS MODE. Map the story's narrative threads.
89
+
90
+ ## Step 1: Read Context
91
+ 1. \`book_model_get\` scope: "full" for complete model
92
+ 2. Review existing chapters and beats
93
+
94
+ ## Step 2: Define Threads
95
+ For each plot thread:
96
+ - Name, description
97
+ - Type: main / subplot / background
98
+ - Color (for timeline visualization)
99
+
100
+ Save: \`book_model_update\` op: "thread_add"
101
+
102
+ ## Step 3: Map Threads to Chapters
103
+ For each chapter/scene, identify which threads are active.
104
+ Save via scene updates: \`book_model_update\` op: "scene_update" with plotThreadIds
105
+
106
+ ## Step 4: Balance Check
107
+ - Are there chapters with no active threads? (dead spots)
108
+ - Are subplots resolved before the end?
109
+ - Does the main plot have continuous presence?
110
+ - Do threads converge toward the climax?
111
+
112
+ Report issues and suggest fixes.
113
+
114
+ ## Rules
115
+ - Main plot should be active in most chapters
116
+ - Subplots should connect to the main theme
117
+ - Every thread started must be resolved
118
+ - For non-fiction: threads are argument lines`,
119
+ tags: ['book', 'plotting'],
120
+ });
121
+ export const sceneBreakdownSkill = defineSkill({
122
+ name: 'scene-breakdown',
123
+ description: 'Break a chapter into detailed scenes',
124
+ prompt: `You are in SCENE BREAKDOWN MODE. Detail a chapter's scenes.
125
+
126
+ ## Step 1: Read Context
127
+ 1. \`book_model_get\` scope: "full" for model
128
+ 2. Identify target chapter
129
+
130
+ ## Step 2: Propose Scenes
131
+ For each scene:
132
+ - Title, synopsis
133
+ - Characters present
134
+ - Setting/location
135
+ - Plot threads advanced
136
+ - Themes explored
137
+ - Estimated word count
138
+
139
+ Save: \`book_model_update\` op: "scene_add"
140
+
141
+ ## Step 3: Scene Flow
142
+ - Does each scene end with a hook or transition?
143
+ - Is POV consistent within scenes?
144
+ - Does each scene advance at least one thread?
145
+ - Are character entrances/exits natural?
146
+
147
+ ## Rules
148
+ - Every scene needs a purpose (advances plot, reveals character, or builds world)
149
+ - Avoid scenes that only deliver information
150
+ - Vary scene length for pacing
151
+ - End chapters on moments of tension or decision`,
152
+ tags: ['book', 'scenes'],
153
+ });
154
+ export const bookReviewSkill = defineSkill({
155
+ name: 'book-review',
156
+ description: 'Structural review — beats, arcs, threads, pacing',
157
+ prompt: `You are in BOOK REVIEW MODE. Evaluate the book's structure.
158
+
159
+ ## Step 1: Load
160
+ 1. \`book_model_get\` scope: "full"
161
+ 2. Run \`book_model_validate\`
162
+
163
+ ## Step 2: Beat Coverage
164
+ - Are all beats from the template assigned to chapters?
165
+ - Are beats in the right order and at roughly correct percentages?
166
+ - Flag unassigned beats.
167
+
168
+ ## Step 3: Character Arcs
169
+ - Does the protagonist have a clear arc (start state → end state)?
170
+ - Are supporting characters developed enough?
171
+ - Are there characters who appear but serve no purpose?
172
+
173
+ ## Step 4: Plot Thread Balance
174
+ - Any dead spots (chapters with no active threads)?
175
+ - Are all threads resolved?
176
+ - Does tension build toward the climax?
177
+ - Are subplots properly woven into the main plot?
178
+
179
+ ## Step 5: Pacing
180
+ - Chapter length distribution (are some much longer/shorter?)
181
+ - Scene count per chapter (balance)
182
+ - Ratio of action to reflection scenes
183
+
184
+ ## Step 6: Report
185
+ - Scorecard (beats, characters, threads, pacing)
186
+ - Strengths
187
+ - Critical issues + recommendations
188
+ - Create revision work items
189
+
190
+ ## Rules
191
+ - Focus on structure, not prose
192
+ - Be specific: "Chapter 4 has no active plot thread" not "pacing needs work"
193
+ - 3-5 most impactful recommendations`,
194
+ tags: ['book', 'review', 'structure'],
195
+ });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Business Plan Skills
3
+ *
4
+ * business-vision, market-analysis, competitor-analysis, financial-model, pitch-outline, business-review
5
+ */
6
+ export declare const businessVisionSkill: import("@compilr-dev/agents").Skill;
7
+ export declare const marketAnalysisSkill: import("@compilr-dev/agents").Skill;
8
+ export declare const competitorAnalysisSkill: import("@compilr-dev/agents").Skill;
9
+ export declare const financialModelSkill: import("@compilr-dev/agents").Skill;
10
+ export declare const pitchOutlineSkill: import("@compilr-dev/agents").Skill;
11
+ export declare const businessReviewSkill: import("@compilr-dev/agents").Skill;