ghostkeep 0.7.0__py3-none-any.whl
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.
- ghostkeep/__init__.py +2 -0
- ghostkeep/__main__.py +3 -0
- ghostkeep/check.py +207 -0
- ghostkeep/cli.py +345 -0
- ghostkeep/decisions.py +49 -0
- ghostkeep/gitio.py +129 -0
- ghostkeep/handoff.py +173 -0
- ghostkeep/health.py +170 -0
- ghostkeep/ledger.py +196 -0
- ghostkeep/setup.py +253 -0
- ghostkeep/sources.py +543 -0
- ghostkeep/state.py +287 -0
- ghostkeep/sync.py +69 -0
- ghostkeep/verify.py +146 -0
- ghostkeep-0.7.0.dist-info/METADATA +222 -0
- ghostkeep-0.7.0.dist-info/RECORD +19 -0
- ghostkeep-0.7.0.dist-info/WHEEL +4 -0
- ghostkeep-0.7.0.dist-info/entry_points.txt +2 -0
- ghostkeep-0.7.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: ghostkeep
|
|
3
|
+
Version: 0.7.0
|
|
4
|
+
Summary: Verified handoffs between free AI coding tools
|
|
5
|
+
Project-URL: Homepage, https://github.com/Akshu24Tech/ghostkeep
|
|
6
|
+
Project-URL: Repository, https://github.com/Akshu24Tech/ghostkeep
|
|
7
|
+
Project-URL: Issues, https://github.com/Akshu24Tech/ghostkeep/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/Akshu24Tech/ghostkeep/commits/main
|
|
9
|
+
Author: Akshu Grewal
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai,antigravity,claude-code,codex,coding-agents,git,handoff
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
20
|
+
Classifier: Topic :: Software Development :: Version Control :: Git
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Provides-Extra: codex
|
|
23
|
+
Requires-Dist: zstandard>=0.22; extra == 'codex'
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# Ghostkeep
|
|
27
|
+
|
|
28
|
+
Verified handoffs between free AI coding tools.
|
|
29
|
+
|
|
30
|
+
[](https://github.com/Akshu24Tech/ghostkeep/actions/workflows/ci.yml)
|
|
31
|
+
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
When you switch from Claude Code to Antigravity CLI (limit hit, missing feature, second opinion),
|
|
35
|
+
the files carry over but the story doesn't. The next agent can't tell what was asked, who changed
|
|
36
|
+
what, or whether the last agent's claimed work actually happened. Ghostkeep keeps one append-only
|
|
37
|
+
ledger per project and checks every claim against git, with no LLM, no API key and no server.
|
|
38
|
+
|
|
39
|
+
> Status: v0.7.0 (flag counts, decision shelf life), early and improving. Automatic capture from Claude Code, Antigravity (IDE + CLI) and Codex session logs,
|
|
40
|
+
> claims checked against git, decisions captured in your own words, and `ghostkeep handoff`.
|
|
41
|
+
> Tests and a labeled eval gate run on Windows, macOS and Linux on every push.
|
|
42
|
+
|
|
43
|
+
## Quickstart (2 minutes)
|
|
44
|
+
|
|
45
|
+
Needs Python 3.10+ and git. No dependencies, no server, no API key.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install ghostkeep # or: pipx install ghostkeep, or: uv tool install ghostkeep
|
|
49
|
+
cd your-project
|
|
50
|
+
ghostkeep setup # the handoff now loads itself when a session starts
|
|
51
|
+
ghostkeep doctor # every tool's logs read? did each hook run?
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Then work as usual and switch tools whenever you hit a limit. Each new Antigravity, Gemini CLI or Claude Code
|
|
55
|
+
session starts with the handoff; Codex is pointed to it through `AGENTS.md`. To write it by hand at any time:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
ghostkeep handoff # read session logs, check claims against git, write .ghostkeep/HANDOFF.md
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Windows:** if `ghostkeep` isn't found after `pip install`, Python's Scripts folder isn't on your PATH.
|
|
62
|
+
Use `py -m ghostkeep` in place of `ghostkeep` (for example `py -m ghostkeep setup`), or install with pipx.
|
|
63
|
+
`py -m ghostkeep --version` shows which version you have.
|
|
64
|
+
|
|
65
|
+
Latest unreleased version: `pip install git+https://github.com/Akshu24Tech/ghostkeep`. Reading Codex's older
|
|
66
|
+
compressed (`.zst`) sessions is an optional extra: `pip install "ghostkeep[codex]"`.
|
|
67
|
+
|
|
68
|
+
For a browser chat, paste `.ghostkeep/HANDOFF.md` in yourself.
|
|
69
|
+
|
|
70
|
+
### What `ghostkeep setup` writes
|
|
71
|
+
|
|
72
|
+
| Tool | How the handoff reaches it | Config written |
|
|
73
|
+
| --- | --- | --- |
|
|
74
|
+
| Antigravity (IDE, CLI, App) | `SessionStart` hook, injected as a system message | `.agents/hooks.json` |
|
|
75
|
+
| Gemini CLI | `SessionStart` hook, `additionalContext` | `.gemini/settings.json` |
|
|
76
|
+
| Claude Code (paid plans) | `SessionStart` hook | `.claude/settings.local.json` |
|
|
77
|
+
| Codex | Codex reads `AGENTS.md`; a "read the handoff first" block (advice, not enforced) | `AGENTS.md` |
|
|
78
|
+
|
|
79
|
+
Each hook never breaks a session (it always exits 0 and prints only what that tool expects) and records
|
|
80
|
+
every run, so `doctor` shows whether it really fired. That matters: hook support is new in some of these
|
|
81
|
+
tools and has been reported flaky on some setups, so "installed" is not taken as "working". Gemini CLI
|
|
82
|
+
asks you to approve a new project hook once. If a tool's log format changes and Ghostkeep can no longer
|
|
83
|
+
read it, the handoff says so at the top instead of quietly showing less. `ghostkeep setup --remove`
|
|
84
|
+
undoes everything; `--tools antigravity,gemini-cli` picks tools by hand.
|
|
85
|
+
|
|
86
|
+
`ghostkeep handoff` reads the logs these tools already keep on disk, so no agent has to follow a rule:
|
|
87
|
+
|
|
88
|
+
| Tool | Log read |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| Claude Code | `~/.claude/projects/<repo-path>/<session>.jsonl` |
|
|
91
|
+
| Antigravity IDE agent | `~/.gemini/antigravity/brain/<id>/.system_generated/logs/transcript.jsonl` |
|
|
92
|
+
| Antigravity CLI | `~/.gemini/antigravity-cli/brain/<id>/.system_generated/logs/transcript.jsonl` |
|
|
93
|
+
| Codex | `~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl` (older `.zst` files need the `codex` extra) |
|
|
94
|
+
|
|
95
|
+
Expected line counts come from the agent's own edit calls, not its summary. Codex edits through
|
|
96
|
+
shell commands, so its files are found in `apply_patch` and file-write commands. Secrets are redacted.
|
|
97
|
+
These are internal formats and can change in any update.
|
|
98
|
+
|
|
99
|
+
Manual logging still works for tools without readable logs:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
ghostkeep init
|
|
103
|
+
ghostkeep log --tool antigravity-ide \
|
|
104
|
+
--asked 'Add one line "it is completed" at the end of docs/RESULTS.md.' \
|
|
105
|
+
--claimed "Added the line." --file docs/RESULTS.md:+1-0
|
|
106
|
+
ghostkeep check # exit 1 if any mismatch or orphan change
|
|
107
|
+
ghostkeep show
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
[BAD] mismatch e_a7ce363193a7 antigravity-ide
|
|
112
|
+
count_mismatch docs/RESULTS.md (expected +1 -0, actual +3 -0)
|
|
113
|
+
[???] orphan no claim
|
|
114
|
+
no_claim stray.py (untracked)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## "Tests pass" claims
|
|
118
|
+
|
|
119
|
+
Agents say "all tests pass" more easily than they run the tests. Pin your project's test command once:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
ghostkeep pin-test "python -m pytest -q"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
When a session's final message says tests pass, `ghostkeep handoff` runs that command on the current files
|
|
126
|
+
and writes the real result next to the claim ("the agent says they pass, BUT ... exit 1, 2 failed").
|
|
127
|
+
"No tests ran" is not a pass, and fewer passing tests than the last run is called out. Only the command
|
|
128
|
+
you pinned ever runs (it lives in `.ghostkeep/config.json`, outside git), never one from a log, an agent's
|
|
129
|
+
message or the repo. The session-start hook never runs tests, so sessions start quickly; it shows the last
|
|
130
|
+
result. What it can't do: it checks the files as they are now, not as they were when the agent spoke, and
|
|
131
|
+
it only sees claims in the agent's last message.
|
|
132
|
+
|
|
133
|
+
## How much it catches, and decisions that go stale
|
|
134
|
+
|
|
135
|
+
`ghostkeep stats` (also at the end of `STATE.md`) counts, once each, what the checks flagged in this project:
|
|
136
|
+
claims whose line counts didn't match git, edits claimed but not on disk, changed files nobody claimed, and
|
|
137
|
+
"tests pass" claims your pinned tests confirmed or contradicted. "Flagged" is not "the agent lied": a later
|
|
138
|
+
hand edit can cause a flag too, and the ledger keeps each case so you can look.
|
|
139
|
+
|
|
140
|
+
A decision nobody has repeated or confirmed for 30 days is marked in the handoff ("80 days old, not confirmed
|
|
141
|
+
since") and listed under *Due for review* in `STATE.md`. `ghostkeep confirm <id>` says it still holds,
|
|
142
|
+
`ghostkeep retire <id>` says it doesn't. Saying the same words again in any tool also resets it.
|
|
143
|
+
|
|
144
|
+
## Tamper-evident ledger
|
|
145
|
+
|
|
146
|
+
Each ledger line carries the hash of the line before it. Edit or delete an old line and `doctor` (and the
|
|
147
|
+
top of the handoff) reports where the chain breaks. If you changed it on purpose,
|
|
148
|
+
`ghostkeep ack-ledger --reason "..."` records that as a new line. This makes edits visible, it doesn't
|
|
149
|
+
prevent them: an agent runs as you and could rewrite the whole file.
|
|
150
|
+
|
|
151
|
+
## Decisions over time
|
|
152
|
+
|
|
153
|
+
A handoff is a budgeted slice; `.ghostkeep/STATE.md` is the full picture, rebuilt from the ledger on
|
|
154
|
+
every `ghostkeep handoff` (or `ghostkeep state`). No LLM, nothing in the ledger is ever rewritten.
|
|
155
|
+
|
|
156
|
+
- **Decisions stay pinned** while they're in force, however many sessions came after.
|
|
157
|
+
- **A decision is replaced only on explicit wording** ("SQLite instead of JSON", "switch from Flask",
|
|
158
|
+
"no longer use Redis") that names something an older decision used. Shared words alone never replace anything.
|
|
159
|
+
- **Unfinished work stays open** until a later session finishes it (same request, or same files
|
|
160
|
+
checked against git), not just for the last three sessions.
|
|
161
|
+
- **You can correct it**, and your call always wins:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
ghostkeep state # what's in force, what's open, what was replaced
|
|
165
|
+
ghostkeep retire d_1a2b # this decision no longer holds
|
|
166
|
+
ghostkeep supersede d_1a2b d_9f8e # d_9f8e replaced d_1a2b
|
|
167
|
+
ghostkeep done e_77c1 # that unfinished task is finished
|
|
168
|
+
ghostkeep reopen d_1a2b # undo any of the above
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
How well this holds up is so far measured on 7 synthetic long-run eval cases (old decision after
|
|
172
|
+
10 sessions, reversal, false reversal, user corrections, interrupted work, 50 decisions) plus two real
|
|
173
|
+
sessions. A long real-world run is still to come.
|
|
174
|
+
|
|
175
|
+
## Statuses
|
|
176
|
+
|
|
177
|
+
| Status | Means |
|
|
178
|
+
| --- | --- |
|
|
179
|
+
| `verified` | The file changed exactly as the agent claimed, and it's committed |
|
|
180
|
+
| `uncommitted` | Matches the claim, not committed yet |
|
|
181
|
+
| `mismatch` | The claim doesn't match git, e.g. "added 1 line" but the diff shows 3 |
|
|
182
|
+
| claimed but not on disk | The agent said it edited a file and git shows no change: still pending in the IDE, or rejected |
|
|
183
|
+
| `orphan` | A file changed and no session claims it |
|
|
184
|
+
| `superseded` | A later session changed the same file |
|
|
185
|
+
|
|
186
|
+
The accept/reject click in an IDE isn't recorded in any session log, so git is the ground truth.
|
|
187
|
+
See [docs/LEDGER.md](https://github.com/Akshu24Tech/ghostkeep/blob/main/docs/LEDGER.md) for the ledger format.
|
|
188
|
+
|
|
189
|
+
## Why
|
|
190
|
+
|
|
191
|
+
Measured on a real project (10 Nov 2026): after a tool switch, plain agents found *what* changed but
|
|
192
|
+
got *who*, *status* or *the task itself* wrong in 4 of 5 answers, and Antigravity CLI confidently
|
|
193
|
+
resumed the wrong task after a Claude session was cut off mid-way.
|
|
194
|
+
|
|
195
|
+
Then the same test with Ghostkeep (11 Nov 2026): Claude cut off mid-task, `ghostkeep handoff` run,
|
|
196
|
+
Antigravity CLI told to read `.ghostkeep/HANDOFF.md` first. It named the right task and the
|
|
197
|
+
interrupted file, and continued without being re-told.
|
|
198
|
+
|
|
199
|
+
## Earlier version
|
|
200
|
+
|
|
201
|
+
The v2.1 "Claims Register" prototype (watcher, extractor, auditor, MCP server) is kept on the
|
|
202
|
+
[`legacy`](https://github.com/Akshu24Tech/ghostkeep/tree/legacy) branch and in this repo's history. v0.1 restarts the code around one
|
|
203
|
+
narrower job: checking agent claims about their own work at the moment you switch tools. Ideas
|
|
204
|
+
carried over: append-only log, the writer never sets its own status, deterministic checks only,
|
|
205
|
+
and decision/preference capture from the user's own words.
|
|
206
|
+
|
|
207
|
+
## Tests and evals
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
python -m pytest -q # unit tests
|
|
211
|
+
python evals/run.py # 50 labeled cases scored on 17 metrics, writes evals/RESULTS.md
|
|
212
|
+
python evals/run.py --gate # exit 1 if any metric is below target (what CI runs)
|
|
213
|
+
python evals/label_real.py # label Ghostkeep's output on your own sessions, then --score
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
The eval cases are small fake projects with session logs in each tool's real format and the right answer
|
|
217
|
+
written down: claimed files and line counts, verdicts, orphans, who changed what, decisions captured,
|
|
218
|
+
unfinished work first, plus adversarial cases (planted instructions in an agent's message, secrets,
|
|
219
|
+
malformed logs, sessions from another repo). Cases in the `realdata` group reproduce bugs found by
|
|
220
|
+
labeling real sessions. Latest numbers: [evals/RESULTS.md](https://github.com/Akshu24Tech/ghostkeep/blob/main/evals/RESULTS.md).
|
|
221
|
+
How Ghostkeep scores against an agentic system design review, and what's left:
|
|
222
|
+
[docs/DESIGN_AUDIT.md](https://github.com/Akshu24Tech/ghostkeep/blob/main/docs/DESIGN_AUDIT.md).
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
ghostkeep/__init__.py,sha256=12cdS52paFTmSjSQJ7S1Sx3dQjSdDVcRbVhsorH1U98,80
|
|
2
|
+
ghostkeep/__main__.py,sha256=k1ocEWawweo1qCJWNFAAvyxz3tcY13dzvCenHszij30,48
|
|
3
|
+
ghostkeep/check.py,sha256=gGW3eUSqz4IZjAdlkaiUxV7qDWhdGu4RVn06IsIfYuM,8970
|
|
4
|
+
ghostkeep/cli.py,sha256=X8XpQTiwaKjQBiOIBTHAQkO5ohGM9o6O5Cvs3pPXrMg,13986
|
|
5
|
+
ghostkeep/decisions.py,sha256=8H9Lwz8Rw23ZiwAr4irTqhFFNfjBQJHChZ9ftcufoRM,2026
|
|
6
|
+
ghostkeep/gitio.py,sha256=zU3BxpQ-P0XBHKorLTVRgP8SPcG9AP_PEZVnIWj3QVs,4086
|
|
7
|
+
ghostkeep/handoff.py,sha256=P6QnB1GAzNNCxOHce_719EPnpSId7eqVHAG-JSTV7Dc,8568
|
|
8
|
+
ghostkeep/health.py,sha256=q-bPie_CTlKS6d4nG76AMQsEoEvvkM2BNHGtrLPuxzw,7277
|
|
9
|
+
ghostkeep/ledger.py,sha256=ONGc4ofGBZqvLoxWX8uQ9L0ClNWLkCWEEDUq6kbH_tQ,7084
|
|
10
|
+
ghostkeep/setup.py,sha256=TpFKcNy2uS4AYiXzh1TlUSeTtL1laem0ToLdML94en8,10260
|
|
11
|
+
ghostkeep/sources.py,sha256=3HKUdCuEaOExMUh0WPZ1YiH-EnpBD1wHPqkeb1_vJhU,22502
|
|
12
|
+
ghostkeep/state.py,sha256=kLjLpsKakIw9UVxT7fnVrNkVn3cbiErvHD7_rfa11Ro,12966
|
|
13
|
+
ghostkeep/sync.py,sha256=eOXCI3qYtx4Pp3adqQkD6xbcI4CNDSgATINHSMp5Epk,3091
|
|
14
|
+
ghostkeep/verify.py,sha256=NZvlTsNgNvBNxvEg78AsDMvEafw7lN5TMDSUxeyotLc,6571
|
|
15
|
+
ghostkeep-0.7.0.dist-info/METADATA,sha256=6VMSHa_AcJClry-zze7FUnpY40JCG0H0Yx2OGLoxsJw,11991
|
|
16
|
+
ghostkeep-0.7.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
17
|
+
ghostkeep-0.7.0.dist-info/entry_points.txt,sha256=v7pzpXhHvINoR1V4NQBEd9Zv0-cumvQmuLoa8sK75V4,49
|
|
18
|
+
ghostkeep-0.7.0.dist-info/licenses/LICENSE,sha256=Gg5msG03yt3BKdTOL6iXMtw82PHaTFqBhdCJ18I8iAg,1069
|
|
19
|
+
ghostkeep-0.7.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Akshu Grewal
|
|
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.
|