CLI Sync

Keep your coding agent in sync with your project context — briefs, tasks, blueprints, and methods update on disk in real time.

Overview

When you run hamster sync --watch, the CLI holds a live connection to Hamster Studio and writes every change to your .hamster/ directory as it happens. A teammate updates task requirements in the browser — within seconds, the markdown file on your disk reflects the change. Your coding agent reads that file on its next action and has current context.

This is the core of what the CLI does: it turns your project management context into a local, always-current knowledge base that your coding agent can read directly.

What Your Agent Gets

Every synced file is a markdown document with structured YAML frontmatter. A task file includes the task description, acceptance criteria, priority, estimated complexity, and dependency chain. A brief file has the full product requirements. Blueprints contain architecture decisions. Methods capture team conventions.

When your coding agent starts a session in a repo with .hamster/ synced, it can read these files to understand:

  • What to build — the brief's requirements and the task's instructions
  • When it's done — the acceptance criteria listed in the task
  • How to build it — blueprints for architecture patterns, methods for team conventions
  • What to work on next — task priority, status, and dependency ordering

No copy-pasting requirements into chat. No switching windows to check a task description. The context is on disk, in the repo, updated live.

Skill Generation

After each sync, the CLI generates a skill file at .claude/skills/hamster-project-context/SKILL.md. This file tells your agent where every synced document lives, how to interpret the frontmatter fields, and how to navigate between briefs, tasks, blueprints, and methods. It loads automatically at session start.

The skill file also includes current statistics — how many briefs, tasks, blueprints, and methods are synced, and when the last sync ran — so the agent knows the scope of the project it is working on.

What Gets Synced

Entity Local path What's in it
Briefs .hamster/{account}/briefs/{brief}/brief.md Product requirements and context
Tasks .hamster/{account}/briefs/{brief}/tasks/HAM-001-title.md Instructions, acceptance criteria, priority, complexity, dependencies
Blueprints .hamster/{account}/blueprints/{name}.md Architecture decisions and patterns
Methods .hamster/{account}/methods/{name}.md Team conventions and processes

Done and archived briefs are excluded automatically. Your .hamster/ directory only contains active work.

One-Time and Continuous Sync

hamster sync runs once and exits — useful for CI environments or quick refreshes.

hamster sync --watch runs continuously. It does an initial full sync, then listens for changes over a live connection. Individual files update as they change — the CLI does not re-download everything on each edit. If the connection drops, it reconnects and runs a full sync to catch anything missed.

Run hamster sync --force to ignore the local cache and pull everything fresh.

File Structure

.hamster/{account-slug}/
├── briefs/
│   └── my-project/
│       ├── brief.md
│       └── tasks/
│           ├── HAM-001-set-up-auth.md
│           └── HAM-002-build-dashboard.md
├── blueprints/
│   └── engineering-context.md
├── methods/
│   └── code-review-process.md
└── .state.json

.claude/skills/hamster-project-context/
└── SKILL.md

Add .hamster/ to your .gitignore. The content is generated and specific to your account.

Tips

  • Run hamster status to see sync statistics — what was synced last, how many entities are on disk, and whether anything is stale.
  • Watch mode reconnects automatically and runs a full resync on reconnect. You do not need to restart it.
  • Task files include structured metadata from plan generation: priority, estimated hours, dependencies, and acceptance criteria. This is the same information your coding agent uses to pick the right task and know when it is done.
  • Combine file sync with the MCP Server for bidirectional flow: the CLI gives your agent read access to current context, and the MCP server lets it write back — updating task status, creating subtasks, marking work done.

Related