Skip to content

Commit 25fe7d9

Browse files
committed
docs: record the issue tracker, triage labels and domain doc layout for agents
Scaffolds the per-repo configuration the engineering skills read, which this repo never had, and records it in `AGENTS.md`. `docs/agents/issue-tracker.md` and `docs/agents/triage-labels.md` are the setup skill's seed templates verbatim: GitHub issues via `gh`, and the five canonical triage roles with each label string equal to its name. Those four labels did not exist on this repo and have now been created, so `/triage` applies them instead of failing. `docs/agents/domain.md` is the same template with the single-context branch resolved and the tree naming this repo's own files. The `## Agent skills` block in `AGENTS.md` is the shape the setup skill writes: one `###` sub-block per artifact, each a one-line summary and a pointer.
1 parent f588c02 commit 25fe7d9

4 files changed

Lines changed: 107 additions & 0 deletions

File tree

‎AGENTS.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,17 @@ Endpoints inject repositories with `FromDI(Repository)` from `modern_di_fastapi`
7272
- Routes convert ORM objects to schemas explicitly, never via `typing.cast`. Single objects: `schemas.X.model_validate(instance)`. Collections: `schemas.Xs.from_models(objects)` (the `Collection[T]` seam in `app/schemas.py`). Both rely on `from_attributes=True`.
7373
- Deck responses are deliberately two-shaped: `list_decks`/`create_deck`/`update_deck` return the light `schemas.Deck` (no `cards`), while `get_deck` returns `schemas.DeckWithCards`. The split mirrors loading — lists/writes use `noload` (no cards query), detail uses `selectinload` via `fetch_with_cards` — so the type states exactly what each endpoint loads.
7474
- Line length is 120.
75+
76+
## Agent skills
77+
78+
### Issue tracker
79+
80+
GitHub issues on `modern-python/fastapi-sqlalchemy-template`, via `gh`. See `docs/agents/issue-tracker.md`.
81+
82+
### Triage labels
83+
84+
The five canonical roles, each label string equal to its name. See `docs/agents/triage-labels.md`.
85+
86+
### Domain docs
87+
88+
Single-context: `CONTEXT.md` and `docs/adr/` at the repo root. See `docs/agents/domain.md`.

‎docs/agents/domain.md‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Domain Docs
2+
3+
How the engineering skills should consume this repo's domain documentation when exploring the codebase.
4+
5+
## Before exploring, read these
6+
7+
- **`CONTEXT.md`** at the repo root.
8+
- **`docs/adr/`**: read ADRs that touch the area you're about to work in.
9+
10+
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.
11+
12+
## File structure
13+
14+
Single-context repo:
15+
16+
```
17+
/
18+
├── CONTEXT.md
19+
├── docs/adr/
20+
└── app/
21+
```
22+
23+
## Use the glossary's vocabulary
24+
25+
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.
26+
27+
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`).
28+
29+
## Flag ADR conflicts
30+
31+
If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
32+
33+
> _Contradicts ADR-0007 (event-sourced orders), but worth reopening because…_

‎docs/agents/issue-tracker.md‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Issue tracker: GitHub
2+
3+
Issues and specs for this repo live as GitHub issues. Use the `gh` CLI for all operations.
4+
5+
## Conventions
6+
7+
- **Create an issue**: `gh issue create --title "..." --body "..."`. Use a heredoc for multi-line bodies.
8+
- **Read an issue**: `gh issue view <number> --comments`, filtering comments by `jq` and also fetching labels.
9+
- **List issues**: `gh issue list --state open --json number,title,body,labels,comments --jq '[.[] | {number, title, body, labels: [.labels[].name], comments: [.comments[].body]}]'` with appropriate `--label` and `--state` filters.
10+
- **Comment on an issue**: `gh issue comment <number> --body "..."`
11+
- **Apply / remove labels**: `gh issue edit <number> --add-label "..."` / `--remove-label "..."`
12+
- **Close**: `gh issue close <number> --comment "..."`
13+
14+
Infer the repo from `git remote -v`; `gh` does this automatically when run inside a clone.
15+
16+
## Pull requests as a triage surface
17+
18+
**PRs as a request surface: no.** _(Set to `yes` if this repo treats external PRs as feature requests; `/triage` reads this flag.)_
19+
20+
When set to `yes`, PRs run through the same labels and states as issues, using the `gh pr` equivalents:
21+
22+
- **Read a PR**: `gh pr view <number> --comments` and `gh pr diff <number>` for the diff.
23+
- **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`).
24+
- **Comment / label / close**: `gh pr comment`, `gh pr edit --add-label`/`--remove-label`, `gh pr close`.
25+
26+
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`.
27+
28+
## When a skill says "publish to the issue tracker"
29+
30+
Create a GitHub issue.
31+
32+
## When a skill says "fetch the relevant ticket"
33+
34+
Run `gh issue view <number> --comments`.
35+
36+
## Wayfinding operations
37+
38+
Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets.
39+
40+
- **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body. `gh issue create --label wayfinder:map`.
41+
- **Child ticket**: an issue linked to the map as a GitHub sub-issue (`gh api` on the sub-issues endpoint). Where sub-issues aren't enabled, add the child to a task list in the map body and put `Part of #<map>` at the top of the child body. Labels: `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev.
42+
- **Blocking**: GitHub's **native issue dependencies**, the canonical, UI-visible representation. Add an edge with `gh api --method POST repos/<owner>/<repo>/issues/<child>/dependencies/blocked_by -F issue_id=<blocker-db-id>`, where `<blocker-db-id>` is the blocker's numeric **database id** (`gh api repos/<owner>/<repo>/issues/<n> --jq .id`, _not_ the `#number` or `node_id`). GitHub reports `issue_dependencies_summary.blocked_by` (open blockers only, the live gate). Where dependencies aren't available, fall back to a `Blocked by: #<n>, #<n>` line at the top of the child body. A ticket is unblocked when every blocker is closed.
43+
- **Frontier query**: list the map's open children (`gh issue list --state open`, scoped to the map's sub-issues / task list), drop any with an open blocker (`issue_dependencies_summary.blocked_by > 0`, or an open issue in the `Blocked by` line) or an assignee; first in map order wins.
44+
- **Claim**: `gh issue edit <n> --add-assignee @me`, the session's first write.
45+
- **Resolve**: `gh issue comment <n> --body "<answer>"`, then `gh issue close <n>`, then append a context pointer (gist + link) to the map's Decisions-so-far.

‎docs/agents/triage-labels.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Triage Labels
2+
3+
The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.
4+
5+
| Label in mattpocock/skills | Label in our tracker | Meaning |
6+
| -------------------------- | -------------------- | ---------------------------------------- |
7+
| `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |
8+
| `needs-info` | `needs-info` | Waiting on reporter for more information |
9+
| `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |
10+
| `ready-for-human` | `ready-for-human` | Requires human implementation |
11+
| `wontfix` | `wontfix` | Will not be actioned |
12+
13+
When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.
14+
15+
Edit the right-hand column to match whatever vocabulary you actually use.

0 commit comments

Comments
 (0)