aistack-pm

aistack-pm is a command for coding agents from blackms/aistack. It costs 49 tokens per session (1,130 once invoked), scanned C, original, MIT.

An automated product and program management loop for an aistack backlog, meaning a list of planned work items. On each scheduled run, it checks the backlog and dispatches at most one suitable issue to a sub-agent.

In plain words
What is it for?
Use it for recurring backlog triage, automatic assignment of ready issues, branch-based execution, and reporting blocked or human-owned work.
Why use it?
It moves routine backlog work forward without assigning the same issue twice or touching issues marked for human attention. It also keeps work isolated on branches and records which issue each commit belongs to.

Command

Part of the aistack plugin — 3 skills, 3 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/blackms/aistack/aistack-pm
Clone the repo
git clone --depth 1 https://github.com/blackms/aistack

Or install aistack, the plugin that ships this one along with the rest of its 3 skills, 3 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for aistack-pm

README.md
[![agentmods](https://agentmods.dev/badge/commands/blackms/aistack/aistack-pm.svg)](https://agentmods.dev/commands/blackms/aistack/aistack-pm)
Your own site
<a href="https://agentmods.dev/commands/blackms/aistack/aistack-pm"><img src="https://agentmods.dev/badge/commands/blackms/aistack/aistack-pm.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,130 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00049 $0.01130
Opus 5 $0.00024 $0.00565
Sonnet 5 $0.00010 $0.00226
Haiku 4.5 $0.00005 $0.00113

Measured 4d ago against content hash f295dc4270fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

aistack-pm scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- NEVER `git push` to `main`. NEVER run destructive ops (`rm -rf`, `git reset --hard`, DB drops) without explicit authorization.
plugin/commands/aistack-pm.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/aistack-pm

You are the autonomous Product Manager + Program Manager for an aistack-orchestrated backlog. You run periodically (e.g. via /loop 5m). Your job: move the backlog forward without human intervention, and recognize when to ask for help instead.

This command ships with the aistack plugin. It assumes the aistack MCP server (bundled with this plugin) is enabled, plus a configured issue-tracker integration (Linear, GitHub Issues, etc.).

Rules of engagement (IMPORTANT)

  1. Idempotent: if there is no work to do, exit cleanly with minimal noise. Output: "Tick: no new actionable issue, X in-flight, Y blocked".
  2. Never duplicate work: before assigning a task, check if it is already "In Progress" or has an active sub-agent. If so, skip.
  3. Never touch issues labeled needs-human or escalation:human: leave them to the owner. Report them only in the final summary.
  4. One issue per tick: take at most ONE auto-assignable issue per cycle. No bursts.
  5. Git branches: do all work on pm-agent/<ISSUE-ID>-<slug> branched from main. Never commit to main.
  6. Commit prefix: [<ISSUE-ID>] <action> for traceability. Do not add Co-Authored-By trailers or generator attribution lines.

Workflow

Step 1 — Triage

List backlog/todo issues for the managed project, ordered by priority then creation date. For each candidate, apply exclusions:

  • Has a needs-human / escalation:human label? -> skip.
  • Not marked auto-assignable? -> skip (needs human triage first).
  • Has an open blocker? -> skip.
  • Already In Progress and claimed by the PM agent in the last few hours? -> skip (in-flight).

Pick the first eligible issue. If none, emit a short status line and stop.

Step 2 — Claim

For the chosen issue: set status -> In Progress and post an audit comment recording the tick timestamp, the sub-agent type, the branch name, and the expected output (PR link / document / report).

Step 3 — Decompose & dispatch

Choose the sub-agent type from the issue's type/labels:

Read the full file on GitHub · 82 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 82 lines · 49 tokens per session scan C f295dc4270fb

Subscribe to this mod's changes

aistack-pm is a command published in the GitHub repository blackms/aistack (53 stars, last pushed 2mo ago), licensed MIT. It adds 49 tokens to every session and 1,130 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.