@oxgeneral/orch 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/{App-LEVUTWQN.js → App-5OVBVRCD.js} +1 -1
  2. package/dist/{agent-Q34L27AY.js → agent-SI4JF5MV.js} +1 -1
  3. package/dist/{agent-shop-D2RS4BZK.js → agent-shop-JHDTCWCD.js} +1 -1
  4. package/dist/chunk-3AXNSYCM.js +2 -0
  5. package/dist/{chunk-BCPUTULS.js → chunk-HWEMBO36.js} +83 -54
  6. package/dist/chunk-J7ITYXE6.js +116 -0
  7. package/dist/chunk-J7ITYXE6.js.map +1 -0
  8. package/dist/{chunk-4TDXD3LA.js → chunk-SWNSNPBO.js} +12 -2
  9. package/dist/chunk-SWNSNPBO.js.map +1 -0
  10. package/dist/chunk-U2JVMD2G.js +66 -0
  11. package/dist/chunk-U2JVMD2G.js.map +1 -0
  12. package/dist/{chunk-EH3HRQP4.js → chunk-W3J7CURM.js} +8 -116
  13. package/dist/chunk-W3J7CURM.js.map +1 -0
  14. package/dist/chunk-ZMLF5HI5.js +11 -0
  15. package/dist/cli.js +1 -1
  16. package/dist/container-SEIWOLHY.js +4 -0
  17. package/dist/doctor-Q3GHJNZL.js +2 -0
  18. package/dist/index.d.ts +32 -1
  19. package/dist/index.js +12 -5
  20. package/dist/index.js.map +1 -1
  21. package/dist/init-D4356W7G.js +73 -0
  22. package/dist/orchestrator-G3Y7THMG.js +6 -0
  23. package/dist/{orchestrator-XPEMMBOO.js.map → orchestrator-G3Y7THMG.js.map} +1 -1
  24. package/dist/{orchestrator-JOTMB5XT.js → orchestrator-GQLNLOXB.js} +8 -4
  25. package/dist/{org-WAK3CDPG.js → org-KLYK6MMJ.js} +1 -1
  26. package/dist/skill-loader-IGRIELEM.js +9 -0
  27. package/dist/skill-loader-RHCFIK74.js +4 -0
  28. package/dist/skill-loader-RHCFIK74.js.map +1 -0
  29. package/dist/{task-QFLIIRKZ.js → task-3R2IX4HM.js} +1 -1
  30. package/dist/{tui-BJHZBCIR.js → tui-47O2OCKC.js} +1 -1
  31. package/dist/{workspace-manager-5EYCMAEO.js → workspace-manager-RH24FSNT.js} +4 -3
  32. package/dist/workspace-manager-RH24FSNT.js.map +1 -0
  33. package/dist/workspace-manager-VJ4FN5PJ.js +3 -0
  34. package/package.json +4 -3
  35. package/readme.md +11 -0
  36. package/scripts/{postinstall.js → postinstall.cjs} +24 -5
  37. package/skills/library/autoplan.md +315 -0
  38. package/skills/library/benchmark.md +242 -0
  39. package/skills/library/browse.md +266 -0
  40. package/skills/library/canary.md +248 -0
  41. package/skills/library/careful.md +42 -0
  42. package/skills/library/codex.md +431 -0
  43. package/skills/library/design-consultation.md +367 -0
  44. package/skills/library/design-review.md +744 -0
  45. package/skills/library/document-release.md +365 -0
  46. package/skills/library/freeze.md +60 -0
  47. package/skills/library/guard.md +55 -0
  48. package/skills/library/investigate.md +171 -0
  49. package/skills/library/land-and-deploy.md +636 -0
  50. package/skills/library/office-hours.md +746 -0
  51. package/skills/library/plan-ceo-review.md +1029 -0
  52. package/skills/library/plan-design-review.md +428 -0
  53. package/skills/library/plan-eng-review.md +420 -0
  54. package/skills/library/qa-only.md +388 -0
  55. package/skills/library/qa.md +766 -0
  56. package/skills/library/retro.md +532 -0
  57. package/skills/library/review.md +421 -0
  58. package/skills/library/setup-browser-cookies.md +86 -0
  59. package/skills/library/setup-deploy.md +211 -0
  60. package/skills/library/ship.md +1018 -0
  61. package/skills/library/unfreeze.md +31 -0
  62. package/skills/library/upgrade.md +220 -0
  63. package/skills/orch/SKILL.md +416 -0
  64. package/dist/chunk-4TDXD3LA.js.map +0 -1
  65. package/dist/chunk-EH3HRQP4.js.map +0 -1
  66. package/dist/chunk-WVJTXBPL.js +0 -11
  67. package/dist/container-FXUUV6PP.js +0 -4
  68. package/dist/doctor-P2J6VAUX.js +0 -2
  69. package/dist/init-PTAYCSMO.js +0 -53
  70. package/dist/orchestrator-XPEMMBOO.js +0 -6
  71. package/dist/workspace-manager-5EYCMAEO.js.map +0 -1
  72. package/dist/workspace-manager-XKOZ5WM6.js +0 -3
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: unfreeze
3
+ version: 0.1.0
4
+ description: |
5
+ Clear the freeze boundary set by /freeze, allowing edits to all directories
6
+ again. Use when you want to widen edit scope without ending the session.
7
+ Use when asked to "unfreeze", "unlock edits", "remove freeze", or
8
+ "allow all edits".
9
+ ---
10
+
11
+ # /unfreeze — Clear Freeze Boundary
12
+
13
+ Remove the edit restriction set by `/freeze`, allowing edits to all directories.
14
+
15
+ ## Clear the boundary
16
+
17
+ ```bash
18
+ STATE_DIR="${CLAUDE_PLUGIN_DATA:-$HOME/.orch}"
19
+ if [ -f "$STATE_DIR/freeze-dir.txt" ]; then
20
+ PREV=$(cat "$STATE_DIR/freeze-dir.txt")
21
+ rm -f "$STATE_DIR/freeze-dir.txt"
22
+ echo "Freeze boundary cleared (was: $PREV). Edits are now allowed everywhere."
23
+ else
24
+ echo "No freeze boundary was set."
25
+ fi
26
+ ```
27
+
28
+ Tell the user the result. Note that `/freeze` hooks are still registered for the
29
+ session — they will just allow everything since no state file exists. To re-freeze,
30
+ run `/freeze` again.
31
+
@@ -0,0 +1,220 @@
1
+ ---
2
+ name: upgrade
3
+ version: 1.1.0
4
+ description: |
5
+ Upgrade orch skills to the latest version. Detects global vs vendored install,
6
+ runs the upgrade, and shows what's new. Use when asked to "upgrade orch",
7
+ "update orch", or "get latest version".
8
+ ---
9
+
10
+ # /upgrade
11
+
12
+ Upgrade orch skills to the latest version and show what's new.
13
+
14
+ ## Inline upgrade flow
15
+
16
+ This section is referenced by all skill preambles when they detect `UPGRADE_AVAILABLE`.
17
+
18
+ ### Step 1: Ask the user (or auto-upgrade)
19
+
20
+ First, check if auto-upgrade is enabled:
21
+ ```bash
22
+ _AUTO=""
23
+ [ "${GSTACK_AUTO_UPGRADE:-}" = "1" ] && _AUTO="true"
24
+ [ -z "$_AUTO" ] && _AUTO=$(# orch config get auto_upgrade 2>/dev/null || true)
25
+ echo "AUTO_UPGRADE=$_AUTO"
26
+ ```
27
+
28
+ **If `AUTO_UPGRADE=true` or `AUTO_UPGRADE=1`:** Skip AskUserQuestion. Log "Auto-upgrading v{old} → v{new}..." and proceed directly to Step 2. If `./setup` fails during auto-upgrade, restore from backup (`.bak` directory) and warn the user: "Auto-upgrade failed — restored previous version. Run `/upgrade` manually to retry."
29
+
30
+ **Otherwise**, use AskUserQuestion:
31
+ - Question: "**v{new}** is available (you're on v{old}). Upgrade now?"
32
+ - Options: ["Yes, upgrade now", "Always keep me up to date", "Not now", "Never ask again"]
33
+
34
+ **If "Yes, upgrade now":** Proceed to Step 2.
35
+
36
+ **If "Always keep me up to date":**
37
+ ```bash
38
+ # orch config set auto_upgrade true
39
+ ```
40
+ Tell user: "Auto-upgrade enabled. Future updates will install automatically." Then proceed to Step 2.
41
+
42
+ **If "Not now":** Write snooze state with escalating backoff (first snooze = 24h, second = 48h, third+ = 1 week), then continue with the current skill. Do not mention the upgrade again.
43
+ ```bash
44
+ _SNOOZE_FILE=~/.orch/update-snoozed
45
+ _REMOTE_VER="{new}"
46
+ _CUR_LEVEL=0
47
+ if [ -f "$_SNOOZE_FILE" ]; then
48
+ _SNOOZED_VER=$(awk '{print $1}' "$_SNOOZE_FILE")
49
+ if [ "$_SNOOZED_VER" = "$_REMOTE_VER" ]; then
50
+ _CUR_LEVEL=$(awk '{print $2}' "$_SNOOZE_FILE")
51
+ case "$_CUR_LEVEL" in *[!0-9]*) _CUR_LEVEL=0 ;; esac
52
+ fi
53
+ fi
54
+ _NEW_LEVEL=$((_CUR_LEVEL + 1))
55
+ [ "$_NEW_LEVEL" -gt 3 ] && _NEW_LEVEL=3
56
+ echo "$_REMOTE_VER $_NEW_LEVEL $(date +%s)" > "$_SNOOZE_FILE"
57
+ ```
58
+ Note: `{new}` is the remote version from the `UPGRADE_AVAILABLE` output — substitute it from the update check result.
59
+
60
+ Tell user the snooze duration: "Next reminder in 24h" (or 48h or 1 week, depending on level). Tip: "Set `auto_upgrade: true` in `~/.orch/config.yaml` for automatic upgrades."
61
+
62
+ **If "Never ask again":**
63
+ ```bash
64
+ # orch config set update_check false
65
+ ```
66
+ Tell user: "Update checks disabled. Run `# orch config set update_check true` to re-enable."
67
+ Continue with the current skill.
68
+
69
+ ### Step 2: Detect install type
70
+
71
+ ```bash
72
+ if [ -d "$HOME/.claude/skills/orch/.git" ]; then
73
+ INSTALL_TYPE="global-git"
74
+ INSTALL_DIR="$HOME/.claude/skills/orch"
75
+ elif [ -d ".claude/skills/orch/.git" ]; then
76
+ INSTALL_TYPE="local-git"
77
+ INSTALL_DIR=".claude/skills/orch"
78
+ elif [ -d ".claude/skills/orch" ]; then
79
+ INSTALL_TYPE="vendored"
80
+ INSTALL_DIR=".claude/skills/orch"
81
+ elif [ -d "$HOME/.claude/skills/orch" ]; then
82
+ INSTALL_TYPE="vendored-global"
83
+ INSTALL_DIR="$HOME/.claude/skills/orch"
84
+ else
85
+ echo "ERROR: orch skills not found"
86
+ exit 1
87
+ fi
88
+ echo "Install type: $INSTALL_TYPE at $INSTALL_DIR"
89
+ ```
90
+
91
+ The install type and directory path printed above will be used in all subsequent steps.
92
+
93
+ ### Step 3: Save old version
94
+
95
+ Use the install directory from Step 2's output below:
96
+
97
+ ```bash
98
+ OLD_VERSION=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown")
99
+ ```
100
+
101
+ ### Step 4: Upgrade
102
+
103
+ Use the install type and directory detected in Step 2:
104
+
105
+ **For git installs** (global-git, local-git):
106
+ ```bash
107
+ cd "$INSTALL_DIR"
108
+ STASH_OUTPUT=$(git stash 2>&1)
109
+ git fetch origin
110
+ git reset --hard origin/main
111
+ ./setup
112
+ ```
113
+ If `$STASH_OUTPUT` contains "Saved working directory", warn the user: "Note: local changes were stashed. Run `git stash pop` in the skill directory to restore them."
114
+
115
+ **For vendored installs** (vendored, vendored-global):
116
+ ```bash
117
+ PARENT=$(dirname "$INSTALL_DIR")
118
+ TMP_DIR=$(mktemp -d)
119
+ git clone --depth 1 <upstream-skill-repo-url> "$TMP_DIR/orch-skills"
120
+ mv "$INSTALL_DIR" "$INSTALL_DIR.bak"
121
+ mv "$TMP_DIR/orch-skills" "$INSTALL_DIR"
122
+ cd "$INSTALL_DIR" && ./setup
123
+ rm -rf "$INSTALL_DIR.bak" "$TMP_DIR"
124
+ ```
125
+
126
+ ### Step 4.5: Sync local vendored copy
127
+
128
+ Use the install directory from Step 2. Check if there's also a local vendored copy that needs updating:
129
+
130
+ ```bash
131
+ _ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
132
+ LOCAL_GSTACK=""
133
+ if [ -n "$_ROOT" ] && [ -d "$_ROOT/.claude/skills/orch" ]; then
134
+ _RESOLVED_LOCAL=$(cd "$_ROOT/.claude/skills/orch" && pwd -P)
135
+ _RESOLVED_PRIMARY=$(cd "$INSTALL_DIR" && pwd -P)
136
+ if [ "$_RESOLVED_LOCAL" != "$_RESOLVED_PRIMARY" ]; then
137
+ LOCAL_GSTACK="$_ROOT/.claude/skills/orch"
138
+ fi
139
+ fi
140
+ echo "LOCAL_GSTACK=$LOCAL_GSTACK"
141
+ ```
142
+
143
+ If `LOCAL_GSTACK` is non-empty, update it by copying from the freshly-upgraded primary install (same approach as README vendored install):
144
+ ```bash
145
+ mv "$LOCAL_GSTACK" "$LOCAL_GSTACK.bak"
146
+ cp -Rf "$INSTALL_DIR" "$LOCAL_GSTACK"
147
+ rm -rf "$LOCAL_GSTACK/.git"
148
+ cd "$LOCAL_GSTACK" && ./setup
149
+ rm -rf "$LOCAL_GSTACK.bak"
150
+ ```
151
+ Tell user: "Also updated vendored copy at `$LOCAL_GSTACK` — commit `.claude/skills/orch/` when you're ready."
152
+
153
+ If `./setup` fails, restore from backup and warn the user:
154
+ ```bash
155
+ rm -rf "$LOCAL_GSTACK"
156
+ mv "$LOCAL_GSTACK.bak" "$LOCAL_GSTACK"
157
+ ```
158
+ Tell user: "Sync failed — restored previous version at `$LOCAL_GSTACK`. Run `/upgrade` manually to retry."
159
+
160
+ ### Step 5: Write marker + clear cache
161
+
162
+ ```bash
163
+ mkdir -p ~/.orch
164
+ echo "$OLD_VERSION" > ~/.orch/just-upgraded-from
165
+ rm -f ~/.orch/last-update-check
166
+ rm -f ~/.orch/update-snoozed
167
+ ```
168
+
169
+ ### Step 6: Show What's New
170
+
171
+ Read `$INSTALL_DIR/CHANGELOG.md`. Find all version entries between the old version and the new version. Summarize as 5-7 bullets grouped by theme. Don't overwhelm — focus on user-facing changes. Skip internal refactors unless they're significant.
172
+
173
+ Format:
174
+ ```
175
+ v{new} — upgraded from v{old}!
176
+
177
+ What's new:
178
+ - [bullet 1]
179
+ - [bullet 2]
180
+ - ...
181
+
182
+ Happy shipping!
183
+ ```
184
+
185
+ ### Step 7: Continue
186
+
187
+ After showing What's New, continue with whatever skill the user originally invoked. The upgrade is done — no further action needed.
188
+
189
+ ---
190
+
191
+ ## Standalone usage
192
+
193
+ When invoked directly as `/upgrade` (not from a preamble):
194
+
195
+ 1. Force a fresh update check (bypass cache):
196
+ ```bash
197
+ # Check for updates (adapt to your update mechanism)
198
+ # Example: compare local VERSION with remote VERSION
199
+ ```
200
+ Use the output to determine if an upgrade is available.
201
+
202
+ 2. If `UPGRADE_AVAILABLE <old> <new>`: follow Steps 2-6 above.
203
+
204
+ 3. If no output (primary is up to date): check for a stale local vendored copy.
205
+
206
+ Run the Step 2 bash block above to detect the primary install type and directory (`INSTALL_TYPE` and `INSTALL_DIR`). Then run the Step 4.5 detection bash block above to check for a local vendored copy (`LOCAL_GSTACK`).
207
+
208
+ **If `LOCAL_GSTACK` is empty** (no local vendored copy): tell the user "You're already on the latest version (v{version})."
209
+
210
+ **If `LOCAL_GSTACK` is non-empty**, compare versions:
211
+ ```bash
212
+ PRIMARY_VER=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown")
213
+ LOCAL_VER=$(cat "$LOCAL_GSTACK/VERSION" 2>/dev/null || echo "unknown")
214
+ echo "PRIMARY=$PRIMARY_VER LOCAL=$LOCAL_VER"
215
+ ```
216
+
217
+ **If versions differ:** follow the Step 4.5 sync bash block above to update the local copy from the primary. Tell user: "Global v{PRIMARY_VER} is up to date. Updated local vendored copy from v{LOCAL_VER} → v{PRIMARY_VER}. Commit `.claude/skills/orch/` when you're ready."
218
+
219
+ **If versions match:** tell the user "You're on the latest version (v{PRIMARY_VER}). Global and local vendored copy are both up to date."
220
+
@@ -0,0 +1,416 @@
1
+ ---
2
+ name: orch
3
+ description: "AI agent orchestrator — manage teams of AI agents that work on your codebase in parallel. Use when the user wants to: run multiple agents, coordinate AI work, deploy agent teams, manage tasks/goals/agents, check orchestrator status, or mentions 'orch', 'orchestry', 'agents team', 'agent orchestration'."
4
+ allowed-tools: Bash, Read, Glob, Grep, Write, Edit, Agent
5
+ argument-hint: "[command or natural language request]"
6
+ ---
7
+
8
+ # ORCH — AI Agent Orchestrator
9
+
10
+ You are the user's assistant for **ORCH** (`@oxgeneral/orch`) — an AI agent runtime that coordinates teams of LLM agents working on a codebase in parallel.
11
+
12
+ Your role: interpret user intent and execute the right `orch` CLI commands. The user may speak in natural language — translate their intent into concrete actions.
13
+
14
+ ## How to Work
15
+
16
+ 1. **Natural language → CLI commands**: User says "add a task to refactor auth" → you run `orch task add "Refactor auth module" -d "..." --scope "src/auth/**"`
17
+ 2. **Always use `--json` flag** when you need to parse output programmatically
18
+ 3. **Chain commands** when the user's request requires multiple steps
19
+ 4. **Explain what you're doing** briefly before running commands
20
+ 5. **Show results** in a readable format after commands complete
21
+
22
+ ## Quick Start Flow
23
+
24
+ If the project is not initialized (no `.orchestry/` directory):
25
+ ```bash
26
+ orch init --name "project-name"
27
+ ```
28
+
29
+ If there are no agents:
30
+ ```bash
31
+ orch agent shop # or suggest pre-built org templates
32
+ ```
33
+
34
+ ## Complete CLI Reference
35
+
36
+ ### Project Setup
37
+
38
+ ```bash
39
+ orch init [--name <name>] # Initialize .orchestry/ in current directory
40
+ orch doctor # Check adapters and dependencies
41
+ orch update [--check] # Check/install updates
42
+ orch status # Show orchestrator overview
43
+ ```
44
+
45
+ ### Task Management
46
+
47
+ ```bash
48
+ # Create tasks
49
+ orch task add "<title>" [options]
50
+ -d, --description <desc> # Task description
51
+ -p, --priority <1-4> # Priority (1=highest, default: 3)
52
+ -l, --labels <a,b,c> # Comma-separated labels
53
+ --depends-on <id1,id2> # Dependency task IDs
54
+ --assignee <agent-id> # Assign to specific agent
55
+ --scope <patterns> # File scope globs (e.g. src/auth/**,src/session/**)
56
+ --review-criteria <criteria> # Auto-review: test_pass,typecheck,lint
57
+ --workspace-mode <mode> # shared|worktree|isolated
58
+ --goal-id <goalId> # Link to a goal
59
+ --attach <paths> # Attach files (screenshots, docs)
60
+ --max-attempts <n> # Max retry attempts
61
+ -e, --edit # Open $EDITOR for description
62
+
63
+ # List and view
64
+ orch task list [--status <status>] # List tasks (filter: todo,in_progress,review,done,failed,cancelled)
65
+ orch task show <id> # Show task details
66
+
67
+ # Lifecycle
68
+ orch task assign <task-id> <agent-id> # Assign task to agent
69
+ orch task cancel <id> # Cancel task (stops agent if running)
70
+ orch task approve <id> # Approve task in review → done
71
+ orch task reject <id> [-r <reason>] # Reject task → back to todo
72
+ orch task retry <id> # Retry failed task
73
+ orch task edit <id> # Edit in $EDITOR
74
+ ```
75
+
76
+ **Task Status Flow:** `todo → in_progress → review → done` with `retrying` and `failed` branches.
77
+
78
+ ### Agent Management
79
+
80
+ ```bash
81
+ # Create agents
82
+ orch agent add "<name>" --adapter <type> [options]
83
+ --adapter <type> # REQUIRED: claude|opencode|codex|cursor|shell
84
+ --role <description> # Agent role/expertise
85
+ --model <model> # Model name
86
+ --command <cmd> # Shell command (for shell adapter)
87
+ --max-turns <n> # Max turns per run
88
+ --timeout <ms> # Timeout in milliseconds
89
+ --approval-policy <policy> # auto|suggest|manual
90
+ --workspace-mode <mode> # shared|worktree|isolated
91
+ --skills <skills> # Comma-separated skills
92
+ -e, --edit # Open $EDITOR for role
93
+
94
+ # Agent shop — pre-built templates
95
+ orch agent shop [--list] # Browse/install templates
96
+
97
+ # Manage
98
+ orch agent list # List all agents
99
+ orch agent status <id> # Show agent details + stats
100
+ orch agent edit <id> # Edit agent
101
+ orch agent remove <id> # Remove agent
102
+ orch agent disable <id> # Disable agent
103
+ orch agent enable <id> # Enable agent
104
+ orch agent autonomous <id> [--on|--off] # Toggle autonomous mode
105
+ ```
106
+
107
+ **Available Agent Templates:** backend-dev, frontend-dev, qa-engineer, code-reviewer, architect, devops-engineer, bug-hunter, tech-writer, marketer, content-creator, growth-hacker, security-auditor, performance-engineer, data-engineer, fullstack-dev
108
+
109
+ ### Execution
110
+
111
+ ```bash
112
+ orch run <task-id> # Run single task
113
+ orch run --all # Run all todo tasks
114
+ orch run --watch # Continuous orchestration (tick loop)
115
+ orch tui # Interactive TUI dashboard
116
+ orch serve [options] # Headless daemon mode
117
+ --once # Process and exit (CI/CD mode)
118
+ --tick-interval <ms> # Override poll interval
119
+ --log-file <path> # Tee logs to file
120
+ --log-format <json|text> # Log format (default: json)
121
+ --verbose # Include agent:output events
122
+ ```
123
+
124
+ ### Goals (High-Level Objectives)
125
+
126
+ ```bash
127
+ orch goal add "<title>" [options]
128
+ --description <desc> # Goal description
129
+ --assignee <agentId> # Assign to agent for decomposition
130
+
131
+ orch goal list [--status <status>] # List goals
132
+ orch goal show <id> # Show goal + progress report
133
+ orch goal status <id> <status> # Change status: active|paused|achieved|abandoned
134
+ orch goal update <id> [options] # Update title/description/assignee
135
+ orch goal delete <id> # Delete goal
136
+ ```
137
+
138
+ ### Teams
139
+
140
+ ```bash
141
+ orch team create "<name>" --lead <agent-id> [options]
142
+ --members <id1,id2> # Initial members
143
+ -d, --description <desc> # Team description
144
+ --no-auto-claim # Disable auto-claiming
145
+
146
+ orch team list # List teams
147
+ orch team show <id> # Show team details
148
+ orch team join <team-id> <agent-id> # Add member
149
+ orch team leave <team-id> <agent-id> # Remove member
150
+ orch team add-task <team-id> <task-id> # Add task to pool
151
+ orch team set-lead <team-id> <agent-id> # Transfer lead
152
+ orch team disband <id> # Disband team
153
+ ```
154
+
155
+ ### Pre-Built Organizations
156
+
157
+ ```bash
158
+ orch org list # List available templates
159
+ orch org deploy <template> [--goal "<objective>"]
160
+ ```
161
+
162
+ **Available Templates:**
163
+ - `startup-mvp` — Ship MVP in 48h (CTO + 2 Backend + Frontend + QA + Reviewer)
164
+ - `pr-review-corp` — Auto-review every PR (Security + Performance + Style + QA)
165
+ - `migration-squad` — JS→TS migration (CTO + 3 Migrators + QA + Reviewer)
166
+ - `security-dept` — Multi-layer audit (Lead + Scanner + Secrets + Hunter + Reviewer)
167
+ - `test-factory` — Coverage 40%→80% (Lead + 2 Backend + 3 QA + Reviewer)
168
+ - `bugfix-dept` — 100 issues→0 (Triager + 3 Fixers + QA + Reviewer)
169
+ - `docs-team` — Docs from code (Lead + 2 Writers + Editor + Reviewer)
170
+ - `content-agency` — Content factory (Strategist + 2 Writers + Editor + SEO)
171
+ - `data-lab` — CSVs→executive report (Lead Analyst + Data Engineer)
172
+ - `sales-machine` — Outbound pipeline (Director + 2 SDRs + Copywriter + Growth)
173
+
174
+ ### Inter-Agent Communication
175
+
176
+ ```bash
177
+ # Messages
178
+ orch msg send <to-agent-id> "<body>" [-s <subject>] [--from <id>] [--ttl <ms>]
179
+ orch msg broadcast "<body>" [-s <subject>] [--team <team-id>]
180
+ orch msg inbox <agent-id> # Pending messages
181
+ orch msg list [--agent <id>] # All messages
182
+
183
+ # Shared Context
184
+ orch context set <key> <value> [--ttl <ms>]
185
+ orch context get <key>
186
+ orch context list
187
+ orch context delete <key>
188
+ ```
189
+
190
+ ### Configuration
191
+
192
+ ```bash
193
+ orch config get <key> # Get config value (dot notation)
194
+ orch config set <key> <value> # Set config value
195
+ orch config edit # Edit config.yml in $EDITOR
196
+
197
+ # Global settings (~/.orchestry/global.yml)
198
+ orch config global get <key>
199
+ orch config global set <key> <value>
200
+ orch config global show
201
+ ```
202
+
203
+ ### Logs
204
+
205
+ ```bash
206
+ orch logs [run-id] # View run logs
207
+ --agent <agent-id> # Filter by agent
208
+ --task <task-id> # Filter by task
209
+ --follow # Live stream
210
+ --since <duration> # Time filter (5m, 1h, 1d)
211
+ ```
212
+
213
+ ## Common Workflows
214
+
215
+ ### "Set up a team to work on my project"
216
+ 1. `orch init` (if needed)
217
+ 2. `orch org deploy startup-mvp --goal "Build feature X"` OR manually create agents
218
+ 3. `orch tui` or `orch run --watch` to start
219
+
220
+ ### "Add a task and run it"
221
+ 1. `orch task add "Fix login bug" -d "The login form crashes on empty email" --scope "src/auth/**" -p 1`
222
+ 2. `orch run <task-id>`
223
+
224
+ ### "Check what's happening"
225
+ 1. `orch status` — overview
226
+ 2. `orch task list --status in_progress` — running tasks
227
+ 3. `orch logs --follow` — live output
228
+
229
+ ### "Deploy a review team for PRs"
230
+ 1. `orch org deploy pr-review-corp --goal "Review all open PRs"`
231
+ 2. Tasks are auto-created and assigned
232
+
233
+ ### "I want to refactor X across the codebase"
234
+ 1. Create a goal: `orch goal add "Refactor X" --description "..." --assignee <lead-agent>`
235
+ 2. Lead agent decomposes goal into tasks automatically
236
+ 3. `orch run --watch` to execute
237
+
238
+ ## Key Concepts
239
+
240
+ - **Agents** run in isolated git worktrees (no merge conflicts)
241
+ - **Tasks** flow through: todo → in_progress → review → done
242
+ - **Goals** are decomposed into tasks by a lead agent
243
+ - **Teams** coordinate agents with a lead + members
244
+ - **Adapters**: claude, opencode, codex, cursor, shell
245
+ - **All state** stored in `.orchestry/` (YAML/JSON, no database)
246
+ - **IDs** are prefixed: `tsk_`, `agt_`, `run_`, `goal_`, `team_`, `msg_`
247
+
248
+ ## Configuration Reference
249
+
250
+ ```yaml
251
+ # .orchestry/config.yml
252
+ project:
253
+ name: "my-project"
254
+ defaults:
255
+ agent:
256
+ adapter: "claude" # Default adapter
257
+ approval_policy: "auto" # auto|suggest|manual
258
+ max_turns: 50 # Max LLM turns per run
259
+ timeout_ms: 3600000 # 1 hour timeout
260
+ stall_timeout_ms: 600000 # 10 min stall detection
261
+ workspace_mode: "worktree" # shared|worktree|isolated
262
+ task:
263
+ max_attempts: 3 # Max retries
264
+ priority: 3 # Default priority (1-4)
265
+ scheduling:
266
+ poll_interval_ms: 10000 # Tick interval (10s)
267
+ max_concurrent_agents: 6 # Parallel agent limit
268
+ retry_base_delay_ms: 10000 # Retry backoff base
269
+ retry_max_delay_ms: 300000 # Max retry delay (5min)
270
+ ```
271
+
272
+ ## Creating Agents — Sources and Best Practices
273
+
274
+ ### Quick: Use Pre-Built Templates
275
+
276
+ ```bash
277
+ orch agent shop # Interactive picker — 15 templates
278
+ orch agent shop --list # Print all templates non-interactively
279
+ orch org deploy <template> # Deploy a full team with one command
280
+ ```
281
+
282
+ ### Agent Shop Templates (src/domain/agent-shop.ts)
283
+
284
+ Each template includes a detailed role prompt, model, skills, and approval policy:
285
+
286
+ | Template | Role | Model | Skills |
287
+ |----------|------|-------|--------|
288
+ | `backend-dev` | APIs, services, DB layers | claude-sonnet-4-6 | feature-dev |
289
+ | `frontend-dev` | React UI, components, CSS | claude-sonnet-4-6 | feature-dev, frontend-design |
290
+ | `qa-engineer` | Tests, coverage analysis | claude-sonnet-4-6 | testing-suite |
291
+ | `code-reviewer` | PR review, bugs, security | claude-opus-4-6 | feature-dev:code-reviewer |
292
+ | `architect` | System design, architecture | claude-opus-4-6 | feature-dev:code-architect |
293
+ | `devops-engineer` | CI/CD, infrastructure | claude-sonnet-4-6 | devops-automation |
294
+ | `bug-hunter` | Find bugs, reproduce, fix | claude-sonnet-4-6 | feature-dev |
295
+ | `tech-writer` | Docs, READMEs, API docs | claude-sonnet-4-6 | perfect-readme |
296
+ | `security-auditor` | Security scanning, vulns | claude-opus-4-6 | testing-suite |
297
+ | `performance-engineer` | Optimization, profiling | claude-sonnet-4-6 | testing-suite |
298
+ | `data-engineer` | Data pipelines, ETL | claude-sonnet-4-6 | — |
299
+ | `fullstack-dev` | End-to-end development | claude-sonnet-4-6 | feature-dev |
300
+ | `marketer` | Marketing strategy, copy | claude-sonnet-4-6 | marketing-psychology |
301
+ | `content-creator` | Blog posts, social media | claude-sonnet-4-6 | — |
302
+ | `growth-hacker` | Growth experiments | claude-sonnet-4-6 | marketing-psychology |
303
+
304
+ ### Org Templates (src/domain/org-shop.ts)
305
+
306
+ Pre-built teams — deploy with `orch org deploy <key> --goal "..."`:
307
+
308
+ | Template | Agents | Use Case |
309
+ |----------|--------|----------|
310
+ | `startup-mvp` | CTO + 2 Backend + Frontend + QA + Reviewer | Ship MVP fast |
311
+ | `pr-review-corp` | CTO + Security + Performance + Style + QA | Auto-review PRs |
312
+ | `migration-squad` | CTO + 3 Migrators + QA + Reviewer | JS→TS migration |
313
+ | `security-dept` | Lead + Scanner + Secrets + Hunter + Reviewer | Security audit |
314
+ | `test-factory` | Lead + 2 Backend + 3 QA + Reviewer | Coverage boost |
315
+ | `bugfix-dept` | Triager + 3 Fixers + QA + Reviewer | Issue backlog |
316
+ | `docs-team` | Lead + 2 Writers + Editor + Reviewer | Documentation |
317
+ | `content-agency` | Strategist + 2 Writers + Editor + SEO | Content |
318
+ | `data-lab` | Lead Analyst + Data Engineer | Data analysis |
319
+ | `sales-machine` | Director + 2 SDRs + Copywriter + Growth | Outbound |
320
+
321
+ ### Custom Agents: Role Prompt Structure
322
+
323
+ When creating custom agents with `orch agent add`, follow this proven structure from the shop templates:
324
+
325
+ ```
326
+ # [Role Name]
327
+
328
+ [One-line description of what this agent does]
329
+
330
+ ## WORKFLOW
331
+ 1) READ — understand the task scope
332
+ 2) EXPLORE — analyze existing code/data with appropriate skills
333
+ 3) PLAN — outline approach before executing
334
+ 4) EXECUTE — do the work following conventions
335
+ 5) VERIFY — self-review, run tests
336
+ 6) REPORT — summarize what was done, flag risks
337
+
338
+ ## RULES
339
+ - [Convention 1]
340
+ - [Convention 2]
341
+ - [Safety guardrail]
342
+ ```
343
+
344
+ ### Skills Available for Agents
345
+
346
+ Assign skills via `--skills` flag or edit agent YAML. You can mix both types: `--skills "review,feature-dev:code-explorer,investigate"`.
347
+
348
+ #### Library Skills (injected into system prompt — works with ALL adapters)
349
+
350
+ Content from the skill library is loaded and appended to the agent's system prompt at execution time. Use plain names (no colons):
351
+
352
+ | Skill | Best For |
353
+ |-------|----------|
354
+ | `review` | Pre-landing code review with auto-fix, checklists, adversarial review |
355
+ | `qa` | Full QA testing + browser testing + bug fixing + health scoring |
356
+ | `qa-only` | QA testing without auto-fixes (report only) |
357
+ | `ship` | Automated ship workflow: merge, test, coverage audit, PR creation |
358
+ | `office-hours` | YC-style product thinking, design docs, premise challenge |
359
+ | `investigate` | Systematic debugging with root cause methodology, 3-strike hypothesis |
360
+ | `careful` | Safety guardrails for destructive commands |
361
+ | `guard` | Full safety mode (careful + freeze combined) |
362
+ | `freeze` | Restrict edits to a specific directory |
363
+ | `unfreeze` | Clear freeze boundary |
364
+ | `design-consultation` | Design system creation, visual language definition |
365
+ | `design-review` | Design review with accessibility, responsiveness checks |
366
+ | `plan-ceo-review` | CEO-level strategic review of plans |
367
+ | `plan-eng-review` | Engineering review of technical plans |
368
+ | `plan-design-review` | Design review of plans |
369
+ | `autoplan` | Auto-review pipeline with decision principles |
370
+ | `land-and-deploy` | Merge PR, wait for CI, verify production health |
371
+ | `canary` | Post-deploy canary monitoring |
372
+ | `document-release` | Auto-update documentation after ship |
373
+ | `retro` | Weekly engineering retrospective with trends |
374
+ | `browse` | Headless browser navigation and testing |
375
+ | `benchmark` | Performance benchmarking with before/after metrics |
376
+ | `codex` | OpenAI Codex cross-review / multi-AI challenge |
377
+ | `setup-deploy` | Configure deployment settings |
378
+ | `setup-browser-cookies` | Import browser cookies for authenticated QA |
379
+ | `upgrade` | Upgrade skills to latest version |
380
+
381
+ #### Claude Code MCP Skills (native — Claude adapter only)
382
+
383
+ Handled natively by Claude CLI. Use `package:skill-name` format (with colon):
384
+
385
+ | Skill | Best For |
386
+ |-------|----------|
387
+ | `feature-dev:feature-dev` | Guided feature development with architecture focus |
388
+ | `feature-dev:code-explorer` | Deep codebase analysis and tracing |
389
+ | `feature-dev:code-architect` | Architecture design and blueprints |
390
+ | `feature-dev:code-reviewer` | Code review with confidence filtering |
391
+ | `testing-suite:generate-tests` | Test generation with edge cases |
392
+ | `testing-suite:test-coverage` | Coverage analysis and gap identification |
393
+ | `testing-suite:e2e-setup` | End-to-end testing configuration |
394
+ | `testing-suite:test-quality-analyzer` | Test suite quality metrics |
395
+ | `devops-automation:cloud-architect` | Cloud infrastructure, Terraform |
396
+ | `frontend-design:frontend-design` | UI/UX design and implementation |
397
+ | `document-skills:frontend-design` | Frontend design (document-skills variant) |
398
+ | `product-manager-toolkit` | RICE prioritization, PRD templates |
399
+ | `marketing-psychology` | Behavioral science for marketing |
400
+
401
+ ### Tips
402
+
403
+ - Use `claude-opus-4-6` for strategic/review roles (architect, reviewer, lead) — higher quality reasoning
404
+ - Use `claude-sonnet-4-6` for execution roles (developer, QA, writer) — faster, cheaper
405
+ - Set `--approval-policy suggest` for strategic agents so humans review decisions
406
+ - Set `--approval-policy auto` for execution agents for fully autonomous operation
407
+ - Use `--workspace-mode shared` for analysis/strategy agents (they read, don't write code)
408
+ - Use `--workspace-mode worktree` for coding agents (isolated branches, no conflicts)
409
+
410
+ ## Important Notes
411
+
412
+ - Always run `orch doctor` first if something seems wrong
413
+ - Use `--json` flag for programmatic parsing
414
+ - `orch serve --once` is ideal for CI/CD pipelines
415
+ - Stall timeout default is 10 minutes — increase for complex tasks via `orch config set defaults.agent.stall_timeout_ms 1200000`
416
+ - If tasks are stuck after a crash, the orchestrator auto-cleans stale state on restart (v1.0.6+)