@oxgeneral/orch 1.0.5 → 1.0.7

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 (64) hide show
  1. package/dist/App-LEVUTWQN.js +22 -0
  2. package/dist/{chunk-UTDC3OB3.js → chunk-4TDXD3LA.js} +53 -6
  3. package/dist/chunk-4TDXD3LA.js.map +1 -0
  4. package/dist/{chunk-BSJVYRI3.js → chunk-EH3HRQP4.js} +59 -8
  5. package/dist/chunk-EH3HRQP4.js.map +1 -0
  6. package/dist/chunk-FQ5YUP4J.js +4 -0
  7. package/dist/{chunk-TPTHLFOB.js → chunk-HYPSQAQX.js} +1 -1
  8. package/dist/{chunk-LXNRCJ22.js → chunk-KR7VDF23.js} +1 -1
  9. package/dist/{chunk-KFQTWMZI.js → chunk-LOJ26OVK.js} +1 -1
  10. package/dist/{chunk-PJ5DKXGR.js → chunk-N4OXN2HW.js} +1 -1
  11. package/dist/{chunk-MOWC2CHX.js → chunk-TWEMIPRN.js} +12 -8
  12. package/dist/chunk-TWEMIPRN.js.map +1 -0
  13. package/dist/chunk-WVJTXBPL.js +11 -0
  14. package/dist/claude-ADMRIWTR.js +2 -0
  15. package/dist/{claude-4R6L6BWY.js → claude-OTQ2NSJR.js} +3 -3
  16. package/dist/{claude-4R6L6BWY.js.map → claude-OTQ2NSJR.js.map} +1 -1
  17. package/dist/cli.js +1 -1
  18. package/dist/{codex-YRSODLH4.js → codex-AZD52UPS.js} +1 -1
  19. package/dist/{codex-IMOW5ZUZ.js → codex-WQ3LU3MM.js} +3 -3
  20. package/dist/{codex-IMOW5ZUZ.js.map → codex-WQ3LU3MM.js.map} +1 -1
  21. package/dist/container-FXUUV6PP.js +4 -0
  22. package/dist/{cursor-2HILMNM3.js → cursor-M3EJ432K.js} +1 -1
  23. package/dist/{cursor-NHV7X3WG.js → cursor-TKV5FFCN.js} +3 -3
  24. package/dist/{cursor-NHV7X3WG.js.map → cursor-TKV5FFCN.js.map} +1 -1
  25. package/dist/doctor-P2J6VAUX.js +2 -0
  26. package/dist/index.d.ts +13 -1
  27. package/dist/index.js +14 -11
  28. package/dist/index.js.map +1 -1
  29. package/dist/{init-56QC5QVX.js → init-PTAYCSMO.js} +4 -4
  30. package/dist/{once-runner-UCMXCY6C.js → once-runner-AMKCFW22.js} +1 -1
  31. package/dist/{opencode-3S4VDXRG.js → opencode-4G7VAZGY.js} +1 -1
  32. package/dist/{opencode-ULT6DYCT.js → opencode-YWT3M4NX.js} +3 -3
  33. package/dist/{opencode-ULT6DYCT.js.map → opencode-YWT3M4NX.js.map} +1 -1
  34. package/dist/orchestrator-JOTMB5XT.js +13 -0
  35. package/dist/orchestrator-XPEMMBOO.js +6 -0
  36. package/dist/{orchestrator-64BHTD42.js.map → orchestrator-XPEMMBOO.js.map} +1 -1
  37. package/dist/{serve-3DV74ZSO.js → serve-5OAANN6J.js} +1 -1
  38. package/dist/shell-JC2WDWBR.js +2 -0
  39. package/dist/{shell-UXEJRK3D.js → shell-PMLIRG3N.js} +3 -3
  40. package/dist/{shell-UXEJRK3D.js.map → shell-PMLIRG3N.js.map} +1 -1
  41. package/dist/{task-M2JGNUYW.js → task-QFLIIRKZ.js} +1 -1
  42. package/dist/{tui-4VRDSRVB.js → tui-BJHZBCIR.js} +1 -1
  43. package/dist/{workspace-manager-ABXFBL2A.js → workspace-manager-5EYCMAEO.js} +25 -9
  44. package/dist/workspace-manager-5EYCMAEO.js.map +1 -0
  45. package/dist/workspace-manager-XKOZ5WM6.js +3 -0
  46. package/package.json +19 -9
  47. package/readme.md +111 -2
  48. package/scripts/demo.sh +202 -0
  49. package/scripts/{postinstall.js → postinstall.cjs} +25 -4
  50. package/skills/orch/SKILL.md +278 -0
  51. package/dist/App-SSYYVFGW.js +0 -22
  52. package/dist/chunk-BSJVYRI3.js.map +0 -1
  53. package/dist/chunk-MOWC2CHX.js.map +0 -1
  54. package/dist/chunk-QNZ6D63E.js +0 -4
  55. package/dist/chunk-UTDC3OB3.js.map +0 -1
  56. package/dist/chunk-X54D5JZG.js +0 -11
  57. package/dist/claude-ZLVOLRUG.js +0 -2
  58. package/dist/container-FUHRQOV4.js +0 -4
  59. package/dist/doctor-GKTV4YYD.js +0 -2
  60. package/dist/orchestrator-64BHTD42.js +0 -6
  61. package/dist/orchestrator-KEH7RQAV.js +0 -13
  62. package/dist/shell-OBHIVC2H.js +0 -2
  63. package/dist/workspace-manager-ABXFBL2A.js.map +0 -1
  64. package/dist/workspace-manager-Q6WWXSTR.js +0 -3
@@ -0,0 +1,278 @@
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
+ ## Important Notes
273
+
274
+ - Always run `orch doctor` first if something seems wrong
275
+ - Use `--json` flag for programmatic parsing
276
+ - `orch serve --once` is ideal for CI/CD pipelines
277
+ - Stall timeout default is 10 minutes — increase for complex tasks via `orch config set defaults.agent.stall_timeout_ms 1200000`
278
+ - If tasks are stuck after a crash, the orchestrator auto-cleans stale state on restart (v1.0.6+)