ace-swarm 2.0.5 → 2.0.7
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/README.md +17 -0
- package/assets/.agents/skills/landing-review-watcher/SKILL.md +68 -0
- package/assets/.agents/skills/problem-triage/SKILL.md +57 -0
- package/assets/.agents/skills/problem-triage/agents/openai.yaml +3 -0
- package/assets/.agents/skills/skill-auditor/SKILL.md +52 -0
- package/assets/.github/hooks/ace-copilot.json +68 -0
- package/assets/agent-state/ACE_WORKFLOW.md +66 -0
- package/assets/agent-state/INTERFACE_REGISTRY.md +50 -0
- package/assets/agent-state/MODULES/gates/gate-typescript-public-surface.json +7 -0
- package/assets/agent-state/MODULES/registry.json +10 -2
- package/assets/agent-state/MODULES/schemas/ACE_RUNTIME_PROFILE.schema.json +210 -0
- package/assets/agent-state/MODULES/schemas/RUNTIME_EXECUTOR_SESSION_REGISTRY.schema.json +290 -0
- package/assets/agent-state/MODULES/schemas/RUNTIME_TOOL_SPEC_REGISTRY.schema.json +144 -0
- package/assets/agent-state/MODULES/schemas/TRACKER_SNAPSHOT.schema.json +134 -0
- package/assets/agent-state/MODULES/schemas/VERICIFY_BRIDGE_SNAPSHOT.schema.json +157 -0
- package/assets/agent-state/MODULES/schemas/VERICIFY_PROCESS_POST_LOG.schema.json +92 -0
- package/assets/agent-state/MODULES/schemas/WORKSPACE_SESSION_REGISTRY.schema.json +133 -0
- package/assets/agent-state/SKILL_CATALOG.md +48 -0
- package/assets/agent-state/runtime-executor-sessions.json +5 -0
- package/assets/agent-state/runtime-tool-specs.json +5 -0
- package/assets/agent-state/runtime-workspaces.json +5 -0
- package/assets/agent-state/tracker-snapshot.json +7 -0
- package/assets/agent-state/vericify/ace-bridge.json +60 -0
- package/assets/agent-state/vericify/process-posts.json +5 -0
- package/assets/scripts/bootstrap-workspace.sh +5 -0
- package/assets/scripts/copilot-hook-dispatch.mjs +267 -0
- package/dist/helpers.d.ts +1 -0
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +312 -2
- package/dist/helpers.js.map +1 -1
- package/dist/problem-triage.d.ts +23 -0
- package/dist/problem-triage.d.ts.map +1 -0
- package/dist/problem-triage.js +429 -0
- package/dist/problem-triage.js.map +1 -0
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +46 -0
- package/dist/prompts.js.map +1 -1
- package/dist/public-surface.d.ts +30 -0
- package/dist/public-surface.d.ts.map +1 -0
- package/dist/public-surface.js +310 -0
- package/dist/public-surface.js.map +1 -0
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +148 -0
- package/dist/resources.js.map +1 -1
- package/dist/runtime-command.d.ts +18 -0
- package/dist/runtime-command.d.ts.map +1 -0
- package/dist/runtime-command.js +76 -0
- package/dist/runtime-command.js.map +1 -0
- package/dist/runtime-executor.d.ts +104 -0
- package/dist/runtime-executor.d.ts.map +1 -0
- package/dist/runtime-executor.js +774 -0
- package/dist/runtime-executor.js.map +1 -0
- package/dist/runtime-profile.d.ts +98 -0
- package/dist/runtime-profile.d.ts.map +1 -0
- package/dist/runtime-profile.js +441 -0
- package/dist/runtime-profile.js.map +1 -0
- package/dist/runtime-tool-specs.d.ts +68 -0
- package/dist/runtime-tool-specs.d.ts.map +1 -0
- package/dist/runtime-tool-specs.js +424 -0
- package/dist/runtime-tool-specs.js.map +1 -0
- package/dist/schemas.d.ts +6 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +305 -0
- package/dist/schemas.js.map +1 -1
- package/dist/shared.d.ts +36 -3
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +36 -3
- package/dist/shared.js.map +1 -1
- package/dist/skill-auditor.d.ts +26 -0
- package/dist/skill-auditor.d.ts.map +1 -0
- package/dist/skill-auditor.js +184 -0
- package/dist/skill-auditor.js.map +1 -0
- package/dist/skill-catalog.d.ts +60 -0
- package/dist/skill-catalog.d.ts.map +1 -0
- package/dist/skill-catalog.js +263 -0
- package/dist/skill-catalog.js.map +1 -0
- package/dist/status-events.d.ts.map +1 -1
- package/dist/status-events.js +51 -8
- package/dist/status-events.js.map +1 -1
- package/dist/tools-agent.d.ts.map +1 -1
- package/dist/tools-agent.js +869 -0
- package/dist/tools-agent.js.map +1 -1
- package/dist/tools-files.d.ts.map +1 -1
- package/dist/tools-files.js +212 -1
- package/dist/tools-files.js.map +1 -1
- package/dist/tools-framework.d.ts.map +1 -1
- package/dist/tools-framework.js +86 -0
- package/dist/tools-framework.js.map +1 -1
- package/dist/tools-skills.d.ts +3 -0
- package/dist/tools-skills.d.ts.map +1 -0
- package/dist/tools-skills.js +104 -0
- package/dist/tools-skills.js.map +1 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +2 -0
- package/dist/tools.js.map +1 -1
- package/dist/tracker-adapters.d.ts +74 -0
- package/dist/tracker-adapters.d.ts.map +1 -0
- package/dist/tracker-adapters.js +777 -0
- package/dist/tracker-adapters.js.map +1 -0
- package/dist/tracker-sync.d.ts +10 -0
- package/dist/tracker-sync.d.ts.map +1 -0
- package/dist/tracker-sync.js +84 -0
- package/dist/tracker-sync.js.map +1 -0
- package/dist/vericify-bridge.d.ts +142 -0
- package/dist/vericify-bridge.d.ts.map +1 -0
- package/dist/vericify-bridge.js +481 -0
- package/dist/vericify-bridge.js.map +1 -0
- package/dist/workspace-manager.d.ts +103 -0
- package/dist/workspace-manager.d.ts.map +1 -0
- package/dist/workspace-manager.js +526 -0
- package/dist/workspace-manager.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { resolve } from "node:path";
|
|
5
|
+
|
|
6
|
+
const DESTRUCTIVE_COMMAND_PATTERNS = [
|
|
7
|
+
/\brm\s+-rf\b/i,
|
|
8
|
+
/\bgit\s+reset\s+--hard\b/i,
|
|
9
|
+
/\bgit\s+checkout\s+--\b/i,
|
|
10
|
+
/\bgit\s+clean\s+-fdx\b/i,
|
|
11
|
+
/\bdel\s+\/s\s+\/q\b/i,
|
|
12
|
+
/\bdrop\s+table\b/i,
|
|
13
|
+
/\btruncate\s+table\b/i,
|
|
14
|
+
/\bmkfs\b/i,
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
const PROTECTED_PATH_FRAGMENTS = [
|
|
18
|
+
".github/hooks/",
|
|
19
|
+
".github\\hooks\\",
|
|
20
|
+
"scripts/ace/copilot-hook-dispatch.mjs",
|
|
21
|
+
"scripts\\ace\\copilot-hook-dispatch.mjs",
|
|
22
|
+
".vscode/settings.json",
|
|
23
|
+
".vscode\\settings.json",
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
function readStdin() {
|
|
27
|
+
return new Promise((resolveStdin, reject) => {
|
|
28
|
+
let input = "";
|
|
29
|
+
process.stdin.setEncoding("utf8");
|
|
30
|
+
process.stdin.on("data", (chunk) => {
|
|
31
|
+
input += chunk;
|
|
32
|
+
});
|
|
33
|
+
process.stdin.on("end", () => resolveStdin(input));
|
|
34
|
+
process.stdin.on("error", reject);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function writeJson(payload) {
|
|
39
|
+
process.stdout.write(JSON.stringify(payload));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function toLowerText(value) {
|
|
43
|
+
return typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function safeJson(value) {
|
|
47
|
+
try {
|
|
48
|
+
return JSON.stringify(value ?? {});
|
|
49
|
+
} catch {
|
|
50
|
+
return "";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function resolveWorkspaceRoot(payload) {
|
|
55
|
+
const cwd = typeof payload.cwd === "string" && payload.cwd.trim() ? payload.cwd.trim() : process.cwd();
|
|
56
|
+
return resolve(cwd);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function aceContext(workspaceRoot) {
|
|
60
|
+
const stateDirs = [
|
|
61
|
+
"agent-state",
|
|
62
|
+
"global-state",
|
|
63
|
+
"venture-state",
|
|
64
|
+
"brand-state",
|
|
65
|
+
"engineering-state",
|
|
66
|
+
].filter((relPath) => existsSync(resolve(workspaceRoot, relPath)));
|
|
67
|
+
const coreFiles = [
|
|
68
|
+
"agent-state/TASK.md",
|
|
69
|
+
"agent-state/STATUS.md",
|
|
70
|
+
"agent-state/SCOPE.md",
|
|
71
|
+
"agent-state/EVIDENCE_LOG.md",
|
|
72
|
+
].filter((relPath) => existsSync(resolve(workspaceRoot, relPath)));
|
|
73
|
+
|
|
74
|
+
const hasSkills = existsSync(resolve(workspaceRoot, ".agents", "skills"));
|
|
75
|
+
const hasAgentState = existsSync(resolve(workspaceRoot, "agent-state"));
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
coreFiles,
|
|
79
|
+
stateDirs,
|
|
80
|
+
hasSkills,
|
|
81
|
+
hasAgentState,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function buildAceMessage(workspaceRoot) {
|
|
86
|
+
const context = aceContext(workspaceRoot);
|
|
87
|
+
if (!context.hasAgentState && !context.hasSkills) return "";
|
|
88
|
+
|
|
89
|
+
const parts = [];
|
|
90
|
+
if (context.coreFiles.length > 0) {
|
|
91
|
+
parts.push(`ACE workspace detected. Ground truth lives in ${context.coreFiles.join(", ")}.`);
|
|
92
|
+
} else if (context.hasAgentState) {
|
|
93
|
+
parts.push("ACE workspace detected. Ground truth lives in agent-state/*.");
|
|
94
|
+
}
|
|
95
|
+
if (context.stateDirs.length > 0) {
|
|
96
|
+
parts.push(
|
|
97
|
+
`Persist durable artifacts under ${context.stateDirs.map((dir) => `${dir}/`).join(", ")} rather than editor session caches such as workspaceStorage/.../chat-session-resources/.`
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
parts.push(
|
|
101
|
+
"Before major edits, read task, scope, and status artifacts rather than relying on chat history."
|
|
102
|
+
);
|
|
103
|
+
if (context.hasSkills) {
|
|
104
|
+
parts.push("Workspace skills are available under .agents/skills/.");
|
|
105
|
+
}
|
|
106
|
+
parts.push(
|
|
107
|
+
"Copilot hook policy protects .github/hooks, .vscode/settings.json, and scripts/ace/copilot-hook-dispatch.mjs from silent self-modification."
|
|
108
|
+
);
|
|
109
|
+
return parts.join(" ");
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function isCommandTool(toolName) {
|
|
113
|
+
return ["terminal", "shell", "bash", "command", "execute"].some((token) =>
|
|
114
|
+
toolName.includes(token)
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function isMutationTool(toolName) {
|
|
119
|
+
return [
|
|
120
|
+
"edit",
|
|
121
|
+
"write",
|
|
122
|
+
"create",
|
|
123
|
+
"replace",
|
|
124
|
+
"delete",
|
|
125
|
+
"rename",
|
|
126
|
+
"move",
|
|
127
|
+
"file",
|
|
128
|
+
].some((token) => toolName.includes(token));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function containsProtectedPath(text) {
|
|
132
|
+
const normalized = toLowerText(text);
|
|
133
|
+
return PROTECTED_PATH_FRAGMENTS.some((fragment) => normalized.includes(fragment.toLowerCase()));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function containsDestructiveCommand(text) {
|
|
137
|
+
return DESTRUCTIVE_COMMAND_PATTERNS.some((pattern) => pattern.test(text));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function resolvePreToolUse(payload, workspaceRoot) {
|
|
141
|
+
const toolName = toLowerText(payload.tool_name);
|
|
142
|
+
const serializedInput = safeJson(payload.tool_input);
|
|
143
|
+
|
|
144
|
+
if (isCommandTool(toolName) && containsDestructiveCommand(serializedInput)) {
|
|
145
|
+
return {
|
|
146
|
+
continue: true,
|
|
147
|
+
hookSpecificOutput: {
|
|
148
|
+
hookEventName: "PreToolUse",
|
|
149
|
+
permissionDecision: "deny",
|
|
150
|
+
permissionDecisionReason:
|
|
151
|
+
"Blocked by ACE Copilot hook policy: destructive shell command detected.",
|
|
152
|
+
additionalContext:
|
|
153
|
+
"Use a non-destructive alternative or ask for explicit confirmation before destructive terminal actions.",
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (isMutationTool(toolName) && containsProtectedPath(serializedInput)) {
|
|
159
|
+
return {
|
|
160
|
+
continue: true,
|
|
161
|
+
hookSpecificOutput: {
|
|
162
|
+
hookEventName: "PreToolUse",
|
|
163
|
+
permissionDecision: "ask",
|
|
164
|
+
permissionDecisionReason:
|
|
165
|
+
"Editing Copilot hook/config files requires confirmation.",
|
|
166
|
+
additionalContext:
|
|
167
|
+
"This workspace treats hook files and VS Code settings as protected control-plane artifacts.",
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const message = buildAceMessage(workspaceRoot);
|
|
173
|
+
if (isMutationTool(toolName) && message) {
|
|
174
|
+
return {
|
|
175
|
+
continue: true,
|
|
176
|
+
hookSpecificOutput: {
|
|
177
|
+
hookEventName: "PreToolUse",
|
|
178
|
+
permissionDecision: "allow",
|
|
179
|
+
additionalContext: `${message} After mutating files, reconcile evidence and verification where relevant.`,
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return { continue: true };
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function resolvePostToolUse(payload, workspaceRoot) {
|
|
188
|
+
const toolName = toLowerText(payload.tool_name);
|
|
189
|
+
if (!isMutationTool(toolName)) {
|
|
190
|
+
return { continue: true };
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
const message = buildAceMessage(workspaceRoot);
|
|
194
|
+
return {
|
|
195
|
+
continue: true,
|
|
196
|
+
hookSpecificOutput: {
|
|
197
|
+
hookEventName: "PostToolUse",
|
|
198
|
+
additionalContext: message
|
|
199
|
+
? `${message} If project files changed, run the smallest relevant verification before concluding.`
|
|
200
|
+
: "If project files changed, run the smallest relevant verification before concluding.",
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function resolveSessionStart(payload, workspaceRoot, eventName) {
|
|
206
|
+
const message = buildAceMessage(workspaceRoot);
|
|
207
|
+
if (!message) return { continue: true };
|
|
208
|
+
|
|
209
|
+
return {
|
|
210
|
+
continue: true,
|
|
211
|
+
hookSpecificOutput: {
|
|
212
|
+
hookEventName: eventName,
|
|
213
|
+
additionalContext: message,
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function resolveHook(payload) {
|
|
219
|
+
const eventName = toLowerText(payload.hookEventName);
|
|
220
|
+
const workspaceRoot = resolveWorkspaceRoot(payload);
|
|
221
|
+
|
|
222
|
+
if (eventName === "sessionstart") {
|
|
223
|
+
return resolveSessionStart(payload, workspaceRoot, "SessionStart");
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (eventName === "subagentstart") {
|
|
227
|
+
return resolveSessionStart(payload, workspaceRoot, "SubagentStart");
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (eventName === "pretooluse") {
|
|
231
|
+
return resolvePreToolUse(payload, workspaceRoot);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (eventName === "posttooluse") {
|
|
235
|
+
return resolvePostToolUse(payload, workspaceRoot);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (eventName === "precompact") {
|
|
239
|
+
return { continue: true };
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (eventName === "userpromptsubmit") {
|
|
243
|
+
return { continue: true };
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (eventName === "subagentstop" || eventName === "stop") {
|
|
247
|
+
return { continue: true };
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return { continue: true };
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
async function main() {
|
|
254
|
+
try {
|
|
255
|
+
const raw = await readStdin();
|
|
256
|
+
const payload = raw.trim() ? JSON.parse(raw) : {};
|
|
257
|
+
writeJson(resolveHook(payload));
|
|
258
|
+
} catch (error) {
|
|
259
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
260
|
+
writeJson({
|
|
261
|
+
continue: true,
|
|
262
|
+
systemMessage: `ACE Copilot hook warning: ${message}`,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
main();
|
package/dist/helpers.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
export { isInside, isReadError, normalizeRelPath, looksLikeSwarmHandoffPath } from "./shared.js";
|
|
5
5
|
export declare const SERVER_ROOT: string;
|
|
6
6
|
export declare const PACKAGE_ROOT: string;
|
|
7
|
+
export declare function resolveWorkspaceRoot(): string;
|
|
7
8
|
export declare const WORKSPACE_ROOT: string;
|
|
8
9
|
export declare const DEFAULTS_ROOT: string;
|
|
9
10
|
export declare const ALL_MCP_CLIENTS: readonly ["codex", "vscode", "claude", "cursor", "antigravity"];
|
package/dist/helpers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAgBH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAKjG,eAAO,MAAM,WAAW,QAA2B,CAAC;AACpD,eAAO,MAAM,YAAY,QAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAgBH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAKjG,eAAO,MAAM,WAAW,QAA2B,CAAC;AACpD,eAAO,MAAM,YAAY,Q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D,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAMhE;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAcjE;AAED,wBAAgB,yBAAyB,CAAC,MAAM,GAAE,SAAoB,GAAG,MAAM,CAkC9E;AAED,wBAAgB,6BAA6B,IAAI,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAQzE;AAED,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAqfrF;AAMD,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,iBAAiB,GAAG,eAAe,CAAC;CACjE;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,CAyC9C"}
|
package/dist/helpers.js
CHANGED
|
@@ -11,13 +11,41 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
11
11
|
const __dirname = dirname(__filename);
|
|
12
12
|
export const SERVER_ROOT = resolve(__dirname, "..");
|
|
13
13
|
export const PACKAGE_ROOT = SERVER_ROOT;
|
|
14
|
-
|
|
14
|
+
function normalizeWorkspaceRootCandidate(candidate) {
|
|
15
|
+
const trimmed = candidate?.trim();
|
|
16
|
+
if (!trimmed)
|
|
17
|
+
return undefined;
|
|
18
|
+
return resolve(trimmed);
|
|
19
|
+
}
|
|
20
|
+
function isFilesystemRoot(path) {
|
|
21
|
+
return dirname(path) === path;
|
|
22
|
+
}
|
|
23
|
+
export function resolveWorkspaceRoot() {
|
|
24
|
+
const ordered = [
|
|
25
|
+
process.env.ACE_WORKSPACE_ROOT,
|
|
26
|
+
process.env.INIT_CWD,
|
|
27
|
+
process.env.PWD,
|
|
28
|
+
process.cwd(),
|
|
29
|
+
]
|
|
30
|
+
.map(normalizeWorkspaceRootCandidate)
|
|
31
|
+
.filter((candidate) => Boolean(candidate));
|
|
32
|
+
const candidates = [...new Set(ordered)];
|
|
33
|
+
const firstExistingNonRoot = candidates.find((candidate) => existsSync(candidate) && !isFilesystemRoot(candidate));
|
|
34
|
+
if (firstExistingNonRoot)
|
|
35
|
+
return firstExistingNonRoot;
|
|
36
|
+
const firstExisting = candidates.find((candidate) => existsSync(candidate));
|
|
37
|
+
if (firstExisting)
|
|
38
|
+
return firstExisting;
|
|
39
|
+
return candidates[0] ?? resolve(process.cwd());
|
|
40
|
+
}
|
|
41
|
+
export const WORKSPACE_ROOT = resolveWorkspaceRoot();
|
|
15
42
|
export const DEFAULTS_ROOT = resolve(PACKAGE_ROOT, "assets");
|
|
16
43
|
const DEFAULTS_INSTRUCTIONS_ROOT = resolve(DEFAULTS_ROOT, "instructions");
|
|
17
44
|
const DEFAULTS_TASKS_ROOT = resolve(DEFAULTS_ROOT, "tasks");
|
|
18
45
|
const DEFAULTS_SKILLS_ROOT = resolve(DEFAULTS_ROOT, ".agents", "skills");
|
|
19
46
|
const DEFAULTS_AGENT_STATE_ROOT = resolve(DEFAULTS_ROOT, "agent-state");
|
|
20
47
|
const DEFAULTS_SCRIPTS_ROOT = resolve(DEFAULTS_ROOT, "scripts");
|
|
48
|
+
const DEFAULTS_GITHUB_ROOT = resolve(DEFAULTS_ROOT, ".github");
|
|
21
49
|
export const ALL_MCP_CLIENTS = [
|
|
22
50
|
"codex",
|
|
23
51
|
"vscode",
|
|
@@ -472,6 +500,281 @@ function normalizeOllamaBaseUrl(url) {
|
|
|
472
500
|
return "http://127.0.0.1:11434";
|
|
473
501
|
return trimmed.endsWith("/") ? trimmed.slice(0, -1) : trimmed;
|
|
474
502
|
}
|
|
503
|
+
function buildWorkspaceStateSeedFiles(projectName, generatedAt) {
|
|
504
|
+
const swarmHandoffTemplate = readText(DEFAULT_TASK_FILES.handoff_template);
|
|
505
|
+
return [
|
|
506
|
+
{
|
|
507
|
+
path: wsPath("global-state", "GLOBAL_RISKS.md"),
|
|
508
|
+
content: [
|
|
509
|
+
"# GLOBAL_RISKS",
|
|
510
|
+
"",
|
|
511
|
+
`Generated: ${generatedAt}`,
|
|
512
|
+
"",
|
|
513
|
+
"## Systemic Risks",
|
|
514
|
+
"- None logged yet. Record cross-swarm blockers, runway constraints, and release risks here.",
|
|
515
|
+
"",
|
|
516
|
+
"## Update Rule",
|
|
517
|
+
"- Keep local implementation risks in the owning swarm folder or `agent-state/RISKS.md`.",
|
|
518
|
+
].join("\n"),
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
path: wsPath("global-state", "DECISION_LOG.md"),
|
|
522
|
+
content: [
|
|
523
|
+
"# DECISION_LOG",
|
|
524
|
+
"",
|
|
525
|
+
`Generated: ${generatedAt}`,
|
|
526
|
+
"",
|
|
527
|
+
"Append-only record for orchestrator-level tradeoffs that affect multiple swarms.",
|
|
528
|
+
"",
|
|
529
|
+
"## Entry Template",
|
|
530
|
+
`- ${generatedAt} — Decision: <what changed>`,
|
|
531
|
+
" - Reason: <why>",
|
|
532
|
+
" - Impact: <which swarm/state folders are affected>",
|
|
533
|
+
].join("\n"),
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
path: wsPath("global-state", "ENGINEERING_SNAPSHOT.md"),
|
|
537
|
+
content: [
|
|
538
|
+
"# ENGINEERING_SNAPSHOT.md",
|
|
539
|
+
"",
|
|
540
|
+
`Generated: ${generatedAt}`,
|
|
541
|
+
"",
|
|
542
|
+
"## Profile",
|
|
543
|
+
"- Status: pending initial orchestrator discovery scan",
|
|
544
|
+
"- Project: " + projectName,
|
|
545
|
+
"- Durable location: `global-state/ENGINEERING_SNAPSHOT.md`",
|
|
546
|
+
"",
|
|
547
|
+
"## Quality Signals",
|
|
548
|
+
"- Tests: pending scan",
|
|
549
|
+
"- Public surface: pending scan",
|
|
550
|
+
"- Delivery risk: pending scan",
|
|
551
|
+
"",
|
|
552
|
+
"## Routing Recommendation",
|
|
553
|
+
"- Run the orchestrator discovery pass before first coder handoff.",
|
|
554
|
+
].join("\n"),
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
path: wsPath("global-state", "SWARM_HANDOFF.json"),
|
|
558
|
+
content: swarmHandoffTemplate,
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
path: wsPath("venture-state", "STATUS.md"),
|
|
562
|
+
content: [
|
|
563
|
+
"# VENTURE STATUS",
|
|
564
|
+
"",
|
|
565
|
+
"- Mode: bootstrap",
|
|
566
|
+
"- Focus: clarify thesis and MVP",
|
|
567
|
+
"- Current phase: discovery",
|
|
568
|
+
"- Next handoff: ACE-VOS -> ACE-Orchestrator",
|
|
569
|
+
`- Last update: ${generatedAt}`,
|
|
570
|
+
].join("\n"),
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
path: wsPath("venture-state", "TEAL_CONFIG.md"),
|
|
574
|
+
content: [
|
|
575
|
+
"# TEAL_CONFIG",
|
|
576
|
+
"",
|
|
577
|
+
"## Venture Pipeline",
|
|
578
|
+
"- discovery -> thesis -> blueprint -> MVP spec -> handoff",
|
|
579
|
+
"",
|
|
580
|
+
"## Durable Outputs",
|
|
581
|
+
"- `venture-state/THESIS.md`",
|
|
582
|
+
"- `venture-state/BLUEPRINT.md`",
|
|
583
|
+
"- `venture-state/GROWTH_LOOPS.md`",
|
|
584
|
+
"- `venture-state/RISKS.md`",
|
|
585
|
+
"- `venture-state/PROTOTYPE/MVP_SPEC.md`",
|
|
586
|
+
].join("\n"),
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
path: wsPath("venture-state", "THESIS.md"),
|
|
590
|
+
content: [
|
|
591
|
+
"# THESIS",
|
|
592
|
+
"",
|
|
593
|
+
"## Problem",
|
|
594
|
+
"- TBD",
|
|
595
|
+
"",
|
|
596
|
+
"## Users",
|
|
597
|
+
"- TBD",
|
|
598
|
+
"",
|
|
599
|
+
"## Why Now",
|
|
600
|
+
"- TBD",
|
|
601
|
+
"",
|
|
602
|
+
"## Wedge",
|
|
603
|
+
"- TBD",
|
|
604
|
+
].join("\n"),
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
path: wsPath("venture-state", "INTERROGATION.log"),
|
|
608
|
+
content: [
|
|
609
|
+
"# INTERROGATION LOG",
|
|
610
|
+
"",
|
|
611
|
+
`- ${generatedAt} bootstrap: venture interrogation started.`,
|
|
612
|
+
].join("\n"),
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
path: wsPath("venture-state", "BLUEPRINT.md"),
|
|
616
|
+
content: [
|
|
617
|
+
"# BLUEPRINT",
|
|
618
|
+
"",
|
|
619
|
+
"## System Outline",
|
|
620
|
+
"- TBD",
|
|
621
|
+
"",
|
|
622
|
+
"## Critical Flows",
|
|
623
|
+
"- TBD",
|
|
624
|
+
].join("\n"),
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
path: wsPath("venture-state", "GROWTH_LOOPS.md"),
|
|
628
|
+
content: [
|
|
629
|
+
"# GROWTH_LOOPS",
|
|
630
|
+
"",
|
|
631
|
+
"## Acquisition",
|
|
632
|
+
"- TBD",
|
|
633
|
+
"",
|
|
634
|
+
"## Retention",
|
|
635
|
+
"- TBD",
|
|
636
|
+
"",
|
|
637
|
+
"## Monetization",
|
|
638
|
+
"- TBD",
|
|
639
|
+
].join("\n"),
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
path: wsPath("venture-state", "RISKS.md"),
|
|
643
|
+
content: [
|
|
644
|
+
"# VENTURE RISKS",
|
|
645
|
+
"",
|
|
646
|
+
"## Active Risks",
|
|
647
|
+
"- None logged yet.",
|
|
648
|
+
].join("\n"),
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
path: wsPath("venture-state", "PROTOTYPE", "MVP_SPEC.md"),
|
|
652
|
+
content: [
|
|
653
|
+
"# MVP_SPEC",
|
|
654
|
+
"",
|
|
655
|
+
"## Objective",
|
|
656
|
+
"- TBD",
|
|
657
|
+
"",
|
|
658
|
+
"## Must-Have Behaviors",
|
|
659
|
+
"- TBD",
|
|
660
|
+
"",
|
|
661
|
+
"## Proof Requirement",
|
|
662
|
+
"- Define the smallest working slice that demonstrates value.",
|
|
663
|
+
].join("\n"),
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
path: wsPath("venture-state", "PROTOTYPE", "src", "README.md"),
|
|
667
|
+
content: [
|
|
668
|
+
"# Venture Prototype Source",
|
|
669
|
+
"",
|
|
670
|
+
"Use this directory when the venture swarm needs a lightweight proof-of-concept separate from `engineering-state/src/`.",
|
|
671
|
+
].join("\n"),
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
path: wsPath("brand-state", "BRAND_VOICE.md"),
|
|
675
|
+
content: [
|
|
676
|
+
"# BRAND_VOICE",
|
|
677
|
+
"",
|
|
678
|
+
"## Positioning",
|
|
679
|
+
"- TBD",
|
|
680
|
+
"",
|
|
681
|
+
"## Tone",
|
|
682
|
+
"- Clear",
|
|
683
|
+
"- Specific",
|
|
684
|
+
"- Trust-building",
|
|
685
|
+
"",
|
|
686
|
+
"## Messaging Guardrails",
|
|
687
|
+
"- Avoid generic claims.",
|
|
688
|
+
"- Tie every headline to a concrete user outcome.",
|
|
689
|
+
].join("\n"),
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
path: wsPath("brand-state", "AUDIT_LOG.md"),
|
|
693
|
+
content: [
|
|
694
|
+
"# AUDIT_LOG",
|
|
695
|
+
"",
|
|
696
|
+
`- ${generatedAt} bootstrap: brand audit log initialized.`,
|
|
697
|
+
].join("\n"),
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
path: wsPath("brand-state", "COPY_DECK.md"),
|
|
701
|
+
content: [
|
|
702
|
+
"# COPY_DECK",
|
|
703
|
+
"",
|
|
704
|
+
"## Primary Headline",
|
|
705
|
+
"- TBD",
|
|
706
|
+
"",
|
|
707
|
+
"## Supporting Copy",
|
|
708
|
+
"- TBD",
|
|
709
|
+
"",
|
|
710
|
+
"## CTA",
|
|
711
|
+
"- TBD",
|
|
712
|
+
].join("\n"),
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
path: wsPath("brand-state", "ASSETS", "strings.json"),
|
|
716
|
+
content: JSON.stringify({
|
|
717
|
+
app_name: projectName,
|
|
718
|
+
headline: "",
|
|
719
|
+
subheadline: "",
|
|
720
|
+
primary_cta: "",
|
|
721
|
+
}, null, 2),
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
path: wsPath("engineering-state", "BUILD_STATUS.md"),
|
|
725
|
+
content: [
|
|
726
|
+
"# BUILD_STATUS",
|
|
727
|
+
"",
|
|
728
|
+
"- Status: not started",
|
|
729
|
+
"- Active owner: ACE-Coders",
|
|
730
|
+
"- Blockers: none recorded",
|
|
731
|
+
`- Last update: ${generatedAt}`,
|
|
732
|
+
].join("\n"),
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
path: wsPath("engineering-state", "SPEC_CONTRACT.json"),
|
|
736
|
+
content: JSON.stringify({
|
|
737
|
+
version: "0.1.0",
|
|
738
|
+
project: projectName,
|
|
739
|
+
status: "draft",
|
|
740
|
+
requirements: [],
|
|
741
|
+
acceptance_tests: [],
|
|
742
|
+
deliverables: [],
|
|
743
|
+
}, null, 2),
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
path: wsPath("engineering-state", "ARCHITECTURE.md"),
|
|
747
|
+
content: [
|
|
748
|
+
"# ARCHITECTURE",
|
|
749
|
+
"",
|
|
750
|
+
"## Stack",
|
|
751
|
+
"- TBD",
|
|
752
|
+
"",
|
|
753
|
+
"## Interfaces",
|
|
754
|
+
"- TBD",
|
|
755
|
+
"",
|
|
756
|
+
"## Constraints",
|
|
757
|
+
"- TBD",
|
|
758
|
+
].join("\n"),
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
path: wsPath("engineering-state", "TEST_LOG.md"),
|
|
762
|
+
content: [
|
|
763
|
+
"# TEST_LOG",
|
|
764
|
+
"",
|
|
765
|
+
`- ${generatedAt} bootstrap: no tests executed yet.`,
|
|
766
|
+
].join("\n"),
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
path: wsPath("engineering-state", "src", "README.md"),
|
|
770
|
+
content: [
|
|
771
|
+
"# Engineering Source",
|
|
772
|
+
"",
|
|
773
|
+
"Place the main implementation here. Keep test evidence in `engineering-state/TEST_LOG.md`.",
|
|
774
|
+
].join("\n"),
|
|
775
|
+
},
|
|
776
|
+
];
|
|
777
|
+
}
|
|
475
778
|
export function getMcpClientBundlePath(client) {
|
|
476
779
|
if (client === "codex")
|
|
477
780
|
return wsPath(".mcp-config", "codex.config.toml");
|
|
@@ -548,6 +851,7 @@ export function bootstrapAceWorkspace(options = {}) {
|
|
|
548
851
|
throw new Error(`Unsupported llmProvider: ${llmProvider}`);
|
|
549
852
|
}
|
|
550
853
|
const result = { created: [], updated: [], skipped: [] };
|
|
854
|
+
const generatedAt = new Date().toISOString();
|
|
551
855
|
const dirSeeds = [
|
|
552
856
|
wsPath("global-state"),
|
|
553
857
|
wsPath("venture-state"),
|
|
@@ -560,6 +864,8 @@ export function bootstrapAceWorkspace(options = {}) {
|
|
|
560
864
|
wsPath("agent-state", "MODULES", "roles"),
|
|
561
865
|
wsPath("agent-state", "MODULES", "gates"),
|
|
562
866
|
wsPath("tasks"),
|
|
867
|
+
wsPath(".github"),
|
|
868
|
+
wsPath(".github", "hooks"),
|
|
563
869
|
wsPath(".agents"),
|
|
564
870
|
wsPath(".vscode"),
|
|
565
871
|
wsPath(".mcp-config"),
|
|
@@ -574,6 +880,7 @@ export function bootstrapAceWorkspace(options = {}) {
|
|
|
574
880
|
// Copy packaged defaults for tasks, instructions, skills, and agent-state.
|
|
575
881
|
copyTree(DEFAULTS_TASKS_ROOT, wsPath("tasks"), result, force);
|
|
576
882
|
copyTree(DEFAULTS_AGENT_STATE_ROOT, wsPath("agent-state"), result, force);
|
|
883
|
+
copyTree(DEFAULTS_GITHUB_ROOT, wsPath(".github"), result, force);
|
|
577
884
|
copyTree(resolve(DEFAULTS_ROOT, ".agents"), wsPath(".agents"), result, force);
|
|
578
885
|
copyTree(DEFAULTS_SCRIPTS_ROOT, wsPath("scripts", "ace"), result, force);
|
|
579
886
|
// Canonical root-level instruction aliases.
|
|
@@ -606,7 +913,7 @@ export function bootstrapAceWorkspace(options = {}) {
|
|
|
606
913
|
writeIfMissingOrForced(masterPlanPath, [
|
|
607
914
|
`# ${projectName} — Master Plan`,
|
|
608
915
|
"",
|
|
609
|
-
`Created: ${
|
|
916
|
+
`Created: ${generatedAt}`,
|
|
610
917
|
"",
|
|
611
918
|
"## Status",
|
|
612
919
|
"",
|
|
@@ -628,6 +935,9 @@ export function bootstrapAceWorkspace(options = {}) {
|
|
|
628
935
|
"| ACE-UI | idle | — |",
|
|
629
936
|
"| ACE-Coders | idle | — |",
|
|
630
937
|
].join("\n"), result, force);
|
|
938
|
+
for (const file of buildWorkspaceStateSeedFiles(projectName, generatedAt)) {
|
|
939
|
+
writeIfMissingOrForced(file.path, file.content, result, force);
|
|
940
|
+
}
|
|
631
941
|
// SWARM_REGISTRY is a derived artifact from code topology — always refresh.
|
|
632
942
|
const registryPath = wsPath("global-state", "SWARM_REGISTRY.json");
|
|
633
943
|
const swarmSubagents = [...COMPOSABLE_AGENTS];
|