Instruction file imported from cfxdevkit/devkit-workspace-example (
.github/instructions/devkit-diagnostics.instructions.md). Copyright stays with the author.
DevKit Diagnostics — Stack and Runtime Diagnosis
Use this when the runtime context is ambiguous, stack readiness is unclear, or backend/MCP behavior seems inconsistent.
Diagnosis order
conflux_status— readNext stepfield carefullyagent_workspace_context— confirm which workspace/runtime context the agent is inlocal_stack_status— full stack readiness checkagent_runbook_executewithlocal_stack_doctor— when the issue is still unclear after step 3backend_health— narrow backend-only health checkagent_operations_recent— inspect prior failed actions before retrying
Rules
- Prefer backend-first diagnosis over compose-first diagnosis.
- Treat missing Docker/compose visibility as diagnostic context, not proof that the workspace backend is unusable.
- Do not move into deploy or DEX operations until readiness is explicit from
local_stack_status. - If a tool call returns an unexpected error, check
agent_operations_recentfor context before retrying.
Node lifecycle recovery
| Situation | Tool |
|---|---|
| Keystore locked | conflux_keystore_unlock |
| Node stopped | conflux_node_start |
| Node in bad state | conflux_node_restart |
| Persistent state corruption | conflux_node_wipe_restart (destructive — confirm first) |
When diagnosis is complete
- Confirm stack is ready with
local_stack_statusbefore proceeding to deploy or DEX operations. - If accounts are needed, verify with
conflux_accounts.