Principle:AMAP ML SkillClaw Agent Workspace Management
| Knowledge Sources | |
|---|---|
| Domains | Filesystem_Management, Skill_Evolution |
| Last Updated | 2026-10-22 00:00 GMT |
Overview
A workspace management pattern that prepares a controlled filesystem environment for an autonomous agent, with bootstrap files directing focus, session evidence for grounding, and content-hash-based change detection.
Description
Agent workspace management addresses the problem of giving an autonomous agent a well-structured, safe environment to work in. The SkillClaw pattern creates a workspace with: compact session files (trajectory + summary), existing skill bundles (readable and editable), a manifest, a methodology document, and bootstrap files (AGENTS.md, SOUL.md, IDENTITY.md, USER.md) that direct the agent to focus on skill evolution rather than generic tasks. Change detection uses tree-sha256 hashes: before the agent run, each skill's content hash is recorded; after the run, any hash change indicates a created or modified skill. Deletions are detected but ignored (safety).
Usage
Use this principle when designing systems that need:
- Controlled environments for autonomous agents
- Content-hash-based change detection
- Bootstrap files that focus agent behavior
- Safe workspace reset between rounds
Theoretical Basis
The workspace is a controlled directory tree with hash-based diffing:
# Abstract algorithm (NOT real implementation)
def manage_workspace(root, sessions, skills, methodology):
write_sessions(root/sessions/, sessions) # compact JSON
write_skills(root/skills/, skills) # SKILL.md bundles
write_bootstrap(root/, AGENTS_MD, SOUL_MD) # focus directives
write_methodology(root/EVOLVE_AGENTS.md, methodology)
def detect_changes(workspace, before_snapshot):
after = {name: tree_sha256(read_bundle(name)) for name in workspace.skills}
changes = []
for name, hash in after.items():
if before.get(name) != hash:
action = "create" if name not in before else "improve"
changes.append({"name": name, "action": action})
return changes