diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..5050267c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,12 @@ +# GitHub collapses linguist-generated files in pull request diffs and leaves them out of the +# language statistics. Mark only output that CI proves matches its source; generated files +# whose changes are the point of a review (conformance baselines, interop/RESULTS.md) stay +# visible. + +# Woven by scripts/weave.swift from docs/src/*.src.md and README.src.md (`--check` in CI). +/docs/*.md linguist-generated=true +/README.md linguist-generated=true + +# Tests/MCPTests/Generated stays visible: no CI job reruns its generators +# (scripts/frontmatter-corpus.mjs, scripts/server-card-examples.mjs), and it holds the +# expected results the tests compare against. diff --git a/CLAUDE.md b/CLAUDE.md index 85075399..8ddf1643 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -99,7 +99,10 @@ that implement the "everything" reference client/server used by the **`Examples/`** — `HelloServer`, `HelloClient`, `HTTPServerExample` and the doc snippet targets (`*Snippets`, tests in `SnippetTests`). `docs/*.md` and `README.md` are generated from `docs/src/*.src.md` and `README.src.md` by `swift scripts/weave.swift` (`--check` in CI); -never edit the generated files. +never edit the generated files. `.gitattributes` marks them `linguist-generated` (collapsed in +PR diffs); a new generator adds its output there only when CI proves it matches its source, +while output reviewers need to see (conformance baselines, `interop/RESULTS.md`, and +`Tests/MCPTests/Generated/`) stays unmarked. **`Tests/MCPTests/`** — one test file per source area; most transport/client/server tests run against `InMemoryTransport` or `Helpers/MockTransport.swift` rather than real sockets/processes.