@jstn-sdk/ma 0.1.1 → 0.1.2

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 (37) hide show
  1. package/README.md +7 -5
  2. package/bin/ma.js +12 -0
  3. package/docs/README.md +2 -1
  4. package/docs/getting-started.md +4 -1
  5. package/docs/installed-sdk.md +60 -0
  6. package/docs/qa/{release-readiness-0.1.1.md → release-readiness-0.1.2.md} +8 -8
  7. package/docs/release-spec.md +7 -7
  8. package/docs/skills.md +28 -0
  9. package/package.json +2 -1
  10. package/plugins/meta-architect/.app.json +1 -1
  11. package/plugins/meta-architect/.codex-plugin/plugin.json +1 -1
  12. package/plugins/meta-architect/.mcp.json +1 -1
  13. package/plugins/meta-architect/README.md +1 -1
  14. package/plugins/meta-architect/skills/arch/agents/openai.yaml +2 -2
  15. package/plugins/meta-architect/skills/build/agents/openai.yaml +2 -2
  16. package/plugins/meta-architect/skills/flow/agents/openai.yaml +2 -2
  17. package/plugins/meta-architect/skills/meta-architect/agents/openai.yaml +2 -2
  18. package/plugins/meta-architect/skills/sage/agents/openai.yaml +2 -2
  19. package/plugins/meta-architect/skills/vet/agents/openai.yaml +2 -2
  20. package/plugins/meta-architect/skills/vibe/agents/openai.yaml +2 -2
  21. package/scripts/postinstall.js +7 -3
  22. package/skills/arch/agents/openai.yaml +2 -2
  23. package/skills/build/agents/openai.yaml +2 -2
  24. package/skills/flow/agents/openai.yaml +2 -2
  25. package/skills/meta-architect/agents/openai.yaml +2 -2
  26. package/skills/sage/agents/openai.yaml +2 -2
  27. package/skills/vet/agents/openai.yaml +2 -2
  28. package/skills/vibe/agents/openai.yaml +2 -2
  29. package/src/launcher.js +1 -0
  30. package/src/mcp-live-client.js +1 -1
  31. package/src/skill-installer.js +151 -2
  32. package/src/skills.js +2 -2
  33. package/templates/AGENTS.md +130 -0
  34. package/templates/catalog-manifest.json +22 -0
  35. package/templates/model-instructions/core.md +39 -0
  36. package/templates/model-instructions/release.md +41 -0
  37. package/templates/model-instructions/security.md +22 -0
package/README.md CHANGED
@@ -10,9 +10,9 @@
10
10
  </div>
11
11
 
12
12
  > [!IMPORTANT]
13
- > Meta-Architect `v0.1.1` is a production-grade skills line.
13
+ > Meta-Architect `v0.1.2` is a production-grade skills line.
14
14
  > It is not a lightweight demo branch.
15
- > From `v0.1.1` onward, the package is expected to ship with stable skill contracts, deterministic packaging, explicit release gates, and honest install and publish surfaces.
15
+ > From `v0.1.2` onward, the package is expected to ship with stable skill contracts, deterministic packaging, explicit release gates, and honest install and publish surfaces.
16
16
 
17
17
  ## Overview
18
18
 
@@ -44,7 +44,7 @@ It adds:
44
44
  </tr>
45
45
  <tr>
46
46
  <td><strong>Release line</strong></td>
47
- <td><code>v0.1.1</code></td>
47
+ <td><code>v0.1.2</code></td>
48
48
  </tr>
49
49
  <tr>
50
50
  <td><strong>License</strong></td>
@@ -193,7 +193,7 @@ Required output:
193
193
  5. Data model and storage choices
194
194
  6. Auth/security considerations
195
195
  7. DX/UX considerations
196
- 8. Delivery plan for v0.1.1
196
+ 8. Delivery plan for v0.1.2
197
197
  9. Risks and trade-offs
198
198
  10. Decision log
199
199
  11. Exact next trigger to run after this
@@ -349,6 +349,7 @@ What to use when:
349
349
  - use Codex and run the skills in-session
350
350
  - use `$arch -> $sage -> $flow -> $vet -> $vibe -> $build` inside the Codex session
351
351
  - use `ma setup` or `ma init` only when you want local scaffolding or scripted helper automation from the terminal
352
+ - use `ma sdk-path` when you need the exact installed support-bundle path for packaged prompts, MCP files, sprint files, scripts, plugin metadata, or templates
352
353
 
353
354
  ## Core Maintainers
354
355
 
@@ -510,12 +511,13 @@ Provenance note:
510
511
  | --- | --- |
511
512
  | [Getting Started](./docs/getting-started.md) | end-to-end local onboarding |
512
513
  | [Skills Reference](./docs/skills.md) | trigger-by-trigger contract guide |
514
+ | [Installed Support Bundle](./docs/installed-sdk.md) | standard packaged asset path for skills and helper flows |
513
515
  | [Skills Publishing](./docs/skills-publishing.md) | source-to-package pipeline |
514
516
  | [MCP Setup](./docs/mcp-setup.md) | evidence endpoint policy |
515
517
  | [Plugin README](./plugins/meta-architect/README.md) | plugin distribution surface |
516
518
  | [Collaborative Whiteboard Mission](./missions/collaborative-whiteboard/mission.md) | concrete scenario walkthrough |
517
519
  | [Release Spec](./docs/release-spec.md) | release and gate policy |
518
- | [Release Readiness](./docs/qa/release-readiness-0.1.1.md) | QA evidence for the `v0.1.1` line |
520
+ | [Release Readiness](./docs/qa/release-readiness-0.1.2.md) | QA evidence for the `v0.1.2` line |
519
521
 
520
522
  ## Release Hygiene
521
523
 
package/bin/ma.js CHANGED
@@ -15,6 +15,11 @@ import {
15
15
  } from "../src/policy.js";
16
16
  import { loadReleaseState } from "../src/release-state.js";
17
17
  import { writeBuildPlanArtifact } from "../src/runtime-artifacts.js";
18
+ import {
19
+ ensureSkillsInstalled,
20
+ ensureSupportBundleInstalled,
21
+ getSupportBundleRoot,
22
+ } from "../src/skill-installer.js";
18
23
  import {
19
24
  listSkills,
20
25
  runArch,
@@ -34,6 +39,7 @@ function printUsage() {
34
39
  console.error(" ma init");
35
40
  console.error(' ma idea "..."');
36
41
  console.error(" ma skills");
42
+ console.error(" ma sdk-path");
37
43
  console.error(" ma status");
38
44
  console.error(" ma run $arch|$sage|$flow|$vet|$vibe|$build");
39
45
  console.error(" ma merge <source-branch> <target-branch>");
@@ -198,6 +204,7 @@ async function main() {
198
204
  const arg = rest[0];
199
205
 
200
206
  if (shouldDelegateToCodex(args)) {
207
+ await Promise.all([ensureSkillsInstalled(), ensureSupportBundleInstalled()]);
201
208
  process.exitCode = runCodex(args);
202
209
  return;
203
210
  }
@@ -236,6 +243,11 @@ async function main() {
236
243
  return;
237
244
  }
238
245
 
246
+ if (command === "sdk-path") {
247
+ process.stdout.write(`${getSupportBundleRoot()}\n`);
248
+ return;
249
+ }
250
+
239
251
  if (command === "status") {
240
252
  const releaseState = await loadReleaseState();
241
253
  printStatus(releaseState);
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.1](./qa/release-readiness-0.1.1.md)
20
+ - [Release Readiness 0.1.2](./qa/release-readiness-0.1.2.md)
20
21
 
21
22
  ## Repo structure references
22
23
 
@@ -74,7 +74,7 @@ Required output:
74
74
  5. Data model and storage choices
75
75
  6. Auth/security considerations
76
76
  7. DX/UX considerations
77
- 8. Delivery plan for v0.1.1
77
+ 8. Delivery plan for v0.1.2
78
78
  9. Risks and trade-offs
79
79
  10. Decision log
80
80
  11. Exact next trigger to run after this
@@ -155,6 +155,7 @@ Terminal commands are normal shell commands:
155
155
  ```bash
156
156
  ma setup
157
157
  ma init
158
+ ma sdk-path
158
159
  ma status
159
160
  ma run '$arch'
160
161
  ```
@@ -179,6 +180,8 @@ Easy rule:
179
180
  - they prepare context, specs, plans, evidence, and runbook files
180
181
  - they do not automatically run the skill workflow
181
182
 
183
+ `ma sdk-path` prints the installed packaged support-bundle root for relevant files such as prompts, MCP files, sprint files, scripts, plugin metadata, and templates.
184
+
182
185
  ## 5. Configure MCP / GitMCP
183
186
 
184
187
  Edit:
@@ -0,0 +1,60 @@
1
+ # Installed Support Bundle
2
+
3
+ Meta-Architect installs two things into the active Codex home:
4
+
5
+ 1. skills under `CODEX_HOME/skills/`
6
+ 2. a support bundle under `CODEX_HOME/meta-architect-sdk/`
7
+
8
+ The support bundle exists so skills and helper paths can use relevant packaged files without guessing where they live.
9
+
10
+ ## Canonical support bundle path
11
+
12
+ Default:
13
+
14
+ ```text
15
+ ~/.codex/meta-architect-sdk/
16
+ ```
17
+
18
+ If `CODEX_HOME` is set, use:
19
+
20
+ ```text
21
+ $CODEX_HOME/meta-architect-sdk/
22
+ ```
23
+
24
+ You can print the exact active path with:
25
+
26
+ ```bash
27
+ ma sdk-path
28
+ ```
29
+
30
+ ## What is installed there
31
+
32
+ - `mcp/`
33
+ - `sprint/`
34
+ - `prompts/`
35
+ - `scripts/`
36
+ - `plugins/meta-architect/`
37
+ - `templates/`
38
+ - `docs/README.md`
39
+ - `asset-manifest.json`
40
+
41
+ ## Why this exists
42
+
43
+ - skills can rely on a standard installed asset root
44
+ - helper paths can repair missing support assets automatically
45
+ - packaged references do not depend on a source checkout
46
+ - the product can use relevant packaged files without path guessing
47
+
48
+ ## Contract
49
+
50
+ When Meta-Architect needs packaged support files, prefer the installed support bundle first.
51
+
52
+ Examples:
53
+ - MCP starter files -> `meta-architect-sdk/mcp/`
54
+ - sprint references -> `meta-architect-sdk/sprint/`
55
+ - Codex prompt assets -> `meta-architect-sdk/prompts/`
56
+ - helper scripts -> `meta-architect-sdk/scripts/`
57
+ - plugin metadata -> `meta-architect-sdk/plugins/meta-architect/`
58
+ - templates -> `meta-architect-sdk/templates/`
59
+
60
+ The in-session skill flow is still primary. This bundle only standardizes packaged asset access.
@@ -1,25 +1,25 @@
1
- # Release Readiness 0.1.1
1
+ # Release Readiness 0.1.2
2
2
 
3
3
  ## Production bar
4
4
 
5
- `v0.1.1` is treated as production only when:
5
+ `v0.1.2` 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
- - release docs, package metadata, and workflows all agree on `0.1.1`
9
+ - release docs, package metadata, and workflows all agree on `0.1.2`
10
10
 
11
11
  Target release state:
12
- - npm package: `@jstn-sdk/ma@0.1.1`
12
+ - npm package: `@jstn-sdk/ma@0.1.2`
13
13
  - npm registry state: pending publish
14
- - publishability note: `0.1.0` is already published, so `0.1.1` is the next publishable package line
15
- - git tag: `v0.1.1`
16
- - GitHub release: pending publish for `v0.1.1`
14
+ - publishability note: `0.1.1` is already published, so `0.1.2` is the next publishable package line
15
+ - git tag: `v0.1.2`
16
+ - GitHub release: pending publish for `v0.1.2`
17
17
 
18
18
  ## Production checklist
19
19
 
20
20
  - skills-first product identity: PASS
21
21
  - package/plugin identity aligned to `@jstn-sdk/ma`: PASS
22
- - version/tag alignment `0.1.1` / `v0.1.1`: PASS
22
+ - version/tag alignment `0.1.2` / `v0.1.2`: PASS
23
23
  - install/uninstall docs aligned: PASS
24
24
  - onboarding is concise and sequential: PASS
25
25
  - helper command documented as secondary: PASS
@@ -1,13 +1,13 @@
1
- # v0.1.1 Requirements & Rules
1
+ # v0.1.2 Requirements & Rules
2
2
 
3
3
  ## Production definition
4
4
 
5
- Meta-Architect `v0.1.1` is production only when:
5
+ Meta-Architect `v0.1.2` 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.1` must have
10
+ ## What `v0.1.2` must have
11
11
 
12
12
  ### 1. Canonical package/runtime path
13
13
 
@@ -49,16 +49,16 @@ Canonical state files:
49
49
 
50
50
  ### 4. Required release evidence
51
51
 
52
- - `package.json` version `0.1.1`
53
- - git tag `v0.1.1`
52
+ - `package.json` version `0.1.2`
53
+ - git tag `v0.1.2`
54
54
  - `RELEASE.md`
55
55
  - `CHANGELOG.md`
56
- - `docs/qa/release-readiness-0.1.1.md`
56
+ - `docs/qa/release-readiness-0.1.2.md`
57
57
  - green `npm run release:check`
58
58
 
59
59
  ### 5. Dist-tag discipline
60
60
 
61
- - stable versions such as `0.1.1` publish to npm `latest`
61
+ - stable versions such as `0.1.2` publish to npm `latest`
62
62
  - prerelease versions such as `0.2.0-beta.1` must publish with explicit tags such as `beta`
63
63
  - recommended alternate lanes are `next`, `beta`, and `canary`
64
64
  - prerelease publication must use `npm publish --tag <lane>`
package/docs/skills.md CHANGED
@@ -67,6 +67,34 @@ Important:
67
67
  - they only create local support files
68
68
  - they do not replace the in-session skill flow
69
69
 
70
+ ## Installed support bundle
71
+
72
+ Meta-Architect also installs a standard packaged support bundle for relevant files.
73
+
74
+ Default path:
75
+
76
+ ```text
77
+ ~/.codex/meta-architect-sdk/
78
+ ```
79
+
80
+ Use:
81
+
82
+ ```bash
83
+ ma sdk-path
84
+ ```
85
+
86
+ when you want the exact active path.
87
+
88
+ Relevant packaged assets there include:
89
+ - `mcp/`
90
+ - `sprint/`
91
+ - `prompts/`
92
+ - `scripts/`
93
+ - `plugins/meta-architect/`
94
+ - `templates/`
95
+
96
+ This exists so Meta-Architect can use relevant packaged files without guessing paths.
97
+
70
98
  ## Shared output contract
71
99
 
72
100
  Every skill result must include:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jstn-sdk/ma",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Codex-native skills system for architecture, evidence, review, and gated build guidance.",
5
5
  "license": "MIT",
6
6
  "author": "JustineDevs",
@@ -37,6 +37,7 @@
37
37
  ".agents/plugins/",
38
38
  "mcp/",
39
39
  "plugins/",
40
+ "templates/",
40
41
  "sprint/",
41
42
  "skills/",
42
43
  "docs/",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "meta-architect",
3
3
  "displayName": "Meta-Architect",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "description": "Programmatic architecture and verified engineering skills for Codex-native workflows.",
6
6
  "entry": "./README.md",
7
7
  "skillsDir": "./skills"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meta-architect",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Skills-first workflow layer for Codex with architecture, evidence, review, and gated build guidance.",
5
5
  "author": {
6
6
  "name": "JustineDevs",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meta-architect",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "collections": [
5
5
  "sindresorhus/awesome",
6
6
  "dzharii/awesome-typescript",
@@ -105,7 +105,7 @@ When consuming the plugin:
105
105
  The plugin version should track the release scope of the core repo.
106
106
 
107
107
  For this repository:
108
- - plugin scope is aligned to Meta-Architect `v0.1.1`
108
+ - plugin scope is aligned to Meta-Architect `v0.1.2`
109
109
  - any breaking contract change should be versioned intentionally
110
110
 
111
111
  The plugin is one distribution surface of the same product, not a separate product line.
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "MA Architect"
3
- short_description: "Architecture and stack design for MA flows"
2
+ display_name: "$arch"
3
+ short_description: "Architecture-first product and system design"
4
4
  default_prompt: "Use $arch to produce architecture, stack rationale, subsystem boundaries, tradeoffs, and a phased delivery plan."
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "MA Build"
3
- short_description: "Gated build planning and branch/worktree prep"
2
+ display_name: "$build"
3
+ short_description: "Build-readiness decision and next implementation step"
4
4
  default_prompt: "Use $build to decide whether implementation is ready, what remains blocked, and what the next build slice should be."
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "MA Flow"
3
- short_description: "Business logic and state validation for MA"
2
+ display_name: "$flow"
3
+ short_description: "Logic, states, transitions, and blockers"
4
4
  default_prompt: "Use $flow to map business logic, state transitions, invariants, and blockers in the current design."
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "Meta-Architect"
3
- short_description: "Core orchestration and gated build workflows"
2
+ display_name: "$meta-architect"
3
+ short_description: "Full Meta-Architect skill workflow"
4
4
  default_prompt: "Use $meta-architect to run the full Meta-Architect workflow inside Codex, then route through $arch, $sage, $flow, $vet, $vibe, and $build as needed."
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "MA Sage"
3
- short_description: "GitMCP-backed OSS evidence selection"
2
+ display_name: "$sage"
3
+ short_description: "Evidence-backed stack and OSS validation"
4
4
  default_prompt: "Use $sage to validate stack choices with official docs, upstream repos, and approved GitMCP-backed sources."
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "MA Vet"
3
- short_description: "Security, CVE, and risk review for MA"
2
+ display_name: "$vet"
3
+ short_description: "Security and trust-boundary review"
4
4
  default_prompt: "Use $vet to review trust boundaries, security risks, abuse cases, and safer alternatives in the current design."
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "MA Vibe"
3
- short_description: "DX and UX review before Meta-Architect build"
2
+ display_name: "$vibe"
3
+ short_description: "DX and UX review before implementation"
4
4
  default_prompt: "Use $vibe to review developer and user experience risks before the build lane proceeds."
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import process from "node:process";
4
- import { installSkills } from "../src/skill-installer.js";
4
+ import { installSkills, installSupportBundle } from "../src/skill-installer.js";
5
5
 
6
6
  async function main() {
7
7
  if (process.env.MA_SKIP_AUTO_INSTALL === "1") {
@@ -9,8 +9,12 @@ async function main() {
9
9
  return;
10
10
  }
11
11
 
12
- const { targetRoot, installed } = await installSkills();
13
- console.log(`meta-architect: installed ${installed.length} Codex skills into ${targetRoot}`);
12
+ const [
13
+ { targetRoot: skillRoot, installed: skills },
14
+ { targetRoot: bundleRoot, installed: assets },
15
+ ] = await Promise.all([installSkills(), installSupportBundle()]);
16
+ console.log(`meta-architect: installed ${skills.length} Codex skills into ${skillRoot}`);
17
+ console.log(`meta-architect: installed ${assets.length} support assets into ${bundleRoot}`);
14
18
  }
15
19
 
16
20
  main().catch((error) => {
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "MA Architect"
3
- short_description: "Architecture and stack design for MA flows"
2
+ display_name: "$arch"
3
+ short_description: "Architecture-first product and system design"
4
4
  default_prompt: "Use $arch to produce architecture, stack rationale, subsystem boundaries, tradeoffs, and a phased delivery plan."
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "MA Build"
3
- short_description: "Gated build planning and branch/worktree prep"
2
+ display_name: "$build"
3
+ short_description: "Build-readiness decision and next implementation step"
4
4
  default_prompt: "Use $build to decide whether implementation is ready, what remains blocked, and what the next build slice should be."
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "MA Flow"
3
- short_description: "Business logic and state validation for MA"
2
+ display_name: "$flow"
3
+ short_description: "Logic, states, transitions, and blockers"
4
4
  default_prompt: "Use $flow to map business logic, state transitions, invariants, and blockers in the current design."
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "Meta-Architect"
3
- short_description: "Core orchestration and gated build workflows"
2
+ display_name: "$meta-architect"
3
+ short_description: "Full Meta-Architect skill workflow"
4
4
  default_prompt: "Use $meta-architect to run the full Meta-Architect workflow inside Codex, then route through $arch, $sage, $flow, $vet, $vibe, and $build as needed."
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "MA Sage"
3
- short_description: "GitMCP-backed OSS evidence selection"
2
+ display_name: "$sage"
3
+ short_description: "Evidence-backed stack and OSS validation"
4
4
  default_prompt: "Use $sage to validate stack choices with official docs, upstream repos, and approved GitMCP-backed sources."
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "MA Vet"
3
- short_description: "Security, CVE, and risk review for MA"
2
+ display_name: "$vet"
3
+ short_description: "Security and trust-boundary review"
4
4
  default_prompt: "Use $vet to review trust boundaries, security risks, abuse cases, and safer alternatives in the current design."
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "MA Vibe"
3
- short_description: "DX and UX review before Meta-Architect build"
2
+ display_name: "$vibe"
3
+ short_description: "DX and UX review before implementation"
4
4
  default_prompt: "Use $vibe to review developer and user experience risks before the build lane proceeds."
package/src/launcher.js CHANGED
@@ -6,6 +6,7 @@ const nativeCommands = new Set([
6
6
  "init",
7
7
  "idea",
8
8
  "skills",
9
+ "sdk-path",
9
10
  "status",
10
11
  "merge",
11
12
  "release",
@@ -38,7 +38,7 @@ export class McpSseClient {
38
38
  capabilities: {},
39
39
  clientInfo: {
40
40
  name: "meta-architect",
41
- version: "0.1.1",
41
+ version: "0.1.2",
42
42
  },
43
43
  });
44
44
 
@@ -3,9 +3,16 @@ import os from "node:os";
3
3
  import path from "node:path";
4
4
  import { packageRoot } from "./paths.js";
5
5
 
6
+ function resolveCodexHome() {
7
+ return process.env.CODEX_HOME ?? path.join(os.homedir(), ".codex");
8
+ }
9
+
6
10
  function resolveSkillInstallRoot() {
7
- const codexHome = process.env.CODEX_HOME ?? path.join(os.homedir(), ".codex");
8
- return path.join(codexHome, "skills");
11
+ return path.join(resolveCodexHome(), "skills");
12
+ }
13
+
14
+ function resolveSupportBundleRoot() {
15
+ return path.join(resolveCodexHome(), "meta-architect-sdk");
9
16
  }
10
17
 
11
18
  async function copyDir(src, dest) {
@@ -26,6 +33,10 @@ export function getSkillInstallRoot() {
26
33
  return resolveSkillInstallRoot();
27
34
  }
28
35
 
36
+ export function getSupportBundleRoot() {
37
+ return resolveSupportBundleRoot();
38
+ }
39
+
29
40
  export async function loadSkillManifest() {
30
41
  const manifestPath = path.join(packageRoot, "skills", "index.json");
31
42
  const manifest = JSON.parse(await fs.readFile(manifestPath, "utf8"));
@@ -47,3 +58,141 @@ export async function installSkills({ targetRoot = getSkillInstallRoot() } = {})
47
58
 
48
59
  return { targetRoot, installed };
49
60
  }
61
+
62
+ async function copyPath(src, dest) {
63
+ const stat = await fs.stat(src);
64
+ if (stat.isDirectory()) {
65
+ await fs.rm(dest, { recursive: true, force: true });
66
+ await copyDir(src, dest);
67
+ return "directory";
68
+ }
69
+
70
+ await fs.mkdir(path.dirname(dest), { recursive: true });
71
+ await fs.copyFile(src, dest);
72
+ return "file";
73
+ }
74
+
75
+ export async function installSupportBundle({ targetRoot = getSupportBundleRoot() } = {}) {
76
+ const assets = [
77
+ {
78
+ name: "mcp",
79
+ src: path.join(packageRoot, "mcp"),
80
+ dest: path.join(targetRoot, "mcp"),
81
+ },
82
+ {
83
+ name: "sprint",
84
+ src: path.join(packageRoot, "sprint"),
85
+ dest: path.join(targetRoot, "sprint"),
86
+ },
87
+ {
88
+ name: "prompts",
89
+ src: path.join(packageRoot, ".codex", "prompts"),
90
+ dest: path.join(targetRoot, "prompts"),
91
+ },
92
+ {
93
+ name: "scripts",
94
+ src: path.join(packageRoot, "scripts"),
95
+ dest: path.join(targetRoot, "scripts"),
96
+ },
97
+ {
98
+ name: "plugin",
99
+ src: path.join(packageRoot, "plugins", "meta-architect"),
100
+ dest: path.join(targetRoot, "plugins", "meta-architect"),
101
+ },
102
+ {
103
+ name: "templates",
104
+ src: path.join(packageRoot, "templates"),
105
+ dest: path.join(targetRoot, "templates"),
106
+ },
107
+ {
108
+ name: "docs-readme",
109
+ src: path.join(packageRoot, "docs", "README.md"),
110
+ dest: path.join(targetRoot, "docs", "README.md"),
111
+ },
112
+ ];
113
+
114
+ await fs.mkdir(targetRoot, { recursive: true });
115
+ const installed = [];
116
+ for (const asset of assets) {
117
+ await copyPath(asset.src, asset.dest);
118
+ installed.push({ name: asset.name, dest: asset.dest });
119
+ }
120
+
121
+ const pkg = JSON.parse(await fs.readFile(path.join(packageRoot, "package.json"), "utf8"));
122
+ const manifest = {
123
+ packageName: pkg.name,
124
+ packageVersion: pkg.version,
125
+ installedAt: new Date().toISOString(),
126
+ root: targetRoot,
127
+ assets: installed,
128
+ };
129
+ await fs.writeFile(
130
+ path.join(targetRoot, "asset-manifest.json"),
131
+ `${JSON.stringify(manifest, null, 2)}\n`,
132
+ );
133
+
134
+ return { targetRoot, installed };
135
+ }
136
+
137
+ export async function areSkillsInstalled({ targetRoot = getSkillInstallRoot() } = {}) {
138
+ const skills = await loadSkillManifest();
139
+
140
+ for (const skill of skills) {
141
+ const skillDir = path.join(targetRoot, path.basename(skill.path));
142
+ try {
143
+ await fs.access(path.join(skillDir, "SKILL.md"));
144
+ } catch {
145
+ return false;
146
+ }
147
+ }
148
+
149
+ return true;
150
+ }
151
+
152
+ export async function isSupportBundleInstalled({ targetRoot = getSupportBundleRoot() } = {}) {
153
+ const requiredFiles = [
154
+ path.join(targetRoot, "asset-manifest.json"),
155
+ path.join(targetRoot, "mcp", "servers.json"),
156
+ path.join(targetRoot, "sprint", "07-release.md"),
157
+ path.join(targetRoot, "prompts", "onboarding.md"),
158
+ path.join(targetRoot, "scripts", "skills-install.js"),
159
+ path.join(targetRoot, "plugins", "meta-architect", ".codex-plugin", "plugin.json"),
160
+ path.join(targetRoot, "templates", "AGENTS.md"),
161
+ ];
162
+
163
+ for (const file of requiredFiles) {
164
+ try {
165
+ await fs.access(file);
166
+ } catch {
167
+ return false;
168
+ }
169
+ }
170
+
171
+ return true;
172
+ }
173
+
174
+ export async function ensureSkillsInstalled({ targetRoot = getSkillInstallRoot() } = {}) {
175
+ if (process.env.MA_SKIP_AUTO_INSTALL === "1") {
176
+ return { targetRoot, installed: [], skipped: true };
177
+ }
178
+
179
+ if (await areSkillsInstalled({ targetRoot })) {
180
+ return { targetRoot, installed: [], skipped: false };
181
+ }
182
+
183
+ const result = await installSkills({ targetRoot });
184
+ return { ...result, skipped: false };
185
+ }
186
+
187
+ export async function ensureSupportBundleInstalled({ targetRoot = getSupportBundleRoot() } = {}) {
188
+ if (process.env.MA_SKIP_AUTO_INSTALL === "1") {
189
+ return { targetRoot, installed: [], skipped: true };
190
+ }
191
+
192
+ if (await isSupportBundleInstalled({ targetRoot })) {
193
+ return { targetRoot, installed: [], skipped: false };
194
+ }
195
+
196
+ const result = await installSupportBundle({ targetRoot });
197
+ return { ...result, skipped: false };
198
+ }
package/src/skills.js CHANGED
@@ -344,8 +344,8 @@ export async function runInit() {
344
344
  path.join(getRepoRoot(), "docs", "release-spec.md"),
345
345
  ],
346
346
  [
347
- path.join(packageRoot, "docs", "qa", "release-readiness-0.1.1.md"),
348
- path.join(getRepoRoot(), "docs", "qa", "release-readiness-0.1.1.md"),
347
+ path.join(packageRoot, "docs", "qa", "release-readiness-0.1.2.md"),
348
+ path.join(getRepoRoot(), "docs", "qa", "release-readiness-0.1.2.md"),
349
349
  ],
350
350
  ];
351
351
 
@@ -0,0 +1,130 @@
1
+ # Meta-Architect Operating Contract
2
+
3
+ This repository uses Meta-Architect as a structured orchestration layer for programmatic architecture and verified engineering. The purpose of this contract is to make repository behavior explicit, reviewable, and stable enough to be reused across generated or installed surfaces.
4
+
5
+ ## Core triggers
6
+
7
+ The primary trigger surfaces are:
8
+
9
+ - `$arch` — architecture and stack blueprinting
10
+ - `$sage` — evidence-backed OSS discovery through MCP/GitMCP collections
11
+ - `$flow` — business logic and state-transition review
12
+ - `$vet` — security and risk review
13
+ - `$vibe` — DX/UX review
14
+ - `$build` — bounded implementation planning and build execution handoff
15
+
16
+ ## Core rule
17
+
18
+ No implementation should proceed as if it were approved unless the required architecture, evidence, logic, and security gates are satisfied.
19
+
20
+ ## Kernel vs extension model
21
+
22
+ Meta-Architect should be treated as a core system plus extension surfaces:
23
+
24
+ - **Core system**
25
+ - state and decision files
26
+ - gate enforcement
27
+ - MCP endpoint policy
28
+ - CLI orchestration commands
29
+ - **Extension surfaces**
30
+ - publishable skill folders
31
+ - plugin bundle
32
+ - missions and demos
33
+ - prompts and templates
34
+
35
+ The core must stay stable and inspectable. Extensions may vary, but they must not weaken the kernel contract.
36
+
37
+ ## Gate rules
38
+
39
+ The repository recognizes the following status fields:
40
+
41
+ - `idea_status`
42
+ - `architecture_status`
43
+ - `evidence_status`
44
+ - `logic_status`
45
+ - `security_status`
46
+ - `experience_status`
47
+ - `build_status`
48
+ - `merge_status`
49
+ - `release_status`
50
+
51
+ ### Build lock rule
52
+
53
+ `$build` must remain locked unless all of the following are true:
54
+
55
+ - `idea_status = CLEAR`
56
+ - `architecture_status = APPROVED`
57
+ - `evidence_status = VERIFIED`
58
+ - `logic_status = GREEN`
59
+ - `security_status = GREEN`
60
+ - `experience_status = GREEN` or `WAIVED`
61
+
62
+ If any required field is missing, red, or unverified, the workflow should stop and report blockers clearly.
63
+
64
+ ### Merge and release rule
65
+
66
+ - `feature/*` work merges into `development`
67
+ - release promotion is allowed only from `development` or approved `release/*`
68
+ - no direct `feature/* -> prod`
69
+
70
+ ## Evidence rule
71
+
72
+ Major technology recommendations must be supported by evidence from configured MCP/GitMCP sources. Do not invent fake repositories, fake endpoints, or unsupported claims.
73
+
74
+ ### Exact endpoint rule
75
+
76
+ - Prefer repo-specific `https://gitmcp.io/{owner}/{repo}` endpoints
77
+ - Treat `https://gitmcp.io/docs` as fallback policy only, not a normal approved evidence source for build-unlocking decisions
78
+
79
+ ## Logging rule
80
+
81
+ Architecture decisions, evidence, audits, and release-relevant outcomes should be written to repository-visible local files where applicable, especially:
82
+
83
+ - `.ma/decisions.json`
84
+ - `.ma/release.json`
85
+ - `.ma/evidence/sources.json`
86
+ - `.ma/evidence/audits.json`
87
+ - `.ma/evidence/cves.json`
88
+
89
+ ## Skill routing
90
+
91
+ Use the role that best matches the task:
92
+
93
+ - Use `$arch` for system shape, stack options, component boundaries, trade-offs, and blueprinting.
94
+ - Use `$sage` for evidence-backed package, framework, and library selection.
95
+ - Use `$flow` for workflow correctness, state transitions, data flow, and edge-case review.
96
+ - Use `$vet` for security checks, dependency risk review, and release-sensitive blocking findings.
97
+ - Use `$vibe` for developer experience and user experience review.
98
+ - Use `$build` only after required gates are satisfied and only for bounded implementation planning or execution.
99
+
100
+ ## Prompt behavior
101
+
102
+ When working in this repository:
103
+
104
+ - prefer explicit reasoning and explicit file changes
105
+ - do not skip validation steps silently
106
+ - do not weaken hooks or gates for convenience
107
+ - do not commit runtime `.ma` state
108
+ - do not treat release-sensitive changes as trivial edits
109
+
110
+ ## Contributor expectation
111
+
112
+ Changes to skills, prompts, package metadata, workflows, release docs, or plugin surfaces are release-sensitive. These changes should be tested, documented, and described clearly in pull requests.
113
+
114
+ ## Release expectation
115
+
116
+ Production release means:
117
+
118
+ - the core trigger flow works end-to-end
119
+ - release artifacts are validated
120
+ - skills packaging and installation succeed
121
+ - docs reflect actual behavior
122
+ - no hidden runtime residue is shipped as source
123
+
124
+ ## Related surfaces
125
+
126
+ - `CONTRIBUTING.md`
127
+ - `docs/release-spec.md`
128
+ - `templates/catalog-manifest.json`
129
+ - `prompts/`
130
+ - `skills/`
@@ -0,0 +1,22 @@
1
+ {
2
+ "version": 1,
3
+ "skills": [
4
+ "meta-architect",
5
+ "meta-architect-arch",
6
+ "meta-architect-sage",
7
+ "meta-architect-flow",
8
+ "meta-architect-vet",
9
+ "meta-architect-vibe",
10
+ "meta-architect-build"
11
+ ],
12
+ "prompts": [
13
+ "architect",
14
+ "sage",
15
+ "flow",
16
+ "security-reviewer",
17
+ "vibe",
18
+ "builder",
19
+ "release-manager",
20
+ "verifier"
21
+ ]
22
+ }
@@ -0,0 +1,39 @@
1
+ # Core Model Instructions
2
+
3
+ Use these instructions when generating or applying repository content to the Meta-Architect core system.
4
+
5
+ ## Core expectations
6
+
7
+ - Keep Meta-Architect skills, gates, evidence, and release behavior explicit.
8
+ - Prefer inspectable files over hidden side effects.
9
+ - Do not bypass the `.ma` gate model.
10
+ - Treat CLI, skill contracts, plugin surfaces, and docs as one coherent product system.
11
+
12
+ ## Kernel rule
13
+
14
+ The kernel contains the minimum stable logic that makes the system trustworthy:
15
+ - status files
16
+ - decision logging
17
+ - evidence capture
18
+ - build/merge/release policy
19
+ - packaging and validation commands
20
+
21
+ Do not treat those as negotiable convenience features.
22
+
23
+ ## Documentation rule
24
+
25
+ When writing docs:
26
+ - describe what the runtime actually does today
27
+ - distinguish baseline first-pass review from deep autonomous analysis when necessary
28
+ - show exact commands and expected outcomes
29
+ - cross-link related surfaces
30
+
31
+ ## Change rule
32
+
33
+ Any change that weakens:
34
+ - inspectability
35
+ - evidence traceability
36
+ - gate enforcement
37
+ - or packaging determinism
38
+
39
+ should be treated as a regression.
@@ -0,0 +1,41 @@
1
+ # Release Model Instructions
2
+
3
+ These instructions apply when generating or reviewing release-facing artifacts.
4
+
5
+ ## Release posture
6
+
7
+ Fail closed on:
8
+ - missing release artifacts
9
+ - failing checks
10
+ - blocked channels
11
+ - ambiguous publish claims
12
+
13
+ ## Versioning rule
14
+
15
+ Preserve stable public contracts for the active release line unless a major version is intentionally planned.
16
+
17
+ ## Publication rule
18
+
19
+ Never claim a publication channel succeeded without concrete evidence.
20
+
21
+ This includes:
22
+ - git branch push
23
+ - tag push
24
+ - GitHub release creation
25
+ - GitHub asset upload
26
+ - npm publish
27
+ - plugin or marketplace publish
28
+
29
+ ## Release artifact minimum
30
+
31
+ Release-facing changes should stay aligned across:
32
+ - `package.json`
33
+ - `CHANGELOG.md`
34
+ - `RELEASE.md`
35
+ - `docs/qa/`
36
+ - `skills/index.json`
37
+ - tarball outputs
38
+
39
+ ## Hygiene rule
40
+
41
+ Do not ship local runtime state, caches, or accidental build outputs as public source.
@@ -0,0 +1,22 @@
1
+ # Security Model Instructions
2
+
3
+ These instructions apply to any surface that influences security claims, gate behavior, or dependency trust.
4
+
5
+ ## Core security rules
6
+
7
+ - Treat unresolved high-risk findings as release blockers.
8
+ - Never invent evidence or pretend a dependency is verified without a real source.
9
+ - Prefer safer alternatives and explicit blockers over optimistic assumptions.
10
+
11
+ ## Evidence integrity
12
+
13
+ - Exact approved sources are stronger than fallback sources.
14
+ - Fallback policy should not silently unlock builds.
15
+ - Security review output must remain inspectable in committed product artifacts or generated local evidence files.
16
+
17
+ ## Communication rule
18
+
19
+ When documenting security behavior:
20
+ - be explicit about what is baseline review versus deep review
21
+ - avoid “safe by default” claims unless the code and workflow actually enforce them
22
+ - explain blocked paths, not just happy paths