@trygentic/agentloop 0.15.1-alpha.11 → 0.17.0-alpha.11
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/README.md +1 -12
- package/package.json +3 -3
- package/templates/agents/_base/proactive.bt.json +43 -0
- package/templates/agents/_base/reactive-delegation.bt.json +73 -0
- package/templates/agents/_base/reactive-message.bt.json +58 -0
- package/templates/agents/_base/reactive-task.bt.json +51 -0
- package/templates/agents/chat/chat.bt.json +34 -17
- package/templates/agents/chat/chat.md +27 -18
- package/templates/agents/engineer/engineer.bt.json +383 -330
- package/templates/agents/engineer/engineer.md +63 -24
- package/templates/agents/orchestrator/orchestrator.bt.json +1 -0
- package/templates/agents/orchestrator/orchestrator.md +17 -91
- package/templates/agents/product-manager/product-manager.bt.json +59 -16
- package/templates/agents/product-manager/product-manager.md +12 -9
- package/templates/agents/qa-tester/qa-tester.bt.json +263 -81
- package/templates/agents/qa-tester/qa-tester.md +55 -9
- package/templates/agents/release/release.bt.json +205 -0
- package/templates/agents/release/release.md +119 -0
- package/templates/examples/engineer.md.example +4 -4
- package/templates/examples/example-custom-agent.md.example +4 -4
- package/templates/examples/example-plugin.js.example +1 -1
- package/templates/non-core-templates/container.md +0 -173
- package/templates/non-core-templates/dag-planner.md +0 -96
- package/templates/non-core-templates/internal/cli-tester.md +0 -218
- package/templates/non-core-templates/internal/qa-tester.md +0 -300
- package/templates/non-core-templates/internal/tui-designer.md +0 -370
- package/templates/non-core-templates/internal/tui-tester.md +0 -125
- package/templates/non-core-templates/maestro-qa.md +0 -240
- package/templates/non-core-templates/merge-resolver.md +0 -150
- package/templates/non-core-templates/project-detection.md +0 -75
- package/templates/non-core-templates/questionnaire.md +0 -124
package/README.md
CHANGED
|
@@ -81,22 +81,11 @@ On first launch, AgentLoop opens the **Model Selection** screen. Choose how you
|
|
|
81
81
|
1. **AgentLoop Subscription** - Use subscription credits for premium models
|
|
82
82
|
2. **Free Models** - Provided by OpenCode, no API key required
|
|
83
83
|
3. **Bring Your Own API Key** - Connect your preferred provider:
|
|
84
|
-
- **Anthropic** - Direct API key
|
|
84
|
+
- **Anthropic** - Direct API key
|
|
85
85
|
- **OpenAI** - Direct API key
|
|
86
86
|
- **Google Gemini** - Direct API key
|
|
87
87
|
- **OpenRouter** - Access 100+ models
|
|
88
88
|
|
|
89
|
-
For Claude models with your Pro/Max subscription:
|
|
90
|
-
```bash
|
|
91
|
-
# Install Claude Code CLI
|
|
92
|
-
npm install -g @anthropic-ai/claude-code
|
|
93
|
-
|
|
94
|
-
# Authenticate
|
|
95
|
-
claude
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Then restart AgentLoop—your Claude models will appear automatically.
|
|
99
|
-
|
|
100
89
|
To change models later, use the `/models` command.
|
|
101
90
|
|
|
102
91
|
### Interacting with AgentLoop
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trygentic/agentloop",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0-alpha.11",
|
|
4
4
|
"description": "AI-powered autonomous coding agent",
|
|
5
5
|
"bin": {
|
|
6
6
|
"agentloop": "./bin/agentloop"
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"postinstall": "node ./scripts/postinstall.mjs"
|
|
10
10
|
},
|
|
11
11
|
"optionalDependencies": {
|
|
12
|
-
"@trygentic/agentloop-darwin-arm64": "0.
|
|
13
|
-
"@trygentic/agentloop-linux-x64": "0.
|
|
12
|
+
"@trygentic/agentloop-darwin-arm64": "0.17.0-alpha.11",
|
|
13
|
+
"@trygentic/agentloop-linux-x64": "0.17.0-alpha.11"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=18.0.0"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "proactive-base",
|
|
3
|
+
"description": "Base behavior tree for proactive agents that actively monitor, scan, or poll on their own initiative rather than waiting for external signals. Provides the standard tick loop: wait for tick (yields to prevent busy-spinning), scan environment (placeholder), process results (placeholder), and loop back. Child agents extend this tree and override the <<ScanEnvironment>> and <<ProcessResults>> placeholders with their agent-specific logic via the 'overrides' mechanism. Current example: orchestrator. Future examples: DevOps monitors, marketing agents with browser automation, etc.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"mode": "proactive",
|
|
6
|
+
"tree": {
|
|
7
|
+
"type": "root",
|
|
8
|
+
"child": {
|
|
9
|
+
"type": "sequence",
|
|
10
|
+
"comment": "Main tick loop - runs continuously, yielding each iteration to the tick timer to prevent busy-spinning",
|
|
11
|
+
"children": [
|
|
12
|
+
{
|
|
13
|
+
"type": "action",
|
|
14
|
+
"call": "WaitForTick",
|
|
15
|
+
"comment": "Yield to the tick loop timer. Returns RUNNING until the next tick fires, preventing busy-spinning. The tick interval is configured by the agent runner (default 500ms for orchestrator)."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "action",
|
|
19
|
+
"call": "ScanEnvironment",
|
|
20
|
+
"name": "ScanEnvironment",
|
|
21
|
+
"comment": "<<SCANNING>> placeholder - child agents MUST override this node with their agent-specific scanning/monitoring logic using overrides.nodes.ScanEnvironment. Examples: orchestrator scans the task board for ready tasks, DevOps agent checks infrastructure health, marketing agent polls social feeds."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "action",
|
|
25
|
+
"call": "ProcessResults",
|
|
26
|
+
"name": "ProcessResults",
|
|
27
|
+
"comment": "<<PROCESSING>> placeholder - child agents MUST override this node with their agent-specific action logic using overrides.nodes.ProcessResults. Examples: orchestrator assigns tasks to agents, DevOps agent triggers alerts or remediation, marketing agent schedules posts."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "action",
|
|
31
|
+
"call": "Loop",
|
|
32
|
+
"comment": "Return RUNNING to restart the BT from the root - wait for next tick"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"blackboardDefaults": {
|
|
38
|
+
"loopCount": 0,
|
|
39
|
+
"lastTickAt": null,
|
|
40
|
+
"scanResults": null,
|
|
41
|
+
"lastScanAt": null
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "reactive-delegation-base",
|
|
3
|
+
"description": "Base behavior tree for reactive delegation-based agents (product-manager). Provides the standard continuous loop: wait for agent message or task assignment, fetch context, process (placeholder), report completion, clear context, and loop back. Child agents extend this tree and override the <<processing>> placeholder with their agent-specific workflow via the 'overrides' mechanism.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"mode": "reactive",
|
|
6
|
+
"tree": {
|
|
7
|
+
"type": "root",
|
|
8
|
+
"child": {
|
|
9
|
+
"type": "sequence",
|
|
10
|
+
"comment": "Main continuous loop - never exits unless agent is stopped",
|
|
11
|
+
"children": [
|
|
12
|
+
{
|
|
13
|
+
"type": "action",
|
|
14
|
+
"call": "WaitForAgentMessage",
|
|
15
|
+
"comment": "Block until a delegation request arrives via agent-to-agent messaging (primary) or orchestrator task assignment (fallback). Sets taskTitle, taskDescription, and isAgentMessage on blackboard."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "action",
|
|
19
|
+
"call": "FetchTaskContext",
|
|
20
|
+
"comment": "Load task details if a real DB task was assigned, or use the request data already on the blackboard (for both agent messages and direct requests)"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "action",
|
|
24
|
+
"call": "ProcessDelegation",
|
|
25
|
+
"name": "ProcessDelegation",
|
|
26
|
+
"comment": "<<PROCESSING>> placeholder - child agents MUST override this node with their agent-specific workflow using overrides.nodes.ProcessDelegation"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "action",
|
|
30
|
+
"call": "AddCompletionComment",
|
|
31
|
+
"comment": "Add a completion comment summarizing the agent's work"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "action",
|
|
35
|
+
"call": "ReportTriggerPass"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "action",
|
|
39
|
+
"call": "ClearTaskContext",
|
|
40
|
+
"comment": "Reset task-specific blackboard keys to prepare for next delegation request"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "action",
|
|
44
|
+
"call": "Loop",
|
|
45
|
+
"comment": "Return to start - wait for next delegation request"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"blackboardDefaults": {
|
|
51
|
+
"taskComments": null,
|
|
52
|
+
"taskDetails": null,
|
|
53
|
+
"requestedStatus": "done",
|
|
54
|
+
"statusChangeReason": "Processing complete",
|
|
55
|
+
"currentTaskId": null,
|
|
56
|
+
"taskAssignedAt": null,
|
|
57
|
+
"loopCount": 0,
|
|
58
|
+
"custom": {
|
|
59
|
+
"loopCount": 0,
|
|
60
|
+
"shouldLoop": false,
|
|
61
|
+
"continuousTaskId": null,
|
|
62
|
+
"currentTaskId": null,
|
|
63
|
+
"taskAssignedAt": null,
|
|
64
|
+
"agentMessageId": null,
|
|
65
|
+
"agentMessageContent": null,
|
|
66
|
+
"agentMessageSender": null,
|
|
67
|
+
"agentMessageType": null,
|
|
68
|
+
"isDirectRequest": false,
|
|
69
|
+
"isAgentMessage": false,
|
|
70
|
+
"isColumnTriggered": false
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "reactive-message-base",
|
|
3
|
+
"description": "Base behavior tree for reactive message-based agents (chat). Provides the standard continuous loop: wait for message, fetch context, process (placeholder), update history, clear context, and loop back. Child agents extend this tree and override the <<processing>> placeholder with their agent-specific workflow via the 'overrides' mechanism.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"mode": "reactive",
|
|
6
|
+
"tree": {
|
|
7
|
+
"type": "root",
|
|
8
|
+
"child": {
|
|
9
|
+
"type": "sequence",
|
|
10
|
+
"comment": "Main continuous loop - processes messages indefinitely",
|
|
11
|
+
"children": [
|
|
12
|
+
{
|
|
13
|
+
"type": "action",
|
|
14
|
+
"call": "WaitForMessage",
|
|
15
|
+
"comment": "Block until a message arrives (user input or agent message). Polls the message queue."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "action",
|
|
19
|
+
"call": "FetchMessageContext",
|
|
20
|
+
"comment": "Load message details, sender info, conversation history, and any relevant context"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "action",
|
|
24
|
+
"call": "ProcessMessage",
|
|
25
|
+
"name": "ProcessMessage",
|
|
26
|
+
"comment": "<<PROCESSING>> placeholder - child agents MUST override this node with their agent-specific workflow using overrides.nodes.ProcessMessage"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "action",
|
|
30
|
+
"call": "UpdateConversationHistory",
|
|
31
|
+
"comment": "Add this exchange to conversation history"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "action",
|
|
35
|
+
"call": "ClearMessageContext",
|
|
36
|
+
"comment": "Reset message-specific blackboard keys for next message"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "action",
|
|
40
|
+
"call": "Loop",
|
|
41
|
+
"comment": "Return to start to wait for next message"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"blackboardDefaults": {
|
|
47
|
+
"currentMessage": null,
|
|
48
|
+
"messageSender": null,
|
|
49
|
+
"messageType": null,
|
|
50
|
+
"messageContent": null,
|
|
51
|
+
"conversationHistory": [],
|
|
52
|
+
"currentTaskId": null,
|
|
53
|
+
"taskAssignedAt": null,
|
|
54
|
+
"loopCount": 0,
|
|
55
|
+
"messageCount": 0,
|
|
56
|
+
"lastActivityAt": null
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "reactive-task-base",
|
|
3
|
+
"description": "Base behavior tree for reactive task-based agents (engineer, qa-tester, release). Provides the standard continuous loop: wait for task assignment, fetch context, process (placeholder), clear context, and loop back. Child agents extend this tree and override the <<processing>> placeholder with their agent-specific workflow via the 'overrides' mechanism.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"mode": "reactive",
|
|
6
|
+
"tree": {
|
|
7
|
+
"type": "root",
|
|
8
|
+
"child": {
|
|
9
|
+
"type": "sequence",
|
|
10
|
+
"comment": "Main continuous loop - never exits unless agent is stopped",
|
|
11
|
+
"children": [
|
|
12
|
+
{
|
|
13
|
+
"type": "action",
|
|
14
|
+
"call": "WaitForTask",
|
|
15
|
+
"comment": "Block until orchestrator assigns a task via ContinuousAgentRunner.assignTask()"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "action",
|
|
19
|
+
"call": "FetchTaskContext",
|
|
20
|
+
"comment": "Load task details, comments, and determine context for processing"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "action",
|
|
24
|
+
"call": "ProcessTask",
|
|
25
|
+
"name": "ProcessTask",
|
|
26
|
+
"comment": "<<PROCESSING>> placeholder - child agents MUST override this node with their agent-specific workflow using overrides.nodes.ProcessTask"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "action",
|
|
30
|
+
"call": "ClearTaskContext",
|
|
31
|
+
"comment": "Reset task-specific blackboard keys to prepare for next task assignment"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "action",
|
|
35
|
+
"call": "Loop",
|
|
36
|
+
"comment": "Return RUNNING to restart the BT from the root - wait for next task"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"blackboardDefaults": {
|
|
42
|
+
"taskComments": null,
|
|
43
|
+
"taskDetails": null,
|
|
44
|
+
"requestedStatus": null,
|
|
45
|
+
"statusChangeReason": null,
|
|
46
|
+
"currentTaskId": null,
|
|
47
|
+
"taskAssignedAt": null,
|
|
48
|
+
"loopCount": 0,
|
|
49
|
+
"isColumnTriggered": false
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"name": "chat-continuous-agent-tree",
|
|
3
3
|
"description": "Continuous behavior tree for the Chat agent. Processes messages in a loop from users and other agents. Unlike task-based agents, chat uses a message queue model with support for async task delegation.",
|
|
4
4
|
"version": "1.0.0",
|
|
5
|
+
"mode": "reactive",
|
|
5
6
|
"tree": {
|
|
6
7
|
"type": "root",
|
|
7
8
|
"child": {
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
},
|
|
44
45
|
{
|
|
45
46
|
"type": "sequence",
|
|
46
|
-
"comment": "Async task request - delegate work to
|
|
47
|
+
"comment": "Async task request - delegate work to product-manager without blocking",
|
|
47
48
|
"children": [
|
|
48
49
|
{
|
|
49
50
|
"type": "condition",
|
|
@@ -51,13 +52,13 @@
|
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
54
|
"type": "action",
|
|
54
|
-
"call": "
|
|
55
|
-
"comment": "
|
|
55
|
+
"call": "DelegateWork",
|
|
56
|
+
"comment": "Delegate work to product-manager via delegate_work (fire-and-forget)"
|
|
56
57
|
},
|
|
57
58
|
{
|
|
58
59
|
"type": "action",
|
|
59
60
|
"call": "SendTaskQueuedResponse",
|
|
60
|
-
"comment": "Acknowledge to user that
|
|
61
|
+
"comment": "Acknowledge to user that work was delegated"
|
|
61
62
|
}
|
|
62
63
|
]
|
|
63
64
|
},
|
|
@@ -167,7 +168,7 @@
|
|
|
167
168
|
{
|
|
168
169
|
"type": "llm-selector",
|
|
169
170
|
"name": "ClassifyUserIntent",
|
|
170
|
-
"prompt": "Classify the user's intent based on their message.\n\nUser message: {{messageContent}}\n\nConversation history:\n{{conversationHistory}}\n\nClassify the intent to
|
|
171
|
+
"prompt": "Classify the user's intent based on their message.\n\nUser message: {{messageContent}}\n\nConversation history:\n{{conversationHistory}}\n\nClassify the intent into one of the following categories:\n\n- direct_execution: The user wants to run a SINGLE operational command that can be executed directly without creating tasks. This is for simple, well-known dev commands that don't require writing code or making changes. Examples: \"run the tests\", \"run tests\", \"lint the code\", \"type check\", \"build the project\", \"install dependencies\", \"format the code\", \"check types\".\n IMPORTANT: \"run the tests\" = direct_execution. \"make all tests pass\" = task_request (requires code changes). \"lint\" = direct_execution. \"fix all lint errors\" = task_request.\n\n- task_request: The user wants something BUILT, CREATED, IMPLEMENTED, FIXED, CHANGED, MODIFIED, ADDED, REMOVED, REFACTORED, CONFIGURED, or SET UP. This includes ANY request that would require writing code, editing files, or making changes to the project. Examples: \"create a todo app\", \"fix the login bug\", \"add authentication\", \"refactor the database module\", \"update the API endpoint\", \"build a dashboard\", \"set up CI/CD\", \"implement user profiles\", \"make the tests pass\", \"optimize the search function\".\n\n- code_question: The user is ASKING a question about how existing code works, what a function does, or how something is structured. They want INFORMATION, not CHANGES. Examples: \"how does the auth module work?\", \"what does this function do?\", \"where is the database config?\", \"explain the routing logic\".\n\n- status_inquiry: The user is asking about task status, progress, what agents are doing, or system health. Examples: \"what's the status?\", \"how's it going?\", \"show me the tasks\", \"is the orchestrator running?\".\n\n- general_chat: The user is having general conversation, asking conceptual questions not about THIS codebase, or chatting. Examples: \"hello\", \"what is a REST API?\", \"explain microservices\", \"thanks\".\n\nIMPORTANT: When in doubt between task_request and other categories, choose task_request. It is better to delegate work that could have been answered conversationally than to try to answer a work request conversationally.",
|
|
171
172
|
"contextKeys": ["messageContent", "conversationHistory"],
|
|
172
173
|
"branches": {
|
|
173
174
|
"general_chat": {
|
|
@@ -175,10 +176,9 @@
|
|
|
175
176
|
"child": {
|
|
176
177
|
"type": "llm-action",
|
|
177
178
|
"name": "GenerateGeneralResponse",
|
|
178
|
-
"prompt": "You are a helpful AI assistant. Respond to the user's message naturally and helpfully.\n\nUser message: {{messageContent}}\n\nConversation history:\n{{conversationHistory}}\n\nProvide a thoughtful, helpful response.",
|
|
179
|
+
"prompt": "You are a helpful AI assistant having a conversation with the user. Respond to the user's message naturally and helpfully.\n\nUser message: {{messageContent}}\n\nConversation history:\n{{conversationHistory}}\n\nIMPORTANT RULES:\n- You are ONLY having a conversation. You are NOT writing code, NOT editing files, NOT running commands.\n- If the user is asking you to create, build, fix, implement, or change ANYTHING, respond with: \"I'll delegate that work to the team. Let me set that up for you.\" and set suggestedActions to [\"delegate_work\"].\n- Do NOT use bash, write, edit, read, or any file/shell tools. You do not have access to them.\n- Only provide conversational responses: explanations, answers to questions, summaries, etc.\n\nProvide a thoughtful, helpful response.",
|
|
179
180
|
"contextKeys": ["messageContent", "conversationHistory", "codebaseContext"],
|
|
180
181
|
"subagent": "chat",
|
|
181
|
-
"maxTurns": 20,
|
|
182
182
|
"outputSchema": {
|
|
183
183
|
"type": "object",
|
|
184
184
|
"properties": {
|
|
@@ -204,10 +204,9 @@
|
|
|
204
204
|
{
|
|
205
205
|
"type": "llm-action",
|
|
206
206
|
"name": "AnswerCodeQuestion",
|
|
207
|
-
"prompt": "The user has a question about the codebase. Analyze and answer their question.\n\nUser question: {{messageContent}}\n\nCodebase context:\n{{codebaseContext}}\n\nUse the code-graph-rag MCP tools (semantic_search, list_file_entities, analyze_code_impact, find_similar_code) and Read/Grep/Glob to examine specific files as needed. If code-graph-rag tools fail, fall back to Grep/Glob.\n\nProvide a clear, accurate answer based on the actual codebase.",
|
|
207
|
+
"prompt": "The user has a question about the codebase. Analyze and answer their question.\n\nUser question: {{messageContent}}\n\nCodebase context:\n{{codebaseContext}}\n\nUse the code-graph-rag MCP tools (semantic_search, list_file_entities, analyze_code_impact, find_similar_code) and Read/Grep/Glob to examine specific files as needed. If code-graph-rag tools fail, fall back to Grep/Glob.\n\nIMPORTANT: You are ONLY answering questions about the code. Do NOT make any changes to files. Do NOT create, modify, or delete anything. If the user is actually requesting changes, respond with: \"That sounds like a code change request. Let me delegate that to the engineering team.\" and set the response accordingly.\n\nProvide a clear, accurate answer based on the actual codebase.",
|
|
208
208
|
"contextKeys": ["messageContent", "codebaseContext", "conversationHistory"],
|
|
209
209
|
"subagent": "chat",
|
|
210
|
-
"maxTurns": 30,
|
|
211
210
|
"outputSchema": {
|
|
212
211
|
"type": "object",
|
|
213
212
|
"properties": {
|
|
@@ -223,23 +222,40 @@
|
|
|
223
222
|
]
|
|
224
223
|
}
|
|
225
224
|
},
|
|
225
|
+
"direct_execution": {
|
|
226
|
+
"description": "Single operational command (run tests, lint, build, etc.) - execute directly without creating tasks",
|
|
227
|
+
"child": {
|
|
228
|
+
"type": "sequence",
|
|
229
|
+
"children": [
|
|
230
|
+
{
|
|
231
|
+
"type": "action",
|
|
232
|
+
"call": "AnalyzeCodebase",
|
|
233
|
+
"comment": "Gather codebase context to detect package manager and project type"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"type": "action",
|
|
237
|
+
"call": "ExecuteDirectCommand",
|
|
238
|
+
"comment": "Map natural language to shell command and execute directly"
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
},
|
|
226
243
|
"task_request": {
|
|
227
|
-
"description": "User wants to create
|
|
244
|
+
"description": "User wants to create, build, implement, fix, change, or modify something - delegate to product-manager via delegate_work",
|
|
228
245
|
"child": {
|
|
229
246
|
"type": "sequence",
|
|
230
247
|
"children": [
|
|
231
248
|
{
|
|
232
249
|
"type": "llm-action",
|
|
233
250
|
"name": "ExtractTaskDetails",
|
|
234
|
-
"prompt": "The user wants to create a task or make code changes. Extract
|
|
251
|
+
"prompt": "The user wants to create a task or make code changes. Extract a HIGH-LEVEL work request from their message.\n\nUser message: {{messageContent}}\n\nConversation history:\n{{conversationHistory}}\n\nIMPORTANT: Extract a single high-level title and description. Do NOT decompose the work into subtasks - the product-manager will handle task breakdown.\n\nExample: If the user says 'Create a todo app', extract title='Create a todo app' and a description covering what the user wants at a high level.",
|
|
235
252
|
"contextKeys": ["messageContent", "conversationHistory"],
|
|
236
253
|
"outputSchema": {
|
|
237
254
|
"type": "object",
|
|
238
255
|
"properties": {
|
|
239
|
-
"taskTitle": { "type": "string", "description": "Concise
|
|
240
|
-
"taskDescription": { "type": "string", "description": "
|
|
241
|
-
"priority": { "type": "string", "enum": ["low", "medium", "high", "critical"], "description": "Suggested task priority" }
|
|
242
|
-
"isAsync": { "type": "boolean", "description": "Whether this should be processed asynchronously" }
|
|
256
|
+
"taskTitle": { "type": "string", "description": "Concise high-level title for the work request" },
|
|
257
|
+
"taskDescription": { "type": "string", "description": "High-level description of what the user wants - do NOT decompose into subtasks" },
|
|
258
|
+
"priority": { "type": "string", "enum": ["low", "medium", "high", "critical"], "description": "Suggested task priority" }
|
|
243
259
|
},
|
|
244
260
|
"required": ["taskTitle", "taskDescription"]
|
|
245
261
|
},
|
|
@@ -248,7 +264,8 @@
|
|
|
248
264
|
},
|
|
249
265
|
{
|
|
250
266
|
"type": "action",
|
|
251
|
-
"call": "
|
|
267
|
+
"call": "DelegateWork",
|
|
268
|
+
"comment": "Delegate to product-manager via delegate_work MCP tool instead of creating tasks directly"
|
|
252
269
|
},
|
|
253
270
|
{
|
|
254
271
|
"type": "action",
|
|
@@ -287,7 +304,7 @@
|
|
|
287
304
|
}
|
|
288
305
|
}
|
|
289
306
|
},
|
|
290
|
-
"defaultBranch": "
|
|
307
|
+
"defaultBranch": "task_request",
|
|
291
308
|
"confidenceThreshold": 0.6
|
|
292
309
|
},
|
|
293
310
|
{
|
|
@@ -9,7 +9,7 @@ model: inherit
|
|
|
9
9
|
instanceCount: 1
|
|
10
10
|
showInLiveView: true
|
|
11
11
|
tools:
|
|
12
|
-
-
|
|
12
|
+
- question
|
|
13
13
|
- mcp__agentloop__delegate_work
|
|
14
14
|
- mcp__agentloop__list_tasks
|
|
15
15
|
- mcp__agentloop__get_task
|
|
@@ -33,14 +33,30 @@ You are **AgentLoop** - the primary user-facing interface for the multi-agent de
|
|
|
33
33
|
3. **Status Reporting**: Show task status, orchestrator health, and project progress
|
|
34
34
|
4. **Orchestrator Control**: Start/stop the orchestrator when users request it
|
|
35
35
|
|
|
36
|
-
## CRITICAL: Delegation Rules
|
|
36
|
+
## CRITICAL: Delegation Rules - READ THIS FIRST
|
|
37
37
|
|
|
38
|
-
You MUST
|
|
39
|
-
The product-manager will handle task breakdown, subproject creation, and dependency setup.
|
|
38
|
+
**ABSOLUTE RULE: You MUST call `mcp__agentloop__delegate_work` for ANY request that involves creating, building, implementing, fixing, modifying, or changing code or files.**
|
|
40
39
|
|
|
41
|
-
|
|
40
|
+
You are a CONVERSATIONAL INTERFACE ONLY. You do NOT write code. You do NOT modify files. You do NOT run shell commands. You ONLY delegate work to other agents.
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
**You do NOT have access to any of these tools: `bash`, `write`, `edit`, `read`, `glob`, `grep`, `TodoWrite`, or ANY file/shell tools.**
|
|
43
|
+
If you find yourself wanting to use any tool other than `delegate_work`, `list_tasks`, `get_task`, `list_subprojects`, `get_subproject`, `run_orchestrator`, `stop_orchestrator`, `get_orchestrator_status`, `get_system_health`, `get_daemon_status`, or `question` -- STOP. You are making a mistake.
|
|
44
|
+
|
|
45
|
+
The ONLY way to get code work done is to call `mcp__agentloop__delegate_work`.
|
|
46
|
+
|
|
47
|
+
### When to call delegate_work
|
|
48
|
+
|
|
49
|
+
Call `mcp__agentloop__delegate_work` when the user says ANY of these (or similar):
|
|
50
|
+
- "Create a ..." / "Build a ..." / "Make a ..." / "Implement ..."
|
|
51
|
+
- "Fix ..." / "Debug ..." / "Resolve ..."
|
|
52
|
+
- "Add ..." / "Update ..." / "Change ..." / "Modify ..."
|
|
53
|
+
- "Refactor ..." / "Optimize ..." / "Improve ..."
|
|
54
|
+
- "Set up ..." / "Configure ..." / "Install ..."
|
|
55
|
+
- "Write tests for ..." / "Add logging to ..."
|
|
56
|
+
- "Remove ..." / "Delete ..." (code/file changes)
|
|
57
|
+
- Any request that implies code, file, or configuration changes
|
|
58
|
+
|
|
59
|
+
### How to call delegate_work
|
|
44
60
|
|
|
45
61
|
Submit a HIGH-LEVEL work request. Call this ONCE per user request.
|
|
46
62
|
|
|
@@ -53,8 +69,6 @@ CORRECT - One high-level call:
|
|
|
53
69
|
WRONG - Multiple specific calls (this is the PM's job, NOT yours):
|
|
54
70
|
delegate_work(title: "Create auth database schema", ...)
|
|
55
71
|
delegate_work(title: "Implement JWT token service", ...)
|
|
56
|
-
delegate_work(title: "Build login endpoint", ...)
|
|
57
|
-
delegate_work(title: "Build registration endpoint", ...)
|
|
58
72
|
|
|
59
73
|
RULE: If you find yourself wanting to call delegate_work more than once,
|
|
60
74
|
you are decomposing the work yourself. STOP. Combine everything into ONE call
|
|
@@ -63,18 +77,13 @@ and let the product-manager handle the decomposition.
|
|
|
63
77
|
If the user asks for multiple unrelated things, make ONE call per distinct project/feature.
|
|
64
78
|
Each call creates a subproject that the PM will break into tasks.
|
|
65
79
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
**Delegate to PM (use delegate_work):**
|
|
69
|
-
- Feature implementation requests
|
|
70
|
-
- Bug fixes that require code changes
|
|
71
|
-
- Multi-step workflows needing coordination
|
|
80
|
+
### When to respond directly (NO delegation)
|
|
72
81
|
|
|
73
|
-
**Respond directly (no delegation needed):**
|
|
74
|
-
- Questions, explanations, summaries
|
|
75
|
-
-
|
|
76
|
-
- Analysis and discussion
|
|
82
|
+
**Respond directly (no delegation needed) ONLY for:**
|
|
83
|
+
- Questions about concepts, explanations, summaries
|
|
84
|
+
- "What is ...?" / "How does ... work?" / "Explain ..."
|
|
77
85
|
- Status queries (use list_tasks, get_task, get_orchestrator_status)
|
|
86
|
+
- General conversation that does NOT request any code or file changes
|
|
78
87
|
|
|
79
88
|
## Communication Style
|
|
80
89
|
|