@josstei/maestro 1.6.4-rc.1

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 (655) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/CHANGELOG.md +485 -0
  3. package/EXAMPLES.md +255 -0
  4. package/GEMINI.md +231 -0
  5. package/LICENSE +201 -0
  6. package/QWEN.md +241 -0
  7. package/README.md +220 -0
  8. package/agents/accessibility_specialist.md +20 -0
  9. package/agents/analytics_engineer.md +22 -0
  10. package/agents/api_designer.md +19 -0
  11. package/agents/architect.md +19 -0
  12. package/agents/cloud_architect.md +19 -0
  13. package/agents/cobol_engineer.md +22 -0
  14. package/agents/code_reviewer.md +17 -0
  15. package/agents/coder.md +22 -0
  16. package/agents/compliance_reviewer.md +19 -0
  17. package/agents/content_strategist.md +19 -0
  18. package/agents/copywriter.md +19 -0
  19. package/agents/data_engineer.md +22 -0
  20. package/agents/database_administrator.md +21 -0
  21. package/agents/db2_dba.md +21 -0
  22. package/agents/debugger.md +19 -0
  23. package/agents/design_system_engineer.md +22 -0
  24. package/agents/devops_engineer.md +23 -0
  25. package/agents/hlasm_assembler_specialist.md +22 -0
  26. package/agents/i18n_specialist.md +21 -0
  27. package/agents/ibm_i_specialist.md +22 -0
  28. package/agents/integration_engineer.md +23 -0
  29. package/agents/ml_engineer.md +23 -0
  30. package/agents/mlops_engineer.md +23 -0
  31. package/agents/mobile_engineer.md +23 -0
  32. package/agents/observability_engineer.md +23 -0
  33. package/agents/performance_engineer.md +21 -0
  34. package/agents/platform_engineer.md +24 -0
  35. package/agents/product_manager.md +20 -0
  36. package/agents/prompt_engineer.md +22 -0
  37. package/agents/refactor.md +22 -0
  38. package/agents/release_manager.md +22 -0
  39. package/agents/security_engineer.md +21 -0
  40. package/agents/seo_specialist.md +21 -0
  41. package/agents/site_reliability_engineer.md +21 -0
  42. package/agents/solutions_architect.md +19 -0
  43. package/agents/technical_writer.md +21 -0
  44. package/agents/tester.md +23 -0
  45. package/agents/ux_designer.md +20 -0
  46. package/agents/zos_sysprog.md +21 -0
  47. package/bin/maestro-mcp-server.js +10 -0
  48. package/claude/.claude-plugin/plugin.json +21 -0
  49. package/claude/.mcp.json +11 -0
  50. package/claude/README.md +191 -0
  51. package/claude/agents/accessibility-specialist.md +36 -0
  52. package/claude/agents/analytics-engineer.md +38 -0
  53. package/claude/agents/api-designer.md +33 -0
  54. package/claude/agents/architect.md +33 -0
  55. package/claude/agents/cloud-architect.md +33 -0
  56. package/claude/agents/cobol-engineer.md +38 -0
  57. package/claude/agents/code-reviewer.md +31 -0
  58. package/claude/agents/coder.md +38 -0
  59. package/claude/agents/compliance-reviewer.md +33 -0
  60. package/claude/agents/content-strategist.md +33 -0
  61. package/claude/agents/copywriter.md +33 -0
  62. package/claude/agents/data-engineer.md +37 -0
  63. package/claude/agents/database-administrator.md +37 -0
  64. package/claude/agents/db2-dba.md +37 -0
  65. package/claude/agents/debugger.md +32 -0
  66. package/claude/agents/design-system-engineer.md +38 -0
  67. package/claude/agents/devops-engineer.md +39 -0
  68. package/claude/agents/hlasm-assembler-specialist.md +38 -0
  69. package/claude/agents/i18n-specialist.md +37 -0
  70. package/claude/agents/ibm-i-specialist.md +38 -0
  71. package/claude/agents/integration-engineer.md +39 -0
  72. package/claude/agents/ml-engineer.md +39 -0
  73. package/claude/agents/mlops-engineer.md +39 -0
  74. package/claude/agents/mobile-engineer.md +39 -0
  75. package/claude/agents/observability-engineer.md +39 -0
  76. package/claude/agents/performance-engineer.md +34 -0
  77. package/claude/agents/platform-engineer.md +40 -0
  78. package/claude/agents/product-manager.md +34 -0
  79. package/claude/agents/prompt-engineer.md +38 -0
  80. package/claude/agents/refactor.md +38 -0
  81. package/claude/agents/release-manager.md +38 -0
  82. package/claude/agents/security-engineer.md +37 -0
  83. package/claude/agents/seo-specialist.md +37 -0
  84. package/claude/agents/site-reliability-engineer.md +37 -0
  85. package/claude/agents/solutions-architect.md +33 -0
  86. package/claude/agents/technical-writer.md +37 -0
  87. package/claude/agents/tester.md +39 -0
  88. package/claude/agents/ux-designer.md +34 -0
  89. package/claude/agents/zos-sysprog.md +37 -0
  90. package/claude/hooks/claude-hooks.json +48 -0
  91. package/claude/mcp/maestro-server.js +9 -0
  92. package/claude/mcp-config.example.json +9 -0
  93. package/claude/scripts/adapters/claude-adapter.js +7 -0
  94. package/claude/scripts/hook-runner.js +8 -0
  95. package/claude/scripts/policy-enforcer.js +294 -0
  96. package/claude/skills/a11y-audit/SKILL.md +26 -0
  97. package/claude/skills/archive/SKILL.md +24 -0
  98. package/claude/skills/code-review/SKILL.md +7 -0
  99. package/claude/skills/compliance-check/SKILL.md +26 -0
  100. package/claude/skills/debug-workflow/SKILL.md +27 -0
  101. package/claude/skills/delegation/SKILL.md +7 -0
  102. package/claude/skills/design-dialogue/SKILL.md +7 -0
  103. package/claude/skills/execute/SKILL.md +38 -0
  104. package/claude/skills/execution/SKILL.md +7 -0
  105. package/claude/skills/implementation-planning/SKILL.md +7 -0
  106. package/claude/skills/orchestrate/SKILL.md +38 -0
  107. package/claude/skills/perf-check/SKILL.md +26 -0
  108. package/claude/skills/resume-session/SKILL.md +38 -0
  109. package/claude/skills/review-code/SKILL.md +27 -0
  110. package/claude/skills/security-audit/SKILL.md +28 -0
  111. package/claude/skills/seo-audit/SKILL.md +26 -0
  112. package/claude/skills/session-management/SKILL.md +7 -0
  113. package/claude/skills/status/SKILL.md +22 -0
  114. package/claude/skills/validation/SKILL.md +7 -0
  115. package/claude/src/agents/accessibility-specialist.md +163 -0
  116. package/claude/src/agents/analytics-engineer.md +182 -0
  117. package/claude/src/agents/api-designer.md +124 -0
  118. package/claude/src/agents/architect.md +120 -0
  119. package/claude/src/agents/cloud-architect.md +134 -0
  120. package/claude/src/agents/cobol-engineer.md +127 -0
  121. package/claude/src/agents/code-reviewer.md +123 -0
  122. package/claude/src/agents/coder.md +132 -0
  123. package/claude/src/agents/compliance-reviewer.md +219 -0
  124. package/claude/src/agents/content-strategist.md +111 -0
  125. package/claude/src/agents/copywriter.md +113 -0
  126. package/claude/src/agents/data-engineer.md +130 -0
  127. package/claude/src/agents/database-administrator.md +126 -0
  128. package/claude/src/agents/db2-dba.md +124 -0
  129. package/claude/src/agents/debugger.md +133 -0
  130. package/claude/src/agents/design-system-engineer.md +258 -0
  131. package/claude/src/agents/devops-engineer.md +138 -0
  132. package/claude/src/agents/hlasm-assembler-specialist.md +134 -0
  133. package/claude/src/agents/i18n-specialist.md +241 -0
  134. package/claude/src/agents/ibm-i-specialist.md +132 -0
  135. package/claude/src/agents/integration-engineer.md +133 -0
  136. package/claude/src/agents/ml-engineer.md +115 -0
  137. package/claude/src/agents/mlops-engineer.md +116 -0
  138. package/claude/src/agents/mobile-engineer.md +115 -0
  139. package/claude/src/agents/observability-engineer.md +133 -0
  140. package/claude/src/agents/performance-engineer.md +139 -0
  141. package/claude/src/agents/platform-engineer.md +129 -0
  142. package/claude/src/agents/product-manager.md +170 -0
  143. package/claude/src/agents/prompt-engineer.md +129 -0
  144. package/claude/src/agents/refactor.md +138 -0
  145. package/claude/src/agents/release-manager.md +132 -0
  146. package/claude/src/agents/security-engineer.md +143 -0
  147. package/claude/src/agents/seo-specialist.md +129 -0
  148. package/claude/src/agents/site-reliability-engineer.md +131 -0
  149. package/claude/src/agents/solutions-architect.md +137 -0
  150. package/claude/src/agents/technical-writer.md +129 -0
  151. package/claude/src/agents/tester.md +135 -0
  152. package/claude/src/agents/ux-designer.md +168 -0
  153. package/claude/src/agents/zos-sysprog.md +134 -0
  154. package/claude/src/config/setting-resolver.js +32 -0
  155. package/claude/src/core/agent-registry.js +67 -0
  156. package/claude/src/core/canonical-source.js +39 -0
  157. package/claude/src/core/env-file-parser.js +82 -0
  158. package/claude/src/core/feature-blocks.js +34 -0
  159. package/claude/src/core/logger.js +12 -0
  160. package/claude/src/core/markdown-state.js +36 -0
  161. package/claude/src/core/policy-rules.js +32 -0
  162. package/claude/src/core/project-root-resolver.js +184 -0
  163. package/claude/src/core/stdin-reader.js +77 -0
  164. package/claude/src/core/version.js +50 -0
  165. package/claude/src/entry-points/core-command-registry.js +37 -0
  166. package/claude/src/entry-points/preamble-builders.js +54 -0
  167. package/claude/src/entry-points/registry.js +199 -0
  168. package/claude/src/entry-points/templates/claude-core-command.md.tmpl +38 -0
  169. package/claude/src/entry-points/templates/claude-skill.md.tmpl +18 -0
  170. package/claude/src/entry-points/templates/codex-core-command.md.tmpl +16 -0
  171. package/claude/src/entry-points/templates/codex-skill.md.tmpl +11 -0
  172. package/claude/src/entry-points/templates/gemini-command.toml.tmpl +17 -0
  173. package/claude/src/entry-points/templates/gemini-core-command.toml.tmpl +30 -0
  174. package/claude/src/generated/agent-registry.json +630 -0
  175. package/claude/src/generated/hook-registry.json +18 -0
  176. package/claude/src/generated/resource-registry.json +16 -0
  177. package/claude/src/hooks/logic/after-agent-logic.js +54 -0
  178. package/claude/src/hooks/logic/before-agent-logic.js +57 -0
  179. package/claude/src/hooks/logic/hook-state.js +127 -0
  180. package/claude/src/hooks/logic/session-end-logic.js +17 -0
  181. package/claude/src/hooks/logic/session-start-logic.js +25 -0
  182. package/claude/src/lib/discovery/index.js +172 -0
  183. package/claude/src/lib/errors/index.js +104 -0
  184. package/claude/src/lib/framework-detection.js +50 -0
  185. package/claude/src/lib/frontmatter/index.js +262 -0
  186. package/claude/src/lib/io/index.js +96 -0
  187. package/claude/src/lib/naming/index.js +94 -0
  188. package/claude/src/lib/validation/index.js +124 -0
  189. package/claude/src/lib/yaml-emit.js +38 -0
  190. package/claude/src/mcp/content/provider.js +68 -0
  191. package/claude/src/mcp/content/runtime-content.js +188 -0
  192. package/claude/src/mcp/contracts/cache-path-rejector.js +39 -0
  193. package/claude/src/mcp/contracts/downstream-context.js +106 -0
  194. package/claude/src/mcp/contracts/plan-schema.js +148 -0
  195. package/claude/src/mcp/contracts/workspace-marker.js +61 -0
  196. package/claude/src/mcp/core/create-server.js +76 -0
  197. package/claude/src/mcp/core/line-reader.js +35 -0
  198. package/claude/src/mcp/core/project-root-cache.js +120 -0
  199. package/claude/src/mcp/core/protocol-dispatcher.js +274 -0
  200. package/claude/src/mcp/core/recovery-hints.js +43 -0
  201. package/claude/src/mcp/core/tool-outcome.js +77 -0
  202. package/claude/src/mcp/core/tool-registry.js +82 -0
  203. package/claude/src/mcp/handlers/assess-task-complexity.js +108 -0
  204. package/claude/src/mcp/handlers/blocker-parser.js +34 -0
  205. package/claude/src/mcp/handlers/design-gate.js +393 -0
  206. package/claude/src/mcp/handlers/get-agent.js +54 -0
  207. package/claude/src/mcp/handlers/get-runtime-context.js +49 -0
  208. package/claude/src/mcp/handlers/get-skill-content.js +51 -0
  209. package/claude/src/mcp/handlers/initialize-workspace.js +45 -0
  210. package/claude/src/mcp/handlers/reconciliation.js +224 -0
  211. package/claude/src/mcp/handlers/resolve-settings.js +39 -0
  212. package/claude/src/mcp/handlers/session-state-core.js +108 -0
  213. package/claude/src/mcp/handlers/session-state-tools.js +562 -0
  214. package/claude/src/mcp/handlers/validate-plan.js +76 -0
  215. package/claude/src/mcp/maestro-server.js +122 -0
  216. package/claude/src/mcp/runtime/runtime-config-map.js +70 -0
  217. package/claude/src/mcp/tool-packs/content/index.js +80 -0
  218. package/claude/src/mcp/tool-packs/contracts.js +30 -0
  219. package/claude/src/mcp/tool-packs/index.js +15 -0
  220. package/claude/src/mcp/tool-packs/session/index.js +243 -0
  221. package/claude/src/mcp/tool-packs/workspace/index.js +98 -0
  222. package/claude/src/mcp/utils/extension-root.js +31 -0
  223. package/claude/src/mcp/validation/agent-checker.js +81 -0
  224. package/claude/src/mcp/validation/dag-checker.js +214 -0
  225. package/claude/src/mcp/validation/file-overlap-checker.js +63 -0
  226. package/claude/src/mcp/validation/schema-checker.js +108 -0
  227. package/claude/src/platforms/claude/runtime-config.js +60 -0
  228. package/claude/src/platforms/shared/adapters/claude-adapter.js +36 -0
  229. package/claude/src/platforms/shared/adapters/conventions.js +29 -0
  230. package/claude/src/platforms/shared/adapters/exit-codes.js +6 -0
  231. package/claude/src/platforms/shared/adapters/factory.js +40 -0
  232. package/claude/src/platforms/shared/agent-names.js +10 -0
  233. package/claude/src/platforms/shared/hook-runner.js +52 -0
  234. package/claude/src/references/architecture.md +139 -0
  235. package/claude/src/references/orchestration-steps.md +193 -0
  236. package/claude/src/skills/shared/code-review/SKILL.md +145 -0
  237. package/claude/src/skills/shared/delegation/SKILL.md +370 -0
  238. package/claude/src/skills/shared/delegation/protocols/agent-base-protocol.md +145 -0
  239. package/claude/src/skills/shared/delegation/protocols/filesystem-safety-protocol.md +31 -0
  240. package/claude/src/skills/shared/design-dialogue/SKILL.md +284 -0
  241. package/claude/src/skills/shared/execution/SKILL.md +258 -0
  242. package/claude/src/skills/shared/implementation-planning/SKILL.md +303 -0
  243. package/claude/src/skills/shared/session-management/SKILL.md +314 -0
  244. package/claude/src/skills/shared/validation/SKILL.md +204 -0
  245. package/claude/src/state/session-state.js +113 -0
  246. package/claude/src/templates/design-document.md +95 -0
  247. package/claude/src/templates/implementation-plan.md +86 -0
  248. package/claude/src/templates/session-state.md +68 -0
  249. package/claude/src/version.json +3 -0
  250. package/commands/maestro/a11y-audit.toml +22 -0
  251. package/commands/maestro/archive.toml +23 -0
  252. package/commands/maestro/compliance-check.toml +22 -0
  253. package/commands/maestro/debug.toml +23 -0
  254. package/commands/maestro/execute.toml +30 -0
  255. package/commands/maestro/orchestrate.toml +30 -0
  256. package/commands/maestro/perf-check.toml +22 -0
  257. package/commands/maestro/resume.toml +38 -0
  258. package/commands/maestro/review.toml +23 -0
  259. package/commands/maestro/security-audit.toml +24 -0
  260. package/commands/maestro/seo-audit.toml +22 -0
  261. package/commands/maestro/status.toml +21 -0
  262. package/docs/architecture.md +310 -0
  263. package/docs/cicd.md +647 -0
  264. package/docs/flow.md +255 -0
  265. package/docs/maestro-cheatsheet.md +199 -0
  266. package/docs/overview.md +141 -0
  267. package/docs/runtime-claude.md +190 -0
  268. package/docs/runtime-codex.md +197 -0
  269. package/docs/runtime-gemini.md +170 -0
  270. package/docs/runtime-qwen.md +147 -0
  271. package/docs/usage.md +312 -0
  272. package/gemini-extension.json +55 -0
  273. package/hooks/adapters/gemini-adapter.js +2 -0
  274. package/hooks/adapters/qwen-adapter.js +2 -0
  275. package/hooks/hook-runner.js +3 -0
  276. package/hooks/hooks.json +56 -0
  277. package/mcp/maestro-server.js +4 -0
  278. package/package.json +93 -0
  279. package/plugins/maestro/.app.json +3 -0
  280. package/plugins/maestro/.codex-plugin/plugin.json +41 -0
  281. package/plugins/maestro/.mcp.json +16 -0
  282. package/plugins/maestro/README.md +57 -0
  283. package/plugins/maestro/references/runtime-guide.md +125 -0
  284. package/plugins/maestro/skills/a11y-audit/SKILL.md +16 -0
  285. package/plugins/maestro/skills/archive/SKILL.md +16 -0
  286. package/plugins/maestro/skills/code-review/SKILL.md +6 -0
  287. package/plugins/maestro/skills/compliance-check/SKILL.md +16 -0
  288. package/plugins/maestro/skills/debug-workflow/SKILL.md +16 -0
  289. package/plugins/maestro/skills/delegation/SKILL.md +6 -0
  290. package/plugins/maestro/skills/design-dialogue/SKILL.md +6 -0
  291. package/plugins/maestro/skills/execute/SKILL.md +16 -0
  292. package/plugins/maestro/skills/execution/SKILL.md +6 -0
  293. package/plugins/maestro/skills/implementation-planning/SKILL.md +6 -0
  294. package/plugins/maestro/skills/orchestrate/SKILL.md +16 -0
  295. package/plugins/maestro/skills/perf-check/SKILL.md +16 -0
  296. package/plugins/maestro/skills/resume-session/SKILL.md +16 -0
  297. package/plugins/maestro/skills/review-code/SKILL.md +16 -0
  298. package/plugins/maestro/skills/security-audit/SKILL.md +16 -0
  299. package/plugins/maestro/skills/seo-audit/SKILL.md +16 -0
  300. package/plugins/maestro/skills/session-management/SKILL.md +6 -0
  301. package/plugins/maestro/skills/status/SKILL.md +14 -0
  302. package/plugins/maestro/skills/validation/SKILL.md +6 -0
  303. package/plugins/maestro/src/agents/accessibility-specialist.md +163 -0
  304. package/plugins/maestro/src/agents/analytics-engineer.md +182 -0
  305. package/plugins/maestro/src/agents/api-designer.md +124 -0
  306. package/plugins/maestro/src/agents/architect.md +120 -0
  307. package/plugins/maestro/src/agents/cloud-architect.md +134 -0
  308. package/plugins/maestro/src/agents/cobol-engineer.md +127 -0
  309. package/plugins/maestro/src/agents/code-reviewer.md +123 -0
  310. package/plugins/maestro/src/agents/coder.md +132 -0
  311. package/plugins/maestro/src/agents/compliance-reviewer.md +219 -0
  312. package/plugins/maestro/src/agents/content-strategist.md +111 -0
  313. package/plugins/maestro/src/agents/copywriter.md +113 -0
  314. package/plugins/maestro/src/agents/data-engineer.md +130 -0
  315. package/plugins/maestro/src/agents/database-administrator.md +126 -0
  316. package/plugins/maestro/src/agents/db2-dba.md +124 -0
  317. package/plugins/maestro/src/agents/debugger.md +133 -0
  318. package/plugins/maestro/src/agents/design-system-engineer.md +258 -0
  319. package/plugins/maestro/src/agents/devops-engineer.md +138 -0
  320. package/plugins/maestro/src/agents/hlasm-assembler-specialist.md +134 -0
  321. package/plugins/maestro/src/agents/i18n-specialist.md +241 -0
  322. package/plugins/maestro/src/agents/ibm-i-specialist.md +132 -0
  323. package/plugins/maestro/src/agents/integration-engineer.md +133 -0
  324. package/plugins/maestro/src/agents/ml-engineer.md +115 -0
  325. package/plugins/maestro/src/agents/mlops-engineer.md +116 -0
  326. package/plugins/maestro/src/agents/mobile-engineer.md +115 -0
  327. package/plugins/maestro/src/agents/observability-engineer.md +133 -0
  328. package/plugins/maestro/src/agents/performance-engineer.md +139 -0
  329. package/plugins/maestro/src/agents/platform-engineer.md +129 -0
  330. package/plugins/maestro/src/agents/product-manager.md +170 -0
  331. package/plugins/maestro/src/agents/prompt-engineer.md +129 -0
  332. package/plugins/maestro/src/agents/refactor.md +138 -0
  333. package/plugins/maestro/src/agents/release-manager.md +132 -0
  334. package/plugins/maestro/src/agents/security-engineer.md +143 -0
  335. package/plugins/maestro/src/agents/seo-specialist.md +129 -0
  336. package/plugins/maestro/src/agents/site-reliability-engineer.md +131 -0
  337. package/plugins/maestro/src/agents/solutions-architect.md +137 -0
  338. package/plugins/maestro/src/agents/technical-writer.md +129 -0
  339. package/plugins/maestro/src/agents/tester.md +135 -0
  340. package/plugins/maestro/src/agents/ux-designer.md +168 -0
  341. package/plugins/maestro/src/agents/zos-sysprog.md +134 -0
  342. package/plugins/maestro/src/config/setting-resolver.js +32 -0
  343. package/plugins/maestro/src/core/agent-registry.js +67 -0
  344. package/plugins/maestro/src/core/canonical-source.js +39 -0
  345. package/plugins/maestro/src/core/env-file-parser.js +82 -0
  346. package/plugins/maestro/src/core/feature-blocks.js +34 -0
  347. package/plugins/maestro/src/core/logger.js +12 -0
  348. package/plugins/maestro/src/core/markdown-state.js +36 -0
  349. package/plugins/maestro/src/core/policy-rules.js +32 -0
  350. package/plugins/maestro/src/core/project-root-resolver.js +184 -0
  351. package/plugins/maestro/src/core/stdin-reader.js +77 -0
  352. package/plugins/maestro/src/core/version.js +50 -0
  353. package/plugins/maestro/src/entry-points/core-command-registry.js +37 -0
  354. package/plugins/maestro/src/entry-points/preamble-builders.js +54 -0
  355. package/plugins/maestro/src/entry-points/registry.js +199 -0
  356. package/plugins/maestro/src/entry-points/templates/claude-core-command.md.tmpl +38 -0
  357. package/plugins/maestro/src/entry-points/templates/claude-skill.md.tmpl +18 -0
  358. package/plugins/maestro/src/entry-points/templates/codex-core-command.md.tmpl +16 -0
  359. package/plugins/maestro/src/entry-points/templates/codex-skill.md.tmpl +11 -0
  360. package/plugins/maestro/src/entry-points/templates/gemini-command.toml.tmpl +17 -0
  361. package/plugins/maestro/src/entry-points/templates/gemini-core-command.toml.tmpl +30 -0
  362. package/plugins/maestro/src/generated/agent-registry.json +630 -0
  363. package/plugins/maestro/src/generated/hook-registry.json +18 -0
  364. package/plugins/maestro/src/generated/resource-registry.json +16 -0
  365. package/plugins/maestro/src/hooks/logic/after-agent-logic.js +54 -0
  366. package/plugins/maestro/src/hooks/logic/before-agent-logic.js +57 -0
  367. package/plugins/maestro/src/hooks/logic/hook-state.js +127 -0
  368. package/plugins/maestro/src/hooks/logic/session-end-logic.js +17 -0
  369. package/plugins/maestro/src/hooks/logic/session-start-logic.js +25 -0
  370. package/plugins/maestro/src/lib/discovery/index.js +172 -0
  371. package/plugins/maestro/src/lib/errors/index.js +104 -0
  372. package/plugins/maestro/src/lib/framework-detection.js +50 -0
  373. package/plugins/maestro/src/lib/frontmatter/index.js +262 -0
  374. package/plugins/maestro/src/lib/io/index.js +96 -0
  375. package/plugins/maestro/src/lib/naming/index.js +94 -0
  376. package/plugins/maestro/src/lib/validation/index.js +124 -0
  377. package/plugins/maestro/src/lib/yaml-emit.js +38 -0
  378. package/plugins/maestro/src/mcp/content/provider.js +68 -0
  379. package/plugins/maestro/src/mcp/content/runtime-content.js +188 -0
  380. package/plugins/maestro/src/mcp/contracts/cache-path-rejector.js +39 -0
  381. package/plugins/maestro/src/mcp/contracts/downstream-context.js +106 -0
  382. package/plugins/maestro/src/mcp/contracts/plan-schema.js +148 -0
  383. package/plugins/maestro/src/mcp/contracts/workspace-marker.js +61 -0
  384. package/plugins/maestro/src/mcp/core/create-server.js +76 -0
  385. package/plugins/maestro/src/mcp/core/line-reader.js +35 -0
  386. package/plugins/maestro/src/mcp/core/project-root-cache.js +120 -0
  387. package/plugins/maestro/src/mcp/core/protocol-dispatcher.js +274 -0
  388. package/plugins/maestro/src/mcp/core/recovery-hints.js +43 -0
  389. package/plugins/maestro/src/mcp/core/tool-outcome.js +77 -0
  390. package/plugins/maestro/src/mcp/core/tool-registry.js +82 -0
  391. package/plugins/maestro/src/mcp/handlers/assess-task-complexity.js +108 -0
  392. package/plugins/maestro/src/mcp/handlers/blocker-parser.js +34 -0
  393. package/plugins/maestro/src/mcp/handlers/design-gate.js +393 -0
  394. package/plugins/maestro/src/mcp/handlers/get-agent.js +54 -0
  395. package/plugins/maestro/src/mcp/handlers/get-runtime-context.js +49 -0
  396. package/plugins/maestro/src/mcp/handlers/get-skill-content.js +51 -0
  397. package/plugins/maestro/src/mcp/handlers/initialize-workspace.js +45 -0
  398. package/plugins/maestro/src/mcp/handlers/reconciliation.js +224 -0
  399. package/plugins/maestro/src/mcp/handlers/resolve-settings.js +39 -0
  400. package/plugins/maestro/src/mcp/handlers/session-state-core.js +108 -0
  401. package/plugins/maestro/src/mcp/handlers/session-state-tools.js +562 -0
  402. package/plugins/maestro/src/mcp/handlers/validate-plan.js +76 -0
  403. package/plugins/maestro/src/mcp/maestro-server.js +122 -0
  404. package/plugins/maestro/src/mcp/runtime/runtime-config-map.js +70 -0
  405. package/plugins/maestro/src/mcp/tool-packs/content/index.js +80 -0
  406. package/plugins/maestro/src/mcp/tool-packs/contracts.js +30 -0
  407. package/plugins/maestro/src/mcp/tool-packs/index.js +15 -0
  408. package/plugins/maestro/src/mcp/tool-packs/session/index.js +243 -0
  409. package/plugins/maestro/src/mcp/tool-packs/workspace/index.js +98 -0
  410. package/plugins/maestro/src/mcp/utils/extension-root.js +31 -0
  411. package/plugins/maestro/src/mcp/validation/agent-checker.js +81 -0
  412. package/plugins/maestro/src/mcp/validation/dag-checker.js +214 -0
  413. package/plugins/maestro/src/mcp/validation/file-overlap-checker.js +63 -0
  414. package/plugins/maestro/src/mcp/validation/schema-checker.js +108 -0
  415. package/plugins/maestro/src/platforms/codex/runtime-config.js +58 -0
  416. package/plugins/maestro/src/platforms/shared/adapters/conventions.js +29 -0
  417. package/plugins/maestro/src/platforms/shared/adapters/exit-codes.js +6 -0
  418. package/plugins/maestro/src/platforms/shared/adapters/factory.js +40 -0
  419. package/plugins/maestro/src/platforms/shared/agent-names.js +10 -0
  420. package/plugins/maestro/src/platforms/shared/hook-runner.js +52 -0
  421. package/plugins/maestro/src/references/architecture.md +139 -0
  422. package/plugins/maestro/src/references/orchestration-steps.md +193 -0
  423. package/plugins/maestro/src/skills/shared/code-review/SKILL.md +145 -0
  424. package/plugins/maestro/src/skills/shared/delegation/SKILL.md +370 -0
  425. package/plugins/maestro/src/skills/shared/delegation/protocols/agent-base-protocol.md +145 -0
  426. package/plugins/maestro/src/skills/shared/delegation/protocols/filesystem-safety-protocol.md +31 -0
  427. package/plugins/maestro/src/skills/shared/design-dialogue/SKILL.md +284 -0
  428. package/plugins/maestro/src/skills/shared/execution/SKILL.md +258 -0
  429. package/plugins/maestro/src/skills/shared/implementation-planning/SKILL.md +303 -0
  430. package/plugins/maestro/src/skills/shared/session-management/SKILL.md +314 -0
  431. package/plugins/maestro/src/skills/shared/validation/SKILL.md +204 -0
  432. package/plugins/maestro/src/state/session-state.js +113 -0
  433. package/plugins/maestro/src/templates/design-document.md +95 -0
  434. package/plugins/maestro/src/templates/implementation-plan.md +86 -0
  435. package/plugins/maestro/src/templates/session-state.md +68 -0
  436. package/plugins/maestro/src/version.json +3 -0
  437. package/policies/maestro.toml +44 -0
  438. package/qwen/agents/accessibility_specialist.md +18 -0
  439. package/qwen/agents/analytics_engineer.md +20 -0
  440. package/qwen/agents/api_designer.md +17 -0
  441. package/qwen/agents/architect.md +17 -0
  442. package/qwen/agents/cloud_architect.md +17 -0
  443. package/qwen/agents/cobol_engineer.md +20 -0
  444. package/qwen/agents/code_reviewer.md +15 -0
  445. package/qwen/agents/coder.md +20 -0
  446. package/qwen/agents/compliance_reviewer.md +17 -0
  447. package/qwen/agents/content_strategist.md +17 -0
  448. package/qwen/agents/copywriter.md +17 -0
  449. package/qwen/agents/data_engineer.md +20 -0
  450. package/qwen/agents/database_administrator.md +19 -0
  451. package/qwen/agents/db2_dba.md +19 -0
  452. package/qwen/agents/debugger.md +17 -0
  453. package/qwen/agents/design_system_engineer.md +20 -0
  454. package/qwen/agents/devops_engineer.md +21 -0
  455. package/qwen/agents/hlasm_assembler_specialist.md +20 -0
  456. package/qwen/agents/i18n_specialist.md +19 -0
  457. package/qwen/agents/ibm_i_specialist.md +20 -0
  458. package/qwen/agents/integration_engineer.md +21 -0
  459. package/qwen/agents/ml_engineer.md +21 -0
  460. package/qwen/agents/mlops_engineer.md +21 -0
  461. package/qwen/agents/mobile_engineer.md +21 -0
  462. package/qwen/agents/observability_engineer.md +21 -0
  463. package/qwen/agents/performance_engineer.md +19 -0
  464. package/qwen/agents/platform_engineer.md +22 -0
  465. package/qwen/agents/product_manager.md +18 -0
  466. package/qwen/agents/prompt_engineer.md +20 -0
  467. package/qwen/agents/refactor.md +20 -0
  468. package/qwen/agents/release_manager.md +20 -0
  469. package/qwen/agents/security_engineer.md +19 -0
  470. package/qwen/agents/seo_specialist.md +19 -0
  471. package/qwen/agents/site_reliability_engineer.md +19 -0
  472. package/qwen/agents/solutions_architect.md +17 -0
  473. package/qwen/agents/technical_writer.md +19 -0
  474. package/qwen/agents/tester.md +21 -0
  475. package/qwen/agents/ux_designer.md +18 -0
  476. package/qwen/agents/zos_sysprog.md +19 -0
  477. package/qwen/hooks.json +56 -0
  478. package/qwen-extension.json +55 -0
  479. package/scripts/check-layer-boundaries.js +74 -0
  480. package/scripts/generate.js +155 -0
  481. package/scripts/install-codex-plugin.js +167 -0
  482. package/scripts/install-git-hooks.js +43 -0
  483. package/scripts/npm-publish-idempotent.js +150 -0
  484. package/scripts/package-release-artifacts.js +156 -0
  485. package/scripts/release-artifact-manifest.js +378 -0
  486. package/scripts/release-version-metadata.js +129 -0
  487. package/scripts/update-versions.js +33 -0
  488. package/scripts/verify-npm-pack.js +85 -0
  489. package/scripts/verify-release-artifacts.js +95 -0
  490. package/src/agents/accessibility-specialist.md +163 -0
  491. package/src/agents/analytics-engineer.md +182 -0
  492. package/src/agents/api-designer.md +124 -0
  493. package/src/agents/architect.md +120 -0
  494. package/src/agents/cloud-architect.md +134 -0
  495. package/src/agents/cobol-engineer.md +127 -0
  496. package/src/agents/code-reviewer.md +123 -0
  497. package/src/agents/coder.md +132 -0
  498. package/src/agents/compliance-reviewer.md +219 -0
  499. package/src/agents/content-strategist.md +111 -0
  500. package/src/agents/copywriter.md +113 -0
  501. package/src/agents/data-engineer.md +130 -0
  502. package/src/agents/database-administrator.md +126 -0
  503. package/src/agents/db2-dba.md +124 -0
  504. package/src/agents/debugger.md +133 -0
  505. package/src/agents/design-system-engineer.md +258 -0
  506. package/src/agents/devops-engineer.md +138 -0
  507. package/src/agents/hlasm-assembler-specialist.md +134 -0
  508. package/src/agents/i18n-specialist.md +241 -0
  509. package/src/agents/ibm-i-specialist.md +132 -0
  510. package/src/agents/integration-engineer.md +133 -0
  511. package/src/agents/ml-engineer.md +115 -0
  512. package/src/agents/mlops-engineer.md +116 -0
  513. package/src/agents/mobile-engineer.md +115 -0
  514. package/src/agents/observability-engineer.md +133 -0
  515. package/src/agents/performance-engineer.md +139 -0
  516. package/src/agents/platform-engineer.md +129 -0
  517. package/src/agents/product-manager.md +170 -0
  518. package/src/agents/prompt-engineer.md +129 -0
  519. package/src/agents/refactor.md +138 -0
  520. package/src/agents/release-manager.md +132 -0
  521. package/src/agents/security-engineer.md +143 -0
  522. package/src/agents/seo-specialist.md +129 -0
  523. package/src/agents/site-reliability-engineer.md +131 -0
  524. package/src/agents/solutions-architect.md +137 -0
  525. package/src/agents/technical-writer.md +129 -0
  526. package/src/agents/tester.md +135 -0
  527. package/src/agents/ux-designer.md +168 -0
  528. package/src/agents/zos-sysprog.md +134 -0
  529. package/src/config/setting-resolver.js +32 -0
  530. package/src/core/agent-registry.js +67 -0
  531. package/src/core/canonical-source.js +39 -0
  532. package/src/core/env-file-parser.js +82 -0
  533. package/src/core/feature-blocks.js +34 -0
  534. package/src/core/logger.js +12 -0
  535. package/src/core/markdown-state.js +36 -0
  536. package/src/core/policy-rules.js +32 -0
  537. package/src/core/project-root-resolver.js +184 -0
  538. package/src/core/stdin-reader.js +77 -0
  539. package/src/core/version.js +50 -0
  540. package/src/entry-points/core-command-registry.js +37 -0
  541. package/src/entry-points/preamble-builders.js +54 -0
  542. package/src/entry-points/registry.js +199 -0
  543. package/src/entry-points/templates/claude-core-command.md.tmpl +38 -0
  544. package/src/entry-points/templates/claude-skill.md.tmpl +18 -0
  545. package/src/entry-points/templates/codex-core-command.md.tmpl +16 -0
  546. package/src/entry-points/templates/codex-skill.md.tmpl +11 -0
  547. package/src/entry-points/templates/gemini-command.toml.tmpl +17 -0
  548. package/src/entry-points/templates/gemini-core-command.toml.tmpl +30 -0
  549. package/src/generated/agent-registry.json +630 -0
  550. package/src/generated/hook-registry.json +18 -0
  551. package/src/generated/resource-registry.json +16 -0
  552. package/src/generator/entry-point-expander.js +182 -0
  553. package/src/generator/file-writer.js +167 -0
  554. package/src/generator/generation-session.js +62 -0
  555. package/src/generator/manifest-curator.js +31 -0
  556. package/src/generator/manifest-expander.js +256 -0
  557. package/src/generator/payload-builder.js +217 -0
  558. package/src/generator/registry-scanner.js +130 -0
  559. package/src/generator/stale-pruner.js +101 -0
  560. package/src/hooks/logic/after-agent-logic.js +54 -0
  561. package/src/hooks/logic/before-agent-logic.js +57 -0
  562. package/src/hooks/logic/hook-state.js +127 -0
  563. package/src/hooks/logic/session-end-logic.js +17 -0
  564. package/src/hooks/logic/session-start-logic.js +25 -0
  565. package/src/lib/discovery/index.js +172 -0
  566. package/src/lib/errors/index.js +104 -0
  567. package/src/lib/framework-detection.js +50 -0
  568. package/src/lib/frontmatter/index.js +262 -0
  569. package/src/lib/io/index.js +96 -0
  570. package/src/lib/naming/index.js +94 -0
  571. package/src/lib/validation/index.js +124 -0
  572. package/src/lib/yaml-emit.js +38 -0
  573. package/src/manifest.js +11 -0
  574. package/src/mcp/content/provider.js +68 -0
  575. package/src/mcp/content/runtime-content.js +188 -0
  576. package/src/mcp/contracts/cache-path-rejector.js +39 -0
  577. package/src/mcp/contracts/downstream-context.js +106 -0
  578. package/src/mcp/contracts/plan-schema.js +148 -0
  579. package/src/mcp/contracts/workspace-marker.js +61 -0
  580. package/src/mcp/core/create-server.js +76 -0
  581. package/src/mcp/core/line-reader.js +35 -0
  582. package/src/mcp/core/project-root-cache.js +120 -0
  583. package/src/mcp/core/protocol-dispatcher.js +274 -0
  584. package/src/mcp/core/recovery-hints.js +43 -0
  585. package/src/mcp/core/tool-outcome.js +77 -0
  586. package/src/mcp/core/tool-registry.js +82 -0
  587. package/src/mcp/handlers/assess-task-complexity.js +108 -0
  588. package/src/mcp/handlers/blocker-parser.js +34 -0
  589. package/src/mcp/handlers/design-gate.js +393 -0
  590. package/src/mcp/handlers/get-agent.js +54 -0
  591. package/src/mcp/handlers/get-runtime-context.js +49 -0
  592. package/src/mcp/handlers/get-skill-content.js +51 -0
  593. package/src/mcp/handlers/initialize-workspace.js +45 -0
  594. package/src/mcp/handlers/reconciliation.js +224 -0
  595. package/src/mcp/handlers/resolve-settings.js +39 -0
  596. package/src/mcp/handlers/session-state-core.js +108 -0
  597. package/src/mcp/handlers/session-state-tools.js +562 -0
  598. package/src/mcp/handlers/validate-plan.js +76 -0
  599. package/src/mcp/maestro-server.js +122 -0
  600. package/src/mcp/runtime/runtime-config-map.js +70 -0
  601. package/src/mcp/tool-packs/content/index.js +80 -0
  602. package/src/mcp/tool-packs/contracts.js +30 -0
  603. package/src/mcp/tool-packs/index.js +15 -0
  604. package/src/mcp/tool-packs/session/index.js +243 -0
  605. package/src/mcp/tool-packs/workspace/index.js +98 -0
  606. package/src/mcp/utils/extension-root.js +31 -0
  607. package/src/mcp/validation/agent-checker.js +81 -0
  608. package/src/mcp/validation/dag-checker.js +214 -0
  609. package/src/mcp/validation/file-overlap-checker.js +63 -0
  610. package/src/mcp/validation/schema-checker.js +108 -0
  611. package/src/platforms/claude/metadata.js +96 -0
  612. package/src/platforms/claude/runtime-config.js +60 -0
  613. package/src/platforms/codex/metadata.js +107 -0
  614. package/src/platforms/codex/runtime-config.js +58 -0
  615. package/src/platforms/gemini/metadata.js +27 -0
  616. package/src/platforms/gemini/runtime-config.js +62 -0
  617. package/src/platforms/metadata-shared.js +131 -0
  618. package/src/platforms/metadata.js +29 -0
  619. package/src/platforms/qwen/metadata.js +27 -0
  620. package/src/platforms/qwen/runtime-config.js +62 -0
  621. package/src/platforms/shared/adapters/claude-adapter.js +36 -0
  622. package/src/platforms/shared/adapters/conventions.js +29 -0
  623. package/src/platforms/shared/adapters/exit-codes.js +6 -0
  624. package/src/platforms/shared/adapters/factory.js +40 -0
  625. package/src/platforms/shared/adapters/gemini-adapter.js +34 -0
  626. package/src/platforms/shared/adapters/qwen-adapter.js +93 -0
  627. package/src/platforms/shared/agent-names.js +10 -0
  628. package/src/platforms/shared/hook-runner.js +52 -0
  629. package/src/references/architecture.md +139 -0
  630. package/src/references/orchestration-steps.md +193 -0
  631. package/src/scripts/ensure-workspace.js +14 -0
  632. package/src/scripts/read-active-session.js +26 -0
  633. package/src/scripts/read-setting.js +18 -0
  634. package/src/scripts/read-state.js +17 -0
  635. package/src/scripts/write-state.js +22 -0
  636. package/src/skills/shared/code-review/SKILL.md +145 -0
  637. package/src/skills/shared/delegation/SKILL.md +370 -0
  638. package/src/skills/shared/delegation/protocols/agent-base-protocol.md +145 -0
  639. package/src/skills/shared/delegation/protocols/filesystem-safety-protocol.md +31 -0
  640. package/src/skills/shared/design-dialogue/SKILL.md +284 -0
  641. package/src/skills/shared/execution/SKILL.md +258 -0
  642. package/src/skills/shared/implementation-planning/SKILL.md +303 -0
  643. package/src/skills/shared/session-management/SKILL.md +314 -0
  644. package/src/skills/shared/validation/SKILL.md +204 -0
  645. package/src/state/session-state.js +113 -0
  646. package/src/templates/design-document.md +95 -0
  647. package/src/templates/implementation-plan.md +86 -0
  648. package/src/templates/session-state.md +68 -0
  649. package/src/transforms/agent-stub.js +29 -0
  650. package/src/transforms/extract-examples.js +63 -0
  651. package/src/transforms/index.js +35 -0
  652. package/src/transforms/parse-frontmatter.js +23 -0
  653. package/src/transforms/rebuild-frontmatter.js +147 -0
  654. package/src/transforms/skill-discovery-stub.js +27 -0
  655. package/src/transforms/skill-metadata.js +14 -0
@@ -0,0 +1,190 @@
1
+ # Claude Runtime
2
+
3
+ The Claude Code plugin lives in the `claude/` subdirectory.
4
+
5
+ ## Configuration
6
+
7
+ **Manifest**: `claude/.claude-plugin/plugin.json`
8
+ **Version**: generated from `package.json`
9
+ **Hooks**: `claude/hooks/claude-hooks.json`
10
+ **MCP Config**: `claude/.mcp.json`
11
+
12
+ ### MCP Server
13
+
14
+ ```json
15
+ {
16
+ "mcpServers": {
17
+ "maestro": {
18
+ "command": "node",
19
+ "args": ["${CLAUDE_PLUGIN_ROOT}/mcp/maestro-server.js"],
20
+ "cwd": "${CLAUDE_PLUGIN_ROOT}"
21
+ }
22
+ }
23
+ }
24
+ ```
25
+
26
+ The public server at `claude/mcp/maestro-server.js` is a thin adapter. It sets `MAESTRO_RUNTIME=claude`, prefers canonical repo `src/mcp/maestro-server.js` when the plugin is loaded from a checkout, and falls back to bundled `claude/src/mcp/maestro-server.js` for detached marketplace or copied installs. Claude declares `primary: filesystem` and `fallback: none`.
27
+
28
+ ## Agent Naming
29
+
30
+ Claude uses **kebab-case** for agent names: `code-reviewer`, `api-designer`, `accessibility-specialist`.
31
+
32
+ Agent files are generated at `claude/agents/*.md` with kebab-case filenames.
33
+
34
+ ## Delegation
35
+
36
+ Claude Code Agent subagent syntax:
37
+
38
+ ```
39
+ Agent(subagent_type: "maestro:coder", prompt: "...")
40
+ Agent(subagent_type: "maestro:architect", prompt: "...")
41
+ ```
42
+
43
+ ## Skills
44
+
45
+ 19 Markdown skills in `claude/skills/`:
46
+
47
+ **Core (3)** — generated public entry points from the core command registry:
48
+ - `orchestrate/SKILL.md`
49
+ - `execute/SKILL.md`
50
+ - `resume-session/SKILL.md`
51
+
52
+ **Entry-point (9)** — from registry (`review`, `debug`, `resume` are remapped to `review-code`, `debug-workflow`, `resume-session` because they collide with Claude Code built-in commands; see `src/generator/entry-point-expander.js` `HOST_RESERVED_NAMES`):
53
+ - `review-code/SKILL.md`, `debug-workflow/SKILL.md`, `archive/SKILL.md`, `status/SKILL.md`
54
+ - `security-audit/SKILL.md`, `perf-check/SKILL.md`, `seo-audit/SKILL.md`
55
+ - `a11y-audit/SKILL.md`, `compliance-check/SKILL.md`
56
+
57
+ **Infrastructure (7)** — discovery stubs for shared skills:
58
+ - `code-review/SKILL.md`, `delegation/SKILL.md`, `design-dialogue/SKILL.md`
59
+ - `execution/SKILL.md`, `implementation-planning/SKILL.md`
60
+ - `session-management/SKILL.md`, `validation/SKILL.md`
61
+
62
+ Infrastructure skills have `user-invocable: false` — they surface in Claude's skill picker but delegate to MCP for content.
63
+
64
+ ## Hooks
65
+
66
+ 4 hook entries across 3 event types (2 with matchers):
67
+
68
+ | Event | Matcher | Script | Timeout |
69
+ |-------|---------|--------|---------|
70
+ | `SessionStart` | — | `scripts/hook-runner.js claude session-start` | 10s |
71
+ | `PreToolUse` | `Agent` | `scripts/hook-runner.js claude before-agent` | 10s |
72
+ | `PreToolUse` | `Bash` | scripts/policy-enforcer.js | 5s |
73
+ | `SessionEnd` | — | `scripts/hook-runner.js claude session-end` | 10s |
74
+
75
+ ### Key Differences from Gemini
76
+
77
+ - Uses `PreToolUse` with matchers instead of `BeforeAgent`/`AfterAgent`
78
+ - **No AfterAgent hook** — Claude does not validate handoff report format via hooks
79
+ - Same effective timeouts (10s) but Claude config uses seconds, Gemini uses milliseconds (10000ms)
80
+ - Policy enforcement via hook script, not TOML
81
+
82
+ ### Hook Adapter
83
+
84
+ `claude/scripts/adapters/claude-adapter.js` normalizes Claude Code stdin:
85
+
86
+ | Claude Field | Internal Field |
87
+ |-------------|----------------|
88
+ | `session_id` | `sessionId` |
89
+ | `cwd` | `cwd` |
90
+ | `hook_event_name` | `event` |
91
+ | `tool_input.subagent_type` | `agentName` |
92
+ | `tool_input.prompt` | `agentInput` |
93
+ | `tool_result` | `agentResult` |
94
+ | (hardcoded false) | `stopHookActive` |
95
+
96
+ Output format: `{ continue: boolean, decision: "approve"|"block", systemMessage?: string, reason?: string }`
97
+
98
+ ## Policy Enforcement
99
+
100
+ `claude/scripts/policy-enforcer.js` — JavaScript-based, triggered on Bash tool use:
101
+
102
+ **Deny rules** (blocks command):
103
+ - `rm -rf`, `rm -fr`, `sudo rm -rf`, `sudo rm -fr`
104
+ - `git reset --hard`, `git checkout --`
105
+ - `git clean -fd`, `git clean -df`, `git clean -xfd`, `git clean -xdf`
106
+ - Heredocs (`<<`)
107
+
108
+ **Ask rules** (requires user confirmation):
109
+ - `tee` commands
110
+ - Output redirection (`>`, `>>`)
111
+
112
+ Parses compound commands (`;`, `&&`, `||`, `|`) and recursively checks subshells (`$(...)`, backticks).
113
+
114
+ ## Tool Mapping
115
+
116
+ | Canonical | Claude |
117
+ |-----------|--------|
118
+ | `read_file` / `read_many_files` | `Read` |
119
+ | `write_file` | `Write` |
120
+ | `replace` | `Edit` |
121
+ | `list_directory` / `glob` | `Glob` |
122
+ | `grep_search` | `Grep` |
123
+ | `google_web_search` | `WebSearch` |
124
+ | `web_fetch` | `WebFetch` |
125
+ | `run_shell_command` | `Bash` |
126
+ | `ask_user` | `AskUserQuestion` |
127
+ | `write_todos` | `TaskCreate`, `TaskUpdate`, `TaskList` |
128
+ | `activate_skill` | `Skill` |
129
+ | `enter_plan_mode` | `EnterPlanMode` |
130
+ | `exit_plan_mode` | `ExitPlanMode` |
131
+ | `codebase_investigator` | `Agent (Explore)` / `Grep` / `Glob` |
132
+
133
+ ## Feature Flags
134
+
135
+ The canonical feature set (same 4 flags across all runtimes, values per runtime):
136
+
137
+ ```
138
+ exampleBlocks: true (examples embedded in description)
139
+ claudeStateContract: true (Claude-specific session-state contract)
140
+ scriptBasedStateContract: false
141
+ codexStateContract: false
142
+ ```
143
+
144
+ See `src/platforms/claude/runtime-config.js` for the authoritative values.
145
+
146
+ ## Agent Frontmatter
147
+
148
+ Claude agent stubs include example blocks in the description and use camelCase for turns:
149
+
150
+ ```yaml
151
+ ---
152
+ name: coder
153
+ description: |
154
+ Implementation specialist...
155
+
156
+ <example>
157
+ Context: User needs a new feature implemented.
158
+ user: "Implement the login flow"
159
+ assistant: "I'll follow existing patterns..."
160
+ </example>
161
+ model: inherit
162
+ color: green
163
+ maxTurns: 25
164
+ tools:
165
+ - Read
166
+ - Write
167
+ - Edit
168
+ - Bash
169
+ - Glob
170
+ - Grep
171
+ ---
172
+ ```
173
+
174
+ Fields: `model` (always "inherit"), `color`, `maxTurns` (camelCase). No temperature or timeout.
175
+
176
+ ## Generated Files
177
+
178
+ ```
179
+ claude/
180
+ ├── agents/ 39 agent stubs (kebab-case)
181
+ ├── skills/ 19 skill directories
182
+ ├── hooks/ 1 hook config (claude-hooks.json)
183
+ ├── scripts/ thin hook wrapper, adapter wrapper, policy enforcer
184
+ ├── mcp/ thin MCP entrypoint
185
+ ├── src/ generated detached runtime payload for isolated installs
186
+ ├── .claude-plugin/ 1 plugin manifest
187
+ ├── .mcp.json
188
+ ├── mcp-config.example.json
189
+ └── README.md
190
+ ```
@@ -0,0 +1,197 @@
1
+ # Codex Runtime
2
+
3
+ The Codex plugin lives in `plugins/maestro/`.
4
+
5
+ ## Configuration
6
+
7
+ **Manifest**: `plugins/maestro/.codex-plugin/plugin.json`
8
+ **Version**: generated from `package.json`
9
+ **MCP Config**: `plugins/maestro/.mcp.json`
10
+ **App Config**: `plugins/maestro/.app.json`
11
+ **Runtime Guide**: `plugins/maestro/references/runtime-guide.md`
12
+
13
+ ### MCP Server
14
+
15
+ ```json
16
+ {
17
+ "command": "npx",
18
+ "args": ["-y", "-p", "@josstei/maestro@<package version>", "maestro-mcp-server"],
19
+ "env": { "MAESTRO_RUNTIME": "codex" }
20
+ }
21
+ ```
22
+
23
+ Codex plugin manifests lack a plugin-root substitution variable (unlike Claude's `${CLAUDE_PLUGIN_ROOT}` or Gemini's `${extensionPath}`), so relative paths in `args` would resolve against the user's workspace rather than the plugin directory. Maestro invokes the server via `npx` using the versioned npm package for the current release. The `maestro-mcp-server` bin lives in `bin/maestro-mcp-server.js` and is declared in `package.json`; it sets `MAESTRO_RUNTIME=codex` and delegates to `src/mcp/maestro-server.js`.
24
+
25
+ For workspace resolution, Codex follows the shared runtime contract:
26
+ - use `MAESTRO_WORKSPACE_PATH` when the host exports it explicitly
27
+ - otherwise fall back to the MCP client `roots/list` response
28
+ - only then fall back to inherited env and `cwd` heuristics
29
+
30
+ That keeps Maestro state rooted under the actual workspace `docs/maestro` path regardless of where `npx` materializes the package cache.
31
+
32
+ ### Plugin Manifest
33
+
34
+ ```json
35
+ {
36
+ "name": "maestro",
37
+ "version": "<package version>",
38
+ "description": "Generated Codex runtime for Maestro's multi-agent design, planning, execution, and review workflows.",
39
+ "author": { "name": "josstei", "email": "hello@josstei.dev", "url": "https://github.com/josstei" },
40
+ "homepage": "https://github.com/josstei/maestro-orchestrate",
41
+ "repository": "https://github.com/josstei/maestro-orchestrate",
42
+ "license": "Apache-2.0",
43
+ "keywords": ["orchestration", "multi-agent", "planning", "execution", "coding"],
44
+ "skills": "./skills/",
45
+ "mcpServers": "./.mcp.json",
46
+ "apps": "./.app.json",
47
+ "interface": {
48
+ "displayName": "Maestro",
49
+ "shortDescription": "Multi-agent coding orchestration for Codex",
50
+ "longDescription": "Generated Codex runtime for Maestro. ...",
51
+ "developerName": "josstei",
52
+ "category": "Coding",
53
+ "capabilities": ["Interactive", "Write"],
54
+ "websiteURL": "https://github.com/josstei/maestro-orchestrate",
55
+ "defaultPrompt": ["Use Maestro to orchestrate a feature...", "..."],
56
+ "brandColor": "#2563EB"
57
+ }
58
+ }
59
+ ```
60
+
61
+ ## Agent Naming
62
+
63
+ Codex uses **kebab-case** agent identifiers in runtime context and MCP-served methodology content, matching Claude: `code-reviewer`, `api-designer`.
64
+
65
+ ## Delegation
66
+
67
+ Codex-native `spawn_agent(...)`:
68
+
69
+ ```
70
+ spawn_agent(...)
71
+ ```
72
+
73
+ The runtime guide recommends mapping Maestro agents to Codex delegation modes:
74
+ - Evidence gathering or repo mapping → `explorer`
75
+ - Bounded implementation → `worker`
76
+ - No clear benefit from delegation → stay local
77
+
78
+ ## Skills
79
+
80
+ 19 Markdown skills in `plugins/maestro/skills/`:
81
+
82
+ Codex keeps built-in `/review`, `/debug`, and `/resume` commands, so Maestro exposes `$maestro:review-code`, `$maestro:debug-workflow`, and `$maestro:resume-session` instead of those bare names.
83
+
84
+ **Core (3)** — unprefixed in the plugin, invoked as `$maestro:<name>`:
85
+ - `orchestrate/SKILL.md`
86
+ - `execute/SKILL.md`
87
+ - `resume-session/SKILL.md`
88
+
89
+ **Entry-point (9)** — unprefixed in the plugin, invoked as `$maestro:<name>`:
90
+ - `review-code/SKILL.md`, `debug-workflow/SKILL.md`, `archive/SKILL.md`
91
+ - `status/SKILL.md`, `security-audit/SKILL.md`
92
+ - `perf-check/SKILL.md`, `seo-audit/SKILL.md`
93
+ - `a11y-audit/SKILL.md`, `compliance-check/SKILL.md`
94
+
95
+ **Infrastructure (7)** — NOT prefixed:
96
+ - `code-review/SKILL.md`, `delegation/SKILL.md`, `design-dialogue/SKILL.md`
97
+ - `execution/SKILL.md`, `implementation-planning/SKILL.md`
98
+ - `session-management/SKILL.md`, `validation/SKILL.md`
99
+
100
+ ## Hooks
101
+
102
+ **Codex has no hooks.** No hook registration exists in the plugin manifest. Delegation tracking and policy enforcement are handled through inline methodology constraints.
103
+
104
+ ## Policies
105
+
106
+ **No policy enforcement.** Codex relies on inline constraints within skill and agent methodologies rather than runtime-level policy rules.
107
+
108
+ ## MCP Behavior
109
+
110
+ The runtime guide states:
111
+
112
+ > If Maestro MCP tools are available, prefer them for stateful operations. If the MCP server is unavailable in the current Codex environment, fall back to direct file operations under `docs/maestro` as described by the shared skills.
113
+
114
+ This MCP-first with direct filesystem fallback approach exists because spawned Codex agents may not have access to the parent plugin's MCP server. When MCP is available, shared methodology and agent bodies are resolved from generated local `plugins/maestro/src/`, which is produced from canonical root `src/`; there is no hand-maintained packaged registry copy and no plugin-level `agents/` directory.
115
+
116
+ ## Tool Mapping
117
+
118
+ Codex tools use descriptive names rather than direct API mappings:
119
+
120
+ | Canonical | Codex |
121
+ |-----------|-------|
122
+ | `read_file` / `read_many_files` | direct file reads |
123
+ | `write_file` / `replace` | `apply_patch` |
124
+ | `list_directory` / `glob` | `exec_command` (rg --files, ls, find) |
125
+ | `grep_search` | `exec_command` (rg) |
126
+ | `google_web_search` | web search |
127
+ | `web_fetch` | web fetch |
128
+ | `run_shell_command` | `exec_command` |
129
+ | `ask_user` | `request_user_input` |
130
+ | `write_todos` | `update_plan` |
131
+ | `activate_skill` | open the referenced skill and follow it |
132
+ | `enter_plan_mode` | `update_plan` |
133
+ | `exit_plan_mode` | `request_user_input` approval |
134
+ | `codebase_investigator` | local inspection or `spawn_agent` |
135
+
136
+ ## Feature Flags
137
+
138
+ The canonical feature set (same 4 flags across all runtimes, values per runtime):
139
+
140
+ ```
141
+ exampleBlocks: false
142
+ claudeStateContract: false
143
+ scriptBasedStateContract: false
144
+ codexStateContract: true
145
+ ```
146
+
147
+ See `src/platforms/codex/runtime-config.js` for the authoritative values.
148
+
149
+ ## Path Resolution
150
+
151
+ Codex uses relative paths (`relativeExtensionPath: true`):
152
+
153
+ - `env.extensionPath`: `.` (plugin root)
154
+ - `env.workspacePath`: `MAESTRO_WORKSPACE_PATH` when available
155
+ - Path references in generated content are computed relative to the output file's location
156
+
157
+ This differs from Gemini (passthrough variables) and Claude (environment variable references).
158
+
159
+ When `MAESTRO_WORKSPACE_PATH` is not set, the MCP server uses the first valid local `file://` root from the client `roots/list` response before falling back to legacy env and `cwd` detection.
160
+
161
+ ## Canonical Filesystem Content
162
+
163
+ Codex follows the same source-of-truth model as the other runtimes:
164
+
165
+ - shared skills, protocols, templates, references, and agent bodies are authored in canonical root `src/`
166
+ - generated `plugins/maestro/src/` is the detached runtime payload for published Codex bundles
167
+ - generated `plugins/maestro/skills/` files are public entrypoints or discovery stubs only
168
+ - Codex does not consume plugin agent files; `get_agent` serves the canonical methodology bodies
169
+ - no tracked `plugins/maestro/lib/` mirror or bundled content registry is part of the runtime
170
+
171
+ ## Generated Files
172
+
173
+ ```
174
+ plugins/maestro/
175
+ ├── skills/ 19 skill directories
176
+ ├── src/ generated detached runtime payload
177
+ ├── references/ 1 runtime guide
178
+ ├── .codex-plugin/ 1 plugin manifest
179
+ ├── .mcp.json npx-based spawn (no local wrapper)
180
+ ├── .app.json
181
+ └── README.md
182
+ ```
183
+
184
+ The runtime server is invoked via `npx` rather than a local wrapper file, so the plugin ships no local `mcp/` directory under `plugins/maestro/`. The bin entrypoint lives in the repo root `bin/maestro-mcp-server.js`; `node scripts/generate.js` derives `plugins/maestro/.mcp.json` from `package.json` so the plugin manifest and MCP package spec stay on the same version.
185
+
186
+ ## Differences from Gemini and Claude
187
+
188
+ | Aspect | Gemini | Claude | Codex |
189
+ |--------|--------|--------|-------|
190
+ | Agent names | snake_case | kebab-case | kebab-case |
191
+ | Delegation | Direct function call | Agent subagent | spawn_agent |
192
+ | Hooks | 4 events, no matchers | SessionStart, SessionEnd, PreToolUse + matchers | None |
193
+ | Policies | TOML rules | JS hook enforcer | None |
194
+ | Skill surface | N/A (commands) | 19 skills | plugin namespace `$maestro:*` |
195
+ | Path style | Variable passthrough | Env var refs | `npx` bin |
196
+ | Extra files | TOML policy rules | policy-enforcer | runtime guide |
197
+ | Runtime payload | thin entrypoint only | thin entrypoint + detached `src/` payload | npx bin + detached `src/` payload |
@@ -0,0 +1,170 @@
1
+ # Gemini Runtime
2
+
3
+ The Gemini CLI extension lives at the repository root. It is the primary runtime target.
4
+
5
+ ## Configuration
6
+
7
+ **Manifest**: `gemini-extension.json`
8
+ **Version**: generated from `package.json`
9
+ **Context File**: `GEMINI.md`
10
+
11
+ ### MCP Server
12
+
13
+ ```json
14
+ {
15
+ "command": "node",
16
+ "args": ["${extensionPath}/mcp/maestro-server.js"],
17
+ "cwd": "${extensionPath}",
18
+ "env": { "MAESTRO_WORKSPACE_PATH": "${workspacePath}" }
19
+ }
20
+ ```
21
+
22
+ The public server at `mcp/maestro-server.js` is a thin adapter. It sets `MAESTRO_RUNTIME=gemini`, requires canonical `src/mcp/maestro-server.js` directly, and runs the Gemini runtime against shared source in `src/`. Gemini declares `primary: filesystem` and `fallback: none`.
23
+
24
+ ## Agent Naming
25
+
26
+ Gemini uses **snake_case** for agent names: `code_reviewer`, `api_designer`, `accessibility_specialist`.
27
+
28
+ Agent files are generated at `agents/*.md` with snake_case filenames.
29
+
30
+ ## Delegation
31
+
32
+ Direct function call syntax:
33
+
34
+ ```
35
+ coder(query: "Implement the user service...")
36
+ architect(query: "Design the auth system...")
37
+ ```
38
+
39
+ ## Commands
40
+
41
+ 12 TOML commands in `commands/maestro/`:
42
+
43
+ | Command | Source |
44
+ |---------|--------|
45
+ | `orchestrate.toml` | Core command registry |
46
+ | `execute.toml` | Core command registry |
47
+ | `resume.toml` | Core command registry |
48
+ | `review.toml` | Entry-point registry |
49
+ | `debug.toml` | Entry-point registry |
50
+ | `archive.toml` | Entry-point registry |
51
+ | `status.toml` | Entry-point registry |
52
+ | `security-audit.toml` | Entry-point registry |
53
+ | `perf-check.toml` | Entry-point registry |
54
+ | `seo-audit.toml` | Entry-point registry |
55
+ | `a11y-audit.toml` | Entry-point registry |
56
+ | `compliance-check.toml` | Entry-point registry |
57
+
58
+ ## Hooks
59
+
60
+ 4 hook events, no matchers, 10-second timeout:
61
+
62
+ | Event | Script | Purpose |
63
+ |-------|--------|---------|
64
+ | `SessionStart` | `hooks/hook-runner.js gemini session-start` | Initialize hook state, prune stale sessions |
65
+ | `BeforeAgent` | `hooks/hook-runner.js gemini before-agent` | Detect agent, inject session context |
66
+ | `AfterAgent` | `hooks/hook-runner.js gemini after-agent` | Validate Task Report + Downstream Context |
67
+ | `SessionEnd` | `hooks/hook-runner.js gemini session-end` | Clean up hook state |
68
+
69
+ ### AfterAgent Validation
70
+
71
+ Gemini has a post-delegation validation hook that Claude lacks:
72
+
73
+ - Checks for `## Task Report` (or `# Task Report`) and `## Downstream Context` headings
74
+ - First failure: blocks and requests retry
75
+ - Second failure (stopHookActive=true): allows through with warning
76
+
77
+ ### Hook Adapter
78
+
79
+ `hooks/adapters/gemini-adapter.js` normalizes Gemini CLI JSON input:
80
+
81
+ | Gemini Field | Internal Field |
82
+ |-------------|----------------|
83
+ | `session_id` | `sessionId` |
84
+ | `cwd` | `cwd` |
85
+ | `hook_event_name` | `event` |
86
+ | (hardcoded null) | `agentName` |
87
+ | `prompt` | `agentInput` |
88
+ | `prompt_response` | `agentResult` |
89
+ | `stop_hook_active` | `stopHookActive` |
90
+
91
+ Output format: `{ continue: boolean, systemMessage?: string }`
92
+
93
+ ## Policies
94
+
95
+ `policies/maestro.toml` — TOML-based shell guardrails evaluated by Gemini's native policy engine:
96
+
97
+ **Deny (priority 950)**:
98
+ - `rm -rf`, `rm -fr`, `sudo rm -rf`, `sudo rm -fr`
99
+ - `git reset --hard`, `git checkout --`
100
+ - `git clean -fd`, `git clean -df`, `git clean -xfd`, `git clean -xdf`
101
+ - Heredocs (`<<`)
102
+
103
+ **Ask User (priority 850)**:
104
+ - `tee` commands
105
+ - Output redirection (`>`, `>>`)
106
+
107
+ ## Tool Mapping
108
+
109
+ Gemini tools use canonical names (identity mapping):
110
+
111
+ | Canonical | Gemini |
112
+ |-----------|--------|
113
+ | `read_file` | `read_file` |
114
+ | `read_many_files` | `read_file (called per-file)` |
115
+ | `list_directory` | `list_directory` |
116
+ | `glob` | `glob` |
117
+ | `grep_search` | `grep_search` |
118
+ | `google_web_search` | `google_web_search` |
119
+ | `web_fetch` | `web_fetch` |
120
+ | `write_file` | `write_file` |
121
+ | `replace` | `replace` |
122
+ | `run_shell_command` | `run_shell_command` |
123
+ | `ask_user` | `ask_user` |
124
+ | `write_todos` | `not available — track progress in model context` |
125
+ | `activate_skill` | `activate_skill` |
126
+ | `enter_plan_mode` | `enter_plan_mode` |
127
+ | `exit_plan_mode` | `exit_plan_mode` |
128
+ | `codebase_investigator` | `codebase_investigator` |
129
+
130
+ ## Feature Flags
131
+
132
+ The canonical feature set (same 4 flags across all runtimes, values per runtime):
133
+
134
+ ```
135
+ exampleBlocks: false
136
+ claudeStateContract: false
137
+ scriptBasedStateContract: true
138
+ codexStateContract: false
139
+ ```
140
+
141
+ See `src/platforms/gemini/runtime-config.js` for the authoritative values.
142
+
143
+ ## Agent Frontmatter
144
+
145
+ Gemini agent stubs include:
146
+
147
+ ```yaml
148
+ ---
149
+ name: coder
150
+ kind: local
151
+ description: "..."
152
+ tools: [read_file, write_file, ...]
153
+ temperature: 0.2
154
+ max_turns: 25
155
+ timeout_mins: 10
156
+ ---
157
+ ```
158
+
159
+ Fields: `kind` (always "local"), `temperature`, `max_turns`, `timeout_mins`.
160
+
161
+ ## Generated Files
162
+
163
+ ```
164
+ agents/ 39 agent stubs (snake_case)
165
+ commands/maestro/ 12 TOML commands
166
+ hooks/ thin hook runner, adapter wrapper, hooks.json
167
+ mcp/ thin MCP entrypoint
168
+ policies/ 1 TOML policy file
169
+ README.md, GEMINI.md, gemini-extension.json, .geminiignore
170
+ ```