Skip to main content
Every time you type /comet plus a sentence, Comet has to answer one question: which workflow should this request use? That decision is driven by two things: intent recognition and slot extraction. Intent recognition answers “what do you want to do”: start a new change, fix an existing bug, make a light adjustment, resume an in-progress change, or just ask a question? Slot extraction breaks your utterance and repository state into structured routing signals — action, workflow candidate, risk flags — each labeled with its source, ready for the runtime to score with a fixed priority order. Starting in 0.4.0, this mechanism (implemented as CometIntentFrame) replaces the natural-language heuristics in Skill text and makes routing explainable, reviewable, and recoverable. In our baseline tests, this also improved Comet’s recovery behavior for interrupted workflows.

Xiaoyu checks the utterance, repository state, and risk signals on a routing-context triage board before selecting the final route

Routing context turns the request and repository evidence into a decision the runtime can review.

Why routing context exists

In one sentence: routing context makes /comet routing explainable, reviewable, and recoverable instead of a black-box guess.
Before routing context, /comet relied on prose rules such as “if this is a bug, use hotfix; if this is a copy tweak, use tweak.” That created three problems:
ProblemWhat it felt like
Not explainableUsers and agents could not tell why a route was selected.
Not reviewableThere was no structured record of the signals that drove the decision.
Not recoverableAfter interruption, the agent had to read the prompt again and guess again.
Routing context turns “what the user wants” into structured data with fields, evidence, and confidence. The runtime does not blindly trust the agent’s proposed route. It rescores the context, returns the final route, and writes disagreements into diagnostics.

Route results

RouteMeaningNext SkillRequires confirmation
fullRun the full open -> design -> build -> verify -> archive workflowcomet-openNo
hotfixFix existing behavior quickly, skipping brainstormingcomet-hotfixNo
tweakUse the OpenSpec-backed medium-change pathcomet-tweakNo
resumeResume an active changeDepends on that change’s phaseNo
ask_userEvidence is insufficient or conflictingNoneYes
out_of_scopeThe user is asking a question, not starting workNoneYes
Comet asks when it cannot prove a path is safe. It does not force an uncertain request into full, hotfix, or tweak.

Intent recognition and slot extraction

The two core inputs to the routing decision are intent (intent recognition) and slots (slot extraction), together with supporting fields in CometIntentFrame — the structure the runtime scores to produce a final route:
PartPurpose
utteranceThe original user request that triggered /comet.
intentHigh-level intent and confidence.
slotsNormalized routing slots: action, workflow candidate, risk signals.
contextRepository-derived context, not text extracted from the request.
evidenceSource-labeled snippets that support key judgments.
proposed_routeThe agent’s candidate route. The runtime still reviews it.

Intent recognition (intent)

intent has two sub-fields:
  • name: intent type. start_new_change / fix_bug / make_tweak / resume_change / ask_question / unknown
  • confidence: a 0-1 score. When confidence falls below 0.7, the runtime routes directly to ask_user — it will not gamble on an ambiguous intent.

Slot extraction (slots)

SlotRouting tendency
existing_behavior: trueBug fix -> hotfix
new_capability: trueNew capability -> full
public_api_change: trueExternal contract change -> full
schema_change: trueStructured data change -> full
cross_module_change: trueCross-boundary change -> full
Risk signals take precedence over casual wording. If you ask for a hotfix but the request changes a public API, Comet stops at ask_user instead of silently allowing a risky lightweight path.

Runtime scoring order

This fixed-priority order is the core of explainable routing. Each step has a clear condition, and disagreements are written to diagnostics for later review.
  1. Low confidence -> ask_user.
  2. Multiple active changes with no target -> ask_user.
  3. Valid resume target -> resume.
  4. Question-only request -> out_of_scope.
  5. Explicit workflow conflicts with risk signals -> ask_user.
  6. Risk signals -> full.
  7. Existing bug with evidence -> hotfix.
  8. Tweak with evidence -> tweak.
  9. Not enough evidence -> ask_user.
Diagnostics record normalization, for example when an agent proposes hotfix but the runtime normalizes to full.

What this means for users

You do not write routing context by hand. /comet builds and scores it internally. Describe the work clearly, expect Comet to ask when evidence is weak, and use diagnostics to understand why a route was selected. Advanced users can route a context JSON directly:
node "$COMET_INTENT" route '{"schema_version":"comet.intent.v1", ...}'
node "$COMET_INTENT" route --stdin < frame.json

Relationship to /comet-tweak

/comet is the general entry point. It uses routing context to choose full, hotfix, tweak, resume, or a pause. /comet-tweak is the dedicated OpenSpec action path for medium changes when you already know tweak is the correct workflow.

Next steps

Last modified on July 6, 2026