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

@tpmjs/tools-postmortem-action-extractor

v0.2.0

Published

Extract action items from postmortem documents

Readme

@tpmjs/tools-postmortem-action-extractor

Extract action items from postmortem and incident review documents with automatic detection of owners, priorities, and due dates.

Installation

npm install @tpmjs/tools-postmortem-action-extractor

Usage

import { postmortemActionExtractorTool } from '@tpmjs/tools-postmortem-action-extractor';

const postmortemText = `
## Incident Summary
Database outage on 2024-01-15 from 14:00 to 14:45 UTC

## Actions

- Add monitoring for connection pool exhaustion (@john) [P0] due: 2024-01-20
- Update runbook with connection reset procedure (@sarah) [P1]
- Review and increase connection pool limits (devops team) [P2] within 7 days
- Schedule architecture review to discuss scaling strategy

## Follow-up
TODO: Document the incident in knowledge base (@mike)
`;

const result = await postmortemActionExtractorTool.execute({
  text: postmortemText
});

console.log(result.actions);
// [
//   {
//     action: "Add monitoring for connection pool exhaustion",
//     owner: "john",
//     priority: "high",
//     dueDate: "2024-01-20",
//     context: "Actions"
//   },
//   ...
// ]
console.log(result.count); // 5

Input

  • text (string, required): Postmortem or incident review text to analyze

Output

Returns an object with:

  • actions (array): Array of extracted action items, each containing:
    • action (string): The action item text (cleaned)
    • owner (string, optional): Person assigned to the action
    • priority (string, optional): 'high', 'medium', or 'low'
    • dueDate (string, optional): Due date in YYYY-MM-DD format
    • context (string, optional): Section header where action was found
  • count (number): Total number of actions extracted
  • metadata (object):
    • extractedAt: ISO timestamp of extraction
    • textLength: Length of input text
    • hasOwners: Number of actions with assigned owners
    • hasPriorities: Number of actions with priorities
    • hasDueDates: Number of actions with due dates

Detected Patterns

Action Items

  • Action:, TODO:, Follow-up:, Next step:
  • [action], [todo], [follow-up]
  • Bullet points in "Actions" or "Action Items" sections
  • Phrases like "we should", "we need to", "team must"

Owners

  • (@username) or @username
  • assigned to username
  • owner: username
  • [owner: username]

Priorities

  • [P0], [P1], [P2], [P3] (high, high, medium, low)
  • priority: high/medium/low
  • Emoji indicators: 🔴 (high), ⚠️ (high)
  • Keywords: critical, urgent (high)

Due Dates

  • due: 2024-01-20
  • by 2024-01-20
  • [due: 2024-01-20]
  • deadline: 2024-01-20
  • Relative: within 3 days, in 2 weeks (converted to absolute dates)

Features

  • Multiple Detection Strategies: Finds actions in both structured sections and inline throughout the document
  • Automatic Deduplication: Removes duplicate action items
  • Priority Sorting: Actions are sorted by priority (high → medium → low → none)
  • Flexible Formats: Supports various postmortem formats and styles
  • Context Preservation: Tracks which section an action came from

Example Formats Supported

Section-based

## Actions
- Implement retry logic (@alice) [P1]
- Add integration tests (@bob)

Inline

Action: Update the deployment guide with new steps (@charlie) due: 2024-02-01
TODO: Review error handling in payment service [P0]

Natural Language

We should add monitoring for this metric within 7 days.
The team needs to review the architecture by 2024-03-15.

License

MIT