m3taz-ahmed/aizee / skills/bmad-review
bmad-review
VerifiedRuns one or more installed review lenses — adversarial critique, edge cases, verification gaps, structure, prose — and reports triaged findings. Use when, and only when, the user asks you to review a diff, a pull request, or an artifact — code or documents, one or many — and actually says "review"; an explicit skill:bmad-review directive from another skill counts as that ask. A request to act on feedback from an earlier review is a change, not a review. Never invoke this uninvited, including on edits you just made.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.8 KB |
| bmod.toml | config | 84 B |
| customize.toml | config | 5.7 KB |
| references/editorial-common.md | markdown | 5.7 KB |
| references/lens-adversarial.md | markdown | 779 B |
| references/lens-edge-case-hunter.md | markdown | 5.7 KB |
| references/lens-prose.md | markdown | 1.3 KB |
| references/lens-structure.md | markdown | 1.5 KB |
| references/lens-verification-gap.md | markdown | 7.6 KB |
| references/structure-models.md | markdown | 1.9 KB |
| scripts/tests/test_word_metrics.py | script | 1.8 KB |
| scripts/word_metrics.py | script | 3.6 KB |
scripts/word_metrics.py
View on GitHub#!/usr/bin/env python3
# /// script
# requires-python = ">=3.11"
# ///
"""Exact word counts for a document, as JSON.
Emits the document's total word count and a per-heading-section breakdown so
an editorial review can ground word-impact estimates and reduction
percentages in real numbers instead of guessing. Sections are delimited by
markdown headings (# through ######); heading markers inside fenced code
blocks are ignored (fences pair CommonMark-style: a fence closes only on a
run of the same character at least as long, so ```` fences may embed ```
examples). A word is any whitespace-separated token, plus one word per
Chinese or Japanese character since those scripts do not space-delimit words.
Korean spaces its words, so Hangul counts per token. For non-markdown
input the result is a single section holding the full text.
"""
import argparse
import json
import re
import sys
from pathlib import Path
HEADING = re.compile(r"^(#{1,6})\s+(\S.*)$")
FENCE = re.compile(r"^ {0,3}(`{3,}|~{3,})")
CJK = re.compile(r"[-ヿ㐀-䶿一-鿿豈-ヲ-゚]")
def word_count(text: str) -> int:
cjk = len(CJK.findall(text))
return cjk + len(CJK.sub(" ", text).split())
def section_metrics(text: str) -> list[dict]:
sections = []
current = {"heading": "(preamble)", "level": 0, "body": []}
open_fence = None # (char, length) while inside a fenced block
for line in text.splitlines():
fence = FENCE.match(line)
if fence:
marker = fence.group(1)
if open_fence is None:
open_fence = (marker[0], len(marker))
elif marker[0] == open_fence[0] and len(marker) >= open_fence[1] and line.strip() == marker:
open_fence = None
current["body"].append(line)
continue
match = None if open_fence else HEADING.match(line)
if match:
sections.append(current)
current = {
"heading": match.group(2).strip(),
"level": len(match.group(1)),
"body": [],
}
else:
current["body"].append(line)
sections.append(current)
out = []
for section in sections:
words = word_count("\n".join(section["body"]))
if section["heading"] == "(preamble)" and words == 0:
continue
out.append({"heading": section["heading"], "level": section["level"], "words": words})
return out
def metrics(path: Path) -> dict:
text = path.read_text(encoding="utf-8", errors="replace")
return {
"file": str(path),
"total_words": word_count(text),
"sections": section_metrics(text),
}
def main() -> int:
if hasattr(sys.stdout, "reconfigure"):
sys.stdout.reconfigure(encoding="utf-8") # JSON is UTF-8 regardless of locale code page
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
parser.add_argument("path", help="document to measure")
parser.add_argument("-o", "--output", help="write JSON here (default: stdout)")
args = parser.parse_args()
path = Path(args.path)
if not path.is_file():
print(f"error: not a readable file: {path}", file=sys.stderr)
return 2
result = json.dumps(metrics(path), indent=2, ensure_ascii=False)
if args.output:
Path(args.output).write_text(result + "\n", encoding="utf-8")
else:
print(result)
return 0
if __name__ == "__main__":
if sys.platform == "win32":
# Piped output on Windows defaults to a legacy code page, not UTF-8.
sys.stdout.reconfigure(encoding="utf-8")
sys.stderr.reconfigure(encoding="utf-8")
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |