squeez is licensed under Apache License 2.0 (see LICENSE).
Every contribution must be signed off under the Developer Certificate of Origin (DCO) 1.1. Signing off is a trailer in every commit:
Signed-off-by: Your Real Name <your.email@example.com>
The easy way — add -s to every commit:
git commit -s -m "your commit message"Or configure git once per clone to always sign off:
git config --local format.signoff trueThe signoff is a lightweight affirmation that you wrote (or have the right to contribute) the patch under the project's license. It's not a CLA — there's no separate document to sign, and you keep the copyright on what you contribute.
A DCO workflow check blocks any PR whose commits lack a valid Signed-off-by:
line until it's added.
- Every merge to
maintriggersrelease-please.yml, which opens or updates a "Release PR" at the top of the PR list. The PR title is alwayschore(main): release X.Y.Z. - Merging the Release PR causes release-please to tag the repo (
vX.Y.Z) and push the tag usingRELEASE_PAT. That tag push triggersrelease.yml, which builds platform binaries (macOS universal, Linux x86_64/aarch64 musl, Windows MSVC), runs smoke tests, publishes the GitHub Release, then publishes to npm and crates.io. CHANGELOG.mdis auto-managed by release-please — do not edit it by hand except through the Release PR. Sections are generated from conventional commit messages.
| Prefix | Version bump |
|---|---|
feat: |
minor |
fix: / perf: |
patch |
feat!: / fix!: / BREAKING CHANGE: in body |
major |
chore: / docs: / test: / ci: / refactor: |
no bump (no release) |
When a tag contains a prerelease identifier (e.g. v2.0.0-alpha.1, v2.0.0-beta.2, v2.0.0-rc.1), release.yml publishes to npm with --tag next instead of --tag latest. To opt into prereleases:
npm install squeez@nextTo configure release-please to generate prerelease tags, set "prerelease": true and "prerelease-type": "alpha" (or beta/rc) in release-please-config.json. Currently disabled — "prerelease": false.
By default tags are unsigned. To enable signed tags:
- Generate a key:
gpg --full-generate-key - Export the public key:
gpg --armor --export KEYID→ add to your GitHub profile under Settings → SSH and GPG keys - Add the private key to repo secrets as
RELEASE_GPG_PRIVATE_KEY - Add the passphrase to repo secrets as
RELEASE_GPG_PASSPHRASE - Configure git locally:
git config --global user.signingkey KEYID git config --global commit.gpgsign true git config --global tag.gpgSign true
- Uncomment the GPG import block inside
.github/workflows/release-please.yml(see the comments there).
- Create
src/commands/newcmd.rsimplementingHandlertrait - Write tests in
tests/test_newcmd.rs - Add a real fixture:
bash bench/capture.sh "newcmd args" > bench/fixtures/newcmd.txt - Register in
src/commands/mod.rsandsrc/filter.rs - Run:
cargo test && bash bench/run.sh - Open a PR
bash bench/capture.sh "your command" > bench/fixtures/your_command.txtThe MCP server (squeez mcp) is tested via tests/test_mcp_server.rs — these tests call handle_request() directly without a running process. To exercise the wire protocol end-to-end:
echo '{"jsonrpc":"2.0","id":1,"method":"initialize"}' | ./target/release/squeez mcpWhen adding new MCP tools, add them to:
src/commands/mcp_server.rs—handle_tools_list()andhandle_tools_call()src/commands/protocol.rs— mention inSQUEEZ_PROTOCOL(the auto-teach payload)tests/test_mcp_server.rs— at minimum atools/listcheck
Changes to src/context/ should be tested against the 16-call sliding window edge cases. Key invariants:
- Exact-hash dedup:
RECENT_WINDOW = 16,MIN_LINES = 2 - Fuzzy dedup:
MIN_LINES_FUZZY = 6, Jaccard ≥SIMILARITY_THRESHOLD = 0.85, length ratio ≥LENGTH_RATIO_GUARD = 0.80 - Adaptive intensity: Full below 80% of
budget(cfg), Ultra above. Budget =compact_threshold_tokens × 5/4 - Benign summarize:
BENIGN_MULTIPLIER = 2, threshold doubled when no error markers found