sc-research 1.0.4 → 1.0.5
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sc-research",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Headless Social Media Research Data Provider for AI Agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -45,8 +45,7 @@
|
|
|
45
45
|
"dist",
|
|
46
46
|
"templates/base",
|
|
47
47
|
"templates/platforms",
|
|
48
|
-
"README.md"
|
|
49
|
-
"CLAUDE.md"
|
|
48
|
+
"README.md"
|
|
50
49
|
],
|
|
51
50
|
"publishConfig": {
|
|
52
51
|
"access": "public"
|
|
@@ -21,10 +21,11 @@ Treat this as the entrypoint skill when user requests map to social-media resear
|
|
|
21
21
|
|
|
22
22
|
## Core Routing Contract
|
|
23
23
|
|
|
24
|
-
-
|
|
24
|
+
- For analysis intents, run exactly one worker by default.
|
|
25
25
|
- Run multiple workers only when the user explicitly asks for multi-view output (for example: "full analysis", "all views", "run everything").
|
|
26
26
|
- Use deep fetch for every worker analysis.
|
|
27
|
-
- Use quick fetch
|
|
27
|
+
- Use quick fetch for explicit quick-answer requests and ambiguity fallback.
|
|
28
|
+
- If intent is still ambiguous after routing rules, use quick-answer mode (no classified file).
|
|
28
29
|
- Reuse existing raw data only if it still matches topic, source, and date range; otherwise refetch.
|
|
29
30
|
|
|
30
31
|
## Step 1: Resolve Intent (Strict Precedence)
|
|
@@ -45,7 +46,7 @@ Apply rules top-to-bottom:
|
|
|
45
46
|
4. **Inferred strongest intent**
|
|
46
47
|
- Map by primary question intent (keywords table below).
|
|
47
48
|
5. **Fallback**
|
|
48
|
-
- If still ambiguous, default to
|
|
49
|
+
- If still ambiguous, default to quick-answer mode (no classified file).
|
|
49
50
|
|
|
50
51
|
## Step 2: Map Intent to Route
|
|
51
52
|
|
package/CLAUDE.md
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# Social Media Research Skill
|
|
2
|
-
|
|
3
|
-
> **"The Skill provides the catch; the Agent cooks the meal."**
|
|
4
|
-
|
|
5
|
-
This project is a headless social media research tool designed for **Claude Code first**. It fetches raw discussion data from Reddit and X (Twitter), classifies it into multiple analysis templates, and visualizes results in a local dashboard.
|
|
6
|
-
|
|
7
|
-
## Canonical Source
|
|
8
|
-
|
|
9
|
-
- **Main source of truth:** `templates/base/` (skills + commands body templates)
|
|
10
|
-
- **Platform rules source:** `templates/platforms/*.json` (paths/format behavior)
|
|
11
|
-
- `.claude/`, `.cursor/`, `.agent/`, and other platform folders are rendered outputs from `sc-research init`.
|
|
12
|
-
|
|
13
|
-
## ⚡️ Quick Start
|
|
14
|
-
|
|
15
|
-
This project uses `bun`.
|
|
16
|
-
|
|
17
|
-
### Environment Variables
|
|
18
|
-
Required in `.sc-research`:
|
|
19
|
-
- `OPENAI_API_KEY`: For Reddit URL discovery and general LLM ops
|
|
20
|
-
- `XAI_API_KEY`: (Optional) For X/Twitter data
|
|
21
|
-
|
|
22
|
-
### Available Commands
|
|
23
|
-
- `/research <topic>` - Research + quick answer flow
|
|
24
|
-
- `/quick <topic>` - Fast Reddit-only quick answer
|
|
25
|
-
- `/deep-research <topic>` - Deep research + route to best template
|
|
26
|
-
- `/rank` - Generate ranking report (`classified_rank.json`)
|
|
27
|
-
- `/sentiment` - Generate sentiment report (`classified_sentiment.json`)
|
|
28
|
-
- `/trend` - Generate timeline report (`classified_trend.json`)
|
|
29
|
-
- `/controversy` - Generate controversy map (`classified_controversy.json`)
|
|
30
|
-
- `/discovery` - Generate discovery clusters (`classified_discovery.json`)
|
|
31
|
-
- `/visualize` - Launch dashboard (auto-detects available `classified_*.json`)
|
|
32
|
-
- `/test-research` - Run fixed-link pipeline test
|
|
33
|
-
|
|
34
|
-
### CLI Init Targets
|
|
35
|
-
- `sc-research init --ai claude` - Install Claude templates
|
|
36
|
-
- `sc-research init --ai claude,cursor` - Install multiple targets in one run
|
|
37
|
-
- `sc-research init --ai all` - Install all supported targets (`claude`, `cursor`, `windsurf`, `antigravity`)
|
|
38
|
-
|
|
39
|
-
## 🏗️ Architecture
|
|
40
|
-
|
|
41
|
-
- **Orchestrator**: `using_social_media_research` (The routing brain)
|
|
42
|
-
- **Workers**:
|
|
43
|
-
- `social_media_fetch` (Data provider)
|
|
44
|
-
- `social_media_rank` (Ranking analysis)
|
|
45
|
-
- `social_media_sentiment` (Sentiment analysis)
|
|
46
|
-
- `social_media_trend` (Timeline analysis)
|
|
47
|
-
- `social_media_controversy` (Debate analysis)
|
|
48
|
-
- `social_media_discovery` (Viral topic clustering)
|
|
49
|
-
- `social_media_visualize` (Dashboard launcher)
|
|
50
|
-
- `social_media_research_test` (Legacy/fixed-link test helper)
|
|
51
|
-
|
|
52
|
-
## 🧪 Testing Rules
|
|
53
|
-
|
|
54
|
-
> **IMPORTANT**: Automated tests MUST NOT invoke paid AI APIs.
|
|
55
|
-
> Use `bun run test:fixed` for manual verification or the `/test-research` command.
|
|
56
|
-
|
|
57
|
-
## 🔒 Project Rules
|
|
58
|
-
|
|
59
|
-
- Always use `bun` for runtime and scripts.
|
|
60
|
-
- Do not run paid AI API calls in automated tests.
|
|
61
|
-
|
|
62
|
-
## 📂 Project Structure
|
|
63
|
-
|
|
64
|
-
- `src/`: Core TypeScript logic
|
|
65
|
-
- `.claude/skills/`: AI Skill definitions
|
|
66
|
-
- `.claude/commands/`: User slash commands
|
|
67
|
-
- `web/`: React/Vite visualization app
|