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

@tasks-md/parser

v0.10.2

Published

Parser for TASKS.md files — extracts tasks, metadata, priorities, and blockers

Downloads

1,185

Readme

@tasks-md/parser

npm

Parser for TASKS.md files — extracts tasks, metadata, priorities, blockers, and policies.

Scope: file format, not backend state. This package parses the markdown format — a claimed? field here is just the parsed (@agent) suffix on a line, not a backend claim. Collision-free claiming, leases, and the git-native event log live in the @tasks-md/cli backends and spec.md § Task backends; the parser is backend-agnostic and reads whatever TASKS.md it is given (including a git-native generated snapshot).

Install

npm install @tasks-md/parser

Use

import { loadAllTasks, pickBestTask, isBlocked, getAllTaskIds } from "@tasks-md/parser";

const taskFiles = loadAllTasks(process.cwd());        // discover every TASKS.md from the git root
const allIds = getAllTaskIds(taskFiles);
const result = pickBestTask(taskFiles);               // walks P0→P3, skips blocked / claimed / standing-loop
if (result) {
  const stillBlocked = isBlocked(result.task, allIds);
}

@tasks-md/cli, @tasks-md/lint, and tasks-mcp all call into this package — they share one parser and one pick algorithm so behavior cannot drift across surfaces.

API

parseTasksContent(content: string, filePath: string): Task[]
parsePolicies(content: string): Policy[]
discoverTaskFiles(directory: string): string[]
loadAllTasks(directory: string): TaskFile[]
loadAllTasksAsync(directory: string): Promise<TaskFile[]>
findGitRoot(directory: string): string

getAllTaskIds(taskFiles: TaskFile[]): Set<string>
isBlocked(task: Task, allIds: Set<string>): boolean
pickBestTask(taskFiles: TaskFile[], tags?: string[], agentName?: string): PickResult | undefined
findTasksById(taskFiles: TaskFile[], taskId: string): Task[]
normalizeTaskId(taskId: string): string
countUnblocks(task: Task, allTasks: Task[]): number
tagOverlapCount(task: Task, tags: string[]): number
interface Task {
  summary: string;
  priority: string;
  claimed?: string;
  metadata: TaskMetadata;
  subtasks: string[];
  file: string;
  startLine: number;
  endLine: number;
  rawLines: string[];
}

interface TaskMetadata {
  id?: string;
  tags?: string[];
  details?: string;
  files?: string[];
  acceptance?: string;
  blockedBy?: string[];
  blocked?: string;        // free-form external-constraint reason
  research?: string;       // agent-managed research notes
  lastEnriched?: string;   // ISO date YYYY-MM-DD
  [key: string]: string | string[] | undefined;
}

interface Policy {
  text: string;
  scope: "file" | string;  // "file" or "P0".."P3"
}

interface TaskFile {
  path: string;
  tasks: Task[];
  policies?: Policy[];
}

interface PickResult {
  task: Task;
  candidateCount: number;
  unblocksCount: number;
  resumed?: boolean;
}

pickBestTask is the single source of truth for queue ordering: walks P0 → P1 → P2 → P3, drops tasks that are claimed, blocked (non-empty **Blocked** OR a **Blocked by** ID still present in the queue), or carry the standing-loop tag. Within a priority it sorts by descending unblocking impact, then by descending tag overlap. Pass agentName to resume a prior claim before walking the queue.

See also

License

MIT