@devo-bmad-custom/agent-orchestration 1.0.13 → 1.0.17
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/lib/installer.js
CHANGED
|
@@ -234,6 +234,19 @@ async function install(opts) {
|
|
|
234
234
|
console.log(chalk.green(` ✓ .agents/skills/ (${skillFiles.length} files)`));
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
+
// ── Orchestration template ─────────────────────────────────────────────────
|
|
238
|
+
const pkgOrchSrc = path.join(SRC_DIR, '.agents', 'orchestration', 'session-template.md');
|
|
239
|
+
if (await fs.pathExists(pkgOrchSrc)) {
|
|
240
|
+
const destOrch = path.join(projectRoot, '.agents', 'orchestration');
|
|
241
|
+
await fs.ensureDir(destOrch);
|
|
242
|
+
const destFile = path.join(destOrch, 'session-template.md');
|
|
243
|
+
await fs.copy(pkgOrchSrc, destFile, { overwrite: true });
|
|
244
|
+
const content = await fs.readFile(pkgOrchSrc);
|
|
245
|
+
newFileEntries.push({ relPath: '.agents/orchestration/session-template.md', hash: sha256(content) });
|
|
246
|
+
installedCount++;
|
|
247
|
+
console.log(chalk.green(' ✓ .agents/orchestration/session-template.md'));
|
|
248
|
+
}
|
|
249
|
+
|
|
237
250
|
// ── Orphan removal (update only) ──────────────────────────────────────────
|
|
238
251
|
if (isUpdate) {
|
|
239
252
|
const oldEntries = await readFilesManifest(bmadDir);
|
package/package.json
CHANGED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Agent Session: {{session_id}}
|
|
2
|
+
<!-- Fill all {{placeholders}} on creation. Do not leave unfilled placeholders in an active session. -->
|
|
3
|
+
|
|
4
|
+
## Context
|
|
5
|
+
| Field | Value |
|
|
6
|
+
|-------|-------|
|
|
7
|
+
| **Session ID** | `{{session_id}}` |
|
|
8
|
+
| **Created** | {{iso_timestamp}} |
|
|
9
|
+
| **Creator** | {{creator_role}} (pane `{{creator_pane_id}}`) |
|
|
10
|
+
| **Project Root** | `{{project_root}}` |
|
|
11
|
+
| **Branch** | `{{git_branch}}` |
|
|
12
|
+
| **Base Branch** | `{{base_branch}}` |
|
|
13
|
+
| **Track** | {{track}} <!-- Nano / Small / Compact / Medium / Extended / Large / Review / General --> |
|
|
14
|
+
| **Execution Mode** | {{execution_mode}} <!-- inline / command-blocks / scripts / agent-teams --> |
|
|
15
|
+
| **Session File** | `{{session_file_path}}` |
|
|
16
|
+
|
|
17
|
+
## Git Snapshot
|
|
18
|
+
<!-- Captured at session start. Refresh with `git status` if session runs long. -->
|
|
19
|
+
|
|
20
|
+
**Uncommitted files:**
|
|
21
|
+
```
|
|
22
|
+
{{git_status_output}}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Recent commits (last 5):**
|
|
26
|
+
```
|
|
27
|
+
{{git_log_output}}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Diff summary (base..HEAD):**
|
|
31
|
+
```
|
|
32
|
+
{{git_diff_stat}}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Track Progress
|
|
38
|
+
<!-- Master agent updates this at the START of each step and marks done when complete. -->
|
|
39
|
+
<!-- Step status: ⬜ pending · 🔄 in-progress · ✅ done · ⛔ blocked · ⏭ skipped -->
|
|
40
|
+
|
|
41
|
+
**Current Step:** {{current_step_name}} ({{current_step_number, or 1 if General track}} / {{total_steps, or ? if General track}})
|
|
42
|
+
|
|
43
|
+
| # | Step | Status | Started | Notes |
|
|
44
|
+
|---|------|--------|---------|-------|
|
|
45
|
+
<!-- Master fills this table as the track runs. One row per step. -->
|
|
46
|
+
<!-- Example: | 1 | Target Definition | ✅ done | 14:02 | Targeted depth, branch feature/x | -->
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Active Agents
|
|
51
|
+
<!-- Register on startup. Update Status as work progresses. -->
|
|
52
|
+
|
|
53
|
+
| Pane ID | Role | Status | CWD | Claude Session ID |
|
|
54
|
+
|---------|------|--------|-----|-------------------|
|
|
55
|
+
| {{creator_pane_id}} | {{creator_role}} | active | `{{project_root}}` | — |
|
|
56
|
+
|
|
57
|
+
**Status values:** `active` · `busy` · `idle` · `ready-to-close` · `closed`
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Pane Lifecycle
|
|
62
|
+
<!-- Coordinator checks after every task. Close any pane showing `ready-to-close`. -->
|
|
63
|
+
|
|
64
|
+
| Pane ID | Role | Task | Status | Agent ✓ | Coord ✓ |
|
|
65
|
+
|---------|------|------|--------|---------|---------|
|
|
66
|
+
<!-- Agent ✓ columns: rb=report-back · sid=session-id · done=task-done -->
|
|
67
|
+
<!-- Coord ✓ columns: exit=/exit sent · kill=kill-pane · closed=status updated · rebal=layout rebalanced -->
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Tasks
|
|
72
|
+
<!-- Format: ### TASK-NNN · {status} · {assigned_role} -->
|
|
73
|
+
<!-- Status values: pending · in-progress · blocked · done -->
|
|
74
|
+
|
|
75
|
+
<!-- Add tasks below. Example:
|
|
76
|
+
### TASK-001 · pending · dev
|
|
77
|
+
- **Description:** Fix the user profile API endpoint
|
|
78
|
+
- **Status:** pending
|
|
79
|
+
- **Acceptance:** API returns 200 with correct user data
|
|
80
|
+
-->
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Decisions & Notes
|
|
85
|
+
<!-- Running log of decisions made during this session. Append, never overwrite. -->
|
|
86
|
+
|
|
87
|
+
- `{{iso_timestamp}}` — Session created. Branch: `{{git_branch}}`.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Blockers
|
|
92
|
+
<!-- Items requiring user input before work can continue. -->
|
|
93
|
+
|
|
94
|
+
<!-- | ID | Description | Needs | Since | -->
|
|
@@ -212,7 +212,7 @@ case "$MASTER_POS" in
|
|
|
212
212
|
tmux select-layout main-horizontal
|
|
213
213
|
;;
|
|
214
214
|
*)
|
|
215
|
-
tmux select-layout
|
|
215
|
+
tmux select-layout main-vertical
|
|
216
216
|
;;
|
|
217
217
|
esac
|
|
218
218
|
sleep 10
|
|
@@ -254,7 +254,11 @@ SESSION_NAME=$(tmux display-message -p "#{session_name}")
|
|
|
254
254
|
WINDOW_ID=$(tmux display-message -p "#{window_id}")
|
|
255
255
|
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD")
|
|
256
256
|
|
|
257
|
-
#
|
|
257
|
+
# 2. Determine role (passed via spawn context — $ROLE should be set)
|
|
258
|
+
ROLE="${ROLE:-unknown}"
|
|
259
|
+
|
|
260
|
+
# 3. Find session file — SESSION_FILE should be passed explicitly in spawn context.
|
|
261
|
+
# Fall back to most recent only if not provided (fragile — prefer explicit pass).
|
|
258
262
|
if [ -n "$BMAD_SESSION_ID" ]; then
|
|
259
263
|
SESSION_FILE="$PROJECT_ROOT/_bmad-output/sessions/$BMAD_SESSION_ID/agent-sessions.md"
|
|
260
264
|
else
|
|
@@ -336,16 +340,22 @@ SPAWNER_PANE=$(tmux display-message -p "#{pane_id}")
|
|
|
336
340
|
sleep 10
|
|
337
341
|
tmux split-window -h -c "$PROJECT_ROOT" \
|
|
338
342
|
"claude --dangerously-skip-permissions 'You are the $ROLE agent. \
|
|
339
|
-
FIRST: run /color $ROLE_COLOR then /rename $ROLE-agent. \
|
|
340
343
|
Spawner pane: $SPAWNER_PANE. Session file: $SESSION_FILE. \
|
|
344
|
+
Always use -l flag for message content in tmux send-keys. \
|
|
341
345
|
Always sleep 10 before and after every tmux command. \
|
|
342
346
|
Always append Enter to every tmux send-keys call. \
|
|
343
347
|
Always verify pane exists before targeting it. \
|
|
344
348
|
$TASK_CONTEXT'"
|
|
345
|
-
sleep
|
|
349
|
+
sleep 15
|
|
346
350
|
|
|
347
351
|
# Capture ID
|
|
348
352
|
NEW_PANE_ID=$(tmux list-panes -F "#{pane_id}" | tail -1)
|
|
353
|
+
|
|
354
|
+
# Set agent identity — spawner sends /color and /rename as separate commands
|
|
355
|
+
sleep 10
|
|
356
|
+
tmux send-keys -t "$NEW_PANE_ID" "/color $ROLE_COLOR" Enter
|
|
357
|
+
sleep 10
|
|
358
|
+
tmux send-keys -t "$NEW_PANE_ID" "/rename ${ROLE}-agent" Enter
|
|
349
359
|
sleep 10
|
|
350
360
|
|
|
351
361
|
# Set tmux pane title (border label)
|
|
@@ -475,7 +485,7 @@ fi
|
|
|
475
485
|
|
|
476
486
|
1. **Killing own pane** — always check `TARGET_PANE_ID != $(tmux display-message -p "#{pane_id}")` AND `TARGET_PANE_ID != MASTER_PANE` before `kill-pane`
|
|
477
487
|
2. **No `Enter` on send-keys** — message typed but never submitted
|
|
478
|
-
|
|
488
|
+
3. **No sleep between tmux commands** — race conditions, stale pane lists
|
|
479
489
|
3. **Combining `/color` and `/rename` in one send-keys call** — only the first command runs; send each as a separate call with `sleep 10` between
|
|
480
490
|
4. **Using OSC 2 / `select-pane -T` for naming** — Claude Code overwrites these
|
|
481
491
|
5. **Killing pane without `/exit` first** — leaves partial writes, git locks
|