# `Agentic.Workspace.Service`

Manages workspace file structure and policy.

Creates and maintains the workspace directory structure:
  workspace/
  ├── AGENTS.md              # Boot sequence & operating guidelines
  ├── TOOLS.md               # Available tools & credentials
  ├── MEMORY.md              # Curated long-term memory
  ├── HEARTBEAT.md           # Periodic task config
  ├── CAPABILITIES.md        # Skill registry
  ├── skills/                # Installed skills
  ├── memory/
  │   └── YYYY-MM-DD.md      # Daily logs
  ├── policy/
  │   └── policy.yaml        # Tool permissions
  ├── scratch/               # Scratch space (task workspaces)
  └── TASK.md                # Task brief (task workspaces)

Identity files (SOUL.md, IDENTITY.md, USER.md) are created by the agent
during the onboarding conversation, not scaffolded here.

# `copy_identity_files`

Copy identity files (SOUL.md, IDENTITY.md, USER.md) from a source workspace
to a destination workspace. AGENTS.md is intentionally excluded as it is
workspace-specific and always scaffolded fresh.

# `create_daily_log`

Create a daily log file for today.

# `create_workspace`

Create a new workspace with the full directory structure.

Options:
- `:workspace_type` — `:general`, `:personal`, `:admin`, `:team`, or `:task` (default: `:general`)
- `:workspace_template` — `:standard` (default: `:standard`)
- `:storage` — a `%Storage.Context{}` (default: local backend for workspace_root)

# `ensure_base_dir!`

Ensure the workspace base directory exists.

# `get_memory_dir`

Get the memory directory for a workspace.

# `get_policy`

Get the default workspace policy.

# `get_roots`

Get the allowed roots for a workspace.

# `set_policy`

Set the workspace policy.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
