5.2 KiB
5.2 KiB
Decisions: diagnosis-playbook-skills
Discover
- Entry summary: extract high-frequency diagnosis workflows into versionable skills/playbooks and make agents load them progressively.
- Slug:
diagnosis-playbook-skills. - Scale:
standard. - Capability source: sm-flow built-in protocol for Discover;
grill-with-docsevidence-driven behavior used by reading project docs and code instead of blocking on user questions.
Context
devflow/index.mdhit related projects:diagnosis-eval-harness,expand-diagnosis-eval-fixtures,evidence-trace-hardening,aiops-alert-scope-control,session-dedup-knowledge-map,executor-action-memory-relevance.devflow/glossary/CONTEXT.mdconfirmsReactAgent,ToolCall,DiagnosisRecord, and current historical terminology; current architecture documents supersede olddiagnosis_recordas the primary model.mvp/architecture/evolution-roadmap.mddefines Skill/Playbook as P1 and requires eval-backed, fallback-capable playbooks.mvp/architecture/harness-quality-gates.mdrequires Prompt contract, Tool boundary, Trace persistence, Verifier/rule evaluation, and eval baselines to remain authoritative.mvp/eval/cases/diagnosis-cases.jsonanchors initial playbooks: payment timeout, MySQL pool exhausted, Redis timeout, slow response, JVM memory risk.
Grill Question Pool
| Dimension | Question | Mode | Resolution |
|---|---|---|---|
| Terminology | Should these artifacts be called Skill or Playbook? | evidence-driven | Use "diagnosis playbook skills": skills are the runtime mechanism, playbooks are the diagnosis workflow content. |
| Boundary | Should skills contain factual knowledge or workflow guidance? | evidence-driven | Skills contain workflow guidance; knowledge facts remain in knowledge_base/. |
| Acceptance | What proves the change works? | evidence-driven | Unit tests for catalog/tool behavior plus existing diagnosis eval compile/test stability. |
| Interface impact | Does this alter external API or DB contracts? | evidence-driven | No external API/DB change; L2 internal interface due new tool/service and agent methodTools change. |
No user-interview question is blocking because the user explicitly asked to implement the change and prior conversation already confirmed the intended direction.
Impact Analysis
GitNexus MCP tools are not exposed in this environment, so required GitNexus impact analysis could not be run. Local substitute analysis:
ChatService.createReactAgent,buildChatPlannerAgent,buildChatExecutorAgent, andbuildMethodToolsArrayare called by Chat controller paths and covered byChatServiceSequentialAgentTest/ smoke tests.AiOpsService.buildPlannerAgent,buildExecutorAgent, and privatebuildMethodToolsArrayaffectPOST /api/ai_opsviaChatController.- Risk level: medium. Prompt and tool availability changes may alter agent behavior, but no external API, DTO, DB, or status contract changes.
Specify / Commit
- Cross-artifact alignment:
- brief/proposal goal -> proposal: aligned.
- proposal scope -> design: aligned.
- design decisions -> specs/tasks: aligned.
- specs observable behavior -> tasks: aligned.
- Interface impact: L2 internal interface.
- Commit status:
.committedcreated after file integrity and consistency checks.
Pre-apply Research
- Reference code:
src/main/java/com/superbiz/agent/service/ChatService.javasrc/main/java/com/superbiz/agent/service/AiOpsService.javasrc/main/java/com/superbiz/agent/tool/LookupKnowledgeTool.javasrc/main/java/com/superbiz/agent/agent/tool/QueryLogsTools.javasrc/main/java/com/superbiz/agent/agent/tool/QueryMetricsTools.java
- Tool pattern: Spring AI Alibaba
SkillsAgentHookcontributes the officialread_skillToolCallback from hooks. - Prompt pattern:
SkillsInterceptorfrom the hook augments model requests with compact skill metadata. - Test pattern: service tests instantiate classes manually with
ReflectionTestUtils; new dependencies must be injectable or optional enough for tests. - Dependency check: local
1.1.0.0-RC2jars do not containSkillsAgentHook;1.1.2.0jars containcom.alibaba.cloud.ai.graph.agent.hook.skills.SkillsAgentHook,ReadSkillTool,SkillRegistry, andClasspathSkillRegistry.
Apply
- Capability source:
openspec-apply-changeguidance was loaded; implementation used local sm-flow/OpenSpec fallback because the work required direct file edits and the OpenSpec CLI was not needed for artifact discovery. - Implemented
src/main/resources/skills/*/SKILL.mdfor six diagnosis playbooks. - Upgraded Spring AI Alibaba BOMs to
1.1.2.0. - Implemented
SkillConfigwithClasspathSkillRegistryloadingclasspath:skills. - Wired
SkillsAgentHookinto Chat single-agent, Chat Planner/Executor, and AIOps Planner/Executor agents. - Removed custom prompt-catalog injection from active service paths; the official
SkillsInterceptornow handles skill catalog injection. - Kept Chat Verifier prompt unchanged.
- Removed the earlier local fallback
SkillCatalogServiceandReadSkillToolsource files after switching to official Alibaba skills support. - Verification command:
mvn -q "-Dtest=SkillCatalogServiceTest,ChatServiceSequentialAgentTest,AiOpsServiceTest,DiagnosisTraceEvaluatorTest" test
- Verification result: passed.