fix: #1 — chore(foundation): Go skeleton, CI, and verse schema#11
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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— modulegithub.com/MiaoDX/verse-drivencmd/scripture-mcp/main.go— builds and printsscripture-mcp v0.0.0internal/{packs,schema,resolver,mcp,cli,injector}(each carries adoc.goso the package compiles and git tracks the dir)internal/schema/verse.schema.json— JSON Schema matchingplan.md§6.1internal/schema/verse.go— GoVersestruct +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 casesMakefile—build,test,lint(vet + staticcheck), plustidy,clean.github/workflows/ci.yml—go vet+staticcheck+go test ./...on push and PR.gitignoreVerification
Locally:
go buildsucceeds;./bin/scripture-mcpprintsscripture-mcp v0.0.0go vet ./...cleanstaticcheck ./...cleango test ./...passes (schema package tests)Acceptance criteria mapping
go.modinitialized atgithub.com/MiaoDX/verse-drivencmd/scripture-mcp/,internal/{packs,schema,resolver,mcp,cli,injector})cmd/scripture-mcp/main.gobuilds and printsscripture-mcp v0.0.0go vet+staticcheck+go test ./...on push and PRMakefilewithbuild,test,linttargetsinternal/schema/verse.schema.jsonmatchesplan.md§6.1internal/schema/verse.godefines the Go struct +Validate(v Verse) errorinclusion_modeandsensitivityenums enforced (extensible)Generated by Claude Code