- Fix workflow frontmatter: remove 'name:' field (Antigravity uses filename as command name), add numbered steps format - Add 6 new workflows: /debug, /tdd, /review, /verify, /finish-branch, /worktree — now 9 slash commands total - Add workflow frontmatter validation to validate command - Update check-pack.mjs for new workflow files - Bump version to 0.3.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
71 lines
2.7 KiB
JavaScript
71 lines
2.7 KiB
JavaScript
import { execFileSync } from "node:child_process";
|
|
import { rm } from "node:fs/promises";
|
|
import { resolve } from "node:path";
|
|
|
|
const raw = execFileSync("npm", ["pack", "--json"], {
|
|
cwd: process.cwd(),
|
|
encoding: "utf8",
|
|
});
|
|
const packResult = JSON.parse(raw);
|
|
|
|
if (!Array.isArray(packResult) || packResult.length === 0) {
|
|
throw new Error("npm pack did not return package metadata");
|
|
}
|
|
|
|
const [{ filename, files }] = packResult;
|
|
if (!filename || !Array.isArray(files)) {
|
|
throw new Error("npm pack output is missing filename or files");
|
|
}
|
|
|
|
const packagedPaths = new Set(files.map((file) => file.path));
|
|
const required = [
|
|
"bin/antigravity-superpowers.js",
|
|
"src/cli.js",
|
|
"src/commands/init.js",
|
|
"src/commands/validate.js",
|
|
"src/commands/list.js",
|
|
"templates/.agent/AGENTS.md",
|
|
"templates/.agent/INSTALL.md",
|
|
"templates/.agent/task.md",
|
|
"templates/.agent/workflows/brainstorm.md",
|
|
"templates/.agent/workflows/write-plan.md",
|
|
"templates/.agent/workflows/execute-plan.md",
|
|
"templates/.agent/workflows/debug.md",
|
|
"templates/.agent/workflows/tdd.md",
|
|
"templates/.agent/workflows/review.md",
|
|
"templates/.agent/workflows/verify.md",
|
|
"templates/.agent/workflows/finish-branch.md",
|
|
"templates/.agent/workflows/worktree.md",
|
|
"templates/.agent/agents/code-reviewer.md",
|
|
"templates/.agent/tests/run-tests.sh",
|
|
"templates/.agent/tests/check-antigravity-profile.sh",
|
|
"templates/.agent/skills/brainstorming/SKILL.md",
|
|
"templates/.agent/skills/executing-plans/SKILL.md",
|
|
"templates/.agent/skills/finishing-a-development-branch/SKILL.md",
|
|
"templates/.agent/skills/receiving-code-review/SKILL.md",
|
|
"templates/.agent/skills/requesting-code-review/SKILL.md",
|
|
"templates/.agent/skills/requesting-code-review/code-reviewer.md",
|
|
"templates/.agent/skills/systematic-debugging/SKILL.md",
|
|
"templates/.agent/skills/test-driven-development/SKILL.md",
|
|
"templates/.agent/skills/using-git-worktrees/SKILL.md",
|
|
"templates/.agent/skills/using-superpowers/SKILL.md",
|
|
"templates/.agent/skills/verification-before-completion/SKILL.md",
|
|
"templates/.agent/skills/writing-plans/SKILL.md",
|
|
"templates/.agent/skills/writing-skills/SKILL.md",
|
|
"templates/.agent/skills/single-flow-task-execution/SKILL.md",
|
|
"templates/.agent/skills/single-flow-task-execution/implementer-prompt.md",
|
|
"templates/.agent/skills/single-flow-task-execution/spec-reviewer-prompt.md",
|
|
"templates/.agent/skills/single-flow-task-execution/code-quality-reviewer-prompt.md",
|
|
];
|
|
|
|
const missing = required.filter((path) => !packagedPaths.has(path));
|
|
if (missing.length > 0) {
|
|
throw new Error(
|
|
`Packaged tarball is missing required files: ${missing.join(", ")}`,
|
|
);
|
|
}
|
|
|
|
await rm(resolve(process.cwd(), filename), { force: true });
|
|
|
|
process.stdout.write("Pack smoke check passed.\n");
|