Repository navigation
Description
Problem
src/devops_cli/ai/knowledge_base (75 articles, about 430 KB) is hand maintained and stale: 15 of 26 checked claims were wrong. 73 of 76 files changed in 30 days, mostly one-cell fixes after code changes, and the changes did not keep it correct. 4 articles only repeat a generated page, a standards document, pyproject.toml or uv.lock, and 3 of the 22 living high findings of the content census are flags in such copies (architecture.md line 79, cli_command_reference.md line 93, configuration_and_settings.md line 18). The knowledge base is also in Qdrant two times: the tree ingest and the devops-cli-kb project.
The owner decided on 2026-11-11: "keep reference docs, but update design to accomodate project brain and keeps all content up to date". The knowledge base is a source of the project brain, so the folder stays.
Expected
- The tree copy is the one knowledge base source.
devops_cli/cli_command_reference.md,configuration_and_settings.md,architecture.mdandpython_packages.mdare deleted when they only repeat a generated page, a standards document,pyproject.tomloruv.lock. One source holds each fact.- Each remaining article has front matter (
reviewed,sources,applies_to). An article that only repeats a document is deleted. - The front matter is required in the whole knowledge base. Today
CONST_KB_METADATA_TARGET_SUBDIRSnames 3 subfolders. - The
devops-cli-kbproject is purged from Qdrant. docs/KNOWLEDGE_BASE.md(by regeneration) and the knowledge base text ofdocs/SDLC.mdare updated.
Acceptance criteria
- The 4 copy articles are gone, and no reader or test pins them.
- A test fails when a knowledge base article has no
reviewed,sourcesorapplies_tofield. - The 3 flag findings are gone.
- The pull request comment lists the choice for each article and the review eval scores, which are not worse.
Existing tool considered
None. The change deletes content and adds a front matter check.
Related
- Child 5 of feat(docs): track current content and brain-fed reference docs #4880, the content freshness tracker. The scope comes from the comment of 2026-11-12T02:23Z.
- docs: fix the stale statements that the content census found #4894 fixes the other 19 living high findings and leaves these 3 to this item.
- The RAG payload item (child 13 of feat(docs): track current content and brain-fed reference docs #4880) reads the knowledge base only from the tree copy.
- The merged plan of feat(ai): generate the project digest from code at run time #3904 (group 7 of its tasks.md) rewrites the 4 articles that this item deletes; a comment on feat(ai): generate the project digest from code at run time #3904 reports the conflict.
- test(ai): a gold set measures retrieval of knowledge base facts #3902, feat(ai): generate the project digest from code at run time #3904 and refactor(ai): the review loop reads manuals from the index #3916 give only the eval scores.
Dependencies
None.
Alternatives check of 2026-11-21: not-applicable.
Class: refactor, no search.
Tool: none found.
Proposed design
Problem statement
The knowledge base under src/devops_cli/ai/knowledge_base holds 4 articles that only repeat a generated page, a standards document, pyproject.toml or uv.lock. The copies drift from their source and cause 3 of the 22 living high findings of the content census. The front matter check covers only 3 subfolders. The owner decision of 2026-11-11 keeps the folder as a source of the project brain, so this change does not delete the folder. It deletes the 4 copies, makes reviewed, sources and applies_to required in the whole knowledge base, and updates docs/KNOWLEDGE_BASE.md and docs/SDLC.md.
Acceptance criteria
Requirement: Copy articles removed
The knowledge base SHALL hold none of the four articles that only repeat another source: devops_cli/cli_command_reference.md, devops_cli/configuration_and_settings.md, devops_cli/architecture.md and devops_cli/python_packages.md.
Scenario: Knowledge base tree after the change
- WHEN the test lists every Markdown file under
src/devops_cli/ai/knowledge_base - THEN the list holds none of the four paths
Requirement: No reader or test names a copy article
Each reader and each test of the repository MUST name none of the four removed articles.
Scenario: Search of the source and test trees
- WHEN the test searches
src/andtests/for the four article names - THEN it finds no match
Requirement: Front matter required in the whole knowledge base
Every article of the knowledge base MUST declare the front matter fields reviewed, sources and applies_to.
Scenario: Article without a front matter field
- WHEN the metadata check runs on a temporary article that lacks
applies_to - THEN the check reports that article path and fails
Requirement: Metadata target covers every subfolder
CONST_KB_METADATA_TARGET_SUBDIRS MUST name every subfolder of the knowledge base root.
Scenario: Constant against the tree
- WHEN the test compares
CONST_KB_METADATA_TARGET_SUBDIRSwith the subfolders ofsrc/devops_cli/ai/knowledge_base - THEN the two sets are equal
Requirement: Knowledge base documentation is current
The change MUST regenerate docs/KNOWLEDGE_BASE.md from its generator and MUST state in docs/SDLC.md that the tree copy is the one knowledge base source.
Scenario: Docs row and docs site build
- WHEN
uv run devops ci --check --only docsanduv run devops docs site buildrun on the pull request - THEN the docs row passes with no difference and the site build passes with no broken link
Existing Tool Considered
The alternatives check of 2026-11-09 in the issue body gives not-applicable for this refactor class and names no tool. No open tool covers the need, and the change builds no new tool: it deletes 4 articles and widens the front matter check that src/devops_cli/ai/kb.py already runs. Written cost of the code that the project keeps: about 15,000 tokens and under one hour, because the constant, the parser and the test already exist and the change adds one subfolder list and one test case.
Key questions
- Does the owner decision keep the knowledge base folder?: Yes. The owner decided on 2026-11-11 to keep the reference docs and to change the design for the project brain. The knowledge base is the reference corpus of the AI commands, so the folder stays. [sources: CONTEXT.md, docs/adr/0005-review-findings-come-from-tools-not-models.md]
- Where does the front matter check of the knowledge base live today?:
CONST_KB_METADATA_TARGET_SUBDIRSatsrc/devops_cli/config/constants.py:5621names 3 subfolders.src/devops_cli/ai/kb.pyreads it and parsesapplies_toat line 184 andsourcesat line 185.tests/review/test_kb_manuals_metadata.pytests it. [sources: src/devops_cli/config/constants.py:5621, src/devops_cli/ai/kb.py:184, src/devops_cli/ai/kb.py:185, tests/review/test_kb_manuals_metadata.py] - How does the front matter become required in the whole knowledge base?: Widen
CONST_KB_METADATA_TARGET_SUBDIRSto name every subfolder of the knowledge base root. Keep the one check insrc/devops_cli/ai/kb.pyand the one test. (best practice) [sources: src/devops_cli/config/constants.py:5621, src/devops_cli/ai/kb.py, tests/review/test_kb_manuals_metadata.py]- Chosen: Widen the existing subfolder constant. One list and one test hold the rule, and the parser in
src/devops_cli/ai/kb.pyalready reads the fields. - Rejected: Add a second validator for the other subfolders. Two lists hold the same rule and drift apart.
- Rejected: Add a pre-commit hook over the tree. The CI test already gates the change, and a hook adds a second path that CI does not see.
- Chosen: Widen the existing subfolder constant. One list and one test hold the rule, and the parser in
- Which source holds the facts that
devops_cli/python_packages.mdrepeats?:pyproject.tomlholds the dependency list anduv.lockpins each version, so the article repeats them and the change deletes it. [sources: pyproject.toml, uv.lock] - Which documentation pages change?:
docs/KNOWLEDGE_BASE.mdis a generated page, so its generator writes it and thedocsrow of Static Analysis refuses a hand edit.docs/SDLC.mdholds the knowledge base text that the change updates. [sources: CONTEXT.md, docs/KNOWLEDGE_BASE.md, docs/SDLC.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 7, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
refactorprefix of the title gives the type.(ai)scope of the title gives the scope.The deletion is blocked by open prerequisites and does not block other work.It removes a stale hand-maintained source that misleads users and costs maintenance.It requires deleting files, rewriting or removing several tests, and updating docs, CODEOWNERS, and the invariants list.Both target the same knowledge base folder; #3904 generates a digest to replace 17 files, while the candidate deletes the whole folder after all replacements land.devops-cli-service commentedon Nov 9, 2026
Alternatives check: not-applicable
Class: refactor. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-09. A person decides what this means for the item. The check changes no label and closes no issue.
dan-petty commentedon Nov 12, 2026
Scope from the content freshness plan (2026-11-11)
This issue is child 5 of #4880, the content freshness tracker. The scope and the title change. The new title is "refactor(ai): drop the knowledge base copies of project docs".
Why
This issue plans to delete the whole knowledge base folder (75 articles, about 430 KB). The owner decided on 2026-11-11, word for word: "keep reference docs, but update design to accomodate project brain and keeps all content up to date". The knowledge base is a source of the project brain, so a full deletion conflicts with that decision.
3 of the 22 living high findings of the content census are flags in articles that copy a generated page (
architecture.mdline 79,cli_command_reference.mdline 93,configuration_and_settings.mdline 18). The knowledge base is also in Qdrant two times: the tree ingest and thedevops-cli-kbproject.New scope
devops_cli/cli_command_reference.md,configuration_and_settings.md,architecture.mdandpython_packages.mdwhen they only repeat a generated page, a standards document,pyproject.tomloruv.lock. One source holds each fact.reviewed,sources,applies_to). The PR deletes an article that only repeats a document.CONST_KB_METADATA_TARGET_SUBDIRSnames 3 subfolders.devops-cli-kbproject from Qdrant.docs/KNOWLEDGE_BASE.md(by regeneration) and the knowledge base text ofdocs/SDLC.md.The dependencies on #3902, #3904 and #3916 stay only for the eval scores. No tool applies: the change deletes content.
Acceptance added
reviewed,sourcesorapplies_tofield.Related
#4894 fixes the other 19 living high findings and leaves these 3 to this issue. The RAG payload item (child 13 of #4880) reads the knowledge base only from the tree copy.
Depends on: None.
[-]refactor(ai): delete the checked-in knowledge base folder[/-][+]refactor(ai): drop the knowledge base copies of project docs[/+]dan-petty commentedon Nov 19, 2026
This item is stuck in refine
failedsince 2026-11-12, because its new scope is only in a comment and the title. Refine starts again only after a body edit. Move the scope comment of 2026-11-12T02:23Z into the body.Evidence (origin/main 0d90de5, 2026-11-19)
refine.next_step: failed,refine.tries: 3,refine.failed_check: acceptance_criteriaandrefine.failure: The reply of the model failed the form check.devops-cli-kbproject from Qdrant._still_waiting(src/devops_cli/roadmap/refine/refine.py:2555), the stepFAILEDreturns_settled_wait(line 2584, function at line 2483). Only a body edit ends that wait (fix(roadmap): refine makes a person wait only for a decision #3632). A comment and a title change do not.docs/roadmap/refine.md:127says the same._tries_on,refine.py:2992-2997).Effect
openspec/changes/3904-generate-the-project-digest-from-code/tasks.md:62-68, group 7) rewrites the 4 articles that the new scope deletes. A comment on feat(ai): generate the project digest from code at run time #3904 reports that conflict.Relation to #6327
#6327 (open, Ready) names the failed form check and gives the failure to the next round. That fix does not end this wait, because refine sends no request for a
faileditem until a body edit. So this item needs the body edit in any case.Proposed action
1 remaining item
devops-cli-service commentedon Nov 21, 2026
Owner question: The inputs of the step of the task group "Record where each removed article's facts live and score the review" hold 75604 tokens, over the budget of 64000 tokens, also after the model split the groups once. Split the group or raise the budget of the step?
Options
Recommendation: Split the group: the plan check keeps the budget of the step.
Evidence
dan-petty commentedon Nov 24, 2026
Split the group.
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