diff --git a/AGENTS.md b/AGENTS.md index e5e79f6..3fd11be 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -32,8 +32,14 @@ description, and PyPI does not rewrite relative links, so a relative one 404s on ## Agent skills -- **Issues and specs** — GitHub Issues on `modern-python/modern-di-pytest`, 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/modern-di-pytest`, 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 0b9df28..71b79d1 100644 --- a/docs/agents/domain.md +++ b/docs/agents/domain.md @@ -1,64 +1,40 @@ # 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 package 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 -├── modern_di_pytest/ ← the whole implementation, one module -└── tests/ +│ └── 0001-expose-installs-into-modules-only.md +└── modern_di_pytest/ ``` -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 (an issue title, a refactor proposal, a hypothesis, a test -name), use the term as defined in `CONTEXT.md`, and honor its `_Avoid_:` lines — those synonyms are -rejected on purpose. Write `install` and not `inject` or `register`. +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. -This package is a thin adapter over `modern-di`, so most domain terms are that project's, not this -one's: `Container`, `Provider`, `Group`, `Scope`, `Resolution`, `Override`. Its `CONTEXT.md` is the -upstream authority; do not redefine a term here that `modern-di` already defines. +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 is in neither, 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. In short: derivable from -`modern_di_pytest/` → don't write it; enforceable → a named test with an `INVARIANT:` docstring; a -user needs it → `README.md`; a rejected alternative → an ADR under `docs/adr/`, with its revisit -trigger; real work you are not doing now → a GitHub issue. Nothing else gets written. +> _Contradicts ADR-0001 (expose installs into modules only), but worth reopening because…_ ## Link style inside `docs/` The files under `docs/` are read on GitHub, and CI runs an offline link check over every Markdown file in the repo. Between files inside `docs/`, use a plain relative `.md` link — from one ADR to another, that is `[ADR-NNNN](NNNN-slug.md)`. - -## 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…_ - -A decision's **Revisit trigger** names the concrete signal that should reopen it. If that signal has -fired, say so. 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`.