diff --git a/AGENTS.md b/AGENTS.md index 6fce394..5147c83 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,6 @@ -Before finishing your work, you must run the FULL verification suite below. +## Quality + +Check your work using the verification suite below. ```sh pnpm build # Build all packages (required before test/typecheck) @@ -7,10 +9,16 @@ pnpm run ci:biome # Format + lint check pnpm test # Run tests ``` -If issues arise, fix the issues and run the FULL verification suite again. Repeat this process until the ENTIRE suite passes. +## Agent skills -Use the following command to fix format and lint issues. +### Issue tracker -```sh - pnpm exec biome check --write # Format + lint fix -``` +Issues and specs are tracked in GitHub Issues. See `docs/agents/issue-tracker.md`. + +### Triage labels + +Triage uses the five default canonical labels. See `docs/agents/triage-labels.md`. + +### Domain docs + +Domain documentation uses the single-context layout. See `docs/agents/domain.md`. diff --git a/docs/agents/domain.md b/docs/agents/domain.md new file mode 100644 index 0000000..e58d4a6 --- /dev/null +++ b/docs/agents/domain.md @@ -0,0 +1,31 @@ +# Domain Docs + +This repository uses a single-context domain documentation layout. + +## Before exploring, read these + +- `CONTEXT.md` at the repository root. +- Relevant ADRs under `docs/adr/`. + +If these files don't exist, proceed silently. The `/domain-modeling` skill creates them when terms or decisions are resolved. + +## File structure + +```text +/ +├── CONTEXT.md +├── docs/adr/ +│ ├── 0001-example-decision.md +│ └── 0002-another-decision.md +└── packages/ +``` + +## Use the glossary's vocabulary + +When output names a domain concept, use the term defined in `CONTEXT.md`. Avoid synonyms that the glossary explicitly rejects. + +If a needed concept isn't in the glossary, reconsider whether the term belongs to the project or note the gap for `/domain-modeling`. + +## Flag ADR conflicts + +Explicitly identify any proposal that contradicts an existing ADR and explain why the decision may need to be reopened. diff --git a/docs/agents/issue-tracker.md b/docs/agents/issue-tracker.md new file mode 100644 index 0000000..1e866a4 --- /dev/null +++ b/docs/agents/issue-tracker.md @@ -0,0 +1,45 @@ +# Issue tracker: GitHub + +Issues and specs for this repo live as GitHub issues. Use the `gh` CLI for all operations. + +## Conventions + +- **Create an issue**: `gh issue create --title "..." --body "..."`. Use a heredoc for multi-line bodies. +- **Read an issue**: `gh issue view --comments`, filtering comments by `jq` and also fetching labels. +- **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. +- **Comment on an issue**: `gh issue comment --body "..."` +- **Apply / remove labels**: `gh issue edit --add-label "..."` / `--remove-label "..."` +- **Close**: `gh issue close --comment "..."` + +Infer the repo from `git remote -v`; `gh` does this automatically when run inside a clone. + +## Pull requests as a triage surface + +**PRs as a request surface: no.** _(Set to `yes` if this repo treats external PRs as feature requests; `/triage` reads this flag.)_ + +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 --state open --json number,title,body,labels,author,authorAssociation,comments` then keep only `authorAssociation` of `CONTRIBUTOR`, `FIRST_TIME_CONTRIBUTOR`, or `NONE`. +- **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 resolve a bare `#42` with `gh pr view 42` and fall back to `gh issue view 42`. + +## When a skill says "publish to the issue tracker" + +Create a GitHub issue. + +## When a skill says "fetch the relevant ticket" + +Run `gh issue view --comments`. + +## Wayfinding operations + +Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets. + +- **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body. `gh issue create --label wayfinder:map`. +- **Child ticket**: an issue linked to the map as a GitHub sub-issue. Where sub-issues aren't enabled, add the child to a task list in the map body and put `Part of #` at the top of the child body. Labels: `wayfinder:` (`research`/`prototype`/`grilling`/`task`). +- **Blocking**: GitHub's native issue dependencies. Where dependencies aren't available, use a `Blocked by: #, #` line at the top of the child body. +- **Frontier query**: list the map's open children, then drop assigned issues and issues with an open blocker. First in map order wins. +- **Claim**: `gh issue edit --add-assignee @me`. +- **Resolve**: comment with the answer, close the issue, then append a context pointer to the map's Decisions-so-far. diff --git a/docs/agents/triage-labels.md b/docs/agents/triage-labels.md new file mode 100644 index 0000000..351e255 --- /dev/null +++ b/docs/agents/triage-labels.md @@ -0,0 +1,13 @@ +# Triage Labels + +The skills use five canonical triage roles. This table maps those roles to this repository's GitHub labels. + +| Label in mattpocock/skills | Label in our tracker | Meaning | +| -------------------------- | -------------------- | ---------------------------------------- | +| `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue | +| `needs-info` | `needs-info` | Waiting on reporter for more information | +| `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent | +| `ready-for-human` | `ready-for-human` | Requires human implementation | +| `wontfix` | `wontfix` | Will not be actioned | + +When a skill mentions a canonical role, use the corresponding label from this table.