opencode-sample-validator
v0.5.0
Published
AWS sample validation workflow plugin for OpenCode
Downloads
762
Maintainers
Readme
opencode-sample-validator
AWS sample validation workflow plugin for OpenCode. Runs a comprehensive 9-phase validation pipeline on AWS sample projects — from deep exploration through deployment, security scanning, and final reporting.
Install
One command sets everything up:
bunx opencode-sample-validator setup --projectThis does two things:
- Adds
opencode-sample-validatorto youropencode.jsonplugin array (OpenCode auto-installs npm plugins at startup) - Copies command files to
.opencode/commands/for slash command access
Restart OpenCode after running setup.
Global install
To install globally (available in all projects):
bunx opencode-sample-validator setupCommands
| Command | Description |
|---------|-------------|
| /validation-start [path] | Start the validation workflow on a sample project |
| /validation-status | Check current phase and progress |
| /validation-stop | Stop after the current phase finishes |
| /validation-resume [path] | Resume a stopped workflow |
Validation Phases
The orchestrator runs automatically after /validation-start. Each phase creates a child session with fresh context:
- Deep Exploration - Systematic 5-phase codebase analysis
- Suitability Check - Gate validation (APPROVE/REJECT)
- Deployment Plan - Generate plan from README and exploration
- Plan Validation - Validate plan against rules, fix violations
- Execution - Step-by-step deployment with retries
- Validation Report - Compile deployment results
- Security Scan - Vulnerability scanning
- Code Quality - Best practices assessment
- Final Report - Comprehensive report aggregation
How It Works
The plugin registers tools (start_validation, validation_status, etc.) and hooks that drive the workflow. When you call /validation-start:
- Creates
.validation/sessions/<id>/reports/with astate.json - Spawns a child session for Phase 1
- Uses
session.idleevents to detect phase completion - Automatically advances through all phases
- Handles the execute phase's step loop with retries
Reports are generated in .validation/sessions/<id>/reports/:
executive-summary.md- Quick overviewfinal-report.md- Comprehensive detailssummary.json- Structured data
Plugin Architecture
| Mechanism | How it works |
|-----------|-------------|
| Tools | Registered in src/index.ts, loaded via opencode.json plugin array |
| Skills | SKILL.md files auto-discovered from the npm package |
| Commands | Copied to .opencode/commands/ by the setup script |
| Hooks | File write detection and session.idle event handling |
Development
bun install
bun run build
bun testLicense
MIT
