diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 248d711..6ee2b36 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -12,6 +12,7 @@ ## Checklist +- [ ] Every commit is signed off (`git commit -s`), see CONTRIBUTING.md - [ ] No personal data, real paths, hostnames or credentials in code, tests, fixtures or docs - [ ] Test fixtures use invented data only - [ ] No duplicated logic; the change respects the module boundaries in `docs/ARCHITECTURE.md` diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml new file mode 100644 index 0000000..b7537dd --- /dev/null +++ b/.github/workflows/dco.yml @@ -0,0 +1,39 @@ +name: DCO + +on: + pull_request: + types: [opened, synchronize, reopened] + +permissions: + contents: read + +jobs: + signoff: + # The repository owner holds the copyright and merges their own work, so the check + # applies to every other author. A skipped job counts as passing for branch protection. + if: github.event.pull_request.user.login != github.repository_owner + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Check Signed-off-by on every commit + env: + BASE: ${{ github.event.pull_request.base.sha }} + HEAD: ${{ github.event.pull_request.head.sha }} + run: | + set -u + missing=0 + for c in $(git rev-list --no-merges "$BASE..$HEAD"); do + if ! git show -s --format=%B "$c" | grep -Eiq '^Signed-off-by: .+ <.+@.+>[[:space:]]*$'; then + echo "Missing sign-off: $(git show -s --format='%h %s' "$c")" + missing=1 + fi + done + if [ "$missing" -ne 0 ]; then + echo + echo "Every commit needs a 'Signed-off-by: Name ' line (see CONTRIBUTING.md)." + echo "Fix with: git commit -s --amend (or: git rebase --signoff main)" + exit 1 + fi + echo "All commits are signed off." diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 49692fa..72edf45 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,13 +17,31 @@ Thanks for helping. PersonaKit is pre-release; the design is in 1. Open an issue for anything beyond a small fix, so the approach can be agreed. 2. Fork, branch from `main`, and make the change. -3. Fill in the pull request template. -4. A maintainer reviews. Every file is read for personal data and duplication before it merges. +3. Sign off every commit (see below). +4. Fill in the pull request template. +5. A maintainer reviews. Every file is read for personal data and duplication before it merges. -## License +## Sign your commits (DCO) -By contributing you agree that your contribution is licensed under the Apache License 2.0, as in -[LICENSE](LICENSE). No separate CLA is required. +This project uses the [Developer Certificate of Origin](DCO) instead of a CLA. By signing off you +certify that you wrote the contribution or have the right to submit it under Apache-2.0. + +```sh +git commit -s -m "Describe the change" +``` + +This adds a `Signed-off-by: Your Name ` line, which must match your git +`user.name` and `user.email`. To fix existing commits: `git rebase --signoff main`. +A CI check blocks pull requests from outside contributors that contain unsigned commits. +The repository owner, who holds the copyright, is exempt. + +Contributions stay under the license of the file they change (Apache-2.0). You keep your own +copyright; the project does not ask for copyright assignment. + +## License and name + +Code is licensed under the Apache License 2.0, as in [LICENSE](LICENSE). The project name and +branding are covered by [TRADEMARK.md](TRADEMARK.md). ## Conduct diff --git a/DCO b/DCO new file mode 100644 index 0000000..49b8cb0 --- /dev/null +++ b/DCO @@ -0,0 +1,34 @@ +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. diff --git a/TRADEMARK.md b/TRADEMARK.md new file mode 100644 index 0000000..5b3878c --- /dev/null +++ b/TRADEMARK.md @@ -0,0 +1,23 @@ +# Trademark policy + +The code in this repository is licensed under Apache-2.0, which does not grant rights to the +names, logos or branding of the project (Apache-2.0, section 6). + +"PersonaKit" is the name of this project and of the official releases published from this +repository. + +**You may**, without asking: + +- Say that your tool works with, is based on, or is a fork of PersonaKit, as long as it is true. +- Use the name to refer accurately to the project in docs, articles and talks. + +**Please do not**, without written permission: + +- Name a fork, product, service, domain or package "PersonaKit" or something easily confused with it. +- Suggest that a fork or service is official, endorsed by, or operated by the maintainers. +- Use the project's logo or visual identity as your own. + +If you publish a modified version, give it a different name. Questions: open an issue. + +This policy describes how the maintainers intend to use the name. It does not change the +Apache-2.0 license of the code. diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index d7a05bf..e2de8ac 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -6,8 +6,10 @@ | 0.2 | Merge same-session duplicates (reversible), weekly digest, decay to archive | day 14 | | 0.3 | Import from ChatGPT / claude.ai / Gemini exports | after launch | | 0.4 | Third-party name guard | after launch | -| 0.5 | Embedding-based retrieval | after launch | -| 0.6 | Curation in shadow mode (reports only) | after launch | Dates are estimates. Each release ships only after the contributing code has been reviewed for personal data and for duplicate logic. + +Beyond 0.4 the open-source core stays small and local-first. Ideas and contributions that fit +that scope are welcome through issues. Hosted and team offerings, if any, are separate from +this repository and are not part of this roadmap. diff --git a/personakit/retrieve.py b/personakit/retrieve.py index 80e57d7..262ce7a 100644 --- a/personakit/retrieve.py +++ b/personakit/retrieve.py @@ -4,8 +4,7 @@ to an assistant. Approved and unconfirmed memories are served (unconfirmed ones are labelled as such); restricted and archived memories are never served. -Ranking is word overlap. It is a deliberately simple baseline, to be replaced and measured -against embeddings later, not a finished retriever. +Ranking is word overlap. It is a deliberately simple baseline, not a finished retriever. """ from __future__ import annotations