-
Notifications
You must be signed in to change notification settings - Fork 14
refactor: simplify notes skill scripts with standardized output format #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Refactored note management scripts to use a consistent header-first output
format and added AI summarization capability for quick note overviews.
Key changes:
1. Standardized script output format:
- All scripts (search-notes.sh, list-titles.sh) now output header first
- Data rows follow (empty if no results)
- Removed verbose "Found N notes" messages for cleaner piping
- Header-only output clearly indicates no results
2. Added summarize-notes.sh:
- Pipes into search/list commands to add AI summaries
- Uses GNU parallel + aichat for fast parallel processing
- Adds SUMMARY column to help identify notes without reading full content
- Detects header line (line 1) and appends "| SUMMARY" column
- Processes data rows (line 2+) with AI model to generate summaries
3. Reorganized skill structure:
- Moved shared scripts to .claude/skills/_shared/notes/
- Split monolithic idea-refine into focused skills:
* note-capture: Save conversation context to topic notes
* note-find: Search for notes with optional AI summaries
* note-list: List topics or notes with optional AI summaries
* note-organize: Archive/refine notes with confirmation prompts
* note-overview: Summarize all notes in a topic
* note-refine: Iteratively edit and improve notes
- Added shared documentation (notes-layout.md, topics.md)
4. Updated skill documentation:
- All note-* skills now mention summarize-notes.sh capability
- Added tips on when to use summarization (multiple unclear results)
- Consistent patterns using AskUserQuestion for confirmations
- Clear examples of piping: `list-titles.sh topic/ | summarize-notes.sh`
Benefits:
- Cleaner script output for reliable piping
- Fast AI summaries help disambiguate similar notes
- Modular skills with clear responsibilities
- Better UX with confirmation prompts before bulk operations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
Merge activity
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
#316) Refactored note management scripts to use a consistent header-first output format and added AI summarization capability for quick note overviews. Key changes: 1. Standardized script output format: - All scripts (search-notes.sh, list-titles.sh) now output header first - Data rows follow (empty if no results) - Removed verbose "Found N notes" messages for cleaner piping - Header-only output clearly indicates no results 2. Added summarize-notes.sh: - Pipes into search/list commands to add AI summaries - Uses GNU parallel + aichat for fast parallel processing - Adds SUMMARY column to help identify notes without reading full content - Detects header line (line 1) and appends "| SUMMARY" column - Processes data rows (line 2+) with AI model to generate summaries 3. Reorganized skill structure: - Moved shared scripts to .claude/skills/_shared/notes/ - Split monolithic idea-refine into focused skills: * note-capture: Save conversation context to topic notes * note-find: Search for notes with optional AI summaries * note-list: List topics or notes with optional AI summaries * note-organize: Archive/refine notes with confirmation prompts * note-overview: Summarize all notes in a topic * note-refine: Iteratively edit and improve notes - Added shared documentation (notes-layout.md, topics.md) 4. Updated skill documentation: - All note-* skills now mention summarize-notes.sh capability - Added tips on when to use summarization (multiple unclear results) - Consistent patterns using AskUserQuestion for confirmations - Clear examples of piping: `list-titles.sh topic/ | summarize-notes.sh` Benefits: - Cleaner script output for reliable piping - Fast AI summaries help disambiguate similar notes - Modular skills with clear responsibilities - Better UX with confirmation prompts before bulk operations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
View your CI Pipeline Execution ↗ for commit 164c7b1
☁️ Nx Cloud last updated this comment at |
🔍 Preview Deployment: Website✅ Deployment successful! 🔗 Preview URL: https://pr-316.pgflow.pages.dev 📝 Details:
_Last updated: _ |
| if [ ! -f "$path" ]; then | ||
| return # Skip failed files silently | ||
| fi | ||
|
|
||
| # Get summary (pass prompt as separate words, not quoted) | ||
| local summary | ||
| summary=$(aichat --model "$MODEL" -f "$path" $PROMPT 2>/dev/null || echo "") | ||
|
|
||
| # Skip if summary failed | ||
| if [ -z "$summary" ]; then | ||
| return | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Silent skipping of failed files creates inconsistent output with missing rows. When a file doesn't exist or summary generation fails, the function returns without outputting anything, causing the output to have fewer rows than the input. This breaks the table format and users won't know which files failed.
Fix: Always output the original line, even if processing fails:
# Skip if file doesn't exist
if [ ! -f "$path" ]; then
echo "$line | (file not found)"
return
fi
# Get summary
local summary
summary=$(aichat --model "$MODEL" -f "$path" $PROMPT 2>/dev/null || echo "")
# Skip if summary failed
if [ -z "$summary" ]; then
echo "$line | (summary failed)"
return
fiThis ensures consistent row count and informs users of failures.
| if [ ! -f "$path" ]; then | |
| return # Skip failed files silently | |
| fi | |
| # Get summary (pass prompt as separate words, not quoted) | |
| local summary | |
| summary=$(aichat --model "$MODEL" -f "$path" $PROMPT 2>/dev/null || echo "") | |
| # Skip if summary failed | |
| if [ -z "$summary" ]; then | |
| return | |
| fi | |
| if [ ! -f "$path" ]; then | |
| echo "$line | (file not found)" | |
| return | |
| fi | |
| # Get summary (pass prompt as separate words, not quoted) | |
| local summary | |
| summary=$(aichat --model "$MODEL" -f "$path" $PROMPT 2>/dev/null || echo "") | |
| # Skip if summary failed | |
| if [ -z "$summary" ]; then | |
| echo "$line | (summary failed)" | |
| return | |
| fi |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.

Refactored note management scripts to use a consistent header-first output
format and added AI summarization capability for quick note overviews.
Key changes:
Standardized script output format:
Added summarize-notes.sh:
Reorganized skill structure:
Updated skill documentation:
list-titles.sh topic/ | summarize-notes.shBenefits:
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com