Expand description
Local worktree → team project mapping (AP06-D01, owner decision 19.10.).
Every checkout is its own local partition (hash_project_root, AP01).
lean-ctx project link maps one partition to a team project id so team
commands of that checkout address the project without --project. The
mapping is local state of this machine: one JSON store in the data
directory, keyed by partition, written atomically, bounded. It grants
nothing — the team service still decides every request — and it is never
the team artifact authority (intelligence_runtime.team_artifact_projects).
Structs§
- Project
Link - One checkout’s link. Fields that are not known locally stay
Noneand are left out of every answer rather than invented.
Constants§
- CHANGE_
WITH - MAX_
LABEL_ CHARS - Longest label kept.
- REMOVE_
WITH
Functions§
- link
- Link the checkout at
link.workspace_root; returns the link it replaced. - link_
for_ root - The link of the checkout at
root, if any. An unreadable store reads as no link here;link/unlinkreport it. - link_
time nowas a link time: RFC 3339 UTC, whole seconds.- linked_
checkouts - The other checkouts linked to the same team project (and organization)
as the checkout at
root, with that link: the checkouts whoseconventionfactsrootis served (AP01 §4). Ordered by partition, so a reply built from them is byte-stable.Nonewhenrootis unlinked. - mapping_
json project.mappingforroot: the link object, or"unmapped".- unlink
- Remove the link of the checkout at
root; returns it.