Gov#11
Conversation
- render_adr/render_work_item/render_clause emit tags in metadata (> **Tags:** `tag1`, `tag2`), hidden when empty - TUI RFC detail header shows tags (magenta bold) - TUI RFC/ADR/Work list views have Tags column - Applies to rendered markdown output and TUI detail views via the shared render pipeline govctl check: ✓ cargo test: 202+all integration tests pass
…references - ADR-0001: marked superseded_by ADR-0034 (TOML format split eliminated — ADR-0034 extended TOML to all artifacts) - ADR-0006: added ADR-0019 to refs (-n flag reassignment) - ADR-0017: added ADR-0037 to refs (canonical edit command) - src/render.rs: updated doc example and test from ADR-0001 to ADR-0042 to eliminate W0107 warning govctl check: ✓ cargo test: 202+all integration tests pass
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 54 minutes and 27 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughAdds a controlled-vocabulary tag system across governance artifacts: populates an allowed-tags config, backfills tags in ADRs/RFCs/clauses/work items, documents tag CLI/TUI usage, renders tags in markdown and TUI, and optimizes tag-list/delete by building a single tag-usage map from artifacts. Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as govctl CLI
participant FS as Artifact files (gov/, docs/, adrs/, rfcs/)
participant Parser as TOML/Render Parser
participant Renderer as Markdown Renderer / TUI
CLI->>FS: request tag list / delete
FS->>Parser: load artifact TOML files (single pass)
Parser->>Parser: build HashMap<Tag,Count>
Parser-->>CLI: return tag usage map
CLI->>Renderer: render tag list / render artifact (with tags)
Renderer->>FS: read artifact content for rendering/detail (if needed)
Renderer-->>User: display tags in markdown/TUI
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ 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 |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (1)
docs/guide/validation.md (1)
66-72: Clarify “standard add verb” wording to match command examples.Line 66 says “standard
addverb,” but examples useedit ... --add. Consider rephrasing to “standardeditcommand with--add” for consistency.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/guide/validation.md` around lines 66 - 72, Change the phrasing that currently says “standard `add` verb” to explicitly match the examples by referring to the `edit` command and the `--add` flag (e.g., reword to “standard `edit` command with `--add`”), so the text and examples like `govctl rfc edit ... --add caching`, `govctl adr edit ... --add caching`, and `govctl work edit ... --add caching` are consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CHANGELOG.md`:
- Line 13: Update the CHANGELOG entry that currently says "tag delete still uses
count_tag_usage" to avoid referencing the stale function name; reword it to
describe behavior instead (e.g., "tag delete still performs a safety check using
the tag usage map" or "safety check derived from build_tag_usage_map/usage map")
so the text is implementation-neutral while still mentioning the relevant
symbols count_tag_usage and build_tag_usage_map for clarity.
In `@docs/guide/rfcs.md`:
- Around line 61-78: The docs currently show using "govctl rfc edit ... version
--set" and "status --set", which teaches direct edits to lifecycle/version
fields; update the examples to use the proper commands instead: replace the
"version --set" example with the "rfc bump RFC-0010 <new-version>" flow (or
reference the "rfc bump" command), and replace the "status --set" example with
lifecycle verbs such as "rfc finalize RFC-0010" (or other lifecycle commands)
rather than "govctl rfc edit ... status --set", ensuring the guide references
"rfc bump" and lifecycle commands (e.g., "rfc finalize") as the authoritative
ways to change version and status.
In `@docs/guide/work-items.md`:
- Around line 103-122: Update the "Canonical Edit Paths" section to clarify that
not all fields are editable via the path-based interface: explicitly exclude
lifecycle-managed fields (e.g., the status field and other workflow-managed
properties) from direct edits with the govctl work edit command and instruct
users to use govctl work move for status/transitions and other lifecycle
operations; modify the text around the examples (referencing the "govctl work
edit" and "govctl work move" commands and the "status" field) to state this
exclusion and add a short pointer sentence directing readers to the work move
command for lifecycle changes.
In
`@gov/adr/ADR-0020-configurable-work-item-id-strategies-for-multi-person-collaboration.toml`:
- Line 9: The current tags entry uses "editing" which misrepresents the ADR's
scope; update the TOML tags key (tags = ["editing"]) to a set that reflects
collision prevention and multi-person collaboration such as tags =
["collaboration","work-items","id-strategy"] (or a subset like "collaboration"
and "work-items") so the ADR is discoverable and accurately categorized.
In
`@gov/work/2026-04-21-adr-lifecycle-maintenance-supersede-adr-0001-and-adr-0016-fix-cross-references.toml`:
- Around line 18-24: The review flags that the "Note: ADR-0016..." paragraph
introduces normative governance assertions into a work item; remove or replace
that paragraph so the work item only records operational changes (keep the
bullet changes referencing ADR-0016, ADR-0006/ADR-0019, ADR-0017/ADR-0037 and
the src/render.rs doc/test update to ADR-0042), and instead add a short
non-normative pointer such as "See ADR-0016 and relevant RFCs for governance
semantics" or a neutral reference to the ADR/RFC sources; ensure no new
normative language about ADR vs RFC roles remains in the file.
- Line 5: The title line currently claims "supersede ADR-0016" while the body at
lines 18 and 62 states ADR-0016 remains accepted; pick the correct outcome for
ADR-0016 and make the file consistent by either updating the title (the title =
"..." entry) to remove "supersede ADR-0016" if ADR-0016 remains accepted, or
conversely update the content at lines 18 and 62 to mark ADR-0016 as superseded;
ensure all references to ADR-0016 within the document reflect the single chosen
outcome.
In `@gov/work/2026-04-21-document-missing-cli-features-in-user-guide.toml`:
- Around line 3-10: Add the missing required refs metadata to the work item by
adding a refs field in the [govctl] table (e.g., refs = [] if there are no
references) so the entry with id "WI-2026-04-21-005" conforms to
RFC-0000:C-WORK-DEF validation; ensure refs is present as an array alongside the
existing fields title, status, created, started, completed, and tags.
---
Nitpick comments:
In `@docs/guide/validation.md`:
- Around line 66-72: Change the phrasing that currently says “standard `add`
verb” to explicitly match the examples by referring to the `edit` command and
the `--add` flag (e.g., reword to “standard `edit` command with `--add`”), so
the text and examples like `govctl rfc edit ... --add caching`, `govctl adr edit
... --add caching`, and `govctl work edit ... --add caching` are consistent.
🪄 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: 3724b6bd-e016-4350-9ccc-84213d90c573
📒 Files selected for processing (104)
CHANGELOG.mddocs/guide/adrs.mddocs/guide/getting-started.mddocs/guide/rfcs.mddocs/guide/validation.mddocs/guide/work-items.mddocs/rfc/RFC-0000.mddocs/rfc/RFC-0001.mddocs/rfc/RFC-0002.mddocs/rfc/RFC-0003.mddocs/rfc/RFC-0004.mdgov/adr/ADR-0001-use-toml-for-adrs-and-work-items.tomlgov/adr/ADR-0002-fix-artifact-lifecycle-design-flaws.tomlgov/adr/ADR-0003-deterministic-hash-signatures-for-rendered-projections.tomlgov/adr/ADR-0004-adopt-keep-a-changelog-format-for-rfc-changelogs.tomlgov/adr/ADR-0005-cli-output-color-scheme-and-formatting.tomlgov/adr/ADR-0006-global-dry-run-support-for-content-modifying-commands.tomlgov/adr/ADR-0007-ergonomic-array-field-matching-for-remove-and-tick-commands.tomlgov/adr/ADR-0008-add-refs-field-to-rfcspec-for-artifact-cross-referencing.tomlgov/adr/ADR-0009-configurable-source-code-reference-scanning.tomlgov/adr/ADR-0010-validate-work-item-descriptions-for-placeholder-content.tomlgov/adr/ADR-0011-inline-reference-expansion-in-rendered-content.tomlgov/adr/ADR-0012-prefix-based-changelog-category-parsing.tomlgov/adr/ADR-0013-add-category-field-to-work-items-for-changelog-generation.tomlgov/adr/ADR-0014-release-management-with-releases-toml.tomlgov/adr/ADR-0015-context-aware-self-describing-cli-for-agent-discoverability.tomlgov/adr/ADR-0016-allow-rfc-amendments-via-versioning-during-implementation.tomlgov/adr/ADR-0017-cli-command-implementation-details.tomlgov/adr/ADR-0018-global-command-shortcuts-vs-strict-resource-first-syntax.tomlgov/adr/ADR-0019-change-n-from-dry-run-to-limit-for-better-unix-convention-alignment.tomlgov/adr/ADR-0020-configurable-work-item-id-strategies-for-multi-person-collaboration.tomlgov/adr/ADR-0021-resource-scoped-render-commands-for-single-item-rendering.tomlgov/adr/ADR-0022-add-show-command-for-stdout-rendering.tomlgov/adr/ADR-0023-organize-assets-into-commands-skills-and-agents-subdirectories.tomlgov/adr/ADR-0024-writers-as-skills-reviewers-as-agents-for-governance-artifacts.tomlgov/adr/ADR-0025-concurrent-write-safety-for-agent-driven-parallel-tasks.tomlgov/adr/ADR-0026-add-journal-field-to-workitem-for-execution-tracking.tomlgov/adr/ADR-0027-extend-alternative-structure-with-pros-cons-and-rejection-reason.tomlgov/adr/ADR-0028-migrate-commands-to-skills-format-for-cross-platform-compatibility.tomlgov/adr/ADR-0029-path-based-nested-field-addressing-for-artifact-edits.tomlgov/adr/ADR-0030-parser-strategy-for-path-based-field-expressions.tomlgov/adr/ADR-0031-unified-artifact-edit-engine-with-ssot-and-format-adapters.tomlgov/adr/ADR-0032-migration-skill-for-adopting-govctl-in-existing-projects.tomlgov/adr/ADR-0033-distribute-govctl-agent-integration-as-claude-code-plugin.tomlgov/adr/ADR-0034-use-toml-as-the-canonical-storage-format-for-all-governance-artifacts.tomlgov/adr/ADR-0035-decouple-skill-and-agent-installation-from-project-initialization.tomlgov/adr/ADR-0036-restructure-adr-chosen-option-and-migration-semantics.tomlgov/adr/ADR-0037-canonical-edit-surface-for-nested-artifact-mutation.tomlgov/adr/ADR-0038-keep-adr-schema-discussion-oriented-and-avoid-broad-migration.tomlgov/adr/ADR-0039-use-sqlite-fts5-as-read-only-search-index-for-governance-artifacts.tomlgov/adr/ADR-0040-controlled-vocabulary-tags-for-governance-artifacts.tomlgov/adr/ADR-0041-self-update-and-cargo-binstall-binary-distribution.tomlgov/adr/ADR-0042-enforce-adr-writing-order-with-structural-gates.tomlgov/config.tomlgov/guard/cargo-test.tomlgov/guard/govctl-check.tomlgov/rfc/RFC-0000/clauses/C-ADR-DEF.tomlgov/rfc/RFC-0000/clauses/C-CLAUSE-DEF.tomlgov/rfc/RFC-0000/clauses/C-GUARD-DEF.tomlgov/rfc/RFC-0000/clauses/C-PHASE-LIFECYCLE.tomlgov/rfc/RFC-0000/clauses/C-REFERENCE-HIERARCHY.tomlgov/rfc/RFC-0000/clauses/C-RELEASE-DEF.tomlgov/rfc/RFC-0000/clauses/C-RFC-DEF.tomlgov/rfc/RFC-0000/clauses/C-STATUS-LIFECYCLE.tomlgov/rfc/RFC-0000/clauses/C-SUMMARY.tomlgov/rfc/RFC-0000/clauses/C-WORK-DEF.tomlgov/rfc/RFC-0000/rfc.tomlgov/rfc/RFC-0001/clauses/C-ADR-STATUS.tomlgov/rfc/RFC-0001/clauses/C-CLAUSE-STATUS.tomlgov/rfc/RFC-0001/clauses/C-GATE-CONDITIONS.tomlgov/rfc/RFC-0001/clauses/C-RFC-PHASE.tomlgov/rfc/RFC-0001/clauses/C-RFC-STATUS.tomlgov/rfc/RFC-0001/clauses/C-SUMMARY.tomlgov/rfc/RFC-0001/clauses/C-WORK-STATUS.tomlgov/rfc/RFC-0001/rfc.tomlgov/rfc/RFC-0002/clauses/C-CRUD-VERBS.tomlgov/rfc/RFC-0002/clauses/C-GLOBAL-COMMANDS.tomlgov/rfc/RFC-0002/clauses/C-LIFECYCLE-VERBS.tomlgov/rfc/RFC-0002/clauses/C-OUTPUT-FORMAT.tomlgov/rfc/RFC-0002/clauses/C-RESOURCE-MODEL.tomlgov/rfc/RFC-0002/clauses/C-RESOURCES.tomlgov/rfc/RFC-0002/clauses/C-SELF-UPDATE.tomlgov/rfc/RFC-0002/clauses/C-SUMMARY.tomlgov/rfc/RFC-0002/clauses/C-VERIFY-CONFIG.tomlgov/rfc/RFC-0002/rfc.tomlgov/rfc/RFC-0003/clauses/C-DETAIL.tomlgov/rfc/RFC-0003/clauses/C-FILTER.tomlgov/rfc/RFC-0003/clauses/C-NAV.tomlgov/rfc/RFC-0003/clauses/C-SUM.tomlgov/rfc/RFC-0003/rfc.tomlgov/rfc/RFC-0004/clauses/C-CONCURRENT-WRITE.tomlgov/rfc/RFC-0004/clauses/C-DEFINITIONS.tomlgov/rfc/RFC-0004/clauses/C-FAILURE-BEHAVIOUR.tomlgov/rfc/RFC-0004/clauses/C-SCOPE.tomlgov/rfc/RFC-0004/clauses/C-SUMMARY.tomlgov/rfc/RFC-0004/rfc.tomlgov/work/2026-04-21-adr-lifecycle-maintenance-supersede-adr-0001-and-adr-0016-fix-cross-references.tomlgov/work/2026-04-21-backfill-controlled-vocabulary-tags-across-governance-artifacts.tomlgov/work/2026-04-21-display-tags-in-tui-detail-views-and-list-views.tomlgov/work/2026-04-21-document-missing-cli-features-in-user-guide.tomlgov/work/2026-04-21-optimize-tag-list-performance-batch-load-artifact-tags.tomlsrc/cmd/tag.rssrc/render.rssrc/tui/ui.rs
…nonical edit, and more - validation.md: tags system, guard subcommands, verify, self-update, init-skills, describe, migrate distinction - getting-started.md: TUI shortcuts, release workflow, canonical edit surface, describe command, migrate comparison table - adrs.md: canonical edit paths with aliases, ADR-0042 accept gates, tagging examples - rfcs.md: canonical edit paths, tagging, --tag filter - work-items.md: canonical edit paths with aliases, tagging - All bracket paths quoted for shell safety - WI-2026-04-21-005 completed govctl check: ✓ cargo test: 202+all integration tests pass
KeyCode::Char('n') and KeyCode::Char('p') handlers had nested
if app.filter_active() blocks that clippy now flags as collapsible.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/guide/validation.md`:
- Around line 162-164: Update the example invocation so it passes guard IDs as
positional arguments (matching the CLI's guard_ids: Vec<String>), not using a
non-existent --guard flag; replace the line showing "govctl verify --guard
GUARD-CARGO-TEST --guard GUARD-GOVCTL-CHECK" with a positional form like "govctl
verify GUARD-CARGO-TEST GUARD-GOVCTL-CHECK" to reflect the actual implementation
(see guard_ids parameter).
🪄 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: a556cf3e-5afd-4d77-b130-0f6023ec6f87
📒 Files selected for processing (12)
CHANGELOG.mddocs/guide/adrs.mddocs/guide/getting-started.mddocs/guide/rfcs.mddocs/guide/validation.mddocs/guide/work-items.mdgov/adr/ADR-0020-configurable-work-item-id-strategies-for-multi-person-collaboration.tomlgov/config.tomlgov/work/2026-04-21-adr-lifecycle-maintenance-supersede-adr-0001-and-adr-0016-fix-cross-references.tomlgov/work/2026-04-21-document-missing-cli-features-in-user-guide.tomlgov/work/2026-04-21-optimize-tag-list-performance-batch-load-artifact-tags.tomlsrc/tui/event.rs
✅ Files skipped from review due to trivial changes (9)
- gov/adr/ADR-0020-configurable-work-item-id-strategies-for-multi-person-collaboration.toml
- src/tui/event.rs
- docs/guide/work-items.md
- CHANGELOG.md
- docs/guide/rfcs.md
- docs/guide/getting-started.md
- gov/work/2026-04-21-adr-lifecycle-maintenance-supersede-adr-0001-and-adr-0016-fix-cross-references.toml
- gov/work/2026-04-21-document-missing-cli-features-in-user-guide.toml
- gov/work/2026-04-21-optimize-tag-list-performance-batch-load-artifact-tags.toml
🚧 Files skipped from review as they are similar to previous changes (1)
- gov/config.toml
…f, add tags, and more - WI-002: reword acceptance criteria to avoid referencing removed count_tag_usage function name - rfcs.md: replace direct version/status --set with rfc bump/finalize - work-items.md: clarify lifecycle fields excluded from direct edit - ADR-0020: tags from ["editing"] to ["collaboration", "work-items"]; register new tags in gov/config.toml - WI-004: fix title to not claim ADR-0016 was superseded; remove normative note paragraph - WI-005: add missing refs = [] field - validation.md: fix "add verb" → "edit command with --add" - CHANGELOG regenerated to reflect WI-002 text change govctl check: ✓ cargo test: 202+all integration tests pass
Summary by CodeRabbit
New Features
Documentation
Performance