@jstn-sdk/ma 0.1.4 → 0.1.5

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.
Files changed (112) hide show
  1. package/.codex/config.toml +2 -0
  2. package/.codex/hooks.json +1 -1
  3. package/.codex/prompts/enforcement.md +3 -3
  4. package/.codex/prompts/onboarding.md +14 -29
  5. package/README.md +129 -472
  6. package/bin/ma.js +103 -54
  7. package/docs/README.md +1 -2
  8. package/docs/getting-started.md +37 -402
  9. package/docs/mcp-setup.md +134 -3
  10. package/docs/onboarding.md +11 -41
  11. package/docs/qa/release-readiness-0.1.5.md +77 -0
  12. package/docs/release-spec.md +103 -81
  13. package/docs/skills-publishing.md +54 -187
  14. package/docs/skills.md +141 -78
  15. package/mcp/collections.json +1 -1
  16. package/mcp/fallback.json +1 -1
  17. package/mcp/servers.json +1 -1
  18. package/package.json +14 -17
  19. package/plugins/meta-architect/.app.json +1 -1
  20. package/plugins/meta-architect/.mcp.json +1 -1
  21. package/plugins/meta-architect/README.md +10 -23
  22. package/plugins/meta-architect/skills/meta-architect/SKILL.md +23 -17
  23. package/plugins/meta-architect/skills/meta-architect-arch/SKILL.md +24 -0
  24. package/plugins/meta-architect/skills/meta-architect-build/SKILL.md +25 -0
  25. package/plugins/meta-architect/skills/meta-architect-flow/SKILL.md +23 -0
  26. package/plugins/meta-architect/skills/meta-architect-sage/SKILL.md +23 -0
  27. package/plugins/meta-architect/skills/meta-architect-vet/SKILL.md +23 -0
  28. package/plugins/meta-architect/skills/meta-architect-vibe/SKILL.md +24 -0
  29. package/prompts/architect.md +216 -0
  30. package/prompts/builder.md +10 -0
  31. package/prompts/flow.md +9 -0
  32. package/prompts/release-manager.md +10 -0
  33. package/prompts/sage.md +10 -0
  34. package/prompts/security-reviewer.md +10 -0
  35. package/prompts/verifier.md +10 -0
  36. package/prompts/vibe.md +10 -0
  37. package/scripts/doctor.js +0 -8
  38. package/scripts/skills-install.js +36 -4
  39. package/scripts/skills-manifest.js +1 -1
  40. package/scripts/skills-validate.js +40 -78
  41. package/skills/index.json +22 -22
  42. package/skills/meta-architect/SKILL.md +23 -17
  43. package/skills/meta-architect/agents/openai.yaml +3 -3
  44. package/skills/meta-architect/references/core-release-rules.md +2 -2
  45. package/skills/meta-architect-arch/SKILL.md +24 -0
  46. package/skills/meta-architect-arch/agents/openai.yaml +4 -0
  47. package/skills/meta-architect-build/SKILL.md +25 -0
  48. package/skills/meta-architect-build/agents/openai.yaml +4 -0
  49. package/skills/meta-architect-flow/SKILL.md +23 -0
  50. package/skills/meta-architect-flow/agents/openai.yaml +4 -0
  51. package/skills/meta-architect-sage/SKILL.md +23 -0
  52. package/skills/meta-architect-sage/agents/openai.yaml +4 -0
  53. package/skills/meta-architect-vet/SKILL.md +23 -0
  54. package/skills/meta-architect-vet/agents/openai.yaml +4 -0
  55. package/skills/meta-architect-vibe/SKILL.md +24 -0
  56. package/skills/meta-architect-vibe/agents/openai.yaml +4 -0
  57. package/sprint/00-idea.md +1 -1
  58. package/sprint/01-architecture.md +1 -1
  59. package/sprint/02-oss-evidence.md +1 -1
  60. package/sprint/03-logic.md +1 -1
  61. package/sprint/04-security.md +2 -2
  62. package/sprint/05-dx-ux.md +1 -1
  63. package/src/decision-log.js +4 -4
  64. package/src/doctor.js +30 -0
  65. package/src/launcher.js +17 -21
  66. package/src/mcp-live-client.js +1 -1
  67. package/src/paths.js +32 -8
  68. package/src/release-state.js +3 -3
  69. package/src/setup.js +375 -0
  70. package/src/skills.js +166 -309
  71. package/templates/AGENTS.md +6 -6
  72. package/templates/model-instructions/core.md +1 -1
  73. package/.agents/plugins/marketplace.json +0 -20
  74. package/docs/assets/meta-architect-logo.png +0 -0
  75. package/docs/assets/meta-architect-logo.svg +0 -8
  76. package/docs/installed-sdk.md +0 -60
  77. package/docs/qa/release-readiness-0.1.4.md +0 -79
  78. package/plugins/meta-architect/.codex-plugin/plugin.json +0 -23
  79. package/plugins/meta-architect/skills/arch/SKILL.md +0 -27
  80. package/plugins/meta-architect/skills/arch/agents/openai.yaml +0 -4
  81. package/plugins/meta-architect/skills/build/SKILL.md +0 -24
  82. package/plugins/meta-architect/skills/build/agents/openai.yaml +0 -4
  83. package/plugins/meta-architect/skills/flow/SKILL.md +0 -24
  84. package/plugins/meta-architect/skills/flow/agents/openai.yaml +0 -4
  85. package/plugins/meta-architect/skills/meta-architect/agents/openai.yaml +0 -4
  86. package/plugins/meta-architect/skills/meta-architect/references/core-release-rules.md +0 -13
  87. package/plugins/meta-architect/skills/sage/SKILL.md +0 -24
  88. package/plugins/meta-architect/skills/sage/agents/openai.yaml +0 -4
  89. package/plugins/meta-architect/skills/vet/SKILL.md +0 -25
  90. package/plugins/meta-architect/skills/vet/agents/openai.yaml +0 -4
  91. package/plugins/meta-architect/skills/vibe/SKILL.md +0 -24
  92. package/plugins/meta-architect/skills/vibe/agents/openai.yaml +0 -4
  93. package/scripts/plugin-sync.js +0 -92
  94. package/scripts/postinstall.js +0 -23
  95. package/scripts/release-metadata.js +0 -94
  96. package/scripts/release-sync.js +0 -359
  97. package/scripts/release-verify.js +0 -153
  98. package/scripts/setup-npmrc.js +0 -39
  99. package/skills/arch/SKILL.md +0 -27
  100. package/skills/arch/agents/openai.yaml +0 -4
  101. package/skills/build/SKILL.md +0 -24
  102. package/skills/build/agents/openai.yaml +0 -4
  103. package/skills/flow/SKILL.md +0 -24
  104. package/skills/flow/agents/openai.yaml +0 -4
  105. package/skills/sage/SKILL.md +0 -24
  106. package/skills/sage/agents/openai.yaml +0 -4
  107. package/skills/vet/SKILL.md +0 -25
  108. package/skills/vet/agents/openai.yaml +0 -4
  109. package/skills/vibe/SKILL.md +0 -24
  110. package/skills/vibe/agents/openai.yaml +0 -4
  111. package/src/runtime-artifacts.js +0 -363
  112. package/src/skill-installer.js +0 -198
@@ -1,359 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { execFileSync } from "node:child_process";
4
- import fs from "node:fs";
5
- import path from "node:path";
6
- import process from "node:process";
7
-
8
- const WATCHED_PREFIXES = [
9
- "bin/",
10
- "docs/",
11
- "example/",
12
- "mcp/",
13
- "missions/",
14
- "plugins/",
15
- "prompts/",
16
- ".codex/prompts/",
17
- "sprint/",
18
- "templates/",
19
- "src/",
20
- "skills/",
21
- ];
22
-
23
- const WATCHED_FILES = new Set([
24
- "README.md",
25
- "RELEASE.md",
26
- "CHANGELOG.md",
27
- "package.json",
28
- "package-lock.json",
29
- ]);
30
-
31
- function parseArgs(argv) {
32
- const args = {
33
- bump: "",
34
- fromRef: "",
35
- toRef: "",
36
- githubOutput: "",
37
- force: false,
38
- };
39
-
40
- for (let index = 0; index < argv.length; index += 1) {
41
- const token = argv[index];
42
- if (token === "--bump") {
43
- args.bump = argv[index + 1] ?? "";
44
- index += 1;
45
- continue;
46
- }
47
- if (token === "--from-ref") {
48
- args.fromRef = argv[index + 1] ?? "";
49
- index += 1;
50
- continue;
51
- }
52
- if (token === "--to-ref") {
53
- args.toRef = argv[index + 1] ?? "";
54
- index += 1;
55
- continue;
56
- }
57
- if (token === "--github-output") {
58
- args.githubOutput = argv[index + 1] ?? "";
59
- index += 1;
60
- continue;
61
- }
62
- if (token === "--force") {
63
- args.force = true;
64
- }
65
- }
66
-
67
- return args;
68
- }
69
-
70
- function readJson(file) {
71
- return JSON.parse(fs.readFileSync(file, "utf8"));
72
- }
73
-
74
- function writeJson(file, value) {
75
- fs.writeFileSync(file, `${JSON.stringify(value, null, 2)}\n`);
76
- }
77
-
78
- function readText(file) {
79
- return fs.readFileSync(file, "utf8");
80
- }
81
-
82
- function writeText(file, content) {
83
- fs.writeFileSync(file, content);
84
- }
85
-
86
- function replaceRequired(text, search, replacement, label) {
87
- if (!text.includes(search)) {
88
- throw new Error(`Expected to find ${label}: ${search}`);
89
- }
90
- return text.replaceAll(search, replacement);
91
- }
92
-
93
- function parseVersion(version) {
94
- const match = version.match(/^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)$/);
95
- if (!match?.groups) {
96
- throw new Error(`Unsupported version for release-sync: ${version}`);
97
- }
98
- return {
99
- major: Number(match.groups.major),
100
- minor: Number(match.groups.minor),
101
- patch: Number(match.groups.patch),
102
- };
103
- }
104
-
105
- function bumpVersion(version, bumpKind) {
106
- const parsed = parseVersion(version);
107
- if (bumpKind === "major") {
108
- return `${parsed.major + 1}.0.0`;
109
- }
110
- if (bumpKind === "minor") {
111
- return `${parsed.major}.${parsed.minor + 1}.0`;
112
- }
113
- return `${parsed.major}.${parsed.minor}.${parsed.patch + 1}`;
114
- }
115
-
116
- function git(args) {
117
- return execFileSync("git", args, { encoding: "utf8" }).trim();
118
- }
119
-
120
- function getChangedFiles({ fromRef, toRef, force }) {
121
- if (process.env.RELEASE_SYNC_CHANGED_FILES) {
122
- return process.env.RELEASE_SYNC_CHANGED_FILES.split("\n")
123
- .map((line) => line.trim())
124
- .filter(Boolean);
125
- }
126
-
127
- if (force) {
128
- return [];
129
- }
130
-
131
- if (fromRef && toRef && !/^0+$/.test(fromRef)) {
132
- return git(["diff", "--name-only", fromRef, toRef])
133
- .split("\n")
134
- .map((line) => line.trim())
135
- .filter(Boolean);
136
- }
137
-
138
- return git(["status", "--porcelain"])
139
- .split("\n")
140
- .map((line) => line.slice(3).trim())
141
- .filter(Boolean);
142
- }
143
-
144
- function isWatchedPath(file) {
145
- return WATCHED_FILES.has(file) || WATCHED_PREFIXES.some((prefix) => file.startsWith(prefix));
146
- }
147
-
148
- function prependChangelog(version) {
149
- const changelogPath = "CHANGELOG.md";
150
- const changelog = readText(changelogPath);
151
- if (changelog.includes(`## v${version}`)) {
152
- return;
153
- }
154
-
155
- const next = changelog.replace(
156
- "# Changelog\n\n",
157
- `# Changelog\n\n## v${version}\n\n- Release line prepared automatically for v${version}.\n\n`,
158
- );
159
- writeText(changelogPath, next);
160
- }
161
-
162
- function updateCurrentSurfaceFile(file, oldVersion, nextVersion) {
163
- const oldTag = `v${oldVersion}`;
164
- const nextTag = `v${nextVersion}`;
165
- const oldQa = `release-readiness-${oldVersion}.md`;
166
- const nextQa = `release-readiness-${nextVersion}.md`;
167
- let content = readText(file);
168
- if (content.includes(oldTag)) {
169
- content = content.replaceAll(oldTag, nextTag);
170
- }
171
- if (content.includes(oldVersion)) {
172
- content = content.replaceAll(oldVersion, nextVersion);
173
- }
174
- content = content.replaceAll(oldQa, nextQa);
175
- writeText(file, content);
176
- }
177
-
178
- function syncPackageVersion(nextVersion) {
179
- const pkg = readJson("package.json");
180
- const lock = readJson("package-lock.json");
181
- pkg.version = nextVersion;
182
- lock.version = nextVersion;
183
- if (lock.packages?.[""]) {
184
- lock.packages[""].version = nextVersion;
185
- }
186
- writeJson("package.json", pkg);
187
- writeJson("package-lock.json", lock);
188
- }
189
-
190
- function syncPluginVersions(nextVersion) {
191
- for (const file of [
192
- path.join("plugins", "meta-architect", ".app.json"),
193
- path.join("plugins", "meta-architect", ".mcp.json"),
194
- path.join("plugins", "meta-architect", ".codex-plugin", "plugin.json"),
195
- ]) {
196
- const value = readJson(file);
197
- value.version = nextVersion;
198
- writeJson(file, value);
199
- }
200
- }
201
-
202
- function syncCurrentReleaseFiles(oldVersion, nextVersion) {
203
- for (const file of [
204
- "README.md",
205
- "RELEASE.md",
206
- path.join("docs", "README.md"),
207
- path.join("docs", "getting-started.md"),
208
- path.join("docs", "release-spec.md"),
209
- path.join("plugins", "meta-architect", "README.md"),
210
- ]) {
211
- updateCurrentSurfaceFile(file, oldVersion, nextVersion);
212
- }
213
-
214
- const oldQa = path.join("docs", "qa", `release-readiness-${oldVersion}.md`);
215
- const nextQa = path.join("docs", "qa", `release-readiness-${nextVersion}.md`);
216
- fs.renameSync(oldQa, nextQa);
217
- updateCurrentSurfaceFile(nextQa, oldVersion, nextVersion);
218
- }
219
-
220
- function syncSupportingCode(oldVersion, nextVersion) {
221
- const replacements = [
222
- {
223
- file: path.join("src", "skills.js"),
224
- search: `release-readiness-${oldVersion}.md`,
225
- replacement: `release-readiness-${nextVersion}.md`,
226
- label: "skills QA path",
227
- },
228
- {
229
- file: path.join("src", "mcp-live-client.js"),
230
- search: `version: "${oldVersion}"`,
231
- replacement: `version: "${nextVersion}"`,
232
- label: "mcp live client version",
233
- },
234
- {
235
- file: path.join("test", "package-install-smoke.test.js"),
236
- search: `jstn-sdk-ma-${oldVersion}.tgz`,
237
- replacement: `jstn-sdk-ma-${nextVersion}.tgz`,
238
- label: "tarball filename",
239
- },
240
- {
241
- file: path.join("test", "policy.test.js"),
242
- search: `release/${oldVersion}`,
243
- replacement: `release/${nextVersion}`,
244
- label: "release branch example",
245
- },
246
- ];
247
-
248
- for (const entry of replacements) {
249
- const content = readText(entry.file);
250
- writeText(entry.file, replaceRequired(content, entry.search, entry.replacement, entry.label));
251
- }
252
- }
253
-
254
- function rewriteReleaseState(nextVersion, previousVersion) {
255
- const releasePath = "RELEASE.md";
256
- const qaPath = path.join("docs", "qa", `release-readiness-${nextVersion}.md`);
257
-
258
- let release = readText(releasePath);
259
- release = release.replace(
260
- /- npm package: `@jstn-sdk\/ma@[0-9]+\.[0-9]+\.[0-9]+`/,
261
- `- npm package: \`@jstn-sdk/ma@${nextVersion}\``,
262
- );
263
- release = release.replace(
264
- /- publishability note: .+/,
265
- `- publishability note: \`${previousVersion}\` is already published, so \`${nextVersion}\` is the next publishable package line`,
266
- );
267
- release = release.replace(
268
- /- GitHub release: .+/,
269
- `- GitHub release: pending publish for \`v${nextVersion}\``,
270
- );
271
- release = release.replace(
272
- /- npm publication has not been run yet for `@jstn-sdk\/ma@[0-9]+\.[0-9]+\.[0-9]+`/,
273
- `- npm publication has not been run yet for \`@jstn-sdk/ma@${nextVersion}\``,
274
- );
275
- writeText(releasePath, release);
276
-
277
- let qa = readText(qaPath);
278
- qa = qa.replace(
279
- /- npm package: `@jstn-sdk\/ma@[0-9]+\.[0-9]+\.[0-9]+`/,
280
- `- npm package: \`@jstn-sdk/ma@${nextVersion}\``,
281
- );
282
- qa = qa.replace(
283
- /- publishability note: .+/,
284
- `- publishability note: \`${previousVersion}\` is already published, so \`${nextVersion}\` is the next publishable package line`,
285
- );
286
- qa = qa.replace(
287
- /- GitHub release: .+/,
288
- `- GitHub release: pending publish for \`v${nextVersion}\``,
289
- );
290
- writeText(qaPath, qa);
291
- }
292
-
293
- function writeGithubOutput(outputPath, { updated, version }) {
294
- const lines = [`updated=${updated}`, `version=${version}`];
295
- fs.appendFileSync(outputPath, `${lines.join("\n")}\n`);
296
- }
297
-
298
- function main() {
299
- const args = parseArgs(process.argv.slice(2));
300
- const pkg = readJson("package.json");
301
- const currentVersion = pkg.version;
302
- const changedFiles = getChangedFiles(args);
303
- const relevantChanges = args.force ? ["<forced>"] : changedFiles.filter(isWatchedPath);
304
-
305
- if (relevantChanges.length === 0 && !args.force) {
306
- if (args.githubOutput) {
307
- writeGithubOutput(args.githubOutput, { updated: "false", version: currentVersion });
308
- }
309
- console.log(
310
- JSON.stringify(
311
- {
312
- updated: false,
313
- forced: false,
314
- version: currentVersion,
315
- changedFiles,
316
- },
317
- null,
318
- 2,
319
- ),
320
- );
321
- return;
322
- }
323
-
324
- const bumpKind = args.bump || "patch";
325
- const nextVersion = bumpVersion(currentVersion, bumpKind);
326
-
327
- syncPackageVersion(nextVersion);
328
- syncPluginVersions(nextVersion);
329
- prependChangelog(nextVersion);
330
- syncCurrentReleaseFiles(currentVersion, nextVersion);
331
- syncSupportingCode(currentVersion, nextVersion);
332
- rewriteReleaseState(nextVersion, currentVersion);
333
-
334
- if (args.githubOutput) {
335
- writeGithubOutput(args.githubOutput, { updated: "true", version: nextVersion });
336
- }
337
-
338
- console.log(
339
- JSON.stringify(
340
- {
341
- updated: true,
342
- forced: args.force,
343
- bump: bumpKind,
344
- previousVersion: currentVersion,
345
- version: nextVersion,
346
- changedFiles: relevantChanges,
347
- },
348
- null,
349
- 2,
350
- ),
351
- );
352
- }
353
-
354
- try {
355
- main();
356
- } catch (error) {
357
- console.error(error.message);
358
- process.exitCode = 1;
359
- }
@@ -1,153 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import fs from "node:fs";
4
- import path from "node:path";
5
- import process from "node:process";
6
-
7
- const CANONICAL_PACKAGE = "@jstn-sdk/ma";
8
- const CANONICAL_INSTALL = "npm i -g @openai/codex@latest @jstn-sdk/ma@latest";
9
- const CANONICAL_LAUNCH = "ma --madmax --high";
10
- const UNINSTALL_MA = "npm uninstall -g @jstn-sdk/ma";
11
- const UNINSTALL_BOTH = "npm uninstall -g @jstn-sdk/ma @openai/codex";
12
-
13
- function readJson(file) {
14
- return JSON.parse(fs.readFileSync(file, "utf8"));
15
- }
16
-
17
- function readText(file) {
18
- return fs.readFileSync(file, "utf8");
19
- }
20
-
21
- function fail(message) {
22
- throw new Error(message);
23
- }
24
-
25
- function assert(condition, message) {
26
- if (!condition) {
27
- fail(message);
28
- }
29
- }
30
-
31
- function parseVersion(version) {
32
- const match = version.match(
33
- /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?:-(?<prerelease>[0-9A-Za-z.-]+))?$/,
34
- );
35
- if (!match?.groups) {
36
- fail(`Invalid package version: ${version}`);
37
- }
38
- return match.groups;
39
- }
40
-
41
- function verifyInstallBlock(file) {
42
- const content = readText(file);
43
- if (!content.includes(CANONICAL_INSTALL)) {
44
- return;
45
- }
46
-
47
- assert(content.includes(CANONICAL_LAUNCH), `${file}: missing canonical launch command`);
48
- assert(content.includes(UNINSTALL_MA), `${file}: missing uninstall Meta-Architect command`);
49
- assert(
50
- content.includes(UNINSTALL_BOTH),
51
- `${file}: missing uninstall Meta-Architect + Codex command`,
52
- );
53
- }
54
-
55
- function main() {
56
- const pkg = readJson("package.json");
57
- const lock = readJson("package-lock.json");
58
- const version = pkg.version;
59
- const gitTag = `v${version}`;
60
- const parsed = parseVersion(version);
61
- const isPrerelease = Boolean(parsed.prerelease);
62
-
63
- assert(pkg.name === CANONICAL_PACKAGE, "package.json: wrong package name");
64
- assert(lock.name === CANONICAL_PACKAGE, "package-lock.json: wrong package name");
65
- assert(lock.version === version, "package-lock.json: version drift from package.json");
66
- assert(lock.packages?.[""]?.version === version, "package-lock.json: root package version drift");
67
- assert(
68
- pkg.publishConfig?.access === "public",
69
- "package.json: publishConfig.access must be public",
70
- );
71
-
72
- const changelog = readText("CHANGELOG.md");
73
- assert(changelog.includes(`## ${gitTag}`), "CHANGELOG.md: missing current version heading");
74
-
75
- const release = readText("RELEASE.md");
76
- assert(release.includes(`# Meta-Architect ${gitTag}`), "RELEASE.md: wrong title version");
77
-
78
- const releaseSpec = readText(path.join("docs", "release-spec.md"));
79
- assert(
80
- releaseSpec.includes(`# ${gitTag} Requirements & Rules`),
81
- "docs/release-spec.md: wrong title version",
82
- );
83
- assert(
84
- releaseSpec.includes(`package.json\` version \`${version}\``) ||
85
- releaseSpec.includes(`package.json\` version \`${version}`),
86
- "docs/release-spec.md: missing package version reference",
87
- );
88
- assert(
89
- releaseSpec.includes(`git tag \`${gitTag}\``),
90
- "docs/release-spec.md: missing git tag reference",
91
- );
92
-
93
- const qaPath = path.join("docs", "qa", `release-readiness-${version}.md`);
94
- assert(fs.existsSync(qaPath), `Missing QA release-readiness file: ${qaPath}`);
95
- const qa = readText(qaPath);
96
- assert(qa.includes(`# Release Readiness ${version}`), `${qaPath}: wrong title version`);
97
-
98
- const pluginApp = readJson(path.join("plugins", "meta-architect", ".app.json"));
99
- const pluginMcp = readJson(path.join("plugins", "meta-architect", ".mcp.json"));
100
- const pluginManifest = readJson(
101
- path.join("plugins", "meta-architect", ".codex-plugin", "plugin.json"),
102
- );
103
- assert(pluginApp.version === version, "plugins/meta-architect/.app.json: version drift");
104
- assert(pluginMcp.version === version, "plugins/meta-architect/.mcp.json: version drift");
105
- assert(
106
- pluginManifest.version === version,
107
- "plugins/meta-architect/.codex-plugin/plugin.json: version drift",
108
- );
109
-
110
- for (const file of [
111
- "README.md",
112
- path.join("docs", "getting-started.md"),
113
- path.join("docs", "onboarding.md"),
114
- path.join("docs", "skills.md"),
115
- path.join("plugins", "meta-architect", "README.md"),
116
- ]) {
117
- verifyInstallBlock(file);
118
- }
119
-
120
- const envTag =
121
- process.env.RELEASE_TAG || process.env.GITHUB_REF_NAME || process.env.GIT_TAG || "";
122
- if (envTag.startsWith("v")) {
123
- assert(envTag === gitTag, `Release tag mismatch: expected ${gitTag}, got ${envTag}`);
124
- }
125
-
126
- if (isPrerelease) {
127
- const prereleaseTag = parsed.prerelease.split(".")[0];
128
- assert(
129
- prereleaseTag && prereleaseTag !== "latest",
130
- `Prerelease version ${version} must resolve to an explicit non-latest dist-tag`,
131
- );
132
- }
133
-
134
- console.log(
135
- JSON.stringify(
136
- {
137
- name: pkg.name,
138
- version,
139
- gitTag,
140
- isPrerelease,
141
- },
142
- null,
143
- 2,
144
- ),
145
- );
146
- }
147
-
148
- try {
149
- main();
150
- } catch (error) {
151
- console.error(error.message);
152
- process.exitCode = 1;
153
- }
@@ -1,39 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import fs from "node:fs/promises";
4
- import path from "node:path";
5
- import process from "node:process";
6
-
7
- function normalizeRegistry(registryUrl) {
8
- return registryUrl.endsWith("/") ? registryUrl : `${registryUrl}/`;
9
- }
10
-
11
- async function main() {
12
- const token = process.env.NPM_TOKEN || process.env.NODE_AUTH_TOKEN;
13
- if (!token) {
14
- console.log("No npm token detected. Skipping .npmrc generation.");
15
- return;
16
- }
17
-
18
- const registry = normalizeRegistry(process.env.NPM_REGISTRY_URL || "https://registry.npmjs.org/");
19
- const scope = process.env.NPM_SCOPE || "";
20
- const host = new URL(registry).host;
21
- const npmrcPath = path.join(process.cwd(), ".npmrc");
22
-
23
- const content = [
24
- `registry=${registry}`,
25
- ...(scope ? [`${scope}:registry=${registry}`] : []),
26
- `//${host}/:_authToken=${token}`,
27
- "",
28
- ].join("\n");
29
-
30
- await fs.writeFile(npmrcPath, content, "utf8");
31
- console.log(
32
- `Wrote CI .npmrc for ${scope ? `scope ${scope}` : "the canonical unscoped package"}.`,
33
- );
34
- }
35
-
36
- main().catch((error) => {
37
- console.error(error.message);
38
- process.exitCode = 1;
39
- });
@@ -1,27 +0,0 @@
1
- ---
2
- name: arch
3
- description: "Use when the user wants architecture-first product and system design with explicit stack rationale, boundaries, tradeoffs, data model choices, and phased delivery planning."
4
- ---
5
-
6
- # Arch
7
-
8
- Use this skill inside Codex to turn a product idea into a concrete architecture brief.
9
-
10
- ## Output
11
-
12
- Produce:
13
- - problem framing
14
- - user and workload assumptions
15
- - system architecture and subsystem boundaries
16
- - stack recommendation with tradeoffs
17
- - data model and storage choices
18
- - auth, security, and operational concerns
19
- - phased delivery plan
20
- - top risks and open questions
21
- - exact next trigger, usually `$sage`
22
-
23
- ## Rules
24
-
25
- - Ask only for constraints that materially change the architecture.
26
- - Keep the design biased toward the simplest system that can satisfy the stated requirements.
27
- - Be explicit about tradeoffs, failure modes, and what should stay out of the first version.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "$arch"
3
- short_description: "Architecture-first product and system design"
4
- default_prompt: "Use $arch to produce architecture, stack rationale, subsystem boundaries, tradeoffs, and a phased delivery plan."
@@ -1,24 +0,0 @@
1
- ---
2
- name: build
3
- description: "Use when the user wants to decide whether implementation is ready, what remains blocked, and what the exact next build step should be."
4
- ---
5
-
6
- # Build
7
-
8
- Use this skill inside Codex to convert the earlier review lanes into an implementation-ready decision.
9
-
10
- ## Output
11
-
12
- Produce:
13
- - current readiness verdict
14
- - blockers that still prevent implementation
15
- - the narrowest viable build slice
16
- - branch or worktree suggestions when relevant
17
- - test and verification expectations
18
- - the exact next implementation step
19
-
20
- ## Rules
21
-
22
- - Do not claim readiness if architecture, evidence, logic, security, or DX/UX gaps remain unresolved.
23
- - Keep the recommended build slice small, testable, and reversible.
24
- - If the user wants code immediately and the path is clear, end with a concrete implementation plan rather than more review prose.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "$build"
3
- short_description: "Build-readiness decision and next implementation step"
4
- default_prompt: "Use $build to decide whether implementation is ready, what remains blocked, and what the next build slice should be."
@@ -1,24 +0,0 @@
1
- ---
2
- name: flow
3
- description: "Use when the user wants logic validation: states, transitions, invariants, edge cases, dead ends, and blockers before implementation."
4
- ---
5
-
6
- # Flow
7
-
8
- Use this skill inside Codex to pressure-test how the system behaves, not just how it is structured.
9
-
10
- ## Output
11
-
12
- Produce:
13
- - key actors and system states
14
- - main flows and failure flows
15
- - invariants and state transitions
16
- - race conditions, dead ends, and consistency risks
17
- - missing requirements or ambiguous behavior
18
- - exact next trigger, usually `$vet`
19
-
20
- ## Rules
21
-
22
- - Focus on behavior, not UI polish or low-level code details.
23
- - Surface ambiguity aggressively when it affects correctness.
24
- - Prefer simple state models over sprawling branching logic.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "$flow"
3
- short_description: "Logic, states, transitions, and blockers"
4
- default_prompt: "Use $flow to map business logic, state transitions, invariants, and blockers in the current design."
@@ -1,24 +0,0 @@
1
- ---
2
- name: sage
3
- description: "Use when the user wants evidence-backed technology choices, OSS evaluation, and source-grounded validation of the stack proposed in `$arch`."
4
- ---
5
-
6
- # Sage
7
-
8
- Use this skill inside Codex to verify or challenge stack choices with real sources.
9
-
10
- ## Output
11
-
12
- Produce:
13
- - candidate tools, libraries, or services
14
- - why each option fits or fails the architecture
15
- - source-backed evidence from official docs, upstream repos, or approved GitMCP sources
16
- - recommendation with tradeoffs
17
- - unresolved gaps or missing evidence
18
- - exact next trigger, usually `$flow`
19
-
20
- ## Rules
21
-
22
- - Do not invent package capabilities or maturity claims.
23
- - Prefer primary sources over summaries when validating technical details.
24
- - If the evidence is weak or contradictory, say so clearly and keep the recommendation conditional.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "$sage"
3
- short_description: "Evidence-backed stack and OSS validation"
4
- default_prompt: "Use $sage to validate stack choices with official docs, upstream repos, and approved GitMCP-backed sources."