AGENT SKILL

validation-diagnostics

Validation and diagnostic skill for HASTE. Compare planned vs implemented work, generate diagnostic reports, and feed misses back into skill refinement. Use when: 'validate implementation', 'compare to spec', 'diagnostic report', 'drift analysis', 'coverage check', 'implementation review'.

License 许可
MIT
所属仓库
microsoft/haste
最近更新
2026-11-13
Stars
★ 110
Forks
19

01 前言 Front Matter

name
validation-diagnostics
level
intermediate
agents
[ "backend-validation", "ui-validation", "security-validation", "orchestrator" ]
domain
quality
source
HASTE validation practices
status
draft
description
Validation and diagnostic skill for HASTE. Compare planned vs implemented work, generate diagnostic reports, and feed misses back into skill refinement. Use when: 'validate implementation', 'compare to spec', 'diagnostic report', 'drift analysis', 'coverage check', 'implementation review'.
created_date
2026-04-27
validated_by
last_validated

03 SKILL.md 正文

Validation & Diagnostics

Overview

Structured process for comparing planned vs implemented work, generating diagnostic reports, and identifying gaps. Used by validation agents to provide concrete, evidence-based assessments.

Key Concepts

The Trust Problem

Agents will claim work is complete when it isn't. Validation must be:

  • Observable — Based on test output, not agent claims
  • Deterministic — Same input produces same verdict
  • Evidence-based — Every finding references concrete code or test results
  • Structured — Consistent format for easy human review

Patterns & Techniques

Planned vs Implemented Comparison

Step 1: Extract planned items From the spec, issue, or plan, extract a checklist of:

  • Acceptance criteria
  • Required endpoints/functions
  • Expected model fields
  • Required test coverage
  • UI components specified

Step 2: Verify each item For each planned item, check:

  • Does the code exist? (file search, grep)
  • Does it match the specification? (read and compare)
  • Is it tested? (find corresponding test)
  • Does the test pass? (run and capture output)

Step 3: Generate drift report

## Drift Analysis: [Feature]

| Planned Item | Status | Evidence |
|-------------|--------|----------|
| [spec item] | ✅ Implemented | [file:line] |
| [spec item] | ⚠️ Partial | [what's missing] |
| [spec item] | ❌ Not found | [searched in...] |
| [unplanned] | ⚡ Scope creep | [file:line] |

Diagnostic Report Template

## Diagnostic Report: [Component/Feature]

### Summary
[1-2 sentence verdict]

### Test Results

[Actual test output — copy/paste, not paraphrased]


### Code Quality
| Metric | Result |
|--------|--------|
| Type hints present | ✅ / ❌ |
| Pydantic models used | ✅ / ❌ |
| Config class used (no hardcoded secrets) | ✅ / ❌ |
| Error handling present | ✅ / ❌ |
| Logger used (not print) | ✅ / ❌ |

### Findings
| # | Severity | Finding | Location | Recommendation |
|---|----------|---------|----------|----------------|
| 1 | [High/Med/Low] | [what] | [file:line] | [fix] |

### Coverage Gaps
[Code paths without tests]

### Verdict
✅ PASS | ⚠️ CONDITIONAL PASS | ❌ FAIL
[Explanation with evidence]

HASTE-Specific Validation Checks

Component Must Verify
New API endpoint Auth level, Pydantic validation, error codes, CORS
New processor Config injection, logger usage, error handling
New data model Pydantic BaseModel, field types, validation rules
New data layer Abstract interface compliance, connection handling
New UI component FluentUI usage, no alt frameworks, responsive
Geospatial code CRS preservation, COG compliance, GDAL/rasterio usage

Feedback Loop

When validation reveals a miss:

  1. Document the miss in the diagnostic report
  2. Identify the pattern (was it a convention violation? missing test? spec ambiguity?)
  3. Propose a skill update or instruction addition to prevent recurrence
  4. Flag to the Orchestrator for tracking

Decision Framework

Validation Result Action
All checks pass, tests green ✅ Approve
Minor issues, tests pass ⚠️ Conditional — list issues for human review
Tests fail ❌ Block — must fix before proceeding
Scope creep detected ⚠️ Flag — human decides if extra work is acceptable
Spec ambiguity found ⚠️ Flag — needs clarification before validation

Common Pitfalls

  • Accepting "tests passed" without seeing output — Always run and capture
  • Validating only happy path — Check error handling and edge cases
  • Skipping convention checks — HASTE has specific patterns that must be followed
  • Not checking for scope creep — Extra changes can introduce regressions

04 同仓库更多 Skills

microsoft
microsoft/haste

security-analysis

Dependabot and security analysis skill for HASTE. Parse alerts, group related vulnerabilities, apply severity rules, and produce structured reports. Use when: 'Dependabot alert', 'security scan', 'vulnerability triage', 'dependency audit', 'npm audit', 'pip audit', 'CVE analysis'.

★ 110
microsoft
microsoft/haste

release-notes

Generate release notes from commit history. Use when asked to draft release notes, create a changelog, or summarize changes for a release.

★ 110
microsoft
microsoft/haste

imagery-provider-adaptation

Imagery provider adaptation skill for HASTE. Encapsulates provider-specific logic for satellite imagery sources (Planet, Vantor, Airbus, etc.). Use when: 'new imagery provider', 'add source type', 'satellite provider', 'Planet', 'Vantor', 'Airbus', 'Pleiades', 'WorldView', 'SkySat', 'imagery ingestion', 'provider adapter'.

★ 110
microsoft
microsoft/haste

deterministic-scripts

Deterministic script execution skill for HASTE. Execute scripts instead of free-form LLM behavior for consistent, repeatable operations. Use when: 'run preprocessing', 'convert format', 'parse metadata', 'generate tiles', 'build wheel', 'deploy functions'. Prevents hallucinated scripts.

★ 110
microsoft
microsoft/haste

dependency-update

Guide for safely updating project dependencies. Use when asked to update packages, upgrade dependencies, or check for outdated libraries.

★ 110
microsoft
microsoft/haste

debug-test-failures

Systematic debugging workflow for test failures. Use when tests are failing, a CI build is red, or when asked to debug test issues.

开发工程师测试与质量
★ 110