This is the project setup pattern I use when I want AI coding agents to work in a repo without rediscovering the rules every session.
The core idea is simple: put durable context in the repo, put live work state in the tracker, and make the handoff between humans, issues, and agents explicit.
AGENTS.mdfor shared agent rules.CLAUDE.mdfor Claude Code-specific notes when a repo uses Claude.GOAL.mdfor long-running goal-loop conventions and evidence pointers.GUIDEPOST.mdfor guarded project scope and anti-drift decisions.docs/agents/issue-tracker.mdfor tracker routing.docs/agents/triage-labels.mdfor issue state vocabulary.docs/agents/domain.mdfor domain docs and ADR routing.scripts/check_scope_guards.pyand.github/workflows/scope-guards.ymlfor optional mechanical anti-drift checks.
I use Linear as the canonical issue tracker, GitHub as code hosting and PR review, and Codex or Claude as execution agents. You can adapt the same shape to another tracker.
Agents fail when project state is spread across chat history, stale markdown, half-remembered issue comments, and implicit human decisions.
This setup gives every agent the same answers:
- Where is the canonical work state?
- What is in scope?
- What is out of scope?
- Which issue is ready for an agent?
- Where are domain terms and architecture decisions recorded?
- What proof is required before calling work done?
- Linear owns live work state: issues, PRDs, blockers, acceptance, ownership, discussion, and completion.
- GitHub owns code, branches, commits, and PR review.
AGENTS.mdowns repo-local agent behavior.GUIDEPOST.mdowns durable scope and requires explicit human approval to change.GOAL.mdowns local goal-loop helper state and evidence pointers. It is not a duplicate work queue.docs/agents/*owns skill configuration: tracker routing, label vocabulary, and domain-doc layout.
If Linear and local markdown disagree about current work state, trust Linear. If local work implies a scope change, stop and update GUIDEPOST.md only with explicit approval.
- Create the repo and push it to GitHub.
- Create or confirm the Linear project.
- Copy the files under
templates/into the repo. - Fill placeholders such as
<github-owner>/<repo>,<linear-project>, and<codex-environment>. - Record explicit routing lines in Linear:
Repository: <github-owner>/<repo>
Codex environment: <codex-environment>
Default branch: main
- Add project-specific scope decisions to
GUIDEPOST.md. - Add any domain language to
CONTEXT.mdand architecture decisions todocs/adr/. - Verify the repo docs, tracker links, and routing before delegating work.
- Audit the repo before writing.
- Preserve existing project-specific rules.
- Decide what tracker is canonical.
- Add the
docs/agents/*files. - Merge agent rules into
AGENTS.mdandCLAUDE.mdinstead of replacing them. - Add or carefully update
GOAL.mdandGUIDEPOST.md. - Confirm Linear and GitHub routing.
- Verify the diff.
See docs/upgrade-project-flow.md.
The docs/agents/* files are designed to give Matt Pocock-style engineering agent skills the context they usually need before they can operate safely:
to-prdneeds to know where to publish product requirements.to-issuesneeds tracker routing and label vocabulary.triageneeds issue states and ready-for-agent rules.diagnoseandtddneed domain docs and ADR routing.- architecture review skills need domain vocabulary and prior decisions.
This is not an official integration with any one tool. It is a repo shape that makes those tools less dependent on chat memory.
See docs/skill-compatibility.md.
This repo includes public, scrubbed versions of the setup skills:
- skills/new-project/SKILL.md
- skills/upgrade-project/SKILL.md
- skills/setup-matt-pocock-skills/SKILL.md
Copy these into a repo and fill the placeholders: