cd /news/ai-agents/product-context-for-ai-coding-agents… · home › topics › ai-agents › article
[ARTICLE · art-174568] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=· neutral

Product Context for AI Coding Agents: What to Share and How

A developer outlined a three-layer approach for supplying product context to AI coding agents: a short repository instruction file such as AGENTS.md or CLAUDE.md, a per-task spec packet, and a live link to the team's product source of truth via MCP servers like Linear, Notion and Specky. The writeup argues agents can read code but not customer evidence or decision rationale, citing Stack Overflow's 2025 survey finding that 14.1% of developers use AI agents daily at work and 86.9% worry about the accuracy of agent-provided information.

recommendation

Keep repository instruction files to durable commands, conventions and security rules, and put per-change intent, evidence and reviewer checks in a task packet or MCP-linked source of truth instead.

more in playbook: Working with AI coding agents
by read9 min views4 publishedNov 23, 2026

Coding agents can read your code but not your customers. Here is what product context they need, which tools deliver it, how much is too much, and a task packet you can copy.

Product context for AI coding agents is the small, current set of facts an agent needs that the code cannot show: who has the problem, the evidence, the current decision and its owner, the constraints, and how a person will check the result. The best setup has three layers: a short repository instruction file, a task packet per change, and a live link to your product source of truth.

Key takeaways

A coding agent can read your repository, run your tests and search your files. It cannot read the customer call that started the request, the trade-off the team agreed in Tuesday's meeting, or the reason a feature is deliberately out of scope. That is product context: the "who" and "why" behind the code change.

Code context (the agent can find it) Product context (someone has to supply it)
Frameworks, file layout, existing patterns Who has the problem and how often
Test, build and lint commands Evidence: interviews, tickets, analytics
Function signatures and types The current decision, its owner and its date
Past commits and code comments What is deliberately out of scope
Error messages and logs Constraints from customers, contracts or policy
CI results What a reviewer will check before accepting

Agents are now common enough that the gap matters. In Stack Overflow's 2025 survey, 14.1% of developers used AI agents at work daily, and 86.9% were concerned about the accuracy of the information agents provide (Stack Overflow, 2025). Some of that inaccuracy is the model. Some of it is a request that left the important product facts out.

No single tool covers it. Each way of delivering context is good at one layer and weak at the others, so the useful question is which combination fits where your team keeps its decisions.

Approach Examples Good for Weak at
Repository instruction files CLAUDE.md ,AGENTS.md ,.cursor/rules ,.github/copilot-instructions.md Durable engineering rules, commands, conventions Changing decisions and customer evidence; loads on every task
A spec or PRD file per task docs/specs/<feature>.md , GitHub Spec Kit, Kirorequirements.md One change's intent, scope and checks History across features; the evidence behind the decision
Issue tracker via MCP Linear's MCP server (issues, projects, comments), Jira Ticket scope, status, discussion The "why" is often missing from tickets
Docs or wiki via MCP Notion MCP (search, create and edit pages, databases) Finding existing specs and notes Telling the current decision from an old proposal
Product evidence workspace via MCP Specky's MCP server ( get_product_context ,get_coding_brief ) Decisions linked to the customer evidence behind them Only as good as the decisions the team records there
Pasting into chat Copy and paste, @file references One-off questions Gone after the session; costs context on every turn

Sources: Linear, Notion, Claude Code docs, Cursor docs.

The Model Context Protocol (MCP), which Anthropic released as an open standard on 25 November 2024, is what makes the live rows possible: one protocol instead of a custom connector per data source (Anthropic, 2024). Linear, for example, hosts a server that works with Claude Code, Cursor, Codex and VS Code over OAuth 2.1 (Linear docs).

A practical default for a small team:

AGENTS.md or CLAUDE.md with commands, conventions, security rules, and one line saying where product decisions live. Prefer read-only access for coding agents unless the task needs writes. Linear offers a separate read-only endpoint for exactly this. It matters: 81.4% of developers in the Stack Overflow survey had security and privacy concerns about data when using AI agents.

Less than you think, chosen with care. Three lines of research point the same way.

Long inputs degrade performance. Chroma's 2025 study ran 194,480 calls across 18 models from Anthropic, OpenAI, Google and Alibaba. Performance dropped as input length grew in every experiment, and topically related "distractor" passages reduced accuracy further. On LongMemEval, a conversational memory benchmark, every model scored significantly higher with a focused prompt of about 300 tokens than with the full prompt of about 113,000 tokens (Chroma, 2025).

Position matters. In the "Lost in the Middle" study, models used information best when it sat at the beginning or end of a long input, and noticeably worse when it sat in the middle (Liu et al., TACL). The one constraint that matters can disappear inside a long export.

Attention is a budget. Anthropic describes context rot as a model's falling ability to recall information as the window fills, because every token attends to every other token, creating n² relationships for n tokens. Its advice is to keep lightweight identifiers such as file paths and links, and load the content when the agent needs it (Anthropic, 2025).

The tool docs say the same in plainer words. VS Code notes that explicit references count toward the context window and recommends adding only sources that help with the current task (VS Code docs).

Decision rule: include a source if it can change the implementation or the acceptance decision. A recent decision note plus two representative customer examples beats a full backlog export. Link everything else.

Keep three kinds of context distinct, each with its own home and owner.

The customer problem, research evidence, strategic choices and decisions that several people need. Keep them in the product workspace the team already uses. Each decision should have an owner, a date, a reason and links to evidence. A product decision log template or a decision graph for small AI teams both work.

Stable engineering guidance: how to run the app, conventions, architecture boundaries, test commands and security rules. Anthropic says Claude treats CLAUDE.md as context rather than enforced configuration, and that longer files reduce adherence (Claude Code docs). Nested files help large codebases: with AGENTS.md, the closest file to the edited code wins, and the main OpenAI repository had 88 of them when the agents.md site was written (agents.md). None of this is a place for the roadmap or customer research.

The short bridge between product intent and one coding session. It points to the relevant decisions and says what this change should do. It can live in an issue, a brief or a prompt, as long as the responsible people can find it. For a full version with acceptance checks and stop rules, use the PRD template for AI coding agents.

This split gives the agent enough to act while the team's lasting product knowledge stays where people can discuss and update it.

This is an illustrative scenario, not a customer story or a research finding.

A technical founder asks an AI coding agent to add saved filters to an internal dashboard. "Add saved filters" leaves product choices open: who needs it, whether views are private or shared, what happens when data changes, and how a user finds a saved view later.

The task packet says:

The agent now has an outcome and boundaries but still chooses the implementation. The sharing question is visible before code exists instead of being silently guessed. After the build, the reviewer checks the same five behaviours and records the sharing decision in the team's shared source.

## Context packet: [feature]
- User and problem: [who needs what; what they do today]
- Evidence: [links to specific observations or data] (observed / inferred / assumed)
- Desired outcome: [the change a user should notice]
- Current decision: [the choice] (owner: [name], date: [YYYY-MM-DD], link: [record])
- Constraints: [security, permissions, data, accessibility, compatibility, performance]
- Acceptance checks: [observable behaviours, incl. empty,  and error states]
- Open questions: [what is unknown] -> [who answers]
- Out of scope: [adjacent work to leave alone]
- Sources as of: [date or version]
- Review owner: [person who accepts the result and updates the record]

Keep it proportional. A one-screen prototype may need four bullets. A change to sensitive data access needs every line and a named reviewer.

Stale context is worse than missing context, because the agent follows it confidently. Five habits keep it current:

Before handing over work, ask:

If two or more answers are no, fix the packet or resolve the decision before the agent builds.

Specky keeps customer calls, feedback, tickets and decisions in one Product Graph, so the evidence behind a decision is linked rather than copied. Its MCP server lets Claude Code, Cursor, Codex and other MCP clients pull that context on demand: get_product_context loads confirmed product principles and workspace instructions, and get_coding_brief returns the PRDs, decisions and evidence relevant to a ticket. Anything the agent writes back arrives as a draft for human review. Setup is on the MCP page for AI agents, and the guide for technical PMs covers the wider workflow.

It is the information an agent needs that the code cannot show: who has the problem, the evidence behind it, the current decision and its owner, constraints, non-goals and the checks a reviewer will run. Code context, such as file layout and test commands, the agent can usually find itself. Product context someone has to supply.

No single tool does all of it. Use a short repository file (CLAUDE.md, AGENTS.md or Cursor rules) for durable rules, a task packet or PRD per change, and an MCP connection to wherever your decisions and evidence live, such as an issue tracker, docs tool or product evidence workspace. Choose by where your team actually records decisions.

Only a pointer to it. Those files load on every task and work best short: Anthropic targets under 200 lines per CLAUDE.md. Put commands, conventions and security rules there, plus one line saying where product decisions live. Keep customer evidence and changing decisions in their shared home and link them from each task.

Enough to change the implementation or the acceptance decision, and no more. Chroma's context-rot study and the "Lost in the Middle" paper show models get less reliable as inputs grow and miss information buried in the middle. In practice, one decision note, two or three representative examples and clear acceptance checks usually beat a full document export.

Yes, through MCP servers. Linear hosts one that works with Claude Code, Cursor, Codex and VS Code, and Notion's lets an assistant search pages and databases. Start with read-only access, and remember that tickets and wiki pages rarely say which decision is current or what evidence supports it. That still needs a task packet.

This story was originally published on 4 November 2026 at https://www.specky.space/blog/product-context-for-ai-coding-agents.

── more in #ai-agents 4 stories · sorted by recency
── more on @anthropic 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/product-context-for-…] indexed:0 read:9min 2026-11-23 · —