Skip to content

fix(lifecycle): bind RFC bumps to sealed amendments#37

Merged
lucifer1004 merged 1 commit into
mainfrom
dev
Jul 20, 2026
Merged

fix(lifecycle): bind RFC bumps to sealed amendments#37
lucifer1004 merged 1 commit into
mainfrom
dev

Conversation

@lucifer1004

@lucifer1004 lucifer1004 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Tightened lifecycle governance: version-changing RFC bumps are allowed only from sealed impl/test/stable, and are blocked while spec remains the open candidate.
    • Refined unreferenced clause deletion: allowed only for clauses introduced in the current normative spec candidate when since matches the RFC version; inherited clauses must be deprecated/superseded.
    • Clause deletion now checks structural, inline-text, and supersession references.
  • Bug Fixes
    • Invalid lifecycle/deletion operations now fail without changing files and provide clearer migration/restoration guidance; deletion errors report referencing artifact IDs.
  • Documentation
    • Updated governance rules, RFC phase/bump guidance, and related CLI help.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change defines sealed RFC version boundaries, restricts version-changing bumps to sealed phases, adds migration-safe handling for missing or legacy signatures, permits narrowly scoped current-candidate clause deletion, expands referrer detection, and updates related governance documentation and tests.

Changes

RFC lifecycle governance

Layer / File(s) Summary
Lifecycle and deletion contracts
.claude/skills/*, AGENTS.md, docs/guide/rfcs.md, docs/rfc/*, gov/adr/*, gov/rfc/*, gov/work/*
Governance contracts now define sealed-signature requirements, spec-candidate version boundaries, lifecycle-owned since values, and deletion rules for unreferenced clauses.
Sealed-signature lifecycle enforcement
src/cmd/lifecycle/rfc.rs, src/signature/*, src/model/rfc.rs, src/cmd/new/artifacts/rfc.rs
RFC bump and advance operations validate sealed signatures, reject invalid spec and legacy-signature transitions, and preserve candidate state on migration-required failures.
Candidate clause deletion and referrer detection
src/cmd/edit/delete.rs, src/cmd/edit/delete_referrers.rs, src/cli/resources/*
Clause deletion supports draft and eligible normative spec candidates, detects supersession and inline references, and writes RFC and clause changes transactionally.
Lifecycle and deletion regression coverage
tests/delete_tests/*, tests/edit_tests/*, tests/lifecycle_tests/*, tests/test_rfc_lifecycle.rs
Tests cover candidate deletion, referrer reporting, sealed-signature lifecycle transitions, missing-signature failures, phase restrictions, and mutation-free errors.

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

Sequence Diagram(s)

sequenceDiagram
  participant Author
  participant RFCCommand
  participant SignatureValidation
  participant Repository
  Author->>RFCCommand: edit RFC or request bump/advance
  RFCCommand->>SignatureValidation: validate phase, amendment, and sealed signature
  SignatureValidation->>RFCCommand: approve transition or return migration error
  RFCCommand->>Repository: write RFC and clause state transactionally
  Repository->>Author: return lifecycle result
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 89.36% which is sufficient. The required threshold is 80.00%.
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.
Title check ✅ Passed The title clearly matches the main change: lifecycle RFC bumps are now bound to sealed amendments.
✨ 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 dev

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (4)
tests/test_rfc_lifecycle.rs (1)

36-43: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Correct update to the new seal-on-impl-transition baseline. Same repeated advance impl/test/stable boilerplate as flagged in bump.rs — see consolidated comment.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_rfc_lifecycle.rs` around lines 36 - 43, Update the RFC lifecycle
setup around the baseline commands to use the new seal-on-impl-transition
behavior, removing the redundant repeated advance impl/test/stable boilerplate
while preserving the intended RFC-0001 progression and baseline result.
tests/lifecycle_tests/rfc_cases/bump.rs (1)

16-26: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Repeated advance impl/test/stable boilerplate across ~9 tests.

The tests themselves are logically sound and correctly exercise the sealed-signature contract (signature preserved across content bumps until re-sealed, phase resets to spec, no mutation on rejected bumps, etc.). However, the 3-command "advance to stable" sequence used to establish the sealed baseline is now duplicated verbatim across all these tests. Extracting a small shared helper (e.g. returning the 3 command arrays, or a macro) in tests/common would reduce the maintenance surface if a lifecycle phase is ever renamed/reordered. See consolidated comment for cross-file scope.

Also applies to: 51-61, 86-96, 322-325, 353-413, 415-426, 704-706, 731-733, 782-784, 829-831

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/lifecycle_tests/rfc_cases/bump.rs` around lines 16 - 26, Extract the
repeated RFC lifecycle setup commands used by the tests in bump.rs into a shared
helper or macro under tests/common, returning or expanding the impl, test, and
stable advance commands in order. Replace each duplicated three-command sequence
across the referenced tests with the shared helper while preserving the existing
command arguments and test behavior.
src/cmd/lifecycle/rfc.rs (2)

45-61: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

New lifecycle checks lack RFC clause citations.

The phase=spec rejection and sealed-signature requirement (Lines 45-61), and the mirrored check in advance() (Lines 261-264), don't cite a specific RFC clause the way nearby pre-existing checks do (e.g. Line 32-33 cites [[RFC-0002:C-LIFECYCLE-VERBS]], Line 219 cites [[RFC-0000:C-PHASE-LIFECYCLE]]). As per coding guidelines, "implementation constraints should cite RFC clauses" and code should "optimize for RFC compliance, phase discipline, auditability, and traceability." Consider adding an inline citation to whichever RFC-0000/ADR-0054 clause defines the sealed-signature bump/advance boundary.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cmd/lifecycle/rfc.rs` around lines 45 - 61, Update the new lifecycle
validation errors in the RFC version bump flow and the mirrored advance() check
to include an inline citation to the RFC-0000 or ADR-0054 clause defining the
sealed-signature and phase boundary. Preserve the existing validation behavior
and cite the same authoritative clause consistently for the phase=spec rejection
and missing sealed-signature requirement.

Source: Coding guidelines


261-289: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Simplify the sealed-signature branch The trailing else { None } arm is unreachable here: the guard above already rejects !seals_current_version && rfc.signature.is_none(), and load_rfc rereads the same file before this branch. Replacing it with an explicit expect or match would make the invariant obvious.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cmd/lifecycle/rfc.rs` around lines 261 - 289, Update the next_signature
selection in the RFC phase advancement flow to remove the unreachable trailing
else branch. Since the earlier guard and load_rfc guarantee
rfc_index.rfc.signature is present when seals_current_version is false,
explicitly unwrap or match that signature and preserve the existing
stored-signature validation and error paths.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/cmd/lifecycle/rfc.rs`:
- Around line 45-61: Update the new lifecycle validation errors in the RFC
version bump flow and the mirrored advance() check to include an inline citation
to the RFC-0000 or ADR-0054 clause defining the sealed-signature and phase
boundary. Preserve the existing validation behavior and cite the same
authoritative clause consistently for the phase=spec rejection and missing
sealed-signature requirement.
- Around line 261-289: Update the next_signature selection in the RFC phase
advancement flow to remove the unreachable trailing else branch. Since the
earlier guard and load_rfc guarantee rfc_index.rfc.signature is present when
seals_current_version is false, explicitly unwrap or match that signature and
preserve the existing stored-signature validation and error paths.

In `@tests/lifecycle_tests/rfc_cases/bump.rs`:
- Around line 16-26: Extract the repeated RFC lifecycle setup commands used by
the tests in bump.rs into a shared helper or macro under tests/common, returning
or expanding the impl, test, and stable advance commands in order. Replace each
duplicated three-command sequence across the referenced tests with the shared
helper while preserving the existing command arguments and test behavior.

In `@tests/test_rfc_lifecycle.rs`:
- Around line 36-43: Update the RFC lifecycle setup around the baseline commands
to use the new seal-on-impl-transition behavior, removing the redundant repeated
advance impl/test/stable boilerplate while preserving the intended RFC-0001
progression and baseline result.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 46e5b438-4cdf-474c-9038-298e225fb667

📥 Commits

Reviewing files that changed from the base of the PR and between 46d6bd7 and 2f0709a.

⛔ Files ignored due to path filters (10)
  • tests/snapshots/test_delete__delete_clause_safeguard_normative.snap is excluded by !**/*.snap
  • tests/snapshots/test_delete__delete_clause_success_current_normative_spec_candidate.snap is excluded by !**/*.snap
  • tests/snapshots/test_help__rfc_bump_help.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_change_does_not_clear_pending_amendment.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_major_version.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_minor_version.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_patch_version.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_rejects_changelog_only_after_signature_baseline.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_rejects_empty_bump_after_signature_baseline.snap is excluded by !**/*.snap
  • tests/snapshots/test_rfc_lifecycle__rfc_amendment_tracking.snap is excluded by !**/*.snap
📒 Files selected for processing (32)
  • .claude/skills/gov/SKILL.md
  • .claude/skills/rfc-writer/SKILL.md
  • .claude/skills/spec/SKILL.md
  • AGENTS.md
  • docs/guide/rfcs.md
  • docs/rfc/RFC-0000.md
  • docs/rfc/RFC-0001.md
  • docs/rfc/RFC-0002.md
  • gov/adr/ADR-0054-bind-rfc-version-bumps-to-sealed-version-amendments.toml
  • gov/rfc/RFC-0000/clauses/C-CLAUSE-DEF.toml
  • gov/rfc/RFC-0000/clauses/C-PHASE-LIFECYCLE.toml
  • gov/rfc/RFC-0000/rfc.toml
  • gov/rfc/RFC-0001/clauses/C-RFC-PHASE.toml
  • gov/rfc/RFC-0001/rfc.toml
  • gov/rfc/RFC-0002/clauses/C-CRUD-VERBS.toml
  • gov/rfc/RFC-0002/clauses/C-LIFECYCLE-VERBS.toml
  • gov/rfc/RFC-0002/rfc.toml
  • gov/work/2026-07-20-close-rfc-candidate-version-lifecycle-gaps.toml
  • src/cli/resources/clause.rs
  • src/cli/resources/rfc.rs
  • src/cmd/edit/delete.rs
  • src/cmd/edit/delete_referrers.rs
  • src/cmd/lifecycle/rfc.rs
  • src/cmd/new/artifacts/rfc.rs
  • src/model/rfc.rs
  • src/signature/mod.rs
  • src/signature/tests.rs
  • tests/delete_tests/clause.rs
  • tests/edit_tests/rfc.rs
  • tests/lifecycle_tests/rfc_cases/advance.rs
  • tests/lifecycle_tests/rfc_cases/bump.rs
  • tests/test_rfc_lifecycle.rs

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The RFC lifecycle treats spec as the open candidate, seals content when advancing to impl, requires sealed signatures for later bumps and transitions, and permits narrowly scoped current-candidate clause deletion with expanded reference checks.

Changes

RFC lifecycle governance

Layer / File(s) Summary
Lifecycle and deletion contracts
.claude/skills/*, AGENTS.md, docs/guide/rfcs.md, docs/rfc/*, gov/adr/*, gov/rfc/*, gov/work/*
Governance documents define sealed-signature requirements, candidate bump boundaries, lifecycle-owned clause versions, and deletion rules for unreferenced current spec clauses.
Sealed-signature lifecycle enforcement
src/cmd/lifecycle/rfc.rs, src/signature/*, src/cli/resources/rfc.rs, src/model/rfc.rs, src/cmd/new/artifacts/rfc.rs
Bump and advance operations reject invalid phases, missing signatures, legacy signatures, and absent amendments while treating spec changes as open-candidate edits.
Candidate clause deletion and referrer detection
src/cmd/edit/delete.rs, src/cmd/edit/delete_referrers.rs, src/cli/resources/clause.rs
Clause deletion accepts draft or matching normative spec candidates, rejects inherited clauses, scans structural, supersession, inline, ADR, and work references, and writes changes transactionally.
Lifecycle and deletion regression coverage
tests/lifecycle_tests/*, tests/delete_tests/*, tests/edit_tests/*, tests/test_rfc_lifecycle.rs, src/signature/tests.rs
Tests cover phase sealing, missing and legacy signatures, spec-phase bumps, pending clauses, candidate deletion, referrer diagnostics, and no-mutation failures.

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

Sequence Diagram(s)

sequenceDiagram
  participant RFCCommand
  participant SignatureValidation
  participant RFCStorage
  RFCCommand->>SignatureValidation: validate phase, signature, and amendment state
  SignatureValidation->>RFCCommand: accept or return migration diagnostic
  RFCCommand->>RFCStorage: persist lifecycle transition
Loading
sequenceDiagram
  participant ClauseDeleteCommand
  participant ReferrerScanner
  participant RFCStorage
  ClauseDeleteCommand->>ReferrerScanner: collect structural, supersession, and inline referrers
  ReferrerScanner->>ClauseDeleteCommand: return sorted referrer IDs
  ClauseDeleteCommand->>RFCStorage: transactionally update RFC and delete clause
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: RFC bump behavior is now tied to sealed amendments in lifecycle handling.
Docstring Coverage ✅ Passed Docstring coverage is 89.36% which is sufficient. The required threshold is 80.00%.
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.
✨ 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 dev

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@gov/rfc/RFC-0001/rfc.toml`:
- Around line 33-34: Remove the duplicated [[changelog]] header before the 0.7.0
entry in gov/rfc/RFC-0001/rfc.toml and before the 0.14.0 entry in
gov/rfc/RFC-0002/rfc.toml, leaving exactly one header per populated release
entry.
🪄 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: 46e5b438-4cdf-474c-9038-298e225fb667

📥 Commits

Reviewing files that changed from the base of the PR and between 46d6bd7 and 2f0709a.

⛔ Files ignored due to path filters (10)
  • tests/snapshots/test_delete__delete_clause_safeguard_normative.snap is excluded by !**/*.snap
  • tests/snapshots/test_delete__delete_clause_success_current_normative_spec_candidate.snap is excluded by !**/*.snap
  • tests/snapshots/test_help__rfc_bump_help.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_change_does_not_clear_pending_amendment.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_major_version.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_minor_version.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_patch_version.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_rejects_changelog_only_after_signature_baseline.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_rejects_empty_bump_after_signature_baseline.snap is excluded by !**/*.snap
  • tests/snapshots/test_rfc_lifecycle__rfc_amendment_tracking.snap is excluded by !**/*.snap
📒 Files selected for processing (32)
  • .claude/skills/gov/SKILL.md
  • .claude/skills/rfc-writer/SKILL.md
  • .claude/skills/spec/SKILL.md
  • AGENTS.md
  • docs/guide/rfcs.md
  • docs/rfc/RFC-0000.md
  • docs/rfc/RFC-0001.md
  • docs/rfc/RFC-0002.md
  • gov/adr/ADR-0054-bind-rfc-version-bumps-to-sealed-version-amendments.toml
  • gov/rfc/RFC-0000/clauses/C-CLAUSE-DEF.toml
  • gov/rfc/RFC-0000/clauses/C-PHASE-LIFECYCLE.toml
  • gov/rfc/RFC-0000/rfc.toml
  • gov/rfc/RFC-0001/clauses/C-RFC-PHASE.toml
  • gov/rfc/RFC-0001/rfc.toml
  • gov/rfc/RFC-0002/clauses/C-CRUD-VERBS.toml
  • gov/rfc/RFC-0002/clauses/C-LIFECYCLE-VERBS.toml
  • gov/rfc/RFC-0002/rfc.toml
  • gov/work/2026-07-20-close-rfc-candidate-version-lifecycle-gaps.toml
  • src/cli/resources/clause.rs
  • src/cli/resources/rfc.rs
  • src/cmd/edit/delete.rs
  • src/cmd/edit/delete_referrers.rs
  • src/cmd/lifecycle/rfc.rs
  • src/cmd/new/artifacts/rfc.rs
  • src/model/rfc.rs
  • src/signature/mod.rs
  • src/signature/tests.rs
  • tests/delete_tests/clause.rs
  • tests/edit_tests/rfc.rs
  • tests/lifecycle_tests/rfc_cases/advance.rs
  • tests/lifecycle_tests/rfc_cases/bump.rs
  • tests/test_rfc_lifecycle.rs

Comment thread gov/rfc/RFC-0001/rfc.toml
Comment on lines +33 to +34
[[changelog]]
version = "0.7.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Duplicate [[changelog]] table headers.

Both RFC files contain a duplicated [[changelog]] array table header for the new release entry. In TOML, consecutive [[changelog]] headers create an empty object in the array before starting the populated entry, which will cause schema validation to fail because required fields (like version and date) will be missing on the empty object.

  • gov/rfc/RFC-0001/rfc.toml#L33-L34: Remove the extra [[changelog]] header so there is only one for the 0.7.0 entry.
  • gov/rfc/RFC-0002/rfc.toml#L39-L40: Remove the extra [[changelog]] header so there is only one for the 0.14.0 entry.
📍 Affects 2 files
  • gov/rfc/RFC-0001/rfc.toml#L33-L34 (this comment)
  • gov/rfc/RFC-0002/rfc.toml#L39-L40
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gov/rfc/RFC-0001/rfc.toml` around lines 33 - 34, Remove the duplicated
[[changelog]] header before the 0.7.0 entry in gov/rfc/RFC-0001/rfc.toml and
before the 0.14.0 entry in gov/rfc/RFC-0002/rfc.toml, leaving exactly one header
per populated release entry.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/skills/gov/SKILL.md:
- Around line 214-215: Clarify the lifecycle guidance in the
RFC-without-sealed-signature rule to restore the complete sealed baseline,
including both RFC and clause TOML artifacts, from a single VCS revision.
Clarify the current normative spec deletion rule to require an all-artifact
reference scan and diagnostics for every referencing artifact before deleting an
unreferenced Clause, while preserving deprecate or supersede handling for
inherited Clauses.
🪄 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: d53e3529-8f19-4efe-9e85-2ca34be7a73e

📥 Commits

Reviewing files that changed from the base of the PR and between 2f0709a and 477f6b0.

⛔ Files ignored due to path filters (10)
  • tests/snapshots/test_delete__delete_clause_safeguard_normative.snap is excluded by !**/*.snap
  • tests/snapshots/test_delete__delete_clause_success_current_normative_spec_candidate.snap is excluded by !**/*.snap
  • tests/snapshots/test_help__rfc_bump_help.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_change_does_not_clear_pending_amendment.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_major_version.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_minor_version.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_patch_version.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_rejects_changelog_only_after_signature_baseline.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_rejects_empty_bump_after_signature_baseline.snap is excluded by !**/*.snap
  • tests/snapshots/test_rfc_lifecycle__rfc_amendment_tracking.snap is excluded by !**/*.snap
📒 Files selected for processing (32)
  • .claude/skills/gov/SKILL.md
  • .claude/skills/rfc-writer/SKILL.md
  • .claude/skills/spec/SKILL.md
  • AGENTS.md
  • docs/guide/rfcs.md
  • docs/rfc/RFC-0000.md
  • docs/rfc/RFC-0001.md
  • docs/rfc/RFC-0002.md
  • gov/adr/ADR-0054-bind-rfc-version-bumps-to-sealed-version-amendments.toml
  • gov/rfc/RFC-0000/clauses/C-CLAUSE-DEF.toml
  • gov/rfc/RFC-0000/clauses/C-PHASE-LIFECYCLE.toml
  • gov/rfc/RFC-0000/rfc.toml
  • gov/rfc/RFC-0001/clauses/C-RFC-PHASE.toml
  • gov/rfc/RFC-0001/rfc.toml
  • gov/rfc/RFC-0002/clauses/C-CRUD-VERBS.toml
  • gov/rfc/RFC-0002/clauses/C-LIFECYCLE-VERBS.toml
  • gov/rfc/RFC-0002/rfc.toml
  • gov/work/2026-07-20-close-rfc-candidate-version-lifecycle-gaps.toml
  • src/cli/resources/clause.rs
  • src/cli/resources/rfc.rs
  • src/cmd/edit/delete.rs
  • src/cmd/edit/delete_referrers.rs
  • src/cmd/lifecycle/rfc.rs
  • src/cmd/new/artifacts/rfc.rs
  • src/model/rfc.rs
  • src/signature/mod.rs
  • src/signature/tests.rs
  • tests/delete_tests/clause.rs
  • tests/edit_tests/rfc.rs
  • tests/lifecycle_tests/rfc_cases/advance.rs
  • tests/lifecycle_tests/rfc_cases/bump.rs
  • tests/test_rfc_lifecycle.rs
🚧 Files skipped from review as they are similar to previous changes (23)
  • src/cmd/new/artifacts/rfc.rs
  • src/model/rfc.rs
  • src/cli/resources/clause.rs
  • gov/adr/ADR-0054-bind-rfc-version-bumps-to-sealed-version-amendments.toml
  • gov/rfc/RFC-0001/rfc.toml
  • gov/rfc/RFC-0001/clauses/C-RFC-PHASE.toml
  • gov/work/2026-07-20-close-rfc-candidate-version-lifecycle-gaps.toml
  • tests/test_rfc_lifecycle.rs
  • gov/rfc/RFC-0002/clauses/C-CRUD-VERBS.toml
  • AGENTS.md
  • tests/delete_tests/clause.rs
  • src/cmd/edit/delete.rs
  • gov/rfc/RFC-0002/clauses/C-LIFECYCLE-VERBS.toml
  • gov/rfc/RFC-0000/rfc.toml
  • docs/rfc/RFC-0001.md
  • src/signature/mod.rs
  • gov/rfc/RFC-0000/clauses/C-PHASE-LIFECYCLE.toml
  • docs/guide/rfcs.md
  • docs/rfc/RFC-0002.md
  • src/cmd/edit/delete_referrers.rs
  • tests/lifecycle_tests/rfc_cases/advance.rs
  • src/cmd/lifecycle/rfc.rs
  • tests/lifecycle_tests/rfc_cases/bump.rs

Comment thread .claude/skills/gov/SKILL.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.claude/skills/rfc-writer/SKILL.md (1)

168-168: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Make the clause-deletion safety gate explicit.

Require govctl clause delete to scan all governed artifacts and report every referrer before deletion; “unreferenced” alone is too easy to interpret as a local check and could permit dangling references.

As per coding guidelines, governance artifacts must preserve lifecycle and reference guarantees.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/rfc-writer/SKILL.md at line 168, Clarify the clause-deletion
rule near the current normative spec guidance: require govctl clause delete to
scan all governed artifacts and report every referrer before allowing deletion.
Keep the existing lifecycle distinction for current-candidate clauses versus
inherited clauses, but make clear that deletion is permitted only after the
complete governed-artifact reference check confirms no references.

Sources: Coding guidelines, Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.claude/skills/rfc-writer/SKILL.md:
- Line 168: Clarify the clause-deletion rule near the current normative spec
guidance: require govctl clause delete to scan all governed artifacts and report
every referrer before allowing deletion. Keep the existing lifecycle distinction
for current-candidate clauses versus inherited clauses, but make clear that
deletion is permitted only after the complete governed-artifact reference check
confirms no references.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fd87c9e3-b184-4217-81c5-f40cf4acaa54

📥 Commits

Reviewing files that changed from the base of the PR and between 477f6b0 and c2c9acc.

⛔ Files ignored due to path filters (10)
  • tests/snapshots/test_delete__delete_clause_safeguard_normative.snap is excluded by !**/*.snap
  • tests/snapshots/test_delete__delete_clause_success_current_normative_spec_candidate.snap is excluded by !**/*.snap
  • tests/snapshots/test_help__rfc_bump_help.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_change_does_not_clear_pending_amendment.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_major_version.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_minor_version.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_patch_version.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_rejects_changelog_only_after_signature_baseline.snap is excluded by !**/*.snap
  • tests/snapshots/test_lifecycle__bump_rejects_empty_bump_after_signature_baseline.snap is excluded by !**/*.snap
  • tests/snapshots/test_rfc_lifecycle__rfc_amendment_tracking.snap is excluded by !**/*.snap
📒 Files selected for processing (32)
  • .claude/skills/gov/SKILL.md
  • .claude/skills/rfc-writer/SKILL.md
  • .claude/skills/spec/SKILL.md
  • AGENTS.md
  • docs/guide/rfcs.md
  • docs/rfc/RFC-0000.md
  • docs/rfc/RFC-0001.md
  • docs/rfc/RFC-0002.md
  • gov/adr/ADR-0054-bind-rfc-version-bumps-to-sealed-version-amendments.toml
  • gov/rfc/RFC-0000/clauses/C-CLAUSE-DEF.toml
  • gov/rfc/RFC-0000/clauses/C-PHASE-LIFECYCLE.toml
  • gov/rfc/RFC-0000/rfc.toml
  • gov/rfc/RFC-0001/clauses/C-RFC-PHASE.toml
  • gov/rfc/RFC-0001/rfc.toml
  • gov/rfc/RFC-0002/clauses/C-CRUD-VERBS.toml
  • gov/rfc/RFC-0002/clauses/C-LIFECYCLE-VERBS.toml
  • gov/rfc/RFC-0002/rfc.toml
  • gov/work/2026-07-20-close-rfc-candidate-version-lifecycle-gaps.toml
  • src/cli/resources/clause.rs
  • src/cli/resources/rfc.rs
  • src/cmd/edit/delete.rs
  • src/cmd/edit/delete_referrers.rs
  • src/cmd/lifecycle/rfc.rs
  • src/cmd/new/artifacts/rfc.rs
  • src/model/rfc.rs
  • src/signature/mod.rs
  • src/signature/tests.rs
  • tests/delete_tests/clause.rs
  • tests/edit_tests/rfc.rs
  • tests/lifecycle_tests/rfc_cases/advance.rs
  • tests/lifecycle_tests/rfc_cases/bump.rs
  • tests/test_rfc_lifecycle.rs
🚧 Files skipped from review as they are similar to previous changes (25)
  • src/cmd/new/artifacts/rfc.rs
  • src/signature/tests.rs
  • src/cli/resources/rfc.rs
  • gov/rfc/RFC-0002/clauses/C-CRUD-VERBS.toml
  • gov/rfc/RFC-0001/rfc.toml
  • tests/edit_tests/rfc.rs
  • tests/test_rfc_lifecycle.rs
  • gov/rfc/RFC-0002/rfc.toml
  • gov/rfc/RFC-0000/clauses/C-PHASE-LIFECYCLE.toml
  • docs/guide/rfcs.md
  • src/cmd/edit/delete_referrers.rs
  • src/cmd/edit/delete.rs
  • src/cli/resources/clause.rs
  • gov/rfc/RFC-0001/clauses/C-RFC-PHASE.toml
  • docs/rfc/RFC-0001.md
  • gov/rfc/RFC-0000/rfc.toml
  • AGENTS.md
  • src/signature/mod.rs
  • docs/rfc/RFC-0002.md
  • tests/delete_tests/clause.rs
  • gov/work/2026-07-20-close-rfc-candidate-version-lifecycle-gaps.toml
  • gov/rfc/RFC-0002/clauses/C-LIFECYCLE-VERBS.toml
  • src/cmd/lifecycle/rfc.rs
  • gov/adr/ADR-0054-bind-rfc-version-bumps-to-sealed-version-amendments.toml
  • tests/lifecycle_tests/rfc_cases/bump.rs

@lucifer1004
lucifer1004 merged commit cb98d1e into main Jul 20, 2026
5 of 6 checks passed
@lucifer1004
lucifer1004 deleted the dev branch July 20, 2026 02:55
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.10256% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/cmd/edit/delete_referrers.rs 83.51% 15 Missing ⚠️
src/cmd/edit/delete.rs 95.83% 1 Missing ⚠️
src/cmd/lifecycle/rfc.rs 97.29% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

1 participant