Skip to content

fix: #1 — chore(foundation): Go skeleton, CI, and verse schema#11

Merged
MiaoDX merged 1 commit into
mainfrom
claude-issue-1
May 1, 2026
Merged

fix: #1 — chore(foundation): Go skeleton, CI, and verse schema#11
MiaoDX merged 1 commit into
mainfrom
claude-issue-1

Conversation

@MiaoDX

@MiaoDX MiaoDX commented May 1, 2026

Copy link
Copy Markdown
Owner

Closes #1.

Bootstraps the Go module, package layout, CI, and the verse data schema that every pack must satisfy.

What's in this PR

  • go.mod — module github.com/MiaoDX/verse-driven
  • cmd/scripture-mcp/main.go — builds and prints scripture-mcp v0.0.0
  • Directory skeleton: internal/{packs,schema,resolver,mcp,cli,injector} (each carries a doc.go so the package compiles and git tracks the dir)
  • internal/schema/verse.schema.json — JSON Schema matching plan.md §6.1
  • internal/schema/verse.go — Go Verse struct + Validate(v Verse) error. Required fields enforced: id, tradition, lang, text, canonical_ref, source, checksum_sha256. inclusion_mode ∈ {bundled, api_only}; sensitivity ∈ {sacred_exact_quote}.
  • internal/schema/verse_test.go — happy path + every required-field omission + bad enum / format / range cases
  • Makefilebuild, test, lint (vet + staticcheck), plus tidy, clean
  • .github/workflows/ci.ymlgo vet + staticcheck + go test ./... on push and PR
  • .gitignore

Verification

Locally:

  • go build succeeds; ./bin/scripture-mcp prints scripture-mcp v0.0.0
  • go vet ./... clean
  • staticcheck ./... clean
  • go test ./... passes (schema package tests)

Acceptance criteria mapping

  • go.mod initialized at github.com/MiaoDX/verse-driven
  • Directory skeleton (cmd/scripture-mcp/, internal/{packs,schema,resolver,mcp,cli,injector})
  • cmd/scripture-mcp/main.go builds and prints scripture-mcp v0.0.0
  • GitHub Actions: go vet + staticcheck + go test ./... on push and PR
  • Makefile with build, test, lint targets
  • internal/schema/verse.schema.json matches plan.md §6.1
  • internal/schema/verse.go defines the Go struct + Validate(v Verse) error
  • Required fields enforced
  • inclusion_mode and sensitivity enums enforced (extensible)
  • Schema tests cover happy path + each required-field omission + bad enum values

Generated by Claude Code

Bootstraps the project per issue #1 and plan.md §4/§6.1:

- go.mod at module github.com/MiaoDX/verse-driven
- cmd/scripture-mcp/main.go prints "scripture-mcp v0.0.0"
- internal/{packs,schema,resolver,mcp,cli,injector} skeleton
- internal/schema: verse.schema.json + Go Verse struct + Validate()
  enforcing required fields, dotted-id format, hex checksum, and the
  inclusion_mode / sensitivity enums
- Schema tests cover happy path, every required-field omission, and
  bad enum / format values
- Makefile: build, test, lint (vet + staticcheck), tidy, clean
- GitHub Actions: vet + staticcheck + go test on push and PR

Closes #1
@MiaoDX MiaoDX marked this pull request as ready for review May 1, 2026 09:45
@MiaoDX MiaoDX merged commit 0217951 into main May 1, 2026
1 check passed
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.

chore(foundation): Go skeleton, CI, and verse schema

2 participants