reference

Repository layout, item schema, state machine, velocity formula, MCP tools, CLI verbs, coach-mode wiring, and configuration.

← Back to overview

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`
Bands fill top-down by points; when an iteration's capacity is full, the next item starts a new band.

Single-item promote vs. bulk:

shell · promotion
$ 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.

unstarted
queued
started
in progress
finished
code done
delivered
on staging
accepted
PM signs off
rejected
sent back
rejected → started clears completion timestamps ·   accepted auto-stamps accepted: <ts>
accepted · the only state that feeds velocity chores skip finished releases skip started

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: bug and type: chore do not feed velocity unless story_types.bug_estimable or chore_estimable is enabled in config.
  • type: release is a marker with a release_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_day in iteration.timezone and span iteration.length_weeks weeks.
  • An item lands in iteration N when its accepted timestamp falls inside [start, end).
  • rolling averages the last N. strict drops high and low first. manual pins 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
Same chart, three surfaces: shell, GitHub-rendered 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.

build-login-flow.md
---
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

epicslug name. Stories sharing a slug roll up under am show epic SLUG and the epic_progress MCP tool.
hypothesiswhat should be true if the story works. Acceptance shifts from "did we ship X?" to "did the hypothesis hold?"
release_daterequired for type: release. Drives velocity-based ship projection.
archive: trueset 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:

users/alice.md
---
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.

.am/config.yaml
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:

.am/iterations.yaml
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:

claude_desktop_config.json
{
  "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

shell · register
$ 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_backlogsList backlog folders in the project.
list_itemsList items in a backlog with a count, filter by status or tag, and per-item type, assignees, blocked flag, and comment count.
get_itemRead an item's full markdown body plus type, assignees, blocked flag, epic, and parsed acceptance bullets.
priority_listOrdered _priority.md with status, points, type, assignees, tags, blocked flag, comment counts, plus the project velocity for iteration bands.
icebox_listOrdered _icebox.md with the same per-item fields and a count.
list_iteration_overridesReturn every active iteration override.
list_tasksReturn parsed checkbox tasks under "## Tasks" on an item.
list_acceptanceReturn parsed acceptance bullets with 1-based index, state (open / claimed / verified), text, and optional claim note.
get_commentsReturn parsed comments (author, when, text) plus a count for badge rendering.
next_itemHighest-ranked unstarted, unblocked story across the project. The "next pull" answer.
dashboardOne-block project dashboard: velocity, volatility percent, median cycle time, latest rejection rate, total accepted stories.
iteration_fitWhether the planned iteration fits within rolling velocity. Optionally adds a candidate item to forecast impact.
Coach · 4 tools
coach_checkPreflight 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_promptRender 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_docRead or write the project inception. Empty body returns the current inception.md (or the default template); non-empty writes.
sprint_planRender 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_backlogCreate a new backlog folder along with sample feature, bug, and chore items.
create_itemCreate a new item with a title.
archive_itemsArchive every active item modified on or before a date.
set_statusChange the status of an item to one of unstarted, started, finished, delivered, accepted, or rejected. The matching timestamp is stamped automatically.
reject_itemTransition 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_stateFlip 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_bulletAppend a new open acceptance bullet to a story. Creates the Acceptance section if missing.
set_assignedAssign an item to one user (string) or up to three (array). Single-owner items keep the YAML scalar form on disk.
set_estimateSet the story-point estimate.
set_hypothesisSet the hypothesis: frontmatter on a story.
set_tagsReplace the tags list on an item.
set_epicAttach a story to an epic slug, or pass an empty slug to clear it.
set_descriptionReplace the markdown body of an item. Frontmatter is preserved.
change_tagRename a tag across every item carrying it.
delete_tagRemove a tag from every item that carries it.
set_iteration_overrideSet a per-iteration team-strength or length override. Mirrors the Pivotal iteration_override resource.
rank_itemReorder an item inside _priority.md using top, bottom, after, or before.
move_to_iceboxMove a priority item into the icebox.
move_to_priorityMove icebox items into priority. Input order is preserved during a bulk move.
block_itemMark a story as blocked, optionally with a reason. UIs render a blocked badge.
unblock_itemClear a story's blocked flag and reason.
add_commentAppend a dated comment under "## Comments" on an item.
add_taskAppend a checkbox task under "## Tasks" on an item.
set_task_doneToggle the checkbox of a task by 1-based index.
team_agreementsRead or overwrite team-agreements.md at the project root.
record_learningAppend a dated one-line learning to learnings.md.
Run · 11 tools
validateRun schema validation across all items.
syncRegenerate derived views, enforce the priority/icebox invariant, commit, and push.
velocity_chartRender an ASCII bar chart of accepted points per iteration.
velocity_historyStructured velocity history rows: iteration, planned, accepted, length_weeks, team_strength.
burnup_chartPer-day burnup rows for an iteration window: day, scope, done.
type_mixCounts and percentages of accepted stories by type (feature, bug, chore, release) over the lookback.
timeline_chartRender an ASCII Gantt for items carrying a given tag.
iteration_viewRender a single iteration window from _priority.md. Offset 0 is the current iteration.
epic_progressRender an ASCII burnup for stories sharing an epic: slug.
cycle_time_chartReport median cycle time and the five longest stories in the backlog.
rejection_rateReport 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.mdThe source coach body. Read by Claude Code via the @ import in CLAUDE.md.
CLAUDE.mdThin 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.mdRead by OpenAI Codex CLI and emerging agents using the AGENTS.md convention. Carries the full body inline.
.github/copilot-instructions.mdRead by GitHub Copilot. Full body inline.
.cursor/rules/coach.mdcCursor'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.mdWalk the human through running an inception. Captures the six sections into inception.md.
.claude/skills/am-plan/SKILL.mdRun 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.mdPre-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.mdBreak a problem into Pivotal-sized stories. Each ≤ 8 pts, each independently shippable, each with acceptance criteria.
.claude/skills/am-accept/SKILL.mdPM 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.mdEnd-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.shPreToolUse 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.jsonWires 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_checkPreflight 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_promptRender the PM ceremony from a story file. am accept-prompt ITEM mirrors it.
iteration_fitWhether 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 initInstall 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 NAMECreate a new backlog folder. On first run, also drops the coach projections (same set as am init).
am create-item TITLECreate an item under the current backlog.
am create-user --name N --email EAdd a user manually (sync auto-discovers from git).
am syncValidate, regenerate views, commit, push.
State transitions
am start ITEMMark started (in progress).
am finish ITEMMark finished (dev complete). Stamps finished.
am deliver ITEMMark delivered (deployed). Stamps delivered.
am accept ITEMMark 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 POINTSSet the story-point estimate.
am tag ITEM TAG …Set tags (replace), or --add T / --remove T.
am epic ITEM SLUGAttach 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 XReorder 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 --allBulk-move whole icebox to bottom of priority, preserves order.
Views
am show priorityASCII render with iteration bands sized by velocity.
am show iceboxPlain stack-rank list.
am show iteration [N]One iteration window; 0 = current, 1 = next.
am show epic SLUGASCII burnup for an epic.
am show burnup [N]Per-day burnup for an iteration window. 0 = current.
am dashboardOne-block project dashboard: velocity, volatility, cycle time, rejection rate, accepted total.
am nextPrint 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 coachPrint 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 planRender the iteration plan for the current backlog.
am retroPrint an end-of-iteration summary plus the three retro questions and the helper commands for capturing outputs.
am pullPull 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 ITEMRender 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 ITEMPrint 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 NFlip bullet N to verified.
am acceptance reopen ITEM NFlip bullet N back to open.
am align ITEMPrint 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 ITEMClear a story's blocked flag.
am comment ITEM "text"Append a dated comment under "## Comments".
am task list ITEMList 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 TAGEdit start/end dates for items with a tag.
am archive YYYY-MM-DDArchive items finished before a date.
am change-tag OLD NEWRename a tag across every item carrying it.
am delete-tag TAGRemove a tag from every item carrying it.
am change-user OLD NEWReassign every item from OLD to NEW.
am delete-user NAMERemove a users/<name>.md file.
am import CSVImport a Pivotal Tracker CSV export.
am mcpRun the MCP stdio server.
am alias amAdd 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.