Skip to content

fix(ai): devops ai agents detects the project manifest - #4790

Merged
dan-petty merged 2 commits into
mainfrom
fix/4641-devops-ai-agents-detects-the-project
Nov 11, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/4641-devops-ai-agents-detects-the-project

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

devops ai agents names a toolchain only for a manifest that exists in the project (pyproject.toml, Cargo.toml, package.json or go.mod). It names a check to run before a push only for a pre-push hook of the project. A folder with no manifest and no hook gets no toolchain line and no check line. The fail-to-pass sentence renders only for a Python project, and the OpenSpec sentence only when openspec/config.yaml exists. The model path sends the AGENTS.md task as its own system prompt with these facts, and no review persona. A test compares the rule titles of the template with those of AGENTS.md, less the rules that only devops-cli has.

Why: a folder with only Cargo.toml got "It runs on Python >=3.14" and uv run checks that it cannot run. Onboarding writes AGENTS.md with this tool for the other repositories.

Closes #4641

Change: openspec/changes/archive/2026-11-11-4641-devops-ai-agents-detects-the-project/

devops ai agents names a toolchain only for a manifest that exists in
the project (pyproject.toml, Cargo.toml, package.json or go.mod), and
a check to run before a push only for a pre-push hook of the project.
A folder with no manifest and no hook gets no toolchain line and no
check line. The fail-to-pass sentence renders only for a Python
project, and the OpenSpec sentence only when openspec/config.yaml
exists. The model path sends the AGENTS.md task as its own system
prompt with these facts, and no review persona. A test compares the
rule titles of the template with those of AGENTS.md, less the rules
that only devops-cli has.

Why: a folder with only Cargo.toml got "It runs on Python >=3.14" and
uv run pytest, ruff and mypy checks that it cannot run. Onboarding
writes AGENTS.md with this tool for the other repositories.
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/ai AI review pipeline, personas, prompts, LLM client, or RAG labels Nov 11, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

fail-to-pass (uv run devops ci fail-to-pass --base origin/main, exit 0): 11 failed on base, 95 passed, 0 errored, in tests/ci/test_fail_to_pass.py, tests/commands/test_instruction_generator.py and tests/invariants/test_agents_md.py. The tests that fail on base:

  • test_a_cargo_only_folder_gets_the_rust_toolchain_and_no_python_tool
  • test_a_folder_with_no_manifest_and_no_hooks_gets_no_toolchain_or_check_line
  • test_a_project_with_several_manifests_names_each_toolchain
  • test_devops_cli_renders_the_check_line_of_its_pre_push_hooks
  • test_the_openspec_text_renders_only_where_openspec_is_set_up
  • test_ai_agents_gives_the_model_its_own_prompt_with_the_detected_facts
  • test_generated_agents_md_names_the_pre_push_checks_of_the_project
  • test_generated_agents_md_is_a_router
  • test_parse_project_metadata_with_pyproject, test_parse_project_metadata_fallback_when_no_pyproject
  • test_the_template_holds_each_rule_of_agents_md_that_is_not_only_for_devops_cli

test_a_rule_title_added_only_to_agents_md_is_reported passes on base: it tests the rule-title helper of the test file, which the replay overlays.

Reproduction. devops ai agents --repo <folder> --template --file AGENTS.md for a folder that holds only Cargo.toml:

  • base (c9513687): "It runs on Python >=3.14." and "Run the checks before each push: uv run pytest, uv run ruff check, uv run mypy src."
  • branch: "It uses Rust." The file holds no "Python", "uv", "pytest", "ruff" or "mypy", and no check line.

Local checks. uv run devops ci --check --only openspec,docs,lint,format passed. mypy on the 4 changed source files: no issues. The full typecheck gate waited for the shared CI slot, so CI runs it.

Live steps. None. The change touches no cluster, ConfigMap or Secret.

@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 19:58
@dan-petty
dan-petty merged commit e8d1e53 into main Nov 11, 2026
32 checks passed
@dan-petty
dan-petty deleted the fix/4641-devops-ai-agents-detects-the-project branch November 11, 2026 19:59
dan-petty pushed a commit that referenced this pull request Nov 11, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.114.0](v0.113.0...v0.114.0)
(2026-11-11)


### Features

* **k8s:** add cert-manager and the Barman Cloud plugin
([#4789](#4789))
([cd6fb76](cd6fb76))
* **roadmap:** collect the git facts of a project review window
([#4794](#4794))
([21d1bc0](21d1bc0))
* **roadmap:** consolidate has a read-only MCP mirror
([#4807](#4807))
([2ec561d](2ec561d))


### Bug Fixes

* **ai:** devops ai agents detects the project manifest
([#4790](#4790))
([e8d1e53](e8d1e53))
* **mcp:** bound the gh resources longer than a GitHub read
([#4844](#4844))
([7f09921](7f09921))
* **roadmap:** run stage before refine on the model lane
([#4841](#4841))
([96c9bee](96c9bee))
* **roadmap:** stop refusing test paths in base docstrings
([#4826](#4826))
([1bbfce0](1bbfce0))
* **telemetry:** key the project gauges by repository
([#4804](#4804))
([9f0e0c8](9f0e0c8))


### Performance Improvements

* **ci:** run the in-image suite nightly and on image pull requests
([#4828](#4828))
([a2cfd9a](a2cfd9a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/ai AI review pipeline, personas, prompts, LLM client, or RAG type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ai): devops ai agents detects the project manifest

1 participant