Where AI Agent Decisions Live: In the Repo or on the Board?

Where AI agent decisions should live: the repo or the task?
Quick answer: AI agent decisions belong in two places, split by what they govern. Decisions about the code (conventions, architecture, build commands) go in the repo, in AGENTS.md, CLAUDE.md or an architecture decision record, so they ship with the branch. Decisions about the work (scope, owner, what changed and why) go on the task, where every agent and person reads them before starting.
A builder running several coding agents hit a familiar wall. One agent agreed an approach in its session, a different agent picked up the follow-up the next morning, and nothing it read said what had been agreed. Their conclusion: decisions have to live in the project, not in one tool's chat. Their question to us was direct. Where does Sharkly keep those decisions, in the repo or in its own store?
The honest answer is both, and the split isn't arbitrary. This post gives you a rule for which AI agent decisions go where, shows what Sharkly stores and what an agent reads when it picks up a task, and ends with a two-file setup you can copy today.
Why AI agent decisions get lost between sessions
Every coding agent session starts from a fresh context window. Whatever you agreed inside that window disappears with it unless something writes it down.
Tool memory doesn't fix this across agents. Claude Code keeps its auto memory under ~/.claude/projects/<project>/memory/, and Anthropic's memory documentation states that auto memory stays on the computer where it was written and isn't shared with other computers or cloud environments. Codex can't read it. Neither can a teammate's Claude Code on another laptop.
So the human becomes the router, the shared memory and the reviewer. You paste yesterday's conclusion into today's prompt. You remember which agent was told to keep the old endpoint. That works with one agent. With three, you're the bottleneck, and the decision you forgot to paste is the one the next agent quietly reverses.
The fix is to give each decision a home that the next reader, human or agent, opens by default. How to keep context when switching between coding agents covers the handoff mechanics. This post is about where the decision itself should live.
Shared memory for AI coding agents: repo or board?
One rule settles most cases: if a decision should change when the code changes, it belongs in the repo. If it should change when the work changes, it belongs on the board. Code decisions are versioned with the branch and reviewed in pull requests. Work decisions belong to one task, one owner and one moment, and they go stale when the task closes.
| Decision | Example | Home | Why there |
|---|---|---|---|
| Coding convention | "Use pnpm, never npm" | AGENTS.md or CLAUDE.md | Every session in the repo must obey it |
| Build and test commands | pnpm test --filter api | AGENTS.md | Agents run it, and it changes with the code |
| Architecture choice | "Events go through the outbox table" | ADR in docs/adr/ | Needs a reason that outlives any one task |
| Scope of this task | "Keep v1 unchanged until Q1" | Task description | Applies to this work only |
| Who owns which part | "Codex writes the migration, Claude Code reviews" | Assignee plus description | Changes as the work moves |
| Mid-task change of plan | "Drop offset paging, ship cursors" | Task comment, then the description | Needs a timestamp and an author |
| Team process | "Every PR gets a reviewer pass" | Agent instructions or a Skill | Spans tasks, not code |
Two traps sit on either side of this table. Put task decisions in AGENTS.md and the file turns into a changelog of one-off agreements: every session pays tokens to read it, and stale rules outlive their tasks. Put architecture decisions only on the board and the next contributor reading the code never sees why. A task closed six months ago is not where anyone looks.
Michael Nygard's original ADR post makes the case for keeping those records next to the code, and adr.github.io collects templates.
What goes in AGENTS.md versus an ADR?
AGENTS.md holds the rules an agent must follow right now: commands, conventions, guardrails. The AGENTS.md format is a plain Markdown file used by over 60,000 open-source projects, and OpenAI's docs say Codex reads AGENTS.md before doing any work. Claude Code reads CLAUDE.md and can read an existing AGENTS.md in its place.
An ADR holds the reasoning: the context, the options, the choice and its consequences. Keep AGENTS.md short and link to the ADR. The agent gets the rule, and the reason stays one click away.
Where should a decision made in chat go?
Nowhere final yet. A chat decision is a draft until someone writes it where the next agent reads. Promote it in order: a task comment the moment it's agreed, the task description once it holds, and the repo only if it becomes a lasting rule about the code.
How Sharkly stores decisions an agent can read
Sharkly has no separate "decision log" object. Decisions live in the places a run already reads. According to the Agent task execution docs, a task-backed run can include:
- the task title and description;
- status, priority, Project, Sprint and labels;
- recent comments and the comment that triggered the run;
- the Agent's instructions and assigned Skills;
- the Agent or Space Git repositories.
The last item is the bridge. When a run checks out your repository, the coding agent reads AGENTS.md or CLAUDE.md the way it always does. Sharkly doesn't copy those files into its own store, and it doesn't need to. Code decisions stay in Git, work decisions stay on the task, and the run puts both in front of the agent.
Agent instructions add a third layer. The settings panel describes them as text that every task carries, and the Agents docs note that instructions keep version history, so a bad edit is one restore away. Use them for how an agent works (role, checks, when to ask), not for what one task agreed. A procedure several agents share belongs in a Skill.
If your decisions currently live in four chat windows, start free on Sharkly, move one task's agreements into its description, and assign the next run to a different agent.
Where Sharkly has gaps, and the workarounds
Three gaps, stated plainly:
- Only recent comments ride along. A decision buried far back in a long thread may not reach the run. Promote anything still binding into the description under a "Decisions" heading.
- Agent Chat is not a task comment. The chat docs say a message in Agent Chat doesn't create a task comment, so a conclusion reached there is invisible to the next run. Copy it into the description or a comment.
- The Docs library isn't in the run context by default. Shared docs are versioned and searchable, and an agent can read one with
sharkly docs document view, but only when something tells it to. Link the doc from the task description and write "read this first".
A setup you can copy today
Two files cover it: one in the repo, one on every task.
1. Add a decisions pointer to AGENTS.md
# AGENTS.md ## Commands - Install: pnpm install - Test: pnpm test --filter api ## Conventions - TypeScript strict mode; no default exports. - Database access only through src/db/repo.ts. ## Decisions - Architecture decisions live in docs/adr/. Read every ADR a change touches before editing. - Task decisions (scope, owner, what changed) live in the task description, not here. - If a task decision should become a lasting rule, propose an ADR in the pull request. 2. Give every task a Decisions block
## Goal Add cursor pagination to GET /v2/orders. ## Decisions (current state, newest wins) - 2026-11-28: Keep /v1/orders unchanged until the Q1 deprecation. - 2026-11-29: Page size max 100, default 25. - 2026-11-29: Codex writes the migration; Claude Code reviews the PR. ## Out of scope - Offset pagination on /v1. ## Read first - docs/adr/0007-cursor-pagination.md - Shared doc: Orders API style guide The "newest wins" line does the heavy lifting. When a later comment changes a decision, edit the block and leave the comment as the audit trail. The description holds the current answer, and the comments hold how you got there. For fuller handoff formats, see coding-agent handoff templates.
Alternatives if you don't use a board
- Repo only. A
docs/decisions/folder plus aTASK.mdper branch. It works for one person, but nobody outside the branch sees task decisions until merge. - Tool memory. Fine for personal preferences. It stays on one computer inside one tool, so a second agent never sees it.
If you run two agents on one repo today, how to run Claude Code and Codex together shows the worktree side of the same problem.
Conclusion
Code decisions go in the repo. Work decisions go on the task. Chat holds neither until someone promotes it.
Your next step takes ten minutes: pick one active task, add the Decisions block, add the pointer to AGENTS.md, and assign the next run to a different agent than the last one. If it starts from what was agreed without you pasting anything, the split works. Then set up the same flow in Sharkly so every run reads it by default.
FAQ
Should I put task decisions in AGENTS.md?
No. AGENTS.md is read by every session in the repo, so one-off agreements cost tokens on unrelated work and outlive the task. Keep it to commands, conventions and pointers. Task scope belongs in the task description.
Do coding agents share memory with each other?
Not by default. Claude Code's auto memory stays on the computer that wrote it, and each tool keeps its own session state. Shared memory has to be a file or a record that every agent reads: the repo for code rules, the task for work decisions.
What is an architecture decision record?
An ADR is a short Markdown file that records one architecture decision: the context, the choice and its consequences. Teams keep them in the repo, often in docs/adr/, so the reason travels with the code.
Does Sharkly sync AGENTS.md or CLAUDE.md into its own store?
No. Sharkly checks out the Agent or Space repositories for the run, and the coding agent reads those files from the working directory as usual. The repo stays the source of truth for code decisions.
How do I stop an agent reversing an earlier decision?
Write the decision where the agent reads it before starting: the task description for this work, AGENTS.md or an ADR for the codebase. Then tell the agent in its instructions to read the Decisions block first.
Where should decisions made in Agent Chat go?
Copy them into the task description or a task comment. Agent Chat messages don't become task comments, so the next run won't see them otherwise.
原文:https://www.a8q9.cn/en/article/where-ai-agent-decisions-live-in-the-repo-or-on-the-board-00cee2.html

