|
| 1 | +# note-review |
| 2 | + |
| 3 | +**Use when user asks to:** |
| 4 | +- Review notes in a topic or across topics |
| 5 | +- Audit notes for relevance to current codebase |
| 6 | +- Organize/clean up notes (migrate, archive, delete) |
| 7 | +- Verify that notes still apply to current code |
| 8 | + |
| 9 | +## Overview |
| 10 | + |
| 11 | +Interactive note review and organization skill. Analyzes note summaries to intelligently batch related notes, then guides user through decisions (move/archive/delete/keep). Uses clustering analysis to group similar notes together, reducing decision fatigue while maintaining flexibility for edge cases. |
| 12 | + |
| 13 | +## Table of Contents |
| 14 | + |
| 15 | +1. [Workflow](#workflow) |
| 16 | +2. [Scope Parsing](#scope-parsing) |
| 17 | +3. [Clustering Analysis](#clustering-analysis) |
| 18 | +4. [Decision Options](#decision-options) |
| 19 | +5. [Execution](#execution) |
| 20 | +6. [Sequential Fallback](#sequential-fallback) |
| 21 | +7. [Code Verification](#code-verification) |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +## Workflow |
| 26 | + |
| 27 | +The skill follows this process: |
| 28 | + |
| 29 | +``` |
| 30 | +1. Parse user intent |
| 31 | + ↓ |
| 32 | +2. Confirm/disambiguate scope |
| 33 | + ↓ |
| 34 | +3. Get note list for scope |
| 35 | + ↓ |
| 36 | +4. Summarize all notes |
| 37 | + ↓ |
| 38 | +5. Analyze summaries → Identify clusters |
| 39 | + ↓ |
| 40 | +6. Present batch #1 (clustered notes) |
| 41 | + ↓ |
| 42 | +7. User decides action for batch |
| 43 | + ↓ |
| 44 | +8. Execute decision |
| 45 | + ↓ |
| 46 | +9. Repeat for remaining batches |
| 47 | + ↓ |
| 48 | +10. Sequential review for unclustered notes |
| 49 | +``` |
| 50 | + |
| 51 | +## Scope Parsing |
| 52 | + |
| 53 | +Flexibly interpret user's intent to determine which notes to review. |
| 54 | + |
| 55 | +### Examples of User Intent |
| 56 | + |
| 57 | +- "Review __scratch topic" → Topic scope |
| 58 | +- "Review all notes related to migrations" → Search-based scope |
| 59 | +- "Review notes that mention 'pgmq'" → Content search scope |
| 60 | +- "Review notes in core and client packages" → Multiple topics |
| 61 | +- "Review all notes" → Full scope (all topics) |
| 62 | +- "Review WIP notes" → Filename pattern scope |
| 63 | + |
| 64 | +### Confirmation Step |
| 65 | + |
| 66 | +If user request is ambiguous or matches multiple interpretations, use AskUserQuestion to clarify: |
| 67 | + |
| 68 | +``` |
| 69 | +Which notes would you like to review? |
| 70 | +- Specific topic: __scratch |
| 71 | +- Specific topic: core |
| 72 | +- All topics |
| 73 | +- Notes matching keyword: [search term] |
| 74 | +- Multiple selected topics |
| 75 | +- Other custom selection |
| 76 | +``` |
| 77 | + |
| 78 | +If match is clear (e.g., exactly one matching topic), proceed without asking. |
| 79 | + |
| 80 | +## Clustering Analysis |
| 81 | + |
| 82 | +After getting summaries, analyze them to group related notes. |
| 83 | + |
| 84 | +### Clustering Criteria |
| 85 | + |
| 86 | +Group notes together if they: |
| 87 | +- Belong to the same topic/domain (schema changes, migrations, API design) |
| 88 | +- Reference the same code locations or file |
| 89 | +- Share the same concept or problem they're trying to solve |
| 90 | +- Should be moved to same destination or archived together |
| 91 | +- Should be deleted as a group (outdated/duplicate content) |
| 92 | + |
| 93 | +### Analysis Output |
| 94 | + |
| 95 | +Present notes as a table: |
| 96 | +``` |
| 97 | +| Note Title | Summary | Likely Topic | |
| 98 | +|---|---|---| |
| 99 | +| Migration strategy | Discussion of approaches to db migrations | core | |
| 100 | +| pgmq implementation | Notes on pgmq queue patterns | core | |
| 101 | +| ... | ... | ... | |
| 102 | +``` |
| 103 | + |
| 104 | +Then identify clusters: |
| 105 | +``` |
| 106 | +Cluster 1: Database Migrations (2 notes) |
| 107 | +- Migration strategy |
| 108 | +- pgmq implementation |
| 109 | +
|
| 110 | +Cluster 2: API Design (1 note) |
| 111 | +- REST endpoints |
| 112 | +
|
| 113 | +Cluster 3: Deletion Candidates (1 note) |
| 114 | +- Old workspace notes |
| 115 | +``` |
| 116 | + |
| 117 | +**Confidence Rule**: Only batch notes together if confident they should have the same outcome. If unsure, leave as single note for sequential review. |
| 118 | + |
| 119 | +## Decision Options |
| 120 | + |
| 121 | +For each batch or individual note, present options: |
| 122 | + |
| 123 | +### Primary Actions |
| 124 | +- **Move to topic**: Select from existing topics or create new topic |
| 125 | +- **Archive**: Mark note as archived |
| 126 | +- **Delete**: Remove note permanently (requires confirmation) |
| 127 | +- **Skip/Defer**: Leave for manual review later |
| 128 | + |
| 129 | +### Supplementary Options |
| 130 | +- **Read full note**: View complete content before deciding |
| 131 | +- **Show summaries**: Display detailed summaries for all notes in batch |
| 132 | +- **Verify code**: Offer to read relevant code sections to compare against note |
| 133 | +- **Split batch**: Break batch into smaller groups if unsure about unified decision |
| 134 | + |
| 135 | +### Code Verification Flow |
| 136 | + |
| 137 | +When user chooses "Verify code": |
| 138 | +1. Identify code locations mentioned in note |
| 139 | +2. Read relevant codebase sections (using Bash/Read tools) |
| 140 | +3. Compare current implementation against note content |
| 141 | +4. Present findings: |
| 142 | + - "Note is current" - implementation matches |
| 143 | + - "Note is partially outdated" - some parts changed |
| 144 | + - "Note is completely outdated" - major changes |
| 145 | + - "Need more context" - unclear from code alone |
| 146 | +5. User can then decide action (update note, archive, delete, keep) |
| 147 | + |
| 148 | +## Execution |
| 149 | + |
| 150 | +Apply user's decision using appropriate tools: |
| 151 | + |
| 152 | +### Move Decision |
| 153 | +```bash |
| 154 | +# Use Bash to move note file to destination topic |
| 155 | +mv <source_path> <destination_path> |
| 156 | +git -C ./.notes add <destination_path> |
| 157 | +``` |
| 158 | + |
| 159 | +### Archive Decision |
| 160 | +```bash |
| 161 | +# Rename file with [ARCHIVED] prefix |
| 162 | +mv <note_path> <note_dir>/[ARCHIVED] <note_title>.md |
| 163 | +git -C ./.notes add <note_dir> |
| 164 | +``` |
| 165 | + |
| 166 | +### Delete Decision |
| 167 | +```bash |
| 168 | +# Remove file with git |
| 169 | +rm <note_path> |
| 170 | +git -C ./.notes add <note_dir> |
| 171 | +``` |
| 172 | + |
| 173 | +After any change, commit using notes-sync skill or manual git commit. |
| 174 | + |
| 175 | +## Sequential Fallback |
| 176 | + |
| 177 | +After batch decisions complete, process remaining unclustered notes one at a time. |
| 178 | + |
| 179 | +For each note: |
| 180 | +1. Show title and summary |
| 181 | +2. Display decision options (same as batch) |
| 182 | +3. User chooses action |
| 183 | +4. Execute and move to next note |
| 184 | + |
| 185 | +This maintains the same UX while handling edge cases that didn't cluster. |
| 186 | + |
| 187 | +## Code Verification |
| 188 | + |
| 189 | +Code verification is user-initiated per note/batch, not automatic. |
| 190 | + |
| 191 | +When user chooses verification: |
| 192 | + |
| 193 | +1. **Identify references**: Extract code file/function names from note |
| 194 | +2. **Locate in codebase**: Use Bash/Glob/Grep to find relevant files |
| 195 | +3. **Read sections**: Use Read tool to get implementation details |
| 196 | +4. **Compare**: Present side-by-side comparison of note vs. current code |
| 197 | +5. **Make decision**: User decides if note is still accurate |
| 198 | + |
| 199 | +**Note**: Verification is conceptual (reading + comparing), not scripted. You analyze and summarize findings, then present to user. |
| 200 | + |
| 201 | +## Example Session |
| 202 | + |
| 203 | +``` |
| 204 | +User: "Review the __scratch topic" |
| 205 | +
|
| 206 | +Skill: "Found 5 notes in __scratch. Summarizing..." |
| 207 | +
|
| 208 | +[Display table with summaries] |
| 209 | +
|
| 210 | +Skill: "Identified clusters: |
| 211 | +- Cluster 1: Database patterns (3 notes - migration, pgmq, schema) |
| 212 | +- Cluster 2: Old workspace setup (2 notes - dependencies, config) |
| 213 | +
|
| 214 | +Review Cluster 1 (database patterns)? |
| 215 | +- Move to: core, schema, other topic |
| 216 | +- Archive all |
| 217 | +- Delete all |
| 218 | +- Read full notes |
| 219 | +- Skip for now" |
| 220 | +
|
| 221 | +User: "Move to core" |
| 222 | +
|
| 223 | +Skill: "Moving 3 notes to core topic... Done." |
| 224 | +
|
| 225 | +Skill: "Review Cluster 2 (old workspace setup)? |
| 226 | +- Move to: [various topics] |
| 227 | +- Archive all |
| 228 | +- Delete all |
| 229 | +- Read full notes |
| 230 | +- Skip for now" |
| 231 | +
|
| 232 | +User: "Delete all" |
| 233 | +
|
| 234 | +Skill: "Delete 2 notes? Confirm: yes/no" |
| 235 | +
|
| 236 | +User: "Yes" |
| 237 | +
|
| 238 | +Skill: "Deleted. All notes reviewed. Committing changes..." |
| 239 | +``` |
0 commit comments