reference
Repository layout, item schema, state machine, velocity formula, MCP tools, CLI verbs, coach-mode wiring, and configuration.
Repository layout
Items live as .md files. _priority.md and _icebox.md hold the stack-rank order; every active item appears in exactly one of the two, and am sync enforces this invariant.
my-backlog/ ├── .am/config.yaml iteration · velocity · story-type rules ├── .am/iterations.yaml per-iteration team-strength + length ├── CLAUDE.md coach stance · Claude Code reads automatically ├── AGENTS.md coach stance · Codex CLI + AGENTS.md convention ├── .github/copilot-instructions.md coach stance · GitHub Copilot ├── .cursor/rules/coach.mdc coach stance · Cursor ├── .claude/skills/ five skills: am-accept, am-decompose, am-inception, am-plan, am-retro ├── .claude/hooks/coach-gate.sh PreToolUse hook · blocks hard-rule violations ├── .claude/settings.json wires the gate to set_status and set_estimate ├── index.md generated · all backlogs ├── velocity.md generated · velocity links ├── timeline.md generated · timeline links ├── users.md generated · user index ├── team-agreements.md team rules; coach reads as nudges ├── learnings.md one-line learnings (record_learning appends) ├── users/ │ └── alice.md ├── tags/ generated · per-tag pages ├── timeline/ generated · per-tag ASCII Gantt │ └── q2.txt └── product/ a backlog folder ├── product.md generated · project overview ├── archive.md generated · archive page ├── _priority.md stack-rank · top = next iteration ├── _icebox.md stack-rank · not yet committed └── build-login-flow.md the actual item
Files in orange are regenerated on every sync. Don't hand-edit them.
Priority and icebox
Two ordered files per backlog. Top = highest rank.
_priority.md. Items committed for an iteration window, or queued just behind it._icebox.md. Stack-ranked but not yet committed. Pre-sprint planning typically sorts the icebox top-down, then bulk-promotes a chunk into priority.
Render with iteration bands sized by rolling velocity:
$ am show priority Priority (product) velocity 13 / iteration ── Iteration 47 Mon May 11 0 / 13 pts ── 1. ★ Build login flow started 5p 2. ● Reset password bug unstarted 1p 3. ★ Search relevance unstarted 3p ── Iteration 48 Mon May 18 0 / 13 pts ── 4. ★ Saved searches unstarted 5p 5. ⚙ Split OrderService unstarted ── Backlog (untimed) ── 6. ★ Notifications unstarted 8p ── Icebox (12 items) ── see `am show icebox`
Single-item promote vs. bulk:
$ am unice "saved-searches.md" --top # single item, lands wherever you want
$ am unice --all # whole icebox to bottom of priority,
# order preserved (the Pivotal pre-sprint move)
State machine
The state machine matches Pivotal Tracker. Only stories that reach accepted contribute to velocity.
accepted auto-stamps accepted: <ts>State definitions
- finished. Dev says "code is done."
- delivered. Deployed to staging or shown to PM.
- accepted. PM signs off. Velocity counts only this state.
- rejected. Sent back. The next move (usually
started) clears the completion timestamps.
Story types
type: feature(default) feeds velocity.type: bugandtype: choredo not feed velocity unlessstory_types.bug_estimableorchore_estimableis enabled in config.type: releaseis a marker with arelease_date. Used for projecting whether the release will hit given current velocity.
Velocity
Average accepted points per iteration over the last velocity.lookback completed iterations.
- Iteration windows align to
iteration.start_dayiniteration.timezoneand spaniteration.length_weeksweeks. - An item lands in iteration N when its
acceptedtimestamp falls inside[start, end). rollingaverages the last N.strictdrops high and low first.manualpins a constant.- New projects bootstrap to
velocity.initial_velocity.
The Pivotal velocity formula
per_week = SUM(points_i / strength_i) / SUM(length_weeks_i) displayed = floor(per_week * default_length_weeks)
Iterations with team_strength: 0 are excluded from both sums.
Charts
Charts are ASCII. Same text in the terminal, in velocity.md and timeline.md on GitHub, and in MCP responses. No images, no binary diffs.
$ am velocity 8 Velocity last 8 iterations of 1 week 8 | ▇▇ 6 | ▇▇ ▇▇ 4 | ▇▇ ▇▇ ▇▇ 2 | ▇▇ ▇▇ ▇▇ +──────────────────────────── 04/01 04/15 04/29
velocity.md, MCP velocity_chart tool.Per-tag timelines render the same way: ASCII Gantt printed by the CLI, returned by the timeline_chart MCP tool, and embedded in timeline.md by am sync.
Item schema
An item is YAML frontmatter plus a markdown body.
---
title: Build login flow
project: product
type: feature
status: started
assigned: alice
estimate: 5
epic: auth-rewrite
tags: [q2, auth]
hypothesis: Login conversion lifts when reset-password is one click
instead of three.
created: 2026-04-15T09:00:00Z
modified: 2026-05-07T14:02:00Z
finished: 2026-05-09T17:00:00Z
delivered: 2026-05-10T10:00:00Z
accepted: 2026-05-10T16:30:00Z
timeline:
start: 2026-04-15
end: 2026-05-10
---
## Problem statement
…
finished, delivered, and accepted timestamps are auto-stamped by am finish / am deliver / am accept. They are not edited by hand.
Optional fields
epic | slug name. Stories sharing a slug roll up under am show epic SLUG and the epic_progress MCP tool. |
hypothesis | what should be true if the story works. Acceptance shifts from "did we ship X?" to "did the hypothesis hold?" |
release_date | required for type: release. Drives velocity-based ship projection. |
archive: true | set by am archive YYYY-MM-DD. Item moves under archive/ on next sync. |
Users · auto-discovered from git
You don't have to add users manually. am sync reads git config user.name and walks git log. Anyone who has committed gets a users/<name>.md file generated automatically. am create-user stays as an optional override for renaming, aliasing multiple emails, or pre-adding people who haven't committed yet.
A user file is just frontmatter:
---
name: Alice Example
emails: [alice@example.com, alice@personal.org]
---
The am sync step also writes a generated work view in the body, listing the user's items grouped by project and status. That part is regenerated every sync. Don't edit it by hand.
Items reference users by name, nickname, or email. The lookup is forgiving: assigned: alice, assigned: alice@example.com, and assigned: Alice Example all resolve to the same user file.
Configuration
Project settings live at .am/config.yaml. Auto-created with sensible defaults on first am create-backlog.
estimation:
scale: fibonacci # linear | fibonacci | powers | custom
values: [0, 1, 2, 3, 5, 8]
iteration:
length_weeks: 1 # 1 / 2 / 3 / 4
start_day: monday
timezone: UTC
velocity:
strategy: rolling # rolling | strict | manual
lookback: 3 # iterations to average
initial_velocity: 10 # bootstrap
story_types:
bug_estimable: false
chore_estimable: false
Per-iteration team strength and length overrides live separately in .am/iterations.yaml, mirroring Pivotal Tracker's iteration_override resource:
overrides:
- number: 12
team_strength: 0.5 # half-team week (vacation, offsite)
- number: 17
team_strength: 1.4 # surge week
length_weeks: 2 # this one iteration is two weeks
MCP integration
am mcp runs a stdio MCP server with 53 tools. Any MCP client connects.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json and add:
{
"mcpServers": {
"agilemarkdown": {
"command": "am",
"args": ["mcp"],
"cwd": "/absolute/path/to/your/backlog"
}
}
}
Restart Claude Desktop. cwd must be a directory inside a git repo containing your backlogs.
Claude Code
$ claude mcp add agilemarkdown -- am mcp
Run from inside the backlog repo. Claude Code uses the current working directory.
Tool reference
| Read · 12 tools | |
| list_backlogs | List backlog folders in the project. |
| list_items | List items in a backlog with a count, filter by status or tag, and per-item type, assignees, blocked flag, and comment count. |
| get_item | Read an item's full markdown body plus type, assignees, blocked flag, epic, and parsed acceptance bullets. |
| priority_list | Ordered _priority.md with status, points, type, assignees, tags, blocked flag, comment counts, plus the project velocity for iteration bands. |
| icebox_list | Ordered _icebox.md with the same per-item fields and a count. |
| list_iteration_overrides | Return every active iteration override. |
| list_tasks | Return parsed checkbox tasks under "## Tasks" on an item. |
| list_acceptance | Return parsed acceptance bullets with 1-based index, state (open / claimed / verified), text, and optional claim note. |
| get_comments | Return parsed comments (author, when, text) plus a count for badge rendering. |
| next_item | Highest-ranked unstarted, unblocked story across the project. The "next pull" answer. |
| dashboard | One-block project dashboard: velocity, volatility percent, median cycle time, latest rejection rate, total accepted stories. |
| iteration_fit | Whether the planned iteration fits within rolling velocity. Optionally adds a candidate item to forecast impact. |
| Coach · 4 tools | |
| coach_check | Preflight a planned action against the hard rules. Actions: set_status, set_estimate, create_item, and pull (refuses a feature pull when the body has no Acceptance section). Returns a structured verdict with the rule, its slug, and a suggested next move. |
| acceptance_prompt | Render the PM acceptance ceremony for one delivered story. Returns title, type, estimate, a structured bullets list with per-bullet state, and the rendered prompt_text with [ ] / [~] / [x] markers. |
| inception_doc | Read or write the project inception. Empty body returns the current inception.md (or the default template); non-empty writes. |
| sprint_plan | Render the iteration plan: top of priority up to rolling velocity, plus a below-line backlog. Flags missing acceptance criteria, oversized features, unestimated features, overcommit. |
| Write · 26 tools | |
| create_backlog | Create a new backlog folder along with sample feature, bug, and chore items. |
| create_item | Create a new item with a title. |
| archive_items | Archive every active item modified on or before a date. |
| set_status | Change the status of an item to one of unstarted, started, finished, delivered, accepted, or rejected. The matching timestamp is stamped automatically. |
| reject_item | Transition to rejected and append a dated note under "## Rejection notes". Optional failing_bullet cites the acceptance bullet that failed and reopens it from [~] back to [ ]. |
| set_acceptance_state | Flip one acceptance bullet's state. Open / claimed / verified. The agent marks bullets claimed at delivery; the PM ceremony marks them verified at acceptance time. |
| append_acceptance_bullet | Append a new open acceptance bullet to a story. Creates the Acceptance section if missing. |
| set_assigned | Assign an item to one user (string) or up to three (array). Single-owner items keep the YAML scalar form on disk. |
| set_estimate | Set the story-point estimate. |
| set_hypothesis | Set the hypothesis: frontmatter on a story. |
| set_tags | Replace the tags list on an item. |
| set_epic | Attach a story to an epic slug, or pass an empty slug to clear it. |
| set_description | Replace the markdown body of an item. Frontmatter is preserved. |
| change_tag | Rename a tag across every item carrying it. |
| delete_tag | Remove a tag from every item that carries it. |
| set_iteration_override | Set a per-iteration team-strength or length override. Mirrors the Pivotal iteration_override resource. |
| rank_item | Reorder an item inside _priority.md using top, bottom, after, or before. |
| move_to_icebox | Move a priority item into the icebox. |
| move_to_priority | Move icebox items into priority. Input order is preserved during a bulk move. |
| block_item | Mark a story as blocked, optionally with a reason. UIs render a blocked badge. |
| unblock_item | Clear a story's blocked flag and reason. |
| add_comment | Append a dated comment under "## Comments" on an item. |
| add_task | Append a checkbox task under "## Tasks" on an item. |
| set_task_done | Toggle the checkbox of a task by 1-based index. |
| team_agreements | Read or overwrite team-agreements.md at the project root. |
| record_learning | Append a dated one-line learning to learnings.md. |
| Run · 11 tools | |
| validate | Run schema validation across all items. |
| sync | Regenerate derived views, enforce the priority/icebox invariant, commit, and push. |
| velocity_chart | Render an ASCII bar chart of accepted points per iteration. |
| velocity_history | Structured velocity history rows: iteration, planned, accepted, length_weeks, team_strength. |
| burnup_chart | Per-day burnup rows for an iteration window: day, scope, done. |
| type_mix | Counts and percentages of accepted stories by type (feature, bug, chore, release) over the lookback. |
| timeline_chart | Render an ASCII Gantt for items carrying a given tag. |
| iteration_view | Render a single iteration window from _priority.md. Offset 0 is the current iteration. |
| epic_progress | Render an ASCII burnup for stories sharing an epic: slug. |
| cycle_time_chart | Report median cycle time and the five longest stories in the backlog. |
| rejection_rate | Report rejection rate per iteration over the lookback window. |
Coach mode
The agent is the dev pair, the human is the PM. Hard rules refuse, agreements nudge, acceptance belongs to the human.
The agent writes code, drafts stories, points them, and runs the state machine through delivered. It does not accept its own work. The Pivotal workflow has always run on that two-sided check; the AI-paired version keeps the same seam.
How it ships
am create-backlog writes four files into your repo, one per agent convention. Same body in each. Different filename so each agent reads its native location.
Coach projections (written on first am create-backlog) | |
.claude/agilemarkdown-coach.md | The source coach body. Read by Claude Code via the @ import in CLAUDE.md. |
CLAUDE.md | Thin file containing @.claude/agilemarkdown-coach.md. If a project already has a CLAUDE.md, the import is the way to attach the coach without overwriting your existing instructions. |
AGENTS.md | Read by OpenAI Codex CLI and emerging agents using the AGENTS.md convention. Carries the full body inline. |
.github/copilot-instructions.md | Read by GitHub Copilot. Full body inline. |
.cursor/rules/coach.mdc | Cursor's project-rule format. alwaysApply: true by default. Full body inline. |
Skills (Claude Code, written on first am create-backlog) | |
.claude/skills/am-inception/SKILL.md | Walk the human through running an inception. Captures the six sections into inception.md. |
.claude/skills/am-plan/SKILL.md | Run the IPM. Renders the top of priority up to velocity, surfaces missing acceptance criteria and oversized features, loops on edits. |
.claude/skills/am-align/SKILL.md | Pre-pull alignment. Reads the story, restates the agent's understanding, surfaces ambiguous bullets, asks the PM to confirm before any code is written. The genie safeguard. |
.claude/skills/am-decompose/SKILL.md | Break a problem into Pivotal-sized stories. Each ≤ 8 pts, each independently shippable, each with acceptance criteria. |
.claude/skills/am-accept/SKILL.md | PM acceptance ceremony, bullet-by-bullet. Auto-triggers on "accept this story" or /am-accept. Calls acceptance_prompt, walks each [~] claimed bullet for a yes/no, flips bullets to [x] verified, then transitions to accepted. |
.claude/skills/am-retro/SKILL.md | End-of-iteration retro. Pulls dashboard + velocity history + type mix; runs the three retro questions; offers to record outcomes. |
| Enforcement gate (Claude Code hooks) | |
.claude/hooks/coach-gate.sh | PreToolUse hook. Reads the JSON envelope, calls am coach-check, exits 2 to block the tool when the planned action breaks a hard rule. |
.claude/settings.json | Wires the gate to mcp__agilemarkdown__set_status and mcp__agilemarkdown__set_estimate. Future re-runs do not overwrite local edits. |
Existing files are never overwritten. The full-body projections (AGENTS.md, copilot-instructions, cursor coach.mdc) share the body in .claude/agilemarkdown-coach.md; a CI drift check compares them after stripping per-format frontmatter.
Two layers, two behaviors
Hard rules. The agent refuses to break these: features are capped at 8 points, bugs and chores are not estimated, the dev pair never accepts its own work, a feature without an ## Acceptance section cannot be pulled, an iteration cannot silently overcommit beyond rolling velocity, and releases stay as date markers rather than going through the state machine.
Working agreements (project-local). The agent reads team-agreements.md at the project root every session. Conflicts surface as nudges, not refusals. The human can override with a reason.
Three seams
The agent pauses at three moments. At pull, the agent restates the story and asks the PM to confirm before code is written; coach_check(action="pull") refuses when a feature has no acceptance bullets. At delivery, the agent flips claimed bullets to [~] with optional claim notes. At accept, the agent renders acceptance_prompt and walks the PM through the bullets one by one. On a hard-rule violation at any seam, the agent prints the rule, its slug, and the next move, then stops. All three are walked end to end in the tutorial.
Coach tools
Three MCP tools and three CLI mirrors back the ceremony so any agent gets the same primitives:
coach_check | Preflight a planned action. Returns allowed/refused, the rule, its slug, and a suggested next move. am coach-check mirrors it; non-zero exit on refusal. |
acceptance_prompt | Render the PM ceremony from a story file. am accept-prompt ITEM mirrors it. |
iteration_fit | Whether planned points fit rolling velocity. Optionally adds a candidate item to forecast impact. am iteration-fit mirrors it. |
Enforcement (Claude Code hooks)
Words alone are advisory. To make the hard rules enforced rather than encouraged, agilemarkdown ships a PreToolUse hook that gates two MCP tools.
When Claude Code is about to call mcp__agilemarkdown__set_status or mcp__agilemarkdown__set_estimate, the hook fires first, runs am coach-check against the planned action, and exits 2 if the verdict is refused. The tool call aborts and the refusal message surfaces in the conversation. The dev pair can no longer flip accepted on its own work or sneak a 13-point estimate past the cap.
The hook is plain bash. It reads the standard PreToolUse JSON envelope from stdin, picks out tool_name and tool_input, runs the matching am verb, and exits accordingly. Edit it freely; future am init runs do not overwrite an existing file.
Working agreements stay nudges by design. The hook only refuses hard-rule violations. Agreements live in team-agreements.md and the agent surfaces them as warnings, not as blocked tool calls.
Solo mode
One human paired with the agent is the common case. The same person wears both hats: dev's pair and PM. The acceptance prompt still renders, and the human still answers. That pause is what turns "did it run?" into "is this what the user needed?". The agent does not enforce a mode toggle; it trusts the human to answer the second question with care.
Commands
| Bootstrap | |
| am init | Install or refresh the coach-mode projections (CLAUDE.md, AGENTS.md, .github/copilot-instructions.md, .cursor/rules/coach.mdc, .claude/skills/*, .claude/hooks/coach-gate.sh, .claude/settings.json) in an existing repo. Idempotent. |
| am create-backlog NAME | Create a new backlog folder. On first run, also drops the coach projections (same set as am init). |
| am create-item TITLE | Create an item under the current backlog. |
| am create-user --name N --email E | Add a user manually (sync auto-discovers from git). |
| am sync | Validate, regenerate views, commit, push. |
| State transitions | |
| am start ITEM | Mark started (in progress). |
| am finish ITEM | Mark finished (dev complete). Stamps finished. |
| am deliver ITEM | Mark delivered (deployed). Stamps delivered. |
| am accept ITEM | Mark accepted. Stamps accepted; counts toward velocity. |
| am reject ITEM [--reason "…"] [--failing-bullet N] | Reject; clears accepted; with --reason, appends a dated note. With --failing-bullet N, the note cites the failing acceptance bullet and reopens it from [~] to [ ]. |
| Item fields | |
| am estimate ITEM POINTS | Set the story-point estimate. |
| am tag ITEM TAG … | Set tags (replace), or --add T / --remove T. |
| am epic ITEM SLUG | Attach to an epic, or --unset to clear. |
| am hypothesis ITEM "text" | Set the hypothesis frontmatter. |
| am strength NUMBER VALUE [--length N] | Per-iteration team-strength override. --unset clears; --list lists active overrides. |
| am team-agreements [--add "…" | --set "…"] | Read, append a bullet, or overwrite team-agreements.md. --add is the retro path. |
| am record-learning "note" | Append a dated one-line learning to learnings.md. |
| Ranking · priority · icebox | |
| am rank ITEM --top|--bottom|--after X|--before X | Reorder inside _priority.md. |
| am ice ITEM [--top] | Move item from priority to icebox. |
| am unice ITEM [--top|--after X] | Promote item from icebox to priority. |
| am unice --all | Bulk-move whole icebox to bottom of priority, preserves order. |
| Views | |
| am show priority | ASCII render with iteration bands sized by velocity. |
| am show icebox | Plain stack-rank list. |
| am show iteration [N] | One iteration window; 0 = current, 1 = next. |
| am show epic SLUG | ASCII burnup for an epic. |
| am show burnup [N] | Per-day burnup for an iteration window. 0 = current. |
| am dashboard | One-block project dashboard: velocity, volatility, cycle time, rejection rate, accepted total. |
| am next | Print the next pull (top-ranked unstarted, unblocked story). |
| am work [-u USER] [-s STATUS] [-t TAG] | Show work grouped by status. |
| am points [-u USER] [-s STATUS] | Total points by user / status. |
| am velocity [N] [--json] | ASCII velocity chart for last N iterations, or --json for structured rows. |
| Coach | |
| am coach | Print the coach's read on the project: pending acceptance, blocked stories, rolling velocity, next pull, working agreements, recent learnings. |
| am inception [--show] | Seed the project's inception document at inception.md. With --show, print the current doc. |
| am sprint plan | Render the iteration plan for the current backlog. |
| am retro | Print an end-of-iteration summary plus the three retro questions and the helper commands for capturing outputs. |
| am pull | Pull the next-ranked unstarted, unblocked story (combines next and start). |
| am deliver ITEM [--prompt] | Mark delivered. With --prompt, immediately render the PM acceptance ceremony. |
| am accept-prompt ITEM | Render the PM acceptance ceremony for a delivered story. |
| am estimate ITEM N [--advise] | Set the story-point estimate. --advise prints the Pivotal framing and exits without writing. |
| am coach-check ACTION [--path P] [--status S] [--estimate N] [--type T] | Preflight an action against the hard rules. Actions: set_status, set_estimate, create_item, pull. Non-zero exit on refusal. --action ACTION works as a flag synonym. |
| am iteration-fit [--candidate P] | Report whether planned iteration points fit rolling velocity. |
| Acceptance bullets | |
| am acceptance list ITEM | Print the bullets with state markers and indices. |
| am acceptance add ITEM "text" | Append a new open bullet. |
| am acceptance claim ITEM N [--note "…"] | Flip bullet N to claimed; the optional note rides along as a trailing HTML comment. |
| am acceptance verify ITEM N | Flip bullet N to verified. |
| am acceptance reopen ITEM N | Flip bullet N back to open. |
| am align ITEM | Print a structured pre-pull view of a story: title, type, estimate, acceptance bullets with state, and any warnings. |
| Story collaboration | |
| am block ITEM [--reason "…"] | Mark a story blocked, optionally with a reason. |
| am unblock ITEM | Clear a story's blocked flag. |
| am comment ITEM "text" | Append a dated comment under "## Comments". |
| am task list ITEM | List checkbox tasks on an item. |
| am task add ITEM "text" | Append an unchecked task. |
| am task tick ITEM N [--undo] | Toggle a task by 1-based index. |
| Bulk · admin | |
| am assign ITEM USER… | Assign one or more users (up to 3) to a story. |
| am timeline TAG | Edit start/end dates for items with a tag. |
| am archive YYYY-MM-DD | Archive items finished before a date. |
| am change-tag OLD NEW | Rename a tag across every item carrying it. |
| am delete-tag TAG | Remove a tag from every item carrying it. |
| am change-user OLD NEW | Reassign every item from OLD to NEW. |
| am delete-user NAME | Remove a users/<name>.md file. |
| am import CSV | Import a Pivotal Tracker CSV export. |
| am mcp | Run the MCP stdio server. |
| am alias am | Add a Bash alias with completion. |
Working with a team
Use git. Concurrent edits, attribution, history, access control, and audit are whatever your git host already does for code.
Generated views (index.md, velocity.md, timeline.md, users.md, tags/*.md) regenerate every am sync. Set merge=ours on those paths in .gitattributes if the merges get noisy.