-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Description
Summary
Make the hardcoded PROTOCOL_CONTEXT configurable with separate, independent templates for tasks (INIT.md) and plans (PLAN.md), allowing each to be enabled/disabled and customized independently.
Current Problem
- Single hardcoded protocol message for everything
- Cannot turn off injection
- Cannot customize per file type
- No dynamic content support
Solution: Simple Protocol Config Tool
Tool: protocol_config
protocol_config({
action: "get" | "set" | "reset",
// For "set" - all optional, only set what you want to change
task?: {
enabled?: boolean, // Turn task injection on/off
template?: string // Custom template for INIT.md
},
plan?: {
enabled?: boolean, // Turn plan injection on/off
template?: string // Custom template for PLAN.md
}
})Simple Examples
// Get current config
protocol_config({ action: "get" })
// Turn off task injection, keep plan injection
protocol_config({
action: "set",
task: { enabled: false }
})
// Set custom plan template only
protocol_config({
action: "set",
plan: {
template: "## Plan for {{taskName}}\nAgent: {{agentName}}\n[Custom instructions...]"
}
})
// Different templates for each
protocol_config({
action: "set",
task: { template: "Task template..." },
plan: { template: "Plan template..." }
})
// Reset everything to defaults
protocol_config({ action: "reset" })Template Variables
Simple interpolation support:
{{taskId}}- Task ID{{taskName}}- Task name{{agentName}}- Agent name{{timestamp}}- Creation time{{taskType}}- delegation/self/subtask
Storage
File: comm/.config/protocol.json
{
"task": {
"enabled": true,
"template": "task template content..."
},
"plan": {
"enabled": true,
"template": "plan template content..."
}
}Implementation
- Check config in
create-task.tsbefore appending to INIT.md - Check config in
submit-plan.tsbefore appending to PLAN.md - Create simple ProtocolConfigManager class
- Auto-create config with defaults if missing (not fallback to hardcoded)
Acceptance Criteria
- Single tool with simple interface
- Task and plan templates fully independent
- Each can be enabled/disabled separately
- Config persists in
comm/.config/protocol.json - Config file auto-created with defaults if missing
- Variable interpolation works
- 95% test coverage
Benefits
- Simple: One tool, clear parameters
- Independent: Task and plan don't affect each other
- Flexible: Turn on/off, customize, or use defaults
- Clean: No complex options or dependencies
- Explicit: Config file always exists (no hidden defaults)