Skip to content

Commit 6b82467

Browse files
committed
Merge remote-tracking branch 'origin/main' into sno-test-evidence
2 parents 6306270 + f416db5 commit 6b82467

229 files changed

Lines changed: 12904 additions & 3129 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bot/AGENT.md

Lines changed: 898 additions & 0 deletions
Large diffs are not rendered by default.

.bot/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENT.md

.bot/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENT.md

.bot/SMART-READ-FEATURE.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Smart Read Feature - Summary
2+
3+
## Overview
4+
5+
Added a new smart `prbot slack read <url>` command that auto-detects Slack URL types and handles them appropriately, making it much easier to interact with Slack content.
6+
7+
## Key Features
8+
9+
### 1. Auto-Detection of URL Types
10+
11+
The command automatically detects three types of Slack URLs:
12+
13+
- **Message URLs**: Reads nearby messages (20 before + 20 after) with target highlighted
14+
- **Channel URLs**: Reads recent 10 messages from the channel
15+
- **File URLs**: Downloads file to current directory and returns path info
16+
17+
### 2. Simple Syntax
18+
19+
```bash
20+
# One command for everything!
21+
prbot slack read "<slack_url>"
22+
```
23+
24+
No more remembering different flags for different operations!
25+
26+
### 3. YAML Output
27+
28+
All Slack commands now output YAML format (instead of JSON) for better readability by both humans and AI agents.
29+
30+
## Examples
31+
32+
### Message URL
33+
34+
```bash
35+
$ prbot slack read "https://workspace.slack.com/archives/C123/p1234567890"
36+
```
37+
38+
**Output:** YAML with 40 messages (20 before + 20 after), target message has `is_target: true`
39+
40+
### Channel URL
41+
42+
```bash
43+
$ prbot slack read "https://workspace.slack.com/archives/C123"
44+
```
45+
46+
**Output:** YAML with 10 most recent messages from the channel
47+
48+
### File URL
49+
50+
```bash
51+
$ prbot slack read "https://files.slack.com/files-pri/T123-F456/report.pdf"
52+
```
53+
54+
**Output:** YAML with download info:
55+
56+
```yaml
57+
type: file_downloaded
58+
file_id: F456
59+
file_name: report.pdf
60+
file_size: 12345
61+
downloaded_to: ./report.pdf
62+
```
63+
64+
## Implementation
65+
66+
### New Files Created
67+
68+
1. **lib/slack/parseSlackUrlSmart.ts**
69+
- Smart URL parser that detects message/file/channel URLs
70+
- Returns structured data with type and extracted info
71+
72+
2. **lib/slack/msg-read-recent.ts**
73+
- Function to read recent messages from a channel
74+
- Outputs YAML format
75+
76+
### Modified Files
77+
78+
1. **bot/cli.ts**
79+
- Added `prbot slack read <url>` command
80+
- Updated all Slack commands to output YAML instead of JSON
81+
- Imported new smart URL parser
82+
83+
2. **.bot/AGENT.md** (and symlinked README.md, CLAUDE.md)
84+
- Added documentation for smart read command
85+
- Updated output format mentions from JSON to YAML
86+
- Added as recommended method at top of Slack commands section
87+
88+
3. **CLAUDE.md** (root)
89+
- Added smart read command documentation
90+
- Updated usage patterns to use the new command
91+
- Updated implementation details
92+
93+
## Benefits
94+
95+
### For Humans
96+
97+
- **Easier to type**: Just paste the Slack URL, no need to extract channel/timestamp
98+
- **One command to remember**: Instead of `read-thread`, `read-nearby`, `download-file`, etc.
99+
- **Better readability**: YAML output is more human-friendly than JSON
100+
101+
### For AI Agents
102+
103+
- **Simpler integration**: Single command interface for all Slack read operations
104+
- **Better parsing**: YAML is easier to parse and work with than JSON
105+
- **Consistent output**: All commands follow the same format
106+
107+
## Testing
108+
109+
All URL types parse correctly:
110+
111+
```bash
112+
# Message URL
113+
$ bun lib/slack/parseSlackUrlSmart.ts "https://workspace.slack.com/archives/C123/p1234567890"
114+
{"type":"message","channel":"C123","ts":"1234567890.123456","url":"..."}
115+
116+
# Channel URL
117+
$ bun lib/slack/parseSlackUrlSmart.ts "https://workspace.slack.com/archives/C123"
118+
{"type":"channel","channel":"C123","url":"..."}
119+
120+
# File URL
121+
$ bun lib/slack/parseSlackUrlSmart.ts "https://files.slack.com/files-pri/T123-F456/file.pdf"
122+
{"type":"file","fileId":"F456","url":"..."}
123+
```
124+
125+
## Command Help
126+
127+
```
128+
$ prbot slack --help
129+
130+
Commands:
131+
prbot slack read <url> Smart read: Auto-detect URL type (message/file/channel)
132+
and read appropriately (YAML output)
133+
prbot slack update Update a Slack message
134+
prbot slack read-thread Read and print a Slack thread (YAML)
135+
prbot slack read-nearby Read nearby messages around a specific timestamp
136+
prbot slack download-file Download a file from Slack
137+
prbot slack file-info Get information about a Slack file (YAML)
138+
prbot slack post-with-files Post a message with file attachments
139+
prbot slack upload-file Upload a file to Slack
140+
```
141+
142+
## Backward Compatibility
143+
144+
All existing commands (`read-thread`, `read-nearby`, `download-file`, etc.) still work exactly as before, just with YAML output instead of JSON. The new `read` command is additive and doesn't break any existing functionality.

.bot/skills/code-search/SKILL.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: ComfyUI Code Search
3+
description: Search code across ComfyUI repositories using comfy-codesearch service. Including all Comfy-Org repos and Community made Custom Node Repos on GitHub.
4+
---
5+
6+
# ComfyUI Code Search
7+
8+
Search for code patterns, functions, and implementations:
9+
prbot code search --query "<search terms>"
10+
11+
NOTE: Does NOT support --limit parameter. Results are automatically paginated.
12+
13+
Examples:
14+
prbot code search --query "binarization" --repo Comfy-Org/ComfyUI
15+
prbot code search --query "authentication function"
16+
prbot code search --query "video transcription whisper"
17+
18+
Best practices:
19+
20+
- Use specific function names or patterns for better results.
21+
- Specify repo when you know which repository to search.
22+
- Review results and cite file paths and line numbers.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: GitHub Issue Search
3+
description: Search for issues and pull requests across Comfy-Org repositories.
4+
---
5+
6+
# GitHub Issue Search
7+
8+
Search issues and PRs across all Comfy-Org repositories:
9+
prbot github-issue search --query "<search terms>" [--limit=5]
10+
11+
Examples:
12+
prbot github-issue search --query "authentication bug" --limit 5
13+
prbot github-issue search --query "dark mode feature"
14+
15+
Best practices:
16+
17+
- Search for known bugs or feature requests before starting work.
18+
- Reference issue numbers in your responses.
19+
- Link to relevant discussions and PRs.

.bot/skills/github-pr-bot/SKILL.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: GitHub Changes via pr-bot
3+
description: Safely make code changes by spawning a coding sub-agent that opens a PR.
4+
---
5+
6+
# GitHub Changes via pr-bot
7+
8+
All repository modifications must be delegated to the PR bot using the prbot CLI.
9+
10+
Commands:
11+
prbot pr --repo=<owner/repo> [--branch=<branch>] --prompt="<detailed coding task>"
12+
prbot code pr --repo=<owner/repo> [--branch=<branch>] --prompt="<detailed coding task>"
13+
prbot github pr --repo=<owner/repo> [--branch=<branch>] --prompt="<detailed coding task>"
14+
15+
Prompt tips:
16+
17+
- Describe the desired outcome and acceptance criteria.
18+
- Specify target files/paths when known and include examples.
19+
- Mention tests/docs to update.

.bot/skills/notion-search/SKILL.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Notion Docs Search
3+
description: Find and cite relevant Notion pages from the Comfy-Org workspace.
4+
---
5+
6+
# Notion Docs Search
7+
8+
Search internal docs, RFCs, and meeting notes using prbot CLI:
9+
prbot notion search --query "<search term>" [--limit=5]
10+
11+
Examples:
12+
prbot notion search --query "ComfyUI setup" --limit 5
13+
prbot notion search --query "architecture decisions"
14+
15+
Best practices:
16+
17+
- Skim titles and last-edited times; open the most recent first.
18+
- Cite page titles and URLs in your response.
19+
- Check for updated information before making recommendations.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: ComfyUI Registry Search
3+
description: Search for custom nodes and extensions in the ComfyUI registry.
4+
---
5+
6+
# ComfyUI Registry Search
7+
8+
Search for custom nodes and plugins:
9+
prbot registry search --query "<search terms>" [--limit=5]
10+
11+
Examples:
12+
prbot registry search --query "video" --limit 5
13+
prbot registry search --query "upscaling models"
14+
15+
Best practices:
16+
17+
- Search for existing custom nodes before recommending new implementations.
18+
- Provide registry URLs for discovered nodes.
19+
- Check compatibility and maintenance status.

.bot/skills/repo-reading/SKILL.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Comfy-Org Repo Reading (Read-Only)
3+
description: Clone and inspect Comfy-Org repositories for analysis and citations (no direct pushing).
4+
---
5+
6+
# Comfy-Org Repo Reading (Read-Only)
7+
8+
Clone repositories locally for analysis (read-only):
9+
mkdir -p ./codes/Comfy-Org
10+
git clone --depth=1 https://github.com/Comfy-Org/<repo>.git ./codes/Comfy-Org/<repo>
11+
cd ./codes/Comfy-Org/<repo> && git checkout <branch>
12+
13+
Or use prbot code search for faster results:
14+
prbot code search --query "<search terms>" --repo Comfy-Org/<repo>
15+
16+
Guidelines:
17+
18+
- Use code search first for specific queries.
19+
- Clone only when you need to browse full repository structure.
20+
- Do not commit/push directly; use the PR bot for changes.
21+
- When citing code, include file paths and line spans where helpful.

0 commit comments

Comments
 (0)