@mindfoldhq/trellis 0.4.0 → 0.5.0-beta.2
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/dist/cli/index.js +0 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +0 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +2 -4
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts +5 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +100 -24
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/antigravity.d.ts +3 -4
- package/dist/configurators/antigravity.d.ts.map +1 -1
- package/dist/configurators/antigravity.js +17 -10
- package/dist/configurators/antigravity.js.map +1 -1
- package/dist/configurators/claude.d.ts +5 -28
- package/dist/configurators/claude.d.ts.map +1 -1
- package/dist/configurators/claude.js +30 -51
- package/dist/configurators/claude.js.map +1 -1
- package/dist/configurators/codebuddy.d.ts +6 -7
- package/dist/configurators/codebuddy.d.ts.map +1 -1
- package/dist/configurators/codebuddy.js +23 -51
- package/dist/configurators/codebuddy.js.map +1 -1
- package/dist/configurators/codex.d.ts +3 -6
- package/dist/configurators/codex.d.ts.map +1 -1
- package/dist/configurators/codex.js +29 -12
- package/dist/configurators/codex.js.map +1 -1
- package/dist/configurators/copilot.d.ts +6 -5
- package/dist/configurators/copilot.d.ts.map +1 -1
- package/dist/configurators/copilot.js +42 -13
- package/dist/configurators/copilot.js.map +1 -1
- package/dist/configurators/cursor.d.ts +6 -1
- package/dist/configurators/cursor.d.ts.map +1 -1
- package/dist/configurators/cursor.js +22 -45
- package/dist/configurators/cursor.js.map +1 -1
- package/dist/configurators/droid.d.ts +6 -1
- package/dist/configurators/droid.d.ts.map +1 -1
- package/dist/configurators/droid.js +23 -41
- package/dist/configurators/droid.js.map +1 -1
- package/dist/configurators/gemini.d.ts +8 -4
- package/dist/configurators/gemini.d.ts.map +1 -1
- package/dist/configurators/gemini.js +28 -47
- package/dist/configurators/gemini.js.map +1 -1
- package/dist/configurators/index.d.ts +1 -1
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +142 -98
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/kilo.d.ts +3 -4
- package/dist/configurators/kilo.d.ts.map +1 -1
- package/dist/configurators/kilo.js +19 -46
- package/dist/configurators/kilo.js.map +1 -1
- package/dist/configurators/kiro.d.ts +4 -4
- package/dist/configurators/kiro.d.ts.map +1 -1
- package/dist/configurators/kiro.js +18 -14
- package/dist/configurators/kiro.js.map +1 -1
- package/dist/configurators/opencode.d.ts +3 -28
- package/dist/configurators/opencode.d.ts.map +1 -1
- package/dist/configurators/opencode.js +23 -48
- package/dist/configurators/opencode.js.map +1 -1
- package/dist/configurators/qoder.d.ts +6 -4
- package/dist/configurators/qoder.d.ts.map +1 -1
- package/dist/configurators/qoder.js +20 -47
- package/dist/configurators/qoder.js.map +1 -1
- package/dist/configurators/shared.d.ts +66 -3
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +251 -3
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/windsurf.d.ts +3 -4
- package/dist/configurators/windsurf.d.ts.map +1 -1
- package/dist/configurators/windsurf.js +17 -10
- package/dist/configurators/windsurf.js.map +1 -1
- package/dist/configurators/workflow.d.ts +0 -3
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +1 -7
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/migrations/manifests/0.4.0.json +1 -1
- package/dist/migrations/manifests/0.5.0-beta.0.json +1644 -0
- package/dist/templates/claude/agents/check.md +2 -29
- package/dist/templates/claude/agents/research.md +70 -52
- package/dist/templates/claude/index.d.ts +5 -37
- package/dist/templates/claude/index.d.ts.map +1 -1
- package/dist/templates/claude/index.js +3 -42
- package/dist/templates/claude/index.js.map +1 -1
- package/dist/templates/claude/settings.json +3 -4
- package/dist/templates/{iflow → codebuddy}/agents/check.md +3 -30
- package/dist/templates/{iflow → codebuddy}/agents/implement.md +1 -1
- package/dist/templates/codebuddy/agents/research.md +138 -0
- package/dist/templates/codebuddy/index.d.ts +6 -16
- package/dist/templates/codebuddy/index.d.ts.map +1 -1
- package/dist/templates/codebuddy/index.js +6 -36
- package/dist/templates/codebuddy/index.js.map +1 -1
- package/dist/templates/codebuddy/settings.json +59 -0
- package/dist/templates/codex/agents/research.toml +50 -16
- package/dist/templates/codex/config.toml +10 -0
- package/dist/templates/codex/hooks/session-start.py +65 -29
- package/dist/templates/codex/hooks.json +11 -0
- package/dist/templates/codex/index.d.ts +0 -1
- package/dist/templates/codex/index.d.ts.map +1 -1
- package/dist/templates/codex/index.js +1 -8
- package/dist/templates/codex/index.js.map +1 -1
- package/dist/templates/common/commands/continue.md +51 -0
- package/dist/templates/common/commands/finish-work.md +32 -0
- package/dist/templates/common/commands/start.md +56 -0
- package/dist/templates/common/index.d.ts +28 -0
- package/dist/templates/common/index.d.ts.map +1 -0
- package/dist/templates/common/index.js +55 -0
- package/dist/templates/common/index.js.map +1 -0
- package/dist/templates/{codebuddy/commands/trellis → common/skills}/brainstorm.md +4 -4
- package/dist/templates/{opencode/commands/trellis → common/skills}/break-loop.md +4 -4
- package/dist/templates/common/skills/check.md +87 -0
- package/dist/templates/{codebuddy/commands/trellis → common/skills}/update-spec.md +18 -21
- package/dist/templates/copilot/hooks/session-start.py +65 -29
- package/dist/templates/copilot/hooks.json +8 -0
- package/dist/templates/cursor/agents/check.md +95 -0
- package/dist/templates/cursor/agents/implement.md +95 -0
- package/dist/templates/cursor/agents/research.md +138 -0
- package/dist/templates/cursor/hooks.json +24 -0
- package/dist/templates/cursor/index.d.ts +6 -17
- package/dist/templates/cursor/index.d.ts.map +1 -1
- package/dist/templates/cursor/index.js +6 -37
- package/dist/templates/cursor/index.js.map +1 -1
- package/dist/templates/droid/droids/check.md +95 -0
- package/dist/templates/droid/droids/implement.md +95 -0
- package/dist/templates/droid/droids/research.md +138 -0
- package/dist/templates/droid/index.d.ts +7 -19
- package/dist/templates/droid/index.d.ts.map +1 -1
- package/dist/templates/droid/index.js +7 -39
- package/dist/templates/droid/index.js.map +1 -1
- package/dist/templates/droid/settings.json +59 -0
- package/dist/templates/extract.d.ts +7 -193
- package/dist/templates/extract.d.ts.map +1 -1
- package/dist/templates/extract.js +7 -310
- package/dist/templates/extract.js.map +1 -1
- package/dist/templates/gemini/agents/check.md +95 -0
- package/dist/templates/gemini/agents/implement.md +95 -0
- package/dist/templates/gemini/agents/research.md +138 -0
- package/dist/templates/gemini/index.d.ts +6 -14
- package/dist/templates/gemini/index.d.ts.map +1 -1
- package/dist/templates/gemini/index.js +6 -37
- package/dist/templates/gemini/index.js.map +1 -1
- package/dist/templates/gemini/settings.json +28 -0
- package/dist/templates/kiro/agents/check.json +13 -0
- package/dist/templates/kiro/agents/implement.json +13 -0
- package/dist/templates/kiro/agents/research.json +21 -0
- package/dist/templates/kiro/index.d.ts +11 -11
- package/dist/templates/kiro/index.d.ts.map +1 -1
- package/dist/templates/kiro/index.js +11 -33
- package/dist/templates/kiro/index.js.map +1 -1
- package/dist/templates/opencode/agents/check.md +3 -30
- package/dist/templates/opencode/agents/implement.md +1 -1
- package/dist/templates/opencode/agents/research.md +1 -2
- package/dist/templates/opencode/plugins/inject-subagent-context.js +9 -183
- package/dist/templates/opencode/plugins/inject-workflow-state.js +160 -0
- package/dist/templates/opencode/plugins/session-start.js +71 -32
- package/dist/templates/qoder/agents/check.md +95 -0
- package/dist/templates/qoder/agents/implement.md +95 -0
- package/dist/templates/qoder/agents/research.md +138 -0
- package/dist/templates/qoder/index.d.ts +7 -10
- package/dist/templates/qoder/index.d.ts.map +1 -1
- package/dist/templates/qoder/index.js +7 -32
- package/dist/templates/qoder/index.js.map +1 -1
- package/dist/templates/qoder/settings.json +47 -0
- package/dist/templates/shared-hooks/index.d.ts +19 -0
- package/dist/templates/shared-hooks/index.d.ts.map +1 -0
- package/dist/templates/shared-hooks/index.js +30 -0
- package/dist/templates/shared-hooks/index.js.map +1 -0
- package/dist/templates/{iflow/hooks → shared-hooks}/inject-subagent-context.py +74 -263
- package/dist/templates/shared-hooks/inject-workflow-state.py +231 -0
- package/dist/templates/{claude/hooks → shared-hooks}/session-start.py +162 -55
- package/dist/templates/template-utils.d.ts +26 -0
- package/dist/templates/template-utils.d.ts.map +1 -0
- package/dist/templates/template-utils.js +60 -0
- package/dist/templates/template-utils.js.map +1 -0
- package/dist/templates/trellis/index.d.ts +1 -14
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +2 -27
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/common/cli_adapter.py +2 -2
- package/dist/templates/trellis/scripts/common/config.py +126 -1
- package/dist/templates/trellis/scripts/common/git_context.py +25 -2
- package/dist/templates/trellis/scripts/common/task_context.py +3 -23
- package/dist/templates/trellis/scripts/common/task_store.py +0 -12
- package/dist/templates/trellis/scripts/common/workflow_phase.py +176 -0
- package/dist/templates/trellis/scripts/task.py +6 -35
- package/dist/templates/trellis/workflow.md +274 -297
- package/dist/types/ai-tools.d.ts +21 -3
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +106 -15
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/types/migration.d.ts +8 -1
- package/dist/types/migration.d.ts.map +1 -1
- package/package.json +3 -2
- package/dist/configurators/iflow.d.ts +0 -33
- package/dist/configurators/iflow.d.ts.map +0 -1
- package/dist/configurators/iflow.js +0 -99
- package/dist/configurators/iflow.js.map +0 -1
- package/dist/templates/antigravity/index.d.ts +0 -12
- package/dist/templates/antigravity/index.d.ts.map +0 -1
- package/dist/templates/antigravity/index.js +0 -29
- package/dist/templates/antigravity/index.js.map +0 -1
- package/dist/templates/claude/agents/debug.md +0 -106
- package/dist/templates/claude/agents/dispatch.md +0 -213
- package/dist/templates/claude/agents/plan.md +0 -396
- package/dist/templates/claude/commands/trellis/brainstorm.md +0 -487
- package/dist/templates/claude/commands/trellis/break-loop.md +0 -125
- package/dist/templates/claude/commands/trellis/check-cross-layer.md +0 -153
- package/dist/templates/claude/commands/trellis/check.md +0 -25
- package/dist/templates/claude/commands/trellis/create-command.md +0 -154
- package/dist/templates/claude/commands/trellis/finish-work.md +0 -153
- package/dist/templates/claude/commands/trellis/integrate-skill.md +0 -219
- package/dist/templates/claude/commands/trellis/onboard.md +0 -358
- package/dist/templates/claude/commands/trellis/parallel.md +0 -192
- package/dist/templates/claude/commands/trellis/record-session.md +0 -62
- package/dist/templates/claude/commands/trellis/start.md +0 -393
- package/dist/templates/claude/commands/trellis/update-spec.md +0 -354
- package/dist/templates/claude/hooks/inject-subagent-context.py +0 -803
- package/dist/templates/claude/hooks/ralph-loop.py +0 -396
- package/dist/templates/codebuddy/commands/trellis/before-dev.md +0 -29
- package/dist/templates/codebuddy/commands/trellis/break-loop.md +0 -107
- package/dist/templates/codebuddy/commands/trellis/check-cross-layer.md +0 -153
- package/dist/templates/codebuddy/commands/trellis/check.md +0 -25
- package/dist/templates/codebuddy/commands/trellis/create-command.md +0 -154
- package/dist/templates/codebuddy/commands/trellis/finish-work.md +0 -143
- package/dist/templates/codebuddy/commands/trellis/integrate-skill.md +0 -219
- package/dist/templates/codebuddy/commands/trellis/onboard.md +0 -358
- package/dist/templates/codebuddy/commands/trellis/record-session.md +0 -61
- package/dist/templates/codebuddy/commands/trellis/start.md +0 -373
- package/dist/templates/codex/codex-skills/parallel/SKILL.md +0 -194
- package/dist/templates/cursor/commands/trellis-before-dev.md +0 -29
- package/dist/templates/cursor/commands/trellis-brainstorm.md +0 -487
- package/dist/templates/cursor/commands/trellis-break-loop.md +0 -107
- package/dist/templates/cursor/commands/trellis-check-cross-layer.md +0 -153
- package/dist/templates/cursor/commands/trellis-check.md +0 -25
- package/dist/templates/cursor/commands/trellis-create-command.md +0 -154
- package/dist/templates/cursor/commands/trellis-finish-work.md +0 -143
- package/dist/templates/cursor/commands/trellis-integrate-skill.md +0 -219
- package/dist/templates/cursor/commands/trellis-onboard.md +0 -358
- package/dist/templates/cursor/commands/trellis-record-session.md +0 -62
- package/dist/templates/cursor/commands/trellis-start.md +0 -373
- package/dist/templates/cursor/commands/trellis-update-spec.md +0 -354
- package/dist/templates/droid/commands/trellis/before-dev.md +0 -33
- package/dist/templates/droid/commands/trellis/brainstorm.md +0 -491
- package/dist/templates/droid/commands/trellis/break-loop.md +0 -111
- package/dist/templates/droid/commands/trellis/check-cross-layer.md +0 -157
- package/dist/templates/droid/commands/trellis/check.md +0 -29
- package/dist/templates/droid/commands/trellis/create-command.md +0 -158
- package/dist/templates/droid/commands/trellis/finish-work.md +0 -147
- package/dist/templates/droid/commands/trellis/integrate-skill.md +0 -223
- package/dist/templates/droid/commands/trellis/onboard.md +0 -362
- package/dist/templates/droid/commands/trellis/record-session.md +0 -66
- package/dist/templates/droid/commands/trellis/start.md +0 -377
- package/dist/templates/droid/commands/trellis/update-spec.md +0 -358
- package/dist/templates/gemini/commands/trellis/before-dev.toml +0 -33
- package/dist/templates/gemini/commands/trellis/brainstorm.toml +0 -435
- package/dist/templates/gemini/commands/trellis/break-loop.toml +0 -129
- package/dist/templates/gemini/commands/trellis/check-cross-layer.toml +0 -147
- package/dist/templates/gemini/commands/trellis/check.toml +0 -29
- package/dist/templates/gemini/commands/trellis/create-command.toml +0 -119
- package/dist/templates/gemini/commands/trellis/finish-work.toml +0 -133
- package/dist/templates/gemini/commands/trellis/integrate-skill.toml +0 -104
- package/dist/templates/gemini/commands/trellis/onboard.toml +0 -111
- package/dist/templates/gemini/commands/trellis/record-session.toml +0 -66
- package/dist/templates/gemini/commands/trellis/start.toml +0 -354
- package/dist/templates/gemini/commands/trellis/update-spec.toml +0 -132
- package/dist/templates/iflow/agents/debug.md +0 -106
- package/dist/templates/iflow/agents/dispatch.md +0 -213
- package/dist/templates/iflow/agents/plan.md +0 -396
- package/dist/templates/iflow/agents/research.md +0 -120
- package/dist/templates/iflow/commands/trellis/before-dev.md +0 -29
- package/dist/templates/iflow/commands/trellis/brainstorm.md +0 -487
- package/dist/templates/iflow/commands/trellis/break-loop.md +0 -125
- package/dist/templates/iflow/commands/trellis/check-cross-layer.md +0 -153
- package/dist/templates/iflow/commands/trellis/check.md +0 -25
- package/dist/templates/iflow/commands/trellis/create-command.md +0 -152
- package/dist/templates/iflow/commands/trellis/finish-work.md +0 -153
- package/dist/templates/iflow/commands/trellis/integrate-skill.md +0 -219
- package/dist/templates/iflow/commands/trellis/onboard.md +0 -358
- package/dist/templates/iflow/commands/trellis/parallel.md +0 -192
- package/dist/templates/iflow/commands/trellis/record-session.md +0 -62
- package/dist/templates/iflow/commands/trellis/start.md +0 -393
- package/dist/templates/iflow/commands/trellis/update-spec.md +0 -354
- package/dist/templates/iflow/hooks/ralph-loop.py +0 -395
- package/dist/templates/iflow/hooks/session-start.py +0 -403
- package/dist/templates/iflow/index.d.ts +0 -54
- package/dist/templates/iflow/index.d.ts.map +0 -1
- package/dist/templates/iflow/index.js +0 -85
- package/dist/templates/iflow/index.js.map +0 -1
- package/dist/templates/iflow/settings.json +0 -60
- package/dist/templates/kilo/index.d.ts +0 -16
- package/dist/templates/kilo/index.d.ts.map +0 -1
- package/dist/templates/kilo/index.js +0 -39
- package/dist/templates/kilo/index.js.map +0 -1
- package/dist/templates/kilo/workflows/before-dev.md +0 -29
- package/dist/templates/kilo/workflows/brainstorm.md +0 -487
- package/dist/templates/kilo/workflows/break-loop.md +0 -125
- package/dist/templates/kilo/workflows/check-cross-layer.md +0 -153
- package/dist/templates/kilo/workflows/check.md +0 -25
- package/dist/templates/kilo/workflows/create-command.md +0 -152
- package/dist/templates/kilo/workflows/finish-work.md +0 -129
- package/dist/templates/kilo/workflows/integrate-skill.md +0 -219
- package/dist/templates/kilo/workflows/onboard.md +0 -358
- package/dist/templates/kilo/workflows/parallel.md +0 -193
- package/dist/templates/kilo/workflows/record-session.md +0 -62
- package/dist/templates/kilo/workflows/start.md +0 -387
- package/dist/templates/kilo/workflows/update-spec.md +0 -285
- package/dist/templates/kiro/skills/before-dev/SKILL.md +0 -34
- package/dist/templates/kiro/skills/brainstorm/SKILL.md +0 -492
- package/dist/templates/kiro/skills/break-loop/SKILL.md +0 -130
- package/dist/templates/kiro/skills/check/SKILL.md +0 -30
- package/dist/templates/kiro/skills/check-cross-layer/SKILL.md +0 -158
- package/dist/templates/kiro/skills/create-command/SKILL.md +0 -101
- package/dist/templates/kiro/skills/finish-work/SKILL.md +0 -148
- package/dist/templates/kiro/skills/integrate-skill/SKILL.md +0 -221
- package/dist/templates/kiro/skills/onboard/SKILL.md +0 -363
- package/dist/templates/kiro/skills/record-session/SKILL.md +0 -67
- package/dist/templates/kiro/skills/start/SKILL.md +0 -351
- package/dist/templates/kiro/skills/update-spec/SKILL.md +0 -335
- package/dist/templates/opencode/agents/debug.md +0 -129
- package/dist/templates/opencode/agents/dispatch.md +0 -223
- package/dist/templates/opencode/agents/trellis-plan.md +0 -427
- package/dist/templates/opencode/commands/trellis/before-dev.md +0 -29
- package/dist/templates/opencode/commands/trellis/brainstorm.md +0 -487
- package/dist/templates/opencode/commands/trellis/check-cross-layer.md +0 -153
- package/dist/templates/opencode/commands/trellis/check.md +0 -25
- package/dist/templates/opencode/commands/trellis/create-command.md +0 -154
- package/dist/templates/opencode/commands/trellis/finish-work.md +0 -144
- package/dist/templates/opencode/commands/trellis/integrate-skill.md +0 -219
- package/dist/templates/opencode/commands/trellis/migrate-specs.md +0 -0
- package/dist/templates/opencode/commands/trellis/onboard.md +0 -358
- package/dist/templates/opencode/commands/trellis/parallel.md +0 -193
- package/dist/templates/opencode/commands/trellis/record-session.md +0 -62
- package/dist/templates/opencode/commands/trellis/start.md +0 -351
- package/dist/templates/opencode/commands/trellis/update-spec.md +0 -354
- package/dist/templates/qoder/skills/before-dev/SKILL.md +0 -34
- package/dist/templates/qoder/skills/brainstorm/SKILL.md +0 -492
- package/dist/templates/qoder/skills/break-loop/SKILL.md +0 -130
- package/dist/templates/qoder/skills/check/SKILL.md +0 -30
- package/dist/templates/qoder/skills/check-cross-layer/SKILL.md +0 -158
- package/dist/templates/qoder/skills/create-command/SKILL.md +0 -101
- package/dist/templates/qoder/skills/finish-work/SKILL.md +0 -134
- package/dist/templates/qoder/skills/integrate-skill/SKILL.md +0 -221
- package/dist/templates/qoder/skills/onboard/SKILL.md +0 -363
- package/dist/templates/qoder/skills/record-session/SKILL.md +0 -67
- package/dist/templates/qoder/skills/start/SKILL.md +0 -388
- package/dist/templates/qoder/skills/update-spec/SKILL.md +0 -290
- package/dist/templates/trellis/scripts/common/phase.py +0 -254
- package/dist/templates/trellis/scripts/common/registry.py +0 -335
- package/dist/templates/trellis/scripts/common/worktree.py +0 -305
- package/dist/templates/trellis/scripts/multi_agent/__init__.py +0 -5
- package/dist/templates/trellis/scripts/multi_agent/_bootstrap.py +0 -17
- package/dist/templates/trellis/scripts/multi_agent/cleanup.py +0 -398
- package/dist/templates/trellis/scripts/multi_agent/create_pr.py +0 -620
- package/dist/templates/trellis/scripts/multi_agent/plan.py +0 -213
- package/dist/templates/trellis/scripts/multi_agent/start.py +0 -539
- package/dist/templates/trellis/scripts/multi_agent/status.py +0 -76
- package/dist/templates/trellis/scripts/multi_agent/status_display.py +0 -542
- package/dist/templates/trellis/scripts/multi_agent/status_monitor.py +0 -225
- package/dist/templates/trellis/scripts-shell-archive/add-session.sh +0 -384
- package/dist/templates/trellis/scripts-shell-archive/common/developer.sh +0 -129
- package/dist/templates/trellis/scripts-shell-archive/common/git-context.sh +0 -263
- package/dist/templates/trellis/scripts-shell-archive/common/paths.sh +0 -208
- package/dist/templates/trellis/scripts-shell-archive/common/phase.sh +0 -150
- package/dist/templates/trellis/scripts-shell-archive/common/registry.sh +0 -247
- package/dist/templates/trellis/scripts-shell-archive/common/task-queue.sh +0 -142
- package/dist/templates/trellis/scripts-shell-archive/common/task-utils.sh +0 -151
- package/dist/templates/trellis/scripts-shell-archive/common/worktree.sh +0 -128
- package/dist/templates/trellis/scripts-shell-archive/create-bootstrap.sh +0 -299
- package/dist/templates/trellis/scripts-shell-archive/get-context.sh +0 -7
- package/dist/templates/trellis/scripts-shell-archive/get-developer.sh +0 -15
- package/dist/templates/trellis/scripts-shell-archive/init-developer.sh +0 -34
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/cleanup.sh +0 -396
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/create-pr.sh +0 -241
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/plan.sh +0 -207
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/start.sh +0 -317
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/status.sh +0 -828
- package/dist/templates/trellis/scripts-shell-archive/task.sh +0 -1204
- package/dist/templates/trellis/worktree.yaml +0 -47
- package/dist/templates/windsurf/index.d.ts +0 -21
- package/dist/templates/windsurf/index.d.ts.map +0 -1
- package/dist/templates/windsurf/index.js +0 -44
- package/dist/templates/windsurf/index.js.map +0 -1
- package/dist/templates/windsurf/workflows/trellis-before-dev.md +0 -31
- package/dist/templates/windsurf/workflows/trellis-brainstorm.md +0 -491
- package/dist/templates/windsurf/workflows/trellis-break-loop.md +0 -111
- package/dist/templates/windsurf/workflows/trellis-check-cross-layer.md +0 -157
- package/dist/templates/windsurf/workflows/trellis-check.md +0 -27
- package/dist/templates/windsurf/workflows/trellis-create-command.md +0 -154
- package/dist/templates/windsurf/workflows/trellis-finish-work.md +0 -147
- package/dist/templates/windsurf/workflows/trellis-integrate-skill.md +0 -220
- package/dist/templates/windsurf/workflows/trellis-onboard.md +0 -362
- package/dist/templates/windsurf/workflows/trellis-record-session.md +0 -66
- package/dist/templates/windsurf/workflows/trellis-start.md +0 -373
- package/dist/templates/windsurf/workflows/trellis-update-spec.md +0 -358
- /package/dist/templates/{claude/commands/trellis → common/skills}/before-dev.md +0 -0
- /package/dist/templates/{claude/hooks → shared-hooks}/statusline.py +0 -0
|
@@ -1,542 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
Multi-Agent Pipeline: Status display and formatting.
|
|
4
|
-
|
|
5
|
-
Provides:
|
|
6
|
-
cmd_help - Show help text
|
|
7
|
-
cmd_list - List worktrees and agents
|
|
8
|
-
cmd_summary - Summary of all tasks with agent status
|
|
9
|
-
cmd_detail - Detailed single-agent status
|
|
10
|
-
cmd_registry - Dump agent registry
|
|
11
|
-
|
|
12
|
-
Also exports shared utilities used by status_monitor:
|
|
13
|
-
is_running, find_agent, get_registry_file, calc_elapsed, count_modified_files
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
|
|
18
|
-
import json
|
|
19
|
-
import os
|
|
20
|
-
import subprocess
|
|
21
|
-
from datetime import datetime
|
|
22
|
-
from pathlib import Path
|
|
23
|
-
|
|
24
|
-
from common.cli_adapter import get_cli_adapter
|
|
25
|
-
from common.io import read_json
|
|
26
|
-
from common.log import Colors
|
|
27
|
-
from common.developer import ensure_developer
|
|
28
|
-
from common.paths import (
|
|
29
|
-
get_repo_root,
|
|
30
|
-
get_tasks_dir,
|
|
31
|
-
)
|
|
32
|
-
from common.phase import get_phase_info
|
|
33
|
-
from common.task_queue import format_task_stats, get_task_stats
|
|
34
|
-
from common.tasks import iter_active_tasks
|
|
35
|
-
from common.worktree import get_agents_dir
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
# =============================================================================
|
|
39
|
-
# Shared Utilities
|
|
40
|
-
# =============================================================================
|
|
41
|
-
|
|
42
|
-
def is_running(pid: int | str | None) -> bool:
|
|
43
|
-
"""Check if PID is running."""
|
|
44
|
-
if not pid:
|
|
45
|
-
return False
|
|
46
|
-
try:
|
|
47
|
-
pid_int = int(pid)
|
|
48
|
-
os.kill(pid_int, 0)
|
|
49
|
-
return True
|
|
50
|
-
except (ProcessLookupError, ValueError, PermissionError, TypeError):
|
|
51
|
-
return False
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def status_color(status: str) -> str:
|
|
55
|
-
"""Get status color."""
|
|
56
|
-
colors = {
|
|
57
|
-
"completed": Colors.GREEN,
|
|
58
|
-
"in_progress": Colors.BLUE,
|
|
59
|
-
"planning": Colors.YELLOW,
|
|
60
|
-
}
|
|
61
|
-
return colors.get(status, Colors.DIM)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
def get_registry_file(repo_root: Path) -> Path | None:
|
|
65
|
-
"""Get registry file path."""
|
|
66
|
-
agents_dir = get_agents_dir(repo_root)
|
|
67
|
-
if agents_dir:
|
|
68
|
-
return agents_dir / "registry.json"
|
|
69
|
-
return None
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
def find_agent(search: str, repo_root: Path) -> dict | None:
|
|
73
|
-
"""Find agent by task name or ID."""
|
|
74
|
-
registry_file = get_registry_file(repo_root)
|
|
75
|
-
if not registry_file or not registry_file.is_file():
|
|
76
|
-
return None
|
|
77
|
-
|
|
78
|
-
data = read_json(registry_file)
|
|
79
|
-
if not data:
|
|
80
|
-
return None
|
|
81
|
-
|
|
82
|
-
for agent in data.get("agents", []):
|
|
83
|
-
# Exact ID match
|
|
84
|
-
if agent.get("id") == search:
|
|
85
|
-
return agent
|
|
86
|
-
# Partial match on task_dir
|
|
87
|
-
task_dir = agent.get("task_dir", "")
|
|
88
|
-
if search in task_dir:
|
|
89
|
-
return agent
|
|
90
|
-
|
|
91
|
-
return None
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
def calc_elapsed(started: str | None) -> str:
|
|
95
|
-
"""Calculate elapsed time from ISO timestamp."""
|
|
96
|
-
if not started:
|
|
97
|
-
return "N/A"
|
|
98
|
-
|
|
99
|
-
try:
|
|
100
|
-
# Parse ISO format
|
|
101
|
-
if "+" in started:
|
|
102
|
-
started = started.split("+")[0]
|
|
103
|
-
if "T" in started:
|
|
104
|
-
start_dt = datetime.fromisoformat(started)
|
|
105
|
-
else:
|
|
106
|
-
return "N/A"
|
|
107
|
-
|
|
108
|
-
now = datetime.now()
|
|
109
|
-
elapsed = (now - start_dt).total_seconds()
|
|
110
|
-
|
|
111
|
-
if elapsed < 60:
|
|
112
|
-
return f"{int(elapsed)}s"
|
|
113
|
-
elif elapsed < 3600:
|
|
114
|
-
mins = int(elapsed // 60)
|
|
115
|
-
secs = int(elapsed % 60)
|
|
116
|
-
return f"{mins}m {secs}s"
|
|
117
|
-
else:
|
|
118
|
-
hours = int(elapsed // 3600)
|
|
119
|
-
mins = int((elapsed % 3600) // 60)
|
|
120
|
-
return f"{hours}h {mins}m"
|
|
121
|
-
except (ValueError, TypeError):
|
|
122
|
-
return "N/A"
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
def count_modified_files(worktree: str) -> int:
|
|
126
|
-
"""Count modified files in worktree."""
|
|
127
|
-
if not Path(worktree).is_dir():
|
|
128
|
-
return 0
|
|
129
|
-
|
|
130
|
-
try:
|
|
131
|
-
result = subprocess.run(
|
|
132
|
-
["git", "status", "--short"],
|
|
133
|
-
cwd=worktree,
|
|
134
|
-
capture_output=True,
|
|
135
|
-
text=True,
|
|
136
|
-
encoding="utf-8",
|
|
137
|
-
errors="replace",
|
|
138
|
-
)
|
|
139
|
-
return len([line for line in result.stdout.splitlines() if line.strip()])
|
|
140
|
-
except Exception:
|
|
141
|
-
return 0
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
# =============================================================================
|
|
145
|
-
# Commands
|
|
146
|
-
# =============================================================================
|
|
147
|
-
|
|
148
|
-
def cmd_help() -> int:
|
|
149
|
-
"""Show help."""
|
|
150
|
-
print("""Multi-Agent Pipeline: Status Monitor
|
|
151
|
-
|
|
152
|
-
Usage:
|
|
153
|
-
python3 status.py Show summary of all tasks
|
|
154
|
-
python3 status.py -a <assignee> Filter tasks by assignee
|
|
155
|
-
python3 status.py --list List all worktrees and agents
|
|
156
|
-
python3 status.py --detail <task> Detailed task status
|
|
157
|
-
python3 status.py --progress <task> Quick progress view with recent activity
|
|
158
|
-
python3 status.py --watch <task> Watch agent log in real-time
|
|
159
|
-
python3 status.py --log <task> Show recent log entries
|
|
160
|
-
python3 status.py --registry Show agent registry
|
|
161
|
-
|
|
162
|
-
Examples:
|
|
163
|
-
python3 status.py -a taosu
|
|
164
|
-
python3 status.py --detail my-task
|
|
165
|
-
python3 status.py --progress my-task
|
|
166
|
-
python3 status.py --watch 01-16-worktree-support
|
|
167
|
-
python3 status.py --log worktree-support
|
|
168
|
-
""")
|
|
169
|
-
return 0
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
def cmd_list(repo_root: Path) -> int:
|
|
173
|
-
"""List worktrees and agents."""
|
|
174
|
-
print(f"{Colors.BLUE}=== Git Worktrees ==={Colors.NC}")
|
|
175
|
-
print()
|
|
176
|
-
|
|
177
|
-
subprocess.run(["git", "worktree", "list"], cwd=repo_root)
|
|
178
|
-
print()
|
|
179
|
-
|
|
180
|
-
print(f"{Colors.BLUE}=== Registered Agents ==={Colors.NC}")
|
|
181
|
-
print()
|
|
182
|
-
|
|
183
|
-
registry_file = get_registry_file(repo_root)
|
|
184
|
-
if not registry_file or not registry_file.is_file():
|
|
185
|
-
print(" (no registry found)")
|
|
186
|
-
return 0
|
|
187
|
-
|
|
188
|
-
data = read_json(registry_file)
|
|
189
|
-
if not data or not data.get("agents"):
|
|
190
|
-
print(" (no agents registered)")
|
|
191
|
-
return 0
|
|
192
|
-
|
|
193
|
-
for agent in data["agents"]:
|
|
194
|
-
agent_id = agent.get("id", "?")
|
|
195
|
-
pid = agent.get("pid")
|
|
196
|
-
wt = agent.get("worktree_path", "?")
|
|
197
|
-
started = agent.get("started_at", "?")
|
|
198
|
-
|
|
199
|
-
if is_running(pid):
|
|
200
|
-
status_icon = f"{Colors.GREEN}●{Colors.NC}"
|
|
201
|
-
else:
|
|
202
|
-
status_icon = f"{Colors.RED}○{Colors.NC}"
|
|
203
|
-
|
|
204
|
-
print(f" {status_icon} {agent_id} (PID: {pid})")
|
|
205
|
-
print(f" {Colors.DIM}Worktree: {wt}{Colors.NC}")
|
|
206
|
-
print(f" {Colors.DIM}Started: {started}{Colors.NC}")
|
|
207
|
-
print()
|
|
208
|
-
|
|
209
|
-
return 0
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
def cmd_summary(repo_root: Path, filter_assignee: str | None = None) -> int:
|
|
213
|
-
"""Show summary of all tasks."""
|
|
214
|
-
# Import lazily to avoid circular import at module level
|
|
215
|
-
from .status_monitor import get_last_tool, get_last_message
|
|
216
|
-
|
|
217
|
-
ensure_developer(repo_root)
|
|
218
|
-
|
|
219
|
-
tasks_dir = get_tasks_dir(repo_root)
|
|
220
|
-
if not tasks_dir.is_dir():
|
|
221
|
-
print("No tasks directory found")
|
|
222
|
-
return 0
|
|
223
|
-
|
|
224
|
-
registry_file = get_registry_file(repo_root)
|
|
225
|
-
|
|
226
|
-
# Count running agents
|
|
227
|
-
running_count = 0
|
|
228
|
-
total_agents = 0
|
|
229
|
-
|
|
230
|
-
if registry_file and registry_file.is_file():
|
|
231
|
-
data = read_json(registry_file)
|
|
232
|
-
if data:
|
|
233
|
-
agents = data.get("agents", [])
|
|
234
|
-
total_agents = len(agents)
|
|
235
|
-
for agent in agents:
|
|
236
|
-
if is_running(agent.get("pid")):
|
|
237
|
-
running_count += 1
|
|
238
|
-
|
|
239
|
-
# Task queue stats
|
|
240
|
-
task_stats = get_task_stats(repo_root)
|
|
241
|
-
|
|
242
|
-
print(f"{Colors.BLUE}=== Multi-Agent Status ==={Colors.NC}")
|
|
243
|
-
print(
|
|
244
|
-
f" Agents: {Colors.GREEN}{running_count}{Colors.NC} running / {total_agents} registered"
|
|
245
|
-
)
|
|
246
|
-
print(f" Tasks: {format_task_stats(task_stats)}")
|
|
247
|
-
print()
|
|
248
|
-
|
|
249
|
-
# Process tasks
|
|
250
|
-
running_tasks = []
|
|
251
|
-
stopped_tasks = []
|
|
252
|
-
regular_tasks = []
|
|
253
|
-
|
|
254
|
-
registry_data = (
|
|
255
|
-
read_json(registry_file)
|
|
256
|
-
if registry_file and registry_file.is_file()
|
|
257
|
-
else None
|
|
258
|
-
)
|
|
259
|
-
|
|
260
|
-
for t in iter_active_tasks(tasks_dir):
|
|
261
|
-
name = t.dir_name
|
|
262
|
-
status = t.status
|
|
263
|
-
assignee = t.assignee or "unassigned"
|
|
264
|
-
priority = t.priority
|
|
265
|
-
|
|
266
|
-
# Filter by assignee
|
|
267
|
-
if filter_assignee and assignee != filter_assignee:
|
|
268
|
-
continue
|
|
269
|
-
|
|
270
|
-
# Check agent status
|
|
271
|
-
agent_info = None
|
|
272
|
-
if registry_data:
|
|
273
|
-
for agent in registry_data.get("agents", []):
|
|
274
|
-
if name in agent.get("task_dir", ""):
|
|
275
|
-
agent_info = agent
|
|
276
|
-
break
|
|
277
|
-
|
|
278
|
-
if agent_info:
|
|
279
|
-
pid = agent_info.get("pid")
|
|
280
|
-
worktree = agent_info.get("worktree_path", "")
|
|
281
|
-
started = agent_info.get("started_at")
|
|
282
|
-
agent_platform = agent_info.get("platform", "claude")
|
|
283
|
-
|
|
284
|
-
if is_running(pid):
|
|
285
|
-
# Running agent
|
|
286
|
-
task_dir_rel = agent_info.get("task_dir", "")
|
|
287
|
-
worktree_task_json = Path(worktree) / task_dir_rel / "task.json"
|
|
288
|
-
phase_source = t.directory / "task.json"
|
|
289
|
-
if worktree_task_json.is_file():
|
|
290
|
-
phase_source = worktree_task_json
|
|
291
|
-
|
|
292
|
-
phase_info_str = get_phase_info(phase_source)
|
|
293
|
-
elapsed = calc_elapsed(started)
|
|
294
|
-
modified = count_modified_files(worktree)
|
|
295
|
-
|
|
296
|
-
worktree_data = read_json(phase_source)
|
|
297
|
-
branch = worktree_data.get("branch", "N/A") if worktree_data else "N/A"
|
|
298
|
-
|
|
299
|
-
log_file = Path(worktree) / ".agent-log"
|
|
300
|
-
last_tool = get_last_tool(log_file, platform=agent_platform)
|
|
301
|
-
|
|
302
|
-
running_tasks.append(
|
|
303
|
-
{
|
|
304
|
-
"name": name,
|
|
305
|
-
"priority": priority,
|
|
306
|
-
"assignee": assignee,
|
|
307
|
-
"phase_info": phase_info_str,
|
|
308
|
-
"elapsed": elapsed,
|
|
309
|
-
"branch": branch,
|
|
310
|
-
"modified": modified,
|
|
311
|
-
"last_tool": last_tool,
|
|
312
|
-
"pid": pid,
|
|
313
|
-
}
|
|
314
|
-
)
|
|
315
|
-
else:
|
|
316
|
-
# Stopped agent
|
|
317
|
-
task_dir_rel = agent_info.get("task_dir", "")
|
|
318
|
-
worktree_task_json = Path(worktree) / task_dir_rel / "task.json"
|
|
319
|
-
worktree_status = "unknown"
|
|
320
|
-
|
|
321
|
-
if worktree_task_json.is_file():
|
|
322
|
-
wt_data = read_json(worktree_task_json)
|
|
323
|
-
if wt_data:
|
|
324
|
-
worktree_status = wt_data.get("status", "unknown")
|
|
325
|
-
|
|
326
|
-
session_id_file = Path(worktree) / ".session-id"
|
|
327
|
-
log_file = Path(worktree) / ".agent-log"
|
|
328
|
-
|
|
329
|
-
stopped_tasks.append(
|
|
330
|
-
{
|
|
331
|
-
"name": name,
|
|
332
|
-
"worktree": worktree,
|
|
333
|
-
"status": worktree_status,
|
|
334
|
-
"session_id_file": session_id_file,
|
|
335
|
-
"log_file": log_file,
|
|
336
|
-
"platform": agent_info.get("platform", "claude"),
|
|
337
|
-
}
|
|
338
|
-
)
|
|
339
|
-
else:
|
|
340
|
-
# Regular task
|
|
341
|
-
regular_tasks.append(
|
|
342
|
-
{
|
|
343
|
-
"name": name,
|
|
344
|
-
"status": status,
|
|
345
|
-
"priority": priority,
|
|
346
|
-
"assignee": assignee,
|
|
347
|
-
}
|
|
348
|
-
)
|
|
349
|
-
|
|
350
|
-
# Output running agents
|
|
351
|
-
if running_tasks:
|
|
352
|
-
print(f"{Colors.CYAN}Running Agents:{Colors.NC}")
|
|
353
|
-
for t in running_tasks:
|
|
354
|
-
priority_color = (
|
|
355
|
-
Colors.RED
|
|
356
|
-
if t["priority"] == "P0"
|
|
357
|
-
else (Colors.YELLOW if t["priority"] == "P1" else Colors.BLUE)
|
|
358
|
-
)
|
|
359
|
-
print(
|
|
360
|
-
f"{Colors.GREEN}▶{Colors.NC} {Colors.CYAN}{t['name']}{Colors.NC} {Colors.GREEN}[running]{Colors.NC} {priority_color}[{t['priority']}]{Colors.NC} @{t['assignee']}"
|
|
361
|
-
)
|
|
362
|
-
print(f" Phase: {t['phase_info']}")
|
|
363
|
-
print(f" Elapsed: {t['elapsed']}")
|
|
364
|
-
print(f" Branch: {Colors.DIM}{t['branch']}{Colors.NC}")
|
|
365
|
-
print(f" Modified: {t['modified']} file(s)")
|
|
366
|
-
if t["last_tool"]:
|
|
367
|
-
print(f" Activity: {Colors.YELLOW}{t['last_tool']}{Colors.NC}")
|
|
368
|
-
print(f" PID: {Colors.DIM}{t['pid']}{Colors.NC}")
|
|
369
|
-
print()
|
|
370
|
-
|
|
371
|
-
# Output stopped agents
|
|
372
|
-
if stopped_tasks:
|
|
373
|
-
print(f"{Colors.RED}Stopped Agents:{Colors.NC}")
|
|
374
|
-
for t in stopped_tasks:
|
|
375
|
-
if t["status"] == "completed":
|
|
376
|
-
print(
|
|
377
|
-
f"{Colors.GREEN}✓{Colors.NC} {t['name']} {Colors.GREEN}[completed]{Colors.NC}"
|
|
378
|
-
)
|
|
379
|
-
else:
|
|
380
|
-
if t["session_id_file"].is_file():
|
|
381
|
-
session_id = (
|
|
382
|
-
t["session_id_file"].read_text(encoding="utf-8").strip()
|
|
383
|
-
)
|
|
384
|
-
last_msg = get_last_message(t["log_file"], 150, platform=t.get("platform", "claude"))
|
|
385
|
-
print(
|
|
386
|
-
f"{Colors.RED}○{Colors.NC} {t['name']} {Colors.RED}[stopped]{Colors.NC}"
|
|
387
|
-
)
|
|
388
|
-
if last_msg:
|
|
389
|
-
print(f'{Colors.DIM}"{last_msg}"{Colors.NC}')
|
|
390
|
-
# Use CLI adapter for platform-specific resume command
|
|
391
|
-
adapter = get_cli_adapter(t.get("platform", "claude"))
|
|
392
|
-
resume_cmd = adapter.get_resume_command_str(session_id, cwd=t["worktree"])
|
|
393
|
-
print(f"{Colors.YELLOW}{resume_cmd}{Colors.NC}")
|
|
394
|
-
else:
|
|
395
|
-
print(
|
|
396
|
-
f"{Colors.RED}○{Colors.NC} {t['name']} {Colors.RED}[stopped]{Colors.NC} {Colors.DIM}(no session-id){Colors.NC}"
|
|
397
|
-
)
|
|
398
|
-
print()
|
|
399
|
-
|
|
400
|
-
# Separator
|
|
401
|
-
if (running_tasks or stopped_tasks) and regular_tasks:
|
|
402
|
-
print(f"{Colors.DIM}───────────────────────────────────────{Colors.NC}")
|
|
403
|
-
print()
|
|
404
|
-
|
|
405
|
-
# Output regular tasks grouped by assignee
|
|
406
|
-
if regular_tasks:
|
|
407
|
-
# Sort by assignee, priority, status
|
|
408
|
-
regular_tasks.sort(
|
|
409
|
-
key=lambda x: (
|
|
410
|
-
x["assignee"],
|
|
411
|
-
{"P0": 0, "P1": 1, "P2": 2, "P3": 3}.get(x["priority"], 2),
|
|
412
|
-
{"in_progress": 0, "planning": 1, "completed": 2}.get(x["status"], 1),
|
|
413
|
-
)
|
|
414
|
-
)
|
|
415
|
-
|
|
416
|
-
current_assignee = None
|
|
417
|
-
for t in regular_tasks:
|
|
418
|
-
if t["assignee"] != current_assignee:
|
|
419
|
-
if current_assignee is not None:
|
|
420
|
-
print()
|
|
421
|
-
print(f"{Colors.CYAN}@{t['assignee']}:{Colors.NC}")
|
|
422
|
-
current_assignee = t["assignee"]
|
|
423
|
-
|
|
424
|
-
color = status_color(t["status"])
|
|
425
|
-
priority_color = (
|
|
426
|
-
Colors.RED
|
|
427
|
-
if t["priority"] == "P0"
|
|
428
|
-
else (Colors.YELLOW if t["priority"] == "P1" else Colors.BLUE)
|
|
429
|
-
)
|
|
430
|
-
print(
|
|
431
|
-
f" {color}●{Colors.NC} {t['name']} ({t['status']}) {priority_color}[{t['priority']}]{Colors.NC}"
|
|
432
|
-
)
|
|
433
|
-
|
|
434
|
-
if running_tasks:
|
|
435
|
-
print()
|
|
436
|
-
print(f"{Colors.DIM}─────────────────────────────────────{Colors.NC}")
|
|
437
|
-
print(f"{Colors.DIM}Use --progress <name> for quick activity view{Colors.NC}")
|
|
438
|
-
print(f"{Colors.DIM}Use --detail <name> for more info{Colors.NC}")
|
|
439
|
-
|
|
440
|
-
print()
|
|
441
|
-
return 0
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
def cmd_detail(target: str, repo_root: Path) -> int:
|
|
445
|
-
"""Show detailed task status."""
|
|
446
|
-
agent = find_agent(target, repo_root)
|
|
447
|
-
if not agent:
|
|
448
|
-
print(f"Agent not found: {target}")
|
|
449
|
-
return 1
|
|
450
|
-
|
|
451
|
-
agent_id = agent.get("id", "?")
|
|
452
|
-
pid = agent.get("pid")
|
|
453
|
-
worktree = agent.get("worktree_path", "?")
|
|
454
|
-
task_dir = agent.get("task_dir", "?")
|
|
455
|
-
started = agent.get("started_at", "?")
|
|
456
|
-
platform = agent.get("platform", "claude")
|
|
457
|
-
|
|
458
|
-
# Check for session-id
|
|
459
|
-
session_id = ""
|
|
460
|
-
session_id_file = Path(worktree) / ".session-id"
|
|
461
|
-
if session_id_file.is_file():
|
|
462
|
-
session_id = session_id_file.read_text(encoding="utf-8").strip()
|
|
463
|
-
|
|
464
|
-
print(f"{Colors.BLUE}=== Agent Detail: {agent_id} ==={Colors.NC}")
|
|
465
|
-
print()
|
|
466
|
-
print(f" ID: {agent_id}")
|
|
467
|
-
print(f" PID: {pid}")
|
|
468
|
-
print(f" Session: {session_id or 'N/A'}")
|
|
469
|
-
print(f" Worktree: {worktree}")
|
|
470
|
-
print(f" Task Dir: {task_dir}")
|
|
471
|
-
print(f" Started: {started}")
|
|
472
|
-
print()
|
|
473
|
-
|
|
474
|
-
# Status
|
|
475
|
-
if is_running(pid):
|
|
476
|
-
print(f" Status: {Colors.GREEN}Running{Colors.NC}")
|
|
477
|
-
else:
|
|
478
|
-
print(f" Status: {Colors.RED}Stopped{Colors.NC}")
|
|
479
|
-
if session_id:
|
|
480
|
-
print()
|
|
481
|
-
# Use CLI adapter for platform-specific resume command
|
|
482
|
-
adapter = get_cli_adapter(platform)
|
|
483
|
-
resume_cmd = adapter.get_resume_command_str(session_id, cwd=worktree)
|
|
484
|
-
print(f" {Colors.YELLOW}Resume:{Colors.NC} {resume_cmd}")
|
|
485
|
-
|
|
486
|
-
# Task info
|
|
487
|
-
task_json = repo_root / task_dir / "task.json"
|
|
488
|
-
if task_json.is_file():
|
|
489
|
-
print()
|
|
490
|
-
print(f"{Colors.BLUE}=== Task Info ==={Colors.NC}")
|
|
491
|
-
print()
|
|
492
|
-
data = read_json(task_json)
|
|
493
|
-
if data:
|
|
494
|
-
print(f" Status: {data.get('status', 'unknown')}")
|
|
495
|
-
print(f" Branch: {data.get('branch', 'N/A')}")
|
|
496
|
-
print(f" Base Branch: {data.get('base_branch', 'N/A')}")
|
|
497
|
-
|
|
498
|
-
# Git changes
|
|
499
|
-
if Path(worktree).is_dir():
|
|
500
|
-
print()
|
|
501
|
-
print(f"{Colors.BLUE}=== Git Changes ==={Colors.NC}")
|
|
502
|
-
print()
|
|
503
|
-
|
|
504
|
-
result = subprocess.run(
|
|
505
|
-
["git", "status", "--short"],
|
|
506
|
-
cwd=worktree,
|
|
507
|
-
capture_output=True,
|
|
508
|
-
text=True,
|
|
509
|
-
encoding="utf-8",
|
|
510
|
-
errors="replace",
|
|
511
|
-
)
|
|
512
|
-
changes = result.stdout.strip()
|
|
513
|
-
if changes:
|
|
514
|
-
for line in changes.splitlines()[:10]:
|
|
515
|
-
print(f" {line}")
|
|
516
|
-
total = len(changes.splitlines())
|
|
517
|
-
if total > 10:
|
|
518
|
-
print(f" ... and {total - 10} more")
|
|
519
|
-
else:
|
|
520
|
-
print(" (no changes)")
|
|
521
|
-
|
|
522
|
-
print()
|
|
523
|
-
return 0
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
def cmd_registry(repo_root: Path) -> int:
|
|
527
|
-
"""Show agent registry."""
|
|
528
|
-
registry_file = get_registry_file(repo_root)
|
|
529
|
-
|
|
530
|
-
print(f"{Colors.BLUE}=== Agent Registry ==={Colors.NC}")
|
|
531
|
-
print()
|
|
532
|
-
print(f"File: {registry_file}")
|
|
533
|
-
print()
|
|
534
|
-
|
|
535
|
-
if registry_file and registry_file.is_file():
|
|
536
|
-
data = read_json(registry_file)
|
|
537
|
-
if data:
|
|
538
|
-
print(json.dumps(data, indent=2))
|
|
539
|
-
else:
|
|
540
|
-
print("(registry not found)")
|
|
541
|
-
|
|
542
|
-
return 0
|