Work in a real project · chapter 8 of 17

Tools, files, Git and project rules

Codex works in a concrete folder. Project files, Git status and local instructions define what applies where the agent actually performs the task.

8 of 17 chapters

8.1 · plain explanation

How does the agent find the right context and rule set in an arbitrary nested project?

Codex works in a concrete folder. Project files, Git status and local instructions define what applies where the agent actually performs the task.

Important: AGENTS.md, skills and subagent profiles are three different mechanisms: rules, reusable workflows and delegated roles.

8.2 · building blocks

Three concepts to keep separate

01

AGENTS.md

Codex builds an instruction chain from the project root down towards the working directory; closer rules have higher precedence.

02

Skills

Repository skills are discovered in .agents/skills from the working directory up to the project root.

03

Agent roles

Subagent profiles are separate roles. A folder containing rules does not automatically become a supervisor agent for subfolders.

8.3 · method

A practical workflow

  1. 1Confirm the working directory and project root.
  2. 2Read the active AGENTS.md chain and relevant skills.
  3. 3Check Git status before changing anything.
  4. 4Make one bounded diff and run the project's named tests.

8.4 · concrete example

platform/web

Scenario

platform/web

How does the agent find the right context and rule set in an arbitrary nested project?

Starting point

The root AGENTS.md applies to web, firmware and server. web/AGENTS.md adds rules only for web work.

Controlled result

A coordinator can delegate to three agent profiles, but that hierarchy comes from explicit orchestration, not merely from the folder structure.

8.5 · try it yourself

Exercise

Draw a project with root rules, one nested AGENTS.md, two skill folders and three agent roles. Mark which sources apply when the working directory is web/.

8.6 · checklist

Before you continue

  • Is the project root known?
  • Are active instructions identified in the correct order?
  • Are relevant skills selected for the task?
  • Is the diff bounded and the working tree understood?
Remember:AGENTS.md, skills and subagent profiles are three different mechanisms: rules, reusable workflows and delegated roles.

8.7 · sources

Sources

Reviewed 23 September 2026. Official sources support product-specific claims; the practical contract, memory and verification patterns are Finnandre project methods.