platform icon indicating copy to clipboard operation
platform copied to clipboard

docs(www): add llms.txt files

Open jdegand opened this issue 5 months ago • 4 comments

PR Checklist

Please check if your PR fulfills the following requirements:

  • [X] The commit message follows our guidelines: https://github.com/ngrx/platform/blob/main/CONTRIBUTING.md#commit
  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [ ] Documentation has been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[X] Other... Please describe: AI context metadata

What is the current behavior?

There are no LLMS.txt files to help AI tools.

Partially #4804

What is the new behavior?

Expose LLMS.txt on new docs site.

The llms-full.txt file contains mostly all markdown content files from the www folder. I removed some architecture entries that have no real content. I used gitingest.com and removed the extra file headers it adds. The full file is very large. I removed some repeated stuff in the markdown files like the maintenance mode warning of the data package and the recommendation to use signals store. Things like recommendations are likely better suited to a cursor rules or something similar. I put the files in the public folder of the www folder. The NgRx docs doesn't have a public folder and I guess that stuff is getting removed so I decided to just add this to the new docs.

Does this PR introduce a breaking change?

[ ] Yes
[X] No

Other information

jdegand avatar Jul 21 '25 01:07 jdegand

Deploy Preview for ngrx-io canceled.

Built without sensitive environment variables

Name Link
Latest commit 950a8065331e9454b81173b26ebc8a0fff4c226b
Latest deploy log https://app.netlify.com/projects/ngrx-io/deploys/687d939fbe0e9b0008bcf28b

netlify[bot] avatar Jul 21 '25 01:07 netlify[bot]

Deploy Preview for ngrx-site-v19 ready!

Name Link
Latest commit 950a8065331e9454b81173b26ebc8a0fff4c226b
Latest deploy log https://app.netlify.com/projects/ngrx-site-v19/deploys/687d939f9787090008ea4b62
Deploy Preview https://deploy-preview-4893--ngrx-site-v19.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Jul 21 '25 01:07 netlify[bot]

@timdeschryver There is a website called firecrawl that provides an endpoint to get llms files. Potentially, you could setup a monthly API request to get a new file. Also, you would need to vet security of using this.

Looking at GitHub action solutions:

name: Merge Markdown Files

on:
  push:
    branches: [main]
    paths:
      - 'projects/www/src/app/pages/guide/**/*.md'

jobs:
  merge:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install merge-markdown
        run: npm install -g @knennigtri/merge-markdown
      - name: Merge files
        run: merge-markdown -i projects/www/src/app/pages/guide/*.md -o projects/www/public/llms-full.txt

  • markdown-autodocs
    • This seems more suited to getting specific sections of files versus the full file.

Note: the workflow code needs to be slightly tweaked to commit newly created file back to the main branch.

jdegand avatar Jul 22 '25 18:07 jdegand

I should mention that using the markdown itself in the llms-full.txt file shouldn't trip up the AI (having app-code-example inside the txt file versus backticks with ts).

jdegand avatar Jul 22 '25 18:07 jdegand