@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
package/bin/ma.js CHANGED
@@ -1,11 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import fs from "node:fs";
4
+ import path from "node:path";
3
5
  import {
4
6
  evaluateBuildGate,
5
7
  formatBuildBlockers,
6
8
  formatNextAllowedTriggers,
7
9
  } from "../src/build-gate.js";
8
10
  import { appendDecision } from "../src/decision-log.js";
11
+ import { runDoctor } from "../src/doctor.js";
9
12
  import { runCodex, shouldDelegateToCodex } from "../src/launcher.js";
10
13
  import {
11
14
  canMarkBuildDone,
@@ -14,12 +17,6 @@ import {
14
17
  validateReleaseOrigin,
15
18
  } from "../src/policy.js";
16
19
  import { loadReleaseState } from "../src/release-state.js";
17
- import { writeBuildPlanArtifact } from "../src/runtime-artifacts.js";
18
- import {
19
- ensureSkillsInstalled,
20
- ensureSupportBundleInstalled,
21
- getSupportBundleRoot,
22
- } from "../src/skill-installer.js";
23
20
  import {
24
21
  listSkills,
25
22
  runArch,
@@ -32,18 +29,69 @@ import {
32
29
  } from "../src/skills.js";
33
30
  import { syncStatusUpdates } from "../src/state-sync.js";
34
31
 
32
+ function getPackageVersion() {
33
+ const packageJsonPath = path.join(
34
+ path.dirname(new URL(import.meta.url).pathname),
35
+ "..",
36
+ "package.json",
37
+ );
38
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
39
+ return packageJson.version;
40
+ }
41
+
42
+ function writeStdoutLine(line = "") {
43
+ process.stdout.write(`${line}\n`);
44
+ }
45
+
35
46
  function printUsage() {
36
- console.error("Secondary helper commands:");
37
- console.error(" ma");
38
- console.error(" ma setup");
39
- console.error(" ma init");
40
- console.error(' ma idea "..."');
41
- console.error(" ma skills");
42
- console.error(" ma sdk-path");
43
- console.error(" ma status");
44
- console.error(" ma run $arch|$sage|$flow|$vet|$vibe|$build");
45
- console.error(" ma merge <source-branch> <target-branch>");
46
- console.error(" ma release <origin-branch> <target-branch>");
47
+ writeStdoutLine("Runtime:");
48
+ writeStdoutLine(" ma --madmax --high");
49
+ writeStdoutLine(" ma [codex args...]");
50
+ writeStdoutLine();
51
+ writeStdoutLine("Operate inside Codex with:");
52
+ writeStdoutLine(" $arch $sage $flow $vet $vibe $build");
53
+ writeStdoutLine();
54
+ writeStdoutLine("Maintenance / diagnostics / compatibility:");
55
+ writeStdoutLine(" ma status");
56
+ writeStdoutLine(' ma idea "..."');
57
+ writeStdoutLine(" ma skills");
58
+ writeStdoutLine(" ma run $arch|$sage|$flow|$vet|$vibe|$build");
59
+ writeStdoutLine(" ma merge <source-branch> <target-branch>");
60
+ writeStdoutLine(" ma release <origin-branch> <target-branch>");
61
+ writeStdoutLine(" ma doctor [--root <path>]");
62
+ writeStdoutLine(" ma setup [--root <path>]");
63
+ writeStdoutLine(" ma init [--root <path>] # legacy compatibility alias");
64
+ }
65
+
66
+ function printSetupUsage() {
67
+ writeStdoutLine("Usage:");
68
+ writeStdoutLine(" ma setup [--root <path>]");
69
+ writeStdoutLine();
70
+ writeStdoutLine(
71
+ "Maintenance utility: repair or scaffold repo-local support files for the Codex-hosted runtime.",
72
+ );
73
+ }
74
+
75
+ function parseRootOption(args) {
76
+ const remaining = [];
77
+ let targetRoot = null;
78
+
79
+ for (let index = 0; index < args.length; index += 1) {
80
+ const arg = args[index];
81
+ if (arg === "--root") {
82
+ const next = args[index + 1];
83
+ if (!next) {
84
+ throw new Error("Missing value for --root");
85
+ }
86
+ targetRoot = path.resolve(next);
87
+ index += 1;
88
+ continue;
89
+ }
90
+
91
+ remaining.push(arg);
92
+ }
93
+
94
+ return { remaining, targetRoot };
47
95
  }
48
96
 
49
97
  function printStatus(releaseState) {
@@ -75,18 +123,13 @@ async function runBuild(releaseState) {
75
123
 
76
124
  if (!evaluation.allowed) {
77
125
  const blockers = formatBuildBlockers(evaluation);
78
- await writeBuildPlanArtifact({
79
- allowed: false,
80
- blockers,
81
- nextTriggers: formatNextAllowedTriggers(evaluation),
82
- });
83
126
  await appendDecision({
84
127
  decision: "Blocked build execution",
85
128
  status: "BLOCKED",
86
129
  evidence: [
87
130
  {
88
131
  kind: "release-state",
89
- path: ".ma/release.json",
132
+ path: ".omx/release.json",
90
133
  },
91
134
  ],
92
135
  blockers,
@@ -101,13 +144,6 @@ async function runBuild(releaseState) {
101
144
  return;
102
145
  }
103
146
 
104
- const suggestedBranches = ["feature/ui", "feature/api"];
105
- await writeBuildPlanArtifact({
106
- allowed: true,
107
- blockers: [],
108
- nextTriggers: ["$build"],
109
- suggestedBranches,
110
- });
111
147
  await appendDecision({
112
148
  kind: "skill",
113
149
  skill: "$build",
@@ -116,7 +152,7 @@ async function runBuild(releaseState) {
116
152
  evidence: [
117
153
  {
118
154
  kind: "release-state",
119
- path: ".ma/release.json",
155
+ path: ".omx/release.json",
120
156
  },
121
157
  {
122
158
  branches: ["feature/ui", "feature/api"],
@@ -130,8 +166,8 @@ async function runBuild(releaseState) {
130
166
 
131
167
  console.log("Build gate is green.");
132
168
  console.log("Suggested branches:");
133
- console.log(`- ${suggestedBranches[0]}`);
134
- console.log(`- ${suggestedBranches[1]}`);
169
+ console.log("- feature/ui");
170
+ console.log("- feature/api");
135
171
  console.log("Optional worktree commands:");
136
172
  console.log("git worktree add ../ui feature/ui");
137
173
  console.log("git worktree add ../api feature/api");
@@ -199,38 +235,52 @@ async function runRelease(originBranch, targetBranch) {
199
235
  }
200
236
 
201
237
  async function main() {
202
- const [, , command, ...rest] = process.argv;
203
238
  const args = process.argv.slice(2);
239
+ const [command, ...rest] = args;
204
240
  const arg = rest[0];
205
241
 
242
+ if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
243
+ if (command === "setup" || command === "init") {
244
+ printSetupUsage();
245
+ return;
246
+ }
247
+
248
+ printUsage();
249
+ return;
250
+ }
251
+
252
+ if (args.includes("--version") || args.includes("-v")) {
253
+ writeStdoutLine(getPackageVersion());
254
+ return;
255
+ }
256
+
206
257
  if (shouldDelegateToCodex(args)) {
207
- await Promise.all([ensureSkillsInstalled(), ensureSupportBundleInstalled()]);
208
258
  process.exitCode = runCodex(args);
209
259
  return;
210
260
  }
211
261
 
212
- if (command === "setup") {
262
+ const { remaining, targetRoot } = parseRootOption(rest);
263
+ if (targetRoot) {
264
+ process.env.MA_ROOT = targetRoot;
265
+ }
266
+
267
+ if (command === "setup" || command === "init") {
213
268
  const created = await runInit();
214
- console.log("meta-architect setup");
215
- console.log("====================");
269
+ console.log(command === "setup" ? "meta-architect setup" : "meta-architect init");
270
+ console.log(command === "setup" ? "====================" : "===================");
216
271
  for (const item of created) {
217
272
  console.log(`ready: ${item}`);
218
273
  }
219
274
  return;
220
275
  }
221
276
 
222
- if (command === "init") {
223
- const created = await runInit();
224
- console.log("meta-architect init");
225
- console.log("===================");
226
- for (const item of created) {
227
- console.log(`ready: ${item}`);
228
- }
277
+ if (command === "doctor") {
278
+ process.exitCode = runDoctor();
229
279
  return;
230
280
  }
231
281
 
232
282
  if (command === "idea") {
233
- const idea = rest.join(" ").trim();
283
+ const idea = remaining.join(" ").trim();
234
284
  await runIdea(idea);
235
285
  console.log("Idea recorded.");
236
286
  return;
@@ -243,11 +293,6 @@ async function main() {
243
293
  return;
244
294
  }
245
295
 
246
- if (command === "sdk-path") {
247
- process.stdout.write(`${getSupportBundleRoot()}\n`);
248
- return;
249
- }
250
-
251
296
  if (command === "status") {
252
297
  const releaseState = await loadReleaseState();
253
298
  printStatus(releaseState);
@@ -255,13 +300,13 @@ async function main() {
255
300
  }
256
301
 
257
302
  if (command === "merge") {
258
- const [sourceBranch, targetBranch] = rest;
303
+ const [sourceBranch, targetBranch] = remaining;
259
304
  await runMerge(sourceBranch, targetBranch);
260
305
  return;
261
306
  }
262
307
 
263
308
  if (command === "release") {
264
- const [originBranch, targetBranch] = rest;
309
+ const [originBranch, targetBranch] = remaining;
265
310
  await runRelease(originBranch, targetBranch);
266
311
  return;
267
312
  }
@@ -297,7 +342,11 @@ async function main() {
297
342
  }
298
343
 
299
344
  if (command === "run" && arg === "$vibe") {
300
- await runVibe();
345
+ const waive = remaining.includes("--waive");
346
+ const reasonIndex = remaining.indexOf("--reason");
347
+ const reason =
348
+ reasonIndex !== -1 && remaining[reasonIndex + 1] ? remaining[reasonIndex + 1] : undefined;
349
+ await runVibe({ waive, reason });
301
350
  console.log("$vibe complete");
302
351
  return;
303
352
  }
package/docs/README.md CHANGED
@@ -7,7 +7,6 @@ Meta-Architect documentation is organized by operator task.
7
7
  - [Getting Started](./getting-started.md)
8
8
  - [Release Spec](./release-spec.md)
9
9
  - [Skills Reference](./skills.md)
10
- - [Installed Support Bundle](./installed-sdk.md)
11
10
 
12
11
  ## Packaging and installation
13
12
 
@@ -17,7 +16,7 @@ Meta-Architect documentation is organized by operator task.
17
16
 
18
17
  ## QA and readiness
19
18
 
20
- - [Release Readiness 0.1.4](./qa/release-readiness-0.1.4.md)
19
+ - [Release Readiness 0.1.5](./qa/release-readiness-0.1.5.md)
21
20
 
22
21
  ## Repo structure references
23
22