@jstn-sdk/ma 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/.codex/agents/Architect.toml +0 -2
  2. package/.codex/agents/Auditor.toml +0 -2
  3. package/.codex/agents/Builder.toml +0 -2
  4. package/.codex/agents/Flow.toml +0 -2
  5. package/.codex/agents/Sage.toml +0 -2
  6. package/.codex/agents/Vibe.toml +0 -2
  7. package/.codex/hooks.json +14 -13
  8. package/.codex/prompts/enforcement.md +4 -0
  9. package/.codex/prompts/skill-contract.md +4 -0
  10. package/COVERAGE.md +211 -0
  11. package/DEMO.md +265 -0
  12. package/README.md +287 -37
  13. package/bin/ma.js +232 -71
  14. package/data/clone-data.ledger.json +41 -0
  15. package/data/clone-data.proof.json +50 -0
  16. package/data/clone-data.rvf +37 -0
  17. package/docs/README.md +7 -1
  18. package/docs/getting-started.md +108 -37
  19. package/docs/installed-sdk.md +23 -0
  20. package/docs/mcp-setup.md +65 -1
  21. package/docs/onboarding.md +18 -2
  22. package/docs/prompt-guidance-contract.md +17 -0
  23. package/docs/prompt-guidance-fragments/active-autonomy-core.md +7 -0
  24. package/docs/qa/release-issue-gates-0.1.13.json +644 -0
  25. package/docs/qa/release-readiness-0.1.13.md +116 -0
  26. package/docs/qa/release-readiness-0.1.5.md +1 -1
  27. package/docs/reference/native-engineering-patterns.md +35 -0
  28. package/docs/reference/native-security-playbooks.md +27 -0
  29. package/docs/reference/native-source-selection.md +27 -0
  30. package/docs/reference/native-style-and-deslop.md +20 -0
  31. package/docs/release-spec.md +37 -10
  32. package/docs/skills-publishing.md +25 -1
  33. package/docs/skills.md +37 -12
  34. package/index.js +222 -2
  35. package/mcp/collections.json +23 -6
  36. package/mcp/local/code-intel.js +113 -0
  37. package/mcp/local/memory.js +46 -0
  38. package/mcp/local/playbooks.js +168 -0
  39. package/mcp/local/state.js +71 -0
  40. package/mcp/local/team-run.js +113 -0
  41. package/mcp/local/trace.js +60 -0
  42. package/mcp/local-capabilities.json +56 -0
  43. package/mcp/native-playbooks.json +117 -0
  44. package/mcp/servers.json +34 -0
  45. package/package.json +8 -2
  46. package/plugins/meta-architect/.app.json +1 -1
  47. package/plugins/meta-architect/.codex-plugin/plugin.json +4 -4
  48. package/plugins/meta-architect/.mcp.json +1 -1
  49. package/plugins/meta-architect/README.md +34 -1
  50. package/plugins/meta-architect/obsidian/main.js +401 -0
  51. package/plugins/meta-architect/obsidian/manifest.json +9 -0
  52. package/plugins/meta-architect/obsidian/styles.css +7 -0
  53. package/plugins/meta-architect/skills/align/SKILL.md +24 -0
  54. package/plugins/meta-architect/skills/align/agents/openai.yaml +4 -0
  55. package/plugins/meta-architect/skills/align/references/shared-language.md +24 -0
  56. package/plugins/meta-architect/skills/arch/SKILL.md +2 -0
  57. package/plugins/meta-architect/skills/build/SKILL.md +3 -0
  58. package/plugins/meta-architect/skills/cleanup/SKILL.md +23 -0
  59. package/plugins/meta-architect/skills/cleanup/agents/openai.yaml +4 -0
  60. package/plugins/meta-architect/skills/cleanup/references/style-and-deslop.md +18 -0
  61. package/plugins/meta-architect/skills/diagnose/SKILL.md +24 -0
  62. package/plugins/meta-architect/skills/diagnose/agents/openai.yaml +4 -0
  63. package/plugins/meta-architect/skills/flow/SKILL.md +2 -0
  64. package/plugins/meta-architect/skills/maestro/SKILL.md +36 -3
  65. package/plugins/meta-architect/skills/maestro/agents/openai.yaml +2 -2
  66. package/plugins/meta-architect/skills/maestro/references/native-ingest-map.md +44 -0
  67. package/plugins/meta-architect/skills/sage/SKILL.md +5 -1
  68. package/plugins/meta-architect/skills/sage/references/source-selection.md +36 -0
  69. package/plugins/meta-architect/skills/tdd/SKILL.md +24 -0
  70. package/plugins/meta-architect/skills/tdd/agents/openai.yaml +4 -0
  71. package/plugins/meta-architect/skills/vet/SKILL.md +5 -1
  72. package/plugins/meta-architect/skills/vet/references/security-playbooks.md +30 -0
  73. package/plugins/meta-architect/skills/vibe/SKILL.md +2 -0
  74. package/scripts/active-autonomy-hook.mjs +96 -0
  75. package/scripts/build-linux-packages.mjs +328 -0
  76. package/scripts/doctor.js +36 -4
  77. package/scripts/install.sh +28 -0
  78. package/scripts/linux-package-lib.mjs +40 -0
  79. package/scripts/linux-package-smoke.mjs +103 -0
  80. package/scripts/ralph/prompt.md +35 -0
  81. package/scripts/release-sync.js +13 -6
  82. package/scripts/release-verify.js +166 -1
  83. package/skills/align/SKILL.md +24 -0
  84. package/skills/align/agents/openai.yaml +4 -0
  85. package/skills/align/references/shared-language.md +24 -0
  86. package/skills/arch/SKILL.md +2 -0
  87. package/skills/build/SKILL.md +3 -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 +2 -0
  94. package/skills/index.json +21 -6
  95. package/skills/maestro/SKILL.md +36 -3
  96. package/skills/maestro/agents/openai.yaml +2 -2
  97. package/skills/maestro/references/native-ingest-map.md +44 -0
  98. package/skills/sage/SKILL.md +5 -1
  99. package/skills/sage/references/source-selection.md +36 -0
  100. package/skills/tdd/SKILL.md +24 -0
  101. package/skills/tdd/agents/openai.yaml +4 -0
  102. package/skills/vet/SKILL.md +5 -1
  103. package/skills/vet/references/security-playbooks.md +30 -0
  104. package/skills/vibe/SKILL.md +2 -0
  105. package/src/bootstrap.js +141 -24
  106. package/src/build-gate.js +2 -2
  107. package/src/decision-log.js +12 -9
  108. package/src/launcher.js +4 -0
  109. package/src/mcp-config.js +130 -8
  110. package/src/mcp-live-client.js +289 -3
  111. package/src/paths.js +37 -1
  112. package/src/policy.js +1 -1
  113. package/src/release-issue-gates.js +190 -0
  114. package/src/release-state.js +30 -1
  115. package/src/runtime/active-autonomy-core.js +208 -0
  116. package/src/runtime/alignment-sentinel.js +165 -0
  117. package/src/runtime/architect-review.js +88 -0
  118. package/src/runtime/build-readiness.js +62 -0
  119. package/src/runtime/code-graph-rehearse.js +113 -0
  120. package/src/runtime/context-economy-core.js +276 -0
  121. package/src/runtime/continuity-notes.js +79 -0
  122. package/src/runtime/core-source-ingest.js +379 -0
  123. package/src/runtime/detached-provider.js +74 -0
  124. package/src/runtime/environment-awareness-core.js +460 -0
  125. package/src/runtime/exposure-catalog.js +276 -0
  126. package/src/runtime/guidance-stack.js +42 -0
  127. package/src/runtime/helper-orchestration-core.js +307 -0
  128. package/src/runtime/learning-loop-core.js +238 -0
  129. package/src/runtime/maestro-events.js +18 -0
  130. package/src/runtime/maestro-manager.js +605 -0
  131. package/src/runtime/maestro-state.js +125 -0
  132. package/src/runtime/mcp-policy.js +192 -0
  133. package/src/runtime/obsidian-integration-core.js +851 -0
  134. package/src/runtime/obsidian-plugin-bridge.js +739 -0
  135. package/src/runtime/orchestrator.js +158 -0
  136. package/src/runtime/prompt-strategy-core.js +230 -0
  137. package/src/runtime/quorum-review.js +90 -0
  138. package/src/runtime/ralph-execution-core.js +217 -0
  139. package/src/runtime/redaction-gateway.js +174 -0
  140. package/src/runtime/runtime-state.js +1223 -0
  141. package/src/runtime/semantic-recording-core.js +147 -0
  142. package/src/runtime/signal-hooks.js +67 -0
  143. package/src/runtime/skills-registry-export.js +670 -0
  144. package/src/runtime/startup-path.js +14 -0
  145. package/src/runtime/universal-plugin-broker-core.js +575 -0
  146. package/src/runtime/workspace-intelligence-runtime.js +674 -0
  147. package/src/runtime/workspace-virtualizer.js +102 -0
  148. package/src/runtime/workspaces.js +25 -0
  149. package/src/runtime-artifacts.js +407 -84
  150. package/src/skill-installer.js +53 -5
  151. package/src/skills.js +1454 -78
  152. package/src/state-sync.js +51 -8
  153. package/docs/qa/release-readiness-0.1.11.md +0 -79
  154. package/plugins/meta-architect/skills/meta-architect/SKILL.md +0 -32
  155. package/plugins/meta-architect/skills/meta-architect/agents/openai.yaml +0 -4
  156. package/skills/meta-architect/SKILL.md +0 -32
  157. package/skills/meta-architect/agents/openai.yaml +0 -4
  158. /package/plugins/meta-architect/skills/{meta-architect → maestro}/references/core-release-rules.md +0 -0
  159. /package/skills/{meta-architect → maestro}/references/core-release-rules.md +0 -0
@@ -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."
@@ -10,7 +10,9 @@ Use this skill inside Codex to pressure-test how the system behaves, not just ho
10
10
  ## Output
11
11
 
12
12
  Produce:
13
+ - `decision`, `status`, `evidence`, `blockers`, `next_allowed_triggers`
13
14
  - key actors and system states
15
+ - state map and failure flows
14
16
  - main flows and failure flows
15
17
  - invariants and state transitions
16
18
  - race conditions, dead ends, and consistency risks
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,14 +5,16 @@ 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
 
12
12
  Produce:
13
13
  - candidate tools, libraries, or services
14
+ - `decision`, `status`, `evidence`, `blockers`, `next_allowed_triggers`
14
15
  - why each option fits or fails the architecture
15
16
  - source-backed evidence from official docs, upstream repos, or approved GitMCP sources
17
+ - evidence grade and exact upstream mapping
16
18
  - recommendation with tradeoffs
17
19
  - unresolved gaps or missing evidence
18
20
  - exact next trigger, usually `$flow`
@@ -24,6 +26,7 @@ Produce:
24
26
  - use discovery accelerators to find or narrow candidates
25
27
  - map the selected candidate back to an exact upstream repo
26
28
  - verify against upstream repos and official docs before approving it
29
+ - Use `references/source-selection.md` when you need the native source-selection contract, evidence ladder, or packaged discovery rules.
27
30
  - Use approved discovery accelerators when you need faster OSS candidate discovery:
28
31
  - Ossium (`https://ossium.live/home`) for trending, curated, YC-backed, and GSoC-linked OSS discovery
29
32
  - Trendshift (`https://trendshift.io/`) for rising GitHub engagement and topic momentum
@@ -31,6 +34,7 @@ Produce:
31
34
  - Libraries.io (`https://libraries.io/`) for package/dependency metadata, with caution because its public data is scraped and not validated/curated for accuracy
32
35
  - Open Hub (`https://openhub.net/`) for project activity, contributor, and comparison signals
33
36
  - Open-source Projects (`https://www.opensourceprojects.dev/`) for curated OSS discovery and detailed project writeups
37
+ - Discovery accelerators are candidate-finding tools, not approval surfaces. The user-facing Meta-Architect product stays native even when evidence sources are external.
34
38
  - Do not invent package capabilities or maturity claims.
35
39
  - Prefer primary sources over summaries when validating technical details.
36
40
  - Do not treat discovery listings alone as VERIFIED evidence; promote candidates to upstream repos and official docs before approving them.
@@ -0,0 +1,36 @@
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
+ ## Evidence grades
27
+
28
+ - `VERIFIED`: exact upstream mapping plus primary-source confirmation
29
+ - `PARTIAL`: candidate is mapped, but live proof or maturity proof is incomplete
30
+ - `MISSING`: no trustworthy exact upstream mapping yet
31
+
32
+ Always expose the evidence grade and the exact upstream mapping in user-facing `$sage` output.
33
+
34
+ ## Native posture
35
+
36
+ Meta-Architect ships curated guidance and playbooks. It does not ship a raw mirror of external catalogs. External sources remain evidence inputs, not user-facing skill identities.
@@ -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,21 +5,25 @@ 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
 
12
12
  Produce:
13
+ - `decision`, `status`, `evidence`, `blockers`, `next_allowed_triggers`
13
14
  - trust boundaries
14
15
  - authn/authz expectations
15
16
  - sensitive data paths
16
17
  - abuse cases and likely failure modes
17
18
  - concrete mitigations
19
+ - accepted risks
18
20
  - release blockers vs acceptable risks
19
21
  - exact next trigger, usually `$vibe`
20
22
 
21
23
  ## Rules
22
24
 
23
25
  - Prioritize material risks over exhaustive but low-value checklists.
26
+ - Use `references/security-playbooks.md` when you need the native security playbook set for common trust-boundary reviews.
27
+ - Keep security guidance product-owned and lane-aware. Do not introduce a second umbrella or a separate security release gate.
24
28
  - Call out missing assumptions that affect security posture.
25
29
  - Distinguish between must-fix blockers and documented accepted risk.
@@ -0,0 +1,30 @@
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
+ ## Adversarial hardening
22
+
23
+ - For higher-risk changes, run a bounded adversarial hardening pass before final approval.
24
+ - Keep the hardening work inside the private scratchpad/runtime layer.
25
+ - Return structured findings, not direct gate mutations.
26
+ - If the hardening pass cannot resolve or clearly classify the risk, keep `$vet` in a non-terminal state instead of over-approving.
27
+
28
+ ## Product boundary
29
+
30
+ This pack deepens `$vet`; it does not create a new security skill family. Security patterns are packaged as Meta-Architect guidance, not as mirrored external catalogs or branded upstream surfaces.
@@ -10,8 +10,10 @@ Use this skill inside Codex to review whether the system will feel coherent for
10
10
  ## Output
11
11
 
12
12
  Produce:
13
+ - `decision`, `status`, `evidence`, `blockers`, `next_allowed_triggers`
13
14
  - developer workflow risks
14
15
  - user workflow risks
16
+ - operator friction and user friction
15
17
  - complexity hotspots
16
18
  - onboarding or operability friction
17
19
  - simplifications that improve clarity
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,36 @@ 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("context", "active-autonomy-core.json"),
156
+ getRuntimeWritePath("context", "capability-composition.json"),
157
+ getRuntimeWritePath("context", "code-graph-rehearse.json"),
158
+ getRuntimeWritePath("context", "core-source-ingest.json"),
159
+ getRuntimeWritePath("context", "learning-loop-core.json"),
160
+ getRuntimeWritePath("context", "obsidian-bridge.json"),
161
+ getRuntimeWritePath("context", "obsidian-vault-index.json"),
162
+ getRuntimeWritePath("context", "obsidian-vault-operations.json"),
163
+ getRuntimeWritePath("context", "prompt-strategy-core.json"),
164
+ getRuntimeWritePath("context", "recording-core.json"),
165
+ getRuntimeWritePath("context", "skills-registry-export.json"),
166
+ getRuntimeWritePath("context", "workspace-virtualizer.json"),
167
+ getRuntimeWritePath("context", "workspace-context-pack.json"),
168
+ getRuntimeWritePath("context", "workspace-effectiveness.json"),
169
+ getRuntimeWritePath("memory", "notes.md"),
170
+ getRuntimeWritePath("memory", "index.json"),
171
+ getRuntimeWritePath("hooks", "config.json"),
172
+ getRuntimeWritePath("hooks", "audit.log"),
173
+ getRuntimeWritePath("tasks", "registry.json"),
174
+ getRuntimeWritePath("tasks", "mailbox"),
175
+ getRuntimeWritePath("tasks", "locks"),
176
+ getRuntimeWritePath("workspaces", "index.json"),
177
+ getRuntimeWritePath("state", "manager-runs.json"),
178
+ getRuntimeWritePath("state", "maestro-state.json"),
179
+ getRuntimeWritePath("evidence", "semantic-receipts.json"),
180
+ path.join(getRepoRoot(), "docs", "qa", "release-issue-gates-0.1.13.json"),
181
+ path.join(getMcpRootPath(), "servers.json"),
182
+ path.join(getMcpRootPath(), "local-capabilities.json"),
145
183
  ];
146
184
 
147
185
  for (const file of requiredFiles) {
@@ -152,33 +190,55 @@ async function inspectLocalScaffold() {
152
190
  }
153
191
  }
154
192
 
193
+ try {
194
+ await loadReleaseState();
195
+ await loadDecisionLog();
196
+ const authority = await loadLeaderAuthority();
197
+ if (authority.state === "invalid") {
198
+ return false;
199
+ }
200
+ const snapshot = await loadRuntimeSnapshot();
201
+ if (snapshot.missingArtifacts.length > 0 || snapshot.invalidArtifacts.length > 0) {
202
+ return false;
203
+ }
204
+ } catch {
205
+ return false;
206
+ }
207
+
155
208
  return true;
156
209
  }
157
210
 
158
211
  async function seedStarterMcpConfig() {
159
212
  const files = ["servers.json", "collections.json", "fallback.json"];
160
213
  for (const file of files) {
161
- await fs.copyFile(path.join(packageRoot, "mcp", file), path.join(getRepoRoot(), "mcp", file));
214
+ await fs.copyFile(path.join(packageRoot, "mcp", file), path.join(getMcpRootPath(), file));
162
215
  }
163
216
  }
164
217
 
165
- async function inspectMcpState({ fix, initMcp }) {
218
+ async function seedLocalCapabilityManifest() {
219
+ await fs.copyFile(
220
+ path.join(packageRoot, "mcp", "local-capabilities.json"),
221
+ path.join(getMcpRootPath(), "local-capabilities.json"),
222
+ );
223
+ }
224
+
225
+ async function inspectGitMcpState({ fix, initMcp }) {
166
226
  try {
167
- const servers = await loadMcpServers();
227
+ const servers = await validateMcpServers();
168
228
  if (servers.servers.length === 0) {
169
229
  if (fix && initMcp) {
170
230
  await seedStarterMcpConfig();
171
- const seededServers = await loadMcpServers();
231
+ const seededServers = await validateMcpServers();
172
232
  return makeStatus(
173
233
  "FIXED",
174
- "starter MCP sources were seeded into mcp/servers.json",
234
+ "repo-owned GitMCP evidence sources were seeded into mcp/servers.json",
175
235
  `${seededServers.servers.length} configured source(s)`,
176
236
  );
177
237
  }
178
238
 
179
239
  return makeStatus(
180
240
  "WARN",
181
- "mcp/servers.json exists but contains no approved repo-backed sources",
241
+ "repo-owned mcp/servers.json contains no approved GitMCP evidence sources",
182
242
  initMcp
183
243
  ? "Run `ma bootstrap --init-mcp` to seed starter sources, or add exact upstream GitMCP repo endpoints manually."
184
244
  : "Add exact upstream GitMCP repo endpoints before claiming VERIFIED evidence.",
@@ -187,21 +247,74 @@ async function inspectMcpState({ fix, initMcp }) {
187
247
 
188
248
  return makeStatus(
189
249
  "OK",
190
- "mcp/servers.json has approved starter sources",
250
+ "repo-owned mcp/servers.json is ready for GitMCP evidence binding",
191
251
  `${servers.servers.length} configured source(s)`,
192
252
  );
193
253
  } catch (error) {
194
254
  if (fix && initMcp) {
195
255
  await seedStarterMcpConfig();
196
- const seededServers = await loadMcpServers();
256
+ const seededServers = await validateMcpServers();
197
257
  return makeStatus(
198
258
  "FIXED",
199
- "starter MCP sources replaced an invalid MCP configuration",
259
+ "repo-owned mcp/servers.json was reseeded with starter GitMCP evidence sources",
200
260
  `${seededServers.servers.length} configured source(s)`,
201
261
  );
202
262
  }
203
263
 
204
- return makeStatus("WARN", "mcp/servers.json is not ready for evidence binding", error.message);
264
+ return makeStatus(
265
+ "WARN",
266
+ "repo-owned mcp/servers.json is not ready for GitMCP evidence binding",
267
+ error.message,
268
+ );
269
+ }
270
+ }
271
+
272
+ async function inspectLocalCapabilityState({ fix }) {
273
+ function summarizeReadiness(readiness) {
274
+ const notReady = readiness.filter((item) => !item.ready);
275
+ const allReady = notReady.length === 0;
276
+ return {
277
+ allReady,
278
+ detail: allReady
279
+ ? readiness.map((item) => item.capability).join(", ")
280
+ : notReady.map((item) => `${item.capability}: ${item.detail}`).join("; "),
281
+ };
282
+ }
283
+
284
+ try {
285
+ await validateLocalCapabilities();
286
+ const summary = summarizeReadiness(await runLocalCapabilityReadinessChecks());
287
+ if (!summary.allReady) {
288
+ return makeStatus(
289
+ "WARN",
290
+ "package-owned mcp/local-capabilities.json is valid but some local capabilities are not ready",
291
+ summary.detail,
292
+ );
293
+ }
294
+
295
+ return makeStatus(
296
+ "OK",
297
+ "package-owned mcp/local-capabilities.json is ready for first-party capabilities",
298
+ summary.detail,
299
+ );
300
+ } catch (error) {
301
+ if (fix) {
302
+ await seedLocalCapabilityManifest();
303
+ const summary = summarizeReadiness(await runLocalCapabilityReadinessChecks());
304
+ return makeStatus(
305
+ summary.allReady ? "FIXED" : "WARN",
306
+ summary.allReady
307
+ ? "package-owned mcp/local-capabilities.json was reseeded from the bundled SDK"
308
+ : "package-owned mcp/local-capabilities.json was reseeded but some local capabilities are not ready",
309
+ summary.detail,
310
+ );
311
+ }
312
+
313
+ return makeStatus(
314
+ "WARN",
315
+ "package-owned mcp/local-capabilities.json is not ready for first-party capabilities",
316
+ error.message,
317
+ );
205
318
  }
206
319
  }
207
320
 
@@ -268,10 +381,13 @@ async function runEnvironmentFlow({ fix, initMcp }) {
268
381
 
269
382
  if (fix) {
270
383
  await runInit();
384
+ const scaffoldReady = await inspectLocalScaffold();
271
385
  statuses.push(
272
386
  makeStatus(
273
- "FIXED",
274
- "local Meta-Architect scaffold is ready",
387
+ scaffoldReady ? "FIXED" : "WARN",
388
+ scaffoldReady
389
+ ? "local Meta-Architect scaffold is ready"
390
+ : "local Meta-Architect scaffold still has invalid runtime artifacts",
275
391
  path.join(getRepoRoot(), ".ma"),
276
392
  ),
277
393
  );
@@ -285,7 +401,8 @@ async function runEnvironmentFlow({ fix, initMcp }) {
285
401
  );
286
402
  }
287
403
 
288
- statuses.push(await inspectMcpState({ fix, initMcp }));
404
+ statuses.push(await inspectGitMcpState({ fix, initMcp }));
405
+ statuses.push(await inspectLocalCapabilityState({ fix }));
289
406
  return statuses;
290
407
  }
291
408
 
package/src/build-gate.js CHANGED
@@ -26,10 +26,10 @@ export function evaluateBuildGate(releaseState) {
26
26
  });
27
27
  }
28
28
 
29
- if (!["LOCKED", "READY"].includes(releaseState.build_status)) {
29
+ if (!["LOCKED", "READY", "RUNNING"].includes(releaseState.build_status)) {
30
30
  blockers.push({
31
31
  field: "build_status",
32
- expected: "LOCKED or READY",
32
+ expected: "LOCKED, READY, or RUNNING",
33
33
  actual: releaseState.build_status,
34
34
  trigger: "$build",
35
35
  });