diff --git a/AGENTS.md b/AGENTS.md index 4127203..c140018 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -39,8 +39,14 @@ if it's clean, push a fresh commit to force GitHub to recompute the merge ref. ## Agent skills -- **Issues and specs** — GitHub Issues on `modern-python/.github`, via `gh`: - [`docs/agents/issue-tracker.md`](docs/agents/issue-tracker.md) -- **Triage labels** — the five canonical roles: [`docs/agents/triage-labels.md`](docs/agents/triage-labels.md) -- **Domain docs** — single-context, `CONTEXT.md` + `docs/adr/`: - [`docs/agents/domain.md`](docs/agents/domain.md) +### Issue tracker + +GitHub issues on `modern-python/.github`, via `gh`. See `docs/agents/issue-tracker.md`. + +### Triage labels + +The five canonical roles, each label string equal to its name. See `docs/agents/triage-labels.md`. + +### Domain docs + +Single-context: `CONTEXT.md` and `docs/adr/` at the repo root. See `docs/agents/domain.md`. diff --git a/docs/agents/domain.md b/docs/agents/domain.md index 175da57..eaf2a5f 100644 --- a/docs/agents/domain.md +++ b/docs/agents/domain.md @@ -1,46 +1,38 @@ # Domain Docs -How the engineering skills should consume this repo's domain documentation when exploring the -codebase. This repo is **single-context**. +How the engineering skills should consume this repo's domain documentation when exploring the codebase. ## Before exploring, read these -- **`CONTEXT.md`** at the repo root: what this repo is, and the glossary. -- **`docs/adr/`**: read the decision records that touch the area you're about to work in. +- **`CONTEXT.md`** at the repo root. +- **`docs/adr/`**: read ADRs that touch the area you're about to work in. -If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest -creating them upfront. The `/domain-modeling` skill creates them lazily when terms or decisions -actually get resolved. +If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The `/domain-modeling` skill (reached via `/grill-with-docs` and `/improve-codebase-architecture`) creates them lazily when terms or decisions actually get resolved. ## File structure +Single-context repo: + ``` / ├── CONTEXT.md ├── docs/adr/ -│ ├── 0001-….md -│ └── 0002-….md -├── brand/ ← the brand kit and its generator -├── profile/ ← the org profile README -└── tests/ +│ ├── 0001-project-marks-single-gold-inner.md +│ └── 0002-discussions-is-the-only-owned-channel.md +└── brand/ ``` -There is no `CONTEXT-MAP.md` and no per-package `CONTEXT.md`: one repo, one context. There is also -no `architecture/` and no `planning/` — the present is the source, and what must stay true is a test -whose docstring opens `INVARIANT:`. - ## Use the glossary's vocabulary -When your output names a domain concept (in an issue title, a proposal, a hypothesis, a test name), -use the term as defined in `CONTEXT.md`. Don't drift to synonyms the glossary explicitly avoids: -write `mark` and not `logo`, `colourway` and not `colorway`, `inner symbol` and not `glyph`. +When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `CONTEXT.md`. Don't drift to synonyms the glossary explicitly avoids. -If the concept you need isn't in the glossary yet, that's a signal: either you're inventing language -the project doesn't use (reconsider) or there's a real gap (note it for `/domain-modeling`). +If the concept you need isn't in the glossary yet, that's a signal: either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/domain-modeling`). + +## Flag ADR conflicts -## Where a new fact goes +If your output contradicts an existing ADR, surface it explicitly rather than silently overriding: -Run the admission check in `AGENTS.md` before writing anything down. +> _Contradicts ADR-0001 (project marks single gold inner), but worth reopening because…_ ## Link style inside `docs/` @@ -52,10 +44,3 @@ working in both renderings: - **Never link from a file inside `docs/` to a path outside it.** It cannot resolve in both renderings: MkDocs ships the link verbatim, so it 404s on the site. Cite `brand/...`, `tests/...`, and root files as inline code, never as links. - -## Flag ADR conflicts - -If your output contradicts an existing decision record, surface it explicitly rather than silently -overriding: - -> _Contradicts ADR-NNNN (its title), but worth reopening because…_ diff --git a/docs/agents/issue-tracker.md b/docs/agents/issue-tracker.md index 675f133..b258aeb 100644 --- a/docs/agents/issue-tracker.md +++ b/docs/agents/issue-tracker.md @@ -20,12 +20,7 @@ Infer the repo from `git remote -v`; `gh` does this automatically when run insid When set to `yes`, PRs run through the same labels and states as issues, using the `gh pr` equivalents: - **Read a PR**: `gh pr view --comments` and `gh pr diff ` for the diff. -- **List external PRs for triage**: `gh pr list --json` has no `authorAssociation` field, so the association has to come from the REST API, where it is `author_association` (snake_case): - ``` - gh api "repos/{owner}/{repo}/pulls?state=open&per_page=100" \ - --jq '.[] | select(.author_association | IN("CONTRIBUTOR","FIRST_TIME_CONTRIBUTOR","NONE")) | {number, title, author: .user.login}' - ``` - That keeps only external authors; `OWNER`, `MEMBER` and `COLLABORATOR` are dropped. `gh api` substitutes `{owner}`/`{repo}` from the current clone. +- **List external PRs for triage**: `gh pr list --state open --json number,title,body,labels,author,authorAssociation,comments` then keep only `authorAssociation` of `CONTRIBUTOR`, `FIRST_TIME_CONTRIBUTOR`, or `NONE` (drop `OWNER`/`MEMBER`/`COLLABORATOR`). - **Comment / label / close**: `gh pr comment`, `gh pr edit --add-label`/`--remove-label`, `gh pr close`. GitHub shares one number space across issues and PRs, so a bare `#42` may be either: resolve with `gh pr view 42` and fall back to `gh issue view 42`.