Skip to content

Add layer-awareness guidance to test-affected-find skill#1623

Merged
nathanjmcdougall merged 2 commits into
mainfrom
copilot/configure-agents-layer-awareness
Mar 28, 2026
Merged

Add layer-awareness guidance to test-affected-find skill#1623
nathanjmcdougall merged 2 commits into
mainfrom
copilot/configure-agents-layer-awareness

Conversation

Copilot AI commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Agents modifying low-level layers (e.g. _file) were not running tests for higher-level layers that depend on them, causing regressions like TestAddAuthor.test_append to slip through undetected.

Changes

  • usethis-python-test-affected-find skill (v1.0 → v1.1)
    • Added an explicit step to check .importlinter before identifying tests to run
    • Added "Use the layered architecture to scope test impact" section with the full layer stack from [importlinter:contract:usethis] and the rule: when modifying a layer, run tests for every layer above it too
    • Updated "File I/O and serialization changes" to reference the layer-scoping rule rather than vague "identify which tools" guidance

The layer hierarchy (lowest → highest):

_pipeweld → _types|errors|_fallback → _config → _subprocess|_console|_python
→ _file → _backend → _integrations → _config_file → _deps → _detect
→ _init → _tool → _core → _toolset → _ui → _test|__main__

Modifying _file (e.g. TOMLFileManager) requires running tests all the way up through _core, _ui, etc. — not just tests/usethis/_file/.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…uidance

Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/9e51f485-9335-42b3-91a8-d11390dd4db4

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix agent heuristics for lower-level layer modifications Add layer-awareness guidance to test-affected-find skill Mar 28, 2026
Copilot AI requested a review from nathanjmcdougall March 28, 2026 23:36
@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review March 28, 2026 23:47
@nathanjmcdougall nathanjmcdougall merged commit ced41b3 into main Mar 28, 2026
1 check passed
@nathanjmcdougall nathanjmcdougall deleted the copilot/configure-agents-layer-awareness branch March 28, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure agents to be aware that modifying lower-level layers can affect higher-level tests

2 participants