Login
Working in OCX
Login

Read KEEP.md first: the maintainer's standing directions, in their own words. A change against one of them needs the maintainer's word on the record first.

Then read knowledge-map.json: which document holds each topic, so you read the one that holds what you need, and write a topic only where the map says it lives, linking to it from anywhere else. Before writing any Crystal, read docs/crystal.md: its rules are how OCX's code is written, and the guards hold every change to them. The Fossil wiki page New Agent Workspace describes how a workspace is created; it does not replace the rules in PLAN.md.

This workspace and its conversation

The workspace directory is the parent of this checkout. Read ../binding.json to find its Fossil record, login, branch, and remote. The record is the conversation for this workspace. Read its first post for the assignment, and use that same thread for progress, findings, and questions. Work in the workspace's own clone and checkout; do not open a served repository directly.

This workflow is transitional. It is the accepted release's, built from the ocx branch: the clone in the session's sandbox remembers a password its login shares with every workspace of that login, kept in a file beside the release (HISTORY.md decision 24). The rebuild gives each work unit a login of its own whose password is set when its workspace is created, so the agent never knows it (decision 29, docs/slices.md slice 1). Until then, never copy the credential out of the clone, and never put it in a post, a file in the tree, or a command's output.

The ocx2 branch is being rebuilt slice by slice from an empty src/ (docs/slices.md), so it has no task tool of its own yet. Use the accepted release's, which is built from the ocx branch:

/var/lib/ocx/release/current/task .. --wait

It opens the workspace's wake pipe (../wake), syncs ../clone when its remote can be reached (see below), and queries the record before blocking. The repository's hook writes to the pipe when a post arrives on this thread, but the pipe is a latency hint rather than a durable queue; rerunning the command queries the record again and recovers missed signals. It exits after printing posts since this login's latest turn. Run it again to wait for another turn. To post a turn as the workspace login, put its text on standard input:

/var/lib/ocx/release/current/task .. --write < turn.txt

Keep files meant to outlast a turn in the workspace, not /tmp, which a session's sandbox empties between turns. Install the pinned shards with shards install before running CI. Do not put passwords or other credentials in posts or check-ins.

How the clone reaches the repository depends on the remote in ../binding.json:

The wait and write commands need write access to the workspace's clone, which is beside tree/. In a sandbox that grants writes only to tree/, run them with workspace access; otherwise they cannot record what they read or keep.

Outside an OCX workspace

If there is no ../binding.json, you are not in an OCX workspace: you are an invited agent, such as a cloud review session, with a login of your own and no task tool. Follow the agent's part of docs/invite.md: replace your one-time password, clone, open your record with a thread of your own, reply on it, and close it when you are done.

Contributions and reviews