Skip to content

feat(phase-1): foundation contract — schema, exit codes, CI#10

Merged
sonpiaz merged 2 commits into
mainfrom
feat/phase-1-foundation-contract
May 19, 2026
Merged

feat(phase-1): foundation contract — schema, exit codes, CI#10
sonpiaz merged 2 commits into
mainfrom
feat/phase-1-foundation-contract

Conversation

@sonpiaz
Copy link
Copy Markdown
Owner

@sonpiaz sonpiaz commented May 19, 2026

Summary

Implements Phase 1 of the defend-the-niche plan: the versioned output schema, exit code conventions, and a CI matrix. Sub-spec docs landed in the preceding commit on this branch.

Locked pitch (paste verbatim for grep-confirmation):

Watch any social video → get an architecture diagram, working component, runnable notebook, or step-by-step cheat sheet — automatically.

Items shipped

Item Where
Sub-spec docs (output schema, exit codes) docs/output-schema.md, docs/exit-codes.md
WATCH_OUTPUT_VERSION header + EXIT trailer bin/watch (text mode)
--format json compact JSON bin/watch (json mode)
Structured exit codes across all bin/* bin/{watch,dl-video,extract-frames,transcribe,audio-q,models}
POSIX stat fix bin/transcribe, bin/audio-q
CI matrix (macOS + Ubuntu) .github/workflows/ci.yml
Schema smoke test tests/test-output-schema.sh
CI badge README.md

Test plan

  • bash -n on all 6 bin scripts — pass
  • watch --help — exit 0
  • watch --version — exit 0
  • watch with no args — exit 64
  • bash tests/test-output-schema.sh — pass
  • CI green on the matrix once pushed

Reviewer checklist

  • Sub-spec docs read top to bottom
  • JSON output validates against the schema for at least one example
  • Exit codes match the table in docs/exit-codes.md
  • No new dependencies beyond what install.sh already required
  • README CI badge renders

sonpiaz and others added 2 commits May 19, 2026 12:46
- watch text mode now emits WATCH_OUTPUT_VERSION: 1 header and EXIT: <code> trailer
- watch --format json emits compact single-line JSON per docs/output-schema.md
- All bin/ scripts refactored to use the exit code table in docs/exit-codes.md
- POSIX wc -c replaces stat -f%z / stat -c%s in transcribe and audio-q
- New .github/workflows/ci.yml matrix on macOS + Ubuntu
- tests/test-output-schema.sh covers help, version, usage-error, and JSON shape

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@sonpiaz sonpiaz merged commit 3e0e895 into main May 19, 2026
2 checks passed
@sonpiaz sonpiaz deleted the feat/phase-1-foundation-contract branch May 19, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant