feat: specialist historical baselining — 7-day baseline + classification#34
Merged
Conversation
…ic narrative Red phase: 3 new tests assert domain specialists include Baseline step (pcp_fetch_timeseries + pcp_detect_anomalies + 7-day window), classification fields (ANOMALY/RECURRING/BASELINE), and chronic problem narrative guidance. Cross-cutting correctly excluded.
…t prompts Domain subsystems (cpu, memory, disk, network, process) now include a Baseline step that instructs the agent to fetch 7-day history and run pcp_detect_anomalies. Report guidance includes classification (ANOMALY/ RECURRING/BASELINE), baseline_context, severity_despite_baseline, and chronic problem narrative. Cross-cutting workflow unchanged.
Red phase: 5 tests assert each domain specialist's domain_knowledge contains at least one baseline-aware heuristic referencing the 7-day baseline, time-of-day patterns, or scheduled job detection.
…ledge Each domain specialist now has a 9th heuristic referencing the 7-day baseline: CPU (time-of-day saturation), Memory (leak vs working-set), Disk (scheduled job I/O), Network (drop rate variance), Process (count/context-switch patterns).
…US1) Degradation fallback was included in the Baseline step text from US1. Tests validate the contract: threshold-only fallback instruction and "insufficient baseline" limitation note are present for all domain subsystems.
Red phase: 3 tests assert cross-cutting specialist prioritises ANOMALY over RECURRING/BASELINE, flags correlated anomalies across subsystems, and notes mixed classification scenarios.
Cross-cutting domain knowledge now instructs the agent to prioritise ANOMALY over RECURRING/BASELINE, flag correlated anomalies across subsystems, and note mixed classification scenarios.
Red phase: 3 tests assert coordinator synthesis ranks ANOMALY above BASELINE/RECURRING, calls out normal behaviour, and highlights recurring pattern matches.
Synthesis phase now ranks ANOMALY > RECURRING > BASELINE (severity as secondary sort within each tier). Output structure updated from "Findings by Severity" to "Findings by Classification & Severity" with sections for New Anomalies, Recurring Patterns, Baseline Behaviour, and Normal Operation.
…sification ranking Specialist workflow diagram updated from 4-step to 5-step (Discover → Baseline → Fetch → Analyse → Report) with pcp_detect_anomalies call. Cross-cutting noted as excluded from Baseline step. Synthesis phase updated for ANOMALY > RECURRING > BASELINE ranking. Output structure now shows "Findings by Classification & Severity". Test formatting applied.
Spec, plan, tasks (all complete), research, data model, contracts, checklist, and quickstart for the specialist historical baselining feature.
Principle I now requires documentation impact review before PR merge. Plan template updated with docs gate. Aligns with Documentation Discipline section added to CLAUDE.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pcp_detect_anomaliesbefore analysisbaseline_contextandseverity_despite_baselinefields — captures "your normal is sick" scenariosinvestigation-flow.mddiagrams reflect 5-step workflow and classification rankingChanges
src/pmmcp/prompts/specialist.pysrc/pmmcp/prompts/coordinator.pytests/unit/test_prompts_specialist.pytests/unit/test_prompts_coordinator.pydocs/investigation-flow.mdTest Plan
investigation-flow.mdupdated; README unaffected (no 4-step references)