Expand description
Crossing a collective boundary, only ever on the engineer’s word: borg move and borg correct.
Collectives never mix on their own (collective.rs): a session reads and writes only the store its repo routes to. But a lesson can land in the wrong collective, a repo can change collectives, and one session can correct things that belong to two collectives. Each of those is an explicit act the engineer triggers, through the harness skill or a terminal:
borg move <lesson-id> --to <collective>appends the lesson’s latest version to the target store as its next version and withdraws it from the source with a tombstone (MOVED) that keeps its episodes, so the source’s own “done” rule never learns them again. The target notes the move in its localPLACED_FILE(never synced: the source’s name never reaches the target’s team), soborg doctornever calls the lesson misplaced. A lesson another engineer is on stays in a team store as it is (copied, never hidden from their team); a local store’s copy is always withdrawn, since no team reads it. A lesson in the source’spersonal.jsonlmoves to the target’s;--personalputs a lesson there. Moving it again changes nothing.borg move <repo-path> --to <collective>moves the episodes of that repo the stores hold but have not learned into a lesson (with their not-a-lesson marks) to the target store, deduped there, when the repo routes to the target now. Without--fromonly stores that hold them because the repo routes there (learn.rsheld) give them up. Episodes already learned stay with their lessons;borg move <id>moves a lesson.borg correct --collective <name> <words>records a correction of the current session as an episode in that collective’s store (viaVIA), learned there at the session’s end like any other. One command per collective the correction concerns, the session’s own included: the raw words the hooks captured in the session’s collective are set aside, so each collective learns only what was said for it. Into another collective goes only what the engineer said: no task, proposal or email of the session’s collective.
Both are dry runs where they change stores (--apply writes), and take each store’s locks (in path
order, never one twice). borg doctor lists what may need a move (doctor): evidence held in a
store its repo no longer routes to, lessons that name another collective’s repo, and the repair of
lessons a borg before 0.7.4 withdrew to a private collective. It only shows the commands; it never
moves anything.
Structs§
- Lesson
Move - What moving a lesson does.
- Repo
From - What moving a repo’s evidence takes from one store.
- Repo
Move - What moving a repo’s evidence does.
- Said
- One correction
borg correctrecords. - Store
- One collective’s store.
Constants§
- CORRECTION_
CHARS - The most characters of a correction
borg correctrecords. Guard: bounds the episode as the hook bounds a captured correction (learn.rsEXCERPT_CHARS): derived, the same bound. - CORRECT_
FLAGS borg correct’s flags (completions.rs).- MOVED
- The question of the tombstone a move leaves in the source store: no text left to deliver or sync.
- MOVE_
FLAGS borg move’s flags (completions.rs).- PLACED_
FILE - A store’s record of the lessons
borg moveplaced in it ({"id", "from", "ms"}lines): placed by the engineer, so never “misplaced?”. Local: borg-meshSYNCEDdoes not list it. - VIA
Episode::viaof a correctionborg correctrecorded for a named collective: placed by the engineer, so no routing check ever holds it back or calls it misplaced (learn.rsCORRECT).
Functions§
- corrected_
homes - The stores
borg correctrecorded a correction ofsessioninto. - doctor
borg doctor’s checks of where lessons and evidence sit (see the module doc);meis this engineer’s git email. Nothing without a config: one store holds everything.- doctor_
with doctorunder explicit aliases.- main_
correct borg correct …; returns the exit code.- main_
move borg move …; returns the exit code.- move_
lesson - Moves lesson
id(plan_lesson), withapplywriting it under both stores’lessons.jsonllocks, planned again under them; the dry run writes nothing. - move_
repo - Moves the waiting episodes of
repo(a repo name, as episodes carry it) fromsourcestoto, one source at a time under both stores’episodes.jsonlandlessons.jsonllocks (so a runningborg learnon either finishes first and never learns an episode as it leaves); the dry run writes nothing. - named
- The store of the collective
name. - plan_
lesson - Plans moving lesson
idfromfromtoto(personal: into the target’s [PERSONAL_FILE]);meis this engineer. - record_
correction - Records
sas a pushback episode in the storehome, once (learn.rsrecord_new_in, which also counts it); None when the store holds it already. - repo_
sources - The stores a
borg move <repo-path> --to <to>takesrepo’s evidence from when no--fromnames one: those that hold it waiting only because the repo routes totonow (learn.rsheld). A store that may hold another repo of that name, or this one by right, is never a source unasked. - set_
aside - Sets aside, in the session’s own store
here, the engineer’s latest prompt the hooks recorded as a correction (hook.rsrecord:#borg-episode <id>in the session’s state file): aborg correctrestates it for each collective it concerns, so its raw words are not learned in this collective besides. Only the latest prompt’s episode (newer than the session’s task, which the hook rewrites on every other prompt), and only while unlearned. Marked as settled (episodes-not-lessons.txt) under the store’s learning lock; the episode stays, so transcript capture never records it again. Returns its id. - stores
- Every collective’s store under the root store
base(without a config, “default” atbase).