]> git.giacomolli.uk - onechat/commit
Give each agent a config and user instructions
authorAnderson A. Giacomolli <redacted>
Fri, 6 Nov 2026 22:05:03 +0000 (19:05 -0300)
committerAnderson A. Giacomolli <redacted>
Fri, 6 Nov 2026 22:05:03 +0000 (19:05 -0300)
commit4a605fa39078354654ae648e489c117c7a445197
tree7c2ee4be9c27e694a31762b772c2b9414c51fa9c
parent2532718d5288e1a2586fe5716cc41bb2a0210e16
Give each agent a config and user instructions

Each agent has its own directory with a config.json: the name, a random
ID, the model, the effort, and the working directory of its commands.
The first open writes the file with the defaults (OneChat, gpt-6.1-sol
at medium effort, the home directory) and a new 128-bit ID, and no later
open changes the ID. The prompt cache key comes from the ID, so a rename
keeps the prompt cache and two agents with one name do not share a key.
An unknown field is an error, and the ID must be there.

The user's instructions are in instructions.md in the agent's directory.
The prompt puts them at its end and gets back the clause of the
reference design that points to them. Without instructions the prompt
has neither, so it describes only what exists. The agent reads the file
on each call, and the compactor takes the prompt from the agent at each
build, so turns and compactions keep one cached prompt.

Issue: 5daf23e
agent.go [new file with mode: 0644]
agent_test.go [new file with mode: 0644]
compactor.go
compactor_test.go
probe.go
probe_test.go
prompt.go
prompt_test.go