Skip to content

Commit 8ca64c4

Browse files
authored
feat: add configurable project manager skill (#22)
1 parent 34333c9 commit 8ca64c4

File tree

7 files changed

+424
-1
lines changed

7 files changed

+424
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"repo": "pwrdrvr/ghcrawl",
3+
"projectOwner": "pwrdrvr",
4+
"projectNumber": 9,
5+
"projectUrl": "https://github.com/orgs/pwrdrvr/projects/9",
6+
"trackerPath": ".local/work-items.yaml",
7+
"issueDraftDir": ".local/issue-drafts",
8+
"localIdPrefix": "ghc-"
9+
}
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
---
2+
name: project-manager
3+
description: "Manage GitHub issues and the GitHub Project board for the current repository, while keeping the local tracker in sync. Use when the user wants to capture freeform requirements as issues, flesh out issue descriptions from repo or upstream research, triage Priority/Size/Workflow/Status, add issues or PRs to the repo's configured project board, or reconcile GitHub state with `.local/work-items.yaml`."
4+
---
5+
6+
# Project Manager
7+
8+
Use this skill for repo-local project management.
9+
10+
## Automation Preference
11+
12+
- Prefer Node scripts for repo-local automation.
13+
- If a script needs dependencies, add them as repo `devDependencies` and invoke them through `pnpm` or `node`.
14+
- Avoid Python for repo-local skill automation unless a Python-native library is clearly worth the extra runtime dependency.
15+
16+
## Canonical Locations
17+
18+
- Treat GitHub Issues and PRs as the public source of truth.
19+
- Treat `.local/work-items.yaml` as a derived repo-local cross-reference map that can be regenerated from the project board.
20+
- Put temporary issue writeups only in `.local/issue-drafts/`.
21+
- Do not create parallel scratch directories or alternate tracker files for the same purpose.
22+
- Read repo-specific values from `.agents/project-manager.config.json` before taking action.
23+
24+
Expected config shape:
25+
26+
```json
27+
{
28+
"repo": "owner/repo",
29+
"projectOwner": "owner",
30+
"projectNumber": 7,
31+
"projectUrl": "https://github.com/orgs/owner/projects/7",
32+
"trackerPath": ".local/work-items.yaml",
33+
"issueDraftDir": ".local/issue-drafts",
34+
"localIdPrefix": "item-"
35+
}
36+
```
37+
38+
Refresh the derived tracker with:
39+
40+
```bash
41+
pnpm project:sync
42+
```
43+
44+
## Workflow
45+
46+
1. Explore before filing.
47+
48+
- Read local code, tests, docs, and upstream references before creating or expanding an issue.
49+
- Prefer issue bodies with concrete findings, source pointers, and proposed scope over vague placeholders.
50+
51+
2. Draft locally when the issue is non-trivial.
52+
53+
- Write or refresh the issue body in `.local/issue-drafts/<nn>-<slug>.md`.
54+
- Reuse that file for edits; do not fork the same issue into multiple local scratch notes.
55+
56+
3. Create or update the GitHub issue.
57+
58+
- Use `gh issue create`, `gh issue edit`, and `gh issue comment`.
59+
- Keep titles short and imperative, usually starting with `Plugin:`.
60+
61+
4. Add the issue or PR to the configured project board.
62+
63+
- Read the configured project number and owner from `.agents/project-manager.config.json`.
64+
- Use `gh project item-add <project-number> --owner <project-owner> --url <issue-or-pr-url>`.
65+
- For issues, set `Status`, `Priority`, `Size`, and `Workflow`.
66+
- For PRs, usually set `Status` and `Workflow`; `Priority` and `Size` are issue-planning fields unless there is a specific reason to set them on the PR item.
67+
68+
5. Sync `.local/work-items.yaml`.
69+
70+
- Treat the tracker as derived state, not a hand-edited source of truth.
71+
- Regenerate it with `pnpm project:sync` after issue/project changes.
72+
- Prefer pushing durable notes into GitHub issues or `.local/issue-drafts/`; the tracker should stay compact.
73+
74+
6. Reconcile if anything drifted.
75+
76+
- Use `gh issue list`, `gh project item-list`, and `gh project field-list` to confirm GitHub matches the local tracker.
77+
78+
## Field Conventions
79+
80+
- `Status`: `Inbox`, `Ready`, `In Progress`, `In Review`, `Done`
81+
- `Workflow`: `Plan`, `Review`, `Threads`, `Worktrees`, `Branches`
82+
83+
Triage heuristic for this repo:
84+
85+
- `P0`: quick wins that shrink the board fast, plus high-visibility completeness or pizazz work
86+
- `P1`: larger user-visible completeness work
87+
- `P2`: infrastructure, refactors, planning spikes, and corner-case cleanup unless they are very quick
88+
89+
Size heuristic:
90+
91+
- `XS` or `S`: obvious quick wins
92+
- `M`: bounded feature or bug fix with a few moving parts
93+
- `L`: visible feature touching multiple flows
94+
- `XL`: large architectural or cross-cutting work
95+
96+
## Command Pattern
97+
98+
Start by discovering current project field ids instead of assuming they never change:
99+
100+
```bash
101+
gh repo view --json nameWithOwner,url
102+
gh project view <project-number> --owner <project-owner> --format json
103+
gh project field-list <project-number> --owner <project-owner> --format json
104+
```
105+
106+
Typical flow:
107+
108+
```bash
109+
gh issue create --repo <owner/repo> --title "<title>" --body-file .local/issue-drafts/<file>.md
110+
gh project item-add <project-number> --owner <project-owner> --url <issue-or-pr-url> --format json
111+
gh project item-edit --project-id <project-id> --id <item-id> --field-id <field-id> --single-select-option-id <option-id>
112+
gh project item-list <project-number> --owner <project-owner> --format json
113+
```
114+
115+
Refresh the local tracker:
116+
117+
```bash
118+
pnpm project:sync
119+
```
120+
121+
## Gotchas
122+
123+
- Verify the repo slug before issue commands. Treat `.agents/project-manager.config.json` as canonical when it is present.
124+
- `gh project item-edit` needs opaque ids for the project, item, field, and single-select option. Always discover them with `gh project view ...` and `gh project field-list ...` instead of assuming cached ids still match.
125+
- GitHub Projects custom views are not well-supported by `gh` or GraphQL mutations. Reading views works, but creating/editing/copying views is still better done in the web UI or browser automation. `gh project copy` does not carry over custom views.
126+
- `.local/work-items.yaml` is currently issue-only. Add PRs to the project board, but do not expect `pnpm project:sync` to mirror PR items into the local tracker.
127+
- `.local/issue-drafts/<nn>-<slug>.md` filenames are local scratch ids, not GitHub issue numbers. Keep them stable enough to reuse, but do not try to force them to match the eventual GitHub issue number.
128+
129+
## Tracker Shape
130+
131+
Each `.local/work-items.yaml` item should keep:
132+
133+
- `local_id`
134+
- `title`
135+
- `repo`
136+
- `source_note`
137+
- `github.issue_number`
138+
- `github.issue_url`
139+
- `github.project_number`
140+
- `github.project_url`
141+
- `github.project_item_id`
142+
- `state.issue_state`
143+
- `state.project_status`
144+
- `state.workflow`
145+
- `state.priority`
146+
- `state.size`
147+
- optional branch / PR fields
148+
- concise `notes`
149+
150+
Keep notes factual and short. Store raw findings and writeups in the issue draft file or GitHub issue, not as sprawling tracker prose.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Project Manager"
3+
short_description: "Manage issues, board, and local tracker"
4+
default_prompt: "Use $project-manager to capture requirements into GitHub issues, keep the configured project board in sync, and update the local .local tracker for this repo."

0 commit comments

Comments
 (0)