Skip to content

docs: compatible-agent guide has no recommended workspace layout — three zones (platform-owned paths, committed workspace, volume-only runtime) #3797

Closed

Description

@vybe

Summary

docs/TRINITY_COMPATIBLE_AGENT_GUIDE.md tells an agent author where data/ goes and that the home directory is a durable volume, but it never says how a workspace should be organised as a whole. Add a short recommended workspace layout section built on three zones, so every scaffold, library skill and agent author can point at one source instead of inventing a tree.

Context

The platform reserves and reads a fixed set of directories in an agent's home (data/, public/, uploads/, shared-out/, shared-in/<agent>/, content/, .trinity/), the workspace is a git repo whose root is the home directory (see #1703 for the gitignore consequences), and the volume outlives the container. Nothing documents how those three facts should shape an agent's own files. The result today:

  • The library skill workspace-discipline (abilityai/trinity-skills) teaches its own tree (assets/, session-files/, scripts/) and does not mention data/ or public/.
  • The marketplace custom wizard scaffold documents the committed repo tree but not what is volume-only or platform-owned.
  • .gitignore conventions in the guide (the .trinity/* re-includes, session-files/) are listed without the rule that produces them.
  • docs: the setup.sh convention never says "no secrets" — agents are persisting GITHUB_TOKEN into ~/.profile #2530: the setup.sh convention never says "no secrets".

The recommendation should be a convention, not platform mechanics — the facts about the environment are being added to the injected platform instructions in a sibling issue on the private tracker (abilityai/trinity-enterprise#945), and this section must not contradict them.

Acceptance Criteria

  • The guide gains a "Recommended workspace layout" section organised as three zones: platform-owned paths (the reserved set above — never reorganised; data/ and .trinity/* never committed beyond the documented re-includes), committed workspace (the agent's repo: identity and config files at the root, .claude/skills/, docs/, dated append-only reports/<kind>/, intent docs, project_files/<slug>/ for multi-session work, scripts/), and volume-only runtime (gitignored: data/ for state, a scratch directory for session temporaries, side clones of other repos as disposable directories).
  • It states the three rules that matter more than the tree: the root holds only identity and config files; derived files are regenerated, never hand-edited; memory goes in one named memory directory, not loose notes.
  • It names the memory directory: the repo-level memory/, committed, so it travels with the agent (ruled by the operator 2026-10-18 — the repository is the agent). Claude Code's ~/.claude/projects/memory/ is mentioned only as the auto-memory location the injected platform prompt warns is shared across users, never as the recommended home; the sibling prompt issue uses the same name.
  • It picks one name for the multi-session project folder (project_files/<slug>/ is what the managed-project standard and the fleet use; the workspace-discipline library skill says projects/) and points at the project standard for the inside of that folder instead of redefining it.
  • It says whether other repositories inside the workspace are disposable side clones (gitignored, recreated by setup.sh) or git submodules; both exist in the fleet today and they behave differently under template re-pull and the platform's git paths (bug: agent workspaces with git submodules are second-class in the platform's own git paths — create_agent skips them, git_pull fails on a moved pointer #2366).
  • It says setup.sh persists packages and must not carry secrets (closes docs: the setup.sh convention never says "no secrets" — agents are persisting GITHUB_TOKEN into ~/.profile #2530's gap on this page).
  • The existing .gitignore guidance is re-stated as a consequence of the zones rather than a list to copy.
  • The section links the sources it derives from (the data-paths section already in the guide, the shared-folders and file-sharing user docs) and nothing in it contradicts the injected platform instructions.
  • The user-docs mirror, if any page restates the layout, is updated in the same PR so the docs site does not drift from the guide.

Technical Notes

Mirrors of this convention in the marketplace custom wizard and the library skill workspace-discipline are trinity-pm's to update after this lands; they are not part of this issue.

Activity

  1. added
    priority-p2
    type-docs
    theme-devex
    complexity-low
    status-ready
    on Oct 19, 2026
  2. vybe commented on Oct 19, 2026

    @vybe
    ContributorAuthor

    Prior-art check (trinity-pm, 2026-10-18). Asked the fleet's chief-of-staff agent to search its own repo, the shared canon and the managed-project standard for any existing home-directory layout convention or a ruling that this belongs elsewhere. Result: no layout convention exists beyond the workspace-discipline library skill, and no ruling places this anywhere but the guide. Four conflicts surfaced and are now acceptance criteria above:

    1. The skill's projects/ vs the fleet's project_files/<slug>/ — one name, and the inside of the folder is the project standard's, not the guide's.
    2. The skill has no scratch or volume-only zone; its session-files/ sits in the committed tree.
    3. "Memory goes in the memory directory" names no directory, and the fleet is split between a repo-level memory/ and ~/.claude/projects/memory/, which the platform prompt calls the agent memory directory.
    4. Other repositories inside a workspace exist today both as gitignored side clones recreated by setup.sh and as git submodules; the guide should say which it recommends.

    Once this lands, the workspace-discipline library skill is updated to cite the guide so agents have one source.

  3. vybe commented on Oct 19, 2026

    @vybe
    ContributorAuthor

    Operator ruling 2026-10-18 on conflict 3: the recommended memory directory is the repo-level memory/, committed. ~/.claude/projects/memory/ is Claude Code's auto-memory, shared across users; the guide mentions it only as that. AC updated; the sibling prompt issue carries the same name.

  4. vybe commented on Oct 19, 2026

    @vybe
    ContributorAuthor

    Draft PR: #3801 (base dev, tip 24c65fbf1). It was built by trinity-pm's build-chain run chain-agent-env. The reading review returned MERGEABLE AFTER FIXES, and those fixes are in. It states the same environment facts as #3800 (the platform-prompt side); merge the two together.

  5. vybe commented on Oct 19, 2026

    @vybe
    ContributorAuthor

    /validate-pr round 2 APPROVED #3801 at a178c5efc (review 5568241536). The guide, FAQ, agent-data.md and the feature flow now name the force-replace pull as the exception to "never touches untracked", say an ordinary pull rebases, and state that data/ is gitignored only once data_paths is declared, with the same wording as the platform-prompt PR #3800. CI: 19 pass, 6 skipped. The PR is out of draft.

    Merge it together with #3800 (approved at 8fd08e2b5). This issue carries status-ready, not status-in-progress, so the on-merge automation may not move it to status-in-dev; check the label after merge.

    — trinity-pm, build-chain run chain-agent-env

  6. added
    status-in-dev
    on Oct 19, 2026
  7. removed
    status-ready
    on Oct 20, 2026
  8. removed
    status-in-dev
    on Oct 26, 2026
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

    complexity-lowpriority-p2theme-devextype-docs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions