npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nikovirtala/issues

v0.10.0

Published

Issue tracking kept as event logs in git: computed state, blockers and duplicates, relations and links to adr decisions. CLI and library.

Readme

@nikovirtala/issues

Issue tracking kept as event logs in git, built on @nikovirtala/ledger. An issue is a Markdown description plus append-only event files. Its state (open, in progress, closed), resolution, assignees, labels and relations are computed from the events: what blocks it, which issue a duplicate points to, what is ready to pick up. Issues can link to the repository's architecture decisions with implements. See the design doc.

Released at 0.x. 0.1.0 brought the issue kind, the library and the issues CLI (init, new, edit, start, stop, close, reopen, assign, label, comment, link, unlink, scope, for, ready, work, list, show, verify), with implements links checked against the repository's own decision log. 0.2.0 adds git hooks (issues hooks), a generated index.md kept fresh on every write (issues index), checks over code (scope globs, anchors, stale anchors), and references into other repositories checked against a local cache (verify --fetch-sources, issues sources fetch, list --source). 0.3.0 adds full-text search (issues search). 0.4.0 adds the MCP server (issues mcp: read and write tools, resources and state headers). The next minor release adds the MCP prompts and the agent skill (issues init --skill).

Install

npm install --save-dev @nikovirtala/issues   # Node 24 or newer, git 2.32.0 or newer
npx @nikovirtala/issues --help                # or run it without installing

issues needs Node 24 or newer (engines: >=24). It depends on @nikovirtala/adr to read decision logs, so installing issues installs adr too, and links its adr binary in node_modules/.bin.

Layout

docs/issues/
  issues.toml                                  # optional config (or issues.toml at the repository root)
  items/m4p8x2kd-split-orders-service.md       # the description, edited freely
  events/m4p8x2kd/20261020T081030Z-p4d2-opened.yaml
  events/m4p8x2kd/20261021T091512Z-7aq5-started.yaml
  templates/task.md                            # copied from the built-in on first use

Each issue has a canonical id (m4p8x2kd) and, once its opened event lands on the first-parent history of main, a number shown as ?42. Numbers are never stored or renumbered; files, events, links and commit trailers use the id. Commands take the id, the bare number (42, 0042) or ?42. In a shell, ?42 unquoted is a glob that can match a file named like a42, so type 42 or quote it: '?42'. An issue opened on a branch shows its id until the branch merges.

Commands

The examples assume the config issues init writes, where [policy] auto_commit = true makes every write commit. Add --no-commit to only stage; in a log whose config doesn't set auto_commit, add --commit to commit.

# Set up: write issues.toml (with auto_commit = true) and starter templates (bug, feature, task); never overwrites a file.
issues init --template task --template bug --commit
issues init --skill [--skill-dir .kiro/skills/issues]   # the agent skill and an AGENTS.md pointer

# Open an issue from a template; --section fills a section without an editor. An optional
# section without content gets no heading.
issues new "Split the orders service" --section goal="Two services." --section done="Both deploy."
issues new "Extract the consumer" --parent 1 --depends-on 3 --label type:feature --template feature --edit

# Edit the description: in $VISUAL or $EDITOR, or by heading and section. --section <id>=
# removes an optional section and text adds it back; a commit is refused if lint would fail.
issues edit 42
issues edit 42 --title "Split orders and payments" --section done="All three deploy."

# Work on it: start (assigns you when unassigned), stop, close, reopen.
issues start 42
issues stop 42 --reason "waiting for review"
issues close 42                                            # done
issues close 42 --resolution wontfix --reason "not needed" # a reason is required unless done
issues close 42 --duplicate-of 17 --reason "same crash"
issues reopen 42 --reason "it came back"

# Assignees, labels and code scope, as whole sets; me is you.
issues assign 42 --add me
issues label 42 --add priority:high       # replaces priority:low when priority is exclusive
issues scope 42 --set "src/orders/**"
issues comment 42 "Picked this up; starting with the consumer."

# Relations: depends-on, part-of, relates-to (the default), and implements to a decision.
issues link 42 17 --rel depends-on
issues link 42 ADR-0007 --rel implements
issues unlink 42 17 --rel depends-on

# Keep index.md generated ([log] index = "committed"); every write keeps it fresh.
issues index [--check] [--commit]

# Git hooks through ark's shared shims, next to adr's.
issues hooks install                      # or: uninstall, print --manager lefthook|husky|pre-commit
issues scope [42] --follow-renames        # what the pre-commit hook does with staged renames

# Other repositories' logs, read from a local cache.
issues sources fetch [<name>]
issues list --source platform

# What to work on.
issues ready [--mine] [--label type:bug] [--limit 10]
issues for src/orders/consumer.ts [--all]
issues work 42                            # your current issue in this worktree; --clear removes it

# Read and verify.
issues list [--state closed] [--all] [--assignee me] [--label type:bug] [--since ORIG_HEAD]
issues show 42 [--history] [--commits] [--no-comments]
issues search session cookie [--all] [--source platform]
issues verify [--staged | --base origin/main] [--fetch-sources] [--format text|json|github]

# Serve the log to agents over stdio (see MCP server).
issues mcp

Every command takes --json, --root <dir> (the log directory) and --help; reads also take --ref <ref>, and writes refuse it. Every write stages what it writes and commits only with --commit (or [policy] auto_commit, which the config issues init writes sets to true; --no-commit then only stages), with a Conventional Commits subject (see Commit subjects) and one Issue:/Issue-Event: trailer pair per issue and event type. -m gives your own message; the trailers join its last paragraph when that is a trailer block. An event write commits the issue's events directory, so an unstaged edit of a committed issue's description never blocks close --commit and is never swept into it. When the commit takes an issue's opened event (the issue was opened without --commit), it also takes that issue's staged description and template, and the same for any issue it references that isn't committed yet. It refuses with exit 2, writing nothing, when one of those files has unstaged changes, isn't tracked or is missing.

list shows open and in-progress issues unless you pass --state or --all; list --since <rev> shows the issues closed, reopened or assigned to you since <rev>, each marked [new: closed] and so on (the post-merge hook runs it with ORIG_HEAD). ready lists open issues that are not blocked, not assigned and have no open child, in [labels] priority order, then by number; --mine adds the issues assigned to you, first. An issue is blocked while the canonical issue of one of its dependencies isn't closed (a dependency closed as a duplicate blocks until the issue it duplicates is closed).

search lists the issues in which every word of the query appears in the id, the number (42 or ?42), the title, the description or a comment, ignoring case and accents as adr search does (cafe finds Café). Results are ranked: a word equal to the id or number counts most, then a title hit, then hits in the description and comments. Each result shows its state warning (blocked, closed, duplicate) and the best matching line. Only open and in-progress issues are listed unless you pass --all; a note counts the closed issues that also match. A query has 1 to 200 characters and at most 10 words. --json prints issues-search/v1.

Exit codes and JSON

  • 0: success, including a write that only adds warnings or writes nothing (an existing link, an unchanged set).
  • 1: failing findings from verify, or a write the log's rules forbid: an illegal transition, a missing reason, a cycle, a second parent, a duplicate of a duplicate, two labels of an exclusive prefix, an incomplete draft with --commit, or an agent close the policy forbids. Nothing is written, and the findings are in the output.
  • 2: the tool can't run: bad usage (unknown command, flag or issue, a qualified issue where none is allowed, --ref on a write), config, environment or internal errors, and a source verify --fetch-sources couldn't fetch. Nothing is written, except when git refuses a --commit: the write is then staged and the error says how to finish the commit.

With --json, stdout carries exactly one JSON document: issues-write/v1 for every write command, issues-list/v1, issues-show/v1, issues-ready/v1, issues-for/v1, issues-work/v1, issues-init/v1, issues-index/v1, issues-hooks/v1, issues-sources/v1, ledger's ledger-findings/v1 for verify, or ark-error/v1 when the command exits 2. Warnings and notes go to stderr.

Config (issues.toml)

Every key is optional. issues init writes this starter file:

# issues configuration. Every key is optional: https://github.com/nikovirtala/ark/tree/main/packages/issues#config-issuestoml
[log]
default_template = "task"
# "none", or "committed" to keep index.md generated and fresh in every commit (ADR-0010)
index = "none"

[labels]
exclusive = ["priority", "type"]

[policy]
close_requires_human = false
mcp_can_close = true
# Every write commits; --no-commit only stages.
auto_commit = true

[commit]
# {title} holds the title in quotes for new, and the issue's number (or id on a branch) with its title in quotes for every other write, as in: close ?42 "split the orders service".
# subject = "docs(issues): {action} {title}"

Every key, with its default or an example:

[log]
root = "docs/issues"            # read from <repo>/issues.toml; the default
default_template = "task"
main_branch = "origin/main"     # the ref numbers come from; default origin/HEAD, origin/main, main, …
index = "none"                  # or "committed": every write keeps index.md fresh, verify checks it

[labels]
exclusive = ["priority", "type"]               # an issue holds at most one label per prefix
priority = ["priority:high", "priority:low"]   # ready's order, highest first

[policy]
close_requires_human = false    # true: agents can't close issues
mcp_can_close = true            # false: agents can't close issues
auto_commit = false             # commit writes without --commit

[verify]
fail_on = "error"               # or "warning"

[commit]
subject = "docs(issues): {action} {title}"   # the default; --message overrides it

[scope]
anchor_keyword = "issue"        # the default: anchors read issue:<id>
anchor_exclude = ["**/*.md"]    # files never searched for anchors; default []

[hooks]
index = "check"                 # or "stage": pre-commit regenerates and stages a stale index.md
scope_follow_renames = "stage"  # or "warn", "off": what pre-commit does with renames of scoped files

[setup]                         # what init --setup writes; see "Agent setup"
prepare = "…"                   # the scripts.prepare to write; default none
note = "…"                      # a line for the generated scripts' headers; default none

[setup.pins]
issues = "0.8.0"                # exact versions the setup pins; default the running version

[[sources]]                     # other repositories' logs, checked against a local cache
name = "platform"
kind = "issues"                 # or "adr"; the name adr is reserved for this repository's decision log
url = "https://github.com/example/platform.git"
ref = "main"

The config is <repo>/issues.toml, whose [log] root chooses the log directory, or <root>/issues.toml. --root uses a repository-level file that names the same root, and overrides one that names another root with a warning.

implements targets decisions in the repository's own decision log, found as adr finds it (adr.toml, docs/adr); adr:<id>, the id, the number and ADR-0007 all work, and the link is stored as adr:<id>. issues shows the same decision numbers as adr list, including in a shallow clone when adr's index.md is committed. A link to a decision that isn't accepted is a warning.

Commit subjects

The [commit] subject template's {title} slot holds the title in quotes for new, and the issue's number (or its id on a branch) with its title in quotes for every other write, so git log --oneline reads without issues show. The title is the one the commit holds, so an edited heading is what the subject says. A title longer than the description's 72 characters is shortened inside the quotes, with the full title in the body.

| Write | Subject | | --- | --- | | new | docs(issues): open "split the orders service" | | edit | docs(issues): edit ?42 "split the orders service" | | start, stop | docs(issues): start work on ?42 "split the orders service" | | close | docs(issues): close ?42 "split the orders service", … as won't fix, … as a duplicate of ?17 | | reopen, comment | docs(issues): reopen ?42 "split the orders service", comment on ?42 "…" | | assign, label, scope | docs(issues): set the scope of ?42 "split the orders service" | | link, unlink | docs(issues): link ?42 "split the orders service" to ?17, unlink ?42 "…" from ?17 | | staged events of other types swept in | docs(issues): link and scope ?42 "…"; update ?42 "…" beyond three verbs; open and link ?42 and 1 other issue across issues | | init, index --commit | docs(issues): set up the issue log, docs(issues): regenerate the issue index |

A custom template must leave 20 characters for the title at the longest action (reopen, unlink and comment on); one that doesn't is refused when the config loads.

Hooks and CI

issues hooks install registers issues in ark's shared hook shims (one per hook, next to adr's when both are installed):

  • pre-commit: follows staged renames into scope globs ([hooks] scope_follow_renames), checks index.md (or regenerates and stages it with [hooks] index = "stage"), then runs verify --staged. --staged checks the issues the staged files touch, or every issue when a staged change touches issues.toml, the templates or the decision log, because a staged adr reject or mcp_can_close = false can break issues nothing else touches.
  • commit-msg: adds an Issue/Issue-Event pair per staged issue and event type, and Issue: <id> for your current issue (issues work) on every commit, adr's included. A message that says fixes ?42, closes ?42 or resolves ?42 for an issue with no staged closed event gets a note: issues never close from commit messages, so run issues close 42 in the pull request.
  • pre-push: verify --base @{upstream} --ref HEAD --fetch-sources.
  • post-merge: list --since ORIG_HEAD.

The checks verify runs include the code checks: an issue:<id> anchor naming a missing issue is an error, one naming a closed issue a warning (issue/stale-anchor). A scope glob that matches no tracked file is an error only while the issue is in progress: an open issue's globs may name code that doesn't exist yet, because the work is still planned, and a typo is still caught by issues scope's note, which says when verify will report it. issues start notes each glob that still matches nothing, since from that commit verify (and the pre-commit hook) reports it.

With index = "committed", every write keeps index.md fresh in the same commit, and verify reports a stale one (index/stale). hooks install also sets the clone's merge driver issues-index for it (merge.issues-index.* in .git/config, which init --setup names in .gitattributes), so a rebase, merge or cherry-pick of branches that each wrote the log renders index.md instead of stopping on it; issues doctor --fix-clone installs it too, hooks uninstall removes it, and a clone without it behaves as before (verify doesn't mind). issues index --merge is the driver's command, not for people. The index doesn't read other repositories, so an issue blocked only by an open issue in a source shows as Ready there; issues ready reads the cached copy.

Other repositories

References into [[sources]] logs (platform:m4p8x2kd) are checked against a local cache kept in the repository's git directory. Plain verify, the pre-commit hook and every read and write use only the cache and never the network: a referenced source that isn't cached gives one sources/not-fetched warning. verify --fetch-sources, for CI and the pre-push hook, fetches each source first, and a failed fetch exits 2. issues sources fetch refreshes the cache by hand. A ref may be a branch, a tag or a full commit; a tag or commit keeps CI reproducible. verify --json records the commit each source resolved to. link, new --parent/--depends-on and close --duplicate-of into a cached source refuse a missing target (issue/reference-missing, exit 1); into an uncached one they write with a note. issues list --source platform lists a cached source's issues with its numbers, or by id with a note when the source has no committed index.md, and issues search <query> --source platform searches them.

Fetching uses plain git and its credentials. For a private source in CI, use an insteadOf URL with a token from the CI secret store (git config --global url."https://x-access-token:${TOKEN}@github.com/".insteadOf "https://github.com/") or an SSH deploy key.

Agent setup

issues init --setup writes the agent setup for this tool in any repository. It never writes anything particular to ark's own repository, and what it writes, it writes for issues alone:

  • Pins. The MCP config and the hook scripts pin the exact version of the issues that ran, @nikovirtala/issues@<that version>, read from its own package. A sibling ark tool is run by the shared hooks only when its own setup pinned it in this repository.
  • Pieces. For each harness it detects (.claude/, .kiro/; both when neither exists, narrowed with --harness): the MCP server entry, a session-start and a before-edit hook and the scripts they run, the deny rules (Claude Code) or protect hook (Kiro) for this log's events and index, .gitattributes for the events, the skill and its AGENTS.md line. The hooks run only the tools whose config is in the repository, so a repository that uses issues alone never runs adr.
  • Git hooks. No prepare script is written unless you pass --prepare (npx -y @nikovirtala/issues@<version> hooks install || true, added to package.json; with no package.json, nothing) or the config names one. A scripts.prepare that is already there is kept and reported, and --force prepare replaces it. Without it, the session-start hook installs the clone's missing git hooks, and issues doctor reports them with the fixing command (issues doctor --fix-clone).
  • Reruns. Rerunning init --setup updates what it wrote and leaves what you changed, naming each such file and the command that overwrites it (init --force <piece>). It writes no template: a template you removed stays removed, and --template adds one by name.
  • Text. The generated scripts say what they do and link this section.

A repository changes the setup with a [setup] table in issues.toml. Every key is optional; without the table the setup is as above. Each tool reads only its own config, so a repository that wants the same value in the shared files whichever tool runs init sets it in each tool's config.

[setup]
prepare = "node scripts/git-hooks.mjs install --if-built"   # the scripts.prepare init writes, without --prepare
note = "Why these scripts look as they do."                 # one line, added to the scripts' header comments

[setup.pins]
issues = "0.8.0"      # exact versions, replacing the running one; a sibling's pin goes here too
adr = "0.8.0"

ark's own repository sets all three: its configs pin the previous release (ADR-0017), its prepare is a build-safe installer that skips an unbuilt checkout, and its note says why. [setup.pins] is also where its release bumps the pins.

Agents

An agent using the CLI sets ARK_AGENT=<agent-id>, and ARK_ON_BEHALF_OF=<email> for the person it acts for. Its events are recorded as the agent, acting on behalf of that address; without ARK_ON_BEHALF_OF, on behalf of the git user, with a note on stderr and in the JSON notes. An ARK_ON_BEHALF_OF that is still a ${…} placeholder, which an agent harness leaves when it doesn't pass the variable on, counts as unset, and the note says how to fix it.

Agents may close issues they finished, unlike accepting decisions, because a closed issue reopens. An agent's closed event must have a reason saying how the issue's Done when conditions were met (issue/agent-reason-required). With close_requires_human = true or mcp_can_close = false, an agent's close is refused with exit 1 (issue/agent-closed). These are rules of the log: verify checks every applied close, so after you turn either key on, a full verify reports earlier agent closes too, while verify --base reports only the issues a change touches.

Over MCP, every write is an agent's. issues mcp reads [policy] when it starts to decide whether it lists issues_close:

| mcp_can_close | close_requires_human | issues_close | At startup | | --- | --- | --- | --- | | true (the default) | false (the default) | listed | | | true | true | listed; every call is refused (issue/agent-closed) | stderr: issues: warning: issues_close refuses agents while [policy] close_requires_human is true | | false | false | not listed; a call is a JSON-RPC −32602 error naming the key and the config file | | | false | true | not listed, as above | |

The tool list is fixed at startup, so after turning mcp_can_close on, restart issues mcp before issues_close is listed. Every other change applies to the next call, because each call reads issues.toml again: turning mcp_can_close off or close_requires_human on makes the next issues_close an ok: false result with issue/agent-closed, and turning close_requires_human off lets the next close through. No tool reopens: issues_reopen answers −32602 saying that reopening is left to people, and an agent explains with issues_comment why an issue should be reopened. The CLI still lets agents reopen.

MCP server

issues mcp serves the issue log to agents over stdio, in the repository it starts in (--root works as for every command). Add it to your MCP client's server config:

{
  "mcpServers": {
    "issues": {
      "command": "npx",
      "args": ["-y", "@nikovirtala/issues", "mcp"],
      "env": { "ARK_ON_BEHALF_OF": "[email protected]" }
    }
  }
}

Set ARK_ON_BEHALF_OF in that env: stdio clients pass only a few environment variables (HOME, PATH and the like) to the server, so a value exported in your shell doesn't reach it. assignee: ["me"] and mine mean that address, or the git user's email without it. An invalid ARK_ON_BEHALF_OF, a directory outside a repository or a broken issues.toml makes issues mcp exit 2 before serving.

Setting ARK_ON_BEHALF_OF in each harness

issues init --setup writes MCP configs that pass ARK_ON_BEHALF_OF through from your environment and never hold its value. Set it where the harness can pass it on:

  • Claude Code reads .mcp.json, which passes "${ARK_ON_BEHALF_OF:-}". Export the variable in the shell that starts claude, for example export [email protected]. Unset, it arrives empty and writes are recorded on behalf of the git user, with a note. Claude Code asks you to approve a project's MCP servers the first time it sees them.
  • Kiro reads .kiro/settings/mcp.json, which passes "${ARK_ON_BEHALF_OF}". Kiro expands a variable only after you approve it: open Kiro's settings, search for "Mcp Approved Env Vars", add ARK_ON_BEHALF_OF, and export it in the shell that starts Kiro. Until then the server receives the text ${ARK_ON_BEHALF_OF}. issues treats that as unset, records the write on behalf of the git user, and says in the write's notes which setting fixes it.

issues doctor reports the variable for each harness the repository configures: unset, left as a placeholder, or set (for Kiro, with a reminder to approve it; doctor can't read that setting).

| Tool | Same document as | | --- | --- | | issues_search (query, include_closed, limit, source) | issues search <query> [--all] [--source] (issues-search/v1) | | issues_get (id, include_history, include_comments, ref) | issues show <id> [--history] [--no-comments] [--ref] (issues-show/v1) | | issues_list (state, label, assignee, limit, source) | issues list with the same filters (issues-list/v1) | | issues_ready (label, mine, limit) | issues ready (issues-ready/v1) | | issues_for_path (paths, relative to the repository root) | issues for <path>… (issues-for/v1) | | issues_templates | issues-templates/v1: each template's sections, required or not, with guidance |

| Write tool | Same issues-write/v1 document as | | --- | --- | | issues_open (title, template, sections, labels, parent, depends_on) | issues new with --section for each section | | issues_update (id, title, sections) | issues edit <id> --title/--section | | issues_comment (id, text) | issues comment | | issues_start (id) | issues start | | issues_stop (id, reason) | issues stop | | issues_close (id, resolution, reason, of) | issues close [--resolution] [--duplicate-of]; listed per [policy] (see Agents) | | issues_link, issues_unlink (id, to, rel) | issues link, issues unlink | | issues_label, issues_assign, issues_scope (id, set, add, remove) | issues label, issues assign, issues scope |

  • Every tool returns that JSON document as structuredContent, with a readable text. Errors (invalid input, an unknown issue, a log that can't be read) are isError results with ark-error/v1.
  • Every response that shows an issue's description leads with its state header. A duplicate's names the issue to work on instead and where to read it (DUPLICATE of ?1 (in-progress). Track work on ?1; read issues://issue/1.); a blocked issue's lists its open blockers.
  • Resources: issues://index (the table index.md holds), issues://ready (the ready list) and issues://issue/{id}, one issue's state header and description. {id} is the id, the number (42, 0042) or %3F42 for ?42: a literal ? starts a URI's query, so issues://issue/?42 names no issue.
  • source reads a [[sources]] issue log from the local cache only, as verify does; run issues sources fetch to update it.
  • Each call reads the log again, so edits, pulls and issues.toml changes apply to the next call.
  • Writes are recorded as an agent named by the MCP client (else ARK_AGENT, else mcp-client, with a note), acting on behalf of ARK_ON_BEHALF_OF; without it, on behalf of the git user, with a note in the result. Without either address, every write is an isError config result.
  • Writes stage their files and keep index.md fresh as the CLI does; they commit only with [policy] auto_commit = true. Then issues_open and issues_update refuse a description that fails its template's lint instead of committing it; without auto_commit the lint comes back in findings, to fix with issues_update.
  • issues_update refuses a description with unstaged changes (isError usage), so a person's unsaved edit isn't staged by an agent.
  • A write the issue log refuses (an illegal transition, the close policy, a missing reason, a duplicate of a duplicate, a cycle) is an ok: false result with the findings and a readable hint, not an error. set: [] clears a set; set can't be combined with add or remove.

| Prompt | Arguments | What it asks the agent to do | | --- | --- | --- | | issues_from_discussion | title, template, parent (all optional) | Look for an existing issue first, then open one issue with issues_open, filling the template's sections (listed in the prompt) from the discussion and listing open questions | | issues_breakdown | id (required), template | Split the issue (its state header and current children are in the prompt) into children part-of it, with depends-on where order matters, after the user agrees |

An unknown template or issue in a prompt's arguments is a JSON-RPC −32602 error.

Agent skill

issues init --skill writes the agent skill, the judgment of when to use the MCP tools, to .claude/skills/issues/SKILL.md, or to <dir>/SKILL.md with --skill-dir <dir> (for example .kiro/skills/issues for Kiro). It never overwrites an existing SKILL.md; one that differs from this version's skill is kept, with a note saying how to replace it. It also adds one line to AGENTS.md, for agents that don't load skills, unless a line there already names the skill's path:

Issues in this repository are tracked with issues: if your agent doesn't load skills, read .claude/skills/issues/SKILL.md before starting, continuing or finishing work, and follow it.

adr's pointer line names another path, so both can sit in one AGENTS.md. With --commit, an AGENTS.md with unstaged changes or not tracked is refused (exit 2); without it, the line is added but not staged, with a note. When the skill files are all it writes, the commit subject is docs(issues): set up the issues agent skill. The JSON skill is the SKILL.md path (written or kept), else null.

Library

The CLI is a thin layer over the library, and the MCP server uses the same functions and returns the same JSON documents.

import { closeIssue, listIssues, openIssueLog, readIssues, readyIssues, verifyIssues } from "@nikovirtala/issues";

const log = await openIssueLog({ cwd: process.cwd() });
const read = await readIssues(log);
const { issues } = readyIssues(read, { labels: ["type:bug"] });
const findings = await verifyIssues(log, { type: "full" });

initIssueLog, openIssue, editIssue, startIssue, stopIssue, closeIssue, reopenIssue, assignIssue, labelIssue, scopeIssue, commentIssue, linkIssue and unlinkIssue write; listIssues, showIssue, readyIssues, searchIssues, issuesFor, issueCommits and listTemplates (issues-templates/v1) read; renderIssueIndexText renders the index table of a read; resolveIssue and resolveTarget turn arguments into ids; setCurrentIssue, readCurrentIssue and clearCurrentIssue manage the current issue; stateHeader gives the header show prints; SKILL_MD is the skill text init --skill writes.

@nikovirtala/issues/kind exports only the issue kind (issueKind, made with ledger's defineKind), its relation graph (issueGraph) and their types, without any CLI code, for tools that fold issue logs themselves:

import { issueKind } from "@nikovirtala/issues/kind";