@swarmcraftai/cli 0.5.0 → 0.6.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.
- package/CHANGELOG.md +14 -0
- package/README.md +104 -125
- package/dist/main.cjs +550 -453
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -65,7 +65,9 @@ var require_assistantActions = __commonJS({
|
|
|
65
65
|
copilotSkillPath: ".github/skills/swarmcraft-plan/SKILL.md",
|
|
66
66
|
copilotInvocation: "/plan",
|
|
67
67
|
codexSkillPath: ".agents/skills/swarmcraft-plan/SKILL.md",
|
|
68
|
-
codexInvocation: "$swarmcraft-plan"
|
|
68
|
+
codexInvocation: "$swarmcraft-plan",
|
|
69
|
+
claudeSkillPath: ".claude/skills/swarmcraft-plan/SKILL.md",
|
|
70
|
+
claudeInvocation: "/swarmcraft-plan"
|
|
69
71
|
},
|
|
70
72
|
{
|
|
71
73
|
key: "do",
|
|
@@ -78,7 +80,9 @@ var require_assistantActions = __commonJS({
|
|
|
78
80
|
copilotSkillPath: ".github/skills/swarmcraft-do/SKILL.md",
|
|
79
81
|
copilotInvocation: "/do task=<packet-path>",
|
|
80
82
|
codexSkillPath: ".agents/skills/swarmcraft-do/SKILL.md",
|
|
81
|
-
codexInvocation: "$swarmcraft-do task=<packet-path>"
|
|
83
|
+
codexInvocation: "$swarmcraft-do task=<packet-path>",
|
|
84
|
+
claudeSkillPath: ".claude/skills/swarmcraft-do/SKILL.md",
|
|
85
|
+
claudeInvocation: "/swarmcraft-do task=<packet-path>"
|
|
82
86
|
},
|
|
83
87
|
{
|
|
84
88
|
key: "check",
|
|
@@ -91,7 +95,9 @@ var require_assistantActions = __commonJS({
|
|
|
91
95
|
copilotSkillPath: ".github/skills/swarmcraft-check/SKILL.md",
|
|
92
96
|
copilotInvocation: "/check task=<packet-path>",
|
|
93
97
|
codexSkillPath: ".agents/skills/swarmcraft-check/SKILL.md",
|
|
94
|
-
codexInvocation: "$swarmcraft-check task=<packet-path>"
|
|
98
|
+
codexInvocation: "$swarmcraft-check task=<packet-path>",
|
|
99
|
+
claudeSkillPath: ".claude/skills/swarmcraft-check/SKILL.md",
|
|
100
|
+
claudeInvocation: "/swarmcraft-check task=<packet-path>"
|
|
95
101
|
},
|
|
96
102
|
{
|
|
97
103
|
key: "review",
|
|
@@ -104,7 +110,9 @@ var require_assistantActions = __commonJS({
|
|
|
104
110
|
copilotSkillPath: ".github/skills/swarmcraft-review/SKILL.md",
|
|
105
111
|
copilotInvocation: "/review task=<packet-path>",
|
|
106
112
|
codexSkillPath: ".agents/skills/swarmcraft-review/SKILL.md",
|
|
107
|
-
codexInvocation: "$swarmcraft-review task=<packet-path>"
|
|
113
|
+
codexInvocation: "$swarmcraft-review task=<packet-path>",
|
|
114
|
+
claudeSkillPath: ".claude/skills/swarmcraft-review/SKILL.md",
|
|
115
|
+
claudeInvocation: "/swarmcraft-review task=<packet-path>"
|
|
108
116
|
},
|
|
109
117
|
{
|
|
110
118
|
key: "test",
|
|
@@ -116,7 +124,9 @@ var require_assistantActions = __commonJS({
|
|
|
116
124
|
copilotSkillPath: ".github/skills/swarmcraft-test/SKILL.md",
|
|
117
125
|
copilotInvocation: "/test",
|
|
118
126
|
codexSkillPath: ".agents/skills/swarmcraft-test/SKILL.md",
|
|
119
|
-
codexInvocation: "$swarmcraft-test"
|
|
127
|
+
codexInvocation: "$swarmcraft-test",
|
|
128
|
+
claudeSkillPath: ".claude/skills/swarmcraft-test/SKILL.md",
|
|
129
|
+
claudeInvocation: "/swarmcraft-test"
|
|
120
130
|
}
|
|
121
131
|
];
|
|
122
132
|
function getSwarmCraftAssistantAction(actionKey) {
|
|
@@ -130,6 +140,14 @@ var require_assistantActions = __commonJS({
|
|
|
130
140
|
return exports2.SWARMCRAFT_ASSISTANT_ACTIONS.filter((action) => action.kind === "stage");
|
|
131
141
|
}
|
|
132
142
|
function renderAssistantActionAdapterMetadata(provider, action) {
|
|
143
|
+
if (provider === "claude")
|
|
144
|
+
return {
|
|
145
|
+
provider,
|
|
146
|
+
action: action.key,
|
|
147
|
+
relativePath: action.claudeSkillPath,
|
|
148
|
+
invocation: action.claudeInvocation,
|
|
149
|
+
skillPath: action.claudeSkillPath
|
|
150
|
+
};
|
|
133
151
|
if (provider === "copilot") {
|
|
134
152
|
return {
|
|
135
153
|
provider,
|
|
@@ -148,7 +166,7 @@ var require_assistantActions = __commonJS({
|
|
|
148
166
|
skillPath: action.codexSkillPath
|
|
149
167
|
};
|
|
150
168
|
}
|
|
151
|
-
function listAssistantActionAdapterMetadata(expectedProviders = ["copilot", "codex"], expectedActions = exports2.SWARMCRAFT_ASSISTANT_ACTIONS) {
|
|
169
|
+
function listAssistantActionAdapterMetadata(expectedProviders = ["copilot", "codex", "claude"], expectedActions = exports2.SWARMCRAFT_ASSISTANT_ACTIONS) {
|
|
152
170
|
return expectedProviders.flatMap((provider) => expectedActions.map((action) => renderAssistantActionAdapterMetadata(provider, action)));
|
|
153
171
|
}
|
|
154
172
|
function findMissingAssistantActionAdapters(expectedProviders, adapters, expectedActions = exports2.SWARMCRAFT_ASSISTANT_ACTIONS) {
|
|
@@ -178,9 +196,14 @@ var require_agentProviders = __commonJS({
|
|
|
178
196
|
exports2.applyExternalAgentProviderDefault = applyExternalAgentProviderDefault;
|
|
179
197
|
exports2.resolveExternalAgentSandboxMode = resolveExternalAgentSandboxMode2;
|
|
180
198
|
exports2.resolveExternalAgentApprovalPosture = resolveExternalAgentApprovalPosture2;
|
|
181
|
-
exports2.EXTERNAL_AGENT_PROVIDERS = ["codex", "copilot", "custom"];
|
|
199
|
+
exports2.EXTERNAL_AGENT_PROVIDERS = ["codex", "copilot", "claude", "custom"];
|
|
182
200
|
exports2.DEFAULT_EXTERNAL_AGENT_PROVIDER = "custom";
|
|
183
201
|
exports2.EXTERNAL_AGENT_PROVIDER_DEFAULTS = {
|
|
202
|
+
claude: {
|
|
203
|
+
command: "claude --permission-mode dontAsk -p {command}",
|
|
204
|
+
sandboxMode: "claude-config",
|
|
205
|
+
approvalPosture: "dontAsk,configured-tools-only"
|
|
206
|
+
},
|
|
184
207
|
codex: {
|
|
185
208
|
command: "codex exec --sandbox workspace-write {command}",
|
|
186
209
|
sandboxMode: "workspace-write",
|
|
@@ -196,7 +219,7 @@ var require_agentProviders = __commonJS({
|
|
|
196
219
|
if (exports2.EXTERNAL_AGENT_PROVIDERS.includes(rawValue)) {
|
|
197
220
|
return rawValue;
|
|
198
221
|
}
|
|
199
|
-
throw new Error("--agent-provider must be codex, copilot, or custom.");
|
|
222
|
+
throw new Error("--agent-provider must be codex, copilot, claude, or custom.");
|
|
200
223
|
}
|
|
201
224
|
function resolveExternalAgentProviderDefault3(provider) {
|
|
202
225
|
return exports2.EXTERNAL_AGENT_PROVIDER_DEFAULTS[provider] ?? null;
|
|
@@ -223,6 +246,8 @@ var require_agentProviders = __commonJS({
|
|
|
223
246
|
const match = parsedArgs.agentCommand?.match(/--sandbox\s+([^\s]+)/);
|
|
224
247
|
return match ? match[1] : "codex-config";
|
|
225
248
|
}
|
|
249
|
+
if (parsedArgs.agentProvider === "claude")
|
|
250
|
+
return "claude-config";
|
|
226
251
|
if (parsedArgs.agentProvider === "copilot") {
|
|
227
252
|
return "local-cli-default";
|
|
228
253
|
}
|
|
@@ -240,6 +265,8 @@ var require_agentProviders = __commonJS({
|
|
|
240
265
|
if (parsedArgs.agentProvider === "codex") {
|
|
241
266
|
return command.includes("--dangerously-bypass-approvals-and-sandbox") ? "bypass-approvals-and-sandbox" : "codex-config";
|
|
242
267
|
}
|
|
268
|
+
if (parsedArgs.agentProvider === "claude")
|
|
269
|
+
return "claude-config";
|
|
243
270
|
if (parsedArgs.agentProvider === "copilot") {
|
|
244
271
|
return command.includes("--allow-all") || command.includes("--yolo") ? "allow-all" : "copilot-config";
|
|
245
272
|
}
|
|
@@ -1051,9 +1078,11 @@ var require_stageCommands = __commonJS({
|
|
|
1051
1078
|
exports2.buildPacketStageCommand = buildPacketStageCommand2;
|
|
1052
1079
|
exports2.buildAssistantActionCommand = buildAssistantActionCommand;
|
|
1053
1080
|
exports2.formatTaskArgument = formatTaskArgument;
|
|
1081
|
+
exports2.buildSkillInvocation = buildSkillInvocation;
|
|
1082
|
+
exports2.getProviderSkillRoot = getProviderSkillRoot;
|
|
1054
1083
|
var assistantActions_js_1 = require_assistantActions();
|
|
1055
1084
|
var workflowContract_js_1 = require_workflowContract();
|
|
1056
|
-
exports2.SWARMCRAFT_AGENT_PROVIDERS = ["copilot", "codex"];
|
|
1085
|
+
exports2.SWARMCRAFT_AGENT_PROVIDERS = ["copilot", "codex", "claude"];
|
|
1057
1086
|
exports2.DEFAULT_SWARMCRAFT_AGENT_PROVIDER = "copilot";
|
|
1058
1087
|
var COMMAND_BY_WORKFLOW_STATE = Object.fromEntries(workflowContract_js_1.SWARMCRAFT_STAGE_CONTRACTS.map((stage) => [
|
|
1059
1088
|
stage.key,
|
|
@@ -1076,7 +1105,7 @@ var require_stageCommands = __commonJS({
|
|
|
1076
1105
|
function buildAssistantActionCommand(input) {
|
|
1077
1106
|
const action = (0, assistantActions_js_1.getSwarmCraftAssistantAction)(input.actionKey);
|
|
1078
1107
|
const agentProvider = input.agentProvider ?? exports2.DEFAULT_SWARMCRAFT_AGENT_PROVIDER;
|
|
1079
|
-
const invocation =
|
|
1108
|
+
const invocation = { codex: action.codexInvocation, copilot: action.copilotInvocation, claude: action.claudeInvocation }[agentProvider];
|
|
1080
1109
|
const command = input.relativePacketFilePath ? invocation.replace("<packet-path>", formatTaskArgument(input.relativePacketFilePath)) : invocation;
|
|
1081
1110
|
const args = [];
|
|
1082
1111
|
if (input.relativePacketFilePath && command === invocation) {
|
|
@@ -1097,6 +1126,12 @@ var require_stageCommands = __commonJS({
|
|
|
1097
1126
|
function toStageName(command) {
|
|
1098
1127
|
return command.slice(1);
|
|
1099
1128
|
}
|
|
1129
|
+
function buildSkillInvocation(provider, action) {
|
|
1130
|
+
return { copilot: `/${action}`, codex: `$swarmcraft-${action}`, claude: `/swarmcraft-${action}` }[provider];
|
|
1131
|
+
}
|
|
1132
|
+
function getProviderSkillRoot(provider) {
|
|
1133
|
+
return { copilot: ".github/skills", codex: ".agents/skills", claude: ".claude/skills" }[provider];
|
|
1134
|
+
}
|
|
1100
1135
|
}
|
|
1101
1136
|
});
|
|
1102
1137
|
|
|
@@ -1138,394 +1173,6 @@ var require_projectSeedModels = __commonJS({
|
|
|
1138
1173
|
}
|
|
1139
1174
|
});
|
|
1140
1175
|
|
|
1141
|
-
// ../../packages/repo-seed/dist/projectEnvironmentContract.js
|
|
1142
|
-
var require_projectEnvironmentContract = __commonJS({
|
|
1143
|
-
"../../packages/repo-seed/dist/projectEnvironmentContract.js"(exports2) {
|
|
1144
|
-
"use strict";
|
|
1145
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1146
|
-
exports2.PROJECT_EXTENSION_CATALOG = exports2.PROJECT_EXTENSION_CATALOG_VERSION = exports2.PROJECT_ENVIRONMENT_SCHEMA_VERSION = exports2.VSCODE_EXTENSIONS_PATH = exports2.PROJECT_ENVIRONMENT_PATH = void 0;
|
|
1147
|
-
exports2.buildProjectEnvironmentManifest = buildProjectEnvironmentManifest;
|
|
1148
|
-
exports2.renderProjectEnvironmentManifest = renderProjectEnvironmentManifest;
|
|
1149
|
-
exports2.renderVsCodeExtensionRecommendations = renderVsCodeExtensionRecommendations;
|
|
1150
|
-
exports2.parseProjectEnvironmentManifest = parseProjectEnvironmentManifest;
|
|
1151
|
-
exports2.PROJECT_ENVIRONMENT_PATH = ".swarmcraft/environment.json";
|
|
1152
|
-
exports2.VSCODE_EXTENSIONS_PATH = ".vscode/extensions.json";
|
|
1153
|
-
exports2.PROJECT_ENVIRONMENT_SCHEMA_VERSION = 1;
|
|
1154
|
-
exports2.PROJECT_EXTENSION_CATALOG_VERSION = 1;
|
|
1155
|
-
exports2.PROJECT_EXTENSION_CATALOG = [
|
|
1156
|
-
catalog("python", "ms-python.python", "Microsoft", "editorSupport", "Microsoft Marketplace terms / open-source components", "medium", "Includes its normal Python language dependencies.", "https://marketplace.visualstudio.com/items?itemName=ms-python.python"),
|
|
1157
|
-
catalog("java", "vscjava.vscode-java-pack", "Microsoft", "editorSupport", "MIT", "high", "Pack already includes Java language, debug, test, Maven, and Gradle tools.", "https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack"),
|
|
1158
|
-
catalog("dotnet", "ms-dotnettools.csharp", "Microsoft", "editorSupport", "Microsoft extension terms; source MIT", "medium", "C# Dev Kit is deliberately not required and has a different organisational licence.", "https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp"),
|
|
1159
|
-
catalog("terraform", "HashiCorp.terraform", "HashiCorp", "editorSupport", "MPL-2.0 components / Marketplace terms", "medium", "Bundles terraform-ls; the Terraform CLI remains a separate runtime.", "https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform"),
|
|
1160
|
-
catalog("kubernetes", "redhat.vscode-yaml", "Red Hat", "editorSupport", "MIT", "low", "Provides YAML and Kubernetes schema support without cluster tooling.", "https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml"),
|
|
1161
|
-
catalog("kubernetes", "ms-kubernetes-tools.vscode-kubernetes-tools", "Microsoft", "optionalConvenience", "MIT", "high", "Overlaps YAML support and activates cluster/Helm/kubectl features only when chosen.", "https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools"),
|
|
1162
|
-
catalog("containers", "ms-azuretools.vscode-containers", "Microsoft", "editorSupport", "MIT", "medium", "Replaces the legacy Docker extension's container management and Compose editing surface.", "https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-containers")
|
|
1163
|
-
];
|
|
1164
|
-
function buildProjectEnvironmentManifest(project) {
|
|
1165
|
-
const context = project.repoSeed?.projectContext;
|
|
1166
|
-
if (!context || context.technologyPreference !== "PREFERRED")
|
|
1167
|
-
return null;
|
|
1168
|
-
const requirements = /* @__PURE__ */ new Map();
|
|
1169
|
-
for (const technology of context.preferredTechnologies) {
|
|
1170
|
-
for (const id of requirementIdsForTechnology(technology)) {
|
|
1171
|
-
if (!requirements.has(id))
|
|
1172
|
-
requirements.set(id, technology);
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
if (requirements.size === 0)
|
|
1176
|
-
return null;
|
|
1177
|
-
return {
|
|
1178
|
-
schemaVersion: exports2.PROJECT_ENVIRONMENT_SCHEMA_VERSION,
|
|
1179
|
-
catalogVersion: exports2.PROJECT_EXTENSION_CATALOG_VERSION,
|
|
1180
|
-
source: "project-build-profile",
|
|
1181
|
-
requirements: [...requirements].map(([id, evidence]) => ({ id, evidence }))
|
|
1182
|
-
};
|
|
1183
|
-
}
|
|
1184
|
-
function renderProjectEnvironmentManifest(project) {
|
|
1185
|
-
const manifest = buildProjectEnvironmentManifest(project);
|
|
1186
|
-
return manifest ? `${JSON.stringify(manifest, null, 2)}
|
|
1187
|
-
` : null;
|
|
1188
|
-
}
|
|
1189
|
-
function renderVsCodeExtensionRecommendations(project) {
|
|
1190
|
-
const manifest = buildProjectEnvironmentManifest(project);
|
|
1191
|
-
if (!manifest)
|
|
1192
|
-
return null;
|
|
1193
|
-
const requirements = new Set(manifest.requirements.map(({ id }) => id));
|
|
1194
|
-
const recommendations = exports2.PROJECT_EXTENSION_CATALOG.filter(({ requirementId, group }) => requirements.has(requirementId) && group === "editorSupport").map(({ extensionId }) => extensionId).filter((extensionId, index, values) => values.indexOf(extensionId) === index).sort();
|
|
1195
|
-
return recommendations.length > 0 ? `${JSON.stringify({ recommendations }, null, 2)}
|
|
1196
|
-
` : null;
|
|
1197
|
-
}
|
|
1198
|
-
function parseProjectEnvironmentManifest(contents) {
|
|
1199
|
-
try {
|
|
1200
|
-
const value = JSON.parse(contents);
|
|
1201
|
-
if (value.schemaVersion !== exports2.PROJECT_ENVIRONMENT_SCHEMA_VERSION || value.catalogVersion !== exports2.PROJECT_EXTENSION_CATALOG_VERSION || value.source !== "project-build-profile" || !Array.isArray(value.requirements))
|
|
1202
|
-
return null;
|
|
1203
|
-
const allowed = /* @__PURE__ */ new Set(["node", "python", "java", "dotnet", "terraform", "kubernetes", "containers"]);
|
|
1204
|
-
if (!value.requirements.every((item) => item && allowed.has(item.id) && typeof item.evidence === "string" && item.evidence.length <= 128))
|
|
1205
|
-
return null;
|
|
1206
|
-
return value;
|
|
1207
|
-
} catch {
|
|
1208
|
-
return null;
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
function requirementIdsForTechnology(value) {
|
|
1212
|
-
const normalized = value.trim().toLowerCase();
|
|
1213
|
-
const ids = [];
|
|
1214
|
-
if (/\b(node(?:\.js)?|typescript|javascript|react|next(?:\.js)?)\b/.test(normalized))
|
|
1215
|
-
ids.push("node");
|
|
1216
|
-
if (/\b(python|django|flask|fastapi)\b/.test(normalized))
|
|
1217
|
-
ids.push("python");
|
|
1218
|
-
if (/\b(java|spring|gradle)\b/.test(normalized))
|
|
1219
|
-
ids.push("java");
|
|
1220
|
-
if (/\b(\.net|dotnet|c#|asp\.net)\b/.test(normalized))
|
|
1221
|
-
ids.push("dotnet");
|
|
1222
|
-
if (/\bterraform\b/.test(normalized))
|
|
1223
|
-
ids.push("terraform");
|
|
1224
|
-
if (/\b(kubernetes|k8s|helm)\b/.test(normalized))
|
|
1225
|
-
ids.push("kubernetes");
|
|
1226
|
-
if (/\b(docker|container|compose)\b/.test(normalized))
|
|
1227
|
-
ids.push("containers");
|
|
1228
|
-
return ids;
|
|
1229
|
-
}
|
|
1230
|
-
function catalog(requirementId, extensionId, publisher, group, licence, activationCost, overlap, marketplaceUrl) {
|
|
1231
|
-
return { requirementId, extensionId, publisher, group, licence, activationCost, overlap, maintained: true, reviewedAt: "2026-09-01", marketplaceUrl };
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
});
|
|
1235
|
-
|
|
1236
|
-
// ../../packages/repo-seed/dist/templates/renderCopilotAgents.js
|
|
1237
|
-
var require_renderCopilotAgents = __commonJS({
|
|
1238
|
-
"../../packages/repo-seed/dist/templates/renderCopilotAgents.js"(exports2) {
|
|
1239
|
-
"use strict";
|
|
1240
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1241
|
-
exports2.renderPacketInstructionsFile = renderPacketInstructionsFile;
|
|
1242
|
-
exports2.renderImplementorAgentFile = renderImplementorAgentFile;
|
|
1243
|
-
exports2.renderCheckerAgentFile = renderCheckerAgentFile;
|
|
1244
|
-
exports2.renderReviewerAgentFile = renderReviewerAgentFile;
|
|
1245
|
-
var packet_workflow_1 = require_dist();
|
|
1246
|
-
function renderPacketInstructionsFile() {
|
|
1247
|
-
return [
|
|
1248
|
-
"---",
|
|
1249
|
-
'description: "Auto-applied SwarmCraft packet rules for planning packets under .swarmcraft/projects and related workflow guidance files"',
|
|
1250
|
-
'applyTo: ".swarmcraft/**/*.md"',
|
|
1251
|
-
"---",
|
|
1252
|
-
"",
|
|
1253
|
-
"# SwarmCraft Packet Instructions",
|
|
1254
|
-
"",
|
|
1255
|
-
"Use SwarmCraft packet files as the source of truth for scoped task work and status updates.",
|
|
1256
|
-
"",
|
|
1257
|
-
"## Packet Contract",
|
|
1258
|
-
"",
|
|
1259
|
-
"* Preserve packet identity and sync fields such as `projectId`, `taskId`, and `syncRevision` unless SwarmCraft itself rewrites them.",
|
|
1260
|
-
"* Edit packet frontmatter `lane` only when a SwarmCraft stage prompt or lane guidance explicitly tells you to request an adjacent workflow move.",
|
|
1261
|
-
`* Preserve the staged packet structure: ${packet_workflow_1.PACKET_SECTIONS.map((section) => `\`${section}\``).join(", ")}.`,
|
|
1262
|
-
"* Treat checklist text as board-owned scope; mark items complete only when the repo state actually supports it.",
|
|
1263
|
-
"* Reviewing checklist items require explicit human approval before they are marked complete; repository evidence can inform the question but cannot replace the human confirmation.",
|
|
1264
|
-
"* When all checklist items for the current lane are complete and no unresolved blocker or question remains, set packet frontmatter `lane` to the next adjacent workflow lane unless the reviewing-to-done transition is owned by the SwarmCraft extension.",
|
|
1265
|
-
"* Keep `## Notes` factual and implementation-specific. Use `### Implementation Notes`, `### Checking Feedback`, and `### Review Notes` for stage-specific packet comments.",
|
|
1266
|
-
"* Keep `## Agent Update` short and structured around what changed, what was validated, and what remains blocked or risky.",
|
|
1267
|
-
"",
|
|
1268
|
-
"## Workflow Expectations",
|
|
1269
|
-
"",
|
|
1270
|
-
"* Read `.swarmcraft/AGENTS.md`, `.swarmcraft/project.instructions.md`, and `.swarmcraft/project.context.md` before making substantive task changes when those files exist.",
|
|
1271
|
-
"* Use the lane-specific guidance in `.swarmcraft/agents/` for the current workflow stage.",
|
|
1272
|
-
"* Keep packet notes and agent update aligned with the actual code, validation status, and task state.",
|
|
1273
|
-
"* Prefer small, reviewable edits and the narrowest validation that can falsify the change.",
|
|
1274
|
-
"* If the packet and repo diverge, reconcile them explicitly instead of hiding the mismatch in chat only.",
|
|
1275
|
-
""
|
|
1276
|
-
].join("\n");
|
|
1277
|
-
}
|
|
1278
|
-
function renderImplementorAgentFile() {
|
|
1279
|
-
const stage = (0, packet_workflow_1.getSwarmCraftStageContract)("doing");
|
|
1280
|
-
return [
|
|
1281
|
-
"---",
|
|
1282
|
-
`name: "${stage.agentTitle}"`,
|
|
1283
|
-
`description: "${stage.agentDescription}"`,
|
|
1284
|
-
"tools: [read, edit, search, execute, todo]",
|
|
1285
|
-
`argument-hint: "${stage.agentArgumentHint}"`,
|
|
1286
|
-
"agents: []",
|
|
1287
|
-
"---",
|
|
1288
|
-
"",
|
|
1289
|
-
`# ${stage.agentTitle}`,
|
|
1290
|
-
"",
|
|
1291
|
-
stage.agentPurpose,
|
|
1292
|
-
"",
|
|
1293
|
-
"## Purpose",
|
|
1294
|
-
"",
|
|
1295
|
-
"* Execute the current packet without inventing extra scope.",
|
|
1296
|
-
"* Keep packet checklist progress, notes, and agent update consistent with the repo.",
|
|
1297
|
-
"* Stop at the smallest validated change that satisfies the task.",
|
|
1298
|
-
"",
|
|
1299
|
-
"## Required Context",
|
|
1300
|
-
"",
|
|
1301
|
-
"1. Read `AGENTS.md` and the nearest scoped `AGENTS.md` files for touched code.",
|
|
1302
|
-
"2. Read `.swarmcraft/AGENTS.md`, `.swarmcraft/project.instructions.md`, and `.swarmcraft/project.context.md` when present.",
|
|
1303
|
-
"3. Read the linked packet under `.swarmcraft/projects/` before editing code.",
|
|
1304
|
-
"4. Read `.swarmcraft/agents/doing.instructions.md` when present.",
|
|
1305
|
-
"",
|
|
1306
|
-
"## Constraints",
|
|
1307
|
-
"",
|
|
1308
|
-
"* Do not expand the scope beyond the packet unless the packet itself requires adjacent work.",
|
|
1309
|
-
"* Do not rewrite packet identity fields or staged checklist text.",
|
|
1310
|
-
"* Do not mark checklist items complete until code and validation actually support them.",
|
|
1311
|
-
"* Do not ask whether to update completed Doing checklist items or move to checking when the evidence is complete; update the packet directly.",
|
|
1312
|
-
"* Prefer the narrowest tests or checks that can falsify the change.",
|
|
1313
|
-
"",
|
|
1314
|
-
"## Workflow",
|
|
1315
|
-
"",
|
|
1316
|
-
...(0, packet_workflow_1.renderNumberedLines)(stage.agentWorkflow),
|
|
1317
|
-
"",
|
|
1318
|
-
"## Output Format",
|
|
1319
|
-
"",
|
|
1320
|
-
"Return:",
|
|
1321
|
-
"",
|
|
1322
|
-
...(0, packet_workflow_1.renderBullets)(stage.outputItems),
|
|
1323
|
-
""
|
|
1324
|
-
].join("\n");
|
|
1325
|
-
}
|
|
1326
|
-
function renderCheckerAgentFile() {
|
|
1327
|
-
const stage = (0, packet_workflow_1.getSwarmCraftStageContract)("checking");
|
|
1328
|
-
return [
|
|
1329
|
-
"---",
|
|
1330
|
-
`name: "${stage.agentTitle}"`,
|
|
1331
|
-
`description: "${stage.agentDescription}"`,
|
|
1332
|
-
"tools: [read, edit, search, execute, todo]",
|
|
1333
|
-
`argument-hint: "${stage.agentArgumentHint}"`,
|
|
1334
|
-
"agents: []",
|
|
1335
|
-
"---",
|
|
1336
|
-
"",
|
|
1337
|
-
`# ${stage.agentTitle}`,
|
|
1338
|
-
"",
|
|
1339
|
-
stage.agentPurpose,
|
|
1340
|
-
"",
|
|
1341
|
-
"## Purpose",
|
|
1342
|
-
"",
|
|
1343
|
-
"* Falsify the implementation with the narrowest meaningful validation.",
|
|
1344
|
-
"* Act as a machine judge: accept the work toward human review or reject it back to doing.",
|
|
1345
|
-
"* Confirm packet checklist progress and notes still match the repo.",
|
|
1346
|
-
"* Surface regressions, gaps, and incomplete acceptance criteria as packet feedback for the implementor.",
|
|
1347
|
-
"",
|
|
1348
|
-
"## Required Context",
|
|
1349
|
-
"",
|
|
1350
|
-
"1. Read `AGENTS.md` and the nearest scoped `AGENTS.md` files for any validated code.",
|
|
1351
|
-
"2. Read `.swarmcraft/AGENTS.md`, `.swarmcraft/project.instructions.md`, and `.swarmcraft/project.context.md` when present.",
|
|
1352
|
-
"3. Read the linked packet under `.swarmcraft/projects/` before validating.",
|
|
1353
|
-
"4. Read `.swarmcraft/agents/checking.instructions.md` when present.",
|
|
1354
|
-
"",
|
|
1355
|
-
"## Constraints",
|
|
1356
|
-
"",
|
|
1357
|
-
"* Do not repair implementation defects during checking unless the user explicitly asks.",
|
|
1358
|
-
"* Do not broaden validation scope unless the current check exposes a nearby defect.",
|
|
1359
|
-
"* Do not claim success without naming the concrete validation that passed.",
|
|
1360
|
-
"* Do not move unresolved risk out of the packet and into chat only.",
|
|
1361
|
-
"* Do not rewrite packet identity fields or staged checklist text.",
|
|
1362
|
-
"* Do not ask whether to update completed Checking checklist items or move to reviewing when the evidence is complete; update the packet directly.",
|
|
1363
|
-
"",
|
|
1364
|
-
"## Workflow",
|
|
1365
|
-
"",
|
|
1366
|
-
...(0, packet_workflow_1.renderNumberedLines)(stage.agentWorkflow),
|
|
1367
|
-
"",
|
|
1368
|
-
"## Output Format",
|
|
1369
|
-
"",
|
|
1370
|
-
"Return:",
|
|
1371
|
-
"",
|
|
1372
|
-
...(0, packet_workflow_1.renderBullets)(stage.outputItems),
|
|
1373
|
-
""
|
|
1374
|
-
].join("\n");
|
|
1375
|
-
}
|
|
1376
|
-
function renderReviewerAgentFile() {
|
|
1377
|
-
const stage = (0, packet_workflow_1.getSwarmCraftStageContract)("reviewing");
|
|
1378
|
-
return [
|
|
1379
|
-
"---",
|
|
1380
|
-
`name: "${stage.agentTitle}"`,
|
|
1381
|
-
`description: "${stage.agentDescription}"`,
|
|
1382
|
-
"tools: [read, edit, search, todo]",
|
|
1383
|
-
`argument-hint: "${stage.agentArgumentHint}"`,
|
|
1384
|
-
"agents: []",
|
|
1385
|
-
"---",
|
|
1386
|
-
"",
|
|
1387
|
-
`# ${stage.agentTitle}`,
|
|
1388
|
-
"",
|
|
1389
|
-
stage.agentPurpose,
|
|
1390
|
-
"",
|
|
1391
|
-
"## Purpose",
|
|
1392
|
-
"",
|
|
1393
|
-
"* Prompt the user for each Reviewing checklist decision.",
|
|
1394
|
-
"* Record the user's approval, rejection, uncertainty, and requested follow-up in the packet.",
|
|
1395
|
-
"* Call out risks, missing evidence, and follow-up work explicitly.",
|
|
1396
|
-
"",
|
|
1397
|
-
"## Required Context",
|
|
1398
|
-
"",
|
|
1399
|
-
"1. Read `AGENTS.md` and the nearest scoped `AGENTS.md` files for the touched surface.",
|
|
1400
|
-
"2. Read `.swarmcraft/AGENTS.md`, `.swarmcraft/project.instructions.md`, and `.swarmcraft/project.context.md` when present.",
|
|
1401
|
-
"3. Read the linked packet under `.swarmcraft/projects/` before editing the handoff.",
|
|
1402
|
-
"4. Read `.swarmcraft/agents/reviewing.instructions.md` when present.",
|
|
1403
|
-
"",
|
|
1404
|
-
"## Constraints",
|
|
1405
|
-
"",
|
|
1406
|
-
"* Do not hide unfinished work behind optimistic summaries.",
|
|
1407
|
-
"* Do not rewrite the packet into a changelog; keep it concise and review-oriented.",
|
|
1408
|
-
"* Do not claim review readiness if risks or validation gaps remain unresolved.",
|
|
1409
|
-
"* Do not mark Reviewing checklist items complete from repository evidence alone; every checked item requires explicit human approval in the current review interaction.",
|
|
1410
|
-
"* Do not act as the checking agent. Avoid fresh validation unless the user asks for it; use existing evidence only to help the user decide.",
|
|
1411
|
-
"* Do not set packet frontmatter `lane: done`; the SwarmCraft extension owns the final done transition.",
|
|
1412
|
-
"* Do not rewrite packet identity fields or staged checklist text.",
|
|
1413
|
-
"",
|
|
1414
|
-
"## Workflow",
|
|
1415
|
-
"",
|
|
1416
|
-
...(0, packet_workflow_1.renderNumberedLines)(stage.agentWorkflow),
|
|
1417
|
-
"",
|
|
1418
|
-
"## Output Format",
|
|
1419
|
-
"",
|
|
1420
|
-
"Return:",
|
|
1421
|
-
"",
|
|
1422
|
-
...(0, packet_workflow_1.renderBullets)(stage.outputItems),
|
|
1423
|
-
""
|
|
1424
|
-
].join("\n");
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
});
|
|
1428
|
-
|
|
1429
|
-
// ../../packages/repo-seed/dist/templates/renderCodexAgents.js
|
|
1430
|
-
var require_renderCodexAgents = __commonJS({
|
|
1431
|
-
"../../packages/repo-seed/dist/templates/renderCodexAgents.js"(exports2) {
|
|
1432
|
-
"use strict";
|
|
1433
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1434
|
-
exports2.renderCodexImplementorAgentFile = renderCodexImplementorAgentFile;
|
|
1435
|
-
exports2.renderCodexCheckerAgentFile = renderCodexCheckerAgentFile;
|
|
1436
|
-
exports2.renderCodexReviewerAgentFile = renderCodexReviewerAgentFile;
|
|
1437
|
-
exports2.renderCodexConfigExampleFile = renderCodexConfigExampleFile;
|
|
1438
|
-
var packet_workflow_1 = require_dist();
|
|
1439
|
-
function renderCodexImplementorAgentFile() {
|
|
1440
|
-
return renderCodexStageAgentFile("doing", "swarmcraft-implementor", "medium");
|
|
1441
|
-
}
|
|
1442
|
-
function renderCodexCheckerAgentFile() {
|
|
1443
|
-
return renderCodexStageAgentFile("checking", "swarmcraft-checker", "medium");
|
|
1444
|
-
}
|
|
1445
|
-
function renderCodexReviewerAgentFile() {
|
|
1446
|
-
return renderCodexStageAgentFile("reviewing", "swarmcraft-reviewer", "low");
|
|
1447
|
-
}
|
|
1448
|
-
function renderCodexConfigExampleFile() {
|
|
1449
|
-
return [
|
|
1450
|
-
"# Example project-scoped Codex config for a SwarmCraft-seeded repository.",
|
|
1451
|
-
"#",
|
|
1452
|
-
"# This file documents optional local setup. It is not loaded automatically.",
|
|
1453
|
-
"# To use it, copy the relevant sections into `.codex/config.toml` or your",
|
|
1454
|
-
"# personal `~/.codex/config.toml`, then adjust local paths and environment variables.",
|
|
1455
|
-
"#",
|
|
1456
|
-
"# Do not commit `.codex/config.toml` if it contains local paths, credentials,",
|
|
1457
|
-
"# tokens, private keys, or machine-specific settings.",
|
|
1458
|
-
"",
|
|
1459
|
-
"# Keep subagent fan-out modest. SwarmCraft's default workflow is one task",
|
|
1460
|
-
"# stage at a time: do, check, then review.",
|
|
1461
|
-
"[agents]",
|
|
1462
|
-
"max_threads = 3",
|
|
1463
|
-
"max_depth = 1",
|
|
1464
|
-
"",
|
|
1465
|
-
"# Optional first MCP server for OpenAI or Codex documentation questions.",
|
|
1466
|
-
"# Tool posture: read-only documentation lookup.",
|
|
1467
|
-
"# Secret handling: no secret required.",
|
|
1468
|
-
"#",
|
|
1469
|
-
"# [mcp_servers.openaiDeveloperDocs]",
|
|
1470
|
-
'# url = "https://developers.openai.com/mcp"',
|
|
1471
|
-
"# enabled = true",
|
|
1472
|
-
'# default_tools_approval_mode = "auto"',
|
|
1473
|
-
"",
|
|
1474
|
-
"# Optional browser automation for local UI verification.",
|
|
1475
|
-
"# Tool posture: can open pages, inspect browser state, and drive browser actions.",
|
|
1476
|
-
"# Approval posture: prompt by default because browser tools can interact with",
|
|
1477
|
-
"# local apps and external pages.",
|
|
1478
|
-
"#",
|
|
1479
|
-
"# [mcp_servers.playwright]",
|
|
1480
|
-
'# command = "npx"',
|
|
1481
|
-
'# args = ["-y", "@playwright/mcp"]',
|
|
1482
|
-
"# enabled = true",
|
|
1483
|
-
'# default_tools_approval_mode = "prompt"',
|
|
1484
|
-
"# tool_timeout_sec = 120",
|
|
1485
|
-
""
|
|
1486
|
-
].join("\n");
|
|
1487
|
-
}
|
|
1488
|
-
function renderCodexStageAgentFile(stageKey, name, reasoningEffort) {
|
|
1489
|
-
const stage = (0, packet_workflow_1.getSwarmCraftStageContract)(stageKey);
|
|
1490
|
-
const instructions = [
|
|
1491
|
-
`You are the ${stage.agentTitle}.`,
|
|
1492
|
-
"",
|
|
1493
|
-
stage.agentPurpose,
|
|
1494
|
-
"",
|
|
1495
|
-
"Follow this workflow:",
|
|
1496
|
-
...(0, packet_workflow_1.renderNumberedLines)([
|
|
1497
|
-
"Read `AGENTS.md` and the nearest scoped `AGENTS.md` files for touched code.",
|
|
1498
|
-
"Read `.swarmcraft/AGENTS.md`, `.swarmcraft/project.instructions.md`, and `.swarmcraft/project.context.md` when present.",
|
|
1499
|
-
"Read the linked packet under `.swarmcraft/projects/` before changing files.",
|
|
1500
|
-
`Read \`.swarmcraft/agents/${stage.key}.instructions.md\` when present.`,
|
|
1501
|
-
...stage.agentWorkflow
|
|
1502
|
-
]),
|
|
1503
|
-
"",
|
|
1504
|
-
"Output expectations:",
|
|
1505
|
-
...stage.outputItems.map((item) => `- ${item}`),
|
|
1506
|
-
"",
|
|
1507
|
-
"Stage completion rule:",
|
|
1508
|
-
stage.completionRule,
|
|
1509
|
-
"",
|
|
1510
|
-
"Do not rewrite packet identity fields, board-owned checklist text, unrelated local changes, or workflow history."
|
|
1511
|
-
].join("\n");
|
|
1512
|
-
return [
|
|
1513
|
-
`name = "${name}"`,
|
|
1514
|
-
`description = "${escapeTomlString(stage.agentDescription)}"`,
|
|
1515
|
-
`model_reasoning_effort = "${reasoningEffort}"`,
|
|
1516
|
-
"",
|
|
1517
|
-
'developer_instructions = """',
|
|
1518
|
-
instructions,
|
|
1519
|
-
'"""',
|
|
1520
|
-
""
|
|
1521
|
-
].join("\n");
|
|
1522
|
-
}
|
|
1523
|
-
function escapeTomlString(value) {
|
|
1524
|
-
return value.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
});
|
|
1528
|
-
|
|
1529
1176
|
// ../../packages/repo-seed/dist/templates/renderAssistantActionSkills.js
|
|
1530
1177
|
var require_renderAssistantActionSkills = __commonJS({
|
|
1531
1178
|
"../../packages/repo-seed/dist/templates/renderAssistantActionSkills.js"(exports2) {
|
|
@@ -1965,6 +1612,406 @@ var require_renderAssistantActionSkills = __commonJS({
|
|
|
1965
1612
|
}
|
|
1966
1613
|
});
|
|
1967
1614
|
|
|
1615
|
+
// ../../packages/repo-seed/dist/templates/renderClaudeGuidance.js
|
|
1616
|
+
var require_renderClaudeGuidance = __commonJS({
|
|
1617
|
+
"../../packages/repo-seed/dist/templates/renderClaudeGuidance.js"(exports2) {
|
|
1618
|
+
"use strict";
|
|
1619
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1620
|
+
exports2.renderClaudeGuidance = renderClaudeGuidance;
|
|
1621
|
+
function renderClaudeGuidance() {
|
|
1622
|
+
return "# SwarmCraft\n\nFollow AGENTS.md and the nearest scoped AGENTS.md for the files you work on.\nUse the SwarmCraft skills under .claude/skills/ for the requested workflow.\nPreserve existing review, authority, and packet transition rules.\n";
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
});
|
|
1626
|
+
|
|
1627
|
+
// ../../packages/repo-seed/dist/projectEnvironmentContract.js
|
|
1628
|
+
var require_projectEnvironmentContract = __commonJS({
|
|
1629
|
+
"../../packages/repo-seed/dist/projectEnvironmentContract.js"(exports2) {
|
|
1630
|
+
"use strict";
|
|
1631
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1632
|
+
exports2.PROJECT_EXTENSION_CATALOG = exports2.PROJECT_EXTENSION_CATALOG_VERSION = exports2.PROJECT_ENVIRONMENT_SCHEMA_VERSION = exports2.VSCODE_EXTENSIONS_PATH = exports2.PROJECT_ENVIRONMENT_PATH = void 0;
|
|
1633
|
+
exports2.buildProjectEnvironmentManifest = buildProjectEnvironmentManifest;
|
|
1634
|
+
exports2.renderProjectEnvironmentManifest = renderProjectEnvironmentManifest;
|
|
1635
|
+
exports2.renderVsCodeExtensionRecommendations = renderVsCodeExtensionRecommendations;
|
|
1636
|
+
exports2.parseProjectEnvironmentManifest = parseProjectEnvironmentManifest;
|
|
1637
|
+
exports2.PROJECT_ENVIRONMENT_PATH = ".swarmcraft/environment.json";
|
|
1638
|
+
exports2.VSCODE_EXTENSIONS_PATH = ".vscode/extensions.json";
|
|
1639
|
+
exports2.PROJECT_ENVIRONMENT_SCHEMA_VERSION = 1;
|
|
1640
|
+
exports2.PROJECT_EXTENSION_CATALOG_VERSION = 1;
|
|
1641
|
+
exports2.PROJECT_EXTENSION_CATALOG = [
|
|
1642
|
+
catalog("python", "ms-python.python", "Microsoft", "editorSupport", "Microsoft Marketplace terms / open-source components", "medium", "Includes its normal Python language dependencies.", "https://marketplace.visualstudio.com/items?itemName=ms-python.python"),
|
|
1643
|
+
catalog("java", "vscjava.vscode-java-pack", "Microsoft", "editorSupport", "MIT", "high", "Pack already includes Java language, debug, test, Maven, and Gradle tools.", "https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack"),
|
|
1644
|
+
catalog("dotnet", "ms-dotnettools.csharp", "Microsoft", "editorSupport", "Microsoft extension terms; source MIT", "medium", "C# Dev Kit is deliberately not required and has a different organisational licence.", "https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp"),
|
|
1645
|
+
catalog("terraform", "HashiCorp.terraform", "HashiCorp", "editorSupport", "MPL-2.0 components / Marketplace terms", "medium", "Bundles terraform-ls; the Terraform CLI remains a separate runtime.", "https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform"),
|
|
1646
|
+
catalog("kubernetes", "redhat.vscode-yaml", "Red Hat", "editorSupport", "MIT", "low", "Provides YAML and Kubernetes schema support without cluster tooling.", "https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml"),
|
|
1647
|
+
catalog("kubernetes", "ms-kubernetes-tools.vscode-kubernetes-tools", "Microsoft", "optionalConvenience", "MIT", "high", "Overlaps YAML support and activates cluster/Helm/kubectl features only when chosen.", "https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools"),
|
|
1648
|
+
catalog("containers", "ms-azuretools.vscode-containers", "Microsoft", "editorSupport", "MIT", "medium", "Replaces the legacy Docker extension's container management and Compose editing surface.", "https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-containers")
|
|
1649
|
+
];
|
|
1650
|
+
function buildProjectEnvironmentManifest(project) {
|
|
1651
|
+
const context = project.repoSeed?.projectContext;
|
|
1652
|
+
if (!context || context.technologyPreference !== "PREFERRED")
|
|
1653
|
+
return null;
|
|
1654
|
+
const requirements = /* @__PURE__ */ new Map();
|
|
1655
|
+
for (const technology of context.preferredTechnologies) {
|
|
1656
|
+
for (const id of requirementIdsForTechnology(technology)) {
|
|
1657
|
+
if (!requirements.has(id))
|
|
1658
|
+
requirements.set(id, technology);
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
if (requirements.size === 0)
|
|
1662
|
+
return null;
|
|
1663
|
+
return {
|
|
1664
|
+
schemaVersion: exports2.PROJECT_ENVIRONMENT_SCHEMA_VERSION,
|
|
1665
|
+
catalogVersion: exports2.PROJECT_EXTENSION_CATALOG_VERSION,
|
|
1666
|
+
source: "project-build-profile",
|
|
1667
|
+
requirements: [...requirements].map(([id, evidence]) => ({ id, evidence }))
|
|
1668
|
+
};
|
|
1669
|
+
}
|
|
1670
|
+
function renderProjectEnvironmentManifest(project) {
|
|
1671
|
+
const manifest = buildProjectEnvironmentManifest(project);
|
|
1672
|
+
return manifest ? `${JSON.stringify(manifest, null, 2)}
|
|
1673
|
+
` : null;
|
|
1674
|
+
}
|
|
1675
|
+
function renderVsCodeExtensionRecommendations(project) {
|
|
1676
|
+
const manifest = buildProjectEnvironmentManifest(project);
|
|
1677
|
+
if (!manifest)
|
|
1678
|
+
return null;
|
|
1679
|
+
const requirements = new Set(manifest.requirements.map(({ id }) => id));
|
|
1680
|
+
const recommendations = exports2.PROJECT_EXTENSION_CATALOG.filter(({ requirementId, group }) => requirements.has(requirementId) && group === "editorSupport").map(({ extensionId }) => extensionId).filter((extensionId, index, values) => values.indexOf(extensionId) === index).sort();
|
|
1681
|
+
return recommendations.length > 0 ? `${JSON.stringify({ recommendations }, null, 2)}
|
|
1682
|
+
` : null;
|
|
1683
|
+
}
|
|
1684
|
+
function parseProjectEnvironmentManifest(contents) {
|
|
1685
|
+
try {
|
|
1686
|
+
const value = JSON.parse(contents);
|
|
1687
|
+
if (value.schemaVersion !== exports2.PROJECT_ENVIRONMENT_SCHEMA_VERSION || value.catalogVersion !== exports2.PROJECT_EXTENSION_CATALOG_VERSION || value.source !== "project-build-profile" || !Array.isArray(value.requirements))
|
|
1688
|
+
return null;
|
|
1689
|
+
const allowed = /* @__PURE__ */ new Set(["node", "python", "java", "dotnet", "terraform", "kubernetes", "containers"]);
|
|
1690
|
+
if (!value.requirements.every((item) => item && allowed.has(item.id) && typeof item.evidence === "string" && item.evidence.length <= 128))
|
|
1691
|
+
return null;
|
|
1692
|
+
return value;
|
|
1693
|
+
} catch {
|
|
1694
|
+
return null;
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
function requirementIdsForTechnology(value) {
|
|
1698
|
+
const normalized = value.trim().toLowerCase();
|
|
1699
|
+
const ids = [];
|
|
1700
|
+
if (/\b(node(?:\.js)?|typescript|javascript|react|next(?:\.js)?)\b/.test(normalized))
|
|
1701
|
+
ids.push("node");
|
|
1702
|
+
if (/\b(python|django|flask|fastapi)\b/.test(normalized))
|
|
1703
|
+
ids.push("python");
|
|
1704
|
+
if (/\b(java|spring|gradle)\b/.test(normalized))
|
|
1705
|
+
ids.push("java");
|
|
1706
|
+
if (/\b(\.net|dotnet|c#|asp\.net)\b/.test(normalized))
|
|
1707
|
+
ids.push("dotnet");
|
|
1708
|
+
if (/\bterraform\b/.test(normalized))
|
|
1709
|
+
ids.push("terraform");
|
|
1710
|
+
if (/\b(kubernetes|k8s|helm)\b/.test(normalized))
|
|
1711
|
+
ids.push("kubernetes");
|
|
1712
|
+
if (/\b(docker|container|compose)\b/.test(normalized))
|
|
1713
|
+
ids.push("containers");
|
|
1714
|
+
return ids;
|
|
1715
|
+
}
|
|
1716
|
+
function catalog(requirementId, extensionId, publisher, group, licence, activationCost, overlap, marketplaceUrl) {
|
|
1717
|
+
return { requirementId, extensionId, publisher, group, licence, activationCost, overlap, maintained: true, reviewedAt: "2026-09-01", marketplaceUrl };
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
});
|
|
1721
|
+
|
|
1722
|
+
// ../../packages/repo-seed/dist/templates/renderCopilotAgents.js
|
|
1723
|
+
var require_renderCopilotAgents = __commonJS({
|
|
1724
|
+
"../../packages/repo-seed/dist/templates/renderCopilotAgents.js"(exports2) {
|
|
1725
|
+
"use strict";
|
|
1726
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1727
|
+
exports2.renderPacketInstructionsFile = renderPacketInstructionsFile;
|
|
1728
|
+
exports2.renderImplementorAgentFile = renderImplementorAgentFile;
|
|
1729
|
+
exports2.renderCheckerAgentFile = renderCheckerAgentFile;
|
|
1730
|
+
exports2.renderReviewerAgentFile = renderReviewerAgentFile;
|
|
1731
|
+
var packet_workflow_1 = require_dist();
|
|
1732
|
+
function renderPacketInstructionsFile() {
|
|
1733
|
+
return [
|
|
1734
|
+
"---",
|
|
1735
|
+
'description: "Auto-applied SwarmCraft packet rules for planning packets under .swarmcraft/projects and related workflow guidance files"',
|
|
1736
|
+
'applyTo: ".swarmcraft/**/*.md"',
|
|
1737
|
+
"---",
|
|
1738
|
+
"",
|
|
1739
|
+
"# SwarmCraft Packet Instructions",
|
|
1740
|
+
"",
|
|
1741
|
+
"Use SwarmCraft packet files as the source of truth for scoped task work and status updates.",
|
|
1742
|
+
"",
|
|
1743
|
+
"## Packet Contract",
|
|
1744
|
+
"",
|
|
1745
|
+
"* Preserve packet identity and sync fields such as `projectId`, `taskId`, and `syncRevision` unless SwarmCraft itself rewrites them.",
|
|
1746
|
+
"* Edit packet frontmatter `lane` only when a SwarmCraft stage prompt or lane guidance explicitly tells you to request an adjacent workflow move.",
|
|
1747
|
+
`* Preserve the staged packet structure: ${packet_workflow_1.PACKET_SECTIONS.map((section) => `\`${section}\``).join(", ")}.`,
|
|
1748
|
+
"* Treat checklist text as board-owned scope; mark items complete only when the repo state actually supports it.",
|
|
1749
|
+
"* Reviewing checklist items require explicit human approval before they are marked complete; repository evidence can inform the question but cannot replace the human confirmation.",
|
|
1750
|
+
"* When all checklist items for the current lane are complete and no unresolved blocker or question remains, set packet frontmatter `lane` to the next adjacent workflow lane unless the reviewing-to-done transition is owned by the SwarmCraft extension.",
|
|
1751
|
+
"* Keep `## Notes` factual and implementation-specific. Use `### Implementation Notes`, `### Checking Feedback`, and `### Review Notes` for stage-specific packet comments.",
|
|
1752
|
+
"* Keep `## Agent Update` short and structured around what changed, what was validated, and what remains blocked or risky.",
|
|
1753
|
+
"",
|
|
1754
|
+
"## Workflow Expectations",
|
|
1755
|
+
"",
|
|
1756
|
+
"* Read `.swarmcraft/AGENTS.md`, `.swarmcraft/project.instructions.md`, and `.swarmcraft/project.context.md` before making substantive task changes when those files exist.",
|
|
1757
|
+
"* Use the lane-specific guidance in `.swarmcraft/agents/` for the current workflow stage.",
|
|
1758
|
+
"* Keep packet notes and agent update aligned with the actual code, validation status, and task state.",
|
|
1759
|
+
"* Prefer small, reviewable edits and the narrowest validation that can falsify the change.",
|
|
1760
|
+
"* If the packet and repo diverge, reconcile them explicitly instead of hiding the mismatch in chat only.",
|
|
1761
|
+
""
|
|
1762
|
+
].join("\n");
|
|
1763
|
+
}
|
|
1764
|
+
function renderImplementorAgentFile() {
|
|
1765
|
+
const stage = (0, packet_workflow_1.getSwarmCraftStageContract)("doing");
|
|
1766
|
+
return [
|
|
1767
|
+
"---",
|
|
1768
|
+
`name: "${stage.agentTitle}"`,
|
|
1769
|
+
`description: "${stage.agentDescription}"`,
|
|
1770
|
+
"tools: [read, edit, search, execute, todo]",
|
|
1771
|
+
`argument-hint: "${stage.agentArgumentHint}"`,
|
|
1772
|
+
"agents: []",
|
|
1773
|
+
"---",
|
|
1774
|
+
"",
|
|
1775
|
+
`# ${stage.agentTitle}`,
|
|
1776
|
+
"",
|
|
1777
|
+
stage.agentPurpose,
|
|
1778
|
+
"",
|
|
1779
|
+
"## Purpose",
|
|
1780
|
+
"",
|
|
1781
|
+
"* Execute the current packet without inventing extra scope.",
|
|
1782
|
+
"* Keep packet checklist progress, notes, and agent update consistent with the repo.",
|
|
1783
|
+
"* Stop at the smallest validated change that satisfies the task.",
|
|
1784
|
+
"",
|
|
1785
|
+
"## Required Context",
|
|
1786
|
+
"",
|
|
1787
|
+
"1. Read `AGENTS.md` and the nearest scoped `AGENTS.md` files for touched code.",
|
|
1788
|
+
"2. Read `.swarmcraft/AGENTS.md`, `.swarmcraft/project.instructions.md`, and `.swarmcraft/project.context.md` when present.",
|
|
1789
|
+
"3. Read the linked packet under `.swarmcraft/projects/` before editing code.",
|
|
1790
|
+
"4. Read `.swarmcraft/agents/doing.instructions.md` when present.",
|
|
1791
|
+
"",
|
|
1792
|
+
"## Constraints",
|
|
1793
|
+
"",
|
|
1794
|
+
"* Do not expand the scope beyond the packet unless the packet itself requires adjacent work.",
|
|
1795
|
+
"* Do not rewrite packet identity fields or staged checklist text.",
|
|
1796
|
+
"* Do not mark checklist items complete until code and validation actually support them.",
|
|
1797
|
+
"* Do not ask whether to update completed Doing checklist items or move to checking when the evidence is complete; update the packet directly.",
|
|
1798
|
+
"* Prefer the narrowest tests or checks that can falsify the change.",
|
|
1799
|
+
"",
|
|
1800
|
+
"## Workflow",
|
|
1801
|
+
"",
|
|
1802
|
+
...(0, packet_workflow_1.renderNumberedLines)(stage.agentWorkflow),
|
|
1803
|
+
"",
|
|
1804
|
+
"## Output Format",
|
|
1805
|
+
"",
|
|
1806
|
+
"Return:",
|
|
1807
|
+
"",
|
|
1808
|
+
...(0, packet_workflow_1.renderBullets)(stage.outputItems),
|
|
1809
|
+
""
|
|
1810
|
+
].join("\n");
|
|
1811
|
+
}
|
|
1812
|
+
function renderCheckerAgentFile() {
|
|
1813
|
+
const stage = (0, packet_workflow_1.getSwarmCraftStageContract)("checking");
|
|
1814
|
+
return [
|
|
1815
|
+
"---",
|
|
1816
|
+
`name: "${stage.agentTitle}"`,
|
|
1817
|
+
`description: "${stage.agentDescription}"`,
|
|
1818
|
+
"tools: [read, edit, search, execute, todo]",
|
|
1819
|
+
`argument-hint: "${stage.agentArgumentHint}"`,
|
|
1820
|
+
"agents: []",
|
|
1821
|
+
"---",
|
|
1822
|
+
"",
|
|
1823
|
+
`# ${stage.agentTitle}`,
|
|
1824
|
+
"",
|
|
1825
|
+
stage.agentPurpose,
|
|
1826
|
+
"",
|
|
1827
|
+
"## Purpose",
|
|
1828
|
+
"",
|
|
1829
|
+
"* Falsify the implementation with the narrowest meaningful validation.",
|
|
1830
|
+
"* Act as a machine judge: accept the work toward human review or reject it back to doing.",
|
|
1831
|
+
"* Confirm packet checklist progress and notes still match the repo.",
|
|
1832
|
+
"* Surface regressions, gaps, and incomplete acceptance criteria as packet feedback for the implementor.",
|
|
1833
|
+
"",
|
|
1834
|
+
"## Required Context",
|
|
1835
|
+
"",
|
|
1836
|
+
"1. Read `AGENTS.md` and the nearest scoped `AGENTS.md` files for any validated code.",
|
|
1837
|
+
"2. Read `.swarmcraft/AGENTS.md`, `.swarmcraft/project.instructions.md`, and `.swarmcraft/project.context.md` when present.",
|
|
1838
|
+
"3. Read the linked packet under `.swarmcraft/projects/` before validating.",
|
|
1839
|
+
"4. Read `.swarmcraft/agents/checking.instructions.md` when present.",
|
|
1840
|
+
"",
|
|
1841
|
+
"## Constraints",
|
|
1842
|
+
"",
|
|
1843
|
+
"* Do not repair implementation defects during checking unless the user explicitly asks.",
|
|
1844
|
+
"* Do not broaden validation scope unless the current check exposes a nearby defect.",
|
|
1845
|
+
"* Do not claim success without naming the concrete validation that passed.",
|
|
1846
|
+
"* Do not move unresolved risk out of the packet and into chat only.",
|
|
1847
|
+
"* Do not rewrite packet identity fields or staged checklist text.",
|
|
1848
|
+
"* Do not ask whether to update completed Checking checklist items or move to reviewing when the evidence is complete; update the packet directly.",
|
|
1849
|
+
"",
|
|
1850
|
+
"## Workflow",
|
|
1851
|
+
"",
|
|
1852
|
+
...(0, packet_workflow_1.renderNumberedLines)(stage.agentWorkflow),
|
|
1853
|
+
"",
|
|
1854
|
+
"## Output Format",
|
|
1855
|
+
"",
|
|
1856
|
+
"Return:",
|
|
1857
|
+
"",
|
|
1858
|
+
...(0, packet_workflow_1.renderBullets)(stage.outputItems),
|
|
1859
|
+
""
|
|
1860
|
+
].join("\n");
|
|
1861
|
+
}
|
|
1862
|
+
function renderReviewerAgentFile() {
|
|
1863
|
+
const stage = (0, packet_workflow_1.getSwarmCraftStageContract)("reviewing");
|
|
1864
|
+
return [
|
|
1865
|
+
"---",
|
|
1866
|
+
`name: "${stage.agentTitle}"`,
|
|
1867
|
+
`description: "${stage.agentDescription}"`,
|
|
1868
|
+
"tools: [read, edit, search, todo]",
|
|
1869
|
+
`argument-hint: "${stage.agentArgumentHint}"`,
|
|
1870
|
+
"agents: []",
|
|
1871
|
+
"---",
|
|
1872
|
+
"",
|
|
1873
|
+
`# ${stage.agentTitle}`,
|
|
1874
|
+
"",
|
|
1875
|
+
stage.agentPurpose,
|
|
1876
|
+
"",
|
|
1877
|
+
"## Purpose",
|
|
1878
|
+
"",
|
|
1879
|
+
"* Prompt the user for each Reviewing checklist decision.",
|
|
1880
|
+
"* Record the user's approval, rejection, uncertainty, and requested follow-up in the packet.",
|
|
1881
|
+
"* Call out risks, missing evidence, and follow-up work explicitly.",
|
|
1882
|
+
"",
|
|
1883
|
+
"## Required Context",
|
|
1884
|
+
"",
|
|
1885
|
+
"1. Read `AGENTS.md` and the nearest scoped `AGENTS.md` files for the touched surface.",
|
|
1886
|
+
"2. Read `.swarmcraft/AGENTS.md`, `.swarmcraft/project.instructions.md`, and `.swarmcraft/project.context.md` when present.",
|
|
1887
|
+
"3. Read the linked packet under `.swarmcraft/projects/` before editing the handoff.",
|
|
1888
|
+
"4. Read `.swarmcraft/agents/reviewing.instructions.md` when present.",
|
|
1889
|
+
"",
|
|
1890
|
+
"## Constraints",
|
|
1891
|
+
"",
|
|
1892
|
+
"* Do not hide unfinished work behind optimistic summaries.",
|
|
1893
|
+
"* Do not rewrite the packet into a changelog; keep it concise and review-oriented.",
|
|
1894
|
+
"* Do not claim review readiness if risks or validation gaps remain unresolved.",
|
|
1895
|
+
"* Do not mark Reviewing checklist items complete from repository evidence alone; every checked item requires explicit human approval in the current review interaction.",
|
|
1896
|
+
"* Do not act as the checking agent. Avoid fresh validation unless the user asks for it; use existing evidence only to help the user decide.",
|
|
1897
|
+
"* Do not set packet frontmatter `lane: done`; the SwarmCraft extension owns the final done transition.",
|
|
1898
|
+
"* Do not rewrite packet identity fields or staged checklist text.",
|
|
1899
|
+
"",
|
|
1900
|
+
"## Workflow",
|
|
1901
|
+
"",
|
|
1902
|
+
...(0, packet_workflow_1.renderNumberedLines)(stage.agentWorkflow),
|
|
1903
|
+
"",
|
|
1904
|
+
"## Output Format",
|
|
1905
|
+
"",
|
|
1906
|
+
"Return:",
|
|
1907
|
+
"",
|
|
1908
|
+
...(0, packet_workflow_1.renderBullets)(stage.outputItems),
|
|
1909
|
+
""
|
|
1910
|
+
].join("\n");
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
});
|
|
1914
|
+
|
|
1915
|
+
// ../../packages/repo-seed/dist/templates/renderCodexAgents.js
|
|
1916
|
+
var require_renderCodexAgents = __commonJS({
|
|
1917
|
+
"../../packages/repo-seed/dist/templates/renderCodexAgents.js"(exports2) {
|
|
1918
|
+
"use strict";
|
|
1919
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1920
|
+
exports2.renderCodexImplementorAgentFile = renderCodexImplementorAgentFile;
|
|
1921
|
+
exports2.renderCodexCheckerAgentFile = renderCodexCheckerAgentFile;
|
|
1922
|
+
exports2.renderCodexReviewerAgentFile = renderCodexReviewerAgentFile;
|
|
1923
|
+
exports2.renderCodexConfigExampleFile = renderCodexConfigExampleFile;
|
|
1924
|
+
var packet_workflow_1 = require_dist();
|
|
1925
|
+
function renderCodexImplementorAgentFile() {
|
|
1926
|
+
return renderCodexStageAgentFile("doing", "swarmcraft-implementor", "medium");
|
|
1927
|
+
}
|
|
1928
|
+
function renderCodexCheckerAgentFile() {
|
|
1929
|
+
return renderCodexStageAgentFile("checking", "swarmcraft-checker", "medium");
|
|
1930
|
+
}
|
|
1931
|
+
function renderCodexReviewerAgentFile() {
|
|
1932
|
+
return renderCodexStageAgentFile("reviewing", "swarmcraft-reviewer", "low");
|
|
1933
|
+
}
|
|
1934
|
+
function renderCodexConfigExampleFile() {
|
|
1935
|
+
return [
|
|
1936
|
+
"# Example project-scoped Codex config for a SwarmCraft-seeded repository.",
|
|
1937
|
+
"#",
|
|
1938
|
+
"# This file documents optional local setup. It is not loaded automatically.",
|
|
1939
|
+
"# To use it, copy the relevant sections into `.codex/config.toml` or your",
|
|
1940
|
+
"# personal `~/.codex/config.toml`, then adjust local paths and environment variables.",
|
|
1941
|
+
"#",
|
|
1942
|
+
"# Do not commit `.codex/config.toml` if it contains local paths, credentials,",
|
|
1943
|
+
"# tokens, private keys, or machine-specific settings.",
|
|
1944
|
+
"",
|
|
1945
|
+
"# Keep subagent fan-out modest. SwarmCraft's default workflow is one task",
|
|
1946
|
+
"# stage at a time: do, check, then review.",
|
|
1947
|
+
"[agents]",
|
|
1948
|
+
"max_threads = 3",
|
|
1949
|
+
"max_depth = 1",
|
|
1950
|
+
"",
|
|
1951
|
+
"# Optional first MCP server for OpenAI or Codex documentation questions.",
|
|
1952
|
+
"# Tool posture: read-only documentation lookup.",
|
|
1953
|
+
"# Secret handling: no secret required.",
|
|
1954
|
+
"#",
|
|
1955
|
+
"# [mcp_servers.openaiDeveloperDocs]",
|
|
1956
|
+
'# url = "https://developers.openai.com/mcp"',
|
|
1957
|
+
"# enabled = true",
|
|
1958
|
+
'# default_tools_approval_mode = "auto"',
|
|
1959
|
+
"",
|
|
1960
|
+
"# Optional browser automation for local UI verification.",
|
|
1961
|
+
"# Tool posture: can open pages, inspect browser state, and drive browser actions.",
|
|
1962
|
+
"# Approval posture: prompt by default because browser tools can interact with",
|
|
1963
|
+
"# local apps and external pages.",
|
|
1964
|
+
"#",
|
|
1965
|
+
"# [mcp_servers.playwright]",
|
|
1966
|
+
'# command = "npx"',
|
|
1967
|
+
'# args = ["-y", "@playwright/mcp"]',
|
|
1968
|
+
"# enabled = true",
|
|
1969
|
+
'# default_tools_approval_mode = "prompt"',
|
|
1970
|
+
"# tool_timeout_sec = 120",
|
|
1971
|
+
""
|
|
1972
|
+
].join("\n");
|
|
1973
|
+
}
|
|
1974
|
+
function renderCodexStageAgentFile(stageKey, name, reasoningEffort) {
|
|
1975
|
+
const stage = (0, packet_workflow_1.getSwarmCraftStageContract)(stageKey);
|
|
1976
|
+
const instructions = [
|
|
1977
|
+
`You are the ${stage.agentTitle}.`,
|
|
1978
|
+
"",
|
|
1979
|
+
stage.agentPurpose,
|
|
1980
|
+
"",
|
|
1981
|
+
"Follow this workflow:",
|
|
1982
|
+
...(0, packet_workflow_1.renderNumberedLines)([
|
|
1983
|
+
"Read `AGENTS.md` and the nearest scoped `AGENTS.md` files for touched code.",
|
|
1984
|
+
"Read `.swarmcraft/AGENTS.md`, `.swarmcraft/project.instructions.md`, and `.swarmcraft/project.context.md` when present.",
|
|
1985
|
+
"Read the linked packet under `.swarmcraft/projects/` before changing files.",
|
|
1986
|
+
`Read \`.swarmcraft/agents/${stage.key}.instructions.md\` when present.`,
|
|
1987
|
+
...stage.agentWorkflow
|
|
1988
|
+
]),
|
|
1989
|
+
"",
|
|
1990
|
+
"Output expectations:",
|
|
1991
|
+
...stage.outputItems.map((item) => `- ${item}`),
|
|
1992
|
+
"",
|
|
1993
|
+
"Stage completion rule:",
|
|
1994
|
+
stage.completionRule,
|
|
1995
|
+
"",
|
|
1996
|
+
"Do not rewrite packet identity fields, board-owned checklist text, unrelated local changes, or workflow history."
|
|
1997
|
+
].join("\n");
|
|
1998
|
+
return [
|
|
1999
|
+
`name = "${name}"`,
|
|
2000
|
+
`description = "${escapeTomlString(stage.agentDescription)}"`,
|
|
2001
|
+
`model_reasoning_effort = "${reasoningEffort}"`,
|
|
2002
|
+
"",
|
|
2003
|
+
'developer_instructions = """',
|
|
2004
|
+
instructions,
|
|
2005
|
+
'"""',
|
|
2006
|
+
""
|
|
2007
|
+
].join("\n");
|
|
2008
|
+
}
|
|
2009
|
+
function escapeTomlString(value) {
|
|
2010
|
+
return value.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
});
|
|
2014
|
+
|
|
1968
2015
|
// ../../packages/repo-seed/dist/templates/renderCodexSkills.js
|
|
1969
2016
|
var require_renderCodexSkills = __commonJS({
|
|
1970
2017
|
"../../packages/repo-seed/dist/templates/renderCodexSkills.js"(exports2) {
|
|
@@ -2789,7 +2836,7 @@ var require_renderProjectGuide = __commonJS({
|
|
|
2789
2836
|
"",
|
|
2790
2837
|
"Primary assistant actions:",
|
|
2791
2838
|
"",
|
|
2792
|
-
...packet_workflow_1.SWARMCRAFT_ASSISTANT_ACTIONS.map((action) => `- \`${action.copilotInvocation}\` in Copilot or \`${action.
|
|
2839
|
+
...packet_workflow_1.SWARMCRAFT_ASSISTANT_ACTIONS.map((action) => `- \`${action.copilotInvocation}\` in Copilot, \`${action.codexInvocation}\` in Codex, or \`${action.claudeInvocation}\` in Claude Code: ${action.description}`),
|
|
2793
2840
|
"",
|
|
2794
2841
|
"Collaborative decision aid:",
|
|
2795
2842
|
"",
|
|
@@ -2951,11 +2998,12 @@ var require_renderPrototype = __commonJS({
|
|
|
2951
2998
|
exports2.renderPrototypeSkill = renderPrototypeSkill;
|
|
2952
2999
|
exports2.renderGreenfieldReactPrototypeReference = renderGreenfieldReactPrototypeReference;
|
|
2953
3000
|
exports2.renderPrototypePrompt = renderPrototypePrompt;
|
|
3001
|
+
var packet_workflow_1 = require_dist();
|
|
2954
3002
|
exports2.COPILOT_PROTOTYPE_SKILL_PATH = ".github/skills/swarmcraft-prototype/SKILL.md";
|
|
2955
3003
|
exports2.COPILOT_PROTOTYPE_PROMPT_PATH = ".github/prompts/prototype.prompt.md";
|
|
2956
3004
|
exports2.CODEX_PROTOTYPE_SKILL_PATH = ".agents/skills/swarmcraft-prototype/SKILL.md";
|
|
2957
3005
|
function renderPrototypeSeedFiles(provider) {
|
|
2958
|
-
const skillRoot =
|
|
3006
|
+
const skillRoot = `${(0, packet_workflow_1.getProviderSkillRoot)(provider)}/swarmcraft-prototype`;
|
|
2959
3007
|
const files = [
|
|
2960
3008
|
{ relativePath: `${skillRoot}/SKILL.md`, contents: renderPrototypeSkill(provider) },
|
|
2961
3009
|
{ relativePath: `${skillRoot}/references/greenfield-react-prototype.md`, contents: renderGreenfieldReactPrototypeReference() },
|
|
@@ -2970,7 +3018,7 @@ var require_renderPrototype = __commonJS({
|
|
|
2970
3018
|
return files;
|
|
2971
3019
|
}
|
|
2972
3020
|
function renderPrototypeSkill(provider) {
|
|
2973
|
-
const invocation = provider
|
|
3021
|
+
const invocation = (0, packet_workflow_1.buildSkillInvocation)(provider, "prototype");
|
|
2974
3022
|
return `---
|
|
2975
3023
|
name: swarmcraft-prototype
|
|
2976
3024
|
description: Build or revise disposable, locally reviewable prototypes that help owners understand and decide uncertain workflows, interfaces, state transitions, responsive behavior, authority boundaries, or failure paths during SwarmCraft discovery, planning, implementation departure review, or human review.
|
|
@@ -3008,7 +3056,7 @@ When a surrounding discovery or planning workflow invokes this skill again, insp
|
|
|
3008
3056
|
- For material greenfield web discovery, default to a small React/Vite application at \`apps/prototypes/<short-slug>\` that consumes \`packages/design-system\`; keep its owner-facing companion and screenshots at \`docs/prototypes/<short-slug>\`.
|
|
3009
3057
|
- Use the standalone HTML/CSS/JavaScript template only for non-web work, a materially incompatible or unavailable stack, a truly isolated low-dependency decision surface, or an explicit owner-authorized constraint. Record why the fallback is appropriate. An empty repository is not a fallback reason.
|
|
3010
3058
|
- Classify every new design need as foundation, component, pattern, adapter, or application; record provenance as \`COMPANY_SYSTEM\`, \`ADAPTED\`, or \`NEW\`; and keep prototype proposals \`EXPERIMENTAL\`.
|
|
3011
|
-
- Do not mutate the authoritative system merely to make a prototype convenient. When the owner accepts a reusable extension, route the change through **${provider
|
|
3059
|
+
- Do not mutate the authoritative system merely to make a prototype convenient. When the owner accepts a reusable extension, route the change through **${(0, packet_workflow_1.buildSkillInvocation)(provider, "design") + " mode=extend"}**, update inventory and stories there, and create a decision record for a public API, dependency, ownership, cross-component, or company-alignment change.
|
|
3012
3060
|
- Never copy disposable prototype HTML, CSS, JavaScript, fixtures, screenshots, or application-specific state into a production design-system package by default. Review and reimplement accepted behavior through the design skill and repository conventions.
|
|
3013
3061
|
|
|
3014
3062
|
## Build the smallest decision surface
|
|
@@ -3256,6 +3304,7 @@ var require_renderReports = __commonJS({
|
|
|
3256
3304
|
exports2.listReportingSkillDefinitions = listReportingSkillDefinitions;
|
|
3257
3305
|
exports2.renderReportSeedFiles = renderReportSeedFiles;
|
|
3258
3306
|
exports2.renderReportsGuide = renderReportsGuide;
|
|
3307
|
+
var packet_workflow_1 = require_dist();
|
|
3259
3308
|
var DEFINITIONS = [
|
|
3260
3309
|
{
|
|
3261
3310
|
key: "spend-analysis",
|
|
@@ -3303,7 +3352,7 @@ var require_renderReports = __commonJS({
|
|
|
3303
3352
|
return DEFINITIONS;
|
|
3304
3353
|
}
|
|
3305
3354
|
function renderReportSeedFiles(provider) {
|
|
3306
|
-
const skillRoot =
|
|
3355
|
+
const skillRoot = (0, packet_workflow_1.getProviderSkillRoot)(provider);
|
|
3307
3356
|
return DEFINITIONS.flatMap((definition) => {
|
|
3308
3357
|
const root = `${skillRoot}/swarmcraft-${definition.key}`;
|
|
3309
3358
|
const supportFiles = [
|
|
@@ -3353,7 +3402,7 @@ Reports may contain commercially or operationally sensitive derived evidence. Re
|
|
|
3353
3402
|
`;
|
|
3354
3403
|
}
|
|
3355
3404
|
function renderReportingSkill(definition, provider) {
|
|
3356
|
-
const invocation =
|
|
3405
|
+
const invocation = (0, packet_workflow_1.buildSkillInvocation)(provider, definition.key);
|
|
3357
3406
|
return `---
|
|
3358
3407
|
name: swarmcraft-${definition.key}
|
|
3359
3408
|
description: ${JSON.stringify(definition.description)}
|
|
@@ -3631,8 +3680,9 @@ var require_renderPlanning = __commonJS({
|
|
|
3631
3680
|
exports2.renderPlanningSeedFiles = renderPlanningSeedFiles;
|
|
3632
3681
|
exports2.renderPlanContract = renderPlanContract;
|
|
3633
3682
|
exports2.renderInitiativePlanTemplate = renderInitiativePlanTemplate;
|
|
3683
|
+
var packet_workflow_1 = require_dist();
|
|
3634
3684
|
function renderPlanningSeedFiles(provider) {
|
|
3635
|
-
const root = `${
|
|
3685
|
+
const root = `${(0, packet_workflow_1.getProviderSkillRoot)(provider)}/swarmcraft-plan`;
|
|
3636
3686
|
return [
|
|
3637
3687
|
{ relativePath: `${root}/references/plan-contract.md`, contents: renderPlanContract() },
|
|
3638
3688
|
{ relativePath: `${root}/assets/initiative-plan-template.md`, contents: renderInitiativePlanTemplate() }
|
|
@@ -3952,12 +4002,13 @@ var require_renderDesign = __commonJS({
|
|
|
3952
4002
|
exports2.renderBrandAssetsTemplate = renderBrandAssetsTemplate;
|
|
3953
4003
|
exports2.renderDesignDecisionRecordTemplate = renderDesignDecisionRecordTemplate;
|
|
3954
4004
|
exports2.renderDesignPrompt = renderDesignPrompt;
|
|
4005
|
+
var packet_workflow_1 = require_dist();
|
|
3955
4006
|
var designSystemContract_1 = require_designSystemContract();
|
|
3956
4007
|
exports2.COPILOT_DESIGN_SKILL_PATH = ".github/skills/swarmcraft-design/SKILL.md";
|
|
3957
4008
|
exports2.COPILOT_DESIGN_PROMPT_PATH = ".github/prompts/design.prompt.md";
|
|
3958
4009
|
exports2.CODEX_DESIGN_SKILL_PATH = ".agents/skills/swarmcraft-design/SKILL.md";
|
|
3959
4010
|
function renderDesignSeedFiles(provider) {
|
|
3960
|
-
const root =
|
|
4011
|
+
const root = `${(0, packet_workflow_1.getProviderSkillRoot)(provider)}/swarmcraft-design`;
|
|
3961
4012
|
const files = [
|
|
3962
4013
|
{ relativePath: `${root}/SKILL.md`, contents: renderDesignSkill(provider) },
|
|
3963
4014
|
{ relativePath: `${root}/references/design-system-contract.md`, contents: renderDesignSystemReference() },
|
|
@@ -3975,7 +4026,7 @@ var require_renderDesign = __commonJS({
|
|
|
3975
4026
|
return files;
|
|
3976
4027
|
}
|
|
3977
4028
|
function renderDesignSkill(provider) {
|
|
3978
|
-
const invocation = provider
|
|
4029
|
+
const invocation = (0, packet_workflow_1.buildSkillInvocation)(provider, "design");
|
|
3979
4030
|
return `---
|
|
3980
4031
|
name: swarmcraft-design
|
|
3981
4032
|
description: Establish, extend, adopt, or read-only assess a mature company-specific design system with official identity, comprehensive foundations, product-neutral components, patterns, a reusable implementation boundary, and a Storybook or repository-native workbench.
|
|
@@ -4226,6 +4277,9 @@ var require_seedProjectContext = __commonJS({
|
|
|
4226
4277
|
exports2.buildStaticProjectSeedFiles = buildStaticProjectSeedFiles;
|
|
4227
4278
|
exports2.buildDynamicProjectSeedFiles = buildDynamicProjectSeedFiles;
|
|
4228
4279
|
exports2.buildProjectSeedFiles = buildProjectSeedFiles;
|
|
4280
|
+
var packet_workflow_1 = require_dist();
|
|
4281
|
+
var renderAssistantActionSkills_1 = require_renderAssistantActionSkills();
|
|
4282
|
+
var renderClaudeGuidance_1 = require_renderClaudeGuidance();
|
|
4229
4283
|
var projectEnvironmentContract_1 = require_projectEnvironmentContract();
|
|
4230
4284
|
var renderCopilotAgents_1 = require_renderCopilotAgents();
|
|
4231
4285
|
var renderCodexAgents_1 = require_renderCodexAgents();
|
|
@@ -4326,7 +4380,10 @@ var require_seedProjectContext = __commonJS({
|
|
|
4326
4380
|
];
|
|
4327
4381
|
return [
|
|
4328
4382
|
...sharedFiles,
|
|
4329
|
-
...provider === "
|
|
4383
|
+
...provider === "claude" ? [
|
|
4384
|
+
{ relativePath: "CLAUDE.md", contents: (0, renderClaudeGuidance_1.renderClaudeGuidance)() },
|
|
4385
|
+
...packet_workflow_1.SWARMCRAFT_ASSISTANT_ACTIONS.map((action) => ({ relativePath: action.claudeSkillPath, contents: (0, renderAssistantActionSkills_1.renderSwarmCraftActionSkillFile)(action.key) }))
|
|
4386
|
+
] : provider === "copilot" ? copilotFiles : codexFiles,
|
|
4330
4387
|
...(0, renderPlanning_1.renderPlanningSeedFiles)(provider),
|
|
4331
4388
|
...(0, renderReports_1.renderReportSeedFiles)(provider),
|
|
4332
4389
|
...(0, renderPrototype_1.renderPrototypeSeedFiles)(provider),
|
|
@@ -6543,7 +6600,7 @@ var require_seedProjectFiles = __commonJS({
|
|
|
6543
6600
|
var seedOperationProject_1 = require_seedOperationProject();
|
|
6544
6601
|
exports2.ROOT_AGENTS_FILE_PATH = "AGENTS.md";
|
|
6545
6602
|
exports2.PROJECT_SEED_STATE_PATH = ".swarmcraft/project.seed-state.json";
|
|
6546
|
-
exports2.PROJECT_TEMPLATE_SET_VERSION =
|
|
6603
|
+
exports2.PROJECT_TEMPLATE_SET_VERSION = 8;
|
|
6547
6604
|
async function seedProjectFiles2(project, provider, dependencies, options = {}) {
|
|
6548
6605
|
const desired = [
|
|
6549
6606
|
...classifyFiles((0, seedProjectContext_1.buildDynamicProjectSeedFiles)(project), "dynamic", provider),
|
|
@@ -6564,7 +6621,7 @@ var require_seedProjectFiles = __commonJS({
|
|
|
6564
6621
|
return files.map((file) => ({
|
|
6565
6622
|
...file,
|
|
6566
6623
|
scope,
|
|
6567
|
-
ownership: file.relativePath === renderReports_1.REPORTS_README_PATH || file.relativePath === projectEnvironmentContract_1.PROJECT_ENVIRONMENT_PATH || file.relativePath === projectEnvironmentContract_1.VSCODE_EXTENSIONS_PATH ? "CREATE_ONCE_HUMAN" : "GENERATED_MANAGED",
|
|
6624
|
+
ownership: file.relativePath === "CLAUDE.md" || file.relativePath === renderReports_1.REPORTS_README_PATH || file.relativePath === projectEnvironmentContract_1.PROJECT_ENVIRONMENT_PATH || file.relativePath === projectEnvironmentContract_1.VSCODE_EXTENSIONS_PATH ? "CREATE_ONCE_HUMAN" : "GENERATED_MANAGED",
|
|
6568
6625
|
...isProviderPath(file.relativePath) ? { provider } : {}
|
|
6569
6626
|
}));
|
|
6570
6627
|
}
|
|
@@ -6703,7 +6760,7 @@ var require_seedProjectFiles = __commonJS({
|
|
|
6703
6760
|
};
|
|
6704
6761
|
}
|
|
6705
6762
|
function isProviderPath(relativePath) {
|
|
6706
|
-
return relativePath.startsWith(".github/") || relativePath.startsWith(".agents/") || relativePath.startsWith(".codex/");
|
|
6763
|
+
return relativePath.startsWith(".claude/skills/") || relativePath.startsWith(".github/") || relativePath.startsWith(".agents/") || relativePath.startsWith(".codex/");
|
|
6707
6764
|
}
|
|
6708
6765
|
function digest(contents) {
|
|
6709
6766
|
return (0, node_crypto_1.createHash)("sha256").update(contents, "utf8").digest("hex");
|
|
@@ -64900,11 +64957,12 @@ var require_renderDiscovery = __commonJS({
|
|
|
64900
64957
|
exports2.renderCuratedDiscoveryDocument = renderCuratedDiscoveryDocument;
|
|
64901
64958
|
exports2.renderSourceGuide = renderSourceGuide;
|
|
64902
64959
|
exports2.renderDiscoveryRootSection = renderDiscoveryRootSection;
|
|
64960
|
+
var packet_workflow_1 = require_dist();
|
|
64903
64961
|
var accounting_discovery_1 = require_dist3();
|
|
64904
64962
|
exports2.DISCOVERY_MANAGED_SECTION_START = "<!-- BEGIN SWARMCRAFT DISCOVERY MANAGED SECTION -->";
|
|
64905
64963
|
exports2.DISCOVERY_MANAGED_SECTION_END = "<!-- END SWARMCRAFT DISCOVERY MANAGED SECTION -->";
|
|
64906
64964
|
function renderDiscoverySkill(provider) {
|
|
64907
|
-
const invocation = provider
|
|
64965
|
+
const invocation = (0, packet_workflow_1.buildSkillInvocation)(provider, "discover");
|
|
64908
64966
|
return `---
|
|
64909
64967
|
name: swarmcraft-discover
|
|
64910
64968
|
description: Guide recommendation-led, prototype-first, owner-reviewed discovery before a SwarmCraft project exists.
|
|
@@ -65027,7 +65085,7 @@ Treat the nine curated documents as one coverage map, not nine consecutive inter
|
|
|
65027
65085
|
- Reuse the owner's brand, terminology, product shape, and operating context when supported by that research. Do not treat public positioning as unquestioned operational truth.
|
|
65028
65086
|
- When an owner-authorized company source exposes official first-party identity, let design establishment locate, safely adopt, provenance-record, and demonstrate it before the first branded prototype. Do not add a logo questionnaire, fabricate a substitute, hotlink the source, or treat nearby partner, client, accreditation, certification, or supplier marks as company identity.
|
|
65029
65087
|
- Before the first material branded prototype, classify interface relevance as **MATERIAL_INTERFACE** or **NON_MATERIAL_INTERFACE**, then classify the design context as **AUTHORITATIVE_COMPANY_SYSTEM**, **EXTENSIBLE_EXISTING_SYSTEM**, **BRAND_EVIDENCE_WITHOUT_USABLE_SYSTEM**, **NO_MEANINGFUL_FOUNDATION**, or **UNRESOLVED**. Inspect and validate \`.swarmcraft/design-system.json\` when present. Record evidence, inaccessible context, and the classification in **experience-and-interface.md** and **sources/owner-interview.md**.
|
|
65030
|
-
- For **MATERIAL_INTERFACE** with an authoritative or extensible system, resolve and reuse it. For brand evidence without a usable system or no meaningful foundation, invoke **${provider
|
|
65088
|
+
- For **MATERIAL_INTERFACE** with an authoritative or extensible system, resolve and reuse it. For brand evidence without a usable system or no meaningful foundation, invoke **${(0, packet_workflow_1.buildSkillInvocation)(provider, "design") + " mode=establish"}** before the first material branded prototype. Establish a mature company-specific initial system broad enough for the discovered product, its prototypes, and later implementation. Preserve a compatible established framework and package manager; when none exists for material greenfield web work, use the design skill's pnpm, React, TypeScript, Vite, \`packages/design-system\`, and \`apps/design-system\` default. Do not ask the owner to choose framework, component families, package topology, or Storybook configuration unless evidence reveals a material incompatibility. Let the design skill apply its baseline internally; do not ask the owner to select or approve component categories.
|
|
65031
65089
|
- Do not establish a design system for backend-only, infrastructure-only, routine integration, non-interface, or otherwise immaterial work. An explicit deferral or unresolved technology-dependent implementation detail may preserve discovery completion when the proposed workflow remains coherent; record why establishment is not material or what later decision owns it. Never disguise a material company-language decision as a technical deferral.
|
|
65032
65090
|
- Before marking an initial direction reviewed, present the integrated design system through official identity and its provenance, company fit, proposed adaptations, typography, density, layout rhythm, action hierarchy, content voice, accessibility, and representative composed workflows for owner correction by exception. Keep official identity separate from adapted styling and new proposals. Ask a targeted question only when a material company-language decision cannot be responsibly recommended from available evidence. Record accepted conclusions in **experience-and-interface.md**. Keep the implementation, workbench, inventory, locator, stories, identity files, and prototype assets as local repository artifacts; they do not enter the text-only Discovery Package unless separately selected as supported text evidence.
|
|
65033
65091
|
- In **goals-and-success.md**, propose a short plain-language **projectTitle** in frontmatter and include it in whole-document review. Do not use a digest, workspace folder, or generic "Deep Discovery project" label as the owner-facing name.
|
|
@@ -65035,9 +65093,9 @@ Treat the nine curated documents as one coverage map, not nine consecutive inter
|
|
|
65035
65093
|
- Draft a coherent proposed understanding across goals, roles, workflows, records and rules, integrations, experience, quality and operations, risks and decisions, and acceptance. Present the recommended direction in concise owner language, with alternatives only where a material fork exists.
|
|
65036
65094
|
- Before fixing the target shape, reconcile a product-disposition matrix across **goals-and-success.md**, **domain-data-and-rules.md**, **integrations-and-boundaries.md**, and **decisions-risks-and-open-questions.md**. Distinguish owner-confirmed dispositions from recommendations and unresolved choices. If an undecided product could materially change whether the outcome is orchestration, selective replacement, consolidation, or staged transition, ask one grouped exception question and keep affected documents out of **REVIEWED** until answered.
|
|
65037
65095
|
- Do the initial thinking for the owner. Ask what is incorrect, missing, unsafe, or materially different rather than asking the owner to originate every role, rule, status, exception, or measure.
|
|
65038
|
-
- For **Recommend, then refine**, invoke **${provider
|
|
65096
|
+
- For **Recommend, then refine**, invoke **${(0, packet_workflow_1.buildSkillInvocation)(provider, "prototype")}** after the initial synthesis and no more than one focused clarification round. Start with the smallest useful branded flow that exposes the primary workflow and its important authority, safety, failure, or recovery decision. Balanced and detail-first discovery may resolve more high-impact boundaries first, but must not revert to a document-by-document questionnaire.
|
|
65039
65097
|
- After each prototype review, perform a prototype-coverage check across independently meaningful user or operator journeys, materially different roles and authority boundaries, consequential safety or payment decisions, exception and recovery paths, offline or degraded operation, and interaction-heavy integration failures. Do not proceed to consolidation merely because one prototype exists.
|
|
65040
|
-
- Extend the current prototype when remaining scenarios share the same product shell, actors, interaction model, and decision context. Invoke **${provider
|
|
65098
|
+
- Extend the current prototype when remaining scenarios share the same product shell, actors, interaction model, and decision context. Invoke **${(0, packet_workflow_1.buildSkillInvocation)(provider, "prototype")}** again to create another focused prototype when combining a distinct role, operating context, workflow, or recovery model would obscure the decisions being reviewed. Preserve and link every reviewed prototype.
|
|
65041
65099
|
- Use no fixed prototype count. Stop when material interaction uncertainty is experienceable and owner-corrected, already clear from evidence and prose, or explicitly recorded as delivery-stage validation because a disposable prototype cannot resolve it. Do not prototype routine screens or implementation detail merely for completeness.
|
|
65042
65100
|
- Before Stage 4, record a concise prototype-coverage summary in **sources/owner-interview.md** and affected curated documents: each prototype path and decision scope, important scenarios covered, material areas intentionally handled in prose, deferred validation with rationale, and why the combined evidence is sufficient for discovery. A material gap that could change what is built remains discovery work.
|
|
65043
65101
|
- Ask follow-up questions only for owner corrections, contradictions, genuine blockers, or high-impact safety, security, privacy, authority, payment, compliance, destructive migration, and observable acceptance boundaries. Group related questions and do not ask what the evidence or accepted proposal already answers.
|
|
@@ -65095,7 +65153,7 @@ These files are the owner-and-agent working surface before SwarmCraft creates a
|
|
|
65095
65153
|
|
|
65096
65154
|
## Start here
|
|
65097
65155
|
|
|
65098
|
-
1. Paste the command for the **AI provider** shown in the SwarmCraft sidebar into chat and send it: Codex uses \`$swarmcraft-discover\`; Copilot uses \`/discover\`. The discovery assistant will inspect the current workspace state and begin at the right stage.
|
|
65156
|
+
1. Paste the command for the **AI provider** shown in the SwarmCraft sidebar into chat and send it: Codex uses \`$swarmcraft-discover\`; Copilot uses \`/discover\`; Claude Code uses \`/swarmcraft-discover\`. The discovery assistant will inspect the current workspace state and begin at the right stage.
|
|
65099
65157
|
2. After that, use the first action shown beneath **Deep Discovery** in the SwarmCraft sidebar whenever you want to continue. It is the context-sensitive next step: click it to open the right local guidance or workflow action. When the row is **Continue Discovery with AI**, SwarmCraft also copies the next provider instruction so you can paste it into chat.
|
|
65100
65158
|
|
|
65101
65159
|
## Journey
|
|
@@ -65200,12 +65258,14 @@ var require_seedDiscoveryFiles = __commonJS({
|
|
|
65200
65258
|
exports2.DISCOVERY_SEED_STATE_PATH = exports2.DISCOVERY_SEED_VERSION = void 0;
|
|
65201
65259
|
exports2.buildDiscoverySeedFiles = buildDiscoverySeedFiles;
|
|
65202
65260
|
exports2.seedDiscoveryFiles = seedDiscoveryFiles;
|
|
65261
|
+
var packet_workflow_1 = require_dist();
|
|
65262
|
+
var renderClaudeGuidance_1 = require_renderClaudeGuidance();
|
|
65203
65263
|
var node_crypto_1 = require("node:crypto");
|
|
65204
65264
|
var renderDiscovery_1 = require_renderDiscovery();
|
|
65205
65265
|
var renderPrototype_1 = require_renderPrototype();
|
|
65206
65266
|
var renderDesign_1 = require_renderDesign();
|
|
65207
65267
|
var renderReports_1 = require_renderReports();
|
|
65208
|
-
exports2.DISCOVERY_SEED_VERSION =
|
|
65268
|
+
exports2.DISCOVERY_SEED_VERSION = 15;
|
|
65209
65269
|
exports2.DISCOVERY_SEED_STATE_PATH = ".swarmcraft/discovery.seed-state.json";
|
|
65210
65270
|
var LEGACY_UNCHANGED_DISCOVERY_GUIDE_HASHES = /* @__PURE__ */ new Set([
|
|
65211
65271
|
"810536d02524e6a11b4b93d1828d5e799380de2619dc481e91c6a02eb487984b",
|
|
@@ -65225,22 +65285,16 @@ var require_seedDiscoveryFiles = __commonJS({
|
|
|
65225
65285
|
["acceptance-scenarios.md", "Acceptance scenarios", "Capture observable scenarios, expected evidence, and human-review obligations."]
|
|
65226
65286
|
];
|
|
65227
65287
|
function buildDiscoverySeedFiles(provider) {
|
|
65228
|
-
const providerFiles =
|
|
65229
|
-
relativePath:
|
|
65230
|
-
contents: (0, renderDiscovery_1.renderDiscoverySkill)(provider),
|
|
65231
|
-
ownership: "GENERATED_MANAGED",
|
|
65232
|
-
provider
|
|
65233
|
-
}] : [{
|
|
65234
|
-
relativePath: ".github/skills/swarmcraft-discover/SKILL.md",
|
|
65288
|
+
const providerFiles = [{
|
|
65289
|
+
relativePath: `${(0, packet_workflow_1.getProviderSkillRoot)(provider)}/swarmcraft-discover/SKILL.md`,
|
|
65235
65290
|
contents: (0, renderDiscovery_1.renderDiscoverySkill)(provider),
|
|
65236
65291
|
ownership: "GENERATED_MANAGED",
|
|
65237
65292
|
provider
|
|
65238
|
-
}, {
|
|
65239
|
-
relativePath: ".github/prompts/discover.prompt.md",
|
|
65240
|
-
contents: (0, renderDiscovery_1.renderDiscoveryPrompt)(),
|
|
65241
|
-
ownership: "GENERATED_MANAGED",
|
|
65242
|
-
provider
|
|
65243
65293
|
}];
|
|
65294
|
+
if (provider === "copilot")
|
|
65295
|
+
providerFiles.push({ relativePath: ".github/prompts/discover.prompt.md", contents: (0, renderDiscovery_1.renderDiscoveryPrompt)(), ownership: "GENERATED_MANAGED", provider });
|
|
65296
|
+
if (provider === "claude")
|
|
65297
|
+
providerFiles.push({ relativePath: "CLAUDE.md", contents: (0, renderClaudeGuidance_1.renderClaudeGuidance)(), ownership: "CREATE_ONCE_HUMAN" });
|
|
65244
65298
|
const spendFiles = (0, renderReports_1.renderReportSeedFiles)(provider).filter(({ relativePath }) => relativePath.includes("swarmcraft-spend-analysis") || relativePath === ".github/prompts/spend-analysis.prompt.md").map((file) => ({ ...file, ownership: "GENERATED_MANAGED", provider }));
|
|
65245
65299
|
return [
|
|
65246
65300
|
{ relativePath: "docs/discovery/README.md", contents: (0, renderDiscovery_1.renderDiscoveryGuide)(), ownership: "CREATE_ONCE_HUMAN" },
|
|
@@ -65261,6 +65315,10 @@ var require_seedDiscoveryFiles = __commonJS({
|
|
|
65261
65315
|
async function seedDiscoveryFiles(provider, dependencies) {
|
|
65262
65316
|
const result = { written: [], removed: [], conflicts: [] };
|
|
65263
65317
|
const previous = await readState(dependencies);
|
|
65318
|
+
if (previous?.seedVersion && previous.seedVersion > exports2.DISCOVERY_SEED_VERSION) {
|
|
65319
|
+
result.conflicts.push({ relativePath: exports2.DISCOVERY_SEED_STATE_PATH, reason: "Newer discovery seed version was preserved." });
|
|
65320
|
+
return result;
|
|
65321
|
+
}
|
|
65264
65322
|
if (previous && previous.provider !== provider)
|
|
65265
65323
|
await reconcileOldProvider(previous, dependencies, result);
|
|
65266
65324
|
const files = buildDiscoverySeedFiles(provider);
|
|
@@ -65282,7 +65340,7 @@ var require_seedDiscoveryFiles = __commonJS({
|
|
|
65282
65340
|
if (exists) {
|
|
65283
65341
|
const current = await dependencies.readFile(file.relativePath);
|
|
65284
65342
|
const oldHash = previous?.files[file.relativePath];
|
|
65285
|
-
if (oldHash
|
|
65343
|
+
if ((!oldHash || hash(current) !== oldHash) && current !== file.contents) {
|
|
65286
65344
|
result.conflicts.push({ relativePath: file.relativePath, reason: "Owner-edited generated file was preserved." });
|
|
65287
65345
|
continue;
|
|
65288
65346
|
}
|
|
@@ -65527,6 +65585,7 @@ var require_renderOperation = __commonJS({
|
|
|
65527
65585
|
exports2.renderOperationRepositoryFiles = renderOperationRepositoryFiles;
|
|
65528
65586
|
exports2.renderOperationProviderFiles = renderOperationProviderFiles;
|
|
65529
65587
|
exports2.renderOperationSkill = renderOperationSkill;
|
|
65588
|
+
var packet_workflow_1 = require_dist();
|
|
65530
65589
|
var operation_contract_1 = require_dist2();
|
|
65531
65590
|
var renderOperationAutomate_1 = require_renderOperationAutomate();
|
|
65532
65591
|
var renderOperationFormalise_1 = require_renderOperationFormalise();
|
|
@@ -65598,7 +65657,7 @@ var require_renderOperation = __commonJS({
|
|
|
65598
65657
|
];
|
|
65599
65658
|
}
|
|
65600
65659
|
function renderOperationProviderFiles(provider) {
|
|
65601
|
-
const root =
|
|
65660
|
+
const root = (0, packet_workflow_1.getProviderSkillRoot)(provider);
|
|
65602
65661
|
const files = exports2.OPERATION_SKILL_NAMES.map((name) => ({
|
|
65603
65662
|
relativePath: root + "/" + name + "/SKILL.md",
|
|
65604
65663
|
contents: renderOperationSkill(name, provider)
|
|
@@ -65613,8 +65672,8 @@ var require_renderOperation = __commonJS({
|
|
|
65613
65672
|
}
|
|
65614
65673
|
function renderOperationSkill(name, provider) {
|
|
65615
65674
|
const action = name.slice("swarmcraft-".length);
|
|
65616
|
-
const invocation = provider
|
|
65617
|
-
const companion =
|
|
65675
|
+
const invocation = (0, packet_workflow_1.buildSkillInvocation)(provider, action);
|
|
65676
|
+
const companion = { work: (0, packet_workflow_1.buildSkillInvocation)(provider, "work"), automate: (0, packet_workflow_1.buildSkillInvocation)(provider, "automate"), formalise: (0, packet_workflow_1.buildSkillInvocation)(provider, "formalise") };
|
|
65618
65677
|
const descriptions = {
|
|
65619
65678
|
"swarmcraft-work": "Complete useful operational work while progressively maintaining the authoritative operation map.",
|
|
65620
65679
|
"swarmcraft-automate": "Turn stable bounded work into reviewed local automation with dry runs, tests, and recovery.",
|
|
@@ -65732,7 +65791,7 @@ var require_renderOperation = __commonJS({
|
|
|
65732
65791
|
return document3("# Operation formalisation", "", "Status: **NOT_STARTED**", "", "This is the plain-language review surface for selecting what may later enter Deep Discovery. Repository presence does not imply consent. Existing authority remains unchanged until an explicit pilot or cutover decision.", "", "Formalise records the bounded capability, actors, outcomes, systems, rules, exceptions, authority, safety constraints, evidence, gaps, candidate cutover, rollback, selected evidence, explicit exclusions, and unresolved decisions here. Its separate digest-bound manifest is the machine-readable consent boundary.");
|
|
65733
65792
|
}
|
|
65734
65793
|
function renderOperationRootGuide() {
|
|
65735
|
-
return document3("# SwarmCraft Operate repository", "", "Start with `$swarmcraft-work` in Codex or `/work` in
|
|
65794
|
+
return document3("# SwarmCraft Operate repository", "", "Start with `$swarmcraft-work` in Codex , `/work` in Copilot, or `/swarmcraft-work` in Claude Code. Describe one useful outcome and provide one safe representative example; do not begin by designing the model.", "", "SwarmCraft maintains the authoritative technical model from operational meaning you review in plain language. It keeps raw imports, proposals, exports, and run scratch out of Git by default, commits only scoped reviewed authority, and never pushes automatically.");
|
|
65736
65795
|
}
|
|
65737
65796
|
function vocabulary(vocabularyId, valueId, value, label, description) {
|
|
65738
65797
|
return {
|
|
@@ -65765,16 +65824,18 @@ var require_seedOperationFiles = __commonJS({
|
|
|
65765
65824
|
exports2.OPERATION_SEED_STATE_PATH = exports2.OPERATION_SEED_VERSION = void 0;
|
|
65766
65825
|
exports2.buildOperationSeedFiles = buildOperationSeedFiles2;
|
|
65767
65826
|
exports2.seedOperationFiles = seedOperationFiles2;
|
|
65827
|
+
var renderClaudeGuidance_1 = require_renderClaudeGuidance();
|
|
65768
65828
|
var node_crypto_1 = require("node:crypto");
|
|
65769
65829
|
var operation_contract_1 = require_dist2();
|
|
65770
65830
|
var renderOperation_1 = require_renderOperation();
|
|
65771
|
-
exports2.OPERATION_SEED_VERSION =
|
|
65831
|
+
exports2.OPERATION_SEED_VERSION = 5;
|
|
65772
65832
|
exports2.OPERATION_SEED_STATE_PATH = ".swarmcraft/operation.seed-state.json";
|
|
65773
65833
|
function buildOperationSeedFiles2(locatorValue, provider) {
|
|
65774
65834
|
const locator = (0, operation_contract_1.parseOperationLocator)(locatorValue);
|
|
65775
65835
|
const files = [
|
|
65776
65836
|
...(0, renderOperation_1.renderOperationRepositoryFiles)(locator),
|
|
65777
|
-
...(0, renderOperation_1.renderOperationProviderFiles)(provider)
|
|
65837
|
+
...(0, renderOperation_1.renderOperationProviderFiles)(provider),
|
|
65838
|
+
...provider === "claude" ? [{ relativePath: "CLAUDE.md", contents: (0, renderClaudeGuidance_1.renderClaudeGuidance)() }] : []
|
|
65778
65839
|
].map((file) => classifyOperationFile(file, locator, provider));
|
|
65779
65840
|
const paths = files.map((file) => file.relativePath);
|
|
65780
65841
|
if (new Set(paths).size !== paths.length) {
|
|
@@ -65976,7 +66037,7 @@ var require_seedOperationFiles = __commonJS({
|
|
|
65976
66037
|
};
|
|
65977
66038
|
}
|
|
65978
66039
|
function isProviderPath(relativePath) {
|
|
65979
|
-
return relativePath.startsWith(".github/") || relativePath.startsWith(".agents/");
|
|
66040
|
+
return relativePath.startsWith(".claude/skills/") || relativePath.startsWith(".github/") || relativePath.startsWith(".agents/");
|
|
65980
66041
|
}
|
|
65981
66042
|
function unique(values) {
|
|
65982
66043
|
return [...new Set(values)].sort();
|
|
@@ -66770,7 +66831,7 @@ var import_packet_workflow6 = __toESM(require_dist(), 1);
|
|
|
66770
66831
|
// package.json
|
|
66771
66832
|
var package_default = {
|
|
66772
66833
|
name: "@swarmcraftai/cli",
|
|
66773
|
-
version: "0.
|
|
66834
|
+
version: "0.6.0",
|
|
66774
66835
|
description: "Prepare repositories and run packet-based SwarmCraft agent workflows from the terminal.",
|
|
66775
66836
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
66776
66837
|
type: "module",
|
|
@@ -67274,8 +67335,8 @@ async function runBootstrap(client, accessToken, options) {
|
|
|
67274
67335
|
linkedPackets,
|
|
67275
67336
|
skippedTasks,
|
|
67276
67337
|
nextCommands: [
|
|
67277
|
-
`swarmcraft one-shot --project ${project.id} --workspace ${workspace.workspacePath} --agent-provider
|
|
67278
|
-
"Review generated files under .swarmcraft/, .github/, .agents/, and .
|
|
67338
|
+
`swarmcraft one-shot --project ${project.id} --workspace ${workspace.workspacePath} --agent-provider ${options.agentProvider}${options.delegationId ? ` --delegation ${options.delegationId}` : ""}`,
|
|
67339
|
+
"Review generated files under .swarmcraft/, .github/, .agents/, .codex/, .claude/, and CLAUDE.md before running agents."
|
|
67279
67340
|
]
|
|
67280
67341
|
};
|
|
67281
67342
|
}
|
|
@@ -67395,6 +67456,9 @@ async function persistRunManifest(manifestPath, manifest) {
|
|
|
67395
67456
|
var import_promises4 = require("node:fs/promises");
|
|
67396
67457
|
var import_packet_workflow2 = __toESM(require_dist(), 1);
|
|
67397
67458
|
async function buildAgentEnvironment(options, stageEnv) {
|
|
67459
|
+
if (options.agentProvider === "claude" && (options.agentApiKeyEnvName || options.agentEnvFilePath)) {
|
|
67460
|
+
throw new Error("Claude subscription runs use your local login; provider credential flags are not supported.");
|
|
67461
|
+
}
|
|
67398
67462
|
const env2 = {
|
|
67399
67463
|
PATH: process.env.PATH ?? "",
|
|
67400
67464
|
HOME: process.env.HOME,
|
|
@@ -67402,6 +67466,11 @@ async function buildAgentEnvironment(options, stageEnv) {
|
|
|
67402
67466
|
TERM: process.env.TERM,
|
|
67403
67467
|
...stageEnv
|
|
67404
67468
|
};
|
|
67469
|
+
if (options.agentProvider === "claude") {
|
|
67470
|
+
for (const name of ["USER", "USERPROFILE", "APPDATA", "LOCALAPPDATA", "SystemRoot", "TEMP", "TMP", "CLAUDE_CONFIG_DIR", "CLAUDE_CODE_GIT_BASH_PATH"]) {
|
|
67471
|
+
if (process.env[name]) env2[name] = process.env[name];
|
|
67472
|
+
}
|
|
67473
|
+
}
|
|
67405
67474
|
if (options.commitPolicy === "done") {
|
|
67406
67475
|
env2.SWARMCRAFT_DRIVER_AUTO_COMMIT = "true";
|
|
67407
67476
|
env2.SWARMCRAFT_CLI_AUTO_COMMIT = "true";
|
|
@@ -67455,6 +67524,17 @@ async function readEnvFile(envFilePath) {
|
|
|
67455
67524
|
function shellQuote(value) {
|
|
67456
67525
|
return `'${String(value).replace(/'/g, "'\\''")}'`;
|
|
67457
67526
|
}
|
|
67527
|
+
async function requireClaudeSubscription(cwd, env2, execute = runProcess) {
|
|
67528
|
+
const result = await execute("claude", ["auth", "status"], cwd, { env: env2 });
|
|
67529
|
+
let method;
|
|
67530
|
+
try {
|
|
67531
|
+
method = JSON.parse(result.stdout).authMethod;
|
|
67532
|
+
} catch {
|
|
67533
|
+
}
|
|
67534
|
+
if (result.exitCode !== 0 || method !== "claude.ai") {
|
|
67535
|
+
throw new Error("Claude subscription login is not ready. Install the standalone Claude Code CLI, run claude auth login, and confirm /status uses your Claude subscription. API and third-party authentication are not accepted for --agent-provider claude.");
|
|
67536
|
+
}
|
|
67537
|
+
}
|
|
67458
67538
|
|
|
67459
67539
|
// src/workflows/one-shot-board-sync.ts
|
|
67460
67540
|
var import_packet_workflow3 = __toESM(require_dist(), 1);
|
|
@@ -67541,6 +67621,9 @@ async function runOneShot(client, accessTokenProvider, options) {
|
|
|
67541
67621
|
if (workspace.dirtyFileCount > 0 && !options.allowDirty) {
|
|
67542
67622
|
throw new Error(`Workspace has ${workspace.dirtyFileCount} changed file(s). Commit, stash, or rerun with --allow-dirty before one-shot.`);
|
|
67543
67623
|
}
|
|
67624
|
+
if (options.agentProvider === "claude") {
|
|
67625
|
+
await requireClaudeSubscription(workspace.workspacePath, await buildAgentEnvironment(options, {}));
|
|
67626
|
+
}
|
|
67544
67627
|
if (options.resumeRunId) {
|
|
67545
67628
|
printProgress("Resume detected; using existing packet files without re-running bootstrap.");
|
|
67546
67629
|
} else {
|
|
@@ -67550,7 +67633,7 @@ async function runOneShot(client, accessTokenProvider, options) {
|
|
|
67550
67633
|
taskIds: options.taskIds,
|
|
67551
67634
|
taskLimit: options.taskLimit,
|
|
67552
67635
|
delegationId: options.delegation?.id ?? null,
|
|
67553
|
-
agentProvider: options.agentProvider === "
|
|
67636
|
+
agentProvider: options.agentProvider === "custom" || options.agentProvider === "managed" ? "codex" : options.agentProvider
|
|
67554
67637
|
});
|
|
67555
67638
|
}
|
|
67556
67639
|
const project = await client.loadProject(options.projectId, await getAccessToken(), options.delegation?.id ?? null);
|
|
@@ -67636,7 +67719,16 @@ async function runOneShot(client, accessTokenProvider, options) {
|
|
|
67636
67719
|
}
|
|
67637
67720
|
});
|
|
67638
67721
|
} catch (failure2) {
|
|
67639
|
-
if (!(failure2 instanceof ManagedAiCreditsExhaustedError))
|
|
67722
|
+
if (!(failure2 instanceof ManagedAiCreditsExhaustedError)) {
|
|
67723
|
+
if (options.agentProvider === "claude") {
|
|
67724
|
+
taskOutcome.outcome = "blocked-agent-failure";
|
|
67725
|
+
taskOutcome.finishedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
67726
|
+
taskOutcome.elapsedMs = (0, import_packet_workflow4.computeElapsedMs)(taskOutcome.startedAt, taskOutcome.finishedAt);
|
|
67727
|
+
finalizeManifest(manifest);
|
|
67728
|
+
await persistRunManifest(manifestPath, manifest);
|
|
67729
|
+
}
|
|
67730
|
+
throw failure2;
|
|
67731
|
+
}
|
|
67640
67732
|
result = { board, task: selectedTask, outcome: "blocked-insufficient-credits" };
|
|
67641
67733
|
printProgress("Managed AI paused before the next provider call. Add credits, then resume this run.");
|
|
67642
67734
|
}
|
|
@@ -67785,7 +67877,8 @@ async function runStageAndSync(context) {
|
|
|
67785
67877
|
await context.getAccessToken()
|
|
67786
67878
|
) : null;
|
|
67787
67879
|
const managedToken = managedStage ? await context.getAccessToken() : null;
|
|
67788
|
-
const
|
|
67880
|
+
const executeAgent = context.options.agentProvider === "claude" && !context.options.agentCommand ? (_command, cwd, options) => runProcess("claude", ["--permission-mode", "dontAsk", "-p", stageCommand], cwd, options) : runTrustedShellAgentCommand;
|
|
67881
|
+
const execution = await executeAgent(command, context.workspacePath, {
|
|
67789
67882
|
env: await buildAgentEnvironment(context.options, {
|
|
67790
67883
|
SWARMCRAFT_STAGE: context.stage,
|
|
67791
67884
|
SWARMCRAFT_PACKET: context.packetPath,
|
|
@@ -67812,6 +67905,9 @@ ${execution.stdout}`;
|
|
|
67812
67905
|
if (context.options.agentProvider === "managed" && (failureOutput.includes("INSUFFICIENT_CREDITS") || failureOutput.toLowerCase().includes("insufficient credits"))) {
|
|
67813
67906
|
throw new ManagedAiCreditsExhaustedError("Managed AI credits exhausted.");
|
|
67814
67907
|
}
|
|
67908
|
+
if (context.options.agentProvider === "claude") {
|
|
67909
|
+
throw new Error(`Claude failed during ${context.stage}. Check subscription availability and configured tool permissions, then resume the run. No API fallback was attempted.`);
|
|
67910
|
+
}
|
|
67815
67911
|
throw new Error(`Agent command failed during ${context.stage}: ${execution.stderr || execution.stdout || command}`);
|
|
67816
67912
|
}
|
|
67817
67913
|
const allowLaneSync = context.options.checking || context.stage !== "do";
|
|
@@ -68724,7 +68820,7 @@ var import_packet_workflow5 = __toESM(require_dist(), 1);
|
|
|
68724
68820
|
var COMMANDS = [
|
|
68725
68821
|
{
|
|
68726
68822
|
name: "operate init",
|
|
68727
|
-
usage: "swarmcraft operate init --workspace <path> --agent-provider codex|copilot [--adopt] [--json] [--client-surface cli|vscode-extension] [--session-stdin]",
|
|
68823
|
+
usage: "swarmcraft operate init --workspace <path> --agent-provider codex|copilot|claude [--adopt] [--json] [--client-surface cli|vscode-extension] [--session-stdin]",
|
|
68728
68824
|
summary: "Sign in, initialize or reconcile local Operate skills, and report content-free activity.",
|
|
68729
68825
|
implemented: true
|
|
68730
68826
|
},
|
|
@@ -68784,7 +68880,7 @@ var COMMANDS = [
|
|
|
68784
68880
|
},
|
|
68785
68881
|
{
|
|
68786
68882
|
name: "init",
|
|
68787
|
-
usage: "swarmcraft init --project <project-id> --workspace <path> --agent-provider codex|copilot [--task <task-id>] [--task-limit <n|all>] [--delegation <id>]",
|
|
68883
|
+
usage: "swarmcraft init --project <project-id> --workspace <path> --agent-provider codex|copilot|claude [--task <task-id>] [--task-limit <n|all>] [--delegation <id>]",
|
|
68788
68884
|
summary: "Prepare a repository with SwarmCraft packet and agent guidance files.",
|
|
68789
68885
|
implemented: true
|
|
68790
68886
|
},
|
|
@@ -68808,7 +68904,7 @@ var COMMANDS = [
|
|
|
68808
68904
|
},
|
|
68809
68905
|
{
|
|
68810
68906
|
name: "doctor",
|
|
68811
|
-
usage: "swarmcraft doctor [--workspace <path>] [--agent-provider codex|copilot|custom] [--delegation <id>]",
|
|
68907
|
+
usage: "swarmcraft doctor [--workspace <path>] [--agent-provider codex|copilot|claude|custom] [--delegation <id>]",
|
|
68812
68908
|
summary: "Check local auth, API, git, workspace, runtime, and agent prerequisites.",
|
|
68813
68909
|
implemented: true
|
|
68814
68910
|
},
|
|
@@ -69031,7 +69127,8 @@ async function initializeOperation(options, deps) {
|
|
|
69031
69127
|
const before = /* @__PURE__ */ new Map();
|
|
69032
69128
|
const owned = new Set([
|
|
69033
69129
|
...(0, import_repo_seed3.buildOperationSeedFiles)(locator, "codex"),
|
|
69034
|
-
...(0, import_repo_seed3.buildOperationSeedFiles)(locator, "copilot")
|
|
69130
|
+
...(0, import_repo_seed3.buildOperationSeedFiles)(locator, "copilot"),
|
|
69131
|
+
...(0, import_repo_seed3.buildOperationSeedFiles)(locator, "claude")
|
|
69035
69132
|
].map((file) => file.relativePath));
|
|
69036
69133
|
owned.add(".swarmcraft/operation.seed-state.json");
|
|
69037
69134
|
const requireOwned = (file) => {
|
|
@@ -69106,7 +69203,7 @@ async function initializeOperation(options, deps) {
|
|
|
69106
69203
|
activity,
|
|
69107
69204
|
occurrenceId: state.occurrenceId,
|
|
69108
69205
|
clientSurface: options.clientSurface ?? "CLI",
|
|
69109
|
-
providerKind:
|
|
69206
|
+
providerKind: { codex: "CODEX", copilot: "COPILOT", claude: "CLAUDE" }[options.provider],
|
|
69110
69207
|
contractVersion: import_operation_contract3.OPERATION_CONTRACT_VERSION,
|
|
69111
69208
|
seedVersion: import_repo_seed3.OPERATION_SEED_VERSION,
|
|
69112
69209
|
repositoryKind: state.repositoryKind
|
|
@@ -69253,10 +69350,10 @@ async function runOperateCommand(parsed, action, version2) {
|
|
|
69253
69350
|
let result;
|
|
69254
69351
|
if (action === "init") {
|
|
69255
69352
|
const provider = requireOption(parsed, "agent-provider");
|
|
69256
|
-
if (provider !== "codex" && provider !== "copilot") throw new OperateCommandError(
|
|
69353
|
+
if (provider !== "codex" && provider !== "copilot" && provider !== "claude") throw new OperateCommandError(
|
|
69257
69354
|
"OPERATE_PROVIDER_INVALID",
|
|
69258
69355
|
4,
|
|
69259
|
-
"Select --agent-provider codex or
|
|
69356
|
+
"Select --agent-provider codex, copilot, or claude."
|
|
69260
69357
|
);
|
|
69261
69358
|
const surface = getOption(parsed, "client-surface") ?? "cli";
|
|
69262
69359
|
if (surface !== "cli" && surface !== "vscode-extension") throw new OperateCommandError(
|
|
@@ -69450,7 +69547,7 @@ async function runInit(parsed) {
|
|
|
69450
69547
|
taskIds: getOptions(parsed, "task"),
|
|
69451
69548
|
taskLimit,
|
|
69452
69549
|
delegationId: delegation?.id ?? null,
|
|
69453
|
-
agentProvider: parseChoice(requireOption(parsed, "agent-provider"), ["codex", "copilot"], "--agent-provider")
|
|
69550
|
+
agentProvider: parseChoice(requireOption(parsed, "agent-provider"), ["codex", "copilot", "claude"], "--agent-provider")
|
|
69454
69551
|
});
|
|
69455
69552
|
printBootstrapSummary(summary);
|
|
69456
69553
|
}
|
|
@@ -69532,8 +69629,8 @@ async function runDoctor(parsed) {
|
|
|
69532
69629
|
}
|
|
69533
69630
|
const provider = getOption(parsed, "agent-provider");
|
|
69534
69631
|
if (provider && provider !== "custom") {
|
|
69535
|
-
const commandName = provider
|
|
69536
|
-
const result = await runProcess("which", [commandName], process.cwd());
|
|
69632
|
+
const commandName = (0, import_packet_workflow6.parseExternalAgentProvider)(provider);
|
|
69633
|
+
const result = await runProcess(process.platform === "win32" ? "where.exe" : "which", [commandName], process.cwd());
|
|
69537
69634
|
console.log(`${commandName}: ${result.exitCode === 0 ? result.stdout.trim() : "not found"}`);
|
|
69538
69635
|
}
|
|
69539
69636
|
}
|