Which project a file belongs to
How a repository's sparrow.json tells an agent which project to file work in.
A repository whose work Sparrow tracks keeps a sparrow.json at its root, mapping each
project's key to the globs of the files it covers (law
sparrow-json-maps-paths-to-projects). Its schema is versioned, and defined in
service-sparrow/docs/SPARROW_JSON.md:
{
"schemaVersion": "2.2.0",
"projects": {
"SPR": { "paths": ["service-sparrow/**", ".github/workflows/sparrow-*.yml"] }
}
}
Before filing a task for some work, an agent calls project_for_path with the work's path.
When no project's globs match the path, such as a root file, or the work spans several
projects, the agent files it in sparrow.json's defaultProject (ANISO in this monorepo).
When there is no default, or two projects' globs both match the path, the agent asks you which
project to use. targetBranch (optional) names the branch pull requests target; when it's
unset, agents use the repository's default branch.