@seanyao/roll 2026.514.5 → 2026.516.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -167,6 +167,7 @@ A simple heuristic — not a gate, just a signal for the human:
167
167
  ```bash
168
168
  git add docs/briefs/YYYY-MM-DD-NN.md
169
169
  git commit -m "docs: roll-brief YYYY-MM-DD-NN — {触发原因}"
170
+ git push origin main
170
171
  ```
171
172
 
172
173
  - 触发原因来自调用上下文(Feature 完成 / 每日 / 手动 / `--feature` / `--since`),用一句话填入
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: roll-review-pr
3
+ license: MIT
4
+ allowed-tools: "Read"
5
+ description: "Agent-agnostic PR review skill. Reviews a pull request diff and emits a structured 3-state verdict (APPROVE / REQUEST_CHANGES / UNCERTAIN). Used by `roll review-pr` and `_loop_pr_review_external`."
6
+ ---
7
+
8
+ # PR Review
9
+
10
+ > Follows the Architecture Constraints, Development Discipline, and Engineering
11
+ > Common Sense defined in the project AGENTS.md.
12
+
13
+ You are reviewing a pull request. Your job is to assess code quality,
14
+ correctness, and adherence to project conventions.
15
+
16
+ ## Context
17
+
18
+ **PR Title:** {{PR_TITLE}}
19
+
20
+ **PR Body:**
21
+ {{PR_BODY}}
22
+
23
+ ## Diff
24
+
25
+ ```diff
26
+ {{PR_DIFF}}
27
+ ```
28
+
29
+ ## Review Instructions
30
+
31
+ 1. Read the diff carefully. Focus on:
32
+ - Correctness: logic errors, off-by-one, unhandled edge cases
33
+ - Security: injection, secrets exposure, unsafe operations
34
+ - Conventions: naming, structure, test coverage (as described in AGENTS.md)
35
+ - Scope: changes should match what the PR title/body claims
36
+
37
+ 2. Write your analysis in free text (2-10 sentences). Be specific — cite file
38
+ names and line numbers when pointing out issues.
39
+
40
+ 3. End your response with exactly ONE verdict footer on its own line:
41
+
42
+ - If the code is acceptable:
43
+ `<!--VERDICT:APPROVE-->`
44
+
45
+ - If changes are needed (cite the most important issue):
46
+ `<!--VERDICT:REQUEST_CHANGES:one-line reason-->`
47
+
48
+ - If you cannot confidently judge (e.g., missing context, domain-specific logic):
49
+ `<!--VERDICT:UNCERTAIN:one-line reason-->`
50
+
51
+ ## Rules
52
+
53
+ - The verdict footer MUST appear on the last non-empty line of your response.
54
+ - Choose exactly one verdict. Do not combine them.
55
+ - REQUEST_CHANGES is for real issues — not style nitpicks or personal preferences.
56
+ - When in doubt between APPROVE and UNCERTAIN, prefer UNCERTAIN.
57
+ - If the PR body contains `[skip-ai-review]`, immediately output
58
+ `<!--VERDICT:APPROVE-->` with no analysis.
@@ -1,182 +0,0 @@
1
- ---
2
- hidden: true
3
- name: roll-fetch
4
- description: Web page fetching and crawling for AI agents. Extract content from URLs for research, documentation, and competitive analysis.
5
- ---
6
-
7
- # Roll Fetch - Web Content Extraction
8
-
9
- Extract content from web pages for research and analysis.
10
-
11
- ## When to Use
12
-
13
- - Product research (competitor analysis)
14
- - Technical documentation gathering
15
- - Code examples and best practices
16
- - Full site crawling for backup/analysis
17
-
18
- ## Environment Setup
19
-
20
- Configure API keys per machine:
21
-
22
- ```bash
23
- # Required for Tavily
24
- export TAVILY_API_KEY=tvly-dev-...
25
-
26
- # Optional for cloud browser fallback
27
- export BROWSER_USE_API_KEY=bu-...
28
- ```
29
-
30
- Or create `.env` file in project root:
31
- ```
32
- TAVILY_API_KEY=tvly-dev-...
33
- BROWSER_USE_API_KEY=bu-...
34
- ```
35
-
36
- ## Methods
37
-
38
- ### 1. Tavily API (Recommended)
39
-
40
- Best quality extraction, requires `TAVILY_API_KEY`.
41
-
42
- ```bash
43
- # Using Tavily CLI or API
44
- curl -X POST https://api.tavily.com/extract \
45
- -H "Content-Type: application/json" \
46
- -d '{
47
- "urls": ["https://example.com"],
48
- "api_key": "your_tavily_api_key"
49
- }'
50
- ```
51
-
52
- **Pros**: AI-optimized extraction, handles complex layouts
53
- **Cons**: Requires API key, rate limited
54
-
55
- ### 2. LLM Native Fetch (Default)
56
-
57
- Use your built-in URL fetching capability directly.
58
-
59
- **When to use**: When Tavily is unavailable or for quick checks.
60
-
61
- **Note**: Most modern AI agents (Kimi, Codex, Claude) have native URL fetching. Use `FetchURL` tool or equivalent.
62
-
63
- ### 3. Browser Automation (Fallback)
64
-
65
- Local browser automation for stubborn pages using **[browser-use](https://github.com/browser-use/browser-use)**.
66
-
67
- **How to Choose:**
68
-
69
- | If | Then Use | Why |
70
- |----|---------|-----|
71
- | `BROWSER_USE_API_KEY` in env | **Cloud** | Managed browsers, less setup |
72
- | No API key, but `browser-use` installed | **Local** | Free, no external dependency |
73
- | Neither | Skip to manual extraction | Tell user "Need browser automation setup" |
74
-
75
- **Option A: Local (Free, No API Key)**
76
- ```python
77
- from browser_use import Agent, Browser, BrowserConfig
78
- import asyncio
79
-
80
- async def fetch_page(url):
81
- # Pure local, no API key needed
82
- browser = Browser(config=BrowserConfig(headless=True))
83
- await browser.start()
84
- page = await browser.get_current_page()
85
- await page.goto(url)
86
- content = await page.content()
87
- await browser.stop()
88
- return content
89
-
90
- # Run
91
- content = asyncio.run(fetch_page("https://example.com"))
92
- ```
93
-
94
- **Option B: Cloud API**
95
- ```python
96
- from browser_use import Agent
97
-
98
- agent = Agent(
99
- task=f"Extract the main content from {url} and return as markdown",
100
- llm="moonshot" # or openai, anthropic
101
- )
102
- result = await agent.run()
103
- ```
104
-
105
- **Setup** (Local):
106
- ```bash
107
- pip install browser-use
108
- playwright install chromium
109
- ```
110
-
111
- ## Usage
112
-
113
- ### CLI Usage (via smart-web-fetch.js)
114
-
115
- ```bash
116
- # Auto mode (Tavily → Native → Browser)
117
- node smart-web-fetch.js fetch https://example.com
118
-
119
- # Explicit method
120
- node smart-web-fetch.js fetch https://example.com tavily
121
- node smart-web-fetch.js fetch https://example.com native
122
- node smart-web-fetch.js fetch https://example.com browser
123
-
124
- # Search
125
- node smart-web-fetch.js search "Python async" 5
126
- ```
127
-
128
- ### Programmatic Usage
129
-
130
- ```javascript
131
- const { smartFetch, smartSearch } = require('./smart-web-fetch.js');
132
-
133
- // Fetch a page
134
- const result = await smartFetch('https://example.com');
135
- console.log(result.content);
136
-
137
- // Search
138
- const searchResult = await smartSearch('OpenAI GPT-5', 5);
139
- console.log(searchResult.results);
140
- ```
141
-
142
- ### Single Page Fetch
143
-
144
- ```
145
- User: "Fetch https://docs.example.com/api"
146
- → Use smart-web-fetch.js with auto mode
147
- → Return clean markdown content
148
- ```
149
-
150
- ### Full Site Crawl
151
-
152
- ```
153
- User: "Crawl https://docs.example.com"
154
- → Use smart-web-fetch.js recursively
155
- → Extract all internal links
156
- → Recursively fetch up to max depth (default: 2)
157
- → Save each page as separate markdown file
158
- ```
159
-
160
- ## Output Format
161
-
162
- Always return clean Markdown:
163
- - Extract main content only (remove nav, ads, footers)
164
- - Preserve code blocks and tables
165
- - Include source URL as header
166
-
167
- ## Quality Check
168
-
169
- Validate extracted content:
170
- - Min length: 500 chars (reject if shorter)
171
- - Check for captcha/error messages
172
- - Verify main content structure (headings, paragraphs)
173
-
174
- ## Examples
175
-
176
- | Task | Method | Command |
177
- |------|--------|---------|
178
- | Quick article | Auto | `node smart-web-fetch.js fetch https://blog.example.com` |
179
- | API docs | Tavily | `node smart-web-fetch.js fetch https://docs.example.com tavily` |
180
- | SPA site | Browser | `node smart-web-fetch.js fetch https://spa.example.com browser` |
181
- | Search | Tavily | `node smart-web-fetch.js search "Python async" 5` |
182
- | Fallback test | Native | `node smart-web-fetch.js fetch https://example.com native` |
@@ -1,15 +0,0 @@
1
- {
2
- "name": "smart-web-fetch",
3
- "version": "1.0.0",
4
- "description": "Intelligent web fetching with automatic Tavily → Scrapling fallback",
5
- "main": "smart-web-fetch.js",
6
- "bin": {
7
- "smart-web-fetch": "./smart-web-fetch.js"
8
- },
9
- "scripts": {
10
- "test": "node smart-web-fetch.js fetch https://example.com"
11
- },
12
- "keywords": ["web-scraping", "tavily", "scrapling", "fallback"],
13
- "author": "R0_lobster",
14
- "license": "MIT"
15
- }