Skip to content

Project-qualified paths: projects as mount points in the tool namespace #1415

Description

@phernandez

Problem (measured, #1398 live A/B runs 3-4)

Tool outputs return project-prefixed identifiers (verified stored that way in live DBs: at-<run>-<task>/notes/redis-cache-tuning), but tool inputs demand a separate project argument plus a relative path. Agents do the natural thing — faithfully quote identifiers from prior results — and the quoted form is not accepted back. With the MCP server now fully stateless, an omitted project falls back to the default project, which in multi-project use is silently wrong: in run 4, five of seven POSIX-surface failures found the correct notes in the wrong project, and in run 3 an agent wrote a note into the wrong project and then 'verified' it there. POSIX-shaped verbs amplify the omission — shell affordances prime cwd-style thinking (nobody passes a project to ls).

Design

Make the project the first segment of the path namespace — projects as mount points — and close the round-trip:

  1. Accept slug-qualified paths/identifiers on every input (<project>/<path>), resolved through the existing qualified-permalink machinery (cloud already accepts workspace-qualified permalinks; local resolves the same way — the prefix is a virtual namespace, not a filesystem path).
  2. Advertise the namespace: the MCP server instructions enumerate active projects and state the path rule once; ls / (posix surface) lists projects as the root directory.
  3. Refuse, don't mislead: unknown first segment errors with 'no project X — active projects: a, b, c' (one-turn recovery); ambiguous unqualified paths in multi-project use refuse rather than silently defaulting. Same principle as project add should index by default and expose a trustworthy readiness signal #1414's never-indexed refusal.
  4. Collision rule needs an explicit decision: a project named notes vs a folder named notes in another project — first-segment-matches-a-project wins, documented, or a separator convention.

Why now / how we validate

The A/B harness (#1401) makes this measurable: run 4's five wrong-scope failures are the baseline; a v2 posix surface with qualified paths re-runs the identical tasks and the wrong-scope class should vanish. The eval built to compare surfaces also evaluates surface revisions.

Part of #1398 findings. Related: #1414 (readiness refusal), SPEC-47 (this is the addressing model its 'agent filesystem' framing implies).

🤖 Generated with Claude Code

https://claude.ai/code/session_014pmKq6bqCi6Zp6BTHuZjrp

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions