@codemcp/workflows 6.20.2 → 6.22.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.
- package/package.json +2 -2
- package/packages/cli/dist/{chunk-4N42FFJE.js → chunk-QMPDZD7D.js} +117 -2674
- package/packages/cli/dist/{cli-MFHC7UWY.js → cli-CY4PLNWR.js} +475 -34
- package/packages/cli/dist/{dist-ISN3FRV4.js → dist-6BKGI5U7.js} +91 -8
- package/packages/cli/dist/{dist-TDV3DJ2J.js → dist-S4HQ3JQN.js} +3 -1
- package/packages/cli/dist/index.js +2 -2
- package/packages/cli/package.json +5 -2
- package/packages/cli/resources/templates/opencode-agents/coding.md.tmpl +13 -0
- package/packages/cli/resources/templates/opencode-agents/research.md.tmpl +13 -0
- package/packages/cli/resources/templates/opencode-agents/thinking.md.tmpl +13 -0
- package/packages/cli/resources/workflows/bugfix.yaml +6 -0
- package/packages/cli/resources/workflows/epcc.yaml +3 -0
- package/packages/cli/resources/workflows/greenfield.yaml +3 -0
- package/packages/cli/resources/workflows/pr-review.yaml +2 -0
- package/packages/cli/resources/workflows/qrspi.yaml +5 -0
- package/packages/cli/resources/workflows/tdd.yaml +3 -0
- package/packages/cli/resources/workflows/waterfall.yaml +3 -0
- package/packages/core/dist/capability-hint.d.ts +28 -0
- package/packages/core/dist/capability-hint.js +52 -0
- package/packages/core/dist/capability-hint.js.map +1 -0
- package/packages/core/dist/config-manager.d.ts +19 -0
- package/packages/core/dist/config-manager.js +26 -0
- package/packages/core/dist/config-manager.js.map +1 -1
- package/packages/core/dist/index.d.ts +1 -0
- package/packages/core/dist/index.js +1 -0
- package/packages/core/dist/index.js.map +1 -1
- package/packages/core/dist/instruction-generator.js +7 -1
- package/packages/core/dist/instruction-generator.js.map +1 -1
- package/packages/core/dist/interfaces/instruction-generator.interface.d.ts +14 -0
- package/packages/core/dist/state-machine-types.d.ts +7 -0
- package/packages/core/dist/system-prompt-generator.js +26 -4
- package/packages/core/dist/system-prompt-generator.js.map +1 -1
- package/packages/core/package.json +1 -1
- package/packages/core/resources/templates/opencode-agents/coding.md.tmpl +13 -0
- package/packages/core/resources/templates/opencode-agents/research.md.tmpl +13 -0
- package/packages/core/resources/templates/opencode-agents/thinking.md.tmpl +13 -0
- package/packages/core/resources/workflows/bugfix.yaml +6 -0
- package/packages/core/resources/workflows/epcc.yaml +3 -0
- package/packages/core/resources/workflows/greenfield.yaml +3 -0
- package/packages/core/resources/workflows/pr-review.yaml +2 -0
- package/packages/core/resources/workflows/qrspi.yaml +5 -0
- package/packages/core/resources/workflows/tdd.yaml +3 -0
- package/packages/core/resources/workflows/waterfall.yaml +3 -0
- package/packages/docs/.vitepress/dist/404.html +1 -1
- package/packages/docs/.vitepress/dist/assets/user_capability-routing.md.DbNKvMiS.js +15 -0
- package/packages/docs/.vitepress/dist/assets/user_capability-routing.md.DbNKvMiS.lean.js +1 -0
- package/packages/docs/.vitepress/dist/dev/ARCHITECTURE.html +2 -2
- package/packages/docs/.vitepress/dist/dev/DEVELOPMENT.html +2 -2
- package/packages/docs/.vitepress/dist/dev/LOGGING.html +2 -2
- package/packages/docs/.vitepress/dist/dev/PUBLISHING.html +2 -2
- package/packages/docs/.vitepress/dist/hashmap.json +1 -1
- package/packages/docs/.vitepress/dist/index.html +2 -2
- package/packages/docs/.vitepress/dist/user/advanced-engineering.html +3 -3
- package/packages/docs/.vitepress/dist/user/agent-setup.html +3 -3
- package/packages/docs/.vitepress/dist/user/beads-integration.html +2 -2
- package/packages/docs/.vitepress/dist/user/capability-routing.html +40 -0
- package/packages/docs/.vitepress/dist/user/crowd-mcp-integration.html +2 -2
- package/packages/docs/.vitepress/dist/user/custom-workflows.html +2 -2
- package/packages/docs/.vitepress/dist/user/git-commit-feature.html +2 -2
- package/packages/docs/.vitepress/dist/user/how-it-works.html +2 -2
- package/packages/docs/.vitepress/dist/user/long-term-memory.html +2 -2
- package/packages/docs/.vitepress/dist/user/packaged-workflows.html +2 -2
- package/packages/docs/.vitepress/dist/user/tutorial.html +2 -2
- package/packages/docs/.vitepress/dist/user/workflow-selection.html +2 -2
- package/packages/docs/.vitepress/dist/workflows/adr.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/big-bang-conversion.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/boundary-testing.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/bugfix.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/bugfix.yaml +6 -0
- package/packages/docs/.vitepress/dist/workflows/business-analysis.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/c4-analysis.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/epcc.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/epcc.yaml +3 -0
- package/packages/docs/.vitepress/dist/workflows/game-beginner.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/greenfield.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/greenfield.yaml +3 -0
- package/packages/docs/.vitepress/dist/workflows/minor.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/posts.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/pr-review.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/pr-review.yaml +2 -0
- package/packages/docs/.vitepress/dist/workflows/qrspi.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/qrspi.yaml +5 -0
- package/packages/docs/.vitepress/dist/workflows/sdd-bugfix-crowd.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/sdd-bugfix.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/sdd-feature-crowd.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/sdd-feature.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/sdd-greenfield-crowd.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/sdd-greenfield.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/skilled-bugfix.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/skilled-epcc.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/skilled-greenfield.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/slides.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/tdd.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/tdd.yaml +3 -0
- package/packages/docs/.vitepress/dist/workflows/waterfall.html +1 -1
- package/packages/docs/.vitepress/dist/workflows/waterfall.yaml +3 -0
- package/packages/docs/.vitepress/dist/workflows.html +1 -1
- package/packages/docs/package.json +1 -1
- package/packages/mcp-server/dist/index.js +93 -8
- package/packages/mcp-server/package.json +1 -1
- package/packages/mcp-server/resources/templates/opencode-agents/coding.md.tmpl +13 -0
- package/packages/mcp-server/resources/templates/opencode-agents/research.md.tmpl +13 -0
- package/packages/mcp-server/resources/templates/opencode-agents/thinking.md.tmpl +13 -0
- package/packages/mcp-server/resources/workflows/bugfix.yaml +6 -0
- package/packages/mcp-server/resources/workflows/epcc.yaml +3 -0
- package/packages/mcp-server/resources/workflows/greenfield.yaml +3 -0
- package/packages/mcp-server/resources/workflows/pr-review.yaml +2 -0
- package/packages/mcp-server/resources/workflows/qrspi.yaml +5 -0
- package/packages/mcp-server/resources/workflows/tdd.yaml +3 -0
- package/packages/mcp-server/resources/workflows/waterfall.yaml +3 -0
- package/packages/opencode-plugin/dist/index.js +93 -8
- package/packages/opencode-plugin/package.json +1 -1
- package/packages/opencode-plugin/resources/templates/opencode-agents/coding.md.tmpl +13 -0
- package/packages/opencode-plugin/resources/templates/opencode-agents/research.md.tmpl +13 -0
- package/packages/opencode-plugin/resources/templates/opencode-agents/thinking.md.tmpl +13 -0
- package/packages/opencode-plugin/resources/workflows/bugfix.yaml +6 -0
- package/packages/opencode-plugin/resources/workflows/epcc.yaml +3 -0
- package/packages/opencode-plugin/resources/workflows/greenfield.yaml +3 -0
- package/packages/opencode-plugin/resources/workflows/pr-review.yaml +2 -0
- package/packages/opencode-plugin/resources/workflows/qrspi.yaml +5 -0
- package/packages/opencode-plugin/resources/workflows/tdd.yaml +3 -0
- package/packages/opencode-plugin/resources/workflows/waterfall.yaml +3 -0
- package/packages/opencode-tui-plugin/package.json +1 -1
- package/packages/visualizer/package.json +1 -1
- package/resources/state-machine-schema.json +4 -0
- package/resources/templates/opencode-agents/coding.md.tmpl +13 -0
- package/resources/templates/opencode-agents/research.md.tmpl +13 -0
- package/resources/templates/opencode-agents/thinking.md.tmpl +13 -0
- package/resources/workflows/bugfix.yaml +6 -0
- package/resources/workflows/epcc.yaml +3 -0
- package/resources/workflows/greenfield.yaml +3 -0
- package/resources/workflows/pr-review.yaml +2 -0
- package/resources/workflows/qrspi.yaml +5 -0
- package/resources/workflows/tdd.yaml +3 -0
- package/resources/workflows/waterfall.yaml +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AAEzC,8BAA8B;AAC9B,cAAc,uBAAuB,CAAC;AAEtC,wCAAwC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AAEvC,kBAAkB;AAClB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAE1C,8BAA8B;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AAEzC,2BAA2B;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AAEzC,8BAA8B;AAC9B,cAAc,uBAAuB,CAAC;AAEtC,wCAAwC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AAEvC,kBAAkB;AAClB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAE1C,8BAA8B;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AAEzC,2BAA2B;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import { ProjectDocsManager } from './project-docs-manager.js';
|
|
10
10
|
import { createLogger } from './logger.js';
|
|
11
11
|
import { capitalizePhase } from './string-utils.js';
|
|
12
|
+
import { formatCapabilityHint } from './capability-hint.js';
|
|
12
13
|
export class InstructionGenerator {
|
|
13
14
|
projectDocsManager;
|
|
14
15
|
constructor(logger = createLogger('InstructionGenerator')) {
|
|
@@ -61,7 +62,7 @@ export class InstructionGenerator {
|
|
|
61
62
|
* Enhance base instructions with context-specific information
|
|
62
63
|
*/
|
|
63
64
|
async enhanceInstructions(baseInstructions, context) {
|
|
64
|
-
const { phase, conversationContext, allowedFilePatterns } = context;
|
|
65
|
+
const { phase, conversationContext, allowedFilePatterns, requiredCapability, capabilityConfig, } = context;
|
|
65
66
|
const phaseName = capitalizePhase(phase);
|
|
66
67
|
// IMPORTANT: Directive markers to make instructions stand out from context
|
|
67
68
|
let workflowSection = `---
|
|
@@ -81,6 +82,11 @@ export class InstructionGenerator {
|
|
|
81
82
|
!allowedFilePatterns.includes('*')) {
|
|
82
83
|
workflowSection += `\n- Files allowed: \`${allowedFilePatterns.join('`, `')}\``;
|
|
83
84
|
}
|
|
85
|
+
// Append optional capability hint. Opt-in: empty hint ⇒ skip entirely.
|
|
86
|
+
const capabilityHint = formatCapabilityHint(requiredCapability, capabilityConfig);
|
|
87
|
+
if (capabilityHint) {
|
|
88
|
+
workflowSection += `\n\n${capabilityHint}`;
|
|
89
|
+
}
|
|
84
90
|
workflowSection += '\n\nCall `whats_next()` after user messages.';
|
|
85
91
|
return `## ${phaseName} Phase\n\n${baseInstructions}\n\n${workflowSection}`;
|
|
86
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instruction-generator.js","sourceRoot":"","sources":["../src/instruction-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"instruction-generator.js","sourceRoot":"","sources":["../src/instruction-generator.ts"],"names":[],"mappings":"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"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { ConversationContext } from '../types.js';
|
|
8
8
|
import type { YamlStateMachine } from '../state-machine-types.js';
|
|
9
|
+
import type { CapabilityConfig } from '../capability-hint.js';
|
|
9
10
|
export interface InstructionContext {
|
|
10
11
|
phase: string;
|
|
11
12
|
conversationContext: ConversationContext;
|
|
@@ -15,6 +16,19 @@ export interface InstructionContext {
|
|
|
15
16
|
instructionSource: 'proceed_to_phase' | 'whats_next' | 'start_development';
|
|
16
17
|
/** Glob patterns for files allowed to be edited in this phase (optional) */
|
|
17
18
|
allowedFilePatterns?: string[];
|
|
19
|
+
/**
|
|
20
|
+
* Optional capability hint declared on the phase (`required_capability` in
|
|
21
|
+
* the YAML state machine). When set, the instruction generator embeds a
|
|
22
|
+
* "Capability hint:" sentence into the phase instructions so the LLM picks
|
|
23
|
+
* a suitable model/agent for subagent work. Absent ⇒ no hint (opt-in).
|
|
24
|
+
*/
|
|
25
|
+
requiredCapability?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Optional model/agent routing configuration for the capability hint's
|
|
28
|
+
* subagent clause. Populated from `.vibe/config.yaml` `capability_models`
|
|
29
|
+
* when present.
|
|
30
|
+
*/
|
|
31
|
+
capabilityConfig?: CapabilityConfig;
|
|
18
32
|
}
|
|
19
33
|
export interface GeneratedInstructions {
|
|
20
34
|
instructions: string;
|
|
@@ -43,6 +43,13 @@ export interface YamlState {
|
|
|
43
43
|
* @example ["*"] // Allow all files (same as omitting)
|
|
44
44
|
*/
|
|
45
45
|
allowed_file_patterns?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* Optional capability hint for this phase.
|
|
48
|
+
* If absent, no capability routing is applied.
|
|
49
|
+
* Free-form string; conventional values are `thinking`, `research`, `coding`.
|
|
50
|
+
* See `.vibe/config.yaml` `capability_models` for optional model/agent mapping.
|
|
51
|
+
*/
|
|
52
|
+
required_capability?: string;
|
|
46
53
|
}
|
|
47
54
|
/**
|
|
48
55
|
* Complete state machine definition
|
|
@@ -25,13 +25,35 @@ export function generateSystemPrompt(stateMachine) {
|
|
|
25
25
|
function generateSimpleSystemPrompt(_stateMachine) {
|
|
26
26
|
logger.debug('Generating system prompt');
|
|
27
27
|
const systemPrompt = `
|
|
28
|
-
You are
|
|
28
|
+
You are a structured, workflow-driven agent. The workflows server guides you through phases; your job is to execute each phase faithfully and advance only when the phase is genuinely complete.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
## Core loop
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
After every user message, call \`whats_next()\`. It returns a JSON object with an \`instructions\` field. Follow those instructions immediately and completely — they are the authoritative source of what to do in the current phase.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
The response also returns a \`plan_file_path\`. That file is your persistent memory for the session. Read it at the start of each phase. Update it as directed by the instructions.
|
|
35
|
+
|
|
36
|
+
## Before acting
|
|
37
|
+
|
|
38
|
+
If the user's message is ambiguous or could be interpreted in more than one way, ask a clarifying question before calling \`whats_next()\`. State what is unclear and what you need to know. Do not silently pick an interpretation and proceed.
|
|
39
|
+
|
|
40
|
+
Once intent is clear, state your assumptions explicitly before starting work. Surface tradeoffs. If a simpler approach exists than what was asked, say so.
|
|
41
|
+
|
|
42
|
+
## Scope discipline
|
|
43
|
+
|
|
44
|
+
Do the minimum the current phase instructions require. Do not do work that belongs to a later phase. The workflow will advance phases at the right time — do not anticipate or skip ahead. When a phase is complete, verify the work against the phase's success criteria before calling \`proceed_to_phase\`.
|
|
45
|
+
|
|
46
|
+
## Subagent delegation
|
|
47
|
+
|
|
48
|
+
### Capability hints
|
|
49
|
+
When \`whats_next()\` includes a capability hint in its instructions (e.g. \`Capability hint: This phase requires thinking capability\`):
|
|
50
|
+
- If your platform supports switching to a specific model or agent, do so as indicated by the hint.
|
|
51
|
+
- Otherwise, decompose the phase work into independent, atomic, self-contained tasks and delegate each to a subagent of the indicated capability type (research, thinking, or coding). Collect and integrate results before proceeding.
|
|
52
|
+
|
|
53
|
+
### Reviews
|
|
54
|
+
When \`conduct_review\` is called and returns review perspectives, always delegate the review to a thinking-specialized subagent. Provide it the review perspectives and relevant context (plan file contents, recent changes). Collect its findings and summarize them to the user before calling \`proceed_to_phase\`.
|
|
55
|
+
|
|
56
|
+
## Task management
|
|
35
57
|
|
|
36
58
|
Do not use your own task management tools.`;
|
|
37
59
|
logger.info('System prompt generated successfully', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt-generator.js","sourceRoot":"","sources":["../src/system-prompt-generator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAC;AAErD;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,YAA8B;IACjE,MAAM,CAAC,KAAK,CAAC,wDAAwD,EAAE;QACrE,gBAAgB,EAAE,YAAY,CAAC,IAAI;QACnC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,MAAM;KACpD,CAAC,CAAC;IAEH,OAAO,0BAA0B,CAAC,YAAY,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,SAAS,0BAA0B,CAAC,aAA+B;IACjE,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAEzC,MAAM,YAAY,GAAG
|
|
1
|
+
{"version":3,"file":"system-prompt-generator.js","sourceRoot":"","sources":["../src/system-prompt-generator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAC;AAErD;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,YAA8B;IACjE,MAAM,CAAC,KAAK,CAAC,wDAAwD,EAAE;QACrE,gBAAgB,EAAE,YAAY,CAAC,IAAI;QACnC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,MAAM;KACpD,CAAC,CAAC;IAEH,OAAO,0BAA0B,CAAC,YAAY,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,SAAS,0BAA0B,CAAC,aAA+B;IACjE,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAEzC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA+BoB,CAAC;IAE1C,MAAM,CAAC,IAAI,CAAC,sCAAsC,EAAE;QAClD,YAAY,EAAE,YAAY,CAAC,MAAM;KAClC,CAAC,CAAC;IAEH,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Subagent for code generation and editing, focused on idiomatic patterns and minimal scope."
|
|
3
|
+
mode: subagent
|
|
4
|
+
model: ${model}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the `${capability}` subagent for the workflows system. Your job is to implement focused, high-quality code changes on behalf of the parent agent.
|
|
8
|
+
|
|
9
|
+
Read the file you are about to edit before changing it. Match the surrounding style: indentation, naming, import order, error-handling conventions, and test patterns. Prefer small, surgical edits over large rewrites — change as little as possible to satisfy the requirement, and leave unrelated code untouched.
|
|
10
|
+
|
|
11
|
+
Write idiomatic code for the language and framework in use. Avoid clever one-liners, speculative abstractions, or new dependencies unless they are clearly justified. When a fix could be done two ways, pick the simpler one and note the trade-off in a short comment if it matters.
|
|
12
|
+
|
|
13
|
+
Run the relevant tests and linters when you can. If a build or test fails, do not declare success — diagnose and fix the root cause rather than papering over it. Never commit, push, or modify git state unless the parent agent explicitly instructs you to.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Subagent for fast information gathering and codebase exploration."
|
|
3
|
+
mode: subagent
|
|
4
|
+
model: ${model}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the `${capability}` subagent for the workflows system. Your job is to gather information quickly and report back concisely to the parent agent.
|
|
8
|
+
|
|
9
|
+
Search the codebase, documentation, and any provided context before answering. Use the most targeted query you can — exact symbol names, file paths, or distinctive error messages — before falling back to broader patterns. When a question can be answered by reading one or two files, just read them instead of guessing.
|
|
10
|
+
|
|
11
|
+
Report findings as a tight, structured summary: the direct answer first, then supporting evidence with file paths and line numbers. Quote only the snippets that matter. Do not paraphrase code when the original is clearer.
|
|
12
|
+
|
|
13
|
+
Avoid making changes. Do not implement, refactor, or "fix while you're there" — your job is to inform the parent's decision, not to make it. If a question cannot be answered from the available context, say so plainly and suggest the next investigation step.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Subagent for deep reasoning, complex planning, and architectural trade-off analysis."
|
|
3
|
+
mode: subagent
|
|
4
|
+
model: ${model}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the `${capability}` subagent for the workflows system. Your job is to support the parent agent during phases that demand careful reasoning, planning, and architectural analysis.
|
|
8
|
+
|
|
9
|
+
Approach problems methodically. Read the relevant code, surrounding tests, and any linked design notes before forming an opinion. When a question involves trade-offs, lay out the options with their concrete consequences rather than jumping to a single answer. Distinguish clearly between observed facts, reasonable inferences, and assumptions that still need verification.
|
|
10
|
+
|
|
11
|
+
Prefer structured output: short bullet lists, named options, and explicit recommendation with rationale. Call out open questions, risks, and edge cases the parent agent should not overlook. When a decision depends on values (readability, performance, maintainability, scope) name them rather than hand-waving.
|
|
12
|
+
|
|
13
|
+
Avoid making code changes unless the parent agent explicitly asks you to. Your primary value is sharp thinking, not typing. Do not invent APIs, file paths, or version numbers — when uncertain, say so and point at where to verify.
|
|
@@ -26,10 +26,13 @@ metadata:
|
|
|
26
26
|
states:
|
|
27
27
|
reproduce:
|
|
28
28
|
description: 'Reproduce and understand the bug'
|
|
29
|
+
required_capability: 'research'
|
|
29
30
|
allowed_file_patterns:
|
|
30
31
|
- '**/*.md'
|
|
31
32
|
- '**/*.txt'
|
|
32
33
|
- '**/*.adoc'
|
|
34
|
+
- '**/*test*'
|
|
35
|
+
- '**/*spec*'
|
|
33
36
|
default_instructions: |
|
|
34
37
|
Gather specific information to reliably reproduce the reported bug:
|
|
35
38
|
- What are the exact OS, browser/runtime versions, and hardware specs?
|
|
@@ -46,6 +49,7 @@ states:
|
|
|
46
49
|
|
|
47
50
|
analyze:
|
|
48
51
|
description: 'Analyze the bug and identify root cause'
|
|
52
|
+
required_capability: 'thinking'
|
|
49
53
|
allowed_file_patterns:
|
|
50
54
|
- '**/*.md'
|
|
51
55
|
- '**/*.txt'
|
|
@@ -74,6 +78,7 @@ states:
|
|
|
74
78
|
|
|
75
79
|
fix:
|
|
76
80
|
description: 'Implement the bug fix'
|
|
81
|
+
required_capability: 'coding'
|
|
77
82
|
allowed_file_patterns:
|
|
78
83
|
- '**/*'
|
|
79
84
|
default_instructions: |
|
|
@@ -110,6 +115,7 @@ states:
|
|
|
110
115
|
|
|
111
116
|
verify:
|
|
112
117
|
description: 'Verify the fix and ensure no regressions'
|
|
118
|
+
required_capability: 'thinking'
|
|
113
119
|
allowed_file_patterns:
|
|
114
120
|
- '**/*'
|
|
115
121
|
default_instructions: Test the fix thoroughly to ensure the original bug is resolved and no new issues were introduced. Run existing tests, create new ones if needed, and verify the solution is robust.
|
|
@@ -26,6 +26,7 @@ metadata:
|
|
|
26
26
|
states:
|
|
27
27
|
explore:
|
|
28
28
|
description: 'Research and exploration phase - understanding the problem space'
|
|
29
|
+
required_capability: 'research'
|
|
29
30
|
allowed_file_patterns:
|
|
30
31
|
- '**/*.md'
|
|
31
32
|
- '**/*.txt'
|
|
@@ -48,6 +49,7 @@ states:
|
|
|
48
49
|
|
|
49
50
|
plan:
|
|
50
51
|
description: 'Planning phase - creating a detailed implementation strategy'
|
|
52
|
+
required_capability: 'thinking'
|
|
51
53
|
allowed_file_patterns:
|
|
52
54
|
- '**/*.md'
|
|
53
55
|
- '**/*.txt'
|
|
@@ -92,6 +94,7 @@ states:
|
|
|
92
94
|
|
|
93
95
|
code:
|
|
94
96
|
description: 'Implementation phase - writing and building the solution'
|
|
97
|
+
required_capability: 'coding'
|
|
95
98
|
allowed_file_patterns:
|
|
96
99
|
- '**/*'
|
|
97
100
|
default_instructions: |
|
|
@@ -27,6 +27,7 @@ metadata:
|
|
|
27
27
|
states:
|
|
28
28
|
ideation:
|
|
29
29
|
description: 'Deep requirements discovery and PRD creation phase'
|
|
30
|
+
required_capability: 'thinking'
|
|
30
31
|
allowed_file_patterns:
|
|
31
32
|
- '**/*.md'
|
|
32
33
|
- '**/*.txt'
|
|
@@ -51,6 +52,7 @@ states:
|
|
|
51
52
|
|
|
52
53
|
architecture:
|
|
53
54
|
description: 'Tech stack selection and architecture design phase'
|
|
55
|
+
required_capability: 'thinking'
|
|
54
56
|
allowed_file_patterns:
|
|
55
57
|
- '**/*.md'
|
|
56
58
|
- '**/*.txt'
|
|
@@ -130,6 +132,7 @@ states:
|
|
|
130
132
|
|
|
131
133
|
code:
|
|
132
134
|
description: 'Implementation phase following the established plan and architecture'
|
|
135
|
+
required_capability: 'coding'
|
|
133
136
|
allowed_file_patterns:
|
|
134
137
|
- '**/*'
|
|
135
138
|
default_instructions: |
|
|
@@ -57,6 +57,7 @@ states:
|
|
|
57
57
|
|
|
58
58
|
review_architecture:
|
|
59
59
|
description: 'Review whether the change is in the right place and respects existing structure'
|
|
60
|
+
required_capability: 'thinking'
|
|
60
61
|
default_instructions: |
|
|
61
62
|
Evaluate the structural decisions in the change against the confirmed intent:
|
|
62
63
|
|
|
@@ -93,6 +94,7 @@ states:
|
|
|
93
94
|
|
|
94
95
|
review_correctness:
|
|
95
96
|
description: 'Review whether the logic correctly achieves the confirmed intent'
|
|
97
|
+
required_capability: 'thinking'
|
|
96
98
|
default_instructions: |
|
|
97
99
|
Evaluate the logic of the change against the confirmed intent:
|
|
98
100
|
|
|
@@ -54,6 +54,7 @@ states:
|
|
|
54
54
|
|
|
55
55
|
research:
|
|
56
56
|
description: 'Gather facts without forming conclusions or proposing solutions'
|
|
57
|
+
required_capability: 'research'
|
|
57
58
|
allowed_file_patterns:
|
|
58
59
|
- '**/*.md'
|
|
59
60
|
- '**/*.txt'
|
|
@@ -81,6 +82,7 @@ states:
|
|
|
81
82
|
|
|
82
83
|
design:
|
|
83
84
|
description: 'Explore options and reach consensus on WHAT and high-level HOW'
|
|
85
|
+
required_capability: 'thinking'
|
|
84
86
|
allowed_file_patterns:
|
|
85
87
|
- '**/*.md'
|
|
86
88
|
- '**/*.txt'
|
|
@@ -114,6 +116,7 @@ states:
|
|
|
114
116
|
|
|
115
117
|
structure:
|
|
116
118
|
description: 'Decompose the approved design into end-to-end vertical slices'
|
|
119
|
+
required_capability: 'thinking'
|
|
117
120
|
allowed_file_patterns:
|
|
118
121
|
- '**/*.md'
|
|
119
122
|
- '**/*.txt'
|
|
@@ -143,6 +146,7 @@ states:
|
|
|
143
146
|
|
|
144
147
|
plan:
|
|
145
148
|
description: 'Create a detailed implementation plan per vertical slice'
|
|
149
|
+
required_capability: 'thinking'
|
|
146
150
|
allowed_file_patterns:
|
|
147
151
|
- '**/*.md'
|
|
148
152
|
- '**/*.txt'
|
|
@@ -182,6 +186,7 @@ states:
|
|
|
182
186
|
|
|
183
187
|
implement:
|
|
184
188
|
description: 'Build the solution slice by slice'
|
|
189
|
+
required_capability: 'coding'
|
|
185
190
|
allowed_file_patterns:
|
|
186
191
|
- '**/*'
|
|
187
192
|
default_instructions: |
|
|
@@ -26,6 +26,7 @@ metadata:
|
|
|
26
26
|
states:
|
|
27
27
|
explore:
|
|
28
28
|
description: 'Research and exploration phase - understanding the problem space and codebase'
|
|
29
|
+
required_capability: 'research'
|
|
29
30
|
allowed_file_patterns:
|
|
30
31
|
- '**/*.md'
|
|
31
32
|
- '**/*.txt'
|
|
@@ -50,6 +51,7 @@ states:
|
|
|
50
51
|
|
|
51
52
|
red:
|
|
52
53
|
description: 'RED phase - Write a failing test that defines the expected behavior'
|
|
54
|
+
required_capability: 'thinking'
|
|
53
55
|
allowed_file_patterns:
|
|
54
56
|
- '**/*'
|
|
55
57
|
default_instructions: |
|
|
@@ -87,6 +89,7 @@ states:
|
|
|
87
89
|
|
|
88
90
|
green:
|
|
89
91
|
description: 'GREEN phase - Write only the necessary code to make the test pass'
|
|
92
|
+
required_capability: 'coding'
|
|
90
93
|
allowed_file_patterns:
|
|
91
94
|
- '**/*'
|
|
92
95
|
default_instructions: |
|
|
@@ -27,6 +27,7 @@ metadata:
|
|
|
27
27
|
states:
|
|
28
28
|
requirements:
|
|
29
29
|
description: 'Gathering and analyzing requirements'
|
|
30
|
+
required_capability: 'research'
|
|
30
31
|
allowed_file_patterns:
|
|
31
32
|
- '**/*.md'
|
|
32
33
|
- '**/*.txt'
|
|
@@ -53,6 +54,7 @@ states:
|
|
|
53
54
|
|
|
54
55
|
design:
|
|
55
56
|
description: 'Technical design and architecture planning'
|
|
57
|
+
required_capability: 'thinking'
|
|
56
58
|
allowed_file_patterns:
|
|
57
59
|
- '**/*.md'
|
|
58
60
|
- '**/*.txt'
|
|
@@ -80,6 +82,7 @@ states:
|
|
|
80
82
|
|
|
81
83
|
implementation:
|
|
82
84
|
description: 'Building the solution according to design'
|
|
85
|
+
required_capability: 'coding'
|
|
83
86
|
allowed_file_patterns:
|
|
84
87
|
- '**/*'
|
|
85
88
|
default_instructions: |
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</head>
|
|
18
18
|
<body>
|
|
19
19
|
<div id="app"></div>
|
|
20
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"dev_architecture.md\":\"CvNKCNdN\",\"dev_development.md\":\"D_3UnLYh\",\"dev_logging.md\":\"ChgMzoxk\",\"dev_publishing.md\":\"9HHCKtL4\",\"index.md\":\"BqtGZhQl\",\"user_advanced-engineering.md\":\"DSy0uwWe\",\"user_agent-setup.md\":\"Cgzr8dYa\",\"user_beads-integration.md\":\"CB1VJJCp\",\"user_crowd-mcp-integration.md\":\"DPSO9u7p\",\"user_custom-workflows.md\":\"CtvQt5R0\",\"user_git-commit-feature.md\":\"IwIx6MMR\",\"user_how-it-works.md\":\"08ZFhWmJ\",\"user_long-term-memory.md\":\"Tss4q2DM\",\"user_packaged-workflows.md\":\"D8DLEuhH\",\"user_tutorial.md\":\"BTP4OqKB\",\"user_workflow-selection.md\":\"G8vSc8iy\",\"workflows.md\":\"B6jknRdS\",\"workflows_adr.md\":\"DQ73iGUh\",\"workflows_big-bang-conversion.md\":\"BgV6R1KI\",\"workflows_boundary-testing.md\":\"RwhcIDcf\",\"workflows_bugfix.md\":\"sZNWPjvx\",\"workflows_business-analysis.md\":\"C3FBbsiu\",\"workflows_c4-analysis.md\":\"MVyWuWSL\",\"workflows_epcc.md\":\"1mWsuIIR\",\"workflows_game-beginner.md\":\"J4UOyAAT\",\"workflows_greenfield.md\":\"DzJ6V7lb\",\"workflows_minor.md\":\"dYZlfSHT\",\"workflows_posts.md\":\"BrkDZjGs\",\"workflows_pr-review.md\":\"CdYxJ5Yu\",\"workflows_qrspi.md\":\"CPYiTyJ8\",\"workflows_sdd-bugfix-crowd.md\":\"BQH-LJXS\",\"workflows_sdd-bugfix.md\":\"CoPY5TS6\",\"workflows_sdd-feature-crowd.md\":\"CCj9xqan\",\"workflows_sdd-feature.md\":\"Dy8SNaX8\",\"workflows_sdd-greenfield-crowd.md\":\"_lPEQnGj\",\"workflows_sdd-greenfield.md\":\"KStU-OJS\",\"workflows_skilled-bugfix.md\":\"CvCekIa2\",\"workflows_skilled-epcc.md\":\"D7Kg_U7p\",\"workflows_skilled-greenfield.md\":\"C_R8GafG\",\"workflows_slides.md\":\"CScRnwcC\",\"workflows_tdd.md\":\"C_hC07yu\",\"workflows_waterfall.md\":\"nMkWHPRt\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Responsible Vibe MCP\",\"description\":\"Model Context Protocol server for intelligent conversation state management and development guidance\",\"base\":\"/workflows/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Documentation\",\"link\":\"/\"},{\"text\":\"Workflows\",\"link\":\"/workflows\"},{\"text\":\"Github\",\"link\":\"https://github.com/codemcp/workflows\"}],\"sidebar\":[{\"text\":\"User Guide\",\"items\":[{\"text\":\"Overview\",\"link\":\"/\"},{\"text\":\"How It Works\",\"link\":\"/user/how-it-works\"},{\"text\":\"Agent Setup\",\"link\":\"/user/agent-setup\"},{\"text\":\"Vibe Engineering\",\"link\":\"/user/advanced-engineering\"},{\"text\":\"Long-Term Memory\",\"link\":\"/user/long-term-memory\"},{\"text\":\"Beads-Integration\",\"link\":\"/user/beads-integration\"},{\"text\":\"Tutorial\",\"link\":\"/user/tutorial\"}]},{\"text\":\"Workflows\",\"items\":[{\"text\":\"Workflow-Selection\",\"link\":\"/user/workflow-selection\"},{\"text\":\"Packaged Workflows\",\"link\":\"/user/packaged-workflows\"},{\"text\":\"Custom Workflows\",\"link\":\"/user/custom-workflows\"},{\"text\":\"Explore All Workflows\",\"link\":\"/workflows\"},{\"text\":\"Crowd MCP Integration\",\"link\":\"/user/crowd-mcp-integration\"}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
|
20
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"dev_architecture.md\":\"CvNKCNdN\",\"dev_development.md\":\"D_3UnLYh\",\"dev_logging.md\":\"ChgMzoxk\",\"dev_publishing.md\":\"9HHCKtL4\",\"index.md\":\"BqtGZhQl\",\"user_advanced-engineering.md\":\"DSy0uwWe\",\"user_agent-setup.md\":\"Cgzr8dYa\",\"user_beads-integration.md\":\"CB1VJJCp\",\"user_capability-routing.md\":\"DbNKvMiS\",\"user_crowd-mcp-integration.md\":\"DPSO9u7p\",\"user_custom-workflows.md\":\"CtvQt5R0\",\"user_git-commit-feature.md\":\"IwIx6MMR\",\"user_how-it-works.md\":\"08ZFhWmJ\",\"user_long-term-memory.md\":\"Tss4q2DM\",\"user_packaged-workflows.md\":\"D8DLEuhH\",\"user_tutorial.md\":\"BTP4OqKB\",\"user_workflow-selection.md\":\"G8vSc8iy\",\"workflows.md\":\"B6jknRdS\",\"workflows_adr.md\":\"DQ73iGUh\",\"workflows_big-bang-conversion.md\":\"BgV6R1KI\",\"workflows_boundary-testing.md\":\"RwhcIDcf\",\"workflows_bugfix.md\":\"sZNWPjvx\",\"workflows_business-analysis.md\":\"C3FBbsiu\",\"workflows_c4-analysis.md\":\"MVyWuWSL\",\"workflows_epcc.md\":\"1mWsuIIR\",\"workflows_game-beginner.md\":\"J4UOyAAT\",\"workflows_greenfield.md\":\"DzJ6V7lb\",\"workflows_minor.md\":\"dYZlfSHT\",\"workflows_posts.md\":\"BrkDZjGs\",\"workflows_pr-review.md\":\"CdYxJ5Yu\",\"workflows_qrspi.md\":\"CPYiTyJ8\",\"workflows_sdd-bugfix-crowd.md\":\"BQH-LJXS\",\"workflows_sdd-bugfix.md\":\"CoPY5TS6\",\"workflows_sdd-feature-crowd.md\":\"CCj9xqan\",\"workflows_sdd-feature.md\":\"Dy8SNaX8\",\"workflows_sdd-greenfield-crowd.md\":\"_lPEQnGj\",\"workflows_sdd-greenfield.md\":\"KStU-OJS\",\"workflows_skilled-bugfix.md\":\"CvCekIa2\",\"workflows_skilled-epcc.md\":\"D7Kg_U7p\",\"workflows_skilled-greenfield.md\":\"C_R8GafG\",\"workflows_slides.md\":\"CScRnwcC\",\"workflows_tdd.md\":\"C_hC07yu\",\"workflows_waterfall.md\":\"nMkWHPRt\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Responsible Vibe MCP\",\"description\":\"Model Context Protocol server for intelligent conversation state management and development guidance\",\"base\":\"/workflows/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Documentation\",\"link\":\"/\"},{\"text\":\"Workflows\",\"link\":\"/workflows\"},{\"text\":\"Github\",\"link\":\"https://github.com/codemcp/workflows\"}],\"sidebar\":[{\"text\":\"User Guide\",\"items\":[{\"text\":\"Overview\",\"link\":\"/\"},{\"text\":\"How It Works\",\"link\":\"/user/how-it-works\"},{\"text\":\"Agent Setup\",\"link\":\"/user/agent-setup\"},{\"text\":\"Capability Routing\",\"link\":\"/user/capability-routing\"},{\"text\":\"Vibe Engineering\",\"link\":\"/user/advanced-engineering\"},{\"text\":\"Long-Term Memory\",\"link\":\"/user/long-term-memory\"},{\"text\":\"Beads-Integration\",\"link\":\"/user/beads-integration\"},{\"text\":\"Tutorial\",\"link\":\"/user/tutorial\"}]},{\"text\":\"Workflows\",\"items\":[{\"text\":\"Workflow-Selection\",\"link\":\"/user/workflow-selection\"},{\"text\":\"Packaged Workflows\",\"link\":\"/user/packaged-workflows\"},{\"text\":\"Custom Workflows\",\"link\":\"/user/custom-workflows\"},{\"text\":\"Explore All Workflows\",\"link\":\"/workflows\"},{\"text\":\"Crowd MCP Integration\",\"link\":\"/user/crowd-mcp-integration\"}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
|
21
21
|
|
|
22
22
|
</body>
|
|
23
23
|
</html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{_ as a,c as e,o as s,a0 as t}from"./chunks/framework.FdfEk_gD.js";const k=JSON.parse('{"title":"Capability Routing","description":"","frontmatter":{},"headers":[],"relativePath":"user/capability-routing.md","filePath":"user/capability-routing.md"}'),n={name:"user/capability-routing.md"};function l(o,i,h,d,p,c){return s(),e("div",null,[...i[0]||(i[0]=[t(`<h1 id="capability-routing" tabindex="-1">Capability Routing <a class="header-anchor" href="#capability-routing" aria-label="Permalink to "Capability Routing""></a></h1><p>Workflow phases can declare a <code>required_capability</code> to guide the LLM in choosing an appropriate subagent and/or model for that phase. You wire up the capability→model/agent mapping in <code>.vibe/config.yaml</code> — either by hand, or in one command via the <code>setup capabilities</code> CLI wizard.</p><p>The feature is fully opt-in. Phases that don't declare <code>required_capability</code> behave exactly as before, and a project with no <code>capability_models</code> config still gets label-only hints for any annotated phase.</p><h2 id="what-you-get" tabindex="-1">What you get <a class="header-anchor" href="#what-you-get" aria-label="Permalink to "What you get""></a></h2><p>When a phase declares <code>required_capability: thinking</code> and you have mapped it to a model in <code>.vibe/config.yaml</code>, the LLM sees an instruction like:</p><blockquote><p>Capability hint: This phase requires thinking capability (deep reasoning, complex planning). When launching subagents, use agent: thinking (model: anthropic/claude-opus-4-7).</p></blockquote><p>With no <code>capability_models</code> config, the hint reduces to:</p><blockquote><p>Capability hint: This phase requires thinking capability (deep reasoning, complex planning).</p></blockquote><p>Built-in descriptions ship for <code>thinking</code> and <code>research</code>. <code>coding</code> is self-evident (no description); any other term is echoed verbatim.</p><h2 id="declaring-capabilities-in-a-workflow" tabindex="-1">Declaring capabilities in a workflow <a class="header-anchor" href="#declaring-capabilities-in-a-workflow" aria-label="Permalink to "Declaring capabilities in a workflow""></a></h2><p>Add <code>required_capability</code> to a phase in your workflow YAML:</p><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">phases</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
2
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">name</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Architecture</span></span>
|
|
3
|
+
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> required_capability</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">thinking</span></span>
|
|
4
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> - </span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">name</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Code</span></span>
|
|
5
|
+
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> required_capability</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">coding</span></span></code></pre></div><p>Conventional values are <code>thinking</code>, <code>research</code>, <code>coding</code>, and <code>default</code>. Any other term works too.</p><h2 id="configuring-capabilities" tabindex="-1">Configuring capabilities <a class="header-anchor" href="#configuring-capabilities" aria-label="Permalink to "Configuring capabilities""></a></h2><p>Add a <code>capability_models</code> map to <code>.vibe/config.yaml</code>:</p><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">capability_models</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
6
|
+
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> thinking</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
7
|
+
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> model</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">anthropic/claude-opus-4-7</span></span>
|
|
8
|
+
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> agent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">thinking</span></span>
|
|
9
|
+
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> coding</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
10
|
+
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> model</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">anthropic/claude-sonnet-4-5</span></span>
|
|
11
|
+
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> research</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
12
|
+
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> model</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">anthropic/claude-haiku-4-5</span></span></code></pre></div><p>Each entry has two optional fields:</p><ul><li><code>model</code> — model identifier used in the hint.</li><li><code>agent</code> — subagent name the LLM should use when launching subagents.</li></ul><p>Either, neither, or both may be set per capability. Capabilities with no entry are not mentioned in the hint beyond the label.</p><h2 id="setting-up-automatically" tabindex="-1">Setting up automatically <a class="header-anchor" href="#setting-up-automatically" aria-label="Permalink to "Setting up automatically""></a></h2><p><code>npx @codemcp/workflows setup capabilities <target></code> generates both the per-target agent files and the matching <code>capability_models</code> entries in <code>.vibe/config.yaml</code> in a single command.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npx</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @codemcp/workflows</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> setup</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> capabilities</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> opencode</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
13
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model-thinking</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> anthropic/claude-opus-4-7</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
14
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model-coding</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> anthropic/claude-sonnet-4-5</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
15
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --model-research</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> anthropic/claude-haiku-4-5</span></span></code></pre></div><p>For OpenCode, the command writes <code>.opencode/agents/<capability>.md</code> for each provided capability (with <code>mode: subagent</code> and the chosen <code>model:</code>) and merges the matching entries into <code>.vibe/config.yaml</code>.</p><h3 id="flags" tabindex="-1">Flags <a class="header-anchor" href="#flags" aria-label="Permalink to "Flags""></a></h3><ul><li><code>--model-thinking <model></code> — set the model for the thinking agent</li><li><code>--model-coding <model></code> — set the model for the coding agent</li><li><code>--model-research <model></code> — set the model for the research agent</li><li><code>--force</code> — overwrite existing per-target agent files (default: skip if they exist)</li><li><code>--help</code>, <code>-h</code> — show help, including the full target list</li></ul><h3 id="targets" tabindex="-1">Targets <a class="header-anchor" href="#targets" aria-label="Permalink to "Targets""></a></h3><p>Only <code>opencode</code> is currently implemented. The wizard also knows about <code>kiro</code>, <code>claude</code>, <code>gemini</code>, <code>vscode</code>, and <code>github-copilot</code>; they are listed in <code>setup capabilities --help</code> with a ⏳ status and throw a clear "not yet supported" error if you invoke them. Adding a new target is a single class — see the <a href="https://github.com/codemcp/workflows/tree/main/packages/cli/src/capability-generator.ts" target="_blank" rel="noreferrer">CLI source</a> for the registry.</p><h2 id="annotations-in-built-in-workflows" tabindex="-1">Annotations in built-in workflows <a class="header-anchor" href="#annotations-in-built-in-workflows" aria-label="Permalink to "Annotations in built-in workflows""></a></h2><p>The seven built-in workflows ship with phase annotations out of the box:</p><ul><li><code>qrspi</code>, <code>epcc</code>, <code>greenfield</code>, <code>waterfall</code>, <code>bugfix</code>, <code>tdd</code>, <code>pr-review</code> — 23 annotated phases total</li></ul><p>You don't need to do anything to get the label-only hints; just run any built-in workflow and the annotations are picked up automatically.</p><h2 id="see-also" tabindex="-1">See also <a class="header-anchor" href="#see-also" aria-label="Permalink to "See also""></a></h2><ul><li><a href="./agent-setup.html">Agent Setup</a> — get the workflow system running in your IDE/CLI</li><li><a href="./custom-workflows.html">Custom Workflows</a> — write your own workflow YAMLs</li><li><a href="./tutorial.html">Tutorial</a> — hands-on walkthrough</li></ul>`,33)])])}const g=a(n,[["render",l]]);export{k as __pageData,g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as a,c as e,o as s,a0 as t}from"./chunks/framework.FdfEk_gD.js";const k=JSON.parse('{"title":"Capability Routing","description":"","frontmatter":{},"headers":[],"relativePath":"user/capability-routing.md","filePath":"user/capability-routing.md"}'),n={name:"user/capability-routing.md"};function l(o,i,h,d,p,c){return s(),e("div",null,[...i[0]||(i[0]=[t("",33)])])}const g=a(n,[["render",l]]);export{k as __pageData,g as default};
|