This guide is Codex-first. It assumes your normal workflow is chat-driven, not command-driven.
- Install
workmeshandworkmesh-mcp. - Configure Codex MCP for
workmesh-mcpif you want MCP mode. - Install WorkMesh skills (router + CLI + MCP profiles).
- For complete run-mode and agent setup (CLI, MCP stdio), see:
Skill layout:
- canonical source skills live in
skills/ - project-local installs use
.agents/skills/for Codex and Cursor,.claude/skills/for Claude - user installs use
~/.codex/skills/,~/.cursor/skills/, and~/.claude/skills/
After this, your day-to-day entry flow is one prompt.
You can start from any directory state:
- brand new repo with no WorkMesh
- modern WorkMesh repo
- old legacy WorkMesh/backlog layout
- long-lived branch clone workflow
Run:
cd <repo-or-clone-dir>codexorcodex resume- Prompt:
Bootstrap WorkMesh in this repo. Use MCP if available, otherwise CLI. Detect repo state and set me up to start feature work.
When given that prompt, Codex should do this automatically:
- Detect tool mode:
- if WorkMesh MCP is available, use MCP tools.
- otherwise use WorkMesh CLI commands.
- Detect repository state:
- no WorkMesh data
- modern WorkMesh layout
- legacy layout (
backlog/,focus.json, deprecated structures) - clone/branch stream not yet migrated to worktree model
- Apply the correct path:
- New repo: initialize WorkMesh, seed project/task context.
- Modern repo: validate health and show current scope + next work.
- Legacy repo: migrate to modern layout, then continue.
- Clone-based stream: continue work now and recommend worktree consolidation path.
- Confirm bootstrap result in chat:
- detected state
- actions taken
- current context
- next recommended task(s)
After bootstrap, use one explicit feature prompt:
Use WorkMesh for this feature end to end. Create/update PRD, create and maintain tasks with acceptance criteria and definition of done, keep context current, and track stable decisions in Truth Ledger.
Quality expectations:
- By default, every actionable task should have meaningful
Description,Acceptance Criteria, andDefinition of Done. - By default,
Definition of Doneshould include outcome-based completion criteria, not only hygiene checks. - Repos can override those required fields with
task_require_description,task_require_acceptance_criteria,task_require_definition_of_done, andtask_require_outcome_based_definition_of_done. - WorkMesh gates actionable and
Donetransitions when the configured quality requirements are not met.
From here, stay in normal chat. You should not need to switch into command memorization mode.
When you come back later:
cd <repo-or-worktree>codex resume- Prompt:
Rehydrate this session with WorkMesh: restore context, accepted truths, and next actionable tasks.
If you run multiple parallel workstreams (often one git worktree per stream), you can restore them deterministically from any checkout of the repo:
cd <repo-or-any-worktree>- Run:
workmesh --root . workstream restore --jsonThis returns a per-workstream restore plan. Each entry includes:
worktree_path: where to open a terminal for that streamsession_id: the last-known session for that stream (best effort)context: objective/scope (fromcontext.json, legacyfocus.json, or the workstream snapshot)next_task: the next recommended task under that stream's contextresume_script: the exact commands to run in that worktree to resume
Typical usage:
- Open a terminal in
worktree_path. - Run the
resume_scriptcommands (they includesession resume,context show, andnext). - Continue feature work in Codex from that worktree.
Tip: to get resume commands for a single workstream:
workmesh --root . workstream show <id-or-key> --restore --jsonIf you currently keep multiple full clones for parallel streams, migrate progressively:
- Pick one canonical repo clone.
- Keep current stream moving.
- For each old clone, adopt it into a git worktree (backup + worktree add):
workmesh --root . worktree adopt-clone --from <path-to-clone> --json
workmesh --root . worktree adopt-clone --from <path-to-clone> --apply --json- Bind a workstream to the created worktree with
workstream create --existing(the adoption plan includes the exact command). - Attach/save session metadata to each worktree (
session save,worktree attach). - Retire old clone directories after validation.
This migration is operationally helpful, but it should not block you from feature work.
Only use this if you explicitly want direct CLI execution.
- Bootstrap:
workmesh --root . bootstrap --project-id <project-id> --feature "<feature-name>" --json - Context:
workmesh --root . context set --project <project-id> --epic <epic-id> --objective "<objective>" - Next task:
workmesh --root . next --json - Session resume:
workmesh --root . session resume --json - Workstream restore (all active streams):
workmesh --root . workstream restore --json - Worktrees:
workmesh --root . worktree list --json - Adopt clone into worktree:
workmesh --root . worktree adopt-clone --from <path-to-clone> --apply --json - Archive (default terminal statuses):
workmesh --root . archive --before 30d --json - Archive (explicit override):
workmesh --root . archive --status "To Do" --before 2026-12-31 --json - Migrate legacy:
workmesh --root . migrate audit|plan|apply --apply
- Command reference:
docs/reference/commands.md - Documentation index:
docs/README.md