delimit-cli 4.1.43 → 4.1.44
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/CHANGELOG.md +27 -0
- package/README.md +46 -5
- package/bin/delimit-cli.js +1523 -208
- package/bin/delimit-setup.js +8 -2
- package/gateway/ai/agent_dispatch.py +34 -2
- package/gateway/ai/backends/deploy_bridge.py +167 -12
- package/gateway/ai/content_engine.py +1276 -2
- package/gateway/ai/github_scanner.py +1 -1
- package/gateway/ai/governance.py +58 -0
- package/gateway/ai/key_resolver.py +95 -2
- package/gateway/ai/ledger_manager.py +13 -3
- package/gateway/ai/loop_engine.py +220 -349
- package/gateway/ai/notify.py +1786 -2
- package/gateway/ai/reddit_scanner.py +45 -1
- package/gateway/ai/screen_record.py +1 -1
- package/gateway/ai/secrets_broker.py +5 -1
- package/gateway/ai/social_cache.py +341 -0
- package/gateway/ai/social_daemon.py +41 -10
- package/gateway/ai/supabase_sync.py +190 -2
- package/gateway/ai/tui.py +594 -36
- package/gateway/core/zero_spec/express_extractor.py +2 -2
- package/gateway/core/zero_spec/nestjs_extractor.py +40 -9
- package/gateway/requirements.txt +3 -6
- package/package.json +4 -3
- package/scripts/demo-v420-clean.sh +267 -0
- package/scripts/demo-v420-deliberation.sh +217 -0
- package/scripts/demo-v420.sh +55 -0
- package/scripts/postinstall.js +4 -3
- package/scripts/publish-ci-guard.sh +30 -0
- package/scripts/record-and-upload.sh +132 -0
- package/scripts/release.sh +126 -0
- package/scripts/sync-gateway.sh +100 -0
- package/scripts/youtube-upload.py +141 -0
|
@@ -264,10 +264,10 @@ def extract_express_spec(
|
|
|
264
264
|
"error_type": "missing_deps",
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
# Write extractor script to temp file
|
|
267
|
+
# Write extractor script to a system temp file; module resolution uses projectRoot.
|
|
268
268
|
with tempfile.NamedTemporaryFile(
|
|
269
269
|
mode="w", suffix=".js", prefix="_delimit_extract_",
|
|
270
|
-
|
|
270
|
+
delete=False,
|
|
271
271
|
) as f:
|
|
272
272
|
f.write(_EXTRACTOR_SCRIPT)
|
|
273
273
|
script_path = f.name
|
|
@@ -6,6 +6,7 @@ for full fidelity.
|
|
|
6
6
|
|
|
7
7
|
import json
|
|
8
8
|
import os
|
|
9
|
+
import shutil
|
|
9
10
|
import subprocess
|
|
10
11
|
import tempfile
|
|
11
12
|
from pathlib import Path
|
|
@@ -156,13 +157,40 @@ def extract_nestjs_spec(
|
|
|
156
157
|
)
|
|
157
158
|
ext = ".js"
|
|
158
159
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
temp_workspace: Optional[Path] = None
|
|
161
|
+
exec_root = root
|
|
162
|
+
|
|
163
|
+
if is_typescript:
|
|
164
|
+
# TypeScript resolution depends on nearby node_modules/tsconfig and
|
|
165
|
+
# relative imports from the generated extractor script.
|
|
166
|
+
temp_workspace = Path(tempfile.mkdtemp(prefix="_delimit_extract_"))
|
|
167
|
+
exec_root = temp_workspace
|
|
168
|
+
|
|
169
|
+
top_level = module_path.lstrip("./").split("/", 1)[0]
|
|
170
|
+
for name in ("node_modules", "package.json", "nest-cli.json"):
|
|
171
|
+
src = root / name
|
|
172
|
+
if src.exists():
|
|
173
|
+
(temp_workspace / name).symlink_to(src, target_is_directory=src.is_dir())
|
|
174
|
+
for cfg in root.glob("tsconfig*.json"):
|
|
175
|
+
(temp_workspace / cfg.name).symlink_to(cfg)
|
|
176
|
+
if top_level:
|
|
177
|
+
src = root / top_level
|
|
178
|
+
if src.exists():
|
|
179
|
+
(temp_workspace / top_level).symlink_to(src, target_is_directory=src.is_dir())
|
|
180
|
+
|
|
181
|
+
with tempfile.NamedTemporaryFile(
|
|
182
|
+
mode="w", suffix=ext, prefix="_delimit_extract_",
|
|
183
|
+
dir=str(temp_workspace), delete=False,
|
|
184
|
+
) as f:
|
|
185
|
+
f.write(script_content)
|
|
186
|
+
script_path = f.name
|
|
187
|
+
else:
|
|
188
|
+
with tempfile.NamedTemporaryFile(
|
|
189
|
+
mode="w", suffix=ext, prefix="_delimit_extract_",
|
|
190
|
+
delete=False,
|
|
191
|
+
) as f:
|
|
192
|
+
f.write(script_content)
|
|
193
|
+
script_path = f.name
|
|
166
194
|
|
|
167
195
|
try:
|
|
168
196
|
# Build command
|
|
@@ -179,7 +207,7 @@ def extract_nestjs_spec(
|
|
|
179
207
|
capture_output=True,
|
|
180
208
|
text=True,
|
|
181
209
|
timeout=timeout,
|
|
182
|
-
cwd=str(
|
|
210
|
+
cwd=str(exec_root),
|
|
183
211
|
env={**os.environ, "NODE_ENV": "development"},
|
|
184
212
|
)
|
|
185
213
|
|
|
@@ -248,7 +276,10 @@ def extract_nestjs_spec(
|
|
|
248
276
|
}
|
|
249
277
|
finally:
|
|
250
278
|
try:
|
|
251
|
-
|
|
279
|
+
if temp_workspace is not None:
|
|
280
|
+
shutil.rmtree(temp_workspace)
|
|
281
|
+
else:
|
|
282
|
+
os.unlink(script_path)
|
|
252
283
|
except OSError:
|
|
253
284
|
pass
|
|
254
285
|
|
package/gateway/requirements.txt
CHANGED
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": "4.1.
|
|
4
|
+
"version": "4.1.44",
|
|
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": [
|
|
@@ -26,8 +26,9 @@
|
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"postinstall": "node scripts/postinstall.js",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
29
|
+
"sync-gateway": "bash scripts/sync-gateway.sh",
|
|
30
|
+
"prepublishOnly": "bash scripts/publish-ci-guard.sh && npm run sync-gateway && bash scripts/security-check.sh",
|
|
31
|
+
"test": "node --test tests/setup-onboarding.test.js tests/setup-matrix.test.js tests/config-export-import.test.js tests/cross-model-hooks.test.js tests/golden-path.test.js tests/v420-features.test.js"
|
|
31
32
|
},
|
|
32
33
|
"keywords": [
|
|
33
34
|
"openapi",
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# v4.20 Clean Demo — realistic mock data, no personal info
|
|
3
|
+
# Uses a temp HOME so nothing leaks
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
export HOME=/tmp/delimit-demo-home
|
|
8
|
+
export DELIMIT_MODEL=cli
|
|
9
|
+
rm -rf "$HOME" 2>/dev/null
|
|
10
|
+
mkdir -p "$HOME/.delimit/memory" "$HOME/.delimit/evidence" "$HOME/.delimit/ledger" "$HOME/.delimit/sessions" "$HOME/.delimit/server/ai"
|
|
11
|
+
|
|
12
|
+
CLI="node /home/delimit/npm-delimit/bin/delimit-cli.js"
|
|
13
|
+
|
|
14
|
+
# ── Seed memories (12 realistic entries) ─────────────────────────────
|
|
15
|
+
$CLI remember "API uses JWT with 15-minute expiry, refresh tokens last 7 days" --tag jwt 2>/dev/null || true
|
|
16
|
+
$CLI remember "PostgreSQL is primary DB, Redis for sessions only" --tag postgres --tag redis 2>/dev/null || true
|
|
17
|
+
$CLI remember "Never modify the payments service on Fridays — incident 2024-11" --tag payments 2>/dev/null || true
|
|
18
|
+
$CLI remember "GraphQL gateway handles auth, REST endpoints are internal only" --tag graphql --tag auth 2>/dev/null || true
|
|
19
|
+
$CLI remember "Docker images must be under 500MB, scanned by Trivy before push" --tag docker --tag security 2>/dev/null || true
|
|
20
|
+
$CLI remember "Staging deploys to us-east-1, production is multi-region" --tag aws --tag deploy 2>/dev/null || true
|
|
21
|
+
$CLI remember "OpenAPI spec is source of truth — SDK types generated from it weekly" --tag openapi 2>/dev/null || true
|
|
22
|
+
$CLI remember "Rate limiting: 100 req/min for free tier, 1000 for pro" --tag api 2>/dev/null || true
|
|
23
|
+
$CLI remember "Migrated from REST to GraphQL for mobile clients in Q3" --tag graphql 2>/dev/null || true
|
|
24
|
+
$CLI remember "Sentry alerting threshold: P50 > 200ms triggers page" --tag sentry --tag monitoring 2>/dev/null || true
|
|
25
|
+
$CLI remember "E2E tests run against staging before every prod deploy" --tag testing --tag ci 2>/dev/null || true
|
|
26
|
+
$CLI remember "Architecture decision: chose event sourcing for audit trail" --tag architecture 2>/dev/null || true
|
|
27
|
+
|
|
28
|
+
# ── Seed models config ───────────────────────────────────────────────
|
|
29
|
+
cat > "$HOME/.delimit/models.json" << 'MODELS'
|
|
30
|
+
{
|
|
31
|
+
"claude": { "api_key": "sk-ant-demo", "enabled": true },
|
|
32
|
+
"gemini": { "api_key": "AIza-demo", "enabled": true },
|
|
33
|
+
"codex": { "api_key": "sk-demo", "enabled": true }
|
|
34
|
+
}
|
|
35
|
+
MODELS
|
|
36
|
+
|
|
37
|
+
# ── Seed MCP config ──────────────────────────────────────────────────
|
|
38
|
+
cat > "$HOME/.mcp.json" << 'MCP'
|
|
39
|
+
{
|
|
40
|
+
"mcpServers": {
|
|
41
|
+
"delimit": {
|
|
42
|
+
"command": "python3",
|
|
43
|
+
"args": ["server.py"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
MCP
|
|
48
|
+
|
|
49
|
+
# ── Seed server.py stub (for doctor check) ───────────────────────────
|
|
50
|
+
cat > "$HOME/.delimit/server/ai/server.py" << 'SRV'
|
|
51
|
+
# Delimit MCP Server stub
|
|
52
|
+
@mcp.tool
|
|
53
|
+
def delimit_lint(): pass
|
|
54
|
+
@mcp.tool
|
|
55
|
+
def delimit_diff(): pass
|
|
56
|
+
@mcp.tool
|
|
57
|
+
def delimit_scan(): pass
|
|
58
|
+
SRV
|
|
59
|
+
|
|
60
|
+
# ── Seed license ─────────────────────────────────────────────────────
|
|
61
|
+
cat > "$HOME/.delimit/license.json" << 'LIC'
|
|
62
|
+
{"tier": "Pro", "status": "active", "email": "team@acme.dev"}
|
|
63
|
+
LIC
|
|
64
|
+
|
|
65
|
+
# ── Seed ledger items ────────────────────────────────────────────────
|
|
66
|
+
cat > "$HOME/.delimit/ledger/ops.jsonl" << 'LEDGER'
|
|
67
|
+
{"id":"LED-001","title":"Add rate limiting to /users endpoint","type":"feat","priority":"P1","status":"open","created_at":"2026-04-01T10:00:00Z"}
|
|
68
|
+
{"id":"LED-002","title":"Fix pagination bug in /orders","type":"fix","priority":"P0","status":"in_progress","created_at":"2026-04-02T14:00:00Z"}
|
|
69
|
+
{"id":"LED-003","title":"Migrate auth to OAuth 2.1","type":"feat","priority":"P1","status":"open","created_at":"2026-04-03T09:00:00Z"}
|
|
70
|
+
{"id":"LED-004","title":"Add OpenTelemetry tracing","type":"feat","priority":"P2","status":"open","created_at":"2026-04-03T11:00:00Z"}
|
|
71
|
+
{"id":"LED-005","title":"Update SDK types from spec","type":"task","priority":"P1","status":"done","created_at":"2026-04-04T08:00:00Z"}
|
|
72
|
+
{"id":"LED-006","title":"Security audit: dependency scan","type":"task","priority":"P0","status":"open","created_at":"2026-04-04T16:00:00Z"}
|
|
73
|
+
{"id":"LED-007","title":"Deprecate v1 webhook format","type":"task","priority":"P2","status":"open","created_at":"2026-04-05T10:00:00Z"}
|
|
74
|
+
LEDGER
|
|
75
|
+
|
|
76
|
+
# ── Seed evidence records ────────────────────────────────────────────
|
|
77
|
+
for i in $(seq 1 8); do
|
|
78
|
+
cat >> "$HOME/.delimit/evidence/events.jsonl" << EVIDENCE
|
|
79
|
+
{"type":"evidence_collected","timestamp":"2026-04-0${i}T12:00:00Z","project":"/projects/acme-api","checks_passed":true}
|
|
80
|
+
EVIDENCE
|
|
81
|
+
done
|
|
82
|
+
|
|
83
|
+
# ── Seed session ─────────────────────────────────────────────────────
|
|
84
|
+
cat > "$HOME/.delimit/sessions/session_20260405_100000.json" << 'SESS'
|
|
85
|
+
{"summary":"Rate limiting implementation + SDK type regeneration","description":"Shipped rate limiting for free tier, regenerated SDK types from latest spec","created_at":"2026-04-05T10:00:00Z"}
|
|
86
|
+
SESS
|
|
87
|
+
|
|
88
|
+
# ── Create demo project ──────────────────────────────────────────────
|
|
89
|
+
DEMO_DIR=/tmp/delimit-demo-project
|
|
90
|
+
rm -rf "$DEMO_DIR"
|
|
91
|
+
mkdir -p "$DEMO_DIR/.delimit" "$DEMO_DIR/.git/hooks" "$DEMO_DIR/.github/workflows"
|
|
92
|
+
cd "$DEMO_DIR"
|
|
93
|
+
git init -q .
|
|
94
|
+
git config user.email "dev@acme.dev"
|
|
95
|
+
git config user.name "Acme Dev"
|
|
96
|
+
|
|
97
|
+
cat > openapi.yaml << 'SPEC'
|
|
98
|
+
openapi: "3.0.0"
|
|
99
|
+
info:
|
|
100
|
+
title: Acme API
|
|
101
|
+
version: 2.1.0
|
|
102
|
+
description: The Acme platform API — users, orders, payments, webhooks
|
|
103
|
+
paths:
|
|
104
|
+
/users:
|
|
105
|
+
get:
|
|
106
|
+
operationId: listUsers
|
|
107
|
+
summary: List all users with pagination
|
|
108
|
+
parameters:
|
|
109
|
+
- name: limit
|
|
110
|
+
in: query
|
|
111
|
+
schema:
|
|
112
|
+
type: integer
|
|
113
|
+
default: 20
|
|
114
|
+
- name: offset
|
|
115
|
+
in: query
|
|
116
|
+
schema:
|
|
117
|
+
type: integer
|
|
118
|
+
default: 0
|
|
119
|
+
responses:
|
|
120
|
+
"200":
|
|
121
|
+
description: Paginated user list
|
|
122
|
+
post:
|
|
123
|
+
operationId: createUser
|
|
124
|
+
summary: Create a new user
|
|
125
|
+
requestBody:
|
|
126
|
+
required: true
|
|
127
|
+
content:
|
|
128
|
+
application/json:
|
|
129
|
+
schema:
|
|
130
|
+
type: object
|
|
131
|
+
required: [email, name]
|
|
132
|
+
properties:
|
|
133
|
+
email:
|
|
134
|
+
type: string
|
|
135
|
+
format: email
|
|
136
|
+
name:
|
|
137
|
+
type: string
|
|
138
|
+
responses:
|
|
139
|
+
"201":
|
|
140
|
+
description: User created
|
|
141
|
+
/users/{id}:
|
|
142
|
+
get:
|
|
143
|
+
operationId: getUser
|
|
144
|
+
summary: Get user by ID
|
|
145
|
+
parameters:
|
|
146
|
+
- name: id
|
|
147
|
+
in: path
|
|
148
|
+
required: true
|
|
149
|
+
schema:
|
|
150
|
+
type: string
|
|
151
|
+
format: uuid
|
|
152
|
+
responses:
|
|
153
|
+
"200":
|
|
154
|
+
description: User details
|
|
155
|
+
"404":
|
|
156
|
+
description: Not found
|
|
157
|
+
/orders:
|
|
158
|
+
get:
|
|
159
|
+
operationId: listOrders
|
|
160
|
+
summary: List orders
|
|
161
|
+
responses:
|
|
162
|
+
"200":
|
|
163
|
+
description: Order list
|
|
164
|
+
/payments/webhook:
|
|
165
|
+
post:
|
|
166
|
+
operationId: handlePaymentWebhook
|
|
167
|
+
summary: Stripe webhook endpoint
|
|
168
|
+
responses:
|
|
169
|
+
"200":
|
|
170
|
+
description: Webhook processed
|
|
171
|
+
SPEC
|
|
172
|
+
|
|
173
|
+
cat > .delimit/policies.yml << 'POL'
|
|
174
|
+
name: acme-governance
|
|
175
|
+
preset: default
|
|
176
|
+
enforcement_mode: enforce
|
|
177
|
+
rules:
|
|
178
|
+
no-breaking-changes:
|
|
179
|
+
severity: error
|
|
180
|
+
description: Block removal of endpoints or required fields
|
|
181
|
+
no-unversioned-changes:
|
|
182
|
+
severity: error
|
|
183
|
+
description: Require version bump for breaking changes
|
|
184
|
+
require-descriptions:
|
|
185
|
+
severity: warn
|
|
186
|
+
description: All endpoints must have descriptions
|
|
187
|
+
require-operation-ids:
|
|
188
|
+
severity: warn
|
|
189
|
+
description: All operations need unique IDs
|
|
190
|
+
max-response-time:
|
|
191
|
+
severity: warn
|
|
192
|
+
threshold: 500ms
|
|
193
|
+
require-auth:
|
|
194
|
+
severity: error
|
|
195
|
+
description: All non-public endpoints require authentication
|
|
196
|
+
POL
|
|
197
|
+
|
|
198
|
+
echo "# delimit-governance-hook" > .git/hooks/pre-commit
|
|
199
|
+
chmod +x .git/hooks/pre-commit
|
|
200
|
+
|
|
201
|
+
cat > .github/workflows/api-governance.yml << 'WF'
|
|
202
|
+
name: API Governance
|
|
203
|
+
on: [pull_request]
|
|
204
|
+
jobs:
|
|
205
|
+
governance:
|
|
206
|
+
runs-on: ubuntu-latest
|
|
207
|
+
steps:
|
|
208
|
+
- uses: actions/checkout@v4
|
|
209
|
+
- uses: delimit-ai/delimit-action@v1
|
|
210
|
+
with:
|
|
211
|
+
spec: openapi.yaml
|
|
212
|
+
WF
|
|
213
|
+
|
|
214
|
+
git add -A
|
|
215
|
+
git commit -q -m "initial: Acme API v2.1.0 with governance"
|
|
216
|
+
|
|
217
|
+
# ── Simulated typing ─────────────────────────────────────────────────
|
|
218
|
+
type_cmd() {
|
|
219
|
+
echo ""
|
|
220
|
+
echo -n "$ "
|
|
221
|
+
for ((i=0; i<${#1}; i++)); do
|
|
222
|
+
echo -n "${1:$i:1}"
|
|
223
|
+
sleep 0.04
|
|
224
|
+
done
|
|
225
|
+
echo ""
|
|
226
|
+
sleep 0.3
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
clear
|
|
230
|
+
echo ""
|
|
231
|
+
echo " Delimit v4.20 — The Highest State of AI Governance"
|
|
232
|
+
echo ""
|
|
233
|
+
sleep 2
|
|
234
|
+
|
|
235
|
+
# 1. Doctor — full health check
|
|
236
|
+
type_cmd "delimit doctor"
|
|
237
|
+
$CLI doctor 2>/dev/null
|
|
238
|
+
sleep 4
|
|
239
|
+
|
|
240
|
+
# 2. Status — the visual dashboard
|
|
241
|
+
type_cmd "delimit status"
|
|
242
|
+
$CLI status 2>/dev/null
|
|
243
|
+
sleep 5
|
|
244
|
+
|
|
245
|
+
# 3. Simulate — dry run before commit
|
|
246
|
+
type_cmd "delimit simulate"
|
|
247
|
+
$CLI simulate 2>/dev/null
|
|
248
|
+
sleep 4
|
|
249
|
+
|
|
250
|
+
# 4. Remember — cross-model memory
|
|
251
|
+
type_cmd "delimit remember 'webhook v1 deprecated, migrate by Q3'"
|
|
252
|
+
$CLI remember 'webhook v1 deprecated, migrate by Q3' 2>/dev/null
|
|
253
|
+
sleep 2
|
|
254
|
+
|
|
255
|
+
# 5. Recall — verify it persists
|
|
256
|
+
type_cmd "delimit recall webhook"
|
|
257
|
+
$CLI recall webhook 2>/dev/null
|
|
258
|
+
sleep 3
|
|
259
|
+
|
|
260
|
+
echo ""
|
|
261
|
+
echo " npm i -g delimit-cli"
|
|
262
|
+
echo " github.com/delimit-ai/delimit-mcp-server"
|
|
263
|
+
echo ""
|
|
264
|
+
sleep 3
|
|
265
|
+
|
|
266
|
+
# Cleanup
|
|
267
|
+
rm -rf "$DEMO_DIR" /tmp/delimit-demo-home
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# v4.20 Demo — Ledger + Multi-Model Deliberation
|
|
3
|
+
# Shows the "think and build" loop that no competitor has
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
export HOME=/tmp/delimit-demo-home
|
|
8
|
+
export DELIMIT_MODEL=cli
|
|
9
|
+
rm -rf "$HOME" 2>/dev/null
|
|
10
|
+
mkdir -p "$HOME/.delimit/memory" "$HOME/.delimit/evidence" "$HOME/.delimit/ledger" "$HOME/.delimit/sessions" "$HOME/.delimit/server/ai"
|
|
11
|
+
|
|
12
|
+
CLI="node /home/delimit/npm-delimit/bin/delimit-cli.js"
|
|
13
|
+
|
|
14
|
+
# ── Seed a rich ledger ───────────────────────────────────────────────
|
|
15
|
+
cat > "$HOME/.delimit/ledger/ops.jsonl" << 'LEDGER'
|
|
16
|
+
{"id":"LED-001","title":"Add rate limiting to /users endpoint","type":"feat","priority":"P0","status":"in_progress","created_at":"2026-04-01T10:00:00Z","description":"Free tier: 100 req/min. Pro tier: 1000 req/min. Use Redis sliding window."}
|
|
17
|
+
{"id":"LED-002","title":"Fix pagination cursor bug in /orders","type":"fix","priority":"P0","status":"open","created_at":"2026-04-02T14:00:00Z","description":"Cursor-based pagination returns duplicate rows when items are deleted mid-page."}
|
|
18
|
+
{"id":"LED-003","title":"Migrate auth from sessions to JWT","type":"feat","priority":"P1","status":"open","created_at":"2026-04-03T09:00:00Z","description":"15-min access tokens, 7-day refresh. Must not break mobile clients."}
|
|
19
|
+
{"id":"LED-004","title":"Add OpenTelemetry tracing to all endpoints","type":"feat","priority":"P2","status":"open","created_at":"2026-04-03T11:00:00Z"}
|
|
20
|
+
{"id":"LED-005","title":"Deprecate v1 webhook format","type":"task","priority":"P1","status":"open","created_at":"2026-04-04T08:00:00Z","description":"Send sunset header for 30 days, then remove."}
|
|
21
|
+
{"id":"LED-006","title":"Security audit: dependency CVE scan","type":"task","priority":"P0","status":"open","created_at":"2026-04-04T16:00:00Z"}
|
|
22
|
+
LEDGER
|
|
23
|
+
|
|
24
|
+
cat > "$HOME/.delimit/ledger/strategy.jsonl" << 'STRATEGY'
|
|
25
|
+
{"id":"STR-001","title":"Evaluate GraphQL federation vs REST gateway","type":"strategy","priority":"P1","status":"open","created_at":"2026-04-01T10:00:00Z","description":"Mobile team wants GraphQL. Backend team prefers REST. Need consensus."}
|
|
26
|
+
{"id":"STR-002","title":"Competitor launched rate limiting as a service","type":"strategy","priority":"P1","status":"open","created_at":"2026-04-03T15:00:00Z","description":"Competitor X launched managed rate limiting. Do we build or buy?"}
|
|
27
|
+
STRATEGY
|
|
28
|
+
|
|
29
|
+
# ── Seed memories ────────────────────────────────────────────────────
|
|
30
|
+
$CLI remember "PostgreSQL is primary DB, Redis for rate limiting and sessions" --tag postgres --tag redis 2>/dev/null || true
|
|
31
|
+
$CLI remember "Mobile clients still on v1 webhooks — 30-day sunset required" --tag webhooks --tag mobile 2>/dev/null || true
|
|
32
|
+
$CLI remember "Last security audit was 6 weeks ago — overdue" --tag security 2>/dev/null || true
|
|
33
|
+
$CLI remember "Architecture decision: event sourcing for audit trail" --tag architecture 2>/dev/null || true
|
|
34
|
+
$CLI remember "JWT migration must not break iOS app — coordinate with mobile team" --tag jwt --tag mobile 2>/dev/null || true
|
|
35
|
+
|
|
36
|
+
# ── Seed models config ───────────────────────────────────────────────
|
|
37
|
+
cat > "$HOME/.delimit/models.json" << 'MODELS'
|
|
38
|
+
{
|
|
39
|
+
"claude": { "api_key": "sk-ant-demo", "enabled": true },
|
|
40
|
+
"gemini": { "api_key": "AIza-demo", "enabled": true },
|
|
41
|
+
"codex": { "api_key": "sk-demo", "enabled": true },
|
|
42
|
+
"grok": { "api_key": "xai-demo", "enabled": true }
|
|
43
|
+
}
|
|
44
|
+
MODELS
|
|
45
|
+
|
|
46
|
+
# ── Seed MCP + license ───────────────────────────────────────────────
|
|
47
|
+
cat > "$HOME/.mcp.json" << 'MCP'
|
|
48
|
+
{"mcpServers":{"delimit":{"command":"python3","args":["server.py"]}}}
|
|
49
|
+
MCP
|
|
50
|
+
cat > "$HOME/.delimit/server/ai/server.py" << 'SRV'
|
|
51
|
+
@mcp.tool
|
|
52
|
+
def delimit_lint(): pass
|
|
53
|
+
@mcp.tool
|
|
54
|
+
def delimit_deliberate(): pass
|
|
55
|
+
@mcp.tool
|
|
56
|
+
def delimit_ledger(): pass
|
|
57
|
+
SRV
|
|
58
|
+
cat > "$HOME/.delimit/license.json" << 'LIC'
|
|
59
|
+
{"tier": "Pro", "status": "active", "email": "team@acme.dev"}
|
|
60
|
+
LIC
|
|
61
|
+
|
|
62
|
+
# ── Seed evidence ────────────────────────────────────────────────────
|
|
63
|
+
for i in 1 2 3 4 5 6 7 8; do
|
|
64
|
+
echo "{\"type\":\"evidence_collected\",\"timestamp\":\"2026-04-0${i}T12:00:00Z\",\"project\":\"/projects/acme-api\",\"checks_passed\":true}" >> "$HOME/.delimit/evidence/events.jsonl"
|
|
65
|
+
done
|
|
66
|
+
|
|
67
|
+
# ── Seed session ─────────────────────────────────────────────────────
|
|
68
|
+
cat > "$HOME/.delimit/sessions/session_20260405_100000.json" << 'SESS'
|
|
69
|
+
{"summary":"Rate limiting implementation + security audit prep","created_at":"2026-04-05T10:00:00Z"}
|
|
70
|
+
SESS
|
|
71
|
+
|
|
72
|
+
# ── Create demo project ──────────────────────────────────────────────
|
|
73
|
+
DEMO_DIR=/tmp/delimit-demo-project
|
|
74
|
+
rm -rf "$DEMO_DIR"
|
|
75
|
+
mkdir -p "$DEMO_DIR/.delimit" "$DEMO_DIR/.git/hooks" "$DEMO_DIR/.github/workflows"
|
|
76
|
+
cd "$DEMO_DIR"
|
|
77
|
+
git init -q .
|
|
78
|
+
git config user.email "dev@acme.dev"
|
|
79
|
+
git config user.name "Acme Dev"
|
|
80
|
+
|
|
81
|
+
cat > openapi.yaml << 'SPEC'
|
|
82
|
+
openapi: "3.0.0"
|
|
83
|
+
info:
|
|
84
|
+
title: Acme API
|
|
85
|
+
version: 2.1.0
|
|
86
|
+
paths:
|
|
87
|
+
/users:
|
|
88
|
+
get:
|
|
89
|
+
operationId: listUsers
|
|
90
|
+
summary: List users
|
|
91
|
+
responses:
|
|
92
|
+
"200":
|
|
93
|
+
description: OK
|
|
94
|
+
/orders:
|
|
95
|
+
get:
|
|
96
|
+
operationId: listOrders
|
|
97
|
+
summary: List orders
|
|
98
|
+
responses:
|
|
99
|
+
"200":
|
|
100
|
+
description: OK
|
|
101
|
+
SPEC
|
|
102
|
+
|
|
103
|
+
cat > .delimit/policies.yml << 'POL'
|
|
104
|
+
name: acme-governance
|
|
105
|
+
preset: default
|
|
106
|
+
enforcement_mode: enforce
|
|
107
|
+
rules:
|
|
108
|
+
no-breaking-changes:
|
|
109
|
+
severity: error
|
|
110
|
+
require-descriptions:
|
|
111
|
+
severity: warn
|
|
112
|
+
POL
|
|
113
|
+
|
|
114
|
+
echo "# delimit-governance-hook" > .git/hooks/pre-commit
|
|
115
|
+
chmod +x .git/hooks/pre-commit
|
|
116
|
+
echo "uses: delimit-ai/delimit-action@v1" > .github/workflows/api-governance.yml
|
|
117
|
+
git add -A && git commit -q -m "initial"
|
|
118
|
+
|
|
119
|
+
# ── Typing effect ────────────────────────────────────────────────────
|
|
120
|
+
type_cmd() {
|
|
121
|
+
echo ""
|
|
122
|
+
echo -n "$ "
|
|
123
|
+
for ((i=0; i<${#1}; i++)); do
|
|
124
|
+
echo -n "${1:$i:1}"
|
|
125
|
+
sleep 0.04
|
|
126
|
+
done
|
|
127
|
+
echo ""
|
|
128
|
+
sleep 0.3
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
# ── Mock deliberation output ─────────────────────────────────────────
|
|
132
|
+
mock_deliberation() {
|
|
133
|
+
echo ""
|
|
134
|
+
echo " Delimit Deliberate"
|
|
135
|
+
echo ""
|
|
136
|
+
echo " Question: Should we build rate limiting in-house or use a managed service?"
|
|
137
|
+
echo " Models: Claude + Gemini + Codex + Grok"
|
|
138
|
+
echo ""
|
|
139
|
+
sleep 1
|
|
140
|
+
echo " Round 1 (independent):"
|
|
141
|
+
sleep 0.5
|
|
142
|
+
echo " Claude: Build in-house. Redis sliding window is 50 lines."
|
|
143
|
+
echo " Managed service adds latency + vendor lock-in."
|
|
144
|
+
sleep 1
|
|
145
|
+
echo " Gemini: Build. You already have Redis. The complexity is"
|
|
146
|
+
echo " in the policy, not the counter."
|
|
147
|
+
sleep 1
|
|
148
|
+
echo " Codex: Agree — build. But add circuit breaker for Redis"
|
|
149
|
+
echo " failures so rate limiting degrades gracefully."
|
|
150
|
+
sleep 1
|
|
151
|
+
echo " Grok: Build. Managed services charge per request."
|
|
152
|
+
echo " At your scale that's \$200/mo for a 50-line feature."
|
|
153
|
+
sleep 1.5
|
|
154
|
+
echo ""
|
|
155
|
+
echo " Round 2 (deliberation):"
|
|
156
|
+
sleep 0.5
|
|
157
|
+
echo " All models: AGREE — build in-house with Redis sliding window."
|
|
158
|
+
echo " Key addition: circuit breaker for Redis failures (Codex)."
|
|
159
|
+
sleep 1.5
|
|
160
|
+
echo ""
|
|
161
|
+
echo " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
162
|
+
echo " UNANIMOUS CONSENSUS (2 rounds)"
|
|
163
|
+
echo " Confidence: 94/100"
|
|
164
|
+
echo ""
|
|
165
|
+
echo " Verdict: Build rate limiting in-house using Redis"
|
|
166
|
+
echo " sliding window. Add circuit breaker for Redis failures."
|
|
167
|
+
echo " Estimated complexity: small (50 LOC + tests)."
|
|
168
|
+
echo " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
169
|
+
echo ""
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
# ══════════════════════════════════════════════════════════════════════
|
|
173
|
+
# DEMO START
|
|
174
|
+
# ══════════════════════════════════════════════════════════════════════
|
|
175
|
+
|
|
176
|
+
clear
|
|
177
|
+
echo ""
|
|
178
|
+
echo " Delimit v4.20 — Think and Build"
|
|
179
|
+
echo " Multi-model deliberation + persistent ledger"
|
|
180
|
+
echo ""
|
|
181
|
+
sleep 2
|
|
182
|
+
|
|
183
|
+
# 1. Show the status dashboard
|
|
184
|
+
type_cmd "delimit status"
|
|
185
|
+
$CLI status 2>/dev/null
|
|
186
|
+
sleep 4
|
|
187
|
+
|
|
188
|
+
# 2. Show the report with ledger items
|
|
189
|
+
type_cmd "delimit report --since 7d"
|
|
190
|
+
$CLI report --since 7d 2>/dev/null
|
|
191
|
+
sleep 5
|
|
192
|
+
|
|
193
|
+
# 3. Run a deliberation
|
|
194
|
+
type_cmd "delimit deliberate 'Should we build rate limiting in-house or use a managed service?'"
|
|
195
|
+
mock_deliberation
|
|
196
|
+
sleep 4
|
|
197
|
+
|
|
198
|
+
# 4. Remember the decision
|
|
199
|
+
type_cmd "delimit remember 'Consensus: build rate limiting in-house with Redis sliding window + circuit breaker'"
|
|
200
|
+
$CLI remember 'Consensus: build rate limiting in-house with Redis sliding window + circuit breaker' --tag redis --tag architecture 2>/dev/null
|
|
201
|
+
sleep 2
|
|
202
|
+
|
|
203
|
+
# 5. Recall to show it persists
|
|
204
|
+
type_cmd "delimit recall rate limiting"
|
|
205
|
+
$CLI recall "rate limiting" 2>/dev/null
|
|
206
|
+
sleep 3
|
|
207
|
+
|
|
208
|
+
echo ""
|
|
209
|
+
echo " 4 models. 1 consensus. 0 meetings."
|
|
210
|
+
echo ""
|
|
211
|
+
echo " npm i -g delimit-cli"
|
|
212
|
+
echo " github.com/delimit-ai/delimit-mcp-server"
|
|
213
|
+
echo ""
|
|
214
|
+
sleep 4
|
|
215
|
+
|
|
216
|
+
# Cleanup
|
|
217
|
+
rm -rf "$DEMO_DIR" /tmp/delimit-demo-home
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# v4.20 Demo Script — recorded via asciinema for YouTube Short + GIF
|
|
3
|
+
# Shows: doctor → simulate → status → report flow
|
|
4
|
+
# Each command has a pause so the viewer can read the output
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
# Simulated typing effect
|
|
9
|
+
type_cmd() {
|
|
10
|
+
echo ""
|
|
11
|
+
echo -n "$ "
|
|
12
|
+
for ((i=0; i<${#1}; i++)); do
|
|
13
|
+
echo -n "${1:$i:1}"
|
|
14
|
+
sleep 0.04
|
|
15
|
+
done
|
|
16
|
+
echo ""
|
|
17
|
+
sleep 0.3
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
clear
|
|
21
|
+
echo ""
|
|
22
|
+
echo " Delimit v4.20 — The Highest State of AI Governance"
|
|
23
|
+
echo " ─────────────────────────────────────────────────────"
|
|
24
|
+
echo ""
|
|
25
|
+
sleep 2
|
|
26
|
+
|
|
27
|
+
# 1. Doctor
|
|
28
|
+
type_cmd "delimit doctor"
|
|
29
|
+
delimit doctor 2>/dev/null || node /home/delimit/npm-delimit/bin/delimit-cli.js doctor 2>/dev/null
|
|
30
|
+
sleep 3
|
|
31
|
+
|
|
32
|
+
# 2. Simulate
|
|
33
|
+
type_cmd "delimit simulate"
|
|
34
|
+
delimit simulate 2>/dev/null || node /home/delimit/npm-delimit/bin/delimit-cli.js simulate 2>/dev/null
|
|
35
|
+
sleep 3
|
|
36
|
+
|
|
37
|
+
# 3. Status
|
|
38
|
+
type_cmd "delimit status"
|
|
39
|
+
delimit status 2>/dev/null || node /home/delimit/npm-delimit/bin/delimit-cli.js status 2>/dev/null
|
|
40
|
+
sleep 3
|
|
41
|
+
|
|
42
|
+
# 4. Report
|
|
43
|
+
type_cmd "delimit report --since 7d"
|
|
44
|
+
delimit report --since 7d 2>/dev/null || node /home/delimit/npm-delimit/bin/delimit-cli.js report --since 7d 2>/dev/null
|
|
45
|
+
sleep 3
|
|
46
|
+
|
|
47
|
+
# 5. Remember
|
|
48
|
+
type_cmd "delimit remember 'v4.20 demo recorded successfully'"
|
|
49
|
+
delimit remember 'v4.20 demo recorded successfully' 2>/dev/null || node /home/delimit/npm-delimit/bin/delimit-cli.js remember 'v4.20 demo recorded successfully' 2>/dev/null
|
|
50
|
+
sleep 2
|
|
51
|
+
|
|
52
|
+
echo ""
|
|
53
|
+
echo " npm i -g delimit-cli@4.20.0"
|
|
54
|
+
echo ""
|
|
55
|
+
sleep 3
|