Repository navigation
Description
Refreshed plan (2026-10-17, unblocking review)
This section supersedes any text below that conflicts with it.
Decisions
- Decision D15 (owner, 2026-10-17): "refactor(review): the review's single-owner tables move out of config/ into ai/review/ and review/ #1025 widens to cover src/devops_cli/review/, with no new sibling item."
- Decision D13 (owner, 2026-10-17): "refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151 goes in v0.2.38, with feat(review): feedback export counts each review subject once and keeps every human verdict #877 and feat(review): verified findings about merged code enter the roadmap through intake #883 following refactor(review): review session store that owns layout, fingerprints and verdicts #771 (done)." This schedules the blocker that keeps this item frozen.
ai/review/stages/is covered too. docs(agents): a matching table lives beside its one owner, and moves to config/ only when a second package imports it #1016 counts a package by its parent directory, so the one name in that directory is a baseline block of its own, and no sibling item takes it.- The work stays one PR, not one per package. The moves are mechanical,
--color-movedchecks them, and the total is well below refactor(ai): the model client, gateway, mcp and tool tables move out of config/ next to their owners #1027's 138 names. - The test importers are recounted at the PR base rather than kept as a fixed list, because refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151's PR 2 and PR 3 delete and move review tests.
Scope
- This item moves every name that docs(agents): a matching table lives beside its one owner, and moves to config/ only when a second package imports it #1016's baseline lists under
ai.review,ai.review.stagesandreview.src/devops_cli/review/was added in v0.2.28 (910b823), after the family was split at 38517a8, which is why no sibling item covers it. - Counted at 3dd7fa6 with the body's AST method, by parent package, there are 79 names in 18 modules (the body counted 68 in 15).
ai/review/has 52 (38 constants, 14 defaults) in 12 modules, led bypipeline.py(20),review_environment.py(10),chunker.py(7) andclassification.py(5).ai/review/stages/has 1 (DEFAULT_REVIEW_HEADLINE_THEMES,defaults.py:418).review/has 26 (20 constants, 6 defaults) in 5 modules:analysis.py(12),score.py(7),canary.py(6),suppression.py(1) andseverity.py(1). - About 20 of those names lose their readers or leave these blocks before this item lands. refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151's PR 2 deletes
classification.pyand the persona and convention code, for exampleCONST_PERSONA_REPLY_*(constants.py:3691-3693),CONST_REVIEW_CONVENTIONS_FILE(:486) andDEFAULT_REVIEW_RETRY_ATTEMPTS(defaults.py:83, read only atpipeline.py:1951,:3427and:3440, all in persona-stage code). Its PR 3 deleteschunker.pyand moves the routing predicateskips_persona_review(chunker.py:448, its table reads at:465-466) toreview/targets.py.CONST_REVIEW_ROUTED_PATH_PATTERNS(constants.py:3410) then joins thereviewblock.CONST_REVIEW_GENERATED_FILES(:896) leaves the set instead:ai/review/pipeline.pystill reads it for lockfiles (:538,:2204), so oncereview/targets.pyreads it too, it is a two-package name and stays inconfig/. - When two or more modules of one package read a name, it goes in that package's new
constants.py. Examples areCONST_VERIFIED_BY_HUMAN(constants.py:3352, read atadjudication.py:188andhistory.py:150), which goes toai/review/constants.py, andCONST_REVIEW_ANALYSIS_FILENAME(constants.py:4038, read atreview/analysis.py:36andreview/score.py:46), which goes toreview/constants.py. These replace the body's two examples, which refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151 deletes or moves.DEFAULT_REVIEW_CONCURRENCY(defaults.py:424) andDEFAULT_REVIEW_MAX_CONCURRENCY(:431) are not examples.pipeline.pyreads them only insideexecute_multi_persona_review(pipeline.py:3658, import at:3715-3718), which refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151's PR 2 deletes, so they go intopool.py. - Names that modules of two of these packages read stay in
config/. docs(agents): a matching table lives beside its one owner, and moves to config/ only when a second package imports it #1016's invariant 1 passes them, and its invariant 2 would fail them anywhere else. At 3dd7fa6 there are nine, for exampleCONST_SEVERITY_CRITICAL(constants.py:2795, read atreview/severity.py:14,ai/review/stages/reporting.py:17andai/review/pipeline.py:122),CONST_REVIEW_SARIF_FILENAME(:880) andCONST_REVIEW_CONFIG_FILE(:488, read atai/review/path_classes.py:19andreview/canary.py:38). The set changes with refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151:DEFAULT_GATEWAY_REVIEW_CONCURRENCY(defaults.py:430) is read byai/review/only in the same deleted persona-stage import (pipeline.py:3716,:3725), so after PR 2 onlyreview/analysis.py:45reads it and this item moves it there, whileCONST_REVIEW_GENERATED_FILESjoins the names that stay. - Names that only
ai/review_schema.pyreads are in theaiblock, which refactor(ai): the model client, gateway, mcp and tool tables move out of config/ next to their owners #1027 moves. pool.pysurvives refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151 becausereview/analysis.py:28importsReviewWorkerPool. Its names (defaults.py:424,:431-433) move intopool.py; they are not deleted.- The session file names (
constants.py:872,:875) stay inconfig/until refactor(review): review session store that owns layout, fingerprints and verdicts #771 makes them private to the session store.commands/review.py(:26-27) also reads both, andreview/score.py(:47) readsCONST_REVIEW_FINDINGS_FILENAME.
Delivery
- One PR (M), opened once refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151's PR 3, docs(agents): a matching table lives beside its one owner, and moves to config/ only when a second package imports it #1016 and refactor(config): the config barrel and the unused config names go, and the package inits stop re-exporting #776's step 1 have merged. It recounts the three blocks at its base, using the baseline file as the exact list. It then moves or deletes each name, repoints the importers and tests, and deletes the three blocks from the baseline. Closes refactor(review): the review's single-owner tables move out of config/ into ai/review/ and review/ #1025.
Acceptance criteria (these replace the matching criteria in the body; the others stand)
- Each name listed under
ai.review,ai.review.stagesandreviewintests/fixtures/config_placement_baseline.jsonis declared in the one module that reads it. When two or more modules of its package read it, it is declared in that package'sconstants.pyinstead (ai/review/constants.pyorreview/constants.py). Its name, value and comment are unchanged, and it is annotatedFinal.config/constants.pyandconfig/defaults.pyno longer declare it, and all three blocks are gone from the baseline. - Every importer imports the name from its new module, including every test file found by a recount at the PR base. At 3dd7fa6 there are 12:
tests/ai/review/test_cited_code.py,test_ai_review_pool.py,test_host_sandbox.py,test_k8s_llm_gateway.py,test_review_canary.py,test_review_group_analysis.py,test_review_path.py,test_review_path_classes.py,test_review_pipeline.py,test_review_prompt_consistency.py,test_review_reply_caps.pyandtest_review_runner.py. Nothing inconfig/re-exports a moved name. - Apart from the
Finalannotation added where a name lacked it,git diff --color-moved=zebrashows every declaration line of a moved name as moved.
Current references (verified at 3dd7fa6)
- The rule as it stands:
AGENTS.md:20still requires these tables to live inconfig/, and docs(agents): a matching table lives beside its one owner, and moves to config/ only when a second package imports it #1016 changes that. - The barrel refactor(config): the config barrel and the unused config names go, and the package inits stop re-exporting #776 deletes:
src/devops_cli/config/__init__.py:408(_SETTINGS_EXPORTS),:442(__getattr__) and:450(__all__), andtest_config_package_exports_resolveattests/test_public_export_surface.py:135. - Cycle check:
test_no_circular_imports_in_decoupled_subsystemsno longer exists. Its replacement isimport_cycle_violationsintest_the_source_tree_keeps_its_structural_invariants(tests/test_architectural_invariants.py:215,:232). The answer is still no new cycle: each moved name is read only inside its own package, and a package'sconstants.pyimports nothing from that package. tests/fixtures/config_placement_baseline.jsondoes not exist yet.ai/review/verification.pyandcommon_hallucinations.pyare gone (refactor(review): the model verifier, the hallucination catalog and the model-claim guards are deleted, and person-recorded verdicts become suppressions #1150), so the body's counts for them no longer apply.
Dependencies and order
- refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151 (P1, open, v0.2.38): PR 2 and PR 3 must merge first. PR 1 and PR 4 do not affect this item.
- docs(agents): a matching table lives beside its one owner, and moves to config/ only when a second package imports it #1016 (P3, open, v0.2.38) supplies the rule change, the baseline and both invariants.
- refactor(config): the config barrel and the unused config names go, and the package inits stop re-exporting #776 step 1 (P3, open, v0.2.38) deletes the barrel and the unused names first, so the move edits no
__all__. - docs(agents): a matching table lives beside its one owner, and moves to config/ only when a second package imports it #1016 and refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151's PR 2-3 can land in either order. Whichever lands second updates the baseline for the names refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151 deletes or moves.
- These order clauses in the body no longer apply: refactor(review): delete the legacy segment engine so the orchestrator is the only review engine #995 and refactor(review): one finding verifier owns the verdict and its side effects #996 closed in v0.2.34, fix(review): grep-only criteria neither verify nor invalidate a finding, and prompt examples stop teaching them #846, fix(review): criteria commands run in the reviewed project's environment with a measured python timeout #847, fix(review): the report ranks verified findings first, keeps only scanned advisories, and uses one category taxonomy and calibrated severity #948 and fix(review): the review learns only from a person's verdicts, and every reader of the feedback dataset is honest #950 in v0.2.25, and refactor(review): the model verifier, the hallucination catalog and the model-claim guards are deleted, and person-recorded verdicts become suppressions #1150 in v0.2.33.
- refactor(review): report rendering leaves the orchestrator #1008 (P3, open, blocked by refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151's PR 2, no milestone) can land before or after this item. Whichever lands second takes the tables along with the code it moves.
status/blockedstays until refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151's PR 3, docs(agents): a matching table lives beside its one owner, and moves to config/ only when a second package imports it #1016 and refactor(config): the config barrel and the unused config names go, and the package inits stop re-exporting #776's step 1 have merged, and then a person removes it. This item has no milestone. It can start only after those three have merged.
Problem
config/constants.py and config/defaults.py declare 68 names (42 constants, 26 defaults) that only modules in ai/review/ use. Counted at 38517a8 (the release/v0.2.25 tip) by AST, with the method described in #1016: from-imports and attribute reads count, and re-exports do not. The counts are approximate (an independent count differs by up to about ten per item, mostly in how function-local imports and names that only build another config/ name are attributed); the baseline is the exact list.
- 15 review modules read them:
verification.py20,pipeline.py16,runner.py8,review_environment.py6,chunker.py6,classification.py5, andadjudication.py,common_hallucinations.pyandpool.py4 each. - Nine are read by two or more review modules. For example,
CONST_REVIEW_CONVENTIONS_FILE(constants.py:286) is read bydefects.py,review_environment.pyandrunner.py, andCONST_REVIEW_GENERATED_FILES(:582) bychunker.py,pipeline.pyandrunner.py. - Eight test files import them from
config/:test_ai_review_pool.py,test_data_dir_worktrees.py,test_review_path.py,test_review_pipeline.py,test_review_prompt_consistency.py,test_review_reply_caps.py,test_review_runner.pyandtest_structural_positional_oracles.py. - The session file names (
CONST_REVIEW_FINDINGS_FILENAME,CONST_REVIEW_CANDIDATES_FILENAME) are not in this set.commands/review.pyalso reads them, so they stay inconfig/until refactor(review): review session store that owns layout, fingerprints and verdicts #771 makes them private to the session store.
The placement rule (#1016) puts each of these names next to the code that reads it. That item's baseline lists them under ai.review, and its invariant fails once a listed name is moved and its entry is left behind, so this PR deletes those blocks.
Acceptance criteria
- Each name listed under
ai.reviewintests/fixtures/config_placement_baseline.jsonis declared in the one module that reads it, or in its package'sconstants.pywhen two or more modules of the package read it. Its name, value and comment are unchanged, and it is annotatedFinal.config/constants.pyandconfig/defaults.pyno longer declare it, and its block is gone from the baseline. - Every importer imports the name from its new module, including the test files named above. Nothing in
config/re-exports it. - A name that only code deleted by an earlier item read is deleted, not moved.
- The two invariant tests from docs(agents): a matching table lives beside its one owner, and moves to config/ only when a second package imports it #1016 pass.
- Apart from the
Finalannotation added where a name lacked it, the PR only moves code:git diff --color-moved=zebrashows every other declaration line as moved. The diff touches onlyconfig/constants.py,config/defaults.py, the baseline,ai/review/and the tests that import the moved names. -
uv run devops cipasses.
Key questions
- Does a name go into the module that reads it, or into the package's
constants.py? (proposed) Into the module, when one module reads it. Into the package'sconstants.pywhen two or more do, as the rule says. That applies to nine names here, for exampleCONST_REVIEW_CONVENTIONS_FILEandCONST_REVIEW_GENERATED_FILES. - When does it land? (proposed) After refactor(review): delete the legacy segment engine so the orchestrator is the only review engine #995, which deletes the legacy engine in
runner.py, so names only that engine reads are deleted, not moved. Also after the v0.2.25 items that editverification.pyandpipeline.py(fix(review): grep-only criteria neither verify nor invalidate a finding, and prompt examples stop teaching them #846, fix(review): criteria commands run in the reviewed project's environment with a measured python timeout #847, fix(review): the report ranks verified findings first, keeps only scanned advisories, and uses one category taxonomy and calibrated severity #948, fix(review): the review learns only from a person's verdicts, and every reader of the feedback dataset is honest #950). - Can the move add an import cycle? (proposed) No. A moved table imports nothing new, and a package's
constants.pyimports nothing from its package.test_no_circular_imports_in_decoupled_subsystems(tests/test_architectural_invariants.py:308) is the check.
Depends on: #1016, #776 (the config/__init__.py re-exports go first, so a move does not edit them).
Order: after #995 when both are scheduled. It does not conflict with #996 or #1008, which take the moved tables with the code they move.
Related: #995, #996, #1008, #771, #776.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsReady
Activity
dan-petty commentedon Oct 3, 2026
Frozen by the evidence-first review redesign (#1137, owner direction of 2026-10-03): patches to the model generator and verifier stop, and tool-layer fixes continue. This item stays in the #1016 family (one PR per package, blocked by #1016 and #776) and is not closed: it moves only the review tables that survive #1150 and #1151. Labelled
status/blockeduntil both land, so no table is moved just before it is deleted.[-]refactor(review): the review's single-owner tables move out of config/ into ai/review/[/-][+]refactor(review): the review's single-owner tables move out of config/ into ai/review/ and review/[/+]docs(contributing): a matching table lives beside its one owner (#2492)
dan-petty commentedon Oct 28, 2026
Closed as not planned. The item conflicts with a more recent project direction. No code was written.
This item is a bulk move of single-owner tables out of
config/. Its acceptance criteria use the placement baseline and the invariant tests that #1016 planned.The owner decision of 2026-10-22 on #1016 replaced that plan:
core/config_placement.py, the baseline filetests/fixtures/config_placement_baseline.jsonand the two invariants are not built.#2492 (merged 2026-10-28) put the rule in
CONTRIBUTING.md: "When you change the owner of a table inconfig/that only one package reads, move the table to its owner in the same pull request."On origin/main (2026-10-28) the baseline file,
core/config_placement.pyand the placement tests do not exist, so the criteria of this item that use them cannot be met. A bulk move also conflicts with each open pull request that changesconfig/constants.pyorconfig/defaults.py. #1026, the sibling item, is closed with the same evidence.A table in
config/that only one package reads now moves to its owner in the pull request that next changes that owner.