affected-scopelisted
Install: claude install-skill g-bastianelli/nuthouse
# moon-moth — affected scope contract
The **scope map** is the structured artifact the `affected-scout` agent returns
and the `scope` / `implement` / `verify` skills consume. It is the moon-moth's
field of light: the exact set of projects the moth will land on, and nothing
else. Everything outside it is "the dark" — deliberately not scanned.
Skills and agents MUST exchange this shape (JSON). Marker `_dark_` means "no
affected projects found — the working tree is clean or untracked".
## Schema
```json
{
"moonRoot": "/abs/path/to/workspace",
"base": "working-tree | default-branch | <sha>..<sha>",
"changedFiles": ["apps/atlas/api/src/foo.ts", "libs/types/src/bar.ts"],
"affected": [
{
"id": "atlas-api",
"source": "apps/atlas/api",
"layer": "application",
"stack": "backend",
"tags": ["buildable-image"],
"tasks": ["typecheck", "lint", "test"],
"reason": "changed | upstream-of-changed | downstream-of-changed"
}
],
"downstream": ["atlas-app"],
"summary": "2 changed files → 1 changed project, 1 downstream dependent"
}
```
## Field rules
- `affected[].id` / `source` / `layer` / `stack` / `tags` / `tasks` come
straight from `moon query affected` / `moon query projects` JSON — never
invented.
- `affected[].reason` distinguishes a directly-changed project from one pulled
in by `--upstream`/`--downstream`. The scout records why each project is in
scope so the implementer/verifier can reason about blast radius.
-