Files
Dragan Spiridonov 99511738c1 feat(v3.4.2): add skill validation system with trust tiers (ADR-056) (#221)
* fix(v3.4.1): bundle missing dependencies and test timeouts

- Fixed issue #219: MCP bundle failing due to missing packages
- Changed build scripts from --packages=external to selective externalization
- Pure JS deps (fast-json-patch, jose, uuid) now bundled inline
- Native modules properly externalized (better-sqlite3, hnswlib-node, etc.)
- CommonJS modules with dynamic requires externalized (typescript, fast-glob, yaml, commander, cli-progress, ora)
- Bundle size reduced from ~15MB to ~5MB
- Added timeouts to handleQualityAssess tests to prevent CI failures
- Updated version to 3.4.1

Closes #219

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(v3.4.2): add skill validation system with trust tiers (ADR-056)

Implement 4-layer skill validation system for deterministic outputs:
- Tier 3 (Verified): 46 skills with full eval test suites
- Tier 2 (Validated): 7 skills with executable validators
- Tier 1 (Structured): 5 skills with JSON output schemas
- Tier 0 (Advisory): 5 skills with SKILL.md guidance only

Key additions:
- JSON Schema validation templates for skill outputs
- Executable validator scripts for correctness verification
- Evaluation test framework with multi-model support
- CLI commands: aqe skill report/summary/compare, aqe eval run/status
- ReasoningBank integration for validation pattern learning
- GitHub Actions workflow for CI skill validation
- Trust tier frontmatter in all 63 skill SKILL.md files
- Comprehensive documentation and user guides

Infrastructure:
- .claude/skills/.validation/ - Templates and frameworks
- .claude/skills/*/schemas/ - Output schemas per skill
- .claude/skills/*/scripts/ - Validator scripts per skill
- .claude/skills/*/evals/ - Test cases per skill

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(ci): trust tier-based skill validation

- Tier 3 (Verified): Blocks PR on validation failure
- Tier 2 (Validated): Warns only, doesn't block
- Tier 1 (Structured): Warns only, doesn't block
- Tier 0 (Advisory): Skipped entirely

Reads trust_tier from SKILL.md frontmatter to determine
validation requirements. Only 46 Tier 3 skills block merge.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(validators): remove local keyword from self-test blocks

Shell script fix: 'local' can only be used inside functions, not in
if/else blocks. Both accessibility-testing and compatibility-testing
validators had 'local' declarations in their self-test sections that
caused errors when run outside of a function context.

- Remove local test_file from accessibility-testing self-test
- Remove local test_file, browser_count, tier1_pass from compatibility-testing self-test
- Sync fixes to v3/assets/skills/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(validators): add --self-test support to n8n skill validators

The 5 n8n skill validators were failing CI because they didn't handle
the --self-test flag properly. Added self-test handling that:
- Checks for required tools (jq)
- Verifies schema file exists and is valid JSON
- Returns exit 0 on success

Fixed validators:
- n8n-expression-testing
- n8n-integration-testing-patterns
- n8n-security-testing
- n8n-trigger-testing-strategies
- n8n-workflow-testing-fundamentals

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 12:51:51 +01:00

146 lines
4.5 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://agentic-qe.dev/schemas/skill-output-template.json",
"title": "AQE Skill Output Template Schema",
"description": "Simplified template schema for skill output validation. Use for self-testing validators.",
"type": "object",
"required": ["skillName", "version", "timestamp", "status", "output"],
"properties": {
"skillName": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$",
"minLength": 2,
"maxLength": 64,
"description": "Name of the skill that produced this output"
},
"version": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9]+)?$",
"description": "Semantic version of the skill"
},
"timestamp": {
"type": "string",
"description": "ISO 8601 timestamp of output generation"
},
"status": {
"type": "string",
"enum": ["success", "partial", "failed", "skipped"],
"description": "Overall execution status"
},
"trustTier": {
"type": "integer",
"minimum": 0,
"maximum": 3,
"description": "Trust tier (0-3)"
},
"output": {
"type": "object",
"description": "Skill-specific output data",
"properties": {
"summary": {
"type": "string",
"description": "Human-readable summary"
},
"findings": {
"type": "array",
"items": {
"type": "object",
"required": ["id", "title", "severity"],
"properties": {
"id": { "type": "string" },
"title": { "type": "string" },
"description": { "type": "string" },
"severity": {
"type": "string",
"enum": ["critical", "high", "medium", "low", "info"]
},
"category": { "type": "string" },
"location": {
"type": "object",
"properties": {
"file": { "type": "string" },
"line": { "type": "integer" }
}
},
"evidence": { "type": "string" }
}
},
"description": "List of findings"
},
"recommendations": {
"type": "array",
"items": {
"type": "object",
"required": ["id", "title", "priority"],
"properties": {
"id": { "type": "string" },
"title": { "type": "string" },
"description": { "type": "string" },
"priority": {
"type": "string",
"enum": ["critical", "high", "medium", "low"]
},
"effort": {
"type": "string",
"enum": ["low", "medium", "high"]
},
"relatedFindings": {
"type": "array",
"items": { "type": "string" }
}
}
},
"description": "Recommendations"
},
"metrics": {
"type": "object",
"description": "Quantitative metrics"
},
"artifacts": {
"type": "array",
"items": {
"type": "object",
"required": ["type", "path"],
"properties": {
"type": {
"type": "string",
"enum": ["report", "test", "config", "data", "log"]
},
"path": { "type": "string" },
"format": { "type": "string" },
"description": { "type": "string" }
}
},
"description": "Generated artifacts"
}
}
},
"metadata": {
"type": "object",
"properties": {
"executionTimeMs": { "type": "integer", "minimum": 0 },
"toolsUsed": {
"type": "array",
"items": { "type": "string" }
},
"agentId": { "type": "string" },
"modelUsed": { "type": "string" },
"inputHash": { "type": "string" },
"parentTaskId": { "type": "string" }
}
},
"validation": {
"type": "object",
"properties": {
"schemaValid": { "type": "boolean" },
"contentValid": { "type": "boolean" },
"confidence": { "type": "number", "minimum": 0, "maximum": 1 },
"warnings": {
"type": "array",
"items": { "type": "string" }
}
}
}
}
}