rotless 0.2.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.
- rotless-0.2.0/LICENSE +21 -0
- rotless-0.2.0/PKG-INFO +162 -0
- rotless-0.2.0/README.md +137 -0
- rotless-0.2.0/pyproject.toml +58 -0
- rotless-0.2.0/setup.cfg +4 -0
- rotless-0.2.0/src/rotless/__init__.py +3 -0
- rotless-0.2.0/src/rotless/__main__.py +10 -0
- rotless-0.2.0/src/rotless/cli.py +775 -0
- rotless-0.2.0/src/rotless/config.py +235 -0
- rotless-0.2.0/src/rotless/fs_atomic.py +232 -0
- rotless-0.2.0/src/rotless/handoff.py +264 -0
- rotless-0.2.0/src/rotless/integrations/__init__.py +225 -0
- rotless-0.2.0/src/rotless/integrations/antigravity.py +123 -0
- rotless-0.2.0/src/rotless/integrations/base.py +137 -0
- rotless-0.2.0/src/rotless/integrations/claude_code.py +137 -0
- rotless-0.2.0/src/rotless/integrations/codex.py +137 -0
- rotless-0.2.0/src/rotless/integrations/cursor.py +68 -0
- rotless-0.2.0/src/rotless/integrations/templates/SKILL.md +20 -0
- rotless-0.2.0/src/rotless/integrations/templates/cursor_rule.mdc +12 -0
- rotless-0.2.0/src/rotless/lint.py +397 -0
- rotless-0.2.0/src/rotless/models.py +115 -0
- rotless-0.2.0/src/rotless/review.py +279 -0
- rotless-0.2.0/src/rotless/sessions/__init__.py +140 -0
- rotless-0.2.0/src/rotless/sessions/antigravity.py +218 -0
- rotless-0.2.0/src/rotless/sessions/base.py +158 -0
- rotless-0.2.0/src/rotless/sessions/claude_code.py +116 -0
- rotless-0.2.0/src/rotless/sessions/codex.py +98 -0
- rotless-0.2.0/src/rotless/sessions/community.py +374 -0
- rotless-0.2.0/src/rotless/sources.py +397 -0
- rotless-0.2.0/src/rotless/store/__init__.py +53 -0
- rotless-0.2.0/src/rotless/store/conn.py +69 -0
- rotless-0.2.0/src/rotless/store/schema.py +94 -0
- rotless-0.2.0/src/rotless/store/search.py +425 -0
- rotless-0.2.0/src/rotless/store/state.py +127 -0
- rotless-0.2.0/src/rotless/sync.py +198 -0
- rotless-0.2.0/src/rotless/text_utils.py +464 -0
- rotless-0.2.0/src/rotless/trace_audit.py +191 -0
- rotless-0.2.0/src/rotless/vault.py +622 -0
- rotless-0.2.0/src/rotless/warmup.py +335 -0
- rotless-0.2.0/src/rotless.egg-info/PKG-INFO +162 -0
- rotless-0.2.0/src/rotless.egg-info/SOURCES.txt +52 -0
- rotless-0.2.0/src/rotless.egg-info/dependency_links.txt +1 -0
- rotless-0.2.0/src/rotless.egg-info/entry_points.txt +2 -0
- rotless-0.2.0/src/rotless.egg-info/top_level.txt +1 -0
- rotless-0.2.0/tests/test_handoff.py +70 -0
- rotless-0.2.0/tests/test_integrations.py +79 -0
- rotless-0.2.0/tests/test_lint.py +82 -0
- rotless-0.2.0/tests/test_privacy_guard.py +51 -0
- rotless-0.2.0/tests/test_review.py +101 -0
- rotless-0.2.0/tests/test_security.py +140 -0
- rotless-0.2.0/tests/test_store_search.py +193 -0
- rotless-0.2.0/tests/test_text_utils.py +102 -0
- rotless-0.2.0/tests/test_vault_sync.py +205 -0
- rotless-0.2.0/tests/test_warmup.py +122 -0
rotless-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rotless contributors
|
|
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.
|
rotless-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rotless
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Zero-key, anti-rot local memory and cross-agent handoff CLI.
|
|
5
|
+
Author: rotless contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/JustinBibi/rotless
|
|
8
|
+
Project-URL: Repository, https://github.com/JustinBibi/rotless
|
|
9
|
+
Project-URL: Issues, https://github.com/JustinBibi/rotless/issues
|
|
10
|
+
Keywords: ai-agents,memory,cli,claude-code,codex,cursor,sqlite,fts5
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: MacOS
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
|
|
26
|
+
# `rotless`
|
|
27
|
+
|
|
28
|
+
**Zero-key, anti-rot local memory & cross-agent handoff CLI.**
|
|
29
|
+
|
|
30
|
+
[](https://www.python.org/downloads/)
|
|
31
|
+
[](pyproject.toml)
|
|
32
|
+
[](LICENSE)
|
|
33
|
+
|
|
34
|
+
`rotless` keeps your coding agents (**Claude Code**, **Codex**, **Cursor**, **Antigravity**, and read-only session handoff for **OpenCode**, **OpenClaw**, and **Hermes**) grounded in clean, versionable Markdown memory—without cloud uploads, daemon processes, or context rot.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Why `rotless`?
|
|
39
|
+
|
|
40
|
+
`CLAUDE.md` and `.cursorrules` are **static project handbooks**. After two weeks of debugging, ad-hoc notes pile up, contradict refactors, and silently waste context tokens. Cloud memory tools pull everything into remote vector stores and introduce privacy, latency, and API key friction.
|
|
41
|
+
|
|
42
|
+
| Capability | `CLAUDE.md` / Rules | Cloud Memory SaaS | `rotless` |
|
|
43
|
+
| :--- | :--- | :--- | :--- |
|
|
44
|
+
| **Source of truth** | Static repo file | Remote SaaS DB | **Plain Markdown** (global + `.rotless/memories/`) |
|
|
45
|
+
| **Anti-rot lifecycle** | Manual cleanup | Rare / opaque | **`supersede` + `stale_after` + CI `lint`** |
|
|
46
|
+
| **Cross-agent sharing** | Single tool | Plugin-dependent | **Shared memory + 7-agent read-only `handoff`** |
|
|
47
|
+
| **Network & API keys** | Local | Cloud upload + keys | **100% offline, 0 runtime deps, 0 API keys** |
|
|
48
|
+
| **Untrusted repo defense** | N/A | N/A | **Default-Deny `rotless trust` (like `direnv allow`)** |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 60-Second Quickstart
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# 1. Install (zero third-party runtime dependencies)
|
|
56
|
+
uv tool install rotless
|
|
57
|
+
|
|
58
|
+
# 2. Initialize vault, install Tier 1 hooks/skills, and scan existing local sessions
|
|
59
|
+
rotless init
|
|
60
|
+
|
|
61
|
+
# 3. Turn past debugging pain into verified cards in ~30 seconds
|
|
62
|
+
rotless review
|
|
63
|
+
|
|
64
|
+
# 4. Preview what your agents receive at SessionStart
|
|
65
|
+
rotless warmup --explain
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Let Your Coding Agent Set Up & Operate `rotless`
|
|
69
|
+
|
|
70
|
+
Point any AI coding agent (Claude Code, Codex, Cursor, Antigravity, etc.) directly at [`llms.txt`](llms.txt):
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
Read https://raw.githubusercontent.com/JustinBibi/rotless/main/llms.txt (or ./llms.txt) and set up rotless for this machine/repo.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## What a Memory Card Looks Like
|
|
79
|
+
|
|
80
|
+
Every memory lives as ordinary Markdown you can read, diff, or commit under `.rotless/memories/` (while `index.sqlite` stays isolated under `~/.local/share/rotless/`):
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
---
|
|
84
|
+
id: "7e9c2a1b-4c5d-4e8f-9a10-112233445566"
|
|
85
|
+
title: "Keep read-only SQLite warmup free of WAL DDL"
|
|
86
|
+
type: "learning"
|
|
87
|
+
tags: ["sqlite", "concurrency", "project:rotless"]
|
|
88
|
+
status: "stable"
|
|
89
|
+
created_at: "2026-12-06T08:00:00Z"
|
|
90
|
+
updated_at: "2026-12-06T08:00:00Z"
|
|
91
|
+
verified_at: "2026-12-06T08:00:00Z"
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
Open read-only warmup connections with `?mode=ro` URI and `PRAGMA query_only = ON`
|
|
95
|
+
instead of running `PRAGMA journal_mode = WAL` on every read, avoiding lock contention
|
|
96
|
+
when multiple coding agents start simultaneously.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Security & Trust by Default
|
|
102
|
+
|
|
103
|
+
1. **Default-Deny Project Overlays**: Cloning a third-party repo with `.rotless/memories/*.md` never auto-injects into your agents. `warmup` emits a one-line stderr notice until you inspect and run `rotless trust`.
|
|
104
|
+
2. **Symlink Confinement**: Reads and atomic CAS writes reject symlinks and verify `realpath` containment inside the vault root.
|
|
105
|
+
3. **Credential Redaction & Fail-Closed `--local`**: Automatically redacts API keys, JWTs, bearer/basic tokens, and private keys; `rotless add --local` refuses writes containing secrets or workstation absolute paths.
|
|
106
|
+
4. **Nonce-Fenced Snippets**: `warmup` and `search` truncate bodies before wrapping in per-call `<untrusted-memory-{nonce}>` blocks and strip deceptive invisible Unicode/BiDi characters.
|
|
107
|
+
5. **Strict Permissions & Safe Undo**: Data/config directories default to `0700`, SQLite/configs/backups to `0600`, and `rotless init --uninstall` cleanly reverts agent edits.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Reproducible Benchmarks
|
|
112
|
+
|
|
113
|
+
Measured on `Darwin arm64 | Python 3.11.14 | SQLite 3.50.4` (`scale=1000` global + `12` local cards, `seed=42`):
|
|
114
|
+
|
|
115
|
+
| Metric | Value |
|
|
116
|
+
| :--- | :--- |
|
|
117
|
+
| In-process `warmup` latency (p50 / p95) | `8.30 ms` / `9.02 ms` |
|
|
118
|
+
| End-to-end CLI wall-clock `warmup` (p50 / p95) | `52.55 ms` / `54.23 ms` |
|
|
119
|
+
| Context size (Naive full dump vs `rotless warmup`) | `25,632 chars` -> `2,448 chars` (`-90.4%`) |
|
|
120
|
+
| Stale/Superseded leakage @ Top-5 (Naive FTS5 vs `rotless`) | `40.0%` vs `0.0%` |
|
|
121
|
+
| SQLite index size | `1,180.0 KB` |
|
|
122
|
+
|
|
123
|
+
Reproduce locally:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
python3 benchmarks/bench_warmup.py --seed 42 --scale 1000
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
See [benchmarks/README.md](benchmarks/README.md) for metric definitions and honest limitations.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Command Reference
|
|
134
|
+
|
|
135
|
+
### Core
|
|
136
|
+
- `rotless init [--dry-run] [--uninstall] [-y]` — Initialize local config, install Tier 1 agent hooks/skills, and run Day-0 session discovery.
|
|
137
|
+
- `rotless review [--days 14] [--json]` — 30-second Top-5 memory inbox (`[a]pprove`, `[l]ocal-save`, `[s]upersede`, `[e]dit`, `[i]gnore`, `[n]ext`, `[q]uit`).
|
|
138
|
+
- `rotless add "<content>" --tags ... [--local] [--verified]` (alias `create`) — Create a card with duplicate detection and instant SQLite indexing.
|
|
139
|
+
- `rotless search "<query>" [--scope memory|session|all] [--tags ...] [--all-chunks]` — Local FTS5 BM25 + CJK search (AND-first with OR fallback, collapsed per doc by default) and anti-rot demotion.
|
|
140
|
+
- `rotless handoff {list|search|show}` — Read-only cross-agent session browser and hybrid summary renderer.
|
|
141
|
+
- `rotless status` (alias `stats`) — Single-screen overview of memories, sessions, trusted repos, lint health, and agents.
|
|
142
|
+
|
|
143
|
+
### Hygiene & Trust
|
|
144
|
+
- `rotless lint [--local] [--fix] [--apply] [--json]` — Audit stale cards, broken `superseded_by` links, invisible Unicode, and file permissions (exits `1` when unhealthy); `--fix` previews deterministic repairs (`--apply` to write).
|
|
145
|
+
- `rotless verify <id> [--stale-after DATE | --extend DAYS | --clear-stale]` — Refresh `verified_at` via CAS while guarding against silently clearing expired `stale_after` dates.
|
|
146
|
+
- `rotless supersede <old_id> ["new text" | --by <new_id>] [--apply]` — Atomically mark an older card superseded using SHA-256 CAS.
|
|
147
|
+
- `rotless promote <id> [--keep-global] [--apply]` — Safely graduate a personal global card into `<repo>/.rotless/memories/` (fail-closed, dry-run by default).
|
|
148
|
+
- `rotless trust [path] | --list` / `rotless untrust [path]` — Manage explicit trust for repository `.rotless/memories/` overlays.
|
|
149
|
+
- `rotless show <id>` (`get`) / `rotless ls` (`list`) / `rotless rm <id>` (`delete`) — Inspect, list, or delete cards.
|
|
150
|
+
|
|
151
|
+
### Agent Hook & Indexing
|
|
152
|
+
- `rotless warmup [--format text|claude-hook|codex-hook|agy-hook] [--explain]` — Fast-path SessionStart context assembly.
|
|
153
|
+
- `rotless sync [--scope memory|session|all] [--dry-run] [--force]` — Explicit incremental or full index rebuild.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Documentation
|
|
158
|
+
|
|
159
|
+
- [Agent Onboarding Guide (`llms.txt`)](llms.txt)
|
|
160
|
+
- [Architecture & Anti-Rot Design](docs/architecture.md)
|
|
161
|
+
- [Coding Agent Integrations](docs/agents.md)
|
|
162
|
+
- [Security Policy](SECURITY.md)
|
rotless-0.2.0/README.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# `rotless`
|
|
2
|
+
|
|
3
|
+
**Zero-key, anti-rot local memory & cross-agent handoff CLI.**
|
|
4
|
+
|
|
5
|
+
[](https://www.python.org/downloads/)
|
|
6
|
+
[](pyproject.toml)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
`rotless` keeps your coding agents (**Claude Code**, **Codex**, **Cursor**, **Antigravity**, and read-only session handoff for **OpenCode**, **OpenClaw**, and **Hermes**) grounded in clean, versionable Markdown memory—without cloud uploads, daemon processes, or context rot.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Why `rotless`?
|
|
14
|
+
|
|
15
|
+
`CLAUDE.md` and `.cursorrules` are **static project handbooks**. After two weeks of debugging, ad-hoc notes pile up, contradict refactors, and silently waste context tokens. Cloud memory tools pull everything into remote vector stores and introduce privacy, latency, and API key friction.
|
|
16
|
+
|
|
17
|
+
| Capability | `CLAUDE.md` / Rules | Cloud Memory SaaS | `rotless` |
|
|
18
|
+
| :--- | :--- | :--- | :--- |
|
|
19
|
+
| **Source of truth** | Static repo file | Remote SaaS DB | **Plain Markdown** (global + `.rotless/memories/`) |
|
|
20
|
+
| **Anti-rot lifecycle** | Manual cleanup | Rare / opaque | **`supersede` + `stale_after` + CI `lint`** |
|
|
21
|
+
| **Cross-agent sharing** | Single tool | Plugin-dependent | **Shared memory + 7-agent read-only `handoff`** |
|
|
22
|
+
| **Network & API keys** | Local | Cloud upload + keys | **100% offline, 0 runtime deps, 0 API keys** |
|
|
23
|
+
| **Untrusted repo defense** | N/A | N/A | **Default-Deny `rotless trust` (like `direnv allow`)** |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 60-Second Quickstart
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# 1. Install (zero third-party runtime dependencies)
|
|
31
|
+
uv tool install rotless
|
|
32
|
+
|
|
33
|
+
# 2. Initialize vault, install Tier 1 hooks/skills, and scan existing local sessions
|
|
34
|
+
rotless init
|
|
35
|
+
|
|
36
|
+
# 3. Turn past debugging pain into verified cards in ~30 seconds
|
|
37
|
+
rotless review
|
|
38
|
+
|
|
39
|
+
# 4. Preview what your agents receive at SessionStart
|
|
40
|
+
rotless warmup --explain
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Let Your Coding Agent Set Up & Operate `rotless`
|
|
44
|
+
|
|
45
|
+
Point any AI coding agent (Claude Code, Codex, Cursor, Antigravity, etc.) directly at [`llms.txt`](llms.txt):
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
Read https://raw.githubusercontent.com/JustinBibi/rotless/main/llms.txt (or ./llms.txt) and set up rotless for this machine/repo.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## What a Memory Card Looks Like
|
|
54
|
+
|
|
55
|
+
Every memory lives as ordinary Markdown you can read, diff, or commit under `.rotless/memories/` (while `index.sqlite` stays isolated under `~/.local/share/rotless/`):
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
---
|
|
59
|
+
id: "7e9c2a1b-4c5d-4e8f-9a10-112233445566"
|
|
60
|
+
title: "Keep read-only SQLite warmup free of WAL DDL"
|
|
61
|
+
type: "learning"
|
|
62
|
+
tags: ["sqlite", "concurrency", "project:rotless"]
|
|
63
|
+
status: "stable"
|
|
64
|
+
created_at: "2026-12-06T08:00:00Z"
|
|
65
|
+
updated_at: "2026-12-06T08:00:00Z"
|
|
66
|
+
verified_at: "2026-12-06T08:00:00Z"
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
Open read-only warmup connections with `?mode=ro` URI and `PRAGMA query_only = ON`
|
|
70
|
+
instead of running `PRAGMA journal_mode = WAL` on every read, avoiding lock contention
|
|
71
|
+
when multiple coding agents start simultaneously.
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Security & Trust by Default
|
|
77
|
+
|
|
78
|
+
1. **Default-Deny Project Overlays**: Cloning a third-party repo with `.rotless/memories/*.md` never auto-injects into your agents. `warmup` emits a one-line stderr notice until you inspect and run `rotless trust`.
|
|
79
|
+
2. **Symlink Confinement**: Reads and atomic CAS writes reject symlinks and verify `realpath` containment inside the vault root.
|
|
80
|
+
3. **Credential Redaction & Fail-Closed `--local`**: Automatically redacts API keys, JWTs, bearer/basic tokens, and private keys; `rotless add --local` refuses writes containing secrets or workstation absolute paths.
|
|
81
|
+
4. **Nonce-Fenced Snippets**: `warmup` and `search` truncate bodies before wrapping in per-call `<untrusted-memory-{nonce}>` blocks and strip deceptive invisible Unicode/BiDi characters.
|
|
82
|
+
5. **Strict Permissions & Safe Undo**: Data/config directories default to `0700`, SQLite/configs/backups to `0600`, and `rotless init --uninstall` cleanly reverts agent edits.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Reproducible Benchmarks
|
|
87
|
+
|
|
88
|
+
Measured on `Darwin arm64 | Python 3.11.14 | SQLite 3.50.4` (`scale=1000` global + `12` local cards, `seed=42`):
|
|
89
|
+
|
|
90
|
+
| Metric | Value |
|
|
91
|
+
| :--- | :--- |
|
|
92
|
+
| In-process `warmup` latency (p50 / p95) | `8.30 ms` / `9.02 ms` |
|
|
93
|
+
| End-to-end CLI wall-clock `warmup` (p50 / p95) | `52.55 ms` / `54.23 ms` |
|
|
94
|
+
| Context size (Naive full dump vs `rotless warmup`) | `25,632 chars` -> `2,448 chars` (`-90.4%`) |
|
|
95
|
+
| Stale/Superseded leakage @ Top-5 (Naive FTS5 vs `rotless`) | `40.0%` vs `0.0%` |
|
|
96
|
+
| SQLite index size | `1,180.0 KB` |
|
|
97
|
+
|
|
98
|
+
Reproduce locally:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
python3 benchmarks/bench_warmup.py --seed 42 --scale 1000
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
See [benchmarks/README.md](benchmarks/README.md) for metric definitions and honest limitations.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Command Reference
|
|
109
|
+
|
|
110
|
+
### Core
|
|
111
|
+
- `rotless init [--dry-run] [--uninstall] [-y]` — Initialize local config, install Tier 1 agent hooks/skills, and run Day-0 session discovery.
|
|
112
|
+
- `rotless review [--days 14] [--json]` — 30-second Top-5 memory inbox (`[a]pprove`, `[l]ocal-save`, `[s]upersede`, `[e]dit`, `[i]gnore`, `[n]ext`, `[q]uit`).
|
|
113
|
+
- `rotless add "<content>" --tags ... [--local] [--verified]` (alias `create`) — Create a card with duplicate detection and instant SQLite indexing.
|
|
114
|
+
- `rotless search "<query>" [--scope memory|session|all] [--tags ...] [--all-chunks]` — Local FTS5 BM25 + CJK search (AND-first with OR fallback, collapsed per doc by default) and anti-rot demotion.
|
|
115
|
+
- `rotless handoff {list|search|show}` — Read-only cross-agent session browser and hybrid summary renderer.
|
|
116
|
+
- `rotless status` (alias `stats`) — Single-screen overview of memories, sessions, trusted repos, lint health, and agents.
|
|
117
|
+
|
|
118
|
+
### Hygiene & Trust
|
|
119
|
+
- `rotless lint [--local] [--fix] [--apply] [--json]` — Audit stale cards, broken `superseded_by` links, invisible Unicode, and file permissions (exits `1` when unhealthy); `--fix` previews deterministic repairs (`--apply` to write).
|
|
120
|
+
- `rotless verify <id> [--stale-after DATE | --extend DAYS | --clear-stale]` — Refresh `verified_at` via CAS while guarding against silently clearing expired `stale_after` dates.
|
|
121
|
+
- `rotless supersede <old_id> ["new text" | --by <new_id>] [--apply]` — Atomically mark an older card superseded using SHA-256 CAS.
|
|
122
|
+
- `rotless promote <id> [--keep-global] [--apply]` — Safely graduate a personal global card into `<repo>/.rotless/memories/` (fail-closed, dry-run by default).
|
|
123
|
+
- `rotless trust [path] | --list` / `rotless untrust [path]` — Manage explicit trust for repository `.rotless/memories/` overlays.
|
|
124
|
+
- `rotless show <id>` (`get`) / `rotless ls` (`list`) / `rotless rm <id>` (`delete`) — Inspect, list, or delete cards.
|
|
125
|
+
|
|
126
|
+
### Agent Hook & Indexing
|
|
127
|
+
- `rotless warmup [--format text|claude-hook|codex-hook|agy-hook] [--explain]` — Fast-path SessionStart context assembly.
|
|
128
|
+
- `rotless sync [--scope memory|session|all] [--dry-run] [--force]` — Explicit incremental or full index rebuild.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Documentation
|
|
133
|
+
|
|
134
|
+
- [Agent Onboarding Guide (`llms.txt`)](llms.txt)
|
|
135
|
+
- [Architecture & Anti-Rot Design](docs/architecture.md)
|
|
136
|
+
- [Coding Agent Integrations](docs/agents.md)
|
|
137
|
+
- [Security Policy](SECURITY.md)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "rotless"
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
description = "Zero-key, anti-rot local memory and cross-agent handoff CLI."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
dependencies = []
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "rotless contributors" },
|
|
15
|
+
]
|
|
16
|
+
keywords = ["ai-agents", "memory", "cli", "claude-code", "codex", "cursor", "sqlite", "fts5"]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 4 - Beta",
|
|
19
|
+
"Environment :: Console",
|
|
20
|
+
"Intended Audience :: Developers",
|
|
21
|
+
"Operating System :: MacOS",
|
|
22
|
+
"Operating System :: POSIX :: Linux",
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
"Programming Language :: Python :: 3.13",
|
|
27
|
+
"Topic :: Software Development :: Libraries",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.scripts]
|
|
31
|
+
rotless = "rotless.cli:main"
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
Homepage = "https://github.com/JustinBibi/rotless"
|
|
35
|
+
Repository = "https://github.com/JustinBibi/rotless"
|
|
36
|
+
Issues = "https://github.com/JustinBibi/rotless/issues"
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.packages.find]
|
|
39
|
+
where = ["src"]
|
|
40
|
+
|
|
41
|
+
[tool.setuptools.package-data]
|
|
42
|
+
rotless = ["integrations/templates/*"]
|
|
43
|
+
|
|
44
|
+
[tool.pytest.ini_options]
|
|
45
|
+
testpaths = ["tests"]
|
|
46
|
+
addopts = "-q"
|
|
47
|
+
|
|
48
|
+
[tool.ruff]
|
|
49
|
+
target-version = "py311"
|
|
50
|
+
line-length = 110
|
|
51
|
+
|
|
52
|
+
[tool.ruff.lint]
|
|
53
|
+
select = ["E", "F", "S", "B"]
|
|
54
|
+
ignore = ["E501"]
|
|
55
|
+
|
|
56
|
+
[tool.ruff.lint.per-file-ignores]
|
|
57
|
+
"tests/*" = ["S101", "S105", "S106", "S603", "S607"]
|
|
58
|
+
"benchmarks/*" = ["S101", "S603", "S607"]
|
rotless-0.2.0/setup.cfg
ADDED