conductor-4-all 0.0.12 → 0.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.
package/dist/index.cjs CHANGED
@@ -176,11 +176,13 @@ var opencodeConfig = {
176
176
  agentType: "opencode",
177
177
  agentDir: ".opencode",
178
178
  commandsDir: "commands",
179
- displayName: "OpenCode"
179
+ displayName: "OpenCode",
180
+ protocolFilename: "AGENTS.md"
180
181
  };
181
182
 
182
183
  // src/generators/ConfigurableGenerator.ts
183
184
  var import_path3 = require("path");
185
+ var import_select2 = __toESM(require("@inquirer/select"), 1);
184
186
  var import_fs_extra2 = __toESM(require("fs-extra"), 1);
185
187
  var { existsSync, ensureDir, writeFile: writeFile2, copy } = import_fs_extra2.default;
186
188
  var ConfigurableGenerator = class {
@@ -217,6 +219,30 @@ var ConfigurableGenerator = class {
217
219
  } catch (e) {
218
220
  console.warn("Failed to copy templates directory:", e);
219
221
  }
222
+ const { protocolFilename } = this.config;
223
+ if (protocolFilename) {
224
+ try {
225
+ const protocolSource = (0, import_path3.join)(templateRoot, "GEMINI.md");
226
+ const protocolDest = (0, import_path3.join)(targetDir, protocolFilename);
227
+ if (existsSync(protocolSource)) {
228
+ let shouldCopy = true;
229
+ if (existsSync(protocolDest)) {
230
+ shouldCopy = await (0, import_select2.default)({
231
+ message: `The protocol file '${protocolFilename}' already exists. Do you want to overwrite it?`,
232
+ choices: [
233
+ { value: true, name: "Overwrite" },
234
+ { value: false, name: "Skip" }
235
+ ]
236
+ });
237
+ }
238
+ if (shouldCopy) {
239
+ await copy(protocolSource, protocolDest);
240
+ }
241
+ }
242
+ } catch (e) {
243
+ console.warn("Failed to handle protocol file:", e);
244
+ }
245
+ }
220
246
  const commands = ["setup", "newTrack", "implement", "status", "revert"];
221
247
  const extension = this.config.extension || ".md";
222
248
  const fixedAgent = this.config.fixedAgent;
@@ -269,7 +295,8 @@ var claudeCodeConfig = {
269
295
  agentType: "claude-code",
270
296
  agentDir: ".claude",
271
297
  commandsDir: "commands",
272
- displayName: "Claude Code"
298
+ displayName: "Claude Code",
299
+ protocolFilename: "CLAUDE.md"
273
300
  };
274
301
 
275
302
  // src/generators/claude-code/generator.ts
@@ -288,7 +315,8 @@ var antigravityConfig = {
288
315
  agentType: "antigravity",
289
316
  agentDir: ".agent",
290
317
  commandsDir: "workflows",
291
- displayName: "Antigravity"
318
+ displayName: "Antigravity",
319
+ protocolFilename: "GEMINI.md"
292
320
  };
293
321
 
294
322
  // src/generators/antigravity/generator.ts
@@ -307,7 +335,8 @@ var cursorConfig = {
307
335
  agentType: "cursor",
308
336
  agentDir: ".cursor",
309
337
  commandsDir: "commands",
310
- displayName: "Cursor"
338
+ displayName: "Cursor",
339
+ protocolFilename: "AGENTS.md"
311
340
  };
312
341
 
313
342
  // src/generators/cursor/generator.ts
@@ -348,6 +377,7 @@ var vscodeCopilotConfig = {
348
377
  agentDir: ".github",
349
378
  commandsDir: "prompts",
350
379
  displayName: "VS Code Copilot",
380
+ protocolFilename: "AGENTS.md",
351
381
  extension: ".prompt.md",
352
382
  fixedAgent: "agent",
353
383
  strategy: {
@@ -372,6 +402,7 @@ var codexConfig = {
372
402
  agentDir: ".codex",
373
403
  commandsDir: "prompts",
374
404
  displayName: "Codex",
405
+ protocolFilename: "AGENTS.md",
375
406
  extension: ".md"
376
407
  };
377
408
 
@@ -398,7 +429,8 @@ var windsurfConfig = {
398
429
  agentType: "windsurf",
399
430
  agentDir: ".windsurf",
400
431
  commandsDir: "workflows",
401
- displayName: "Windsurf"
432
+ displayName: "Windsurf",
433
+ protocolFilename: "AGENTS.md"
402
434
  };
403
435
 
404
436
  // src/generators/windsurf/generator.ts
@@ -436,6 +468,7 @@ var clineConfig = {
436
468
  agentDir: ".clinerules",
437
469
  commandsDir: "workflows",
438
470
  displayName: "Cline",
471
+ protocolFilename: "AGENTS.md",
439
472
  strategy: {
440
473
  content: clineContentStrategy
441
474
  }
@@ -484,6 +517,7 @@ var geminiConfig = {
484
517
  agentDir: ".gemini",
485
518
  commandsDir: "commands/conductor",
486
519
  displayName: "Gemini CLI",
520
+ protocolFilename: "GEMINI.md",
487
521
  extension: ".toml",
488
522
  strategy: {
489
523
  content: geminiContentStrategy,
@@ -577,7 +611,17 @@ var cli = (0, import_yargs.default)((0, import_helpers.hideBin)(process.argv)).s
577
611
  alias: "a",
578
612
  describe: "Specify the coding agent",
579
613
  type: "string",
580
- choices: ["opencode", "claude-code", "antigravity", "cursor", "vscode-copilot", "codex"]
614
+ choices: [
615
+ "opencode",
616
+ "claude-code",
617
+ "antigravity",
618
+ "cursor",
619
+ "vscode-copilot",
620
+ "codex",
621
+ "windsurf",
622
+ "cline",
623
+ "gemini"
624
+ ]
581
625
  });
582
626
  },
583
627
  installHandler
package/dist/index.js CHANGED
@@ -149,11 +149,13 @@ var opencodeConfig = {
149
149
  agentType: "opencode",
150
150
  agentDir: ".opencode",
151
151
  commandsDir: "commands",
152
- displayName: "OpenCode"
152
+ displayName: "OpenCode",
153
+ protocolFilename: "AGENTS.md"
153
154
  };
154
155
 
155
156
  // src/generators/ConfigurableGenerator.ts
156
157
  import { join as join3 } from "path";
158
+ import select2 from "@inquirer/select";
157
159
  import fs2 from "fs-extra";
158
160
  var { existsSync, ensureDir, writeFile: writeFile2, copy } = fs2;
159
161
  var ConfigurableGenerator = class {
@@ -190,6 +192,30 @@ var ConfigurableGenerator = class {
190
192
  } catch (e) {
191
193
  console.warn("Failed to copy templates directory:", e);
192
194
  }
195
+ const { protocolFilename } = this.config;
196
+ if (protocolFilename) {
197
+ try {
198
+ const protocolSource = join3(templateRoot, "GEMINI.md");
199
+ const protocolDest = join3(targetDir, protocolFilename);
200
+ if (existsSync(protocolSource)) {
201
+ let shouldCopy = true;
202
+ if (existsSync(protocolDest)) {
203
+ shouldCopy = await select2({
204
+ message: `The protocol file '${protocolFilename}' already exists. Do you want to overwrite it?`,
205
+ choices: [
206
+ { value: true, name: "Overwrite" },
207
+ { value: false, name: "Skip" }
208
+ ]
209
+ });
210
+ }
211
+ if (shouldCopy) {
212
+ await copy(protocolSource, protocolDest);
213
+ }
214
+ }
215
+ } catch (e) {
216
+ console.warn("Failed to handle protocol file:", e);
217
+ }
218
+ }
193
219
  const commands = ["setup", "newTrack", "implement", "status", "revert"];
194
220
  const extension = this.config.extension || ".md";
195
221
  const fixedAgent = this.config.fixedAgent;
@@ -242,7 +268,8 @@ var claudeCodeConfig = {
242
268
  agentType: "claude-code",
243
269
  agentDir: ".claude",
244
270
  commandsDir: "commands",
245
- displayName: "Claude Code"
271
+ displayName: "Claude Code",
272
+ protocolFilename: "CLAUDE.md"
246
273
  };
247
274
 
248
275
  // src/generators/claude-code/generator.ts
@@ -261,7 +288,8 @@ var antigravityConfig = {
261
288
  agentType: "antigravity",
262
289
  agentDir: ".agent",
263
290
  commandsDir: "workflows",
264
- displayName: "Antigravity"
291
+ displayName: "Antigravity",
292
+ protocolFilename: "GEMINI.md"
265
293
  };
266
294
 
267
295
  // src/generators/antigravity/generator.ts
@@ -280,7 +308,8 @@ var cursorConfig = {
280
308
  agentType: "cursor",
281
309
  agentDir: ".cursor",
282
310
  commandsDir: "commands",
283
- displayName: "Cursor"
311
+ displayName: "Cursor",
312
+ protocolFilename: "AGENTS.md"
284
313
  };
285
314
 
286
315
  // src/generators/cursor/generator.ts
@@ -321,6 +350,7 @@ var vscodeCopilotConfig = {
321
350
  agentDir: ".github",
322
351
  commandsDir: "prompts",
323
352
  displayName: "VS Code Copilot",
353
+ protocolFilename: "AGENTS.md",
324
354
  extension: ".prompt.md",
325
355
  fixedAgent: "agent",
326
356
  strategy: {
@@ -345,6 +375,7 @@ var codexConfig = {
345
375
  agentDir: ".codex",
346
376
  commandsDir: "prompts",
347
377
  displayName: "Codex",
378
+ protocolFilename: "AGENTS.md",
348
379
  extension: ".md"
349
380
  };
350
381
 
@@ -371,7 +402,8 @@ var windsurfConfig = {
371
402
  agentType: "windsurf",
372
403
  agentDir: ".windsurf",
373
404
  commandsDir: "workflows",
374
- displayName: "Windsurf"
405
+ displayName: "Windsurf",
406
+ protocolFilename: "AGENTS.md"
375
407
  };
376
408
 
377
409
  // src/generators/windsurf/generator.ts
@@ -409,6 +441,7 @@ var clineConfig = {
409
441
  agentDir: ".clinerules",
410
442
  commandsDir: "workflows",
411
443
  displayName: "Cline",
444
+ protocolFilename: "AGENTS.md",
412
445
  strategy: {
413
446
  content: clineContentStrategy
414
447
  }
@@ -457,6 +490,7 @@ var geminiConfig = {
457
490
  agentDir: ".gemini",
458
491
  commandsDir: "commands/conductor",
459
492
  displayName: "Gemini CLI",
493
+ protocolFilename: "GEMINI.md",
460
494
  extension: ".toml",
461
495
  strategy: {
462
496
  content: geminiContentStrategy,
@@ -550,7 +584,17 @@ var cli = yargs(hideBin(process.argv)).scriptName("conductor").usage("$0 <cmd> [
550
584
  alias: "a",
551
585
  describe: "Specify the coding agent",
552
586
  type: "string",
553
- choices: ["opencode", "claude-code", "antigravity", "cursor", "vscode-copilot", "codex"]
587
+ choices: [
588
+ "opencode",
589
+ "claude-code",
590
+ "antigravity",
591
+ "cursor",
592
+ "vscode-copilot",
593
+ "codex",
594
+ "windsurf",
595
+ "cline",
596
+ "gemini"
597
+ ]
554
598
  });
555
599
  },
556
600
  installHandler
@@ -0,0 +1,41 @@
1
+ # Conductor Context
2
+
3
+ If a user mentions a "plan" or asks about the plan, and they have used the conductor extension in the current session, they are likely referring to the `conductor/tracks.md` file or one of the track plans (`conductor/tracks/<track_id>/plan.md`).
4
+
5
+ ## Universal File Resolution Protocol
6
+
7
+ **PROTOCOL: How to locate files.**
8
+ To find a file (e.g., "**Product Definition**") within a specific context (Project Root or a specific Track):
9
+
10
+ 1. **Identify Index:** Determine the relevant index file:
11
+ - **Project Context:** `conductor/index.md`
12
+ - **Track Context:**
13
+ a. Resolve and read the **Tracks Registry** (via Project Context).
14
+ b. Find the entry for the specific `<track_id>`.
15
+ c. Follow the link provided in the registry to locate the track's folder. The index file is `<track_folder>/index.md`.
16
+ d. **Fallback:** If the track is not yet registered (e.g., during creation) or the link is broken:
17
+ 1. Resolve the **Tracks Directory** (via Project Context).
18
+ 2. The index file is `<Tracks Directory>/<track_id>/index.md`.
19
+
20
+ 2. **Check Index:** Read the index file and look for a link with a matching or semantically similar label.
21
+
22
+ 3. **Resolve Path:** If a link is found, resolve its path **relative to the directory containing the `index.md` file**.
23
+ - *Example:* If `conductor/index.md` links to `./workflow.md`, the full path is `conductor/workflow.md`.
24
+
25
+ 4. **Fallback:** If the index file is missing or the link is absent, use the **Default Path** keys below.
26
+
27
+ 5. **Verify:** You MUST verify the resolved file actually exists on the disk.
28
+
29
+ **Standard Default Paths (Project):**
30
+ - **Product Definition**: `conductor/product.md`
31
+ - **Tech Stack**: `conductor/tech-stack.md`
32
+ - **Workflow**: `conductor/workflow.md`
33
+ - **Product Guidelines**: `conductor/product-guidelines.md`
34
+ - **Tracks Registry**: `conductor/tracks.md`
35
+ - **Tracks Directory**: `conductor/tracks/`
36
+
37
+ **Standard Default Paths (Track):**
38
+ - **Specification**: `conductor/tracks/<track_id>/spec.md`
39
+ - **Implementation Plan**: `conductor/tracks/<track_id>/plan.md`
40
+ - **Metadata**: `conductor/tracks/<track_id>/metadata.json`
41
+
@@ -275,7 +275,7 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
275
275
  ### 2.4 Select Guides (Interactive)
276
276
  1. **Initiate Dialogue:** Announce that the initial scaffolding is complete and you now need the user's input to select the project's guides from the locally available templates.
277
277
  2. **Select Code Style Guides:**
278
- - List the available style guides by running `ls __$$CODE_AGENT_INSTALL_PATH$$__/templates/code_styleguides/`.
278
+ - List the available style guides by running `ls ~/.gemini/extensions/conductor/templates/code_styleguides/`.
279
279
  - For new projects (greenfield):
280
280
  - **Recommendation:** Based on the Tech Stack defined in the previous step, recommend the most appropriate style guide(s) and explain why.
281
281
  - Ask the user how they would like to proceed:
@@ -290,13 +290,13 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
290
290
  - Ask the user for a simple confirmation to proceed with options like:
291
291
  A) Yes, I want to proceed with the suggested code style guides.
292
292
  B) No, I want to add more code style guides.
293
- - **Action:** Construct and execute a command to create the directory and copy all selected files. For example: `mkdir -p conductor/code_styleguides && cp __$$CODE_AGENT_INSTALL_PATH$$__/templates/code_styleguides/python.md __$$CODE_AGENT_INSTALL_PATH$$__/templates/code_styleguides/javascript.md conductor/code_styleguides/`
293
+ - **Action:** Construct and execute a command to create the directory and copy all selected files. For example: `mkdir -p conductor/code_styleguides && cp ~/.gemini/extensions/conductor/templates/code_styleguides/python.md ~/.gemini/extensions/conductor/templates/code_styleguides/javascript.md conductor/code_styleguides/`
294
294
  - **Commit State:** Upon successful completion of the copy command, you MUST immediately write to `conductor/setup_state.json` with the exact content:
295
295
  `{"last_successful_step": "2.4_code_styleguides"}`
296
296
 
297
297
  ### 2.5 Select Workflow (Interactive)
298
298
  1. **Copy Initial Workflow:**
299
- - Copy `__$$CODE_AGENT_INSTALL_PATH$$__/templates/workflow.md` to `conductor/workflow.md`.
299
+ - Copy `~/.gemini/extensions/conductor/templates/workflow.md` to `conductor/workflow.md`.
300
300
  2. **Customize Workflow:**
301
301
  - Ask the user: "Do you want to use the default workflow or customize it?"
302
302
  The default workflow includes:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-4-all",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Conductor spec-driven development CLI - TypeScript/Node.js version",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {