@curdx/flow 2.0.11 → 2.0.13

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.
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Claude Code Discipline Layer — spec-driven workflow + goal-backward verification + Karpathy 4 principles enforced via gates. Stops Claude from faking \"done\" on non-trivial features.",
9
- "version": "2.0.11"
9
+ "version": "2.0.13"
10
10
  },
11
11
  "plugins": [
12
12
  {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curdx-flow",
3
- "version": "2.0.11",
3
+ "version": "2.0.13",
4
4
  "description": "Claude Code Discipline Layer — spec-driven workflow + goal-backward verification + Karpathy 4 principles enforced via gates. Stops Claude from faking \"done\" on non-trivial features.",
5
5
  "author": {
6
6
  "name": "wdx",
package/cli/doctor.js CHANGED
@@ -15,6 +15,8 @@ import {
15
15
  ensureClaudeMemRuntimes,
16
16
  readUserMcpConfig,
17
17
  findDuplicateMcps,
18
+ findPluginByRegistryEntry,
19
+ hasMarketplace,
18
20
  } from "./utils.js";
19
21
  import { BUNDLED_MCPS, REQUIRED_PLUGINS, RECOMMENDED_PLUGINS } from "./registry.js";
20
22
 
@@ -54,13 +56,12 @@ export async function doctor(args = []) {
54
56
  }
55
57
 
56
58
  const marketplaces = cv ? listPluginMarketplaces() : [];
57
- const marketplaceNames = new Set(marketplaces.map((m) => m.name));
58
59
 
59
60
  // ---------- Required plugins ----------
60
61
  console.log(`\n${color.bold("Required plugins:")}`);
61
62
  for (const r of REQUIRED_PLUGINS) {
62
- const p = plugins.find((x) => x.id === r.id || x.name === r.name);
63
- if (r.marketplaceSource && !marketplaceNames.has(r.marketplaceId)) {
63
+ const p = findPluginByRegistryEntry(plugins, r);
64
+ if (!hasMarketplace(marketplaces, r)) {
64
65
  log.warn(
65
66
  `${r.marketplaceId.padEnd(22)} marketplace missing ${color.dim(`(run: claude plugin marketplace add --scope ${r.scope} ${r.marketplaceSource})`)}`
66
67
  );
@@ -116,8 +117,8 @@ export async function doctor(args = []) {
116
117
  console.log(`\n${color.bold("Recommended plugins:")}`);
117
118
  let claudeMemEnabled = false;
118
119
  for (const r of RECOMMENDED_PLUGINS) {
119
- const p = plugins.find((x) => x.id === r.id || x.name === r.name);
120
- if (r.marketplaceSource && !marketplaceNames.has(r.marketplaceId)) {
120
+ const p = findPluginByRegistryEntry(plugins, r);
121
+ if (!hasMarketplace(marketplaces, r)) {
121
122
  log.warn(
122
123
  `${r.marketplaceId.padEnd(22)} marketplace missing ${color.dim(`(run: claude plugin marketplace add --scope ${r.scope} ${r.marketplaceSource})`)}`
123
124
  );
@@ -1,6 +1,12 @@
1
1
  import { color, ensureClaudeMemRuntimes, listPlugins, log, multiselectClack, note, run, text, writeConfig } from "./utils.js";
2
2
  import { BUNDLED_MCPS, RECOMMENDED_PLUGINS, REQUIRED_PLUGINS } from "./registry.js";
3
3
  import { readUserMcpConfig } from "./utils.js";
4
+ import {
5
+ mcpAddArgs,
6
+ mcpRemoveArgs,
7
+ pluginInstallArgs,
8
+ pluginMarketplaceAddArgs,
9
+ } from "./lib/claude-commands.js";
4
10
 
5
11
  const RECOMMENDED = RECOMMENDED_PLUGINS;
6
12
 
@@ -11,7 +17,7 @@ export async function installRequiredPlugins({ yes, language, config }) {
11
17
  console.log(` ${color.cyan("▸")} Installing ${color.bold(plugin.name)}...`);
12
18
  const ma = await run(
13
19
  "claude",
14
- ["plugin", "marketplace", "add", "--scope", plugin.scope, plugin.marketplaceSource],
20
+ pluginMarketplaceAddArgs(plugin),
15
21
  { silent: true }
16
22
  );
17
23
  if (ma.code !== 0 && !ma.stderr.includes("already")) {
@@ -20,7 +26,7 @@ export async function installRequiredPlugins({ yes, language, config }) {
20
26
 
21
27
  const ir = await run(
22
28
  "claude",
23
- ["plugin", "install", "--scope", plugin.scope, plugin.installSpec],
29
+ pluginInstallArgs(plugin),
24
30
  { silent: true }
25
31
  );
26
32
  if (ir.code === 0) {
@@ -61,7 +67,7 @@ export async function registerBundledMcps() {
61
67
  }
62
68
  const r = await run(
63
69
  "claude",
64
- ["mcp", "add", "--scope", "user", mcp.name, "--", mcp.command, ...mcp.args],
70
+ mcpAddArgs(mcp),
65
71
  { silent: true }
66
72
  );
67
73
  if (r.code === 0) {
@@ -125,7 +131,7 @@ export async function installRecommendedPlugins({ all, yes, language }) {
125
131
  if (rec.marketplaceSource) {
126
132
  const ma = await run(
127
133
  "claude",
128
- ["plugin", "marketplace", "add", "--scope", rec.scope, rec.marketplaceSource],
134
+ pluginMarketplaceAddArgs(rec),
129
135
  { silent: true }
130
136
  );
131
137
  if (ma.code !== 0 && !ma.stderr.includes("already")) {
@@ -133,7 +139,7 @@ export async function installRecommendedPlugins({ all, yes, language }) {
133
139
  }
134
140
  }
135
141
 
136
- const ir = await run("claude", ["plugin", "install", "--scope", rec.scope, rec.installSpec], {
142
+ const ir = await run("claude", pluginInstallArgs(rec), {
137
143
  silent: true,
138
144
  });
139
145
  if (ir.code === 0) {
@@ -203,7 +209,12 @@ async function promptPluginConfig(plugin, language, config) {
203
209
 
204
210
  const r = await run(
205
211
  "claude",
206
- ["mcp", "add", "--scope", "user", "context7", "--env", `CONTEXT7_API_KEY=${apiKey}`, "--", "npx", "-y", "@upstash/context7-mcp"],
212
+ mcpAddArgs({
213
+ name: "context7",
214
+ env: [`CONTEXT7_API_KEY=${apiKey}`],
215
+ command: "npx",
216
+ args: ["-y", "@upstash/context7-mcp"],
217
+ }),
207
218
  { silent: true }
208
219
  );
209
220
 
@@ -214,10 +225,15 @@ async function promptPluginConfig(plugin, language, config) {
214
225
  : " Context7 API key configured"
215
226
  );
216
227
  } else if (r.stderr.includes("already exists")) {
217
- await run("claude", ["mcp", "remove", "--scope", "user", "context7"], { silent: true });
228
+ await run("claude", mcpRemoveArgs({ name: "context7" }), { silent: true });
218
229
  const r2 = await run(
219
230
  "claude",
220
- ["mcp", "add", "--scope", "user", "context7", "--env", `CONTEXT7_API_KEY=${apiKey}`, "--", "npx", "-y", "@upstash/context7-mcp"],
231
+ mcpAddArgs({
232
+ name: "context7",
233
+ env: [`CONTEXT7_API_KEY=${apiKey}`],
234
+ command: "npx",
235
+ args: ["-y", "@upstash/context7-mcp"],
236
+ }),
221
237
  { silent: true }
222
238
  );
223
239
  if (r2.code === 0) {
@@ -0,0 +1,25 @@
1
+ export function pluginMarketplaceAddArgs({ scope, marketplaceSource }) {
2
+ return ["plugin", "marketplace", "add", "--scope", scope, marketplaceSource];
3
+ }
4
+
5
+ export function pluginInstallArgs({ scope, installSpec }) {
6
+ return ["plugin", "install", "--scope", scope, installSpec];
7
+ }
8
+
9
+ export function mcpAddArgs({ scope = "user", name, command, args = [], env = [] }) {
10
+ return [
11
+ "mcp",
12
+ "add",
13
+ "--scope",
14
+ scope,
15
+ name,
16
+ ...env.flatMap((value) => ["--env", value]),
17
+ "--",
18
+ command,
19
+ ...args,
20
+ ];
21
+ }
22
+
23
+ export function mcpRemoveArgs({ scope = "user", name }) {
24
+ return ["mcp", "remove", "--scope", scope, name];
25
+ }
package/cli/lib/claude.js CHANGED
@@ -71,6 +71,17 @@ export function listPluginMarketplaces() {
71
71
  return [];
72
72
  }
73
73
 
74
+ export function findPluginByRegistryEntry(plugins, registryEntry) {
75
+ return plugins.find(
76
+ (plugin) => plugin.id === registryEntry.id || plugin.name === registryEntry.name
77
+ );
78
+ }
79
+
80
+ export function hasMarketplace(marketplaces, registryEntry) {
81
+ if (!registryEntry.marketplaceSource) return true;
82
+ return marketplaces.some((marketplace) => marketplace.name === registryEntry.marketplaceId);
83
+ }
84
+
74
85
  export function readUserMcpConfig() {
75
86
  try {
76
87
  const path = join(HOME, ".claude.json");
package/cli/utils.js CHANGED
@@ -23,6 +23,8 @@ export { readConfig, writeConfig } from "./lib/config.js";
23
23
  export {
24
24
  claudeVersion,
25
25
  findDuplicateMcps,
26
+ findPluginByRegistryEntry,
27
+ hasMarketplace,
26
28
  listMcps,
27
29
  listPluginMarketplaces,
28
30
  listPlugins,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curdx/flow",
3
- "version": "2.0.11",
3
+ "version": "2.0.13",
4
4
  "description": "CLI installer for CurdX-Flow — AI engineering workflow meta-framework for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {