Shiplock
Shiplock is a release gate that checks a repository's documentation against its own code. It catches the drift that shows up at ship time: a doc describing a provider set the code no longer has, a README missing a shipped feature, a version string that moved in one file and not another, an example file that fell behind the API it demonstrates.
It runs the same way in three places — your terminal, your test suite, and CI — off one config file per repo, so the check that blocks a release is the check you ran locally a minute earlier.
Before you start
Shiplock needs Python 3.10 or newer. Check with:
python3 --version
If that fails, install Python from python.org/downloads
(or your platform package manager: apt install python3-pip, dnf install python3-pip).
Install
pip install shiplock
See it work
Point it at any repo — no config file, no setup:
shiplock check path/to/your/repo
(or shiplock check from inside one). Shiplock sweeps whichever docs it
recognizes and reports what it finds, one finding per problem:
docs-exist USAGE.md
declared public doc is missing: USAGE.md
readme-links README.md:31
relative link 'USAGE.md' (PyPI resolves it against pypi.org, not the repo)
Findings print to stdout; notices for the checks that need configuration, and
the run summary, print to stderr — so stdout stays clean for a pipe. Exit code 0
means clean, 1 means a check found a problem, 2 means a config or usage error.
That makes shiplock check a drop-in CI step and a pytest assertion alike.
--json swaps the human output for one machine-readable object. On a terminal,
findings render red and a clean run green (NO_COLOR turns that off); piped
output stays plain.
When you want the rest of the checks — version alignment, architecture and
manifest coverage, object documentation, versioned-file markers — add a
shiplock.toml declaring your repo's surfaces. The full schema, section by
section, is in
USAGE.md.
Two layers
Shiplock checks in two layers:
- Deterministic checks (
shiplock check) — fast, exact, no model. Missing docs, banned words, internal references in public docs, absolute README links, version alignment, the architecture module list, object coverage, the per-file manifest, versioned-file markers, dependency declarations duplicated between pyproject and requirements files, tests that carry no assertion. - A semantic audit (
shiplock prompt) — the prompt for a fresh agent to read the code and hold every doc claim against it, from state rather than from what changed. Centrally versioned inside the package, so every repo gets prompt updates on the next install.
Print the audit prompt with:
shiplock prompt
There's also an advisory third prompt, outside the gate: shiplock prompt ablation prints a prompt for an agent to report what the repo could remove,
merge, or make cheaper, with findings split into mechanical folds and decisions
for the owner. It renders a report, never a verdict.
In Python
Everything the CLI does is callable — load_config and run_checks return a
typed report, so the gate can run inside a test suite:
from pathlib import Path
from shiplock import load_config, run_checks
def test_docs_match_code():
report = run_checks(load_config(Path(__file__).parent.parent))
assert report.ok, [f.message for f in report.findings]
The full API surface is in USAGE.md.
In CI
Shiplock ships a reusable GitHub Actions workflow that runs both layers on every push and pull request, and opens an issue when the audit fails:
jobs:
gate:
uses: shehuphd/shiplock/.github/workflows/gate.yml@main
The full wiring — inputs, the audit's API key, the dormant-first rollout — is in USAGE.md.
Documentation
- USAGE.md — the full manual: config schema, every check, exit codes.
- ARCHITECTURE.md — how the package is put together.
- MANIFEST.md — a per-file map of the codebase.
- CHANGELOG.md — dated release notes.
License
MIT. See LICENSE.
By Mo Shehu
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shiplock-0.3.1.tar.gz.
File metadata
- Download URL: shiplock-0.3.1.tar.gz
- Upload date:
- Size: 31.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82cb8fb7b6c0367daefeb52013f2fa600ddfa365af470a715d0b4554c87847cc
|
|
| MD5 |
0483392457129839659df2afbc753a29
|
|
| BLAKE2b-256 |
f77819af633c9eac6f5a943dc95609ed29fbec34e60a06ac144ded569ecdbbc3
|
Provenance
The following attestation bundles were made for shiplock-0.3.1.tar.gz:
Publisher:
release.yml on shehuphd/shiplock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shiplock-0.3.1.tar.gz -
Subject digest:
82cb8fb7b6c0367daefeb52013f2fa600ddfa365af470a715d0b4554c87847cc - Sigstore transparency entry: 2760596291
- Sigstore integration time:
-
Permalink:
shehuphd/shiplock@94f9a1ea6ee15a05c5e0c885a74b63005f0df26e -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/shehuphd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@94f9a1ea6ee15a05c5e0c885a74b63005f0df26e -
Trigger Event:
release
-
Statement type:
File details
Details for the file shiplock-0.3.1-py3-none-any.whl.
File metadata
- Download URL: shiplock-0.3.1-py3-none-any.whl
- Upload date:
- Size: 32.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb26a950346cb5d92ab122164f53c3d2096187c8ac0f70ffc322b850bbfcdb47
|
|
| MD5 |
33417f4ad000056e91ccc23d5a9b00e7
|
|
| BLAKE2b-256 |
cce993b1f77b1afd342a5b0eda03af2b5cc8769e998e25634165cecdc6febbe6
|
Provenance
The following attestation bundles were made for shiplock-0.3.1-py3-none-any.whl:
Publisher:
release.yml on shehuphd/shiplock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shiplock-0.3.1-py3-none-any.whl -
Subject digest:
cb26a950346cb5d92ab122164f53c3d2096187c8ac0f70ffc322b850bbfcdb47 - Sigstore transparency entry: 2760596323
- Sigstore integration time:
-
Permalink:
shehuphd/shiplock@94f9a1ea6ee15a05c5e0c885a74b63005f0df26e -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/shehuphd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@94f9a1ea6ee15a05c5e0c885a74b63005f0df26e -
Trigger Event:
release
-
Statement type: