@jstn-sdk/ma 0.1.5 → 0.1.7
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/.agents/plugins/marketplace.json +20 -0
- package/.codex/hooks.json +1 -1
- package/.codex/prompts/enforcement.md +13 -3
- package/.codex/prompts/onboarding.md +29 -14
- package/README.md +536 -129
- package/bin/ma.js +61 -103
- package/docs/README.md +2 -1
- package/docs/assets/image/Screenshot(1).png +0 -0
- package/docs/assets/image/Screenshot(2).png +0 -0
- package/docs/assets/image/Screenshot(3).png +0 -0
- package/docs/assets/image/Screenshot(4).png +0 -0
- package/docs/assets/image/Screenshot(5).png +0 -0
- package/docs/assets/image/Screenshot(6).png +0 -0
- package/docs/assets/image/Screenshot(7).png +0 -0
- package/docs/assets/image/Screenshot(8).png +0 -0
- package/docs/assets/image/Screenshot(9).png +0 -0
- package/docs/assets/meta-architect-logo.png +0 -0
- package/docs/assets/meta-architect-logo.svg +8 -0
- package/docs/getting-started.md +434 -37
- package/docs/installed-sdk.md +60 -0
- package/docs/mcp-setup.md +46 -134
- package/docs/onboarding.md +41 -11
- package/docs/qa/release-readiness-0.1.5.md +46 -44
- package/docs/qa/release-readiness-0.1.7.md +79 -0
- package/docs/release-spec.md +81 -103
- package/docs/skills-publishing.md +187 -54
- package/docs/skills.md +82 -141
- package/mcp/collections.json +1 -1
- package/mcp/fallback.json +1 -1
- package/mcp/servers.json +1 -1
- package/package.json +17 -14
- package/plugins/meta-architect/.app.json +1 -1
- package/plugins/meta-architect/.codex-plugin/plugin.json +23 -0
- package/plugins/meta-architect/.mcp.json +1 -1
- package/plugins/meta-architect/README.md +23 -10
- package/plugins/meta-architect/skills/arch/SKILL.md +27 -0
- package/plugins/meta-architect/skills/arch/agents/openai.yaml +4 -0
- package/plugins/meta-architect/skills/build/SKILL.md +24 -0
- package/plugins/meta-architect/skills/build/agents/openai.yaml +4 -0
- package/plugins/meta-architect/skills/flow/SKILL.md +24 -0
- package/plugins/meta-architect/skills/flow/agents/openai.yaml +4 -0
- package/plugins/meta-architect/skills/maestro/SKILL.md +25 -0
- package/plugins/meta-architect/skills/maestro/agents/openai.yaml +4 -0
- package/plugins/meta-architect/skills/meta-architect/SKILL.md +19 -23
- package/plugins/meta-architect/skills/meta-architect/agents/openai.yaml +4 -0
- package/plugins/meta-architect/skills/meta-architect/references/core-release-rules.md +13 -0
- package/plugins/meta-architect/skills/sage/SKILL.md +37 -0
- package/plugins/meta-architect/skills/sage/agents/openai.yaml +4 -0
- package/plugins/meta-architect/skills/vet/SKILL.md +25 -0
- package/plugins/meta-architect/skills/vet/agents/openai.yaml +4 -0
- package/plugins/meta-architect/skills/vibe/SKILL.md +24 -0
- package/plugins/meta-architect/skills/vibe/agents/openai.yaml +4 -0
- package/scripts/doctor.js +8 -0
- package/scripts/plugin-sync.js +93 -0
- package/scripts/postinstall.js +23 -0
- package/scripts/release-metadata.js +94 -0
- package/scripts/release-sync.js +359 -0
- package/scripts/release-verify.js +153 -0
- package/scripts/setup-npmrc.js +39 -0
- package/scripts/skills-install.js +4 -36
- package/scripts/skills-manifest.js +1 -1
- package/scripts/skills-validate.js +78 -40
- package/skills/arch/SKILL.md +27 -0
- package/skills/arch/agents/openai.yaml +4 -0
- package/skills/build/SKILL.md +24 -0
- package/skills/build/agents/openai.yaml +4 -0
- package/skills/flow/SKILL.md +24 -0
- package/skills/flow/agents/openai.yaml +4 -0
- package/skills/index.json +27 -22
- package/skills/maestro/SKILL.md +25 -0
- package/skills/maestro/agents/openai.yaml +4 -0
- package/skills/meta-architect/SKILL.md +19 -23
- package/skills/meta-architect/agents/openai.yaml +3 -3
- package/skills/meta-architect/references/core-release-rules.md +2 -2
- package/skills/sage/SKILL.md +37 -0
- package/skills/sage/agents/openai.yaml +4 -0
- package/skills/vet/SKILL.md +25 -0
- package/skills/vet/agents/openai.yaml +4 -0
- package/skills/vibe/SKILL.md +24 -0
- package/skills/vibe/agents/openai.yaml +4 -0
- package/sprint/00-idea.md +1 -1
- package/sprint/01-architecture.md +1 -1
- package/sprint/02-oss-evidence.md +1 -1
- package/sprint/03-logic.md +1 -1
- package/sprint/04-security.md +2 -2
- package/sprint/05-dx-ux.md +1 -1
- package/src/decision-log.js +4 -4
- package/src/launcher.js +21 -17
- package/src/mcp-live-client.js +1 -1
- package/src/paths.js +8 -32
- package/src/release-state.js +3 -3
- package/src/runtime-artifacts.js +411 -0
- package/src/skill-installer.js +198 -0
- package/src/skills.js +473 -166
- package/templates/AGENTS.md +23 -6
- package/templates/model-instructions/core.md +1 -1
- package/.codex/config.toml +0 -2
- package/plugins/meta-architect/skills/meta-architect-arch/SKILL.md +0 -24
- package/plugins/meta-architect/skills/meta-architect-build/SKILL.md +0 -25
- package/plugins/meta-architect/skills/meta-architect-flow/SKILL.md +0 -23
- package/plugins/meta-architect/skills/meta-architect-sage/SKILL.md +0 -23
- package/plugins/meta-architect/skills/meta-architect-vet/SKILL.md +0 -23
- package/plugins/meta-architect/skills/meta-architect-vibe/SKILL.md +0 -24
- package/prompts/architect.md +0 -216
- package/prompts/builder.md +0 -10
- package/prompts/flow.md +0 -9
- package/prompts/release-manager.md +0 -10
- package/prompts/sage.md +0 -10
- package/prompts/security-reviewer.md +0 -10
- package/prompts/verifier.md +0 -10
- package/prompts/vibe.md +0 -10
- package/skills/meta-architect-arch/SKILL.md +0 -24
- package/skills/meta-architect-arch/agents/openai.yaml +0 -4
- package/skills/meta-architect-build/SKILL.md +0 -25
- package/skills/meta-architect-build/agents/openai.yaml +0 -4
- package/skills/meta-architect-flow/SKILL.md +0 -23
- package/skills/meta-architect-flow/agents/openai.yaml +0 -4
- package/skills/meta-architect-sage/SKILL.md +0 -23
- package/skills/meta-architect-sage/agents/openai.yaml +0 -4
- package/skills/meta-architect-vet/SKILL.md +0 -23
- package/skills/meta-architect-vet/agents/openai.yaml +0 -4
- package/skills/meta-architect-vibe/SKILL.md +0 -24
- package/skills/meta-architect-vibe/agents/openai.yaml +0 -4
- package/src/doctor.js +0 -30
- package/src/setup.js +0 -375
package/bin/ma.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import fs from "node:fs";
|
|
4
|
-
import path from "node:path";
|
|
5
3
|
import {
|
|
6
4
|
evaluateBuildGate,
|
|
7
5
|
formatBuildBlockers,
|
|
8
6
|
formatNextAllowedTriggers,
|
|
9
7
|
} from "../src/build-gate.js";
|
|
10
8
|
import { appendDecision } from "../src/decision-log.js";
|
|
11
|
-
import { runDoctor } from "../src/doctor.js";
|
|
12
9
|
import { runCodex, shouldDelegateToCodex } from "../src/launcher.js";
|
|
13
10
|
import {
|
|
14
11
|
canMarkBuildDone,
|
|
@@ -17,81 +14,37 @@ import {
|
|
|
17
14
|
validateReleaseOrigin,
|
|
18
15
|
} from "../src/policy.js";
|
|
19
16
|
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";
|
|
20
23
|
import {
|
|
21
24
|
listSkills,
|
|
22
25
|
runArch,
|
|
23
26
|
runFlow,
|
|
24
27
|
runIdea,
|
|
25
28
|
runInit,
|
|
29
|
+
runMaestro,
|
|
26
30
|
runSage,
|
|
27
31
|
runVet,
|
|
28
32
|
runVibe,
|
|
29
33
|
} from "../src/skills.js";
|
|
30
34
|
import { syncStatusUpdates } from "../src/state-sync.js";
|
|
31
35
|
|
|
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
|
-
|
|
46
36
|
function printUsage() {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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 };
|
|
37
|
+
console.error("Secondary helper commands:");
|
|
38
|
+
console.error(" ma");
|
|
39
|
+
console.error(" ma setup");
|
|
40
|
+
console.error(" ma init");
|
|
41
|
+
console.error(' ma idea "..."');
|
|
42
|
+
console.error(" ma skills");
|
|
43
|
+
console.error(" ma sdk-path");
|
|
44
|
+
console.error(" ma status");
|
|
45
|
+
console.error(" ma run $maestro|$arch|$sage|$flow|$vet|$vibe|$build");
|
|
46
|
+
console.error(" ma merge <source-branch> <target-branch>");
|
|
47
|
+
console.error(" ma release <origin-branch> <target-branch>");
|
|
95
48
|
}
|
|
96
49
|
|
|
97
50
|
function printStatus(releaseState) {
|
|
@@ -123,13 +76,18 @@ async function runBuild(releaseState) {
|
|
|
123
76
|
|
|
124
77
|
if (!evaluation.allowed) {
|
|
125
78
|
const blockers = formatBuildBlockers(evaluation);
|
|
79
|
+
await writeBuildPlanArtifact({
|
|
80
|
+
allowed: false,
|
|
81
|
+
blockers,
|
|
82
|
+
nextTriggers: formatNextAllowedTriggers(evaluation),
|
|
83
|
+
});
|
|
126
84
|
await appendDecision({
|
|
127
85
|
decision: "Blocked build execution",
|
|
128
86
|
status: "BLOCKED",
|
|
129
87
|
evidence: [
|
|
130
88
|
{
|
|
131
89
|
kind: "release-state",
|
|
132
|
-
path: ".
|
|
90
|
+
path: ".ma/release.json",
|
|
133
91
|
},
|
|
134
92
|
],
|
|
135
93
|
blockers,
|
|
@@ -144,6 +102,13 @@ async function runBuild(releaseState) {
|
|
|
144
102
|
return;
|
|
145
103
|
}
|
|
146
104
|
|
|
105
|
+
const suggestedBranches = ["feature/ui", "feature/api"];
|
|
106
|
+
await writeBuildPlanArtifact({
|
|
107
|
+
allowed: true,
|
|
108
|
+
blockers: [],
|
|
109
|
+
nextTriggers: ["$build"],
|
|
110
|
+
suggestedBranches,
|
|
111
|
+
});
|
|
147
112
|
await appendDecision({
|
|
148
113
|
kind: "skill",
|
|
149
114
|
skill: "$build",
|
|
@@ -152,7 +117,7 @@ async function runBuild(releaseState) {
|
|
|
152
117
|
evidence: [
|
|
153
118
|
{
|
|
154
119
|
kind: "release-state",
|
|
155
|
-
path: ".
|
|
120
|
+
path: ".ma/release.json",
|
|
156
121
|
},
|
|
157
122
|
{
|
|
158
123
|
branches: ["feature/ui", "feature/api"],
|
|
@@ -166,8 +131,8 @@ async function runBuild(releaseState) {
|
|
|
166
131
|
|
|
167
132
|
console.log("Build gate is green.");
|
|
168
133
|
console.log("Suggested branches:");
|
|
169
|
-
console.log(
|
|
170
|
-
console.log(
|
|
134
|
+
console.log(`- ${suggestedBranches[0]}`);
|
|
135
|
+
console.log(`- ${suggestedBranches[1]}`);
|
|
171
136
|
console.log("Optional worktree commands:");
|
|
172
137
|
console.log("git worktree add ../ui feature/ui");
|
|
173
138
|
console.log("git worktree add ../api feature/api");
|
|
@@ -235,52 +200,38 @@ async function runRelease(originBranch, targetBranch) {
|
|
|
235
200
|
}
|
|
236
201
|
|
|
237
202
|
async function main() {
|
|
203
|
+
const [, , command, ...rest] = process.argv;
|
|
238
204
|
const args = process.argv.slice(2);
|
|
239
|
-
const [command, ...rest] = args;
|
|
240
205
|
const arg = rest[0];
|
|
241
206
|
|
|
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
|
-
|
|
257
207
|
if (shouldDelegateToCodex(args)) {
|
|
208
|
+
await Promise.all([ensureSkillsInstalled(), ensureSupportBundleInstalled()]);
|
|
258
209
|
process.exitCode = runCodex(args);
|
|
259
210
|
return;
|
|
260
211
|
}
|
|
261
212
|
|
|
262
|
-
|
|
263
|
-
if (targetRoot) {
|
|
264
|
-
process.env.MA_ROOT = targetRoot;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
if (command === "setup" || command === "init") {
|
|
213
|
+
if (command === "setup") {
|
|
268
214
|
const created = await runInit();
|
|
269
|
-
console.log(
|
|
270
|
-
console.log(
|
|
215
|
+
console.log("meta-architect setup");
|
|
216
|
+
console.log("====================");
|
|
271
217
|
for (const item of created) {
|
|
272
218
|
console.log(`ready: ${item}`);
|
|
273
219
|
}
|
|
274
220
|
return;
|
|
275
221
|
}
|
|
276
222
|
|
|
277
|
-
if (command === "
|
|
278
|
-
|
|
223
|
+
if (command === "init") {
|
|
224
|
+
const created = await runInit();
|
|
225
|
+
console.log("meta-architect init");
|
|
226
|
+
console.log("===================");
|
|
227
|
+
for (const item of created) {
|
|
228
|
+
console.log(`ready: ${item}`);
|
|
229
|
+
}
|
|
279
230
|
return;
|
|
280
231
|
}
|
|
281
232
|
|
|
282
233
|
if (command === "idea") {
|
|
283
|
-
const idea =
|
|
234
|
+
const idea = rest.join(" ").trim();
|
|
284
235
|
await runIdea(idea);
|
|
285
236
|
console.log("Idea recorded.");
|
|
286
237
|
return;
|
|
@@ -293,6 +244,11 @@ async function main() {
|
|
|
293
244
|
return;
|
|
294
245
|
}
|
|
295
246
|
|
|
247
|
+
if (command === "sdk-path") {
|
|
248
|
+
process.stdout.write(`${getSupportBundleRoot()}\n`);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
|
|
296
252
|
if (command === "status") {
|
|
297
253
|
const releaseState = await loadReleaseState();
|
|
298
254
|
printStatus(releaseState);
|
|
@@ -300,17 +256,23 @@ async function main() {
|
|
|
300
256
|
}
|
|
301
257
|
|
|
302
258
|
if (command === "merge") {
|
|
303
|
-
const [sourceBranch, targetBranch] =
|
|
259
|
+
const [sourceBranch, targetBranch] = rest;
|
|
304
260
|
await runMerge(sourceBranch, targetBranch);
|
|
305
261
|
return;
|
|
306
262
|
}
|
|
307
263
|
|
|
308
264
|
if (command === "release") {
|
|
309
|
-
const [originBranch, targetBranch] =
|
|
265
|
+
const [originBranch, targetBranch] = rest;
|
|
310
266
|
await runRelease(originBranch, targetBranch);
|
|
311
267
|
return;
|
|
312
268
|
}
|
|
313
269
|
|
|
270
|
+
if (command === "run" && arg === "$maestro") {
|
|
271
|
+
await runMaestro();
|
|
272
|
+
console.log("$maestro complete");
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
|
|
314
276
|
if (command === "run" && arg === "$build") {
|
|
315
277
|
const releaseState = await loadReleaseState();
|
|
316
278
|
await runBuild(releaseState);
|
|
@@ -342,11 +304,7 @@ async function main() {
|
|
|
342
304
|
}
|
|
343
305
|
|
|
344
306
|
if (command === "run" && arg === "$vibe") {
|
|
345
|
-
|
|
346
|
-
const reasonIndex = remaining.indexOf("--reason");
|
|
347
|
-
const reason =
|
|
348
|
-
reasonIndex !== -1 && remaining[reasonIndex + 1] ? remaining[reasonIndex + 1] : undefined;
|
|
349
|
-
await runVibe({ waive, reason });
|
|
307
|
+
await runVibe();
|
|
350
308
|
console.log("$vibe complete");
|
|
351
309
|
return;
|
|
352
310
|
}
|
package/docs/README.md
CHANGED
|
@@ -7,6 +7,7 @@ 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)
|
|
10
11
|
|
|
11
12
|
## Packaging and installation
|
|
12
13
|
|
|
@@ -16,7 +17,7 @@ Meta-Architect documentation is organized by operator task.
|
|
|
16
17
|
|
|
17
18
|
## QA and readiness
|
|
18
19
|
|
|
19
|
-
- [Release Readiness 0.1.
|
|
20
|
+
- [Release Readiness 0.1.7](./qa/release-readiness-0.1.7.md)
|
|
20
21
|
|
|
21
22
|
## Repo structure references
|
|
22
23
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|