Skip to content

heymegabyte/agent-skills / 07-quality-and-verification

quality-and-verification

Unverified

5-level verification pyramid: static→unit→Playwright E2E (homepage-first, 6bp)→AI visual→post-deploy. 8-check quality gate. Multi-agent testing (functional/security/a11y/performance). Playwright v1.56+ AI agents (Planner/Generator/Healer, v1.63 current). WCAG 2.2 AA via axe-core v4.13. Percy+Chromatic visual regression. ADA Title II 2027/2028 deadlines.

FileKindSize
SKILL.mdskill md5.5 KB
accessibility-gate.mdmarkdown5.8 KB
adversarial-testing.mdmarkdown5.5 KB
agentic-security.mdmarkdown3.4 KB
audio-video-sync.mdmarkdown1.7 KB
build-breaking-rules.mdmarkdown17.0 KB
chrome-and-browser-workflows.mdmarkdown5.5 KB
completeness-verification.mdmarkdown5.3 KB
computer-use-automation.mdmarkdown6.0 KB
contract-testing.mdmarkdown4.3 KB
e2e-accumulation.mdmarkdown1.6 KB
eval-driven-development.mdmarkdown6.3 KB
evidence-collection.mdmarkdown3.7 KB
llm-evals.mdmarkdown15.7 KB
performance-optimization.mdmarkdown4.8 KB
picovoice-eagle-biometric.mdmarkdown1.6 KB
security-hardening.mdmarkdown8.7 KB
semgrep-codebase-rules.mdmarkdown4.2 KB
slop-detection.mdmarkdown4.3 KB
spec-driven-development.mdmarkdown5.0 KB
stagehand-ai-fallback.mdmarkdown1.6 KB
stagehand-ai-testing.mdmarkdown7.7 KB
tdd-verification.mdmarkdown6.7 KB
testing-matrices.mdmarkdown5.3 KB
ui-completeness-sweep.mdmarkdown6.3 KB
visual-inspection-loop.mdmarkdown14.0 KB
visual-regression.mdmarkdown7.0 KB
wcag-2-2-2026.mdmarkdown3.2 KB

audio-video-sync.md

View on GitHub
---
name: "Audio-Video Sync for Form Evidence"
description: "Merge real-time phone call audio with Playwright form submission recordings via ffmpeg. Creates synchronized evidence videos proving what was submitted during live calls."
updated: "2026-04-23"
---

# Audio-Video Sync Pattern

## Architecture

- `activeCallAudio` Map keyed by `echoId` stores live mulaw audio chunks from Twilio WebSocket
- `registerCallAudio(echoId, chunks)` called when profile with applications detected
- `unregisterCallAudio(echoId)` on stream stop
- Form automation checks map before R2 upload

## Merge Pipeline

1. Collect mulaw base64 chunks from `activeCallAudio.get(echoId)`
2. Decode base64 → Buffer, concatenate
3. Convert mulaw 8kHz → PCM 16-bit signed LE
4. Write WAV header (44 bytes: RIFF, fmt chunk, data chunk) with 8000Hz / 16-bit / mono params
5. Write WAV to temp file
6. `ffmpeg -i video.webm -i audio.wav -c:v copy -c:a libopus -shortest synced.webm`
7. Replace original video with synced version
8. Cleanup temp WAV

## Mulaw Decode

- Mulaw → PCM lookup: flip bits, extract sign/exponent/mantissa
- Compute `((mantissa << (exponent + 3)) + bias[exponent]) * (sign ? -1 : 1)`
- Bias table: `[33, 66, 132, 264, 528, 1056, 2112, 4224]`

## Error Recovery

- ffmpeg missing or fails → return original video (graceful degradation)
- WAV write fails → skip merge
- All errors logged but never block form submission
- Temp files cleaned in `finally` block

## Integration Points

- `app.js` WebSocket — push `msg.media.payload` to chunks array on every media event
- `form-automation-service.js` — call `mergeAudioWithVideo(videoPath, echoId)` after Playwright recording stops, before R2 upload
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall