Repository navigation
Description
Problem or Motivation
Agents read the knowledge base to learn a subsystem, library or tool (AGENTS.md, "Where to look"). The knowledge base has no page on Jev or on decision models: git grep -inE 'jev|decision model|systemone|system one' origin/main -- src/devops_cli/ai/knowledge_base returns nothing. ADR 0019 and ADR 0020 hold the method, but not the rules for the design of a question.
The skill .agents/skills/ask-jev/SKILL.md does not name the 32,000-byte edge of the long-context mode, the option-order bias or the 0.3/0.7 band. Its score example uses degree-only levels (line 33: --level "Trivial" --level "Normal" --level "Hard"). The documents say:
- "A rubric level's description stands alone. Its member name is not sent, so describe the situation the level covers, not a degree" (https://pydantic.dev/docs/ai/models/decision/#where-the-wording-comes-from)
- "Describe situations, not degrees." (https://docs.typesafe.ai/primitives/score.md, Writing good levels)
The verify screen shows the cost of the gap. 7 of its 9 questions join conditions, and it gave 0 continue in 44 live decisions (#5281). New points (#5206, #4284, #4399, #5215) can make the same mistakes.
Proposed Solution & Architectural Design
- A knowledge base page on decision models, for example
src/devops_cli/ai/knowledge_base/devops_cli/libraries/decision_models.md. List it in the knowledge baseREADME.md, and link it frompydantic_ai.md. The page quotes each rule with its URL:- Question design. One condition for each Noul, combined in code. No catch-all question. No negation. Name a state field in the question. Put into the state the evidence that the question names. Compute in code what code can compute. Sources: https://docs.typesafe.ai/primitives/noul.md (Instruction phrasing), https://pydantic.dev/docs/ai/models/decision/#ask-one-thing-per-field, https://docs.typesafe.ai/model-jaggedness.md (Literal reading), https://docs.typesafe.ai/concepts/how-to-build-with-system-one.md.
- Thresholds. One bar for each field, fitted on a few hundred labelled cases. A bar is a range, not a point. The band from 0.3 to 0.7 has its own outcome. A repeated call can move a probability by up to 0.08. Sources: https://pydantic.dev/docs/ai/models/decision/#confidence-and-thresholds, https://pydantic.dev/docs/ai/models/decision/#tuning-a-threshold-on-your-own-data, https://docs.typesafe.ai/confidence, https://openrouter.ai/docs/cookbook/building-agents/gate-tool-calls-with-jev.md.
- Window. Keep the state and the questions under about 32,000 bytes, so that the request stays out of the long-context mode. Source: https://openrouter.ai/docs/guides/community/jev (FAQ).
- Option order. "Jev leans toward the option that comes first." Use a Score for a position on a spectrum. Reorder the options to test a Choice. Sources: https://docs.typesafe.ai/model-jaggedness.md (Choice option order), https://docs.typesafe.ai/primitives/choice.md.
- Score levels. Each level describes a situation, not a degree. Each Score question has one dimension. Source: https://docs.typesafe.ai/primitives/score.md.
- Several questions. Put the independent questions about one state in one request. Source: https://openrouter.ai/docs/guides/community/jev-tutorial.md (FAQ).
- Fix the score example of the skill with situation levels, in the three copies of the skill:
.agents/skills/ask-jev/SKILL.md,.claude/skills/ask-jev/SKILL.mdand.kilocode/skills/ask-jev/SKILL.md. Example:--level "The change touches one module and its tests" --level "The change touches several modules" --level "The change adds a new subsystem". Add a link from the skill to the knowledge base page. The skill text for--contextandunsurechanges with fix(ai): ask-jev refuses no context and reports unsure #5284. - The decision record. docs(adr): one decision-model record supersedes ADR 0019 and ADR 0020 #5239 (one decision-model record) holds the question rules as the project decision. The knowledge base page quotes the documents and links that record. A comment on docs(adr): one decision-model record supersedes ADR 0019 and ADR 0020 #5239 asks for this.
Target Subsystem
AI & Agentic Review Pipeline (src/devops_cli/ai/knowledge_base/, .agents/skills/ask-jev/).
Existing Tool Considered
The project knowledge base and the ask-jev skill. No new tool. Cost: about 0.15M tokens and 1 hour.
Acceptance Criteria
-
git grep -il "decision model" -- src/devops_cli/ai/knowledge_basenames the new page andREADME.md. - The page quotes each rule with its URL, and
uv run devops ci docspasses. -
git grep -n -- '--level "Trivial"' -- .agents/skills .claude/skills .kilocode/skillsreturns nothing. - The skill links the knowledge base page.
Related
- docs(adr): one decision-model record supersedes ADR 0019 and ADR 0020 #5239: one decision-model record.
- feat(roadmap): ask the verify screen one atomic question each #5281: the verify screen questions.
- fix(ai): ask-jev refuses no context and reports unsure #5284: ask-jev refuses no context and reports
unsure. - feat(roadmap): ask Jev if a command off the lists is dangerous, in shadow #5206, feat(roadmap): log a Jev tier choice beside each stage run #4284, feat(roadmap): shadow the stage planner exploration stop #4399, feat(roadmap): fix-plan asks if each finding still holds #5215: new decision points that use these rules.
- chore(roadmap): track the decision model workflows #4408: the tracker of the decision model workflows.
Alternatives check of 2026-11-16: not-applicable.
Class: docs, no search.
Tool: none found.
Proposed design
Problem statement
Write the decision-model page and fix the score example in the three skill copies. The page link waits on #5239. The knowledge base has no page on decision models, so agents miss the rules for a question. The three copies of the ask-jev skill give a score example with degree-only levels. The skill already names the 32,000-byte limit and the 0.3/0.7 band. The verify screen shows the cost: 7 of its 9 questions join conditions, and it gave 0 continue in 44 live decisions (#5281).
Acceptance criteria
Requirement: Decision-model page
The knowledge base SHALL hold the page src/devops_cli/ai/knowledge_base/devops_cli/libraries/decision_models.md.
Scenario: The page exists
- WHEN uv run devops ci test tests/ai/test_kb.py -k decision_models_page runs on the change
- THEN the command exits 0 and the run lists test_decision_models_page_exists as passed
Requirement: Knowledge base index row
The knowledge base README SHALL list the page in its devops_cli/libraries/ table.
Scenario: The index table names the page
- WHEN uv run devops ci test tests/ai/test_kb.py -k decision_models_page runs on the change
- THEN the command exits 0 and the run lists test_knowledge_base_readme_lists_decision_models_page as passed
Requirement: A source for each rule section
The page SHALL hold one section for each of the six rule groups, and each section MUST cite a source.
Scenario: Each rule section cites its source
- WHEN uv run devops ci test tests/ai/test_kb.py -k decision_models_page runs on the change
- THEN the command exits 0 and the run lists test_decision_models_page_has_six_sourced_sections as passed
Requirement: No dangling link
Each relative link on the page SHALL resolve to a file in the repository.
Scenario: Each relative link of the page resolves
- WHEN uv run devops ci test tests/ai/test_kb.py -k decision_models_page runs on the change
- THEN the command exits 0 and the run lists test_decision_models_page_relative_links_resolve as passed
Requirement: Link from the pydantic_ai page
The knowledge base page pydantic_ai.md SHALL link the decision-model page.
Scenario: The pydantic_ai page links the new page
- WHEN uv run devops ci test tests/ai/test_kb.py -k decision_models_page runs on the change
- THEN the command exits 0 and the run lists test_pydantic_ai_page_links_decision_models_page as passed
Requirement: Knowledge base counts
The knowledge base tests MUST pass with the new page.
Scenario: The counts include the new page
- WHEN uv run devops ci test tests/ai/test_kb.py runs on the change
- THEN the command exits 0
Requirement: Generated catalog
The change MUST regenerate the committed catalog docs/KNOWLEDGE_BASE.md with uv run devops docs generate.
Scenario: The catalog holds the new page
- WHEN uv run devops docs generate runs on the change and git diff --exit-code docs/KNOWLEDGE_BASE.md runs after it
- THEN both commands exit 0 and docs/KNOWLEDGE_BASE.md holds a row for decision_models.md
Requirement: Situation levels in the score example
Each of the three copies of the ask-jev skill SHALL give score levels that describe a situation, not a degree.
Scenario: No copy holds a degree-only level
- WHEN uv run devops ci test tests/invariants/test_skills.py -k score_levels runs on the change
- THEN the command exits 0 and the run lists test_ask_jev_skill_score_levels_describe_situations as passed
Requirement: Identical skill copies
The three copies of the ask-jev skill MUST hold identical text.
Scenario: The skill copies agree
- WHEN uv run devops ci test tests/invariants/test_skills.py runs on the change
- THEN the command exits 0
Requirement: Skill link to the page
Each copy of the ask-jev skill SHALL hold a link to the decision-model page.
Scenario: Each skill copy holds the link
- WHEN uv run devops ci test tests/invariants/test_skills.py -k ask_jev_skill_links runs on the change
- THEN the command exits 0 and the run lists test_ask_jev_skill_links_decision_models_page as passed
Requirement: Documentation check
The documentation check MUST pass with the new page.
Scenario: The docs check passes
- WHEN uv run devops ci docs runs on the change
- THEN the command exits 0
Existing Tool Considered
The alternatives check of 2026-11-16 in the issue body returned not-applicable and named no tool. The change writes the page and the skill edits by hand. Written cost: about 0.2M tokens to write, keep and fix the page and the tests until the docs check and the other checks pass, and about 1.5 hours.
Key questions
- Where does the decision-model page live, and how does an agent reach it?: At src/devops_cli/ai/knowledge_base/devops_cli/libraries/decision_models.md. The knowledge base README adds a row to its devops_cli/libraries/ table. The pydantic_ai.md page links the new page. AGENTS.md sends an agent that learns a subsystem, a library or a tool to the knowledge base. [sources: AGENTS.md, src/devops_cli/ai/knowledge_base/README.md, src/devops_cli/ai/knowledge_base/devops_cli/libraries/pydantic_ai.md]
- Which rules does the page state, and does each rule keep its source?: Six sections, one for each rule group that the issue body names: question design, thresholds, window, option order, score levels and several questions. Each section quotes the rule and cites the URL that states it. The page links ADR 0019 and ADR 0020 and the record that docs(adr): one decision-model record supersedes ADR 0019 and ADR 0020 #5239 files. (best practice) [sources: .agents/skills/ask-jev/SKILL.md]
- Chosen: Six sections, each with the URL of its document. An agent can check a rule against its source. The criterion fails when a section has no source.
- Rejected: One prose page with no section sources. A rule with no source is a claim that no reader can check.
- Does the ask-jev skill already name the 32,000-byte limit and the 0.3/0.7 band?: Yes. The skill states that the command refuses an input larger than 32,000 UTF-8 bytes. The skill also states that a probability from 0.30 to 0.70 reports unsure. The change adds no second copy of these texts. It adds the page link and fixes the score example. [sources: .agents/skills/ask-jev/SKILL.md]
- Which score levels does the skill example use?: Situation levels: --level "The change touches one module and its tests" --level "The change touches several modules" --level "The change adds a new subsystem". The model gets the level descriptions and not the level names. A degree word gives it no condition to match. (best practice) [sources: .agents/skills/ask-jev/SKILL.md]
- Chosen: Situation levels. Both documents say that a level describes a situation. The model never receives the level name.
- Rejected: Degree levels such as Trivial, Normal and Hard. A degree gives the model no condition to match. The model does not see the level name.
- Which text of the skill does this item change, and does it collide with fix(ai): ask-jev refuses no context and reports unsure #5284?: The score example line and one link line, in each of the three copies. The --context text and the unsure text stay for fix(ai): ask-jev refuses no context and reports unsure #5284. The two changes touch no same line. [sources: .agents/skills/ask-jev/SKILL.md, .claude/skills/ask-jev/SKILL.md, .kilocode/skills/ask-jev/SKILL.md, tests/invariants/test_skills.py]
- Does the change update the knowledge base tests and the generated catalog?: Yes. tests/ai/test_kb.py asserts the count of knowledge base articles, so the new page updates that count. docs/KNOWLEDGE_BASE.md is generated from the knowledge base folder. The change regenerates it with uv run devops docs generate. [sources: tests/ai/test_kb.py, docs/KNOWLEDGE_BASE.md]
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 12, 2026
Both are docs(ai) about decision models for agents, but #4429 teaches when to use a decision model while this candidate writes how to design the question.devops-cli-service commentedon Nov 16, 2026
Alternatives check: not-applicable
Class: docs. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-16. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 17, 2026
Refine cannot set this item to Ready at 73743a2 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 27, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.