stintlock 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. stintlock-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +21 -0
  2. stintlock-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +12 -0
  3. stintlock-0.1.0/.github/pull_request_template.md +18 -0
  4. stintlock-0.1.0/.github/workflows/ci.yml +53 -0
  5. stintlock-0.1.0/.github/workflows/release.yml +33 -0
  6. stintlock-0.1.0/.github/workflows/security.yml +40 -0
  7. stintlock-0.1.0/.gitignore +54 -0
  8. stintlock-0.1.0/.pre-commit-config.yaml +14 -0
  9. stintlock-0.1.0/AGENTS.md +25 -0
  10. stintlock-0.1.0/CHANGELOG.md +18 -0
  11. stintlock-0.1.0/CONTRIBUTING.md +29 -0
  12. stintlock-0.1.0/LICENSE +21 -0
  13. stintlock-0.1.0/PKG-INFO +250 -0
  14. stintlock-0.1.0/README.md +201 -0
  15. stintlock-0.1.0/SECURITY.md +13 -0
  16. stintlock-0.1.0/docs/architecture.md +46 -0
  17. stintlock-0.1.0/docs/assets/cli-workflow-screenshot.png +0 -0
  18. stintlock-0.1.0/docs/assets/demo.gif +0 -0
  19. stintlock-0.1.0/docs/assets/hero.svg +102 -0
  20. stintlock-0.1.0/docs/checkpoint-schema.md +24 -0
  21. stintlock-0.1.0/docs/competitive-analysis.md +31 -0
  22. stintlock-0.1.0/docs/decisions/0001-local-sqlite-and-git-cli.md +20 -0
  23. stintlock-0.1.0/docs/decisions/0002-evidence-classification-and-trust-boundary.md +20 -0
  24. stintlock-0.1.0/docs/mcp-integration.md +46 -0
  25. stintlock-0.1.0/docs/security.md +28 -0
  26. stintlock-0.1.0/examples/config.toml +24 -0
  27. stintlock-0.1.0/examples/handoff-example.md +62 -0
  28. stintlock-0.1.0/pyproject.toml +82 -0
  29. stintlock-0.1.0/src/stintlock/__init__.py +5 -0
  30. stintlock-0.1.0/src/stintlock/cli.py +569 -0
  31. stintlock-0.1.0/src/stintlock/config.py +156 -0
  32. stintlock-0.1.0/src/stintlock/context/__init__.py +1 -0
  33. stintlock-0.1.0/src/stintlock/context/budget.py +107 -0
  34. stintlock-0.1.0/src/stintlock/context/builder.py +232 -0
  35. stintlock-0.1.0/src/stintlock/context/redaction.py +107 -0
  36. stintlock-0.1.0/src/stintlock/core/__init__.py +1 -0
  37. stintlock-0.1.0/src/stintlock/core/checkpoint.py +146 -0
  38. stintlock-0.1.0/src/stintlock/core/demo.py +141 -0
  39. stintlock-0.1.0/src/stintlock/core/drift.py +277 -0
  40. stintlock-0.1.0/src/stintlock/core/integrity.py +136 -0
  41. stintlock-0.1.0/src/stintlock/core/verification.py +163 -0
  42. stintlock-0.1.0/src/stintlock/git/__init__.py +1 -0
  43. stintlock-0.1.0/src/stintlock/git/fingerprint.py +154 -0
  44. stintlock-0.1.0/src/stintlock/git/inspector.py +200 -0
  45. stintlock-0.1.0/src/stintlock/git/parser.py +164 -0
  46. stintlock-0.1.0/src/stintlock/integrations/__init__.py +1 -0
  47. stintlock-0.1.0/src/stintlock/integrations/agents/__init__.py +1 -0
  48. stintlock-0.1.0/src/stintlock/integrations/agents/templates.py +89 -0
  49. stintlock-0.1.0/src/stintlock/integrations/github.py +77 -0
  50. stintlock-0.1.0/src/stintlock/mcp_server.py +237 -0
  51. stintlock-0.1.0/src/stintlock/models.py +298 -0
  52. stintlock-0.1.0/src/stintlock/reporters/__init__.py +1 -0
  53. stintlock-0.1.0/src/stintlock/reporters/json.py +20 -0
  54. stintlock-0.1.0/src/stintlock/reporters/markdown.py +56 -0
  55. stintlock-0.1.0/src/stintlock/reporters/terminal.py +116 -0
  56. stintlock-0.1.0/src/stintlock/storage/__init__.py +1 -0
  57. stintlock-0.1.0/src/stintlock/storage/database.py +151 -0
  58. stintlock-0.1.0/src/stintlock/storage/repository.py +266 -0
  59. stintlock-0.1.0/tests/fixtures/synthetic_sample.json +5 -0
  60. stintlock-0.1.0/tests/integration/test_cli.py +257 -0
  61. stintlock-0.1.0/tests/integration/test_git_inspector.py +115 -0
  62. stintlock-0.1.0/tests/integration/test_mcp_server.py +153 -0
  63. stintlock-0.1.0/tests/integration/test_security_boundaries.py +138 -0
  64. stintlock-0.1.0/tests/integration/test_storage_and_capture.py +161 -0
  65. stintlock-0.1.0/tests/integration/test_verification_and_drift.py +193 -0
  66. stintlock-0.1.0/tests/unit/test_context_and_reporters.py +123 -0
  67. stintlock-0.1.0/tests/unit/test_fingerprint.py +46 -0
  68. stintlock-0.1.0/tests/unit/test_git_parser.py +54 -0
  69. stintlock-0.1.0/tests/unit/test_integrations.py +91 -0
  70. stintlock-0.1.0/tests/unit/test_models_and_integrity.py +155 -0
  71. stintlock-0.1.0/tests/unit/test_redaction.py +43 -0
  72. stintlock-0.1.0/tests/unit/test_smoke.py +7 -0
  73. stintlock-0.1.0/uv.lock +1292 -0
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a bug in StintLock
4
+ title: "fix: "
5
+ labels: bug
6
+ ---
7
+
8
+ ## Summary
9
+ Describe the unexpected behavior clearly.
10
+
11
+ ## Environment
12
+ - OS: (Windows / Linux)
13
+ - Python version:
14
+ - Git version:
15
+ - StintLock version:
16
+
17
+ ## Steps to Reproduce
18
+ 1.
19
+ 2.
20
+
21
+ ## Expected vs. Actual Behavior
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: Feature request
3
+ about: Propose a capability or improvement
4
+ title: "feat: "
5
+ labels: enhancement
6
+ ---
7
+
8
+ ## Problem Statement
9
+
10
+ ## Proposed Design
11
+
12
+ ## Security & Trust Boundary Considerations
@@ -0,0 +1,18 @@
1
+ ## Summary
2
+ Closes #
3
+
4
+ ## Architectural Decisions
5
+
6
+ ## Test Results
7
+ - `uv run ruff check .`:
8
+ - `uv run ruff format --check .`:
9
+ - `uv run pyright`:
10
+ - `uv run pytest --cov=stintlock`:
11
+
12
+ ## Security Considerations
13
+ - [ ] No `shell=True` introduced
14
+ - [ ] No arbitrary command execution from imported checkpoints
15
+ - [ ] Sensitive paths/secrets protected or redacted
16
+ - [ ] Read-only commands remain non-destructive
17
+
18
+ ## Known Limitations
@@ -0,0 +1,53 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ test:
14
+ name: ${{ matrix.os }} / Python ${{ matrix.python-version }}
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ os: [ubuntu-latest, windows-latest]
20
+ python-version: ["3.11", "3.12", "3.13"]
21
+
22
+ steps:
23
+ - name: Checkout repository
24
+ uses: actions/checkout@v4
25
+
26
+ - name: Install uv
27
+ uses: astral-sh/setup-uv@v4
28
+ with:
29
+ enable-cache: true
30
+
31
+ - name: Set up Python ${{ matrix.python-version }}
32
+ run: uv python install ${{ matrix.python-version }}
33
+
34
+ - name: Install locked dependencies
35
+ run: uv sync --locked --python ${{ matrix.python-version }}
36
+
37
+ - name: Lint with Ruff
38
+ run: uv run ruff check .
39
+
40
+ - name: Format check with Ruff
41
+ run: uv run ruff format --check .
42
+
43
+ - name: Type-check with Pyright
44
+ run: uv run pyright
45
+
46
+ - name: Run test suite with coverage
47
+ run: uv run pytest --cov=stintlock --cov-report=term-missing
48
+
49
+ - name: Build package
50
+ run: uv build
51
+
52
+ - name: Validate built distributions
53
+ run: uvx twine check dist/*
@@ -0,0 +1,33 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
12
+ jobs:
13
+ build-and-publish:
14
+ runs-on: ubuntu-latest
15
+ environment: pypi
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v4
22
+
23
+ - name: Sync locked dependencies
24
+ run: uv sync --locked
25
+
26
+ - name: Run tests before release
27
+ run: uv run pytest
28
+
29
+ - name: Build sdist and wheel
30
+ run: uv build
31
+
32
+ - name: Publish to PyPI via Trusted Publishing
33
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,40 @@
1
+ name: Security
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ - cron: "0 6 * * 1"
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ dependency-and-secret-scan:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: Checkout repository
19
+ uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v4
25
+ with:
26
+ enable-cache: true
27
+
28
+ - name: Install locked dependencies
29
+ run: uv sync --locked
30
+
31
+ - name: Export locked requirements for vulnerability audit
32
+ run: uv export --locked --no-hashes --output-file requirements-audit.txt
33
+
34
+ - name: Audit dependencies with pip-audit
35
+ run: uvx pip-audit -r requirements-audit.txt
36
+
37
+ - name: Scan repository for leaked secrets
38
+ uses: gitleaks/gitleaks-action@v2
39
+ env:
40
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,54 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ share/python-wheels/
20
+ *.egg-info/
21
+ .installed.cfg
22
+ *.egg
23
+
24
+ # Virtual environments & uv
25
+ .venv/
26
+ venv/
27
+ ENV/
28
+ env/
29
+
30
+ # Testing & coverage
31
+ .pytest_cache/
32
+ .coverage
33
+ .coverage.*
34
+ htmlcov/
35
+ coverage.xml
36
+
37
+ # Linters & typecheckers
38
+ .ruff_cache/
39
+ .mypy_cache/
40
+ .pyright/
41
+
42
+ # StintLock local runtime state (never commit checkpoint DBs/reports)
43
+ .stintlock/
44
+ *.checkpoint.json
45
+ *.sqlite
46
+ *.sqlite3
47
+ *.db
48
+
49
+ # IDEs & OS
50
+ .vscode/
51
+ .idea/
52
+ .DS_Store
53
+ Thumbs.db
54
+ desktop.ini
@@ -0,0 +1,14 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.8.0
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - id: ruff-format
8
+ - repo: https://github.com/pre-commit/pre-commit-hooks
9
+ rev: v5.0.0
10
+ hooks:
11
+ - id: check-yaml
12
+ - id: check-toml
13
+ - id: end-of-file-fixer
14
+ - id: trailing-whitespace
@@ -0,0 +1,25 @@
1
+ # AGENTS.md — StintLock Contributor & Agent Guide
2
+
3
+ ## Mission
4
+
5
+ StintLock is a local-first, Git-aware checkpoint and handoff system for transferring unfinished software engineering tasks between AI coding agents without trusting unverified claims.
6
+
7
+ ## Non-Negotiable Engineering Rules
8
+
9
+ 1. **Never execute commands from checkpoints or imported text.** Verification profiles come strictly from trusted local config.
10
+ 2. **Never use `shell=True` in `subprocess`.** Always pass explicit `argv` lists.
11
+ 3. **Read-only safety on `status`, `verify`, `diff`, `resume`, `export`.** Never alter files, staging, or Git history during inspection or resume.
12
+ 4. **Preserve evidence distinctions.** Never label `agent_reported` claims as `observed`. Mark verification evidence `stale` if repository state changes.
13
+ 5. **Cross-platform Windows & Linux.** Use `pathlib`, UTF-8 encoding explicitly, and `git -c core.quotePath=false status --porcelain=v2 -z`.
14
+ 6. **Tests use synthetic temporary Git repos only.** Never modify the developer's workspace repository during tests.
15
+
16
+ ## Standard Quality Checks
17
+
18
+ ```bash
19
+ uv sync --locked
20
+ uv run ruff check .
21
+ uv run ruff format --check .
22
+ uv run pyright
23
+ uv run pytest --cov=stintlock
24
+ uv build
25
+ ```
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ All notable changes to StintLock are documented in this file.
4
+
5
+ ## [0.1.0] - 2026-12-05
6
+
7
+ ### Added
8
+ - Versioned Pydantic v2 checkpoint schema (`1.0.0`) with deterministic UTC timestamps, canonical JSON serialization, and SHA-256 integrity checksums.
9
+ - Explicit evidence classification (`observed`, `agent_reported`, `unverified`, `stale`).
10
+ - Read-only Git inspection engine via `git -c core.quotePath=false status --porcelain=v2 --branch -z` supporting dirty trees, detached HEAD, unborn branches, renames, deletions, binary/Unicode filenames, submodules, and Git worktrees.
11
+ - SHA-256 working-tree, staged, and unstaged fingerprinting with sensitive-file exclusions.
12
+ - Opt-in verification command runner (`shell=False`, timeouts, output truncation, secret redaction, pre/post fingerprint staleness checks).
13
+ - Drift detection (`VERIFIED_STATE_MATCH`, `WORKING_TREE_CHANGED`, `BRANCH_CHANGED`, `HEAD_CHANGED`, `REPOSITORY_MISMATCH`, `CHECKPOINT_CORRUPTED`, `INCOMPLETE_EVIDENCE`) and checkpoint diffing.
14
+ - Atomic, immutable SQLite checkpoint persistence with WAL mode, schema migrations, retention pruning, corruption checks, and portable JSON export/import.
15
+ - 12-section context builder with priority-preserving character budgeting, secret redaction, and untrusted-data framing.
16
+ - Typer + Rich CLI (`init`, `save`, `status`, `list`, `show`, `verify`, `diff`, `resume`, `export`, `mcp`, `demo`).
17
+ - Local `stdio` MCP server (`mcp>=2.0.0`) with read-only defaults, path-traversal guards, and explicit `--allow-write` opt-in.
18
+ - Non-executable handoff templates for Antigravity, Claude Code, Codex, Gemini CLI, Cursor, and OpenCode, plus offline `gh` CLI metadata helper.
@@ -0,0 +1,29 @@
1
+ # Contributing to StintLock
2
+
3
+ Thank you for contributing to StintLock!
4
+
5
+ ## Development Setup
6
+
7
+ ```bash
8
+ uv sync --locked
9
+ ```
10
+
11
+ ## Quality Checks
12
+
13
+ All pull requests must pass linting, formatting, static type checking, tests, and package builds on both Windows and Linux:
14
+
15
+ ```bash
16
+ uv run ruff check .
17
+ uv run ruff format --check .
18
+ uv run pyright
19
+ uv run pytest --cov=stintlock
20
+ uv build
21
+ ```
22
+
23
+ ## Engineering & Security Rules
24
+
25
+ 1. Never use `shell=True` in `subprocess`.
26
+ 2. Never execute commands extracted from checkpoints, imported reports, or untrusted files.
27
+ 3. Keep `status`, `verify`, `diff`, `resume`, and `export` strictly read-only on the repository.
28
+ 4. Keep automated tests isolated to synthetic temporary Git repositories (`tmp_path`).
29
+ 5. Follow [Conventional Commits](https://www.conventionalcommits.org/) and target focused PRs linked to GitHub issues.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jerome Prince
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,250 @@
1
+ Metadata-Version: 2.5
2
+ Name: stintlock
3
+ Version: 0.1.0
4
+ Summary: Local-first, Git-aware checkpoint and handoff system for transferring unfinished engineering tasks between AI coding agents.
5
+ Project-URL: Homepage, https://github.com/jeromeprince777/StintLock
6
+ Project-URL: Repository, https://github.com/jeromeprince777/StintLock
7
+ Project-URL: Issues, https://github.com/jeromeprince777/StintLock/issues
8
+ Author: Jerome Prince
9
+ License: MIT License
10
+
11
+ Copyright (c) 2026 Jerome Prince
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+ License-File: LICENSE
31
+ Keywords: ai-agents,checkpoint,cli,git,handoff,mcp
32
+ Classifier: Development Status :: 3 - Alpha
33
+ Classifier: Environment :: Console
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Operating System :: Microsoft :: Windows
37
+ Classifier: Operating System :: POSIX :: Linux
38
+ Classifier: Programming Language :: Python :: 3
39
+ Classifier: Programming Language :: Python :: 3.11
40
+ Classifier: Programming Language :: Python :: 3.12
41
+ Classifier: Programming Language :: Python :: 3.13
42
+ Classifier: Topic :: Software Development :: Version Control :: Git
43
+ Requires-Python: >=3.11
44
+ Requires-Dist: mcp>=2.0.0
45
+ Requires-Dist: pydantic>=2.9.0
46
+ Requires-Dist: rich>=13.9.0
47
+ Requires-Dist: typer>=0.12.0
48
+ Description-Content-Type: text/markdown
49
+
50
+ <div align="center">
51
+
52
+ <img src="docs/assets/hero.svg" alt="StintLock — Local-first, Git-backed handoff & verification checkpoints for AI coding agents" width="100%" />
53
+
54
+ <p align="center">
55
+ <a href="https://github.com/jeromeprince777/StintLock/actions/workflows/ci.yml"><img src="https://github.com/jeromeprince777/StintLock/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
56
+ <a href="https://github.com/jeromeprince777/StintLock/actions/workflows/security.yml"><img src="https://github.com/jeromeprince777/StintLock/actions/workflows/security.yml/badge.svg" alt="Security" /></a>
57
+ <a href="https://github.com/jeromeprince777/StintLock/releases/tag/v0.1.0"><img src="https://img.shields.io/badge/release-v0.1.0-38bdf8.svg" alt="Release v0.1.0" /></a>
58
+ <img src="https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-34d399.svg" alt="Python 3.11 | 3.12 | 3.13" />
59
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-a78bfa.svg" alt="MIT License" /></a>
60
+ </p>
61
+
62
+ **Transfer unfinished software engineering tasks between AI coding agents without losing context or trusting unverified claims.**
63
+
64
+ Supports workflows across **Antigravity**, **Claude Code**, **Codex**, **Gemini CLI**, **Cursor**, and **OpenCode** — offline, local-first, and without paid API keys or cloud services.
65
+
66
+ </div>
67
+
68
+ ---
69
+
70
+ ## Live Animated Terminal Demo
71
+
72
+ <div align="center">
73
+ <img src="docs/assets/demo.gif" alt="StintLock live animated terminal demo" width="845" />
74
+ </div>
75
+
76
+ ---
77
+
78
+ ## Verified CLI Output Screenshot
79
+
80
+ Captured directly from a local end-to-end run (`stintlock status`, clean `verify`, post-edit drift detection, and read-only `resume`):
81
+
82
+ <div align="center">
83
+ <img src="docs/assets/cli-workflow-screenshot.png" alt="StintLock verified CLI workflow screenshot" width="845" />
84
+ </div>
85
+
86
+ ---
87
+
88
+ ## Why StintLock?
89
+
90
+ Existing cross-agent handoff tools typically convert raw chat transcripts or generate unverified Markdown summaries—propagating hallucinated *"all tests pass"* claims, stale context after files change, and potential secret leakage. See [docs/competitive-analysis.md](docs/competitive-analysis.md) for a full comparison against CatchUp, Agent Relay, Catalyst, and Baton.
91
+
92
+ | Guarantee | How StintLock Enforces It |
93
+ |---|---|
94
+ | **Observed vs. Claimed Separation** | Every field carries an explicit `EvidenceStatus` (`observed`, `agent_reported`, `unverified`, `stale`). Agent claims can never masquerade as `observed`. |
95
+ | **Git-Backed Fingerprinting** | Machine-readable `git -c core.quotePath=false status --porcelain=v2 --branch -z` + SHA-256 hashes across `HEAD`, index, unstaged changes, and untracked files. |
96
+ | **Stale Evidence & Drift Guard** | Emits `VERIFIED_STATE_MATCH`, `WORKING_TREE_CHANGED`, `BRANCH_CHANGED`, `HEAD_CHANGED`, `REPOSITORY_MISMATCH`, `CHECKPOINT_CORRUPTED`, and `INCOMPLETE_EVIDENCE`. |
97
+ | **Untrusted Data Boundary** | Checkpoints are portable data artifacts, never executable scripts. `verify` and `resume` never overwrite files, alter Git history, or run embedded commands. |
98
+ | **Privacy-First Local Storage** | Stores immutable records in local SQLite (`user_data` or gitignored `.stintlock/`), excludes `.env*`/keys, and redacts credentials on output. |
99
+
100
+ ---
101
+
102
+ ## Quickstart
103
+
104
+ ### Installation
105
+
106
+ ```bash
107
+ # Run or install from source
108
+ git clone https://github.com/jeromeprince777/StintLock.git
109
+ cd StintLock
110
+ uv sync --locked
111
+ uv run stintlock --version
112
+ ```
113
+
114
+ *(Once published on PyPI, install globally with `uv tool install stintlock`.)*
115
+
116
+ ### Workflow
117
+
118
+ ```bash
119
+ # 1. Initialize local config and storage for a Git repository
120
+ stintlock init
121
+
122
+ # 2. Inspect observed Git state without modifying anything
123
+ stintlock status
124
+
125
+ # 3. Save an immutable checkpoint (opt-in verification runs only commands in .stintlock/config.toml)
126
+ stintlock save \
127
+ --task "Implement token validator and expiry checks" \
128
+ --agent claude-code \
129
+ --done "Implemented validate()" \
130
+ --pending "Add expiry validation" \
131
+ --decision "Stateless validation" \
132
+ --rejected "Rejected global session cache" \
133
+ --blocker "Need clock skew tolerance config" \
134
+ --next-action "Add expiry test in tokens.py" \
135
+ --verify
136
+
137
+ # 4. Verify repository state before the receiving agent continues
138
+ stintlock verify CHECKPOINT_ID
139
+
140
+ # 5. Generate a read-only 12-section handoff formatted for the target agent
141
+ stintlock resume CHECKPOINT_ID --template codex
142
+
143
+ # 6. Export portable Markdown/JSON, diff checkpoints, or run the synthetic offline demo
144
+ stintlock diff CHECKPOINT_A CHECKPOINT_B
145
+ stintlock export CHECKPOINT_ID --format markdown
146
+ stintlock demo
147
+ ```
148
+
149
+ <details>
150
+ <summary><strong>Preview: 12-Section Handoff Report Structure &amp; Local Verification Config</strong></summary>
151
+
152
+ Every Markdown/JSON handoff includes:
153
+ 1. Current Development Objective (`agent_reported`)
154
+ 2. Acceptance Criteria (`agent_reported`)
155
+ 3. Verified Repository State (`observed` / `stale`)
156
+ 4. Relevant Changed Files (`observed`)
157
+ 5. Completed Work (`agent_reported`)
158
+ 6. Pending Tasks (`agent_reported`)
159
+ 7. Architectural Decisions (`agent_reported`)
160
+ 8. Previously Rejected Approaches (`agent_reported`)
161
+ 9. Verified Test Evidence (`observed` / `stale`)
162
+ 10. Stale or Unverified Claims (`stale` / `unverified`)
163
+ 11. Known Blockers (`agent_reported`)
164
+ 12. Recommended Next Action (`agent_reported`)
165
+
166
+ See [examples/handoff-example.md](examples/handoff-example.md) and [examples/config.toml](examples/config.toml).
167
+
168
+ </details>
169
+
170
+ ---
171
+
172
+ ## Architecture
173
+
174
+ ```mermaid
175
+ flowchart TD
176
+ CLI["CLI (Typer + Rich)"] --> Core["Core Engine (capture, verify, drift, integrity)"]
177
+ MCP["Local Stdio MCP Server"] --> Core
178
+
179
+ Core --> Git["Git Inspection Engine (porcelain=v2 -z, SHA-256)"]
180
+ Core --> Verify["Verification Runner (approved profiles only, shell=False)"]
181
+ Core --> Storage["SQLite + Immutable JSON Store"]
182
+ Core --> Context["Context Builder & Secret Redaction"]
183
+
184
+ Context --> Reporters["Markdown / JSON / Terminal / Agent Templates"]
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Evidence Classification
190
+
191
+ | Status | Meaning |
192
+ |---|---|
193
+ | `observed` | Directly observed via read-only Git CLI or executed local verification profiles |
194
+ | `agent_reported` | Claimed by the sending agent or developer (never promoted to `observed`) |
195
+ | `unverified` | Lacks corroborating observed verification evidence |
196
+ | `stale` | Observed state or test output invalidated by subsequent repository changes |
197
+
198
+ ---
199
+
200
+ ## MCP Integration (Read-Only Default)
201
+
202
+ Start the local `stdio` MCP server (`mcp>=2.0.0`, no network listener):
203
+
204
+ ```bash
205
+ # Read-only inspection tools only (recommended default)
206
+ stintlock mcp --workspace /path/to/repo
207
+
208
+ # Explicitly opt in to local checkpoint creation
209
+ stintlock mcp --workspace /path/to/repo --allow-write
210
+ ```
211
+
212
+ Exposed tools: `repository_status`, `checkpoint_list`, `checkpoint_get`, `checkpoint_verify`, `checkpoint_compare`, `checkpoint_export`, and opt-in `checkpoint_save`. See [docs/mcp-integration.md](docs/mcp-integration.md) for security boundaries and client configuration examples.
213
+
214
+ ---
215
+
216
+ ## Supported Platforms
217
+
218
+ | Platform | Python Versions | CI Status |
219
+ |---|---|---|
220
+ | Linux (`ubuntu-latest`) | 3.11, 3.12, 3.13 | Verified on GitHub Actions |
221
+ | Windows (`windows-latest`) | 3.11, 3.12, 3.13 | Verified on GitHub Actions & locally |
222
+
223
+ ---
224
+
225
+ ## Documentation
226
+
227
+ - [Architecture Overview](docs/architecture.md)
228
+ - [Competitive Analysis](docs/competitive-analysis.md)
229
+ - [Checkpoint Schema (`v1.0.0`)](docs/checkpoint-schema.md)
230
+ - [Security & Trust Model](docs/security.md)
231
+ - [MCP Integration Guide](docs/mcp-integration.md)
232
+ - [Architecture Decision Records](docs/decisions/0001-local-sqlite-and-git-cli.md)
233
+ - [Contributing Guide](CONTRIBUTING.md) · [Security Policy](SECURITY.md) · [Changelog](CHANGELOG.md)
234
+
235
+ ## Known Limitations
236
+
237
+ - **Pattern-Based Redaction:** Regex redaction catches common token prefixes, private key blocks, and credential assignments, but cannot guarantee 100% detection of custom or obfuscated secrets.
238
+ - **Integrity vs. Authenticity:** SHA-256 checksums detect accidental corruption and drift, not malicious local tampering by a process with write access to the SQLite database.
239
+ - **Character Budgeting:** Context size limits use character and UTF-8 byte counts rather than model-specific tokenizers.
240
+ - **Client Compatibility:** Target agent templates (`antigravity`, `claude-code`, `codex`, `gemini-cli`, `cursor`, `opencode`) and MCP snippets are non-executable formatters/examples; verify client-specific MCP registration against your installed client version.
241
+
242
+ ## Good First Issues
243
+
244
+ - Add configurable custom redaction regexes in `.stintlock/config.toml`.
245
+ - Add optional `tiktoken` byte/token estimation behind an optional extra.
246
+ - Add interactive Textual TUI checkpoint browser (`stintlock browse`).
247
+
248
+ ## License
249
+
250
+ MIT License — see [LICENSE](LICENSE).