Skip to content

Fix PRD section numbering gaps when optional sections are omitted - #72

Merged
avishayt merged 1 commit into
mainfrom
fix-prd-section-numbering
Jul 7, 2026
Merged

Fix PRD section numbering gaps when optional sections are omitted#72
avishayt merged 1 commit into
mainfrom
fix-prd-section-numbering

Conversation

@avishayt

@avishayt avishayt commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added "Keep numbering sequential" rule to prd/skills/draft.md so the AI renumbers remaining sections when optional ones (e.g., 2.2 Success Metrics, section 5 Assumptions) are omitted
  • Added matching renumber-on-delete instructions to prd/skills/revise.md and prd/skills/respond.md
  • Fixed prd/README.md which listed only 7 template sections instead of 8 (missing Assumptions, with wrong numbers for Dependencies/Risks/Open Questions)

Test plan

  • Run /draft on a Jira issue that has no quantifiable success metrics — verify section 2 goes 2.1 Goals, 2.2 Non-Goals (no gap)
  • Run /draft on a Jira issue with no assumptions or dependencies — verify remaining sections are numbered sequentially
  • Run /revise to delete a section — verify remaining sections are renumbered
  • Verify README section list matches the actual template

🤖 Generated with Claude Code

Affected workflows: PRD drafting (/draft), PRD revising (/revise), and PRD responding (/respond).

Behavioral changes:

  • prd/skills/draft.md: adds a “Keep numbering sequential” critical rule so if optional PRD sections/subsections are omitted, subsequent headings are renumbered to eliminate numbering gaps.
  • prd/skills/revise.md: strengthens deletion guidance to remove content while checking for orphaned references; if an entire section/subsection is deleted, remaining sections are renumbered to close numbering gaps.
  • prd/skills/respond.md: when resolving reviewer feedback causes the “Open Questions” section to become empty, the skill instructs removing that section and renumbering subsequent PRD sections to close the gap.

Structural changes:

  • prd/README.md: updates the “PRD Template” outline to include “4. Acceptance Criteria” and corrects numbering/order for “5. Assumptions”, “6. Dependencies”, “7. Risks”, and “8. Open Questions”, ensuring all 8 template sections are listed.

Shared resources / cross-workflow conventions:

  • No changes to _shared/.
  • Cross-workflow convention updated: sequential section numbering is consistently enforced across draft/revise/respond when optional or deleted sections would otherwise create gaps.

Also:

  • prd/SKILL.md increments the documented workflow version from 0.3.0 to 0.4.0.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Documentation and skill instructions were updated to include a missing PRD template section and to require renumbering when optional or removed sections leave gaps.

Changes

PRD Numbering Documentation

Layer / File(s) Summary
PRD template correction
prd/README.md
Adds a “4. Acceptance Criteria” template entry and renumbers the following PRD sections.
Sequential renumbering rules
prd/skills/draft.md, prd/skills/respond.md, prd/skills/revise.md, prd/SKILL.md
Adds explicit sequential-renumbering instructions for omitted or removed sections and updates the skill version front-matter.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: workflow-structure, documentation

Suggested reviewers: amir-yogev-gh, eranco74

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Ai-Attribution ✅ Passed AI use is disclosed and the HEAD commit includes an acceptable Assisted-by trailer; no Co-Authored-By AI trailer found.
No-Absolute-Paths-In-Skills ✅ Passed Only absolute paths found were /home/user examples inside fenced JSON blocks, which are explicitly exempt; no prohibited paths in the PR files.
Skill-Md-Under-30-Lines ✅ Passed prd/SKILL.md is the only changed SKILL.md and it totals 26 lines including frontmatter, under the 30-line limit.
Command-Colon-Notation ✅ Passed PR only changes prd README/skills files; no commands/ files are in the diff, so the colon-notation rule is not applicable.
No-Orphaned-References ✅ Passed All backtick path refs in changed PRD docs resolve to existing files, and every PRD skill/command file is referenced from SKILL.md/controller.md/commands; no orphans.
No-Content-Duplication ✅ Passed prd/SKILL.md only has brief cross-references; no substantial verbatim multi-line duplication with prd/guidelines.md or prd/skills/controller.md.
Step-Sequencing ✅ Passed PASS: draft/respond/revise each have sequential main steps (9/6/6), with no gaps or duplicates and none over 10 steps.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: fixing PRD section numbering gaps when optional sections are omitted.
✨ 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 fix-prd-section-numbering

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

@avishayt
avishayt force-pushed the fix-prd-section-numbering branch 2 times, most recently from 2e642fd to d135c7f Compare July 6, 2026 08:57
The draft skill instructed the AI to omit optional sections but never
said to renumber the remaining ones, producing gaps like 2.1 → 2.3 or
4 → 6. Add a "Keep numbering sequential" rule to draft, and matching
renumber-on-delete instructions to revise and respond. Also fix the
README which listed only 7 sections (missing Assumptions).

Assisted-by: Claude
@avishayt
avishayt force-pushed the fix-prd-section-numbering branch from d135c7f to 12225b3 Compare July 6, 2026 08:58
@avishayt
avishayt merged commit adfad68 into main Jul 7, 2026
8 of 9 checks passed
@avishayt
avishayt deleted the fix-prd-section-numbering branch July 7, 2026 04:29
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