delimit-cli 3.11.6 → 3.11.7
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/bin/delimit-setup.js +72 -2
- package/package.json +1 -1
- package/server.json +2 -2
package/bin/delimit-setup.js
CHANGED
|
@@ -29,6 +29,24 @@ const bold = (s) => `\x1b[1m${s}\x1b[0m`;
|
|
|
29
29
|
function log(msg) { console.log(msg); }
|
|
30
30
|
function step(n, msg) { log(`\n${blue(`[${n}]`)} ${msg}`); }
|
|
31
31
|
|
|
32
|
+
function findGitDir(startDir) {
|
|
33
|
+
let dir = startDir;
|
|
34
|
+
while (dir !== path.dirname(dir)) {
|
|
35
|
+
const gitPath = path.join(dir, '.git');
|
|
36
|
+
if (fs.existsSync(gitPath)) {
|
|
37
|
+
// Handle both regular .git dirs and worktree .git files
|
|
38
|
+
const stat = fs.statSync(gitPath);
|
|
39
|
+
if (stat.isDirectory()) return gitPath;
|
|
40
|
+
// .git file (worktree) — read the gitdir path
|
|
41
|
+
const content = fs.readFileSync(gitPath, 'utf-8').trim();
|
|
42
|
+
const match = content.match(/^gitdir:\s*(.+)$/);
|
|
43
|
+
if (match) return match[1];
|
|
44
|
+
}
|
|
45
|
+
dir = path.dirname(dir);
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
|
|
32
50
|
async function main() {
|
|
33
51
|
log('');
|
|
34
52
|
log(blue(' ____ ________ ______ _____________'));
|
|
@@ -338,6 +356,41 @@ Run full governance compliance checks. Verify security, policy compliance, evide
|
|
|
338
356
|
}
|
|
339
357
|
log(` ${green('✓')} ${installed} agents installed (${Object.keys(agents).length - installed} already existed)`);
|
|
340
358
|
|
|
359
|
+
// Step 4b: Install Git hooks if inside a git repository
|
|
360
|
+
const gitDir = findGitDir(process.cwd());
|
|
361
|
+
if (gitDir) {
|
|
362
|
+
const gitHooksDir = path.join(gitDir, 'hooks');
|
|
363
|
+
const srcHooksDir = path.join(__dirname, '..', 'hooks', 'git');
|
|
364
|
+
if (fs.existsSync(srcHooksDir)) {
|
|
365
|
+
fs.mkdirSync(gitHooksDir, { recursive: true });
|
|
366
|
+
let hooksInstalled = 0;
|
|
367
|
+
for (const hookFile of ['pre-commit', 'pre-push', 'commit-msg']) {
|
|
368
|
+
const src = path.join(srcHooksDir, hookFile);
|
|
369
|
+
const dest = path.join(gitHooksDir, hookFile);
|
|
370
|
+
if (fs.existsSync(src)) {
|
|
371
|
+
// Only install if hook doesn't already exist or is a delimit hook
|
|
372
|
+
let shouldInstall = !fs.existsSync(dest);
|
|
373
|
+
if (!shouldInstall) {
|
|
374
|
+
const existing = fs.readFileSync(dest, 'utf-8');
|
|
375
|
+
shouldInstall = existing.includes('Delimit') || existing.includes('delimit');
|
|
376
|
+
}
|
|
377
|
+
if (shouldInstall) {
|
|
378
|
+
fs.copyFileSync(src, dest);
|
|
379
|
+
fs.chmodSync(dest, '755');
|
|
380
|
+
hooksInstalled++;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
if (hooksInstalled > 0) {
|
|
385
|
+
log(` ${green('✓')} ${hooksInstalled} Git hooks installed to ${gitHooksDir}`);
|
|
386
|
+
} else {
|
|
387
|
+
log(` ${dim(' Git hooks already present (non-Delimit hooks preserved)')}`);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
} else {
|
|
391
|
+
log(` ${dim(' Not inside a git repo — git hooks will be installed on next delimit setup inside a repo')}`);
|
|
392
|
+
}
|
|
393
|
+
|
|
341
394
|
// Step 5: Create/update CLAUDE.md and platform instruction files
|
|
342
395
|
step(5, 'Setting up AI instruction files...');
|
|
343
396
|
|
|
@@ -558,11 +611,28 @@ function getDelimitSection() {
|
|
|
558
611
|
One workspace for every AI coding assistant.
|
|
559
612
|
|
|
560
613
|
## On every session start:
|
|
561
|
-
1. Call \`
|
|
562
|
-
2. Call \`
|
|
614
|
+
1. Call \`delimit_ledger_context\` to check for open tasks
|
|
615
|
+
2. Call \`delimit_gov_health\` to check governance status
|
|
563
616
|
3. If returning user, summarize what's pending
|
|
564
617
|
4. If new project, call \`delimit_scan\` to discover what Delimit can do
|
|
565
618
|
|
|
619
|
+
## After editing code:
|
|
620
|
+
- After editing UI/CSS: call \`delimit_design_validate_responsive\`
|
|
621
|
+
- After editing API specs: call \`delimit_lint\`
|
|
622
|
+
- After editing tests: call \`delimit_test_smoke\`
|
|
623
|
+
|
|
624
|
+
## Before deploying:
|
|
625
|
+
1. Call \`delimit_security_audit\`
|
|
626
|
+
2. Call \`delimit_test_smoke\`
|
|
627
|
+
3. Call \`delimit_deploy_plan\`
|
|
628
|
+
|
|
629
|
+
## Before committing:
|
|
630
|
+
- Call \`delimit_repo_diagnose\` to check for common issues
|
|
631
|
+
|
|
632
|
+
## When starting a new project:
|
|
633
|
+
- Call \`delimit_scan\` to discover what Delimit can do
|
|
634
|
+
- Call \`delimit_init\` to set up governance
|
|
635
|
+
|
|
566
636
|
## Try these:
|
|
567
637
|
- "scan this project" -- discover what Delimit can do here
|
|
568
638
|
- "lint my API spec" -- catch breaking changes in your OpenAPI spec
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "delimit-cli",
|
|
3
3
|
"mcpName": "io.github.delimit-ai/delimit",
|
|
4
|
-
"version": "3.11.
|
|
4
|
+
"version": "3.11.7",
|
|
5
5
|
"description": "One workspace for every AI coding assistant. Tasks, memory, and governance carry between Claude Code, Codex, and Gemini CLI.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|
package/server.json
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
"url": "https://github.com/delimit-ai/delimit",
|
|
8
8
|
"source": "github"
|
|
9
9
|
},
|
|
10
|
-
"version": "3.11.
|
|
10
|
+
"version": "3.11.7",
|
|
11
11
|
"websiteUrl": "https://delimit.ai",
|
|
12
12
|
"packages": [
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "delimit-cli",
|
|
16
|
-
"version": "3.11.
|
|
16
|
+
"version": "3.11.7",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
}
|