Skip to content

Commit 9096f74

Browse files
committed
add docs and agent files
1 parent cdfa023 commit 9096f74

4 files changed

Lines changed: 106 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,4 @@ pyvenv.cfg
8383
/.claude/settings.local.json
8484
develop/
8585
plans/
86+
.pi/subagents

CLAUDE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
@AGENTS.md
22

3+
## Agent skills
4+
5+
### Issue tracker
6+
7+
Issues are tracked in GitHub Issues for `plone/plonecli`. See `docs/agents/issue-tracker.md`.
8+
9+
### Domain docs
10+
11+
This repository uses a single-context domain documentation layout. See `docs/agents/domain.md`.
312

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 `/domain-modeling` skill (reached via `/grill-with-docs` and `/improve-codebase-architecture`) creates them lazily when terms or decisions actually get resolved.
12+
13+
## File structure
14+
15+
Single-context repo (most repos):
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 `/domain-modeling`).
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: 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.

0 commit comments

Comments
 (0)