delimit-cli 3.14.11 → 3.14.13
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/README.md +1 -0
- package/bin/delimit-cli.js +106 -0
- package/bin/delimit-setup.js +50 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -121,6 +121,7 @@ That's it. Delimit auto-fetches the base branch spec, diffs it, and posts a PR c
|
|
|
121
121
|
## CLI commands
|
|
122
122
|
|
|
123
123
|
```bash
|
|
124
|
+
npx delimit-cli quickstart # Clone demo project + guided walkthrough
|
|
124
125
|
npx delimit-cli try # Zero-risk demo — saves governance report
|
|
125
126
|
npx delimit-cli demo # Self-contained governance demo
|
|
126
127
|
npx delimit-cli init # Guided wizard with compliance templates
|
package/bin/delimit-cli.js
CHANGED
|
@@ -1538,6 +1538,112 @@ program
|
|
|
1538
1538
|
try { fs.rmSync(tmpDir, { recursive: true }); } catch {}
|
|
1539
1539
|
});
|
|
1540
1540
|
|
|
1541
|
+
// Quickstart command — clone demo repo + guided walkthrough (LED-267)
|
|
1542
|
+
program
|
|
1543
|
+
.command('quickstart')
|
|
1544
|
+
.description('Clone a demo project and walk through governance in 5 minutes')
|
|
1545
|
+
.action(async () => {
|
|
1546
|
+
const targetDir = path.join(process.cwd(), 'delimit-demo');
|
|
1547
|
+
|
|
1548
|
+
console.log(chalk.bold('\n Delimit Quickstart\n'));
|
|
1549
|
+
console.log(chalk.gray(' Clone a demo API project with a pre-broken spec,'));
|
|
1550
|
+
console.log(chalk.gray(' then walk through the governance flow step by step.\n'));
|
|
1551
|
+
|
|
1552
|
+
// Step 1: Clone the quickstart repo
|
|
1553
|
+
if (fs.existsSync(targetDir)) {
|
|
1554
|
+
console.log(chalk.yellow(` ${targetDir} already exists. Using existing directory.\n`));
|
|
1555
|
+
} else {
|
|
1556
|
+
console.log(chalk.bold(' Step 1: Cloning demo project...'));
|
|
1557
|
+
try {
|
|
1558
|
+
execSync(`git clone --depth 1 https://github.com/delimit-ai/delimit-quickstart.git "${targetDir}" 2>/dev/null`, { stdio: 'pipe' });
|
|
1559
|
+
await logp(chalk.green(' Cloned delimit-ai/delimit-quickstart'));
|
|
1560
|
+
} catch {
|
|
1561
|
+
console.log(chalk.yellow(' Could not clone repo. Creating demo files locally...'));
|
|
1562
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
1563
|
+
// Create inline demo specs
|
|
1564
|
+
const baseSpec = { openapi: '3.0.3', info: { title: 'Pet Store API', version: '1.0.0' }, paths: { '/pets': { get: { summary: 'List pets', responses: { '200': { description: 'OK' } } } }, '/pets/{petId}': { get: { summary: 'Get pet', parameters: [{ name: 'petId', in: 'path', required: true, schema: { type: 'string' } }], responses: { '200': { description: 'OK' } } } } }, components: { schemas: { Pet: { type: 'object', properties: { id: { type: 'integer' }, name: { type: 'string' }, tag: { type: 'string' } } } } } };
|
|
1565
|
+
const changedSpec = JSON.parse(JSON.stringify(baseSpec));
|
|
1566
|
+
changedSpec.info.version = '2.0.0';
|
|
1567
|
+
delete changedSpec.paths['/pets/{petId}'];
|
|
1568
|
+
delete changedSpec.components.schemas.Pet.properties.tag;
|
|
1569
|
+
fs.writeFileSync(path.join(targetDir, 'openapi.yaml'), yaml.dump(baseSpec));
|
|
1570
|
+
fs.writeFileSync(path.join(targetDir, 'openapi-changed.yaml'), yaml.dump(changedSpec));
|
|
1571
|
+
await logp(chalk.green(' Created demo specs locally'));
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
console.log('');
|
|
1575
|
+
|
|
1576
|
+
// Step 2: Initialize governance
|
|
1577
|
+
console.log(chalk.bold(' Step 2: Setting up governance...'));
|
|
1578
|
+
const configDir = path.join(targetDir, '.delimit');
|
|
1579
|
+
if (!fs.existsSync(path.join(configDir, 'policies.yml'))) {
|
|
1580
|
+
fs.mkdirSync(configDir, { recursive: true });
|
|
1581
|
+
fs.writeFileSync(path.join(configDir, 'policies.yml'), POLICY_PRESETS['strict']);
|
|
1582
|
+
await logp(chalk.green(' Created .delimit/policies.yml (strict)'));
|
|
1583
|
+
} else {
|
|
1584
|
+
await logp(chalk.green(' Governance already initialized'));
|
|
1585
|
+
}
|
|
1586
|
+
console.log('');
|
|
1587
|
+
|
|
1588
|
+
// Step 3: Run lint to show breaking changes
|
|
1589
|
+
console.log(chalk.bold(' Step 3: Running governance lint...\n'));
|
|
1590
|
+
const oldSpec = path.join(targetDir, 'openapi.yaml');
|
|
1591
|
+
const newSpec = path.join(targetDir, 'openapi-changed.yaml');
|
|
1592
|
+
|
|
1593
|
+
if (fs.existsSync(oldSpec) && fs.existsSync(newSpec)) {
|
|
1594
|
+
try {
|
|
1595
|
+
const result = apiEngine.lint(oldSpec, newSpec, { policy: 'strict' });
|
|
1596
|
+
if (result && result.summary) {
|
|
1597
|
+
const s = result.summary;
|
|
1598
|
+
const breaking = s.breaking || s.breaking_changes || 0;
|
|
1599
|
+
if (breaking > 0) {
|
|
1600
|
+
console.log(chalk.red.bold(` BLOCKED — ${breaking} breaking change(s) detected\n`));
|
|
1601
|
+
}
|
|
1602
|
+
const violations = result.violations || [];
|
|
1603
|
+
violations.forEach(v => {
|
|
1604
|
+
const icon = v.severity === 'error' ? chalk.red(' BLOCK') : chalk.yellow(' WARN ');
|
|
1605
|
+
console.log(` ${icon} ${v.message}`);
|
|
1606
|
+
});
|
|
1607
|
+
}
|
|
1608
|
+
} catch {
|
|
1609
|
+
console.log(chalk.green(' Spec validated — no breaking changes'));
|
|
1610
|
+
}
|
|
1611
|
+
} else {
|
|
1612
|
+
console.log(chalk.yellow(' No spec files found. Run delimit lint manually.'));
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
// Step 4: Show what to do next
|
|
1616
|
+
console.log(chalk.bold('\n What just happened:'));
|
|
1617
|
+
await logp(chalk.gray(' 1. Cloned a demo API project'));
|
|
1618
|
+
await logp(chalk.gray(' 2. Initialized strict governance policy'));
|
|
1619
|
+
await logp(chalk.gray(' 3. Ran lint and caught breaking changes'));
|
|
1620
|
+
console.log('');
|
|
1621
|
+
console.log(chalk.bold(' Now try in your own project:'));
|
|
1622
|
+
console.log(` ${chalk.green('npx delimit-cli init')} — set up governance`);
|
|
1623
|
+
console.log(` ${chalk.green('npx delimit-cli lint')} — check your API spec`);
|
|
1624
|
+
console.log(` ${chalk.green('npx delimit-cli setup')} — configure AI assistants`);
|
|
1625
|
+
console.log('');
|
|
1626
|
+
console.log(chalk.gray(` Demo project: ${targetDir}`));
|
|
1627
|
+
console.log(chalk.gray(` Clean up: rm -rf delimit-demo\n`));
|
|
1628
|
+
|
|
1629
|
+
// Beta capture
|
|
1630
|
+
try {
|
|
1631
|
+
const betaAns = await inquirer.prompt([{
|
|
1632
|
+
type: 'input',
|
|
1633
|
+
name: 'email',
|
|
1634
|
+
message: chalk.blue('Join the beta? Enter your email (or press Enter to skip):'),
|
|
1635
|
+
}]);
|
|
1636
|
+
if (betaAns.email && betaAns.email.includes('@')) {
|
|
1637
|
+
try {
|
|
1638
|
+
await axios.post('https://delimit.ai/api/subscribe', { email: betaAns.email, source: 'cli-quickstart' });
|
|
1639
|
+
console.log(chalk.green('\n Thanks! You\'re on the list.\n'));
|
|
1640
|
+
} catch {
|
|
1641
|
+
console.log(chalk.green('\n Thanks! Visit https://delimit.ai\n'));
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
} catch {}
|
|
1645
|
+
});
|
|
1646
|
+
|
|
1541
1647
|
// Try command — zero-risk demo with Markdown report artifact (LED-264)
|
|
1542
1648
|
program
|
|
1543
1649
|
.command('try')
|
package/bin/delimit-setup.js
CHANGED
|
@@ -880,49 +880,64 @@ function getDelimitSection() {
|
|
|
880
880
|
|
|
881
881
|
Unify all AI coding assistants with persistent context, governance, and multi-model debate.
|
|
882
882
|
|
|
883
|
-
##
|
|
884
|
-
1. Call \`delimit_ledger_context\` to check for open tasks
|
|
885
|
-
2. Call \`delimit_gov_health\` to check governance status
|
|
886
|
-
3. Call \`delimit_inbox_daemon(action="start")\` to start email polling — ALL venture inboxes route through this. Owner approves/adjusts/denies via email reply, same as being logged in.
|
|
887
|
-
4. If returning user, summarize what's pending
|
|
888
|
-
5. If new project, call \`delimit_scan\` to discover what Delimit can do
|
|
889
|
-
|
|
890
|
-
## Tool chaining — ALWAYS auto-trigger:
|
|
891
|
-
- When drafting social content: ALWAYS call \`delimit_social_post\` or \`delimit_notify\` immediately. Never ask permission.
|
|
892
|
-
- When discovering outreach targets: ALWAYS chain to drafting a reply and sending via notify/social_post.
|
|
893
|
-
- When identifying strategic opportunities: ALWAYS create a ledger item via \`delimit_ledger_add\`.
|
|
894
|
-
- The founder reviews and approves via email. The AI's job is to draft and send, not to ask.
|
|
895
|
-
|
|
896
|
-
## After editing code:
|
|
897
|
-
- After editing UI/CSS: call \`delimit_design_validate_responsive\`
|
|
898
|
-
- After editing API specs: call \`delimit_lint\`
|
|
899
|
-
- After editing tests: call \`delimit_test_smoke\`
|
|
900
|
-
|
|
901
|
-
## Before deploying:
|
|
902
|
-
1. Call \`delimit_security_audit\`
|
|
903
|
-
2. Call \`delimit_test_smoke\`
|
|
904
|
-
3. Call \`delimit_deploy_plan\`
|
|
883
|
+
## Auto-Trigger Rules (Consensus 123)
|
|
905
884
|
|
|
906
|
-
|
|
907
|
-
|
|
885
|
+
These rules fire automatically. The AI MUST call the specified tools without asking permission.
|
|
886
|
+
The founder reviews and approves via email. The AI's job is to draft, send, and chain — not to ask.
|
|
908
887
|
|
|
909
|
-
|
|
910
|
-
-
|
|
911
|
-
-
|
|
888
|
+
### Session Lifecycle
|
|
889
|
+
- **Session start**: call \`delimit_ledger_context\` + \`delimit_gov_health\` + \`delimit_inbox_daemon(action="start")\` + \`delimit_notify_routing(action="status")\`
|
|
890
|
+
- **Session end or idle**: call \`delimit_session_handoff\` to preserve context for next session
|
|
891
|
+
- If returning user, summarize what's pending. If new project, call \`delimit_scan\`.
|
|
912
892
|
|
|
913
|
-
|
|
914
|
-
-
|
|
915
|
-
-
|
|
916
|
-
-
|
|
917
|
-
-
|
|
918
|
-
|
|
893
|
+
### Code Development (debounced per edit batch)
|
|
894
|
+
- After editing UI/CSS: call \`delimit_design_validate_responsive\`
|
|
895
|
+
- After editing API specs: call \`delimit_lint\` + \`delimit_drift_check\`
|
|
896
|
+
- After editing tests: call \`delimit_test_smoke\`
|
|
897
|
+
- After any significant code change: call \`delimit_test_smoke\` if applicable tests exist
|
|
898
|
+
|
|
899
|
+
### Pre-Commit / Pre-Deploy Gates
|
|
900
|
+
- Before \`git commit\`: call \`delimit_repo_diagnose\`
|
|
901
|
+
- Deploy requested: \`delimit_security_audit\` then \`delimit_test_smoke\` then \`delimit_changelog\` then \`delimit_deploy_plan\`
|
|
902
|
+
- Deploy succeeds: \`delimit_deploy_verify\` + \`delimit_evidence_collect\`
|
|
903
|
+
- Verify succeeds: \`delimit_ledger_done\` (related task) + \`delimit_notify\`
|
|
904
|
+
|
|
905
|
+
### Content / Outreach (all drafts, never auto-post)
|
|
906
|
+
- Social content drafted: ALWAYS call \`delimit_social_post\` or \`delimit_notify\` immediately
|
|
907
|
+
- \`delimit_social_target\` scan completes: call \`delimit_notify\` with target summary
|
|
908
|
+
- Screenshot of social thread shared: auto-draft reply + call \`delimit_notify\`
|
|
909
|
+
|
|
910
|
+
### Strategic / Business Operations
|
|
911
|
+
- Strategic opportunity identified: call \`delimit_ledger_add\` immediately
|
|
912
|
+
- \`delimit_ledger_add\` fires (non-P0): \`delimit_notify\` (batched, 15-min digest)
|
|
913
|
+
- \`delimit_ledger_add\` fires (P0): \`delimit_notify\` (immediate) + \`delimit_agent_dispatch\`
|
|
914
|
+
- Conflicting high-severity signals: call \`delimit_deliberate\` for multi-model consensus
|
|
915
|
+
|
|
916
|
+
### Monitoring / Sensors
|
|
917
|
+
- GitHub issue state change (closed, merged, labeled): \`delimit_ledger_update\` + \`delimit_notify\` (immediate)
|
|
918
|
+
- GitHub issue new comments: \`delimit_ledger_update\` + \`delimit_notify\` (batched digest)
|
|
919
|
+
- \`delimit_drift_check\` finds drift: \`delimit_ledger_add\` + \`delimit_notify\`
|
|
920
|
+
|
|
921
|
+
### Approval Loop (Email Control Plane)
|
|
922
|
+
- Approval email detected: execute the approved action based on context
|
|
923
|
+
- Rejection email detected: \`delimit_ledger_update\` (mark rejected)
|
|
924
|
+
|
|
925
|
+
### Audit Trail
|
|
926
|
+
- After security audit, test run, or deploy: call \`delimit_evidence_collect\`
|
|
927
|
+
- Any gate failure: \`delimit_evidence_collect\` + \`delimit_ledger_add\` + \`delimit_notify\` (immediate)
|
|
928
|
+
|
|
929
|
+
### Storm Prevention
|
|
930
|
+
- Edit triggers: debounce to once per assistant turn
|
|
931
|
+
- Non-P0 notifications: batch into 15-minute digests
|
|
932
|
+
- Max 5 immediate notifications per hour (overflow to digest)
|
|
933
|
+
- Per-scan fan-out: max 10 targets per notification
|
|
919
934
|
|
|
920
935
|
## What Delimit does:
|
|
921
936
|
- **API governance** -- lint, diff, semver classification, migration guides
|
|
922
|
-
- **Persistent
|
|
937
|
+
- **Persistent context** -- memory and ledger survive across sessions and models
|
|
923
938
|
- **Security audit** -- dependency scanning, secret detection
|
|
924
939
|
- **Test verification** -- confirm tests actually ran, measure coverage
|
|
925
|
-
- **Multi-model deliberation** --
|
|
940
|
+
- **Multi-model deliberation** -- consensus from multiple AI models (3 free, then BYOK)
|
|
926
941
|
|
|
927
942
|
## GitHub Action
|
|
928
943
|
Add breaking change detection to any repo:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "delimit-cli",
|
|
3
3
|
"mcpName": "io.github.delimit-ai/delimit-mcp-server",
|
|
4
|
-
"version": "3.14.
|
|
4
|
+
"version": "3.14.13",
|
|
5
5
|
"description": "Unify Claude Code, Codex, Cursor, and Gemini CLI with persistent context, governance, and multi-model debate.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|