A skill for AI agents that want to produce better daily reports and discover more of what their users actually want. Scans source front pages, diffs them against yesterday, prescreens with a weighted profile, reviews with an LLM, deduplicates, publishes, and evolves the profile from user feedback. All decisions go to an append-only tape for audit and replay.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
A skill for AI agents that want to produce better daily reports and discover more of what their users actually want. Scans source front pages, diffs them against yesterday, prescreens with a weighted profile, reviews with an LLM, deduplicates, publishes, and evolves the profile from user feedback. All decisions go to an append-only tape for audit and replay.
version
0.1.0
Skill: Aperture
TL;DR — A skill for AI agents that want to produce better daily reports and discover more of what their users actually want. Aperture scans source front pages, diffs them against yesterday, prescreens with a weighted profile, reviews with an LLM, deduplicates, publishes, and evolves the profile from user feedback. All decisions go to an append-only tape.
This skill is implementation-agnostic. An agent can execute it by reading this file, by calling the included Python reference implementation, or by porting the patterns to its own runtime.
1. Purpose
Give agents a deterministic, auditable news-curation skill that replaces static RSS readers and one-shot LLM summarizers:
Scan the front page — treat "reading the front page" as a first-class operation, not just feed polling.
Tape every decision — record every source snapshot, item, rejection reason, profile version, and report in an append-only log for audit and replay.
Learn from user feedback — update the agent's taste through explicit feedback and keep every change versioned and reversible.
When an agent runs this skill, it can answer "why was this selected?" and "what would have been different yesterday?" from the tape.
2. Core concepts
Concept
Meaning
Vertical
A configured news beat (e.g. tech, auto, AI policy). Each vertical has its own sources, profile, and tape.
Tape
Append-only JSONL log. One file per vertical. Every source snapshot, item, profile version, feedback, and report is a record.
Profile
The vertical's "taste": weighted keywords, categories with bonuses, and negative terms. Versioned; every change is logged.
Scan
Fetch each source's list page, extract titles/links, normalize URLs, diff against the previous snapshot.
Reflection loop
User feedback → parsed profile operations → version bump → evolution record → recheck recently pooled items.
Goal: produce today's candidate items from each configured source.
Steps:
For each source, fetch list_url.
Extract {title, url} pairs using the source's extract_profile:
rss — parse <item> blocks.
generic_links — parse <a href> tags.
regex — apply a regex with named groups for title/url/date.
json_api — navigate a JSON path and read title/url keys.
Normalize every URL:
Drop fragments and tracking parameters (utm_*, fbclid, etc.).
Strip trailing slash and leading www..
Force https scheme, lowercase host.
Diff against the previous frontpage snapshot for this source (read from tape).
New url_norm values become candidates.
Save the full current snapshot as a new frontpage tape record.
Update source health:
Success → reset fail_count.
Failure → increment fail_count; alert if ≥ 3 consecutive failures.
Why diff against the frontpage instead of parsing publish dates?
Because many sources have unreliable timestamps or anti-scraping layouts. "New on the front page" is a robust proxy for "news in today's window".
Time-window guard (deterministic, not LLM):
For pull sources that do expose pubDate (RSS/Atom), the scanner applies a hard cutoff before diffing. Default window is 36 hours; override with extract_profile.window_hours. Items older than the window are dropped. Items with missing or unparseable dates are excluded by default (missing_date_policy: exclude) because a date the engine cannot verify is a date it cannot trust. Set missing_date_policy: include only for sources where dates are known to be unreliable and frontpage diff is the primary signal.
This rule exists because date-window enforcement is bookkeeping, not judgment. It must be deterministic and auditable — never delegated to an LLM, which is prone to misreading dates and mixing stale stories into today's report.
3.2 Edit — prescreen with the profile
Goal: score candidates with cheap rules; keep the wide funnel.
Trigger: user reads a report and gives feedback, e.g.
"More AI safety stories, fewer sponsored posts, and keep an eye on EU regulation."
Steps:
Parse feedback into profile operations:
add_keyword: {term, weight}
adjust_weight: {term, delta}
remove_keyword: {term}
add_negative: {term, weight}
adjust_negative_weight: {term, delta}
remove_negative: {term}
Apply operations to the profile; bump version.
Write an evolution tape record containing the operations and original feedback text.
Recheck recently pooled items (last 7 days) against the new negatives/lowered weights.
If any would now be filtered, report the count to the user.
Return a confirmation summary.
Decay rule (weekly):
origin: learned terms that have not hit for 30 days lose 1 weight.
Weight 0 → move to a pending-delete list; ask user before removing.
origin: manual terms never auto-delete, only warn.
5. Source-acquisition taxonomy
A source can be acquired in five ways. The engine treats them uniformly once they reach the tape. The report's source registry renders each source as status [name](url) · method so a reader can see at a glance how the source is acquired.
Add a source by registering {id, name, list_url, extract_profile} in the vertical config. A human-feed source sets extract_profile = { method = "human_feed" } and may omit list_url.
Agent-facilitated human-feed
A useful variant is agent-facilitated human-feed: the agent itself performs a
platform search (e.g. on X for posts under an AI hashtag in the last 24–36
hours), curates ≥1 candidate, and injects it through the human-feed channel.
The injected item still goes through the same prescreen, review, and dedup
stages as pull/scan items — human-feed guarantees entry into the candidate
pool, not a free pass into the report.
"Never stop at the message"
A social-media post, headline, or tip is a signal, not a citation. Every
injected item must resolve to the original article URL before it reaches the
tape. If the agent can only find a post URL, scripts/x_hunt.py attempts a
best-effort search for the original article; if that fails, the candidate is
dropped and the reason is recorded on the tape. The published report never
points readers at a post or headline as the final source.
Reference implementation (scripts/x_hunt.py)
scripts/x_hunt.py is deterministic bookkeeping: it writes an already-curated
item to the tape. The search, read, and selection are the agent's judgment
work, performed with the agent's own WebSearch/tools.
# Preferred path: agent has already resolved the headline to the original article URL.
python scripts/x_hunt.py --vertical ai-frontier --source-id ainativef_zh \
--title "OpenAI announces GPT-5" \
--url "https://openai.com/blog/introducing-gpt-5" \
--inject
# If only an X post URL is available, the script tries to resolve the original URL.
python scripts/x_hunt.py --vertical ai-frontier --source-id ainativef_zh \
--title "OpenAI announces GPT-5" \
--url "https://x.com/OpenAI/status/1234567890" \
--inject
# Best-effort automated search fallback (often blocked; use sparingly).
python scripts/x_hunt.py --vertical ai-frontier \
--query "AI artificial intelligence site:x.com" --inject
# Review search fallback candidates without injecting
python scripts/x_hunt.py --vertical ai-frontier \
--query "AI artificial intelligence site:x.com"
The injected record is written to the tape as an item with:
source_id: the registered source id (default owner_tips).
stage: scanned — it enters the pipeline at prescreen.
facilitated_by: agent — auditable provenance.
Dropped records (unresolvable post URLs, off-topic candidates, etc.) are also
appended to the tape with stage: dropped and a drop_reason, so the audit
trail includes what did not make it.
Separation of concerns: judgment (search/read/select/origin-resolution)
belongs to the agent; bookkeeping (normalize URL, allocate id, append to tape)
belongs to the script. This keeps the skill deterministic and leaves
platform-specific retrieval strategies to the agent's own capabilities.
This mode turns the platform from a passive content source into an active
source-discovery hunt: when the agent repeatedly finds good stories from the
same outlet, ECHO can ask "Add '' as a tracked source?" and, on yes,
promote the outlet to a formal pull/scan source. That closed loop is the
skill's self-evolution in action.
6. Tape record types
Each tape line is a JSON object with a type field.
type
fields
source
id, name, vertical, list_url, extract_profile, health
After publishing, optionally run ECHO to ask the user up to two clarification questions:
from engine.echo import ask
questions = ask("tech")
for q in questions:
print(q["question"])
# Later, apply a one-word answer: yes / no / skip / silencefrom engine.echo import apply_answer
apply_answer(question_id, "tech", "yes")
8. ECHO — proactive clarification
ECHO is an optional proactive layer that asks the user up to two one-word
clarification questions after each report. It turns passive readers into active
profile trainers.
ECHO is intentionally split into four stages with the tape as the boundary
between each. This makes delivery failures safe to retry and makes the whole
loop auditable.
prepare — after publish, generate today's clarification questions from
the pooled items and write them to the tape as echo_question records with
status: pending. Expire any unanswered questions from the previous day first.
Human-feed items additionally trigger a source-proposal question:
"Add '' as a tracked source?" The question is generated from
today's human-feed items on the tape regardless of whether the item survived
prescreen — the question is about the source, not the item's score. If the
sample URL is on mp.weixin.qq.com, the question notes that Weixin is a closed
platform and that expansion research is needed. A positive answer records a
source_proposal tape entry; it does not automatically register the source
(owner confirmation is required).
deliver — the cron/delivery layer reads pending questions, posts them
alongside the report, and marks them delivered. No generation happens here;
the layer is pure read + mark.
ingest — when the user replies, record the raw answer on the tape as an
echo_raw_answer record before any interpretation.
distill — before the next run, read yesterday's echo_raw_answer
records, call apply_answer, and mark the questions answered. Any
delivered questions without a raw answer are marked expired and count
toward the ignored limit.
Rules
Evidence-backed: every question cites tape evidence (e.g. "3 items about
'quantum' appeared today").
One-word answer: questions must be answerable with yes / no / skip /
silence.
Polite backoff:
Maximum 2 questions per day.
After 3 consecutive unanswered questions, pause for 3 days.
The user can silence ECHO permanently with the answer silence.
Example questions
"Add 'quantum' as a keyword? (appeared in 3 items today)"
"Filter 'sponsored' as a negative? (appeared twice this week)"
id, date, topic, question, evidence, status (pending/delivered/answered/expired)
echo_delivery
date, question_ids, channel, message_id
echo_raw_answer
date, question_id, answer_text
echo_answer
question_id, answer, applied_ops, profile_version
Reference API
from engine.echo import prepare, record_delivery, record_raw_answer, distill, apply_answer, enable
# 1. Prepare today's questions after publish.
questions = prepare("tech")
# 2. Deliver them (caller's responsibility to post to the channel).
question_ids = [q["id"] for q in questions]
record_delivery("tech", question_ids, channel="#daily", message_id="msg-123")
# 3. Ingest a raw answer when the user replies.
record_raw_answer("tech", question_ids[0], "yes")
# 4. Distill answers into profile operations before the next run.
distill("tech")
# Re-enable after silence.
enable("tech")
9. Why this matters
Static filters drift. One-shot LLMs hallucinate and ignore date windows. This skill separates deterministic bookkeeping (scan, URL normalization, dedup, tape) from judgment (LLM review, feedback parsing) so that:
Every decision is auditable.
Every rejection is a training signal.
The engine's taste evolves with the user's priorities.