Skip to content

Enhance demo UI feedback and update documentation for LLMs#101

Merged
purushpsm147 merged 6 commits into
mainfrom
llm-hack
Apr 7, 2026
Merged

Enhance demo UI feedback and update documentation for LLMs#101
purushpsm147 merged 6 commits into
mainfrom
llm-hack

Conversation

@purushpsm147

@purushpsm147 purushpsm147 commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces comprehensive improvements to PassiveIntent's LLM (Large Language Model) accessibility and documentation. It adds new LLM-friendly documentation files, updates the site metadata and sitemap to advertise these resources, and includes minor UI improvements in the Bloom filter demo for better DOM safety and clarity.

LLM Documentation & Discoverability:

  • Added two new LLM-readable documentation files: a concise summary (llms.txt) and a detailed technical overview (llms-full.txt), providing AI tools and users with structured, accessible information about PassiveIntent's features, architecture, and licensing. [1] [2]
  • Updated landing/index.html to include <link rel="alternate"> tags referencing the new LLM documentation files, improving discoverability by AI agents and search engines.
  • Added entries for the new LLM documentation files in landing/sitemap.xml with appropriate priorities, and updated the main page's lastmod date.
  • Updated landing/robots.txt to include a LLMs: directive pointing to llms.txt, signaling to AI crawlers where to find LLM-specific content.

Demo UI Improvements:

  • Refactored the DOM update logic in the Bloom filter demo (demo/src/main.ts) to use replaceChildren and DOM element creation instead of directly setting innerHTML. This enhances security, prevents potential XSS issues, and improves maintainability.## Description

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor / chore

Checklist

  • My code follows the project's style guidelines
  • I have run npm run lint and npm run typecheck locally
  • I have added/updated tests that prove my fix or feature works
  • All existing tests pass (npm run test:unit -w @passiveintent/core)
  • I have updated documentation where applicable

Summary by CodeRabbit

  • Documentation

    • Added comprehensive LLM-readable product overview and detailed technical specifications for PassiveIntent to improve discoverability and integration.
    • Added plain-text overview and full-spec links in site HTML head.
  • Chores

    • Updated crawler directives and refreshed sitemap with new documentation entries and timestamps.
  • Bug Fixes / UI

    • Improved demo result rendering for safer, more consistent display of membership/test outcomes.

Copilot AI review requested due to automatic review settings April 7, 2026 19:39
@coderabbitai

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@purushpsm147 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 16 minutes and 38 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 16 minutes and 38 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b189b571-9b2b-4e5f-a564-c10590d54694

📥 Commits

Reviewing files that changed from the base of the PR and between 01ef22d and 51de0e7.

📒 Files selected for processing (2)
  • landing/llms-full.txt
  • landing/llms.txt
📝 Walkthrough

Walkthrough

Refactors the bloom-filter demo to build result DOM nodes programmatically and adds two LLM-facing docs plus landing metadata updates (HTML links, robots.txt, sitemap lastmod and entries).

Changes

Cohort / File(s) Summary
Demo Refactoring
demo/src/main.ts
Replaced innerHTML template-string rendering for bloom membership/test results with programmatic DOM construction (createElement, textContent, appendChild, replaceChildren). Preserves CSS classes and displayed values.
LLM Documentation
landing/llms.txt, landing/llms-full.txt
Added short LLM-readable overview (llms.txt) and an extended full-spec (llms-full.txt) describing PassiveIntent architecture, math primitives, state classification, integrations, use cases, privacy guarantees, and licensing.
Landing Page Metadata
landing/index.html, landing/robots.txt, landing/sitemap.xml
Inserted <link rel="alternate" type="text/plain"> entries for the new docs in index.html; added LLMs directive pointing to /llms.txt in robots.txt; updated sitemap lastmod and added entries for llms.txt and llms-full.txt.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

codex

Poem

🐇 I hop and nudge each DOM node into place,
Building tiny branches with careful grace.
Docs bloom like clover across the site,
Crawlers nibble, sitemaps sleep tight —
A rabbit’s work, soft, swift, and bright. 🌿

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: LLM documentation files and demo UI refactoring. It is concise and specific.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch llm-hack

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
landing/robots.txt (1)

5-5: Non-standard LLMs: directive in robots.txt.

The LLMs: directive is not part of the official robots.txt specification (RFC 9309). Standard crawlers will ignore it, and there's no guarantee LLM crawlers will recognize it either — this is an emerging convention without formal standardization.

The intent is good, but consider whether linking to /llms.txt via <link rel="alternate"> in HTML (which you've done in index.html) and sitemap entries are sufficient for discoverability without adding a non-standard directive here.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@landing/robots.txt` at line 5, Remove the non-standard "LLMs:
https://passiveintent.dev/llms.txt" directive from robots.txt (the "LLMs:" line)
because it's not part of RFC 9309; either delete that line or convert it into a
commented note using "#" if you want to keep it for humans, and rely on the
existing <link rel="alternate"> in index.html and sitemap entries for
discoverability instead.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@landing/llms-full.txt`:
- Around line 80-98: Replace the invalid example that uses createIntentEngine,
threshold, and calibrate with the real public API: instantiate IntentManager (or
the createBrowserIntent factory) and pass only valid IntentManagerConfig options
such as storageKey, namespace, baselineMeanLL, baselineStdLL, smoothingAlpha,
and optional bloom/graph objects; update event handlers to subscribe to
'hesitation_detected' (not 'hesitation') and ensure manager.start() is used;
consult the IntentManagerConfig and IntentEventMap types to confirm the exact
config keys and the hesitation_detected event payload shape before updating the
example.

In `@landing/llms.txt`:
- Around line 35-37: The Vanilla JS Quick Start import is incorrect: replace the
non-existent export createIntentEngine with a real export such as IntentManager
(class) or createBrowserIntent (factory) so the example will import a valid
symbol; update the example import line and subsequent usage to instantiate via
new IntentManager(...) or createBrowserIntent(...) to match the chosen symbol
and avoid runtime import errors.

---

Nitpick comments:
In `@landing/robots.txt`:
- Line 5: Remove the non-standard "LLMs: https://passiveintent.dev/llms.txt"
directive from robots.txt (the "LLMs:" line) because it's not part of RFC 9309;
either delete that line or convert it into a commented note using "#" if you
want to keep it for humans, and rely on the existing <link rel="alternate"> in
index.html and sitemap entries for discoverability instead.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 68dd552a-8b87-4391-bfd6-db2ccaa65203

📥 Commits

Reviewing files that changed from the base of the PR and between fce7a01 and 6e458b1.

📒 Files selected for processing (6)
  • demo/src/main.ts
  • landing/index.html
  • landing/llms-full.txt
  • landing/llms.txt
  • landing/robots.txt
  • landing/sitemap.xml

Comment thread landing/llms-full.txt
Comment thread landing/llms.txt Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves PassiveIntent’s LLM-oriented discoverability by adding dedicated plain-text documentation resources and advertising them via the landing site metadata, while also tightening DOM update safety in the Bloom filter demo UI.

Changes:

  • Added LLM-readable documentation endpoints (llms.txt, llms-full.txt) and linked them from the homepage, sitemap, and robots directives.
  • Updated landing/sitemap.xml and landing/robots.txt to expose the new documentation resources to crawlers.
  • Refactored the Bloom filter demo result rendering to avoid innerHTML and use safe DOM node construction.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
landing/sitemap.xml Adds sitemap entries for LLM docs and updates lastmod.
landing/robots.txt Adds an LLMs: directive pointing to llms.txt.
landing/llms.txt New concise LLM-facing summary doc.
landing/llms-full.txt New expanded technical LLM-facing doc with examples and licensing notes.
landing/index.html Adds <link rel="alternate"> references to the LLM docs.
demo/src/main.ts Replaces innerHTML usage with replaceChildren + created elements for safer rendering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread landing/llms.txt Outdated
Comment thread landing/llms.txt
Comment thread landing/llms.txt
Comment thread landing/llms-full.txt
Comment thread landing/llms-full.txt
Comment thread landing/llms-full.txt Outdated
@purushpsm147 purushpsm147 merged commit 476f7ce into main Apr 7, 2026
7 checks passed
@purushpsm147 purushpsm147 deleted the llm-hack branch April 7, 2026 19:54
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.

2 participants