x-summary 0.1.0
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/.env.example +6 -0
- package/INSTRUCTIONS.example.md +113 -0
- package/LICENSE +619 -0
- package/README.md +160 -0
- package/config.example.json +16 -0
- package/dist/bundle/scrape.mjs +50 -0
- package/dist/bundle/scrape.mjs.map +7 -0
- package/dist/bundle/summarize.mjs +22 -0
- package/dist/bundle/summarize.mjs.map +7 -0
- package/package.json +76 -0
- package/schemas/config.schema.json +95 -0
- package/schemas/state.schema.json +123 -0
package/.env.example
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Summarization Instructions
|
|
2
|
+
|
|
3
|
+
Summarize the provided input data as a valid Markdown document.
|
|
4
|
+
|
|
5
|
+
Write concise bullet points grouped by theme. Prefer factual, neutral language. Remove promotional language, engagement bait, repeated outrage framing, and low-signal commentary.
|
|
6
|
+
|
|
7
|
+
Write the human readable time difference between the state timestamp ("now") and cutoffTimestamp.
|
|
8
|
+
If the time is bigger than 3 hours, write "Since <cutoffTimestamp>" in the local timezone, without the seconds.
|
|
9
|
+
|
|
10
|
+
## Prioritization and depth
|
|
11
|
+
|
|
12
|
+
Use more detail for:
|
|
13
|
+
- 💵 Economy, finance, markets, business, and investments
|
|
14
|
+
- 📈 Investment-specific discussions
|
|
15
|
+
- ⚔️ War, military conflicts, security, and geopolitics
|
|
16
|
+
- 🌎 Global politics and international affairs
|
|
17
|
+
- ⚖️ Local politics, laws, courts, regulation, and public policy
|
|
18
|
+
- 💻 Technical or technology-related threads
|
|
19
|
+
|
|
20
|
+
Use very little detail for:
|
|
21
|
+
- 🤣 Jokes, memes, dunking, and viral one-liners
|
|
22
|
+
- Hate speech, insults, outrage cycles, flame wars, and personal attacks
|
|
23
|
+
- Repetitive political fights with little new information
|
|
24
|
+
|
|
25
|
+
For meme-only or joke-only posts, summarize each distinct meme/joke in one short line at most. Omit them entirely if they add no meaningful signal.
|
|
26
|
+
|
|
27
|
+
## Thread and repost handling
|
|
28
|
+
|
|
29
|
+
When a repost, quote-post, or short comment does not add meaningful context by itself:
|
|
30
|
+
- Follow the thread or referenced post as far as needed, up to the root post.
|
|
31
|
+
- Use the root post, relevant replies, linked sources, and external references to infer the actual topic.
|
|
32
|
+
- Summarize the underlying discussion, not merely the repost text.
|
|
33
|
+
- Cite the most meaningful post or source, not necessarily the repost.
|
|
34
|
+
|
|
35
|
+
If an external link is central to the discussion, read it and incorporate its relevant context.
|
|
36
|
+
|
|
37
|
+
## Output structure
|
|
38
|
+
|
|
39
|
+
Start with:
|
|
40
|
+
|
|
41
|
+
# Summary
|
|
42
|
+
|
|
43
|
+
Write one short paragraph summarizing the general trending topics across the input data.
|
|
44
|
+
|
|
45
|
+
Then include the following sections, only if they contain relevant content:
|
|
46
|
+
|
|
47
|
+
# Following
|
|
48
|
+
|
|
49
|
+
Topics discussed by people I follow.
|
|
50
|
+
|
|
51
|
+
# For You
|
|
52
|
+
|
|
53
|
+
Topics from the For You feed, excluding anything already covered under Following.
|
|
54
|
+
|
|
55
|
+
# Monitored
|
|
56
|
+
|
|
57
|
+
Topics from monitored accounts, lists, keywords, or sources.
|
|
58
|
+
|
|
59
|
+
Omit empty sections. Omit duplicate topics across sections unless the same topic has materially different discussion angles.
|
|
60
|
+
|
|
61
|
+
## Topic format
|
|
62
|
+
|
|
63
|
+
Within each section, group content by main topic. Use this format:
|
|
64
|
+
|
|
65
|
+
## {Emoji} {Topic title}
|
|
66
|
+
|
|
67
|
+
- Concise summary of the discussion, including key claims, facts, disagreements, and context.
|
|
68
|
+
- Mention the people I follow or monitored accounts discussing it.
|
|
69
|
+
- Include meaningful references as Markdown links.
|
|
70
|
+
- If relevant, add one short note explaining why the topic matters.
|
|
71
|
+
|
|
72
|
+
Keep each bullet short. Prefer 1–10 bullets per topic unless the topic is highly important or technically complex.
|
|
73
|
+
|
|
74
|
+
Add a leading emoji to every bullet point if there is an emoji that would help to quickly identify that topic.
|
|
75
|
+
Do not replicate the session topic emoji.
|
|
76
|
+
|
|
77
|
+
## References and attribution
|
|
78
|
+
|
|
79
|
+
Always link to posts that are meaningful to each summary item.
|
|
80
|
+
|
|
81
|
+
When citing one to three specific posts, link directly to those posts.
|
|
82
|
+
|
|
83
|
+
When referring broadly to a person use `[@${handle}](https://x.com/${handle})`.
|
|
84
|
+
|
|
85
|
+
If one bullet point would contain more than 3 posts of the same user, then refer to the person handle instead of individual posts.
|
|
86
|
+
|
|
87
|
+
Avoid over-citing low-value replies, reposts, memes, or duplicated claims.
|
|
88
|
+
|
|
89
|
+
## Emoji taxonomy
|
|
90
|
+
|
|
91
|
+
Use emojis to make topics easy to scan:
|
|
92
|
+
|
|
93
|
+
- 🤣 jokes and memes
|
|
94
|
+
- ⚔️ war and conflicts
|
|
95
|
+
- 💵 economy, finance, business
|
|
96
|
+
- 🌎 global politics or worldwide topics
|
|
97
|
+
- ⚖️ local politics, law, courts, regulation
|
|
98
|
+
- 💻 technology
|
|
99
|
+
- 🚗 cars
|
|
100
|
+
- ⚽️ sports
|
|
101
|
+
- 📈 investments
|
|
102
|
+
|
|
103
|
+
Add other emojis when useful for uncovered topics, but keep them intuitive and consistent.
|
|
104
|
+
|
|
105
|
+
## Style rules
|
|
106
|
+
|
|
107
|
+
- Output only the Markdown summary.
|
|
108
|
+
- Be concise, factual, and neutral.
|
|
109
|
+
- Do not include meta-commentary about the summarization process.
|
|
110
|
+
- Do not speculate beyond the provided data and referenced sources.
|
|
111
|
+
- Clearly distinguish facts, claims, rumors, and opinions when needed.
|
|
112
|
+
- Avoid repeating the same information across sections.
|
|
113
|
+
- Preserve important nuance when a topic is controversial or disputed.
|