claude-everything-workflow 0.2.13 → 0.2.15
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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/AGENTS.md +13 -23
- package/commands/pr.md +1 -1
- package/docs/plugins.md +1 -1
- package/evals/routing-scenarios.json +19 -19
- package/harness/manifest.json +28 -62
- package/package.json +1 -1
- package/rules/common/performance.md +3 -1
- package/rules/common/testing.md +2 -8
- package/scripts/install-antigravity.js +242 -18
- package/scripts/retired-skill-files.json +25 -0
- package/scripts/upstream-capability-map.json +16 -13
- package/scripts/verify/install-rules.test.js +137 -3
- package/scripts/verify/skill-invocation.test.js +18 -2
- package/scripts/verify/skill-manifest-checks.js +1 -1
- package/scripts/verify/skill-manifest-checks.test.js +53 -0
- package/scripts/verify/workflow-checks.js +87 -8
- package/skills/README.md +2 -6
- package/skills/code-review/SKILL.md +1 -1
- package/skills/codebase-design/SKILL.md +7 -1
- package/skills/feature-acceptance/references/e2e-testing.md +8 -2
- package/skills/grilling/SKILL.md +1 -1
- package/skills/handoff/SKILL.md +2 -2
- package/skills/implement/SKILL.md +3 -2
- package/skills/resolving-merge-conflicts/SKILL.md +1 -1
- package/skills/spec-gate/SKILL.md +1 -1
- package/skills/systematic-debugging/SKILL.md +1 -1
- package/skills/systematic-debugging/references/diagnosing-bugs.upstream.md +1 -1
- package/skills/test-driven-development/SKILL.md +1 -1
- package/skills/to-tickets/SKILL.md +1 -1
- package/skills/triage/SKILL.md +2 -2
- package/skills/using-superpowers/SKILL.md +5 -5
- package/skills/using-superpowers/references/process-outcomes.md +1 -1
- package/skills/domain-modeling/SKILL.md +0 -103
- package/skills/improve-codebase-architecture/SKILL.md +0 -47
- package/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
- package/skills/prototype/SKILL.md +0 -50
- package/skills/prototype/references/logic.md +0 -28
- package/skills/prototype/references/ui.md +0 -30
- package/skills/visual-companion/SKILL.md +0 -62
- package/skills/visual-companion/agents/openai.yaml +0 -4
- package/skills/visual-companion/references/guide.md +0 -298
- package/skills/visual-companion/scripts/frame-template.html +0 -243
- package/skills/visual-companion/scripts/helper.js +0 -167
- package/skills/visual-companion/scripts/pages.cjs +0 -28
- package/skills/visual-companion/scripts/server-utils.cjs +0 -82
- package/skills/visual-companion/scripts/server.cjs +0 -583
- package/skills/visual-companion/scripts/start-server.sh +0 -223
- package/skills/visual-companion/scripts/stop-server.sh +0 -120
- package/skills/visual-companion/scripts/websocket.cjs +0 -86
|
@@ -18,6 +18,8 @@ const {
|
|
|
18
18
|
const PLUGIN_NAME = "claude-everything-workflow";
|
|
19
19
|
const PLUGIN_SUBPATH = path.posix.join(".gemini/config/plugins", PLUGIN_NAME);
|
|
20
20
|
const PLUGIN_HOME_REF = `~/.gemini/config/plugins/${PLUGIN_NAME}`;
|
|
21
|
+
const ANTIGRAVITY_SKIP_COMMAND_SKILLS = new Set(["to-spec"]);
|
|
22
|
+
const ANTIGRAVITY_RELOCATED_SKILL_OVERRIDES = new Set(["continuous-learning-v2"]);
|
|
21
23
|
|
|
22
24
|
function lstatIfExists(target) {
|
|
23
25
|
try {
|
|
@@ -201,16 +203,59 @@ function buildHooksConfig() {
|
|
|
201
203
|
);
|
|
202
204
|
}
|
|
203
205
|
|
|
204
|
-
function
|
|
206
|
+
function escapeRegExp(value) {
|
|
207
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function rewriteAntigravityReferences(
|
|
211
|
+
relative,
|
|
212
|
+
text,
|
|
213
|
+
relocatedSkillNames = [...ANTIGRAVITY_RELOCATED_SKILL_OVERRIDES, "implement"],
|
|
214
|
+
) {
|
|
205
215
|
let updated = text
|
|
206
|
-
.replace(
|
|
207
|
-
|
|
208
|
-
|
|
216
|
+
.replace(
|
|
217
|
+
/`commands\/(pr|verify|learn)\.md`/g,
|
|
218
|
+
(_, cmd) => `\`${PLUGIN_HOME_REF}/skills/${cmd}/SKILL.md\``,
|
|
219
|
+
)
|
|
220
|
+
.replace(
|
|
221
|
+
/`commands\/to-spec\.md`/g,
|
|
222
|
+
`\`${PLUGIN_HOME_REF}/skills/spec-gate/SKILL.md\``,
|
|
223
|
+
)
|
|
224
|
+
.replace(
|
|
225
|
+
/`commands\/code-review\.md`/g,
|
|
226
|
+
`\`${PLUGIN_HOME_REF}/skills/code-review/SKILL.md\``,
|
|
227
|
+
);
|
|
228
|
+
const relocatedAlternation = [...new Set(relocatedSkillNames)].map(escapeRegExp).join("|");
|
|
229
|
+
if (relocatedAlternation) {
|
|
230
|
+
const relocatedPattern = new RegExp(
|
|
231
|
+
`(?<![A-Za-z0-9_./-])skills\\/(${relocatedAlternation})\\/([A-Za-z0-9_/-]+(?:\\.[A-Za-z0-9_-]+)*)`,
|
|
232
|
+
"g",
|
|
233
|
+
);
|
|
234
|
+
updated = updated.replace(
|
|
235
|
+
relocatedPattern,
|
|
236
|
+
(_, skill, rest) => `${PLUGIN_HOME_REF}/references/skills/${skill}/${rest}`,
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
if (relative === "references/skills/continuous-learning-v2/SKILL.md") {
|
|
209
240
|
updated = updated.replace(/`commands\/`/g, `\`${PLUGIN_HOME_REF}/skills/learn/SKILL.md\``);
|
|
210
241
|
}
|
|
211
242
|
return updated;
|
|
212
243
|
}
|
|
213
244
|
|
|
245
|
+
function rewriteRelocatedSkillScript(text) {
|
|
246
|
+
return text.replace(
|
|
247
|
+
/require\(\s*(['"])(\.\.\/(?:(?:\.\.\/)+)scripts\/[^'"]+)\1\s*\)/g,
|
|
248
|
+
(_, quote, target) => `require(${quote}../${target}${quote})`,
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function tailorAntigravityAgents(text) {
|
|
253
|
+
return text.replace(
|
|
254
|
+
/(Antigravity `~\/\.gemini\/config\/plugins\/claude-everything-workflow\/references\/rules\/`[^)]*)/,
|
|
255
|
+
`(\`${PLUGIN_HOME_REF}/references/rules/\`)`,
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
|
|
214
259
|
function writeManagedFile({ pluginRoot, relative, content, mode, backupId, dryRun, log }) {
|
|
215
260
|
const target = checkedPath(pluginRoot, relative);
|
|
216
261
|
const next = Buffer.isBuffer(content) ? content : Buffer.from(content, "utf8");
|
|
@@ -253,13 +298,21 @@ function collectDirectoryFiles(sourceDir, relativePrefix = "") {
|
|
|
253
298
|
return entries;
|
|
254
299
|
}
|
|
255
300
|
|
|
256
|
-
function buildCommandSkills(
|
|
301
|
+
function buildCommandSkills(
|
|
302
|
+
sourceRoot,
|
|
303
|
+
skippedCommandSkills = ANTIGRAVITY_SKIP_COMMAND_SKILLS,
|
|
304
|
+
relocatedSkillNames = [...ANTIGRAVITY_RELOCATED_SKILL_OVERRIDES, "implement"],
|
|
305
|
+
) {
|
|
257
306
|
const commandsDir = path.join(sourceRoot, "commands");
|
|
258
307
|
if (!fs.existsSync(commandsDir)) return [];
|
|
259
308
|
const generated = [];
|
|
260
|
-
|
|
309
|
+
const entries = fs
|
|
310
|
+
.readdirSync(commandsDir, { withFileTypes: true })
|
|
311
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
312
|
+
for (const entry of entries) {
|
|
261
313
|
if (!entry.isFile() || !entry.name.endsWith(".md")) continue;
|
|
262
314
|
const cmdName = entry.name.slice(0, -3);
|
|
315
|
+
if (skippedCommandSkills.has(cmdName)) continue;
|
|
263
316
|
if (fs.existsSync(path.join(sourceRoot, "skills", cmdName, "SKILL.md"))) {
|
|
264
317
|
continue;
|
|
265
318
|
}
|
|
@@ -268,15 +321,152 @@ function buildCommandSkills(sourceRoot) {
|
|
|
268
321
|
if (!data || typeof data.description !== "string" || !data.description.trim()) {
|
|
269
322
|
throw new Error(`commands/${entry.name} missing frontmatter description`);
|
|
270
323
|
}
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
324
|
+
const relative = path.posix.join("skills", cmdName, "SKILL.md");
|
|
325
|
+
const updatedBody = rewriteAntigravityReferences(
|
|
326
|
+
relative,
|
|
327
|
+
body.replace(/\$ARGUMENTS/g, "用户本次请求的内容和参数").replace(/^\n+/, ""),
|
|
328
|
+
relocatedSkillNames,
|
|
329
|
+
);
|
|
330
|
+
const description = data.description.trim();
|
|
331
|
+
const content = `---\nname: ${cmdName}\ndescription: ${JSON.stringify(description)}\n---\n\n${updatedBody}`;
|
|
332
|
+
generated.push({ name: cmdName, description, relative, content });
|
|
276
333
|
}
|
|
277
334
|
return generated;
|
|
278
335
|
}
|
|
279
336
|
|
|
337
|
+
function resolveAntigravitySkillPlan(sourceRoot) {
|
|
338
|
+
const relocatedSkillNames = new Set(ANTIGRAVITY_RELOCATED_SKILL_OVERRIDES);
|
|
339
|
+
const manifestPath = path.join(sourceRoot, "harness/manifest.json");
|
|
340
|
+
if (fs.existsSync(manifestPath)) {
|
|
341
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
|
|
342
|
+
for (const skill of manifest.skills || []) {
|
|
343
|
+
if (skill?.invocation === "explicit-only" && skill?.name) {
|
|
344
|
+
relocatedSkillNames.add(skill.name);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
const skippedCommandSkills = new Set(ANTIGRAVITY_SKIP_COMMAND_SKILLS);
|
|
349
|
+
const exposedSkills = [];
|
|
350
|
+
const skillsDir = path.join(sourceRoot, "skills");
|
|
351
|
+
if (fs.existsSync(skillsDir)) {
|
|
352
|
+
const entries = fs
|
|
353
|
+
.readdirSync(skillsDir, { withFileTypes: true })
|
|
354
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
355
|
+
for (const entry of entries) {
|
|
356
|
+
if (!entry.isDirectory() || entry.name === "learn" || relocatedSkillNames.has(entry.name)) {
|
|
357
|
+
continue;
|
|
358
|
+
}
|
|
359
|
+
const skillFile = path.join(skillsDir, entry.name, "SKILL.md");
|
|
360
|
+
if (!fs.existsSync(skillFile)) continue;
|
|
361
|
+
const { data } = parseFrontmatter(fs.readFileSync(skillFile, "utf8"));
|
|
362
|
+
exposedSkills.push({
|
|
363
|
+
name: String(data?.name || entry.name).trim(),
|
|
364
|
+
description: String(data?.description || "").trim(),
|
|
365
|
+
source: "skill",
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
for (const cmdSkill of buildCommandSkills(sourceRoot, skippedCommandSkills, relocatedSkillNames)) {
|
|
370
|
+
exposedSkills.push({
|
|
371
|
+
name: cmdSkill.name,
|
|
372
|
+
description: cmdSkill.description,
|
|
373
|
+
source: "command",
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
return { relocatedSkillNames, skippedCommandSkills, exposedSkills };
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
function hasSymlinkParent(root, target) {
|
|
380
|
+
let cursor = path.dirname(target);
|
|
381
|
+
while (cursor.startsWith(`${root}${path.sep}`)) {
|
|
382
|
+
if (lstatIfExists(cursor)?.isSymbolicLink()) return true;
|
|
383
|
+
cursor = path.dirname(cursor);
|
|
384
|
+
}
|
|
385
|
+
return false;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
function cleanupRelocatedAntigravitySkills({
|
|
389
|
+
pluginRoot,
|
|
390
|
+
sourceRoot,
|
|
391
|
+
relocatedSkillNames,
|
|
392
|
+
skippedCommandSkills,
|
|
393
|
+
dryRun,
|
|
394
|
+
log,
|
|
395
|
+
}) {
|
|
396
|
+
const skillsRoot = path.join(pluginRoot, "skills");
|
|
397
|
+
const skillsRootStat = lstatIfExists(skillsRoot);
|
|
398
|
+
if (!skillsRootStat) return;
|
|
399
|
+
if (skillsRootStat.isSymbolicLink() || !skillsRootStat.isDirectory()) {
|
|
400
|
+
log(`保留异常或符号链接 skills 目录: ${skillsRoot}`);
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
const cleanupTargets = [];
|
|
405
|
+
for (const name of relocatedSkillNames) {
|
|
406
|
+
const known = collectDirectoryFiles(path.join(sourceRoot, "skills", name)).map((item) => item.relPath);
|
|
407
|
+
cleanupTargets.push([name, known.length > 0 ? known : ["SKILL.md"]]);
|
|
408
|
+
}
|
|
409
|
+
for (const name of skippedCommandSkills) {
|
|
410
|
+
cleanupTargets.push([name, ["SKILL.md"]]);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
for (const [skillName, knownFiles] of cleanupTargets) {
|
|
414
|
+
const skillRoot = path.join(skillsRoot, skillName);
|
|
415
|
+
const rootStat = lstatIfExists(skillRoot);
|
|
416
|
+
if (!rootStat) continue;
|
|
417
|
+
if (rootStat.isSymbolicLink()) {
|
|
418
|
+
log(`保留符号链接旧技能目录: ${skillRoot}`);
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
if (!rootStat.isDirectory()) continue;
|
|
422
|
+
|
|
423
|
+
const directories = new Set([skillRoot]);
|
|
424
|
+
for (const rel of knownFiles) {
|
|
425
|
+
const target = path.join(skillRoot, rel);
|
|
426
|
+
if (hasSymlinkParent(skillRoot, target)) {
|
|
427
|
+
log(`保留经过符号链接的旧技能文件: ${target}`);
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
let cursor = path.dirname(target);
|
|
431
|
+
while (cursor.startsWith(`${skillRoot}${path.sep}`)) {
|
|
432
|
+
directories.add(cursor);
|
|
433
|
+
cursor = path.dirname(cursor);
|
|
434
|
+
}
|
|
435
|
+
const stat = lstatIfExists(target);
|
|
436
|
+
if (!stat) continue;
|
|
437
|
+
if (stat.isSymbolicLink() || !stat.isFile()) {
|
|
438
|
+
log(`保留符号链接或非文件旧技能路径: ${target}`);
|
|
439
|
+
continue;
|
|
440
|
+
}
|
|
441
|
+
log(`${dryRun ? "[dry-run] " : ""}清理已迁移技能文件: ${target}`);
|
|
442
|
+
if (!dryRun) {
|
|
443
|
+
if (process.platform === "win32" && !(stat.mode & 0o200)) {
|
|
444
|
+
fs.chmodSync(target, stat.mode | 0o200);
|
|
445
|
+
}
|
|
446
|
+
fs.unlinkSync(target);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
if (!dryRun) {
|
|
451
|
+
for (const dir of [...directories].sort((a, b) => b.length - a.length)) {
|
|
452
|
+
if (dir !== skillRoot && hasSymlinkParent(skillRoot, dir)) continue;
|
|
453
|
+
const dirStat = lstatIfExists(dir);
|
|
454
|
+
if (
|
|
455
|
+
dirStat &&
|
|
456
|
+
!dirStat.isSymbolicLink() &&
|
|
457
|
+
dirStat.isDirectory() &&
|
|
458
|
+
fs.readdirSync(dir).length === 0
|
|
459
|
+
) {
|
|
460
|
+
fs.rmdirSync(dir);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
if (lstatIfExists(skillRoot)) {
|
|
464
|
+
log(`保留已迁移技能目录中的个人文件: ${skillRoot}`);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
280
470
|
function runRetiredSkillCleanup(sourceRoot, pluginRoot, dryRun, log) {
|
|
281
471
|
const script = path.join(sourceRoot, "scripts/cleanup-retired-skills.js");
|
|
282
472
|
const args = [script, pluginRoot];
|
|
@@ -303,9 +493,15 @@ function installAntigravity({
|
|
|
303
493
|
const pluginRoot = assertNoSymlinkAncestors(homeDir);
|
|
304
494
|
log(`${dryRun ? "[dry-run] " : ""}Installing Antigravity plugin to ${pluginRoot}`);
|
|
305
495
|
|
|
496
|
+
const { relocatedSkillNames, skippedCommandSkills } = resolveAntigravitySkillPlan(sourceRoot);
|
|
306
497
|
const refFiles = collectDirectoryFiles(path.join(sourceRoot, "references"), "references");
|
|
307
498
|
const skillFiles = collectDirectoryFiles(path.join(sourceRoot, "skills"), "skills")
|
|
308
|
-
.filter((item) => item.relPath !== "skills/README.md")
|
|
499
|
+
.filter((item) => item.relPath !== "skills/README.md")
|
|
500
|
+
.map((item) => {
|
|
501
|
+
const skillName = item.relPath.split("/")[1];
|
|
502
|
+
if (!relocatedSkillNames.has(skillName)) return item;
|
|
503
|
+
return { ...item, relPath: path.posix.join("references", item.relPath) };
|
|
504
|
+
});
|
|
309
505
|
const learningFiles = collectDirectoryFiles(
|
|
310
506
|
path.join(sourceRoot, "scripts/learning"),
|
|
311
507
|
"scripts/learning",
|
|
@@ -318,7 +514,11 @@ function installAntigravity({
|
|
|
318
514
|
const srcPath = path.join(sourceRoot, relPath);
|
|
319
515
|
return { srcPath, relPath, mode: fs.statSync(srcPath).mode & 0o777 };
|
|
320
516
|
});
|
|
321
|
-
const commandSkills = buildCommandSkills(
|
|
517
|
+
const commandSkills = buildCommandSkills(
|
|
518
|
+
sourceRoot,
|
|
519
|
+
skippedCommandSkills,
|
|
520
|
+
relocatedSkillNames,
|
|
521
|
+
);
|
|
322
522
|
|
|
323
523
|
const managedPaths = [
|
|
324
524
|
BACKUP_ROOT_NAME,
|
|
@@ -363,7 +563,7 @@ function installAntigravity({
|
|
|
363
563
|
writeManagedFile({
|
|
364
564
|
pluginRoot,
|
|
365
565
|
relative: "rules/AGENTS.md",
|
|
366
|
-
content: fs.readFileSync(path.join(sourceRoot, "AGENTS.md")),
|
|
566
|
+
content: tailorAntigravityAgents(fs.readFileSync(path.join(sourceRoot, "AGENTS.md"), "utf8")),
|
|
367
567
|
backupId,
|
|
368
568
|
dryRun,
|
|
369
569
|
log,
|
|
@@ -376,10 +576,21 @@ function installAntigravity({
|
|
|
376
576
|
log,
|
|
377
577
|
});
|
|
378
578
|
|
|
579
|
+
const transformForHost = (relative, text) =>
|
|
580
|
+
rewriteAntigravityReferences(relative, text, relocatedSkillNames);
|
|
581
|
+
|
|
379
582
|
for (const item of [...refFiles, ...skillFiles, ...learningFiles, ...hookFiles]) {
|
|
380
583
|
let content = fs.readFileSync(item.srcPath);
|
|
381
|
-
if (
|
|
382
|
-
|
|
584
|
+
if (
|
|
585
|
+
(item.relPath.startsWith("skills/") || item.relPath.startsWith("references/skills/")) &&
|
|
586
|
+
item.relPath.endsWith(".md")
|
|
587
|
+
) {
|
|
588
|
+
content = transformForHost(item.relPath, content.toString("utf8"));
|
|
589
|
+
} else if (
|
|
590
|
+
item.relPath.startsWith("references/skills/") &&
|
|
591
|
+
/\.(?:c|m)?js$/.test(item.relPath)
|
|
592
|
+
) {
|
|
593
|
+
content = rewriteRelocatedSkillScript(content.toString("utf8"));
|
|
383
594
|
}
|
|
384
595
|
writeManagedFile({
|
|
385
596
|
pluginRoot,
|
|
@@ -407,9 +618,17 @@ function installAntigravity({
|
|
|
407
618
|
backupId,
|
|
408
619
|
dryRun,
|
|
409
620
|
log,
|
|
410
|
-
transformContent:
|
|
621
|
+
transformContent: transformForHost,
|
|
411
622
|
});
|
|
412
623
|
|
|
624
|
+
cleanupRelocatedAntigravitySkills({
|
|
625
|
+
pluginRoot,
|
|
626
|
+
sourceRoot,
|
|
627
|
+
relocatedSkillNames,
|
|
628
|
+
skippedCommandSkills,
|
|
629
|
+
dryRun,
|
|
630
|
+
log,
|
|
631
|
+
});
|
|
413
632
|
runRetiredSkillCleanup(sourceRoot, pluginRoot, dryRun, log);
|
|
414
633
|
finalizeBackups({ installRoot: pluginRoot, dryRun, log });
|
|
415
634
|
|
|
@@ -421,7 +640,12 @@ function installAntigravity({
|
|
|
421
640
|
return pluginRoot;
|
|
422
641
|
}
|
|
423
642
|
|
|
424
|
-
module.exports = {
|
|
643
|
+
module.exports = {
|
|
644
|
+
PLUGIN_SUBPATH,
|
|
645
|
+
installAntigravity,
|
|
646
|
+
parseFrontmatter,
|
|
647
|
+
resolveAntigravitySkillPlan,
|
|
648
|
+
};
|
|
425
649
|
|
|
426
650
|
function parseCli(argv) {
|
|
427
651
|
let dryRun = false;
|
|
@@ -115,6 +115,31 @@
|
|
|
115
115
|
"e2e-testing": [
|
|
116
116
|
"SKILL.md",
|
|
117
117
|
"references/playwright-patterns.md"
|
|
118
|
+
],
|
|
119
|
+
"visual-companion": [
|
|
120
|
+
"SKILL.md",
|
|
121
|
+
"agents/openai.yaml",
|
|
122
|
+
"references/guide.md",
|
|
123
|
+
"scripts/frame-template.html",
|
|
124
|
+
"scripts/helper.js",
|
|
125
|
+
"scripts/pages.cjs",
|
|
126
|
+
"scripts/server-utils.cjs",
|
|
127
|
+
"scripts/server.cjs",
|
|
128
|
+
"scripts/start-server.sh",
|
|
129
|
+
"scripts/stop-server.sh",
|
|
130
|
+
"scripts/websocket.cjs"
|
|
131
|
+
],
|
|
132
|
+
"prototype": [
|
|
133
|
+
"SKILL.md",
|
|
134
|
+
"references/logic.md",
|
|
135
|
+
"references/ui.md"
|
|
136
|
+
],
|
|
137
|
+
"domain-modeling": [
|
|
138
|
+
"SKILL.md"
|
|
139
|
+
],
|
|
140
|
+
"improve-codebase-architecture": [
|
|
141
|
+
"SKILL.md",
|
|
142
|
+
"agents/openai.yaml"
|
|
118
143
|
]
|
|
119
144
|
}
|
|
120
145
|
}
|
|
@@ -41,17 +41,18 @@
|
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"upstream": "domain-modeling",
|
|
44
|
-
"status": "
|
|
44
|
+
"status": "excluded",
|
|
45
45
|
"evidence": [
|
|
46
|
-
"
|
|
47
|
-
|
|
46
|
+
"scripts/retired-skill-files.json",
|
|
47
|
+
"skills/spec-gate/SKILL.md"
|
|
48
|
+
],
|
|
49
|
+
"reason": "Standalone domain-modeling Skill is retired; consequential domain changes go through grilling and spec-gate."
|
|
48
50
|
},
|
|
49
51
|
{
|
|
50
52
|
"upstream": "grill-with-docs",
|
|
51
53
|
"status": "adapted",
|
|
52
54
|
"evidence": [
|
|
53
|
-
"skills/grilling/SKILL.md"
|
|
54
|
-
"skills/domain-modeling/SKILL.md"
|
|
55
|
+
"skills/grilling/SKILL.md"
|
|
55
56
|
]
|
|
56
57
|
},
|
|
57
58
|
{
|
|
@@ -65,17 +66,19 @@
|
|
|
65
66
|
"upstream": "improve-codebase-architecture",
|
|
66
67
|
"status": "adapted",
|
|
67
68
|
"evidence": [
|
|
68
|
-
"skills/
|
|
69
|
-
|
|
69
|
+
"skills/codebase-design/SKILL.md",
|
|
70
|
+
"skills/codebase-design/references/deepening.md"
|
|
71
|
+
],
|
|
72
|
+
"reason": "Standalone audit Skill is retired; codebase-design covers deep-module design and read-only audit."
|
|
70
73
|
},
|
|
71
74
|
{
|
|
72
75
|
"upstream": "prototype",
|
|
73
|
-
"status": "
|
|
76
|
+
"status": "excluded",
|
|
74
77
|
"evidence": [
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
"scripts/retired-skill-files.json",
|
|
79
|
+
"README.md"
|
|
80
|
+
],
|
|
81
|
+
"reason": "Standalone throwaway prototype and visual-companion Skills are retired to keep the resident skill surface lean."
|
|
79
82
|
},
|
|
80
83
|
{
|
|
81
84
|
"upstream": "research",
|
|
@@ -145,7 +148,7 @@
|
|
|
145
148
|
"upstream": "handoff",
|
|
146
149
|
"source_group": "productivity",
|
|
147
150
|
"status": "adapted",
|
|
148
|
-
"reason": "The promoted Engineering router requires it for
|
|
151
|
+
"reason": "The promoted Engineering router requires it for context-window crossings.",
|
|
149
152
|
"evidence": [
|
|
150
153
|
"skills/handoff/SKILL.md",
|
|
151
154
|
"skills/using-superpowers/SKILL.md"
|
|
@@ -658,19 +658,92 @@ function checkInstallerEntrypoint() {
|
|
|
658
658
|
assert.equal(manifest.name, pkg.name);
|
|
659
659
|
assert.equal(manifest.version, pkg.version);
|
|
660
660
|
assert.deepEqual(fs.readdirSync(path.join(agRoot, "rules")), ["AGENTS.md"]);
|
|
661
|
-
|
|
661
|
+
const agAgents = read(path.join(agRoot, "rules/AGENTS.md"));
|
|
662
|
+
assert.match(agAgents, /plugins\/claude-everything-workflow\/references\/rules\//);
|
|
663
|
+
assert.doesNotMatch(agAgents, /~\/\.codex\/rules\//);
|
|
664
|
+
assert.doesNotMatch(agAgents, /~\/\.claude\/rules\//);
|
|
662
665
|
assert.equal(read(path.join(agRoot, "references/rules/common/testing.md")),
|
|
663
666
|
read(path.join(sourceRoot, "rules/common/testing.md")));
|
|
664
667
|
assert.equal(fs.existsSync(path.join(agRoot, "skills/README.md")), false);
|
|
665
668
|
const agSkills = fs.readdirSync(path.join(agRoot, "skills"), { withFileTypes: true })
|
|
666
669
|
.filter((entry) => entry.isDirectory());
|
|
667
|
-
assert.equal(agSkills.length,
|
|
670
|
+
assert.equal(agSkills.length, 15);
|
|
671
|
+
for (const relocated of ["implement", "to-spec", "continuous-learning-v2"]) {
|
|
672
|
+
assert.equal(
|
|
673
|
+
fs.existsSync(path.join(agRoot, "skills", relocated)),
|
|
674
|
+
false,
|
|
675
|
+
`Antigravity must not expose redundant top-level skills/${relocated}`,
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
for (const relRef of [
|
|
679
|
+
"references/skills/implement/SKILL.md",
|
|
680
|
+
"references/skills/implement/references/ticket-delivery.md",
|
|
681
|
+
"references/skills/implement/references/parallel-delivery.md",
|
|
682
|
+
"references/skills/continuous-learning-v2/SKILL.md",
|
|
683
|
+
"references/skills/continuous-learning-v2/hooks/observe-v2.js",
|
|
684
|
+
]) {
|
|
685
|
+
assert.equal(fs.existsSync(path.join(agRoot, relRef)), true, `missing relocated file: ${relRef}`);
|
|
686
|
+
}
|
|
687
|
+
// Relocated observe-v2.js resolves scripts/learning/project-utils cleanly in default and enabled modes.
|
|
688
|
+
{
|
|
689
|
+
const relocatedObserve = path.join(agRoot, "references/skills/continuous-learning-v2/hooks/observe-v2.js");
|
|
690
|
+
const disabledHome = path.join(tempRoot, "ag-observe-disabled");
|
|
691
|
+
fs.mkdirSync(disabledHome, { recursive: true });
|
|
692
|
+
const disabledRes = spawnSync(process.execPath, [relocatedObserve, "post"], {
|
|
693
|
+
cwd: agRoot,
|
|
694
|
+
env: { ...process.env, HOME: disabledHome, USERPROFILE: disabledHome },
|
|
695
|
+
input: "{}",
|
|
696
|
+
encoding: "utf8",
|
|
697
|
+
timeout: 10000,
|
|
698
|
+
});
|
|
699
|
+
assert.ifError(disabledRes.error);
|
|
700
|
+
assert.equal(disabledRes.status, 0, disabledRes.stderr);
|
|
701
|
+
assert.equal(disabledRes.stderr, "");
|
|
702
|
+
|
|
703
|
+
const enabledHome = path.join(tempRoot, "ag-observe-enabled");
|
|
704
|
+
const cfgDir = path.join(enabledHome, ".claude/skills/continuous-learning-v2");
|
|
705
|
+
const obsPath = path.join(enabledHome, ".claude/homunculus/observations.jsonl");
|
|
706
|
+
fs.mkdirSync(cfgDir, { recursive: true });
|
|
707
|
+
const baseCfg = JSON.parse(read(path.join(sourceRoot, "skills/continuous-learning-v2/config.json")));
|
|
708
|
+
baseCfg.observation = {
|
|
709
|
+
...baseCfg.observation,
|
|
710
|
+
enabled: true,
|
|
711
|
+
store_path: "~/.claude/homunculus/observations.jsonl",
|
|
712
|
+
};
|
|
713
|
+
fs.writeFileSync(path.join(cfgDir, "config.json"), JSON.stringify(baseCfg, null, 2));
|
|
714
|
+
|
|
715
|
+
const enabledRes = spawnSync(process.execPath, [relocatedObserve, "post"], {
|
|
716
|
+
cwd: agRoot,
|
|
717
|
+
env: { ...process.env, HOME: enabledHome, USERPROFILE: enabledHome },
|
|
718
|
+
input: JSON.stringify({ tool: "Edit", cwd: sourceRoot, tool_input: { file_path: "README.md" } }),
|
|
719
|
+
encoding: "utf8",
|
|
720
|
+
timeout: 10000,
|
|
721
|
+
});
|
|
722
|
+
assert.ifError(enabledRes.error);
|
|
723
|
+
assert.equal(enabledRes.status, 0, enabledRes.stderr);
|
|
724
|
+
assert.equal(enabledRes.stderr, "");
|
|
725
|
+
const firstRecord = JSON.parse(read(obsPath).trim().split(/\r?\n/)[0]);
|
|
726
|
+
assert.equal(firstRecord.tool, "Edit");
|
|
727
|
+
assert.equal(firstRecord.event, "tool_complete");
|
|
728
|
+
}
|
|
668
729
|
for (const dir of agSkills) {
|
|
669
730
|
const skillMd = read(path.join(agRoot, "skills", dir.name, "SKILL.md"));
|
|
670
731
|
assert.match(skillMd, new RegExp(`^---\\nname: ${dir.name}\\ndescription: .+`, "m"));
|
|
671
732
|
}
|
|
672
733
|
assert.doesNotMatch(read(path.join(agRoot, "skills/pr/SKILL.md")), /\$ARGUMENTS/);
|
|
673
734
|
assert.doesNotMatch(read(path.join(agRoot, "skills/learn/SKILL.md")), /\$ARGUMENTS/);
|
|
735
|
+
assert.match(
|
|
736
|
+
read(path.join(agRoot, "skills/using-superpowers/SKILL.md")),
|
|
737
|
+
/read-reference ~\/\.gemini\/config\/plugins\/claude-everything-workflow\/references\/skills\/implement\/SKILL\.md/,
|
|
738
|
+
);
|
|
739
|
+
assert.match(
|
|
740
|
+
read(path.join(agRoot, "skills/learn/SKILL.md")),
|
|
741
|
+
/~\/\.gemini\/config\/plugins\/claude-everything-workflow\/references\/skills\/continuous-learning-v2\/SKILL\.md/,
|
|
742
|
+
);
|
|
743
|
+
assert.match(
|
|
744
|
+
read(path.join(agRoot, "references/rules/common/agent-orchestration.md")),
|
|
745
|
+
/plugins\/claude-everything-workflow\/references\/skills\/implement\/references\/parallel-delivery\.md/,
|
|
746
|
+
);
|
|
674
747
|
assert.equal(fs.existsSync(path.join(agRoot, "agents")), false,
|
|
675
748
|
"Antigravity plugin must not install retired agents directory");
|
|
676
749
|
assert.equal(fs.existsSync(path.join(agRoot, "references/agents")), false,
|
|
@@ -703,7 +776,11 @@ function checkInstallerEntrypoint() {
|
|
|
703
776
|
read(path.join(agRoot, "references/rules/05-git-workflow.md")),
|
|
704
777
|
/~\/\.gemini\/config\/plugins\/claude-everything-workflow\/skills\/pr\/SKILL\.md/,
|
|
705
778
|
);
|
|
706
|
-
assert.doesNotMatch(read(path.join(agRoot, "skills/continuous-learning-v2/SKILL.md")), /`commands\/`/);
|
|
779
|
+
assert.doesNotMatch(read(path.join(agRoot, "references/skills/continuous-learning-v2/SKILL.md")), /`commands\/`/);
|
|
780
|
+
assert.match(
|
|
781
|
+
read(path.join(agRoot, "references/skills/continuous-learning-v2/SKILL.md")),
|
|
782
|
+
/~\/\.gemini\/config\/plugins\/claude-everything-workflow\/skills\/learn\/SKILL\.md/,
|
|
783
|
+
);
|
|
707
784
|
|
|
708
785
|
// Re-running Antigravity install with unchanged files must not create a spurious backup.
|
|
709
786
|
const agBackups = path.join(agRoot, BACKUP_ROOT_NAME);
|
|
@@ -806,6 +883,11 @@ function checkAntigravityOnlyInstaller() {
|
|
|
806
883
|
fs.mkdirSync(path.join(agRoot, "skills/research"), { recursive: true });
|
|
807
884
|
fs.writeFileSync(path.join(agRoot, "skills/research/SKILL.md"), "Old distributed content\n");
|
|
808
885
|
fs.writeFileSync(path.join(agRoot, "skills/research/personal-notes.md"), "Keep my notes\n");
|
|
886
|
+
for (const retired of ["visual-companion", "prototype", "domain-modeling", "improve-codebase-architecture"]) {
|
|
887
|
+
fs.mkdirSync(path.join(agRoot, "skills", retired), { recursive: true });
|
|
888
|
+
fs.writeFileSync(path.join(agRoot, "skills", retired, "SKILL.md"), `Old ${retired}\n`);
|
|
889
|
+
}
|
|
890
|
+
fs.writeFileSync(path.join(agRoot, "skills/prototype/user-note.md"), "Keep prototype note\n");
|
|
809
891
|
fs.writeFileSync(legacyAgents, "Keep legacy user file\n");
|
|
810
892
|
|
|
811
893
|
const runCli = (extra = []) => {
|
|
@@ -833,6 +915,11 @@ function checkAntigravityOnlyInstaller() {
|
|
|
833
915
|
assert.match(first.stdout, /\.gemini[\\/]AGENTS\.md/);
|
|
834
916
|
assert.equal(fs.existsSync(path.join(agRoot, "skills/research/SKILL.md")), false);
|
|
835
917
|
assert.equal(read(path.join(agRoot, "skills/research/personal-notes.md")), "Keep my notes\n");
|
|
918
|
+
for (const retired of ["visual-companion", "domain-modeling", "improve-codebase-architecture"]) {
|
|
919
|
+
assert.equal(fs.existsSync(path.join(agRoot, "skills", retired)), false, `retired ${retired} must be cleaned`);
|
|
920
|
+
}
|
|
921
|
+
assert.equal(fs.existsSync(path.join(agRoot, "skills/prototype/SKILL.md")), false);
|
|
922
|
+
assert.equal(read(path.join(agRoot, "skills/prototype/user-note.md")), "Keep prototype note\n");
|
|
836
923
|
|
|
837
924
|
const agImpl = path.join(agRoot, "references/rules/02-implementation.md");
|
|
838
925
|
const customized = read(agImpl) + "\nKeep Antigravity personal rule.\n";
|
|
@@ -955,6 +1042,53 @@ function checkAntigravityEdgeCases() {
|
|
|
955
1042
|
true,
|
|
956
1043
|
);
|
|
957
1044
|
}
|
|
1045
|
+
|
|
1046
|
+
// 7. Upgrade cleanup removes legacy top-level relocated/skipped skills safely.
|
|
1047
|
+
{
|
|
1048
|
+
const upgradeHome = path.join(tempRoot, "ag-relocate-upgrade-home");
|
|
1049
|
+
const upgradePlugin = path.join(upgradeHome, ".gemini/config/plugins/claude-everything-workflow");
|
|
1050
|
+
const outsideTarget = path.join(tempRoot, "ag-outside-tospec");
|
|
1051
|
+
fs.mkdirSync(outsideTarget, { recursive: true });
|
|
1052
|
+
fs.writeFileSync(path.join(outsideTarget, "SKILL.md"), "Outside content must stay\n");
|
|
1053
|
+
|
|
1054
|
+
const legacyImplement = path.join(upgradePlugin, "skills/implement");
|
|
1055
|
+
const legacyClv2 = path.join(upgradePlugin, "skills/continuous-learning-v2");
|
|
1056
|
+
fs.mkdirSync(path.join(legacyImplement, "references"), { recursive: true });
|
|
1057
|
+
fs.mkdirSync(path.join(legacyClv2, "hooks"), { recursive: true });
|
|
1058
|
+
fs.writeFileSync(path.join(legacyImplement, "SKILL.md"), "Old implement\n");
|
|
1059
|
+
fs.writeFileSync(path.join(legacyImplement, "references/ticket-delivery.md"), "Old ref\n");
|
|
1060
|
+
fs.writeFileSync(path.join(legacyImplement, "personal-notes.md"), "Keep personal notes\n");
|
|
1061
|
+
fs.writeFileSync(path.join(legacyClv2, "SKILL.md"), "Old clv2\n");
|
|
1062
|
+
fs.writeFileSync(path.join(legacyClv2, "hooks/observe-v2.js"), "Old hook\n");
|
|
1063
|
+
fs.symlinkSync(
|
|
1064
|
+
outsideTarget,
|
|
1065
|
+
path.join(upgradePlugin, "skills/to-spec"),
|
|
1066
|
+
process.platform === "win32" ? "junction" : "dir",
|
|
1067
|
+
);
|
|
1068
|
+
|
|
1069
|
+
installAntigravity({ sourceRoot, homeDir: upgradeHome, dryRun: true, log: () => {} });
|
|
1070
|
+
assert.equal(fs.existsSync(path.join(legacyImplement, "SKILL.md")), true, "dry-run must not delete legacy files");
|
|
1071
|
+
assert.equal(fs.existsSync(path.join(legacyClv2, "SKILL.md")), true, "dry-run must not delete legacy clv2");
|
|
1072
|
+
|
|
1073
|
+
installAntigravity({ sourceRoot, homeDir: upgradeHome, log: () => {} });
|
|
1074
|
+
assert.equal(fs.existsSync(path.join(legacyImplement, "SKILL.md")), false);
|
|
1075
|
+
assert.equal(fs.existsSync(path.join(legacyImplement, "references/ticket-delivery.md")), false);
|
|
1076
|
+
assert.equal(read(path.join(legacyImplement, "personal-notes.md")), "Keep personal notes\n");
|
|
1077
|
+
assert.equal(fs.existsSync(legacyClv2), false);
|
|
1078
|
+
assert.equal(read(path.join(outsideTarget, "SKILL.md")), "Outside content must stay\n");
|
|
1079
|
+
assert.equal(fs.lstatSync(path.join(upgradePlugin, "skills/to-spec")).isSymbolicLink(), true);
|
|
1080
|
+
|
|
1081
|
+
// Non-symlink legacy skills/to-spec/SKILL.md is also removed on upgrade.
|
|
1082
|
+
const toSpecHome = path.join(tempRoot, "ag-tospec-upgrade-home");
|
|
1083
|
+
const legacyToSpec = path.join(
|
|
1084
|
+
toSpecHome,
|
|
1085
|
+
".gemini/config/plugins/claude-everything-workflow/skills/to-spec",
|
|
1086
|
+
);
|
|
1087
|
+
fs.mkdirSync(legacyToSpec, { recursive: true });
|
|
1088
|
+
fs.writeFileSync(path.join(legacyToSpec, "SKILL.md"), "Old to-spec\n");
|
|
1089
|
+
installAntigravity({ sourceRoot, homeDir: toSpecHome, log: () => {} });
|
|
1090
|
+
assert.equal(fs.existsSync(legacyToSpec), false);
|
|
1091
|
+
}
|
|
958
1092
|
}
|
|
959
1093
|
|
|
960
1094
|
try {
|
|
@@ -21,10 +21,14 @@ function validate(compatibility, invocation, claudeFlag, policy) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const both = ["claude-code", "codex"];
|
|
24
|
+
const allHosts = ["claude-code", "codex", "antigravity"];
|
|
24
25
|
const disabledPolicy = "policy:\n allow_implicit_invocation: false\n";
|
|
25
26
|
assert.match(validate(both, "explicit-only", true), /codex.*disable implicit invocation/i);
|
|
26
27
|
assert.match(validate(both, "explicit-only", false, disabledPolicy), /claude-code.*disable implicit invocation/i);
|
|
27
28
|
assert.equal(validate(both, "explicit-only", true, disabledPolicy), "");
|
|
29
|
+
assert.equal(validate(allHosts, "explicit-only", true, disabledPolicy), "");
|
|
30
|
+
assert.equal(validate(allHosts, "implicit", false), "");
|
|
31
|
+
assert.equal(validate(["antigravity"], "explicit-only", false), "");
|
|
28
32
|
assert.equal(validate(["claude-code"], "explicit-only", true), "");
|
|
29
33
|
assert.equal(validate(["codex"], "explicit-only", false, disabledPolicy), "");
|
|
30
34
|
assert.match(validate(["codex"], "explicit-only", false,
|
|
@@ -76,7 +80,7 @@ assert.equal(implement?.invocation, "explicit-only");
|
|
|
76
80
|
const routerBody = fs.readFileSync(path.join(root, "skills/using-superpowers/SKILL.md"), "utf8");
|
|
77
81
|
assert.match(routerBody, /-> read-reference skills\/implement\/SKILL\.md/);
|
|
78
82
|
assert.deepEqual(validateNativeRoutes(manifest, routerBody), []);
|
|
79
|
-
for (const name of ["handoff", "
|
|
83
|
+
for (const name of ["handoff", "triage"]) {
|
|
80
84
|
const entry = manifest.skills.find((skill) => skill.name === name);
|
|
81
85
|
assert.equal(entry?.invocation, "implicit", name);
|
|
82
86
|
const body = fs.readFileSync(path.join(root, entry.path), "utf8");
|
|
@@ -85,7 +89,19 @@ for (const name of ["handoff", "improve-codebase-architecture", "triage"]) {
|
|
|
85
89
|
const policy = YAML.parse(fs.readFileSync(path.join(root, "skills", name, "agents/openai.yaml"), "utf8"));
|
|
86
90
|
assert.equal(policy.policy.allow_implicit_invocation, true, name);
|
|
87
91
|
}
|
|
88
|
-
for (const name of [
|
|
92
|
+
for (const name of [
|
|
93
|
+
"research",
|
|
94
|
+
"wayfinder",
|
|
95
|
+
"find-skills",
|
|
96
|
+
"project-context",
|
|
97
|
+
"iterative-retrieval",
|
|
98
|
+
"using-git-worktrees",
|
|
99
|
+
"verification-before-completion",
|
|
100
|
+
"visual-companion",
|
|
101
|
+
"prototype",
|
|
102
|
+
"domain-modeling",
|
|
103
|
+
"improve-codebase-architecture",
|
|
104
|
+
]) {
|
|
89
105
|
assert.equal(manifest.skills.some((skill) => skill.name === name), false);
|
|
90
106
|
assert.equal(fs.existsSync(path.join(root, "skills", name, "SKILL.md")), false, name);
|
|
91
107
|
}
|