Advisory Loop
The advisory loop turns CodyMaster's execution telemetry into an operator-facing recovery workflow.
What it uses
execution_analysesin.cm/context.dbfor recent task outcomesskill_metricsin.cm/context.dbfor per-skill quality signals- the legacy
cm-skill-healthadvisory consumer id for diagnosis payloads cm-skill-evolutionfor FIX / DERIVED / CAPTURED follow-through
Commands
cm advisory report
Use this to inspect recent execution analyses in a human-readable format.
Example:
bash
cm advisory report --project . --limit 10What you get:
- task title
- execution status
- recommended action
- confidence
- active skills involved in the run
cm advisory metrics
Use this to inspect aggregated per-skill metrics and current qualityWeight() output.
Example:
bash
cm advisory metrics --project . --limit 10What you get:
- skill name
- quality score
- selection/application/completion counts
- fallback count
- last recommended action
cm advisory handoff
Use this to build the structured note that self-healing skills consume.
Examples:
bash
cm advisory handoff --project . --for cm-skill-health
cm advisory handoff --project . --for cm-skill-evolution --format json
cm advisory handoff --project . --for cm-skill-evolution --analysis EA-123abc --skill cm-browseWhat it includes:
- consumer (
cm-skill-healthlegacy handoff id orcm-skill-evolution) - recommendation (
FIX,DERIVED,CAPTURED, orNONE) - confidence
- source analysis metadata
- target skill judgment
- current metric snapshot and
quality_weight - evidence summary
- suggested next step
Recommended operator flow
- Run
cm advisory reportto see the latest execution outcomes. - Run
cm advisory metricsto confirm whether the affected skill is weak or healthy over time. - Run
cm advisory handoff --for cm-skill-healthto create a diagnosis note. - If the issue is real, run
cm advisory handoff --for cm-skill-evolutionand repair the skill in exactly one mode:FIX,DERIVED, orCAPTURED. - Re-run validation and the repo test gate after any meaningful repair.
Notes
- Mandatory chain steps still remain mandatory. Advisory quality feedback only influences optional skill ranking.
--format jsonis the stable path if another agent or script needs to consume the handoff payload.- The loop is still operator-invoked. CodyMaster does not auto-mutate skills from advisory output.
MCP / JSON Surface
Agents that consume CodyMaster through MCP can now read the advisory loop directly without scraping CLI text:
cm_advisory_report— recent advisory analyses as JSONcm_advisory_metrics— aggregated skill metrics andquality_weightcm_advisory_handoff— structured recovery handoff forcm-skill-healthorcm-skill-evolution
These tools are exposed by src/mcp-context-server.ts and summarized in API Reference.