Summary
The Analyzer class has quickTriage() which provides fast assessment, but we need a dedicated "Sage" mode for:
- Q&A - Answering questions about the codebase
- Task Decomposition - Breaking down complex tasks into subtasks with agent assignments
- Agent Routing - Determining which agent (Cursor/Jules/Human) should handle work
- Unblocking - Helping stuck agents/developers
Proposed Changes
1. CLI Command: agentic sage
# Answer a question
agentic sage "How do I add a new API endpoint?"
# Decompose a task
agentic sage --decompose "Implement user authentication"
# Route to agent
agentic sage --route "Fix the failing tests in ci.yml"
# With repo context
agentic sage --repo owner/repo "What does the Fleet class do?"
2. New Analyzer Method: sage()
interface SageOptions {
mode: 'question' | 'decompose' | 'route' | 'unblock';
context?: {
repo?: string;
issue?: number;
files?: string[];
};
}
async sage(query: string, options?: SageOptions): Promise<SageResult>
3. Schemas (in triage or local)
const SageResponseSchema = z.object({
answer: z.string(),
queryType: z.enum(['QUESTION', 'REVIEW', 'FIX', 'IMPLEMENT', 'REFACTOR', 'DECOMPOSE', 'UNBLOCK', 'GENERAL']),
confidence: z.number().min(0).max(1),
references: z.array(z.string()).optional(),
followUp: z.string().optional(),
agentRecommendation: z.object({
agent: z.enum(['CURSOR', 'JULES', 'OLLAMA', 'HUMAN']),
reason: z.string(),
}).optional(),
});
const TaskDecompositionSchema = z.object({
subtasks: z.array(z.object({
title: z.string(),
description: z.string(),
agent: z.enum(['CURSOR', 'JULES', 'HUMAN']),
priority: z.number().min(1).max(10),
estimatedEffort: z.enum(['small', 'medium', 'large']),
})),
dependencies: z.array(z.object({
from: z.string(),
to: z.string(),
})).optional(),
});
4. Action Extension
Add to actions/agentic-sage/action.yml:
name: 'Agentic Sage'
description: 'AI advisor for Q&A, task decomposition, and agent routing'
inputs:
query:
description: 'The question or task'
required: true
mode:
description: 'question, decompose, route, unblock'
default: 'question'
context_repo:
description: 'Repository for context'
required: false
Usage in control-center
Once implemented, ecosystem-sage.yml becomes:
- name: Run Sage
uses: agentic-dev-library/control/actions/agentic-sage@v1
with:
query: ${{ inputs.query }}
mode: 'question'
context_repo: ${{ inputs.context_repo }}
github_token: ${{ secrets.CI_GITHUB_TOKEN }}
env:
OLLAMA_API_KEY: ${{ secrets.OLLAMA_API_KEY }}
Benefits
- DRY - No more duplicated logic in control-center
- Testable - Proper unit tests in the OSS packages
- Reusable - Any org can use
agentic sage from npm
- Maintainable - Single source of truth
Related
- agentic-dev-library/triage#74 (Sage primitives)
- jbcom/control-center ecosystem-sage workflow
Summary
The
Analyzerclass hasquickTriage()which provides fast assessment, but we need a dedicated "Sage" mode for:Proposed Changes
1. CLI Command:
agentic sage2. New Analyzer Method:
sage()3. Schemas (in triage or local)
4. Action Extension
Add to
actions/agentic-sage/action.yml:Usage in control-center
Once implemented,
ecosystem-sage.ymlbecomes:Benefits
agentic sagefrom npmRelated