maestro-flow 0.3.8 → 0.3.10

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 (312) hide show
  1. package/.claude/commands/learn-decompose.md +3 -3
  2. package/.claude/commands/learn-follow.md +5 -5
  3. package/.claude/commands/learn-investigate.md +3 -3
  4. package/.claude/commands/learn-retro.md +6 -6
  5. package/.claude/commands/learn-second-opinion.md +3 -3
  6. package/.claude/commands/maestro-analyze.md +166 -99
  7. package/.claude/commands/maestro-brainstorm.md +2 -2
  8. package/.claude/commands/maestro-execute.md +151 -97
  9. package/.claude/commands/maestro-fork.md +111 -0
  10. package/.claude/commands/maestro-init.md +6 -6
  11. package/.claude/commands/maestro-merge.md +77 -0
  12. package/.claude/commands/maestro-milestone-audit.md +72 -60
  13. package/.claude/commands/maestro-milestone-complete.md +67 -59
  14. package/.claude/commands/maestro-milestone-release.md +6 -6
  15. package/.claude/commands/maestro-plan.md +167 -130
  16. package/.claude/commands/maestro-quick.md +4 -4
  17. package/.claude/commands/maestro-roadmap.md +5 -5
  18. package/.claude/commands/maestro-spec-generate.md +5 -5
  19. package/.claude/commands/maestro-ui-design.md +3 -3
  20. package/.claude/commands/maestro-verify.md +106 -87
  21. package/.claude/commands/maestro.md +10 -4
  22. package/.claude/commands/manage-codebase-rebuild.md +4 -4
  23. package/.claude/commands/manage-codebase-refresh.md +1 -1
  24. package/.claude/commands/manage-harvest.md +6 -6
  25. package/.claude/commands/manage-issue-discover.md +2 -2
  26. package/.claude/commands/manage-issue.md +7 -7
  27. package/.claude/commands/manage-learn.md +2 -2
  28. package/.claude/commands/manage-memory-capture.md +4 -4
  29. package/.claude/commands/manage-memory.md +2 -2
  30. package/.claude/commands/manage-status.md +24 -24
  31. package/.claude/commands/quality-business-test.md +5 -5
  32. package/.claude/commands/quality-debug.md +4 -4
  33. package/.claude/commands/quality-integration-test.md +4 -4
  34. package/.claude/commands/quality-refactor.md +3 -3
  35. package/.claude/commands/quality-retrospective.md +2 -2
  36. package/.claude/commands/quality-review.md +4 -4
  37. package/.claude/commands/quality-sync.md +3 -3
  38. package/.claude/commands/quality-test-gen.md +4 -4
  39. package/.claude/commands/quality-test.md +9 -9
  40. package/.claude/commands/spec-add.md +2 -2
  41. package/.claude/commands/spec-load.md +1 -1
  42. package/.claude/commands/spec-setup.md +5 -5
  43. package/.claude/commands/wiki-connect.md +3 -3
  44. package/.claude/commands/wiki-digest.md +4 -4
  45. package/.codex/skills/maestro/SKILL.md +463 -0
  46. package/.codex/skills/maestro-analyze/SKILL.md +79 -20
  47. package/.codex/skills/maestro-chain/SKILL.md +248 -0
  48. package/.codex/skills/maestro-coordinate/SKILL.md +279 -224
  49. package/.codex/skills/maestro-execute/SKILL.md +35 -26
  50. package/.codex/skills/maestro-milestone-audit/SKILL.md +103 -209
  51. package/.codex/skills/maestro-milestone-complete/SKILL.md +149 -158
  52. package/.codex/skills/maestro-plan/SKILL.md +56 -18
  53. package/.codex/skills/maestro-roadmap/SKILL.md +3 -2
  54. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +2 -2
  55. package/.codex/skills/team-executor/roles/executor/commands/monitor.md +1 -1
  56. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +2 -2
  57. package/.codex/skills/team-lifecycle-v4/specs/knowledge-transfer.md +2 -2
  58. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +1 -1
  59. package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +1 -1
  60. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +1 -1
  61. package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +1 -1
  62. package/README.md +26 -21
  63. package/README.zh-CN.md +23 -19
  64. package/bin/maestro-mcp.js +1 -1
  65. package/chains/_intent-map.json +21 -9
  66. package/chains/_router.json +30 -77
  67. package/chains/brainstorm-driven.json +17 -6
  68. package/chains/full-lifecycle.json +22 -23
  69. package/chains/issue-lifecycle.json +13 -13
  70. package/chains/milestone-close.json +20 -7
  71. package/chains/milestone-fork-merge.json +50 -0
  72. package/chains/roadmap-driven.json +17 -6
  73. package/chains/singles/issue-analyze.json +3 -3
  74. package/chains/singles/issue-execute.json +3 -3
  75. package/chains/singles/issue-plan.json +3 -3
  76. package/chains/spec-driven.json +17 -6
  77. package/dashboard/dist/assets/{ArtifactsPage-BmPOu8sO.js → ArtifactsPage-DZNCi6tn.js} +12 -7
  78. package/dashboard/dist/assets/ChatInput-Bvr-FeEq.js +49 -0
  79. package/dashboard/dist/assets/ChatPage-D9zTkJZo.js +22 -0
  80. package/dashboard/dist/assets/CollabPage-B4NAHXS2.js +1 -0
  81. package/dashboard/dist/assets/ExecutionPanel-CFt4LJyq.js +1 -0
  82. package/dashboard/dist/assets/KanbanPage-C8USth6H.js +21 -0
  83. package/dashboard/dist/assets/{MarkdownRenderer-BjZ43aSa.js → MarkdownRenderer-X4af_WNb.js} +1 -1
  84. package/dashboard/dist/assets/McpPage-BKfCVIyU.js +21 -0
  85. package/dashboard/dist/assets/OutputPanel-BlBQFJSW.js +1 -0
  86. package/dashboard/dist/assets/ProblemsPanel-De3DLvoI.js +1 -0
  87. package/dashboard/dist/assets/{RequirementBoardPage-B7yRL0s_.js → RequirementBoardPage-Bf1trzqs.js} +2 -2
  88. package/dashboard/dist/assets/{RequirementPage-D8J_-b6O.js → RequirementPage-Bllxe2XI.js} +10 -5
  89. package/dashboard/dist/assets/{SpecsPage-6lO8v8_C.js → SpecsPage-9lwxKT27.js} +2 -2
  90. package/dashboard/dist/assets/{SupervisorPage-Ds5N378a.js → SupervisorPage-SusdfHFq.js} +1 -1
  91. package/dashboard/dist/assets/{TeamsPage-DrkKr17T.js → TeamsPage-DsuM6OwC.js} +2 -2
  92. package/dashboard/dist/assets/TreeBrowser-Q12qobZs.js +6 -0
  93. package/dashboard/dist/assets/WorkflowPage-D_Fzdy3_.js +6 -0
  94. package/dashboard/dist/assets/{arrow-left-CadP5YgU.js → arrow-left-Bqtb2hle.js} +1 -1
  95. package/dashboard/dist/assets/{check-5xufDzS8.js → check-u6fGOwQO.js} +1 -1
  96. package/dashboard/dist/assets/{chevron-right-CYbpR4ev.js → chevron-right-Csu22t58.js} +1 -1
  97. package/dashboard/dist/assets/{circle-Bm-5Q-Yh.js → circle-CMrkbRNg.js} +1 -1
  98. package/dashboard/dist/assets/{circle-alert-BqcYuT7x.js → circle-alert-c3tH1P4z.js} +1 -1
  99. package/dashboard/dist/assets/{circle-check-big-yyzAFysU.js → circle-check-big-TDSeWstm.js} +1 -1
  100. package/dashboard/dist/assets/{circle-check-DEVzW_lm.js → circle-check-gYxxSYuH.js} +1 -1
  101. package/dashboard/dist/assets/{code-BBdC8Wmw.js → code-CFN2uX9V.js} +1 -1
  102. package/dashboard/dist/assets/{columns-3-CQ9Trztr.js → columns-3-38xIDlzy.js} +1 -1
  103. package/dashboard/dist/assets/{download-DayuF-sn.js → download-DC7KkKyP.js} +1 -1
  104. package/dashboard/dist/assets/{folder-CqXeSKeC.js → folder-CWq_lAnf.js} +1 -1
  105. package/dashboard/dist/assets/index-DWG-WrzT.js +231 -0
  106. package/dashboard/dist/assets/{index-Dru5HYy0.js → index-Do71weNR.js} +1 -1
  107. package/dashboard/dist/assets/index-GUNJodSR.css +1 -0
  108. package/dashboard/dist/assets/{list-DBOD6IUt.js → list-CgIP_2A-.js} +1 -1
  109. package/dashboard/dist/assets/{minus-fQI1Syn2.js → minus-DYoN5UGk.js} +1 -1
  110. package/dashboard/dist/assets/{pen-line-Bkbbngl5.js → pen-line-Bh_WKYHm.js} +1 -1
  111. package/dashboard/dist/assets/{proxy-teW12DdZ.js → proxy-BKxDAKTj.js} +1 -1
  112. package/dashboard/dist/assets/{search-Bq3ygFUW.js → search-SieXnOgr.js} +1 -1
  113. package/dashboard/dist/assets/{shallow-22ZN8sFt.js → shallow-Bme1JY57.js} +1 -1
  114. package/dashboard/dist/assets/{table-BEYtdWc4.js → table-llyEtj-7.js} +1 -1
  115. package/dashboard/dist/assets/terminal-BB3Xfuv5.js +6 -0
  116. package/dashboard/dist/assets/{trash-2-DMqGBgcF.js → trash-2-C8f4vFFM.js} +1 -1
  117. package/dashboard/dist/assets/{zap-9DVkGVtt.js → zap-4uwlzVm0.js} +1 -1
  118. package/dashboard/dist/index.html +2 -2
  119. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +8 -4
  120. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
  121. package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.d.ts +1 -0
  122. package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.js +2 -1
  123. package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.js.map +1 -1
  124. package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js +20 -10
  125. package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
  126. package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js +2 -2
  127. package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js.map +1 -1
  128. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +3 -3
  129. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
  130. package/dashboard/dist-server/dashboard/src/server/routes/git.d.ts +2 -0
  131. package/dashboard/dist-server/dashboard/src/server/routes/git.js +79 -0
  132. package/dashboard/dist-server/dashboard/src/server/routes/git.js.map +1 -0
  133. package/dashboard/dist-server/dashboard/src/server/routes/index.js +3 -0
  134. package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
  135. package/dashboard/dist-server/dashboard/src/server/routes/issues.js +34 -0
  136. package/dashboard/dist-server/dashboard/src/server/routes/issues.js.map +1 -1
  137. package/dashboard/dist-server/dashboard/src/server/routes/workspace.js +43 -0
  138. package/dashboard/dist-server/dashboard/src/server/routes/workspace.js.map +1 -1
  139. package/dashboard/dist-server/dashboard/src/server/state/state-manager.js +43 -3
  140. package/dashboard/dist-server/dashboard/src/server/state/state-manager.js.map +1 -1
  141. package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js +2 -3
  142. package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js.map +1 -1
  143. package/dashboard/dist-server/dashboard/src/shared/issue-types.d.ts +5 -0
  144. package/dashboard/dist-server/dashboard/src/shared/issue-types.js.map +1 -1
  145. package/dashboard/dist-server/dashboard/src/shared/normalize-task.d.ts +2 -0
  146. package/dashboard/dist-server/dashboard/src/shared/normalize-task.js +75 -0
  147. package/dashboard/dist-server/dashboard/src/shared/normalize-task.js.map +1 -0
  148. package/dashboard/dist-server/src/hooks/constants.d.ts +90 -12
  149. package/dashboard/dist-server/src/hooks/constants.js +149 -16
  150. package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
  151. package/dashboard/dist-server/src/types/index.d.ts +5 -0
  152. package/dashboard/package.json +59 -59
  153. package/dist/src/cli.js +3 -1
  154. package/dist/src/cli.js.map +1 -1
  155. package/dist/src/commands/collab.d.ts +14 -0
  156. package/dist/src/commands/collab.d.ts.map +1 -0
  157. package/dist/src/commands/{team.js → collab.js} +395 -96
  158. package/dist/src/commands/collab.js.map +1 -0
  159. package/dist/src/commands/hooks.d.ts +5 -1
  160. package/dist/src/commands/hooks.d.ts.map +1 -1
  161. package/dist/src/commands/hooks.js +50 -10
  162. package/dist/src/commands/hooks.js.map +1 -1
  163. package/dist/src/commands/install-ui/InstallConfirm.d.ts +3 -1
  164. package/dist/src/commands/install-ui/InstallConfirm.d.ts.map +1 -1
  165. package/dist/src/commands/install-ui/InstallConfirm.js +3 -1
  166. package/dist/src/commands/install-ui/InstallConfirm.js.map +1 -1
  167. package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
  168. package/dist/src/commands/install-ui/InstallExecution.js +5 -1
  169. package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
  170. package/dist/src/commands/install-ui/InstallFlow.d.ts.map +1 -1
  171. package/dist/src/commands/install-ui/InstallFlow.js +7 -3
  172. package/dist/src/commands/install-ui/InstallFlow.js.map +1 -1
  173. package/dist/src/commands/install-ui/StatuslineConfig.d.ts +6 -1
  174. package/dist/src/commands/install-ui/StatuslineConfig.d.ts.map +1 -1
  175. package/dist/src/commands/install-ui/StatuslineConfig.js +27 -5
  176. package/dist/src/commands/install-ui/StatuslineConfig.js.map +1 -1
  177. package/dist/src/commands/msg.d.ts.map +1 -1
  178. package/dist/src/commands/msg.js +4 -3
  179. package/dist/src/commands/msg.js.map +1 -1
  180. package/dist/src/hooks/__tests__/statusline-visual-test.d.ts +7 -0
  181. package/dist/src/hooks/__tests__/statusline-visual-test.d.ts.map +1 -0
  182. package/dist/src/hooks/__tests__/statusline-visual-test.js +236 -0
  183. package/dist/src/hooks/__tests__/statusline-visual-test.js.map +1 -0
  184. package/dist/src/hooks/constants.d.ts +90 -12
  185. package/dist/src/hooks/constants.d.ts.map +1 -1
  186. package/dist/src/hooks/constants.js +149 -16
  187. package/dist/src/hooks/constants.js.map +1 -1
  188. package/dist/src/hooks/guards/index.d.ts +1 -0
  189. package/dist/src/hooks/guards/index.d.ts.map +1 -1
  190. package/dist/src/hooks/guards/index.js +1 -0
  191. package/dist/src/hooks/guards/index.js.map +1 -1
  192. package/dist/src/hooks/guards/preflight-guard.d.ts +29 -0
  193. package/dist/src/hooks/guards/preflight-guard.d.ts.map +1 -0
  194. package/dist/src/hooks/guards/preflight-guard.js +95 -0
  195. package/dist/src/hooks/guards/preflight-guard.js.map +1 -0
  196. package/dist/src/hooks/index.d.ts +1 -0
  197. package/dist/src/hooks/index.d.ts.map +1 -1
  198. package/dist/src/hooks/index.js +1 -0
  199. package/dist/src/hooks/index.js.map +1 -1
  200. package/dist/src/{commands/team.d.ts → hooks/preflight-core.d.ts} +12 -22
  201. package/dist/src/hooks/preflight-core.d.ts.map +1 -0
  202. package/dist/src/hooks/preflight-core.js +86 -0
  203. package/dist/src/hooks/preflight-core.js.map +1 -0
  204. package/dist/src/hooks/statusline.d.ts +8 -17
  205. package/dist/src/hooks/statusline.d.ts.map +1 -1
  206. package/dist/src/hooks/statusline.js +269 -112
  207. package/dist/src/hooks/statusline.js.map +1 -1
  208. package/dist/src/hooks/team-monitor.d.ts.map +1 -1
  209. package/dist/src/hooks/team-monitor.js +16 -0
  210. package/dist/src/hooks/team-monitor.js.map +1 -1
  211. package/dist/src/i18n/locales/en.d.ts.map +1 -1
  212. package/dist/src/i18n/locales/en.js +5 -0
  213. package/dist/src/i18n/locales/en.js.map +1 -1
  214. package/dist/src/i18n/locales/zh.d.ts.map +1 -1
  215. package/dist/src/i18n/locales/zh.js +5 -0
  216. package/dist/src/i18n/locales/zh.js.map +1 -1
  217. package/dist/src/i18n/types.d.ts +5 -0
  218. package/dist/src/i18n/types.d.ts.map +1 -1
  219. package/dist/src/tools/collab-adapter.d.ts +102 -0
  220. package/dist/src/tools/collab-adapter.d.ts.map +1 -0
  221. package/dist/src/tools/collab-adapter.js +458 -0
  222. package/dist/src/tools/collab-adapter.js.map +1 -0
  223. package/dist/src/tools/merge-validator.d.ts +24 -0
  224. package/dist/src/tools/merge-validator.d.ts.map +1 -0
  225. package/dist/src/tools/merge-validator.js +220 -0
  226. package/dist/src/tools/merge-validator.js.map +1 -0
  227. package/dist/src/tools/namespace-guard.d.ts +2 -0
  228. package/dist/src/tools/namespace-guard.d.ts.map +1 -1
  229. package/dist/src/tools/namespace-guard.js +12 -0
  230. package/dist/src/tools/namespace-guard.js.map +1 -1
  231. package/dist/src/tools/phase-gate-evaluator.d.ts +45 -0
  232. package/dist/src/tools/phase-gate-evaluator.d.ts.map +1 -0
  233. package/dist/src/tools/phase-gate-evaluator.js +42 -0
  234. package/dist/src/tools/phase-gate-evaluator.js.map +1 -0
  235. package/dist/src/tools/team-members.d.ts +18 -0
  236. package/dist/src/tools/team-members.d.ts.map +1 -1
  237. package/dist/src/tools/team-members.js +50 -0
  238. package/dist/src/tools/team-members.js.map +1 -1
  239. package/dist/src/tools/team-tasks.d.ts +120 -0
  240. package/dist/src/tools/team-tasks.d.ts.map +1 -0
  241. package/dist/src/tools/team-tasks.js +365 -0
  242. package/dist/src/tools/team-tasks.js.map +1 -0
  243. package/dist/src/tools/transition-recorder.d.ts +3 -0
  244. package/dist/src/tools/transition-recorder.d.ts.map +1 -1
  245. package/dist/src/tools/transition-recorder.js +52 -1
  246. package/dist/src/tools/transition-recorder.js.map +1 -1
  247. package/dist/src/types/index.d.ts +5 -0
  248. package/dist/src/types/index.d.ts.map +1 -1
  249. package/dist/src/utils/get-version.d.ts.map +1 -1
  250. package/dist/src/utils/get-version.js +15 -4
  251. package/dist/src/utils/get-version.js.map +1 -1
  252. package/package.json +1 -1
  253. package/templates/cli/prompts/workflow-skill-conflict-patterns.txt +3 -3
  254. package/templates/cli/prompts/workflow-skill-lessons-learned.txt +3 -3
  255. package/templates/config.json +7 -0
  256. package/templates/search-tools.md +1 -1
  257. package/templates/worktree-scope.json +10 -0
  258. package/templates/worktrees.json +27 -0
  259. package/workflows/analyze.md +86 -36
  260. package/workflows/brainstorm.md +17 -37
  261. package/workflows/cli-tools-usage.md +44 -27
  262. package/workflows/delegate-usage.md +3 -3
  263. package/workflows/execute.md +94 -28
  264. package/workflows/fork.md +309 -0
  265. package/workflows/init.md +10 -1
  266. package/workflows/issue-analyze.md +6 -2
  267. package/workflows/issue-discover.md +4 -4
  268. package/workflows/issue-execute.md +6 -3
  269. package/workflows/issue-plan.md +5 -2
  270. package/workflows/issue.md +66 -7
  271. package/workflows/maestro-coordinate.codex.md +281 -470
  272. package/workflows/maestro-coordinate.md +37 -30
  273. package/workflows/maestro-link-coordinate.md +2 -2
  274. package/workflows/maestro.codex.md +710 -0
  275. package/workflows/maestro.md +62 -46
  276. package/workflows/merge.md +285 -0
  277. package/workflows/milestone-audit.md +89 -70
  278. package/workflows/milestone-complete.md +89 -156
  279. package/workflows/plan.md +122 -17
  280. package/workflows/retrospective.md +4 -4
  281. package/workflows/roadmap.md +11 -3
  282. package/workflows/spec-generate.md +9 -0
  283. package/workflows/status.md +76 -27
  284. package/workflows/ui-design.md +14 -12
  285. package/workflows/verify.md +44 -8
  286. package/.claude/commands/maestro-phase-add.md +0 -63
  287. package/.claude/commands/maestro-phase-transition.md +0 -75
  288. package/.claude/commands/manage-issue-analyze.md +0 -62
  289. package/.claude/commands/manage-issue-execute.md +0 -73
  290. package/.claude/commands/manage-issue-plan.md +0 -62
  291. package/.codex/skills/maestro-phase-add/SKILL.md +0 -154
  292. package/.codex/skills/maestro-phase-transition/SKILL.md +0 -173
  293. package/.codex/skills/manage-issue-analyze/SKILL.md +0 -207
  294. package/.codex/skills/manage-issue-execute/SKILL.md +0 -200
  295. package/.codex/skills/manage-issue-plan/SKILL.md +0 -186
  296. package/chains/singles/phase-add.json +0 -31
  297. package/chains/singles/phase-transition.json +0 -23
  298. package/dashboard/dist/assets/ChatInput-CL8YDfOU.js +0 -67
  299. package/dashboard/dist/assets/ChatPage-CT-ozBK2.js +0 -8
  300. package/dashboard/dist/assets/CollabPage-C0rWMden.js +0 -1
  301. package/dashboard/dist/assets/KanbanPage-C6WbAlwI.js +0 -16
  302. package/dashboard/dist/assets/McpPage-BPIXADQi.js +0 -16
  303. package/dashboard/dist/assets/TreeBrowser-g_QUKemL.js +0 -11
  304. package/dashboard/dist/assets/WorkflowPage-X8aNkDEr.js +0 -6
  305. package/dashboard/dist/assets/git-branch-SqFf4Ru5.js +0 -6
  306. package/dashboard/dist/assets/index-D2Mtyw7I.css +0 -1
  307. package/dashboard/dist/assets/index-nufWop4p.js +0 -231
  308. package/dashboard/dist/assets/wrench-B84-zdLI.js +0 -11
  309. package/dist/src/commands/team.d.ts.map +0 -1
  310. package/dist/src/commands/team.js.map +0 -1
  311. package/workflows/phase-add.md +0 -252
  312. package/workflows/phase-transition.md +0 -399
@@ -0,0 +1,236 @@
1
+ /**
2
+ * Visual test for dual-mode statusline with custom SVG icons.
3
+ *
4
+ * Usage: npx tsx src/hooks/__tests__/statusline-visual-test.ts
5
+ */
6
+ import { writeFileSync } from 'node:fs';
7
+ import { join } from 'node:path';
8
+ import { tmpdir } from 'node:os';
9
+ import { SEGMENT_BG, SEGMENT_FG, TEXT_COLORS, getCtxLevel, } from '../constants.js';
10
+ // ---------------------------------------------------------------------------
11
+ // SVG Icon Library — unified minimalist line style, 14x14 viewBox
12
+ // ---------------------------------------------------------------------------
13
+ const SVG_ICONS = {
14
+ // Model — sparkle/star
15
+ model: `<svg viewBox="0 0 14 14" class="icon"><path d="M7 1l1.5 4H13l-3.5 2.5L11 12 7 9.5 3 12l1.5-4.5L1 5h4.5z" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/></svg>`,
16
+ // Milestone — flag
17
+ milestone: `<svg viewBox="0 0 14 14" class="icon"><path d="M3 2v10M3 2h7l-2 3 2 3H3" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round" stroke-linecap="round"/></svg>`,
18
+ // Phase — diamond
19
+ phase: `<svg viewBox="0 0 14 14" class="icon"><path d="M7 2l5 5-5 5-5-5z" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/></svg>`,
20
+ // Coordinator — gear
21
+ coord: `<svg viewBox="0 0 14 14" class="icon"><circle cx="7" cy="7" r="2" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M7 1v1.5M7 11.5V13M1 7h1.5M11.5 7H13M2.8 2.8l1 1M10.2 10.2l1 1M11.2 2.8l-1 1M3.8 10.2l-1 1" stroke="currentColor" stroke-width="1" stroke-linecap="round"/></svg>`,
22
+ // Task — pencil/edit
23
+ task: `<svg viewBox="0 0 14 14" class="icon"><path d="M2 12l1-4L10 1l3 3-7 7zm7-9l3 3" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/></svg>`,
24
+ // Team — people
25
+ team: `<svg viewBox="0 0 14 14" class="icon"><circle cx="5" cy="4" r="2" fill="none" stroke="currentColor" stroke-width="1.1"/><circle cx="10" cy="4" r="1.5" fill="none" stroke="currentColor" stroke-width="1.1"/><path d="M1 12c0-2.5 2-4 4-4s4 1.5 4 4M8 12c0-1.8 1-3 2.5-3s2.5 1.2 2.5 3" fill="none" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/></svg>`,
26
+ // Directory — folder
27
+ dir: `<svg viewBox="0 0 14 14" class="icon"><path d="M2 3h4l1 1.5H12v7H2z" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/></svg>`,
28
+ // Git — branch
29
+ git: `<svg viewBox="0 0 14 14" class="icon"><circle cx="4" cy="4" r="1.5" fill="none" stroke="currentColor" stroke-width="1.1"/><circle cx="4" cy="11" r="1.5" fill="none" stroke="currentColor" stroke-width="1.1"/><circle cx="10" cy="6" r="1.5" fill="none" stroke="currentColor" stroke-width="1.1"/><path d="M4 5.5v4M8.5 6C7 6 4 6 4 8" fill="none" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/></svg>`,
30
+ // Context — gauge/meter
31
+ ctx: `<svg viewBox="0 0 14 14" class="icon"><path d="M2 10a5.5 5.5 0 1 1 10 0" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/><path d="M7 10V5.5" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/><circle cx="7" cy="10" r="1" fill="currentColor"/></svg>`,
32
+ };
33
+ function rgb(c) {
34
+ return `rgb(${c[0]},${c[1]},${c[2]})`;
35
+ }
36
+ const ctxBg = (pct) => {
37
+ const m = { ok: SEGMENT_BG.ctxOk, warn: SEGMENT_BG.ctxWarn, alert: SEGMENT_BG.ctxAlert, crit: SEGMENT_BG.ctxCrit };
38
+ return m[getCtxLevel(pct)];
39
+ };
40
+ const ctxFg = (pct) => {
41
+ const m = { ok: SEGMENT_FG.ctxOk, warn: SEGMENT_FG.ctxWarn, alert: SEGMENT_FG.ctxAlert, crit: SEGMENT_FG.ctxCrit };
42
+ return m[getCtxLevel(pct)];
43
+ };
44
+ const ctxKey = (pct) => `ctx${getCtxLevel(pct).charAt(0).toUpperCase()}${getCtxLevel(pct).slice(1)}`;
45
+ function bar(pct) {
46
+ const f = Math.floor(pct / 10);
47
+ return '\u2588'.repeat(f) + '\u2591'.repeat(10 - f);
48
+ }
49
+ function esc(s) {
50
+ return s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
51
+ }
52
+ // ---------------------------------------------------------------------------
53
+ // Scenarios
54
+ // ---------------------------------------------------------------------------
55
+ const scenarios = [
56
+ {
57
+ label: '1. Minimal — solo, no workflow',
58
+ segments: [
59
+ { icon: 'model', key: 'model', text: 'Opus 4', bg: SEGMENT_BG.model, fg: SEGMENT_FG.model },
60
+ { icon: 'dir', key: 'dir', text: 'maestro2', bg: SEGMENT_BG.dir, fg: SEGMENT_FG.dir },
61
+ { icon: 'git', key: 'dir', text: 'master ✓', bg: SEGMENT_BG.dir, fg: SEGMENT_FG.dir },
62
+ { icon: 'ctx', key: ctxKey(30), text: `${bar(30)} 30%`, bg: ctxBg(30), fg: ctxFg(30) },
63
+ ],
64
+ },
65
+ {
66
+ label: '2. With milestone + phase — context warn',
67
+ segments: [
68
+ { icon: 'model', key: 'model', text: 'Sonnet 4', bg: SEGMENT_BG.model, fg: SEGMENT_FG.model },
69
+ { icon: 'milestone', key: 'milestone', text: 'MVP 1/4', bg: SEGMENT_BG.milestone, fg: SEGMENT_FG.milestone },
70
+ { icon: 'phase', key: 'phase', text: 'P2.1 [2plan 1run]', bg: SEGMENT_BG.phase, fg: SEGMENT_FG.phase },
71
+ { icon: 'dir', key: 'dir', text: 'maestro2', bg: SEGMENT_BG.dir, fg: SEGMENT_FG.dir },
72
+ { icon: 'git', key: 'dir', text: 'master ●', bg: SEGMENT_BG.dir, fg: SEGMENT_FG.dir },
73
+ { icon: 'ctx', key: ctxKey(54), text: `${bar(54)} 54%`, bg: ctxBg(54), fg: ctxFg(54) },
74
+ ],
75
+ },
76
+ {
77
+ label: '3. Full — coordinator + task + team',
78
+ segments: [
79
+ { icon: 'model', key: 'model', text: 'Opus 4', bg: SEGMENT_BG.model, fg: SEGMENT_FG.model },
80
+ { icon: 'milestone', key: 'milestone', text: 'MVP 2/4', bg: SEGMENT_BG.milestone, fg: SEGMENT_FG.milestone },
81
+ { icon: 'phase', key: 'phase', text: 'P3 [3plan]', bg: SEGMENT_BG.phase, fg: SEGMENT_FG.phase },
82
+ { icon: 'coord', key: 'coord', text: 'full-lifecycle verify [3/6]', bg: SEGMENT_BG.coord, fg: SEGMENT_FG.coord },
83
+ { icon: 'task', key: 'task', text: 'Fixing auth module', bg: SEGMENT_BG.task, fg: SEGMENT_FG.task },
84
+ { icon: 'team', key: 'team', text: 'alice (P3/001) | bob +2', bg: SEGMENT_BG.team, fg: SEGMENT_FG.team },
85
+ { icon: 'dir', key: 'dir', text: 'maestro2', bg: SEGMENT_BG.dir, fg: SEGMENT_FG.dir },
86
+ { icon: 'git', key: 'dir', text: 'feat/auth ●↑2', bg: SEGMENT_BG.dir, fg: SEGMENT_FG.dir },
87
+ { icon: 'ctx', key: ctxKey(66), text: `${bar(66)} 66%`, bg: ctxBg(66), fg: ctxFg(66) },
88
+ ],
89
+ },
90
+ {
91
+ label: '4. Critical context — 92%',
92
+ segments: [
93
+ { icon: 'model', key: 'model', text: 'Haiku 4.5', bg: SEGMENT_BG.model, fg: SEGMENT_FG.model },
94
+ { icon: 'milestone', key: 'milestone', text: 'Production 3/4', bg: SEGMENT_BG.milestone, fg: SEGMENT_FG.milestone },
95
+ { icon: 'phase', key: 'phase', text: 'P4', bg: SEGMENT_BG.phase, fg: SEGMENT_FG.phase },
96
+ { icon: 'dir', key: 'dir', text: 'maestro2', bg: SEGMENT_BG.dir, fg: SEGMENT_FG.dir },
97
+ { icon: 'git', key: 'dir', text: 'main ✓', bg: SEGMENT_BG.dir, fg: SEGMENT_FG.dir },
98
+ { icon: 'ctx', key: ctxKey(92), text: `${bar(92)} 92%`, bg: ctxBg(92), fg: ctxFg(92) },
99
+ ],
100
+ },
101
+ {
102
+ label: '5. No workflow, no context',
103
+ segments: [
104
+ { icon: 'model', key: 'model', text: 'Claude', bg: SEGMENT_BG.model, fg: SEGMENT_FG.model },
105
+ { icon: 'dir', key: 'dir', text: 'my-project', bg: SEGMENT_BG.dir, fg: SEGMENT_FG.dir },
106
+ { icon: 'git', key: 'dir', text: 'develop ⚠↓3', bg: SEGMENT_BG.dir, fg: SEGMENT_FG.dir },
107
+ ],
108
+ },
109
+ ];
110
+ // ---------------------------------------------------------------------------
111
+ // Renderers
112
+ // ---------------------------------------------------------------------------
113
+ function svgIcon(key) {
114
+ return SVG_ICONS[key] || '';
115
+ }
116
+ /** Powerline — colored bg + SVG dovetail arrows */
117
+ function renderPowerline(segs) {
118
+ // Merge consecutive same-bg segments (dir + git)
119
+ const merged = mergeAdjacentDir(segs);
120
+ let html = '<div class="pl-line">';
121
+ for (let i = 0; i < merged.length; i++) {
122
+ const s = merged[i];
123
+ html += `<span class="pl-seg" style="background:${rgb(s.bg)};color:${rgb(s.fg)}">${s.iconHtml}<span class="seg-text">${esc(s.text)}</span></span>`;
124
+ const nextBg = i < merged.length - 1 ? rgb(merged[i + 1].bg) : '#1e1e2e';
125
+ // Classic Powerline dovetail: right-pointing arrow (current color) on next-bg
126
+ html += `<svg class="pl-arrow" viewBox="0 0 14 28" preserveAspectRatio="none">` +
127
+ `<rect width="14" height="28" fill="${nextBg}"/>` +
128
+ `<polygon points="0,0 14,14 0,28" fill="${rgb(s.bg)}"/>` +
129
+ `</svg>`;
130
+ }
131
+ html += '</div>';
132
+ return html;
133
+ }
134
+ /** Colored text — colored text on dark bg + pipe separators */
135
+ function renderText(segs) {
136
+ const merged = mergeAdjacentDir(segs);
137
+ const parts = merged.map((s) => {
138
+ const ck = s.key;
139
+ const color = TEXT_COLORS[ck] ?? TEXT_COLORS.model;
140
+ return `<span style="color:${rgb(color)}">${s.iconHtml}<span class="seg-text">${esc(s.text)}</span></span>`;
141
+ });
142
+ const pipe = `<span class="pipe">|</span>`;
143
+ return `<div class="txt-line">${parts.join(pipe)}</div>`;
144
+ }
145
+ /** Merge dir+git into one segment to avoid redundant separators */
146
+ function mergeAdjacentDir(segs) {
147
+ const result = [];
148
+ for (let i = 0; i < segs.length; i++) {
149
+ const s = segs[i];
150
+ if (s.icon === 'dir' && i + 1 < segs.length && segs[i + 1].icon === 'git') {
151
+ const g = segs[i + 1];
152
+ result.push({
153
+ ...s,
154
+ text: `${s.text} ${g.text}`,
155
+ iconHtml: svgIcon('dir') + `<span class="seg-text">${esc(s.text)}</span> ` + svgIcon('git'),
156
+ });
157
+ // Override: we already embedded text in iconHtml, clear the text field
158
+ result[result.length - 1].text = g.text;
159
+ i++; // skip git segment
160
+ }
161
+ else {
162
+ result.push({ ...s, iconHtml: svgIcon(s.icon) });
163
+ }
164
+ }
165
+ return result;
166
+ }
167
+ // ---------------------------------------------------------------------------
168
+ // HTML
169
+ // ---------------------------------------------------------------------------
170
+ const rows = scenarios.map(s => `
171
+ <div class="scenario">
172
+ <div class="label">${s.label}</div>
173
+ <div class="mode-tag">POWERLINE</div>
174
+ ${renderPowerline(s.segments)}
175
+ <div class="mode-tag">COLORED TEXT</div>
176
+ ${renderText(s.segments)}
177
+ </div>`).join('\n');
178
+ const iconRef = Object.entries(SVG_ICONS).map(([k, v]) => `<div class="icon-item"><span class="icon-preview" style="color:#89b4fa">${v}</span><span class="icon-name">${k}</span></div>`).join('');
179
+ const html = `<!DOCTYPE html>
180
+ <html><head>
181
+ <meta charset="utf-8">
182
+ <title>Maestro Statusline — Dual Mode + SVG Icons</title>
183
+ <style>
184
+ * { box-sizing: border-box; }
185
+ body {
186
+ background: #1e1e2e; color: #cdd6f4; padding: 32px 40px;
187
+ font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
188
+ font-size: 13px; line-height: 1.5;
189
+ }
190
+ h1 { color: #89b4fa; font-size: 18px; margin-bottom: 8px; font-weight: 500; }
191
+ h2 { color: #a6adc8; font-size: 14px; margin: 32px 0 12px; font-weight: 400; }
192
+ .subtitle { color: #585b70; font-size: 11px; margin-bottom: 28px; }
193
+
194
+ .scenario { margin-bottom: 28px; }
195
+ .label { color: #a6adc8; font-size: 12px; margin-bottom: 8px; }
196
+ .mode-tag { color: #45475a; font-size: 9px; letter-spacing: 1.5px; margin: 4px 0 3px; text-transform: uppercase; }
197
+
198
+ /* Powerline */
199
+ .pl-line { display: inline-flex; align-items: stretch; height: 28px; }
200
+ .pl-seg { padding: 0 10px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
201
+ .pl-arrow { width: 14px; height: 28px; flex-shrink: 0; display: block; margin: 0; padding: 0; }
202
+
203
+ /* Colored text */
204
+ .txt-line { display: inline-flex; align-items: center; background: #181825; padding: 4px 14px; border-radius: 6px; height: 28px; gap: 0; }
205
+ .txt-line > span { display: inline-flex; align-items: center; gap: 4px; }
206
+ .pipe { color: rgb(${TEXT_COLORS.separator.join(',')}); margin: 0 8px; }
207
+
208
+ .seg-text { white-space: nowrap; }
209
+
210
+ /* SVG icons */
211
+ .icon { width: 14px; height: 14px; flex-shrink: 0; vertical-align: middle; }
212
+
213
+ /* Icon reference */
214
+ .icon-grid { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 8px; }
215
+ .icon-item { display: flex; align-items: center; gap: 6px; }
216
+ .icon-preview .icon { width: 20px; height: 20px; }
217
+ .icon-name { color: #585b70; font-size: 11px; }
218
+
219
+ .footer { margin-top: 32px; color: #45475a; font-size: 11px; }
220
+ .footer code { color: #89b4fa; }
221
+ </style>
222
+ </head><body>
223
+ <h1>Maestro Statusline</h1>
224
+ <div class="subtitle">Dual-mode rendering with unified SVG icons</div>
225
+ ${rows}
226
+ <h2>Icon Reference</h2>
227
+ <div class="icon-grid">${iconRef}</div>
228
+ <div class="footer">
229
+ <p><code>MAESTRO_STATUSLINE_STYLE=powerline|text</code> (default: text)</p>
230
+ <p><code>MAESTRO_NERD_FONT=1</code> for Nerd Font terminal icons (default: Unicode)</p>
231
+ </div>
232
+ </body></html>`;
233
+ const outPath = join(tmpdir(), 'maestro-statusline-test.html');
234
+ writeFileSync(outPath, html);
235
+ console.log(`Written to: ${outPath}`);
236
+ //# sourceMappingURL=statusline-visual-test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statusline-visual-test.js","sourceRoot":"","sources":["../../../../src/hooks/__tests__/statusline-visual-test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EACL,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,GACjD,MAAM,iBAAiB,CAAC;AAEzB,8EAA8E;AAC9E,kEAAkE;AAClE,8EAA8E;AAE9E,MAAM,SAAS,GAA2B;IACxC,uBAAuB;IACvB,KAAK,EAAE,+LAA+L;IACtM,mBAAmB;IACnB,SAAS,EAAE,sLAAsL;IACjM,kBAAkB;IAClB,KAAK,EAAE,wJAAwJ;IAC/J,qBAAqB;IACrB,KAAK,EAAE,oSAAoS;IAC3S,qBAAqB;IACrB,IAAI,EAAE,6LAA6L;IACnM,gBAAgB;IAChB,IAAI,EAAE,6WAA6W;IACnX,qBAAqB;IACrB,GAAG,EAAE,2JAA2J;IAChK,eAAe;IACf,GAAG,EAAE,8ZAA8Z;IACna,wBAAwB;IACxB,GAAG,EAAE,qSAAqS;CAC3S,CAAC;AAgBF,SAAS,GAAG,CAAC,CAAoC;IAC/C,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACxC,CAAC;AAED,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,EAAE;IAC5B,MAAM,CAAC,GAAG,EAAE,EAAE,EAAE,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,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AAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,8EAA8E;AAC9E,OAAO;AACP,8EAA8E;AAE9E,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;;yBAEP,CAAC,CAAC,KAAK;;MAE1B,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC;;MAE3B,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC;SACnB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEtB,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CACvD,2EAA2E,CAAC,kCAAkC,CAAC,eAAe,CAC/H,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEX,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA2BU,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;IAmBlD,IAAI;;2BAEmB,OAAO;;;;;eAKnB,CAAC;AAEhB,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,8BAA8B,CAAC,CAAC;AAC/D,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC7B,OAAO,CAAC,GAAG,CAAC,eAAe,OAAO,EAAE,CAAC,CAAC"}
@@ -16,14 +16,98 @@ export declare const NOTIFY_PREFIX = "maestro-notify-";
16
16
  export declare const COORD_BRIDGE_PREFIX = "maestro-coord-";
17
17
  /** Max ms to wait for stdin before exiting (Windows pipe safety) */
18
18
  export declare const STDIN_TIMEOUT_MS = 3000;
19
+ /** Powerline right-arrow separator (E0B0 needs Powerline font, fallback to triangle) */
20
+ export declare const PL_SEP: string;
21
+ /** Select icon set based on config */
22
+ export declare const ICONS: {
23
+ readonly model: "󰮩";
24
+ readonly milestone: "󰽎";
25
+ readonly phase: "";
26
+ readonly coord: "󰑌";
27
+ readonly task: "";
28
+ readonly team: "󰡉";
29
+ readonly dir: "";
30
+ readonly git: "";
31
+ readonly ctx: "󰐥";
32
+ } | {
33
+ readonly model: "✎";
34
+ readonly milestone: "⚑";
35
+ readonly phase: "◆";
36
+ readonly coord: "⚙";
37
+ readonly task: "▸";
38
+ readonly team: "👥";
39
+ readonly dir: "■";
40
+ readonly git: "◆";
41
+ readonly ctx: "◔";
42
+ };
43
+ /** Git status icons */
44
+ export declare const GIT_ICONS: {
45
+ readonly clean: "✓";
46
+ readonly dirty: "●";
47
+ readonly conflict: "⚠";
48
+ readonly ahead: "↑";
49
+ readonly behind: "↓";
50
+ };
19
51
  /**
20
- * ASCII faces by severity level.
21
- *
22
- * ^_^ — plenty of context (used < 50%)
23
- * -_- — getting used (used 50–65%)
24
- * O_O — running low (used 65–80%)
25
- * X_X — critical (used >= 80%)
52
+ * RGB background colors muted Notion-inspired palette.
53
+ * Each entry: [R, G, B]
26
54
  */
55
+ export declare const SEGMENT_BG: {
56
+ readonly model: readonly [63, 75, 91];
57
+ readonly milestone: readonly [160, 82, 45];
58
+ readonly phase: readonly [180, 142, 46];
59
+ readonly coord: readonly [58, 126, 200];
60
+ readonly task: readonly [55, 55, 60];
61
+ readonly team: readonly [123, 94, 167];
62
+ readonly dir: readonly [45, 134, 89];
63
+ readonly ctxOk: readonly [45, 134, 89];
64
+ readonly ctxWarn: readonly [180, 142, 46];
65
+ readonly ctxAlert: readonly [200, 122, 42];
66
+ readonly ctxCrit: readonly [196, 64, 64];
67
+ };
68
+ export declare const SEGMENT_FG: {
69
+ readonly model: readonly [255, 255, 255];
70
+ readonly milestone: readonly [255, 255, 255];
71
+ readonly phase: readonly [30, 30, 30];
72
+ readonly coord: readonly [255, 255, 255];
73
+ readonly task: readonly [224, 224, 224];
74
+ readonly team: readonly [255, 255, 255];
75
+ readonly dir: readonly [255, 255, 255];
76
+ readonly ctxOk: readonly [255, 255, 255];
77
+ readonly ctxWarn: readonly [30, 30, 30];
78
+ readonly ctxAlert: readonly [255, 255, 255];
79
+ readonly ctxCrit: readonly [255, 255, 255];
80
+ };
81
+ export type CtxLevel = 'ok' | 'warn' | 'alert' | 'crit';
82
+ export declare function getCtxLevel(usedPct: number): CtxLevel;
83
+ export declare function ansiBg(rgb: readonly [number, number, number]): string;
84
+ export declare function ansiFg(rgb: readonly [number, number, number]): string;
85
+ export declare const ANSI_RESET = "\u001B[0m";
86
+ export declare const ANSI_DIM = "\u001B[2m";
87
+ export declare const ANSI_BOLD = "\u001B[1m";
88
+ export declare const ANSI_CYAN = "\u001B[36m";
89
+ export declare const ANSI_BLINK = "\u001B[5m";
90
+ export type StatuslineStyle = 'powerline' | 'text';
91
+ export declare function getStatuslineStyle(): StatuslineStyle;
92
+ /**
93
+ * Text-mode segment colors — used as foreground on transparent background.
94
+ * Each color is the "accent" for that segment type.
95
+ */
96
+ export declare const TEXT_COLORS: {
97
+ readonly model: readonly [86, 182, 194];
98
+ readonly milestone: readonly [224, 175, 104];
99
+ readonly phase: readonly [166, 209, 137];
100
+ readonly coord: readonly [137, 180, 250];
101
+ readonly task: readonly [205, 214, 244];
102
+ readonly team: readonly [203, 166, 247];
103
+ readonly dir: readonly [249, 226, 175];
104
+ readonly git: readonly [166, 227, 161];
105
+ readonly ctxOk: readonly [166, 227, 161];
106
+ readonly ctxWarn: readonly [249, 226, 175];
107
+ readonly ctxAlert: readonly [250, 179, 135];
108
+ readonly ctxCrit: readonly [243, 139, 168];
109
+ readonly separator: readonly [88, 91, 112];
110
+ };
27
111
  export declare const FACES: {
28
112
  readonly happy: "^_^";
29
113
  readonly neutral: "-_-";
@@ -31,12 +115,6 @@ export declare const FACES: {
31
115
  readonly critical: "X_X";
32
116
  };
33
117
  export type FaceLevel = keyof typeof FACES;
34
- /** Map used% to face level */
35
118
  export declare function getFaceLevel(usedPct: number): FaceLevel;
36
- /** ANSI color codes by face level */
37
119
  export declare const FACE_COLORS: Record<FaceLevel, string>;
38
- export declare const ANSI_RESET = "\u001B[0m";
39
- export declare const ANSI_DIM = "\u001B[2m";
40
- export declare const ANSI_BOLD = "\u001B[1m";
41
- export declare const ANSI_CYAN = "\u001B[36m";
42
120
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/hooks/constants.ts"],"names":[],"mappings":"AAEA,sDAAsD;AACtD,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,uDAAuD;AACvD,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,sDAAsD;AACtD,eAAO,MAAM,aAAa,KAAK,CAAC;AAEhC,kDAAkD;AAClD,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC,yDAAyD;AACzD,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C,wCAAwC;AACxC,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C,uDAAuD;AACvD,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAE/C,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD,oEAAoE;AACpE,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK;;;;;CAKR,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,KAAK,CAAC;AAE3C,8BAA8B;AAC9B,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAKvD;AAED,qCAAqC;AACrC,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAKjD,CAAC;AAEF,eAAO,MAAM,UAAU,cAAY,CAAC;AACpC,eAAO,MAAM,QAAQ,cAAY,CAAC;AAClC,eAAO,MAAM,SAAS,cA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AM,CAAC,GAAG,MAAM,CAErE;AAED,eAAO,MAAM,UAAU,cAAY,CAAC;AACpC,eAAO,MAAM,QAAQ,cAAY,CAAC;AAClC,eAAO,MAAM,SAAS,cAAY,CAAC;AACnC,eAAO,MAAM,SAAS,eAAa,CAAC;AACpC,eAAO,MAAM,UAAU,cAAY,CAAC;AAOpC,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,MAAM,CAAC;AAEnD,wBAAgB,kBAAkB,IAAI,eAAe,CAEpD;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;CAcd,CAAC;AAGX,eAAO,MAAM,KAAK;;;;;CAKR,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,KAAK,CAAC;AAE3C,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAKvD;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAKjD,CAAC"}
@@ -1,4 +1,33 @@
1
1
  // Shared constants for maestro hooks
2
+ import { readFileSync, existsSync } from 'node:fs';
3
+ import { join } from 'node:path';
4
+ import { homedir } from 'node:os';
5
+ /**
6
+ * Read statusline config from maestro config file.
7
+ * Falls back to env vars, then defaults.
8
+ */
9
+ function readStatuslineConfig() {
10
+ // 1. Try maestro config file
11
+ try {
12
+ const configPath = join(process.env.MAESTRO_HOME || join(homedir(), '.maestro'), 'config.json');
13
+ if (existsSync(configPath)) {
14
+ const cfg = JSON.parse(readFileSync(configPath, 'utf8'));
15
+ if (cfg.statusline) {
16
+ return {
17
+ style: cfg.statusline.style === 'powerline' ? 'powerline' : 'text',
18
+ nerdFont: cfg.statusline.nerdFont === true,
19
+ };
20
+ }
21
+ }
22
+ }
23
+ catch { /* ignore */ }
24
+ // 2. Fall back to env vars
25
+ const envStyle = process.env.MAESTRO_STATUSLINE_STYLE?.toLowerCase();
26
+ const style = (envStyle === 'powerline' || envStyle === 'pl') ? 'powerline' : 'text';
27
+ const nerdFont = process.env.MAESTRO_NERD_FONT === '1';
28
+ return { style, nerdFont };
29
+ }
30
+ const _slConfig = readStatuslineConfig();
2
31
  /** Remaining context % at which WARNING is emitted */
3
32
  export const WARNING_THRESHOLD = 35;
4
33
  /** Remaining context % at which CRITICAL is emitted */
@@ -17,21 +46,130 @@ export const NOTIFY_PREFIX = 'maestro-notify-';
17
46
  export const COORD_BRIDGE_PREFIX = 'maestro-coord-';
18
47
  /** Max ms to wait for stdin before exiting (Windows pipe safety) */
19
48
  export const STDIN_TIMEOUT_MS = 3000;
49
+ // ---------------------------------------------------------------------------
50
+ // Powerline statusline — Notion-inspired muted palette
51
+ // ---------------------------------------------------------------------------
52
+ /** Powerline right-arrow separator (E0B0 needs Powerline font, fallback to triangle) */
53
+ export const PL_SEP = _slConfig.nerdFont ? '\uE0B0' : '\u25B6';
54
+ /** Icon sets — Nerd Font (rich) vs Unicode (safe fallback) */
55
+ const ICONS_NERD = {
56
+ model: '\u{F0BA9}', // 󰮩 nf-md-robot
57
+ milestone: '\u{F0F4E}', // 󰽎 nf-md-flag_checkered
58
+ phase: '\uF0E3', // nf-oct-milestone
59
+ coord: '\u{F044C}', // 󰑌 nf-md-check_circle_outline
60
+ task: '\uEACB', // nf-cod-terminal_cmd
61
+ team: '\u{F0849}', // 󰡉 nf-md-account_group
62
+ dir: '\uEA83', // nf-cod-folder
63
+ git: '\uE725', // nf-dev-git_branch
64
+ ctx: '\u{F0425}', // 󰐥 nf-md-gauge
65
+ };
66
+ const ICONS_UNICODE = {
67
+ model: '\u270E', // ✎ pencil
68
+ milestone: '\u2691', // ⚑ flag
69
+ phase: '\u25C6', // ◆ diamond
70
+ coord: '\u2699', // ⚙ gear
71
+ task: '\u25B8', // ▸ triangle
72
+ team: '\u{1F465}', // 👥 people
73
+ dir: '\u25A0', // ■ square
74
+ git: '\u25C6', // ◆ diamond (git branch)
75
+ ctx: '\u25D4', // ◔ circle with quarter
76
+ };
77
+ /** Select icon set based on config */
78
+ export const ICONS = _slConfig.nerdFont ? ICONS_NERD : ICONS_UNICODE;
79
+ /** Git status icons */
80
+ export const GIT_ICONS = {
81
+ clean: '✓',
82
+ dirty: '●',
83
+ conflict: '⚠',
84
+ ahead: '↑',
85
+ behind: '↓',
86
+ };
20
87
  /**
21
- * ASCII faces by severity level.
22
- *
23
- * ^_^ — plenty of context (used < 50%)
24
- * -_- — getting used (used 50–65%)
25
- * O_O — running low (used 65–80%)
26
- * X_X — critical (used >= 80%)
88
+ * RGB background colors muted Notion-inspired palette.
89
+ * Each entry: [R, G, B]
27
90
  */
91
+ export const SEGMENT_BG = {
92
+ model: [63, 75, 91], // slate
93
+ milestone: [160, 82, 45], // warm brown
94
+ phase: [180, 142, 46], // gold (muted)
95
+ coord: [58, 126, 200], // blue
96
+ task: [55, 55, 60], // charcoal
97
+ team: [123, 94, 167], // purple
98
+ dir: [45, 134, 89], // green
99
+ ctxOk: [45, 134, 89], // green (0–49%)
100
+ ctxWarn: [180, 142, 46], // gold (50–64%)
101
+ ctxAlert: [200, 122, 42], // orange (65–79%)
102
+ ctxCrit: [196, 64, 64], // red (80%+)
103
+ };
104
+ /** Foreground color per segment: white or dark */
105
+ const WHITE = [255, 255, 255];
106
+ const DARK = [30, 30, 30];
107
+ const LIGHT = [224, 224, 224];
108
+ export const SEGMENT_FG = {
109
+ model: WHITE,
110
+ milestone: WHITE,
111
+ phase: DARK,
112
+ coord: WHITE,
113
+ task: LIGHT,
114
+ team: WHITE,
115
+ dir: WHITE,
116
+ ctxOk: WHITE,
117
+ ctxWarn: DARK,
118
+ ctxAlert: WHITE,
119
+ ctxCrit: WHITE,
120
+ };
121
+ export function getCtxLevel(usedPct) {
122
+ if (usedPct < 50)
123
+ return 'ok';
124
+ if (usedPct < 65)
125
+ return 'warn';
126
+ if (usedPct < 80)
127
+ return 'alert';
128
+ return 'crit';
129
+ }
130
+ // ---------------------------------------------------------------------------
131
+ // ANSI helpers (true-color / 24-bit)
132
+ // ---------------------------------------------------------------------------
133
+ export function ansiBg(rgb) {
134
+ return `\x1b[48;2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
135
+ }
136
+ export function ansiFg(rgb) {
137
+ return `\x1b[38;2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
138
+ }
139
+ export const ANSI_RESET = '\x1b[0m';
140
+ export const ANSI_DIM = '\x1b[2m';
141
+ export const ANSI_BOLD = '\x1b[1m';
142
+ export const ANSI_CYAN = '\x1b[36m';
143
+ export const ANSI_BLINK = '\x1b[5m';
144
+ export function getStatuslineStyle() {
145
+ return _slConfig.style;
146
+ }
147
+ /**
148
+ * Text-mode segment colors — used as foreground on transparent background.
149
+ * Each color is the "accent" for that segment type.
150
+ */
151
+ export const TEXT_COLORS = {
152
+ model: [86, 182, 194], // cyan
153
+ milestone: [224, 175, 104], // warm gold
154
+ phase: [166, 209, 137], // soft green
155
+ coord: [137, 180, 250], // light blue
156
+ task: [205, 214, 244], // white-ish
157
+ team: [203, 166, 247], // lavender
158
+ dir: [249, 226, 175], // yellow
159
+ git: [166, 227, 161], // green
160
+ ctxOk: [166, 227, 161], // green
161
+ ctxWarn: [249, 226, 175], // yellow
162
+ ctxAlert: [250, 179, 135], // peach
163
+ ctxCrit: [243, 139, 168], // red/pink
164
+ separator: [88, 91, 112], // dim gray for |
165
+ };
166
+ // Legacy face exports (kept for context-monitor compatibility)
28
167
  export const FACES = {
29
168
  happy: '^_^',
30
169
  neutral: '-_-',
31
170
  alert: 'O_O',
32
171
  critical: 'X_X',
33
172
  };
34
- /** Map used% to face level */
35
173
  export function getFaceLevel(usedPct) {
36
174
  if (usedPct < 50)
37
175
  return 'happy';
@@ -41,15 +179,10 @@ export function getFaceLevel(usedPct) {
41
179
  return 'alert';
42
180
  return 'critical';
43
181
  }
44
- /** ANSI color codes by face level */
45
182
  export const FACE_COLORS = {
46
- happy: '\x1b[32m', // green
47
- neutral: '\x1b[33m', // yellow
48
- alert: '\x1b[38;5;208m', // orange
49
- critical: '\x1b[5;31m', // blinking red
183
+ happy: '\x1b[32m',
184
+ neutral: '\x1b[33m',
185
+ alert: '\x1b[38;5;208m',
186
+ critical: '\x1b[5;31m',
50
187
  };
51
- export const ANSI_RESET = '\x1b[0m';
52
- export const ANSI_DIM = '\x1b[2m';
53
- export const ANSI_BOLD = '\x1b[1m';
54
- export const ANSI_CYAN = '\x1b[36m';
55
188
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/hooks/constants.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,sDAAsD;AACtD,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEpC,uDAAuD;AACvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAErC,sDAAsD;AACtD,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC;AAEhC,kDAAkD;AAClD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAEhC,yDAAyD;AACzD,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAE5C,wCAAwC;AACxC,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;AAE5C,uDAAuD;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAE/C,4DAA4D;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAEpD,oEAAoE;AACpE,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAErC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,KAAK,EAAK,KAAK;IACf,OAAO,EAAG,KAAK;IACf,KAAK,EAAK,KAAK;IACf,QAAQ,EAAE,KAAK;CACP,CAAC;AAIX,8BAA8B;AAC9B,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,OAAO,CAAC;IACjC,IAAI,OAAO,GAAG,EAAE;QAAE,OAA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AAO,OAAO,CAAC;IACjC,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAA8B;IACpD,KAAK,EAAK,UAAU;IACpB,OAAO,EAAG,UAAU;IACpB,KAAK,EAAK,gBAAgB;IAC1B,QAAQ,EAAE,YAAY;CACvB,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { WorkflowGuard } from './workflow-guard.js';
2
2
  export { PromptGuard } from './prompt-guard.js';
3
+ export { evaluatePreflightGuard, loadPreflightConfig } from './preflight-guard.js';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/guards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/guards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { WorkflowGuard } from './workflow-guard.js';
2
2
  export { PromptGuard } from './prompt-guard.js';
3
+ export { evaluatePreflightGuard, loadPreflightConfig } from './preflight-guard.js';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/guards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/guards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,29 @@
1
+ export interface PreflightGuardResult {
2
+ /** True if the guard wants to block (only when mode = 'block'). */
3
+ blocked: boolean;
4
+ /** Warning lines (always populated when conflicts exist). */
5
+ warnings: string[];
6
+ /** Number of conflicting teammates. */
7
+ conflictCount: number;
8
+ }
9
+ export interface PreflightGuardConfig {
10
+ /** 'warn' = emit warnings, 'block' = reject the operation. Default: 'warn' */
11
+ mode: 'warn' | 'block';
12
+ /** Activity look-back window in minutes. Default: 30 */
13
+ windowMin: number;
14
+ /** Whether to run automatically. Default: true */
15
+ enabled: boolean;
16
+ }
17
+ /**
18
+ * Load preflight guard config from `.workflow/config.json` → `collab` section.
19
+ * Returns defaults on any error.
20
+ */
21
+ export declare function loadPreflightConfig(projectRoot: string): PreflightGuardConfig;
22
+ /**
23
+ * Evaluate whether the current phase has active teammates.
24
+ *
25
+ * Pure function — takes explicit dependencies for testability.
26
+ * Never throws.
27
+ */
28
+ export declare function evaluatePreflightGuard(projectRoot: string, config?: Partial<PreflightGuardConfig>): PreflightGuardResult;
29
+ //# sourceMappingURL=preflight-guard.d.ts.map