Workspace Layout
The .fabricharness directory convention.
Fabric Harness uses .fabricharness/ as the embedded workspace directory. The CLI walks up from your current working directory to find the nearest workspace root.
Directory shape
.fabricharness/
agents/ # TypeScript agent definitions (one per file)
ask.ts
issue-triage.ts
roles/ # Markdown role overlays
engineer.md
reviewer.md
skills/ # Reusable Markdown procedures
triage-issue/
SKILL.md
fix-tests/
SKILL.md
policies/ # Optional capability/security policies
default.ts
production.ts
sandboxes/ # Project-specific sandbox factories
local.ts
docker.ts
sessions/ # Persisted session state (gitignore-friendly)
build/ # Emitted build artifacts (gitignored)
config.ts # Optional central config (model, target, temporal, ...)
AGENTS.md # Repo-level agent guidelines (cross-tool standard)What each folder does
agents/
Each .ts file in this directory must default-export agent({...}) from @fabric-harness/sdk. Agent definitions declare typed input/output, model defaults, and triggers, and surface in fh describe.
See Agent anatomy.
roles/
Markdown files with optional YAML frontmatter. Roles are system-prompt overlays, not user messages. Precedence is call role → session role → agent role.
skills/
Each skill lives in its own directory with a SKILL.md. Frontmatter declares name, description, and (optionally) model. The body is the instructional prompt.
policies/
Optional. Capability policies that scope filesystem reads/writes, allowed commands, network egress, and required approvals.
sandboxes/
Project-specific factories that return a SandboxEnv. Use this when the built-in local/docker/empty sandboxes don't cover your needs.
sessions/
Session history, tasks, approvals, checkpoints, and artifacts persisted by the file-backed session store. SQLite and Postgres stores are also available — see Session stores.
build/
Output of fh build. Each target produces its own subdirectory:
.fabricharness/build/
node/
docker/
temporal-worker/
cloudflare/
foundry-hosted-agent/config.ts
Optional. See Configuration.
AGENTS.md
A repo-level Markdown file that tools across the agent ecosystem look for. Use it to capture project-wide guidelines (preferred libraries, security expectations, never-do's).