minimal-vibe-coding-kit 0.3.0
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/.agents/skills/agentshield-security-review/SKILL.md +75 -0
- package/.agents/skills/agentshield-security-review/agents/openai.yaml +5 -0
- package/.agents/skills/agentshield-security-review/references/native-install.md +97 -0
- package/.agents/skills/agentshield-security-review/references/report-template.md +54 -0
- package/.agents/skills/agentshield-security-review/references/review-checklist.md +45 -0
- package/.agents/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +110 -0
- package/.agents/skills/autoresearch-coding/README.md +15 -0
- package/.agents/skills/autoresearch-coding/SKILL.md +101 -0
- package/.agents/skills/autoresearch-coding/references/experiment-contract.md +13 -0
- package/.agents/skills/autoresearch-coding/references/metric-extraction.md +8 -0
- package/.agents/skills/autoresearch-coding/references/result-ledger.md +15 -0
- package/.agents/skills/autoresearch-coding/scripts/log_result.py +24 -0
- package/.agents/skills/autoresearch-coding/scripts/run_logged.py +30 -0
- package/.agents/skills/clearthought/SKILL.md +100 -0
- package/.agents/skills/clearthought/examples/decision-framework.md +441 -0
- package/.agents/skills/clearthought/examples/metagame-examples.md +536 -0
- package/.agents/skills/clearthought/examples/sequential-thinking.md +380 -0
- package/.agents/skills/clearthought/references/output-schemas.md +494 -0
- package/.agents/skills/clearthought/references/parameter-reference.md +482 -0
- package/.agents/skills/coding-level/SKILL.md +27 -0
- package/.agents/skills/coding-level/references/level-0.md +131 -0
- package/.agents/skills/coding-level/references/level-1.md +118 -0
- package/.agents/skills/coding-level/references/level-2.md +140 -0
- package/.agents/skills/coding-level/references/level-3.md +142 -0
- package/.agents/skills/coding-level/references/level-4.md +152 -0
- package/.agents/skills/coding-level/references/level-5.md +84 -0
- package/.agents/skills/daily-workflow-curator/SKILL.md +52 -0
- package/.agents/skills/memento/SKILL.md +36 -0
- package/.agents/skills/reviewing-4p-priorities/SKILL.md +72 -0
- package/.agents/skills/reviewing-4p-priorities/examples.md +298 -0
- package/.agents/skills/sequential-thinking/SKILL.md +106 -0
- package/.agents/skills/sequential-thinking/examples/adaptive-depth.md +542 -0
- package/.agents/skills/sequential-thinking/examples/branching-exploration.md +474 -0
- package/.agents/skills/sequential-thinking/examples/linear-reasoning.md +210 -0
- package/.agents/skills/sequential-thinking/examples/revision-pattern.md +304 -0
- package/.agents/skills/sequential-thinking/references/output-schema.md +483 -0
- package/.agents/skills/sequential-thinking/references/parameters.md +463 -0
- package/.agents/skills/sequential-thinking/references/patterns.md +666 -0
- package/.agents/skills/vibekit-init/SKILL.md +52 -0
- package/.agents/skills/visual-design-loop/SKILL.md +103 -0
- package/.agents/skills/visual-design-loop/agents/openai.yaml +4 -0
- package/.claude/agents/code-reviewer.md +11 -0
- package/.claude/agents/context-architect.md +11 -0
- package/.claude/agents/debug-fixer.md +11 -0
- package/.claude/agents/hypothesis-planner.md +11 -0
- package/.claude/agents/implementation-hacker.md +11 -0
- package/.claude/agents/research-coordinator.md +11 -0
- package/.claude/agents/results-analyst.md +11 -0
- package/.claude/agents/security-reviewer.md +11 -0
- package/.claude/agents/test-runner.md +11 -0
- package/.claude/agents/workflow-curator.md +11 -0
- package/.claude/commands/autoresearch-coding.md +15 -0
- package/.claude/commands/council.md +7 -0
- package/.claude/commands/daily-enhance.md +7 -0
- package/.claude/commands/init-vibe.md +7 -0
- package/.claude/commands/security-scan.md +7 -0
- package/.claude/commands/vibe-finalize.md +7 -0
- package/.claude/rules/autoresearch.md +3 -0
- package/.claude/rules/security.md +3 -0
- package/.claude/rules/tooling.md +6 -0
- package/.claude/rules/vibe-core.md +8 -0
- package/.claude/settings.json +22 -0
- package/.claude/skills/agentshield-security-review/SKILL.md +75 -0
- package/.claude/skills/agentshield-security-review/agents/openai.yaml +5 -0
- package/.claude/skills/agentshield-security-review/references/native-install.md +97 -0
- package/.claude/skills/agentshield-security-review/references/report-template.md +54 -0
- package/.claude/skills/agentshield-security-review/references/review-checklist.md +45 -0
- package/.claude/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +110 -0
- package/.claude/skills/autoresearch-coding/README.md +15 -0
- package/.claude/skills/autoresearch-coding/SKILL.md +101 -0
- package/.claude/skills/autoresearch-coding/references/experiment-contract.md +13 -0
- package/.claude/skills/autoresearch-coding/references/metric-extraction.md +8 -0
- package/.claude/skills/autoresearch-coding/references/result-ledger.md +15 -0
- package/.claude/skills/autoresearch-coding/scripts/log_result.py +24 -0
- package/.claude/skills/autoresearch-coding/scripts/run_logged.py +30 -0
- package/.claude/skills/clearthought/SKILL.md +100 -0
- package/.claude/skills/clearthought/examples/decision-framework.md +441 -0
- package/.claude/skills/clearthought/examples/metagame-examples.md +536 -0
- package/.claude/skills/clearthought/examples/sequential-thinking.md +380 -0
- package/.claude/skills/clearthought/references/output-schemas.md +494 -0
- package/.claude/skills/clearthought/references/parameter-reference.md +482 -0
- package/.claude/skills/coding-level/SKILL.md +27 -0
- package/.claude/skills/coding-level/references/level-0.md +131 -0
- package/.claude/skills/coding-level/references/level-1.md +118 -0
- package/.claude/skills/coding-level/references/level-2.md +140 -0
- package/.claude/skills/coding-level/references/level-3.md +142 -0
- package/.claude/skills/coding-level/references/level-4.md +152 -0
- package/.claude/skills/coding-level/references/level-5.md +84 -0
- package/.claude/skills/daily-workflow-curator/SKILL.md +52 -0
- package/.claude/skills/memento/SKILL.md +36 -0
- package/.claude/skills/reviewing-4p-priorities/SKILL.md +72 -0
- package/.claude/skills/reviewing-4p-priorities/examples.md +298 -0
- package/.claude/skills/sequential-thinking/SKILL.md +106 -0
- package/.claude/skills/sequential-thinking/examples/adaptive-depth.md +542 -0
- package/.claude/skills/sequential-thinking/examples/branching-exploration.md +474 -0
- package/.claude/skills/sequential-thinking/examples/linear-reasoning.md +210 -0
- package/.claude/skills/sequential-thinking/examples/revision-pattern.md +304 -0
- package/.claude/skills/sequential-thinking/references/output-schema.md +483 -0
- package/.claude/skills/sequential-thinking/references/parameters.md +463 -0
- package/.claude/skills/sequential-thinking/references/patterns.md +666 -0
- package/.claude/skills/vibekit-init/SKILL.md +52 -0
- package/.claude/skills/visual-design-loop/SKILL.md +103 -0
- package/.claude/skills/visual-design-loop/agents/openai.yaml +4 -0
- package/.codex/README.md +11 -0
- package/.codex/config.example.toml +8 -0
- package/.codex-plugin/plugin.json +10 -0
- package/.cursor/commands/autoresearch-coding.md +11 -0
- package/.cursor/commands/council.md +3 -0
- package/.cursor/commands/daily-enhance.md +3 -0
- package/.cursor/commands/init-vibe.md +3 -0
- package/.cursor/commands/security-scan.md +3 -0
- package/.cursor/commands/vibe-finalize.md +3 -0
- package/.cursor/rules/001-vibe-core.mdc +6 -0
- package/.cursor/rules/010-init.mdc +7 -0
- package/.cursor/rules/020-security-agentshield.mdc +7 -0
- package/.cursor/rules/030-autoresearch-loop.mdc +7 -0
- package/.cursor/settings.json +22 -0
- package/.cursor/skills/clearthought/SKILL.md +100 -0
- package/.cursor/skills/clearthought/examples/decision-framework.md +441 -0
- package/.cursor/skills/clearthought/examples/metagame-examples.md +536 -0
- package/.cursor/skills/clearthought/examples/sequential-thinking.md +380 -0
- package/.cursor/skills/clearthought/references/output-schemas.md +494 -0
- package/.cursor/skills/clearthought/references/parameter-reference.md +482 -0
- package/.cursor/skills/coding-level/SKILL.md +27 -0
- package/.cursor/skills/coding-level/references/level-0.md +131 -0
- package/.cursor/skills/coding-level/references/level-1.md +118 -0
- package/.cursor/skills/coding-level/references/level-2.md +140 -0
- package/.cursor/skills/coding-level/references/level-3.md +142 -0
- package/.cursor/skills/coding-level/references/level-4.md +152 -0
- package/.cursor/skills/coding-level/references/level-5.md +84 -0
- package/.cursor/skills/memento/SKILL.md +36 -0
- package/.cursor/skills/reviewing-4p-priorities/SKILL.md +72 -0
- package/.cursor/skills/reviewing-4p-priorities/examples.md +298 -0
- package/.cursor/skills/sequential-thinking/SKILL.md +106 -0
- package/.cursor/skills/sequential-thinking/examples/adaptive-depth.md +542 -0
- package/.cursor/skills/sequential-thinking/examples/branching-exploration.md +474 -0
- package/.cursor/skills/sequential-thinking/examples/linear-reasoning.md +210 -0
- package/.cursor/skills/sequential-thinking/examples/revision-pattern.md +304 -0
- package/.cursor/skills/sequential-thinking/references/output-schema.md +483 -0
- package/.cursor/skills/sequential-thinking/references/parameters.md +463 -0
- package/.cursor/skills/sequential-thinking/references/patterns.md +666 -0
- package/.vbkit-commands/autoresearch-coding.md +11 -0
- package/.vbkit-commands/council.md +3 -0
- package/.vbkit-commands/daily-enhance.md +3 -0
- package/.vbkit-commands/init-vibe.md +3 -0
- package/.vbkit-commands/security-scan.md +3 -0
- package/.vbkit-commands/vibe-finalize.md +3 -0
- package/.vbkit-docs/AUTORESEARCH_LEDGER.md +11 -0
- package/.vbkit-docs/BACKBONE_REFERENCE.md +59 -0
- package/.vbkit-docs/INSTALL.md +120 -0
- package/.vbkit-docs/RESEARCH_NOTES.md +22 -0
- package/.vbkit-docs/SECURITY_MODEL.md +40 -0
- package/.vbkit-docs/TOOLING_GUIDE.md +22 -0
- package/.vbkit-docs/backbone.schema.json +110 -0
- package/.vbkit-docs/templates/CONTEXT_TEMPLATE.md +47 -0
- package/.vbkit-docs/templates/PRD_TEMPLATE.md +48 -0
- package/.vbkit-scripts/agentshield-probe.mjs +22 -0
- package/.vbkit-scripts/daily-enhance.mjs +62 -0
- package/.vbkit-scripts/doctor.mjs +323 -0
- package/.vbkit-scripts/init-backbone.mjs +628 -0
- package/.vbkit-scripts/mvck.mjs +444 -0
- package/.vbkit-scripts/pack-dry-run.mjs +16 -0
- package/.vbkit-scripts/test-install.mjs +118 -0
- package/.vbkit-scripts/validate-kit.mjs +419 -0
- package/.vbkit-scripts/vibekit-finalize.mjs +185 -0
- package/AGENTS.md +60 -0
- package/CHANGELOG.md +34 -0
- package/CLAUDE-template.md +52 -0
- package/CODE_OF_CONDUCT.md +18 -0
- package/CONTRIBUTING.md +28 -0
- package/FIRST_PROMPT.md +54 -0
- package/FIRST_TIME_INIT.md +165 -0
- package/LICENSE +21 -0
- package/README.md +493 -0
- package/README.vi.md +431 -0
- package/SECURITY.md +28 -0
- package/backbone.yml +103 -0
- package/bin/mvck.js +2 -0
- package/bin/vibe-kit.js +2 -0
- package/install.ps1 +14 -0
- package/install.sh +8 -0
- package/package.json +92 -0
- package/skills/agentshield-security-review/SKILL.md +75 -0
- package/skills/agentshield-security-review/agents/openai.yaml +5 -0
- package/skills/agentshield-security-review/references/native-install.md +97 -0
- package/skills/agentshield-security-review/references/report-template.md +54 -0
- package/skills/agentshield-security-review/references/review-checklist.md +45 -0
- package/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +110 -0
- package/skills/autoresearch-coding/README.md +15 -0
- package/skills/autoresearch-coding/SKILL.md +101 -0
- package/skills/autoresearch-coding/references/experiment-contract.md +13 -0
- package/skills/autoresearch-coding/references/metric-extraction.md +8 -0
- package/skills/autoresearch-coding/references/result-ledger.md +15 -0
- package/skills/autoresearch-coding/scripts/log_result.py +24 -0
- package/skills/autoresearch-coding/scripts/run_logged.py +30 -0
- package/skills/clearthought/SKILL.md +100 -0
- package/skills/clearthought/examples/decision-framework.md +441 -0
- package/skills/clearthought/examples/metagame-examples.md +536 -0
- package/skills/clearthought/examples/sequential-thinking.md +380 -0
- package/skills/clearthought/references/output-schemas.md +494 -0
- package/skills/clearthought/references/parameter-reference.md +482 -0
- package/skills/coding-level/SKILL.md +27 -0
- package/skills/coding-level/references/level-0.md +131 -0
- package/skills/coding-level/references/level-1.md +118 -0
- package/skills/coding-level/references/level-2.md +140 -0
- package/skills/coding-level/references/level-3.md +142 -0
- package/skills/coding-level/references/level-4.md +152 -0
- package/skills/coding-level/references/level-5.md +84 -0
- package/skills/daily-workflow-curator/SKILL.md +52 -0
- package/skills/memento/SKILL.md +36 -0
- package/skills/reviewing-4p-priorities/SKILL.md +72 -0
- package/skills/reviewing-4p-priorities/examples.md +298 -0
- package/skills/sequential-thinking/SKILL.md +106 -0
- package/skills/sequential-thinking/examples/adaptive-depth.md +542 -0
- package/skills/sequential-thinking/examples/branching-exploration.md +474 -0
- package/skills/sequential-thinking/examples/linear-reasoning.md +210 -0
- package/skills/sequential-thinking/examples/revision-pattern.md +304 -0
- package/skills/sequential-thinking/references/output-schema.md +483 -0
- package/skills/sequential-thinking/references/parameters.md +463 -0
- package/skills/sequential-thinking/references/patterns.md +666 -0
- package/skills/vibekit-init/SKILL.md +52 -0
- package/skills/visual-design-loop/SKILL.md +103 -0
- package/skills/visual-design-loop/agents/openai.yaml +4 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { spawnSync } from 'node:child_process';
|
|
5
|
+
|
|
6
|
+
const args = process.argv.slice(2);
|
|
7
|
+
const target = path.resolve(args.find((a) => !a.startsWith('--')) || process.cwd());
|
|
8
|
+
const json = args.includes('--json');
|
|
9
|
+
const writeReport = args.includes('--write-report');
|
|
10
|
+
|
|
11
|
+
function exists(rel) { return fs.existsSync(path.join(target, rel)); }
|
|
12
|
+
function read(rel) { return fs.readFileSync(path.join(target, rel), 'utf8'); }
|
|
13
|
+
function readJson(rel) {
|
|
14
|
+
try { return JSON.parse(read(rel)); } catch { return null; }
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function listFiles(dir) {
|
|
18
|
+
const root = path.join(target, dir);
|
|
19
|
+
if (!fs.existsSync(root)) return [];
|
|
20
|
+
const out = [];
|
|
21
|
+
function walk(current) {
|
|
22
|
+
for (const entry of fs.readdirSync(current, { withFileTypes: true })) {
|
|
23
|
+
const child = path.join(current, entry.name);
|
|
24
|
+
if (entry.isDirectory()) walk(child);
|
|
25
|
+
else out.push(path.relative(target, child).replaceAll(path.sep, '/'));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
walk(root);
|
|
29
|
+
return out;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function matchValue(text, key) {
|
|
33
|
+
const escaped = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
34
|
+
const match = text.match(new RegExp(`^\\s*${escaped}:\\s*(.+?)\\s*$`, 'm'));
|
|
35
|
+
return match ? match[1].replace(/^["']|["']$/g, '') : null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function parseBackbone() {
|
|
39
|
+
if (!exists('backbone.yml')) return null;
|
|
40
|
+
const text = read('backbone.yml');
|
|
41
|
+
return {
|
|
42
|
+
text,
|
|
43
|
+
templateStatus: matchValue(text, 'template_status'),
|
|
44
|
+
validate: matchValue(text, 'validate'),
|
|
45
|
+
protectedPaths: listUnderKey(text, 'protected_paths'),
|
|
46
|
+
editablePaths: listUnderKey(text, 'editable_paths')
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function listUnderKey(text, key) {
|
|
51
|
+
const lines = text.split(/\r?\n/);
|
|
52
|
+
const idx = lines.findIndex((line) => line.match(new RegExp(`^\\s*${key}:`)));
|
|
53
|
+
if (idx < 0) return [];
|
|
54
|
+
const indent = lines[idx].match(/^\s*/)[0].length;
|
|
55
|
+
const inline = lines[idx].split(':').slice(1).join(':').trim();
|
|
56
|
+
if (inline.startsWith('[') && inline.endsWith(']')) {
|
|
57
|
+
return inline.slice(1, -1).split(',').map((x) => x.trim()).filter(Boolean);
|
|
58
|
+
}
|
|
59
|
+
const out = [];
|
|
60
|
+
for (const line of lines.slice(idx + 1)) {
|
|
61
|
+
if (!line.trim()) continue;
|
|
62
|
+
const currentIndent = line.match(/^\s*/)[0].length;
|
|
63
|
+
if (currentIndent <= indent) break;
|
|
64
|
+
const item = line.match(/^\s*-\s+(.+?)\s*$/);
|
|
65
|
+
if (item) out.push(item[1].replace(/^["']|["']$/g, ''));
|
|
66
|
+
}
|
|
67
|
+
return out;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function countManaged(rel) {
|
|
71
|
+
if (!exists(rel)) return null;
|
|
72
|
+
const text = read(rel);
|
|
73
|
+
const begin = (text.match(/BEGIN: minimal-vibe-coding-kit/g) || []).length;
|
|
74
|
+
const end = (text.match(/END: minimal-vibe-coding-kit/g) || []).length;
|
|
75
|
+
return { begin, end, ok: begin <= 1 && end <= 1 && begin === end };
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function commandMap() {
|
|
79
|
+
const pkg = readJson('package.json');
|
|
80
|
+
const scripts = pkg?.scripts || {};
|
|
81
|
+
const out = {};
|
|
82
|
+
for (const name of ['install', 'test', 'lint', 'typecheck', 'build']) {
|
|
83
|
+
if (name === 'install') out.install = exists('package.json') ? 'package manager install' : null;
|
|
84
|
+
else out[name] = scripts[name] ? `npm run ${name}` : null;
|
|
85
|
+
}
|
|
86
|
+
const backbone = parseBackbone();
|
|
87
|
+
if (backbone?.validate) out.validate = backbone.validate;
|
|
88
|
+
else if (scripts.validate) out.validate = 'npm run validate';
|
|
89
|
+
else out.validate = null;
|
|
90
|
+
return out;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function detectStack() {
|
|
94
|
+
const pkg = readJson('package.json');
|
|
95
|
+
const deps = { ...(pkg?.dependencies || {}), ...(pkg?.devDependencies || {}) };
|
|
96
|
+
const stack = [];
|
|
97
|
+
if (deps.next || exists('next.config.js') || exists('next.config.mjs')) stack.push('Next.js');
|
|
98
|
+
if (exists('wp-config.php') || exists('wp-content')) stack.push('WordPress');
|
|
99
|
+
if (deps.react) stack.push('React');
|
|
100
|
+
if (exists('pyproject.toml') || exists('requirements.txt')) stack.push('Python');
|
|
101
|
+
if (exists('composer.json')) {
|
|
102
|
+
const composer = readJson('composer.json');
|
|
103
|
+
if (composer?.require?.['laravel/framework']) stack.push('Laravel');
|
|
104
|
+
else stack.push('PHP/Composer');
|
|
105
|
+
}
|
|
106
|
+
if (exists('go.mod')) stack.push('Go');
|
|
107
|
+
if (exists('Cargo.toml')) stack.push('Rust');
|
|
108
|
+
if (exists('Dockerfile') || exists('docker-compose.yml') || exists('compose.yml')) stack.push('Docker');
|
|
109
|
+
if (!stack.length && pkg) stack.push('Node.js');
|
|
110
|
+
return stack.length ? stack : ['unknown'];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function runNodeScript(rel, extra = []) {
|
|
114
|
+
const script = path.join(target, rel);
|
|
115
|
+
if (!fs.existsSync(script)) return { found: false, status: null, output: 'missing' };
|
|
116
|
+
const result = spawnSync(process.execPath, [script, target, ...extra], { encoding: 'utf8' });
|
|
117
|
+
return {
|
|
118
|
+
found: true,
|
|
119
|
+
status: result.status ?? 1,
|
|
120
|
+
output: (result.stdout || result.stderr || '').trim()
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function runProbe() {
|
|
125
|
+
const nodeProbeRel = '.vbkit-scripts/agentshield-probe.mjs';
|
|
126
|
+
const nodeProbe = path.join(target, nodeProbeRel);
|
|
127
|
+
if (fs.existsSync(nodeProbe)) {
|
|
128
|
+
const result = spawnSync(process.execPath, [nodeProbe, target, '--json'], { encoding: 'utf8' });
|
|
129
|
+
return {
|
|
130
|
+
found: true,
|
|
131
|
+
command: `node ${nodeProbeRel}`,
|
|
132
|
+
status: result.status ?? 1,
|
|
133
|
+
output: (result.stdout || result.stderr || '').trim()
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const probe = path.join(target, 'skills/agentshield-security-review/scripts/agentshield_repo_probe.py');
|
|
138
|
+
if (!fs.existsSync(probe)) return { found: false, status: null, output: 'missing' };
|
|
139
|
+
for (const python of ['python', 'python3']) {
|
|
140
|
+
const result = spawnSync(python, [probe, target, '--json'], { encoding: 'utf8' });
|
|
141
|
+
if (result.error?.code === 'ENOENT') continue;
|
|
142
|
+
return {
|
|
143
|
+
found: true,
|
|
144
|
+
command: python,
|
|
145
|
+
status: result.status ?? 1,
|
|
146
|
+
output: (result.stdout || result.stderr || '').trim()
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
return { found: true, command: 'python/python3', status: 1, output: 'python executable not found' };
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function statusLine(ok, label, detail) {
|
|
153
|
+
return `${ok ? 'PASS' : 'WARN'} ${label}${detail ? ` - ${detail}` : ''}`;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const backbone = parseBackbone();
|
|
157
|
+
const packageJson = readJson('package.json');
|
|
158
|
+
const isKitTemplate = packageJson?.name === 'minimal-vibe-coding-kit';
|
|
159
|
+
const kitVersion = isKitTemplate
|
|
160
|
+
? packageJson?.version || 'unknown'
|
|
161
|
+
: exists('.vibekit/KIT_VERSION') ? read('.vibekit/KIT_VERSION').trim() : 'unknown';
|
|
162
|
+
const surfaces = {
|
|
163
|
+
agents: exists('AGENTS.md'),
|
|
164
|
+
claude: exists('CLAUDE.md') || exists('CLAUDE-template.md') || exists('.claude'),
|
|
165
|
+
cursor: exists('.cursor/rules'),
|
|
166
|
+
codex: exists('.agents') || exists('.codex-plugin/plugin.json')
|
|
167
|
+
};
|
|
168
|
+
const managedBlocks = {
|
|
169
|
+
AGENTS: countManaged('AGENTS.md'),
|
|
170
|
+
CLAUDE: countManaged('CLAUDE.md'),
|
|
171
|
+
gitignore: countManaged('.gitignore')
|
|
172
|
+
};
|
|
173
|
+
const protectedNeedles = ['.env', 'secret', 'token', 'node_modules', 'dist', 'build', 'coverage', 'lock'];
|
|
174
|
+
const protectedSane = protectedNeedles.every((needle) => (backbone?.protectedPaths || []).some((item) => item.includes(needle)));
|
|
175
|
+
const legacySurfaces = [
|
|
176
|
+
'.claude/agent',
|
|
177
|
+
'.claude/command',
|
|
178
|
+
'.cursor/agent',
|
|
179
|
+
'.cursor/command'
|
|
180
|
+
].filter(exists);
|
|
181
|
+
const nativeReasoningSkills = ['clearthought', 'sequential-thinking', 'reviewing-4p-priorities'];
|
|
182
|
+
const nativeSkillSurfaces = {
|
|
183
|
+
shared: 'skills',
|
|
184
|
+
claude: '.claude/skills',
|
|
185
|
+
codex: '.agents/skills',
|
|
186
|
+
cursor: '.cursor/skills'
|
|
187
|
+
};
|
|
188
|
+
const missingNativeSkills = [];
|
|
189
|
+
for (const [surface, dir] of Object.entries(nativeSkillSurfaces)) {
|
|
190
|
+
for (const skill of nativeReasoningSkills) {
|
|
191
|
+
if (!exists(`${dir}/${skill}/SKILL.md`)) missingNativeSkills.push(`${surface}:${skill}`);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
const commands = commandMap();
|
|
195
|
+
const validation = runNodeScript('.vbkit-scripts/validate-kit.mjs');
|
|
196
|
+
const probe = runProbe();
|
|
197
|
+
const risks = [];
|
|
198
|
+
|
|
199
|
+
if (!backbone) risks.push('backbone.yml is missing.');
|
|
200
|
+
else if (backbone.templateStatus !== 'initialized' && !isKitTemplate) risks.push(`backbone.yml is ${backbone.templateStatus || 'unknown'}; run init before relying on it.`);
|
|
201
|
+
if (!Object.values(surfaces).some(Boolean)) risks.push('No AI agent surfaces were detected.');
|
|
202
|
+
if (missingNativeSkills.length) risks.push(`Native reasoning skill mirrors are missing: ${missingNativeSkills.join(', ')}.`);
|
|
203
|
+
if (legacySurfaces.length) risks.push(`Legacy local agent/command folders remain but are excluded from install/package: ${legacySurfaces.join(', ')}.`);
|
|
204
|
+
for (const [name, result] of Object.entries(managedBlocks)) {
|
|
205
|
+
if (result && !result.ok) risks.push(`${name} has duplicated or unbalanced managed block markers.`);
|
|
206
|
+
}
|
|
207
|
+
if (!protectedSane) risks.push('protected_paths is missing one or more common secret/generated path guards.');
|
|
208
|
+
if (validation.found && validation.status !== 0) risks.push('validation command failed.');
|
|
209
|
+
if (probe.found && probe.status !== 0) risks.push('AgentShield probe failed.');
|
|
210
|
+
if (!risks.length) risks.push('No immediate structural risks detected by mvck doctor.');
|
|
211
|
+
|
|
212
|
+
const report = {
|
|
213
|
+
generatedAt: new Date().toISOString(),
|
|
214
|
+
target,
|
|
215
|
+
projectSummary: {
|
|
216
|
+
name: packageJson?.name || path.basename(target),
|
|
217
|
+
stack: detectStack(),
|
|
218
|
+
backboneStatus: backbone?.templateStatus || 'missing',
|
|
219
|
+
kitTemplate: isKitTemplate,
|
|
220
|
+
kitVersion
|
|
221
|
+
},
|
|
222
|
+
safeCommands: commands,
|
|
223
|
+
editablePaths: backbone?.editablePaths || [],
|
|
224
|
+
protectedPaths: backbone?.protectedPaths || [],
|
|
225
|
+
agentSurfaces: surfaces,
|
|
226
|
+
managedBlocks,
|
|
227
|
+
legacySurfaces,
|
|
228
|
+
nativeReasoningSkills: {
|
|
229
|
+
names: nativeReasoningSkills,
|
|
230
|
+
missing: missingNativeSkills
|
|
231
|
+
},
|
|
232
|
+
validation: {
|
|
233
|
+
found: validation.found,
|
|
234
|
+
status: validation.status
|
|
235
|
+
},
|
|
236
|
+
agentShieldProbe: {
|
|
237
|
+
found: probe.found,
|
|
238
|
+
command: probe.command,
|
|
239
|
+
status: probe.status
|
|
240
|
+
},
|
|
241
|
+
aiRulesLoaded: {
|
|
242
|
+
sharedSkills: listFiles('skills').filter((f) => f.endsWith('SKILL.md')).length,
|
|
243
|
+
claudeSkills: listFiles('.claude/skills').filter((f) => f.endsWith('SKILL.md')).length,
|
|
244
|
+
codexSkills: listFiles('.agents/skills').filter((f) => f.endsWith('SKILL.md')).length,
|
|
245
|
+
cursorSkills: listFiles('.cursor/skills').filter((f) => f.endsWith('SKILL.md')).length,
|
|
246
|
+
cursorRules: listFiles('.cursor/rules').filter((f) => f.endsWith('.mdc')).length
|
|
247
|
+
},
|
|
248
|
+
recommendedFirstPrompt: 'Read AGENTS.md and backbone.yml, run mvck doctor ., then propose a small safe plan before editing.',
|
|
249
|
+
knownRisks: risks
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
function renderMarkdown(data) {
|
|
253
|
+
const checks = [
|
|
254
|
+
statusLine(Boolean(backbone), 'backbone.yml exists', data.projectSummary.backboneStatus),
|
|
255
|
+
statusLine(data.projectSummary.backboneStatus === 'initialized' || data.projectSummary.kitTemplate, 'backbone initialized or kit template', data.projectSummary.backboneStatus),
|
|
256
|
+
statusLine(Boolean(commands.validate), 'validation command detected', commands.validate || 'missing'),
|
|
257
|
+
statusLine(protectedSane, 'protected paths are sane', `${data.protectedPaths.length} entries`),
|
|
258
|
+
statusLine(validation.found && validation.status === 0, 'validation runs', validation.found ? `exit ${validation.status}` : 'missing'),
|
|
259
|
+
statusLine(probe.found && probe.status === 0, 'AgentShield probe runs', probe.found ? `exit ${probe.status}` : 'missing')
|
|
260
|
+
];
|
|
261
|
+
|
|
262
|
+
return `# Vibe Report
|
|
263
|
+
|
|
264
|
+
Generated: ${data.generatedAt}
|
|
265
|
+
|
|
266
|
+
## Project summary
|
|
267
|
+
|
|
268
|
+
- Name: ${data.projectSummary.name}
|
|
269
|
+
- Detected stack: ${data.projectSummary.stack.join(', ')}
|
|
270
|
+
- Backbone status: ${data.projectSummary.backboneStatus}
|
|
271
|
+
- Kit template source: ${data.projectSummary.kitTemplate ? 'yes' : 'no'}
|
|
272
|
+
- Kit version: ${data.projectSummary.kitVersion} (update with: npx --yes minimal-vibe-coding-kit@latest update .)
|
|
273
|
+
|
|
274
|
+
## Doctor checks
|
|
275
|
+
|
|
276
|
+
${checks.map((line) => `- ${line}`).join('\n')}
|
|
277
|
+
|
|
278
|
+
## Safe commands
|
|
279
|
+
|
|
280
|
+
${Object.entries(data.safeCommands).map(([name, command]) => `- ${name}: ${command || 'not detected'}`).join('\n')}
|
|
281
|
+
|
|
282
|
+
## Editable paths
|
|
283
|
+
|
|
284
|
+
${(data.editablePaths.length ? data.editablePaths : ['not declared']).map((item) => `- ${item}`).join('\n')}
|
|
285
|
+
|
|
286
|
+
## Protected paths
|
|
287
|
+
|
|
288
|
+
${(data.protectedPaths.length ? data.protectedPaths : ['not declared']).map((item) => `- ${item}`).join('\n')}
|
|
289
|
+
|
|
290
|
+
## AI rules loaded
|
|
291
|
+
|
|
292
|
+
- AGENTS.md: ${data.agentSurfaces.agents ? 'yes' : 'no'}
|
|
293
|
+
- Claude surface: ${data.agentSurfaces.claude ? 'yes' : 'no'}
|
|
294
|
+
- Cursor surface: ${data.agentSurfaces.cursor ? 'yes' : 'no'}
|
|
295
|
+
- Codex surface: ${data.agentSurfaces.codex ? 'yes' : 'no'}
|
|
296
|
+
- Shared skills: ${data.aiRulesLoaded.sharedSkills}
|
|
297
|
+
- Claude skills: ${data.aiRulesLoaded.claudeSkills}
|
|
298
|
+
- Codex skills: ${data.aiRulesLoaded.codexSkills}
|
|
299
|
+
- Cursor skills: ${data.aiRulesLoaded.cursorSkills}
|
|
300
|
+
- Cursor rules: ${data.aiRulesLoaded.cursorRules}
|
|
301
|
+
|
|
302
|
+
## Native reasoning skills
|
|
303
|
+
|
|
304
|
+
${data.nativeReasoningSkills.names.map((skill) => `- ${skill}: ${data.nativeReasoningSkills.missing.some((item) => item.endsWith(`:${skill}`)) ? 'missing on one or more surfaces' : 'available on shared, Claude, Codex, and Cursor'}`).join('\n')}
|
|
305
|
+
|
|
306
|
+
## Recommended first prompt
|
|
307
|
+
|
|
308
|
+
${data.recommendedFirstPrompt}
|
|
309
|
+
|
|
310
|
+
## Known risks
|
|
311
|
+
|
|
312
|
+
${data.knownRisks.map((risk) => `- ${risk}`).join('\n')}
|
|
313
|
+
`;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
if (json) console.log(JSON.stringify(report, null, 2));
|
|
317
|
+
else console.log(renderMarkdown(report));
|
|
318
|
+
|
|
319
|
+
if (writeReport) {
|
|
320
|
+
const out = path.join(target, 'VIBE_REPORT.md');
|
|
321
|
+
fs.writeFileSync(out, renderMarkdown(report));
|
|
322
|
+
if (!json) console.log(`\nWrote ${path.relative(target, out)}`);
|
|
323
|
+
}
|