Skip to content

Commit 8705127

Browse files
committed
Add agent skills configuration
Scaffold AGENTS.md, CLAUDE.md, and docs/agents/ so AI agent skills (triage, to-issues, diagnose, tdd, etc.) know where issues live, which triage labels to apply, and how to read domain docs in this repo. - AGENTS.md: top-level agent instructions with the Agent skills block - CLAUDE.md: re-exports AGENTS.md via @AGENTS.md syntax - docs/agents/issue-tracker.md: GitHub conventions (gh CLI) - docs/agents/triage-labels.md: canonical triage label mapping - docs/agents/domain.md: single-context CONTEXT.md / docs/adr layout
1 parent dfaa0ad commit 8705127

5 files changed

Lines changed: 112 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# AGENTS.md
2+
3+
Agent instructions for the wp-super-cache repository.
4+
5+
## Agent skills
6+
7+
### Issue tracker
8+
9+
Issues live on GitHub at `Automattic/wp-super-cache` and are managed with the `gh` CLI. See `docs/agents/issue-tracker.md`.
10+
11+
### Triage labels
12+
13+
Five canonical triage labels (`needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`) plus categories `bug` and `enhancement`. See `docs/agents/triage-labels.md`.
14+
15+
### Domain docs
16+
17+
Single-context layout — one `CONTEXT.md` and `docs/adr/` at the repo root. See `docs/agents/domain.md`.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@AGENTS.md

docs/agents/domain.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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, or
8+
- **`CONTEXT-MAP.md`** at the repo root if it exists — it points at one `CONTEXT.md` per context. Read each one relevant to the topic.
9+
- **`docs/adr/`** — read ADRs that touch the area you're about to work in. In multi-context repos, also check `src/<context>/docs/adr/` for context-scoped decisions.
10+
11+
If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The producer skill (`/grill-with-docs`) creates them lazily when terms or decisions actually get resolved.
12+
13+
## File structure
14+
15+
Single-context repo (this repo):
16+
17+
```
18+
/
19+
├── CONTEXT.md
20+
├── docs/adr/
21+
│ ├── 0001-event-sourced-orders.md
22+
│ └── 0002-postgres-for-write-model.md
23+
└── src/
24+
```
25+
26+
Multi-context repo (presence of `CONTEXT-MAP.md` at the root):
27+
28+
```
29+
/
30+
├── CONTEXT-MAP.md
31+
├── docs/adr/ ← system-wide decisions
32+
└── src/
33+
├── ordering/
34+
│ ├── CONTEXT.md
35+
│ └── docs/adr/ ← context-specific decisions
36+
└── billing/
37+
├── CONTEXT.md
38+
└── docs/adr/
39+
```
40+
41+
## Use the glossary's vocabulary
42+
43+
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.
44+
45+
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 `/grill-with-docs`).
46+
47+
## Flag ADR conflicts
48+
49+
If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
50+
51+
> _Contradicts ADR-0007 (event-sourced orders) — but worth reopening because…_

docs/agents/issue-tracker.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Issue tracker: GitHub
2+
3+
Issues and PRDs for this repo live as GitHub issues at `Automattic/wp-super-cache`. 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+
## When a skill says "publish to the issue tracker"
17+
18+
Create a GitHub issue.
19+
20+
## When a skill says "fetch the relevant ticket"
21+
22+
Run `gh issue view <number> --comments`.

docs/agents/triage-labels.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
| Canonical role | 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+
Category labels (applied alongside one state label): `bug`, `enhancement`.
14+
15+
When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.
16+
17+
## Repo-specific notes
18+
19+
- `wontfix`, `bug`, `enhancement` already exist in the repo.
20+
- `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human` were created during setup.
21+
- The repo has other historical labels (`Needs Review`, `reporter feedback`, `PRIORITY`, `[Status] In Progress`, etc.) that are **not** part of the triage state machine. Leave them alone unless asked.

0 commit comments

Comments
 (0)