@jstn-sdk/ma 0.1.12 → 0.1.13
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 +0 -0
- package/.codex/agents/Architect.toml +0 -2
- package/.codex/agents/Auditor.toml +0 -2
- package/.codex/agents/Builder.toml +0 -2
- package/.codex/agents/Flow.toml +0 -2
- package/.codex/agents/Sage.toml +0 -2
- package/.codex/agents/Vibe.toml +0 -2
- package/.codex/hooks.json +14 -13
- package/.codex/prompts/enforcement.md +4 -0
- package/.codex/prompts/skill-contract.md +4 -0
- package/COVERAGE.md +211 -0
- package/DEMO.md +265 -0
- package/README.md +159 -16
- package/bin/ma.js +219 -14
- package/data/clone-data.ledger.json +41 -0
- package/data/clone-data.proof.json +50 -0
- package/data/clone-data.rvf +37 -0
- package/docs/README.md +4 -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 +0 -0
- package/docs/getting-started.md +38 -22
- package/docs/installed-sdk.md +0 -0
- package/docs/mcp-setup.md +35 -0
- package/docs/onboarding.md +18 -2
- package/docs/prompt-guidance-contract.md +17 -0
- package/docs/prompt-guidance-fragments/active-autonomy-core.md +7 -0
- package/docs/qa/release-issue-gates-0.1.13.json +644 -0
- package/docs/qa/{release-readiness-0.1.12.md → release-readiness-0.1.13.md} +25 -9
- package/docs/qa/release-readiness-0.1.5.md +1 -1
- package/docs/reference/native-engineering-patterns.md +0 -0
- package/docs/reference/native-security-playbooks.md +6 -0
- package/docs/reference/native-source-selection.md +6 -0
- package/docs/reference/native-style-and-deslop.md +0 -0
- package/docs/release-spec.md +25 -9
- package/docs/skills.md +14 -1
- package/index.js +222 -2
- package/mcp/collections.json +23 -6
- package/mcp/local/code-intel.js +0 -0
- package/mcp/local/memory.js +0 -0
- package/mcp/local/playbooks.js +0 -0
- package/mcp/local/state.js +0 -0
- package/mcp/local/team-run.js +48 -1
- package/mcp/local/trace.js +0 -0
- package/mcp/local-capabilities.json +0 -0
- package/mcp/native-playbooks.json +0 -0
- package/mcp/servers.json +24 -0
- package/package.json +5 -2
- package/plugins/meta-architect/.app.json +1 -1
- package/plugins/meta-architect/.codex-plugin/plugin.json +1 -1
- package/plugins/meta-architect/.mcp.json +1 -1
- package/plugins/meta-architect/README.md +8 -1
- package/plugins/meta-architect/obsidian/main.js +401 -0
- package/plugins/meta-architect/obsidian/manifest.json +9 -0
- package/plugins/meta-architect/obsidian/styles.css +7 -0
- package/plugins/meta-architect/skills/align/SKILL.md +0 -0
- package/plugins/meta-architect/skills/align/agents/openai.yaml +0 -0
- package/plugins/meta-architect/skills/align/references/shared-language.md +0 -0
- package/plugins/meta-architect/skills/arch/SKILL.md +2 -0
- package/plugins/meta-architect/skills/arch/agents/openai.yaml +0 -0
- package/plugins/meta-architect/skills/build/SKILL.md +3 -0
- package/plugins/meta-architect/skills/build/agents/openai.yaml +0 -0
- package/plugins/meta-architect/skills/cleanup/SKILL.md +0 -0
- package/plugins/meta-architect/skills/cleanup/agents/openai.yaml +0 -0
- package/plugins/meta-architect/skills/cleanup/references/style-and-deslop.md +0 -0
- package/plugins/meta-architect/skills/diagnose/SKILL.md +0 -0
- package/plugins/meta-architect/skills/diagnose/agents/openai.yaml +0 -0
- package/plugins/meta-architect/skills/flow/SKILL.md +2 -0
- package/plugins/meta-architect/skills/flow/agents/openai.yaml +0 -0
- package/plugins/meta-architect/skills/maestro/SKILL.md +0 -0
- package/plugins/meta-architect/skills/maestro/agents/openai.yaml +0 -0
- package/plugins/meta-architect/skills/maestro/references/core-release-rules.md +0 -0
- package/plugins/meta-architect/skills/maestro/references/native-ingest-map.md +0 -0
- package/plugins/meta-architect/skills/sage/SKILL.md +2 -0
- package/plugins/meta-architect/skills/sage/agents/openai.yaml +0 -0
- package/plugins/meta-architect/skills/sage/references/source-selection.md +8 -0
- package/plugins/meta-architect/skills/tdd/SKILL.md +0 -0
- package/plugins/meta-architect/skills/tdd/agents/openai.yaml +0 -0
- package/plugins/meta-architect/skills/vet/SKILL.md +2 -0
- package/plugins/meta-architect/skills/vet/agents/openai.yaml +0 -0
- package/plugins/meta-architect/skills/vet/references/security-playbooks.md +7 -0
- package/plugins/meta-architect/skills/vibe/SKILL.md +2 -0
- package/plugins/meta-architect/skills/vibe/agents/openai.yaml +0 -0
- package/scripts/active-autonomy-hook.mjs +96 -0
- package/scripts/biome-staged.js +0 -0
- package/scripts/build-linux-packages.mjs +0 -0
- package/scripts/doctor.js +17 -4
- package/scripts/install.sh +28 -0
- package/scripts/linux-package-lib.mjs +0 -0
- package/scripts/linux-package-smoke.mjs +0 -0
- package/scripts/plugin-sync.js +0 -0
- package/scripts/postinstall.js +0 -0
- package/scripts/ralph/prompt.md +35 -0
- package/scripts/release-metadata.js +0 -0
- package/scripts/release-sync.js +0 -0
- package/scripts/release-verify.js +166 -1
- package/scripts/setup-npmrc.js +0 -0
- package/skills/align/SKILL.md +0 -0
- package/skills/align/agents/openai.yaml +0 -0
- package/skills/align/references/shared-language.md +0 -0
- package/skills/arch/SKILL.md +2 -0
- package/skills/arch/agents/openai.yaml +0 -0
- package/skills/build/SKILL.md +3 -0
- package/skills/build/agents/openai.yaml +0 -0
- package/skills/cleanup/SKILL.md +0 -0
- package/skills/cleanup/agents/openai.yaml +0 -0
- package/skills/cleanup/references/style-and-deslop.md +0 -0
- package/skills/diagnose/SKILL.md +0 -0
- package/skills/diagnose/agents/openai.yaml +0 -0
- package/skills/flow/SKILL.md +2 -0
- package/skills/flow/agents/openai.yaml +0 -0
- package/skills/maestro/SKILL.md +0 -0
- package/skills/maestro/agents/openai.yaml +0 -0
- package/skills/maestro/references/core-release-rules.md +0 -0
- package/skills/maestro/references/native-ingest-map.md +0 -0
- package/skills/sage/SKILL.md +2 -0
- package/skills/sage/agents/openai.yaml +0 -0
- package/skills/sage/references/source-selection.md +8 -0
- package/skills/tdd/SKILL.md +0 -0
- package/skills/tdd/agents/openai.yaml +0 -0
- package/skills/vet/SKILL.md +2 -0
- package/skills/vet/agents/openai.yaml +0 -0
- package/skills/vet/references/security-playbooks.md +7 -0
- package/skills/vibe/SKILL.md +2 -0
- package/skills/vibe/agents/openai.yaml +0 -0
- package/src/bootstrap.js +17 -0
- package/src/build-gate.js +2 -2
- package/src/launcher.js +4 -0
- package/src/mcp-live-client.js +289 -3
- package/src/paths.js +4 -0
- package/src/policy.js +1 -1
- package/src/release-issue-gates.js +190 -0
- package/src/runtime/active-autonomy-core.js +208 -0
- package/src/runtime/alignment-sentinel.js +165 -0
- package/src/runtime/architect-review.js +88 -0
- package/src/runtime/build-readiness.js +28 -4
- package/src/runtime/code-graph-rehearse.js +113 -0
- package/src/runtime/context-economy-core.js +276 -0
- package/src/runtime/continuity-notes.js +0 -0
- package/src/runtime/core-source-ingest.js +379 -0
- package/src/runtime/detached-provider.js +74 -0
- package/src/runtime/environment-awareness-core.js +460 -0
- package/src/runtime/exposure-catalog.js +276 -0
- package/src/runtime/guidance-stack.js +0 -0
- package/src/runtime/helper-orchestration-core.js +307 -0
- package/src/runtime/learning-loop-core.js +238 -0
- package/src/runtime/maestro-events.js +18 -0
- package/src/runtime/maestro-manager.js +19 -0
- package/src/runtime/maestro-state.js +125 -0
- package/src/runtime/mcp-policy.js +192 -0
- package/src/runtime/obsidian-integration-core.js +851 -0
- package/src/runtime/obsidian-plugin-bridge.js +739 -0
- package/src/runtime/orchestrator.js +0 -0
- package/src/runtime/prompt-strategy-core.js +230 -0
- package/src/runtime/quorum-review.js +90 -0
- package/src/runtime/ralph-execution-core.js +217 -0
- package/src/runtime/redaction-gateway.js +174 -0
- package/src/runtime/runtime-state.js +843 -2
- package/src/runtime/semantic-recording-core.js +147 -0
- package/src/runtime/signal-hooks.js +15 -0
- package/src/runtime/skills-registry-export.js +670 -0
- package/src/runtime/startup-path.js +0 -0
- package/src/runtime/universal-plugin-broker-core.js +575 -0
- package/src/runtime/workspace-intelligence-runtime.js +674 -0
- package/src/runtime/workspace-virtualizer.js +102 -0
- package/src/runtime/workspaces.js +0 -0
- package/src/runtime-artifacts.js +225 -62
- package/src/skill-installer.js +0 -0
- package/src/skills.js +876 -84
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from "node:fs/promises";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import {
|
|
6
|
+
createDefaultActiveAutonomyCore,
|
|
7
|
+
detectPassivePermissionHandoff,
|
|
8
|
+
} from "../src/runtime/active-autonomy-core.js";
|
|
9
|
+
|
|
10
|
+
const DEFAULT_RESPONSE =
|
|
11
|
+
"AUTO-CONTINUE: continue the current safe branch, execute the next reversible step, then verify before reporting.";
|
|
12
|
+
|
|
13
|
+
async function readStdinJson() {
|
|
14
|
+
const chunks = [];
|
|
15
|
+
for await (const chunk of process.stdin) {
|
|
16
|
+
chunks.push(chunk);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const raw = Buffer.concat(chunks).toString("utf8").trim();
|
|
20
|
+
if (!raw) {
|
|
21
|
+
return {};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
return JSON.parse(raw);
|
|
26
|
+
} catch (error) {
|
|
27
|
+
return {
|
|
28
|
+
type: "invalid-hook-payload",
|
|
29
|
+
raw,
|
|
30
|
+
parseError: error instanceof Error ? error.message : String(error),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function extractAssistantText(payload) {
|
|
36
|
+
const candidates = [
|
|
37
|
+
payload.last_assistant_message,
|
|
38
|
+
payload["last-assistant-message"],
|
|
39
|
+
payload.message,
|
|
40
|
+
payload.text,
|
|
41
|
+
payload.output,
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
for (const candidate of candidates) {
|
|
45
|
+
if (typeof candidate === "string" && candidate.trim()) {
|
|
46
|
+
return candidate;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (Array.isArray(payload.messages)) {
|
|
51
|
+
const assistant = [...payload.messages]
|
|
52
|
+
.reverse()
|
|
53
|
+
.find((message) => message?.role === "assistant" && typeof message.content === "string");
|
|
54
|
+
return assistant?.content ?? "";
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return "";
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function appendAudit(cwd, entry) {
|
|
61
|
+
const auditDir = path.join(cwd, ".ma", "hooks");
|
|
62
|
+
await fs.mkdir(auditDir, { recursive: true });
|
|
63
|
+
await fs.appendFile(
|
|
64
|
+
path.join(auditDir, "audit.log"),
|
|
65
|
+
`${JSON.stringify({ timestamp: new Date().toISOString(), ...entry })}\n`,
|
|
66
|
+
"utf8",
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const payload = await readStdinJson();
|
|
71
|
+
const cwd = payload.cwd || payload.working_directory || process.env.MA_ROOT || process.cwd();
|
|
72
|
+
const assistantText = extractAssistantText(payload);
|
|
73
|
+
const blocked = detectPassivePermissionHandoff(assistantText, createDefaultActiveAutonomyCore());
|
|
74
|
+
|
|
75
|
+
const result = blocked
|
|
76
|
+
? {
|
|
77
|
+
decision: "block",
|
|
78
|
+
reason: DEFAULT_RESPONSE,
|
|
79
|
+
stopReason: "active_autonomy_passive_handoff",
|
|
80
|
+
systemMessage:
|
|
81
|
+
"Meta-Architect Active Autonomy blocked passive permission-handoff wording on an AUTO-CONTINUE branch.",
|
|
82
|
+
}
|
|
83
|
+
: {
|
|
84
|
+
decision: "approve",
|
|
85
|
+
reason: "active_autonomy_no_passive_handoff_detected",
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
await appendAudit(cwd, {
|
|
89
|
+
hook: "active-autonomy",
|
|
90
|
+
event: payload.type || payload.event || "unknown",
|
|
91
|
+
decision: result.decision,
|
|
92
|
+
stopReason: result.stopReason,
|
|
93
|
+
assistantPreview: assistantText.slice(0, 200),
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
process.stdout.write(`${JSON.stringify(result)}\n`);
|
package/scripts/biome-staged.js
CHANGED
|
File without changes
|
|
File without changes
|
package/scripts/doctor.js
CHANGED
|
@@ -28,7 +28,24 @@ const checks = [
|
|
|
28
28
|
[".codex/hooks.json", fs.existsSync(".codex/hooks.json")],
|
|
29
29
|
[".ma/decisions.json", fs.existsSync(".ma/decisions.json")],
|
|
30
30
|
[".ma/release.json", fs.existsSync(".ma/release.json")],
|
|
31
|
+
[
|
|
32
|
+
".ma/context/helper-orchestration-core.json",
|
|
33
|
+
fs.existsSync(".ma/context/helper-orchestration-core.json"),
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
".ma/context/environment-awareness-core.json",
|
|
37
|
+
fs.existsSync(".ma/context/environment-awareness-core.json"),
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
".ma/context/universal-plugin-broker-core.json",
|
|
41
|
+
fs.existsSync(".ma/context/universal-plugin-broker-core.json"),
|
|
42
|
+
],
|
|
31
43
|
["docs/release-spec.md", fs.existsSync("docs/release-spec.md")],
|
|
44
|
+
["DEMO.md", fs.existsSync("DEMO.md")],
|
|
45
|
+
["COVERAGE.md", fs.existsSync("COVERAGE.md")],
|
|
46
|
+
["data/clone-data.proof.json", fs.existsSync("data/clone-data.proof.json")],
|
|
47
|
+
["data/clone-data.ledger.json", fs.existsSync("data/clone-data.ledger.json")],
|
|
48
|
+
["data/clone-data.rvf", fs.existsSync("data/clone-data.rvf")],
|
|
32
49
|
[".agents/plugins/marketplace.json", fs.existsSync(".agents/plugins/marketplace.json")],
|
|
33
50
|
["plugins/meta-architect/.app.json", fs.existsSync("plugins/meta-architect/.app.json")],
|
|
34
51
|
[
|
|
@@ -36,10 +53,6 @@ const checks = [
|
|
|
36
53
|
fs.existsSync("plugins/meta-architect/.codex-plugin/plugin.json"),
|
|
37
54
|
],
|
|
38
55
|
["plugins/meta-architect/.mcp.json", fs.existsSync("plugins/meta-architect/.mcp.json")],
|
|
39
|
-
[
|
|
40
|
-
"missions/collaborative-whiteboard/mission.md",
|
|
41
|
-
fs.existsSync("missions/collaborative-whiteboard/mission.md"),
|
|
42
|
-
],
|
|
43
56
|
["prompts/architect.md", fs.existsSync("prompts/architect.md")],
|
|
44
57
|
];
|
|
45
58
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
MA_PACKAGE="${MA_PACKAGE:-@jstn-sdk/ma@latest}"
|
|
5
|
+
CODEX_PACKAGE="${CODEX_PACKAGE:-@openai/codex@latest}"
|
|
6
|
+
|
|
7
|
+
need_cmd() {
|
|
8
|
+
command -v "$1" >/dev/null 2>&1 || {
|
|
9
|
+
echo "meta-architect install: missing required command: $1" >&2
|
|
10
|
+
exit 1
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
need_cmd npm
|
|
15
|
+
need_cmd node
|
|
16
|
+
|
|
17
|
+
echo "meta-architect install: installing Codex + Meta-Architect"
|
|
18
|
+
npm i -g "$CODEX_PACKAGE" "$MA_PACKAGE"
|
|
19
|
+
|
|
20
|
+
if command -v ma >/dev/null 2>&1; then
|
|
21
|
+
echo "meta-architect install: seeding local MA runtime"
|
|
22
|
+
ma setup >/dev/null
|
|
23
|
+
echo "meta-architect install: ready"
|
|
24
|
+
echo "start: ma --madmax --high"
|
|
25
|
+
else
|
|
26
|
+
echo "meta-architect install: ma command not found after npm install" >&2
|
|
27
|
+
exit 1
|
|
28
|
+
fi
|
|
File without changes
|
|
File without changes
|
package/scripts/plugin-sync.js
CHANGED
|
File without changes
|
package/scripts/postinstall.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Meta-Architect Ralph Execution Core
|
|
2
|
+
|
|
3
|
+
You are executing a Meta-Architect story contract, not an independent release authority.
|
|
4
|
+
|
|
5
|
+
## Required Inputs
|
|
6
|
+
|
|
7
|
+
1. Read `.ma/plans/prd.json`.
|
|
8
|
+
2. Read `.ma/plans/progress.txt`.
|
|
9
|
+
3. Pick the highest-priority story where `passes` is `false`.
|
|
10
|
+
4. Execute exactly one bounded story per iteration.
|
|
11
|
+
|
|
12
|
+
## MA Quality Gates
|
|
13
|
+
|
|
14
|
+
Before marking a story passed, verify:
|
|
15
|
+
|
|
16
|
+
- `$arch` architecture constraints remain satisfied.
|
|
17
|
+
- `$sage` evidence and source claims remain valid.
|
|
18
|
+
- `$flow` logic/state invariants remain valid.
|
|
19
|
+
- `$vet` security blockers are absent or explicitly owned.
|
|
20
|
+
- `$vibe` DX/UX constraints remain acceptable.
|
|
21
|
+
- `$build` real-workspace checks pass for the changed slice.
|
|
22
|
+
|
|
23
|
+
## Authority Boundaries
|
|
24
|
+
|
|
25
|
+
- Do not mutate `.ma/release.json` or `.ma/decisions.json` directly.
|
|
26
|
+
- Return authoritative status through `$maestro`, `$build`, or the owning lane.
|
|
27
|
+
- Treat Obsidian/vault context as `vault_context`, never `build_evidence`.
|
|
28
|
+
- Treat virtual workspace output as context only, never production proof.
|
|
29
|
+
- Treat code-graph rehearsal as a read-only trajectory preview.
|
|
30
|
+
|
|
31
|
+
## Completion Contract
|
|
32
|
+
|
|
33
|
+
Update story `passes` only after fresh verification evidence exists.
|
|
34
|
+
Append progress to `.ma/plans/progress.txt`.
|
|
35
|
+
Record reusable learnings in scoped guidance without overwriting the base workspace contract.
|
|
File without changes
|
package/scripts/release-sync.js
CHANGED
|
File without changes
|
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import process from "node:process";
|
|
6
|
+
import { validateReleaseIssueGates } from "../src/release-issue-gates.js";
|
|
6
7
|
|
|
7
8
|
const CANONICAL_PACKAGE = "@jstn-sdk/ma";
|
|
8
9
|
const CANONICAL_INSTALL = "npm i -g @openai/codex@latest @jstn-sdk/ma@latest";
|
|
10
|
+
const CDN_INSTALL =
|
|
11
|
+
"curl -fsSL https://cdn.jsdelivr.net/gh/JustineDevs/meta-architect@main/scripts/install.sh | sh";
|
|
9
12
|
const CANONICAL_LAUNCH = "ma --madmax --high";
|
|
10
13
|
const UNINSTALL_MA = "npm uninstall -g @jstn-sdk/ma";
|
|
11
14
|
const UNINSTALL_BOTH = "npm uninstall -g @jstn-sdk/ma @openai/codex";
|
|
@@ -40,10 +43,12 @@ function parseVersion(version) {
|
|
|
40
43
|
|
|
41
44
|
function verifyInstallBlock(file) {
|
|
42
45
|
const content = readText(file);
|
|
43
|
-
if (!content.includes(CANONICAL_INSTALL)) {
|
|
46
|
+
if (!content.includes(CANONICAL_INSTALL) && !content.includes(CDN_INSTALL)) {
|
|
44
47
|
return;
|
|
45
48
|
}
|
|
46
49
|
|
|
50
|
+
assert(content.includes(CDN_INSTALL), `${file}: missing jsDelivr POSIX installer command`);
|
|
51
|
+
assert(content.includes(CANONICAL_INSTALL), `${file}: missing canonical npm install command`);
|
|
47
52
|
assert(content.includes(CANONICAL_LAUNCH), `${file}: missing canonical launch command`);
|
|
48
53
|
assert(content.includes(UNINSTALL_MA), `${file}: missing uninstall Meta-Architect command`);
|
|
49
54
|
assert(
|
|
@@ -52,6 +57,146 @@ function verifyInstallBlock(file) {
|
|
|
52
57
|
);
|
|
53
58
|
}
|
|
54
59
|
|
|
60
|
+
function verifyNpmIgnore() {
|
|
61
|
+
assert(fs.existsSync(".npmignore"), ".npmignore: missing production package ignore file");
|
|
62
|
+
const content = readText(".npmignore");
|
|
63
|
+
for (const requiredPattern of [
|
|
64
|
+
".ma/",
|
|
65
|
+
".omx/",
|
|
66
|
+
"node_modules/",
|
|
67
|
+
".npm-cache/",
|
|
68
|
+
"dist/",
|
|
69
|
+
"test/",
|
|
70
|
+
".github/",
|
|
71
|
+
"*.tgz",
|
|
72
|
+
]) {
|
|
73
|
+
assert(
|
|
74
|
+
content.includes(requiredPattern),
|
|
75
|
+
`.npmignore: missing required production ignore pattern ${requiredPattern}`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function verifyDemoDoc({ version, gitTag }) {
|
|
81
|
+
assert(fs.existsSync("DEMO.md"), "DEMO.md: missing demo guide");
|
|
82
|
+
const content = readText("DEMO.md");
|
|
83
|
+
assert(content.includes(`Release line: \`${gitTag}\``), "DEMO.md: wrong release line");
|
|
84
|
+
assert(content.includes("Package: `@jstn-sdk/ma`"), "DEMO.md: missing package name");
|
|
85
|
+
assert(content.includes(CDN_INSTALL), "DEMO.md: missing jsDelivr installer");
|
|
86
|
+
assert(content.includes(CANONICAL_INSTALL), "DEMO.md: missing canonical npm install");
|
|
87
|
+
assert(content.includes(CANONICAL_LAUNCH), "DEMO.md: missing canonical launch");
|
|
88
|
+
assert(content.includes(UNINSTALL_MA), "DEMO.md: missing MA uninstall command");
|
|
89
|
+
assert(content.includes(UNINSTALL_BOTH), "DEMO.md: missing MA + Codex uninstall command");
|
|
90
|
+
assert(content.includes("npm run release:check"), "DEMO.md: missing full release demo command");
|
|
91
|
+
assert(
|
|
92
|
+
content.includes("Learning Loop Core") || content.includes("learning loop"),
|
|
93
|
+
"DEMO.md: missing learning loop coverage",
|
|
94
|
+
);
|
|
95
|
+
assert(content.includes("Obsidian"), "DEMO.md: missing Obsidian coverage");
|
|
96
|
+
assert(content.includes("Ralph"), "DEMO.md: missing Ralph execution coverage");
|
|
97
|
+
assert(content.includes("data/clone-data.proof.json"), "DEMO.md: missing clone-data proof");
|
|
98
|
+
assert(content.includes("COVERAGE.md"), "DEMO.md: missing coverage artifact");
|
|
99
|
+
assert(content.includes(`version line is \`${version}\``), "DEMO.md: missing current version");
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function verifyCoverageDoc({ version, gitTag }) {
|
|
103
|
+
assert(fs.existsSync("COVERAGE.md"), "COVERAGE.md: missing coverage matrix");
|
|
104
|
+
const content = readText("COVERAGE.md");
|
|
105
|
+
assert(content.includes(`Target release: \`${gitTag}\``), "COVERAGE.md: wrong target release");
|
|
106
|
+
assert(
|
|
107
|
+
content.includes(`Package: \`@jstn-sdk/ma@${version}\``),
|
|
108
|
+
"COVERAGE.md: wrong package version",
|
|
109
|
+
);
|
|
110
|
+
assert(content.includes("Learning Loop Core"), "COVERAGE.md: missing learning-loop coverage");
|
|
111
|
+
assert(
|
|
112
|
+
content.includes("Helper Orchestration Core"),
|
|
113
|
+
"COVERAGE.md: missing helper orchestration coverage",
|
|
114
|
+
);
|
|
115
|
+
assert(
|
|
116
|
+
content.includes("Environment Awareness Core"),
|
|
117
|
+
"COVERAGE.md: missing environment awareness coverage",
|
|
118
|
+
);
|
|
119
|
+
assert(
|
|
120
|
+
content.includes("Universal Plugin Broker Core"),
|
|
121
|
+
"COVERAGE.md: missing universal plugin broker coverage",
|
|
122
|
+
);
|
|
123
|
+
assert(content.includes("Obsidian Integration Core"), "COVERAGE.md: missing Obsidian coverage");
|
|
124
|
+
assert(content.includes("Ralph Execution Core"), "COVERAGE.md: missing Ralph coverage");
|
|
125
|
+
assert(content.includes("36/36 passing"), "COVERAGE.md: missing current test count");
|
|
126
|
+
assert(
|
|
127
|
+
content.includes("This repository is not a toy demo."),
|
|
128
|
+
"COVERAGE.md: missing truth statement",
|
|
129
|
+
);
|
|
130
|
+
assert(!content.includes("@jstn-sdk/ma@0.1.0"), "COVERAGE.md: stale npm package version");
|
|
131
|
+
assert(!content.includes("v0.1.0 release bar"), "COVERAGE.md: stale release bar");
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function verifyCanonicalSemanticSurfaces({ version, gitTag }) {
|
|
135
|
+
const usageWorkflow = readText(path.join("example", "usage-workflow.md"));
|
|
136
|
+
assert(
|
|
137
|
+
usageWorkflow.includes(`$maestro I want to harden Meta-Architect ${gitTag}`),
|
|
138
|
+
"example/usage-workflow.md: missing current $maestro release-hardening scenario",
|
|
139
|
+
);
|
|
140
|
+
for (const requiredTerm of ["Obsidian", "Ralph", "Caveman", "learning-loop"]) {
|
|
141
|
+
assert(
|
|
142
|
+
usageWorkflow.includes(requiredTerm),
|
|
143
|
+
`example/usage-workflow.md: missing ${requiredTerm} semantic-core term`,
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
for (const staleTerm of [
|
|
147
|
+
"Build a demo",
|
|
148
|
+
"demo app",
|
|
149
|
+
"collaborative whiteboard",
|
|
150
|
+
"smart contract security review",
|
|
151
|
+
"Timeline: 4 weeks",
|
|
152
|
+
"Delivery plan for v0.1.0",
|
|
153
|
+
"@jstn-sdk/ma@0.1.0",
|
|
154
|
+
]) {
|
|
155
|
+
assert(
|
|
156
|
+
!usageWorkflow.includes(staleTerm),
|
|
157
|
+
`example/usage-workflow.md: stale current-facing term ${staleTerm}`,
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const mission = readText(path.join("missions", "collaborative-whiteboard", "mission.md"));
|
|
162
|
+
assert(
|
|
163
|
+
mission.includes("# Mission: Semantic Release Hardening"),
|
|
164
|
+
"missions/collaborative-whiteboard/mission.md: stale mission title",
|
|
165
|
+
);
|
|
166
|
+
assert(
|
|
167
|
+
mission.includes("Obsidian is core vault-context infrastructure"),
|
|
168
|
+
"missions/collaborative-whiteboard/mission.md: missing Obsidian core mission contract",
|
|
169
|
+
);
|
|
170
|
+
assert(
|
|
171
|
+
mission.includes("Ralph is the execution loop"),
|
|
172
|
+
"missions/collaborative-whiteboard/mission.md: missing Ralph core mission contract",
|
|
173
|
+
);
|
|
174
|
+
assert(
|
|
175
|
+
!mission.toLowerCase().includes("real-time collaborative whiteboard"),
|
|
176
|
+
"missions/collaborative-whiteboard/mission.md: stale whiteboard mission text",
|
|
177
|
+
);
|
|
178
|
+
|
|
179
|
+
const currentQa = readText(path.join("docs", "qa", `release-readiness-${version}.md`));
|
|
180
|
+
assert(
|
|
181
|
+
currentQa.includes("Harden Meta-Architect v0.1.13 semantic core"),
|
|
182
|
+
`docs/qa/release-readiness-${version}.md: missing realistic semantic smoke idea`,
|
|
183
|
+
);
|
|
184
|
+
assert(
|
|
185
|
+
!currentQa.includes('ma idea "Build a demo app"'),
|
|
186
|
+
`docs/qa/release-readiness-${version}.md: stale demo-app helper path`,
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
const archPrompt = readText(path.join("prompts", "architect.md"));
|
|
190
|
+
assert(
|
|
191
|
+
!archPrompt.includes("v0.1.0` skills library"),
|
|
192
|
+
"prompts/architect.md: stale v0.1.0 skills-library wording",
|
|
193
|
+
);
|
|
194
|
+
assert(
|
|
195
|
+
archPrompt.includes("current Meta-Architect skills library"),
|
|
196
|
+
"prompts/architect.md: missing current library wording",
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
55
200
|
function main() {
|
|
56
201
|
const pkg = readJson("package.json");
|
|
57
202
|
const lock = readJson("package-lock.json");
|
|
@@ -68,6 +213,13 @@ function main() {
|
|
|
68
213
|
pkg.publishConfig?.access === "public",
|
|
69
214
|
"package.json: publishConfig.access must be public",
|
|
70
215
|
);
|
|
216
|
+
assert(pkg.files?.includes("DEMO.md"), "package.json: files must include DEMO.md");
|
|
217
|
+
assert(pkg.files?.includes("COVERAGE.md"), "package.json: files must include COVERAGE.md");
|
|
218
|
+
|
|
219
|
+
verifyNpmIgnore();
|
|
220
|
+
verifyDemoDoc({ version, gitTag });
|
|
221
|
+
verifyCoverageDoc({ version, gitTag });
|
|
222
|
+
verifyCanonicalSemanticSurfaces({ version, gitTag });
|
|
71
223
|
|
|
72
224
|
const changelog = readText("CHANGELOG.md");
|
|
73
225
|
assert(changelog.includes(`## ${gitTag}`), "CHANGELOG.md: missing current version heading");
|
|
@@ -95,6 +247,17 @@ function main() {
|
|
|
95
247
|
const qa = readText(qaPath);
|
|
96
248
|
assert(qa.includes(`# Release Readiness ${version}`), `${qaPath}: wrong title version`);
|
|
97
249
|
|
|
250
|
+
const issueGatesPath = path.join("docs", "qa", `release-issue-gates-${version}.json`);
|
|
251
|
+
assert(fs.existsSync(issueGatesPath), `Missing release issue gate file: ${issueGatesPath}`);
|
|
252
|
+
const issueGates = validateReleaseIssueGates(readJson(issueGatesPath), {
|
|
253
|
+
version,
|
|
254
|
+
requirePassed: true,
|
|
255
|
+
});
|
|
256
|
+
assert(
|
|
257
|
+
issueGates.valid,
|
|
258
|
+
`${issueGatesPath}: release issue gates are not production-passed\n- ${issueGates.errors.join("\n- ")}`,
|
|
259
|
+
);
|
|
260
|
+
|
|
98
261
|
const pluginApp = readJson(path.join("plugins", "meta-architect", ".app.json"));
|
|
99
262
|
const pluginMcp = readJson(path.join("plugins", "meta-architect", ".mcp.json"));
|
|
100
263
|
const pluginManifest = readJson(
|
|
@@ -109,6 +272,8 @@ function main() {
|
|
|
109
272
|
|
|
110
273
|
for (const file of [
|
|
111
274
|
"README.md",
|
|
275
|
+
"DEMO.md",
|
|
276
|
+
"COVERAGE.md",
|
|
112
277
|
path.join("docs", "getting-started.md"),
|
|
113
278
|
path.join("docs", "onboarding.md"),
|
|
114
279
|
path.join("docs", "skills.md"),
|
package/scripts/setup-npmrc.js
CHANGED
|
File without changes
|
package/skills/align/SKILL.md
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/skills/arch/SKILL.md
CHANGED
|
@@ -11,9 +11,11 @@ Use this skill inside Codex to turn a product idea into a concrete architecture
|
|
|
11
11
|
|
|
12
12
|
Produce:
|
|
13
13
|
- problem framing
|
|
14
|
+
- `decision`, `status`, `evidence`, `blockers`, `next_allowed_triggers`
|
|
14
15
|
- user and workload assumptions
|
|
15
16
|
- system architecture and subsystem boundaries
|
|
16
17
|
- stack recommendation with tradeoffs
|
|
18
|
+
- rejected alternatives with rationale
|
|
17
19
|
- data model and storage choices
|
|
18
20
|
- auth, security, and operational concerns
|
|
19
21
|
- phased delivery plan
|
|
File without changes
|
package/skills/build/SKILL.md
CHANGED
|
@@ -14,11 +14,14 @@ Produce:
|
|
|
14
14
|
- blockers that still prevent implementation
|
|
15
15
|
- the narrowest viable build slice
|
|
16
16
|
- branch or worktree suggestions when relevant
|
|
17
|
+
- bounded execution state when the build lane is already in progress
|
|
17
18
|
- test and verification expectations
|
|
19
|
+
- repair path when the bounded slice needs another pass
|
|
18
20
|
- the exact next implementation step
|
|
19
21
|
|
|
20
22
|
## Rules
|
|
21
23
|
|
|
22
24
|
- Do not claim readiness if architecture, evidence, logic, security, or DX/UX gaps remain unresolved.
|
|
23
25
|
- Keep the recommended build slice small, testable, and reversible.
|
|
26
|
+
- Treat `$build` as the sole owner of `.ma/plans/build.md` and `build_status`.
|
|
24
27
|
- If the user wants code immediately and the path is clear, end with a concrete implementation plan rather than more review prose.
|
|
File without changes
|
package/skills/cleanup/SKILL.md
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/skills/diagnose/SKILL.md
CHANGED
|
File without changes
|
|
File without changes
|
package/skills/flow/SKILL.md
CHANGED
|
@@ -10,7 +10,9 @@ Use this skill inside Codex to pressure-test how the system behaves, not just ho
|
|
|
10
10
|
## Output
|
|
11
11
|
|
|
12
12
|
Produce:
|
|
13
|
+
- `decision`, `status`, `evidence`, `blockers`, `next_allowed_triggers`
|
|
13
14
|
- key actors and system states
|
|
15
|
+
- state map and failure flows
|
|
14
16
|
- main flows and failure flows
|
|
15
17
|
- invariants and state transitions
|
|
16
18
|
- race conditions, dead ends, and consistency risks
|
|
File without changes
|
package/skills/maestro/SKILL.md
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/skills/sage/SKILL.md
CHANGED
|
@@ -11,8 +11,10 @@ Use this skill inside Codex to verify or challenge stack choices with real sourc
|
|
|
11
11
|
|
|
12
12
|
Produce:
|
|
13
13
|
- candidate tools, libraries, or services
|
|
14
|
+
- `decision`, `status`, `evidence`, `blockers`, `next_allowed_triggers`
|
|
14
15
|
- why each option fits or fails the architecture
|
|
15
16
|
- source-backed evidence from official docs, upstream repos, or approved GitMCP sources
|
|
17
|
+
- evidence grade and exact upstream mapping
|
|
16
18
|
- recommendation with tradeoffs
|
|
17
19
|
- unresolved gaps or missing evidence
|
|
18
20
|
- exact next trigger, usually `$flow`
|
|
File without changes
|
|
@@ -23,6 +23,14 @@ Use this reference pack inside `$sage` when the repo needs evidence-backed selec
|
|
|
23
23
|
- Claimed capability verified from a primary source
|
|
24
24
|
- Maturity caveats called out when evidence is weak
|
|
25
25
|
|
|
26
|
+
## Evidence grades
|
|
27
|
+
|
|
28
|
+
- `VERIFIED`: exact upstream mapping plus primary-source confirmation
|
|
29
|
+
- `PARTIAL`: candidate is mapped, but live proof or maturity proof is incomplete
|
|
30
|
+
- `MISSING`: no trustworthy exact upstream mapping yet
|
|
31
|
+
|
|
32
|
+
Always expose the evidence grade and the exact upstream mapping in user-facing `$sage` output.
|
|
33
|
+
|
|
26
34
|
## Native posture
|
|
27
35
|
|
|
28
36
|
Meta-Architect ships curated guidance and playbooks. It does not ship a raw mirror of external catalogs. External sources remain evidence inputs, not user-facing skill identities.
|
package/skills/tdd/SKILL.md
CHANGED
|
File without changes
|
|
File without changes
|
package/skills/vet/SKILL.md
CHANGED
|
@@ -10,11 +10,13 @@ Use this skill inside Codex to review security posture before the build lane. `$
|
|
|
10
10
|
## Output
|
|
11
11
|
|
|
12
12
|
Produce:
|
|
13
|
+
- `decision`, `status`, `evidence`, `blockers`, `next_allowed_triggers`
|
|
13
14
|
- trust boundaries
|
|
14
15
|
- authn/authz expectations
|
|
15
16
|
- sensitive data paths
|
|
16
17
|
- abuse cases and likely failure modes
|
|
17
18
|
- concrete mitigations
|
|
19
|
+
- accepted risks
|
|
18
20
|
- release blockers vs acceptable risks
|
|
19
21
|
- exact next trigger, usually `$vibe`
|
|
20
22
|
|
|
File without changes
|
|
@@ -18,6 +18,13 @@ Use this reference pack inside `$vet` for repeatable trust-boundary reviews that
|
|
|
18
18
|
- Distinguish blockers from accepted risk.
|
|
19
19
|
- Route remediation back to the owning lane rather than creating a parallel security workflow.
|
|
20
20
|
|
|
21
|
+
## Adversarial hardening
|
|
22
|
+
|
|
23
|
+
- For higher-risk changes, run a bounded adversarial hardening pass before final approval.
|
|
24
|
+
- Keep the hardening work inside the private scratchpad/runtime layer.
|
|
25
|
+
- Return structured findings, not direct gate mutations.
|
|
26
|
+
- If the hardening pass cannot resolve or clearly classify the risk, keep `$vet` in a non-terminal state instead of over-approving.
|
|
27
|
+
|
|
21
28
|
## Product boundary
|
|
22
29
|
|
|
23
30
|
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.
|
package/skills/vibe/SKILL.md
CHANGED
|
@@ -10,8 +10,10 @@ Use this skill inside Codex to review whether the system will feel coherent for
|
|
|
10
10
|
## Output
|
|
11
11
|
|
|
12
12
|
Produce:
|
|
13
|
+
- `decision`, `status`, `evidence`, `blockers`, `next_allowed_triggers`
|
|
13
14
|
- developer workflow risks
|
|
14
15
|
- user workflow risks
|
|
16
|
+
- operator friction and user friction
|
|
15
17
|
- complexity hotspots
|
|
16
18
|
- onboarding or operability friction
|
|
17
19
|
- simplifications that improve clarity
|
|
File without changes
|
package/src/bootstrap.js
CHANGED
|
@@ -152,6 +152,20 @@ async function inspectLocalScaffold() {
|
|
|
152
152
|
getRuntimeWritePath("release.json"),
|
|
153
153
|
getRuntimeWritePath("guidance", "merged.json"),
|
|
154
154
|
getRuntimeWritePath("guidance", "include-graph.json"),
|
|
155
|
+
getRuntimeWritePath("context", "active-autonomy-core.json"),
|
|
156
|
+
getRuntimeWritePath("context", "capability-composition.json"),
|
|
157
|
+
getRuntimeWritePath("context", "code-graph-rehearse.json"),
|
|
158
|
+
getRuntimeWritePath("context", "core-source-ingest.json"),
|
|
159
|
+
getRuntimeWritePath("context", "learning-loop-core.json"),
|
|
160
|
+
getRuntimeWritePath("context", "obsidian-bridge.json"),
|
|
161
|
+
getRuntimeWritePath("context", "obsidian-vault-index.json"),
|
|
162
|
+
getRuntimeWritePath("context", "obsidian-vault-operations.json"),
|
|
163
|
+
getRuntimeWritePath("context", "prompt-strategy-core.json"),
|
|
164
|
+
getRuntimeWritePath("context", "recording-core.json"),
|
|
165
|
+
getRuntimeWritePath("context", "skills-registry-export.json"),
|
|
166
|
+
getRuntimeWritePath("context", "workspace-virtualizer.json"),
|
|
167
|
+
getRuntimeWritePath("context", "workspace-context-pack.json"),
|
|
168
|
+
getRuntimeWritePath("context", "workspace-effectiveness.json"),
|
|
155
169
|
getRuntimeWritePath("memory", "notes.md"),
|
|
156
170
|
getRuntimeWritePath("memory", "index.json"),
|
|
157
171
|
getRuntimeWritePath("hooks", "config.json"),
|
|
@@ -161,6 +175,9 @@ async function inspectLocalScaffold() {
|
|
|
161
175
|
getRuntimeWritePath("tasks", "locks"),
|
|
162
176
|
getRuntimeWritePath("workspaces", "index.json"),
|
|
163
177
|
getRuntimeWritePath("state", "manager-runs.json"),
|
|
178
|
+
getRuntimeWritePath("state", "maestro-state.json"),
|
|
179
|
+
getRuntimeWritePath("evidence", "semantic-receipts.json"),
|
|
180
|
+
path.join(getRepoRoot(), "docs", "qa", "release-issue-gates-0.1.13.json"),
|
|
164
181
|
path.join(getMcpRootPath(), "servers.json"),
|
|
165
182
|
path.join(getMcpRootPath(), "local-capabilities.json"),
|
|
166
183
|
];
|
package/src/build-gate.js
CHANGED
|
@@ -26,10 +26,10 @@ export function evaluateBuildGate(releaseState) {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
if (!["LOCKED", "READY"].includes(releaseState.build_status)) {
|
|
29
|
+
if (!["LOCKED", "READY", "RUNNING"].includes(releaseState.build_status)) {
|
|
30
30
|
blockers.push({
|
|
31
31
|
field: "build_status",
|
|
32
|
-
expected: "LOCKED or
|
|
32
|
+
expected: "LOCKED, READY, or RUNNING",
|
|
33
33
|
actual: releaseState.build_status,
|
|
34
34
|
trigger: "$build",
|
|
35
35
|
});
|