Skip to content

Commit 26dd25f

Browse files
committed
config: add agent skills setup
Record the per-repo settings the engineering skills read: - docs/agents/issue-tracker.md: GitHub issues via the gh CLI - docs/agents/triage-labels.md: five canonical triage roles - docs/agents/domain.md: single-context CONTEXT.md + docs/adr/ Reference them from a new "Agent skills" section in CLAUDE.md, and carve out docs/agents/ and docs/adr/ as exceptions to the AGENTS.md rule against a docs/ tree, since both are agent configuration rather than project documentation. Also ignore MemPalace per-project files (issue #185).
1 parent a429867 commit 26dd25f

6 files changed

Lines changed: 122 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,7 @@ sync-schema-observed-*.json
6565
# Local research sandbox + personal deck/xlsx fixtures
6666
experiments/
6767
test_data/
68+
69+
# MemPalace per-project files (issue #185)
70+
mempalace.yaml
71+
entities.json

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ Do not create a new `docs/` tree for ordinary project documentation. The active
8585
project docs are `README.md` and `CONTRIBUTING.md`; agent-specific docs are
8686
`AGENTS.md` and `CLAUDE.md`.
8787

88+
Two exceptions, both agent configuration rather than project documentation:
89+
`docs/agents/` holds the per-repo settings the engineering skills read (issue
90+
tracker, triage labels, domain-doc layout), and `docs/adr/` holds architecture
91+
decision records written by `/domain-modeling`. Neither replaces `README.md` or
92+
`CONTRIBUTING.md`, and ordinary project docs still must not move under `docs/`.
93+
8894
## Coding Rules
8995

9096
- Match existing style and module boundaries.

CLAUDE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,20 @@ Local Claude files are ignored:
1818
Do not duplicate architecture or command references here. If project behavior,
1919
developer workflow, or documentation policy changes, update `README.md`,
2020
`CONTRIBUTING.md`, and `AGENTS.md` as appropriate.
21+
22+
## Agent skills
23+
24+
### Issue tracker
25+
26+
Issues live in this repo's GitHub Issues (`AABur/kardscm`), accessed via the
27+
`gh` CLI. See `docs/agents/issue-tracker.md`.
28+
29+
### Triage labels
30+
31+
The five canonical triage roles, each label string equal to its role name. See
32+
`docs/agents/triage-labels.md`.
33+
34+
### Domain docs
35+
36+
Single-context: one `CONTEXT.md` plus `docs/adr/` at the repo root. See
37+
`docs/agents/domain.md`.

docs/agents/domain.md

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