Skip to content

ci: index the docs on Context7 and refresh on push - #69

Merged
cardmagic merged 2 commits into
masterfrom
ci/context7
Oct 8, 2026
Merged

cardmagic merged 2 commits into
masterfrom
ci/context7

Conversation

@cardmagic

Copy link
Copy Markdown
Owner

Why

Context7 has no simple-rss library yet. A search returns only Ruby's standard rss library, so coding agents that use Context7 cannot retrieve this gem's API.

What changes

  • context7.json indexes the README and CHANGELOG and leaves out test/, sig/, .github/, AGENTS.md, and CLAUDE.md. It gives agents six rules taken from the README: installation, parse and fetch, the nil result for 304 Not Modified, the optional Nokogiri dependency of discover, normalized_entries, and to_xml. It also carries the url and public_key that Context7 reads to verify the maintainer's claim. The public_key is the maintainer's public account key, which Context7 designs to be committed.
  • .github/workflows/context7-refresh.yml asks Context7 to refresh the index after a push to master that changes the README, CHANGELOG, or context7.json. Context7 allows one refresh every 10 days for a library and answers too-early before then; that answer ends the job with a notice. Any other non-200 answer fails the job. The CONTEXT7_API_KEY repository secret is set.

No CHANGELOG entry: AGENTS.md says that tooling edits do not need a release-note bullet.

Validation

  • actionlint passes, and context7.json parses.
  • Each rule was checked against lib/: fetch returns nil on Net::HTTPNotModified, discover raises SimpleRSS::DiscoveryDependencyError without Nokogiri HTML5 support, and normalized_entries and to_xml(format:) exist.

Context7 has no simple-rss library yet; a search returns only Ruby's
standard rss library, so agents that use Context7 cannot retrieve
this gem's API.

context7.json indexes the README and CHANGELOG, leaves out the tests,
signatures, workflows, and maintainer files, and gives agents six
rules taken from the README and checked against lib/. It also
carries the url and public_key that Context7 reads to verify the
maintainer's claim on the library.

The refresh workflow asks Context7 to refresh the index after a push
to master that changes the README, the CHANGELOG, or context7.json.
Context7 allows one refresh every 10 days for one library and answers
too-early before then, so that answer ends the job with a notice. Any
other non-200 answer fails the job.
@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High risk] Adds CI workflow that uses a stored API credential.

The PR appears safe to merge; the previous export-guidance issue is fixed.

What we checked:

  • JSON Feed export advice: The rule now limits XML export to parsed XML feeds and warns that JSON Feed raises an error.

Summary

Adds Context7 indexing settings and a workflow that requests a refresh after documentation changes on master.

  • The latest commit fixes the previous export guidance by limiting to_xml to parsed XML feeds.
  • The exclusion lists keep the same values; only their formatting changed.
  • No new issues or repository-rule violations were found.

Reviews (2) · Last reviewed commit: "ci: limit the to_xml rule to XML feeds" · Reviewed by Greptile

Comment thread context7.json Outdated
"SimpleRSS.fetch returns nil when a conditional GET answers 304 Not Modified, so handle nil when you poll with ETag or Last-Modified.",
"SimpleRSS.discover finds the feeds that a website advertises. It needs gem \"nokogiri\", \">= 1.16\", \"< 2\" on CRuby; without HTML5 support it raises SimpleRSS::DiscoveryDependencyError before any request.",
"Use normalized_entries for consistent URLs, dates, content, authors, categories, and attachments across RSS, Atom, and JSON Feed.",
"simple-rss reads feeds and does not generate new ones. To write a parsed feed back out, use to_xml(format: :rss2) or to_xml(format: :atom)."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 JSON Feed guidance suggests unsupported export

This rule recommends to_xml for any parsed feed, but JSON Feed input makes that call raise SimpleRSSError. Agents following it may suggest export code that fails. Limit the recommendation to parsed XML feeds and note that JSON Feed cannot be converted to XML.

Suggested change
"simple-rss reads feeds and does not generate new ones. To write a parsed feed back out, use to_xml(format: :rss2) or to_xml(format: :atom)."
"simple-rss reads feeds and does not generate new ones. To write a parsed XML feed back out, use to_xml(format: :rss2) or to_xml(format: :atom). Calling to_xml on a JSON Feed raises SimpleRSSError; JSON Feed to XML conversion is not supported."

Knowledge Base Used: Feed parsing API and XML model

Prompt To Fix With AI
This is a comment left during a code review.
Path: context7.json
Line: 16

Comment:
**JSON Feed guidance suggests unsupported export**

This rule recommends `to_xml` for any parsed feed, but JSON Feed input makes that call raise `SimpleRSSError`. Agents following it may suggest export code that fails. Limit the recommendation to parsed XML feeds and note that JSON Feed cannot be converted to XML.

```suggestion
    "simple-rss reads feeds and does not generate new ones. To write a parsed XML feed back out, use to_xml(format: :rss2) or to_xml(format: :atom). Calling to_xml on a JSON Feed raises SimpleRSSError; JSON Feed to XML conversion is not supported."
```

**Knowledge Base Used:** [Feed parsing API and XML model](https://app.greptile.com/craftsmanfounder/-/custom-context/knowledge-base/cardmagic/simple-rss/-/docs/feed-parsing-api.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 88bac66 with your suggested wording. Confirmed in lib/simple-rss.rb: to_xml raises SimpleRSSError "JSON Feed to XML conversion is not supported" when the feed is a JSON Feed.

Review feedback on #69. The rule recommended to_xml for any parsed feed,
but to_xml raises SimpleRSSError for a JSON Feed (lib/simple-rss.rb and
the README both say so). The rule now limits to_xml to parsed XML feeds
and states that JSON Feed to XML conversion is not supported.
@cardmagic

Copy link
Copy Markdown
Owner Author

@greptileai Please review the latest commit 88bac66. The to_xml rule is now limited to parsed XML feeds, as you suggested.

@cardmagic
cardmagic merged commit d906ed5 into master Oct 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant