agent-orchestration 0.5.0 → 0.6.0

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 (120) hide show
  1. package/.cursor/rules/orchestrator-auto.mdc +2 -0
  2. package/.cursor/rules/orchestrator-main.mdc +37 -7
  3. package/.cursor/rules/orchestrator-sub.mdc +89 -27
  4. package/README.md +278 -66
  5. package/dist/bin/cli.d.ts +1 -0
  6. package/dist/bin/cli.d.ts.map +1 -1
  7. package/dist/bin/cli.js +54 -157
  8. package/dist/bin/cli.js.map +1 -1
  9. package/dist/bin/cursorCommands.d.ts +3 -0
  10. package/dist/bin/cursorCommands.d.ts.map +1 -0
  11. package/dist/bin/cursorCommands.js +330 -0
  12. package/dist/bin/cursorCommands.js.map +1 -0
  13. package/dist/database.d.ts +32 -1
  14. package/dist/database.d.ts.map +1 -1
  15. package/dist/database.js +105 -5
  16. package/dist/database.js.map +1 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +6 -2
  19. package/dist/index.js.map +1 -1
  20. package/dist/models.d.ts +59 -0
  21. package/dist/models.d.ts.map +1 -1
  22. package/dist/models.js +69 -0
  23. package/dist/models.js.map +1 -1
  24. package/dist/providers/cursor.d.ts +14 -0
  25. package/dist/providers/cursor.d.ts.map +1 -0
  26. package/dist/providers/cursor.js +203 -0
  27. package/dist/providers/cursor.js.map +1 -0
  28. package/dist/providers/types.d.ts +60 -0
  29. package/dist/providers/types.d.ts.map +1 -0
  30. package/dist/providers/types.js +2 -0
  31. package/dist/providers/types.js.map +1 -0
  32. package/dist/tools/agent.d.ts.map +1 -1
  33. package/dist/tools/agent.js +5 -0
  34. package/dist/tools/agent.js.map +1 -1
  35. package/dist/tools/coordination.d.ts.map +1 -1
  36. package/dist/tools/coordination.js +47 -0
  37. package/dist/tools/coordination.js.map +1 -1
  38. package/dist/tools/index.d.ts +3 -0
  39. package/dist/tools/index.d.ts.map +1 -1
  40. package/dist/tools/index.js +3 -0
  41. package/dist/tools/index.js.map +1 -1
  42. package/dist/tools/memory.d.ts.map +1 -1
  43. package/dist/tools/memory.js +6 -1
  44. package/dist/tools/memory.js.map +1 -1
  45. package/dist/tools/provider.d.ts +3 -0
  46. package/dist/tools/provider.d.ts.map +1 -0
  47. package/dist/tools/provider.js +403 -0
  48. package/dist/tools/provider.js.map +1 -0
  49. package/dist/tools/proxy.d.ts +6 -0
  50. package/dist/tools/proxy.d.ts.map +1 -0
  51. package/dist/tools/proxy.js +107 -0
  52. package/dist/tools/proxy.js.map +1 -0
  53. package/dist/tools/research.d.ts +9 -0
  54. package/dist/tools/research.d.ts.map +1 -0
  55. package/dist/tools/research.js +182 -0
  56. package/dist/tools/research.js.map +1 -0
  57. package/dist/tools/task.d.ts.map +1 -1
  58. package/dist/tools/task.js +98 -9
  59. package/dist/tools/task.js.map +1 -1
  60. package/dist/tools/utility.d.ts.map +1 -1
  61. package/dist/tools/utility.js +85 -16
  62. package/dist/tools/utility.js.map +1 -1
  63. package/dist/utils/autoDocumentation.d.ts +8 -0
  64. package/dist/utils/autoDocumentation.d.ts.map +1 -0
  65. package/dist/utils/autoDocumentation.js +140 -0
  66. package/dist/utils/autoDocumentation.js.map +1 -0
  67. package/dist/utils/autoDocumentation.test.d.ts +2 -0
  68. package/dist/utils/autoDocumentation.test.d.ts.map +1 -0
  69. package/dist/utils/autoDocumentation.test.js +47 -0
  70. package/dist/utils/autoDocumentation.test.js.map +1 -0
  71. package/dist/utils/contextSync.d.ts.map +1 -1
  72. package/dist/utils/contextSync.js +21 -1
  73. package/dist/utils/contextSync.js.map +1 -1
  74. package/dist/utils/cursorCli.d.ts +46 -0
  75. package/dist/utils/cursorCli.d.ts.map +1 -0
  76. package/dist/utils/cursorCli.js +176 -0
  77. package/dist/utils/cursorCli.js.map +1 -0
  78. package/dist/utils/cursorCli.test.d.ts +2 -0
  79. package/dist/utils/cursorCli.test.d.ts.map +1 -0
  80. package/dist/utils/cursorCli.test.js +134 -0
  81. package/dist/utils/cursorCli.test.js.map +1 -0
  82. package/dist/utils/delegatedTaskRuntime.d.ts +45 -0
  83. package/dist/utils/delegatedTaskRuntime.d.ts.map +1 -0
  84. package/dist/utils/delegatedTaskRuntime.js +147 -0
  85. package/dist/utils/delegatedTaskRuntime.js.map +1 -0
  86. package/dist/utils/delegationKnowledge.d.ts +51 -0
  87. package/dist/utils/delegationKnowledge.d.ts.map +1 -0
  88. package/dist/utils/delegationKnowledge.js +197 -0
  89. package/dist/utils/delegationKnowledge.js.map +1 -0
  90. package/dist/utils/delegationRecovery.d.ts +17 -0
  91. package/dist/utils/delegationRecovery.d.ts.map +1 -0
  92. package/dist/utils/delegationRecovery.js +63 -0
  93. package/dist/utils/delegationRecovery.js.map +1 -0
  94. package/dist/utils/delegationRecovery.test.d.ts +2 -0
  95. package/dist/utils/delegationRecovery.test.d.ts.map +1 -0
  96. package/dist/utils/delegationRecovery.test.js +42 -0
  97. package/dist/utils/delegationRecovery.test.js.map +1 -0
  98. package/dist/utils/orchestratorConfig.d.ts +19 -0
  99. package/dist/utils/orchestratorConfig.d.ts.map +1 -0
  100. package/dist/utils/orchestratorConfig.js +38 -0
  101. package/dist/utils/orchestratorConfig.js.map +1 -0
  102. package/dist/utils/subprocess.d.ts +27 -0
  103. package/dist/utils/subprocess.d.ts.map +1 -0
  104. package/dist/utils/subprocess.js +84 -0
  105. package/dist/utils/subprocess.js.map +1 -0
  106. package/package.json +17 -5
  107. package/templates/AGENTS.md +164 -0
  108. package/activeContext.md +0 -37
  109. package/src/bin/cli.ts +0 -430
  110. package/src/database.ts +0 -764
  111. package/src/index.ts +0 -71
  112. package/src/models.ts +0 -226
  113. package/src/tools/agent.ts +0 -241
  114. package/src/tools/coordination.ts +0 -152
  115. package/src/tools/index.ts +0 -9
  116. package/src/tools/memory.ts +0 -150
  117. package/src/tools/task.ts +0 -334
  118. package/src/tools/utility.ts +0 -202
  119. package/src/utils/contextSync.ts +0 -144
  120. package/tsconfig.json +0 -20
@@ -17,6 +17,8 @@ This project uses **Agent Orchestration**. You MUST follow these rules.
17
17
  bootstrap
18
18
  ```
19
19
 
20
+ **Important**: `bootstrap` is an MCP tool invocation inside your agent/IDE, not a terminal command.
21
+
20
22
  This registers you with the orchestrator and shows you:
21
23
  - Current project focus
22
24
  - Tasks assigned to you
@@ -13,12 +13,13 @@ You are the **main orchestrator agent** in a multi-agent coordination system. Fo
13
13
  **IMMEDIATELY** when starting any task, register yourself:
14
14
 
15
15
  ```
16
- agent_register:
16
+ bootstrap:
17
17
  name: "main-orchestrator"
18
18
  role: "main"
19
- capabilities: ["planning", "coordination", "review"]
20
19
  ```
21
20
 
21
+ **Important**: `bootstrap` is an MCP tool invocation inside your agent/IDE, not a terminal command.
22
+
22
23
  ## Your Responsibilities
23
24
 
24
25
  1. **Set the Focus** - Always set the current focus so other agents know what we're working on:
@@ -35,7 +36,7 @@ agent_register:
35
36
  title: "<clear task title>"
36
37
  description: "<detailed requirements>"
37
38
  priority: "normal" | "high" | "urgent"
38
- assigned_to: "<agent_id>" (optional)
39
+ complexity: "trivial" | "simple" | "moderate" | "complex" (optional, auto-detected)
39
40
  ```
40
41
 
41
42
  3. **Store Decisions** - Document architectural decisions:
@@ -52,9 +53,22 @@ agent_register:
52
53
  task_list
53
54
  ```
54
55
 
56
+ ## Task Complexity Guidelines
57
+
58
+ When creating tasks, consider the appropriate complexity:
59
+
60
+ | Complexity | Use For | Research Required |
61
+ |------------|---------|-------------------|
62
+ | `trivial` | Typo fixes, config changes | None |
63
+ | `simple` | Bug fixes, small refactors | context, files |
64
+ | `moderate` | New endpoints, components | + requirements |
65
+ | `complex` | New features, migrations | + design |
66
+
67
+ Complexity is auto-detected from keywords, but you can override it.
68
+
55
69
  ## Workflow
56
70
 
57
- 1. Register yourself first
71
+ 1. Register yourself with `bootstrap`
58
72
  2. Check `coordination_status` to see current state
59
73
  3. Set `context:current_focus` with the goal
60
74
  4. Create tasks for work that needs to be done
@@ -75,12 +89,28 @@ This prevents contradicting decisions made by other agents.
75
89
  ## When Delegating
76
90
 
77
91
  1. Create a clear task with `task_create`
78
- 2. Optionally assign to a specific sub-agent
79
- 3. Wait for task completion before creating dependent tasks
80
- 4. Use task dependencies when order matters
92
+ 2. Set appropriate complexity for research requirements
93
+ 3. Optionally assign to a specific sub-agent
94
+ 4. Wait for task completion before creating dependent tasks
95
+ 5. Use task dependencies when order matters
96
+
97
+ ## Reviewing Research
98
+
99
+ Before approving implementation, check sub-agent research:
100
+ ```
101
+ research_status:
102
+ task_id: "<task_id>"
103
+ ```
104
+
105
+ Search past research for relevant context:
106
+ ```
107
+ research_query:
108
+ query: "<search term>"
109
+ ```
81
110
 
82
111
  ## Communication Pattern
83
112
 
84
113
  - Use `memory_set` in namespace `context` for current state
85
114
  - Use `memory_set` in namespace `blockers` for issues
115
+ - Use `memory_set` in namespace `decisions` for architectural choices
86
116
  - Check `agent_list` to see who's available
@@ -19,59 +19,120 @@ claim_todo:
19
19
  description: "<details if any>"
20
20
  ```
21
21
 
22
+ **Important**: tool calls like `claim_todo` / `bootstrap` are MCP tool invocations inside your agent/IDE, not terminal commands.
23
+
22
24
  **DO NOT start coding until you have claimed your task.**
23
25
 
24
26
  This:
25
27
  1. Registers you with the orchestrator
26
28
  2. Creates the task if it doesn't exist
27
- 3. Claims it so no other agent works on it
28
- 4. Returns your agent ID and task ID
29
+ 3. Assigns it to you
30
+ 4. Shows you the **research checklist** based on task complexity
29
31
 
30
32
  ---
31
33
 
32
- ## After Claiming
34
+ ## 🔬 Research-First Workflow
35
+
36
+ After claiming, you'll see a research checklist based on task complexity:
37
+
38
+ | Complexity | Research Required |
39
+ |------------|-------------------|
40
+ | `trivial` | None - start immediately |
41
+ | `simple` | context, files |
42
+ | `moderate` | context, files, requirements |
43
+ | `complex` | context, files, requirements, design |
33
44
 
34
- 1. **Check context** to understand the project:
45
+ ### For Non-Trivial Tasks
46
+
47
+ **BEFORE coding**, document your research:
48
+
49
+ 1. **Context** - Understand the current state:
35
50
  ```
36
- memory_get:
37
- key: "current_focus"
38
- namespace: "context"
51
+ memory_set:
52
+ key: "understanding"
53
+ value: "<what you learned about the codebase>"
54
+ namespace: "research:<task_id>:context"
39
55
  ```
40
56
 
41
- 2. **Check decisions** to avoid contradicting them:
57
+ 2. **Files** - Identify affected files:
42
58
  ```
43
- memory_list:
44
- namespace: "decisions"
59
+ memory_set:
60
+ key: "affected_files"
61
+ value: "<list of files you'll modify>"
62
+ namespace: "research:<task_id>:files"
45
63
  ```
46
64
 
47
- 3. **Lock files** before editing:
65
+ 3. **Requirements** (moderate/complex):
48
66
  ```
49
- lock_acquire:
50
- resource: "<file_path>"
51
- reason: "<what you're doing>"
67
+ memory_set:
68
+ key: "specs"
69
+ value: "<requirements, acceptance criteria, edge cases>"
70
+ namespace: "research:<task_id>:requirements"
52
71
  ```
53
72
 
54
- ---
73
+ 4. **Design** (complex only):
74
+ ```
75
+ memory_set:
76
+ key: "architecture"
77
+ value: "<design decisions, component structure>"
78
+ namespace: "research:<task_id>:design"
79
+ ```
55
80
 
56
- ## While Working
81
+ ### Mark Research Complete
82
+
83
+ When all items are documented:
57
84
 
58
- Update progress periodically:
59
85
  ```
60
- task_update:
86
+ research_ready:
61
87
  task_id: "<your_task_id>"
62
- progress: 50
63
88
  ```
64
89
 
65
- Store important findings:
90
+ ### Then Start Implementation
91
+
66
92
  ```
67
- memory_set:
68
- key: "<finding>"
69
- value: "<details>"
70
- namespace: "findings"
93
+ task_claim:
94
+ task_id: "<your_task_id>"
71
95
  ```
72
96
 
73
97
  ---
74
98
 
99
+ ## Check Research Status
100
+
101
+ To see what's done and what's missing:
102
+
103
+ ```
104
+ research_status:
105
+ task_id: "<your_task_id>"
106
+ ```
107
+
108
+ ---
109
+
110
+ ## While Working
111
+
112
+ 1. **Lock files** before editing:
113
+ ```
114
+ lock_acquire:
115
+ resource: "<file_path>"
116
+ reason: "<what you're doing>"
117
+ ```
118
+
119
+ 2. **Update progress** periodically:
120
+ ```
121
+ task_update:
122
+ task_id: "<your_task_id>"
123
+ progress: 50
124
+ ```
125
+
126
+ 3. **Store findings** for others:
127
+ ```
128
+ memory_set:
129
+ key: "<finding>"
130
+ value: "<details>"
131
+ namespace: "findings"
132
+ ```
133
+
134
+ ---
135
+
75
136
  ## When Done
76
137
 
77
138
  1. Complete the task:
@@ -109,6 +170,7 @@ memory_set:
109
170
  ## Important Rules
110
171
 
111
172
  1. **ALWAYS claim your task first** with `claim_todo`
112
- 2. **ALWAYS lock files** before editing shared resources
113
- 3. **ALWAYS complete your task** when done
114
- 4. **Check shared memory** before making decisions that affect others
173
+ 2. **ALWAYS complete research** before implementation (non-trivial tasks)
174
+ 3. **ALWAYS lock files** before editing shared resources
175
+ 4. **ALWAYS complete your task** when done
176
+ 5. **Check shared memory** before making decisions that affect others