@compilr-dev/sdk 0.7.3 → 0.7.5

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, } 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, } 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, } 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, } from './skills/index.js';
143
143
  // =============================================================================
144
144
  // Contextual Actions (skill invocations with context)
145
145
  // =============================================================================
@@ -58,6 +58,9 @@ export const ACTION_META_REGISTRY = {
58
58
  'business-vision': { id: 'business-vision', label: 'Vision', icon: 'Target', description: 'Define your business' },
59
59
  'market-analysis': { id: 'market-analysis', label: 'Market', icon: 'TrendingUp', description: 'Analyze the market' },
60
60
  'competitor-analysis': { id: 'competitor-analysis', label: 'Competitors', icon: 'Swords', description: 'Map competition' },
61
+ 'financial-model': { id: 'financial-model', label: 'Financials', icon: 'DollarSign', description: 'Build projections' },
62
+ 'pitch-outline': { id: 'pitch-outline', label: 'Pitch', icon: 'Rocket', description: 'Structure a pitch' },
63
+ 'business-review': { id: 'business-review', label: 'Review', icon: 'ShieldCheck', description: 'Validate the plan' },
61
64
  // ── Work item actions ────────────────────────────────────────────────────
62
65
  build: {
63
66
  id: 'build',
@@ -351,7 +351,7 @@ export const businessPlanConfig = {
351
351
  { type: 'pitch', label: 'Pitch Narrative', description: 'Investor pitch content' },
352
352
  { type: 'session-notes', label: 'Session Notes', description: 'Summary of work done' },
353
353
  ],
354
- projectActions: ['business-vision', 'market-analysis', 'competitor-analysis', 'session-notes'],
354
+ projectActions: ['business-vision', 'market-analysis', 'competitor-analysis', 'financial-model', 'pitch-outline', 'business-review', 'session-notes'],
355
355
  workItemActions: ['refine-item', 'explain'],
356
356
  workItemLabels: {
357
357
  feature: { short: 'ML', full: 'Milestone' },
@@ -110,6 +110,9 @@ export const SKILL_META_REGISTRY = {
110
110
  'business-vision': { id: 'business-vision', label: 'Business Vision', description: 'Define business identity and value proposition', icon: 'Target', category: 'planning' },
111
111
  'market-analysis': { id: 'market-analysis', label: 'Market Analysis', description: 'Analyze market size, trends, and segments', icon: 'TrendingUp', category: 'analysis' },
112
112
  'competitor-analysis': { id: 'competitor-analysis', label: 'Competitor Analysis', description: 'Map competitive landscape', icon: 'Swords', category: 'analysis' },
113
+ 'financial-model': { id: 'financial-model', label: 'Financial Model', description: 'Build revenue and cost projections', icon: 'DollarSign', category: 'analysis' },
114
+ 'pitch-outline': { id: 'pitch-outline', label: 'Pitch Outline', description: 'Structure an investor pitch', icon: 'Rocket', category: 'planning' },
115
+ 'business-review': { id: 'business-review', label: 'Business Review', description: 'Validate the business plan', icon: 'ShieldCheck', category: 'analysis' },
113
116
  // ── Builtin Skills (agents library) ──────────────────────────────────────
114
117
  'code-review': {
115
118
  id: 'code-review',
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Platform Skills — barrel export
3
3
  */
4
- export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, peerReviewSkill, researchScaffoldSkill, businessVisionSkill, marketAnalysisSkill, competitorAnalysisSkill, } from './platform-skills.js';
4
+ export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, peerReviewSkill, researchScaffoldSkill, businessVisionSkill, marketAnalysisSkill, competitorAnalysisSkill, financialModelSkill, pitchOutlineSkill, businessReviewSkill, } from './platform-skills.js';
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Platform Skills — barrel export
3
3
  */
4
- export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, peerReviewSkill, researchScaffoldSkill, businessVisionSkill, marketAnalysisSkill, competitorAnalysisSkill, } from './platform-skills.js';
4
+ export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, outlineSkill, literatureReviewSkill, draftSectionSkill, peerReviewSkill, researchScaffoldSkill, businessVisionSkill, marketAnalysisSkill, competitorAnalysisSkill, financialModelSkill, pitchOutlineSkill, businessReviewSkill, } from './platform-skills.js';
@@ -25,8 +25,11 @@ export declare const researchScaffoldSkill: Skill;
25
25
  export declare const businessVisionSkill: Skill;
26
26
  export declare const marketAnalysisSkill: Skill;
27
27
  export declare const competitorAnalysisSkill: Skill;
28
+ export declare const financialModelSkill: Skill;
29
+ export declare const pitchOutlineSkill: Skill;
30
+ export declare const businessReviewSkill: Skill;
28
31
  /**
29
- * All platform-specific skills (17 total).
32
+ * All platform-specific skills (20 total).
30
33
  * These skills reference platform tools (backlog, workitems, documents, projects)
31
34
  * and belong in the SDK rather than in generic agent/coding libraries.
32
35
  */
@@ -1532,11 +1532,18 @@ Based on the competitor analysis, what are YOUR advantages?
1532
1532
 
1533
1533
  Save: \`business_model_update\` with op: "set_competitive_advantages", advantages: [...]
1534
1534
 
1535
- ## Step 5: Positioning
1536
- Help the user think about positioning:
1537
- - On what axes do competitors differentiate? (price vs. features, simplicity vs. power, etc.)
1538
- - Where does your business sit on those axes?
1539
- - Is there an unoccupied position?
1535
+ ## Step 5: Positioning Matrix
1536
+ Help the user define a 2D positioning matrix:
1537
+ - Ask: "What are the two most important dimensions in your market?" (e.g., price vs. features, simplicity vs. power, general vs. specialized)
1538
+ - Define axes with labels
1539
+ - Score each competitor (0-100) on both axes
1540
+ - Score the user's business position
1541
+
1542
+ Save positioning: \`business_model_update\` op: "set_positioning", positioning: { xAxis: "Domain Specialization", yAxis: "Multi-Agent Capability", xLow: "General", xHigh: "Specialized", yLow: "Single", yHigh: "Multi-Agent", selfX: 85, selfY: 90 }
1543
+
1544
+ Then update each competitor with position: \`business_model_update\` op: "competitor_update", competitor_id: "...", updates: { positionX: 30, positionY: 70 }
1545
+
1546
+ This generates a visual positioning chart in the Business Model Viewer.
1540
1547
 
1541
1548
  ## Step 6: Generate Work Items
1542
1549
  Create work items for:
@@ -1550,11 +1557,201 @@ Create work items for:
1550
1557
  - Include both current competitors and potential future entrants`,
1551
1558
  tags: ['business', 'analysis', 'competition'],
1552
1559
  });
1560
+ export const financialModelSkill = defineSkill({
1561
+ name: 'financial-model',
1562
+ description: 'Build revenue forecasts, cost structure, and break-even analysis',
1563
+ prompt: `You are in FINANCIAL MODEL MODE. Help the user build financial projections.
1564
+
1565
+ ## Step 1: Assess Current State
1566
+ 1. Use \`business_model_get\` with scope: "financials" for existing projections
1567
+ 2. Use \`business_model_get\` with scope: "canvas" for revenue streams and cost structure
1568
+ 3. Use \`business_model_get\` with scope: "overview" for business context
1569
+
1570
+ ## Step 2: Define Revenue Streams
1571
+ For each revenue stream (if not already defined):
1572
+ - Name, type (subscription, one-time, usage, etc.)
1573
+ - Projected revenue
1574
+ Save: \`business_model_update\` op: "revenue_stream_add"
1575
+
1576
+ ## Step 3: Build Revenue Forecasts
1577
+ For each revenue stream, guide through assumptions:
1578
+ - Number of customers per period
1579
+ - Average revenue per customer
1580
+ - Growth rate
1581
+ - Seasonality or ramp-up time
1582
+
1583
+ Save forecasts: \`business_model_update\` op: "forecast_add", financials_field: { type: "revenue", period, category, amount }
1584
+
1585
+ Use realistic time horizons:
1586
+ - Startup: monthly for Year 1, quarterly for Years 2-3
1587
+ - Growth stage: quarterly for 3 years
1588
+ - Established: yearly for 5 years
1589
+
1590
+ ## Step 4: Define Cost Structure
1591
+ Guide through expense categories:
1592
+ - **Fixed costs**: salaries, rent, subscriptions, insurance
1593
+ - **Variable costs**: hosting, transaction fees, marketing spend (scales with revenue)
1594
+
1595
+ Save each: \`business_model_update\` op: "cost_item_add"
1596
+ Save forecasts: \`business_model_update\` op: "forecast_add", financials_field: { type: "expense", period, category, amount }
1597
+
1598
+ ## Step 5: Break-Even Analysis
1599
+ Calculate:
1600
+ - Monthly burn rate (total fixed + variable costs)
1601
+ - Monthly revenue at steady state
1602
+ - Break-even point (when cumulative revenue > cumulative costs)
1603
+
1604
+ Save: \`business_model_update\` op: "set_financials_fields", financials_field: { breakEvenPoint: "Month 18", fundingNeeds: "$2M", useOfFunds: "70% product, 20% marketing, 10% ops" }
1605
+
1606
+ ## Step 6: Document Assumptions
1607
+ List all key assumptions made:
1608
+ - Customer acquisition rate
1609
+ - Churn rate
1610
+ - Pricing changes
1611
+ - Hiring timeline
1612
+
1613
+ Save: \`business_model_update\` op: "set_financials_fields", financials_field: { assumptions: [...] }
1614
+
1615
+ ## Rules
1616
+ - Always state assumptions explicitly — hidden assumptions kill credibility
1617
+ - Use conservative estimates (investors multiply your timeline by 2x)
1618
+ - Revenue should be bottoms-up (customers × price), not top-down (% of TAM)
1619
+ - Include a "what if" scenario: what happens if growth is 50% slower?
1620
+ - Round to meaningful numbers — $1.2M not $1,237,849`,
1621
+ tags: ['business', 'analysis', 'financial'],
1622
+ });
1623
+ export const pitchOutlineSkill = defineSkill({
1624
+ name: 'pitch-outline',
1625
+ description: 'Structure an investor pitch or executive summary from the Business Model',
1626
+ prompt: `You are in PITCH OUTLINE MODE. Help the user create a compelling pitch from their Business Model.
1627
+
1628
+ ## Step 1: Assess Readiness
1629
+ 1. Use \`business_model_get\` with scope: "full" to review the complete model
1630
+ 2. Check completeness: identity, value prop, market, competitors, financials
1631
+ 3. If major gaps exist, note them and suggest which skills to run first
1632
+
1633
+ ## Step 2: Choose Format
1634
+ Ask the user:
1635
+ - **Elevator pitch** (30 seconds — 3 sentences)
1636
+ - **Executive summary** (1 page — for email/document)
1637
+ - **Pitch deck narrative** (10-12 slides — investor presentation)
1638
+
1639
+ ## Step 3: Structure the Pitch
1640
+ For a pitch deck (adapt for other formats):
1641
+
1642
+ 1. **Problem** — The pain point (from valueProposition.problem)
1643
+ 2. **Solution** — Your approach (from valueProposition.solution)
1644
+ 3. **Market** — Size and opportunity (from market TAM/SAM/SOM)
1645
+ 4. **Product** — What you've built / will build
1646
+ 5. **Business Model** — How you make money (from canvas.revenueStreams)
1647
+ 6. **Traction** — What you've achieved so far (milestones, users, revenue)
1648
+ 7. **Competition** — Why you win (from competitors + competitiveAdvantages)
1649
+ 8. **Team** — Why this team (from team)
1650
+ 9. **Financials** — Projections and key metrics (from financials)
1651
+ 10. **The Ask** — What you need (from financials.fundingNeeds + useOfFunds)
1652
+
1653
+ ## Step 4: Draft the Narrative
1654
+ For each section:
1655
+ - Write 2-3 sentences that tell a story
1656
+ - Lead with the strongest point
1657
+ - Use specific numbers, not vague claims
1658
+ - Save as a project document
1659
+
1660
+ ## Step 5: Generate Work Items
1661
+ Create Milestone work items:
1662
+ - "Draft: [section name]" for each pitch section
1663
+ - "Prepare: supporting data" for claims that need evidence
1664
+
1665
+ ## Rules
1666
+ - The pitch tells a STORY, not a list of facts
1667
+ - Start with emotion (the problem), end with opportunity (the ask)
1668
+ - Every claim should be backed by data from the Business Model
1669
+ - If financials are weak, lead with market size and traction instead
1670
+ - The ask should be specific: "$X for Y months to achieve Z"`,
1671
+ tags: ['business', 'writing', 'pitch'],
1672
+ });
1673
+ export const businessReviewSkill = defineSkill({
1674
+ name: 'business-review',
1675
+ description: 'Validate the business plan — find gaps, weak assumptions, and missing elements',
1676
+ prompt: `You are in BUSINESS REVIEW MODE. Critically evaluate the business plan like an investor would.
1677
+
1678
+ ## Step 1: Load and Assess
1679
+ 1. Use \`business_model_get\` with scope: "full" to read everything
1680
+ 2. Run \`business_model_validate\` for structural issues
1681
+
1682
+ ## Step 2: Completeness Check
1683
+ Score each section (Complete / Partial / Missing):
1684
+ - Identity & Value Proposition
1685
+ - Market Analysis (TAM/SAM/SOM, segments)
1686
+ - Competitive Analysis (competitors, advantages)
1687
+ - Business Model Canvas (revenue, costs, channels, partnerships)
1688
+ - Financial Projections (revenue, expenses, break-even)
1689
+ - Go-to-Market (phases, strategy)
1690
+ - Team
1691
+
1692
+ Present a scorecard: "7/7 complete" or "5/7 — missing Financials and GTM"
1693
+
1694
+ ## Step 3: Assumption Audit
1695
+ For each key assumption:
1696
+ - Is it stated explicitly?
1697
+ - Is there evidence supporting it?
1698
+ - What happens if it's wrong?
1699
+
1700
+ Flag assumptions that are:
1701
+ - **Optimistic** — "We'll capture 10% of the market in Year 1" (unlikely for most startups)
1702
+ - **Unvalidated** — claims without data or customer evidence
1703
+ - **Risky** — single points of failure
1704
+
1705
+ ## Step 4: Competitive Blind Spots
1706
+ - Are there competitors missing from the analysis?
1707
+ - Are competitive advantages truly defensible?
1708
+ - What would a well-funded competitor do to beat you?
1709
+ - Is the pricing competitive given the alternatives?
1710
+
1711
+ ## Step 5: Financial Reality Check
1712
+ - Do revenue projections match the market sizing? (can't project $100M revenue in a $50M SAM)
1713
+ - Is the cost structure realistic? (engineering salaries, cloud costs, marketing spend)
1714
+ - Is the break-even timeline achievable with the stated funding?
1715
+ - What's the burn rate, and how long does the funding last?
1716
+
1717
+ ## Step 6: Generate Review Report
1718
+ Structure as:
1719
+
1720
+ ### Scorecard
1721
+ Section-by-section completeness
1722
+
1723
+ ### Strengths (what's compelling)
1724
+ 2-3 strongest elements
1725
+
1726
+ ### Critical Issues (must fix)
1727
+ Problems that would stop an investor
1728
+
1729
+ ### Major Issues (should fix)
1730
+ Significant weaknesses
1731
+
1732
+ ### Recommendations
1733
+ Prioritized action items
1734
+
1735
+ Write report to a project document.
1736
+
1737
+ ## Step 7: Create Work Items
1738
+ - Type "Issue" (bug) for critical and major issues
1739
+ - Type "Research" (tech-debt) for unvalidated assumptions
1740
+ - Type "Milestone" (feature) for missing sections
1741
+
1742
+ ## Rules
1743
+ - Be constructive but honest — sugar-coating helps nobody
1744
+ - Think like an investor: "Would I put money into this?"
1745
+ - Every issue should have a specific recommendation
1746
+ - Acknowledge what's strong — it builds credibility for the critique
1747
+ - Focus on the 3-5 things that matter most, not a list of 20 nitpicks`,
1748
+ tags: ['business', 'review', 'validation'],
1749
+ });
1553
1750
  // =============================================================================
1554
1751
  // Aggregate export
1555
1752
  // =============================================================================
1556
1753
  /**
1557
- * All platform-specific skills (17 total).
1754
+ * All platform-specific skills (20 total).
1558
1755
  * These skills reference platform tools (backlog, workitems, documents, projects)
1559
1756
  * and belong in the SDK rather than in generic agent/coding libraries.
1560
1757
  */
@@ -1576,4 +1773,7 @@ export const platformSkills = [
1576
1773
  businessVisionSkill,
1577
1774
  marketAnalysisSkill,
1578
1775
  competitorAnalysisSkill,
1776
+ financialModelSkill,
1777
+ pitchOutlineSkill,
1778
+ businessReviewSkill,
1579
1779
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/sdk",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "description": "Universal agent runtime for building AI-powered applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",