agentblueprint 0.7.15 → 0.7.18
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/LICENSE +21 -0
- package/README.md +16 -1
- package/dist/__tests__/generation-client.test.d.ts +1 -0
- package/dist/__tests__/generation-client.test.js +96 -0
- package/dist/__tests__/generation-client.test.js.map +1 -0
- package/dist/__tests__/generation-tools.test.d.ts +1 -0
- package/dist/__tests__/generation-tools.test.js +168 -0
- package/dist/__tests__/generation-tools.test.js.map +1 -0
- package/dist/__tests__/renderers.test.js +67 -3
- package/dist/__tests__/renderers.test.js.map +1 -1
- package/dist/__tests__/tools.test.js +102 -0
- package/dist/__tests__/tools.test.js.map +1 -1
- package/dist/cli.js +54 -0
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +79 -0
- package/dist/client.js +32 -19
- package/dist/client.js.map +1 -1
- package/dist/directives.js +2 -2
- package/dist/directives.js.map +1 -1
- package/dist/download.js +7 -7
- package/dist/download.js.map +1 -1
- package/dist/errors.d.ts +2 -1
- package/dist/errors.js +12 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/renderers.js +89 -20
- package/dist/renderers.js.map +1 -1
- package/dist/server.js +40 -0
- package/dist/server.js.map +1 -1
- package/dist/tools/create-business-profile.d.ts +17 -0
- package/dist/tools/create-business-profile.js +28 -0
- package/dist/tools/create-business-profile.js.map +1 -0
- package/dist/tools/download-blueprint.js +7 -5
- package/dist/tools/download-blueprint.js.map +1 -1
- package/dist/tools/generate-blueprint.d.ts +21 -0
- package/dist/tools/generate-blueprint.js +25 -0
- package/dist/tools/generate-blueprint.js.map +1 -0
- package/dist/tools/generate-use-cases.d.ts +21 -0
- package/dist/tools/generate-use-cases.js +29 -0
- package/dist/tools/generate-use-cases.js.map +1 -0
- package/dist/tools/get-generation-status.d.ts +18 -0
- package/dist/tools/get-generation-status.js +41 -0
- package/dist/tools/get-generation-status.js.map +1 -0
- package/dist/tools/trigger-full-pipeline.d.ts +20 -0
- package/dist/tools/trigger-full-pipeline.js +24 -0
- package/dist/tools/trigger-full-pipeline.js.map +1 -0
- package/package.json +4 -3
package/dist/renderers.js
CHANGED
|
@@ -72,6 +72,24 @@ function numStr(val) {
|
|
|
72
72
|
function isPlaceholder(val) {
|
|
73
73
|
return ['—', '–', '-', 'N/A', 'n/a', 'TBD', 'null', 'undefined', 'none'].includes(val.trim());
|
|
74
74
|
}
|
|
75
|
+
/** Checks if the business profile has minimal data (fewer than 3 meaningful fields populated) */
|
|
76
|
+
function isProfileSparse(bp) {
|
|
77
|
+
if (!bp)
|
|
78
|
+
return true;
|
|
79
|
+
const meaningfulFields = ['industry', 'size', 'revenue', 'description',
|
|
80
|
+
'technologyProfile', 'organizationalCapabilities', 'businessOperations', 'constraintsProfile'];
|
|
81
|
+
const populated = meaningfulFields.filter(f => {
|
|
82
|
+
const val = bp[f];
|
|
83
|
+
if (!val)
|
|
84
|
+
return false;
|
|
85
|
+
if (typeof val === 'string' && val.trim() === '')
|
|
86
|
+
return false;
|
|
87
|
+
if (typeof val === 'object' && Object.keys(val).length === 0)
|
|
88
|
+
return false;
|
|
89
|
+
return true;
|
|
90
|
+
});
|
|
91
|
+
return populated.length < 3;
|
|
92
|
+
}
|
|
75
93
|
/** Strips a trailing unit suffix to prevent double-units (e.g. "3.6 months" + " months") */
|
|
76
94
|
function stripTrailingUnit(val, unit) {
|
|
77
95
|
return val.replace(new RegExp(`\\s*${unit}\\s*$`, 'i'), '');
|
|
@@ -193,11 +211,11 @@ function buildSkillBody(input) {
|
|
|
193
211
|
lines.push(`- **Pattern:** ${pattern}`);
|
|
194
212
|
lines.push(`- **Agents:** ${team.length}`, '');
|
|
195
213
|
if (input.baseSkill) {
|
|
196
|
-
lines.push('> A base implementation skill has been installed at `.claude/skills/agent-blueprint/`.', '> It contains deployment patterns and reference material for all platforms.', '');
|
|
214
|
+
lines.push('> A base implementation skill has been installed at `.claude/skills/agent-blueprint/` and `.agents/skills/agent-blueprint/`.', '> It contains deployment patterns and reference material for all platforms.', '');
|
|
197
215
|
}
|
|
198
216
|
if (input.vendorSkill) {
|
|
199
217
|
const platformLabel = input.vendorSkill.platform.charAt(0).toUpperCase() + input.vendorSkill.platform.slice(1);
|
|
200
|
-
lines.push(`> A ${platformLabel} expert skill has been installed at \`.claude/skills/${input.vendorSkill.skillName}/\`.`, '> It will be auto-loaded for platform-specific tasks.', '');
|
|
218
|
+
lines.push(`> A ${platformLabel} expert skill has been installed at \`.claude/skills/${input.vendorSkill.skillName}/\` and \`.agents/skills/${input.vendorSkill.skillName}/\`.`, '> It will be auto-loaded for platform-specific tasks.', '');
|
|
201
219
|
}
|
|
202
220
|
else if (input.vendorGuide) {
|
|
203
221
|
const guideFilename = `references/deployment-guide-${input.vendorGuide.platform}.md`;
|
|
@@ -1546,21 +1564,30 @@ function buildGettingStartedReturnVisit(input) {
|
|
|
1546
1564
|
lines.push('');
|
|
1547
1565
|
}
|
|
1548
1566
|
if (input.baseSkill) {
|
|
1549
|
-
lines.push('The `.claude/skills/agent-blueprint/`
|
|
1567
|
+
lines.push('The `.claude/skills/agent-blueprint/` and `.agents/skills/agent-blueprint/` skills contain deployment patterns and');
|
|
1550
1568
|
lines.push('reference material applicable to all platforms. Read it for general guidance.');
|
|
1551
1569
|
lines.push('');
|
|
1552
1570
|
}
|
|
1553
1571
|
if (input.vendorSkill) {
|
|
1554
|
-
lines.push(`The \`.claude/skills/${input.vendorSkill.skillName}/\`
|
|
1572
|
+
lines.push(`The \`.claude/skills/${input.vendorSkill.skillName}/\` and \`.agents/skills/${input.vendorSkill.skillName}/\` skills contain platform-specific`);
|
|
1555
1573
|
lines.push('deployment guidance. Follow it for all platform-specific work.');
|
|
1574
|
+
lines.push('For new apps or first deployments, re-check its deployment-path decision');
|
|
1575
|
+
lines.push('gate before creating more records. Use direct record or API edits mainly');
|
|
1576
|
+
lines.push('for existing deployments, live tuning, or blocked packaging paths. If you');
|
|
1577
|
+
lines.push('choose a fallback, document the reason in blueprint-local `PROGRESS.md` before proceeding.');
|
|
1556
1578
|
lines.push('');
|
|
1557
1579
|
}
|
|
1558
|
-
lines.push('
|
|
1559
|
-
lines.push('
|
|
1560
|
-
lines.push('
|
|
1580
|
+
lines.push('deployment-path decision checkpoint: before creating new app records, prefer the');
|
|
1581
|
+
lines.push('platform\'s source-controlled or native packaging path when one is available.');
|
|
1582
|
+
lines.push('Direct record or API edits are best for existing deployments, live tuning,');
|
|
1583
|
+
lines.push('or blocked packaging paths. Document fallback reasons in blueprint-local `PROGRESS.md`.');
|
|
1584
|
+
lines.push('');
|
|
1585
|
+
lines.push('For the next pilot slice or agent:');
|
|
1586
|
+
lines.push('1. Review the spec in `SKILL.md` and `references/agent-specifications.md`');
|
|
1587
|
+
lines.push('2. Build the smallest executable slice that proves a useful path');
|
|
1561
1588
|
lines.push('3. Test and iterate until behavior matches the spec');
|
|
1562
|
-
lines.push('4. Update `implementation-state.yaml` with status and platform artifact');
|
|
1563
|
-
lines.push('5.
|
|
1589
|
+
lines.push('4. Update local `implementation-state.yaml` with status and platform artifact');
|
|
1590
|
+
lines.push('5. Ask before syncing demo/test state back to Agent Blueprint');
|
|
1564
1591
|
lines.push('');
|
|
1565
1592
|
// Step 4
|
|
1566
1593
|
lines.push('## Step 4: Validate and measure');
|
|
@@ -1577,7 +1604,9 @@ function buildGettingStartedReturnVisit(input) {
|
|
|
1577
1604
|
// Step 5
|
|
1578
1605
|
lines.push('## Step 5: Sync your progress');
|
|
1579
1606
|
lines.push('');
|
|
1580
|
-
lines.push('After implementing each agent or making significant changes,
|
|
1607
|
+
lines.push('After implementing each agent or making significant changes, update local');
|
|
1608
|
+
lines.push('`implementation-state.yaml`. In demo/test mode, ask the user before syncing');
|
|
1609
|
+
lines.push('state back to Agent Blueprint.');
|
|
1581
1610
|
lines.push('');
|
|
1582
1611
|
lines.push('**MCP tool** (preferred):');
|
|
1583
1612
|
lines.push('');
|
|
@@ -1585,7 +1614,7 @@ function buildGettingStartedReturnVisit(input) {
|
|
|
1585
1614
|
lines.push(` blueprintId: "${input.blueprintId}"`);
|
|
1586
1615
|
lines.push(' stateData: <contents of implementation-state.yaml as JSON>');
|
|
1587
1616
|
lines.push('');
|
|
1588
|
-
lines.push('**CLI
|
|
1617
|
+
lines.push('**CLI** (after user approval in demo/test mode):');
|
|
1589
1618
|
lines.push('');
|
|
1590
1619
|
lines.push(` agentblueprint sync --blueprint ${input.blueprintId}`);
|
|
1591
1620
|
lines.push('');
|
|
@@ -1598,6 +1627,7 @@ function buildGettingStartedReturnVisit(input) {
|
|
|
1598
1627
|
lines.push(' actualValue: "measured value"');
|
|
1599
1628
|
lines.push('');
|
|
1600
1629
|
lines.push('See `AGENTS.md` for trigger points, deviation rules, and full sync guidance.');
|
|
1630
|
+
lines.push('For demo/test implementations, ask before using MCP or CLI sync.');
|
|
1601
1631
|
lines.push('');
|
|
1602
1632
|
lines.push('**Claude Code users**: See `hooks/claude-code-sync.json` for a Stop hook that');
|
|
1603
1633
|
lines.push('reminds you to sync when implementation-state.yaml has unsynced changes.');
|
|
@@ -1659,6 +1689,9 @@ function buildGettingStarted(input) {
|
|
|
1659
1689
|
lines.push(' One fix, one alternative, then ask. Do not spiral.');
|
|
1660
1690
|
lines.push('- **Verify before presenting.** Never give the user a URL, path, or command');
|
|
1661
1691
|
lines.push(' you have not verified against the actual platform instance.');
|
|
1692
|
+
lines.push('- **Ask before high-impact actions.** Get explicit approval before running');
|
|
1693
|
+
lines.push(' background scripts, production writes, credential changes, cleanup/deletion,');
|
|
1694
|
+
lines.push(' or syncing demo/test state back to Agent Blueprint.');
|
|
1662
1695
|
lines.push('');
|
|
1663
1696
|
// Staleness warnings
|
|
1664
1697
|
const staleWarnings = buildStalenessWarnings(input);
|
|
@@ -1666,6 +1699,20 @@ function buildGettingStarted(input) {
|
|
|
1666
1699
|
lines.push(staleWarnings);
|
|
1667
1700
|
lines.push('');
|
|
1668
1701
|
}
|
|
1702
|
+
// Phase 0: Profile interview (only when profile is sparse and base skill is present)
|
|
1703
|
+
if (isProfileSparse(input.businessProfileData) && input.baseSkill) {
|
|
1704
|
+
lines.push('## Phase 0: Build your organization profile');
|
|
1705
|
+
lines.push('');
|
|
1706
|
+
lines.push('Organization context is incomplete. Before deploying agents, build a');
|
|
1707
|
+
lines.push('comprehensive business profile using the interview protocol:');
|
|
1708
|
+
lines.push('');
|
|
1709
|
+
lines.push('1. Read `.claude/skills/agent-blueprint/references/INTERVIEW_PROTOCOL.md`');
|
|
1710
|
+
lines.push('2. Follow the document-first approach: gather existing docs, extract, then interview for gaps');
|
|
1711
|
+
lines.push('3. Output structured JSON for platform sync, or rewrite `references/organization-context.md` locally');
|
|
1712
|
+
lines.push('');
|
|
1713
|
+
lines.push('A richer profile produces better-tailored agent recommendations and more accurate financial projections.');
|
|
1714
|
+
lines.push('');
|
|
1715
|
+
}
|
|
1669
1716
|
// Step 1
|
|
1670
1717
|
lines.push('## Step 1: Understand the architecture');
|
|
1671
1718
|
lines.push('');
|
|
@@ -1701,23 +1748,35 @@ function buildGettingStarted(input) {
|
|
|
1701
1748
|
lines.push(' error messages) after each step.');
|
|
1702
1749
|
lines.push('');
|
|
1703
1750
|
if (input.baseSkill) {
|
|
1704
|
-
lines.push('A base implementation skill has been installed at `.claude/skills/agent-blueprint/`.');
|
|
1751
|
+
lines.push('A base implementation skill has been installed at `.claude/skills/agent-blueprint/` and `.agents/skills/agent-blueprint/`.');
|
|
1705
1752
|
lines.push('It contains deployment patterns and reference material applicable to all platforms.');
|
|
1706
1753
|
lines.push('Read it before starting any implementation work.');
|
|
1707
1754
|
lines.push('');
|
|
1708
1755
|
}
|
|
1709
1756
|
if (input.vendorSkill) {
|
|
1710
1757
|
const platformLabel = input.vendorSkill.platform.charAt(0).toUpperCase() + input.vendorSkill.platform.slice(1);
|
|
1711
|
-
lines.push(`A ${platformLabel} expert skill has been installed at \`.claude/skills/${input.vendorSkill.skillName}/\`.`);
|
|
1758
|
+
lines.push(`A ${platformLabel} expert skill has been installed at \`.claude/skills/${input.vendorSkill.skillName}/\` and \`.agents/skills/${input.vendorSkill.skillName}/\`.`);
|
|
1712
1759
|
lines.push('It contains the connection verification steps, deployment sequence, platform');
|
|
1713
1760
|
lines.push('patterns, and debugging guidance. Follow it for all platform-specific work.');
|
|
1714
1761
|
lines.push('The deployment sequence adapts to the access level the user provides.');
|
|
1762
|
+
lines.push('');
|
|
1763
|
+
lines.push('Before creating a new app or first deployment, follow the expert skill\'s');
|
|
1764
|
+
lines.push('deployment-path decision gate. Prefer the platform\'s source-controlled or');
|
|
1765
|
+
lines.push('native packaging path when the expert skill recommends one. Use direct record');
|
|
1766
|
+
lines.push('or API edits mainly for existing deployments, live tuning, or blocked packaging');
|
|
1767
|
+
lines.push('paths. If you choose a fallback, document the reason in blueprint-local `PROGRESS.md`.');
|
|
1715
1768
|
}
|
|
1716
1769
|
else if (!input.baseSkill) {
|
|
1717
1770
|
lines.push('If `references/deployment-guide-*.md` files are present, read those for');
|
|
1718
1771
|
lines.push('platform-specific tooling, deployment sequence, and gotchas.');
|
|
1719
1772
|
}
|
|
1720
1773
|
lines.push('');
|
|
1774
|
+
lines.push('deployment-path decision checkpoint: before creating a new app or first deployment,');
|
|
1775
|
+
lines.push('choose the platform\'s source-controlled or native packaging path when one is');
|
|
1776
|
+
lines.push('available. Use direct record or API edits mainly for existing deployments,');
|
|
1777
|
+
lines.push('live tuning, or blocked packaging paths. If you choose a fallback, document');
|
|
1778
|
+
lines.push('the reason in blueprint-local `PROGRESS.md`.');
|
|
1779
|
+
lines.push('');
|
|
1721
1780
|
lines.push('**B. User wants to build from scratch** (custom code, open-source frameworks):');
|
|
1722
1781
|
lines.push('Help them choose a framework based on the blueprint architecture. Search the web');
|
|
1723
1782
|
lines.push('for current agentic AI frameworks and their capabilities -- this space moves fast');
|
|
@@ -1735,8 +1794,9 @@ function buildGettingStarted(input) {
|
|
|
1735
1794
|
// Step 3
|
|
1736
1795
|
lines.push('## Step 3: Build and validate the pilot');
|
|
1737
1796
|
lines.push('');
|
|
1738
|
-
lines.push('Check the Phase 1
|
|
1739
|
-
lines.push('
|
|
1797
|
+
lines.push('Check the Phase 1/Pilot sections in `SKILL.md` and');
|
|
1798
|
+
lines.push('`references/agent-specifications.md` for pilot scope.');
|
|
1799
|
+
lines.push('Build the smallest executable pilot slice first. **Do not expand to remaining agents until the');
|
|
1740
1800
|
lines.push('pilot is fully working with real data.** This is a gate, not a suggestion.');
|
|
1741
1801
|
lines.push('');
|
|
1742
1802
|
if (input.vendorSkill) {
|
|
@@ -1753,7 +1813,9 @@ function buildGettingStarted(input) {
|
|
|
1753
1813
|
lines.push('**Phase A: Scaffold and validate orchestration.**');
|
|
1754
1814
|
lines.push('1. Create an application container for the pilot (project, workspace, or whatever');
|
|
1755
1815
|
lines.push(' your platform uses to group related agents). State your intent to the user.');
|
|
1756
|
-
lines.push('2. Build the
|
|
1816
|
+
lines.push('2. Build the smallest executable pilot slice: the minimum native workflow or');
|
|
1817
|
+
lines.push(' orchestrator plus the worker agent(s), tools, and instructions needed to');
|
|
1818
|
+
lines.push(' prove the first useful path.');
|
|
1757
1819
|
lines.push('3. Use simulation scripts to validate the LLM orchestration (tool chaining,');
|
|
1758
1820
|
lines.push(' parameter passing, sequencing). This proves the agent can chain tools correctly.');
|
|
1759
1821
|
lines.push('4. **Test before proceeding.** Invoke the agent programmatically, read the execution');
|
|
@@ -1808,7 +1870,7 @@ function buildGettingStarted(input) {
|
|
|
1808
1870
|
// Step 5
|
|
1809
1871
|
lines.push('## Step 5: Track progress and close the loop');
|
|
1810
1872
|
lines.push('');
|
|
1811
|
-
lines.push('As you implement each agent, update `implementation-state.yaml`:');
|
|
1873
|
+
lines.push('As you implement each agent, update local `implementation-state.yaml`:');
|
|
1812
1874
|
lines.push('');
|
|
1813
1875
|
lines.push('1. Set the agent\'s `status` to `in_progress` when you start, `implemented` when done.');
|
|
1814
1876
|
lines.push('2. Record the `platform_artifact` (sys_id, function name, service URL, etc.).');
|
|
@@ -1817,9 +1879,10 @@ function buildGettingStarted(input) {
|
|
|
1817
1879
|
lines.push('5. Update `overall_status` as you progress.');
|
|
1818
1880
|
lines.push('6. Fill in the `platform` section with the actual platform, version, and environment.');
|
|
1819
1881
|
lines.push('');
|
|
1820
|
-
lines.push('###
|
|
1882
|
+
lines.push('### Local update trigger points');
|
|
1821
1883
|
lines.push('');
|
|
1822
|
-
lines.push('
|
|
1884
|
+
lines.push('Update local `implementation-state.yaml` after each of these events');
|
|
1885
|
+
lines.push('(do not wait until the end):');
|
|
1823
1886
|
lines.push('- After implementing an agent');
|
|
1824
1887
|
lines.push('- After connecting an integration');
|
|
1825
1888
|
lines.push('- After modifying an agent\'s behavior');
|
|
@@ -1827,13 +1890,16 @@ function buildGettingStarted(input) {
|
|
|
1827
1890
|
lines.push('');
|
|
1828
1891
|
lines.push('### How to sync');
|
|
1829
1892
|
lines.push('');
|
|
1893
|
+
lines.push('In demo/test mode, ask the user before syncing local state back to Agent');
|
|
1894
|
+
lines.push('Blueprint. Sync only after approval.');
|
|
1895
|
+
lines.push('');
|
|
1830
1896
|
lines.push('**MCP tool** (preferred when Agent Blueprint MCP server is connected):');
|
|
1831
1897
|
lines.push('');
|
|
1832
1898
|
lines.push(' Use the sync_implementation_state tool with:');
|
|
1833
1899
|
lines.push(` blueprintId: "${input.blueprintId}"`);
|
|
1834
1900
|
lines.push(' stateData: <contents of implementation-state.yaml as JSON>');
|
|
1835
1901
|
lines.push('');
|
|
1836
|
-
lines.push('**CLI
|
|
1902
|
+
lines.push('**CLI** (after approval in demo/test mode):');
|
|
1837
1903
|
lines.push('');
|
|
1838
1904
|
lines.push(` agentblueprint sync --blueprint ${input.blueprintId}`);
|
|
1839
1905
|
lines.push('');
|
|
@@ -2642,6 +2708,7 @@ export function renderSkillDirectory(input) {
|
|
|
2642
2708
|
if (input.baseSkill) {
|
|
2643
2709
|
for (const file of input.baseSkill.files) {
|
|
2644
2710
|
files.set(`.claude/skills/agent-blueprint/${file.path}`, file.content);
|
|
2711
|
+
files.set(`.agents/skills/agent-blueprint/${file.path}`, file.content);
|
|
2645
2712
|
}
|
|
2646
2713
|
}
|
|
2647
2714
|
// Vendor expert skill (multi-file when available, single SKILL.md fallback)
|
|
@@ -2649,10 +2716,12 @@ export function renderSkillDirectory(input) {
|
|
|
2649
2716
|
if (input.vendorSkill.files && input.vendorSkill.files.length > 0) {
|
|
2650
2717
|
for (const file of input.vendorSkill.files) {
|
|
2651
2718
|
files.set(`.claude/skills/${input.vendorSkill.skillName}/${file.path}`, file.content);
|
|
2719
|
+
files.set(`.agents/skills/${input.vendorSkill.skillName}/${file.path}`, file.content);
|
|
2652
2720
|
}
|
|
2653
2721
|
}
|
|
2654
2722
|
else {
|
|
2655
2723
|
files.set(`.claude/skills/${input.vendorSkill.skillName}/SKILL.md`, input.vendorSkill.content);
|
|
2724
|
+
files.set(`.agents/skills/${input.vendorSkill.skillName}/SKILL.md`, input.vendorSkill.content);
|
|
2656
2725
|
}
|
|
2657
2726
|
}
|
|
2658
2727
|
// Scripts
|