Section is a cross-platform source/path sync collaboration layer.
Section promises:
source/pathstays the primary model- a source can bind to a local directory
- regular files and directories sync into that local tree
- humans and agents work against the same local paths
- state is visible and controllable
- public state stays at
ready / syncing / conflict / error
Section does not promise:
- identical host-native execution semantics across platforms
- strict round-trip preservation for every POSIX metadata field
- support for every filesystem object type in MVP
| Surface | Role |
|---|---|
| Local file tree | daily read/write surface for humans, editors, shells, and agents |
| Control plane | source/path status, compare, resolve, sync, and diagnostics |
| Runtime layer | execution environment outside the current project scope |
- regular files
- directories
Each source and path exposes only:
readysyncingconflicterror
The following remain detail fields rather than primary state:
local_presentdirty_localdirty_remotepinnedstale- health reason
- error reason
MVP preserves:
- path
- type
- size
- modified time where practical
- content hash/version where practical
MVP does not promise strict preservation for:
- uid/gid
- owner/group
- ACL
- execute bit across all platforms
- xattr
- symlink / hardlink
- device files / sockets / FIFOs
MVP conflict is stale-overwrite protection.
conflict means:
- a local upload is based on stale remote state
- Section refuses a blind overwrite
When conflict happens:
- the path enters
conflict - sync for that path pauses
- the local file is preserved
- the current remote version is not overwritten automatically
Resolution actions are:
use-localuse-remote
If a user merges manually in an editor, the final action is still use-local.
The control plane exists because the local file itself cannot reliably express sync truth.
Minimum control-plane surface:
watch- event stream for source/path state changes
path inspect- public state
- detail fields
base_remote_versioncurrent_remote_version
path compare- whether local is based on current remote
- local/remote compare references
path resolve --strategy use-local|use-remote- explicit conflict resolution
Each bound local root should contain:
.section/root.json
It exists only for discovery and should minimally identify:
source_idlocal_rootsectiondcontrol-plane endpoint
The preferred agent flow is:
- subscribe once with
watchfrom a local path or bound root - let the client discover
.section/root.jsoninternally - react to state-change events
- call
inspect/compareonly when needed - call
resolvewhen action is required
Common control-plane entry points should accept local paths directly:
section --json watch ./section --json path inspect ./some/local/filesection --json path compare ./some/local/filesection --json path resolve ./some/local/file --strategy use-local
MVP should deliver:
- connect one or more sources
- bind a source to a local directory
- sync regular files and directories into that local tree
- converge local and remote changes
- expose
ready / syncing / conflict / error - expose control-plane status / compare / resolve / watch surfaces