Repository navigation
Description
Problem or Motivation
This is hooks item P19, child 18 of #4771. It was a tracker line with no issue. This issue files it with a wider scope. It is also child 2 of the content freshness tracker #4880.
- In the week to 2026-11-11, 121 commits on
maintouched generated files. .gitattributeshas only eol and binary lines, so generated diffs fill the PR view.- The model-review skip
CONST_REVIEW_ROUTED_PATH_PATTERNS(src/devops_cli/config/constants.py) names 2 of the 11 generated globs. Thus 6 pages (262,710 bytes) and 3 stubs still go to model review on each PR. - No document holds the conflict step.
- P19 says that no conflict push had only a generated file in conflict. But 2 did (feat(roadmap): implement falls back to medium-effort items #3614, feat(roadmap): extend a step budget when the run makes progress #4464, both
docs/CONFIGURATION.md).
Proposed Solution & Architectural Design
- In
.gitattributes, setlinguist-generated=truefor the 11 generated globs ofCONST_DOCS_INVENTORY(52 files).README.mdstays unmarked, because only one block of it is generated. - The review skip (
src/devops_cli/review/targets.py) reads the generated class from the inventory. Removedocs/commands/*.mdanddocs/CLI_REFERENCE.mdfromCONST_REVIEW_ROUTED_PATH_PATTERNS. - One test compares the inventory,
git check-attrand the review skip. - Add the conflict step to
CONTRIBUTING.mdnext to the docs step: when a rebase stops on a generated file, rungit checkout --ours -- <file>(in a rebase, "ours" ismain) and continue the rebase. Then runuv run devops docs generate --sync-readmeonce and commit. The devops-pr-ci skill line of refactor(pr): devops pr update acts only on a failed check #4674 links to this step and does not copy it. - Post a comment on feat(ci): track the agent hooks plan #4771 that corrects the P19 statement about generated-only conflicts.
No merge driver: GitHub ignores merge drivers.
Target Subsystem
SDLC, Git & PR Governance (.gitattributes, the model-review skip, CONTRIBUTING.md).
Existing Tool Considered
GitHub Linguist attributes (linguist-generated) and git check-attr. Nothing is built apart from one test and the inventory read.
Acceptance Criteria
git check-attr linguist-generatedgivestruefor each of the 52 files andunspecifiedfor every other tracked Markdown file.- The test fails when the inventory gets a generated glob with no attribute line.
- A review target test skips all 52 files.
- The docs row still fails a hand edit of a generated page.
CONTRIBUTING.mdhas the conflict step.
Dependencies
None.
Source: #4771
Alternatives check of 2026-11-14: not-applicable.
Class: chore, no search.
Tool: none found.
Proposed design
Problem statement
Generated documents fill the pull request diff and the model review. In the week to 2026-11-11, 121 commits on main touched them. .gitattributes sets no linguist-generated line, so GitHub shows each generated diff in full. The model-review skip names 2 of the 11 generated globs, so 9 documents still reach model review. No contributor document holds the rebase conflict step for a generated file, and the devops-pr-ci skill holds the only copy.
Acceptance criteria
Requirement: Generated documents carry the linguist-generated attribute
.gitattributes SHALL set linguist-generated=true for each glob of the generated class of CONST_DOCS_INVENTORY.
Scenario: each generated document is marked
- WHEN a test runs
git check-attr linguist-generatedfor each tracked file that matches a generated glob - THEN each file prints
true
Requirement: No other Markdown file carries the attribute
A tracked Markdown file that matches no generated glob MUST print unspecified for linguist-generated.
Scenario: a hand-written document stays unmarked
- WHEN a test runs
git check-attr linguist-generatedforREADME.mdand each other tracked Markdown file that matches no generated glob - THEN each file prints
unspecified
Requirement: A generated glob with no attribute line fails the check
The attribute check MUST fail when a glob of the generated class has no matching line in .gitattributes.
Scenario: a new generated glob has no line
- WHEN a test adds a glob to the generated class and runs the attribute check
- THEN the check fails and names the glob and the missing attribute
Requirement: The review skip reads the generated class
is_secret_scan_only SHALL treat each path that matches a glob of the generated class of CONST_DOCS_INVENTORY as secret-scan only.
Scenario: a glob added to the inventory changes the skip
- WHEN a test adds a glob to the generated class and calls
is_secret_scan_onlywith a path that matches it - THEN the call returns
True
Requirement: The routed patterns hold no generated glob
CONST_REVIEW_ROUTED_PATH_PATTERNS MUST hold no glob of the generated class.
Scenario: the two generated globs are gone
- WHEN a test compares each entry of
CONST_REVIEW_ROUTED_PATH_PATTERNSwith the generated class - THEN no entry equals
docs/commands/*.mdordocs/CLI_REFERENCE.md, and no entry matches a generated glob
Requirement: Every generated document is skipped by the review
A review target test SHALL skip each tracked file that matches a generated glob.
Scenario: each generated document is secret-scan only
- WHEN a test calls
is_secret_scan_onlyfor each tracked file that matches a generated glob - THEN each call returns
True
Requirement: The docs row refuses a hand edit of a generated page
The docs row of devops ci MUST still fail when a generated document is not the output of its generator.
Scenario: a generated page holds a hand edit
- WHEN the docs check runs on a tree whose generated page holds a hand edit
- THEN the check exits 1 and names that page
Requirement: CONTRIBUTING.md holds the conflict step
CONTRIBUTING.md SHALL state the rebase conflict step for a generated file in its Documentation Synchronization section.
Scenario: a reader finds the step beside the docs command
- WHEN a test reads the Documentation Synchronization section of
CONTRIBUTING.md - THEN it holds
git checkout --ours -- <file>,git rebase --continueanduv run devops docs generate
Existing Tool Considered
GitHub Linguist's linguist-generated attribute, read with git check-attr, covers the diff view: it collapses a generated file in the GitHub pull request view. It lacks the model-review skip, because it marks a file for GitHub and not for this project's review. The change therefore reads the generated class of CONST_DOCS_INVENTORY in is_secret_scan_only: about 10 lines and two tests, an estimated 2,000 tokens to write and 1,000 to keep and fix, and under one hour of elapsed time. No merge driver is added: a merge attribute names a driver that git starts as a program (CONST_GIT_ATTRIBUTE_DRIVERS), and git defines only text, binary and union itself (CONST_GIT_BUILTIN_DRIVERS).
Key questions
- Which documents does the generated class of the docs inventory cover?: The generated class holds 11 globs and 52 files: 7 reference pages (
docs/CLI_REFERENCE.md,docs/CONFIGURATION.md,docs/ENV_VARS.md,docs/ERRORS.md,docs/KNOWLEDGE_BASE.md,docs/MCP_TOOLS.md,docs/TELEMETRY.md), 42 pages ofdocs/commands/, and 3 instruction stubs (CLAUDE.md,GEMINI.md,.github/copilot-instructions.md). [sources: src/devops_cli/config/constants.py:494, docs/adr/0025-generated-documents-stay-in-git-and-the-project-brain-cites-them.md:18] - Which generated globs does the model-review skip name today?: Two:
docs/commands/*.mdanddocs/CLI_REFERENCE.md. The other 9 generated globs reach model review. [sources: src/devops_cli/config/constants.py:4667, src/devops_cli/review/targets.py:37] - Does a document already hold the rebase conflict step for a generated file?: Yes. The
devops-pr-ciskill holds it: "On a rebase conflict in a generated document, rungit checkout --ours <file>(in a rebase, "ours" ismain). Then runuv run devops docs generate,git add <file>andgit rebase --continue."CONTRIBUTING.mdholds no such step, so the body's line "No document holds the conflict step" is wrong. The step moves toCONTRIBUTING.mdas the canonical text. [sources: .agents/skills/devops-pr-ci/SKILL.md:21, CONTRIBUTING.md] - How does the review skip learn which files are generated?:
is_secret_scan_onlyreads the generated class ofCONST_DOCS_INVENTORYand treats each match as secret-scan only.CONST_REVIEW_ROUTED_PATH_PATTERNSkeeps the record, tool-owned and prompt paths, and loses the two generated globs. (best practice) [sources: src/devops_cli/config/constants.py:494, src/devops_cli/review/targets.py:37]- Chosen: Read the generated class of
CONST_DOCS_INVENTORY. One source of truth: the inventory already classifies every Markdown file, and a second copy is what let the two globs drift. - Rejected: Add the 9 missing globs to
CONST_REVIEW_ROUTED_PATH_PATTERNS. It keeps two lists of the same globs, and a new generated document needs an edit in two places. - Rejected: Add a third constant of the generated globs for the review. It is a third list of the same globs, with the same drift.
- Chosen: Read the generated class of
- How does a rebase conflict on a generated file get resolved?: The contributor takes the base copy with
git checkout --ours -- <file>, continues the rebase, runsuv run devops docs generateonce on the final tree, and commits the result. The skill's current order regenerates inside the rebase; the step moves the one regeneration to the end, so one commit holds the final output. (best practice) [sources: src/devops_cli/config/constants.py, .agents/skills/devops-pr-ci/SKILL.md:21]- Rejected: A
merge=oursattribute line. Git defines onlytext,binaryandunionas merge drivers.oursneeds a driver in each clone's config, and a clone does not get one. - Chosen: A documented step in
CONTRIBUTING.md. It needs no per-clone setup, and the generator rewrites the file, so the base copy plus one regeneration is deterministic.
- Rejected: A
- Which command regenerates the generated documents?:
uv run devops docs generate, the form thatCONTRIBUTING.mdand thedevops-pr-ciskill give. The proposal's--sync-readmehas no source in the repository, so the step leaves it out. [sources: CONTRIBUTING.md, .agents/skills/devops-pr-ci/SKILL.md:21] - Does
README.mdhold a generated block?: No. Its Command Reference section is prose that linksdocs/CLI_REFERENCE.md, and thedocs-cli-referencerequirement "README.md holds no generated block" states the same.README.mdstays unmarked because nothing in it is generated, not because only one block of it is. [sources: README.md] - Where does the conflict step go in
CONTRIBUTING.md?: In the Documentation Synchronization bullet of section 4, after theuv run devops docs generateline. (best practice) [sources: CONTRIBUTING.md]- Chosen: The Documentation Synchronization bullet of section 4. It already tells the reader to run
uv run devops docs generate, and the conflict step is the recovery for that command. - Rejected: A new section of its own. It splits one procedure over two places and grows the document.
- Chosen: The Documentation Synchronization bullet of section 4. It already tells the reader to run
- How do the attribute lines stay true when the inventory changes?: The lines are hand-written, and one test compares the generated class,
git check-attrand.gitattributes. A glob with no line fails in the pull request that adds the glob. (best practice) [sources: src/devops_cli/config/constants.py:494, CONTRIBUTING.md]- Chosen: Hand-written lines, kept true by one test. The file holds unrelated eol and binary lines, and the test fails in the pull request that adds a generated glob.
- Rejected: Generate the lines from the inventory. It needs a command, a hook and a generated block in a file that git reads before any tool runs, and no generator writes
.gitattributes.
- Which tests read the two symbols that this change edits?:
CONST_DOCS_INVENTORYis read bytests/commands/test_openspec_scaffold.py,tests/config/test_tuicr_config.pyandtests/docs/test_docs_inventory.py.CONST_REVIEW_ROUTED_PATH_PATTERNSis read bytests/commands/test_openspec_scaffold.py:26, so that test changes if it asserts the two removed globs. [sources: tests/commands/test_openspec_scaffold.py:26, tests/docs/test_docs_inventory.py, tests/config/test_tuicr_config.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 12, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
choreprefix of the title gives the type.(docs)scope of the title gives the scope.It reduces noise and unnecessary model review on every pull request but does not block delivery.It removes generated-file noise from PR views and stops 6 pages from going to model review on each PR.It touches .gitattributes, review/targets.py, a new test, and CONTRIBUTING.md, but each change is small.Both work on the generated docs inventory, but #1103 removes committed reference pages while this marks them as generated in .gitattributes.devops-cli-service commentedon Nov 14, 2026
Alternatives check: not-applicable
Class: chore. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 15, 2026
Status set to Ready at ca62d6a (see proposed design in issue body).
Moved to new items: #5900.
dan-petty commentedon Nov 19, 2026
The Ready body of this item has stale premises, and two acceptance points conflict with
main. Correct the body before a builder takes it.Evidence (origin/main 0d90de5, 2026-11-19)
docs/CLI_REFERENCE.md linguist-generatedanddocs/commands/*.md linguist-generated(.gitattributes:22-23). The body line ".gitattributes has only eol and binary lines" and the refine line ".gitattributessets nolinguist-generatedline" are wrong. The work is 9 globs (9 files), not 11 globs. The tracker feat(docs): track current content and brain-fed reference docs #4880 (body line 188) already states this.set, nottrue. The feat(roadmap): collect the git facts of a project review window #4794 lines use the bare form, sogit check-attr linguist-generated docs/CLI_REFERENCE.mdprintsset. Body acceptance point 1 and the refine scenario "each file printstrue" fail for these 44 files. Either the PR changes the two lines to=true, or the test acceptssetandtrue, as_GENERATED_VALUESinsrc/devops_cli/roadmap/project_review/git_read.py:29does.unspecifiedfor every other tracked Markdown file" conflicts withCHANGELOG.md. feat(roadmap): collect the git facts of a project review window #4794 also addedCHANGELOG.md linguist-generated(.gitattributes:19).CHANGELOG.mdis in thetool-ownedclass (src/devops_cli/config/constants.py:522-523), not in thegeneratedclass. The project review reads this mark to count generated lines apart (src/devops_cli/roadmap/project_review/facts.py:5). The requirement "No other Markdown file carries the attribute" must excludeCHANGELOG.md, or the PR removes a mark that the project review uses.uv run devops docs generate --sync-readme". docs(cli): turn CLI_REFERENCE into an index of the command group pages #5198 (merged 2026-11-12T20:29Z) deleted--sync-readme.git grep sync.readmefinds 0 hits insrc/,CONTRIBUTING.mdanddocs/commands/. The refine design already drops the flag, but the body step still holds it.docs/commands/holds 43 pages, not 42. The generated class holds 53 files (7 reference pages, 3 stubs and 43 command pages), not 52.Still true
CONST_REVIEW_ROUTED_PATH_PATTERNS(src/devops_cli/config/constants.py:4826) names the 2 generated globs, so 9 generated documents still go to model review.CONTRIBUTING.mdholds no conflict step.CONTRIBUTING.md:184gives onlyuv run devops docs generate.Proposed body changes
.gitattributesline with ".gitattributesmarks 2 of the 11 generated globs (feat(roadmap): collect the git facts of a project review window #4794)".linguist-generated=trueor the bare form).setortruefor each generated file;unspecifiedfor each other tracked Markdown file exceptCHANGELOG.md(tool-owned, marked by feat(roadmap): collect the git facts of a project review window #4794)".uv run devops docs generateonce and commit".chore(main): release 0.216.0 (#7080)
devops-cli-service commentedon Nov 25, 2026
Released in v0.216.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.216.0
devops-cli-service commentedon Nov 25, 2026
Live since 2026-11-25 06:00 UTC