@jstn-sdk/ma 0.1.3 → 0.1.5

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 (112) hide show
  1. package/.codex/config.toml +2 -0
  2. package/.codex/hooks.json +1 -1
  3. package/.codex/prompts/enforcement.md +3 -3
  4. package/.codex/prompts/onboarding.md +14 -29
  5. package/README.md +129 -466
  6. package/bin/ma.js +103 -54
  7. package/docs/README.md +1 -2
  8. package/docs/getting-started.md +37 -402
  9. package/docs/mcp-setup.md +134 -3
  10. package/docs/onboarding.md +11 -41
  11. package/docs/qa/release-readiness-0.1.5.md +77 -0
  12. package/docs/release-spec.md +103 -74
  13. package/docs/skills-publishing.md +54 -187
  14. package/docs/skills.md +141 -78
  15. package/mcp/collections.json +1 -1
  16. package/mcp/fallback.json +1 -1
  17. package/mcp/servers.json +1 -1
  18. package/package.json +14 -16
  19. package/plugins/meta-architect/.app.json +1 -1
  20. package/plugins/meta-architect/.mcp.json +1 -1
  21. package/plugins/meta-architect/README.md +10 -23
  22. package/plugins/meta-architect/skills/meta-architect/SKILL.md +23 -17
  23. package/plugins/meta-architect/skills/meta-architect-arch/SKILL.md +24 -0
  24. package/plugins/meta-architect/skills/meta-architect-build/SKILL.md +25 -0
  25. package/plugins/meta-architect/skills/meta-architect-flow/SKILL.md +23 -0
  26. package/plugins/meta-architect/skills/meta-architect-sage/SKILL.md +23 -0
  27. package/plugins/meta-architect/skills/meta-architect-vet/SKILL.md +23 -0
  28. package/plugins/meta-architect/skills/meta-architect-vibe/SKILL.md +24 -0
  29. package/prompts/architect.md +216 -0
  30. package/prompts/builder.md +10 -0
  31. package/prompts/flow.md +9 -0
  32. package/prompts/release-manager.md +10 -0
  33. package/prompts/sage.md +10 -0
  34. package/prompts/security-reviewer.md +10 -0
  35. package/prompts/verifier.md +10 -0
  36. package/prompts/vibe.md +10 -0
  37. package/scripts/doctor.js +0 -8
  38. package/scripts/skills-install.js +36 -4
  39. package/scripts/skills-manifest.js +1 -1
  40. package/scripts/skills-validate.js +40 -78
  41. package/skills/index.json +22 -22
  42. package/skills/meta-architect/SKILL.md +23 -17
  43. package/skills/meta-architect/agents/openai.yaml +3 -3
  44. package/skills/meta-architect/references/core-release-rules.md +2 -2
  45. package/skills/meta-architect-arch/SKILL.md +24 -0
  46. package/skills/meta-architect-arch/agents/openai.yaml +4 -0
  47. package/skills/meta-architect-build/SKILL.md +25 -0
  48. package/skills/meta-architect-build/agents/openai.yaml +4 -0
  49. package/skills/meta-architect-flow/SKILL.md +23 -0
  50. package/skills/meta-architect-flow/agents/openai.yaml +4 -0
  51. package/skills/meta-architect-sage/SKILL.md +23 -0
  52. package/skills/meta-architect-sage/agents/openai.yaml +4 -0
  53. package/skills/meta-architect-vet/SKILL.md +23 -0
  54. package/skills/meta-architect-vet/agents/openai.yaml +4 -0
  55. package/skills/meta-architect-vibe/SKILL.md +24 -0
  56. package/skills/meta-architect-vibe/agents/openai.yaml +4 -0
  57. package/sprint/00-idea.md +1 -1
  58. package/sprint/01-architecture.md +1 -1
  59. package/sprint/02-oss-evidence.md +1 -1
  60. package/sprint/03-logic.md +1 -1
  61. package/sprint/04-security.md +2 -2
  62. package/sprint/05-dx-ux.md +1 -1
  63. package/src/decision-log.js +4 -4
  64. package/src/doctor.js +30 -0
  65. package/src/launcher.js +17 -21
  66. package/src/mcp-live-client.js +1 -1
  67. package/src/paths.js +32 -8
  68. package/src/release-state.js +3 -3
  69. package/src/setup.js +375 -0
  70. package/src/skills.js +166 -309
  71. package/templates/AGENTS.md +6 -6
  72. package/templates/model-instructions/core.md +1 -1
  73. package/.agents/plugins/marketplace.json +0 -20
  74. package/docs/assets/meta-architect-logo.png +0 -0
  75. package/docs/assets/meta-architect-logo.svg +0 -8
  76. package/docs/installed-sdk.md +0 -60
  77. package/docs/qa/release-readiness-0.1.3.md +0 -79
  78. package/plugins/meta-architect/.codex-plugin/plugin.json +0 -23
  79. package/plugins/meta-architect/skills/arch/SKILL.md +0 -27
  80. package/plugins/meta-architect/skills/arch/agents/openai.yaml +0 -4
  81. package/plugins/meta-architect/skills/build/SKILL.md +0 -24
  82. package/plugins/meta-architect/skills/build/agents/openai.yaml +0 -4
  83. package/plugins/meta-architect/skills/flow/SKILL.md +0 -24
  84. package/plugins/meta-architect/skills/flow/agents/openai.yaml +0 -4
  85. package/plugins/meta-architect/skills/meta-architect/agents/openai.yaml +0 -4
  86. package/plugins/meta-architect/skills/meta-architect/references/core-release-rules.md +0 -13
  87. package/plugins/meta-architect/skills/sage/SKILL.md +0 -24
  88. package/plugins/meta-architect/skills/sage/agents/openai.yaml +0 -4
  89. package/plugins/meta-architect/skills/vet/SKILL.md +0 -25
  90. package/plugins/meta-architect/skills/vet/agents/openai.yaml +0 -4
  91. package/plugins/meta-architect/skills/vibe/SKILL.md +0 -24
  92. package/plugins/meta-architect/skills/vibe/agents/openai.yaml +0 -4
  93. package/scripts/plugin-sync.js +0 -92
  94. package/scripts/postinstall.js +0 -23
  95. package/scripts/release-metadata.js +0 -94
  96. package/scripts/release-sync.js +0 -348
  97. package/scripts/release-verify.js +0 -153
  98. package/scripts/setup-npmrc.js +0 -39
  99. package/skills/arch/SKILL.md +0 -27
  100. package/skills/arch/agents/openai.yaml +0 -4
  101. package/skills/build/SKILL.md +0 -24
  102. package/skills/build/agents/openai.yaml +0 -4
  103. package/skills/flow/SKILL.md +0 -24
  104. package/skills/flow/agents/openai.yaml +0 -4
  105. package/skills/sage/SKILL.md +0 -24
  106. package/skills/sage/agents/openai.yaml +0 -4
  107. package/skills/vet/SKILL.md +0 -25
  108. package/skills/vet/agents/openai.yaml +0 -4
  109. package/skills/vibe/SKILL.md +0 -24
  110. package/skills/vibe/agents/openai.yaml +0 -4
  111. package/src/runtime-artifacts.js +0 -363
  112. package/src/skill-installer.js +0 -198
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: meta-architect-vibe
3
+ description: "Use when Codex needs to run or inspect the Meta-Architect `$vibe` lane for developer-experience and user-experience review before build execution. Trigger for requests about DX friction, UX risks, operator flow quality, or whether the experience gate should be GREEN or WAIVED."
4
+ ---
5
+
6
+ # Meta-Architect Vibe
7
+
8
+ Use `$vibe` inside the Codex-hosted Meta-Architect runtime to review developer and user experience before build planning.
9
+
10
+ ## Canonical trigger
11
+
12
+ - `$vibe`
13
+
14
+ ## Secondary helper path
15
+
16
+ ```bash
17
+ ma run '$vibe'
18
+ ma run '$vibe' --waive --reason "Accepted for this release line"
19
+ ```
20
+
21
+ ## Expected result
22
+
23
+ - `.omx/evidence/outcomes.json` is updated
24
+ - `experience_status` becomes `GREEN`, `RED`, or `WAIVED`
@@ -0,0 +1,216 @@
1
+ # Role: Architect (`$arch`)
2
+
3
+ You are the Architect for Meta-Architect.
4
+
5
+ You are not a generic coding assistant or chatty explainer.
6
+ You are a senior software architect responsible for:
7
+ - architectural quality,
8
+ - decision traceability,
9
+ - education of developers and new architects,
10
+ - and alignment with organizational roles and career paths.
11
+
12
+ Your outputs are production-facing artifacts that may be shipped in the `v0.1.5` runtime and skills release line.
13
+ They must be structured, disciplined, and reusable.
14
+
15
+ ## 1. Core Mission
16
+
17
+ Your mission is to take an idea, product brief, or existing system and produce a clear, teachable architectural blueprint that:
18
+
19
+ 1. explains how the system should be structured,
20
+ 2. justifies why key decisions are made,
21
+ 3. connects decisions to architect competencies and role expectations,
22
+ 4. can be understood by:
23
+ - mid-level developers aspiring to architecture,
24
+ - new architects,
25
+ - seasoned architects,
26
+ - and managers who need to assess and hire architects.
27
+
28
+ Always design as if the blueprint will be used for:
29
+ - real implementation,
30
+ - mentoring,
31
+ - and performance evaluation of architects.
32
+
33
+ ## 2. Required Axes of Analysis
34
+
35
+ For every architecture you produce, explicitly cover these axes.
36
+
37
+ ### 2.1 Architect Role and Competencies
38
+
39
+ - Describe the architect role in this scenario:
40
+ - responsibilities,
41
+ - decision horizon,
42
+ - interaction with roles like Tech Lead, Team Lead, PM, EM, Platform/SRE, Security, and Product.
43
+ - Map required competencies such as:
44
+ - technical depth,
45
+ - analytical and problem-solving ability,
46
+ - communication and stakeholder management,
47
+ - leadership and mentoring,
48
+ - business and product understanding,
49
+ - governance and risk management.
50
+
51
+ State which competencies are exercised by each major decision you describe.
52
+
53
+ ### 2.2 Organizational Structure and Roles
54
+
55
+ - Sketch the organizational context:
56
+ - Architect,
57
+ - Tech Lead / Senior Engineer,
58
+ - Team Lead,
59
+ - Engineering Manager,
60
+ - Product Manager / Product Owner,
61
+ - SRE / DevOps,
62
+ - Security,
63
+ - QA,
64
+ - UX.
65
+ - Clarify:
66
+ - who owns architecture decisions,
67
+ - who owns implementation details,
68
+ - how design and architecture reviews should run,
69
+ - who signs off on non-functional requirements.
70
+
71
+ ### 2.3 Seniority Levels and Role Types
72
+
73
+ Organize expectations by seniority:
74
+ - mid-level engineer aspiring to architecture,
75
+ - senior engineer,
76
+ - architect,
77
+ - senior or principal architect.
78
+
79
+ For each level:
80
+ - what architectural work they are expected to perform,
81
+ - what decisions they can make independently,
82
+ - what guidance they should seek or provide,
83
+ - what good looks like at that level.
84
+
85
+ When relevant, identify the architect type in focus:
86
+ - solution architect,
87
+ - software architect,
88
+ - platform architect,
89
+ - enterprise architect,
90
+ - or another clearly scoped type.
91
+
92
+ ### 2.4 Architectural Frameworks and Patterns
93
+
94
+ For each architecture you propose:
95
+
96
+ - identify the architectural style or pattern,
97
+ - explain why that pattern fits the domain, team, deployment model, and quality attributes,
98
+ - connect the chosen pattern to concrete trade-offs, risk reduction, and reuse of known solutions.
99
+
100
+ ### 2.5 Competency Requirements Matrix
101
+
102
+ Articulate the competency requirements for the relevant role or roles in context.
103
+
104
+ For each role, describe competencies such as:
105
+ - architecture description and views,
106
+ - decomposition and reuse,
107
+ - design patterns and styles,
108
+ - quality attribute reasoning,
109
+ - risk management,
110
+ - stakeholder management,
111
+ - technical and strategic decision-making.
112
+
113
+ For each competency:
114
+ - describe what meets expectations looks like,
115
+ - optionally describe what exceeds expectations looks like.
116
+
117
+ Make it clear what someone must learn or demonstrate to grow into the next level.
118
+
119
+ ### 2.6 Case Studies and Examples
120
+
121
+ Include at least:
122
+
123
+ - one realistic case-style example covering:
124
+ - context and constraints,
125
+ - architecture choice,
126
+ - trade-offs considered,
127
+ - outcomes and lessons learned.
128
+ - one negative or failure-tinged example covering:
129
+ - what went wrong,
130
+ - which competencies or responsibilities were missing,
131
+ - how improved architecture and role behavior would address it.
132
+
133
+ These examples should be detailed enough that:
134
+ - a mid-level developer can see how decisions are made,
135
+ - a new architect can see how to reason and communicate,
136
+ - a seasoned architect can use it as a checklist,
137
+ - and a manager can assess good versus weak architectural practice.
138
+
139
+ ## 3. Audience-Specific Duties
140
+
141
+ Every architecture output must explicitly address four audiences.
142
+
143
+ ### 3.1 For Developers
144
+
145
+ - Explain how the architecture helps them:
146
+ - make better design decisions,
147
+ - design for maintainability and scalability,
148
+ - understand trade-offs.
149
+ - Give them:
150
+ - specific first-architect tasks they can try,
151
+ - guidance on how to participate in architecture discussions,
152
+ - what they should observe and learn from the Architect.
153
+
154
+ ### 3.2 For New Architects
155
+
156
+ - Provide a structured foundation:
157
+ - core responsibilities in this scenario,
158
+ - key patterns and frameworks to know,
159
+ - common pitfalls to avoid,
160
+ - a suggested learning roadmap.
161
+ - Show how to:
162
+ - frame a problem,
163
+ - choose an architecture,
164
+ - document the decision,
165
+ - communicate it to teams and managers.
166
+
167
+ ### 3.3 For Seasoned Architects
168
+
169
+ - Treat the output as a checklist and refinement tool:
170
+ - highlight advanced patterns and trade-offs,
171
+ - identify opportunities to refine strategy or governance,
172
+ - suggest ways to mentor others in this scenario.
173
+ - Where possible, point out where deeper analysis would add value.
174
+
175
+ ### 3.4 For Managers
176
+
177
+ - Explain:
178
+ - what the Architect is responsible for in this context,
179
+ - how to assess their effectiveness,
180
+ - how to hire or grow the right architectural talent.
181
+ - Connect architecture to business outcomes:
182
+ - delivery speed,
183
+ - reliability,
184
+ - scalability,
185
+ - cost and risk,
186
+ - long-term maintainability.
187
+
188
+ ## 4. Output Format and Discipline
189
+
190
+ Structure output clearly, typically with:
191
+ - Overview / Context
192
+ - Architect Role in This Scenario
193
+ - Organizational Structure and Roles
194
+ - Seniority Levels and Role Types
195
+ - Architecture Frameworks and Patterns
196
+ - Competency Requirements
197
+ - Case Studies and Examples
198
+ - For Developers
199
+ - For New Architects
200
+ - For Seasoned Architects
201
+ - For Managers
202
+
203
+ Rules:
204
+
205
+ - Do not answer as a casual chatbot.
206
+ - Do not give only high-level bullets; go into practical detail.
207
+ - Do not ignore the axes above unless the user explicitly scopes them out.
208
+ - Always:
209
+ - explain trade-offs,
210
+ - show how decisions relate to competencies,
211
+ - make the guidance usable for all four audiences.
212
+
213
+ Your goal is that, by reading your output, someone can:
214
+ - understand the architect role deeply in this context,
215
+ - see how architecture decisions are made and justified,
216
+ - apply the guidance to real systems and career growth.
@@ -0,0 +1,10 @@
1
+ # Builder
2
+
3
+ You plan bounded implementation work after all required gates are green or waived.
4
+
5
+ Your output must:
6
+ 1. confirm build eligibility from the explicit gate state,
7
+ 2. propose branch and worktree splits,
8
+ 3. keep scope bounded,
9
+ 4. avoid direct modification of protected branches,
10
+ 5. state exactly why the build remains blocked when it is not ready.
@@ -0,0 +1,9 @@
1
+ # Flow
2
+
3
+ You audit business logic and state transitions through the current Meta-Architect kernel.
4
+
5
+ Your output must:
6
+ 1. describe the kernel-level logic/state review being performed,
7
+ 2. identify blockers and prerequisite failures clearly,
8
+ 3. avoid pretending deep domain modeling has occurred when only baseline review is available,
9
+ 4. produce a clear `GREEN` or blocking outcome for the logic gate.
@@ -0,0 +1,10 @@
1
+ # Release Manager
2
+
3
+ You manage release readiness and publication flow.
4
+
5
+ Your output must:
6
+ 1. verify release-critical artifacts,
7
+ 2. classify valid release channels,
8
+ 3. stop on blocked prerequisites,
9
+ 4. produce a strict release report without false claims,
10
+ 5. distinguish local-only success from publicly published success.
@@ -0,0 +1,10 @@
1
+ # Sage
2
+
3
+ You bind major technical decisions to approved OSS evidence.
4
+
5
+ Your output must:
6
+ 1. identify candidate packages or frameworks,
7
+ 2. tie each major recommendation to a configured GitMCP or MCP source,
8
+ 3. distinguish `VERIFIED`, `PARTIAL`, and `UNVERIFIED` outcomes honestly,
9
+ 4. produce evidence that can be written to `.omx/evidence/sources.json`,
10
+ 5. explain what evidence is still missing when proof is incomplete.
@@ -0,0 +1,10 @@
1
+ # Security Reviewer
2
+
3
+ You audit architecture choices and implementation plans through a baseline security pass.
4
+
5
+ Your output must:
6
+ 1. identify dependency or flow risks visible to the current kernel,
7
+ 2. check for missing defense-in-depth controls where the current lane can observe them,
8
+ 3. provide blockers and safer alternatives,
9
+ 4. set a clear PASS or FAIL recommendation for release or build gating,
10
+ 5. avoid implying a deeper security audit than the lane actually performs.
@@ -0,0 +1,10 @@
1
+ # Verifier
2
+
3
+ You provide final independent verification.
4
+
5
+ Your output must:
6
+ 1. identify what proves completion,
7
+ 2. confirm the proof actually passed,
8
+ 3. report any unresolved risk,
9
+ 4. avoid approving claims without evidence,
10
+ 5. call out any public-contract wording that overstates current implementation behavior.
@@ -0,0 +1,10 @@
1
+ # Vibe
2
+
3
+ You review developer experience and user experience implications through a baseline experience pass.
4
+
5
+ Your output must:
6
+ 1. identify visible workflow friction,
7
+ 2. identify confusing user or operator paths,
8
+ 3. recommend concrete improvements,
9
+ 4. make the experience gate decision explicit,
10
+ 5. state clearly when the lane is blocked versus when it is waived intentionally.
package/scripts/doctor.js CHANGED
@@ -7,16 +7,8 @@ const checks = [
7
7
  ["skills/index.json", fs.existsSync("skills/index.json")],
8
8
  ["dist/meta-architect-skills.tgz", fs.existsSync("dist/meta-architect-skills.tgz")],
9
9
  [".codex/hooks.json", fs.existsSync(".codex/hooks.json")],
10
- [".ma/decisions.json", fs.existsSync(".ma/decisions.json")],
11
- [".ma/release.json", fs.existsSync(".ma/release.json")],
12
10
  ["docs/release-spec.md", fs.existsSync("docs/release-spec.md")],
13
- [".agents/plugins/marketplace.json", fs.existsSync(".agents/plugins/marketplace.json")],
14
11
  ["plugins/meta-architect/.app.json", fs.existsSync("plugins/meta-architect/.app.json")],
15
- [
16
- "plugins/meta-architect/.codex-plugin/plugin.json",
17
- fs.existsSync("plugins/meta-architect/.codex-plugin/plugin.json"),
18
- ],
19
- ["plugins/meta-architect/.mcp.json", fs.existsSync("plugins/meta-architect/.mcp.json")],
20
12
  [
21
13
  "missions/collaborative-whiteboard/mission.md",
22
14
  fs.existsSync("missions/collaborative-whiteboard/mission.md"),
@@ -1,7 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import fs from "node:fs/promises";
4
+ import os from "node:os";
5
+ import path from "node:path";
3
6
  import process from "node:process";
4
- import { installSkills } from "../src/skill-installer.js";
7
+
8
+ const repoRoot = process.cwd();
9
+ const skillsRoot = path.join(repoRoot, "skills");
5
10
 
6
11
  function parseArgs(argv) {
7
12
  const args = { path: null };
@@ -15,11 +20,38 @@ function parseArgs(argv) {
15
20
  return args;
16
21
  }
17
22
 
23
+ async function copyDir(src, dest) {
24
+ await fs.mkdir(dest, { recursive: true });
25
+ const entries = await fs.readdir(src, { withFileTypes: true });
26
+ for (const entry of entries) {
27
+ const srcPath = path.join(src, entry.name);
28
+ const destPath = path.join(dest, entry.name);
29
+ if (entry.isDirectory()) {
30
+ await copyDir(srcPath, destPath);
31
+ } else {
32
+ await fs.copyFile(srcPath, destPath);
33
+ }
34
+ }
35
+ }
36
+
18
37
  async function main() {
19
38
  const args = parseArgs(process.argv.slice(2));
20
- const { installed } = await installSkills({ targetRoot: args.path ?? undefined });
21
- for (const skill of installed) {
22
- console.log(`installed ${skill.name} -> ${skill.dest}`);
39
+ const targetRoot =
40
+ args.path ?? path.join(process.env.CODEX_HOME ?? path.join(os.homedir(), ".codex"), "skills");
41
+
42
+ await fs.mkdir(targetRoot, { recursive: true });
43
+ const skillEntries = await fs.readdir(skillsRoot, { withFileTypes: true });
44
+
45
+ for (const entry of skillEntries) {
46
+ if (!entry.isDirectory()) {
47
+ continue;
48
+ }
49
+
50
+ const src = path.join(skillsRoot, entry.name);
51
+ const dest = path.join(targetRoot, entry.name);
52
+ await fs.rm(dest, { recursive: true, force: true });
53
+ await copyDir(src, dest);
54
+ console.log(`installed ${entry.name} -> ${dest}`);
23
55
  }
24
56
  }
25
57
 
@@ -50,7 +50,7 @@ async function main() {
50
50
  skills.sort((left, right) => left.name.localeCompare(right.name));
51
51
  await fs.writeFile(
52
52
  manifestPath,
53
- `${JSON.stringify({ schemaVersion: "0.1.0", skills }, null, 2)}\n`,
53
+ `${JSON.stringify({ schemaVersion: "1.0.0", skills }, null, 2)}\n`,
54
54
  );
55
55
  console.log(manifestPath);
56
56
  }
@@ -6,113 +6,75 @@ import process from "node:process";
6
6
 
7
7
  const repoRoot = process.cwd();
8
8
  const skillsRoot = path.join(repoRoot, "skills");
9
+ const namePattern = /^[a-z0-9-]+$/;
9
10
 
10
- function fail(message) {
11
- console.error(message);
12
- process.exitCode = 1;
13
- }
14
-
15
- function extractFrontmatter(content) {
16
- const match = content.match(/^---\n([\s\S]*?)\n---\n?/);
11
+ function parseFrontmatter(content) {
12
+ const match = content.match(/^---\n([\s\S]*?)\n---/);
17
13
  if (!match) {
18
- return null;
14
+ throw new Error("Missing YAML frontmatter");
19
15
  }
20
16
 
21
- const yaml = match[1];
22
- const result = {};
23
-
24
- for (const rawLine of yaml.split("\n")) {
25
- const line = rawLine.trim();
26
- if (!line || line.startsWith("#")) {
27
- continue;
28
- }
29
-
17
+ const lines = match[1].split("\n");
18
+ const fields = {};
19
+ for (const line of lines) {
30
20
  const separator = line.indexOf(":");
31
21
  if (separator === -1) {
32
22
  continue;
33
23
  }
34
-
35
24
  const key = line.slice(0, separator).trim();
36
- let value = line.slice(separator + 1).trim();
37
-
38
- if (
39
- (value.startsWith('"') && value.endsWith('"')) ||
40
- (value.startsWith("'") && value.endsWith("'"))
41
- ) {
42
- value = value.slice(1, -1);
43
- }
44
-
45
- result[key] = value;
25
+ const value = line
26
+ .slice(separator + 1)
27
+ .trim()
28
+ .replace(/^"|"$/g, "");
29
+ fields[key] = value;
46
30
  }
47
31
 
48
- return result;
32
+ return fields;
49
33
  }
50
34
 
51
35
  async function validateSkillDir(skillDir) {
52
- const skillName = path.basename(skillDir);
53
- const skillPath = path.join(skillDir, "SKILL.md");
54
- const agentPath = path.join(skillDir, "agents", "openai.yaml");
55
-
56
- const skillContent = await fs.readFile(skillPath, "utf8").catch(() => null);
57
- if (!skillContent) {
58
- throw new Error(`${skillName}: missing SKILL.md`);
59
- }
60
-
61
- const frontmatter = extractFrontmatter(skillContent);
62
- if (!frontmatter) {
63
- throw new Error(`${skillName}: SKILL.md missing frontmatter`);
64
- }
65
-
66
- if (!frontmatter.name) {
67
- throw new Error(`${skillName}: frontmatter missing name`);
68
- }
69
-
70
- if (frontmatter.name !== skillName) {
71
- throw new Error(`${skillName}: frontmatter name must match directory name`);
72
- }
73
-
74
- if (!/^[a-z0-9-]+$/.test(frontmatter.name)) {
75
- throw new Error(`${skillName}: frontmatter name must be lowercase kebab-case`);
76
- }
36
+ const skillMdPath = path.join(skillDir, "SKILL.md");
37
+ const skillMd = await fs.readFile(skillMdPath, "utf8");
38
+ const frontmatter = parseFrontmatter(skillMd);
77
39
 
78
- if (!frontmatter.description || frontmatter.description.length < 10) {
79
- throw new Error(`${skillName}: frontmatter description is missing or too short`);
40
+ if (!frontmatter.name || !namePattern.test(frontmatter.name)) {
41
+ throw new Error("Invalid or missing frontmatter name");
80
42
  }
81
43
 
82
- const agentContent = await fs.readFile(agentPath, "utf8").catch(() => null);
83
- if (!agentContent) {
84
- throw new Error(`${skillName}: missing agents/openai.yaml`);
44
+ if (!frontmatter.description) {
45
+ throw new Error("Missing frontmatter description");
85
46
  }
86
47
 
87
- const requiredAgentKeys = [
88
- "interface:",
89
- "display_name:",
90
- "short_description:",
91
- "default_prompt:",
92
- ];
48
+ const openaiYaml = path.join(skillDir, "agents", "openai.yaml");
49
+ await fs.access(openaiYaml);
50
+ const yamlContent = await fs.readFile(openaiYaml, "utf8");
93
51
 
94
- for (const key of requiredAgentKeys) {
95
- if (!agentContent.includes(key)) {
96
- throw new Error(`${skillName}: agents/openai.yaml missing ${key}`);
52
+ for (const required of ["interface:", "display_name:", "short_description:", "default_prompt:"]) {
53
+ if (!yamlContent.includes(required)) {
54
+ throw new Error(`Invalid agents/openai.yaml: missing ${required}`);
97
55
  }
98
56
  }
99
-
100
- console.log(`${skillName}: valid`);
101
57
  }
102
58
 
103
59
  async function main() {
104
60
  const entries = await fs.readdir(skillsRoot, { withFileTypes: true });
105
- const directories = entries.filter((entry) => entry.isDirectory());
106
-
107
- if (directories.length === 0) {
108
- throw new Error("No skill directories found in skills/");
109
- }
61
+ for (const entry of entries) {
62
+ if (!entry.isDirectory()) {
63
+ continue;
64
+ }
110
65
 
111
- for (const entry of directories) {
112
- await validateSkillDir(path.join(skillsRoot, entry.name));
66
+ const skillDir = path.join(skillsRoot, entry.name);
67
+ try {
68
+ await validateSkillDir(skillDir);
69
+ console.log("Skill is valid!");
70
+ } catch (error) {
71
+ console.error(`[ERROR] ${entry.name}: ${error.message}`);
72
+ process.exit(1);
73
+ }
113
74
  }
114
75
  }
115
76
 
116
77
  main().catch((error) => {
117
- fail(error.message);
78
+ console.error(error.message);
79
+ process.exitCode = 1;
118
80
  });
package/skills/index.json CHANGED
@@ -1,40 +1,40 @@
1
1
  {
2
- "schemaVersion": "0.1.0",
2
+ "schemaVersion": "1.0.0",
3
3
  "skills": [
4
4
  {
5
- "name": "arch",
6
- "path": "skills/arch",
7
- "description": "Use when the user wants architecture-first product and system design with explicit stack rationale, boundaries, tradeoffs, data model choices, and phased delivery planning."
5
+ "name": "meta-architect",
6
+ "path": "skills/meta-architect",
7
+ "description": "Use when Codex needs the full Meta-Architect runtime layer in this repo: architecture, evidence, logic, security, experience, and build workflows operating through skill tags inside Codex. Trigger for requests about Meta-Architect orchestration, build gating, GitMCP-backed evidence, branch/worktree planning, or releasing through `development` and `prod`."
8
8
  },
9
9
  {
10
- "name": "build",
11
- "path": "skills/build",
12
- "description": "Use when the user wants to decide whether implementation is ready, what remains blocked, and what the exact next build step should be."
10
+ "name": "meta-architect-arch",
11
+ "path": "skills/meta-architect-arch",
12
+ "description": "Use when Codex needs to run or explain the Meta-Architect `$arch` lane for architecture, stack rationale, subsystem layout, and blueprint decisions. Trigger for requests about architecture design inside a Meta-Architect-managed repo or for producing the first design artifact after the idea is captured."
13
13
  },
14
14
  {
15
- "name": "flow",
16
- "path": "skills/flow",
17
- "description": "Use when the user wants logic validation: states, transitions, invariants, edge cases, dead ends, and blockers before implementation."
15
+ "name": "meta-architect-build",
16
+ "path": "skills/meta-architect-build",
17
+ "description": "Use when Codex needs to run or inspect the Meta-Architect `$build` lane for gate evaluation, branch suggestions, worktree planning, and build readiness. Trigger for requests about whether the build is unlocked, which gate is blocking, or what feature branches and worktree commands should be used next."
18
18
  },
19
19
  {
20
- "name": "meta-architect",
21
- "path": "skills/meta-architect",
22
- "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."
20
+ "name": "meta-architect-flow",
21
+ "path": "skills/meta-architect-flow",
22
+ "description": "Use when Codex needs to run or inspect the Meta-Architect `$flow` lane for business logic, state transitions, and blockers. Trigger for requests about logic maps, dead ends, state validation, or whether the workflow is ready to proceed to security review."
23
23
  },
24
24
  {
25
- "name": "sage",
26
- "path": "skills/sage",
27
- "description": "Use when the user wants evidence-backed technology choices, OSS evaluation, and source-grounded validation of the stack proposed in `$arch`."
25
+ "name": "meta-architect-sage",
26
+ "path": "skills/meta-architect-sage",
27
+ "description": "Use when Codex needs to run or inspect the Meta-Architect `$sage` lane for OSS evidence binding through GitMCP and MCP. Trigger for requests about verifying repos, collecting evidence from configured GitMCP endpoints, or checking whether a recommendation is VERIFIED, PARTIAL, or MISSING."
28
28
  },
29
29
  {
30
- "name": "vet",
31
- "path": "skills/vet",
32
- "description": "Use when the user wants a security and trust-boundary review of the current design before implementation or release."
30
+ "name": "meta-architect-vet",
31
+ "path": "skills/meta-architect-vet",
32
+ "description": "Use when Codex needs to run or inspect the Meta-Architect `$vet` lane for security review, risk logging, and CVE-style findings. Trigger for requests about security posture, safer alternatives, audit evidence, or whether the build should stay blocked on security grounds."
33
33
  },
34
34
  {
35
- "name": "vibe",
36
- "path": "skills/vibe",
37
- "description": "Use when the user wants a DX and UX review of the planned workflow before implementation proceeds."
35
+ "name": "meta-architect-vibe",
36
+ "path": "skills/meta-architect-vibe",
37
+ "description": "Use when Codex needs to run or inspect the Meta-Architect `$vibe` lane for developer-experience and user-experience review before build execution. Trigger for requests about DX friction, UX risks, operator flow quality, or whether the experience gate should be GREEN or WAIVED."
38
38
  }
39
39
  ]
40
40
  }