Skip to content

Validation Scripts

Validation scripts are deterministic bash checks that replace prose checklists. Instead of asking "did you check for lint errors?", Exarchos runs a script that checks and returns a machine-readable result.

Conventions

All scripts follow the same pattern:

bash
#!/usr/bin/env bash
set -euo pipefail

# ... check logic ...

exit 0  # pass
exit 1  # fail
exit 2  # skip (precondition not met)
  • Exit 0: Check passed
  • Exit 1: Check failed
  • Exit 2: Check skipped (missing prerequisites, not applicable)

Co-located tests

Each script has a .test.sh file alongside it:

text
scripts/
  check-tdd-compliance.sh
  check-tdd-compliance.test.sh
  check-context-economy.sh
  check-context-economy.test.sh

Resolution order

Scripts resolve from two locations, checked in order:

  1. EXARCHOS_PLUGIN_ROOT/scripts/ -- plugin install (primary)
  2. ~/.claude/scripts/ -- companion installer (fallback)

Invocation

Skills invoke orchestrate actions through the MCP server as native TypeScript handlers:

typescript
exarchos_orchestrate({ action: "check_tdd_compliance", branch: "feature/my-task" })

Note: The run_script action was removed in #998. All 21 workflow scripts are now native TypeScript orchestrate actions. Remaining .sh scripts in scripts/ are companion/utility scripts not used by core workflows.

Script catalog

Key scripts used by convergence gates:

ScriptGatePurpose
check-tdd-compliance.shD1Verify test-before-code commit ordering
verify-provenance-chain.shD1Trace design requirements to implementation
check-design-completeness.shD1Verify design document sections
verify-plan-coverage.shD1Check plan tasks cover design sections
static-analysis-gate.shD2Lint and typecheck
check-context-economy.shD3Code complexity impact on context
check-operational-resilience.shD4Empty catches, swallowed errors
check-post-merge.shD4Post-merge regression check
check-workflow-determinism.shD5.only/.skip, non-deterministic code
check-task-decomposition.shD5Task decomposition quality
security-scan.shD1Security pattern scan on diff

Released under the Apache-2.0 License.