Skip to content

feat(#413): add map-prd-review skill and write_prd_review artifact function - #417

Merged
azalio merged 1 commit into
mainfrom
claude/compassionate-cerf-71p8pe
Aug 13, 2026
Merged

feat(#413): add map-prd-review skill and write_prd_review artifact function#417
azalio merged 1 commit into
mainfrom
claude/compassionate-cerf-71p8pe

Conversation

@azalio

@azalio azalio commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implements issue [Mentiora /feature] Add PRD/requirements-quality review before /map-plan #413: PRD/requirements-quality review before /map-plan
  • Adds write_prd_review() to map_step_runner.py (and jinja source) with full validation of verdict, findings (11 dimensions), blocking_questions, and suggested_revisions
  • Adds new /map-prd-review skill with verdicts table, workflow steps, troubleshooting section
  • Registers prd_review as a known artifact stage; adds PRD_REVIEW_SCHEMA to schemas
  • 13 new tests covering all 4 verdicts, error paths, and structural validation

Test plan

  • All 13 write_prd_review tests pass
  • All skill structure tests pass (descriptions, argument-hint format, troubleshooting section)
  • make check passes: ruff, mypy, pyright, pytest (4400 passed)
  • make check-render passes: generated trees match templates_src

Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Added a PRD review capability that evaluates requirements across 11 quality dimensions.
    • Provides planning-readiness verdicts, including ready for planning, revision needed, user decision needed, or wayfinding recommended.
    • Generates structured JSON and Markdown review reports with findings, blocking questions, suggested revisions, summaries, and routing guidance.
    • Added support for reviewing PRDs from supported file inputs with clear follow-up recommendations.
  • Validation

    • Review inputs and findings are validated for supported verdicts, severities, required fields, and decision-specific questions.

…nction

Implements issue #413: PRD/requirements-quality review before /map-plan.

Changes:
- Add `write_prd_review()` to `map_step_runner.py.jinja` (and rendered outputs):
  validates verdict, findings, blocking_questions, suggested_revisions; writes
  `.map/<branch>/prd-review.{json,md}` and updates artifact_manifest stage
  `prd_review`; enforces `needs_user_decision` requires at least one blocking
  question; rejects extra/missing fields and invalid severities
- Add `prd_review` to ARTIFACT_STAGES tuple so `_set_manifest_stage` accepts it
- Add `PRD_REVIEW_SCHEMA` to `schemas.py`
- Add `map-prd-review/SKILL.md.jinja` skill with 11 review dimensions, verdict
  table, step-by-step workflow, troubleshooting, and argument-hint
- Register `map-prd-review` in `skill-rules.json.jinja` (type=manual, task)
- 13 new tests covering happy paths (all 4 verdicts), error cases, and
  structural validation; update skill count sentinel from 20 → 21

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jn1BLjiPwPBbnTTtZDRQgd
@azalio
azalio merged commit 092ba5f into main Aug 13, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 64b12bec-5334-4aff-b8b9-e7bb202266f2

📥 Commits

Reviewing files that changed from the base of the PR and between ea6213f and e692f55.

📒 Files selected for processing (12)
  • .claude/skills/map-prd-review/SKILL.md
  • .claude/skills/skill-rules.json
  • .map/scripts/map_step_runner.py
  • src/mapify_cli/schemas.py
  • src/mapify_cli/templates/map/scripts/map_step_runner.py
  • src/mapify_cli/templates/skills/map-prd-review/SKILL.md
  • src/mapify_cli/templates/skills/skill-rules.json
  • src/mapify_cli/templates_src/map/scripts/map_step_runner.py.jinja
  • src/mapify_cli/templates_src/skills/map-prd-review/SKILL.md.jinja
  • src/mapify_cli/templates_src/skills/skill-rules.json.jinja
  • tests/test_map_step_runner.py
  • tests/test_skills_consistency.py

📝 Walkthrough

Walkthrough

Adds the map-prd-review skill for 11-dimensional PRD assessment. Adds verdict validation, JSON and Markdown artifact generation, manifest updates, CLI dispatch, schema definitions, template support, and comprehensive tests.

Changes

PRD review workflow

Layer / File(s) Summary
PRD review skill definition
.claude/skills/map-prd-review/SKILL.md, .claude/skills/skill-rules.json, src/mapify_cli/templates/skills/*, src/mapify_cli/templates_src/skills/*
Defines PRD inputs, 11 review dimensions, severity rules, four verdicts, execution policy, artifact formats, reporting, troubleshooting, and skill triggers.
Review artifact contract
src/mapify_cli/schemas.py, .map/scripts/map_step_runner.py, src/mapify_cli/templates/map/scripts/map_step_runner.py
Adds PRD_REVIEW_SCHEMA and registers the prd_review artifact stage.
Artifact writer and CLI flow
.map/scripts/map_step_runner.py, src/mapify_cli/templates/map/scripts/map_step_runner.py, src/mapify_cli/templates_src/map/scripts/map_step_runner.py.jinja
Adds write_prd_review with input validation, report generation, manifest updates, result metadata, and CLI dispatch.
Writer validation and discovery tests
tests/test_map_step_runner.py, tests/test_skills_consistency.py
Tests all verdict paths, generated artifacts, manifest data, invalid inputs, and registration of the 21st skill.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related issues

Possibly related PRs

Poem

A rabbit reviews each requirement with care,
Finds clear verdicts waiting there.
JSON and Markdown hop into place,
The manifest tracks every case.
“Ready for planning!” the bunny sings,
While tests guard all the review strings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/compassionate-cerf-71p8pe

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants