{"owner":"PRQL","repo":"prql","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"skills":{"CLAUDE.md":"# Claude\n\n## Development Workflow\n\nUse a tiered testing approach—iterate quickly, validate thoroughly:\n\n**Inner loop** (during development, ~5s):\n\n```sh\n# Fast tests on core packages\ntask prqlc:test\n\n# Filtered by test name\ncargo insta test -p prqlc --lib -- resolver\ncargo insta test -p prqlc --test integration -- date\n```\n\n**Before returning to user** (~30s):\n\n```sh\n# Comprehensive prqlc tests - sufficient for most changes\ntask prqlc:pull-request\n```\n\n**Cross-binding changes only** (~2min):\n\n```sh\n# Only when changes affect JS/Python/wasm bindings\ntask test-all\n```\n\nThe test suite is configured to minimize token usage:\n\n- **Nextest** only shows failures and slow tests (not 600 PASS lines)\n- **Cargo builds** use `--quiet` flag (no compilation spam)\n- **Result**: ~52% reduction in output (1128 → 540 lines, ~4.5k tokens)\n\n## Tests\n\nPrefer inline snapshots for almost all tests:\n\n```rust\ninsta::assert_snapshot!(result, @\"expected output\");\n```\n\nInitialize tests with empty snapshots, then run with `--accept`:\n\n```rust\ninsta::assert_snapshot!(result, @\"\");\n```\n\nThe test commands above with `--accept` will fill in the result automatically.\n\n### Test Strategy\n\n**Prefer small inline `insta` snapshot tests** over full integration tests:\n\n- **Use inline tests** for most bug fixes and small features\n  - Add `#[test]` functions in a `#[cfg(test)]` module at the end of the file\n  - Use `insta::assert_snapshot!` for compact, readable test assertions\n  - Fast to run, easy to review in PRs\n\n- **Use integration tests** (`prqlc/prqlc/tests/integration/queries/*.prql`)\n  only when:\n  - Developing large, complex features that need comprehensive testing\n  - Testing end-to-end behavior across multiple compilation stages\n  - The test requires external resources or multi-file scenarios\n\nExample of a good inline test:\n\n```rust\n#[cfg(test)]\nmod test {\n    use insta::assert_snapshot;\n\n    #[test]\n    fn test_my_feature() {\n        let query = \"from employees | filter country == 'USA'\";\n        assert_snapshot!(crate::tests::compile(query).unwrap(), @\"\");\n    }\n}\n```\n\n## Running the CLI\n\nFor viewing `prqlc` output, for any stage of the compilation process:\n\n```sh\n# Compile PRQL to SQL\ncargo run -p prqlc -- compile \"from employees | filter country == 'USA'\"\n\n# Format PRQL code\ncargo run -p prqlc -- fmt \"from employees | filter country == 'USA'\"\n\n# See all available commands\ncargo run -p prqlc -- --help\n```\n\n## Linting\n\nRun all lints with\n\n```sh\ntask lint\n```\n\n## Error Handling\n\nNever panic on user input or recoverable errors. Use proper error returns:\n\n- ❌ `.unwrap()` on operations that can fail with user input\n- ✅ `?` operator or `return Err(Error::new_simple(\"message\"))`\n- ✅ `.expect(\"reason\")` or `unreachable!()` only for compiler-bug invariants\n\n## Error Messages\n\nError messages should avoid 2nd person (you/your). Use softer modal verbs like\n\"might\" for a friendlier tone:\n\n- ❌ \"are you missing `from` statement?\" → ✅ \"`from` statement might be\n  missing?\"\n- ❌ \"did you forget to specify the column name?\" → ✅ \"column name might be\n  missing?\"\n- ❌ \"you can only use X\" → ✅ \"X requires Y\" (for hard constraints)\n- ❌ \"Have you forgotten an argument?\" → ✅ \"Argument might be missing?\"\n\n## Documentation\n\nFor Claude to view crate documentation:\n\n```sh\n# Build documentation for a specific crate\ncargo doc -p prqlc\n\n# Read the generated HTML documentation with the Read tool\n# The docs are generated at target/doc/{crate_name}/index.html\nRead target/doc/prqlc/index.html\n\n# For specific module documentation\nRead target/doc/prqlc/module_name/index.html\n\n# For function documentation\nRead target/doc/prqlc/fn.compile.html\n```\n\n## Releases & Environment\n\nFor releases or environment issues, see\n`web/book/src/project/contributing/development.md`.\n"},"files":{"CLAUDE.md":"# Claude\n\n## Development Workflow\n\nUse a tiered testing approach—iterate quickly, validate thoroughly:\n\n**Inner loop** (during development, ~5s):\n\n```sh\n# Fast tests on core packages\ntask prqlc:test\n\n# Filtered by test name\ncargo insta test -p prqlc --lib -- resolver\ncargo insta test -p prqlc --test integration -- date\n```\n\n**Before returning to user** (~30s):\n\n```sh\n# Comprehensive prqlc tests - sufficient for most changes\ntask prqlc:pull-request\n```\n\n**Cross-binding changes only** (~2min):\n\n```sh\n# Only when changes affect JS/Python/wasm bindings\ntask test-all\n```\n\nThe test suite is configured to minimize token usage:\n\n- **Nextest** only shows failures and slow tests (not 600 PASS lines)\n- **Cargo builds** use `--quiet` flag (no compilation spam)\n- **Result**: ~52% reduction in output (1128 → 540 lines, ~4.5k tokens)\n\n## Tests\n\nPrefer inline snapshots for almost all tests:\n\n```rust\ninsta::assert_snapshot!(result, @\"expected output\");\n```\n\nInitialize tests with empty snapshots, then run with `--accept`:\n\n```rust\ninsta::assert_snapshot!(result, @\"\");\n```\n\nThe test commands above with `--accept` will fill in the result automatically.\n\n### Test Strategy\n\n**Prefer small inline `insta` snapshot tests** over full integration tests:\n\n- **Use inline tests** for most bug fixes and small features\n  - Add `#[test]` functions in a `#[cfg(test)]` module at the end of the file\n  - Use `insta::assert_snapshot!` for compact, readable test assertions\n  - Fast to run, easy to review in PRs\n\n- **Use integration tests** (`prqlc/prqlc/tests/integration/queries/*.prql`)\n  only when:\n  - Developing large, complex features that need comprehensive testing\n  - Testing end-to-end behavior across multiple compilation stages\n  - The test requires external resources or multi-file scenarios\n\nExample of a good inline test:\n\n```rust\n#[cfg(test)]\nmod test {\n    use insta::assert_snapshot;\n\n    #[test]\n    fn test_my_feature() {\n        let query = \"from employees | filter country == 'USA'\";\n        assert_snapshot!(crate::tests::compile(query).unwrap(), @\"\");\n    }\n}\n```\n\n## Running the CLI\n\nFor viewing `prqlc` output, for any stage of the compilation process:\n\n```sh\n# Compile PRQL to SQL\ncargo run -p prqlc -- compile \"from employees | filter country == 'USA'\"\n\n# Format PRQL code\ncargo run -p prqlc -- fmt \"from employees | filter country == 'USA'\"\n\n# See all available commands\ncargo run -p prqlc -- --help\n```\n\n## Linting\n\nRun all lints with\n\n```sh\ntask lint\n```\n\n## Error Handling\n\nNever panic on user input or recoverable errors. Use proper error returns:\n\n- ❌ `.unwrap()` on operations that can fail with user input\n- ✅ `?` operator or `return Err(Error::new_simple(\"message\"))`\n- ✅ `.expect(\"reason\")` or `unreachable!()` only for compiler-bug invariants\n\n## Error Messages\n\nError messages should avoid 2nd person (you/your). Use softer modal verbs like\n\"might\" for a friendlier tone:\n\n- ❌ \"are you missing `from` statement?\" → ✅ \"`from` statement might be\n  missing?\"\n- ❌ \"did you forget to specify the column name?\" → ✅ \"column name might be\n  missing?\"\n- ❌ \"you can only use X\" → ✅ \"X requires Y\" (for hard constraints)\n- ❌ \"Have you forgotten an argument?\" → ✅ \"Argument might be missing?\"\n\n## Documentation\n\nFor Claude to view crate documentation:\n\n```sh\n# Build documentation for a specific crate\ncargo doc -p prqlc\n\n# Read the generated HTML documentation with the Read tool\n# The docs are generated at target/doc/{crate_name}/index.html\nRead target/doc/prqlc/index.html\n\n# For specific module documentation\nRead target/doc/prqlc/module_name/index.html\n\n# For function documentation\nRead target/doc/prqlc/fn.compile.html\n```\n\n## Releases & Environment\n\nFor releases or environment issues, see\n`web/book/src/project/contributing/development.md`.\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","title":"CLAUDE.md","content":"# Claude\n\n## Development Workflow\n\nUse a tiered testing approach—iterate quickly, validate thoroughly:\n\n**Inner loop** (during development, ~5s):\n\n```sh\n# Fast tests on core packages\ntask prqlc:test\n\n# Filtered by test name\ncargo insta test -p prqlc --lib -- resolver\ncargo insta test -p prqlc --test integration -- date\n```\n\n**Before returning to user** (~30s):\n\n```sh\n# Comprehensive prqlc tests - sufficient for most changes\ntask prqlc:pull-request\n```\n\n**Cross-binding changes only** (~2min):\n\n```sh\n# Only when changes affect JS/Python/wasm bindings\ntask test-all\n```\n\nThe test suite is configured to minimize token usage:\n\n- **Nextest** only shows failures and slow tests (not 600 PASS lines)\n- **Cargo builds** use `--quiet` flag (no compilation spam)\n- **Result**: ~52% reduction in output (1128 → 540 lines, ~4.5k tokens)\n\n## Tests\n\nPrefer inline snapshots for almost all tests:\n\n```rust\ninsta::assert_snapshot!(result, @\"expected output\");\n```\n\nInitialize tests with empty snapshots, then run with `--accept`:\n\n```rust\ninsta::assert_snapshot!(result, @\"\");\n```\n\nThe test commands above with `--accept` will fill in the result automatically.\n\n### Test Strategy\n\n**Prefer small inline `insta` snapshot tests** over full integration tests:\n\n- **Use inline tests** for most bug fixes and small features\n  - Add `#[test]` functions in a `#[cfg(test)]` module at the end of the file\n  - Use `insta::assert_snapshot!` for compact, readable test assertions\n  - Fast to run, easy to review in PRs\n\n- **Use integration tests** (`prqlc/prqlc/tests/integration/queries/*.prql`)\n  only when:\n  - Developing large, complex features that need comprehensive testing\n  - Testing end-to-end behavior across multiple compilation stages\n  - The test requires external resources or multi-file scenarios\n\nExample of a good inline test:\n\n```rust\n#[cfg(test)]\nmod test {\n    use insta::assert_snapshot;\n\n    #[test]\n    fn test_my_feature() {\n        let query = \"from employees | filter country == 'USA'\";\n        assert_snapshot!(crate::tests::compile(query).unwrap(), @\"\");\n    }\n}\n```\n\n## Running the CLI\n\nFor viewing `prqlc` output, for any stage of the compilation process:\n\n```sh\n# Compile PRQL to SQL\ncargo run -p prqlc -- compile \"from employees | filter country == 'USA'\"\n\n# Format PRQL code\ncargo run -p prqlc -- fmt \"from employees | filter country == 'USA'\"\n\n# See all available commands\ncargo run -p prqlc -- --help\n```\n\n## Linting\n\nRun all lints with\n\n```sh\ntask lint\n```\n\n## Error Handling\n\nNever panic on user input or recoverable errors. Use proper error returns:\n\n- ❌ `.unwrap()` on operations that can fail with user input\n- ✅ `?` operator or `return Err(Error::new_simple(\"message\"))`\n- ✅ `.expect(\"reason\")` or `unreachable!()` only for compiler-bug invariants\n\n## Error Messages\n\nError messages should avoid 2nd person (you/your). Use softer modal verbs like\n\"might\" for a friendlier tone:\n\n- ❌ \"are you missing `from` statement?\" → ✅ \"`from` statement might be\n  missing?\"\n- ❌ \"did you forget to specify the column name?\" → ✅ \"column name might be\n  missing?\"\n- ❌ \"you can only use X\" → ✅ \"X requires Y\" (for hard constraints)\n- ❌ \"Have you forgotten an argument?\" → ✅ \"Argument might be missing?\"\n\n## Documentation\n\nFor Claude to view crate documentation:\n\n```sh\n# Build documentation for a specific crate\ncargo doc -p prqlc\n\n# Read the generated HTML documentation with the Read tool\n# The docs are generated at target/doc/{crate_name}/index.html\nRead target/doc/prqlc/index.html\n\n# For specific module documentation\nRead target/doc/prqlc/module_name/index.html\n\n# For function documentation\nRead target/doc/prqlc/fn.compile.html\n```\n\n## Releases & Environment\n\nFor releases or environment issues, see\n`web/book/src/project/contributing/development.md`.\n","category":"root","tokens":942}]}