Repository navigation
Closed
Labels
Milestone
Description
Friction
test_no_stray_scripts_in_project_root fails on any root .py or .sh file and also asserts that scripts/ does not exist, so reviewed automation cannot live in a conventional place and lives inside the shipped package instead.
Evidence
tests/test_architectural_invariants.py:788-796asserts(stray_files, (REPO_ROOT / "scripts").exists()) == ([], False)..pre-commit-config.yaml:59runspython3 -P src/devops_cli/core/code_metrics.py, a package module executed as a script by a hook;commands/ci.py(2,255 lines) is the CI orchestrator inside the wheel.- AGENTS.md:83 names
<appDataDir>/brain/<conversation-id>/scratch/, a path of one vendor's agent.
Proposed remedy
- Apply pair A24; change the test to forbid root-level scratch patterns and drop the
scripts/assertion; committed scripts underscripts/carry PEP 723 metadata and pass the same Ruff and mypy gates.
What it deletes
- One assertion.
Tests
- The changed test; a negative control for a root
tmp_x.py.
Dependencies
- docs(agents): a convention yields to an open tool, and instructions with no check or with a contradiction are pruned
Acceptance criteria
scripts/may exist; a root scratch script still fails.
Size: S.
Proposed design
Problem statement
The current test test_no_stray_scripts_in_project_root prevents the use of reviewed PEP 723 scripts in the scripts/ directory and incorrectly bans root-level scratch patterns. This forces automation to be placed inside shipped packages instead of conventional locations, creating friction for developers.
Acceptance criteria
- Criterion 1: The
scripts/directory is allowed to exist and contain reviewed PEP 723 scripts.
Verification: A pull request adding a script with PEP 723 metadata to thescripts/directory passes the test. - Criterion 2: Root-level scratch patterns still fail the test as before.
Verification: A root.pyor.shfile named liketmp_x.pyfails the test.
Key questions
- What is the purpose of the current test assertion that forbids the existence of a 'scripts/' directory?: The assertion was added to enforce that no scripts are placed in the project root, but it also inadvertently blocks reviewed automation from living in a conventional place like
scripts/. [sources: tests/test_architectural_invariants.py:788] - What are the implications of allowing scripts under the 'scripts/' directory?: Allowing scripts under
scripts/enables reviewed automation to live in a conventional location, which aligns with PEP 723 standards and improves developer experience. [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md] - Does the proposed remedy align with existing architectural invariants?: Yes, the proposed remedy applies pair A24 which changes the test to forbid root-level scratch patterns and drop the
scripts/assertion, ensuring that reviewed automation can be placed underscripts/while maintaining the prohibition on stray scripts in the project root. [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 22, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
The candidate modifies a test and its associated assertions.The change affects test behavior and project structure, but is not critical to core functionality.Improves developer experience by allowing reviewed scripts in a conventional location.Only one assertion is removed and the test is adjusted accordingly.dan-petty commentedon Oct 22, 2026
Status set to Ready at ae8c2d9 (see proposed design in issue body).
test(layout): a scripts/ directory may exist and a scratch script in …
dan-petty commentedon Oct 22, 2026
What changed
#1887, merged into
release/v0.2.39as 3a27be9.4 file(s) changed.
How it was verified
Check runs at d1a6626:
Acceptance Criteria of
docs/agent/tasks/task-1872-reviewed-scripts-directory.md:scripts/directory with a helper in it is no stray script.test_a_reviewed_scripts_directory_is_no_stray_scriptchecks it. The old test failed on such a tree. The real-tree testtest_no_stray_scripts_in_project_rootpasses with ascripts/helper.pyin the worktree.test_a_scratch_script_in_the_project_root_is_straycheckstmp_x.py,scratch_x.py,debug_x.py,test_x.pyandx.sh. Atmp_x.pyin the real project root made the real-tree test fail with['tmp_x.py'] == [].AGENTS.mdrule claims only what a check enforces. It stays within the 40,000-character cap, andtests/test_agents_md_claims.pypasses.ruff check,ruff format --check,mypy --strict src,deptry srcanduv run devops docs checkpass.feat(release): v0.2.39 (#1947)