Automation workflows for Claude-Harness-Kit CI/CD pipeline.
Purpose: Validate harness consistency and completeness on every PR and push
Trigger Events:
pull_request— On PRs to main/develop branchespush— On commits to main branchworkflow_dispatch— Manual trigger via GitHub UI
Paths Trigger: Only runs when these paths are modified:
docs/**
scripts/**
AGENTS.md
CLAUDE.md
.github/workflows/harness-check.yml
Checks Performed:
- ✅ Harness exists (AGENTS.md, docs/, CLAUDE.md)
- ✅ Core documentation files (6 required docs)
- ✅ Templates structure (8 templates)
- ✅ Folder structure & README files
- ✅ Story file naming convention
- ✅ TEST_MATRIX.md content validation
- ✅ AGENTS.md & CLAUDE.md presence
- ✅ Git status check
- ✅ Story files inventory (regular + high-risk)
Output:
- ✅ GitHub Actions summary report
⚠️ Warnings for issues (non-blocking)- ❌ Errors for failures (blocking)
- 📊 Story count and TEST_MATRIX stats
Exit Codes:
0— All checks passed or warnings only1— Critical validation failed
# Via GitHub CLI
gh workflow run harness-check.yml
# Via GitHub UI
1. Go to Actions tab
2. Select "Harness Validation"
3. Click "Run workflow" → Choose branch# Watch workflow status
gh workflow view harness-check.yml --log
# List recent runs
gh run list --workflow harness-check.yml --limit 10
# View specific run details
gh run view <RUN_ID>If workflow fails:
-
Check workflow logs in GitHub UI or:
gh run view <RUN_ID> --log
-
Reproduce locally:
bash scripts/validate-harness.sh
-
Fix issues:
- Use
--fixflag for auto-corrections:bash scripts/validate-harness.sh --fix
- Commit fixes and push again
- Use
# Run harness check locally
bash scripts/validate-harness.sh
# If issues found, auto-fix
bash scripts/validate-harness.sh --fix
# Commit and push
git add docs/
git commit -m "chore: fix harness issues"
git push origin feature-branchGitHub Actions will automatically:
- Run harness validation
- Report status as check
- Block merge if critical issues found
- Add summary to PR details
Workflow is configured in .github/workflows/harness-check.yml.
Edit the on.pull_request.paths and on.push.paths sections:
on:
pull_request:
paths:
- 'docs/**' # Changed files in docs/
- 'scripts/**' # Changed files in scripts/
- 'AGENTS.md' # Harness documents
- 'CLAUDE.md'
- '.github/workflows/harness-check.yml' # This file itselfAdd new steps in the harness-validation job:
- name: Your new check
if: steps.harness_check.outputs.is_harness == 'true'
run: |
# Your validation command
bash scripts/your-check.sh- Automated Validation — No manual harness checks needed
- Early Detection — Catch issues before merge
- Consistency — Same rules for all contributors
- Audit Trail — All validations logged in GitHub
- Non-Breaking — Warnings don't block, errors do
| Issue | Solution |
|---|---|
| Workflow not triggering | Check paths—if changed files don't match paths filter, workflow won't run |
| Validation always fails | Run scripts/validate-harness.sh locally to debug |
| False positives | Check git status; uncommitted changes may cause issues |
| Need to skip check | Use skip-ci in commit message (GitHub default) |
- Harness Validator:
scripts/validate-harness.sh - Workflow Syntax: GitHub Actions Documentation
- Status Checks: PR branch protection settings
Status: ✅ Complete (Phase 3, Task #13)