@jstn-sdk/ma 0.1.11 → 0.1.12

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 (133) hide show
  1. package/.agents/plugins/marketplace.json +0 -0
  2. package/README.md +136 -29
  3. package/bin/ma.js +23 -67
  4. package/docs/README.md +4 -1
  5. package/docs/assets/image/Screenshot(1).png +0 -0
  6. package/docs/assets/image/Screenshot(2).png +0 -0
  7. package/docs/assets/image/Screenshot(3).png +0 -0
  8. package/docs/assets/image/Screenshot(4).png +0 -0
  9. package/docs/assets/image/Screenshot(5).png +0 -0
  10. package/docs/assets/image/Screenshot(6).png +0 -0
  11. package/docs/assets/image/Screenshot(7).png +0 -0
  12. package/docs/assets/image/Screenshot(8).png +0 -0
  13. package/docs/assets/image/Screenshot(9).png +0 -0
  14. package/docs/assets/meta-architect-logo.png +0 -0
  15. package/docs/assets/meta-architect-logo.svg +0 -0
  16. package/docs/getting-started.md +74 -19
  17. package/docs/installed-sdk.md +23 -0
  18. package/docs/mcp-setup.md +30 -1
  19. package/docs/qa/{release-readiness-0.1.11.md → release-readiness-0.1.12.md} +29 -8
  20. package/docs/qa/release-readiness-0.1.5.md +0 -0
  21. package/docs/reference/native-engineering-patterns.md +35 -0
  22. package/docs/reference/native-security-playbooks.md +21 -0
  23. package/docs/reference/native-source-selection.md +21 -0
  24. package/docs/reference/native-style-and-deslop.md +20 -0
  25. package/docs/release-spec.md +21 -10
  26. package/docs/skills-publishing.md +25 -1
  27. package/docs/skills.md +24 -12
  28. package/mcp/local/code-intel.js +113 -0
  29. package/mcp/local/memory.js +46 -0
  30. package/mcp/local/playbooks.js +168 -0
  31. package/mcp/local/state.js +71 -0
  32. package/mcp/local/team-run.js +66 -0
  33. package/mcp/local/trace.js +60 -0
  34. package/mcp/local-capabilities.json +56 -0
  35. package/mcp/native-playbooks.json +117 -0
  36. package/mcp/servers.json +10 -0
  37. package/package.json +4 -1
  38. package/plugins/meta-architect/.app.json +1 -1
  39. package/plugins/meta-architect/.codex-plugin/plugin.json +4 -4
  40. package/plugins/meta-architect/.mcp.json +1 -1
  41. package/plugins/meta-architect/README.md +27 -1
  42. package/plugins/meta-architect/skills/align/SKILL.md +24 -0
  43. package/plugins/meta-architect/skills/align/agents/openai.yaml +4 -0
  44. package/plugins/meta-architect/skills/align/references/shared-language.md +24 -0
  45. package/plugins/meta-architect/skills/arch/SKILL.md +0 -0
  46. package/plugins/meta-architect/skills/arch/agents/openai.yaml +0 -0
  47. package/plugins/meta-architect/skills/build/SKILL.md +0 -0
  48. package/plugins/meta-architect/skills/build/agents/openai.yaml +0 -0
  49. package/plugins/meta-architect/skills/cleanup/SKILL.md +23 -0
  50. package/plugins/meta-architect/skills/cleanup/agents/openai.yaml +4 -0
  51. package/plugins/meta-architect/skills/cleanup/references/style-and-deslop.md +18 -0
  52. package/plugins/meta-architect/skills/diagnose/SKILL.md +24 -0
  53. package/plugins/meta-architect/skills/diagnose/agents/openai.yaml +4 -0
  54. package/plugins/meta-architect/skills/flow/SKILL.md +0 -0
  55. package/plugins/meta-architect/skills/flow/agents/openai.yaml +0 -0
  56. package/plugins/meta-architect/skills/maestro/SKILL.md +36 -3
  57. package/plugins/meta-architect/skills/maestro/agents/openai.yaml +2 -2
  58. package/plugins/meta-architect/skills/{meta-architect → maestro}/references/core-release-rules.md +0 -0
  59. package/plugins/meta-architect/skills/maestro/references/native-ingest-map.md +44 -0
  60. package/plugins/meta-architect/skills/sage/SKILL.md +3 -1
  61. package/plugins/meta-architect/skills/sage/agents/openai.yaml +0 -0
  62. package/plugins/meta-architect/skills/sage/references/source-selection.md +28 -0
  63. package/plugins/meta-architect/skills/tdd/SKILL.md +24 -0
  64. package/plugins/meta-architect/skills/tdd/agents/openai.yaml +4 -0
  65. package/plugins/meta-architect/skills/vet/SKILL.md +3 -1
  66. package/plugins/meta-architect/skills/vet/agents/openai.yaml +0 -0
  67. package/plugins/meta-architect/skills/vet/references/security-playbooks.md +23 -0
  68. package/plugins/meta-architect/skills/vibe/SKILL.md +0 -0
  69. package/plugins/meta-architect/skills/vibe/agents/openai.yaml +0 -0
  70. package/scripts/biome-staged.js +0 -0
  71. package/scripts/build-linux-packages.mjs +328 -0
  72. package/scripts/doctor.js +19 -0
  73. package/scripts/linux-package-lib.mjs +40 -0
  74. package/scripts/linux-package-smoke.mjs +103 -0
  75. package/scripts/plugin-sync.js +0 -0
  76. package/scripts/postinstall.js +0 -0
  77. package/scripts/release-metadata.js +0 -0
  78. package/scripts/release-sync.js +13 -6
  79. package/scripts/release-verify.js +0 -0
  80. package/scripts/setup-npmrc.js +0 -0
  81. package/skills/align/SKILL.md +24 -0
  82. package/skills/align/agents/openai.yaml +4 -0
  83. package/skills/align/references/shared-language.md +24 -0
  84. package/skills/arch/SKILL.md +0 -0
  85. package/skills/arch/agents/openai.yaml +0 -0
  86. package/skills/build/SKILL.md +0 -0
  87. package/skills/build/agents/openai.yaml +0 -0
  88. package/skills/cleanup/SKILL.md +23 -0
  89. package/skills/cleanup/agents/openai.yaml +4 -0
  90. package/skills/cleanup/references/style-and-deslop.md +18 -0
  91. package/skills/diagnose/SKILL.md +24 -0
  92. package/skills/diagnose/agents/openai.yaml +4 -0
  93. package/skills/flow/SKILL.md +0 -0
  94. package/skills/flow/agents/openai.yaml +0 -0
  95. package/skills/index.json +21 -6
  96. package/skills/maestro/SKILL.md +36 -3
  97. package/skills/maestro/agents/openai.yaml +2 -2
  98. package/skills/{meta-architect → maestro}/references/core-release-rules.md +0 -0
  99. package/skills/maestro/references/native-ingest-map.md +44 -0
  100. package/skills/sage/SKILL.md +3 -1
  101. package/skills/sage/agents/openai.yaml +0 -0
  102. package/skills/sage/references/source-selection.md +28 -0
  103. package/skills/tdd/SKILL.md +24 -0
  104. package/skills/tdd/agents/openai.yaml +4 -0
  105. package/skills/vet/SKILL.md +3 -1
  106. package/skills/vet/agents/openai.yaml +0 -0
  107. package/skills/vet/references/security-playbooks.md +23 -0
  108. package/skills/vibe/SKILL.md +0 -0
  109. package/skills/vibe/agents/openai.yaml +0 -0
  110. package/src/bootstrap.js +124 -24
  111. package/src/decision-log.js +12 -9
  112. package/src/launcher.js +0 -0
  113. package/src/mcp-config.js +130 -8
  114. package/src/mcp-live-client.js +1 -1
  115. package/src/paths.js +33 -1
  116. package/src/release-state.js +30 -1
  117. package/src/runtime/build-readiness.js +38 -0
  118. package/src/runtime/continuity-notes.js +79 -0
  119. package/src/runtime/guidance-stack.js +42 -0
  120. package/src/runtime/maestro-manager.js +586 -0
  121. package/src/runtime/orchestrator.js +158 -0
  122. package/src/runtime/runtime-state.js +382 -0
  123. package/src/runtime/signal-hooks.js +52 -0
  124. package/src/runtime/startup-path.js +14 -0
  125. package/src/runtime/workspaces.js +25 -0
  126. package/src/runtime-artifacts.js +190 -30
  127. package/src/skill-installer.js +53 -5
  128. package/src/skills.js +633 -49
  129. package/src/state-sync.js +51 -8
  130. package/plugins/meta-architect/skills/meta-architect/SKILL.md +0 -32
  131. package/plugins/meta-architect/skills/meta-architect/agents/openai.yaml +0 -4
  132. package/skills/meta-architect/SKILL.md +0 -32
  133. package/skills/meta-architect/agents/openai.yaml +0 -4
@@ -5,7 +5,7 @@ description: "Use when the user wants a security and trust-boundary review of th
5
5
 
6
6
  # Vet
7
7
 
8
- Use this skill inside Codex to review security posture before the build lane.
8
+ Use this skill inside Codex to review security posture before the build lane. `$vet` remains the sole security gate even as Meta-Architect ships deeper native security playbooks.
9
9
 
10
10
  ## Output
11
11
 
@@ -21,5 +21,7 @@ Produce:
21
21
  ## Rules
22
22
 
23
23
  - Prioritize material risks over exhaustive but low-value checklists.
24
+ - Use `references/security-playbooks.md` when you need the native security playbook set for common trust-boundary reviews.
25
+ - Keep security guidance product-owned and lane-aware. Do not introduce a second umbrella or a separate security release gate.
24
26
  - Call out missing assumptions that affect security posture.
25
27
  - Distinguish between must-fix blockers and documented accepted risk.
@@ -0,0 +1,23 @@
1
+ # Security Playbooks
2
+
3
+ Use this reference pack inside `$vet` for repeatable trust-boundary reviews that stay native to Meta-Architect.
4
+
5
+ ## Core review slices
6
+
7
+ - identity and session boundaries
8
+ - authorization and tenancy boundaries
9
+ - secret handling and key rotation assumptions
10
+ - dependency and supply-chain trust
11
+ - inbound data validation and outbound data exposure
12
+ - operational abuse cases and failure modes
13
+
14
+ ## How to use the playbooks
15
+
16
+ - Start with the architecture and evidence already approved by `$arch` and `$sage`.
17
+ - Focus on the highest-risk boundary first.
18
+ - Distinguish blockers from accepted risk.
19
+ - Route remediation back to the owning lane rather than creating a parallel security workflow.
20
+
21
+ ## Product boundary
22
+
23
+ This pack deepens `$vet`; it does not create a new security skill family. Security patterns are packaged as Meta-Architect guidance, not as mirrored external catalogs or branded upstream surfaces.
File without changes
File without changes
@@ -0,0 +1,328 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawnSync } from "node:child_process";
4
+ import fsp from "node:fs/promises";
5
+ import os from "node:os";
6
+ import path from "node:path";
7
+ import process from "node:process";
8
+ import {
9
+ getDebArtifactPath,
10
+ getLinuxPackageManifestPath,
11
+ getPackArtifactPath,
12
+ getPacmanArtifactPath,
13
+ getRpmArtifactPath,
14
+ LINUX_PACKAGE_NAME,
15
+ LINUX_PACKAGE_REVISION,
16
+ } from "./linux-package-lib.mjs";
17
+
18
+ const repoRoot = process.cwd();
19
+ const distRoot = path.join(repoRoot, "dist");
20
+ const packageJson = JSON.parse(await fsp.readFile(path.join(repoRoot, "package.json"), "utf8"));
21
+ const version = packageJson.version;
22
+ const packageName = packageJson.name;
23
+ const maintainer = packageJson.author;
24
+ const homepage = packageJson.homepage;
25
+ const description = packageJson.description;
26
+
27
+ function fail(message) {
28
+ throw new Error(message);
29
+ }
30
+
31
+ function run(command, args, options = {}) {
32
+ const result = spawnSync(command, args, {
33
+ encoding: "utf8",
34
+ stdio: "pipe",
35
+ ...options,
36
+ });
37
+ if (result.stdout) {
38
+ process.stdout.write(result.stdout);
39
+ }
40
+ if (result.stderr) {
41
+ process.stderr.write(result.stderr);
42
+ }
43
+ if (result.status !== 0) {
44
+ fail(`${command} ${args.join(" ")} failed with status ${result.status ?? 1}`);
45
+ }
46
+ }
47
+
48
+ async function copyDir(src, dest) {
49
+ await fsp.mkdir(dest, { recursive: true });
50
+ const entries = await fsp.readdir(src, { withFileTypes: true });
51
+ for (const entry of entries) {
52
+ const srcPath = path.join(src, entry.name);
53
+ const destPath = path.join(dest, entry.name);
54
+ if (entry.isDirectory()) {
55
+ await copyDir(srcPath, destPath);
56
+ } else {
57
+ await fsp.copyFile(srcPath, destPath);
58
+ }
59
+ }
60
+ }
61
+
62
+ async function writeExecutable(filePath, content) {
63
+ await fsp.writeFile(filePath, content, { mode: 0o755 });
64
+ await fsp.chmod(filePath, 0o755);
65
+ }
66
+
67
+ async function getInstalledSizeBytes(root) {
68
+ let total = 0;
69
+ const entries = await fsp.readdir(root, { withFileTypes: true });
70
+ for (const entry of entries) {
71
+ const entryPath = path.join(root, entry.name);
72
+ if (entry.isDirectory()) {
73
+ total += await getInstalledSizeBytes(entryPath);
74
+ continue;
75
+ }
76
+ const stat = await fsp.stat(entryPath);
77
+ total += stat.size;
78
+ }
79
+ return total;
80
+ }
81
+
82
+ async function createCommonRoot(root, packArtifactPath) {
83
+ const libRoot = path.join(root, "usr", "lib", LINUX_PACKAGE_NAME);
84
+ const binRoot = path.join(root, "usr", "bin");
85
+ await fsp.mkdir(libRoot, { recursive: true });
86
+ await fsp.mkdir(binRoot, { recursive: true });
87
+ run("tar", ["-xzf", packArtifactPath, "-C", libRoot, "--strip-components=1", "package"], {
88
+ cwd: repoRoot,
89
+ });
90
+
91
+ const wrapper = `#!/bin/sh
92
+ PREFIX="\${META_ARCHITECT_PREFIX:-}"
93
+ NODE_BIN="\${META_ARCHITECT_NODE_BIN:-node}"
94
+ if ! command -v "$NODE_BIN" >/dev/null 2>&1; then
95
+ echo "meta-architect requires nodejs >= 20 on the host system." >&2
96
+ exit 127
97
+ fi
98
+ if ! command -v git >/dev/null 2>&1; then
99
+ echo "meta-architect requires git on the host system." >&2
100
+ exit 127
101
+ fi
102
+ exec "$NODE_BIN" "\${PREFIX}/usr/lib/${LINUX_PACKAGE_NAME}/bin/ma.js" "$@"
103
+ `;
104
+ await writeExecutable(path.join(binRoot, "ma"), wrapper);
105
+ await writeExecutable(path.join(binRoot, "meta-architect"), wrapper);
106
+ }
107
+
108
+ async function buildDeb(commonRoot, artifactPath) {
109
+ const debRoot = `${commonRoot}-deb`;
110
+ await fsp.rm(debRoot, { recursive: true, force: true });
111
+ await copyDir(commonRoot, debRoot);
112
+ const controlRoot = path.join(debRoot, "DEBIAN");
113
+ await fsp.mkdir(controlRoot, { recursive: true });
114
+ await fsp.writeFile(
115
+ path.join(controlRoot, "control"),
116
+ `Package: ${LINUX_PACKAGE_NAME}
117
+ Version: ${version}
118
+ Section: devel
119
+ Priority: optional
120
+ Architecture: all
121
+ Maintainer: ${maintainer}
122
+ Depends: nodejs (>= 20), git
123
+ Description: ${description}
124
+ Meta-Architect installs the Codex-native Meta-Architect workflow surface
125
+ without requiring npm package installation first.
126
+ Homepage: ${homepage}
127
+ `,
128
+ );
129
+ await fsp.rm(artifactPath, { force: true });
130
+ run("dpkg-deb", ["--root-owner-group", "--build", debRoot, artifactPath], { cwd: repoRoot });
131
+ }
132
+
133
+ async function buildPacman(commonRoot, artifactPath) {
134
+ const pacmanRoot = `${commonRoot}-pacman`;
135
+ await fsp.rm(pacmanRoot, { recursive: true, force: true });
136
+ await copyDir(commonRoot, pacmanRoot);
137
+ const installedSize = await getInstalledSizeBytes(path.join(pacmanRoot, "usr"));
138
+ const buildDate = Math.floor(Date.now() / 1000);
139
+ await fsp.writeFile(
140
+ path.join(pacmanRoot, ".PKGINFO"),
141
+ `pkgname = ${LINUX_PACKAGE_NAME}
142
+ pkgbase = ${LINUX_PACKAGE_NAME}
143
+ pkgver = ${version}-${LINUX_PACKAGE_REVISION}
144
+ pkgdesc = ${description}
145
+ url = ${homepage}
146
+ builddate = ${buildDate}
147
+ packager = ${maintainer}
148
+ size = ${installedSize}
149
+ arch = any
150
+ license = MIT
151
+ depend = nodejs
152
+ depend = git
153
+ `,
154
+ );
155
+ await fsp.writeFile(
156
+ path.join(pacmanRoot, ".BUILDINFO"),
157
+ `format = 2
158
+ pkgname = ${LINUX_PACKAGE_NAME}
159
+ pkgbase = ${LINUX_PACKAGE_NAME}
160
+ pkgver = ${version}-${LINUX_PACKAGE_REVISION}
161
+ pkgarch = any
162
+ packager = ${maintainer}
163
+ builddate = ${buildDate}
164
+ `,
165
+ );
166
+ await fsp.rm(artifactPath, { force: true });
167
+ run(
168
+ "tar",
169
+ [
170
+ "--sort=name",
171
+ "--mtime=@0",
172
+ "--owner=0",
173
+ "--group=0",
174
+ "--numeric-owner",
175
+ "-cJf",
176
+ artifactPath,
177
+ "-C",
178
+ pacmanRoot,
179
+ ".PKGINFO",
180
+ ".BUILDINFO",
181
+ "usr",
182
+ ],
183
+ { cwd: repoRoot },
184
+ );
185
+ }
186
+
187
+ async function buildRpm(commonRoot, artifactPath) {
188
+ const rpmRoot = `${commonRoot}-rpmbuild`;
189
+ const topDir = path.join(rpmRoot, "topdir");
190
+ for (const dirName of ["BUILD", "BUILDROOT", "RPMS", "SOURCES", "SPECS", "SRPMS", "TMP", "DB"]) {
191
+ await fsp.mkdir(path.join(topDir, dirName), { recursive: true });
192
+ }
193
+
194
+ const sourceRootName = `${LINUX_PACKAGE_NAME}-${version}`;
195
+ const sourceRoot = path.join(rpmRoot, sourceRootName);
196
+ await fsp.rm(sourceRoot, { recursive: true, force: true });
197
+ await copyDir(commonRoot, sourceRoot);
198
+ const sourceTarPath = path.join(topDir, "SOURCES", `${sourceRootName}.tar.gz`);
199
+ run("tar", ["-czf", sourceTarPath, "-C", rpmRoot, sourceRootName], { cwd: repoRoot });
200
+
201
+ const specPath = path.join(topDir, "SPECS", `${LINUX_PACKAGE_NAME}.spec`);
202
+ await fsp.writeFile(
203
+ specPath,
204
+ `Name: ${LINUX_PACKAGE_NAME}
205
+ Version: ${version}
206
+ Release: ${LINUX_PACKAGE_REVISION}%{?dist}
207
+ Summary: ${description}
208
+ License: MIT
209
+ URL: ${homepage}
210
+ BuildArch: noarch
211
+ Requires: nodejs >= 20
212
+ Requires: git
213
+ Source0: %{name}-%{version}.tar.gz
214
+
215
+ %description
216
+ Meta-Architect installs the Codex-native Meta-Architect workflow surface
217
+ without requiring npm package installation first.
218
+
219
+ %prep
220
+ %setup -q
221
+
222
+ %build
223
+
224
+ %install
225
+ rm -rf %{buildroot}
226
+ mkdir -p %{buildroot}
227
+ cp -a usr %{buildroot}/
228
+
229
+ %files
230
+ /usr/bin/ma
231
+ /usr/bin/meta-architect
232
+ /usr/lib/${LINUX_PACKAGE_NAME}
233
+ `,
234
+ );
235
+
236
+ await fsp.rm(artifactPath, { force: true });
237
+ run(
238
+ "rpmbuild",
239
+ [
240
+ "--define",
241
+ `_topdir ${topDir}`,
242
+ "--define",
243
+ `_tmppath ${path.join(topDir, "TMP")}`,
244
+ "--define",
245
+ `_dbpath ${path.join(topDir, "DB")}`,
246
+ "-bb",
247
+ specPath,
248
+ ],
249
+ {
250
+ cwd: repoRoot,
251
+ env: {
252
+ ...process.env,
253
+ HOME: rpmRoot,
254
+ TMPDIR: path.join(topDir, "TMP"),
255
+ QA_RPATHS: "0x0000",
256
+ },
257
+ },
258
+ );
259
+ const builtRpmPath = path.join(topDir, "RPMS", "noarch", path.basename(artifactPath));
260
+ await fsp.copyFile(builtRpmPath, artifactPath);
261
+ }
262
+
263
+ async function main() {
264
+ if (process.platform !== "linux") {
265
+ fail("Native Linux package builds are supported only on Linux hosts");
266
+ }
267
+
268
+ await fsp.mkdir(distRoot, { recursive: true });
269
+ const packArtifactPath = getPackArtifactPath(distRoot, packageName, version);
270
+ await fsp.rm(packArtifactPath, { force: true });
271
+ run(
272
+ "npm",
273
+ [
274
+ "pack",
275
+ ".",
276
+ "--ignore-scripts",
277
+ "--cache",
278
+ path.join(distRoot, ".npm-cache"),
279
+ "--pack-destination",
280
+ distRoot,
281
+ ],
282
+ { cwd: repoRoot },
283
+ );
284
+
285
+ const workRoot = await fsp.mkdtemp(path.join(os.tmpdir(), "meta-architect-linux-packages-"));
286
+ const commonRoot = path.join(workRoot, "root");
287
+ await createCommonRoot(commonRoot, packArtifactPath);
288
+
289
+ const debArtifactPath = getDebArtifactPath(distRoot, version);
290
+ const pacmanArtifactPath = getPacmanArtifactPath(distRoot, version);
291
+ const rpmArtifactPath = getRpmArtifactPath(distRoot, version);
292
+ await buildDeb(commonRoot, debArtifactPath);
293
+ await buildPacman(commonRoot, pacmanArtifactPath);
294
+ await buildRpm(commonRoot, rpmArtifactPath);
295
+
296
+ await fsp.writeFile(
297
+ getLinuxPackageManifestPath(distRoot),
298
+ `${JSON.stringify(
299
+ {
300
+ version,
301
+ packageName,
302
+ linuxPackageName: LINUX_PACKAGE_NAME,
303
+ revision: LINUX_PACKAGE_REVISION,
304
+ artifacts: {
305
+ deb: path.basename(debArtifactPath),
306
+ pacman: path.basename(pacmanArtifactPath),
307
+ rpm: path.basename(rpmArtifactPath),
308
+ },
309
+ install: {
310
+ debian: `sudo apt install ./${path.basename(debArtifactPath)}`,
311
+ arch: `sudo pacman -U ./${path.basename(pacmanArtifactPath)}`,
312
+ rpm: `sudo dnf install ./${path.basename(rpmArtifactPath)}`,
313
+ },
314
+ },
315
+ null,
316
+ 2,
317
+ )}\n`,
318
+ );
319
+
320
+ console.log(debArtifactPath);
321
+ console.log(pacmanArtifactPath);
322
+ console.log(rpmArtifactPath);
323
+ }
324
+
325
+ main().catch((error) => {
326
+ console.error(error.message);
327
+ process.exitCode = 1;
328
+ });
package/scripts/doctor.js CHANGED
@@ -1,11 +1,30 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import fs from "node:fs";
4
+ import {
5
+ getDebArtifactName,
6
+ getPacmanArtifactName,
7
+ getRpmArtifactName,
8
+ } from "./linux-package-lib.mjs";
9
+
10
+ const pkg = JSON.parse(fs.readFileSync("package.json", "utf8"));
4
11
 
5
12
  const checks = [
6
13
  ["package.json", fs.existsSync("package.json")],
7
14
  ["skills/index.json", fs.existsSync("skills/index.json")],
8
15
  ["dist/meta-architect-skills.tgz", fs.existsSync("dist/meta-architect-skills.tgz")],
16
+ [
17
+ `dist/${getDebArtifactName(pkg.version)}`,
18
+ fs.existsSync(`dist/${getDebArtifactName(pkg.version)}`),
19
+ ],
20
+ [
21
+ `dist/${getPacmanArtifactName(pkg.version)}`,
22
+ fs.existsSync(`dist/${getPacmanArtifactName(pkg.version)}`),
23
+ ],
24
+ [
25
+ `dist/${getRpmArtifactName(pkg.version)}`,
26
+ fs.existsSync(`dist/${getRpmArtifactName(pkg.version)}`),
27
+ ],
9
28
  [".codex/hooks.json", fs.existsSync(".codex/hooks.json")],
10
29
  [".ma/decisions.json", fs.existsSync(".ma/decisions.json")],
11
30
  [".ma/release.json", fs.existsSync(".ma/release.json")],
@@ -0,0 +1,40 @@
1
+ import path from "node:path";
2
+
3
+ export const LINUX_PACKAGE_NAME = "meta-architect";
4
+ export const LINUX_PACKAGE_REVISION = "1";
5
+
6
+ export function getPackArtifactName(packageName, version) {
7
+ return `${packageName.replace(/^@/, "").replace("/", "-")}-${version}.tgz`;
8
+ }
9
+
10
+ export function getPackArtifactPath(distRoot, packageName, version) {
11
+ return path.join(distRoot, getPackArtifactName(packageName, version));
12
+ }
13
+
14
+ export function getDebArtifactName(version) {
15
+ return `${LINUX_PACKAGE_NAME}_${version}_all.deb`;
16
+ }
17
+
18
+ export function getDebArtifactPath(distRoot, version) {
19
+ return path.join(distRoot, getDebArtifactName(version));
20
+ }
21
+
22
+ export function getPacmanArtifactName(version) {
23
+ return `${LINUX_PACKAGE_NAME}-${version}-${LINUX_PACKAGE_REVISION}-any.pkg.tar.xz`;
24
+ }
25
+
26
+ export function getPacmanArtifactPath(distRoot, version) {
27
+ return path.join(distRoot, getPacmanArtifactName(version));
28
+ }
29
+
30
+ export function getRpmArtifactName(version) {
31
+ return `${LINUX_PACKAGE_NAME}-${version}-${LINUX_PACKAGE_REVISION}.noarch.rpm`;
32
+ }
33
+
34
+ export function getRpmArtifactPath(distRoot, version) {
35
+ return path.join(distRoot, getRpmArtifactName(version));
36
+ }
37
+
38
+ export function getLinuxPackageManifestPath(distRoot) {
39
+ return path.join(distRoot, "linux-package-manifest.json");
40
+ }
@@ -0,0 +1,103 @@
1
+ #!/usr/bin/env node
2
+
3
+ import assert from "node:assert/strict";
4
+ import { spawnSync } from "node:child_process";
5
+ import fs from "node:fs/promises";
6
+ import os from "node:os";
7
+ import path from "node:path";
8
+ import process from "node:process";
9
+ import {
10
+ getDebArtifactPath,
11
+ getPacmanArtifactPath,
12
+ getRpmArtifactPath,
13
+ LINUX_PACKAGE_NAME,
14
+ } from "./linux-package-lib.mjs";
15
+
16
+ const repoRoot = process.cwd();
17
+ const pkg = JSON.parse(await fs.readFile(path.join(repoRoot, "package.json"), "utf8"));
18
+ const version = pkg.version;
19
+ const distRoot = path.join(repoRoot, "dist");
20
+
21
+ function run(command, args, options = {}) {
22
+ return spawnSync(command, args, {
23
+ encoding: "utf8",
24
+ stdio: "pipe",
25
+ ...options,
26
+ });
27
+ }
28
+
29
+ function runBinary(command, args, options = {}) {
30
+ return spawnSync(command, args, {
31
+ encoding: null,
32
+ maxBuffer: 32 * 1024 * 1024,
33
+ stdio: "pipe",
34
+ ...options,
35
+ });
36
+ }
37
+
38
+ async function smokeExtractedRoot(extractRoot, label) {
39
+ const workRoot = path.join(extractRoot, `${label}-project`);
40
+ const codexHome = path.join(extractRoot, `${label}-codex-home`);
41
+ await fs.mkdir(workRoot, { recursive: true });
42
+ await fs.mkdir(codexHome, { recursive: true });
43
+ const maBin = path.join(extractRoot, "usr", "bin", "ma");
44
+ const env = {
45
+ ...process.env,
46
+ CODEX_HOME: codexHome,
47
+ MA_DISABLE_LIVE_MCP: "1",
48
+ META_ARCHITECT_PREFIX: extractRoot,
49
+ };
50
+ const setupResult = run(maBin, ["setup"], { cwd: workRoot, env });
51
+ assert.equal(setupResult.status, 0, setupResult.stderr || setupResult.stdout);
52
+ await fs.access(path.join(workRoot, ".ma", "release.json"));
53
+ await fs.access(path.join(workRoot, ".ma", "decisions.json"));
54
+ await fs.access(path.join(extractRoot, "usr", "bin", "meta-architect"));
55
+ const statusResult = run(maBin, ["status"], { cwd: workRoot, env });
56
+ assert.equal(statusResult.status, 0, statusResult.stderr || statusResult.stdout);
57
+ }
58
+
59
+ async function main() {
60
+ if (process.platform !== "linux") {
61
+ throw new Error("Native Linux package smoke validation is supported only on Linux hosts");
62
+ }
63
+
64
+ const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), "meta-architect-linux-smoke-"));
65
+ const debExtractRoot = path.join(tempRoot, "deb");
66
+ const pacmanExtractRoot = path.join(tempRoot, "pacman");
67
+ const rpmExtractRoot = path.join(tempRoot, "rpm");
68
+ await fs.mkdir(debExtractRoot, { recursive: true });
69
+ await fs.mkdir(pacmanExtractRoot, { recursive: true });
70
+ await fs.mkdir(rpmExtractRoot, { recursive: true });
71
+
72
+ const debArtifactPath = getDebArtifactPath(distRoot, version);
73
+ const pacmanArtifactPath = getPacmanArtifactPath(distRoot, version);
74
+ const rpmArtifactPath = getRpmArtifactPath(distRoot, version);
75
+ const extractDeb = run("dpkg-deb", ["-x", debArtifactPath, debExtractRoot], { cwd: repoRoot });
76
+ assert.equal(extractDeb.status, 0, extractDeb.stderr || extractDeb.stdout);
77
+ const extractPacman = run("tar", ["-xJf", pacmanArtifactPath, "-C", pacmanExtractRoot], {
78
+ cwd: repoRoot,
79
+ });
80
+ assert.equal(extractPacman.status, 0, extractPacman.stderr || extractPacman.stdout);
81
+ const archiveConversion = runBinary("rpm2archive", [rpmArtifactPath], { cwd: rpmExtractRoot });
82
+ assert.equal(
83
+ archiveConversion.status,
84
+ 0,
85
+ archiveConversion.stderr?.toString("utf8") || archiveConversion.stdout?.toString("utf8"),
86
+ );
87
+ const rpmArchivePath = path.join(rpmExtractRoot, `${path.basename(rpmArtifactPath)}.tgz`);
88
+ await fs.writeFile(rpmArchivePath, archiveConversion.stdout);
89
+ const extractRpm = run("tar", ["-xzf", rpmArchivePath, "-C", rpmExtractRoot], { cwd: repoRoot });
90
+ assert.equal(extractRpm.status, 0, extractRpm.stderr || extractRpm.stdout);
91
+ await fs.access(path.join(pacmanExtractRoot, ".PKGINFO"));
92
+ await fs.access(path.join(pacmanExtractRoot, "usr", "lib", LINUX_PACKAGE_NAME, "bin", "ma.js"));
93
+ await fs.access(path.join(rpmExtractRoot, "usr", "lib", LINUX_PACKAGE_NAME, "bin", "ma.js"));
94
+
95
+ await smokeExtractedRoot(debExtractRoot, "deb");
96
+ await smokeExtractedRoot(pacmanExtractRoot, "pacman");
97
+ await smokeExtractedRoot(rpmExtractRoot, "rpm");
98
+ }
99
+
100
+ main().catch((error) => {
101
+ console.error(error.message);
102
+ process.exitCode = 1;
103
+ });
File without changes
File without changes
File without changes
@@ -238,12 +238,6 @@ function syncSupportingCode(oldVersion, nextVersion) {
238
238
  replacement: `release-readiness-${nextVersion}.md`,
239
239
  label: "skills QA path",
240
240
  },
241
- {
242
- file: path.join("src", "mcp-live-client.js"),
243
- search: `version: "${oldVersion}"`,
244
- replacement: `version: "${nextVersion}"`,
245
- label: "mcp live client version",
246
- },
247
241
  {
248
242
  file: path.join("test", "package-install-smoke.test.js"),
249
243
  search: `jstn-sdk-ma-${oldVersion}.tgz`,
@@ -262,6 +256,19 @@ function syncSupportingCode(oldVersion, nextVersion) {
262
256
  const content = readText(entry.file);
263
257
  writeText(entry.file, replaceRequired(content, entry.search, entry.replacement, entry.label));
264
258
  }
259
+
260
+ const mcpLiveClientFile = path.join("src", "mcp-live-client.js");
261
+ const mcpLiveClient = readText(mcpLiveClientFile);
262
+ if (!/version: "[0-9]+\.[0-9]+\.[0-9]+(?:-dev)?"/.test(mcpLiveClient)) {
263
+ throw new Error("Expected to find mcp live client version declaration");
264
+ }
265
+ writeText(
266
+ mcpLiveClientFile,
267
+ mcpLiveClient.replace(
268
+ /version: "[0-9]+\.[0-9]+\.[0-9]+(?:-dev)?"/,
269
+ `version: "${nextVersion}-dev"`,
270
+ ),
271
+ );
265
272
  }
266
273
 
267
274
  function rewriteReleaseState(nextVersion, previousVersion) {
File without changes
File without changes
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: align
3
+ description: "Use when the user needs scope alignment, shared language, or docs clarity before or between gated lanes."
4
+ ---
5
+
6
+ # Align
7
+
8
+ Use this skill inside Codex when the problem is ambiguity, drift, or mismatched language rather than missing implementation. `align` is a non-gating helper skill.
9
+
10
+ ## Output
11
+
12
+ Produce:
13
+ - current ambiguity or mismatch
14
+ - normalized terminology
15
+ - scope boundary and exclusions
16
+ - acceptance checks or rewritten prompts
17
+ - exact next trigger, usually `$maestro` or the lane that owns the next decision
18
+
19
+ ## Rules
20
+
21
+ - Align language and scope without creating a new release gate.
22
+ - Prefer tightening existing artifacts over inventing parallel docs.
23
+ - Keep terminology Meta-Architect-native for user-facing surfaces.
24
+ - Use `references/shared-language.md` for naming, taxonomy, and docs-clarity patterns.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "$align"
3
+ short_description: "Scope alignment and shared language helper"
4
+ default_prompt: "Use $align to resolve scope drift, normalize terminology, and tighten prompts or docs before handing work back to the owning gated lane."
@@ -0,0 +1,24 @@
1
+ # Shared Language
2
+
3
+ Use this reference pack with `align` when terminology, scope, or docs are drifting.
4
+
5
+ ## Naming rules
6
+
7
+ - `$maestro` is the only umbrella surface.
8
+ - `$arch -> $sage -> $flow -> $vet -> $vibe -> $build` remains the fixed gated sequence.
9
+ - `align`, `diagnose`, `tdd`, and `cleanup` are helper skills only.
10
+ - User-facing guidance stays Meta-Architect-native; external source names may appear as evidence, not as product surfaces.
11
+
12
+ ## Alignment checklist
13
+
14
+ - Name the current artifact, lane, and decision owner.
15
+ - Replace vague nouns with one stable term.
16
+ - Separate what is in scope, out of scope, and not yet decided.
17
+ - Rewrite prompts or docs so the next trigger is obvious.
18
+
19
+ ## Docs-clarity patterns
20
+
21
+ - Put the next trigger in one line.
22
+ - Distinguish terminal helper commands from in-session skills.
23
+ - Distinguish gated lanes from helper skills.
24
+ - Prefer concise, high-signal wording over long catalogs or branding-heavy lists.
File without changes
File without changes
File without changes
File without changes