|
| 1 | +--- |
| 2 | +name: projman |
| 3 | +description: > |
| 4 | + Project management skill for markdown-based projects with GitHub Project sync. |
| 5 | + Use when: (1) viewing/managing projects in projects/ folder, (2) syncing project |
| 6 | + checkboxes to GitHub Projects, (3) picking up next work item from a project, |
| 7 | + (4) updating project status after completing work, (5) generating project dashboards. |
| 8 | + Replaces the older /pm command with enhanced GitHub integration. |
| 9 | +--- |
| 10 | + |
| 11 | +# Project Management (projman) |
| 12 | + |
| 13 | +## Overview |
| 14 | + |
| 15 | +Manage markdown-based project files in `projects/` with optional sync to GitHub Projects. |
| 16 | +Markdown files are the source of truth; GitHub Projects provides visibility/collaboration. |
| 17 | + |
| 18 | +## Project File Structure |
| 19 | + |
| 20 | +Projects live in `projects/` as either: |
| 21 | +- `PROJECT_NAME.md` - single file project |
| 22 | +- `PROJECT_NAME/` - folder with multiple materials |
| 23 | + |
| 24 | +### Standard Sections |
| 25 | + |
| 26 | +```markdown |
| 27 | +# Project Title |
| 28 | + |
| 29 | +## Overview |
| 30 | +[Project description, goals, selection criteria] |
| 31 | + |
| 32 | +## Items to Process |
| 33 | +| Item | Field1 | Field2 | Status | |
| 34 | +|------|--------|--------|--------| |
| 35 | +| Item A | value | value | [ ] | |
| 36 | +| Item B | value | value | [x] | |
| 37 | + |
| 38 | +--- |
| 39 | +# STATUS |
| 40 | +## Tier/Category 1 (N/M) ✓ |
| 41 | +- [x] Completed item - Date, notes |
| 42 | +- [ ] Pending item |
| 43 | + |
| 44 | +## Tier/Category 2 (N/M) |
| 45 | +- [ ] Item |
| 46 | + |
| 47 | +# NOTES |
| 48 | +## YYYY-MM-DD |
| 49 | +[Session notes - add new entries at top] |
| 50 | +``` |
| 51 | + |
| 52 | +## Core Workflows |
| 53 | + |
| 54 | +### 1. View Project Status |
| 55 | + |
| 56 | +```bash |
| 57 | +# List all projects |
| 58 | +ls projects/ |
| 59 | + |
| 60 | +# Quick status - count checkboxes |
| 61 | +grep -c "^\- \[x\]" projects/CANCER.md # completed |
| 62 | +grep -c "^\- \[ \]" projects/CANCER.md # pending |
| 63 | +``` |
| 64 | + |
| 65 | +### 2. Pick Up Next Item |
| 66 | + |
| 67 | +Read project file → find first unchecked item in priority order → work on it. |
| 68 | + |
| 69 | +```python |
| 70 | +# Parse checkboxes from markdown |
| 71 | +import re |
| 72 | +with open("projects/CANCER.md") as f: |
| 73 | + content = f.read() |
| 74 | +# Find unchecked items: - [ ] Item name |
| 75 | +pending = re.findall(r'- \[ \] (.+)', content) |
| 76 | +next_item = pending[0] if pending else None |
| 77 | +``` |
| 78 | + |
| 79 | +### 3. Update Status After Work |
| 80 | + |
| 81 | +After completing an item: |
| 82 | +1. Change `- [ ]` to `- [x]` |
| 83 | +2. Add date/compliance info: `- [x] Item Name - Created 2026-01-30, 55% compliance` |
| 84 | +3. Add session notes under `# NOTES` with today's date |
| 85 | + |
| 86 | +### 4. Add Session Notes |
| 87 | + |
| 88 | +Always add notes incrementally: |
| 89 | +```markdown |
| 90 | +# NOTES |
| 91 | + |
| 92 | +## 2026-01-30 |
| 93 | +[Today's work - add at TOP] |
| 94 | +- Completed X, Y, Z |
| 95 | +- Key findings: ... |
| 96 | + |
| 97 | +## 2026-01-29 |
| 98 | +[Previous session - don't edit unless continuing] |
| 99 | +``` |
| 100 | + |
| 101 | +Get today's date: `date +%Y-%m-%d` |
| 102 | + |
| 103 | +## GitHub Project Sync |
| 104 | + |
| 105 | +### Setup (One-Time) |
| 106 | + |
| 107 | +```bash |
| 108 | +# Check auth has project scope |
| 109 | +gh auth status # should show 'project' in scopes |
| 110 | + |
| 111 | +# If missing: |
| 112 | +gh auth refresh -s project |
| 113 | + |
| 114 | +# Create a new GitHub Project for a markdown project |
| 115 | +gh project create --owner @me --title "dismech: CANCER Curation" |
| 116 | +# Note the project number returned (e.g., 4) |
| 117 | +``` |
| 118 | + |
| 119 | +### Sync Checkboxes → GitHub Project Items |
| 120 | + |
| 121 | +Parse markdown checkboxes and create/update GitHub Project items: |
| 122 | + |
| 123 | +```bash |
| 124 | +# List existing items in project |
| 125 | +gh project item-list PROJECT_NUMBER --owner @me --format json |
| 126 | + |
| 127 | +# Create a draft item (not linked to issue) |
| 128 | +gh project item-create PROJECT_NUMBER --owner @me \ |
| 129 | + --title "Chronic Myeloid Leukemia" \ |
| 130 | + --body "Tier 1: BCR-ABL1 paradigmatic cancer" |
| 131 | + |
| 132 | +# Update item status (need field ID and option ID) |
| 133 | +# First, get field info: |
| 134 | +gh project field-list PROJECT_NUMBER --owner @me --format json |
| 135 | + |
| 136 | +# Then update: |
| 137 | +gh project item-edit --id ITEM_ID \ |
| 138 | + --field-id STATUS_FIELD_ID \ |
| 139 | + --single-select-option-id DONE_OPTION_ID \ |
| 140 | + --project-id PROJECT_ID |
| 141 | +``` |
| 142 | + |
| 143 | +### Useful gh project commands |
| 144 | + |
| 145 | +```bash |
| 146 | +# List your projects |
| 147 | +gh project list --owner @me |
| 148 | + |
| 149 | +# View project details |
| 150 | +gh project view NUMBER --owner @me |
| 151 | + |
| 152 | +# Get items as JSON for parsing |
| 153 | +gh project item-list NUMBER --owner @me --format json | jq '.items[]' |
| 154 | + |
| 155 | +# Get field definitions (needed for updates) |
| 156 | +gh project field-list NUMBER --owner @me --format json |
| 157 | + |
| 158 | +# Delete an item |
| 159 | +gh project item-delete NUMBER --owner @me --id ITEM_ID |
| 160 | + |
| 161 | +# Archive an item (keeps it but hides from view) |
| 162 | +gh project item-archive NUMBER --owner @me --id ITEM_ID |
| 163 | +``` |
| 164 | + |
| 165 | +### Field IDs Quick Reference |
| 166 | + |
| 167 | +Status field typically has these option IDs (varies per project): |
| 168 | +- Todo: find in `gh project field-list` output |
| 169 | +- In Progress: find in output |
| 170 | +- Done: find in output |
| 171 | + |
| 172 | +Example parsing: |
| 173 | +```bash |
| 174 | +gh project field-list 4 --owner @me --format json | \ |
| 175 | + jq '.fields[] | select(.name=="Status") | .options' |
| 176 | +``` |
| 177 | + |
| 178 | +## Integration with dismech Workflow |
| 179 | + |
| 180 | +When working on dismech projects: |
| 181 | + |
| 182 | +1. **Pick item from project** → consult `initiate-new-disorder-creation` skill |
| 183 | +2. **After creating disorder file** → run `just compliance kb/disorders/NewFile.yaml` |
| 184 | +3. **Update project checkbox** → add compliance score |
| 185 | +4. **Sync to GitHub Project** → if project has linked GH Project |
| 186 | + |
| 187 | +### Example Session |
| 188 | + |
| 189 | +``` |
| 190 | +1. Read projects/CANCER.md |
| 191 | +2. Find next pending: "- [ ] Chronic Myeloid Leukemia" |
| 192 | +3. Use initiate-new-disorder-creation skill |
| 193 | +4. Run validation: just qc |
| 194 | +5. Update markdown: |
| 195 | + "- [x] Chronic Myeloid Leukemia - Created 2026-01-30, 60% compliance" |
| 196 | +6. Add session notes |
| 197 | +7. (Optional) Sync to GitHub Project |
| 198 | +``` |
| 199 | + |
| 200 | +## Deprecation Note |
| 201 | + |
| 202 | +This skill replaces the older `/pm` command. Key differences: |
| 203 | +- GitHub Project sync capability (new) |
| 204 | +- More structured checkbox parsing (improved) |
| 205 | +- Clearer session notes format (improved) |
| 206 | + |
| 207 | +The `/pm` command remains available but should be considered deprecated. |
0 commit comments