Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions public/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ Tiny Studio is a small product company behind Promptly, Drishti, and 0509.
- Support: https://tinystudio.in/support/
- Contact: https://tinystudio.in/contact/
- Privacy: https://tinystudio.in/privacy/
- Privacy choices: https://tinystudio.in/privacy-choices/
- Terms: https://tinystudio.in/terms/
- Promptly: https://tinystudio.in/promptly/
- Promptly support: https://tinystudio.in/promptly/support/
- Promptly privacy: https://tinystudio.in/promptly/privacy/
- Drishti: https://tinystudio.in/drishti/
- Drishti support: https://tinystudio.in/drishti/support/
- Drishti privacy: https://tinystudio.in/drishti/privacy/

## Product boundaries

Expand Down
22 changes: 22 additions & 0 deletions scripts/prepare-static-site-bundle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,14 @@ Tiny Studio is a small product company behind Promptly, Drishti, and 0509.
- Support: https://tinystudio.in/support/
- Contact: https://tinystudio.in/contact/
- Privacy: https://tinystudio.in/privacy/
- Privacy choices: https://tinystudio.in/privacy-choices/
- Terms: https://tinystudio.in/terms/
- Promptly: https://tinystudio.in/promptly/
- Promptly support: https://tinystudio.in/promptly/support/
- Promptly privacy: https://tinystudio.in/promptly/privacy/
- Drishti: https://tinystudio.in/drishti/
- Drishti support: https://tinystudio.in/drishti/support/
- Drishti privacy: https://tinystudio.in/drishti/privacy/

## Product boundaries

Expand All @@ -89,6 +94,7 @@ async function main() {
await fs.writeFile(cssPath, css);
await fs.copyFile(iconPath, appleIconPath);
await fs.writeFile(path.join(root, "llms.txt"), llmsTxt);
assertLlmsTxtCoversPublicPages(llmsTxt);

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 Badge Run the coverage assertion in CI

When a future PR removes an entry from the template or edits the committed public/llms.txt without explicitly running npm run site:prepare, this assertion never executes: the checked .github/workflows/codex-ci.yml runs npm run ci, whose only handling of this script is node --check. Consequently all repository checks can pass with incomplete or stale coverage, contrary to the intended regression guard. Add a non-mutating coverage test to npm run ci, or run generation there and fail when it leaves a diff.

Useful? React with 👍 / 👎.


for (const relativeFile of htmlFiles) {
const filePath = path.join(root, relativeFile);
Expand Down Expand Up @@ -143,6 +149,22 @@ function addSupportSchema(html) {
return html.replace(/(\s*<link rel="apple-touch-icon")/, `\n${script}$1`);
}

function pageUrlFor(relativeFile) {
return relativeFile === "index.html"
? "https://tinystudio.in/"
: `https://tinystudio.in/${path.posix.dirname(relativeFile)}/`;
}

function assertLlmsTxtCoversPublicPages(content) {
const publicFiles = htmlFiles.filter((relativeFile) => relativeFile !== "404.html");

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 Badge Derive coverage from the actual public page set

When a new public/**/index.html page is added and deployed but is accidentally omitted from the manually maintained htmlFiles array, this assertion never considers its URL and still passes while llms.txt remains incomplete. Since the repository already has a recursive public-page enumeration pattern and sitemap.xml is the stated source being matched, build the expected URL set from one of those sources rather than from the same hand-maintained list used by this generator.

Useful? React with 👍 / 👎.

const missing = publicFiles
.map(pageUrlFor)
.filter((url) => !content.includes(url));

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 Badge Require exact URL entries in the coverage guard

When the Home, Promptly, or Drishti landing-page line is removed from llms.txt, this substring check still succeeds because https://tinystudio.in/ appears in every child URL and each product URL appears in its support/privacy URLs. The generator therefore exits successfully while omitting one of those public pages, so the new guard does not reliably prevent the regression it is intended to catch; parse the listed URLs or compare complete lines instead.

Useful? React with 👍 / 👎.

if (missing.length) {
throw new Error(`llms.txt does not list every public page; missing: ${missing.join(", ")}`);
}
}

async function assertLocalAssetsExist() {
const referenced = new Set();
for (const relativeFile of htmlFiles) {
Expand Down