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.
Files changed (223) hide show
  1. package/.agents/skills/agentshield-security-review/SKILL.md +75 -0
  2. package/.agents/skills/agentshield-security-review/agents/openai.yaml +5 -0
  3. package/.agents/skills/agentshield-security-review/references/native-install.md +97 -0
  4. package/.agents/skills/agentshield-security-review/references/report-template.md +54 -0
  5. package/.agents/skills/agentshield-security-review/references/review-checklist.md +45 -0
  6. package/.agents/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +110 -0
  7. package/.agents/skills/autoresearch-coding/README.md +15 -0
  8. package/.agents/skills/autoresearch-coding/SKILL.md +101 -0
  9. package/.agents/skills/autoresearch-coding/references/experiment-contract.md +13 -0
  10. package/.agents/skills/autoresearch-coding/references/metric-extraction.md +8 -0
  11. package/.agents/skills/autoresearch-coding/references/result-ledger.md +15 -0
  12. package/.agents/skills/autoresearch-coding/scripts/log_result.py +24 -0
  13. package/.agents/skills/autoresearch-coding/scripts/run_logged.py +30 -0
  14. package/.agents/skills/clearthought/SKILL.md +100 -0
  15. package/.agents/skills/clearthought/examples/decision-framework.md +441 -0
  16. package/.agents/skills/clearthought/examples/metagame-examples.md +536 -0
  17. package/.agents/skills/clearthought/examples/sequential-thinking.md +380 -0
  18. package/.agents/skills/clearthought/references/output-schemas.md +494 -0
  19. package/.agents/skills/clearthought/references/parameter-reference.md +482 -0
  20. package/.agents/skills/coding-level/SKILL.md +27 -0
  21. package/.agents/skills/coding-level/references/level-0.md +131 -0
  22. package/.agents/skills/coding-level/references/level-1.md +118 -0
  23. package/.agents/skills/coding-level/references/level-2.md +140 -0
  24. package/.agents/skills/coding-level/references/level-3.md +142 -0
  25. package/.agents/skills/coding-level/references/level-4.md +152 -0
  26. package/.agents/skills/coding-level/references/level-5.md +84 -0
  27. package/.agents/skills/daily-workflow-curator/SKILL.md +52 -0
  28. package/.agents/skills/memento/SKILL.md +36 -0
  29. package/.agents/skills/reviewing-4p-priorities/SKILL.md +72 -0
  30. package/.agents/skills/reviewing-4p-priorities/examples.md +298 -0
  31. package/.agents/skills/sequential-thinking/SKILL.md +106 -0
  32. package/.agents/skills/sequential-thinking/examples/adaptive-depth.md +542 -0
  33. package/.agents/skills/sequential-thinking/examples/branching-exploration.md +474 -0
  34. package/.agents/skills/sequential-thinking/examples/linear-reasoning.md +210 -0
  35. package/.agents/skills/sequential-thinking/examples/revision-pattern.md +304 -0
  36. package/.agents/skills/sequential-thinking/references/output-schema.md +483 -0
  37. package/.agents/skills/sequential-thinking/references/parameters.md +463 -0
  38. package/.agents/skills/sequential-thinking/references/patterns.md +666 -0
  39. package/.agents/skills/vibekit-init/SKILL.md +52 -0
  40. package/.agents/skills/visual-design-loop/SKILL.md +103 -0
  41. package/.agents/skills/visual-design-loop/agents/openai.yaml +4 -0
  42. package/.claude/agents/code-reviewer.md +11 -0
  43. package/.claude/agents/context-architect.md +11 -0
  44. package/.claude/agents/debug-fixer.md +11 -0
  45. package/.claude/agents/hypothesis-planner.md +11 -0
  46. package/.claude/agents/implementation-hacker.md +11 -0
  47. package/.claude/agents/research-coordinator.md +11 -0
  48. package/.claude/agents/results-analyst.md +11 -0
  49. package/.claude/agents/security-reviewer.md +11 -0
  50. package/.claude/agents/test-runner.md +11 -0
  51. package/.claude/agents/workflow-curator.md +11 -0
  52. package/.claude/commands/autoresearch-coding.md +15 -0
  53. package/.claude/commands/council.md +7 -0
  54. package/.claude/commands/daily-enhance.md +7 -0
  55. package/.claude/commands/init-vibe.md +7 -0
  56. package/.claude/commands/security-scan.md +7 -0
  57. package/.claude/commands/vibe-finalize.md +7 -0
  58. package/.claude/rules/autoresearch.md +3 -0
  59. package/.claude/rules/security.md +3 -0
  60. package/.claude/rules/tooling.md +6 -0
  61. package/.claude/rules/vibe-core.md +8 -0
  62. package/.claude/settings.json +22 -0
  63. package/.claude/skills/agentshield-security-review/SKILL.md +75 -0
  64. package/.claude/skills/agentshield-security-review/agents/openai.yaml +5 -0
  65. package/.claude/skills/agentshield-security-review/references/native-install.md +97 -0
  66. package/.claude/skills/agentshield-security-review/references/report-template.md +54 -0
  67. package/.claude/skills/agentshield-security-review/references/review-checklist.md +45 -0
  68. package/.claude/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +110 -0
  69. package/.claude/skills/autoresearch-coding/README.md +15 -0
  70. package/.claude/skills/autoresearch-coding/SKILL.md +101 -0
  71. package/.claude/skills/autoresearch-coding/references/experiment-contract.md +13 -0
  72. package/.claude/skills/autoresearch-coding/references/metric-extraction.md +8 -0
  73. package/.claude/skills/autoresearch-coding/references/result-ledger.md +15 -0
  74. package/.claude/skills/autoresearch-coding/scripts/log_result.py +24 -0
  75. package/.claude/skills/autoresearch-coding/scripts/run_logged.py +30 -0
  76. package/.claude/skills/clearthought/SKILL.md +100 -0
  77. package/.claude/skills/clearthought/examples/decision-framework.md +441 -0
  78. package/.claude/skills/clearthought/examples/metagame-examples.md +536 -0
  79. package/.claude/skills/clearthought/examples/sequential-thinking.md +380 -0
  80. package/.claude/skills/clearthought/references/output-schemas.md +494 -0
  81. package/.claude/skills/clearthought/references/parameter-reference.md +482 -0
  82. package/.claude/skills/coding-level/SKILL.md +27 -0
  83. package/.claude/skills/coding-level/references/level-0.md +131 -0
  84. package/.claude/skills/coding-level/references/level-1.md +118 -0
  85. package/.claude/skills/coding-level/references/level-2.md +140 -0
  86. package/.claude/skills/coding-level/references/level-3.md +142 -0
  87. package/.claude/skills/coding-level/references/level-4.md +152 -0
  88. package/.claude/skills/coding-level/references/level-5.md +84 -0
  89. package/.claude/skills/daily-workflow-curator/SKILL.md +52 -0
  90. package/.claude/skills/memento/SKILL.md +36 -0
  91. package/.claude/skills/reviewing-4p-priorities/SKILL.md +72 -0
  92. package/.claude/skills/reviewing-4p-priorities/examples.md +298 -0
  93. package/.claude/skills/sequential-thinking/SKILL.md +106 -0
  94. package/.claude/skills/sequential-thinking/examples/adaptive-depth.md +542 -0
  95. package/.claude/skills/sequential-thinking/examples/branching-exploration.md +474 -0
  96. package/.claude/skills/sequential-thinking/examples/linear-reasoning.md +210 -0
  97. package/.claude/skills/sequential-thinking/examples/revision-pattern.md +304 -0
  98. package/.claude/skills/sequential-thinking/references/output-schema.md +483 -0
  99. package/.claude/skills/sequential-thinking/references/parameters.md +463 -0
  100. package/.claude/skills/sequential-thinking/references/patterns.md +666 -0
  101. package/.claude/skills/vibekit-init/SKILL.md +52 -0
  102. package/.claude/skills/visual-design-loop/SKILL.md +103 -0
  103. package/.claude/skills/visual-design-loop/agents/openai.yaml +4 -0
  104. package/.codex/README.md +11 -0
  105. package/.codex/config.example.toml +8 -0
  106. package/.codex-plugin/plugin.json +10 -0
  107. package/.cursor/commands/autoresearch-coding.md +11 -0
  108. package/.cursor/commands/council.md +3 -0
  109. package/.cursor/commands/daily-enhance.md +3 -0
  110. package/.cursor/commands/init-vibe.md +3 -0
  111. package/.cursor/commands/security-scan.md +3 -0
  112. package/.cursor/commands/vibe-finalize.md +3 -0
  113. package/.cursor/rules/001-vibe-core.mdc +6 -0
  114. package/.cursor/rules/010-init.mdc +7 -0
  115. package/.cursor/rules/020-security-agentshield.mdc +7 -0
  116. package/.cursor/rules/030-autoresearch-loop.mdc +7 -0
  117. package/.cursor/settings.json +22 -0
  118. package/.cursor/skills/clearthought/SKILL.md +100 -0
  119. package/.cursor/skills/clearthought/examples/decision-framework.md +441 -0
  120. package/.cursor/skills/clearthought/examples/metagame-examples.md +536 -0
  121. package/.cursor/skills/clearthought/examples/sequential-thinking.md +380 -0
  122. package/.cursor/skills/clearthought/references/output-schemas.md +494 -0
  123. package/.cursor/skills/clearthought/references/parameter-reference.md +482 -0
  124. package/.cursor/skills/coding-level/SKILL.md +27 -0
  125. package/.cursor/skills/coding-level/references/level-0.md +131 -0
  126. package/.cursor/skills/coding-level/references/level-1.md +118 -0
  127. package/.cursor/skills/coding-level/references/level-2.md +140 -0
  128. package/.cursor/skills/coding-level/references/level-3.md +142 -0
  129. package/.cursor/skills/coding-level/references/level-4.md +152 -0
  130. package/.cursor/skills/coding-level/references/level-5.md +84 -0
  131. package/.cursor/skills/memento/SKILL.md +36 -0
  132. package/.cursor/skills/reviewing-4p-priorities/SKILL.md +72 -0
  133. package/.cursor/skills/reviewing-4p-priorities/examples.md +298 -0
  134. package/.cursor/skills/sequential-thinking/SKILL.md +106 -0
  135. package/.cursor/skills/sequential-thinking/examples/adaptive-depth.md +542 -0
  136. package/.cursor/skills/sequential-thinking/examples/branching-exploration.md +474 -0
  137. package/.cursor/skills/sequential-thinking/examples/linear-reasoning.md +210 -0
  138. package/.cursor/skills/sequential-thinking/examples/revision-pattern.md +304 -0
  139. package/.cursor/skills/sequential-thinking/references/output-schema.md +483 -0
  140. package/.cursor/skills/sequential-thinking/references/parameters.md +463 -0
  141. package/.cursor/skills/sequential-thinking/references/patterns.md +666 -0
  142. package/.vbkit-commands/autoresearch-coding.md +11 -0
  143. package/.vbkit-commands/council.md +3 -0
  144. package/.vbkit-commands/daily-enhance.md +3 -0
  145. package/.vbkit-commands/init-vibe.md +3 -0
  146. package/.vbkit-commands/security-scan.md +3 -0
  147. package/.vbkit-commands/vibe-finalize.md +3 -0
  148. package/.vbkit-docs/AUTORESEARCH_LEDGER.md +11 -0
  149. package/.vbkit-docs/BACKBONE_REFERENCE.md +59 -0
  150. package/.vbkit-docs/INSTALL.md +120 -0
  151. package/.vbkit-docs/RESEARCH_NOTES.md +22 -0
  152. package/.vbkit-docs/SECURITY_MODEL.md +40 -0
  153. package/.vbkit-docs/TOOLING_GUIDE.md +22 -0
  154. package/.vbkit-docs/backbone.schema.json +110 -0
  155. package/.vbkit-docs/templates/CONTEXT_TEMPLATE.md +47 -0
  156. package/.vbkit-docs/templates/PRD_TEMPLATE.md +48 -0
  157. package/.vbkit-scripts/agentshield-probe.mjs +22 -0
  158. package/.vbkit-scripts/daily-enhance.mjs +62 -0
  159. package/.vbkit-scripts/doctor.mjs +323 -0
  160. package/.vbkit-scripts/init-backbone.mjs +628 -0
  161. package/.vbkit-scripts/mvck.mjs +444 -0
  162. package/.vbkit-scripts/pack-dry-run.mjs +16 -0
  163. package/.vbkit-scripts/test-install.mjs +118 -0
  164. package/.vbkit-scripts/validate-kit.mjs +419 -0
  165. package/.vbkit-scripts/vibekit-finalize.mjs +185 -0
  166. package/AGENTS.md +60 -0
  167. package/CHANGELOG.md +34 -0
  168. package/CLAUDE-template.md +52 -0
  169. package/CODE_OF_CONDUCT.md +18 -0
  170. package/CONTRIBUTING.md +28 -0
  171. package/FIRST_PROMPT.md +54 -0
  172. package/FIRST_TIME_INIT.md +165 -0
  173. package/LICENSE +21 -0
  174. package/README.md +493 -0
  175. package/README.vi.md +431 -0
  176. package/SECURITY.md +28 -0
  177. package/backbone.yml +103 -0
  178. package/bin/mvck.js +2 -0
  179. package/bin/vibe-kit.js +2 -0
  180. package/install.ps1 +14 -0
  181. package/install.sh +8 -0
  182. package/package.json +92 -0
  183. package/skills/agentshield-security-review/SKILL.md +75 -0
  184. package/skills/agentshield-security-review/agents/openai.yaml +5 -0
  185. package/skills/agentshield-security-review/references/native-install.md +97 -0
  186. package/skills/agentshield-security-review/references/report-template.md +54 -0
  187. package/skills/agentshield-security-review/references/review-checklist.md +45 -0
  188. package/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +110 -0
  189. package/skills/autoresearch-coding/README.md +15 -0
  190. package/skills/autoresearch-coding/SKILL.md +101 -0
  191. package/skills/autoresearch-coding/references/experiment-contract.md +13 -0
  192. package/skills/autoresearch-coding/references/metric-extraction.md +8 -0
  193. package/skills/autoresearch-coding/references/result-ledger.md +15 -0
  194. package/skills/autoresearch-coding/scripts/log_result.py +24 -0
  195. package/skills/autoresearch-coding/scripts/run_logged.py +30 -0
  196. package/skills/clearthought/SKILL.md +100 -0
  197. package/skills/clearthought/examples/decision-framework.md +441 -0
  198. package/skills/clearthought/examples/metagame-examples.md +536 -0
  199. package/skills/clearthought/examples/sequential-thinking.md +380 -0
  200. package/skills/clearthought/references/output-schemas.md +494 -0
  201. package/skills/clearthought/references/parameter-reference.md +482 -0
  202. package/skills/coding-level/SKILL.md +27 -0
  203. package/skills/coding-level/references/level-0.md +131 -0
  204. package/skills/coding-level/references/level-1.md +118 -0
  205. package/skills/coding-level/references/level-2.md +140 -0
  206. package/skills/coding-level/references/level-3.md +142 -0
  207. package/skills/coding-level/references/level-4.md +152 -0
  208. package/skills/coding-level/references/level-5.md +84 -0
  209. package/skills/daily-workflow-curator/SKILL.md +52 -0
  210. package/skills/memento/SKILL.md +36 -0
  211. package/skills/reviewing-4p-priorities/SKILL.md +72 -0
  212. package/skills/reviewing-4p-priorities/examples.md +298 -0
  213. package/skills/sequential-thinking/SKILL.md +106 -0
  214. package/skills/sequential-thinking/examples/adaptive-depth.md +542 -0
  215. package/skills/sequential-thinking/examples/branching-exploration.md +474 -0
  216. package/skills/sequential-thinking/examples/linear-reasoning.md +210 -0
  217. package/skills/sequential-thinking/examples/revision-pattern.md +304 -0
  218. package/skills/sequential-thinking/references/output-schema.md +483 -0
  219. package/skills/sequential-thinking/references/parameters.md +463 -0
  220. package/skills/sequential-thinking/references/patterns.md +666 -0
  221. package/skills/vibekit-init/SKILL.md +52 -0
  222. package/skills/visual-design-loop/SKILL.md +103 -0
  223. 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
+ }