Skip to content

Add news-articles category schema, examples, and tests#15

Merged
keepsloading merged 4 commits into
Memact:mainfrom
Akshatshukla-25:feature/news-articles-schema
Jun 3, 2026
Merged

Add news-articles category schema, examples, and tests#15
keepsloading merged 4 commits into
Memact:mainfrom
Akshatshukla-25:feature/news-articles-schema

Conversation

@Akshatshukla-25

Copy link
Copy Markdown
Contributor

Description

Closes #9

This PR adds the news-articles category schema to translate raw reading activity into user-readable Wiki entry proposals. It fully enforces the core product rule: reading a single article should never become a permanent identity claim.

What was done:

  • Category Schema (src/categories/news-articles.mjs): Defines context fields, permission suggestions, and sensitive keyword rules. Implements normalization logic that graduates topics to durable interests only when read $\ge 3$ times across $\ge 2$ distinct days.
  • Sensitive Clicks Protection: Automatically caps confidence at 0.4 and flags requires_user_confirmation: true for sensitive topics (politics, health, religion, finance) to protect user identity.
  • Examples (examples/news-articles/): Includes comprehensive JSON flows showing raw app dumps, normalized context models, and human-readable Wiki entry templates.
  • Tests (test/news-articles.test.mjs): Native test suite verifying durable graduation, temporary curiosity clicks, same-day research bings, sensitive topic protection, and preference mapping. All tests pass successfully.

keepsloading commented Jun 1, 2026

Copy link
Copy Markdown
Member

@Akshatshukla-25 Thanks, this is a strong contribution and you clearly understood the main Memact rule: reading one article should not become a permanent identity claim.

A few changes before merge:

  1. Please fix the format pluralization bug. The current code turns summary into summarys. It should be summaries, and the test should assert the corrected value.

  2. Please soften the Wiki proposal wording a bit. Phrases like “Frequently reads articles about X” and “Maintains a morning reader reading routine” feel too stable/identity-like. Prefer wording like “Recently reads several articles about X” or “Often reads articles in the morning.”

  3. Please mark the sensitive keyword list as draft/heuristic. Some keywords like policy and government may over-trigger, so it should be clear this is a first-pass protection rule, not a final sensitivity system.

Other than that, the direction is good. The durable vs temporary split and sensitive-topic protection match the issue well.


@MohitBareja16 @adikulkarni006 Can you please review the PR once?

Copy link
Copy Markdown
Member

Small support note: if you like what Memact is trying to build, please consider following the Memact GitHub org and starring the repo. It helps the project get a little more visibility while SSoC26 contributions come in.

@Akshatshukla-25

Copy link
Copy Markdown
Contributor Author

@keepsloading, I made the changes you said and thank you for the feedback.

@Akshatshukla-25

Copy link
Copy Markdown
Contributor Author

Can you merge it

@keepsloading keepsloading merged commit 189435c into Memact:main Jun 3, 2026
@keepsloading

Copy link
Copy Markdown
Member

Can you merge it

Done. Sorry for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add news-articles category schema

2 participants