OXYGENHUB
# 5259a3af8ee6 oxygen / docs / plan.md
4.5 KiB · Markdown · last changed Pack merging above 16 packs; modern CLI presentation (colour, spinners, --plain, NO_COLOR); oxy prompt with manifest-based dirty check and docs/prompt.md 1 month ago renderedsource blame history raw
1
# Overnight work plan
2
3
Each loop iteration: pick the first unchecked item, implement it with tests, run the gated checks, commit with `oxy`, tick the box here with a one-line note, and commit again. Update `docs/spec.md` (and its changelog) whenever behaviour the spec describes changes. If an item cannot be finished in two iterations, note why under it and move on.
4
5
## Rules
6
7
- Never run `git init` in this directory or push this project anywhere. Oxygen tracks itself with `target/release/oxy`.
8
- Never modify `~/development/tetriblox`; use only mirror clones in the scratch directory.
9
- Tests must stay hermetic (`hermetic()` / `OXY_HOME`); never touch `~/.config/oxy`.
10
- Gate every commit on `cargo test --workspace` exit status and a clean `cargo clippy --workspace --all-targets`.
11
- No new external services, no publishing, no artifacts.
12
13
## Items
14
15
- [ ] Checkpoints (spec §11): serialize a `State` to a checkpoint object, load the nearest checkpoint in `load_state` and replay only the difference, create one automatically every `core.checkpoint-interval` changes (default 256) and on demand (`oxy checkpoint`). Benchmark before/after on a 5,000-change synthetic repository and record the numbers here.
16
- [ ] Pack merging (spec §13.4): merge packs when more than 16 exist; `oxy gc` reports it.
17
- [ ] Modern CLI presentation (user request, 2026-09-26 23:20): colour and bold for ids, paths, and statuses; a live spinner or updating status line while a command works (snapshot, fetch, push, import, gc); indented, grouped output like Claude Code's. Use `console`/`indicatif` or equivalent; detect a TTY and honour `NO_COLOR` and `--no-color`/`--plain` so pipes and scripts get plain text; keep `--json` where it exists. Touch every command's output for consistency.
18
- [ ] Shell prompt integration (user request, 2026-09-26 23:30): `oxy prompt` prints a compact one-line summary for shell prompts in a few milliseconds and with no side effects (no snapshot operation recorded, no locks): bookmark, working-copy ChangeId prefix, head count, a dirty marker (compare the file system against the working copy cheaply: sizes and mtimes first, content only when they differ), conflict marker, and ahead/behind counts against `remotes/origin/<bookmark>` when known. Provide `docs/prompt.md` with an oh-my-bash/bash snippet (`oxy_prompt_info` function, silent outside an oxy repository, colours via `--plain` off) and a zsh variant. Format flags: `--format` with placeholders, `--plain`.
19
- [ ] Pending The user's second request in the same message was cut off after "Can we also look at"; ask them to complete it in the morning.
20
- [ ] Lazy blobs and the `objects` endpoint (spec §13.5, §16.1, §17): `clone --max-blob SIZE`, absent blobs recorded with their remote, fetched on first read; server endpoint; wire encoding in spec §16.3.
21
- [ ] Sparse checkout (spec §17): `filter.paths` in config, `clone --sparse PATH..`, status/commit/checkout honour it.
22
- [ ] Shallow clone (spec §17): `clone --depth N`, shallow boundary with a checkpoint, `oxy deepen`.
23
- [ ] Tags (spec §10.1, §14.4): `oxy tag create|list`, tag attestations, tags in views, wire, and export.
24
- [ ] Multiple workspaces (spec §12.2): `oxy workspace add|list|forget`, per-workspace directory metadata, snapshot lock.
25
- [ ] `.oxyattributes` (spec §19): `binary`, `eol=lf|crlf`, `nocompress`, `lockable` (advisory locally).
26
- [ ] Hooks (spec §20): `pre-commit`, `post-commit`, `pre-push`, `post-fetch`, `post-checkout`, and the `semantic-deps` hook with its JSON interface.
27
- [ ] Amend on non-head changes with a diff-derived correspondence; `oxy split`.
28
- [ ] Reify orphaned references on rewrite as conflicts instead of refusing (spec §8.4); define the conflict shape in the spec.
29
- [ ] Identity lifecycle: `oxy identity rotate|revoke`, expiry, delegates (`oxy identity delegate add|remove`), multi-signer policy updates.
30
- [ ] Rename detection on Git import (similarity ≥ 50%); `oxy git fetch`/`push` against a Git remote via a mirror.
31
- [ ] Hardening: property tests for the CBOR decoder and pack reader against random and mutated inputs; a concurrent-push test against the server; a 1 GB single-file benchmark for chunking and blobs.
32
- [ ] Documentation: `docs/guide.md` (user guide by task) and `docs/protocol.md` (for other implementers, derived from spec §16 and the wire encodings).
33
- [ ] Spec review pass: resolve or re-word every "MAY ... until" allowance introduced during implementation, and close what can be closed in §27.
34
35
## Log
36
37
- 2026-09-26 23:01 plan created.