|
| 1 | +# Sorrel Agent Task Pack |
| 2 | + |
| 3 | +Last updated: 2026-07-30 UTC |
| 4 | + |
| 5 | +Small, self-contained work orders derived from [`ROADMAP.md`](ROADMAP.md). |
| 6 | +Each open task below is written as a **complete prompt you can paste to an |
| 7 | +agent verbatim** — it carries all the context the agent needs and does not |
| 8 | +assume it has read anything else. |
| 9 | + |
| 10 | +> **Status 2026-07-30:** Wave 1 and Wave 2 are **done and merged** (see the |
| 11 | +> completed ledger below); their prompts have been removed from this pack. |
| 12 | +> Only CI work remains open. CI-1 has shrunk: `sorrel-hub` and |
| 13 | +> `sorrel-hub-web` got their workflows, so CI-1 now covers only |
| 14 | +> `sorrel-protocol`, `sorrel-vault`, and `sorrel-slices`. Root CI exists but |
| 15 | +> cannot clone the private submodules until the repository has a |
| 16 | +> `SUBMODULES_TOKEN` secret and its workflow is updated with a credential that |
| 17 | +> has GitHub's `workflow` scope. |
| 18 | +
|
| 19 | +## Completed (crossed off — prompts removed) |
| 20 | + |
| 21 | +- ~~PROTO-1 — Conflict and MergeResult object schemas~~ (merged 2026-07-17) |
| 22 | +- ~~CORE-1 — Merge base over the snapshot DAG~~ (merged 2026-07-17) |
| 23 | +- ~~CORE-2 — Dependency-free three-way line merge~~ (merged 2026-07-17) |
| 24 | +- ~~CORE-3 — First-class Conflict and MergeResult objects~~ (merged 2026-07-17) |
| 25 | +- ~~CORE-4 — Snapshot-level three-way merge~~ (merged 2026-07-17) |
| 26 | +- ~~CLI-1 — Real `lane list` / `lane switch` with per-lane heads~~ (merged 2026-07-17) |
| 27 | +- ~~CLI-2 — Change index so `log` shows change ids/authors/messages~~ (merged 2026-07-17) |
| 28 | +- ~~CLI-3 — `sorrel merge <lane>`~~ (merged 2026-07-17) |
| 29 | +- ~~HUB-1 — Persist product metadata to disk~~ (merged 2026-07-17) |
| 30 | +- ~~HUB-2 — List known sync repositories~~ (merged 2026-07-17) |
| 31 | +- ~~WEB-1 — Sync status view~~ (merged 2026-07-17) |
| 32 | +- ~~PROTO-2 — Conflict hunks carry base content~~ (schema `baseLines` is a |
| 33 | + string array; example + docs aligned) |
| 34 | +- ~~CORE-5 — Align stored Conflict/MergeResult with the protocol schema~~ |
| 35 | + (`src/conflict.rs` carries `repoId`, content refs, and the three input |
| 36 | + snapshot ids; root pointer advanced in `478797f`) |
| 37 | +- ~~CLI-4 — `sorrel merge --continue`~~ (shipped with tests + root E2E |
| 38 | + coverage; DEMO.md updated) |
| 39 | +- ~~HUB-3 — Configurable trusted grants~~ (shipped as |
| 40 | + `SORREL_HUB_TRUSTED_GRANTS_FILE` plus default-on local bootstrap grants, |
| 41 | + `SORREL_HUB_BOOTSTRAP_GRANTS` — see `sorrel-hub/src/bootstrap-grants.js`) |
| 42 | +- ~~CLI-5 — Authorized push (grantRefs on mutating sync calls)~~ (the |
| 43 | + out-of-the-box push 403 is fixed: push/ref-advance send `grantRefs` for the |
| 44 | + Hub bootstrap grants; see `sorrel-cli/SYNC.md`. The per-remote |
| 45 | + `--grant-ref` flag variant was not needed and was not built.) |
| 46 | +- ~~Git bridge — colocated bidirectional mirror~~ (`sorrel git sync` now |
| 47 | + incrementally fast-forwards whichever side moved; divergence is parked on a |
| 48 | + `git/<branch>` lane for normal merge resolution; roadmap item 3 is complete) |
| 49 | +- ~~CI (partial) — `sorrel-hub` and `sorrel-hub-web`~~ (`.github/workflows/ci.yml` |
| 50 | + on both mains; root workflow exists but its private-checkout authentication |
| 51 | + still needs the manual setup below) |
| 52 | + |
| 53 | +## How to use this pack |
| 54 | + |
| 55 | +- **One agent per task, one task at a time per repository.** Tasks in |
| 56 | + different repositories can run in parallel. |
| 57 | +- Agents work **inside the named submodule repository only**. They must not |
| 58 | + touch other repos or the root repo's submodule pointers. |
| 59 | +- When an agent finishes: review, merge its branch into that repo's `main`, |
| 60 | + then report back (template at the bottom). The orchestrator advances root |
| 61 | + pointers and updates the status docs. |
| 62 | + |
| 63 | +## Dependency map |
| 64 | + |
| 65 | +``` |
| 66 | +CI-0: manual repository-admin prerequisite |
| 67 | +CI-1, CI-2: independent, anytime |
| 68 | +``` |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +## CI |
| 73 | + |
| 74 | +### CI-0 — Unblock root CI private checkout (manual repository setup) |
| 75 | + |
| 76 | +This step needs a repository administrator and a credential with GitHub's |
| 77 | +`workflow` scope; a normal code agent cannot complete it: |
| 78 | + |
| 79 | +1. Create a fine-grained PAT with read-only Contents access to every private |
| 80 | + `sorrel-*` repository. |
| 81 | +2. Add it to the root repository's Actions secrets as `SUBMODULES_TOKEN`. |
| 82 | +3. Update `.github/workflows/ci.yml` so `actions/checkout` uses that secret, |
| 83 | + disables persisted credentials, and configures Git authentication for the |
| 84 | + private `sorrel-core` Cargo dependencies. |
| 85 | +4. Re-run root CI and confirm both module suites and the no-mock E2E pass. |
| 86 | + |
| 87 | +### CI-1 — GitHub Actions for the remaining self-contained Node repos |
| 88 | + |
| 89 | +### CI-1 — GitHub Actions for the remaining self-contained Node repos |
| 90 | + |
| 91 | +```text |
| 92 | +Repositories (do each in its own branch in its own repo): |
| 93 | + https://github.com/MGRAFF2006/sorrel-protocol |
| 94 | + https://github.com/MGRAFF2006/sorrel-vault |
| 95 | + https://github.com/MGRAFF2006/sorrel-slices |
| 96 | +
|
| 97 | +Context: Sorrel is split across repos; these three are Node packages with no |
| 98 | +cross-repo dependencies and no CI yet (sorrel-hub and sorrel-hub-web already |
| 99 | +have workflows — do NOT touch them). Each defines npm scripts — check its |
| 100 | +package.json: all have "test"; protocol and vault also have "validate"; |
| 101 | +slices has "lint". |
| 102 | +
|
| 103 | +Task: in each repo add .github/workflows/ci.yml: |
| 104 | +- Trigger: push to main + pull_request. |
| 105 | +- Node 22 (actions/setup-node@v4 with node-version: 22, actions/checkout@v4). |
| 106 | +- Steps: npm ci when a package-lock.json exists, otherwise npm install; |
| 107 | + then npm test; then npm run validate / npm run lint where those scripts |
| 108 | + exist in that repo's package.json. |
| 109 | +- Keep it to a single job named "test"; no matrix, no caching complexity. |
| 110 | +
|
| 111 | +Validate: run the same commands locally in each repo and confirm they pass; |
| 112 | +YAML must parse (e.g. node -e with a YAML parser is NOT available — just be |
| 113 | +careful, or validate on a scratch branch push). |
| 114 | +
|
| 115 | +Deliver: one branch per repo, do not merge yourself. Report per repo: branch |
| 116 | +name, commit SHA, local command output. |
| 117 | +``` |
| 118 | + |
| 119 | +### CI-2 — GitHub Actions for sorrel-core |
| 120 | + |
| 121 | +```text |
| 122 | +Repository: https://github.com/MGRAFF2006/sorrel-core (work only in this repo) |
| 123 | +
|
| 124 | +Context: Sorrel's Rust engine. Stable Rust 1.85+, self-contained (no |
| 125 | +cross-repo git dependencies), tests + clippy + rustfmt are the standard |
| 126 | +checks, and benches exist (cargo bench, dependency-free harness). No CI yet. |
| 127 | +
|
| 128 | +Task: add .github/workflows/ci.yml: |
| 129 | +- Trigger: push to main + pull_request. |
| 130 | +- ubuntu-latest, dtolnay/rust-toolchain@stable with components clippy,rustfmt. |
| 131 | +- Steps: cargo build --all-targets; cargo test; cargo clippy --all-targets |
| 132 | + -- -D warnings; cargo fmt --all -- --check. Add Swatinem/rust-cache@v2. |
| 133 | +- Do NOT run cargo bench in CI (perf budgets are machine-sensitive). |
| 134 | +- Single job named "test". |
| 135 | +
|
| 136 | +Note: sorrel-cli and sorrel-runners are NOT part of this task — they pin |
| 137 | +sorrel-core as a private git dependency and need a token strategy first. |
| 138 | +
|
| 139 | +Validate: run all four commands locally and confirm green. |
| 140 | +
|
| 141 | +Deliver: one branch, do not merge yourself. Report: branch name, commit SHA, |
| 142 | +local command output. |
| 143 | +``` |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +## Later (needs a stronger agent — not in this pack) |
| 148 | + |
| 149 | +- Embedding surface / C ABI (roadmap item 6). |
| 150 | +- Production auth for the Hub (roadmap item 5 remainder). |
| 151 | +- CI for sorrel-cli / sorrel-runners: needs a PAT secret so Actions can fetch |
| 152 | + the private sorrel-core git dependency. |
| 153 | + |
| 154 | +## Report-back template |
| 155 | + |
| 156 | +When a task's branch is merged into its repo's `main`, report: |
| 157 | + |
| 158 | +``` |
| 159 | +Task: <id, e.g. CI-2> |
| 160 | +Repo + branch: <repo> / <branch> |
| 161 | +Merged main commit: <sha> |
| 162 | +Checks: <commands + pass/fail> |
| 163 | +Notes: <deviations, discovered debt, anything out of scope> |
| 164 | +``` |
| 165 | + |
| 166 | +The orchestrator then advances the root submodule pointer and updates the |
| 167 | +status docs ([`docs/STATUS.md`](docs/STATUS.md)). |
0 commit comments