@jstn-sdk/ma 0.1.10 → 0.1.12

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 (133) hide show
  1. package/.agents/plugins/marketplace.json +0 -0
  2. package/README.md +136 -29
  3. package/bin/ma.js +23 -67
  4. package/docs/README.md +4 -1
  5. package/docs/assets/image/Screenshot(1).png +0 -0
  6. package/docs/assets/image/Screenshot(2).png +0 -0
  7. package/docs/assets/image/Screenshot(3).png +0 -0
  8. package/docs/assets/image/Screenshot(4).png +0 -0
  9. package/docs/assets/image/Screenshot(5).png +0 -0
  10. package/docs/assets/image/Screenshot(6).png +0 -0
  11. package/docs/assets/image/Screenshot(7).png +0 -0
  12. package/docs/assets/image/Screenshot(8).png +0 -0
  13. package/docs/assets/image/Screenshot(9).png +0 -0
  14. package/docs/assets/meta-architect-logo.png +0 -0
  15. package/docs/assets/meta-architect-logo.svg +0 -0
  16. package/docs/getting-started.md +74 -19
  17. package/docs/installed-sdk.md +23 -0
  18. package/docs/mcp-setup.md +30 -1
  19. package/docs/qa/{release-readiness-0.1.10.md → release-readiness-0.1.12.md} +29 -8
  20. package/docs/qa/release-readiness-0.1.5.md +0 -0
  21. package/docs/reference/native-engineering-patterns.md +35 -0
  22. package/docs/reference/native-security-playbooks.md +21 -0
  23. package/docs/reference/native-source-selection.md +21 -0
  24. package/docs/reference/native-style-and-deslop.md +20 -0
  25. package/docs/release-spec.md +21 -10
  26. package/docs/skills-publishing.md +25 -1
  27. package/docs/skills.md +24 -12
  28. package/mcp/local/code-intel.js +113 -0
  29. package/mcp/local/memory.js +46 -0
  30. package/mcp/local/playbooks.js +168 -0
  31. package/mcp/local/state.js +71 -0
  32. package/mcp/local/team-run.js +66 -0
  33. package/mcp/local/trace.js +60 -0
  34. package/mcp/local-capabilities.json +56 -0
  35. package/mcp/native-playbooks.json +117 -0
  36. package/mcp/servers.json +10 -0
  37. package/package.json +4 -1
  38. package/plugins/meta-architect/.app.json +1 -1
  39. package/plugins/meta-architect/.codex-plugin/plugin.json +4 -4
  40. package/plugins/meta-architect/.mcp.json +1 -1
  41. package/plugins/meta-architect/README.md +27 -1
  42. package/plugins/meta-architect/skills/align/SKILL.md +24 -0
  43. package/plugins/meta-architect/skills/align/agents/openai.yaml +4 -0
  44. package/plugins/meta-architect/skills/align/references/shared-language.md +24 -0
  45. package/plugins/meta-architect/skills/arch/SKILL.md +0 -0
  46. package/plugins/meta-architect/skills/arch/agents/openai.yaml +0 -0
  47. package/plugins/meta-architect/skills/build/SKILL.md +0 -0
  48. package/plugins/meta-architect/skills/build/agents/openai.yaml +0 -0
  49. package/plugins/meta-architect/skills/cleanup/SKILL.md +23 -0
  50. package/plugins/meta-architect/skills/cleanup/agents/openai.yaml +4 -0
  51. package/plugins/meta-architect/skills/cleanup/references/style-and-deslop.md +18 -0
  52. package/plugins/meta-architect/skills/diagnose/SKILL.md +24 -0
  53. package/plugins/meta-architect/skills/diagnose/agents/openai.yaml +4 -0
  54. package/plugins/meta-architect/skills/flow/SKILL.md +0 -0
  55. package/plugins/meta-architect/skills/flow/agents/openai.yaml +0 -0
  56. package/plugins/meta-architect/skills/maestro/SKILL.md +36 -3
  57. package/plugins/meta-architect/skills/maestro/agents/openai.yaml +2 -2
  58. package/plugins/meta-architect/skills/{meta-architect → maestro}/references/core-release-rules.md +0 -0
  59. package/plugins/meta-architect/skills/maestro/references/native-ingest-map.md +44 -0
  60. package/plugins/meta-architect/skills/sage/SKILL.md +3 -1
  61. package/plugins/meta-architect/skills/sage/agents/openai.yaml +0 -0
  62. package/plugins/meta-architect/skills/sage/references/source-selection.md +28 -0
  63. package/plugins/meta-architect/skills/tdd/SKILL.md +24 -0
  64. package/plugins/meta-architect/skills/tdd/agents/openai.yaml +4 -0
  65. package/plugins/meta-architect/skills/vet/SKILL.md +3 -1
  66. package/plugins/meta-architect/skills/vet/agents/openai.yaml +0 -0
  67. package/plugins/meta-architect/skills/vet/references/security-playbooks.md +23 -0
  68. package/plugins/meta-architect/skills/vibe/SKILL.md +0 -0
  69. package/plugins/meta-architect/skills/vibe/agents/openai.yaml +0 -0
  70. package/scripts/biome-staged.js +0 -0
  71. package/scripts/build-linux-packages.mjs +328 -0
  72. package/scripts/doctor.js +19 -0
  73. package/scripts/linux-package-lib.mjs +40 -0
  74. package/scripts/linux-package-smoke.mjs +103 -0
  75. package/scripts/plugin-sync.js +0 -0
  76. package/scripts/postinstall.js +0 -0
  77. package/scripts/release-metadata.js +0 -0
  78. package/scripts/release-sync.js +13 -6
  79. package/scripts/release-verify.js +0 -0
  80. package/scripts/setup-npmrc.js +0 -0
  81. package/skills/align/SKILL.md +24 -0
  82. package/skills/align/agents/openai.yaml +4 -0
  83. package/skills/align/references/shared-language.md +24 -0
  84. package/skills/arch/SKILL.md +0 -0
  85. package/skills/arch/agents/openai.yaml +0 -0
  86. package/skills/build/SKILL.md +0 -0
  87. package/skills/build/agents/openai.yaml +0 -0
  88. package/skills/cleanup/SKILL.md +23 -0
  89. package/skills/cleanup/agents/openai.yaml +4 -0
  90. package/skills/cleanup/references/style-and-deslop.md +18 -0
  91. package/skills/diagnose/SKILL.md +24 -0
  92. package/skills/diagnose/agents/openai.yaml +4 -0
  93. package/skills/flow/SKILL.md +0 -0
  94. package/skills/flow/agents/openai.yaml +0 -0
  95. package/skills/index.json +21 -6
  96. package/skills/maestro/SKILL.md +36 -3
  97. package/skills/maestro/agents/openai.yaml +2 -2
  98. package/skills/{meta-architect → maestro}/references/core-release-rules.md +0 -0
  99. package/skills/maestro/references/native-ingest-map.md +44 -0
  100. package/skills/sage/SKILL.md +3 -1
  101. package/skills/sage/agents/openai.yaml +0 -0
  102. package/skills/sage/references/source-selection.md +28 -0
  103. package/skills/tdd/SKILL.md +24 -0
  104. package/skills/tdd/agents/openai.yaml +4 -0
  105. package/skills/vet/SKILL.md +3 -1
  106. package/skills/vet/agents/openai.yaml +0 -0
  107. package/skills/vet/references/security-playbooks.md +23 -0
  108. package/skills/vibe/SKILL.md +0 -0
  109. package/skills/vibe/agents/openai.yaml +0 -0
  110. package/src/bootstrap.js +124 -24
  111. package/src/decision-log.js +12 -9
  112. package/src/launcher.js +0 -0
  113. package/src/mcp-config.js +130 -8
  114. package/src/mcp-live-client.js +1 -1
  115. package/src/paths.js +33 -1
  116. package/src/release-state.js +30 -1
  117. package/src/runtime/build-readiness.js +38 -0
  118. package/src/runtime/continuity-notes.js +79 -0
  119. package/src/runtime/guidance-stack.js +42 -0
  120. package/src/runtime/maestro-manager.js +586 -0
  121. package/src/runtime/orchestrator.js +158 -0
  122. package/src/runtime/runtime-state.js +382 -0
  123. package/src/runtime/signal-hooks.js +52 -0
  124. package/src/runtime/startup-path.js +14 -0
  125. package/src/runtime/workspaces.js +25 -0
  126. package/src/runtime-artifacts.js +190 -30
  127. package/src/skill-installer.js +53 -5
  128. package/src/skills.js +633 -49
  129. package/src/state-sync.js +51 -8
  130. package/plugins/meta-architect/skills/meta-architect/SKILL.md +0 -32
  131. package/plugins/meta-architect/skills/meta-architect/agents/openai.yaml +0 -4
  132. package/skills/meta-architect/SKILL.md +0 -32
  133. package/skills/meta-architect/agents/openai.yaml +0 -4
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: cleanup
3
+ description: "Use when the user wants contract-preserving simplification, anti-slop cleanup, or a final-pass polish after the main decision is made."
4
+ ---
5
+
6
+ # Cleanup
7
+
8
+ Use this skill inside Codex when the core behavior is understood but the artifact still needs simplification, deslop work, or clearer prose. `cleanup` is a non-gating helper skill.
9
+
10
+ ## Output
11
+
12
+ Produce:
13
+ - removable complexity or noisy wording
14
+ - behavior-preserving simplifications
15
+ - residual risks after cleanup
16
+ - exact next trigger, usually the owning lane or release verification
17
+
18
+ ## Rules
19
+
20
+ - Prefer deletion over addition.
21
+ - Preserve behavior and decision ownership while cleaning up.
22
+ - Keep user-facing wording concise and product-native.
23
+ - Use `references/style-and-deslop.md` for simplification and prose cleanup patterns.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "$cleanup"
3
+ short_description: "Anti-slop cleanup and final-pass polish"
4
+ default_prompt: "Use $cleanup to simplify noisy code or docs, remove avoidable slop, and polish wording without changing the owning lane."
@@ -0,0 +1,18 @@
1
+ # Style And Deslop
2
+
3
+ Use this reference pack with `cleanup` when an artifact works but still feels bloated, generic, or hard to trust.
4
+
5
+ ## Cleanup priorities
6
+
7
+ - remove repeated framing
8
+ - cut placeholder language and empty intensifiers
9
+ - collapse duplicate concepts into one stable term
10
+ - prefer shorter, sharper instructions when they preserve meaning
11
+ - delete unused or non-essential surface area before adding more structure
12
+
13
+ ## Safe cleanup checks
14
+
15
+ - behavior or contract is unchanged
16
+ - the next trigger is still explicit
17
+ - helper-vs-gated distinctions remain intact
18
+ - no upstream brand names are introduced as product surfaces
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: diagnose
3
+ description: "Use when the user needs failure triage, blocked-lane diagnosis, or root-cause decomposition before the next gate can move."
4
+ ---
5
+
6
+ # Diagnose
7
+
8
+ Use this skill inside Codex when a lane is blocked, a symptom is vague, or the next useful move is to decompose the failure before editing code. `diagnose` is a non-gating helper skill.
9
+
10
+ ## Output
11
+
12
+ Produce:
13
+ - observed symptom
14
+ - likely failure slices
15
+ - missing evidence or missing reproduction steps
16
+ - smallest next probe
17
+ - exact next trigger, usually the owning lane or `$maestro`
18
+
19
+ ## Rules
20
+
21
+ - Decompose the problem before proposing broad fixes.
22
+ - Prefer the smallest reproducible boundary that can confirm or kill a hypothesis.
23
+ - Keep release-state ownership with the gated lane that is blocked.
24
+ - Escalate assumptions clearly when evidence is still incomplete.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "$diagnose"
3
+ short_description: "Blocked-lane diagnosis and failure triage"
4
+ default_prompt: "Use $diagnose to break a vague failure into concrete hypotheses, probes, and the smallest next debugging step without changing gate ownership."
File without changes
File without changes
package/skills/index.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "schemaVersion": "0.1.0",
3
3
  "skills": [
4
+ {
5
+ "name": "align",
6
+ "path": "skills/align",
7
+ "description": "Use when the user needs scope alignment, shared language, or docs clarity before or between gated lanes."
8
+ },
4
9
  {
5
10
  "name": "arch",
6
11
  "path": "skills/arch",
@@ -11,6 +16,16 @@
11
16
  "path": "skills/build",
12
17
  "description": "Use when the user wants to decide whether implementation is ready, what remains blocked, and what the exact next build step should be."
13
18
  },
19
+ {
20
+ "name": "cleanup",
21
+ "path": "skills/cleanup",
22
+ "description": "Use when the user wants contract-preserving simplification, anti-slop cleanup, or a final-pass polish after the main decision is made."
23
+ },
24
+ {
25
+ "name": "diagnose",
26
+ "path": "skills/diagnose",
27
+ "description": "Use when the user needs failure triage, blocked-lane diagnosis, or root-cause decomposition before the next gate can move."
28
+ },
14
29
  {
15
30
  "name": "flow",
16
31
  "path": "skills/flow",
@@ -19,18 +34,18 @@
19
34
  {
20
35
  "name": "maestro",
21
36
  "path": "skills/maestro",
22
- "description": "Use when the user wants Meta-Architect to choose the best next workflow step, explain why, and recommend the right lane or assignment."
23
- },
24
- {
25
- "name": "meta-architect",
26
- "path": "skills/meta-architect",
27
- "description": "Use when the user wants the full Meta-Architect workflow inside Codex: architecture-first planning, evidence-backed OSS selection, logic review, security review, DX/UX review, and build readiness without leaving the Codex session."
37
+ "description": "Use when the user wants the singular Meta-Architect in-session autonomous manager: choose the best next workflow step, manage the fixed gated workflow, and route bounded helper handoffs inside Codex."
28
38
  },
29
39
  {
30
40
  "name": "sage",
31
41
  "path": "skills/sage",
32
42
  "description": "Use when the user wants evidence-backed technology choices, OSS evaluation, and source-grounded validation of the stack proposed in `$arch`."
33
43
  },
44
+ {
45
+ "name": "tdd",
46
+ "path": "skills/tdd",
47
+ "description": "Use when the user wants regression-first or test-first scaffolding before implementation work expands."
48
+ },
34
49
  {
35
50
  "name": "vet",
36
51
  "path": "skills/vet",
@@ -1,11 +1,34 @@
1
1
  ---
2
2
  name: maestro
3
- description: "Use when the user wants Meta-Architect to choose the best next workflow step, explain why, and recommend the right lane or assignment."
3
+ description: "Use when the user wants the singular Meta-Architect in-session autonomous manager: choose the best next workflow step, manage the fixed gated workflow, and route bounded helper handoffs inside Codex."
4
4
  ---
5
5
 
6
6
  # Maestro
7
7
 
8
- Use this skill inside Codex when you want Meta-Architect to act like a workflow manager.
8
+ ## Overview
9
+
10
+ Use this skill inside Codex as the singular Meta-Architect umbrella surface and bounded autonomous manager. It inspects workflow state, chooses the smallest safe next step, manages the fixed gated design-and-review sequence one lane at a time, and routes helper handoffs when they are enough. There is no separate shipped `$meta-architect` skill.
11
+
12
+ ## Workflow
13
+
14
+ 1. Inspect the current gate state, active evidence, and current blockers.
15
+ 2. Choose the smallest safe next step and decide whether the next move is:
16
+ - a direct advisory result
17
+ - a helper-skill handoff
18
+ - a gated-lane handoff
19
+ 3. When the issue is alignment, diagnosis, regression-first execution, or final-pass cleanup, hand work to the publishable but non-gating helper skills:
20
+ - `$align`
21
+ - `$diagnose`
22
+ - `$tdd`
23
+ - `$cleanup`
24
+ 4. When the user wants the full Meta-Architect workflow, manage the fixed gated sequence without inventing new gates or skipping lane ownership:
25
+ - `$arch`
26
+ - `$sage`
27
+ - `$flow`
28
+ - `$vet`
29
+ - `$vibe`
30
+ - `$build`
31
+ 5. End with a clear result shape: decision, evidence, blockers, the lane assignment if any, and the exact next trigger.
9
32
 
10
33
  ## Output
11
34
 
@@ -22,4 +45,14 @@ Produce:
22
45
  - Prefer the smallest next step that moves the workflow forward safely.
23
46
  - Respect current gate state before recommending implementation or release work.
24
47
  - Be explicit when more evidence, planning, or validation is still needed.
25
- - Route to the in-session skill flow first; use helper commands only when they are the clearest support path.
48
+ - Treat the in-session skill flow as primary. Use `ma ...` terminal helpers only when repo-local setup, inspection, or scripted state automation is explicitly the better support path.
49
+ - Keep `$maestro` as the only umbrella surface. It owns next-step management and bounded handoff decisions, but it does not replace the outputs owned by the gated lanes.
50
+ - Helper skills are publishable mirrors, but they are non-gating. They support a lane and then hand control back to `$maestro` or the fixed gated sequence.
51
+ - Do not expand the release-gated sequence for this release. Gate ownership stays with `$arch -> $sage -> $flow -> $vet -> $vibe -> $build`.
52
+ - Stay inside Codex unless the user explicitly asks for repo-local helper commands.
53
+ - Keep the workflow architecture-first. Do not jump into code before the architecture and review lanes are grounded.
54
+ - Use approved discovery accelerators such as Ossium, Trendshift, Dev Hunt, Libraries.io, Open Hub, and Open-source Projects when you need faster OSS candidate discovery, then validate any promising project through upstream repos and official docs.
55
+ - Keep the `$sage` order explicit: known upstream sources first, discovery accelerators second, exact repo mapping third, approval only after upstream verification.
56
+ - Prefer official docs, upstream repos, and repo-configured GitMCP sources when validating tooling choices.
57
+ - For release gates and branch policy, read `references/core-release-rules.md`.
58
+ - For the native helper-family contract and pattern classification, read `references/native-ingest-map.md`.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "$maestro"
3
- short_description: "Best next step and lane orchestration"
4
- default_prompt: "Use $maestro to inspect the current Meta-Architect workflow state, choose the best next step, explain why it is next, and recommend the right lane or assignment."
3
+ short_description: "Bounded autonomous manager for the gated workflow and helper handoffs"
4
+ default_prompt: "Use $maestro as the singular Meta-Architect in-session autonomous manager: inspect workflow state, choose the smallest safe next step, hand work to $align, $diagnose, $tdd, or $cleanup when a publishable non-gating helper is enough, and manage the fixed gated sequence at $arch, $sage, $flow, $vet, $vibe, and $build without inventing new gates."
@@ -0,0 +1,44 @@
1
+ # Native Ingest Map
2
+
3
+ Meta-Architect absorbs new pattern families as native product guidance without turning them into new umbrella brands or new release gates.
4
+
5
+ ## Publishable helper skills
6
+
7
+ - `align`
8
+ - purpose: scope alignment, shared language, and docs clarity
9
+ - gate effect: none
10
+ - `diagnose`
11
+ - purpose: failure decomposition, blocked-lane triage, and root-cause framing
12
+ - gate effect: none
13
+ - `tdd`
14
+ - purpose: regression-first and test-first execution scaffolds
15
+ - gate effect: none
16
+ - `cleanup`
17
+ - purpose: anti-slop cleanup, prose humanization, and final-pass polish
18
+ - gate effect: none
19
+
20
+ ## Existing-lane absorption
21
+
22
+ - `$sage`
23
+ - owns source selection, upstream validation order, and evidence quality
24
+ - uses curated native reference packs instead of raw catalog browsing as the product surface
25
+ - `$vet`
26
+ - owns security/trust-boundary review and security playbook application
27
+ - absorbs security playbook patterns without creating a second security umbrella
28
+ - `$maestro`
29
+ - remains the only umbrella surface and bounded autonomous manager
30
+ - owns next-step recommendation, helper handoff decisions, and fixed-sequence management
31
+ - does not create new gate states and does not replace the outputs owned by gated lanes
32
+
33
+ ## Fixed gated sequence
34
+
35
+ The release-owned sequence does not change in this ingest:
36
+
37
+ 1. `$arch`
38
+ 2. `$sage`
39
+ 3. `$flow`
40
+ 4. `$vet`
41
+ 5. `$vibe`
42
+ 6. `$build`
43
+
44
+ Helper skills remain publishable but non-gating. They can prepare, unblock, or clean up work around those lanes, but they do not create new gate states and they do not own release-state transitions.
@@ -5,7 +5,7 @@ description: "Use when the user wants evidence-backed technology choices, OSS ev
5
5
 
6
6
  # Sage
7
7
 
8
- Use this skill inside Codex to verify or challenge stack choices with real sources.
8
+ Use this skill inside Codex to verify or challenge stack choices with real sources. `$sage` remains the evidence gate even as Meta-Architect absorbs more native curation and reference packs.
9
9
 
10
10
  ## Output
11
11
 
@@ -24,6 +24,7 @@ Produce:
24
24
  - use discovery accelerators to find or narrow candidates
25
25
  - map the selected candidate back to an exact upstream repo
26
26
  - verify against upstream repos and official docs before approving it
27
+ - Use `references/source-selection.md` when you need the native source-selection contract, evidence ladder, or packaged discovery rules.
27
28
  - Use approved discovery accelerators when you need faster OSS candidate discovery:
28
29
  - Ossium (`https://ossium.live/home`) for trending, curated, YC-backed, and GSoC-linked OSS discovery
29
30
  - Trendshift (`https://trendshift.io/`) for rising GitHub engagement and topic momentum
@@ -31,6 +32,7 @@ Produce:
31
32
  - Libraries.io (`https://libraries.io/`) for package/dependency metadata, with caution because its public data is scraped and not validated/curated for accuracy
32
33
  - Open Hub (`https://openhub.net/`) for project activity, contributor, and comparison signals
33
34
  - Open-source Projects (`https://www.opensourceprojects.dev/`) for curated OSS discovery and detailed project writeups
35
+ - Discovery accelerators are candidate-finding tools, not approval surfaces. The user-facing Meta-Architect product stays native even when evidence sources are external.
34
36
  - Do not invent package capabilities or maturity claims.
35
37
  - Prefer primary sources over summaries when validating technical details.
36
38
  - Do not treat discovery listings alone as VERIFIED evidence; promote candidates to upstream repos and official docs before approving them.
File without changes
@@ -0,0 +1,28 @@
1
+ # Source Selection
2
+
3
+ Use this reference pack inside `$sage` when the repo needs evidence-backed selection without turning raw catalogs into the product surface.
4
+
5
+ ## Evidence order
6
+
7
+ 1. Known upstream repo and official docs
8
+ 2. Discovery accelerator to find or narrow candidates
9
+ 3. Exact upstream repo mapping for the shortlisted candidate
10
+ 4. Upstream repo plus official-doc verification before approval
11
+
12
+ ## Discovery accelerator rules
13
+
14
+ - Use accelerators to reduce search time, not to replace validation.
15
+ - Treat listings, rankings, and trend signals as hints.
16
+ - Promote any serious candidate to an exact upstream repo before calling it VERIFIED.
17
+ - Keep user-facing guidance in Meta-Architect language rather than echoing catalog branding as if it were a first-class product surface.
18
+
19
+ ## Minimum approval bar
20
+
21
+ - Exact upstream repo identified
22
+ - Official docs available when relevant
23
+ - Claimed capability verified from a primary source
24
+ - Maturity caveats called out when evidence is weak
25
+
26
+ ## Native posture
27
+
28
+ 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.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: tdd
3
+ description: "Use when the user wants regression-first or test-first scaffolding before implementation work expands."
4
+ ---
5
+
6
+ # TDD
7
+
8
+ Use this skill inside Codex when implementation should start by locking behavior with tests. `tdd` is a non-gating helper skill that supports execution once the relevant lane is ready.
9
+
10
+ ## Output
11
+
12
+ Produce:
13
+ - behavior to lock
14
+ - minimal regression or failing test shape
15
+ - implementation boundary
16
+ - proof that the test belongs to the requested change
17
+ - exact next trigger, usually the implementation lane or `$cleanup`
18
+
19
+ ## Rules
20
+
21
+ - Prefer the smallest failing test that proves the requested behavior.
22
+ - Lock current behavior before cleanup or refactor work when behavior is not already protected.
23
+ - Do not treat `tdd` as a replacement for the build gate.
24
+ - Keep test intent explicit so the next implementation step stays narrow.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "$tdd"
3
+ short_description: "Regression-first and test-first helper"
4
+ default_prompt: "Use $tdd to define the smallest test that locks the requested behavior before implementation expands."
@@ -5,7 +5,7 @@ description: "Use when the user wants a security and trust-boundary review of th
5
5
 
6
6
  # Vet
7
7
 
8
- Use this skill inside Codex to review security posture before the build lane.
8
+ Use this skill inside Codex to review security posture before the build lane. `$vet` remains the sole security gate even as Meta-Architect ships deeper native security playbooks.
9
9
 
10
10
  ## Output
11
11
 
@@ -21,5 +21,7 @@ Produce:
21
21
  ## Rules
22
22
 
23
23
  - Prioritize material risks over exhaustive but low-value checklists.
24
+ - Use `references/security-playbooks.md` when you need the native security playbook set for common trust-boundary reviews.
25
+ - Keep security guidance product-owned and lane-aware. Do not introduce a second umbrella or a separate security release gate.
24
26
  - Call out missing assumptions that affect security posture.
25
27
  - Distinguish between must-fix blockers and documented accepted risk.
File without changes
@@ -0,0 +1,23 @@
1
+ # Security Playbooks
2
+
3
+ Use this reference pack inside `$vet` for repeatable trust-boundary reviews that stay native to Meta-Architect.
4
+
5
+ ## Core review slices
6
+
7
+ - identity and session boundaries
8
+ - authorization and tenancy boundaries
9
+ - secret handling and key rotation assumptions
10
+ - dependency and supply-chain trust
11
+ - inbound data validation and outbound data exposure
12
+ - operational abuse cases and failure modes
13
+
14
+ ## How to use the playbooks
15
+
16
+ - Start with the architecture and evidence already approved by `$arch` and `$sage`.
17
+ - Focus on the highest-risk boundary first.
18
+ - Distinguish blockers from accepted risk.
19
+ - Route remediation back to the owning lane rather than creating a parallel security workflow.
20
+
21
+ ## Product boundary
22
+
23
+ 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.
File without changes
File without changes
package/src/bootstrap.js CHANGED
@@ -2,8 +2,15 @@ import { spawnSync } from "node:child_process";
2
2
  import fs from "node:fs/promises";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
5
- import { loadMcpServers } from "./mcp-config.js";
6
- import { getRepoRoot, getRuntimeWritePath, packageRoot } from "./paths.js";
5
+ import { loadDecisionLog } from "./decision-log.js";
6
+ import {
7
+ runLocalCapabilityReadinessChecks,
8
+ validateLocalCapabilities,
9
+ validateMcpServers,
10
+ } from "./mcp-config.js";
11
+ import { getMcpRootPath, getRepoRoot, getRuntimeWritePath, packageRoot } from "./paths.js";
12
+ import { loadReleaseState } from "./release-state.js";
13
+ import { loadLeaderAuthority, loadRuntimeSnapshot } from "./runtime/runtime-state.js";
7
14
  import {
8
15
  areSkillsInstalled,
9
16
  ensureSkillsInstalled,
@@ -32,21 +39,23 @@ function runCommand(command, args) {
32
39
  function inspectCodex() {
33
40
  const command = resolveCodexCommand();
34
41
  const result = runCommand(command, ["--version"]);
35
- if (result.error || result.status !== 0) {
36
- const detail = result.error?.message ?? result.stderr.trim() ?? result.stdout.trim();
42
+ const version = result.stdout.trim();
43
+ if (result.status === 0) {
37
44
  return {
38
- ok: false,
45
+ ok: true,
39
46
  command,
40
- detail: detail || "Codex command failed",
41
- version: "",
47
+ detail: result.error?.message ?? "",
48
+ version,
42
49
  };
43
50
  }
44
51
 
45
52
  return {
46
- ok: true,
53
+ ok: false,
47
54
  command,
48
- detail: "",
49
- version: result.stdout.trim(),
55
+ detail:
56
+ (result.error?.message ?? result.stderr.trim() ?? result.stdout.trim()) ||
57
+ "Codex command failed",
58
+ version: "",
50
59
  };
51
60
  }
52
61
 
@@ -141,7 +150,19 @@ async function inspectLocalScaffold() {
141
150
  const requiredFiles = [
142
151
  getRuntimeWritePath("decisions.json"),
143
152
  getRuntimeWritePath("release.json"),
144
- path.join(getRepoRoot(), "mcp", "servers.json"),
153
+ getRuntimeWritePath("guidance", "merged.json"),
154
+ getRuntimeWritePath("guidance", "include-graph.json"),
155
+ getRuntimeWritePath("memory", "notes.md"),
156
+ getRuntimeWritePath("memory", "index.json"),
157
+ getRuntimeWritePath("hooks", "config.json"),
158
+ getRuntimeWritePath("hooks", "audit.log"),
159
+ getRuntimeWritePath("tasks", "registry.json"),
160
+ getRuntimeWritePath("tasks", "mailbox"),
161
+ getRuntimeWritePath("tasks", "locks"),
162
+ getRuntimeWritePath("workspaces", "index.json"),
163
+ getRuntimeWritePath("state", "manager-runs.json"),
164
+ path.join(getMcpRootPath(), "servers.json"),
165
+ path.join(getMcpRootPath(), "local-capabilities.json"),
145
166
  ];
146
167
 
147
168
  for (const file of requiredFiles) {
@@ -152,33 +173,55 @@ async function inspectLocalScaffold() {
152
173
  }
153
174
  }
154
175
 
176
+ try {
177
+ await loadReleaseState();
178
+ await loadDecisionLog();
179
+ const authority = await loadLeaderAuthority();
180
+ if (authority.state === "invalid") {
181
+ return false;
182
+ }
183
+ const snapshot = await loadRuntimeSnapshot();
184
+ if (snapshot.missingArtifacts.length > 0 || snapshot.invalidArtifacts.length > 0) {
185
+ return false;
186
+ }
187
+ } catch {
188
+ return false;
189
+ }
190
+
155
191
  return true;
156
192
  }
157
193
 
158
194
  async function seedStarterMcpConfig() {
159
195
  const files = ["servers.json", "collections.json", "fallback.json"];
160
196
  for (const file of files) {
161
- await fs.copyFile(path.join(packageRoot, "mcp", file), path.join(getRepoRoot(), "mcp", file));
197
+ await fs.copyFile(path.join(packageRoot, "mcp", file), path.join(getMcpRootPath(), file));
162
198
  }
163
199
  }
164
200
 
165
- async function inspectMcpState({ fix, initMcp }) {
201
+ async function seedLocalCapabilityManifest() {
202
+ await fs.copyFile(
203
+ path.join(packageRoot, "mcp", "local-capabilities.json"),
204
+ path.join(getMcpRootPath(), "local-capabilities.json"),
205
+ );
206
+ }
207
+
208
+ async function inspectGitMcpState({ fix, initMcp }) {
166
209
  try {
167
- const servers = await loadMcpServers();
210
+ const servers = await validateMcpServers();
168
211
  if (servers.servers.length === 0) {
169
212
  if (fix && initMcp) {
170
213
  await seedStarterMcpConfig();
171
- const seededServers = await loadMcpServers();
214
+ const seededServers = await validateMcpServers();
172
215
  return makeStatus(
173
216
  "FIXED",
174
- "starter MCP sources were seeded into mcp/servers.json",
217
+ "repo-owned GitMCP evidence sources were seeded into mcp/servers.json",
175
218
  `${seededServers.servers.length} configured source(s)`,
176
219
  );
177
220
  }
178
221
 
179
222
  return makeStatus(
180
223
  "WARN",
181
- "mcp/servers.json exists but contains no approved repo-backed sources",
224
+ "repo-owned mcp/servers.json contains no approved GitMCP evidence sources",
182
225
  initMcp
183
226
  ? "Run `ma bootstrap --init-mcp` to seed starter sources, or add exact upstream GitMCP repo endpoints manually."
184
227
  : "Add exact upstream GitMCP repo endpoints before claiming VERIFIED evidence.",
@@ -187,21 +230,74 @@ async function inspectMcpState({ fix, initMcp }) {
187
230
 
188
231
  return makeStatus(
189
232
  "OK",
190
- "mcp/servers.json has approved starter sources",
233
+ "repo-owned mcp/servers.json is ready for GitMCP evidence binding",
191
234
  `${servers.servers.length} configured source(s)`,
192
235
  );
193
236
  } catch (error) {
194
237
  if (fix && initMcp) {
195
238
  await seedStarterMcpConfig();
196
- const seededServers = await loadMcpServers();
239
+ const seededServers = await validateMcpServers();
197
240
  return makeStatus(
198
241
  "FIXED",
199
- "starter MCP sources replaced an invalid MCP configuration",
242
+ "repo-owned mcp/servers.json was reseeded with starter GitMCP evidence sources",
200
243
  `${seededServers.servers.length} configured source(s)`,
201
244
  );
202
245
  }
203
246
 
204
- return makeStatus("WARN", "mcp/servers.json is not ready for evidence binding", error.message);
247
+ return makeStatus(
248
+ "WARN",
249
+ "repo-owned mcp/servers.json is not ready for GitMCP evidence binding",
250
+ error.message,
251
+ );
252
+ }
253
+ }
254
+
255
+ async function inspectLocalCapabilityState({ fix }) {
256
+ function summarizeReadiness(readiness) {
257
+ const notReady = readiness.filter((item) => !item.ready);
258
+ const allReady = notReady.length === 0;
259
+ return {
260
+ allReady,
261
+ detail: allReady
262
+ ? readiness.map((item) => item.capability).join(", ")
263
+ : notReady.map((item) => `${item.capability}: ${item.detail}`).join("; "),
264
+ };
265
+ }
266
+
267
+ try {
268
+ await validateLocalCapabilities();
269
+ const summary = summarizeReadiness(await runLocalCapabilityReadinessChecks());
270
+ if (!summary.allReady) {
271
+ return makeStatus(
272
+ "WARN",
273
+ "package-owned mcp/local-capabilities.json is valid but some local capabilities are not ready",
274
+ summary.detail,
275
+ );
276
+ }
277
+
278
+ return makeStatus(
279
+ "OK",
280
+ "package-owned mcp/local-capabilities.json is ready for first-party capabilities",
281
+ summary.detail,
282
+ );
283
+ } catch (error) {
284
+ if (fix) {
285
+ await seedLocalCapabilityManifest();
286
+ const summary = summarizeReadiness(await runLocalCapabilityReadinessChecks());
287
+ return makeStatus(
288
+ summary.allReady ? "FIXED" : "WARN",
289
+ summary.allReady
290
+ ? "package-owned mcp/local-capabilities.json was reseeded from the bundled SDK"
291
+ : "package-owned mcp/local-capabilities.json was reseeded but some local capabilities are not ready",
292
+ summary.detail,
293
+ );
294
+ }
295
+
296
+ return makeStatus(
297
+ "WARN",
298
+ "package-owned mcp/local-capabilities.json is not ready for first-party capabilities",
299
+ error.message,
300
+ );
205
301
  }
206
302
  }
207
303
 
@@ -268,10 +364,13 @@ async function runEnvironmentFlow({ fix, initMcp }) {
268
364
 
269
365
  if (fix) {
270
366
  await runInit();
367
+ const scaffoldReady = await inspectLocalScaffold();
271
368
  statuses.push(
272
369
  makeStatus(
273
- "FIXED",
274
- "local Meta-Architect scaffold is ready",
370
+ scaffoldReady ? "FIXED" : "WARN",
371
+ scaffoldReady
372
+ ? "local Meta-Architect scaffold is ready"
373
+ : "local Meta-Architect scaffold still has invalid runtime artifacts",
275
374
  path.join(getRepoRoot(), ".ma"),
276
375
  ),
277
376
  );
@@ -285,7 +384,8 @@ async function runEnvironmentFlow({ fix, initMcp }) {
285
384
  );
286
385
  }
287
386
 
288
- statuses.push(await inspectMcpState({ fix, initMcp }));
387
+ statuses.push(await inspectGitMcpState({ fix, initMcp }));
388
+ statuses.push(await inspectLocalCapabilityState({ fix }));
289
389
  return statuses;
290
390
  }
291
391
 
@@ -1,5 +1,6 @@
1
1
  import { readJson, writeJson } from "./fs-utils.js";
2
2
  import { getRuntimeReadPath, getRuntimeWritePath } from "./paths.js";
3
+ import { guardLeaderMutation } from "./runtime/runtime-state.js";
3
4
 
4
5
  function validateDecisionShape(entry) {
5
6
  const required = ["decision", "status", "evidence", "blockers", "next_allowed_triggers"];
@@ -20,7 +21,16 @@ export async function loadDecisionLog() {
20
21
  return parsed;
21
22
  }
22
23
 
23
- export async function appendDecision(entry) {
24
+ export async function appendDecision(entry, options = {}) {
25
+ const guard = await guardLeaderMutation({
26
+ actor: options.actor,
27
+ kind: "decision-append",
28
+ payload: entry,
29
+ });
30
+ if (!guard.allowed) {
31
+ return { proposed: true, proposalPath: guard.proposalPath };
32
+ }
33
+
24
34
  validateDecisionShape(entry);
25
35
  const log = await loadDecisionLog();
26
36
  log.decisions.push({
@@ -29,12 +39,5 @@ export async function appendDecision(entry) {
29
39
  });
30
40
 
31
41
  await writeJson(getRuntimeWritePath("decisions.json"), log);
32
- }
33
-
34
- export async function updateDecisionStatuses(statusUpdates) {
35
- const log = await loadDecisionLog();
36
- for (const [field, value] of Object.entries(statusUpdates)) {
37
- log[field] = value;
38
- }
39
- await writeJson(getRuntimeWritePath("decisions.json"), log);
42
+ return { proposed: false, proposalPath: null };
40
43
  }