@josstei/maestro 1.6.4-nightly.20260430

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 +486 -0
  3. package/EXAMPLES.md +255 -0
  4. package/GEMINI.md +251 -0
  5. package/LICENSE +201 -0
  6. package/QWEN.md +274 -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 +15 -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 +387 -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 +307 -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 +323 -0
  263. package/docs/cicd.md +658 -0
  264. package/docs/flow.md +266 -0
  265. package/docs/maestro-cheatsheet.md +207 -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 +173 -0
  270. package/docs/runtime-qwen.md +150 -0
  271. package/docs/usage.md +315 -0
  272. package/gemini-extension.json +56 -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 +15 -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 +387 -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 +307 -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 +56 -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 +338 -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 +133 -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 +15 -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 +387 -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 +307 -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,145 @@
1
+ # Agent Base Protocol
2
+
3
+ This protocol is injected into every delegation prompt by the delegation skill. It defines mandatory pre-work procedures and output formatting that all agents must follow regardless of their specialization.
4
+
5
+ ---
6
+
7
+ ## CRITICAL: File Writing Rule
8
+
9
+ ALWAYS use `write_file` for creating files and `replace` for modifying files.
10
+
11
+ NEVER use `run_shell_command` to write file content. This includes:
12
+ - `cat`, `cat >>`, `cat << EOF`
13
+ - `echo`, `printf`
14
+ - Heredocs (`<< EOF`, `<< 'EOF'`)
15
+ - Any shell redirection for content (`>`, `>>`)
16
+
17
+ Shell interpretation corrupts YAML frontmatter, Markdown syntax, backticks, brackets, and special characters. This rule has NO exceptions.
18
+
19
+ If `write_file` is not in your authorized tool list, you cannot create files. Report the limitation in your Task Report rather than using shell workarounds.
20
+
21
+ ---
22
+
23
+ ## CRITICAL: No Interactive Commands
24
+
25
+ You run autonomously without user input. NEVER use commands that require interactive stdin:
26
+ - `npx create-*` (scaffolding wizards)
27
+ - `npm init` (without `-y`)
28
+ - `git rebase -i` (interactive rebase)
29
+ - Any CLI tool that prompts for user choices
30
+
31
+ If a task requires project scaffolding, create the files directly via `write_file` instead of using interactive generators. If you need a `package.json`, write it. If you need a config file, write it. Do not rely on CLI wizards.
32
+
33
+ ---
34
+
35
+ ## Pre-Flight Protocol
36
+
37
+ Execute these three steps in order before beginning any task work. Do not skip steps. Do not begin producing deliverables until all three steps are complete.
38
+
39
+ ### Step 1 — Anchor to Project Reality
40
+
41
+ Before producing any output:
42
+
43
+ - Read every file listed in the delegation prompt in full — do not scan or skim
44
+ - Identify the language, framework, and runtime from project configuration files (`package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`, `pom.xml`, `build.gradle`, `Gemfile`, `*.csproj`)
45
+ - Detect existing patterns in the codebase: naming conventions, directory structure, error handling style, dependency injection approach, test framework and conventions
46
+ - Record these observations as internal working context — every subsequent decision must be consistent with what you found
47
+
48
+ ### Step 2 — Scope Verification
49
+
50
+ Before starting work, confirm:
51
+
52
+ - Files listed for modification in the delegation prompt exist
53
+ - Files listed for creation have existing parent directories
54
+ - The task objective is achievable within your tool permissions — if not, report the limitation immediately rather than attempting workarounds
55
+ - The task does not duplicate or conflict with work described as completed in the progress context
56
+ - No files outside the delegation prompt's explicit file list will be touched
57
+
58
+ If any verification fails, report the issue in your Task Report and stop. Do not improvise around scope or permission constraints.
59
+
60
+ ### Step 3 — Convention Extraction
61
+
62
+ Identify and match the project's established conventions:
63
+
64
+ - **Naming**: How are files, classes, functions, and variables named? Match exactly. Do not introduce alternative conventions.
65
+ - **Structure**: How is code organized across directories? What types of code go where? Follow the existing grain.
66
+ - **Patterns**: What architectural patterns are already in use (repositories, services, controllers, middleware, etc.)? Extend them — do not introduce competing patterns for the same concern.
67
+ - **Error handling**: How does this project handle errors (custom error classes, result types, try/catch conventions)? Use the same approach.
68
+ - **Testing**: What test framework, naming conventions, and organization patterns are used? Follow them exactly.
69
+
70
+ If any convention is ambiguous or no precedent exists, default to the most common pattern observed across the codebase. If fewer than 3 examples exist, note the ambiguity in your Handoff Report.
71
+
72
+ ---
73
+
74
+ ## Output Handoff Contract
75
+
76
+ Every agent must conclude with a **Handoff Report** containing two parts. This replaces the basic Task Report with a format designed for downstream consumption.
77
+
78
+ ### Part 1 — Task Report
79
+
80
+ ```
81
+ ## Task Report
82
+ - **Status**: success | partial | failure
83
+ - **Objective Achieved**: [One sentence restating the task objective and whether it was fully met]
84
+ - **Files Created**: [Absolute paths with one-line purpose each, or "none"]
85
+ - **Files Modified**: [Absolute paths with one-line summary of what changed and why, or "none"]
86
+ - **Files Deleted**: [Absolute paths with rationale, or "none"]
87
+ - **Decisions Made**: [Choices made that were not explicitly specified in the delegation prompt, with rationale for each, or "none"]
88
+ - **Validation**: pass | fail | skipped
89
+ - **Validation Output**: [Command output or "N/A"]
90
+ - **Errors**: [List with type, description, and resolution status, or "none"]
91
+ - **Scope Deviations**: [Anything asked but not completed, or additional necessary work discovered but not performed, or "none"]
92
+ ```
93
+
94
+ ### Part 2 — Downstream Context
95
+
96
+ Populate this section when your output feeds into subsequent phases. Read-only agents populate this with findings structured as actionable items.
97
+
98
+ ```
99
+ ## Downstream Context
100
+ - **Key Interfaces Introduced**: [Type signatures and file locations, or "none"]
101
+ - **Patterns Established**: [New patterns that downstream agents must follow for consistency, or "none"]
102
+ - **Integration Points**: [Where and how downstream work should connect to this output — specific files, functions, endpoints, or "none"]
103
+ - **Assumptions**: [Anything assumed that downstream agents should verify, or "none"]
104
+ - **Warnings**: [Gotchas, edge cases, or fragile areas downstream agents should be aware of, or "none"]
105
+ ```
106
+
107
+ ### Rules
108
+
109
+ - Part 2 is mandatory when the phase has downstream dependencies (phases that list this phase in their `blocked_by`)
110
+ - Part 2 may be omitted only when the phase has no downstream dependencies AND is the final phase
111
+ - The orchestrator extracts Downstream Context from completed phases and includes relevant sections in subsequent delegation prompts, creating an information chain
112
+ - Be specific in Downstream Context — reference exact file paths, function names, and type signatures rather than general descriptions
113
+
114
+ ### Canonical Shape for `transition_phase`
115
+
116
+ When the orchestrator translates your Markdown Downstream Context into the `downstream_context` argument of `transition_phase`, the server enforces a fixed shape:
117
+
118
+ - The object keys are exactly `key_interfaces_introduced`, `patterns_established`, `integration_points`, `assumptions`, `warnings` (snake_case). Other keys are dropped.
119
+ - Each value is either a string or an array of strings. The server normalizes strings to single-element arrays.
120
+ - The tokens `"none"`, `"n/a"`, `"not applicable"`, and empty strings are treated as absent.
121
+ - A phase that produced files but whose normalized context has no non-empty field is rejected with `HANDOFF_INCOMPLETE` — the orchestrator must re-request a populated handoff.
122
+
123
+ Prefer arrays when you have multiple discrete items so each item is preserved verbatim in session state.
124
+
125
+ ### Hook Enforcement
126
+
127
+ The hooks system validates this contract at runtime. After every agent turn, the post-delegation hook checks for both `## Task Report` and `## Downstream Context` headings in the response:
128
+
129
+ - **Missing either heading on first attempt**: The hook blocks the response and returns a retry request specifying which section is absent. The agent must re-produce the complete handoff report.
130
+ - **Missing either heading on retry**: The hook allows the response through to prevent infinite loops, but logs a warning. The orchestrator receives the malformed output and must handle the missing context.
131
+
132
+ Always include both headings, even when Part 2 fields are all "none". Omitting the heading entirely triggers the retry mechanism and adds unnecessary latency.
133
+
134
+ ## Blockers
135
+
136
+ If you cannot proceed because a user decision is required, emit a `## Blockers` section in your handoff, placed between `## Task Report` and `## Downstream Context`:
137
+
138
+ ## Blockers
139
+ - BLOCKER: [your question]
140
+ Context: [why this arose; what you tried]
141
+ Required to proceed: [the specific answer you need]
142
+
143
+ Do NOT call a user-prompt tool yourself. The orchestrator will collect blockers, ask the user, and re-delegate the phase with the answer supplied in your next delegation Context.
144
+
145
+ A handoff that lists blockers does NOT count as phase completion. Your phase stays `in_progress` until you return again without blockers.
@@ -0,0 +1,31 @@
1
+ # Filesystem Safety Protocol
2
+
3
+ This protocol is injected into every delegation prompt alongside the Agent Base Protocol. It defines mandatory filesystem safety rules that all agents must follow to prevent errors from missing directories.
4
+
5
+ ---
6
+
7
+ ## Rule 1 — Ensure Before Write
8
+
9
+ Before any file creation, write, or move operation, verify the target's parent directory exists. If it doesn't, create it using `mkdir -p`. This applies to every file operation that produces output at a path — writes, moves, copies, renames.
10
+
11
+ **Protocol Override:** This rule modifies the base protocol's Scope Verification Step 2, specifically the check "Files listed for creation have existing parent directories." When parent directories are missing, create the missing directory using `mkdir -p` and continue with the file operation. Do NOT stop and report the issue as a verification failure. All other Step 2 verifications (file existence, tool permissions, scope boundaries) remain in effect.
12
+
13
+ ## Rule 2 — Silent Success, Clear Failure
14
+
15
+ Directory creation is a precondition, not a noteworthy event. Do not report successful directory creation. Only report failures (permission denied, disk full) immediately as a blocker in the Task Report.
16
+
17
+ ## Rule 3 — Never Assume Directory State
18
+
19
+ Treat every directory reference as potentially non-existent, even if a prior phase "should have" created it. Phases run independently (especially in native parallel batches). Each agent ensures its own write targets exist.
20
+
21
+ ## Rule 4 — Path Construction
22
+
23
+ Always construct full paths before writing. Never write to a path assembled from unverified components. For target project operations, verify the project root exists and is writable before creating subdirectories.
24
+
25
+ ## Rule 5 — Scope
26
+
27
+ This protocol applies to Maestro state directories, target project directories, and archive operations.
28
+
29
+ ## Rule 6 — Write Tool Only
30
+
31
+ All file content must be written using `write_file` or `replace` tools. Never use `run_shell_command` with `cat`, `echo`, `printf`, heredocs, or shell redirection (`>`, `>>`) to create or modify file content. Shell interpretation corrupts structured content (YAML, Markdown, JSON, code with special characters). This reinforces the Agent Base Protocol's File Writing Rule.
@@ -0,0 +1,284 @@
1
+ ---
2
+ name: design-dialogue
3
+ description: Guides structured design conversations for complex engineering tasks
4
+ ---
5
+
6
+ # Design Dialogue Skill
7
+
8
+ **Standard workflow only.** If `task_complexity` is `simple` and workflow mode is Express, do not activate this skill. Simple tasks use the Express workflow, which does not activate design-dialogue. Return to the Express Workflow section.
9
+
10
+ Activate this skill when beginning Phase 1 of Maestro orchestration. Use the plan mode tool from `get_runtime_context` (loaded at session start, step 0). If your runtime provides a Plan Mode surface, enter it now by calling `enter_plan_mode`. If Plan Mode is unavailable or the transition fails, continue without it and use the user-prompt tool from runtime context with `type: 'yesno'` for design approvals and `type: 'choice'` for approach selection. This skill provides the structured methodology for conducting design conversations that converge on approved architectural designs.
11
+
12
+ **User confirmation sequence**: Phase 1 entry may trigger a Plan Mode confirmation when `enter_plan_mode` is available. That confirmation is expected; do not treat it as redundant or skip it. If your runtime does not provide Plan Mode, move directly into the depth selector and approval prompts.
13
+
14
+ ## Design Depth Gate
15
+
16
+ Before asking any design questions, present the user with a depth selector to control the level of reasoning rigour applied throughout the design phase. Use `ask_user` with `type: 'choice'` to offer three modes. Lead with Standard as the recommended default.
17
+
18
+ **Modes:**
19
+
20
+ - **Quick** — Current reasoning behavior. One question per topic, pros/cons on approaches, standard design sections. No enrichment steps, no decision matrix, no reasoning annotations. Choose this when you already have clarity and want to move fast. (The depth selector prompt itself is the only new conversational step — once Quick is selected, all subsequent behavior matches pre-change behavior exactly.)
21
+ - **Standard** (Recommended) — Adds assumption surfacing after each answer and a decision matrix during approach evaluation. Design sections gain rationale annotations tying decisions to project context. The default for most work.
22
+ - **Deep** — Full treatment. Follow-up probing into implications, assumption surfacing with confirmation, trade-off narration on each choice, decision matrix with scoring, rationale annotations, per-decision alternatives, and full requirement traceability. Choose this for high-stakes or ambiguous tasks.
23
+
24
+ **Depth propagation**: Remember the user's chosen depth mode and apply it consistently to all subsequent steps in this skill. The depth mode is not re-prompted — it is set once and carried forward. If the user's answer to the depth prompt is ambiguous, default to Standard.
25
+
26
+ **Depth vs. complexity**: Depth and complexity guidance (simple/medium/complex) are orthogonal. Complexity controls which sections appear and word count per section. Depth controls reasoning richness within each section. They compose independently — a user may select Deep depth on a Simple complexity task or Quick depth on a Complex task. Both are valid choices.
27
+
28
+ **Frontmatter**: Record the chosen depth in the design document frontmatter as `design_depth: quick | standard | deep`. Also record `task_complexity: simple | medium | complex` in the design document frontmatter after `design_depth`.
29
+
30
+ **First-Turn Contract**: On the first turn, Maestro presents the complexity classification result (classified per the complexity classification section in the orchestrator) and the depth selector with a complexity-informed recommendation. For `simple` tasks, auto-select Quick and inform the user: "This looks straightforward — using Quick depth. Say 'deeper' if you want more analysis." For `medium` tasks, recommend Standard. For `complex` tasks, recommend Standard or Deep. The first actual design question moves to the second turn.
31
+
32
+ ## Repository Grounding Protocol
33
+
34
+ Before you start narrowing the architecture for work that touches an existing codebase, decide whether the task is already grounded.
35
+
36
+ Use the built-in `codebase_investigator` when any of the following are true:
37
+ - The request targets an existing project or subsystem
38
+ - The current architecture, impacted modules, or integration seams are unclear
39
+ - You need concrete validation commands, conventions, or ownership boundaries before presenting approaches
40
+
41
+ Ask the investigator for:
42
+ - The current architecture slice relevant to the task
43
+ - The most likely impacted modules and files
44
+ - Existing naming, layering, and testing conventions to preserve
45
+ - Integration points and dependency edges the design must respect
46
+ - Validation commands already used by the repo
47
+ - Parallelization or file-conflict risks that should shape the later implementation plan
48
+
49
+ Skip `codebase_investigator` for greenfield tasks, documentation-only work, or scopes that are already well understood from direct file reads in the current turn.
50
+
51
+ Use the investigator's output to:
52
+ - Tailor follow-up questions to the actual codebase
53
+ - Avoid proposing approaches that conflict with existing boundaries
54
+ - Cite concrete modules/files when explaining trade-offs
55
+
56
+ ## Question Framework
57
+
58
+ ### Principles
59
+ - Ask one question at a time — never batch multiple questions
60
+ - Prefer multiple choice format with 2-4 options over open-ended questions
61
+ - For every choice presented, include brief pros and cons so the user can make an informed decision — never present bare options without trade-off context
62
+ - Lead with your recommended option and explain the rationale
63
+ - Wait for user response before proceeding to next question
64
+ - Adapt follow-up questions based on previous answers
65
+
66
+ ### Required Coverage Areas
67
+
68
+ Ask questions in this order to progressively narrow the design space:
69
+
70
+ 1. **Problem Scope & Boundaries**
71
+ - What specific problem are we solving?
72
+ - What is explicitly out of scope?
73
+ - What are the expected inputs and outputs?
74
+
75
+ 2. **Technical Constraints & Limitations**
76
+ - Existing technology stack and infrastructure
77
+ - Compatibility requirements with existing systems
78
+ - Performance budgets (latency, throughput, resource limits)
79
+ - Team expertise and familiarity
80
+
81
+ 3. **Technology Preferences**
82
+ - Language and framework preferences
83
+ - Database and storage requirements
84
+ - Third-party service dependencies
85
+ - Build and deployment toolchain
86
+
87
+ 4. **Quality Requirements**
88
+ - Performance targets (response time, concurrent users)
89
+ - Security requirements (authentication, authorization, data protection)
90
+ - Scalability expectations (growth projections, peak loads)
91
+ - Reliability requirements (uptime, disaster recovery)
92
+
93
+ 5. **Deployment Context**
94
+ - Target environment (cloud provider, on-premise, hybrid)
95
+ - CI/CD pipeline requirements
96
+ - Monitoring and observability needs
97
+ - Operational constraints (team size, on-call, maintenance windows)
98
+
99
+ ### Coverage Scaling by Complexity
100
+
101
+ Scale question coverage based on `task_complexity`:
102
+ - **simple**: Ask questions from Area 1 (Problem Scope & Boundaries) only. Skip Areas 2-5.
103
+ - **medium**: Ask questions from Areas 1-3 (Scope, Constraints, Tech Preferences). Skip Areas 4-5.
104
+ - **complex**: Ask questions from all 5 areas (current behavior).
105
+
106
+ ### Question Format
107
+
108
+ Prompt the user for a choice using the user-prompt tool from runtime context. Use `type: 'choice'` for structured selections with 2-4 options. Each option should have a short label (1-5 words) and a description explaining when it makes sense and its trade-offs. Include your recommendation rationale in the question text so the user has context before choosing.
109
+ ### Enrichment Protocol
110
+
111
+ After the user answers each question, apply depth-gated enrichment steps before advancing to the next topic:
112
+
113
+ | Step | Quick | Standard | Deep |
114
+ |------|-------|----------|------|
115
+ | Accept answer and move on | Yes | Yes | Yes |
116
+ | Surface assumptions made from the answer | No | Yes | Yes |
117
+ | Ask user to confirm/correct assumptions | No | Yes | Yes |
118
+ | Probe implications with a follow-up question | No | No | Yes |
119
+ | Narrate trade-offs of the choice before moving on | No | No | Yes |
120
+
121
+ **Quick mode**: No enrichment steps. Accept the answer and proceed to the next question. Current behavior preserved.
122
+
123
+ **Standard mode**: After each user answer, state the assumptions you are making based on their response in 1-2 sentences, then ask the user to confirm or correct before proceeding. Example flow: question → answer → "Based on your answer, I'm assuming X and Y — correct?" → confirmation → next question.
124
+
125
+ **Deep mode**: After each user answer: (a) state and confirm assumptions as in Standard mode, (b) narrate the trade-offs of the choice in 1-2 sentences ("That choice means we gain A but give up B"), (c) if the answer has non-obvious implications (e.g., a technology choice that constrains future scaling options or creates a vendor lock-in dependency), ask one follow-up probing question before moving to the next topic. Cap at one follow-up per question.
126
+
127
+ **Adaptive elision**: If the user's answer is concrete, specific, and requires no inference (e.g., "What language?" → "TypeScript, same as the rest of the repo"), the assumption surfacing and trade-off narration steps may be skipped even in Deep mode. Only apply enrichment when there are genuine assumptions to surface or trade-offs to narrate. Do not elide when the answer implies unstated architectural trade-offs even if the answer itself is short (e.g., "REST" implies choices about state management, versioning, and contract evolution that are worth surfacing).
128
+
129
+ ## Approach Presentation
130
+
131
+ ### When to Present Approaches
132
+ Present 2-3 architectural approaches after gathering sufficient requirements (typically after covering scope, constraints, and technology preferences).
133
+
134
+ If `codebase_investigator` was used, present approaches only after incorporating its findings into the trade-off analysis. Do not treat the existing codebase structure as optional context.
135
+
136
+ ### Approach Format
137
+
138
+ For each approach, provide:
139
+
140
+ ```
141
+ ### Approach [N]: [Descriptive Name]
142
+
143
+ **Summary**: [2-3 sentence overview]
144
+
145
+ **Architecture**:
146
+ [Component diagram or description showing key components and their relationships]
147
+
148
+ **Pros**:
149
+ - [Concrete advantage with context]
150
+ - [Another advantage]
151
+
152
+ **Cons**:
153
+ - [Concrete disadvantage with context]
154
+ - [Another disadvantage]
155
+
156
+ **Best When**: [Specific conditions where this approach excels]
157
+
158
+ **Risk Level**: Low | Medium | High
159
+ ```
160
+
161
+ ### Presentation Rules
162
+ - Always lead with your recommended approach
163
+ - Explain why the recommended approach best fits the gathered requirements
164
+ - Highlight the key differentiator between approaches
165
+ - After presenting all approaches, explicitly ask the user to choose
166
+ - Accept user's choice without pushback, even if it differs from your recommendation
167
+
168
+ ### Recommendation Philosophy
169
+ - **Always identify the ideal long-term solution** — the approach that is architecturally sound, maintainable, and future-proof. Present it clearly so the user understands what "right" looks like.
170
+ - **When the long-term solution requires large-scale changes** that are disproportionate to the task at hand, also present a pragmatic alternative that accomplishes the goal without major disruption. Be explicit about the trade-off: "The ideal solution is X (because...), but a pragmatic path is Y (because the scope of X is disproportionate to the current need)."
171
+ - **Never default to the quick fix without surfacing the long-term option.** The user should always know what they're trading away. But equally, never recommend a large-scale refactor when the task can be accomplished safely with a targeted change.
172
+ - **Label each approach honestly**: which is the long-term investment, which is the pragmatic path, and which (if any) is a stopgap that will create debt.
173
+
174
+ ### Decision Matrix
175
+
176
+ In Standard and Deep modes, after presenting the 2-3 approaches with narrative pros/cons, also present a decision matrix that scores each approach against the gathered requirements. In Quick mode, skip the matrix.
177
+
178
+ **Criteria derivation**: Derive 3-6 scoring criteria from the requirements and constraints gathered during the question phase. Use the user's stated priorities to assign weights (sum to 100%). If the user has not explicitly stated priorities, infer relative weights from the emphasis given during the question phase; equal weighting is acceptable as a last resort. If fewer than 3 meaningful criteria emerge, skip the matrix and use narrative-only recommendation.
179
+
180
+ **Scoring scale**: Score each approach on each criterion using a 1-5 scale: 1=poor fit, 3=adequate, 5=strong fit. Include a brief justification (1 sentence) in each cell.
181
+
182
+ **Matrix format**:
183
+
184
+ | Criterion | Weight | Approach A | Approach B | Approach C (if applicable) |
185
+ |-----------|--------|------------|------------|------------|
186
+ | [Criterion from requirements] | [%] | [1-5]: [justification] | [1-5]: [justification] | [1-5]: [justification] |
187
+ | **Weighted Total** | | [score] | [score] | [score] |
188
+
189
+ **Tie-breaking**: If approaches score within 1 point of each other in weighted totals, present the near-tie explicitly and use narrative judgment to break the tie, citing the single most decisive factor. Do not present a matrix-driven recommendation as definitive when the scores don't clearly differentiate.
190
+
191
+ **Non-differentiating criteria**: Criteria that score identically across all approaches may be noted but should be excluded from the matrix to keep it focused on differentiating factors. If removing non-differentiating criteria leaves fewer than 2 rows, skip the matrix and use narrative-only recommendation.
192
+
193
+ ## Design Convergence Protocol
194
+
195
+ ### Section-by-Section Presentation
196
+
197
+ Present the design document in sections, validating each before proceeding. Scale the number of sections to the task's complexity, but always present at least the **minimum set**.
198
+
199
+ **Minimum sections (always required, regardless of task complexity):**
200
+ 1. Problem Statement
201
+ 2. Approach (Selected Approach, Alternatives Considered)
202
+ 3. Risk Assessment
203
+
204
+ **Full presentation order** (use for medium-to-complex tasks; matches `templates/design-document.md` structure):
205
+ 1. Problem Statement
206
+ 2. Requirements (Functional, Non-Functional, Constraints)
207
+ 3. Approach (Selected Approach, Alternatives Considered, Decision Matrix)
208
+ 4. Architecture (Component Diagram, Data Flow, Key Interfaces)
209
+ 5. Agent Team
210
+ 6. Risk Assessment
211
+ 7. Success Criteria
212
+
213
+ **Complexity guidance:**
214
+ - **Simple** (static sites, single-file scripts, config changes): present the 3 minimum sections. Keep each to 100-150 words.
215
+ - **Medium** (multi-component features, API endpoints, integrations): present sections 1-3 and 6, plus up to 1 other section that surfaces meaningful trade-offs (cap at 5 total). 150-250 words each.
216
+ - **Complex** (new subsystems, cross-cutting refactors, multi-service architectures): present all 7 sections at 200-300 words each.
217
+
218
+ Never skip Problem Statement, Approach, or Risk Assessment. If you believe other sections add no value for the task, omit them — but state which sections you are skipping and why before presenting the first section.
219
+
220
+ ### Validation Format
221
+
222
+ After each section, prompt the user for approval using the user-prompt tool from runtime context with `type: 'yesno'`. Do not rely on a separate assistant message for the section content. The prompt body itself must include the section title and the full section summary (200-300 words) so the user can review the material directly in the approval prompt. End with: "Does this section accurately capture our discussion? Any changes needed before I proceed to [next section name]?"
223
+
224
+ ### Revision Protocol
225
+ - If user requests changes, revise the section and re-present
226
+ - Re-present revised content inside the next approval prompt as well; never ask for approval on a section summary the user cannot see in the prompt
227
+ - Track which sections are approved vs pending
228
+ - Do not proceed to the next section until current section is approved
229
+ - If a later section reveals issues with an earlier section, flag the conflict and propose resolution
230
+
231
+ ### Section Reasoning Guide
232
+
233
+ Apply depth-gated reasoning enrichment to design section content during the convergence phase:
234
+
235
+ | Element | Quick | Standard | Deep |
236
+ |---------|-------|----------|------|
237
+ | Pros/cons on approaches | Yes | Yes | Yes |
238
+ | Recommendation narrative | Yes | Yes | Yes |
239
+ | Decision matrix scoring approaches | No | Yes | Yes |
240
+ | Rationale annotations on section decisions | No | Yes | Yes |
241
+ | Per-decision alternatives considered | No | No | Yes |
242
+ | Requirement traceability (`Traces To`) | No | No | Yes |
243
+
244
+ **Quick mode**: No reasoning annotations. Present sections as-is — current behavior preserved.
245
+
246
+ **Rationale annotations (Standard + Deep)**: For each key design decision within a section, include an inline explanation of why it was chosen, tied to specific project context from the question phase. A key decision is one that, if changed, would require reworking other parts of the design — routine or cosmetic choices (naming, formatting) are not key. Format: `[decision] — *[rationale referencing specific requirements, constraints, or user-stated preferences]*`
247
+
248
+ **Per-decision alternatives (Deep only)**: For key sub-decisions (choices within a section that affect the design's shape), briefly note what was considered and rejected. Format: `[decision] *(considered: [alternative A] — rejected because [reason]; [alternative B] — rejected because [reason])*`
249
+
250
+ **Requirement traceability (Deep only)**: Tag each key decision with `Traces To: REQ-N` referencing the numbered requirement it satisfies from the design document's Requirements section. Every requirement (functional and non-functional) should be traceable to at least one design decision. If the Requirements section was omitted due to complexity guidance (simple tasks), skip requirement traceability markers — rationale annotations and per-decision alternatives still apply.
251
+
252
+ **Uniform application**: Apply the chosen depth mode's reasoning rules uniformly to every section in the convergence phase. Do not selectively skip reasoning on some sections unless the adaptive elision rule applies (the decision is self-evident and requires no justification).
253
+
254
+ ## Design Document Generation
255
+
256
+ ### Output Location
257
+
258
+ The write path depends on whether your runtime provides a Plan Mode surface (check `get_runtime_context`, loaded at session start, step 0):
259
+
260
+ - **Plan Mode active**: Some runtimes restrict writes to a temporary staging directory during Plan Mode. Write the design document there first, then exit Plan Mode and complete the design approval handoff. When the runtime's Plan Mode path is not visible to the MCP server, use the `record_design_approval` content variant so the server materializes the canonical copy under `<state_dir>/plans/`.
261
+ - **Plan Mode not active or not available**: Write directly to the permanent location. If your runtime does not provide Plan Mode, track design progress using the plan-update mechanism from runtime context and use the user-prompt tool from runtime context for section approvals and final signoff.
262
+
263
+ Permanent location: `<state_dir>/plans/YYYY-MM-DD-<topic-slug>-design.md` (where `<state_dir>` resolves from `MAESTRO_STATE_DIR`, default `docs/maestro`).
264
+
265
+ Where:
266
+ - `YYYY-MM-DD` is the current date
267
+ - `<topic-slug>` is a lowercase, hyphenated summary of the task (e.g., `user-auth-system`, `data-pipeline-refactor`)
268
+
269
+ ### Document Structure
270
+ Use the `design-document` template loaded via `get_skill_content`. Include the `design_depth` field in the frontmatter, set to the depth mode chosen during the Design Depth Gate.
271
+
272
+ ### Completion Criteria
273
+ The design document is complete when:
274
+ - All sections have been presented and approved by the user
275
+ - The agent team composition matches the task requirements
276
+ - Phase dependencies are clearly mapped
277
+ - Success criteria are measurable and specific
278
+ - The user has given explicit final approval of the complete document
279
+
280
+ ### Post-Generation
281
+ After writing the design document:
282
+ 1. Confirm the file path to the user
283
+ 2. Summarize key decisions made during the dialogue
284
+ 3. Ask if the user is ready to proceed to implementation planning (Phase 2)