refactor(commands): consolidate PRP workflow into staging-file pattern#1498
refactor(commands): consolidate PRP workflow into staging-file pattern#1498supmo668 wants to merge 1 commit intoaffaan-m:mainfrom
Conversation
…file pattern
Replace the five prp-* commands (adapted from PRPs-agentic-eng) with a
leaner set of ECC-native commands that follow a single markdown-staging-file
pattern: every SDLC phase produces a committable .md artifact that the next
command consumes by path.
Rationale: the PRP set had high overlap with existing ECC commands:
- prp-implement → redundant with /tdd
- prp-commit → thin wrapper over git commit
- prp-plan → pattern-extraction merged into /plan
- prp-pr → real gap-filler (kept, renamed)
- prp-prd → rewritten as a lean, requirements-only /plan-prd
that hands off to /plan (separation of concerns:
PRD answers what/why; plan answers how)
Changes:
- Delete commands/prp-{commit,implement,plan,prd}.md
- Rename commands/prp-pr.md → commands/pr.md
- Add commands/plan-prd.md (lean, 4-phase: Frame → Ground → Decide → Generate)
- Rewrite commands/plan.md to detect .prd.md input and produce .claude/plans/
artifacts with pattern-grounding (naming, errors, logging, data access, tests)
- Update commands/code-review.md artifact paths to .claude/{prds,plans,reviews}/
- Update agent.yaml command list
- Add docs/PLAN-PRD-PATTERN.md explaining the staging-file pattern, flow,
usage, and why /plan-prd is essential (not redundant) alongside /plan
- Run catalog:sync so README/AGENTS counts reflect net -3 commands
Flow: /plan-prd → .claude/prds/X.prd.md → /plan X.prd.md → .claude/plans/X.plan.md
→ /tdd → /pr (auto-references PRD + plan in PR body)
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
📝 WalkthroughWalkthroughThe PR restructures the command architecture by deprecating the legacy "PRP" workflow ( Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant plan-prd Command
participant Artifact Storage
participant plan Command
participant pr Command
User->>plan-prd Command: /plan-prd [feature idea]
plan-prd Command->>plan-prd Command: FRAME: validate problem
plan-prd Command->>plan-prd Command: GROUND: collect evidence
plan-prd Command->>plan-prd Command: DECIDE: testable hypothesis & MVP
plan-prd Command->>Artifact Storage: Write .claude/prds/{name}.prd.md
plan-prd Command-->>User: PRD artifact + next steps
User->>plan Command: /plan {prd-path}
plan Command->>Artifact Storage: Read .claude/prds/{name}.prd.md
plan Command->>plan Command: Parse PRD, select next phase
plan Command->>Artifact Storage: Write .claude/plans/{name}.plan.md
plan Command->>Artifact Storage: Update PRD phase: pending → in-progress
plan Command-->>User: Plan artifact + patterns/tasks
User->>pr Command: /pr
pr Command->>Artifact Storage: Read .claude/plans/{name}.plan.md
pr Command->>Artifact Storage: Read .claude/prds/{name}.prd.md
pr Command-->>User: PR with planning artifacts referenced
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryThis PR consolidates five Confidence Score: 5/5Safe to merge — only P2 style suggestions remain; no logic errors or regressions introduced. All findings are P2 or lower: a heading name mismatch in plan-prd.md and a nested markdown code-fence rendering issue in plan.md's template. Neither affects runtime behavior. The command count arithmetic is correct, artifact paths are consistently updated across all changed files, and the new commands are well-structured with clear confirmation gates and edge-case handling. No files require special attention — minor style fixes in commands/plan-prd.md (H1 title) and commands/plan.md (nested fence in template) are optional. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["/plan-prd <idea>"] --> B[".claude/prds/X.prd.md\nRequirements: problem · users · hypothesis · scope"]
B --> C["/plan .claude/prds/X.prd.md"]
C --> D[".claude/plans/X.plan.md\nDesign: patterns · files · tasks · validation"]
D --> E["/tdd"]
E --> F["code + tests\nTest-first implementation"]
F --> G["/pr"]
G --> H["GitHub PR\nReferences PRD + plan artifacts"]
I["/plan <free-form text>"] --> J["Inline conversational plan\nNo artifact written"]
J --> E
style B fill:#e8f4f8,stroke:#2980b9
style D fill:#e8f4f8,stroke:#2980b9
style H fill:#d5f5e3,stroke:#27ae60
Reviews (1): Last reviewed commit: "refactor(commands): consolidate PRP work..." | Re-trigger Greptile |
| argument-hint: "[product/feature idea] (blank = start with questions)" | ||
| --- | ||
|
|
||
| # PRD Command |
There was a problem hiding this comment.
H1 title doesn't match command name
The document heading says PRD Command, but the slash command is invoked as /plan-prd. Users browsing the file on GitHub or in the plugin's help will see a mismatched title. Every other ECC command (e.g. plan.md → # Plan Command, code-review.md → # Code Review) uses the actual invocation name as the heading.
| # PRD Command | |
| # Plan PRD Command |
| ## Validation | ||
| ```bash | ||
| # type-check, lint, test, build — project-specific commands | ||
| ``` |
There was a problem hiding this comment.
Nested code fence breaks GitHub rendering
The artifact template uses a ```bash fence nested inside the outer ```markdown fence. GFM (cmark-gfm) does not support nested code blocks with the same fence character — the inner ```bash terminates the outer block early, so ## Risks, ## Acceptance, and the closing ``` all render as raw prose outside the code block on GitHub.
Consider switching the inner fence to tildes so the template renders correctly for humans reading the file:
## Validation
~~~~bash
# type-check, lint, test, build — project-specific commands
~~~~
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@commands/code-review.md`:
- Line 189: The command that writes "Create review artifact at
`.claude/reviews/pr-<NUMBER>-review.md`" doesn't ensure the `.claude/reviews`
directory exists, causing writes to fail on fresh repos; update the code that
emits the artifact to run a directory creation step (e.g., mkdir -p
.claude/reviews or equivalent in the language/runtime used) immediately before
writing the file so the directory is created idempotently and the write cannot
fail.
In `@commands/pr.md`:
- Around line 72-76: Update the "### Planning Artifacts" section to reference
the concrete artifact filename patterns instead of only directories: replace or
augment the `.claude/prds/` and `.claude/plans/` bullets with explicit globbed
filenames like `.claude/prds/**/*.prd.md` and `.claude/plans/**/*.plan.md` (or
at least `.claude/prds/*.prd.md` and `.claude/plans/*.plan.md`) so the document
matches the new workflow; edit the lines that currently contain the directory
names under the "### Planning Artifacts" header.
- Line 30: The PR flow currently only warns on a dirty working tree (table row
"Clean working directory | No uncommitted changes | Warn: ...") but must instead
abort the /pr command to avoid silently omitting uncommitted changes; update the
/pr command handler to check the git working tree (the same check represented by
"Clean working directory") and, when uncommitted changes are present, exit the
flow immediately with a clear error message and non-zero status rather than
proceeding, and update the commands/pr.md row to reflect "Stop: 'You have
uncommitted changes. Commit or stash first.'" so docs match behavior.
In `@docs/PLAN-PRD-PATTERN.md`:
- Line 1: The file name PLAN-PRD-PATTERN.md violates the repository's
lowercase-with-hyphens naming convention; rename the file to plan-prd-pattern.md
(e.g., move/rename docs/PLAN-PRD-PATTERN.md → docs/plan-prd-pattern.md) and
update any references to PLAN-PRD-PATTERN.md in docs or code to the new name so
links and imports continue to work.
In `@README.md`:
- Line 254: Update the stale public counts in README.md so all occurrences match
the new totals; specifically replace the old string "38 agents, 156 skills, and
72 legacy command shims" (e.g., the paragraph around Line 88) with "48 agents,
183 skills, and 76 legacy command shims" and make the same replacement for the
other occurrences referenced (around the other two locations). Ensure any
related summary lines or badges containing those numeric counts are updated to
the new values so the README has consistent counts throughout.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 294e13c9-f45f-48c2-a5e7-03104ed50bf9
📒 Files selected for processing (15)
AGENTS.mdREADME.mdREADME.zh-CN.mdagent.yamlcommands/code-review.mdcommands/plan-prd.mdcommands/plan.mdcommands/pr.mdcommands/prp-commit.mdcommands/prp-implement.mdcommands/prp-plan.mdcommands/prp-prd.mddocs/PLAN-PRD-PATTERN.mddocs/zh-CN/AGENTS.mddocs/zh-CN/README.md
💤 Files with no reviewable changes (4)
- commands/prp-plan.md
- commands/prp-commit.md
- commands/prp-implement.md
- commands/prp-prd.md
| ### Phase 6 — REPORT | ||
|
|
||
| Create review artifact at `.claude/PRPs/reviews/pr-<NUMBER>-review.md`: | ||
| Create review artifact at `.claude/reviews/pr-<NUMBER>-review.md`: |
There was a problem hiding this comment.
Create the reviews directory before writing the artifact.
The new output path moves reviews to .claude/reviews/, but the command never creates that directory. On a fresh repo, writing .claude/reviews/pr-<NUMBER>-review.md can fail and break the staging-file pattern.
🛠️ Proposed fix
### Phase 6 — REPORT
+Ensure the reviews directory exists:
+
+```bash
+mkdir -p .claude/reviews
+```
+
Create review artifact at `.claude/reviews/pr-<NUMBER>-review.md`:📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Create review artifact at `.claude/reviews/pr-<NUMBER>-review.md`: | |
| ### Phase 6 — REPORT | |
| Ensure the reviews directory exists: | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@commands/code-review.md` at line 189, The command that writes "Create review
artifact at `.claude/reviews/pr-<NUMBER>-review.md`" doesn't ensure the
`.claude/reviews` directory exists, causing writes to fail on fresh repos;
update the code that emits the artifact to run a directory creation step (e.g.,
mkdir -p .claude/reviews or equivalent in the language/runtime used) immediately
before writing the file so the directory is created idempotently and the write
cannot fail.
| |---|---|---| | ||
| | Not on base branch | Current branch ≠ base | Stop: "Switch to a feature branch first." | | ||
| | Clean working directory | No uncommitted changes | Warn: "You have uncommitted changes. Commit or stash first. Use `/prp-commit` to commit." | | ||
| | Clean working directory | No uncommitted changes | Warn: "You have uncommitted changes. Commit or stash first." | |
There was a problem hiding this comment.
Stop on uncommitted changes instead of warning.
If /pr continues after this warning, the push and PR will include only committed changes, silently omitting the user’s dirty worktree changes.
🛠️ Proposed fix
-| Clean working directory | No uncommitted changes | Warn: "You have uncommitted changes. Commit or stash first." |
+| Clean working directory | No uncommitted changes | Stop: "You have uncommitted changes. Commit or stash first, then rerun `/pr`." |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | Clean working directory | No uncommitted changes | Warn: "You have uncommitted changes. Commit or stash first." | | |
| | Clean working directory | No uncommitted changes | Stop: "You have uncommitted changes. Commit or stash first, then rerun `/pr`." | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@commands/pr.md` at line 30, The PR flow currently only warns on a dirty
working tree (table row "Clean working directory | No uncommitted changes |
Warn: ...") but must instead abort the /pr command to avoid silently omitting
uncommitted changes; update the /pr command handler to check the git working
tree (the same check represented by "Clean working directory") and, when
uncommitted changes are present, exit the flow immediately with a clear error
message and non-zero status rather than proceeding, and update the
commands/pr.md row to reflect "Stop: 'You have uncommitted changes. Commit or
stash first.'" so docs match behavior.
| ### Planning Artifacts | ||
|
|
||
| Check for related PRP artifacts: | ||
| - `.claude/PRPs/reports/` — Implementation reports | ||
| - `.claude/PRPs/plans/` — Plans that were executed | ||
| - `.claude/PRPs/prds/` — Related PRDs | ||
| Check for related artifacts produced by `/plan-prd` and `/plan`: | ||
| - `.claude/prds/` — PRDs this PR implements a milestone of | ||
| - `.claude/plans/` — Plans executed by this PR |
There was a problem hiding this comment.
Use the concrete artifact filename patterns.
The new workflow creates .prd.md and .plan.md files; documenting only the directories makes detection ambiguous and can link unrelated artifacts.
🛠️ Proposed fix
Check for related artifacts produced by `/plan-prd` and `/plan`:
-- `.claude/prds/` — PRDs this PR implements a milestone of
-- `.claude/plans/` — Plans executed by this PR
+- `.claude/prds/*.prd.md` — PRDs this PR implements a milestone of
+- `.claude/plans/*.plan.md` — Plans executed by this PR
+
+Prefer artifacts changed on this branch or explicitly referenced in commit messages; ask before linking unrelated existing artifacts.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ### Planning Artifacts | |
| Check for related PRP artifacts: | |
| - `.claude/PRPs/reports/` — Implementation reports | |
| - `.claude/PRPs/plans/` — Plans that were executed | |
| - `.claude/PRPs/prds/` — Related PRDs | |
| Check for related artifacts produced by `/plan-prd` and `/plan`: | |
| - `.claude/prds/` — PRDs this PR implements a milestone of | |
| - `.claude/plans/` — Plans executed by this PR | |
| ### Planning Artifacts | |
| Check for related artifacts produced by `/plan-prd` and `/plan`: | |
| - `.claude/prds/*.prd.md` — PRDs this PR implements a milestone of | |
| - `.claude/plans/*.plan.md` — Plans executed by this PR | |
| Prefer artifacts changed on this branch or explicitly referenced in commit messages; ask before linking unrelated existing artifacts. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@commands/pr.md` around lines 72 - 76, Update the "### Planning Artifacts"
section to reference the concrete artifact filename patterns instead of only
directories: replace or augment the `.claude/prds/` and `.claude/plans/` bullets
with explicit globbed filenames like `.claude/prds/**/*.prd.md` and
`.claude/plans/**/*.plan.md` (or at least `.claude/prds/*.prd.md` and
`.claude/plans/*.plan.md`) so the document matches the new workflow; edit the
lines that currently contain the directory names under the "### Planning
Artifacts" header.
| @@ -0,0 +1,155 @@ | |||
| # Plan-PRD Pattern: Markdown-Staged Planning Flow | |||
There was a problem hiding this comment.
Rename file to follow lowercase naming convention.
The filename PLAN-PRD-PATTERN.md violates the repository's naming convention. As per coding guidelines, files matching **/*.{md,js,ts,json} should use lowercase with hyphens (e.g., python-reviewer.md, tdd-workflow.md).
📝 Recommended fix
Rename the file:
git mv docs/PLAN-PRD-PATTERN.md docs/plan-prd-pattern.mdUpdate any references to this file in documentation or code.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/PLAN-PRD-PATTERN.md` at line 1, The file name PLAN-PRD-PATTERN.md
violates the repository's lowercase-with-hyphens naming convention; rename the
file to plan-prd-pattern.md (e.g., move/rename docs/PLAN-PRD-PATTERN.md →
docs/plan-prd-pattern.md) and update any references to PLAN-PRD-PATTERN.md in
docs or code to the new name so links and imports continue to work.
| ``` | ||
|
|
||
| **That's it!** You now have access to 48 agents, 183 skills, and 79 legacy command shims. | ||
| **That's it!** You now have access to 48 agents, 183 skills, and 76 legacy command shims. |
There was a problem hiding this comment.
Sync the remaining stale catalog count in the release note.
These updated sections now say 48 agents, 183 skills, and 76 commands, but Line 88 still says 38 agents, 156 skills, and 72 legacy command shims. That leaves the README with conflicting public counts.
📝 Proposed follow-up
-- **Public surface synced to the live repo** — metadata, catalog counts, plugin manifests, and install-facing docs now match the actual OSS surface: 38 agents, 156 skills, and 72 legacy command shims.
+- **Public surface synced to the live repo** — metadata, catalog counts, plugin manifests, and install-facing docs now match the actual OSS surface: 48 agents, 183 skills, and 76 legacy command shims.Also applies to: 1221-1221, 1330-1330
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` at line 254, Update the stale public counts in README.md so all
occurrences match the new totals; specifically replace the old string "38
agents, 156 skills, and 72 legacy command shims" (e.g., the paragraph around
Line 88) with "48 agents, 183 skills, and 76 legacy command shims" and make the
same replacement for the other occurrences referenced (around the other two
locations). Ensure any related summary lines or badges containing those numeric
counts are updated to the new values so the README has consistent counts
throughout.
There was a problem hiding this comment.
5 issues found across 15 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="commands/plan.md">
<violation number="1" location="commands/plan.md:83">
P2: Nested fenced code blocks use the same triple-backtick delimiter, which breaks Markdown rendering of the artifact template after the inner `Validation` block.</violation>
<violation number="2" location="commands/plan.md:88">
P2: `Complexity` uses conflicting scales across plan outputs (`High/Medium/Low` vs `Small/Medium/Large`), creating an inconsistent artifact contract.</violation>
</file>
<file name="docs/PLAN-PRD-PATTERN.md">
<violation number="1" location="docs/PLAN-PRD-PATTERN.md:5">
P2: The doc gives conflicting guarantees about whether `/plan` is always artifact-backed, which can mislead users building path-based workflow assumptions.</violation>
</file>
<file name="commands/plan-prd.md">
<violation number="1" location="commands/plan-prd.md:6">
P3: H1 heading says `# PRD Command` but the slash command is `/plan-prd`. Other commands use the invocation name as the heading (e.g., `plan.md` → `# Plan Command`). Use `# Plan PRD Command` for consistency.</violation>
</file>
<file name="commands/code-review.md">
<violation number="1" location="commands/code-review.md:189">
P2: Ensure the `.claude/reviews/` directory exists before writing the review artifact. The other staging-file commands (e.g., `/plan-prd`) include an explicit `mkdir -p` step, but this command does not — writing to `.claude/reviews/pr-<NUMBER>-review.md` will fail on a fresh repo where the directory doesn't yet exist.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| ## Integration with Other Commands | ||
| **Source PRD**: {path} | ||
| **PRD Phase**: {phase name} | ||
| **Complexity**: {Small | Medium | Large} |
There was a problem hiding this comment.
P2: Complexity uses conflicting scales across plan outputs (High/Medium/Low vs Small/Medium/Large), creating an inconsistent artifact contract.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At commands/plan.md, line 88:
<comment>`Complexity` uses conflicting scales across plan outputs (`High/Medium/Low` vs `Small/Medium/Large`), creating an inconsistent artifact contract.</comment>
<file context>
@@ -1,117 +1,155 @@
-## Integration with Other Commands
+**Source PRD**: {path}
+**PRD Phase**: {phase name}
+**Complexity**: {Small | Medium | Large}
-After planning:
</file context>
| **Complexity**: {Small | Medium | Large} | |
| **Complexity**: {High | Medium | Low} |
| - "modify: [your changes]" | ||
| - "different approach: [alternative]" | ||
| - "skip phase 2 and do phase 3 first" | ||
| ```markdown |
There was a problem hiding this comment.
P2: Nested fenced code blocks use the same triple-backtick delimiter, which breaks Markdown rendering of the artifact template after the inner Validation block.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At commands/plan.md, line 83:
<comment>Nested fenced code blocks use the same triple-backtick delimiter, which breaks Markdown rendering of the artifact template after the inner `Validation` block.</comment>
<file context>
@@ -1,117 +1,155 @@
-- "modify: [your changes]"
-- "different approach: [alternative]"
-- "skip phase 2 and do phase 3 first"
+```markdown
+# Plan: {Feature Name}
</file context>
|
|
||
| A lightweight, SDLC-aligned planning workflow where each phase of the lifecycle produces a committable markdown **staging file** that the next command consumes. | ||
|
|
||
| > Short version: `/plan-prd` writes a PRD, `/plan` writes a plan, `/tdd` implements it, `/pr` ships it. Each arrow is a file on disk, not a conversation in memory. |
There was a problem hiding this comment.
P2: The doc gives conflicting guarantees about whether /plan is always artifact-backed, which can mislead users building path-based workflow assumptions.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/PLAN-PRD-PATTERN.md, line 5:
<comment>The doc gives conflicting guarantees about whether `/plan` is always artifact-backed, which can mislead users building path-based workflow assumptions.</comment>
<file context>
@@ -0,0 +1,155 @@
+
+A lightweight, SDLC-aligned planning workflow where each phase of the lifecycle produces a committable markdown **staging file** that the next command consumes.
+
+> Short version: `/plan-prd` writes a PRD, `/plan` writes a plan, `/tdd` implements it, `/pr` ships it. Each arrow is a file on disk, not a conversation in memory.
+
+## Feature: Markdown Staging Files
</file context>
| ### Phase 6 — REPORT | ||
|
|
||
| Create review artifact at `.claude/PRPs/reviews/pr-<NUMBER>-review.md`: | ||
| Create review artifact at `.claude/reviews/pr-<NUMBER>-review.md`: |
There was a problem hiding this comment.
P2: Ensure the .claude/reviews/ directory exists before writing the review artifact. The other staging-file commands (e.g., /plan-prd) include an explicit mkdir -p step, but this command does not — writing to .claude/reviews/pr-<NUMBER>-review.md will fail on a fresh repo where the directory doesn't yet exist.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At commands/code-review.md, line 189:
<comment>Ensure the `.claude/reviews/` directory exists before writing the review artifact. The other staging-file commands (e.g., `/plan-prd`) include an explicit `mkdir -p` step, but this command does not — writing to `.claude/reviews/pr-<NUMBER>-review.md` will fail on a fresh repo where the directory doesn't yet exist.</comment>
<file context>
@@ -188,7 +186,7 @@ Special cases:
### Phase 6 — REPORT
-Create review artifact at `.claude/PRPs/reviews/pr-<NUMBER>-review.md`:
+Create review artifact at `.claude/reviews/pr-<NUMBER>-review.md`:
```markdown
</file context>
| Create review artifact at `.claude/reviews/pr-<NUMBER>-review.md`: | |
| Ensure the reviews directory exists: | |
| ```bash | |
| mkdir -p .claude/reviews |
Create review artifact at .claude/reviews/pr-<NUMBER>-review.md:
<a href="https://www.cubic.dev/action/fix/violation/f087c262-60cd-4e77-b74e-50dc36ca9961" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://cubic.dev/buttons/fix-with-cubic-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://cubic.dev/buttons/fix-with-cubic-light.svg">
<img alt="Fix with Cubic" src="https://cubic.dev/buttons/fix-with-cubic-dark.svg">
</picture>
</a>
| argument-hint: "[product/feature idea] (blank = start with questions)" | ||
| --- | ||
|
|
||
| # PRD Command |
There was a problem hiding this comment.
P3: H1 heading says # PRD Command but the slash command is /plan-prd. Other commands use the invocation name as the heading (e.g., plan.md → # Plan Command). Use # Plan PRD Command for consistency.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At commands/plan-prd.md, line 6:
<comment>H1 heading says `# PRD Command` but the slash command is `/plan-prd`. Other commands use the invocation name as the heading (e.g., `plan.md` → `# Plan Command`). Use `# Plan PRD Command` for consistency.</comment>
<file context>
@@ -0,0 +1,160 @@
+argument-hint: "[product/feature idea] (blank = start with questions)"
+---
+
+# PRD Command
+
+Produces a **Product Requirements Document** — the requirements-phase artifact of the SDLC. Captures *what* must be true for success and *why*, and stops before *how*. Implementation decomposition is delegated to `/plan`.
</file context>
| # PRD Command | |
| # Plan PRD Command |
Summary
Consolidate the five
prp-*commands (merged in #848, adapted from PRPs-agentic-eng) into a smaller, ECC-native set that follows a single markdown staging-file pattern: every SDLC phase produces a committable.mdartifact that the next command consumes by path.Net: −3 commands (79 → 76), −1,101 lines.
Why
After using the PRP set in practice, most commands overlapped existing ECC primitives. The redundancy audit found:
prp-implement/tddprp-commitgit commitprp-plan/plan; pattern-extraction was the one unique value/plan, deleteprp-pr/prprp-prd/plan's scope/plan-prd, hands off to/planThe rewrite applies SDLC separation of concerns: PRDs answer what/why; plans answer how. The old
prp-prdbundled both (it had an "Implementation Phases" table and a "Technical Feasibility" phase) — now cleanly split.Pattern
Each arrow is a file on disk, not in-context state — artifacts are readable by humans, diffable in PRs, grep-able at CLI, and resumable across sessions.
Full pattern doc:
docs/PLAN-PRD-PATTERN.md.Changes
Commands
commands/prp-{commit,implement,plan,prd}.mdcommands/prp-pr.md→commands/pr.md(attribution removed; artifact paths rebased to.claude/{prds,plans}/)commands/plan-prd.md— 4-phase (Frame → Ground → Decide → Generate), requirements-only, ~120 lines vs. the old 447commands/plan.md— detects.prd.mdinput, adds Pattern Grounding (naming, errors, logging, data access, tests), produces.claude/plans/{name}.plan.mdin artifact modecommands/code-review.md— artifact paths updated to.claude/{prds,plans,reviews}/, PRP attribution removedSupporting
agent.yaml— command list updateddocs/PLAN-PRD-PATTERN.md— pattern description, flow, usage, rationale for keeping/plan-prddistinct from/planAGENTS.md,README.md,README.zh-CN.md,docs/zh-CN/*vianpm run catalog:syncCompatibility
Artifact paths changed from
.claude/PRPs/{prds,plans,reports,reviews}/to.claude/{prds,plans,reviews}/. Since the PRP commands only landed in #848 (merged March 31), the blast radius is limited to anyone who's already adopted them; a one-linemvmigrates existing state.Test plan
npm test— 1864/1867 pass (3 pre-existing OpenCode-build failures unrelated to this change)npm run catalog:sync— all docs in sync (48 agents / 76 commands / 183 skills)node tests/ci/agent-yaml-surface.test.js— command surface matches directorynode tests/ci/validators.test.js— all command frontmatter valid/plan-prd "test feature"→ verify.claude/prds/test-feature.prd.mdis created/plan .claude/prds/test-feature.prd.md→ verify artifact mode produces.claude/plans/test-feature.plan.md/pron a branch with commits → verify it references prds/plans if presentSummary by cubic
Streamlines the PRP workflow into an ECC-native staging-file flow:
/plan-prd→.claude/prds/*.prd.md→/plan→.claude/plans/*.plan.md→/tdd→/pr. Reduces commands from 79 to 76 and replaces overlappingprp-*commands with clearer, file-based artifacts.New Features
plan-prd: creates lean PRDs at.claude/prds/{name}.prd.md(Frame → Ground → Decide → Generate).plan: detects.prd.md, writes.claude/plans/{name}.plan.md, and adds pattern grounding (naming, errors, logging, data access, tests).Refactors
prp-commit,prp-implement,prp-plan,prp-prd; renamedprp-prtopr..claude/{prds,plans,reviews}/;code-reviewreads/writes these locations.agent.yamland docs; addeddocs/PLAN-PRD-PATTERN.mddocumenting the staging-file flow.Migration
mv .claude/PRPs/prds .claude/prds && mv .claude/PRPs/plans .claude/plans && mv .claude/PRPs/reviews .claude/reviews.plan-prd→plan→tdd→prgoing forward.Written for commit 475bea7. Summary will update on new commits.
Summary by CodeRabbit
New Features
/plan-prdcommand for structured Product Requirements Document generation with problem-framing workflow/prcommand for streamlined pull request creationDocumentation