Skip to content

feat(ai): give every agent brain tools via MCP, CLI and skill (#4671) - #7744

Merged
dan-petty merged 3 commits into
mainfrom
feat/4671-give-every-agent-brain-tools-through
Nov 29, 2026
Merged

dan-petty merged 3 commits into
mainfrom
feat/4671-give-every-agent-brain-tools-through

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

The brain index of #4676 fills from the alternatives checks, and only its digest reads it. This change adds one brain service and gives it to every agent surface: the brain command group, a lazy brain MCP domain whose two read tools reach the planning, implementation and review roles and whose two write tools reach the ops role, and a project-brain skill in each agent root. An add or an update writes a pending proposal with its author, time, sources and scope. The accept step of the brain upkeep decides it and writes the reason to the brain events. A write refuses a secret, and each read falls back to the local tier and says so.

Closes #4671

Change: openspec/changes/archive/2026-11-29-4671-give-every-agent-brain-tools-through/

@devops-cli-service devops-cli-service Bot added type/docs Type docs: a change to the documents scope/spec labels Nov 29, 2026
@devops-cli-service
devops-cli-service Bot force-pushed the feat/4671-give-every-agent-brain-tools-through branch from 307a1ce to 308f1c1 Compare November 29, 2026 12:13
@devops-cli-service

Copy link
Copy Markdown
Contributor Author

The steps of the job:

Stopped at group 7. The stop report is on #4671: #4671 (comment).

  • tools: run_command 199, edit_file 63, read_file 42, write_file 10, grep 4, create_directory 3
  • Group 1 amendment (add_path): Task 1.2 keeps the last search result in a process cache in the new module src/devops_cli/roadmap/brain_service.py and adds the reset reset_local_searches, but the group changes no path that registers that reset. The floor of tests/conftest.py resets a module of src only when _PROCESS_STATE_RESETS names it, so the test-tree row of devops ci fails on the change. Task 1.2 must also say to add "devops_cli.roadmap.brain_service": ("reset_local_searches",) to _PROCESS_STATE_RESETS.. Evidence: uv run devops ci --check --only test-tree fails with src/devops_cli/roadmap/brain_service.py:56: container _LOCAL_SEARCHES is not reset from tests/gate/tree_checks/process_state.py. _PROCESS_STATE_RESETS starts at tests/conftest.py:79, and its rows are the pattern, for example tests/conftest.py:167 "devops_cli.valkey.tiered": ("reset_tiered_mappings",). git ls-files tests/conftest.py gives the tracked path.. tests/conftest.py
  • fail-to-pass of group 1: fails on the base commit. Tests that fail on the base commit: tests.roadmap.test_brain_index::test_held_entry_gives_the_reference_urls_and_the_uses, tests.roadmap.test_brain_index::test_held_entry_gives_no_entry_of_another_schema_and_none_while_the_store_is_down, tests.roadmap.test_brain_service::test_search_brain_ranks_the_tool_entry_before_the_reference_entry, tests.roadmap.test_brain_service::test_search_brain_ranks_a_verdict_match_after_a_tool_match, tests.roadmap.test_brain_service::test_search_brain_gives_the_cached_result_marked_local_when_the_store_does_not_answer, tests.roadmap.test_brain_service::test_search_brain_marks_the_brain_unavailable_with_no_tier_and_no_cached_result, tests.roadmap.test_brain_service::test_search_brain_gives_no_entry_for_a_text_that_no_entry_names, tests.roadmap.test_brain_service::test_read_brain_entry_gives_the_entry_of_an_id, tests.roadmap.test_brain_service::test_search_brain_keeps_the_entry_of_another_repository_out, tests.roadmap.test_brain_service::test_brain_index_for_gives_nothing_without_the_tier.
  • fail-to-pass of group 2: fails on the base commit. Tests that fail on the base commit: tests.roadmap.test_brain_proposals::test_accept_proposals_refuses_an_unsourced_proposal, tests.roadmap.test_brain_proposals::test_accept_proposals_accepts_a_sourced_proposal, tests.roadmap.test_brain_proposals::test_propose_entry_refuses_a_secret_and_writes_no_key, tests.roadmap.test_brain_proposals::test_propose_entry_stores_a_pending_proposal_with_its_author_sources_and_scope, tests.roadmap.test_brain_proposals::test_pending_proposals_gives_only_the_proposals_of_the_repository, tests.roadmap.test_brain_proposals::test_accept_proposals_decides_a_proposal_once, tests.roadmap.test_brain_proposals::test_a_store_that_does_not_answer_gives_no_proposal_and_no_decision.
  • fail-to-pass of group 3: fails on the base commit. Tests that fail on the base commit: tests.commands.test_brain_commands::test_brain_search_prints_ranked_entries_with_their_sources, tests.commands.test_brain_commands::test_brain_show_prints_one_entry_with_its_sources, tests.commands.test_brain_commands::test_brain_show_reports_an_entry_that_the_index_does_not_hold, tests.commands.test_brain_commands::test_brain_search_reports_the_local_fallback, tests.commands.test_brain_commands::test_brain_search_marks_the_brain_unavailable_with_no_cached_result, tests.commands.test_brain_commands::test_brain_search_keeps_the_entry_of_another_repository_out, tests.commands.test_brain_commands::test_brain_add_stores_a_pending_proposal, tests.commands.test_brain_commands::test_brain_update_stores_a_pending_proposal, tests.commands.test_brain_commands::test_brain_add_refuses_a_secret_and_writes_no_key, tests.commands.test_brain_commands::test_brain_add_dry_run_prints_the_request_and_writes_nothing.
  • fail-to-pass of group 4: fails on the base commit. Tests that fail on the base commit: tests.ai.mcp.test_mcp_domain_hydration::test_the_brain_domain_lists_four_tools_by_role, tests.ai.mcp.test_mcp_roles::test_two_connections_with_different_roles_see_different_tool_lists, tests.ai.mcp.test_mcp_roles::test_the_implementation_role_holds_no_security_lookup, tests.ai.mcp.test_mcp_roles::test_each_job_role_table_equals_the_registry_names.
  • verify of group 5: uv run devops ci test tests/ai/mcp/test_mcp_http.py tests/ai/mcp/test_mcp_tool_listing.py exits 0.
No coverage index found. Run `devops ci coverage --build-index` to build one.
  tests/ai/mcp/test_mcp_http.py \u2192 tests/ai/mcp/test_mcp_http.py
  tests/ai/mcp/test_mcp_tool_listing.py \u2192 tests/ai/mcp/test_mcp_tool_listing.py
================================================================================================================== test session starts ===================================================================================================================
platform linux -- Python 3.14.10, pytest-9.2.0, pluggy-1.7.0
rootdir: /run/roadmap/work/model-clone
configfile: pyproject.toml
plugins: xdist-3.8.0, cov-7.1.0, hypothesis-6.170.24, platformdirs-4.14.9, time-machine-3.6.0, mock-3.17.0, anyio-4.16.0, asyncio-1.5.0, syrupy-7.0.3, timeout-2.4.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
timeout: 600.0s
timeout method: signal
timeout func_only: False
collected 27 items

tests/ai/mcp/test_mcp_http.py ..........................                                                                                                                                                                                           [ 96%]
tests/ai/mcp/test_mcp_tool_listing.py .                                                                                                                                                                                                            [100%]

---------------------------------------------------------------------------------------------------------------- snapshot report summary -----------------------------------------------------------------------------------------------------------------
1 snapshot passed.
=================================================================================================================== 27 passed in 3.64s ===================================================================================================================
  • verify of group 6: uv run devops ci test tests/roadmap/test_roadmap_mcp.py exits 0.
\u2139 Quality gate root: /run/roadmap/work/model-clone
No coverage index found. Run `devops ci coverage --build-index` to build one.
  tests/roadmap/test_roadmap_mcp.py \u2192 tests/roadmap/test_roadmap_mcp.py
================================================================================================================== test session starts ===================================================================================================================
platform linux -- Python 3.14.10, pytest-9.2.0, pluggy-1.7.0
rootdir: /run/roadmap/work/model-clone
configfile: pyproject.toml
plugins: xdist-3.8.0, cov-7.1.0, hypothesis-6.170.24, platformdirs-4.14.9, time-machine-3.6.0, mock-3.17.0, anyio-4.16.0, asyncio-1.5.0, syrupy-7.0.3, timeout-2.4.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
timeout: 600.0s
timeout method: signal
timeout func_only: False
collected 19 items

tests/roadmap/test_roadmap_mcp.py ...................                                                                                                                                                                                              [100%]

=================================================================================================================== 19 passed in 4.10s ===================================================================================================================

@dan-petty
dan-petty force-pushed the feat/4671-give-every-agent-brain-tools-through branch from 308f1c1 to 044ba3f Compare November 29, 2026 14:54
@dan-petty dan-petty changed the title docs(spec): plan #4671 Give every agent tools for the project brain feat(ai): give every agent brain tools via MCP and CLI (#4671) Nov 29, 2026
@dan-petty
dan-petty force-pushed the feat/4671-give-every-agent-brain-tools-through branch 2 times, most recently from 19cc5f5 to 802517a Compare November 29, 2026 17:23
@dan-petty dan-petty changed the title feat(ai): give every agent brain tools via MCP and CLI (#4671) feat(ai): give every agent brain tools via MCP, CLI and skill (#4671) Nov 29, 2026
@dan-petty dan-petty added type/feature Type feature: a new function scope/ai AI review pipeline, personas, prompts, LLM client, or RAG and removed type/docs Type docs: a change to the documents scope/spec labels Nov 29, 2026
@dan-petty
dan-petty force-pushed the feat/4671-give-every-agent-brain-tools-through branch from 802517a to 51955a7 Compare November 29, 2026 17:33
@dan-petty
dan-petty marked this pull request as ready for review November 29, 2026 17:41
@dan-petty
dan-petty merged commit 111c9db into main Nov 29, 2026
29 checks passed
@dan-petty
dan-petty deleted the feat/4671-give-every-agent-brain-tools-through branch November 29, 2026 17:55
dan-petty-release Bot added a commit that referenced this pull request Nov 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.252.0](v0.251.2...v0.252.0)
(2026-11-29)


### Features

* **ai:** give every agent brain tools via MCP, CLI and skill
([#4671](#4671))
([#7744](#7744))
([111c9db](111c9db))


### Bug Fixes

* **ci:** run the Service image suite in a service-test stage
([#7786](#7786))
([840db11](840db11)),
closes [#6408](#6408)
* **docs:** resolve package paths when top-level github dir exists
([#7807](#7807))
([62ab9a3](62ab9a3))
* **repos:** use latest check run per name in onboard row 9
([#7799](#7799))
([d983574](d983574))


### Code Refactoring

* **ai:** knowledge base pages hold no locked version
([#7806](#7806))
([07018b5](07018b5)),
closes [#7232](#7232)

---
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/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ai): give every agent brain tools through MCP, CLI and skill

1 participant