vibecode-anything 0.3.0 → 0.4.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 (160) hide show
  1. package/README.md +239 -67
  2. package/dist/cli.js +2140 -73
  3. package/dist/core/adapters.d.ts +26 -3
  4. package/dist/core/adapters.js +411 -25
  5. package/dist/core/agent-adapter.d.ts +67 -0
  6. package/dist/core/agent-adapter.js +312 -0
  7. package/dist/core/anti-cheat.d.ts +6 -0
  8. package/dist/core/anti-cheat.js +372 -0
  9. package/dist/core/badge.d.ts +18 -0
  10. package/dist/core/badge.js +360 -0
  11. package/dist/core/cache.d.ts +47 -0
  12. package/dist/core/cache.js +403 -0
  13. package/dist/core/ci-export.d.ts +35 -0
  14. package/dist/core/ci-export.js +796 -0
  15. package/dist/core/ci-formats.d.ts +21 -0
  16. package/dist/core/ci-formats.js +388 -0
  17. package/dist/core/client-codegen.d.ts +36 -0
  18. package/dist/core/client-codegen.js +2538 -0
  19. package/dist/core/compose.d.ts +71 -0
  20. package/dist/core/compose.js +1088 -0
  21. package/dist/core/docs-export.d.ts +37 -0
  22. package/dist/core/docs-export.js +2706 -0
  23. package/dist/core/doctor.d.ts +21 -1
  24. package/dist/core/doctor.js +234 -21
  25. package/dist/core/exec.d.ts +26 -2
  26. package/dist/core/exec.js +235 -8
  27. package/dist/core/fixtures.d.ts +153 -0
  28. package/dist/core/fixtures.js +2245 -0
  29. package/dist/core/format.d.ts +77 -0
  30. package/dist/core/format.js +632 -0
  31. package/dist/core/fs-snapshot.d.ts +37 -0
  32. package/dist/core/fs-snapshot.js +216 -0
  33. package/dist/core/graphql-export.d.ts +34 -0
  34. package/dist/core/graphql-export.js +2482 -0
  35. package/dist/core/har-export.d.ts +29 -0
  36. package/dist/core/har-export.js +988 -0
  37. package/dist/core/html-report.d.ts +27 -0
  38. package/dist/core/html-report.js +1535 -0
  39. package/dist/core/http-export.d.ts +31 -0
  40. package/dist/core/http-export.js +726 -0
  41. package/dist/core/impact.d.ts +80 -0
  42. package/dist/core/impact.js +1412 -0
  43. package/dist/core/lint.d.ts +38 -0
  44. package/dist/core/lint.js +1111 -0
  45. package/dist/core/load-export.d.ts +37 -0
  46. package/dist/core/load-export.js +1813 -0
  47. package/dist/core/mcp-export.d.ts +35 -0
  48. package/dist/core/mcp-export.js +1736 -0
  49. package/dist/core/mock-server.d.ts +47 -0
  50. package/dist/core/mock-server.js +1722 -0
  51. package/dist/core/openapi-export.d.ts +44 -0
  52. package/dist/core/openapi-export.js +1074 -0
  53. package/dist/core/parity.d.ts +6 -1
  54. package/dist/core/parity.js +36 -1
  55. package/dist/core/playwright-exporter.d.ts +23 -0
  56. package/dist/core/playwright-exporter.js +1343 -0
  57. package/dist/core/png.js +45 -9
  58. package/dist/core/regression.d.ts +54 -0
  59. package/dist/core/regression.js +529 -0
  60. package/dist/core/responsive.d.ts +86 -0
  61. package/dist/core/responsive.js +606 -0
  62. package/dist/core/run.d.ts +74 -0
  63. package/dist/core/run.js +696 -0
  64. package/dist/core/scheduler.d.ts +24 -0
  65. package/dist/core/scheduler.js +162 -0
  66. package/dist/core/schema-export.d.ts +29 -0
  67. package/dist/core/schema-export.js +2215 -0
  68. package/dist/core/schema.d.ts +3 -2
  69. package/dist/core/schema.js +460 -17
  70. package/dist/core/security.d.ts +233 -0
  71. package/dist/core/security.js +1839 -0
  72. package/dist/core/server-export.d.ts +38 -0
  73. package/dist/core/server-export.js +3198 -0
  74. package/dist/core/spec-writer.d.ts +9 -0
  75. package/dist/core/spec-writer.js +1202 -0
  76. package/dist/core/store.d.ts +11 -2
  77. package/dist/core/store.js +128 -8
  78. package/dist/core/target-map.d.ts +34 -0
  79. package/dist/core/target-map.js +262 -0
  80. package/dist/core/test-exporter.d.ts +25 -0
  81. package/dist/core/test-exporter.js +1918 -0
  82. package/dist/core/types.d.ts +182 -14
  83. package/dist/core/visual-semantic.d.ts +67 -0
  84. package/dist/core/visual-semantic.js +673 -0
  85. package/dist/core/visual.js +65 -16
  86. package/dist/core/watch.d.ts +28 -3
  87. package/dist/core/watch.js +222 -12
  88. package/dist/core/yaml.d.ts +5 -0
  89. package/dist/core/yaml.js +1009 -0
  90. package/dist/diagnostics/diagnose.d.ts +53 -0
  91. package/dist/diagnostics/diagnose.js +1083 -0
  92. package/dist/diagnostics/flake.d.ts +71 -0
  93. package/dist/diagnostics/flake.js +608 -0
  94. package/dist/diagnostics/mutation-audit.d.ts +69 -0
  95. package/dist/diagnostics/mutation-audit.js +769 -0
  96. package/dist/diagnostics/spatial.d.ts +42 -0
  97. package/dist/diagnostics/spatial.js +346 -0
  98. package/dist/diagnostics/trends.d.ts +122 -0
  99. package/dist/diagnostics/trends.js +1190 -0
  100. package/dist/discovery/discover.d.ts +111 -0
  101. package/dist/discovery/discover.js +2017 -0
  102. package/dist/discovery/lock.d.ts +116 -0
  103. package/dist/discovery/lock.js +1505 -0
  104. package/dist/discovery/routes.d.ts +36 -0
  105. package/dist/discovery/routes.js +1494 -0
  106. package/dist/discovery/test-importer.d.ts +92 -0
  107. package/dist/discovery/test-importer.js +4952 -0
  108. package/dist/index.d.ts +123 -0
  109. package/dist/index.js +99 -0
  110. package/dist/ingestors/api-collections.d.ts +28 -0
  111. package/dist/ingestors/api-collections.js +2335 -0
  112. package/dist/ingestors/api-repo.d.ts +2 -1
  113. package/dist/ingestors/api-repo.js +483 -85
  114. package/dist/ingestors/asyncapi.d.ts +26 -0
  115. package/dist/ingestors/asyncapi.js +2105 -0
  116. package/dist/ingestors/bridges.d.ts +2 -0
  117. package/dist/ingestors/bridges.js +702 -0
  118. package/dist/ingestors/cli.d.ts +2 -1
  119. package/dist/ingestors/cli.js +234 -46
  120. package/dist/ingestors/curl.d.ts +14 -0
  121. package/dist/ingestors/curl.js +1024 -0
  122. package/dist/ingestors/graphql.d.ts +56 -0
  123. package/dist/ingestors/graphql.js +1852 -0
  124. package/dist/ingestors/http-file.d.ts +20 -0
  125. package/dist/ingestors/http-file.js +923 -0
  126. package/dist/ingestors/index.js +486 -6
  127. package/dist/ingestors/openrpc.d.ts +29 -0
  128. package/dist/ingestors/openrpc.js +1807 -0
  129. package/dist/ingestors/proto.d.ts +47 -0
  130. package/dist/ingestors/proto.js +2690 -0
  131. package/dist/ingestors/trace.d.ts +10 -0
  132. package/dist/ingestors/trace.js +599 -0
  133. package/dist/ingestors/video.d.ts +4 -1
  134. package/dist/ingestors/video.js +86 -36
  135. package/dist/ingestors/web.d.ts +16 -1
  136. package/dist/ingestors/web.js +474 -32
  137. package/dist/mcp/server.js +3532 -67
  138. package/dist/oracles/api-repo.js +102 -30
  139. package/dist/oracles/cli.js +65 -17
  140. package/dist/oracles/http-workflow.d.ts +68 -0
  141. package/dist/oracles/http-workflow.js +828 -0
  142. package/dist/oracles/image.js +178 -28
  143. package/dist/oracles/index.d.ts +3 -1
  144. package/dist/oracles/index.js +243 -14
  145. package/dist/oracles/perf-budget.d.ts +90 -0
  146. package/dist/oracles/perf-budget.js +1329 -0
  147. package/dist/oracles/stream.d.ts +94 -0
  148. package/dist/oracles/stream.js +1268 -0
  149. package/dist/oracles/ui-states.d.ts +49 -0
  150. package/dist/oracles/ui-states.js +894 -0
  151. package/dist/oracles/video.d.ts +1 -1
  152. package/dist/oracles/video.js +232 -16
  153. package/dist/oracles/web.js +464 -73
  154. package/dist/plugins/builtins.d.ts +12 -0
  155. package/dist/plugins/builtins.js +1052 -0
  156. package/dist/plugins/registry.d.ts +86 -0
  157. package/dist/plugins/registry.js +554 -0
  158. package/dist/setup/index.js +145 -33
  159. package/package.json +56 -47
  160. package/skills/vibecode-anything/SKILL.md +75 -52
@@ -13,33 +13,115 @@ function serverEntry(local) {
13
13
  : { command: SERVER_ID, args: ["mcp"] };
14
14
  }
15
15
  /**
16
- * Client layouts. `mcpPath` is the JSON config containing `mcpServers`;
16
+ * Client layouts. `mcpPath` is the JSON config containing MCP server definitions;
17
17
  * `skillPath` is where SKILL.md must land for that client.
18
18
  */
19
19
  const CLIENTS = {
20
- "claude-code": ({ scope, cwd, homeDir }) => ({
21
- mcpPath: scope === "global" ? path.join(homeDir, ".claude.json") : path.join(cwd, ".mcp.json"),
22
- skillPath: scope === "global"
23
- ? path.join(homeDir, ".claude", "skills", SERVER_ID, "SKILL.md")
24
- : path.join(cwd, ".claude", "skills", SERVER_ID, "SKILL.md")
25
- }),
26
- cursor: ({ scope, cwd, homeDir }) => ({
27
- mcpPath: scope === "global" ? path.join(homeDir, ".cursor", "mcp.json") : path.join(cwd, ".cursor", "mcp.json"),
28
- skillPath: scope === "global"
29
- ? path.join(homeDir, ".cursor", "skills", SERVER_ID, "SKILL.md")
30
- : path.join(cwd, ".cursor", "skills", SERVER_ID, "SKILL.md")
31
- }),
32
- antigravity: ({ scope, cwd, homeDir, antigravityDir }) => ({
33
- mcpPath: antigravityDir
34
- ? path.join(antigravityDir, "mcp_config.json")
35
- : path.join(homeDir, ".gemini", "antigravity", "mcp_config.json"),
36
- skillPath: scope === "global"
37
- ? path.join(homeDir, ".gemini", "antigravity", "skills", SERVER_ID, "SKILL.md")
38
- : path.join(cwd, ".agents", "skills", SERVER_ID, "SKILL.md")
39
- })
20
+ "claude-code": {
21
+ format: "mcpServers",
22
+ alwaysAuto: true,
23
+ layout: ({ scope, cwd, homeDir }) => ({
24
+ mcpPath: scope === "global" ? path.join(homeDir, ".claude.json") : path.join(cwd, ".mcp.json"),
25
+ skillPath: path.join(scope === "global" ? homeDir : cwd, ".claude", "skills", SERVER_ID, "SKILL.md")
26
+ })
27
+ },
28
+ cursor: {
29
+ format: "mcpServers",
30
+ alwaysAuto: true,
31
+ layout: ({ scope, cwd, homeDir }) => ({
32
+ mcpPath: path.join(scope === "global" ? homeDir : cwd, ".cursor", "mcp.json"),
33
+ skillPath: path.join(scope === "global" ? homeDir : cwd, ".cursor", "skills", SERVER_ID, "SKILL.md")
34
+ })
35
+ },
36
+ antigravity: {
37
+ format: "mcpServers",
38
+ alwaysAuto: true,
39
+ layout: ({ scope, cwd, homeDir, antigravityDir }) => ({
40
+ mcpPath: antigravityDir
41
+ ? path.join(antigravityDir, "mcp_config.json")
42
+ : path.join(homeDir, ".gemini", "antigravity", "mcp_config.json"),
43
+ skillPath: scope === "global"
44
+ ? path.join(homeDir, ".gemini", "antigravity", "skills", SERVER_ID, "SKILL.md")
45
+ : path.join(cwd, ".agents", "skills", SERVER_ID, "SKILL.md")
46
+ })
47
+ },
48
+ codex: {
49
+ format: "mcpServers",
50
+ layout: ({ scope, cwd, homeDir }) => ({
51
+ mcpPath: path.join(scope === "global" ? homeDir : cwd, ".codex", "mcp.json"),
52
+ skillPath: path.join(scope === "global" ? homeDir : cwd, ".codex", "skills", SERVER_ID, "SKILL.md")
53
+ }),
54
+ detectPaths: ({ cwd, homeDir }) => [
55
+ path.join(cwd, ".codex"),
56
+ path.join(cwd, ".codex", "mcp.json"),
57
+ path.join(homeDir, ".codex"),
58
+ path.join(homeDir, ".codex", "mcp.json")
59
+ ]
60
+ },
61
+ opencode: {
62
+ format: "opencode",
63
+ layout: ({ scope, cwd, homeDir }) => ({
64
+ mcpPath: scope === "global"
65
+ ? path.join(homeDir, ".config", "opencode", "opencode.json")
66
+ : path.join(cwd, "opencode.json"),
67
+ skillPath: path.join(scope === "global" ? homeDir : cwd, ".opencode", "skills", SERVER_ID, "SKILL.md")
68
+ }),
69
+ detectPaths: ({ cwd, homeDir }) => [
70
+ path.join(cwd, "opencode.json"),
71
+ path.join(cwd, ".opencode"),
72
+ path.join(homeDir, ".config", "opencode"),
73
+ path.join(homeDir, ".config", "opencode", "opencode.json"),
74
+ path.join(homeDir, ".opencode")
75
+ ]
76
+ },
77
+ windsurf: {
78
+ format: "mcpServers",
79
+ layout: ({ scope, cwd, homeDir }) => ({
80
+ mcpPath: scope === "global"
81
+ ? path.join(homeDir, ".codeium", "windsurf", "mcp_config.json")
82
+ : path.join(cwd, ".windsurf", "mcp.json"),
83
+ skillPath: path.join(scope === "global" ? homeDir : cwd, ".windsurf", "skills", SERVER_ID, "SKILL.md")
84
+ }),
85
+ detectPaths: ({ cwd, homeDir }) => [
86
+ path.join(cwd, ".windsurf"),
87
+ path.join(cwd, ".windsurf", "mcp.json"),
88
+ path.join(homeDir, ".codeium", "windsurf"),
89
+ path.join(homeDir, ".codeium", "windsurf", "mcp_config.json"),
90
+ path.join(homeDir, ".windsurf")
91
+ ]
92
+ },
93
+ cline: {
94
+ format: "mcpServers",
95
+ layout: ({ scope, cwd, homeDir }) => ({
96
+ mcpPath: scope === "global"
97
+ ? path.join(homeDir, ".cline", "mcp_settings.json")
98
+ : path.join(cwd, ".cline", "mcp.json"),
99
+ skillPath: path.join(scope === "global" ? homeDir : cwd, ".cline", "skills", SERVER_ID, "SKILL.md")
100
+ }),
101
+ detectPaths: ({ cwd, homeDir }) => [
102
+ path.join(cwd, ".cline"),
103
+ path.join(cwd, ".cline", "mcp.json"),
104
+ path.join(homeDir, ".cline"),
105
+ path.join(homeDir, ".cline", "mcp_settings.json")
106
+ ]
107
+ }
40
108
  };
41
109
  export const SUPPORTED_CLIENTS = Object.keys(CLIENTS);
42
- function normalizeClients(input) {
110
+ function detectAutoClients(ctx) {
111
+ const detected = [];
112
+ for (const name of SUPPORTED_CLIENTS) {
113
+ const def = CLIENTS[name];
114
+ if (def.alwaysAuto) {
115
+ detected.push(name);
116
+ continue;
117
+ }
118
+ if (def.detectPaths && def.detectPaths(ctx).some((candidate) => fs.existsSync(candidate))) {
119
+ detected.push(name);
120
+ }
121
+ }
122
+ return detected;
123
+ }
124
+ function normalizeClients(input, ctx) {
43
125
  const raw = input === undefined || input === null ? ["auto"] : Array.isArray(input) ? input : [input];
44
126
  const picked = [];
45
127
  for (const item of raw) {
@@ -51,9 +133,19 @@ function normalizeClients(input) {
51
133
  }
52
134
  if (picked.length === 0)
53
135
  picked.push("auto");
54
- if (picked.includes("auto"))
55
- return [...SUPPORTED_CLIENTS];
56
- return [...new Set(picked)];
136
+ const expanded = [];
137
+ for (const token of picked) {
138
+ if (token === "all") {
139
+ expanded.push(...SUPPORTED_CLIENTS);
140
+ }
141
+ else if (token === "auto") {
142
+ expanded.push(...detectAutoClients(ctx));
143
+ }
144
+ else {
145
+ expanded.push(token);
146
+ }
147
+ }
148
+ return [...new Set(expanded)];
57
149
  }
58
150
  function describeJsonType(value) {
59
151
  if (value === null)
@@ -86,8 +178,28 @@ function readJsonIfExists(file) {
86
178
  return { exists: true, value: parsed, raw: text };
87
179
  }
88
180
  /** Deep-merge only our server entry; every other key/server is preserved verbatim. */
89
- function mergeMcpConfig(existing, server, file) {
181
+ function mergeMcpConfig(existing, server, file, format) {
90
182
  const config = existing || {};
183
+ if (format === "opencode") {
184
+ if (Object.prototype.hasOwnProperty.call(config, "mcp") && config.mcp !== undefined) {
185
+ if (!config.mcp || typeof config.mcp !== "object" || Array.isArray(config.mcp)) {
186
+ const actualType = describeJsonType(config.mcp);
187
+ throw new VibecodeError("CONFIG_INVALID", `Refusing to overwrite ${file}: expected "mcp" to be a JSON object, found ${actualType}. Fix or back up the file before re-running setup.`, { details: { path: file, reason: "invalid_mcp", actualType } });
188
+ }
189
+ }
190
+ const prevMcp = config.mcp || {};
191
+ return {
192
+ ...config,
193
+ mcp: {
194
+ ...prevMcp,
195
+ [SERVER_ID]: {
196
+ type: "local",
197
+ command: [server.command, ...server.args],
198
+ enabled: true
199
+ }
200
+ }
201
+ };
202
+ }
91
203
  if (Object.prototype.hasOwnProperty.call(config, "mcpServers") && config.mcpServers !== undefined) {
92
204
  if (!config.mcpServers || typeof config.mcpServers !== "object" || Array.isArray(config.mcpServers)) {
93
205
  const actualType = describeJsonType(config.mcpServers);
@@ -114,31 +226,31 @@ export async function runSetup({ clients = ["auto"], scope = "project", local =
114
226
  }
115
227
  const rootDir = path.resolve(cwd);
116
228
  const home = path.resolve(homeDir);
117
- const requested = normalizeClients(clients);
229
+ const context = { scope: resolvedScope, cwd: rootDir, homeDir: home, antigravityDir };
230
+ const requested = normalizeClients(clients, context);
118
231
  const server = serverEntry(local);
119
232
  const skillText = fs.readFileSync(SKILL_SOURCE, "utf8");
120
- const context = { scope: resolvedScope, cwd: rootDir, homeDir: home, antigravityDir };
121
233
  const warnings = [];
122
234
  const changes = [];
123
235
  const pendingWrites = [];
124
236
  const written = [];
125
237
  const activeClients = [];
126
238
  for (const client of requested) {
127
- const layout = CLIENTS[client];
128
- if (!layout) {
239
+ const def = CLIENTS[client];
240
+ if (!def) {
129
241
  warnings.push({
130
242
  code: "UNKNOWN_CLIENT",
131
- message: `Unknown client "${client}". Supported clients: ${SUPPORTED_CLIENTS.join(", ")}, or "auto".`,
243
+ message: `Unknown client "${client}". Supported clients: ${SUPPORTED_CLIENTS.join(", ")}, "auto", or "all".`,
132
244
  client,
133
245
  supported: SUPPORTED_CLIENTS
134
246
  });
135
247
  continue;
136
248
  }
137
249
  activeClients.push(client);
138
- const { mcpPath, skillPath } = layout(context);
250
+ const { mcpPath, skillPath } = def.layout(context);
139
251
  // 1) MCP config (merge, never clobber)
140
252
  const existing = readJsonIfExists(mcpPath);
141
- const merged = mergeMcpConfig(existing.value, server, mcpPath);
253
+ const merged = mergeMcpConfig(existing.value, server, mcpPath, def.format);
142
254
  const desired = serialize(merged);
143
255
  const mcpAction = !existing.exists ? "create" : existing.raw === desired ? "unchanged" : "update";
144
256
  changes.push({ client, kind: "mcp", path: mcpPath, action: mcpAction });
package/package.json CHANGED
@@ -1,47 +1,56 @@
1
- {
2
- "name": "vibecode-anything",
3
- "version": "0.3.0",
4
- "description": "Vibecode any app from any reference — piece by piece, differentially verified against an automated oracle at every step.",
5
- "type": "module",
6
- "main": "./dist/cli.js",
7
- "bin": {
8
- "vibecode-anything": "dist/cli.js"
9
- },
10
- "files": [
11
- "dist",
12
- "skills",
13
- "README.md",
14
- "LICENSE"
15
- ],
16
- "repository": {
17
- "type": "git",
18
- "url": "git+https://github.com/nguyenthanhthe/vibecode-anything.git"
19
- },
20
- "homepage": "https://github.com/nguyenthanhthe/vibecode-anything#readme",
21
- "scripts": {
22
- "build": "tsc",
23
- "typecheck": "tsc --noEmit",
24
- "typecheck:all": "npm run build && tsc -p tsconfig.check.json --noEmit",
25
- "prepare": "npm run build",
26
- "start": "node ./dist/cli.js",
27
- "test": "npm run build && tsc -p tsconfig.check.json --noEmit && node --test ./test/*.test.ts",
28
- "bench": "npm run build && node benchmarks/run.ts"
29
- },
30
- "keywords": [
31
- "vibecode",
32
- "ai-agents",
33
- "mcp",
34
- "differential-testing",
35
- "claude-code",
36
- "agent-skills"
37
- ],
38
- "license": "MIT",
39
- "engines": {
40
- "node": ">=20.0.0"
41
- },
42
- "dependencies": {},
43
- "devDependencies": {
44
- "@types/node": "^26.6.11",
45
- "typescript": "^7.0.2"
46
- }
47
- }
1
+ {
2
+ "name": "vibecode-anything",
3
+ "mcpName": "io.github.nguyenthanhthe/vibecode-anything",
4
+ "version": "0.4.0",
5
+ "description": "Vibecode any app from any reference — piece by piece, differentially verified against an automated oracle at every step.",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./cli": "./dist/cli.js"
15
+ },
16
+ "bin": {
17
+ "vibecode-anything": "dist/cli.js"
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "skills",
22
+ "README.md",
23
+ "LICENSE"
24
+ ],
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/nguyenthanhthe/vibecode-anything.git"
28
+ },
29
+ "homepage": "https://github.com/nguyenthanhthe/vibecode-anything#readme",
30
+ "scripts": {
31
+ "build": "tsc",
32
+ "typecheck": "tsc --noEmit",
33
+ "typecheck:all": "npm run build && tsc -p tsconfig.check.json --noEmit",
34
+ "prepare": "npm run build",
35
+ "start": "node ./dist/cli.js",
36
+ "test": "npm run build && tsc -p tsconfig.check.json --noEmit && node --test ./test/*.test.ts",
37
+ "bench": "npm run build && node benchmarks/run.ts"
38
+ },
39
+ "keywords": [
40
+ "vibecode",
41
+ "ai-agents",
42
+ "mcp",
43
+ "differential-testing",
44
+ "claude-code",
45
+ "agent-skills"
46
+ ],
47
+ "license": "MIT",
48
+ "engines": {
49
+ "node": ">=20.0.0"
50
+ },
51
+ "dependencies": {},
52
+ "devDependencies": {
53
+ "@types/node": "^26.6.11",
54
+ "typescript": "^7.0.2"
55
+ }
56
+ }
@@ -1,52 +1,75 @@
1
- ---
2
- name: vibecode-anything
3
- description: Differential vibecoding workflow — ingest any reference into .vibecode/contract.json, build incrementally, and verify hard/soft parity with an automated oracle at every step. Use when cloning, rebuilding, or porting CLI, web, API, repo, image, or video behavior.
4
- ---
5
-
6
- # vibecode-anything
7
-
8
- Use this skill to rebuild, clone, port, or verify software against a reference (`cli`, `script`, `web`, `url`, `api`, `repo`, `image`, `video`, `rea`, `cli-anything`) using **automated differential verification**.
9
-
10
- ## Core loop
11
-
12
- 1. **Initialize or Ingest Contract**
13
- - Starter stub: `vibecode-anything init --domain <cli|web|api> --source "<ref>" [--name <id>] [--force]`
14
- - Auto-probed v0.2 contract: `vibecode-anything ingest --source "<ref>" [--domain <domain>] [--name <id>] [--force]`
15
- - Domain options: CLI `--probe "<args>"` / `--probes probes.json`; Web `--route /path` / `--flow flow.json`; API `--endpoints endpoints.json` / `--base-url <url>`; Video `--scene-threshold <n>` / `--max-frames <n>` (supports video file or ordered keyframe dir + `.srt/.vtt`).
16
-
17
- 2. **Build Piece by Piece**
18
- - Implement one invariant or flow at a time; let the oracle verify rather than guessing "done".
19
-
20
- 3. **Verify Against the Oracle**
21
- - `vibecode-anything verify --target "<cmd-or-url>" [--strict] [--invariant <id>] [--slice <id>]`
22
- - `--strict` turns soft perceptual/layout mismatches into gate failures (exit `1`).
23
- - `--invariant <id>` (repeatable) filters specific invariant IDs; `--slice <id>` filters incremental contract slices.
24
-
25
- 4. **Watch & Diagnose**
26
- - `vibecode-anything watch --target "<cmd-or-url>" [--slice <id>] [--watch-path <dir>] [--debounce <ms>] [--strict]` re-verifies on changes.
27
- - `vibecode-anything doctor [--scope project|global] [--strict] [--antigravity-dir <dir>]` checks Node, adapters, optional CLIs, and MCP registration with install/fallback hints.
28
-
29
- 5. **Inspect Status & Diffs**
30
- - `vibecode-anything status` prints contract metadata, adapter probes, slice summary, and the last report summary.
31
- - `vibecode-anything diff [--invariant <id> | --id <id>]` prints the full last report or one invariant result.
32
- - `vibecode-anything help` (or `--help` / `-h` after any subcommand) prints CLI usage without running side effects.
33
-
34
- ## MCP & Setup
35
-
36
- - Start stdio JSON-RPC 2.0 server: `vibecode-anything mcp` (no stdout log noise).
37
- - Tools: `vibecode_ingest`, `vibecode_verify`, `vibecode_status`, `vibecode_diff`, `vibecode_doctor`.
38
- - `vibecode_verify` accepts `sliceIds`; `vibecode_status` includes a slice summary.
39
- - Resources: `vibecode://contract`, `vibecode://last-report`.
40
- - Register MCP + `SKILL.md`: `vibecode-anything setup [--clients auto|claude-code,cursor,antigravity] [--scope project|global] [--local] [--dry-run] [--antigravity-dir <dir>]`.
41
-
42
- ## Exit Codes & Gate Semantics
43
-
44
- - **Exit `0` (`pass` / `pass_with_warnings`):** All evaluated hard invariants pass; soft warnings only fail if `--strict` or `softGateMode: "fail"`.
45
- - **Exit `1` (`fail`):** Hard parity fails, `--strict` fails a soft check, `doctor` finds failures (or warnings with `--strict`), or setup/init hits a file/config conflict.
46
- - **Exit `2` (`incomplete` / input error):** All invariants skipped (`ADAPTER_MISSING`), missing `--target`/`--source`/contract, invalid contract, missing `diff` ID, or unknown command.
47
-
48
- ## Rules
49
-
50
- - Never weaken or delete invariants in `.vibecode/contract.json` to make a failing build pass.
51
- - Never run CLI reference probes in the user's workspace; CLI ingest probes run in a temp sandbox.
52
- - Keep `.vibecode/contract.json` and `.vibecode/last-report.json` as the source of truth for progress.
1
+ ---
2
+ name: vibecode-anything
3
+ description: Differential vibecoding workflow — ingest any reference into .vibecode/contract.json, build incrementally, and verify hard/soft parity with an automated oracle at every step. Use when cloning, rebuilding, or porting CLI, web, API, repo, image, or video behavior.
4
+ ---
5
+
6
+ # vibecode-anything
7
+
8
+ Use this skill to rebuild, clone, port, or verify software against a reference (`cli`, `script`, `web`, `url`, `api`, `repo`, `image`, `video`, `rea`, `cli-anything`, `postman`, `curl`, `graphql`, `http-file`, `insomnia`, `bruno`, `asyncapi`, `proto`, `openrpc`) using **automated differential verification**.
9
+
10
+ ## Core loop
11
+
12
+ 1. **Discover, Lock, or Ingest Contract & Spec**
13
+ - Inspect workspace: `vibecode-anything discover [--dir <path>] [--pretty]` detects frameworks, routes, specs, entrypoints, ports, and ready-to-run commands.
14
+ - Refactor safety lock: `vibecode-anything lock [--source "<ref>"] [--domain <domain>] [--target "<cmd-or-url>"] [--name <id>] [--force] [--strict] [--no-spec] [--no-verify] [--check] [--pretty]` snapshots golden behavior + `.vibecode/lock.json` (auto-discovering source when omitted; `--check` verifies contract tamper & source drift; shares CLI/web/API probe, route, endpoint, header, env, and `--fs-diff` flags).
15
+ - Starter stub: `vibecode-anything init --domain <cli|web|api> --source "<ref>" [--name <id>] [--force]`
16
+ - Auto-probed v0.2 contract + `.vibecode/SPEC.md`: `vibecode-anything ingest --source "<ref>" [--domain <domain>] [--name <id>] [--force] [--no-spec]`
17
+ - CLI & Trace options: `--probe "<args>"`, `--probes probes.json`, `--env <KEY=VAL>`, `--fs-diff`, `--from-commands <file>`, `--from-tests <path>` (static JS/TS/pytest import; no `--source` needed)
18
+ - Web, API & Video options: `--route /path`, `--crawl-depth <1-3>`, `--holdout-route <path>`, `--flow flow.json`, `--endpoints endpoints.json`, `--base-url <url>`, `--header <Key: Value>`, `--storage-state <file>`, `--from-har <file>`, `--scene-threshold <n>`, `--max-frames <n>`, `--crop <w:h:x:y>`
19
+
20
+ 2. **Build Piece by Piece**
21
+ - Follow `.vibecode/SPEC.md` (or `vibecode://spec`); implement one invariant or slice at a time rather than guessing "done".
22
+
23
+ 3. **Verify or Run Closed Loop Against the Oracle**
24
+ - `vibecode-anything verify --target "<cmd-or-url>" [--target-map <domain=target>] [--var <KEY=VAL>] [--mode <exact|structural|functional|reskin>] [--concurrency <1-8>] [--plugin <file.mjs>] [--affected] [--strict] [--invariant <id>] [--slice <id>] [--reveal-holdouts] [--no-report] [--no-fixtures] [--allow-fixture-commands] [--cache] [--pretty] [--header <Key: Value>] [--storage-state <file>]` (repeatable `--target-map web=http://localhost:3000` routes each domain, making `--target` optional; `--affected` verifies only git-changed impacted invariants with fail-closed full fallback; repeatable `--var` / `VIBECODE_VAR_*` fill `{{vars.NAME}}` secrets that bypass the cache and are redacted everywhere; `contract.fixtures` auto-snapshot & roll back unless `--no-fixtures`, and command hooks require CLI `--allow-fixture-commands`)
25
+ - `vibecode-anything run --target "<cmd-or-url>" [--target-map <domain=target>] [--var <KEY=VAL>] [--mode <exact|structural|functional|reskin>] [--concurrency <1-8>] [--plugin <file.mjs>] [--source <ref>] [--domain <domain>] [--agent <auto|claude|codex|agy|opencode|mock:script>] [--max-iterations <n>] [--max-minutes <m>] [--slice <id>] [--strict] [--dry-run] [--force] [--no-report] [--no-fixtures] [--allow-fixture-commands] [--cache] [--pretty] [--header <Key: Value>] [--storage-state <file>]` (`--target-map` makes `--target` optional)
26
+ - `vibecode-anything report [--out <file>] [--badge <file.svg>] [--markdown <file.md>] [--sarif <file.sarif>] [--junit <file.xml>] [--no-report]` generates `.vibecode/report.html`, SVG badges, PR Markdown, SARIF 2.1.0, and JUnit XML.
27
+ - `vibecode-anything export-tests [--format <node-test|vitest|pytest|shell|playwright>] [--out <file>] [--target <cmd-or-url>]` emits standalone regression tests (holdouts excluded).
28
+ - `vibecode-anything export-openapi [--format <yaml|json>] [--out <file>] [--name <title>] [--base-url <url>]` compiles HTTP invariants to OpenAPI 3.0.3 specs.
29
+ - `vibecode-anything export-http [--format <http-file|curl|postman>] [--out <file>] [--name <title>] [--base-url <url>]` exports `.http`, cURL, or Postman collections.
30
+ - `vibecode-anything export-client [--format <ts-fetch|python|go>] [--out <file>] [--name <title>] [--base-url <url>] [--pretty]` emits typed TS, Python, or Go clients.
31
+ - `vibecode-anything export-har [--out <file>] [--name <title>] [--base-url <url>] [--pretty]` exports visible HTTP/web routes as a W3C HAR 1.2 archive.
32
+ - `vibecode-anything export-graphql [--format <sdl|introspection>] [--out <file>] [--name <title>] [--pretty]` exports GraphQL SDL or Introspection JSON.
33
+ - `vibecode-anything export-mcp [--format <node-mjs|ts>] [--out <file>] [--name <title>] [--base-url <url>] [--pretty]` compiles a standalone stdio MCP server.
34
+ - `vibecode-anything export-schema [--format <zod|json-schema|typescript>] [--out <file>] [--name <title>] [--strict] [--pretty]` compiles Zod/JSON Schema/TS guards.
35
+ - `vibecode-anything export-load [--format <k6|artillery|node-bench>] [--out <file>] [--name <title>] [--base-url <url>] [--strict] [--pretty]` compiles load suites.
36
+ - `vibecode-anything export-docs [--format <markdown|html|llms-txt>] [--out <file>] [--name <title>] [--base-url <url>] [--strict] [--pretty]` exports docs & `llms.txt`.
37
+ - `vibecode-anything export-ci [--format <github-actions|gitlab-ci|makefile>] [--out <file>] [--name <title>] [--target <cmd-or-url>] [--strict] [--cache] [--pretty]` emits CI parity workflows.
38
+ - `vibecode-anything export-server [--format <node-http|express-ts|python-http>] [--out <file>] [--name <title>] [--port <n>] [--strict] [--pretty]` generates runnable Node, Express TS, or Python HTTP server scaffolds.
39
+ - `vibecode-anything mock [--port <n>] [--dry-run] [--pretty]` serves a deterministic HTTP/web mock server from `.vibecode/contract.json`.
40
+ - API/protocol oracles also verify stateful multi-step `http_workflow` chains (cookies, extraction, `finallySteps`), `http_stream` (SSE/NDJSON), RFC 6455 `ws_protocol` exchanges, and live `perf_budget` latency/payload checks (bypassing cache); `web_ui_states` checks hover/focus, keyboard Tab order & focus traps, disabled/empty/error states, and local/session storage.
41
+ - `--mode <exact|structural|functional|reskin>` selects semantic verification (`reskin` enforces WCAG 2.1 contrast; `web_route` supports `responsiveViewports`); `--concurrency <1-8>` runs bounded parallel verification with deterministic result ordering; `--plugin <file.mjs>` (repeatable, CLI-only) loads workspace-confined ESM plugins alongside built-in `plugin_svg_a11y` and `plugin_state_file`; `--strict` promotes soft mismatches to exit `1`; `--cache` reuses SHA-256 `exact` local passes; `--pretty` formats terminal output; `--reveal-holdouts` is CLI-only (never exposed over MCP).
42
+ - Visible failures include copy-pasteable `repro` commands and `antiCheat` diagnostics.
43
+
44
+ 4. **Watch & Diagnose**
45
+ - `vibecode-anything watch --target "<cmd-or-url>" [--target-map <domain=target>] [--var <KEY=VAL>] [--mode <exact|structural|functional|reskin>] [--concurrency <1-8>] [--plugin <file.mjs>] [--smart] [--slice <id>] [--watch-path <dir>] [--debounce <ms>] [--strict] [--no-fixtures] [--allow-fixture-commands] [--cache] [--pretty] [--header <Key: Value>] [--storage-state <file>]` re-verifies on edits while preserving holdouts (`--smart` runs only impacted invariants per edit, skipping docs-only edits).
46
+ - `vibecode-anything diagnose [--brief] [--strict] [--pretty]` triages `.vibecode/last-report.json` into root-cause categories, 3×3 spatial heatmaps, bbox shifts, and a minimal-token repair brief (`--brief`).
47
+ - `vibecode-anything flake --target "<cmd-or-url>" [--target-map <domain=target>] [--var <KEY=VAL>] [--runs <2-10>] [--invariant <id>] [--slice <id>] [--strict] [--reveal-holdouts] [--no-fixtures] [--allow-fixture-commands] [--pretty] [--header <Key: Value>] [--storage-state <file>]` runs multi-pass flake/nondeterminism analysis (bypassing cache) and suggests `expected.normalize` rules.
48
+ - `vibecode-anything doctor [--scope project|global] [--strict] [--antigravity-dir <dir>] [--pretty]` checks Node, adapters, agent CLIs, and MCP registration.
49
+ - `vibecode-anything lint [--strength] [--strict] [--pretty]` audits `.vibecode/contract.json` for exposed secrets, weak checks, slice issues, and (`--strength`) stub-bypass oracle strength.
50
+
51
+ 5. **Inspect Status & Diffs**
52
+ - `vibecode-anything status [--trends] [--pretty]` prints contract metadata, holdout/adapter counts, slices, the last report summary, and (`--trends`) `.vibecode/trends.ndjson` sparklines, latency drift & flaky hotspots.
53
+ - `vibecode-anything diff [--invariant <id> | --id <id>] [--baseline <report.json>] [--reveal-holdouts] [--strict] [--pretty]` compares against a baseline report or prints invariant diffs.
54
+ - `vibecode-anything merge --with <contract.json> [--out <file>] [--prefix <p>] [--on-conflict <prefix|overwrite|skip>] [--dry-run] [--no-spec] [--pretty]` composes multi-domain contracts safely.
55
+ - `vibecode-anything help` (or `--help` / `-h` after any subcommand) prints CLI usage safely.
56
+
57
+ ## MCP & Setup
58
+
59
+ - Start stdio JSON-RPC 2.0 server: `vibecode-anything mcp` (no stdout log noise).
60
+ - Tools: `vibecode_discover` (`dir`, `maxDepth`, `maxFiles`), `vibecode_lock` (`check`, `noVerify`, auto-discovery when `source` omitted, incl. `asyncapi`/`proto`/`openrpc`; never exposes `revealHoldouts`), `vibecode_ingest` (`noSpec`, `crawlDepth`, `holdoutRoutes`, `fromTests` workspace-confined static test import with optional `target`, plus CLI/web/trace & `asyncapi`/`proto`/`openrpc` API domains), `vibecode_verify` (`affected` git-diff impact filter, `targets` domain map makes `target` optional, redacted `vars`, `mode`, `concurrency`, `sliceIds`, `useCache`, `noReport`, `skipFixtures`, `headers`, `storageState`; records `.vibecode/trends.ndjson` unless `noReport`; built-in `plugin_svg_a11y` & `plugin_state_file` work automatically; never exposes `--plugin`, `allowFixtureCommands`, or `revealHoldouts`), `vibecode_diagnose` (`includeVisualHeatmap`, `maxBriefChars`, `briefOnly`, `includeStrength`), `vibecode_flake` (`target` optional when `targets` given, `targets`, `vars`, `skipFixtures`, `runs`, `invariantIds`, `sliceIds`, `strict`, `headers`, `storageState`; never exposes `revealHoldouts` or `allowFixtureCommands`), `vibecode_report` (`sarifPath`, `junitPath`), `vibecode_status` (`includeTrends`, `trendWindow`), `vibecode_diff` (`invariantId` or `baselinePath`), `vibecode_doctor`.
61
+ - Prompts: `vibecode_rebuild_slice`, `vibecode_fix_failures` (`prompts/list`, `prompts/get`).
62
+ - Resources: `vibecode://contract`, `vibecode://spec`, `vibecode://last-report`, `vibecode://report`.
63
+ - Register MCP + `SKILL.md`: `vibecode-anything setup [--clients auto|all|claude-code,cursor,antigravity,codex,opencode,windsurf,cline] [--scope project|global] [--local] [--dry-run] [--antigravity-dir <dir>]`.
64
+
65
+ ## Exit Codes & Gate Semantics
66
+
67
+ - **Exit `0` (`pass` / `pass_with_warnings`):** All evaluated hard invariants pass, `discover` succeeds, `diagnose` is clean, `flake` is stable, or `lock --check` is valid; soft warnings fail only with `--strict`.
68
+ - **Exit `1` (`fail`):** Hard parity or `antiCheat` fails, `--strict` fails a soft check, `diagnose` finds issues, `flake` finds flaky/nondeterministic/failing invariants, `lock` baseline/tamper/overwrite fails, `doctor` fails, or `setup`/`init` hits a conflict.
69
+ - **Exit `2` (`incomplete` / input error):** All invariants skipped (`ADAPTER_MISSING` / all `flake` invariants skipped), invalid flags (`--mode`, `--concurrency`, `--plugin`, `--dir`, `--runs`, `--crawl-depth`, `--crop`, `--env`, `--header`, missing files, combined `--from-commands` / `--from-har` / `--from-tests`), missing target/report/lock/contract/ID, or unknown command.
70
+
71
+ ## Rules
72
+
73
+ - Never edit `.vibecode/contract.json` or attempt to locate isolated external holdouts outside the workspace.
74
+ - Secret auth headers are stripped or redacted from `.vibecode/SPEC.md`, `.vibecode/contract.json`, and `repro` (`--var` values print as `<REDACTED>`); CLI probes run in a temp sandbox.
75
+ - Keep `.vibecode/contract.json`, `.vibecode/SPEC.md`, and `.vibecode/last-report.json` as the source of truth.