maestro-flow 0.3.11 → 0.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/CLAUDE.md +7 -0
- package/.claude/agents/conceptual-planning-agent.md +1 -0
- package/.claude/agents/workflow-analyzer.md +113 -114
- package/.claude/agents/workflow-collab-planner.md +143 -144
- package/.claude/agents/workflow-debugger.md +101 -103
- package/.claude/agents/workflow-executor.md +127 -128
- package/.claude/agents/workflow-integration-checker.md +82 -82
- package/.claude/agents/workflow-nyquist-auditor.md +84 -84
- package/.claude/agents/workflow-phase-researcher.md +85 -85
- package/.claude/agents/workflow-plan-checker.md +90 -90
- package/.claude/agents/workflow-planner.md +177 -178
- package/.claude/agents/workflow-roadmapper.md +81 -83
- package/.claude/agents/workflow-verifier.md +118 -119
- package/.claude/commands/learn-retro.md +2 -2
- package/.claude/commands/learn-second-opinion.md +2 -2
- package/.claude/commands/maestro-analyze.md +10 -2
- package/.claude/commands/maestro-brainstorm.md +2 -1
- package/.claude/commands/maestro-execute.md +21 -4
- package/.claude/commands/maestro-fork.md +133 -111
- package/.claude/commands/maestro-merge.md +85 -77
- package/.claude/commands/maestro-milestone-complete.md +14 -0
- package/.claude/commands/maestro-plan.md +100 -8
- package/.claude/commands/maestro-roadmap.md +113 -2
- package/.claude/commands/maestro-ui-design.md +7 -7
- package/.claude/commands/maestro-update.md +176 -0
- package/.claude/commands/maestro-verify.md +18 -3
- package/.claude/commands/maestro.md +1 -0
- package/.claude/commands/manage-codebase-rebuild.md +0 -1
- package/.claude/commands/manage-harvest.md +1 -1
- package/.claude/commands/manage-learn.md +5 -5
- package/.claude/commands/manage-memory-capture.md +4 -4
- package/.claude/commands/manage-memory.md +1 -1
- package/.claude/commands/manage-wiki.md +62 -0
- package/.claude/commands/quality-business-test.md +5 -5
- package/.claude/commands/quality-debug.md +53 -6
- package/.claude/commands/quality-retrospective.md +9 -7
- package/.claude/commands/quality-review.md +39 -7
- package/.claude/commands/quality-sync.md +1 -1
- package/.claude/commands/quality-test-gen.md +5 -4
- package/.claude/commands/quality-test.md +45 -12
- package/.claude/commands/spec-remove.md +51 -0
- package/.claude/commands/spec-setup.md +1 -3
- package/.claude/commands/wiki-connect.md +9 -5
- package/.claude/commands/wiki-digest.md +6 -3
- package/.codex/skills/maestro/SKILL.md +2 -2
- package/.codex/skills/maestro-analyze/SKILL.md +4 -4
- package/.codex/skills/maestro-brainstorm/SKILL.md +4 -4
- package/.codex/skills/maestro-coordinate/SKILL.md +2 -2
- package/.codex/skills/maestro-execute/SKILL.md +15 -5
- package/.codex/skills/maestro-fork/SKILL.md +98 -68
- package/.codex/skills/maestro-init/SKILL.md +5 -4
- package/.codex/skills/maestro-merge/SKILL.md +69 -62
- package/.codex/skills/maestro-milestone-complete/SKILL.md +18 -1
- package/.codex/skills/maestro-plan/SKILL.md +6 -6
- package/.codex/skills/maestro-roadmap/SKILL.md +3 -4
- package/.codex/skills/maestro-spec-generate/SKILL.md +2 -2
- package/.codex/skills/maestro-ui-design/SKILL.md +6 -6
- package/.codex/skills/maestro-verify/SKILL.md +29 -20
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +4 -4
- package/.codex/skills/manage-harvest/SKILL.md +10 -1
- package/.codex/skills/manage-issue-discover/SKILL.md +3 -3
- package/.codex/skills/manage-learn/SKILL.md +3 -2
- package/.codex/skills/manage-memory/SKILL.md +3 -3
- package/.codex/skills/manage-memory-capture/SKILL.md +8 -14
- package/.codex/skills/manage-status/SKILL.md +9 -4
- package/.codex/skills/manage-wiki/SKILL.md +55 -0
- package/.codex/skills/quality-business-test/SKILL.md +8 -6
- package/.codex/skills/quality-debug/SKILL.md +22 -9
- package/.codex/skills/quality-integration-test/SKILL.md +11 -7
- package/.codex/skills/quality-retrospective/SKILL.md +48 -29
- package/.codex/skills/quality-review/SKILL.md +10 -7
- package/.codex/skills/quality-test/SKILL.md +10 -5
- package/.codex/skills/quality-test-gen/SKILL.md +13 -9
- package/.codex/skills/spec-add/SKILL.md +11 -3
- package/.codex/skills/spec-load/SKILL.md +7 -0
- package/.codex/skills/spec-map/SKILL.md +2 -2
- package/.codex/skills/spec-remove/SKILL.md +101 -0
- package/.codex/skills/spec-setup/SKILL.md +4 -8
- package/.codex/skills/wiki-connect/SKILL.md +6 -5
- package/.codex/skills/wiki-digest/SKILL.md +2 -2
- package/README.md +2 -0
- package/README.zh-CN.md +2 -0
- package/dashboard/dist/assets/{ArtifactsPage-DZNCi6tn.js → ArtifactsPage-CUrrDGgN.js} +1 -1
- package/dashboard/dist/assets/ChatInput-pUOLJIKE.js +49 -0
- package/dashboard/dist/assets/ChatPage-B8Xqkt0v.js +27 -0
- package/dashboard/dist/assets/{CollabPage-B4NAHXS2.js → CollabPage-DIUXeazv.js} +1 -1
- package/dashboard/dist/assets/{ExecutionPanel-CFt4LJyq.js → ExecutionPanel-VmYeADFj.js} +1 -1
- package/dashboard/dist/assets/KanbanPage-DLq8v7hg.js +21 -0
- package/dashboard/dist/assets/{MarkdownRenderer-X4af_WNb.js → MarkdownRenderer-D7AehrnR.js} +1 -1
- package/dashboard/dist/assets/{McpPage-BKfCVIyU.js → McpPage-BY0SjTgw.js} +2 -2
- package/dashboard/dist/assets/{OutputPanel-BlBQFJSW.js → OutputPanel-B-Rjwgmv.js} +1 -1
- package/dashboard/dist/assets/{ProblemsPanel-De3DLvoI.js → ProblemsPanel-GEpF-oi4.js} +1 -1
- package/dashboard/dist/assets/RequirementBoardPage-xs8uDM7I.js +6 -0
- package/dashboard/dist/assets/{RequirementPage-Bllxe2XI.js → RequirementPage-BKDSFwjA.js} +5 -10
- package/dashboard/dist/assets/SpecsPage-DLFb9ZH0.js +36 -0
- package/dashboard/dist/assets/SupervisorPage-SOki_kgz.js +6 -0
- package/dashboard/dist/assets/TeamsPage-BO2kP70F.js +11 -0
- package/dashboard/dist/assets/{TreeBrowser-Q12qobZs.js → TreeBrowser-B9DHdULE.js} +1 -1
- package/dashboard/dist/assets/{WorkflowPage-D_Fzdy3_.js → WorkflowPage-C8hWbYim.js} +1 -1
- package/dashboard/dist/assets/{check-u6fGOwQO.js → check-DJDk3A2a.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-Csu22t58.js → chevron-right-C7bVDreZ.js} +1 -1
- package/dashboard/dist/assets/{circle-CMrkbRNg.js → circle-Qfgy4LB_.js} +1 -1
- package/dashboard/dist/assets/{circle-alert-c3tH1P4z.js → circle-alert-Na1vf6qQ.js} +1 -1
- package/dashboard/dist/assets/{circle-check-gYxxSYuH.js → circle-check-CEGgy3NV.js} +1 -1
- package/dashboard/dist/assets/{circle-check-big-TDSeWstm.js → circle-check-big-3JB8zRYj.js} +1 -1
- package/dashboard/dist/assets/{code-CFN2uX9V.js → code-Ble63Idz.js} +1 -1
- package/dashboard/dist/assets/{columns-3-38xIDlzy.js → columns-3-BUcKlxve.js} +1 -1
- package/dashboard/dist/assets/{download-DC7KkKyP.js → download-CMqkfn8x.js} +1 -1
- package/dashboard/dist/assets/{folder-CWq_lAnf.js → folder-B9ewx9LL.js} +1 -1
- package/dashboard/dist/assets/index-C2Mcb4TJ.js +231 -0
- package/dashboard/dist/assets/index-DyBbPc18.css +1 -0
- package/dashboard/dist/assets/{index-Do71weNR.js → index-JTmGteaT.js} +1 -1
- package/dashboard/dist/assets/{list-CgIP_2A-.js → list-DI8Wn2aT.js} +1 -1
- package/dashboard/dist/assets/loader-B5F6PzFT.js +11 -0
- package/dashboard/dist/assets/{minus-DYoN5UGk.js → minus-Lp_BfctG.js} +1 -1
- package/dashboard/dist/assets/{pen-line-Bh_WKYHm.js → pen-line-Ch7sphzZ.js} +1 -1
- package/dashboard/dist/assets/pencil-_yRMHmGT.js +6 -0
- package/dashboard/dist/assets/{proxy-BKxDAKTj.js → proxy-D72Y8a4Y.js} +1 -1
- package/dashboard/dist/assets/{search-SieXnOgr.js → search-BS6fI6Bg.js} +1 -1
- package/dashboard/dist/assets/{shallow-Bme1JY57.js → shallow-BXasQBvr.js} +1 -1
- package/dashboard/dist/assets/table-CeGlFjlP.js +6 -0
- package/dashboard/dist/assets/{terminal-BB3Xfuv5.js → terminal-BJic2yW-.js} +1 -1
- package/dashboard/dist/assets/{trash-2-C8f4vFFM.js → trash-2-Czz4X8Fb.js} +1 -1
- package/dashboard/dist/assets/{zap-4uwlzVm0.js → zap-C3H0jVFA.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js +16 -1
- package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.d.ts +9 -0
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +109 -9
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.test.js +49 -0
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/delegate-broker-monitor.js +1 -2
- package/dashboard/dist-server/dashboard/src/server/agents/delegate-broker-monitor.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.js +2 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/index.js +3 -0
- package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/collab.js +124 -0
- package/dashboard/dist-server/dashboard/src/server/routes/collab.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/index.js +5 -4
- package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.d.ts +5 -13
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js +97 -155
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.d.ts +11 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.integration.test.js +27 -6
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.integration.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +25 -7
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.js +8 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js +1 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.d.ts +29 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +148 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +4 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +8 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.d.ts +5 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +80 -38
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js +8 -6
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +40 -5
- package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js +21 -23
- package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.d.ts +33 -3
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +184 -12
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.d.ts +10 -0
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.js +73 -0
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/shared/collab-types.d.ts +31 -0
- package/dashboard/dist-server/dashboard/src/shared/collab-types.js +28 -0
- package/dashboard/dist-server/dashboard/src/shared/collab-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.js +5 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/coordinate-types.d.ts +22 -0
- package/dashboard/dist-server/dashboard/src/shared/issue-types.d.ts +12 -0
- package/dashboard/dist-server/dashboard/src/shared/issue-types.js +12 -0
- package/dashboard/dist-server/dashboard/src/shared/issue-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/team-types.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/shared/team-types.js +7 -0
- package/dashboard/dist-server/dashboard/src/shared/team-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +27 -1
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
- package/dashboard/dist-server/shared/agent-types.d.ts +4 -0
- package/dashboard/dist-server/src/commands/delegate.js +26 -0
- package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
- package/dashboard/dist-server/src/coordinator/graph-types.d.ts +11 -1
- package/dashboard/dist-server/src/coordinator/graph-walker.js +29 -2
- package/dashboard/dist-server/src/coordinator/graph-walker.js.map +1 -1
- package/dashboard/dist-server/src/coordinator/prompt-assembler.js +3 -2
- package/dashboard/dist-server/src/coordinator/prompt-assembler.js.map +1 -1
- package/dashboard/dist-server/src/hooks/constants.d.ts +29 -60
- package/dashboard/dist-server/src/hooks/constants.js +105 -82
- package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
- package/dashboard/dist-server/src/types/index.d.ts +2 -1
- package/dist/shared/agent-types.d.ts +4 -0
- package/dist/shared/agent-types.d.ts.map +1 -1
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +26 -0
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/hooks.d.ts +2 -4
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +4 -7
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +29 -18
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.d.ts +2 -3
- package/dist/src/commands/install-ui/InstallConfirm.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.js +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.js +1 -2
- package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.js +5 -7
- package/dist/src/commands/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts +3 -6
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts.map +1 -1
- package/dist/src/commands/install-ui/StatuslineConfig.js +21 -17
- package/dist/src/commands/install-ui/StatuslineConfig.js.map +1 -1
- package/dist/src/commands/update.d.ts.map +1 -1
- package/dist/src/commands/update.js +95 -0
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/wiki.d.ts.map +1 -1
- package/dist/src/commands/wiki.js +75 -11
- package/dist/src/commands/wiki.js.map +1 -1
- package/dist/src/coordinator/graph-types.d.ts +11 -1
- package/dist/src/coordinator/graph-types.d.ts.map +1 -1
- package/dist/src/coordinator/graph-walker.d.ts.map +1 -1
- package/dist/src/coordinator/graph-walker.js +29 -2
- package/dist/src/coordinator/graph-walker.js.map +1 -1
- package/dist/src/coordinator/prompt-assembler.d.ts.map +1 -1
- package/dist/src/coordinator/prompt-assembler.js +3 -2
- package/dist/src/coordinator/prompt-assembler.js.map +1 -1
- package/dist/src/hooks/__tests__/statusline-visual-test.d.ts +4 -1
- package/dist/src/hooks/__tests__/statusline-visual-test.d.ts.map +1 -1
- package/dist/src/hooks/__tests__/statusline-visual-test.js +55 -152
- package/dist/src/hooks/__tests__/statusline-visual-test.js.map +1 -1
- package/dist/src/hooks/constants.d.ts +29 -60
- package/dist/src/hooks/constants.d.ts.map +1 -1
- package/dist/src/hooks/constants.js +105 -82
- package/dist/src/hooks/constants.js.map +1 -1
- package/dist/src/hooks/skill-context.d.ts +3 -0
- package/dist/src/hooks/skill-context.d.ts.map +1 -1
- package/dist/src/hooks/skill-context.js +149 -15
- package/dist/src/hooks/skill-context.js.map +1 -1
- package/dist/src/hooks/statusline.d.ts +11 -8
- package/dist/src/hooks/statusline.d.ts.map +1 -1
- package/dist/src/hooks/statusline.js +284 -179
- package/dist/src/hooks/statusline.js.map +1 -1
- package/dist/src/hooks/workspace.d.ts.map +1 -1
- package/dist/src/hooks/workspace.js +2 -1
- package/dist/src/hooks/workspace.js.map +1 -1
- package/dist/src/migrations/_template.d.ts +12 -0
- package/dist/src/migrations/_template.d.ts.map +1 -0
- package/dist/src/migrations/_template.js +55 -0
- package/dist/src/migrations/_template.js.map +1 -0
- package/dist/src/migrations/index.d.ts +14 -0
- package/dist/src/migrations/index.d.ts.map +1 -0
- package/dist/src/migrations/index.js +20 -0
- package/dist/src/migrations/index.js.map +1 -0
- package/dist/src/migrations/run.d.ts +12 -0
- package/dist/src/migrations/run.d.ts.map +1 -0
- package/dist/src/migrations/run.js +119 -0
- package/dist/src/migrations/run.js.map +1 -0
- package/dist/src/migrations/v1-to-v2.d.ts +10 -0
- package/dist/src/migrations/v1-to-v2.d.ts.map +1 -0
- package/dist/src/migrations/v1-to-v2.js +71 -0
- package/dist/src/migrations/v1-to-v2.js.map +1 -0
- package/dist/src/tools/merge-validator.d.ts.map +1 -1
- package/dist/src/tools/merge-validator.js +114 -16
- package/dist/src/tools/merge-validator.js.map +1 -1
- package/dist/src/tools/team-activity.d.ts.map +1 -1
- package/dist/src/tools/team-activity.js +22 -0
- package/dist/src/tools/team-activity.js.map +1 -1
- package/dist/src/tools/transition-recorder.d.ts +2 -17
- package/dist/src/tools/transition-recorder.d.ts.map +1 -1
- package/dist/src/tools/transition-recorder.js +6 -3
- package/dist/src/tools/transition-recorder.js.map +1 -1
- package/dist/src/types/index.d.ts +2 -1
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/utils/migration-registry.d.ts +65 -0
- package/dist/src/utils/migration-registry.d.ts.map +1 -0
- package/dist/src/utils/migration-registry.js +117 -0
- package/dist/src/utils/migration-registry.js.map +1 -0
- package/dist/src/utils/state-schema.d.ts +153 -0
- package/dist/src/utils/state-schema.d.ts.map +1 -0
- package/dist/src/utils/state-schema.js +329 -0
- package/dist/src/utils/state-schema.js.map +1 -0
- package/package.json +1 -1
- package/shared/agent-types.ts +4 -0
- package/templates/state.json +17 -39
- package/templates/worktree-scope.json +9 -10
- package/templates/worktrees.json +26 -27
- package/workflows/brainstorm.md +10 -1
- package/workflows/codebase-rebuild.md +2 -12
- package/workflows/debug.md +17 -8
- package/workflows/execute.md +18 -4
- package/workflows/fork.md +52 -37
- package/workflows/init.md +1 -4
- package/workflows/integration-test.md +13 -2
- package/workflows/issue.md +8 -4
- package/workflows/learn.md +25 -10
- package/workflows/maestro.codex.md +8 -1
- package/workflows/maestro.md +13 -3
- package/workflows/memory.md +26 -71
- package/workflows/merge.md +48 -52
- package/workflows/milestone-complete.md +24 -7
- package/workflows/retrospective.md +87 -80
- package/workflows/review.md +11 -5
- package/workflows/specs-remove.md +115 -0
- package/workflows/specs-setup.md +10 -32
- package/workflows/status.md +291 -290
- package/workflows/sync.md +5 -5
- package/workflows/test.md +11 -2
- package/workflows/ui-style.md +8 -2
- package/workflows/verify.md +2 -2
- package/workflows/wiki-connect.md +188 -0
- package/workflows/wiki-digest.md +221 -0
- package/workflows/wiki-manage.md +204 -0
- package/dashboard/dist/assets/ChatInput-Bvr-FeEq.js +0 -49
- package/dashboard/dist/assets/ChatPage-D9zTkJZo.js +0 -22
- package/dashboard/dist/assets/KanbanPage-C8USth6H.js +0 -21
- package/dashboard/dist/assets/RequirementBoardPage-Bf1trzqs.js +0 -11
- package/dashboard/dist/assets/SpecsPage-9lwxKT27.js +0 -36
- package/dashboard/dist/assets/SupervisorPage-SusdfHFq.js +0 -6
- package/dashboard/dist/assets/TeamsPage-DsuM6OwC.js +0 -6
- package/dashboard/dist/assets/arrow-left-Bqtb2hle.js +0 -6
- package/dashboard/dist/assets/index-DWG-WrzT.js +0 -231
- package/dashboard/dist/assets/index-GUNJodSR.css +0 -1
- package/dashboard/dist/assets/table-llyEtj-7.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusline.d.ts","sourceRoot":"","sources":["../../../src/hooks/statusline.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"statusline.d.ts","sourceRoot":"","sources":["../../../src/hooks/statusline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAyBH,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAClC,SAAS,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE;QACf,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;IACF,IAAI,CAAC,EAAE;QACL,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;CACH;AA8XD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA2CxD;AAMD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAe/D;AA+ED,gDAAgD;AAChD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAgG9D;AAED,4EAA4E;AAC5E,wBAAgB,aAAa,IAAI,IAAI,CAepC"}
|
|
@@ -1,52 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Maestro Statusline Hook —
|
|
2
|
+
* Maestro Statusline Hook — Two-line colored text
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Segments (left → right):
|
|
8
|
-
* Model | Phase | Coordinator | Task | Team | Directory+Git | Context bar
|
|
4
|
+
* Line 1: Model | Coordinator | Task | Team | Dir+Git | Context
|
|
5
|
+
* Line 2: Milestone ◆Phase | Session chain (ANL-001→PLN-001→EXC-001→VRF-001 ✓)
|
|
9
6
|
*
|
|
10
7
|
* Input (stdin JSON from Claude Code):
|
|
11
8
|
* { model, workspace, session_id, context_window }
|
|
12
9
|
*
|
|
13
|
-
* Output (stdout): formatted
|
|
10
|
+
* Output (stdout): formatted ANSI string (1 or 2 lines)
|
|
14
11
|
*/
|
|
15
12
|
import { readFileSync, readdirSync, statSync, existsSync, writeFileSync } from 'node:fs';
|
|
16
13
|
import { join, basename } from 'node:path';
|
|
17
14
|
import { homedir, tmpdir } from 'node:os';
|
|
18
15
|
import { execSync } from 'node:child_process';
|
|
19
|
-
import { AUTO_COMPACT_BUFFER_PCT, BRIDGE_PREFIX, ANSI_RESET,
|
|
16
|
+
import { AUTO_COMPACT_BUFFER_PCT, BRIDGE_PREFIX, ANSI_RESET, ICONS, GIT_ICONS, TEXT_COLORS, ansiFg, getCtxLevel, } from './constants.js';
|
|
20
17
|
import { readCoordBridge } from './coordinator-tracker.js';
|
|
21
18
|
import { resolveSelf } from '../tools/team-members.js';
|
|
22
19
|
import { readRecentActivity } from '../tools/team-activity.js';
|
|
23
20
|
import { findWorkspaceRoot } from './workspace.js';
|
|
24
21
|
// ---------------------------------------------------------------------------
|
|
25
|
-
//
|
|
22
|
+
// Renderer
|
|
26
23
|
// ---------------------------------------------------------------------------
|
|
27
|
-
/**
|
|
28
|
-
* Powerline mode: colored background segments with arrow separators.
|
|
29
|
-
*/
|
|
30
|
-
function renderPowerline(segments) {
|
|
31
|
-
if (segments.length === 0)
|
|
32
|
-
return '';
|
|
33
|
-
let out = '';
|
|
34
|
-
for (let i = 0; i < segments.length; i++) {
|
|
35
|
-
const seg = segments[i];
|
|
36
|
-
out += ansiBg(seg.bg) + ansiFg(seg.fg) + ` ${seg.text} `;
|
|
37
|
-
if (i < segments.length - 1) {
|
|
38
|
-
out += ansiFg(seg.bg) + ansiBg(segments[i + 1].bg) + PL_SEP;
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
out += ANSI_RESET + ansiFg(seg.bg) + PL_SEP + ANSI_RESET;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return out;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Colored-text mode: colored text on transparent background, pipe separators.
|
|
48
|
-
* Similar style to CCometixLine reference.
|
|
49
|
-
*/
|
|
24
|
+
/** Colored text on transparent background, pipe separators */
|
|
50
25
|
function renderColoredText(segments) {
|
|
51
26
|
if (segments.length === 0)
|
|
52
27
|
return '';
|
|
@@ -62,26 +37,26 @@ function renderColoredText(segments) {
|
|
|
62
37
|
// ---------------------------------------------------------------------------
|
|
63
38
|
// Context usage
|
|
64
39
|
// ---------------------------------------------------------------------------
|
|
65
|
-
/** Normalize remaining% to usable context (accounts for autocompact buffer) */
|
|
66
40
|
function normalizeUsage(remaining) {
|
|
67
41
|
const usableRemaining = Math.max(0, ((remaining - AUTO_COMPACT_BUFFER_PCT) / (100 - AUTO_COMPACT_BUFFER_PCT)) * 100);
|
|
68
42
|
return Math.max(0, Math.min(100, Math.round(100 - usableRemaining)));
|
|
69
43
|
}
|
|
70
|
-
/** Build context bar text: "icon ██████░░░░ 62%" */
|
|
71
44
|
function buildContextText(usedPct) {
|
|
72
45
|
const filled = Math.floor(usedPct / 10);
|
|
73
46
|
const bar = '\u2588'.repeat(filled) + '\u2591'.repeat(10 - filled);
|
|
74
47
|
return `${ICONS.ctx} ${bar} ${usedPct}%`;
|
|
75
48
|
}
|
|
76
|
-
/**
|
|
77
|
-
function
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
49
|
+
/** Format token count: 1234 → "1.2k", 123456 → "123k" */
|
|
50
|
+
function formatTokens(n) {
|
|
51
|
+
if (n < 1000)
|
|
52
|
+
return String(n);
|
|
53
|
+
if (n < 10000)
|
|
54
|
+
return (n / 1000).toFixed(1) + 'k';
|
|
55
|
+
return Math.round(n / 1000) + 'k';
|
|
56
|
+
}
|
|
57
|
+
/** Build token usage text: "↑12k ↓3k Σ15k" */
|
|
58
|
+
function buildTokenText(input, output) {
|
|
59
|
+
return `↑${formatTokens(input)} ↓${formatTokens(output)} Σ${formatTokens(input + output)}`;
|
|
85
60
|
}
|
|
86
61
|
// ---------------------------------------------------------------------------
|
|
87
62
|
// Bridge
|
|
@@ -104,7 +79,6 @@ function writeBridge(session, remaining, usedPct) {
|
|
|
104
79
|
// ---------------------------------------------------------------------------
|
|
105
80
|
// Data readers
|
|
106
81
|
// ---------------------------------------------------------------------------
|
|
107
|
-
/** Read current in-progress task from Claude Code todos */
|
|
108
82
|
function readCurrentTask(session) {
|
|
109
83
|
const claudeDir = process.env.CLAUDE_CONFIG_DIR || join(homedir(), '.claude');
|
|
110
84
|
const todosDir = join(claudeDir, 'todos');
|
|
@@ -130,8 +104,63 @@ function readCurrentTask(session) {
|
|
|
130
104
|
const emptyWf = {
|
|
131
105
|
milestone: '', currentPhase: 0, currentStep: 0, status: '',
|
|
132
106
|
total: 0, completed: 0, inProgress: 0, planned: 0, workspaceRoot: '',
|
|
107
|
+
chains: [], orphans: [], currentTaskId: '',
|
|
133
108
|
};
|
|
134
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* Build dependency chains from artifacts.
|
|
111
|
+
* Walk depends_on links: find roots (no depends_on), then follow forward.
|
|
112
|
+
*/
|
|
113
|
+
function buildChains(artifacts) {
|
|
114
|
+
if (artifacts.length === 0)
|
|
115
|
+
return { chains: [], orphans: [] };
|
|
116
|
+
const byId = new Map();
|
|
117
|
+
for (const a of artifacts)
|
|
118
|
+
byId.set(a.id, a);
|
|
119
|
+
// Build forward map: parent → children
|
|
120
|
+
const children = new Map();
|
|
121
|
+
const hasParent = new Set();
|
|
122
|
+
for (const a of artifacts) {
|
|
123
|
+
const deps = a.depends_on;
|
|
124
|
+
if (!deps)
|
|
125
|
+
continue;
|
|
126
|
+
const depIds = Array.isArray(deps) ? deps : [deps];
|
|
127
|
+
for (const depId of depIds) {
|
|
128
|
+
if (byId.has(depId)) {
|
|
129
|
+
hasParent.add(a.id);
|
|
130
|
+
const existing = children.get(depId) || [];
|
|
131
|
+
existing.push(a.id);
|
|
132
|
+
children.set(depId, existing);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// Roots: artifacts with no parent in this set
|
|
137
|
+
const roots = artifacts.filter(a => !hasParent.has(a.id));
|
|
138
|
+
const visited = new Set();
|
|
139
|
+
const chains = [];
|
|
140
|
+
for (const root of roots) {
|
|
141
|
+
if (visited.has(root.id))
|
|
142
|
+
continue;
|
|
143
|
+
const chain = [];
|
|
144
|
+
let current = root.id;
|
|
145
|
+
while (current && !visited.has(current)) {
|
|
146
|
+
visited.add(current);
|
|
147
|
+
const art = byId.get(current);
|
|
148
|
+
if (art)
|
|
149
|
+
chain.push(art);
|
|
150
|
+
// Follow first child (linear chain)
|
|
151
|
+
const kids = children.get(current);
|
|
152
|
+
current = kids?.[0];
|
|
153
|
+
}
|
|
154
|
+
if (chain.length > 0) {
|
|
155
|
+
const allCompleted = chain.every(a => a.status === 'completed');
|
|
156
|
+
chains.push({ artifacts: chain, allCompleted });
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
// Orphans: not visited by any chain walk
|
|
160
|
+
const orphans = artifacts.filter(a => !visited.has(a.id));
|
|
161
|
+
return { chains, orphans };
|
|
162
|
+
}
|
|
163
|
+
/** Read milestone + artifact chains from .workflow/state.json */
|
|
135
164
|
function readWorkflowState(dir) {
|
|
136
165
|
const root = findWorkspaceRoot(dir);
|
|
137
166
|
if (!root)
|
|
@@ -144,13 +173,67 @@ function readWorkflowState(dir) {
|
|
|
144
173
|
const result = { ...emptyWf, workspaceRoot: root };
|
|
145
174
|
if (state.current_milestone)
|
|
146
175
|
result.milestone = state.current_milestone;
|
|
147
|
-
if (state.current_phase)
|
|
148
|
-
result.currentPhase = state.current_phase;
|
|
149
|
-
if (state.current_step)
|
|
150
|
-
result.currentStep = state.current_step;
|
|
151
176
|
if (state.status)
|
|
152
177
|
result.status = state.status;
|
|
153
|
-
|
|
178
|
+
const rawArtifacts = Array.isArray(state.artifacts) ? state.artifacts : [];
|
|
179
|
+
const milestone = Array.isArray(state.milestones)
|
|
180
|
+
? state.milestones.find((m) => m.name === state.current_milestone || m.id === state.current_milestone)
|
|
181
|
+
: null;
|
|
182
|
+
const phases = milestone?.phases ?? [];
|
|
183
|
+
// Filter to current milestone artifacts
|
|
184
|
+
const msArtifacts = rawArtifacts
|
|
185
|
+
.filter(a => a.milestone === state.current_milestone && a.id && a.type && a.status)
|
|
186
|
+
.map(a => ({
|
|
187
|
+
id: a.id,
|
|
188
|
+
type: a.type,
|
|
189
|
+
status: a.status,
|
|
190
|
+
phase: a.phase ?? null,
|
|
191
|
+
path: a.path ?? '',
|
|
192
|
+
depends_on: a.depends_on ?? null,
|
|
193
|
+
}));
|
|
194
|
+
if (phases.length > 0 && msArtifacts.length > 0) {
|
|
195
|
+
result.total = phases.length;
|
|
196
|
+
let completed = 0, inProgress = 0, planned = 0;
|
|
197
|
+
for (const p of phases) {
|
|
198
|
+
const phaseArts = msArtifacts.filter(a => a.phase === p);
|
|
199
|
+
if (phaseArts.some(a => a.type === 'execute' && a.status === 'completed')) {
|
|
200
|
+
completed++;
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
if (phaseArts.some(a => a.type === 'plan' && a.status === 'completed')) {
|
|
204
|
+
planned++;
|
|
205
|
+
inProgress++;
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
if (phaseArts.length > 0) {
|
|
209
|
+
inProgress++;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
result.completed = completed;
|
|
213
|
+
result.inProgress = inProgress;
|
|
214
|
+
result.planned = planned;
|
|
215
|
+
// Current phase
|
|
216
|
+
for (const p of phases) {
|
|
217
|
+
if (msArtifacts.some(a => a.phase === p && a.status === 'in_progress')) {
|
|
218
|
+
result.currentPhase = p;
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
if (!result.currentPhase) {
|
|
223
|
+
for (const p of phases) {
|
|
224
|
+
if (!msArtifacts.some(a => a.type === 'execute' && a.phase === p && a.status === 'completed')) {
|
|
225
|
+
result.currentPhase = p;
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
// Build chains
|
|
231
|
+
const { chains, orphans } = buildChains(msArtifacts);
|
|
232
|
+
result.chains = chains;
|
|
233
|
+
result.orphans = orphans;
|
|
234
|
+
}
|
|
235
|
+
else if (state.phases_summary) {
|
|
236
|
+
// v1 fallback
|
|
154
237
|
const s = state.phases_summary;
|
|
155
238
|
if (typeof s.total === 'number')
|
|
156
239
|
result.total = s.total;
|
|
@@ -158,17 +241,13 @@ function readWorkflowState(dir) {
|
|
|
158
241
|
result.completed = s.completed;
|
|
159
242
|
if (typeof s.in_progress === 'number')
|
|
160
243
|
result.inProgress = s.in_progress;
|
|
244
|
+
if (state.current_phase)
|
|
245
|
+
result.currentPhase = state.current_phase;
|
|
161
246
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
const planPath = join(root, '.workflow', 'scratch', `P${p}`, 'plan.json');
|
|
167
|
-
if (existsSync(planPath))
|
|
168
|
-
planned++;
|
|
169
|
-
}
|
|
170
|
-
result.planned = planned;
|
|
171
|
-
}
|
|
247
|
+
if (state.current_step)
|
|
248
|
+
result.currentStep = state.current_step;
|
|
249
|
+
if (state.current_task_id)
|
|
250
|
+
result.currentTaskId = state.current_task_id;
|
|
172
251
|
return result;
|
|
173
252
|
}
|
|
174
253
|
catch {
|
|
@@ -204,21 +283,20 @@ function readGitInfo(dir) {
|
|
|
204
283
|
}
|
|
205
284
|
}
|
|
206
285
|
function formatGitSuffix(git) {
|
|
207
|
-
|
|
286
|
+
const parts = [];
|
|
208
287
|
if (git.conflict)
|
|
209
|
-
|
|
288
|
+
parts.push(GIT_ICONS.conflict);
|
|
210
289
|
else if (git.dirty)
|
|
211
|
-
|
|
212
|
-
else
|
|
213
|
-
status += GIT_ICONS.clean;
|
|
290
|
+
parts.push(GIT_ICONS.dirty);
|
|
214
291
|
if (git.ahead > 0)
|
|
215
|
-
|
|
292
|
+
parts.push(`${GIT_ICONS.ahead}${git.ahead}`);
|
|
216
293
|
if (git.behind > 0)
|
|
217
|
-
|
|
218
|
-
|
|
294
|
+
parts.push(`${GIT_ICONS.behind}${git.behind}`);
|
|
295
|
+
const suffix = parts.length > 0 ? ` ${parts.join('')}` : '';
|
|
296
|
+
return `${ICONS.git} ${git.branch}${suffix}`;
|
|
219
297
|
}
|
|
220
298
|
// ---------------------------------------------------------------------------
|
|
221
|
-
// Teammate activity segment
|
|
299
|
+
// Teammate activity segment
|
|
222
300
|
// ---------------------------------------------------------------------------
|
|
223
301
|
const TEAM_CACHE_TTL_MS = 10_000;
|
|
224
302
|
const TEAM_WINDOW_MIN = 30;
|
|
@@ -228,30 +306,23 @@ function teamCachePath(session) {
|
|
|
228
306
|
}
|
|
229
307
|
function writeTeamCache(path, segment) {
|
|
230
308
|
try {
|
|
231
|
-
|
|
232
|
-
writeFileSync(path, JSON.stringify(data));
|
|
233
|
-
}
|
|
234
|
-
catch {
|
|
235
|
-
// Best-effort
|
|
309
|
+
writeFileSync(path, JSON.stringify({ ts: Date.now(), segment }));
|
|
236
310
|
}
|
|
311
|
+
catch { /* best-effort */ }
|
|
237
312
|
return segment;
|
|
238
313
|
}
|
|
239
314
|
function shortTaskId(taskId) {
|
|
240
315
|
const idx = taskId.lastIndexOf('-');
|
|
241
|
-
|
|
242
|
-
return taskId;
|
|
243
|
-
return taskId.slice(idx + 1) || taskId;
|
|
316
|
+
return idx < 0 ? taskId : (taskId.slice(idx + 1) || taskId);
|
|
244
317
|
}
|
|
245
318
|
function formatTeammate(name, evt) {
|
|
246
319
|
if (typeof evt.phase_id === 'number' && typeof evt.task_id === 'string' && evt.task_id) {
|
|
247
320
|
return `${name} (P${evt.phase_id}/${shortTaskId(evt.task_id)})`;
|
|
248
321
|
}
|
|
249
|
-
if (typeof evt.phase_id === 'number')
|
|
322
|
+
if (typeof evt.phase_id === 'number')
|
|
250
323
|
return `${name} (P${evt.phase_id})`;
|
|
251
|
-
|
|
252
|
-
if (typeof evt.target === 'string' && evt.target) {
|
|
324
|
+
if (typeof evt.target === 'string' && evt.target)
|
|
253
325
|
return `${name} (${evt.target})`;
|
|
254
|
-
}
|
|
255
326
|
return name;
|
|
256
327
|
}
|
|
257
328
|
export function buildTeamSegment(session) {
|
|
@@ -260,16 +331,11 @@ export function buildTeamSegment(session) {
|
|
|
260
331
|
if (existsSync(cachePath)) {
|
|
261
332
|
try {
|
|
262
333
|
const cached = JSON.parse(readFileSync(cachePath, 'utf8'));
|
|
263
|
-
if (cached &&
|
|
264
|
-
typeof cached.ts === 'number' &&
|
|
265
|
-
typeof cached.segment === 'string' &&
|
|
266
|
-
Date.now() - cached.ts < TEAM_CACHE_TTL_MS) {
|
|
334
|
+
if (cached && typeof cached.ts === 'number' && typeof cached.segment === 'string' && Date.now() - cached.ts < TEAM_CACHE_TTL_MS) {
|
|
267
335
|
return cached.segment;
|
|
268
336
|
}
|
|
269
337
|
}
|
|
270
|
-
catch {
|
|
271
|
-
// Corrupt cache — recompute
|
|
272
|
-
}
|
|
338
|
+
catch { /* corrupt cache */ }
|
|
273
339
|
}
|
|
274
340
|
const self = resolveSelf();
|
|
275
341
|
if (!self)
|
|
@@ -291,9 +357,8 @@ export function buildTeamSegment(session) {
|
|
|
291
357
|
}
|
|
292
358
|
const prevT = Date.parse(prev.ts);
|
|
293
359
|
const curT = Date.parse(evt.ts);
|
|
294
|
-
if (!Number.isNaN(curT) && (Number.isNaN(prevT) || curT >= prevT))
|
|
360
|
+
if (!Number.isNaN(curT) && (Number.isNaN(prevT) || curT >= prevT))
|
|
295
361
|
latest.set(key, evt);
|
|
296
|
-
}
|
|
297
362
|
}
|
|
298
363
|
if (latest.size === 0)
|
|
299
364
|
return writeTeamCache(cachePath, '');
|
|
@@ -302,13 +367,12 @@ export function buildTeamSegment(session) {
|
|
|
302
367
|
const tb = Date.parse(b.ts);
|
|
303
368
|
return (Number.isNaN(tb) ? 0 : tb) - (Number.isNaN(ta) ? 0 : ta);
|
|
304
369
|
});
|
|
305
|
-
const inline = ordered.slice(0, TEAM_MAX_INLINE).map(
|
|
370
|
+
const inline = ordered.slice(0, TEAM_MAX_INLINE).map(evt => formatTeammate(evt.user, evt));
|
|
306
371
|
let body = inline.join(' | ');
|
|
307
372
|
const extra = ordered.length - inline.length;
|
|
308
373
|
if (extra > 0)
|
|
309
374
|
body += ` +${extra}`;
|
|
310
|
-
|
|
311
|
-
return writeTeamCache(cachePath, segment);
|
|
375
|
+
return writeTeamCache(cachePath, `\u{1F465} ${body}`);
|
|
312
376
|
}
|
|
313
377
|
catch {
|
|
314
378
|
return '';
|
|
@@ -330,7 +394,6 @@ export function buildCoordinatorSegment(session) {
|
|
|
330
394
|
const isPaused = status === 'paused' || status === 'step_paused';
|
|
331
395
|
const progress = isPaused ? 'P' : `${steps_completed}/${steps_total}`;
|
|
332
396
|
const stepLabel = current_step?.skill ?? '';
|
|
333
|
-
// chain_name → stepLabel [progress]
|
|
334
397
|
const parts = [];
|
|
335
398
|
if (chain_name)
|
|
336
399
|
parts.push(chain_name);
|
|
@@ -343,9 +406,73 @@ export function buildCoordinatorSegment(session) {
|
|
|
343
406
|
}
|
|
344
407
|
}
|
|
345
408
|
// ---------------------------------------------------------------------------
|
|
409
|
+
// Chain renderer — session chain for line 2+
|
|
410
|
+
// ---------------------------------------------------------------------------
|
|
411
|
+
/** Type abbreviation and color */
|
|
412
|
+
const TYPE_META = {
|
|
413
|
+
analyze: { abbr: 'A', color: TEXT_COLORS.model },
|
|
414
|
+
plan: { abbr: 'P', color: TEXT_COLORS.milestone },
|
|
415
|
+
execute: { abbr: 'E', color: TEXT_COLORS.phase },
|
|
416
|
+
verify: { abbr: 'V', color: TEXT_COLORS.coord },
|
|
417
|
+
brainstorm: { abbr: 'B', color: TEXT_COLORS.team },
|
|
418
|
+
spec: { abbr: 'S', color: TEXT_COLORS.dir },
|
|
419
|
+
review: { abbr: 'R', color: TEXT_COLORS.ctxAlert },
|
|
420
|
+
debug: { abbr: 'D', color: TEXT_COLORS.ctxCrit },
|
|
421
|
+
test: { abbr: 'T', color: TEXT_COLORS.ctxOk },
|
|
422
|
+
};
|
|
423
|
+
/** Color a type abbreviation */
|
|
424
|
+
function colorType(type) {
|
|
425
|
+
const meta = TYPE_META[type] ?? { abbr: type[0]?.toUpperCase() ?? '?', color: TEXT_COLORS.task };
|
|
426
|
+
return ansiFg(meta.color) + meta.abbr + ANSI_RESET;
|
|
427
|
+
}
|
|
428
|
+
/** Extract readable slug from artifact path */
|
|
429
|
+
function extractSlug(art) {
|
|
430
|
+
const b = basename(art.path || '');
|
|
431
|
+
// scratch/analyze-auth-2026-04-20 → auth
|
|
432
|
+
// phases/01-auth-multi-tenant → auth-multi-tenant
|
|
433
|
+
// scratch/20260421-review-P1-auth → auth
|
|
434
|
+
return b
|
|
435
|
+
.replace(/^\d+-/, '') // leading number prefix
|
|
436
|
+
.replace(/^\d{8}-/, '') // YYYYMMDD- prefix
|
|
437
|
+
.replace(/^(analyze|plan|execute|verify|brainstorm|spec|review|debug|test)-/, '') // type prefix
|
|
438
|
+
.replace(/-\d{4}-\d{2}-\d{2}$/, '') // trailing date
|
|
439
|
+
.replace(/-P\d+/, '') // -P1, -P2
|
|
440
|
+
|| art.type;
|
|
441
|
+
}
|
|
442
|
+
/** Status suffix */
|
|
443
|
+
function statusSuffix(status) {
|
|
444
|
+
const map = {
|
|
445
|
+
completed: { icon: '✓', color: TEXT_COLORS.ctxOk },
|
|
446
|
+
in_progress: { icon: '●', color: TEXT_COLORS.ctxWarn },
|
|
447
|
+
failed: { icon: '✗', color: TEXT_COLORS.ctxCrit },
|
|
448
|
+
pending: { icon: '○', color: TEXT_COLORS.separator },
|
|
449
|
+
};
|
|
450
|
+
const s = map[status];
|
|
451
|
+
return s ? ansiFg(s.color) + s.icon + ANSI_RESET : '';
|
|
452
|
+
}
|
|
453
|
+
/** Render chain: auth: A→P→E→R→D→T→V ✓ */
|
|
454
|
+
function renderChain(chain) {
|
|
455
|
+
const arrow = ansiFg(TEXT_COLORS.separator) + '→' + ANSI_RESET;
|
|
456
|
+
const slug = extractSlug(chain.artifacts[0]);
|
|
457
|
+
const types = chain.artifacts.map(a => colorType(a.type));
|
|
458
|
+
const lastArt = chain.artifacts[chain.artifacts.length - 1];
|
|
459
|
+
const slugLabel = ansiFg(TEXT_COLORS.task) + slug + ANSI_RESET;
|
|
460
|
+
const flow = types.join(arrow);
|
|
461
|
+
const suffix = chain.allCompleted
|
|
462
|
+
? ' ' + ansiFg(TEXT_COLORS.ctxOk) + '✓' + ANSI_RESET
|
|
463
|
+
: ' ' + statusSuffix(lastArt.status);
|
|
464
|
+
return `${slugLabel} ${flow}${suffix}`;
|
|
465
|
+
}
|
|
466
|
+
/** Render orphan: brainstorm-ux B ✓ */
|
|
467
|
+
function renderOrphan(art) {
|
|
468
|
+
const slug = extractSlug(art);
|
|
469
|
+
const slugLabel = ansiFg(TEXT_COLORS.task) + slug + ANSI_RESET;
|
|
470
|
+
return `${slugLabel} ${colorType(art.type)} ${statusSuffix(art.status)}`;
|
|
471
|
+
}
|
|
472
|
+
// ---------------------------------------------------------------------------
|
|
346
473
|
// Main formatter
|
|
347
474
|
// ---------------------------------------------------------------------------
|
|
348
|
-
/** Main statusline handler —
|
|
475
|
+
/** Main statusline handler — two-line output */
|
|
349
476
|
export function formatStatusline(data) {
|
|
350
477
|
const model = data.model?.display_name || 'Claude';
|
|
351
478
|
const dir = data.workspace?.current_dir || process.cwd();
|
|
@@ -363,98 +490,76 @@ export function formatStatusline(data) {
|
|
|
363
490
|
if (session)
|
|
364
491
|
writeBridge(session, remaining, usedPct);
|
|
365
492
|
}
|
|
366
|
-
// ----
|
|
493
|
+
// ---- Line 1: Model | Coord | Task | Team | Dir+Git | Context ----
|
|
367
494
|
const segments = [];
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
key: '
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
// 2. Milestone (conditional — shown when workflow has milestones)
|
|
376
|
-
if (wf.milestone) {
|
|
377
|
-
let msText = `${ICONS.milestone} ${wf.milestone}`;
|
|
378
|
-
if (wf.total > 0)
|
|
379
|
-
msText += ` ${wf.completed}/${wf.total}`;
|
|
380
|
-
segments.push({
|
|
381
|
-
key: 'milestone',
|
|
382
|
-
text: msText,
|
|
383
|
-
bg: SEGMENT_BG.milestone,
|
|
384
|
-
fg: SEGMENT_FG.milestone,
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
// 3. Phase (conditional — shows current phase + status detail)
|
|
388
|
-
if (wf.currentPhase) {
|
|
389
|
-
let phaseText = `${ICONS.phase} P${wf.currentPhase}`;
|
|
390
|
-
if (wf.currentStep)
|
|
391
|
-
phaseText += `.${wf.currentStep}`;
|
|
392
|
-
const tags = [];
|
|
393
|
-
if (wf.planned > 0)
|
|
394
|
-
tags.push(`${wf.planned}plan`);
|
|
395
|
-
if (wf.inProgress > 0)
|
|
396
|
-
tags.push(`${wf.inProgress}run`);
|
|
397
|
-
if (tags.length > 0)
|
|
398
|
-
phaseText += ` [${tags.join(' ')}]`;
|
|
399
|
-
segments.push({
|
|
400
|
-
key: 'phase',
|
|
401
|
-
text: phaseText,
|
|
402
|
-
bg: SEGMENT_BG.phase,
|
|
403
|
-
fg: SEGMENT_FG.phase,
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
// 4. Coordinator + chain (conditional)
|
|
407
|
-
if (coord) {
|
|
408
|
-
segments.push({
|
|
409
|
-
key: 'coord',
|
|
410
|
-
text: `${ICONS.coord} ${coord}`,
|
|
411
|
-
bg: SEGMENT_BG.coord,
|
|
412
|
-
fg: SEGMENT_FG.coord,
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
// 5. Task (conditional)
|
|
416
|
-
if (task) {
|
|
417
|
-
segments.push({
|
|
418
|
-
key: 'task',
|
|
419
|
-
text: `${ICONS.task} ${task}`,
|
|
420
|
-
bg: SEGMENT_BG.task,
|
|
421
|
-
fg: SEGMENT_FG.task,
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
// 6. Team (conditional)
|
|
425
|
-
if (team) {
|
|
426
|
-
segments.push({
|
|
427
|
-
key: 'team',
|
|
428
|
-
text: `${ICONS.team} ${team}`,
|
|
429
|
-
bg: SEGMENT_BG.team,
|
|
430
|
-
fg: SEGMENT_FG.team,
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
// 7. Directory + Git
|
|
495
|
+
segments.push({ key: 'model', text: `${ICONS.model} ${model}` });
|
|
496
|
+
if (coord)
|
|
497
|
+
segments.push({ key: 'coord', text: `${ICONS.coord} ${coord}` });
|
|
498
|
+
if (task)
|
|
499
|
+
segments.push({ key: 'task', text: `${ICONS.task} ${task}` });
|
|
500
|
+
if (team)
|
|
501
|
+
segments.push({ key: 'team', text: `${ICONS.team} ${team}` });
|
|
434
502
|
let dirText = `${ICONS.dir} ${basename(dir)}`;
|
|
435
503
|
if (git)
|
|
436
504
|
dirText += ` ${formatGitSuffix(git)}`;
|
|
437
|
-
segments.push({
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
505
|
+
segments.push({ key: 'dir', text: dirText });
|
|
506
|
+
// Token usage + lines changed
|
|
507
|
+
const inputTokens = data.context_window?.total_input_tokens;
|
|
508
|
+
const outputTokens = data.context_window?.total_output_tokens;
|
|
509
|
+
const linesAdded = data.cost?.total_lines_added ?? 0;
|
|
510
|
+
const linesRemoved = data.cost?.total_lines_removed ?? 0;
|
|
511
|
+
const statParts = [];
|
|
512
|
+
if (inputTokens != null && outputTokens != null && (inputTokens > 0 || outputTokens > 0)) {
|
|
513
|
+
statParts.push(buildTokenText(inputTokens, outputTokens));
|
|
514
|
+
}
|
|
515
|
+
if (linesAdded > 0 || linesRemoved > 0) {
|
|
516
|
+
const added = ansiFg(TEXT_COLORS.ctxOk) + `+${linesAdded}` + ANSI_RESET;
|
|
517
|
+
const removed = ansiFg(TEXT_COLORS.ctxCrit) + `-${linesRemoved}` + ANSI_RESET;
|
|
518
|
+
statParts.push(`${added} ${removed}`);
|
|
519
|
+
}
|
|
520
|
+
if (statParts.length > 0) {
|
|
521
|
+
segments.push({ key: 'task', text: statParts.join(' ') });
|
|
522
|
+
}
|
|
523
|
+
// Context bar
|
|
444
524
|
if (remaining != null) {
|
|
445
525
|
const level = getCtxLevel(usedPct);
|
|
446
|
-
const colors = getCtxColors(level);
|
|
447
526
|
const ctxKey = `ctx${level.charAt(0).toUpperCase()}${level.slice(1)}`;
|
|
448
|
-
segments.push({
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
527
|
+
segments.push({ key: ctxKey, text: buildContextText(usedPct) });
|
|
528
|
+
}
|
|
529
|
+
const line1 = renderColoredText(segments);
|
|
530
|
+
// ---- Line 2: Milestone ◆Phase | Session chains (conditional) ----
|
|
531
|
+
if (!wf.milestone)
|
|
532
|
+
return line1;
|
|
533
|
+
const sep = ansiFg(TEXT_COLORS.separator) + ' | ' + ANSI_RESET;
|
|
534
|
+
const dot = ansiFg(TEXT_COLORS.separator) + ' · ' + ANSI_RESET;
|
|
535
|
+
// Milestone + phase header
|
|
536
|
+
let header = ansiFg(TEXT_COLORS.milestone) + `${ICONS.milestone} ${wf.milestone}` + ANSI_RESET;
|
|
537
|
+
if (wf.total > 0)
|
|
538
|
+
header += ansiFg(TEXT_COLORS.milestone) + ` ${wf.completed}/${wf.total}` + ANSI_RESET;
|
|
539
|
+
if (wf.currentPhase)
|
|
540
|
+
header += ' ' + ansiFg(TEXT_COLORS.phase) + `${ICONS.phase} P${wf.currentPhase}` + ANSI_RESET;
|
|
541
|
+
// Session chains
|
|
542
|
+
const chainParts = [];
|
|
543
|
+
for (const chain of wf.chains) {
|
|
544
|
+
chainParts.push(renderChain(chain));
|
|
545
|
+
}
|
|
546
|
+
for (const orphan of wf.orphans) {
|
|
547
|
+
chainParts.push(renderOrphan(orphan));
|
|
548
|
+
}
|
|
549
|
+
if (chainParts.length === 0) {
|
|
550
|
+
return line1 + '\n' + header;
|
|
551
|
+
}
|
|
552
|
+
// Auto multi-line: ≤2 chains → single line, >2 → one chain per line
|
|
553
|
+
if (chainParts.length <= 2) {
|
|
554
|
+
const line2 = header + sep + chainParts.join(dot);
|
|
555
|
+
return line1 + '\n' + line2;
|
|
556
|
+
}
|
|
557
|
+
// Multi-line: header on line 2, each chain on its own line
|
|
558
|
+
const lines = [line1, header];
|
|
559
|
+
for (const part of chainParts) {
|
|
560
|
+
lines.push(' ' + part);
|
|
454
561
|
}
|
|
455
|
-
|
|
456
|
-
const style = getStatuslineStyle();
|
|
457
|
-
return style === 'powerline' ? renderPowerline(segments) : renderColoredText(segments);
|
|
562
|
+
return lines.join('\n');
|
|
458
563
|
}
|
|
459
564
|
/** Entry point — reads stdin JSON, writes formatted statusline to stdout */
|
|
460
565
|
export function runStatusline() {
|