Repository navigation
feat(KEN-3179): decider: a removed routine record keeps its ID reserved without keeping its document - #4122
Merged
Conversation
A routine record whose reason has moved to the code or principle doc it governs is removed, not retired: the document goes, the INDEX row stays with its Link cell as written, so the ID stays reserved, decisions check keeps the record's identity across branches and next-id allocates past it. Retirement keeps the row the same way. The md-refs lane reads the tracked INDEX.md beside the tracked documents, so a citation of a row-only ID resolves while an ID with neither row nor document still fails decision-missing, and a § citation of a row-only ID fails decision-markdown. The decider, commit-guards and docs-writing rules, the rewrite workflow step 6 among them, state removal versus withdrawal and where a surviving citation points.
Copilot started reviewing on behalf of
vanillagreen (vanillagreencom)
October 6, 2026 18:43
View session
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Document deletion and retained-link handling remain inconsistent, leaving dangling references and guard failures in supported configurations.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
This PR lets kendex’s decision-management skills remove routine decision documents while retaining INDEX rows to reserve their IDs.
Changes:
- Defines
Removedstatus and updates retirement, removal, and citation guidance. - Lets
md-refsresolve bare decision IDs through retained INDEX rows. - Adds regression cases, package version bumps, changelog entries, and synchronized renders.
| File | Description |
|---|---|
| skills/docs-writing/workflows/rewrite.md | Allows routine-record removal during rewrites. |
| skills/docs-writing/SKILL.md | Bumps package version. |
| skills/decider/workflows/update-decision.md | Defines removal and retirement steps. |
| skills/decider/tests/decider-base-collision.test.sh | Tests retained IDs after document deletion. |
| skills/decider/templates/index-row.md | Preserves Link-cell identity. |
| skills/decider/SKILL.md | Adds removal policy and version bump. |
| skills/decider/schemas/decision-format.md | Defines documentless records and statuses. |
| skills/commit-guards/tests/md-refs.test.sh | Tests row-only citation handling. |
| skills/commit-guards/SKILL.md | Bumps package version. |
| skills/commit-guards/scripts/md-refs | Supplies the staged INDEX to resolution. |
| skills/commit-guards/scripts/lib/md-refs.awk | Loads decision IDs from INDEX rows. |
| skills/commit-guards/CHECKS.md | Documents row-based ID resolution. |
| changelog.d/docs-writing/changed/ken-3179-rewrite-removes-routine-records.md | Records rewrite guidance changes. |
| changelog.d/decider/added/ken-3179-removed-records.md | Announces routine-record removal. |
| changelog.d/commit-guards/changed/ken-3179-md-refs-index-row.md | Announces row-only citation support. |
| .agents/skills/docs-writing/workflows/rewrite.md | Synchronizes rendered rewrite guidance. |
| .agents/skills/docs-writing/SKILL.md | Synchronizes rendered version. |
| .agents/skills/decider/workflows/update-decision.md | Synchronizes rendered update workflow. |
| .agents/skills/decider/templates/index-row.md | Synchronizes rendered row template. |
| .agents/skills/decider/SKILL.md | Synchronizes rendered policy and version. |
| .agents/skills/decider/schemas/decision-format.md | Synchronizes rendered record schema. |
| .agents/skills/commit-guards/SKILL.md | Synchronizes rendered version. |
| .agents/skills/commit-guards/scripts/md-refs | Synchronizes rendered INDEX loading. |
| .agents/skills/commit-guards/scripts/lib/md-refs.awk | Synchronizes rendered row resolver. |
| .agents/skills/commit-guards/CHECKS.md | Synchronizes rendered check documentation. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Address PR comments A consumer whose md-refs path list covers docs/decisions/INDEX.md judged a removed or retired row's [Full](ID-x.md) cell as a dead link once its document was deleted. The decider now rewrites the cell to the backticked filename on a removal or retirement; decisions check already compares the filename the cell resolves to, so a record keeps its identity across branches through either form with no script change. The decider suite's removing fixture carries the backticked cell against the base's link with a control that reads the cell as written; the md-refs suite judges INDEX.md itself and shows the linked form of a documentless row failing link-target.
Copilot started reviewing on behalf of
vanillagreen (vanillagreencom)
October 6, 2026 19:10
View session
Address PR comments
Copilot started reviewing on behalf of
vanillagreen (vanillagreencom)
October 6, 2026 19:20
View session
Address PR comments
Copilot started reviewing on behalf of
vanillagreen (vanillagreencom)
October 6, 2026 19:31
View session
Contributor
Author
Completed Issues
Recommendations ProcessedFixed in PR
Skipped
Fix rounds: 3 | Docs program terms: no reviewer subagents; every round answered a Copilot thread or the master's route B directive. Review gate approved and CI green at 598d02f. Versions: decider 2.0.2 → 2.1.3, commit-guards 1.2.2 → 1.2.4, docs-writing 3.0.4 → 3.0.6. |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 6, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
next-idallocates past it. NewRemovedstatus; the row's Link cell stays as written, the Rationale cell names where the reason lives.decision-missing, and a§ Headingcitation of a row-only ID failsdecision-markdown. No new check, gate or limit.Rule map
Every changed rule, its old wording, and its new place or removal reason. The master reads this before merge.
SKILL.md§ What warrants a decision record: "A record is never deleted: one withdrawn with no replacement is retired ... keeps its row and a one-line document"workflows/update-decision.md, which deletes the document and keeps the INDEX rowSKILL.md: "a retired one binds nothing"SKILL.mdworkflows table, update-decision triggerschemas/decision-format.md§ INDEX.md: "The Link cell must name the decision document, a retired one included"decisions checkreads it as the record's identity across branchesschemas/decision-format.md§ Status values,Retired: "the row and a one-line document keep the ID reserved"schemas/decision-format.md§ Status values,Removedschemas/decision-format.md§ Decision documentschemas/decision-format.md§ Cross-references, "Code → removed decision"<path>.md § Headingcitation of the principle docworkflows/update-decision.md§ 1: "For a retirement, shrink the file ... the file stays so the INDEX link resolves"workflows/update-decision.md§ 2: "Never remove a row"workflows/update-decision.md§ 3, removalREVISIT(ID)marker and every other citation of the ID in code, docs andAGENTS.mdto point at the reason's new home, found by a literal search for the IDworkflows/update-decision.mdtable, Remove rowRemovedtemplates/index-row.md: "The Link cell must name the decision file"decisions checkreads it as the identity across branches, so a retired or removed record keeps it as writtenCHECKS.md§ md-refs: a decision ID "must have a tracked fileDECISIONS_DIR/<ID>-*.md"DECISIONS_DIR/INDEX.md; the§form fails on an ID whose row has no filescripts/md-refsusage text, decision IDsworkflows/rewrite.mdstep 6: "Retire a record ... only when its choice is withdrawn"; "leave a pointer where an ID is still cited"Route B (master note 1791312535), second commit aff5589: the Link cell of a retired or removed row becomes the backticked filename, so no dead link remains where md-refs judges the INDEX.
schemas/decision-format.md§ INDEX.md (first commit): "The Link cell names the record's document and stays as written after that document is gone:decisions checkreads it as the record's identity across branches"decisions checkcompares the filename the cell resolves to, not the cell as writtenschemas/decision-format.md§ Status values,RetiredandRemovedrowstemplates/index-row.mdLINK row (first commit): "kept as written after the document is gone"decisions checkcompares the resolved filenameworkflows/update-decision.md§ 2 (first commit): "never change its Link cell ... reads the Link cell as the record's identity"decisions checkcompares the filename the cell resolves to; never remove a rowscripts/decisionscomment aboveparse_index: "its link cell as written ... is a record's identity"parse_rowsalready resolves a link, a backticked filename or a bare filename to the same.link, and the base and duplicate checks already compare that valueThird commit 55a9302 (Copilot thread on update-decision.md § 3): one deletion rule for a retirement and a removal, so no citation of a deleted document dangles.
workflows/update-decision.md§ 3 heading "Code markers"workflows/update-decision.md§ 3: "For a retirement, remove each marker and leave a comment at its site only where the code still needs the reason. For a removal, rewrite each marker, and every other citation of the ID in code, docs andAGENTS.md, to point at the reason's new home ... Find them by searching for the ID literally"AGENTS.md, a sibling record's[ID](ID-descriptor.md)link included; a removal's citations point at the reason's new home; a retirement's point at the INDEX row (theINDEX.mdpath or the row's Decision text in prose) or are removed, and itsREVISITmarkers are removed with a comment only where the code still needs the reason. The supersession and partial-supersession sentences are unchangedworkflows/update-decision.md§ 1: "For a retirement or a removal, delete the file"workflows/rewrite.mdstep 6: "search for that ID literally, and search the INDEX links"Fourth commit 598d02f (Copilot threads on SKILL.md and the status table): the read instruction and one Link cell rule.
SKILL.md: "Read the full decision file and its status before acting on a hit"schemas/decision-format.md§ Status values,RetiredandRemovedrows (second commit): "its Link cell the backticked filename"templates/index-row.mdLINK row and the sentence below (second commit): "becomes that filename in a code span"../schemas/decision-format.md§ INDEX.md", and the sentence says the cell's form follows the document's existence, so a retired or removed record whose pointer document is kept keeps its linkworkflows/update-decision.md§ 2Dropped with reason: the dev skill's
workflows/dev-implement.md§ 2.3 and the orchworkflows/review-pr.md§ 1.1 still say to read the full decision record before treating it as binding. Both sentences govern active records, whose documents exist; the deciderSKILL.mdowns the read rule and now states the retired and removed cases, and a restatement there would be a second copy of that rule.No rule was removed without a replacement. No kendex decision record is removed in this PR; the master holds those removals (KEN-3182 removes D006 by this rule).
Context
decisions checkneeded no code change: it never tested a document's presence, and its identity rule is the resolved Link cell filename. Suite rows prove the pass on a removing branch whose row carries the backticked cell against a base holding the link, and the allocation past a merged removal.COMMIT_GUARDS_MD_REFS_PATHStodocs/*.md(fleet does) has md-refs judgedocs/decisions/INDEX.md, where a relative link to a deleted document failslink-target. Two md-refs suite rows under that setting pin the premise: the backticked form passes, the linked form of a documentless row fails. kendex's default path list leaves the INDEX unjudged.Completed Issues
Versions
Size
Merge decision
Attempt on head 598d02f: exit 75,
merge-route: queue cause=queue-occupied, QUEUED IN MERGE QUEUE (queueState=QUEUED).Test Plan
tools/guard --fullthrough dev-validate-run: pass (full, 30 min, lanes guard-scans, selection all) at c68c816. The route B commit aff5589 and the doc-only commits 55a9302 and 598d02f validate in CI (mode ci: the PR CI checks the change); aff5589's suites ran locally: md-refs 201 passed, decider-base-collision 76 passed.skills/commit-guards/tests/md-refs.test.sh: 199 passed, 0 failed. Newrowworld: a row-only ID passes; a§citation of it failsdecision-markdown; an ID with neither row nor document failsdecision-missing; a row-loader must-fail control.skills/decider/tests/decider-base-collision.test.sh: 75 passed, 0 failed. New rowscheck-removed-recordandnext-id-past-removed, one must-fail control each.