Skip to content

Comments

feat: replace role-based agent config with user-defined workspace paths#27

Open
natefikru wants to merge 4 commits intomainfrom
feat/workspace-agent-config
Open

feat: replace role-based agent config with user-defined workspace paths#27
natefikru wants to merge 4 commits intomainfrom
feat/workspace-agent-config

Conversation

@natefikru
Copy link
Owner

@natefikru natefikru commented Feb 18, 2026

Summary

  • Replace role enum with workspace path field in agent config — users point each agent to their own OpenClaw workspace directory
  • Per-agent Docker volume bind-mounts instead of single blanket workspace mount
  • Remove role template copying (SKILL.md, cron-jobs.json) from deploy pipeline
  • Cron/hooks now configured via openclaw passthrough block, not implicit role templates
  • Simplify AGENTS.md generation (no role display names)
  • Part of broader shift: reduce routing focus, increase deployment/orchestration focus

Changes

Schema (src/config/types.ts)

  • role enum removed, replaced with workspace: string (required)
  • skills field removed (was inert — never used at runtime)
  • Supervisor validation: supervises field presence triggers supervisor behavior (no role gate)

Parse (src/config/parse.ts)

  • Workspace paths resolved to absolute paths relative to config file directory

Deploy Pipeline

  • setupWorkspace: removed per-agent template copying loop
  • agents-md.ts: removed role display names and SKILL.md path references
  • generate-openclaw.ts: removed role-partial merge loop
  • generate-compose.ts: added per-agent workspace bind-mounts
  • deploy.ts: removed role from agent display log

Documentation

  • Updated README, GETTING_STARTED, MULTI-AGENT, ROADMAP, supervisor docs
  • All YAML examples updated from role: to workspace:

Test plan

  • 990 tests passing (3 new tests added for workspace volume mounts + path resolution)
  • Typecheck clean
  • knip clean (no dead exports)
  • No agent.role references remain in src/
  • Pre-commit hooks pass (format, lint, typecheck, tests)
  • Smoke test: single-agent and multi-agent configs produce correct compose output with per-agent volume mounts
  • Smoke test: workspace paths correctly resolved to absolute paths
  • All 35+ fixture YAMLs migrated
  • Documentation updated across 10 files

Breaking Changes

  • role field removed from agent config — use workspace instead
  • skills field removed from agent config
  • Agents no longer get automatic cron enablement based on role — configure via openclaw.default.cron passthrough

Replace the `role` enum with a `workspace` path field in agent config.
Users now point each agent to their own OpenClaw workspace directory
containing SOUL.md, HEARTBEAT.md, skills/, etc. ClawForce stops
managing agent personality templates and focuses on deployment wiring.

Key changes:
- AgentConfigSchema: role -> workspace, remove skills field
- parse.ts: resolve workspace paths relative to config file location
- generate-compose.ts: per-agent Docker volume bind-mounts
- generate-openclaw.ts: remove role-partial template merging
- setup.ts: remove SKILL.md/cron template copying
- agents-md.ts: remove ROLE_DISPLAY_NAMES, simplify agent entries
- Supervisor validation: empty supervises list triggers error (no role gate)
- Cron/hooks: configured via openclaw passthrough block, not role templates
- Delete test/unit/templates/roles.test.ts (templates decoupled from runtime)
- Update all 43 fixture YAMLs and 20 test files
- Add test for per-agent workspace volume mount in compose output
- Add test for multi-agent workspace volume mounts with absolute paths
- Add test verifying workspace paths are resolved to absolute paths
  relative to config file directory
Replace role-based agent configuration references with workspace-based
approach across README, getting started guide, multi-agent docs,
roadmap, supervisor research/plan docs, and smoke test checklist.
@natefikru natefikru marked this pull request as ready for review February 19, 2026 00:11
Integration (deploy-lifecycle.test.ts):
- Validate per-agent workspace volume mounts in generated compose
- Validate agents.list workspace paths in generated openclaw.json
- Verify workspace host paths are absolute (resolved by parseConfig)
- New multi-agent test: full pipeline with 2 agents, validates
  compose volumes, openclaw.json agents.list, and AGENTS.md content

E2E (runtime-pipeline.e2e.test.ts):
- Add validateWorkspaceArtifacts helper called after every deploy
- Validates compose volumes, openclaw.json, and AGENTS.md per-agent
- New multi-agent e2e scenario with runtime-multi-agent.yaml fixture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant