preu.at / work / pm-cli

PM CLI

context that survives the session: goals, decisions and evidence kept in one shared record, where the next person or agent will look.

the problem

agents start each session without memory of the last one. what usually survives is a task list: titles, maybe a status. a title doesn’t carry why the work exists, what was decided, what was ruled out or how anyone will know it’s done, so a fresh session re-derives it, guesses, or asks someone who might not remember.

so i treat project management as a context problem: tasks become useful when they’re connected to goals, decisions, evidence, history and the coordination between the people and agents doing the work.

my role

i started PM CLI in february 2026, and i’m its designer and only human maintainer. coding agents do much of the implementation, and the commit history credits them as co-authors.

my part is the direction: what it’s for, the decisions below, and what counts as done.

first commit
17 feb 2026
people
me, plus coding agents credited in the commits
tracked in itself
3,001 items, 69 of them decisions

counted on 19 oct 2026 at 54a583c

decisions and trade-offs

  1. plain files in any folder

    instead of
    a server or a separate database
    because
    any agent that can read files can use it, and in a git repo it travels with branches and pull requests, reviewed like code.
    trade-off
    many writers need care: changes go through a journal and a workspace writer lock, and an append-only history, replayed with hash checks, catches drift.
  2. context outside the harness

    instead of
    the memory built into one model or agent tool
    because
    i switch models and harnesses as they improve, and the goals, decisions and history shouldn’t stay behind. the same record is reachable from the command line, over MCP, in ChatGPT and in the browser.
    trade-off
    nothing arrives by itself: an agent has to ask, and the record is only as good as what gets written down.
  3. a small vocabulary, extended from outside

    instead of
    a dedicated feature for every workflow
    because
    goals, items with acceptance criteria, decisions and typed links are parts that people and agents combine themselves. new behaviour goes into configuration, the SDK and separately published extensions, so nobody has to adopt a workflow they didn’t ask for.
    trade-off
    the core is still more complex than i’d like, and every extension is one more package to keep current.
  4. context on request, within a budget

    instead of
    loading everything, or a fixed summary
    because
    too much context misleads an agent as surely as too little. it asks for the slice it needs within a token budget, and is told what was left out and how to get it.
    trade-off
    the budget is PM CLI’s own estimate, not a model’s tokenizer count, and a ranking can leave out something that mattered. the omission receipt at least says so.

a reproducible handoff

what changes for the next session, shown on a synthetic project: two sessions that share nothing but the repository. session 1 records a goal, a decision and two tasks with acceptance criteria, one blocked by the other. session 2 starts cold.

how a handoff worksa recorded run of the case-study script with pm 2026.10.18: two sessions that share only the repository. a replay, not a live agent.
  1. session 1

    writes it down

    • goalCSV export for monthly reports
    • decisionStream CSV rows instead of building files in memory
    • taskStreaming CSV endpointin progress
    • taskDownload button on the reports pageblocked

    plus a progress note and a linked file. then the session ends, and its memory with it.

  2. the repository

    keeps it as files

    • epics/rpt-l1pf.toon
    • decisions/rpt-gfhy.toon
    • tasks/rpt-5epo.toon
    • tasks/rpt-yzm4.toon

    plain text in .agents/pm, next to the code, each with an append-only history.

  3. session 2

    starts cold and asks

    pm context --for orient
    • goalCSV export for monthly reports
    • decisionStream CSV rows instead of building files in memory
    • taskStreaming CSV endpointin progress
    • taskDownload button on the reports pageblocked

    plus session 1’s last three actions, in 988 of 3,000 estimated tokens.

show the recorded transcript
● pm-handoff.shpm 2026.10.18 · 2026-10-18
# session 1 recorded a goal, a decision, two tasks (one blocked) and:pm claim rpt-5epo --start  …pm comments rpt-5epo --add "text=Endpoint streams via a cursor (see rpt-gfhy). Remaining: 409 for open months."  …pm files rpt-5epo --add "path=src/reports/csv.ts,scope=project"  …# session 2: a fresh agent, nothing carried overpm context --for orient --limit 5summary:  …  in_progress: 1  blocked: 1  …hierarchy[1]:  - id: rpt-l1pf    title: CSV export for monthly reports  …    children[3]{id,title,type,status,children_total,children_closed}:      rpt-5epo,Streaming CSV endpoint,Task,in_progress,0,0      rpt-gfhy,Stream CSV rows instead of building files in memory,Decision,open,0,0      rpt-yzm4,Download button on the reports page,Task,blocked,0,0activity[3]{id,op,ts,author}:  rpt-5epo,release,"2026-10-18T19:03:01.720Z",session-1  rpt-5epo,files_add,"2026-10-18T19:02:56.447Z",session-1  rpt-5epo,comment_add,"2026-10-18T19:02:51.788Z",session-1blockers[1]{id,title,blocked_by,blocked_by_title,blocked_by_status}:  rpt-yzm4,Download button on the reports page,rpt-5epo,Streaming CSV endpoint,in_progress  …  token_budget: 3000  …  estimated_tokens: 988  within_budget: truepm get rpt-5epoitem:  id: "rpt-5epo"  title: "Streaming CSV endpoint"  …  status: "in_progress"  …  acceptance_criteria: "GET /reports/:month.csv streams rows with a header line; Open months return 409 with an explanation"  parent: "rpt-l1pf"  …linked:  files[1]{path,scope}:    src/reports/csv.ts,projectclaim_state:  claimed: false  …omission_receipt:  has_omissions: true  …    comments,"--fields comments"
verbatim output, trimmed only where marked “…”. in this run the orientation pack was estimated at 988 tokens of a 3,000 budget.

the script creates a throwaway repository, turns telemetry off and prints the transcript. run it yourself with PM CLI installed:

curl -fsSLO https://preu.at/case-study/pm-handoff.sh && bash pm-handoff.sh
read the script before running it
#!/usr/bin/env bash
# Reproducible PM CLI handoff demo from https://preu.at/work/pm-cli
# Download: https://preu.at/case-study/pm-handoff.sh
#
# Two "sessions" share nothing but the repository: session 1 records a goal, a decision,
# work with acceptance criteria and evidence; session 2 starts cold and asks PM for context.
# Synthetic project, throwaway directory, telemetry off. Requires @unbrained/pm-cli (`pm`).
#
#   bash pm-handoff.sh            # prints the transcript
#   KEEP=1 bash pm-handoff.sh     # keeps the demo repo for inspection
set -euo pipefail

dir="$(mktemp -d "${TMPDIR:-/tmp}/pm-handoff.XXXXXX")"
[[ "${KEEP:-}" == 1 ]] || trap 'rm -rf "$dir"' EXIT
cd "$dir"
git init -q

run() { printf '$ %s\n' "$*"; "$@"; printf '\n'; }
id_of() { pm list --json 2>/dev/null | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{const d=JSON.parse(s);const it=(d.items||d).find(i=>i.title===process.argv[1]);process.stdout.write(it?it.id:"")})' "$1"; }

echo "# pm $(pm --version) — demo repo: $dir"
pm init rpt --defaults --agent-guidance skip >/dev/null 2>&1
pm config project set telemetry-tracking off >/dev/null 2>&1

echo "# ---- Session 1 ----"
export PM_AUTHOR=session-1
pm create epic "CSV export for monthly reports" \
  --description "Finance re-types numbers from the reports page into spreadsheets." \
  --ac "Finance can download any closed month as CSV" >/dev/null
epic="$(id_of 'CSV export for monthly reports')"
pm create decision "Stream CSV rows instead of building files in memory" --parent "$epic" \
  --description "Large months exceed the 512 MB worker limit when buffered." \
  --ac "Export memory stays flat regardless of month size" >/dev/null
decision="$(id_of 'Stream CSV rows instead of building files in memory')"
pm create task "Streaming CSV endpoint" --parent "$epic" \
  --ac "GET /reports/:month.csv streams rows with a header line" \
  --ac "Open months return 409 with an explanation" >/dev/null
api="$(id_of 'Streaming CSV endpoint')"
pm create task "Download button on the reports page" --parent "$epic" --blocked-by "$api" \
  --ac "Button appears only for closed months" >/dev/null
run pm claim "$api" --start
run pm comments "$api" --add "text=Endpoint streams via a cursor (see $decision). Remaining: 409 for open months."
run pm files "$api" --add "path=src/reports/csv.ts,scope=project"
pm release "$api" >/dev/null

echo "# ---- Session 2: a fresh agent, no memory of session 1 ----"
export PM_AUTHOR=session-2
run pm context --for orient --limit 5
run pm get "$api"
download pm-handoff.sh

what i learned

  • use it on itself

    PM CLI’s own development runs on PM CLI: 3,001 items in its public repository, 69 of them decisions. the agents working on it hit the same friction as anyone else, and that friction becomes the next items.

    its .agents/pm folder
  • move instructions into the tool

    in may i cut the repository’s agent guide from 487 to 108 lines. exact flags now come from the installed version itself (pm <command> --help --json), so agents read them from the version they actually run.

    the commit, 8546f58
  • simplify by moving, not removing

    when the core gets heavy, behaviour moves into configuration and reusable SDK pieces instead of being deleted, so the people who rely on it keep it.

    the SDK guide

what this doesn’t show

measured scope

one synthetic project, one machine, one run. it shows that recorded context is returned to a cold session in a bounded, inspectable form.

  • it doesn’t measure whether agents finish work faster or better with it, or how many tokens it saves overall.
  • it says nothing about large teams, very large trackers or many agents writing concurrently.
  • acceptance criteria describe the intended outcome; they are not proof the outcome was reached. that still takes tests, review and evidence.
  • the token figure is PM CLI’s own estimate, not a tokenizer count for a specific model.
  • the counts above describe one repository at one commit. they show activity, not quality.

try it

ask your agent to set it up for your project and see how it fits your existing workflow, rather than copying someone else’s setup.

npm install -g @unbrained/pm-cli