<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Agent Project Context</title>
    <description>The latest articles on DEV Community by Agent Project Context (agentprojectcontext).</description>
    <link>https://dev.to/agentprojectcontext</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F13570%2F023c1758-dc35-459b-a5fc-8407f902df4a.png</url>
      <title>DEV Community: Agent Project Context</title>
      <link>https://dev.to/agentprojectcontext</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/agentprojectcontext"/>
    <language>en</language>
    <item>
      <title>Load Nested AGENTS.md Rules at the Folder Boundary</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Fri, 23 Oct 2026 13:43:24 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/load-nested-agentsmd-rules-at-the-folder-boundary-1b12</link>
      <guid>https://dev.to/agentprojectcontext/load-nested-agentsmd-rules-at-the-folder-boundary-1b12</guid>
      <description>&lt;h1&gt;
  
  
  Load Nested AGENTS.md Rules at the Folder Boundary
&lt;/h1&gt;

&lt;p&gt;A project needs shared instructions, but it does not need every instruction in every turn. The useful rule is: &lt;strong&gt;put folder-specific guidance in that folder's &lt;code&gt;AGENTS.md&lt;/code&gt;, then load it when work reaches that folder.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That sounds like a small organization detail. It is actually a context-quality boundary. If a repository-wide agent prompt carries every rule for the mobile app, deployment scripts, data migration, and marketing site, most of those rules are irrelevant most of the time. The important instruction becomes harder to notice precisely when it matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep root guidance truly shared
&lt;/h2&gt;

&lt;p&gt;An APC project keeps portable context in the repository. Root &lt;code&gt;AGENTS.md&lt;/code&gt; is the place for rules that apply across the project: conventions, commands, safety constraints, and an index of the project-level agent setup. It should answer questions that matter no matter which directory a task touches.&lt;/p&gt;

&lt;p&gt;For example, a root file might say:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Run the repository test suite before changing shared packages.
Do not commit credentials or generated runtime state.
Use the documented release workflow.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Those are project facts. They are useful to a compatible tool from a fresh checkout, and they stay useful whether the next edit is in &lt;code&gt;api/&lt;/code&gt;, &lt;code&gt;web/&lt;/code&gt;, or &lt;code&gt;infra/&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Put local rules next to local work
&lt;/h2&gt;

&lt;p&gt;Now consider a migration directory that needs a special ordering rule, or a service folder that has a separate test command and an external API contract. Those instructions should not become permanent background for an unrelated documentation edit. Give the directory its own &lt;code&gt;AGENTS.md&lt;/code&gt; instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;repo/
├── AGENTS.md
├── api/
│   ├── AGENTS.md
│   └── migrations/
└── web/
    └── AGENTS.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;api/AGENTS.md&lt;/code&gt; can explain migration safety and API checks. The &lt;code&gt;web/AGENTS.md&lt;/code&gt; can describe component conventions and browser tests. Each file has a narrow owner: the folder beneath it.&lt;/p&gt;

&lt;p&gt;This is not an excuse to hide global policy in a deep directory. A rule belongs there only when its scope really starts there. A ban on secrets belongs at the root; a warning about a destructive database fixture can belong with the fixture. Scope should follow the work boundary, not the writer's desire to keep a file short.&lt;/p&gt;

&lt;h2&gt;
  
  
  Attach instructions when the tool crosses the boundary
&lt;/h2&gt;

&lt;p&gt;APX makes this structure operational. For a project turn, it supplies the project &lt;code&gt;AGENTS.md&lt;/code&gt; and identifies subfolders with their own instruction files. When a tool first touches one of those folders in that turn, APX attaches the folder's rules to the tool result. The agent receives the local rule at the moment it has evidence that the task reached that part of the tree.&lt;/p&gt;

&lt;p&gt;That timing matters. Imagine a request to update a landing-page headline. The agent should not begin with database migration instructions. If the same task later changes an API schema, the API guidance appears when the work enters &lt;code&gt;api/&lt;/code&gt;. The context grows with the actual path of work instead of arriving as an unfiltered manual.&lt;/p&gt;

&lt;h2&gt;
  
  
  Portable contract, local execution
&lt;/h2&gt;

&lt;p&gt;APC provides the portable contract: committed &lt;code&gt;AGENTS.md&lt;/code&gt; files travel with the repository and can be reviewed like other project decisions. APX is the daily-use runtime: it selects relevant project context during a turn while keeping conversations, tool history, and private runtime state local.&lt;/p&gt;

&lt;p&gt;Together, they support a simple habit: write root rules for the whole project, write nested rules for real local boundaries, and let the runtime reveal local guidance when the task crosses that boundary. Less prompt noise is not merely tidier. It gives the right instruction a better chance to govern the right action.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A Runnable Project Needs Both Instructions and Identity</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Thu, 22 Oct 2026 11:57:59 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/a-runnable-project-needs-both-instructions-and-identity-1bf8</link>
      <guid>https://dev.to/agentprojectcontext/a-runnable-project-needs-both-instructions-and-identity-1bf8</guid>
      <description>&lt;h1&gt;
  
  
  A Runnable Project Needs Both Instructions and Identity
&lt;/h1&gt;

&lt;p&gt;A folder is not automatically an agent project. It may contain code, notes, and a useful prompt, but an agent runtime still needs two answers before it can treat that folder as durable work: &lt;strong&gt;what guidance applies here, and which project is this?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;APC and APX make those answers explicit with two small files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;AGENTS.md&lt;/code&gt; holds shared instructions: conventions, constraints, commands, and project-specific context.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.apc/project.json&lt;/code&gt; holds stable metadata, including the project name and a stable &lt;code&gt;apx_id&lt;/code&gt; when APX manages the project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That pair is a practical boundary. In APX, &lt;code&gt;apx project add&lt;/code&gt; reads both files. If either is missing, registration stops rather than guessing that a random directory is a complete project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why one file is not enough
&lt;/h2&gt;

&lt;p&gt;An &lt;code&gt;AGENTS.md&lt;/code&gt; without metadata can explain how work should happen, but it does not give the runtime a stable identity for its local state. Two checkouts can have similar instructions; the runtime still needs to know which local project store belongs to this one.&lt;/p&gt;

&lt;p&gt;A &lt;code&gt;project.json&lt;/code&gt; without instructions has the opposite problem. It can name a project, but it cannot tell an agent the repository's rules, safe boundaries, or expected workflow. Identity without guidance turns registration into a label, not a usable contract.&lt;/p&gt;

&lt;p&gt;The two files also keep responsibilities clear. APC is the portable context layer: commit the shared contract with the repository. APX is the daily-use runtime: it uses that contract while keeping sessions, conversations, messages, caches, task logs, and machine-specific configuration under &lt;code&gt;~/.apx/projects/&amp;lt;apx_id&amp;gt;/&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small, reliable setup
&lt;/h2&gt;

&lt;p&gt;Start with a repository root like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-project/
├── AGENTS.md
└── .apc/
    └── project.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep &lt;code&gt;AGENTS.md&lt;/code&gt; focused on guidance that teammates and compatible tools should share. Keep &lt;code&gt;project.json&lt;/code&gt; focused on stable metadata. Do not put API keys, raw session logs, or private runtime memory in either file.&lt;/p&gt;

&lt;p&gt;Then register the project explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx project add &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;APX can link the committed project definition to its local runtime directory through &lt;code&gt;apx_id&lt;/code&gt;. If the repository moves and the runtime needs to re-scan the on-disk contract, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx project rebuild &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;|name|path&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important detail is not the command. It is the refusal to invent missing context. A runtime that silently registers a folder without instructions might use generic behavior where project rules mattered. A runtime that invents an identity can attach local history to the wrong work boundary.&lt;/p&gt;

&lt;h2&gt;
  
  
  The useful rule
&lt;/h2&gt;

&lt;p&gt;Before you ask an agent runtime to own ongoing work, give the project both &lt;strong&gt;instructions&lt;/strong&gt; and &lt;strong&gt;identity&lt;/strong&gt;. &lt;code&gt;AGENTS.md&lt;/code&gt; says how contributors should act. &lt;code&gt;.apc/project.json&lt;/code&gt; says what durable project definition they are acting within.&lt;/p&gt;

&lt;p&gt;That is the division of labor: APC keeps the contract portable and reviewable; APX makes it operational on one machine without committing private runtime state back into the repository.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Create a Specialist Agent Only After Its Work Boundary Is Stable</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Wed, 21 Oct 2026 12:03:08 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/create-a-specialist-agent-only-after-its-work-boundary-is-stable-4hfg</link>
      <guid>https://dev.to/agentprojectcontext/create-a-specialist-agent-only-after-its-work-boundary-is-stable-4hfg</guid>
      <description>&lt;h1&gt;
  
  
  Create a Specialist Agent Only After Its Work Boundary Is Stable
&lt;/h1&gt;

&lt;p&gt;Adding an agent is easy. Giving it a durable job is harder.&lt;/p&gt;

&lt;p&gt;The useful rule is: &lt;strong&gt;create a specialist only when its work boundary is stable enough to write down, review, and reuse.&lt;/strong&gt; Until then, keep the work with a main agent and improve the shared project guidance.&lt;/p&gt;

&lt;p&gt;This is where APC and APX have different jobs. APC is the portable layer: it keeps a project's shared rules, structured agent definitions, reusable skills, and safe curated context in the repository. APX is the runtime layer: it makes those agents useful in daily work through conversations, tools, routines, and local state. A runtime can start an agent immediately; that does not make the agent design ready to travel.&lt;/p&gt;

&lt;h2&gt;
  
  
  A role is not a label
&lt;/h2&gt;

&lt;p&gt;A weak specialist is only a name: &lt;code&gt;researcher&lt;/code&gt;, &lt;code&gt;writer&lt;/code&gt;, or &lt;code&gt;support&lt;/code&gt;. It sounds organized, but it does not tell another person—or another runtime—what the agent owns, what it must consult, or where it must stop.&lt;/p&gt;

&lt;p&gt;A stronger role has a boundary. Consider a support workflow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The agent handles first responses and routine refund triage.&lt;/li&gt;
&lt;li&gt;It uses the project's refund policy and escalation skill.&lt;/li&gt;
&lt;li&gt;It escalates large refunds rather than approving them.&lt;/li&gt;
&lt;li&gt;It writes in the project's customer-facing language.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is a contract, not a personality. It can live in an APC agent definition and linked skills, be reviewed in a pull request, and be read by compatible tooling after a fresh checkout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with one repeated decision
&lt;/h2&gt;

&lt;p&gt;Do not split work because a team diagram looks better with more nodes. Split it when one decision pattern keeps returning and has clear inputs, constraints, and handoff conditions.&lt;/p&gt;

&lt;p&gt;For example, a main agent may initially answer support questions, check policy, and call for human review when needed. After that pattern is repeated, the project can extract a support specialist. The extraction should preserve the decision boundary:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Inputs: customer request and account context
Rules: published refund window and escalation threshold
Output: response, or a clearly named escalation
Not owned: legal negotiation or approval beyond the threshold
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This small shape prevents a common mistake: creating a specialist that overlaps every other agent and silently makes choices outside its intended role.&lt;/p&gt;

&lt;h2&gt;
  
  
  Put durable detail in the right place
&lt;/h2&gt;

&lt;p&gt;APC gives the boundary a portable home:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;AGENTS.md&lt;/code&gt; holds project-wide rules.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.apc/agents/&amp;lt;name&amp;gt;.md&lt;/code&gt; states the specialist's role and instructions.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.apc/skills/&lt;/code&gt; holds reusable procedures shared by one or more agents.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.apc/&lt;/code&gt; excludes raw conversations, credentials, and runtime caches.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;APX can then use that contract while keeping the daily machinery local: sessions, messages, private runtime memory, provider credentials, and tool execution belong to the runtime rather than the repository.&lt;/p&gt;

&lt;p&gt;That separation matters during change. Updating a support rule is a project decision. It should be visible in the portable contract. A chat transcript from yesterday is runtime evidence, not the new source of policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical test before adding an agent
&lt;/h2&gt;

&lt;p&gt;Before creating a specialist, write four lines: purpose, inputs, constraints, and handoff. If those lines stay vague, the work is probably still main-agent work. If they are precise, the project has something worth encoding in APC.&lt;/p&gt;

&lt;p&gt;Then APX can run the agent in the places people actually work. The runtime gives the role a daily presence; APC keeps the role from becoming a local, unreviewed convenience.&lt;/p&gt;

&lt;p&gt;A good specialist is therefore not another prompt to maintain. It is a portable promise about a narrow kind of work.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>An APX Approval Scope Is a Real Boundary, Not a Convenience Button</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Tue, 20 Oct 2026 12:04:30 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/an-apx-approval-scope-is-a-real-boundary-not-a-convenience-button-3jcn</link>
      <guid>https://dev.to/agentprojectcontext/an-apx-approval-scope-is-a-real-boundary-not-a-convenience-button-3jcn</guid>
      <description>&lt;h1&gt;
  
  
  An APX Approval Scope Is a Real Boundary, Not a Convenience Button
&lt;/h1&gt;

&lt;p&gt;A permission prompt looks small: approve or deny. But the important question is not only whether an agent may run a tool. It is &lt;strong&gt;how far that approval reaches&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;APX treats that reach as an explicit boundary. A one-time approval is one execution. A session approval belongs to one conversation. An always approval belongs to one agent, including later conversations and a restart. Those are different decisions, so they must not blur into one friendly-looking button.&lt;/p&gt;

&lt;h2&gt;
  
  
  The dangerous shortcut
&lt;/h2&gt;

&lt;p&gt;Many agent products make approval feel like a binary switch. A person allows a harmless read, then later discovers that the agent stopped asking. The original decision silently became broader than the person intended.&lt;/p&gt;

&lt;p&gt;That is especially risky when a tool can receive different arguments over time. Approving a request to read one note is not necessarily approval to read every note, call a different endpoint, or let a second agent act in another chat.&lt;/p&gt;

&lt;p&gt;APX starts from the narrowest useful default: &lt;strong&gt;once&lt;/strong&gt;. The approval runs the pending tool call, then disappears. The next request creates a new prompt. No permanent grant is created as a side effect.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent: use notes.search({ query: "release checklist" })
Human: approve once
APX: runs that call

Agent: use notes.search({ query: "customer contracts" })
APX: asks again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second prompt is not friction by accident. It preserves a chance to notice that intent or data changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose scope deliberately
&lt;/h2&gt;

&lt;p&gt;APX exposes three scopes for an eligible approval:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;once&lt;/code&gt;: only pending call; no saved grant.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;session&lt;/code&gt;: later turns in same chat can use tool, even when arguments change. Other chats still ask. Revocation can remove grant.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;always&lt;/code&gt;: same agent can use tool across its chats and after runtime restart. Other agents still ask.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes a practical review habit possible. Start with &lt;code&gt;once&lt;/code&gt; while learning what an MCP tool does. Move to &lt;code&gt;session&lt;/code&gt; when a single conversation needs repeated work. Choose &lt;code&gt;always&lt;/code&gt; only when tool, agent, and long-term purpose are all known and acceptable.&lt;/p&gt;

&lt;p&gt;The boundary is not merely user-interface language. APX tests that a session grant does not unlock another chat, that an always grant remains tied to its agent, and that revocation restores a prompt. It also rejects attempts to turn a denial into a wider grant; agents themselves cannot grant permissions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Separate tool trust from project context
&lt;/h2&gt;

&lt;p&gt;This is runtime policy, not portable project context. APC carries the repository-owned contract: &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/&lt;/code&gt;, agent definitions, skills, and durable team guidance. It can say that a project uses a particular workflow or needs careful handling.&lt;/p&gt;

&lt;p&gt;APX is the local runtime that executes a particular conversation. Approval records, pending prompts, and revocations describe a local operational decision. They should not become a hidden rule inside a portable repository. A fresh checkout should inherit documented project intent, not someone else's unreviewed tool grant.&lt;/p&gt;

&lt;p&gt;That separation also keeps responsibility clear. APC can explain &lt;em&gt;why&lt;/em&gt; a project needs a tool. APX asks a human &lt;em&gt;whether this agent may use it now&lt;/em&gt;, and for how long.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small rule that scales
&lt;/h2&gt;

&lt;p&gt;Treat every broader scope as a new claim:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;This call is safe now.&lt;/li&gt;
&lt;li&gt;This conversation can repeat it.&lt;/li&gt;
&lt;li&gt;This agent may keep doing it later.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each step needs more evidence than the last. A scope selector that reflects that difference turns permission from a vague comfort signal into an auditable control boundary.&lt;/p&gt;

&lt;p&gt;APC keeps project intent portable. APX keeps operational authority local, explicit, and revocable. That is slower than silently upgrading one approval into permanent trust—but much easier to trust in real work.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>An Interrupted Tool Call Needs an Explicit Ending</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Mon, 19 Oct 2026 12:05:11 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/an-interrupted-tool-call-needs-an-explicit-ending-l5f</link>
      <guid>https://dev.to/agentprojectcontext/an-interrupted-tool-call-needs-an-explicit-ending-l5f</guid>
      <description>&lt;h1&gt;
  
  
  An Interrupted Tool Call Needs an Explicit Ending
&lt;/h1&gt;

&lt;p&gt;An agent can begin a tool call and lose its turn before receiving a result. A browser closes, a provider times out, a runtime restarts, or a person stops the work. That gap is ordinary. Pretending it never happened is not.&lt;/p&gt;

&lt;p&gt;The useful rule is small: &lt;strong&gt;an interrupted tool call needs an explicit ending in conversation history.&lt;/strong&gt; APX follows that rule when it repairs chat history. Rather than leaving an unanswered request dangling, it records that the tool was not run because the turn was interrupted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a dangling call is a problem
&lt;/h2&gt;

&lt;p&gt;Tool-using model APIs expect a strict sequence. An assistant message requests a tool, then a corresponding tool result returns. If history contains the first half but not the second, the next turn inherits an ambiguous state.&lt;/p&gt;

&lt;p&gt;Did the browser search happen? Did a file get written? Is a retry safe? A model should not have to guess. Nor should a later reader infer success from an assistant message that only &lt;em&gt;asked&lt;/em&gt; for an action.&lt;/p&gt;

&lt;p&gt;Consider a short history:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User: Check the deployment dashboard.
Assistant: calls browser_text({ url: ... })
[process interrupted]
User: What did it find?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without repair, the last question invites invention. A plausible answer may sound like a dashboard summary even though no result exists. That is worse than a visible interruption because it turns missing evidence into a claim.&lt;/p&gt;

&lt;h2&gt;
  
  
  Repair the structure, not the story
&lt;/h2&gt;

&lt;p&gt;APX's runtime-history repair logic starts at a real user item, ignores orphaned tool results, and checks each assistant tool call for its matching result. When a new non-tool item arrives—or history ends—any unanswered call is closed with this explicit record:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;not run: the turn was interrupted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The repaired version becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User: Check the deployment dashboard.
Assistant: calls browser_text({ url: ... })
Tool: not run: the turn was interrupted
User: What did it find?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That line is deliberately narrow. It does not claim the action failed in the outside world. A request might have reached an external service before the runtime lost contact. It only says APX has no completed tool result for this turn.&lt;/p&gt;

&lt;p&gt;This distinction matters for retries. A safe next step may be to inspect current state, ask the user, or run an idempotent check. It is not automatically “do it again.”&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep portable context out of the repair
&lt;/h2&gt;

&lt;p&gt;This is runtime work, not a change to project context. APC keeps the portable contract: &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/&lt;/code&gt; metadata, agent definitions, skills, and safe shared guidance in a repository. A compatible tool can read that contract from another checkout.&lt;/p&gt;

&lt;p&gt;APX is the daily-use runtime. Its chat history, tool-call records, sessions, and interruption markers are local execution state. They must describe what happened in a particular conversation, but they do not belong in a portable project contract.&lt;/p&gt;

&lt;p&gt;The boundary makes recovery easier to reason about. APC still tells an agent what project rules and skills apply after a restart. APX separately tells it whether the last tool call produced evidence. One layer supplies durable intent; the other preserves honest operational facts.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical recovery habit
&lt;/h2&gt;

&lt;p&gt;When a tool-backed turn is interrupted, keep three questions separate:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Was a tool requested?&lt;/li&gt;
&lt;li&gt;Did APX receive a matching result?&lt;/li&gt;
&lt;li&gt;What check is safe before continuing?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Only the second question has a certain answer from the repaired history. The third depends on the operation: inspect a read-only dashboard, check a task status, or ask before repeating a write.&lt;/p&gt;

&lt;p&gt;An explicit interruption marker is not glamorous, but it prevents a subtle class of agent mistakes. APC keeps project context portable. APX keeps execution history accountable. The next turn can then continue from evidence instead of from a gap that looks like success.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Name the Project Before the Conversation Drifts</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Sun, 18 Oct 2026 12:03:26 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/name-the-project-before-the-conversation-drifts-f3e</link>
      <guid>https://dev.to/agentprojectcontext/name-the-project-before-the-conversation-drifts-f3e</guid>
      <description>&lt;h1&gt;
  
  
  Name the Project Before the Conversation Drifts
&lt;/h1&gt;

&lt;p&gt;A useful agent conversation needs more than a capable model. It needs a clear answer to a smaller question: &lt;strong&gt;which project does this turn belong to?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If that answer changes invisibly, an agent can read the wrong rules, suggest the wrong specialist, or look at the wrong local history. The failure is subtle because the reply may still sound reasonable.&lt;/p&gt;

&lt;p&gt;APX makes project selection a per-turn decision. It uses the project already active on the surface, otherwise a project named in the message, otherwise the project named earlier in that conversation. That order gives a practical rule: when the project matters, name it before the conversation has a chance to drift.&lt;/p&gt;

&lt;h2&gt;
  
  
  A project is more than a folder
&lt;/h2&gt;

&lt;p&gt;In APC, a project carries portable context: &lt;code&gt;AGENTS.md&lt;/code&gt;, agent definitions, skills, shared MCP hints, and project metadata under &lt;code&gt;.apc/&lt;/code&gt;. That is the contract a compatible tool can read from a checkout.&lt;/p&gt;

&lt;p&gt;APX is the runtime layer. It uses the selected APC project to decide which agents, MCP servers, root guidance, and durable agent memory belong in the turn. Its conversations, sessions, task logs, and private runtime state remain local under &lt;code&gt;~/.apx/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So selecting a project is not a cosmetic label in a chat sidebar. It is the boundary that tells APX which portable contract and which local working state apply.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let the surface decide when the surface is clear
&lt;/h2&gt;

&lt;p&gt;A project chat or code session already has useful scope. If you open the &lt;code&gt;storefront&lt;/code&gt; project and ask for a checkout review, APX can use that project directly. The work surface and the project contract agree.&lt;/p&gt;

&lt;p&gt;That is the best case for sustained work: stay in the project surface while the task belongs there. The conversation gets its agents and guidance from the same project whose files the work will touch.&lt;/p&gt;

&lt;p&gt;But not every request begins there. A person might be in a general chat, replying from a message channel, or returning to an old conversation after changing tasks. In those cases, make the target explicit in ordinary language:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;For storefront, review the release checklist.

In the data-pipeline project, summarize the failed import.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The project name is short context with a large effect. It avoids relying on a previous topic that may no longer be relevant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do not turn conversational carryover into ownership
&lt;/h2&gt;

&lt;p&gt;Using a project named earlier in the same conversation is helpful for follow-up questions. After discussing &lt;code&gt;storefront&lt;/code&gt;, a later “what should we test first?” can keep the same scope without repeating the name every turn.&lt;/p&gt;

&lt;p&gt;That convenience should not become hidden ownership. Switch deliberately when the work changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Now for data-pipeline: list likely causes of yesterday's import failure.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A new project name is better than assuming that the last active project remains correct. It gives the next turn an observable boundary and gives a reviewer a simple explanation for why certain context was present.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep chat scope and command scope aligned
&lt;/h2&gt;

&lt;p&gt;A terminal command has the same problem in a different form. When the current directory is not a reliable signal, pin the project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx messages &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;--project&lt;/span&gt; storefront
apx agent list &lt;span class="nt"&gt;--project&lt;/span&gt; data-pipeline
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The message-level name and the command-level &lt;code&gt;--project&lt;/code&gt; flag serve one idea: state the intended owner at the moment it matters. Neither copies project rules into runtime history, and neither makes private session data portable. They only select the correct boundary.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small habit that prevents quiet mistakes
&lt;/h2&gt;

&lt;p&gt;Use the project surface for ongoing project work. Name the project in a neutral conversation when scope is important. Repeat the name when the subject changes. Pin commands when the shell location is incidental.&lt;/p&gt;

&lt;p&gt;APC keeps the project contract portable. APX makes that contract useful turn by turn. Naming the project is the small bridge between them—and it is easier to trust than a guess based on whatever the conversation happened to discuss last.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>The APX Default Project Is a Scratchpad, Not a Workspace</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Sat, 17 Oct 2026 12:06:55 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/the-apx-default-project-is-a-scratchpad-not-a-workspace-dci</link>
      <guid>https://dev.to/agentprojectcontext/the-apx-default-project-is-a-scratchpad-not-a-workspace-dci</guid>
      <description>&lt;h1&gt;
  
  
  The APX Default Project Is a Scratchpad, Not a Workspace
&lt;/h1&gt;

&lt;p&gt;Agent tools need somewhere to put work when no project is active. APX has that place: its built-in &lt;code&gt;default&lt;/code&gt; project under &lt;code&gt;~/.apx/projects/default/&lt;/code&gt;. It lets the super-agent handle general, unscoped work without first asking someone to create a repository.&lt;/p&gt;

&lt;p&gt;That convenience becomes dangerous when &lt;code&gt;default&lt;/code&gt; quietly turns into the home of real project work. A default workspace is shared across contexts. It has no repository contract to carry intent, no committed agent definitions, and no portable boundary another machine can pick up. It is a fallback, not ownership.&lt;/p&gt;

&lt;p&gt;The useful rule is simple: use &lt;code&gt;default&lt;/code&gt; for scratch work; create or register an APC project when work belongs to a project.&lt;/p&gt;

&lt;h2&gt;
  
  
  What scratch work looks like
&lt;/h2&gt;

&lt;p&gt;A few examples fit the default project well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ask APX to explain a command, compare two ideas, or make a temporary checklist.&lt;/li&gt;
&lt;li&gt;Start a personal conversation not attached to a codebase, client, or team.&lt;/li&gt;
&lt;li&gt;Try a model or a tool before deciding whether it belongs in a project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those actions need local runtime state, but they do not yet need a durable project agreement. A transcript, a short-lived task, or an experiment can remain local to APX.&lt;/p&gt;

&lt;p&gt;The boundary changes when the work needs shared rules, repeatable agent roles, reusable skills, or review in version control. Then the work has a project shape even if it is not a Git repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give durable work an explicit home
&lt;/h2&gt;

&lt;p&gt;An APX project is a directory containing &lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;.apc/project.json&lt;/code&gt;. The APC files hold portable project context: agent definitions, skills, MCP hints, and project metadata. APX registers that directory and stores its runtime-only state separately under &lt;code&gt;~/.apx/projects/&amp;lt;apx_id&amp;gt;/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For a new project, start in its directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx init
apx project add &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For an existing APC project, registration is enough:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx project add /path/to/project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, target it deliberately when your current directory is not reliable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx agent list &lt;span class="nt"&gt;--project&lt;/span&gt; my-project
apx &lt;span class="nb"&gt;exec &lt;/span&gt;reviewer &lt;span class="nt"&gt;--project&lt;/span&gt; my-project &lt;span class="s2"&gt;"Review the release notes"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That choice answers two separate questions. APC answers what the project means and which guidance can travel with it. APX answers where local conversations, sessions, task logs, credentials, and machine-specific settings belong. Neither side needs to pretend it owns the other.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why implicit ownership causes trouble
&lt;/h2&gt;

&lt;p&gt;Suppose a team uses the default project for release planning because it is already open. The plan may look available in the panel, but a teammate who clones the repository cannot discover its rules or agent roles from the repository. Later, unrelated personal chats and project history also share one runtime bucket. Context becomes hard to review, move, or clean up safely.&lt;/p&gt;

&lt;p&gt;Putting the same work in an APC project does not make every conversation portable. It should not. Raw sessions and private runtime memory still stay local. What moves is the contract: the project instructions, named agents, reusable skills, and safe shared metadata. A second machine can register the project and build its own local runtime state around that contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make the fallback visible
&lt;/h2&gt;

&lt;p&gt;The default project is valuable precisely because it is temporary and unowned. Do not delete or over-engineer it. Just avoid giving it work that needs a durable boundary.&lt;/p&gt;

&lt;p&gt;When a task is only a question, scratch is fine. When it needs teammates, review, repeatability, or a future checkout, give it a project directory and APC context.&lt;/p&gt;

&lt;p&gt;A fallback keeps APX helpful. An explicit project keeps the work understandable.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A Running Task Column Is Not Proof of Execution</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Fri, 16 Oct 2026 12:05:14 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/a-running-task-column-is-not-proof-of-execution-557n</link>
      <guid>https://dev.to/agentprojectcontext/a-running-task-column-is-not-proof-of-execution-557n</guid>
      <description>&lt;h1&gt;
  
  
  A Running Task Column Is Not Proof of Execution
&lt;/h1&gt;

&lt;p&gt;A task board needs a &lt;code&gt;running&lt;/code&gt; column. It is useful for workflow: someone has picked up the card, or the team wants to see it in progress. But a board column is a claim about process, not evidence that a process is alive.&lt;/p&gt;

&lt;p&gt;That distinction matters in agent systems. A task can remain in &lt;code&gt;running&lt;/code&gt; after a runtime session ends. An agent can be active on a task thread while the card still says &lt;code&gt;pending&lt;/code&gt;. A human can move a card manually for planning reasons. If a dashboard turns any of those cases into “work is definitely happening,” it reports confidence it has not earned.&lt;/p&gt;

&lt;p&gt;APX separates these two questions. The task workflow records the column chosen for an open task. Its execution view asks a different question: what evidence exists now?&lt;/p&gt;

&lt;h2&gt;
  
  
  One label, several realities
&lt;/h2&gt;

&lt;p&gt;Suppose a task called “Review the authentication flow” sits in &lt;code&gt;running&lt;/code&gt;. There are at least four possible realities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An agent turn is currently working on the task thread.&lt;/li&gt;
&lt;li&gt;A linked coding-runtime session is still open.&lt;/li&gt;
&lt;li&gt;A linked session already finished or failed.&lt;/li&gt;
&lt;li&gt;Nothing linked is active; the column was moved earlier and never changed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only the first two support “working now.” The third supports “execution ended.” The fourth supports “not verified,” not “running successfully.”&lt;/p&gt;

&lt;p&gt;This is why APX does not treat the status field as a liveness signal. Its task execution view combines specific evidence: a currently running agent turn, runtime sessions explicitly linked from task comments, and the latest activity such as a comment or session start/end. When no evidence is alive but the workflow column says &lt;code&gt;running&lt;/code&gt;, the verdict is &lt;code&gt;not_verified&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That phrase is deliberately less comforting than a green dot. It tells the owner what the system knows without pretending to know more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspect the task before reporting progress
&lt;/h2&gt;

&lt;p&gt;For an agent, the practical rule is simple: use &lt;code&gt;get_task&lt;/code&gt; when a title or board column is not enough. The response includes an &lt;code&gt;execution&lt;/code&gt; object with separate workflow and runtime information. A useful progress report can then distinguish these cases:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Workflow: running
Execution: working
Evidence: linked runtime session is open

Workflow: running
Execution: not verified
Evidence: no live task turn or linked open session

Workflow: in_review
Execution: ended
Evidence: latest linked session finished
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are not cosmetic wording changes. They lead to different next actions. “Working” may mean wait or inspect the live session. “Not verified” means check the task thread, ask the assignee, or move the card only after learning what happened. “Ended” means read the result and review it; it does not mean automatically close the task.&lt;/p&gt;

&lt;p&gt;In particular, a successful process exit is not a business approval. A runtime can exit with code zero after producing a draft, a partial investigation, or a result that needs human review. APX keeps execution evidence separate from task closure so an agent cannot silently turn “command finished” into “work accepted.”&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the link must be explicit
&lt;/h2&gt;

&lt;p&gt;APX finds a task's relevant runtime sessions through task comments that carry the session identity and path. That is narrower than scanning every agent history. It prevents an unrelated session from making a task look active, and it keeps the evidence attached to the card where a reviewer expects to find it.&lt;/p&gt;

&lt;p&gt;The same boundary explains APC's role. APC is the portable project context layer: &lt;code&gt;AGENTS.md&lt;/code&gt;, agent definitions, skills, and durable rules travel with the project. APX is the daily-use runtime and tooling layer: it keeps local sessions, task activity, and execution evidence outside that portable contract.&lt;/p&gt;

&lt;p&gt;A portable task instruction can say what success requires. Only the runtime can say whether a particular session is still alive.&lt;/p&gt;

&lt;h2&gt;
  
  
  A better board question
&lt;/h2&gt;

&lt;p&gt;When you see a task in &lt;code&gt;running&lt;/code&gt;, do not ask only, “Which column is it in?” Ask, “What evidence says it is running now?”&lt;/p&gt;

&lt;p&gt;That small separation produces calmer automation. It avoids duplicate launches for live work, exposes stale cards before they become false reassurance, and leaves approval where it belongs: with a review of the actual result.&lt;/p&gt;

&lt;p&gt;A board tracks workflow. Evidence tracks execution. Reliable agent operations need both.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A Project Rule Projection Needs One Owner</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Thu, 15 Oct 2026 12:05:21 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/a-project-rule-projection-needs-one-owner-5al9</link>
      <guid>https://dev.to/agentprojectcontext/a-project-rule-projection-needs-one-owner-5al9</guid>
      <description>&lt;h1&gt;
  
  
  A Project Rule Projection Needs One Owner
&lt;/h1&gt;

&lt;p&gt;A project can need rules in more than one tool format. That does not mean it needs more than one rule source.&lt;/p&gt;

&lt;p&gt;This is the useful boundary behind APC rule projections: keep the project-owned instruction in &lt;code&gt;.apc/rules/&lt;/code&gt;; let a compatible IDE or runtime create the format it needs to execute that instruction. The projection is useful. Editing both copies as if they were peers is where drift starts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Source versus projection
&lt;/h2&gt;

&lt;p&gt;Imagine a repository with a TypeScript API. The project wants every compatible agent working on routes to validate input at the boundary. APC can express that once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
description: "API boundary rules"
globs:
  - "src/api/**/*.ts"
alwaysApply: false
---

- Validate request input at the route boundary.
- Keep database writes inside service functions.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That file says both &lt;em&gt;what&lt;/em&gt; to do and &lt;em&gt;where&lt;/em&gt; it applies. It belongs to the repository, can be reviewed with code, and travels when the repository moves.&lt;/p&gt;

&lt;p&gt;A runtime may need that same rule under its own directory. For example, a compatible consumer can project &lt;code&gt;.apc/rules/backend.mdc&lt;/code&gt; into a tool-specific rules folder. That derived file lets the runtime use its native loading mechanism. It should not become a second place where the team edits the policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why two editable copies fail
&lt;/h2&gt;

&lt;p&gt;At first, duplicate rule files look harmless. One is for an IDE. One is for another agent runtime. Then the API moves, an exception is added, or a review clarifies the wording. Someone updates only one copy.&lt;/p&gt;

&lt;p&gt;Now the project has two answers to the same question. Both may be valid Markdown. Only one is current. Agents receive different instructions based on the tool that opened the repository, and reviewers have no reliable place to verify intent.&lt;/p&gt;

&lt;p&gt;The problem is not that a runtime has its own configuration. Runtime-specific files can be necessary. The problem is unclear ownership. A projection is an adapter, not a competing contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the split small
&lt;/h2&gt;

&lt;p&gt;Use the broadest APC surface that matches the instruction:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Put repository-wide rules in &lt;code&gt;AGENTS.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Put path-scoped or task-scoped rules in &lt;code&gt;.apc/rules/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Put reusable procedures in &lt;code&gt;.apc/skills/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Keep runtime-only setup, sessions, messages, and private state outside the portable contract.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This split makes an important maintenance question simple: where should a change be made? For shared project meaning, change APC first. Regenerate or update the runtime projection from that source. For a setting that only controls one local runtime, keep it local instead of pretending it is portable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where APX fits
&lt;/h2&gt;

&lt;p&gt;APC is the portable context layer: repository-owned rules, agent definitions, skills, and other durable project meaning. It deliberately does not define every runtime's storage or execution behavior.&lt;/p&gt;

&lt;p&gt;APX is the daily-use runtime and tooling layer. It bridges APC into compatible workflows, while keeping operational state such as sessions, messages, and caches outside &lt;code&gt;.apc/&lt;/code&gt;. APX therefore benefits from a clear source of truth: it can consume project context without turning its local state into the project contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  A review check
&lt;/h2&gt;

&lt;p&gt;When a project adds a tool-specific rules file, ask one question: &lt;strong&gt;where is the canonical edit made?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the answer is &lt;code&gt;.apc/rules/&lt;/code&gt;, the team can review, version, and move shared guidance once. If the answer is “whichever copy someone remembers,” the repository has already started to fork its own context.&lt;/p&gt;

&lt;p&gt;Portable context is not about banning adapters. It is about making sure adapters do not become authors.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Unregistering an APX Project Should Not Erase Its APC Contract</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Wed, 14 Oct 2026 22:40:09 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/unregistering-an-apx-project-should-not-erase-its-apc-contract-2bbd</link>
      <guid>https://dev.to/agentprojectcontext/unregistering-an-apx-project-should-not-erase-its-apc-contract-2bbd</guid>
      <description>&lt;h1&gt;
  
  
  Unregistering an APX Project Should Not Erase Its APC Contract
&lt;/h1&gt;

&lt;p&gt;A project can stop being active on one machine without stopping being a project. That distinction matters when you clean up an APX installation, move between computers, or register the wrong directory by mistake.&lt;/p&gt;

&lt;p&gt;The practical rule is simple: removing an APX project registration should remove the local runtime relationship, not the portable APC contract.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer. Its &lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;.apc/&lt;/code&gt; directory live with the project and can be reviewed, copied, or committed. APX is the daily-use runtime and tooling layer. It registers that project with a local daemon, runs agents against it, and keeps runtime state under &lt;code&gt;~/.apx/&lt;/code&gt;. Those layers have different owners and different lifetimes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cleanup command is deliberately narrow
&lt;/h2&gt;

&lt;p&gt;APX registers a project explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx project add /path/to/repo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;During registration, APX reads the project's &lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;.apc/project.json&lt;/code&gt;. The filesystem remains the source of truth for portable context; APX records enough local information to work with that project on this machine.&lt;/p&gt;

&lt;p&gt;Later, this command removes that local registration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apx project remove /path/to/repo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command does &lt;strong&gt;not&lt;/strong&gt; delete the project files. In particular, it does not delete &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;.apc/project.json&lt;/code&gt;, agent definitions, skills, or shared MCP hints. The project folder remains a valid APC project for Codex, Claude Code, APX on another machine, or another compatible tool.&lt;/p&gt;

&lt;p&gt;That restraint is useful. A developer may unregister a temporary checkout. A team may remove an old path after a disk migration. A person may decide that a research directory no longer needs an active APX runtime. None of those decisions means the project's shared instructions should vanish.&lt;/p&gt;

&lt;h2&gt;
  
  
  Runtime cleanup is a separate decision
&lt;/h2&gt;

&lt;p&gt;APX also keeps machine-local state under &lt;code&gt;~/.apx/projects/&amp;lt;apx_id&amp;gt;/&lt;/code&gt;: conversations, messages, task logs, cached data, routine state, and agent runtime memory. That state is intentionally not part of APC and should never be confused with the portable project definition.&lt;/p&gt;

&lt;p&gt;Unregistering a project therefore answers one question only: should this local APX daemon keep this project in its active registry? It does not answer whether the repository should keep its instructions, or whether local runtime history should be retained for later inspection.&lt;/p&gt;

&lt;p&gt;This split avoids two opposite mistakes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Treating a local cleanup command as permission to destroy shared project context.&lt;/li&gt;
&lt;li&gt;Treating runtime state as if it were safe to ship with the project just because it exists near the project in the APX UI.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Re-register from the contract
&lt;/h2&gt;

&lt;p&gt;If the project becomes relevant again, register the same directory again:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /path/to/repo
apx project add &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;APX can read the portable files again because they never depended on the old registration. The stable &lt;code&gt;apx_id&lt;/code&gt; in &lt;code&gt;.apc/project.json&lt;/code&gt; identifies the project definition; it is not a reason to bury runtime history inside the repository.&lt;/p&gt;

&lt;p&gt;This gives project maintenance a clean boundary. Keep APC files when the project still needs durable, shareable guidance. Remove an APX registration when this machine no longer needs to operate that project. Decide separately what to do with local runtime state.&lt;/p&gt;

&lt;p&gt;Portable context should outlive a local registry entry. APC preserves the contract; APX makes that contract useful while the project is active.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A Path-Scoped Rule Is a Matching Contract, Not Just a Note</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Sun, 11 Oct 2026 12:04:53 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/a-path-scoped-rule-is-a-matching-contract-not-just-a-note-5701</link>
      <guid>https://dev.to/agentprojectcontext/a-path-scoped-rule-is-a-matching-contract-not-just-a-note-5701</guid>
      <description>&lt;h1&gt;
  
  
  A Path-Scoped Rule Is a Matching Contract, Not Just a Note
&lt;/h1&gt;

&lt;p&gt;A rule that applies everywhere is easy to write and expensive to live with.&lt;/p&gt;

&lt;p&gt;Projects accumulate instructions: validate API input, preserve migration compatibility, write release notes, keep documentation examples current. Those instructions are all useful. They are not all relevant while an agent is editing the same file.&lt;/p&gt;

&lt;p&gt;APC gives this distinction a portable shape. Repository-wide expectations belong in &lt;code&gt;AGENTS.md&lt;/code&gt;. A rule that only matters for a slice of the tree belongs in &lt;code&gt;.apc/rules/&lt;/code&gt; with frontmatter that says where it applies. The thesis is simple: a path-scoped rule is a matching contract. Its glob is part of its meaning.&lt;/p&gt;

&lt;h2&gt;
  
  
  The small rule
&lt;/h2&gt;

&lt;p&gt;Imagine a repository with an API and a documentation site. The API needs request-boundary validation and careful compatibility handling. Documentation pages need accurate examples, but do not need a warning about route validation on every edit.&lt;/p&gt;

&lt;p&gt;Put the API-specific instruction in a rule file such as &lt;code&gt;.apc/rules/backend.mdc&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
description: "Backend API rules"
globs:
  - "src/api/**/*.ts"
alwaysApply: false
---

- Validate request input at the route boundary.
- Keep public API compatibility during migrations.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The file holds two different facts. The Markdown body explains what to do. The frontmatter explains when the instruction matters. Removing either half changes the contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why &lt;code&gt;alwaysApply: false&lt;/code&gt; matters
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;alwaysApply: false&lt;/code&gt; expresses a useful restraint: do not make this a project-wide command. A task that changes &lt;code&gt;src/api/orders.ts&lt;/code&gt; should receive backend rules. A task that updates &lt;code&gt;docs/getting-started.mdx&lt;/code&gt; should not have to treat those rules as the primary context.&lt;/p&gt;

&lt;p&gt;This is not an attempt to hide important constraints. It is how you make constraints easier to follow. A relevant, narrow rule is more likely to be noticed and less likely to be diluted among unrelated instructions.&lt;/p&gt;

&lt;p&gt;The alternative is one enormous root file. That starts well: every rule is visible in one place. Later, a docs change arrives with database migration advice, UI conventions, deployment commands, and incident procedures attached. The agent must guess which parts matter. Humans do the same thing during review.&lt;/p&gt;

&lt;h2&gt;
  
  
  The matching surface is part of maintenance
&lt;/h2&gt;

&lt;p&gt;A glob can become wrong without the rule text becoming wrong. Suppose an API moves from &lt;code&gt;src/api/&lt;/code&gt; to &lt;code&gt;services/http/&lt;/code&gt;. The validation rule may still describe the right practice, but &lt;code&gt;src/api/**/*.ts&lt;/code&gt; no longer names the files that need it. The rule has silently lost its reach.&lt;/p&gt;

&lt;p&gt;Treat that rename as a contract change:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
description: HTTP service rules
globs:
  - "services/http/**/*.ts"
alwaysApply: false
---

- Validate request input at the route boundary.
- Keep public API compatibility during migrations.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives code review a concrete question: did the matching surface move with the code?&lt;/p&gt;

&lt;h2&gt;
  
  
  Where APC and APX meet
&lt;/h2&gt;

&lt;p&gt;APC is the portable context layer. It keeps the root contract, reusable skills, agent definitions, and scoped rules in the project rather than a tool-branded folder. The &lt;code&gt;.mdc&lt;/code&gt; rule can travel with a checkout because its target is described relative to that project.&lt;/p&gt;

&lt;p&gt;APX is the daily-use runtime and tooling layer. It can consume that project context while its sessions, messages, routines, and private runtime state remain local. The boundary matters here: a scoped rule is durable shared project knowledge; a runtime conversation about one particular edit is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical check before merging
&lt;/h2&gt;

&lt;p&gt;When you add or edit a scoped APC rule, ask three questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Does the body state one behavior that is genuinely local to these files?&lt;/li&gt;
&lt;li&gt;Does &lt;code&gt;globs&lt;/code&gt; match every file that needs the behavior, without catching unrelated work?&lt;/li&gt;
&lt;li&gt;Would a folder rename require updating this file?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the answer to the last question is yes, the rule is doing useful work. Keep its matching surface visible in the review. Portable context stays trustworthy when its instructions have a clear home and a clear boundary.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Pin the APX Project Before You Run the Command</title>
      <dc:creator>Manuel Bruña</dc:creator>
      <pubDate>Sat, 10 Oct 2026 12:04:27 +0000</pubDate>
      <link>https://dev.to/agentprojectcontext/pin-the-apx-project-before-you-run-the-command-25b6</link>
      <guid>https://dev.to/agentprojectcontext/pin-the-apx-project-before-you-run-the-command-25b6</guid>
      <description>&lt;h1&gt;
  
  
  Pin the APX Project Before You Run the Command
&lt;/h1&gt;

&lt;p&gt;The current directory is a convenient default. It is not a reliable identity.&lt;/p&gt;

&lt;p&gt;That is why APX accepts &lt;code&gt;--project &amp;lt;name|id|path&amp;gt;&lt;/code&gt; on most project-aware commands. The flag is a small guardrail: it makes the target explicit before APX reads agents, chooses runtime state, or writes a task, routine, message query, or configuration change.&lt;/p&gt;

&lt;p&gt;APC is the portable context layer: &lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;.apc/&lt;/code&gt; describe a project in a repository. APX is the local runtime and tooling layer: it uses that context while keeping sessions, messages, and operational state on the machine. A command needs to know which APC project it serves.&lt;/p&gt;

&lt;h2&gt;
  
  
  The helpful default
&lt;/h2&gt;

&lt;p&gt;When no project is named, APX walks upward from the current directory looking for an APC root. If it finds a registered project, it uses it. If it finds an APC project that is not registered yet, it can register it. If it finds neither, some commands fall back to APX's built-in default workspace.&lt;/p&gt;

&lt;p&gt;That behavior makes the common case pleasant:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/code/storefront
apx agent list
apx run reviewer &lt;span class="nt"&gt;--runtime&lt;/span&gt; codex &lt;span class="s2"&gt;"Review the checkout changes"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Working from the project root is a good default because the shell location, source files, and APC contract all point to the same place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the default becomes risky
&lt;/h2&gt;

&lt;p&gt;Now imagine a terminal that is not in the intended repository: a monorepo parent folder, a notes directory, a temporary checkout, or a shell reused after another task. The command can still be syntactically valid while targeting the wrong project or the default scratch workspace.&lt;/p&gt;

&lt;p&gt;That is especially costly for commands that change state. A routine created in the wrong project runs with the wrong agents and context. A project config update changes a different local runtime profile. A message search can make you inspect the wrong evidence trail.&lt;/p&gt;

&lt;p&gt;The failure is not that APX cannot infer a project. The failure is asking inference to carry authority when you already know the target.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use an explicit pin for cross-project work
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;--project&lt;/code&gt; whenever your shell location is incidental rather than meaningful:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# From any directory, inspect one project's agent definitions&lt;/span&gt;
apx agent list &lt;span class="nt"&gt;--project&lt;/span&gt; storefront

&lt;span class="c"&gt;# Keep routine ownership unambiguous&lt;/span&gt;
apx routine add daily-review &lt;span class="nt"&gt;--project&lt;/span&gt; storefront &lt;span class="nt"&gt;--schedule&lt;/span&gt; &lt;span class="s2"&gt;"0 9 * * 1-5"&lt;/span&gt;

&lt;span class="c"&gt;# Query runtime evidence for that project only&lt;/span&gt;
apx messages &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;--project&lt;/span&gt; storefront

&lt;span class="c"&gt;# Run a coding agent against the intended APC contract&lt;/span&gt;
apx run reviewer &lt;span class="nt"&gt;--runtime&lt;/span&gt; codex &lt;span class="nt"&gt;--project&lt;/span&gt; storefront &lt;span class="s2"&gt;"Review the checkout changes"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;APX accepts a numeric id, an exact project name, an absolute path, or a relative path resolved from the current directory. If a short name matches more than one registered project, it refuses the ambiguity instead of choosing silently. &lt;code&gt;apx project list&lt;/code&gt; is the quick way to inspect available names and ids.&lt;/p&gt;

&lt;h2&gt;
  
  
  The important distinction
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;--project&lt;/code&gt; does not turn runtime state into portable context. It does the opposite: it preserves the ownership boundary.&lt;/p&gt;

&lt;p&gt;APC remains the committed definition of &lt;code&gt;storefront&lt;/code&gt;: agents, skills, shared MCP hints, and project rules. APX uses the selected project's stable &lt;code&gt;apx_id&lt;/code&gt; to locate its local sessions, messages, tasks, routines, and machine-specific configuration.&lt;/p&gt;

&lt;p&gt;So one explicit flag connects two layers without mixing them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;APC answers what project context should travel.&lt;/li&gt;
&lt;li&gt;APX answers which local runtime state belongs to that project today.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A practical rule
&lt;/h2&gt;

&lt;p&gt;Trust the current directory when you deliberately opened a shell inside one project. Pin &lt;code&gt;--project&lt;/code&gt; when working from a shared terminal, automation, another repository, or a directory where project inference would be a guess.&lt;/p&gt;

&lt;p&gt;This is not extra ceremony. It is a short, readable record of intent beside the command that matters. In agent tooling, the safest target is often the one you name.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
