惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

有赞技术团队
有赞技术团队
小众软件
小众软件
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
Jina AI
Jina AI
博客园 - 【当耐特】
V
Visual Studio Blog
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
量子位
IT之家
IT之家
G
Google Developers Blog
V
V2EX
The GitHub Blog
The GitHub Blog
月光博客
月光博客
GbyAI
GbyAI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
A Folder Name Is Not a Project Identity
Manuel Bruña · 2026-06-22 · via DEV Community

A Folder Name Is Not a Project Identity

The thing I keep relearning while building APC and APX is simple: a folder path is convenient, but it is not identity.

That sounds obvious until you start wiring real tooling around it. Then you notice how many systems quietly treat the current path as if it were the project itself. Rename the repo, move it to another disk, clone it into a sibling folder, or open the same codebase through a different checkout, and the whole illusion starts to wobble.

That is one reason I like APC's split so much. APC keeps the project contract in the repository. APX keeps runtime state outside it. And .apc/project.json gives the project a stable anchor that is not just "whatever folder I happened to open today".

Why the folder is too weak

A folder name is a route. It tells a tool where the project lives right now.

A project identity is different. Identity should survive common changes:

  • renaming the repo directory
  • moving the project between machines
  • cloning the repo into a new path
  • having multiple checkouts of the same project
  • registering the same repo from different tools

If identity depends on the path, every one of those actions becomes risky. The path may still resolve, but it no longer tells you whether this is the same project in a durable sense.

That is a bad key for anything that wants to remember state.

What APC actually gives me

The APC side is intentionally small.

From the docs, APC is the portable project context layer. It is about project-owned meaning, not runtime history. The concrete files I keep coming back to are:

  • AGENTS.md for the root contract
  • .apc/project.json for project metadata
  • .apc/agents/*.md for agent definitions
  • .apc/mcps.json for non-secret MCP hints

That split matters because it keeps the repo readable. A clone should tell me what the project is, what rules matter, and what agents exist without dragging in local chat history or machine-specific junk.

In this repo, the current project.json is tiny:

{
  "name": "agent-project-context",
  "description": "Core APC project",
  "apx_id": "a39c5651c0f1"
}

That is enough for the point I care about. It is not trying to be a giant config blob. It is a marker plus a stable name.

What APX does with that anchor

APX is the runtime layer, so it needs a way to connect a live checkout to a durable project record.

The code makes that pretty explicit. APX treats .apc/project.json as the marker file for an APC project, and its project registration logic accepts several ways to find a project: numeric id, exact name, absolute path, relative path, even fuzzy path or name matching in some cases. That flexibility is useful at the boundary.

But I do not read that flexibility as identity.

I read it as convenience on top of a more stable stored project record.

That is the important distinction. Paths help APX find the project. The project metadata helps APX keep the project stable after it is found.

Once the project is registered, runtime state can live where it belongs: under APX-owned storage, not inside the repo. That is the cleaner design because sessions, message logs, and local runtime behavior are not the same thing as project meaning.

Why I care about the separation

I used to accept a messier model: tool config in one place, prompts in another, local history in a third, and a bunch of path-based assumptions holding it together. It worked until it did not.

The failure mode is always the same:

  • path changes
  • state breaks
  • the tool guesses wrong
  • now I am debugging naming instead of building

A stable project identity reduces that nonsense.

It also makes review easier. When I look at a diff, I want to see project facts, not accidental runtime output. AGENTS.md says what the repo expects. .apc/project.json says what project this is. APX says how the local runtime should operate around it.

That is enough structure without turning the repo into a control panel.

My practical rule now

I try to keep the boundary very plain:

  • AGENTS.md: what the project expects
  • .apc/project.json: what the project is
  • ~/.apx/: what happened while working on it

That rule sounds almost boring. Good. Boring is what you want when many tools are going to read the same repository.

If I need to move the project, I should not have to rebuild the meaning of the project.

If I need a different runtime, I should not have to rewrite the project contract.

If I need a session log, I should not have to commit it to git.

That is the whole reason APC and APX feel useful together.

The deeper lesson

I think the real lesson is not "use project.json because metadata is good." The lesson is narrower.

A project needs one stable anchor that survives the filesystem tricks humans do every week. The folder path is too volatile for that job. The runtime is too noisy for that job. The repo contract plus metadata file is the right size.

APC gives me that anchor. APX gives me a runtime that respects it.

That split is small, but it removes a lot of accidental complexity.

And when a tool removes complexity by being less clever, I usually trust it more.