Metadata-Version: 2.5
Name: stintlock
Version: 0.1.0
Summary: Local-first, Git-aware checkpoint and handoff system for transferring unfinished engineering tasks between AI coding agents.
Project-URL: Homepage, https://github.com/jeromeprince777/StintLock
Project-URL: Repository, https://github.com/jeromeprince777/StintLock
Project-URL: Issues, https://github.com/jeromeprince777/StintLock/issues
Author: Jerome Prince
License: MIT License
        
        Copyright (c) 2026 Jerome Prince
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: ai-agents,checkpoint,cli,git,handoff,mcp
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.11
Requires-Dist: mcp>=2.0.0
Requires-Dist: pydantic>=2.9.0
Requires-Dist: rich>=13.9.0
Requires-Dist: typer>=0.12.0
Description-Content-Type: text/markdown

<div align="center">

<img src="docs/assets/hero.svg" alt="StintLock — Local-first, Git-backed handoff & verification checkpoints for AI coding agents" width="100%" />

<p align="center">
  <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>
  <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>
  <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>
  <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" />
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-a78bfa.svg" alt="MIT License" /></a>
</p>

**Transfer unfinished software engineering tasks between AI coding agents without losing context or trusting unverified claims.**

Supports workflows across **Antigravity**, **Claude Code**, **Codex**, **Gemini CLI**, **Cursor**, and **OpenCode** — offline, local-first, and without paid API keys or cloud services.

</div>

---

## Live Animated Terminal Demo

<div align="center">
  <img src="docs/assets/demo.gif" alt="StintLock live animated terminal demo" width="845" />
</div>

---

## Verified CLI Output Screenshot

Captured directly from a local end-to-end run (`stintlock status`, clean `verify`, post-edit drift detection, and read-only `resume`):

<div align="center">
  <img src="docs/assets/cli-workflow-screenshot.png" alt="StintLock verified CLI workflow screenshot" width="845" />
</div>

---

## Why StintLock?

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.

| Guarantee | How StintLock Enforces It |
|---|---|
| **Observed vs. Claimed Separation** | Every field carries an explicit `EvidenceStatus` (`observed`, `agent_reported`, `unverified`, `stale`). Agent claims can never masquerade as `observed`. |
| **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. |
| **Stale Evidence & Drift Guard** | Emits `VERIFIED_STATE_MATCH`, `WORKING_TREE_CHANGED`, `BRANCH_CHANGED`, `HEAD_CHANGED`, `REPOSITORY_MISMATCH`, `CHECKPOINT_CORRUPTED`, and `INCOMPLETE_EVIDENCE`. |
| **Untrusted Data Boundary** | Checkpoints are portable data artifacts, never executable scripts. `verify` and `resume` never overwrite files, alter Git history, or run embedded commands. |
| **Privacy-First Local Storage** | Stores immutable records in local SQLite (`user_data` or gitignored `.stintlock/`), excludes `.env*`/keys, and redacts credentials on output. |

---

## Quickstart

### Installation

```bash
# Run or install from source
git clone https://github.com/jeromeprince777/StintLock.git
cd StintLock
uv sync --locked
uv run stintlock --version
```

*(Once published on PyPI, install globally with `uv tool install stintlock`.)*

### Workflow

```bash
# 1. Initialize local config and storage for a Git repository
stintlock init

# 2. Inspect observed Git state without modifying anything
stintlock status

# 3. Save an immutable checkpoint (opt-in verification runs only commands in .stintlock/config.toml)
stintlock save \
  --task "Implement token validator and expiry checks" \
  --agent claude-code \
  --done "Implemented validate()" \
  --pending "Add expiry validation" \
  --decision "Stateless validation" \
  --rejected "Rejected global session cache" \
  --blocker "Need clock skew tolerance config" \
  --next-action "Add expiry test in tokens.py" \
  --verify

# 4. Verify repository state before the receiving agent continues
stintlock verify CHECKPOINT_ID

# 5. Generate a read-only 12-section handoff formatted for the target agent
stintlock resume CHECKPOINT_ID --template codex

# 6. Export portable Markdown/JSON, diff checkpoints, or run the synthetic offline demo
stintlock diff CHECKPOINT_A CHECKPOINT_B
stintlock export CHECKPOINT_ID --format markdown
stintlock demo
```

<details>
<summary><strong>Preview: 12-Section Handoff Report Structure &amp; Local Verification Config</strong></summary>

Every Markdown/JSON handoff includes:
1. Current Development Objective (`agent_reported`)
2. Acceptance Criteria (`agent_reported`)
3. Verified Repository State (`observed` / `stale`)
4. Relevant Changed Files (`observed`)
5. Completed Work (`agent_reported`)
6. Pending Tasks (`agent_reported`)
7. Architectural Decisions (`agent_reported`)
8. Previously Rejected Approaches (`agent_reported`)
9. Verified Test Evidence (`observed` / `stale`)
10. Stale or Unverified Claims (`stale` / `unverified`)
11. Known Blockers (`agent_reported`)
12. Recommended Next Action (`agent_reported`)

See [examples/handoff-example.md](examples/handoff-example.md) and [examples/config.toml](examples/config.toml).

</details>

---

## Architecture

```mermaid
flowchart TD
    CLI["CLI (Typer + Rich)"] --> Core["Core Engine (capture, verify, drift, integrity)"]
    MCP["Local Stdio MCP Server"] --> Core

    Core --> Git["Git Inspection Engine (porcelain=v2 -z, SHA-256)"]
    Core --> Verify["Verification Runner (approved profiles only, shell=False)"]
    Core --> Storage["SQLite + Immutable JSON Store"]
    Core --> Context["Context Builder & Secret Redaction"]

    Context --> Reporters["Markdown / JSON / Terminal / Agent Templates"]
```

---

## Evidence Classification

| Status | Meaning |
|---|---|
| `observed` | Directly observed via read-only Git CLI or executed local verification profiles |
| `agent_reported` | Claimed by the sending agent or developer (never promoted to `observed`) |
| `unverified` | Lacks corroborating observed verification evidence |
| `stale` | Observed state or test output invalidated by subsequent repository changes |

---

## MCP Integration (Read-Only Default)

Start the local `stdio` MCP server (`mcp>=2.0.0`, no network listener):

```bash
# Read-only inspection tools only (recommended default)
stintlock mcp --workspace /path/to/repo

# Explicitly opt in to local checkpoint creation
stintlock mcp --workspace /path/to/repo --allow-write
```

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.

---

## Supported Platforms

| Platform | Python Versions | CI Status |
|---|---|---|
| Linux (`ubuntu-latest`) | 3.11, 3.12, 3.13 | Verified on GitHub Actions |
| Windows (`windows-latest`) | 3.11, 3.12, 3.13 | Verified on GitHub Actions & locally |

---

## Documentation

- [Architecture Overview](docs/architecture.md)
- [Competitive Analysis](docs/competitive-analysis.md)
- [Checkpoint Schema (`v1.0.0`)](docs/checkpoint-schema.md)
- [Security & Trust Model](docs/security.md)
- [MCP Integration Guide](docs/mcp-integration.md)
- [Architecture Decision Records](docs/decisions/0001-local-sqlite-and-git-cli.md)
- [Contributing Guide](CONTRIBUTING.md) · [Security Policy](SECURITY.md) · [Changelog](CHANGELOG.md)

## Known Limitations

- **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.
- **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.
- **Character Budgeting:** Context size limits use character and UTF-8 byte counts rather than model-specific tokenizers.
- **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.

## Good First Issues

- Add configurable custom redaction regexes in `.stintlock/config.toml`.
- Add optional `tiktoken` byte/token estimation behind an optional extra.
- Add interactive Textual TUI checkpoint browser (`stintlock browse`).

## License

MIT License — see [LICENSE](LICENSE).
