Build an AGENTS.md Routing Map for Monorepo Codex Tests
Generates a path-scoped test execution matrix inside AGENTS.md that forces Codex to run checks only within touched sub-packages instead of the entire repo.
Skill prompt for ChatGPT
Prompt
Installs to .agents/skills/build-an-agents-md-routing-map-for-monorepo-codex-tests/
mkdir -p .agents/skills/build-an-agents-md-routing-map-for-monorepo-codex-tests && curl -sL "https://prompts-gpt.com/prompts/build-an-agents-md-routing-map-for-monorepo-codex-tests/raw" -o .agents/skills/build-an-agents-md-routing-map-for-monorepo-codex-tests/SKILL.mdAct as a build infrastructure engineer configuring autonomous coding agents. Your job is to create a path-scoped test execution section for an AGENTS.md file in a monorepo, ensuring Codex runs tests only in affected workspace packages.
Ask me these 3 numbered questions and wait for my reply before drafting:
1. What workspace manager or monorepo tool does the repository use (such as pnpm, Turborepo, Nx, or Cargo)?
2. What are the key package paths and their matching unit or integration test commands?
3. Are there root-level checks that must run only when shared config files change?
Rules:
- Output a pure Markdown section ready to paste directly into AGENTS.md.
- Format package rules into a clean Markdown table with three columns: Package Path, Target Trigger, and Required Test Command.
- Define clear path boundaries so the agent never runs full root test suites when editing a single sub-package.
- Explicitly state exact fallback behavior if a pull request or task edits multiple packages.
Output format:
### Workspace Routing Matrix (table)
### Execution Protocol for Codex (numbered steps with exact CLI commands)
### Safety Boundaries and Non-Goals (bullet list)Example output
Tips and common edits
Why this works
- Constrains Codex agent execution to modified folders, cutting test runtimes and preventing irrelevant test failures.
- The 3-question intake captures specific workspace structures without requiring pre-edited prompt placeholders.
- Provides explicit fallback and multi-package execution rules so the agent handles complex commits predictably.
Use this prompt in ChatGPT to draft targeted instructions for Codex CLI. Have your workspace package paths and exact package-level test scripts ready to paste.
Common edits
- Change the test commands to include typecheck or lint scripts alongside unit test invocations.
- Add a designated end-to-end test row for changes touching global API routing contracts.
Reuse it: Use in a workflowAdapt in the builder
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
More like this
Convert User Stories into Strict Acceptance Test Assertions
This prompt transforms vague business requirements into precise Given-When-Then test assertions with exact HTTP status codes and JSON payload structures for AI coding agents.
Generate a Precise AGENTS.md Routing Map for Codex
Create an AGENTS.md configuration that restricts Codex test execution to specific workspace directories, preventing inefficient repo-wide test runs.
Create a Deterministic Code Review System Prompt for Cursor
Generates a strict, rule-based system prompt for Cursor that rejects subjective nitpicks and only reports verified regressions and broken contracts.
Structure a Multi-Repo Dependency Update Brief for Coding Agents
Generates a structured execution brief for AI coding agents to update shared dependencies across repos without silent breaking changes.
Create Automated Verification Loops for Long-Running Coding Agents
Generate a deterministic shell pipeline that combines linting, isolated unit testing, and diff-budget monitoring to validate AI agent code changes.