Skip to content

Commit 089a70d

Browse files
committed
docs: auto-generate llms.txt and llms-full.txt from mkdocs
- Add scripts/generate-llms-docs.py that parses mkdocs.yml nav order, concatenates all doc pages, and strips MkDocs markup (admonitions, tabs, mermaid, badges) - Generate llms-full.txt (11326 lines: complete docs) and llms.txt (751 lines: overview with links) - Add .github/workflows/update-llm-docs.yaml to regenerate files on each push to docs/ and auto-commit changes - Update .github/workflows/docs.yaml to run generation before mkdocs build - Update docs/llm.md to document the automated process Files now always in sync with source; no manual maintenance needed.
1 parent 1c54296 commit 089a70d

6 files changed

Lines changed: 11316 additions & 993 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333

3434
- run: pip install mkdocs-material
3535

36+
- name: Generate LLM documentation
37+
run: python scripts/generate-llms-docs.py
38+
3639
- run: mkdocs build
3740

3841
- uses: actions/upload-pages-artifact@v3
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update LLM Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
- 'mkdocs.yml'
9+
- 'scripts/generate-llms-docs.py'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
update:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.x'
25+
26+
- name: Generate LLM documentation
27+
run: python scripts/generate-llms-docs.py
28+
29+
- name: Check for changes
30+
id: diff
31+
run: |
32+
git diff --quiet docs/llms.txt docs/llms-full.txt || echo "changed=true" >> "$GITHUB_OUTPUT"
33+
34+
- name: Commit updated LLM docs
35+
if: steps.diff.outputs.changed == 'true'
36+
run: |
37+
git config user.name "github-actions[bot]"
38+
git config user.email "github-actions[bot]@users.noreply.github.com"
39+
git add docs/llms.txt docs/llms-full.txt
40+
git commit -m "docs: regenerate llms.txt and llms-full.txt"
41+
git push

docs/llm.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,15 @@ Nucleus provides machine-readable documentation files designed for Large Languag
66

77
| File | Description | Use Case |
88
|------|-------------|----------|
9-
| [`llms.txt`](../llms.txt) | Concise overview (~145 lines) | Quick context for simple questions |
10-
| [`llms-full.txt`](../llms-full.txt) | Complete documentation (~1900 lines) | Full reference for code generation and in-depth tasks |
9+
| [`llms.txt`](../llms.txt) | Concise overview with links to all sections | Quick context for simple questions |
10+
| [`llms-full.txt`](../llms-full.txt) | Complete documentation (all pages concatenated) | Full reference for code generation and in-depth tasks |
11+
12+
## How They Stay Up to Date
13+
14+
Both files are **auto-generated** from the MkDocs documentation pages by the [`scripts/generate-llms-docs.py`](https://github.com/kdroidFilter/Nucleus/blob/main/scripts/generate-llms-docs.py) script. A GitHub Actions workflow runs this script on every push to `main` that touches `docs/`, so `llms.txt` and `llms-full.txt` are always in sync with the documentation.
15+
16+
!!! tip "Contributing"
17+
Never edit `llms.txt` or `llms-full.txt` manually — edit the source `.md` files in `docs/` and the script regenerates them automatically.
1118

1219
## Usage
1320

@@ -43,11 +50,12 @@ curl -s https://nucleus.kdroidfilter.com/llms-full.txt # complete
4350

4451
- Project overview and key features
4552
- Quick start snippet
46-
- Runtime libraries summary (all 18 libraries)
47-
- Links to all documentation pages
53+
- Getting started guide with prerequisites and installation
54+
- Runtime libraries summary (all libraries)
4855
- Migration guide from `org.jetbrains.compose`
56+
- Links to all documentation pages
4957

50-
**`llms-full.txt`** covers everything above plus:
58+
**`llms-full.txt`** covers everything in the documentation:
5159

5260
- Full Gradle DSL reference (all properties and enums)
5361
- Platform-specific configuration (macOS, Windows, Linux)
@@ -58,13 +66,15 @@ curl -s https://nucleus.kdroidfilter.com/llms-full.txt # complete
5866
- Publishing to GitHub Releases and S3
5967
- CI/CD workflows and all composite actions
6068
- GraalVM Native Image configuration and DSL reference
69+
- Native Access (Kotlin/Native bridge)
6170
- All runtime APIs with code examples:
62-
- Executable type, AOT cache, single instance, deep links
63-
- App metadata (`NucleusApp``appId`, `version`, `vendor`, `description`)
64-
- Taskbar progress (Windows ITaskbarList3, macOS NSDockTile, Linux D-Bus)
65-
- Auto-update with `UpdateLevel` (major/minor/patch) and post-update detection (`consumeUpdateEvent`, `wasJustUpdated`)
66-
- Decorated window (JBR and JNI backends, fullscreen controls, large corner radius, `controlButtonsDirection`, `clientRegion`, `backgroundContent`)
67-
- Design system wrappers (Material 3, Material 2, Jewel)
68-
- Dark mode detector, system color, energy manager
71+
- App metadata, executable type, single instance, deep links
72+
- Decorated window (JBR and JNI backends, fullscreen controls, design system wrappers)
73+
- System tray (ComposeNativeTray framework, Tray API, Menu DSL, TrayApp)
74+
- Notifications (macOS, Windows, Linux)
75+
- Launchers (macOS dock, Windows taskbar, Linux Unity)
76+
- Taskbar progress, global hotkey, macOS menu
77+
- Dark mode detector, system color, system info, energy manager
6978
- Native SSL, native HTTP (java.net.http, OkHttp, Ktor)
70-
- Linux HiDPI, GraalVM runtime bootstrap
79+
- Linux HiDPI, freedesktop icons
80+
- GraalVM runtime bootstrap

0 commit comments

Comments
 (0)