@jstn-sdk/ma 0.1.13 → 0.14.1

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 (259) hide show
  1. package/.agents/plugins/marketplace.json +0 -0
  2. package/.codex/agents/Architect.toml +1 -0
  3. package/.codex/agents/Auditor.toml +1 -0
  4. package/.codex/agents/Builder.toml +1 -0
  5. package/.codex/agents/Flow.toml +1 -0
  6. package/.codex/agents/Sage.toml +1 -0
  7. package/.codex/agents/Vibe.toml +1 -0
  8. package/.codex/hooks.json +12 -2
  9. package/.codex/prompts/enforcement.md +0 -0
  10. package/.codex/prompts/onboarding.md +6 -1
  11. package/.codex/prompts/release-rules.md +0 -0
  12. package/.codex/prompts/skill-contract.md +0 -0
  13. package/COVERAGE.md +9 -9
  14. package/DEMO.md +15 -6
  15. package/LICENSE +0 -0
  16. package/README.md +127 -784
  17. package/bin/ma.js +591 -105
  18. package/data/clone-data.ledger.json +0 -0
  19. package/data/clone-data.proof.json +0 -0
  20. package/data/clone-data.rvf +0 -0
  21. package/docs/README.md +8 -2
  22. package/docs/assets/banner.png +0 -0
  23. package/docs/autonomous-tasks.md +46 -0
  24. package/docs/codex-integration.md +16 -0
  25. package/docs/getting-started.md +32 -8
  26. package/docs/installed-sdk.md +0 -0
  27. package/docs/mcp-setup.md +30 -1
  28. package/docs/qa/{release-issue-gates-0.1.13.json → release-issue-gates-0.14.1.json} +77 -77
  29. package/docs/qa/release-readiness-0.1.5.md +0 -0
  30. package/docs/qa/{release-readiness-0.1.13.md → release-readiness-0.14.1.md} +12 -12
  31. package/docs/quality.md +24 -0
  32. package/docs/reference/native-engineering-patterns.md +0 -0
  33. package/docs/reference/native-security-playbooks.md +0 -0
  34. package/docs/reference/native-source-selection.md +0 -0
  35. package/docs/reference/native-style-and-deslop.md +0 -0
  36. package/docs/release-spec.md +27 -14
  37. package/docs/skills.md +1 -1
  38. package/docs/vendor-plugin-publishing.md +49 -0
  39. package/index.js +73 -0
  40. package/mcp/collections.json +0 -0
  41. package/mcp/fallback.json +0 -0
  42. package/mcp/local/code-intel.js +185 -41
  43. package/mcp/local/context.js +180 -0
  44. package/mcp/local/memory.js +17 -6
  45. package/mcp/local/playbooks.js +0 -0
  46. package/mcp/local/quality.js +39 -0
  47. package/mcp/local/state.js +7 -3
  48. package/mcp/local/team-run.js +8 -3
  49. package/mcp/local/trace.js +0 -0
  50. package/mcp/local-capabilities.json +9 -0
  51. package/mcp/native-playbooks.json +0 -0
  52. package/mcp/servers.json +0 -0
  53. package/package.json +37 -6
  54. package/plugins/meta-architect/.app.json +1 -1
  55. package/plugins/meta-architect/.claude-plugin/plugin.json +12 -0
  56. package/plugins/meta-architect/.codex-plugin/plugin.json +1 -1
  57. package/plugins/meta-architect/.mcp.json +1 -1
  58. package/plugins/meta-architect/README.md +14 -2
  59. package/plugins/meta-architect/obsidian/main.js +137 -4
  60. package/plugins/meta-architect/obsidian/manifest.json +1 -1
  61. package/plugins/meta-architect/obsidian/styles.css +0 -0
  62. package/plugins/meta-architect/skills/align/SKILL.md +0 -0
  63. package/plugins/meta-architect/skills/align/agents/openai.yaml +0 -0
  64. package/plugins/meta-architect/skills/align/references/shared-language.md +0 -0
  65. package/plugins/meta-architect/skills/arch/SKILL.md +0 -0
  66. package/plugins/meta-architect/skills/arch/agents/openai.yaml +0 -0
  67. package/plugins/meta-architect/skills/build/SKILL.md +0 -0
  68. package/plugins/meta-architect/skills/build/agents/openai.yaml +0 -0
  69. package/plugins/meta-architect/skills/cleanup/SKILL.md +0 -0
  70. package/plugins/meta-architect/skills/cleanup/agents/openai.yaml +0 -0
  71. package/plugins/meta-architect/skills/cleanup/references/style-and-deslop.md +0 -0
  72. package/plugins/meta-architect/skills/diagnose/SKILL.md +0 -0
  73. package/plugins/meta-architect/skills/diagnose/agents/openai.yaml +0 -0
  74. package/plugins/meta-architect/skills/flow/SKILL.md +0 -0
  75. package/plugins/meta-architect/skills/flow/agents/openai.yaml +0 -0
  76. package/plugins/meta-architect/skills/maestro/SKILL.md +17 -1
  77. package/plugins/meta-architect/skills/maestro/agents/openai.yaml +0 -0
  78. package/plugins/meta-architect/skills/maestro/references/core-release-rules.md +2 -2
  79. package/plugins/meta-architect/skills/maestro/references/native-ingest-map.md +0 -0
  80. package/plugins/meta-architect/skills/sage/SKILL.md +0 -0
  81. package/plugins/meta-architect/skills/sage/agents/openai.yaml +0 -0
  82. package/plugins/meta-architect/skills/sage/references/source-selection.md +0 -0
  83. package/plugins/meta-architect/skills/tdd/SKILL.md +0 -0
  84. package/plugins/meta-architect/skills/tdd/agents/openai.yaml +0 -0
  85. package/plugins/meta-architect/skills/vet/SKILL.md +0 -0
  86. package/plugins/meta-architect/skills/vet/agents/openai.yaml +0 -0
  87. package/plugins/meta-architect/skills/vet/references/security-playbooks.md +0 -0
  88. package/plugins/meta-architect/skills/vibe/SKILL.md +0 -0
  89. package/plugins/meta-architect/skills/vibe/agents/openai.yaml +0 -0
  90. package/schemas/autonomous-task-queue.schema.json +58 -0
  91. package/schemas/handoff-packet.schema.json +36 -0
  92. package/schemas/setup-receipt.schema.json +28 -0
  93. package/schemas/skill-frontmatter.schema.json +20 -0
  94. package/schemas/support-bundle.schema.json +37 -0
  95. package/schemas/task-contract.schema.json +31 -0
  96. package/scripts/active-autonomy-hook.mjs +141 -11
  97. package/scripts/biome-staged.js +0 -0
  98. package/scripts/build-linux-packages.mjs +7 -3
  99. package/scripts/cleanup-test-fixtures.sh +55 -0
  100. package/scripts/context-hydration-hook.mjs +89 -0
  101. package/scripts/demo-smoke.js +285 -0
  102. package/scripts/doctor.js +10 -8
  103. package/scripts/install.sh +33 -4
  104. package/scripts/install.sh.sha256 +1 -0
  105. package/scripts/linux-package-lib.mjs +0 -0
  106. package/scripts/linux-package-smoke.mjs +2 -2
  107. package/scripts/package-size-check.mjs +26 -0
  108. package/scripts/plugin-build.js +314 -0
  109. package/scripts/plugin-publish.js +77 -0
  110. package/scripts/plugin-sync.js +83 -17
  111. package/scripts/prepack.js +9 -0
  112. package/scripts/ralph/prompt.md +0 -0
  113. package/scripts/release-metadata.js +0 -0
  114. package/scripts/release-sync.js +83 -7
  115. package/scripts/release-verify.js +131 -7
  116. package/scripts/setup-npmrc.js +48 -23
  117. package/scripts/skills-install.js +9 -2
  118. package/scripts/skills-manifest.js +2 -21
  119. package/scripts/skills-pack.js +2 -2
  120. package/scripts/skills-validate.js +5 -55
  121. package/skills/align/SKILL.md +0 -0
  122. package/skills/align/agents/openai.yaml +0 -0
  123. package/skills/align/references/shared-language.md +0 -0
  124. package/skills/arch/SKILL.md +0 -0
  125. package/skills/arch/agents/openai.yaml +0 -0
  126. package/skills/build/SKILL.md +0 -0
  127. package/skills/build/agents/openai.yaml +0 -0
  128. package/skills/cleanup/SKILL.md +0 -0
  129. package/skills/cleanup/agents/openai.yaml +0 -0
  130. package/skills/cleanup/references/style-and-deslop.md +0 -0
  131. package/skills/diagnose/SKILL.md +0 -0
  132. package/skills/diagnose/agents/openai.yaml +0 -0
  133. package/skills/flow/SKILL.md +0 -0
  134. package/skills/flow/agents/openai.yaml +0 -0
  135. package/skills/index.json +0 -0
  136. package/skills/maestro/SKILL.md +17 -1
  137. package/skills/maestro/agents/openai.yaml +0 -0
  138. package/skills/maestro/references/core-release-rules.md +2 -2
  139. package/skills/maestro/references/native-ingest-map.md +0 -0
  140. package/skills/sage/SKILL.md +0 -0
  141. package/skills/sage/agents/openai.yaml +0 -0
  142. package/skills/sage/references/source-selection.md +0 -0
  143. package/skills/tdd/SKILL.md +0 -0
  144. package/skills/tdd/agents/openai.yaml +0 -0
  145. package/skills/vet/SKILL.md +0 -0
  146. package/skills/vet/agents/openai.yaml +0 -0
  147. package/skills/vet/references/security-playbooks.md +0 -0
  148. package/skills/vibe/SKILL.md +0 -0
  149. package/skills/vibe/agents/openai.yaml +0 -0
  150. package/sprint/00-idea.md +0 -0
  151. package/sprint/01-architecture.md +0 -0
  152. package/sprint/02-oss-evidence.md +0 -0
  153. package/sprint/03-logic.md +0 -0
  154. package/sprint/04-security.md +0 -0
  155. package/sprint/05-dx-ux.md +0 -0
  156. package/sprint/06-build-plan.md +0 -0
  157. package/sprint/07-release.md +2 -2
  158. package/src/agents.js +281 -0
  159. package/src/bootstrap.js +272 -65
  160. package/src/build-gate.js +0 -0
  161. package/src/codex-app-server.js +291 -0
  162. package/src/decision-log.js +0 -0
  163. package/src/fs-utils.js +175 -4
  164. package/src/launcher.js +26 -23
  165. package/src/mcp-config.js +9 -1
  166. package/src/mcp-live-client.js +141 -8
  167. package/src/paths.js +6 -1
  168. package/src/policy.js +2 -2
  169. package/src/prelaunch.js +223 -0
  170. package/src/process-utils.js +62 -0
  171. package/src/quality/ai-quality-orchestrator.js +328 -0
  172. package/src/release-issue-gates.js +62 -0
  173. package/src/release-operations.js +72 -0
  174. package/src/release-state.js +0 -0
  175. package/src/runtime/active-autonomy-core.js +0 -0
  176. package/src/runtime/agent-compat.js +31 -0
  177. package/src/runtime/alignment-sentinel.js +0 -0
  178. package/src/runtime/architect-review.js +249 -11
  179. package/src/runtime/autonomous-tasks.js +585 -0
  180. package/src/runtime/build-readiness.js +0 -0
  181. package/src/runtime/code-graph-rehearse.js +0 -0
  182. package/src/runtime/codeburn-core.js +118 -0
  183. package/src/runtime/context-authority.js +40 -0
  184. package/src/runtime/context-economy-core.js +40 -0
  185. package/src/runtime/continuity-graph.js +201 -0
  186. package/src/runtime/continuity-notes.js +71 -26
  187. package/src/runtime/core-source-ingest.js +2 -2
  188. package/src/runtime/detached-provider.js +90 -13
  189. package/src/runtime/doctor-report.js +18 -0
  190. package/src/runtime/environment-awareness-core.js +0 -0
  191. package/src/runtime/exposure-catalog.js +0 -0
  192. package/src/runtime/graphify-core.js +167 -0
  193. package/src/runtime/guidance-stack.js +9 -2
  194. package/src/runtime/handoff-packets.js +92 -0
  195. package/src/runtime/headroom-core.js +104 -0
  196. package/src/runtime/helper-orchestration-core.js +0 -0
  197. package/src/runtime/hook-profiles.js +20 -0
  198. package/src/runtime/learning-loop-core.js +110 -4
  199. package/src/runtime/live-agent-verification.js +122 -0
  200. package/src/runtime/maestro-events.js +0 -0
  201. package/src/runtime/maestro-manager.js +0 -0
  202. package/src/runtime/maestro-output.js +58 -0
  203. package/src/runtime/maestro-state.js +0 -0
  204. package/src/runtime/managed-markdown.js +29 -0
  205. package/src/runtime/mcp-authority.js +147 -0
  206. package/src/runtime/mcp-policy.js +0 -0
  207. package/src/runtime/obsidian-integration-core.js +255 -17
  208. package/src/runtime/obsidian-plugin-bridge.js +344 -38
  209. package/src/runtime/orchestrator.js +0 -0
  210. package/src/runtime/pi-maestro-core.js +89 -0
  211. package/src/runtime/preferences.js +79 -0
  212. package/src/runtime/project-context.js +636 -0
  213. package/src/runtime/prompt-strategy-core.js +0 -0
  214. package/src/runtime/quorum-review.js +0 -0
  215. package/src/runtime/ralph-execution-core.js +0 -0
  216. package/src/runtime/redaction-gateway.js +218 -19
  217. package/src/runtime/runtime-state.js +94 -2
  218. package/src/runtime/schema-migrations.js +162 -0
  219. package/src/runtime/semantic-recording-core.js +0 -0
  220. package/src/runtime/signal-hooks.js +13 -0
  221. package/src/runtime/skills-registry-export.js +96 -8
  222. package/src/runtime/startup-path.js +0 -0
  223. package/src/runtime/task-contracts.js +83 -0
  224. package/src/runtime/universal-plugin-broker-core.js +373 -50
  225. package/src/runtime/workspace-intelligence-runtime.js +0 -0
  226. package/src/runtime/workspace-virtualizer.js +0 -0
  227. package/src/runtime/workspaces.js +0 -0
  228. package/src/runtime-artifacts.js +0 -0
  229. package/src/setup-lifecycle.js +359 -0
  230. package/src/skill-frontmatter.js +78 -0
  231. package/src/skill-installer.js +226 -71
  232. package/src/skills.js +309 -31
  233. package/src/state-sync.js +0 -0
  234. package/src/test-fixtures.js +543 -0
  235. package/src/tui/grid.js +67 -0
  236. package/src/tui/status-grid.js +23 -0
  237. package/support-bundle.json +114 -0
  238. package/templates/AGENTS.md +6 -2
  239. package/templates/catalog-manifest.json +0 -0
  240. package/templates/model-instructions/core.md +0 -0
  241. package/templates/model-instructions/release.md +0 -0
  242. package/templates/model-instructions/security.md +0 -0
  243. package/templates/quality/ai-quality-rules.yml +37 -0
  244. package/docs/assets/image/Screenshot(1).png +0 -0
  245. package/docs/assets/image/Screenshot(2).png +0 -0
  246. package/docs/assets/image/Screenshot(3).png +0 -0
  247. package/docs/assets/image/Screenshot(4).png +0 -0
  248. package/docs/assets/image/Screenshot(5).png +0 -0
  249. package/docs/assets/image/Screenshot(6).png +0 -0
  250. package/docs/assets/image/Screenshot(7).png +0 -0
  251. package/docs/assets/image/Screenshot(8).png +0 -0
  252. package/docs/assets/image/Screenshot(9).png +0 -0
  253. package/docs/assets/meta-architect-logo.png +0 -0
  254. package/docs/assets/meta-architect-logo.svg +0 -8
  255. package/docs/onboarding.md +0 -81
  256. package/docs/prompt-guidance-contract.md +0 -17
  257. package/docs/prompt-guidance-fragments/active-autonomy-core.md +0 -7
  258. package/docs/skills-publishing.md +0 -255
  259. package/scripts/postinstall.js +0 -23
@@ -1,26 +1,26 @@
1
- # Release Readiness 0.1.13
1
+ # Release Readiness 0.14.1
2
2
 
3
3
  ## Production bar
4
4
 
5
- `v0.1.13` is treated as production only when:
5
+ `v0.14.1` is treated as production only when:
6
6
  - the package installs cleanly from the canonical public install command
7
7
  - the Codex-hosted runtime path works end to end
8
8
  - the helper flow remains valid for scripted verification
9
9
  - the singular `$maestro` umbrella and helper-skill contract stay coherent
10
- - release docs, package metadata, and workflows all agree on `0.1.13`
10
+ - release docs, package metadata, and workflows all agree on `0.14.1`
11
11
 
12
12
  Target release state:
13
- - npm package: `@jstn-sdk/ma@0.1.13`
13
+ - npm package: `@jstn-sdk/ma@0.14.1`
14
14
  - npm registry state: pending publish
15
- - publishability note: `0.1.12` is already published, so `0.1.13` is the next publishable package line
16
- - git tag: `v0.1.13`
17
- - GitHub release: pending publish for `v0.1.13`
15
+ - publishability note: `0.14.0` is already published, so `0.14.1` is the next publishable package line
16
+ - git tag: `v0.14.1`
17
+ - GitHub release: pending publish for `v0.14.1`
18
18
 
19
19
  ## Production checklist
20
20
 
21
21
  - skills-first product identity: PASS
22
22
  - package/plugin identity aligned to `@jstn-sdk/ma`: PASS
23
- - version/tag alignment `0.1.13` / `v0.1.13`: PASS
23
+ - version/tag alignment `0.14.1` / `v0.14.1`: PASS
24
24
  - install/uninstall docs aligned: PASS
25
25
  - onboarding is concise and sequential: PASS
26
26
  - helper command documented as secondary: PASS
@@ -36,7 +36,7 @@ Target release state:
36
36
  - workflow/release/provenance docs aligned: PASS
37
37
  - no stale package names remain in tracked repo surfaces: PASS
38
38
  - no conflicting CLI-first product story remains in tracked product docs: PASS
39
- - issue proof gates for `v0.1.13`: PASS; `release-issue-gates-0.1.13.json` marks issues `#13-#29` passed with implementation, verification, and production evidence, so release verification can enforce the gate artifact instead of blocking on pending issue states
39
+ - issue proof gates for `v0.14.1`: PASS; `release-issue-gates-0.14.1.json` marks issues `#13-#29` passed with implementation, verification, and production evidence, so release verification can enforce the gate artifact instead of blocking on pending issue states
40
40
 
41
41
  ## Automated checks run
42
42
 
@@ -71,10 +71,10 @@ That should prove:
71
71
  Issue gate artifact:
72
72
 
73
73
  ```text
74
- docs/qa/release-issue-gates-0.1.13.json
74
+ docs/qa/release-issue-gates-0.14.1.json
75
75
  ```
76
76
 
77
- Every open issue assigned to `v0.1.13` must remain in this file until it is production-passed. A passed issue requires:
77
+ Every open issue assigned to `v0.14.1` must remain in this file until it is production-passed. A passed issue requires:
78
78
  - implementation evidence
79
79
  - verification evidence
80
80
  - production evidence
@@ -93,7 +93,7 @@ Helper-path validation:
93
93
 
94
94
  ```bash
95
95
  ma setup
96
- ma idea "Harden Meta-Architect v0.1.13 semantic core with Obsidian vault context, Ralph execution proof, context economy, and package-gated release evidence"
96
+ ma idea "Harden Meta-Architect v0.14.1 semantic core with Obsidian vault context, Ralph execution proof, context economy, and package-gated release evidence"
97
97
  ma run '$arch'
98
98
  ma run '$sage'
99
99
  ma run '$flow'
@@ -0,0 +1,24 @@
1
+ # AI quality enforcement
2
+
3
+ Meta-Architect exposes `AIQualityOrchestrator` as a blocking policy boundary for generated code. It records bounded violation and KPI receipts under `.ma/quality/` and exposes them through the local MCP quality resources.
4
+
5
+ The default checks are deterministic source checks plus the installed Semgrep CLI. The orchestrator has no external provider or model configuration; security and architecture checks are local, deterministic, and fail closed when Semgrep is unavailable.
6
+
7
+ Every accepted generation must include approved test evidence. `testDrivenGeneration()` requires test generation, approval, code generation, execution, and at least 80% coverage before returning code.
8
+
9
+ ## Usage
10
+
11
+ ```js
12
+ import { AIQualityOrchestrator } from "@jstn-sdk/ma";
13
+
14
+ const quality = new AIQualityOrchestrator({ projectRoot: process.cwd() });
15
+ const result = await quality.validate(code, {
16
+ filePath: "src/example.ts",
17
+ hasTests: true,
18
+ testCoverage: 0.9,
19
+ });
20
+
21
+ if (!result.passed) throw new Error(result.reviewReason);
22
+ ```
23
+
24
+ The tracked Semgrep baseline is `templates/quality/ai-quality-rules.yml`; a project may provide a stricter `.ma/semgrep/ai-quality-rules.yml`.
File without changes
File without changes
File without changes
File without changes
@@ -1,17 +1,17 @@
1
- # v0.1.13 Requirements & Rules
1
+ # v0.14.1 Requirements & Rules
2
2
 
3
3
  ## Production definition
4
4
 
5
- Meta-Architect `v0.1.13` is production only when:
5
+ Meta-Architect `v0.14.1` is production only when:
6
6
  1. the package/install surface works
7
7
  2. the in-session skill workflow from `$arch` through `$build` works
8
8
  3. the release evidence matches the actual package and git tag
9
9
 
10
- ## What `v0.1.13` must have
10
+ ## What `v0.14.1` must have
11
11
 
12
12
  ### 1. Canonical package/runtime path
13
13
 
14
- - recommended POSIX one-line install: `curl -fsSL https://cdn.jsdelivr.net/gh/JustineDevs/meta-architect@main/scripts/install.sh | sh`
14
+ - recommended POSIX install: download the latest installer and checksum through jsDelivr, verify the downloaded installer with `sha256sum -c`, then run `sh install.sh`
15
15
  - install: `npm i -g @openai/codex@latest @jstn-sdk/ma@latest`
16
16
  - optional helper launch: `ma --madmax --high`
17
17
  - uninstall Meta-Architect only: `npm uninstall -g @jstn-sdk/ma`
@@ -34,6 +34,10 @@ Helper commands remain available for setup and scripted validation:
34
34
  - `ma merge`
35
35
  - `ma release`
36
36
 
37
+ `ma merge` and `ma release` are approval-only by default. `--dry-run` performs
38
+ preflight without changing release state; `--execute` is the only mode that
39
+ runs the displayed `git merge --no-ff --no-edit -- <source>` command.
40
+
37
41
  ### 3. State and gate contract
38
42
 
39
43
  Canonical runtime namespace:
@@ -50,16 +54,16 @@ Canonical state files:
50
54
 
51
55
  ### 4. Required release evidence
52
56
 
53
- - `package.json` version `0.1.13`
54
- - git tag `v0.1.13`
57
+ - `package.json` version `0.14.1`
58
+ - git tag `v0.14.1`
55
59
  - `RELEASE.md`
56
60
  - `CHANGELOG.md`
57
- - `docs/qa/release-readiness-0.1.13.md`
58
- - `docs/qa/release-issue-gates-0.1.13.json`
61
+ - `docs/qa/release-readiness-0.14.1.md`
62
+ - `docs/qa/release-issue-gates-0.14.1.json`
59
63
  - green `npm run release:check`
60
- - GitHub release asset `meta-architect_0.1.13_all.deb`
61
- - GitHub release asset `meta-architect-0.1.13-1-any.pkg.tar.xz`
62
- - GitHub release asset `meta-architect-0.1.13-1.noarch.rpm`
64
+ - GitHub release asset `meta-architect_0.14.1_all.deb`
65
+ - GitHub release asset `meta-architect-0.14.1-1-any.pkg.tar.xz`
66
+ - GitHub release asset `meta-architect-0.14.1-1.noarch.rpm`
63
67
  - green `npm run linux:packages:build`
64
68
  - green `npm run linux:packages:smoke`
65
69
  - green `npm run release:assets`
@@ -83,7 +87,9 @@ Canonical state files:
83
87
  7. Build and smoke-check the Linux native packages on Linux:
84
88
  - `npm run linux:packages:build`
85
89
  - `npm run linux:packages:smoke`
86
- - `npm run release:assets`
90
+ - `npm run release:assets`
91
+ - `npm run release:assets:generate` creates `dist/SHA256SUMS`, `dist/sbom.spdx.json`, and `dist/release-summary.json`; `release:assets` verifies them.
92
+ - `dist/` is CI-generated and ignored by Git. GitHub Releases are the source of truth for downloadable packages; historical binaries are not retained in the repository.
87
93
  8. Create and push tag `v<version>`
88
94
  9. Preferred publish path: publish from `.github/workflows/npm-publish.yml` on a supported cloud runner so provenance can be generated
89
95
  10. Local shell fallback when not publishing from GitHub Actions or GitLab CI/CD:
@@ -101,11 +107,11 @@ Canonical state files:
101
107
 
102
108
  ### 6.2 Issue proof gates
103
109
 
104
- Every open next-release issue must be represented in `docs/qa/release-issue-gates-0.1.13.json`.
110
+ Every open next-release issue must be represented in `docs/qa/release-issue-gates-0.14.1.json`.
105
111
 
106
112
  Production pass rule:
107
113
  - issue status must be `passed`
108
- - issue milestone must match `v0.1.13`
114
+ - issue milestone must match `v0.14.1`
109
115
  - implementation evidence must be present
110
116
  - verification evidence must be present
111
117
  - production evidence must be present
@@ -118,3 +124,10 @@ Production pass rule:
118
124
  - `npm publish --provenance` is valid only from a supported cloud CI/CD provider
119
125
  - local shell publishes are expected to fail with `Automatic provenance generation not supported for provider: null`
120
126
  - use the repository publish workflow when provenance is part of the release bar
127
+ ## Package diagnostics
128
+
129
+ `npm run package:doctor` (or `npm run release:doctor`) checks maintainer-facing
130
+ release and package artifacts. It is distinct from `ma doctor`, which checks
131
+ installed/user environment health.
132
+ It is intentionally separate from `ma doctor`, which checks the installed
133
+ environment, runtime state, MCP readiness, and support bundle health.
package/docs/skills.md CHANGED
@@ -16,7 +16,7 @@ Recommended CLI install for macOS, Linux, WSL, and Git-Bash:
16
16
 
17
17
  ```bash
18
18
  # One-line install (POSIX shells only; use WSL/Git-Bash on Windows)
19
- curl -fsSL https://cdn.jsdelivr.net/gh/JustineDevs/meta-architect@main/scripts/install.sh | sh
19
+ curl -fsSLo install.sh https://cdn.jsdelivr.net/gh/JustineDevs/meta-architect@latest/scripts/install.sh && curl -fsSLo install.sh.sha256 https://cdn.jsdelivr.net/gh/JustineDevs/meta-architect@latest/scripts/install.sh.sha256 && sed 's#scripts/install.sh#install.sh#' install.sh.sha256 | sha256sum -c - && sh install.sh
20
20
  ```
21
21
 
22
22
  ```bash
@@ -0,0 +1,49 @@
1
+ # Vendor Plugin Publishing
2
+
3
+ The existing `plugins/meta-architect` directory is the only hand-authored plugin source. Build vendor outputs from it:
4
+
5
+ ```bash
6
+ npm run plugin:build -- --targets all --output ./dist/vendor-plugins
7
+ ```
8
+
9
+ Publishing is explicit and one host at a time. It is a dry run unless `--execute` is supplied:
10
+
11
+ ```bash
12
+ npm run plugin:publish -- --target pi
13
+ ```
14
+
15
+ Pi consumes the existing `@jstn-sdk/ma` package; no second npm package is created. Claude Code, Cursor, Antigravity, Gemini CLI, OpenCode, Cline, Continue, Goose, and OpenClaw use host-specific Git, marketplace, extension, or workspace distribution flows; `plugin:publish` prepares those native inputs and does not pretend a local npm command publishes them.
16
+
17
+ The builder produces one directory per host. It copies the existing lane skills and adds only the host manifest, rules, context file, or package metadata required by that host. It never creates a second workflow or changes the canonical skills.
18
+
19
+ ChatGPT is not included as a generated local plugin target. ChatGPT
20
+ publication requires a deployed HTTPS MCP backend, authentication, privacy
21
+ materials, and OpenAI review. See [ChatGPT Integration](./chatgpt-integration.md)
22
+ for the exact readiness contract.
23
+
24
+ ## Outputs
25
+
26
+ | Target | Output | Mode |
27
+ | --- | --- | --- |
28
+ | `codex` | `.codex-plugin/`, `skills/`, app and MCP metadata | native |
29
+ | `claude-code` | Claude marketplace plus plugin source | native |
30
+ | `cursor` | Cursor marketplace plus plugin source and rules | native |
31
+ | `antigravity` | `plugin.json`, `skills/`, `rules/` | native |
32
+ | `gemini-cli` | `gemini-extension.json`, `GEMINI.md`, `skills/` | native |
33
+ | `opencode` | `.opencode/skills/`, `AGENTS.md` | native |
34
+ | `pi` | `@jstn-sdk/ma` package with `pi.skills` metadata | native |
35
+ | `cline` | `.clinerules`, `.cline/skills/` | native |
36
+ | `openclaw` | workspace `skills/` and `AGENTS.md` | portable |
37
+ | `continue` | `.continue/rules/` and portable skills | portable |
38
+ | `goose` | workspace `skills/` and `AGENTS.md` | portable |
39
+
40
+ Portable means the generated bundle is usable as project context and skills, but this repository does not invent a host runtime plugin or claim marketplace publication. A host-specific publisher still requires the host account, repository, or review process.
41
+
42
+ ## Verification
43
+
44
+ ```bash
45
+ npm test -- test/plugin-build.test.js
46
+ npm run plugin:verify
47
+ ```
48
+
49
+ Inspect `BUILD-MANIFEST.json` in each output before publishing. It records the generated version, source, support mode, and the host-specific install/publish action.
package/index.js CHANGED
@@ -1,8 +1,28 @@
1
+ export { qualityResources, queryQualityStatus, readQualityResource } from "./mcp/local/quality.js";
2
+ export {
3
+ agentRegistry as agentSurfaceRegistry,
4
+ detectInstalled,
5
+ getAgent,
6
+ getAgentInvocation,
7
+ getNonUniversalAgents,
8
+ isUniversalAgent as isUniversalAgentSurface,
9
+ listAgents,
10
+ resolveAgentCommand,
11
+ } from "./src/agents.js";
1
12
  export {
2
13
  evaluateBuildGate,
3
14
  formatBuildBlockers,
4
15
  formatNextAllowedTriggers,
5
16
  } from "./src/build-gate.js";
17
+ export {
18
+ CodexAppServerClient,
19
+ CodexRpcError,
20
+ createStdioTransport,
21
+ generateCodexBindings,
22
+ parseCodexJsonl,
23
+ runCodexExec,
24
+ validateStructuredResult,
25
+ } from "./src/codex-app-server.js";
6
26
  export {
7
27
  appendDecision,
8
28
  loadDecisionLog,
@@ -22,6 +42,11 @@ export {
22
42
  validateMergeTarget,
23
43
  validateReleaseOrigin,
24
44
  } from "./src/policy.js";
45
+ export {
46
+ AIQualityOrchestrator,
47
+ calculateQualityScore,
48
+ staticViolations,
49
+ } from "./src/quality/ai-quality-orchestrator.js";
25
50
  export { loadReleaseState, saveReleaseState, validateReleaseState } from "./src/release-state.js";
26
51
  export {
27
52
  classifyAutonomyBranch,
@@ -30,6 +55,14 @@ export {
30
55
  loadActiveAutonomyCore,
31
56
  validateActiveAutonomyCore,
32
57
  } from "./src/runtime/active-autonomy-core.js";
58
+ export {
59
+ agentCompatPackage,
60
+ agentCompatVersion,
61
+ compileAgentIntegrations,
62
+ detectAgentEnvironments,
63
+ listAgentCompatAdapters,
64
+ validateAgentIntegrations,
65
+ } from "./src/runtime/agent-compat.js";
33
66
  export {
34
67
  createAlignmentRecoveryPlan,
35
68
  createDefaultAlignmentSentinelReport,
@@ -37,6 +70,20 @@ export {
37
70
  loadAlignmentSentinelReportOrDefault,
38
71
  saveAlignmentSentinelReport,
39
72
  } from "./src/runtime/alignment-sentinel.js";
73
+ export {
74
+ autonomousTaskSchemaVersion,
75
+ cancelAutonomousTask,
76
+ createTaskQueue,
77
+ enqueueAutonomousTasks,
78
+ getAutonomousTaskQueuePath,
79
+ loadTaskQueue,
80
+ parseTaskInput,
81
+ runAutonomousTasks,
82
+ saveTaskQueue,
83
+ seedAutonomousTaskArtifacts,
84
+ summarizeTasks,
85
+ validateTaskQueue,
86
+ } from "./src/runtime/autonomous-tasks.js";
40
87
  export {
41
88
  createCodeGraphTouchpoint,
42
89
  createCodeGraphTouchpointFromFile,
@@ -55,6 +102,15 @@ export {
55
102
  shouldBypassContextEconomy,
56
103
  validateContextEconomyCore,
57
104
  } from "./src/runtime/context-economy-core.js";
105
+ export {
106
+ continuityGraphSchemaVersion,
107
+ createDefaultContinuityGraph,
108
+ getContinuityGraphPath,
109
+ loadContinuityGraph,
110
+ mergeContinuityGraph,
111
+ queryContinuityGraph,
112
+ validateContinuityGraph,
113
+ } from "./src/runtime/continuity-graph.js";
58
114
  export {
59
115
  coreSourceDefinitions,
60
116
  createDefaultCoreSourceIngest,
@@ -99,6 +155,7 @@ export {
99
155
  loadLearningLoopCore,
100
156
  validateLearningLoopCore,
101
157
  } from "./src/runtime/learning-loop-core.js";
158
+ export { verifyLiveAgentMatrix } from "./src/runtime/live-agent-verification.js";
102
159
  export {
103
160
  validateRuntimeMcpPolicy,
104
161
  validateRuntimeMcpPolicyFile,
@@ -147,6 +204,14 @@ export {
147
204
  renameObsidianFileSafely,
148
205
  writeObsidianAttachment,
149
206
  } from "./src/runtime/obsidian-plugin-bridge.js";
207
+ export {
208
+ assertPiMaestroToolAllowed,
209
+ createPiMaestroCapabilityMapping,
210
+ createPiMaestroToolSurface,
211
+ isPiMaestroEnabled,
212
+ maestroGateLanes,
213
+ runPiMaestroExperimental,
214
+ } from "./src/runtime/pi-maestro-core.js";
150
215
  export {
151
216
  createDefaultPromptStrategyCore,
152
217
  loadPromptStrategyCore,
@@ -246,3 +311,11 @@ export {
246
311
  runVibe,
247
312
  } from "./src/skills.js";
248
313
  export { loadCombinedState, syncStatusUpdates } from "./src/state-sync.js";
314
+ export {
315
+ measureWidth,
316
+ padCell,
317
+ renderGrid,
318
+ renderRow,
319
+ renderSeparatorLine,
320
+ } from "./src/tui/grid.js";
321
+ export { renderCheckGrid, renderReleaseGrid } from "./src/tui/status-grid.js";
File without changes
package/mcp/fallback.json CHANGED
File without changes
@@ -1,39 +1,187 @@
1
1
  import fs from "node:fs/promises";
2
2
  import path from "node:path";
3
+ import { promisify } from "node:util";
3
4
  import { getRepoRoot } from "../../src/paths.js";
5
+ import { safeExecFile } from "../../src/process-utils.js";
4
6
 
5
- const ignoredDirs = new Set([".git", ".ma", ".omx", "node_modules"]);
7
+ const execFileAsync = promisify(safeExecFile);
8
+ const MAX_SCAN_BYTES = 1024 * 1024;
9
+ const ignoredDirs = new Set([
10
+ ".git",
11
+ ".ma",
12
+ ".omx",
13
+ ".next",
14
+ ".turbo",
15
+ ".vercel",
16
+ "build",
17
+ "coverage",
18
+ "dist",
19
+ "node_modules",
20
+ ]);
21
+ const artifactExtensions = new Set([
22
+ ".7z",
23
+ ".bin",
24
+ ".bmp",
25
+ ".class",
26
+ ".dll",
27
+ ".dylib",
28
+ ".gif",
29
+ ".gz",
30
+ ".ico",
31
+ ".jar",
32
+ ".jpeg",
33
+ ".jpg",
34
+ ".lockb",
35
+ ".mp3",
36
+ ".mp4",
37
+ ".o",
38
+ ".pdf",
39
+ ".png",
40
+ ".so",
41
+ ".svg",
42
+ ".tar",
43
+ ".tgz",
44
+ ".wasm",
45
+ ".webp",
46
+ ".woff",
47
+ ".woff2",
48
+ ".zip",
49
+ ".zst",
50
+ ]);
51
+ const ignoredFiles = new Set([".active"]);
6
52
  const codeIntelTools = [
7
53
  "code_intel.list_files",
8
54
  "code_intel.search_text",
9
55
  "code_intel.read_excerpt",
10
56
  ];
11
57
 
12
- async function walk(rootDir, currentDir = rootDir, files = [], limit = Number.POSITIVE_INFINITY) {
13
- if (files.length >= limit) {
14
- return files;
58
+ function normalizeRelative(relativePath) {
59
+ const normalized = path.posix.normalize(relativePath.replaceAll(path.sep, "/"));
60
+ if (
61
+ normalized === "." ||
62
+ normalized === ".." ||
63
+ normalized.startsWith("../") ||
64
+ normalized.includes("\0")
65
+ ) {
66
+ throw new Error("code_intel path must stay inside the repository");
15
67
  }
68
+ return normalized;
69
+ }
16
70
 
17
- const entries = await fs.readdir(currentDir, { withFileTypes: true });
18
- for (const entry of entries) {
19
- if (files.length >= limit) {
20
- break;
21
- }
71
+ function isArtifactPath(relativePath) {
72
+ const segments = relativePath.split("/");
73
+ return (
74
+ ignoredFiles.has(segments.at(-1)) ||
75
+ segments.some((segment) => ignoredDirs.has(segment)) ||
76
+ artifactExtensions.has(path.extname(relativePath).toLowerCase())
77
+ );
78
+ }
79
+
80
+ async function isReadableTextFile(absolutePath) {
81
+ const stat = await fs.lstat(absolutePath);
82
+ if (stat.isSymbolicLink()) return false;
83
+ if (!stat.isFile() || stat.size > MAX_SCAN_BYTES) return false;
84
+ const sample = await fs.readFile(absolutePath, { encoding: null, flag: "r" });
85
+ return !sample.subarray(0, Math.min(sample.length, 8192)).includes(0);
86
+ }
87
+
88
+ async function assertSafeRepoPath(rootDir, relativePath) {
89
+ let current = rootDir;
90
+ for (const component of relativePath.split("/")) {
91
+ current = path.join(current, component);
92
+ const stat = await fs.lstat(current).catch((error) => {
93
+ if (error?.code === "ENOENT") return null;
94
+ throw error;
95
+ });
96
+ if (stat?.isSymbolicLink()) throw new Error("code_intel cannot follow symlinks");
97
+ }
98
+ return path.join(rootDir, relativePath);
99
+ }
100
+
101
+ async function listGitFiles(rootDir) {
102
+ try {
103
+ const { stdout } = await execFileAsync(
104
+ "git",
105
+ ["ls-files", "--cached", "--others", "--exclude-standard", "-z"],
106
+ {
107
+ cwd: rootDir,
108
+ encoding: "buffer",
109
+ maxBuffer: 4 * 1024 * 1024,
110
+ timeout: 10_000,
111
+ shell: false,
112
+ },
113
+ );
114
+ return stdout
115
+ .toString("utf8")
116
+ .split("\0")
117
+ .filter(Boolean)
118
+ .map((file) => file.replaceAll("\\", "/"));
119
+ } catch {
120
+ return null;
121
+ }
122
+ }
123
+
124
+ async function loadFallbackIgnorePatterns(rootDir) {
125
+ const content = await fs.readFile(path.join(rootDir, ".gitignore"), "utf8").catch(() => "");
126
+ return content
127
+ .split("\n")
128
+ .map((line) => line.trim())
129
+ .filter((line) => line && !line.startsWith("#") && !line.startsWith("!"));
130
+ }
131
+
132
+ function isFallbackIgnored(relativePath, patterns) {
133
+ const normalized = relativePath.split(path.sep).join("/");
134
+ return patterns.some((pattern) => {
135
+ const directoryPattern = pattern.endsWith("/") ? pattern.slice(0, -1) : pattern;
136
+ const escaped = directoryPattern.replace(/[.+^${}()|[\]\\]/g, "\\$&");
137
+ const expression = escaped
138
+ .replaceAll("**", ".*")
139
+ .replaceAll("*", "[^/]*")
140
+ .replaceAll("?", "[^/]");
141
+ const matcher = new RegExp(`(?:^|/)${expression}(?:/|$)`);
142
+ return (
143
+ matcher.test(normalized) ||
144
+ (!pattern.includes("/") && new RegExp(`(^|/)${expression}$`).test(normalized))
145
+ );
146
+ });
147
+ }
22
148
 
149
+ async function walkFallback(rootDir, currentDir = rootDir, files = [], limit = 200, patterns = []) {
150
+ if (files.length >= limit) return files;
151
+ const entries = await fs.readdir(currentDir, { withFileTypes: true }).catch(() => []);
152
+ for (const entry of entries) {
153
+ if (files.length >= limit) break;
154
+ const absolutePath = path.join(currentDir, entry.name);
155
+ const relativePath = path.relative(rootDir, absolutePath);
156
+ if (isFallbackIgnored(relativePath, patterns)) continue;
23
157
  if (entry.isDirectory()) {
24
- if (ignoredDirs.has(entry.name)) {
25
- continue;
158
+ if (!ignoredDirs.has(entry.name)) {
159
+ await walkFallback(rootDir, absolutePath, files, limit, patterns);
26
160
  }
27
- await walk(rootDir, path.join(currentDir, entry.name), files, limit);
28
- continue;
161
+ } else if (entry.isFile() && !isArtifactPath(relativePath)) {
162
+ files.push(relativePath.split(path.sep).join("/"));
29
163
  }
164
+ }
165
+ return files;
166
+ }
30
167
 
31
- if (!entry.isFile()) {
32
- continue;
168
+ async function listSafeFiles(rootDir, limit = 200) {
169
+ const gitFiles = await listGitFiles(rootDir);
170
+ const candidates =
171
+ gitFiles ??
172
+ (await walkFallback(rootDir, rootDir, [], limit, await loadFallbackIgnorePatterns(rootDir)));
173
+ const files = [];
174
+ for (const relativePath of candidates) {
175
+ if (files.length >= limit) break;
176
+ const normalized = normalizeRelative(relativePath);
177
+ if (isArtifactPath(normalized)) continue;
178
+ try {
179
+ const absolute = await assertSafeRepoPath(rootDir, normalized);
180
+ if (await isReadableTextFile(absolute)) files.push(normalized);
181
+ } catch {
182
+ // Ignore files that disappear or cannot be inspected.
33
183
  }
34
- files.push(path.relative(rootDir, path.join(currentDir, entry.name)));
35
184
  }
36
-
37
185
  return files;
38
186
  }
39
187
 
@@ -42,52 +190,49 @@ export function listCodeIntelTools() {
42
190
  }
43
191
 
44
192
  export async function listRepoFiles(limit = 200) {
45
- const repoRoot = getRepoRoot();
46
- return walk(repoRoot, repoRoot, [], limit);
193
+ return listSafeFiles(getRepoRoot(), Math.max(1, Math.min(Number(limit) || 200, 2000)));
47
194
  }
48
195
 
49
196
  export async function searchRepoText(query, limit = 20) {
50
197
  const repoRoot = getRepoRoot();
51
198
  const files = await listRepoFiles(500);
52
199
  const matches = [];
53
-
200
+ const boundedLimit = Math.max(1, Math.min(Number(limit) || 20, 100));
54
201
  for (const relativePath of files) {
55
- if (matches.length >= limit) {
56
- break;
57
- }
58
-
202
+ if (matches.length >= boundedLimit) break;
59
203
  try {
60
204
  const content = await fs.readFile(path.join(repoRoot, relativePath), "utf8");
61
- const lines = content.split("\n");
62
- lines.forEach((line, index) => {
63
- if (matches.length < limit && line.includes(query)) {
205
+ content.split("\n").forEach((line, index) => {
206
+ if (matches.length < boundedLimit && line.includes(query)) {
64
207
  matches.push({ file: relativePath, line: index + 1, text: line.trim() });
65
208
  }
66
209
  });
67
210
  } catch {
68
- // Skip non-text files.
211
+ // Skip files that disappear or fail the text boundary.
69
212
  }
70
213
  }
71
-
72
214
  return matches;
73
215
  }
74
216
 
75
217
  export async function readRepoExcerpt(relativePath, line = 1, context = 2) {
76
218
  const repoRoot = getRepoRoot();
77
- const content = await fs.readFile(path.join(repoRoot, relativePath), "utf8");
219
+ const normalized = normalizeRelative(relativePath);
220
+ if (isArtifactPath(normalized))
221
+ throw new Error("code_intel cannot read generated or binary artifacts");
222
+ const absolutePath = await assertSafeRepoPath(repoRoot, normalized);
223
+ if (!(await isReadableTextFile(absolutePath)))
224
+ throw new Error("code_intel can only read bounded text files");
225
+ const content = await fs.readFile(absolutePath, "utf8");
226
+ const safeLine = Math.max(1, Number(line) || 1);
227
+ const safeContext = Math.max(0, Math.min(Number(context) || 2, 20));
78
228
  const lines = content.split("\n");
79
- const start = Math.max(0, line - context - 1);
80
- const end = Math.min(lines.length, line + context);
81
- return lines.slice(start, end).map((text, index) => ({
82
- line: start + index + 1,
83
- text,
84
- }));
229
+ const start = Math.max(0, safeLine - safeContext - 1);
230
+ const end = Math.min(lines.length, safeLine + safeContext);
231
+ return lines.slice(start, end).map((text, index) => ({ line: start + index + 1, text }));
85
232
  }
86
233
 
87
234
  export async function callCodeIntelTool(name, args = {}) {
88
- if (name === "code_intel.list_files") {
89
- return listRepoFiles(args.limit);
90
- }
235
+ if (name === "code_intel.list_files") return listRepoFiles(args.limit);
91
236
  if (name === "code_intel.search_text") {
92
237
  if (typeof args.query !== "string" || args.query.trim() === "") {
93
238
  throw new Error("code_intel.search_text requires a non-empty query");
@@ -100,7 +245,6 @@ export async function callCodeIntelTool(name, args = {}) {
100
245
  }
101
246
  return readRepoExcerpt(args.file, args.line, args.context);
102
247
  }
103
-
104
248
  throw new Error(`Unknown code_intel tool: ${name}`);
105
249
  }
106
250
 
@@ -108,6 +252,6 @@ export async function checkCodeIntelCapability() {
108
252
  const files = await listRepoFiles(10);
109
253
  return {
110
254
  ready: files.length > 0,
111
- detail: `code intel indexed ${files.length} repo file(s) in the readiness sample`,
255
+ detail: `code intel indexed ${files.length} bounded text file(s) with Git-ignore and artifact filtering`,
112
256
  };
113
257
  }