Test claude#15
Open
mactat wants to merge 10 commits into
Open
Conversation
Adds the todo/ folder containing one markdown card per planned work item from the README TODO list, plus an index. Also extends framed.yaml to permit .tape files (used for VHS demo recordings) in docs/. Co-Authored-By: Claude Opus 4.7 <[email protected]>
Lifts the orchestration loops out of cmd/*.go into pkg/ext, so that cmd is reduced to a thin Cobra layer that parses flags, calls into the package, renders the result, and decides the exit code. ReadConfig now has an error-returning ReadConfigE companion (the legacy os.Exit form is kept for back-compat). Verify now returns a structured VerifyReport with a list of Failures (prompt + detail) instead of printing and mutating a *bool. The dead VerifyFiles/VerifyForbiddenPatterns/VerifyAllowedPatterns helpers in system.go are deleted. Adds Go unit tests under pkg/ext covering Verify (OK + each failure mode), Create (with/without files, missing/bad template), Capture (round-trip, reporter callback, depth limit), and the decoder (defaults, missing/empty/malformed templates, nested dir paths). test/test_helper/ is gitignored so cloned bats helpers don't get committed. Implements card todo/06-move-business-logic.md. Co-Authored-By: Claude Opus 4.7 <[email protected]>
A `template:` field on any dir node now imports either a local YAML file (path relative to the importing template) or a remote URL. The referenced template's structure replaces the host dir's subtree at load time; the host dir keeps its name. Imports nest — a referenced template may itself contain further template: references. Cycle detection keys on absolute path / canonical URL via a `seen` set. Errors are surfaced explicitly for: missing files, non-2xx HTTP responses, malformed YAML, cycles, and the ambiguous case of declaring both `template:` and inline dirs/files on the same node. Adds Go unit tests for each branch (local, remote via httptest, nested, cycle, missing file, bad HTTP status, malformed YAML, hybrid rejection) plus a bats suite that exercises the CLI surface. Implements card todo/01-nested-template-imports.md. Co-Authored-By: Claude Opus 4.7 <[email protected]>
Each new example exercises at least one non-trivial rule (allowed or forbidden patterns, minCount/maxCount, allowChildren, maxDepth, nested dirs) and round-trips cleanly through framed create --files + framed verify. The existing golang.yaml had two minCount: 1 dirs with no files: list, so it never passed verify after a fresh create — fixed by declaring main.go under cmd/ and Dockerfile under dockerfiles/. Adds pkg/ext/examples_test.go that materializes and verifies every .yaml in examples/, plus a bats suite that drives the same round-trip through the CLI and a regression check that the node example's forbidden pattern actually trips on a stray .test.ts. README's "Currently available examples" list updated. Implements card todo/04-more-examples.md. Co-Authored-By: Claude Opus 4.7 <[email protected]>
Adds the docs a new contributor needs:
- CONTRIBUTING.md covers project layout, local dev (build, tests
both Go and bats), how to add fixtures, style, and the PR
checklist.
- .github/PULL_REQUEST_TEMPLATE.md prompts for summary, motivation,
testing notes, related links.
- .github/ISSUE_TEMPLATE/{bug_report,feature_request}.md prompt for
the fields reviewers always need.
- README gains a short Contributing pointer near the bottom (a fuller
rewrite is tracked in todo/07-improve-readme.md).
- pkg/ext/docs_test.go guards these files from silent deletion.
Implements card todo/03-contributing-guidelines.md.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
Reorganized the README per todo/07-improve-readme.md: - TOC near the top so readers can navigate. - Quick Start (brew + import --example + verify) immediately after the pitch, before any install detail. - Configuration is now a single field-reference table covering every YAML field, including the new template: field. The 40-line inline example is trimmed; full real-world templates live under examples/. - Three near-identical install sections collapsed into one Manual install block + OS/archive/install-path table. Brew kept as its own short section. - Usage commands consolidated into a table. - Github Action snippet no longer pins a stale version; links to the action's releases page and tells users to pin the latest. - Placeholder link-to-full-docs removed. - Long-form TODO checklist removed; replaced by a pointer to todo/ in the Contributing section. README is now 181 lines (vs ~320 before). pkg/ext/docs_test.go gains a TestReadmeAcceptanceCriteria that pins these guarantees so a future rewrite can't silently regress them. Implements card todo/07-improve-readme.md. Co-Authored-By: Claude Opus 4.7 <[email protected]>
All five open cards have shipped — flip their status from open to done and update the index. Co-Authored-By: Claude Opus 4.7 <[email protected]>
- .claude/skills/lint/SKILL.md: invokes the same checks CI runs (gofmt, go vet, golangci-lint), with notes on common gotchas like the typecheck "undefined: yaml" / "undefined: color" failures that come from cold module caches. - todo/08-ci-unit-tests.md: scopes extending .github/workflows/pr.yaml to run go test ./... on every PR, so a Go-level regression blocks merge without waiting for the bats-via-Docker round-trip. - .gitignore now scopes to .claude/settings.local.json instead of the whole .claude/ tree so project-shared skills can be committed. Co-Authored-By: Claude Opus 4.7 <[email protected]>
The pinned golangci-lint v1.53 was failing in CI with `undefined: yaml`/`undefined: color` typecheck errors because the runner's default Go toolchain mismatched the version v1.53 was built with. Pre-pin the runner Go to go.mod (1.20) via actions/setup-go and download modules before linting; v1.53 then resolves stdlib + deps cleanly. Also drops an unused `type config = Config` alias the unused linter caught once typecheck started working again. Adds the `unit` job from todo card 08: a separate "Go unit tests" status check running `go test ./... -cover` on every PR, with module cache via setup-go. Co-Authored-By: Claude Opus 4.7 <[email protected]>
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.
No description provided.