@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
package/src/state-sync.js CHANGED
@@ -1,15 +1,58 @@
1
- import { loadDecisionLog, updateDecisionStatuses } from "./decision-log.js";
2
- import { loadReleaseState, saveReleaseState } from "./release-state.js";
1
+ import { loadDecisionLog } from "./decision-log.js";
2
+ import { writeJson } from "./fs-utils.js";
3
+ import { getRuntimeWritePath } from "./paths.js";
4
+ import { allowedStatuses, loadReleaseStateOrDefault, saveReleaseState } from "./release-state.js";
5
+ import { loadManagerRunRegistryOrDefault } from "./runtime/maestro-manager.js";
6
+ import { guardLeaderMutation } from "./runtime/runtime-state.js";
3
7
 
4
- export async function syncStatusUpdates(statusUpdates) {
5
- const release = await loadReleaseState();
8
+ const publicStatusFields = new Set(Object.keys(allowedStatuses));
9
+
10
+ function validatePublicStatusUpdates(statusUpdates) {
11
+ if (!statusUpdates || typeof statusUpdates !== "object" || Array.isArray(statusUpdates)) {
12
+ throw new Error("Status updates must be an object");
13
+ }
14
+
15
+ const invalidFields = Object.keys(statusUpdates).filter(
16
+ (field) => !publicStatusFields.has(field),
17
+ );
18
+ if (invalidFields.length > 0) {
19
+ throw new Error(`Unknown release status field(s): ${invalidFields.join(", ")}`);
20
+ }
21
+ }
22
+
23
+ export async function syncStatusUpdates(statusUpdates, options = {}) {
24
+ validatePublicStatusUpdates(statusUpdates);
25
+ const guard = await guardLeaderMutation({
26
+ actor: options.actor,
27
+ kind: "release-status-update",
28
+ payload: statusUpdates,
29
+ });
30
+ if (!guard.allowed) {
31
+ return { proposed: true, proposalPath: guard.proposalPath };
32
+ }
33
+
34
+ const [release, decisions] = await Promise.all([loadReleaseStateOrDefault(), loadDecisionLog()]);
6
35
  const nextRelease = { ...release, ...statusUpdates };
7
36
  await saveReleaseState(nextRelease);
8
- await updateDecisionStatuses(statusUpdates);
9
- return nextRelease;
37
+
38
+ try {
39
+ for (const [field, value] of Object.entries(statusUpdates)) {
40
+ decisions[field] = value;
41
+ }
42
+ await writeJson(getRuntimeWritePath("decisions.json"), decisions);
43
+ } catch (error) {
44
+ await saveReleaseState(release);
45
+ throw error;
46
+ }
47
+
48
+ return { proposed: false, proposalPath: null, release: nextRelease };
10
49
  }
11
50
 
12
51
  export async function loadCombinedState() {
13
- const [release, decisions] = await Promise.all([loadReleaseState(), loadDecisionLog()]);
14
- return { release, decisions };
52
+ const [release, decisions, managerRuns] = await Promise.all([
53
+ loadReleaseStateOrDefault(),
54
+ loadDecisionLog(),
55
+ loadManagerRunRegistryOrDefault(),
56
+ ]);
57
+ return { release, decisions, managerRuns };
15
58
  }
@@ -1,79 +0,0 @@
1
- # Release Readiness 0.1.11
2
-
3
- ## Production bar
4
-
5
- `v0.1.11` is treated as production only when:
6
- - the package installs cleanly from the canonical public install command
7
- - the Codex-hosted runtime path works end to end
8
- - the helper flow remains valid for scripted verification
9
- - release docs, package metadata, and workflows all agree on `0.1.11`
10
-
11
- Target release state:
12
- - npm package: `@jstn-sdk/ma@0.1.11`
13
- - npm registry state: pending publish
14
- - publishability note: `0.1.10` is already published, so `0.1.11` is the next publishable package line
15
- - git tag: `v0.1.11`
16
- - GitHub release: pending publish for `v0.1.11`
17
-
18
- ## Production checklist
19
-
20
- - skills-first product identity: PASS
21
- - package/plugin identity aligned to `@jstn-sdk/ma`: PASS
22
- - version/tag alignment `0.1.11` / `v0.1.11`: PASS
23
- - install/uninstall docs aligned: PASS
24
- - onboarding is concise and sequential: PASS
25
- - helper command documented as secondary: PASS
26
- - skills/prompts/manifests aligned: PASS
27
- - packaging includes required assets: PASS
28
- - tests pass: PASS
29
- - package dry-run passes: PASS
30
- - installed-package behavior passes: PASS
31
- - workflow/release/provenance docs aligned: PASS
32
- - no stale package names remain in tracked repo surfaces: PASS
33
- - no conflicting CLI-first product story remains in tracked product docs: PASS
34
-
35
- ## Automated checks run
36
-
37
- ```bash
38
- npm run release:check
39
- ```
40
-
41
- That must cover:
42
- - skills manifest generation
43
- - skill validation
44
- - skill bundle packaging
45
- - repo checks
46
- - automated tests
47
- - npm package dry-run inspection
48
-
49
- ## Manual/behavioral checks run
50
-
51
- Canonical launch:
52
-
53
- ```bash
54
- ma --madmax --high
55
- ```
56
-
57
- Helper-path validation:
58
-
59
- ```bash
60
- ma setup
61
- ma idea "Build a demo app"
62
- ma run '$arch'
63
- ma run '$sage'
64
- ma run '$flow'
65
- ma run '$vet'
66
- ma run '$vibe'
67
- ma status
68
- ma run '$build'
69
- ```
70
-
71
- Expected evidence:
72
- - `.ma/release.json` remains the source of truth
73
- - `.ma/decisions.json` records the helper-path activity
74
- - `$build` stays blocked until upstream gates are green, then becomes ready
75
-
76
- ## Known limitations
77
-
78
- - interactive Codex conversation quality depends on the installed Codex host
79
- - release publication still depends on npm ownership/authorization for the target package name
@@ -1,32 +0,0 @@
1
- ---
2
- name: meta-architect
3
- 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."
4
- ---
5
-
6
- # Meta-Architect
7
-
8
- ## Overview
9
-
10
- Run the full Meta-Architect workflow inside Codex. Use this skill when the user wants the gated design-and-review sequence rather than a single specialist lane.
11
-
12
- ## Workflow
13
-
14
- 1. Start with `$arch` and turn the user's goal into a concrete architecture brief.
15
- 2. Continue with `$sage` to validate core stack choices against official docs or approved repo-backed sources.
16
- 3. Run `$flow` to map states, transitions, invariants, and blockers.
17
- 4. Run `$vet` to review trust boundaries, auth, data handling, and abuse paths.
18
- 5. Run `$vibe` to review developer and user experience quality.
19
- 6. Finish with `$build` to decide whether implementation is ready, what remains blocked, and what the exact next execution step should be.
20
-
21
- ## Rules
22
-
23
- - Stay inside Codex unless the user explicitly asks for repo-local helper commands.
24
- - Keep the workflow architecture-first. Do not jump into code before the architecture and review lanes are grounded.
25
- - 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.
26
- - Keep the `$sage` order explicit: known upstream sources first, discovery accelerators second, exact repo mapping third, approval only after upstream verification.
27
- - Prefer official docs, upstream repos, and repo-configured GitMCP sources when validating tooling choices.
28
- - End each lane with a clear result shape: decision, evidence, blockers, and exact next trigger.
29
-
30
- ## References
31
-
32
- - For release gates and branch policy, read `references/core-release-rules.md`.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "$meta-architect"
3
- short_description: "Full Meta-Architect skill workflow"
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,32 +0,0 @@
1
- ---
2
- name: meta-architect
3
- 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."
4
- ---
5
-
6
- # Meta-Architect
7
-
8
- ## Overview
9
-
10
- Run the full Meta-Architect workflow inside Codex. Use this skill when the user wants the gated design-and-review sequence rather than a single specialist lane.
11
-
12
- ## Workflow
13
-
14
- 1. Start with `$arch` and turn the user's goal into a concrete architecture brief.
15
- 2. Continue with `$sage` to validate core stack choices against official docs or approved repo-backed sources.
16
- 3. Run `$flow` to map states, transitions, invariants, and blockers.
17
- 4. Run `$vet` to review trust boundaries, auth, data handling, and abuse paths.
18
- 5. Run `$vibe` to review developer and user experience quality.
19
- 6. Finish with `$build` to decide whether implementation is ready, what remains blocked, and what the exact next execution step should be.
20
-
21
- ## Rules
22
-
23
- - Stay inside Codex unless the user explicitly asks for repo-local helper commands.
24
- - Keep the workflow architecture-first. Do not jump into code before the architecture and review lanes are grounded.
25
- - 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.
26
- - Keep the `$sage` order explicit: known upstream sources first, discovery accelerators second, exact repo mapping third, approval only after upstream verification.
27
- - Prefer official docs, upstream repos, and repo-configured GitMCP sources when validating tooling choices.
28
- - End each lane with a clear result shape: decision, evidence, blockers, and exact next trigger.
29
-
30
- ## References
31
-
32
- - For release gates and branch policy, read `references/core-release-rules.md`.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "$meta-architect"
3
- short_description: "Full Meta-Architect skill workflow"
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."