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

prd-flaw-checker

v0.1.1

Published

PRD 缺陷审查 OpenCode / Claude Code Skill —— 三轮深度分析(第一性原理 / 一致性 / 歧义检测),自动回写澄清结果到 PRD。

Readme

PRD Flaw Checker

A structured PRD analysis skill for OpenCode that uses first-principles thinking, consistency cross-validation, and ambiguity detection to uncover logical gaps, contradictions, vague descriptions, and open issues in Product Requirements Documents. It interactively collects clarifications from users and writes them back directly into the PRD.

中文文档

Overview

PRD Flaw Checker performs a three-round deep analysis on PRD documents.

Naming note — The internal skill identifier (as registered in SKILL.md) is bmad-prd-analyze, but the directory name is prd-flaw-checker. The directory name and skill name are independent; the skill name is what OpenCode uses to route triggers, while the directory name is just where the files live.

| Round | Analysis Type | Focus | |-------|---------------|-------| | A | First Principles | Core problem identification, assumption auditing, derivation chain validation, means-vs-ends confusion | | B | Consistency | FR-UJ alignment, terminology consistency, priority alignment, scope conflicts, dependency completeness | | C | Ambiguity Detection | Fuzzy adjectives, open-ended descriptions, implicit assumptions, missing acceptance criteria |

After analysis, findings are ranked by severity (Critical / High / Medium / Low) and presented to the user for interactive clarification. Confirmed fixes are then automatically written back into the PRD document.

Features

  • Three-Round Parallel Analysis — Three sub-agents analyze the PRD simultaneously from different angles.
  • Interactive Clarification — Critical and High-severity findings are presented as structured questions for the user to resolve.
  • Auto Write-Back — Confirmed clarifications are directly edited into the PRD using the edit tool, with status tracking.
  • Multi-Round Iteration — After each round of analysis and write-back, optionally start a new round until the document quality meets expectations.
  • Severity Classification — All findings are categorized as Critical, High, Medium, or Low.
  • Source Extraction — Works on a structured extract of the PRD rather than loading the full document into context.

Workflow

Stage 1: Locate PRD Document (+ optional addendum.md)
    ↓
Stage 2: Source Extraction (structured summary, full PRD not loaded)
    ↓
Stage 3: Three-Round Parallel Analysis (sub-agents A, B, C)
    ↓
Stage 4: Aggregate Findings (deduplicated, ranked by severity)
    ↓
Stage 5: Interactive Clarification (batched questions, Critical + High only)
    ↓
Stage 6: Write Back to PRD (auto-edit, status-tracked)
    ↓
Stage 7: Output Final Summary
    ↓
Stage 8: Ask to Continue (next round or end)

A finding is treated as confirmed only when you explicitly select one of the offered options or provide a free-text answer. Skipped or deferred items are marked [DEFERRED] in the report and not written back to the PRD.

Requirements

  • OpenCode with skill loading support.
  • Built-in tools used by the skill: task (subagent dispatch), question (interactive clarification), edit (PRD write-back).
  • No external packages or network access required.

Installation

  1. Copy this entire directory (prd-flaw-checker/) into your OpenCode skills directory. Common locations:

    • Project-level: .agents/skills/prd-flaw-checker/
    • Project-level (legacy): skills/prd-flaw-checker/
    • Global: ~/.config/opencode/skills/prd-flaw-checker/
  2. Verify the resulting layout:

    prd-flaw-checker/
    ├── SKILL.md
    ├── references/
    │   ├── first-principles.md
    │   ├── consistency-checklist.md
    │   └── ambiguity-patterns.md
    ├── assets/                  (optional, default empty)
    ├── README.md                (this file)
    └── README_zh.md
  3. Restart OpenCode for the skill to take effect.

The directory can be renamed freely — OpenCode only reads the name: field inside SKILL.md to identify the skill.

Usage

  1. Have a PRD document ready (e.g., prd.md). Optionally, place a related addendum.md in the same directory — it will be loaded alongside the PRD for cross-reference analysis.

  2. Trigger the skill via any of these natural language prompts (OpenCode matches them against the description field in SKILL.md):

    • "Please review this PRD for logical flaws."
    • "Which parts of this requirements document are unclear? Find ambiguous expressions."
    • "We're about to hold a review meeting — can you check this product proposal using first principles?"
    • "Do the rules for Feature A and Feature B in this PRD contradict each other? Check for consistency."
    • "As a developer, I want to know if this spec is testable and what boundary conditions are missing."
  3. Confirm the PRD file path when prompted. If the path is not provided, the skill scans the working directory for prd.md, *prd*.md, and similar candidates, and asks you to choose.

  4. Review the aggregated findings and answer the batched clarification questions (Critical and High severity only).

  5. The skill writes your confirmed answers back into the PRD via the edit tool. Medium and Low findings are listed in the final report but are not asked interactively — request them explicitly with "show me the Medium/Low items" if you want to address them.

  6. At the end of each round, choose whether to start another round. The skill itself has no automatic stopping criterion; iteration ends when you say so.

How It Works

First Principles Analysis (references/first-principles.md)

  • Deconstructs the PRD to its core problem and fundamental assumptions.
  • Audits each assumption: verified, unverified, or falsifiable.
  • Validates the derivation chain from problem → solution → features → FRs.
  • Identifies means-vs-ends confusion (mistaking "how" for "why").

Consistency Check (references/consistency-checklist.md)

  • Cross-references FRs with User Journeys (coverage gaps).
  • Checks terminology consistency across sections (glossary alignment).
  • Validates priority alignment with strategic goals.
  • Identifies scope conflicts (Non-Goals vs FRs, MVP boundaries).
  • Checks dependency completeness and NFR consistency.

Ambiguity Detection (references/ambiguity-patterns.md)

  • Scans for fuzzy adjectives (e.g., "reasonable", "fast", "user-friendly").
  • Detects open-ended descriptions missing quantitative boundaries.
  • Surfaces implicit assumptions that need explicit declaration.
  • Flags functional requirements lacking testable acceptance criteria.

Write-Back Strategy

| Finding Type | Write-Back Action | |--------------|-------------------| | Fuzzy adjective | Replace with confirmed specific value | | Missing quantitative boundary | Insert specific metric, threshold, or boundary condition | | Implicit assumption | Make explicit as [ASSUMPTION: ...] inline annotation | | Missing acceptance criteria | Add verifiable acceptance conditions under the FR | | Terminology inconsistency | Unify to confirmed standard term | | Priority / scope conflict | Correct based on user confirmation; mark unresolved with [CLARIFY: ...] | | Derivation gap | Insert missing intermediate reasoning steps | | Missing condition | Add specific trigger condition or branch description |

Severity Levels

Every finding is tagged with one of four severities:

| Level | Definition | Interactive? | |-------|------------|--------------| | Critical | Blocks release or invalidates the PRD's core value proposition. Must be resolved before sign-off. | Asked first, one batch | | High | Causes significant rework, contradiction, or testability failure. Should be resolved before development. | Asked after Critical, one batch | | Medium | Causes ambiguity that may lead to misimplementation. Should be clarified during design. | Reported only, ask on request | | Low | Stylistic, redundant, or minor clarity issues. Nice to fix. | Reported only, ask on request |

Structured Question Format

Each interactive question contains:

  • ID — e.g. A-03 (round letter + sequence).
  • Severity — Critical / High.
  • Location — PRD section and line range.
  • Evidence — verbatim quote from the PRD.
  • Question — what is being clarified.
  • Options — 2–4 multi-choice candidates inferred from context, plus an "Other (specify)" option for free-text input.

Questions are presented in batches grouped by severity (all Critical together, then all High) so you can answer them efficiently in one pass.

Example Output

A typical finding presented to the user:

[A-03]  Severity: High
Location: §3.2 User Authentication (lines 142–148)
Evidence: "登录响应应该比较快"
Issue:    "比较快" is a fuzzy adjective with no quantitative boundary.
Question: What is the target P99 response time for login?
Options:
  1. ≤ 200 ms
  2. ≤ 500 ms
  3. ≤ 1 s
  4. Other (please specify)

Output Language

  • All skill output (questions, summaries, write-back annotations) is produced in Chinese by default, as defined in SKILL.md.
  • Original PRD text and the user's own prompts are preserved verbatim regardless of their language.
  • To run the skill fully in English, edit the prompts inside SKILL.md and the three references/*.md files; no other changes are needed.

File Structure

prd-flaw-checker/
├── SKILL.md                           # Main skill definition and workflow (Chinese)
├── references/
│   ├── first-principles.md            # First principles analysis framework
│   ├── consistency-checklist.md       # Cross-reference consistency checklist
│   └── ambiguity-patterns.md          # Ambiguity and fuzziness detection patterns
├── assets/                            # Static assets (default empty)
├── README.md                          # This document (English)
└── README_zh.md                       # Chinese documentation

License

MIT License. See LICENSE for details.