Agent Development Platform Architecture: A Practical Guide to Projects, Worktrees, and Subagents
This article breaks down the core architecture of agent development platforms and how to use it in practice. It explains how projects, workspaces, and Git worktrees define permission boundaries and isolated execution, compares direct-edit and isolated-worktree execution modes, and shows how parallel subagents can be split, merged, and terminated. It also covers slash commands and persistent goal delegation, keyboard shortcuts and context management, a four-layer security and governance model, and five dimensions for evaluating whether a platform is ready for production use.
1. From Conversational Coding to Platform-Based Agent Development
Over the past two years, the capability boundary of AI coding tools has expanded quickly: from single-turn code completion, to multi-turn conversational editing, and now to an autonomous execution paradigm centered on agents. The questions developers ask have shifted accordingly. It is no longer just “can it write this code correctly,” but “can it safely read, modify, run, and verify code in a real repository, and correct itself after a failure.”
Platforms of this kind usually share a few common traits: the project is the top-level organizational unit, the workspace defines the scope of code the agent can see, the version-controlled worktree serves as the isolated execution unit, and subagents handle tasks in parallel. Understanding how these abstractions relate to each other is the key to assessing the upper limit of such a platform.
2. Core Architectural Abstractions: Projects, Workspaces, and Worktrees
2.1 Project: The Minimal Autonomous Domain for Permissions and Configuration
A project is the top-level boundary of the agent runtime. It is typically bound to a set of local directories or code repositories and carries its own security isolation policy. Managing configuration and code at the same level keeps policy attached to the project: different projects can use different visible directory scopes, command execution allowlists, and network access policies, which avoids the permission sprawl that global configuration tends to create.
2.2 Workspace: The Visible Set for Cross-Repository Work
Complex requirements often span multiple repositories, such as backend services, frontend code, and infrastructure definitions. A platform lets you associate multiple workspaces under one project, giving the agent cross-repository context. In practice, it helps to designate a primary repository and its dependent repositories, and to document the dependency direction in the project description so the agent is less likely to modify the wrong repository.
2.3 Worktree: The Pivot for Parallelism and Safety
The Git worktree mechanism allows the same repository to be checked out into multiple directories on different branches at the same time. An agent makes changes inside an isolated worktree while the main workspace stays clean. This yields two direct benefits: parallel tasks do not interfere with each other, and changes accumulate as branches, which makes code review and rollback easier. Whether to enable isolation is essentially a trade-off between speed and control.
3. Starting a Task and Choosing an Execution Mode
The typical flow is: create a project, link directories or repositories, optionally configure an isolation policy, type the goal in the chat box, and pick an execution mode. There are generally two modes:
- Direct mode: the agent modifies the active directory directly. Feedback is fast, which suits small, low-risk changes that can be verified immediately.
- Isolated worktree mode: the agent works in a separate worktree and delivers the result as a diff. This suits medium- to high-risk changes and parallel exploration.
In practice, prefer isolated mode for tasks with a large blast radius, such as build configuration changes, dependency upgrades, and bulk renames. Use direct mode for small tweaks to docs and comments to keep iteration fast.
4. Parallel Subagents and Task Orchestration
The value of parallel local subagents is that decomposable work moves forward at the same time: one implements, one adds tests, one investigates failing logs. Three things matter when putting this into practice:
- Task splitting: split by file ownership so two subagents never write the same file.
- Result aggregation: the main agent merges diffs, resolves conflicts, and unifies style.
- Termination conditions: define clear acceptance criteria for each subtask, such as passing tests and no new static-check warnings.
A task description can be written as structured text so the main agent can parse and schedule it easily:
goal: add concurrency tests for the cache modulescope: src/cache/**, tests/cache/**constraints: do not change public interface signaturesacceptance: all new tests pass, with no new static-check warningsmode: worktree
5. Command System and Persistent Goal Delegation
Beyond natural-language conversation, these platforms usually expose slash commands as shortcuts for frequent operations, such as delegating a goal, clearing context, or switching modes. Persistent goal delegation is the capability most worth attention: once a goal is issued, the agent keeps looping until the acceptance criteria are met instead of waiting for confirmation at every step.
The engineering significance is a shift from a human driving every step to a human defining the goal and the boundaries. Guardrails are still required, otherwise the agent can get stuck in long, unproductive loops:
- Set a maximum iteration count or a time budget.
- Enforce stage checks such as build, test, and static analysis.
- Keep a manual takeover entry point and the ability to interrupt at any time.
- Require explicit confirmation for high-risk operations such as deletion, force push, and dependency changes.
6. Efficiency Details: Keyboard Shortcuts and Context Management
Frequent operations deserve keyboard shortcuts. Common conventions include opening the session picker, opening file search, focusing the input box, creating a new session, and moving up or down through history. On mainstream operating systems these usually appear as a command key plus a letter; across platforms, replace the command key with the corresponding control key.
Context management matters just as much. Use a new session for each independent task so unrelated history does not dilute attention. For long tasks, combine worktree isolation with periodic summaries, and record key conclusions in the project documentation so later sessions can reuse them.
7. Security and Governance: Writing Boundaries as Code
The biggest risk with a platform-based agent is not writing the wrong code, but operating out of bounds. Governance should cover four layers:
- File layer: restrict writable directories, and keep sensitive files such as keys, certificates, and production configuration read-only by default.
- Command layer: combine a command allowlist with a dangerous-command blocklist, and forbid deletion and pushes without confirmation.
- Network layer: configure egress policy per project, and pull dependencies from an internal mirror.
- Audit layer: record sessions, commands, and diffs in full so they can be traced back.
On the cloud, these controls can be assembled from general-purpose capabilities: object storage for audit logs and artifacts, a message queue to decouple long-running tasks, a container platform to host isolated execution environments, and logging plus monitoring and alerting to track abnormal loops and resource consumption. Baidu AI Cloud offers corresponding capabilities in these general categories, and resource and permission isolation can be applied at project granularity.
8. Five Dimensions for Evaluating Such a Platform
- Isolation: does it support worktree-level isolation and directory-level permissions.
- Parallelism: are subagent scheduling, conflict handling, and result aggregation reliable.
- Controllability: are there iteration budgets, stage checks, and manual takeover.
- Observability: are sessions, commands, and diffs auditable.
- Reusability: can project configuration, commands, and acceptance criteria be accumulated as team assets.
9. Conclusion
The competition around agent development platforms is moving from model capability to engineering guardrails. Project-based organization, worktree isolation, parallel subagents, and persistent goal delegation together form a practical paradigm for autonomous development. What really determines production readiness is how complete the permission boundaries, acceptance criteria, and audit system are. Teams are advised to start with small, low-risk scenarios, gradually increase the share of automation, and turn acceptance criteria and governance policies into versionable configuration assets.
