conductor-4-all 0.0.3 → 0.0.4

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
@@ -40,12 +40,17 @@ async function promptForAgent() {
40
40
  {
41
41
  name: "OpenCode",
42
42
  value: "opencode",
43
- description: "Gemini-based coding assistant"
43
+ description: "The open source AI coding agent"
44
44
  },
45
45
  {
46
46
  name: "Claude Code",
47
47
  value: "claude-code",
48
- description: "Anthropic-based coding assistant"
48
+ description: "Anthropic's coding assistant"
49
+ },
50
+ {
51
+ name: "Antigravity",
52
+ value: "antigravity",
53
+ description: "Google's agentic coding assistant"
49
54
  }
50
55
  ],
51
56
  default: "opencode"
@@ -100,28 +105,60 @@ async function validateProjectDirectory(targetDir, agentType) {
100
105
  if (!existsSync(targetDir)) {
101
106
  throw new Error(`Target directory does not exist: ${targetDir}`);
102
107
  }
103
- const agentDir = agentType === "claude-code" ? ".claude" : ".opencode";
108
+ let agentDir;
109
+ let setupFile;
110
+ if (agentType === "claude-code") {
111
+ agentDir = ".claude";
112
+ setupFile = (0, import_path2.join)(targetDir, agentDir, "commands", "conductor:setup.md");
113
+ } else if (agentType === "antigravity") {
114
+ agentDir = ".agent";
115
+ setupFile = (0, import_path2.join)(targetDir, agentDir, "workflows", "conductor:setup.md");
116
+ } else {
117
+ agentDir = ".opencode";
118
+ setupFile = (0, import_path2.join)(targetDir, agentDir, "commands", "conductor:setup.md");
119
+ }
104
120
  const agentPath = (0, import_path2.join)(targetDir, agentDir);
105
121
  const conductorPath = (0, import_path2.join)(agentPath, "conductor");
106
- const setupFile = (0, import_path2.join)(agentPath, "commands", "conductor:setup.md");
107
122
  if (existsSync(conductorPath) && existsSync(setupFile)) {
108
123
  throw new Error(`Conductor (${agentType}) is already installed in: ${targetDir}`);
109
124
  }
110
125
  return targetDir;
111
126
  }
112
127
  async function createConductorDirectories(targetDir, agentType) {
113
- const agentDir = agentType === "claude-code" ? ".claude" : ".opencode";
128
+ let agentDir;
129
+ let commandsDir;
130
+ if (agentType === "claude-code") {
131
+ agentDir = ".claude";
132
+ commandsDir = "commands";
133
+ } else if (agentType === "antigravity") {
134
+ agentDir = ".agent";
135
+ commandsDir = "workflows";
136
+ } else {
137
+ agentDir = ".opencode";
138
+ commandsDir = "commands";
139
+ }
114
140
  const agentPath = (0, import_path2.join)(targetDir, agentDir);
115
- await ensureDir((0, import_path2.join)(agentPath, "commands"));
141
+ await ensureDir((0, import_path2.join)(agentPath, commandsDir));
116
142
  await ensureDir((0, import_path2.join)(agentPath, "conductor"));
117
143
  }
118
144
  async function copyTemplateFiles(targetDir, agentType) {
119
145
  const commands = ["setup", "newTrack", "implement", "status", "revert"];
120
- const agentDir = agentType === "claude-code" ? ".claude" : ".opencode";
146
+ let agentDir;
147
+ let commandsDir;
148
+ if (agentType === "claude-code") {
149
+ agentDir = ".claude";
150
+ commandsDir = "commands";
151
+ } else if (agentType === "antigravity") {
152
+ agentDir = ".agent";
153
+ commandsDir = "workflows";
154
+ } else {
155
+ agentDir = ".opencode";
156
+ commandsDir = "commands";
157
+ }
121
158
  const agentPath = (0, import_path2.join)(targetDir, agentDir);
122
- const commandsDir = (0, import_path2.join)(agentPath, "commands");
159
+ const targetCommandsDir = (0, import_path2.join)(agentPath, commandsDir);
123
160
  const templateRoot = await getTemplateRoot();
124
- const installPath = (0, import_path2.join)(targetDir, agentDir, "conductor");
161
+ const installPath = (0, import_path2.join)(agentDir, "conductor");
125
162
  try {
126
163
  const templateSource = (0, import_path2.join)(templateRoot, "templates");
127
164
  const templateDest = (0, import_path2.join)(agentPath, "conductor", "templates");
@@ -132,6 +169,8 @@ async function copyTemplateFiles(targetDir, agentType) {
132
169
  for (const cmd of commands) {
133
170
  try {
134
171
  const tomlContent = await loadTemplate(`commands/${cmd}.toml`);
172
+ let finalContent;
173
+ let fileName;
135
174
  const parsed = (0, import_smol_toml.parse)(tomlContent);
136
175
  if (!parsed.prompt) {
137
176
  console.warn(`Warning: No prompt found in ${cmd}.toml`);
@@ -139,8 +178,15 @@ async function copyTemplateFiles(targetDir, agentType) {
139
178
  }
140
179
  let prompt = parsed.prompt;
141
180
  prompt = prompt.replace(/__\$\$CODE_AGENT_INSTALL_PATH\$\$__/g, installPath);
142
- const finalPrompt = substituteVariables(prompt, { agent_type: agentType });
143
- await writeFile((0, import_path2.join)(commandsDir, `conductor:${cmd}.md`), finalPrompt);
181
+ finalContent = substituteVariables(prompt, { agent_type: agentType });
182
+ if (parsed.description) {
183
+ finalContent = `---
184
+ description: ${parsed.description}
185
+ ---
186
+ ${finalContent}`;
187
+ }
188
+ fileName = `conductor:${cmd}.md`;
189
+ await writeFile((0, import_path2.join)(targetCommandsDir, fileName), finalContent);
144
190
  } catch (e) {
145
191
  console.warn(`Failed to process ${cmd}:`, e);
146
192
  }
package/dist/index.js CHANGED
@@ -13,12 +13,17 @@ async function promptForAgent() {
13
13
  {
14
14
  name: "OpenCode",
15
15
  value: "opencode",
16
- description: "Gemini-based coding assistant"
16
+ description: "The open source AI coding agent"
17
17
  },
18
18
  {
19
19
  name: "Claude Code",
20
20
  value: "claude-code",
21
- description: "Anthropic-based coding assistant"
21
+ description: "Anthropic's coding assistant"
22
+ },
23
+ {
24
+ name: "Antigravity",
25
+ value: "antigravity",
26
+ description: "Google's agentic coding assistant"
22
27
  }
23
28
  ],
24
29
  default: "opencode"
@@ -73,28 +78,60 @@ async function validateProjectDirectory(targetDir, agentType) {
73
78
  if (!existsSync(targetDir)) {
74
79
  throw new Error(`Target directory does not exist: ${targetDir}`);
75
80
  }
76
- const agentDir = agentType === "claude-code" ? ".claude" : ".opencode";
81
+ let agentDir;
82
+ let setupFile;
83
+ if (agentType === "claude-code") {
84
+ agentDir = ".claude";
85
+ setupFile = join2(targetDir, agentDir, "commands", "conductor:setup.md");
86
+ } else if (agentType === "antigravity") {
87
+ agentDir = ".agent";
88
+ setupFile = join2(targetDir, agentDir, "workflows", "conductor:setup.md");
89
+ } else {
90
+ agentDir = ".opencode";
91
+ setupFile = join2(targetDir, agentDir, "commands", "conductor:setup.md");
92
+ }
77
93
  const agentPath = join2(targetDir, agentDir);
78
94
  const conductorPath = join2(agentPath, "conductor");
79
- const setupFile = join2(agentPath, "commands", "conductor:setup.md");
80
95
  if (existsSync(conductorPath) && existsSync(setupFile)) {
81
96
  throw new Error(`Conductor (${agentType}) is already installed in: ${targetDir}`);
82
97
  }
83
98
  return targetDir;
84
99
  }
85
100
  async function createConductorDirectories(targetDir, agentType) {
86
- const agentDir = agentType === "claude-code" ? ".claude" : ".opencode";
101
+ let agentDir;
102
+ let commandsDir;
103
+ if (agentType === "claude-code") {
104
+ agentDir = ".claude";
105
+ commandsDir = "commands";
106
+ } else if (agentType === "antigravity") {
107
+ agentDir = ".agent";
108
+ commandsDir = "workflows";
109
+ } else {
110
+ agentDir = ".opencode";
111
+ commandsDir = "commands";
112
+ }
87
113
  const agentPath = join2(targetDir, agentDir);
88
- await ensureDir(join2(agentPath, "commands"));
114
+ await ensureDir(join2(agentPath, commandsDir));
89
115
  await ensureDir(join2(agentPath, "conductor"));
90
116
  }
91
117
  async function copyTemplateFiles(targetDir, agentType) {
92
118
  const commands = ["setup", "newTrack", "implement", "status", "revert"];
93
- const agentDir = agentType === "claude-code" ? ".claude" : ".opencode";
119
+ let agentDir;
120
+ let commandsDir;
121
+ if (agentType === "claude-code") {
122
+ agentDir = ".claude";
123
+ commandsDir = "commands";
124
+ } else if (agentType === "antigravity") {
125
+ agentDir = ".agent";
126
+ commandsDir = "workflows";
127
+ } else {
128
+ agentDir = ".opencode";
129
+ commandsDir = "commands";
130
+ }
94
131
  const agentPath = join2(targetDir, agentDir);
95
- const commandsDir = join2(agentPath, "commands");
132
+ const targetCommandsDir = join2(agentPath, commandsDir);
96
133
  const templateRoot = await getTemplateRoot();
97
- const installPath = join2(targetDir, agentDir, "conductor");
134
+ const installPath = join2(agentDir, "conductor");
98
135
  try {
99
136
  const templateSource = join2(templateRoot, "templates");
100
137
  const templateDest = join2(agentPath, "conductor", "templates");
@@ -105,6 +142,8 @@ async function copyTemplateFiles(targetDir, agentType) {
105
142
  for (const cmd of commands) {
106
143
  try {
107
144
  const tomlContent = await loadTemplate(`commands/${cmd}.toml`);
145
+ let finalContent;
146
+ let fileName;
108
147
  const parsed = parse(tomlContent);
109
148
  if (!parsed.prompt) {
110
149
  console.warn(`Warning: No prompt found in ${cmd}.toml`);
@@ -112,8 +151,15 @@ async function copyTemplateFiles(targetDir, agentType) {
112
151
  }
113
152
  let prompt = parsed.prompt;
114
153
  prompt = prompt.replace(/__\$\$CODE_AGENT_INSTALL_PATH\$\$__/g, installPath);
115
- const finalPrompt = substituteVariables(prompt, { agent_type: agentType });
116
- await writeFile(join2(commandsDir, `conductor:${cmd}.md`), finalPrompt);
154
+ finalContent = substituteVariables(prompt, { agent_type: agentType });
155
+ if (parsed.description) {
156
+ finalContent = `---
157
+ description: ${parsed.description}
158
+ ---
159
+ ${finalContent}`;
160
+ }
161
+ fileName = `conductor:${cmd}.md`;
162
+ await writeFile(join2(targetCommandsDir, fileName), finalContent);
117
163
  } catch (e) {
118
164
  console.warn(`Failed to process ${cmd}:`, e);
119
165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-4-all",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Conductor spec-driven development CLI - TypeScript/Node.js version",
5
5
  "repository": {
6
6
  "type": "git",