Skip to content

Commit 7e4e64c

Browse files
committed
docs(skills): use bundled llms index
1 parent e2a1e06 commit 7e4e64c

2 files changed

Lines changed: 12 additions & 29 deletions

File tree

.agents/skills/rstack-cli-best-practices/SKILL.md

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,14 @@ Before any Rstack work, find and read the relevant Markdown documentation shippe
1111
installed `rstack` package. Model knowledge and summaries in this skill can be outdated; the
1212
installed documentation is the source of truth for the project's Rstack version.
1313

14-
1. Read only the pages relevant to the task under `node_modules/rstack/dist/docs` before proposing
15-
or making changes.
14+
1. Start with `node_modules/rstack/dist/docs/llms.txt`, then read only the linked pages relevant to
15+
the task before proposing or making changes.
1616

17-
2. If the correct page is unclear, start with the documentation index and search the documentation
18-
root with `rg -n "<keyword>" <docs-root>`.
17+
2. If `llms.txt` is unavailable, start with `node_modules/rstack/dist/docs/index.md` and search the
18+
documentation directory with `rg -n "<keyword>" node_modules/rstack/dist/docs`.
1919

2020
3. For exact CLI flags and behavior, also run `rs -h` or `rs <command> -h` when supported.
2121

2222
If the bundled docs are not available at that path, locate the installed `rstack` package. If they
2323
are still unavailable, verify that `rstack` is installed, report the installed version, and use CLI
2424
help plus the online Rstack documentation as a fallback. Do not guess from model memory.
25-
26-
## Documentation map
27-
28-
These links target the usual project-local skill installation. If a link does not resolve, open
29-
the same relative path under the resolved documentation root.
30-
31-
- [Overview](../../../node_modules/rstack/dist/docs/index.md)
32-
- [Quick start and command overview](../../../node_modules/rstack/dist/docs/guide/quick-start.md)
33-
- [Configuration](../../../node_modules/rstack/dist/docs/guide/configuration.md)
34-
- [API and import paths](../../../node_modules/rstack/dist/docs/guide/api-reference.md)
35-
- [Monorepos](../../../node_modules/rstack/dist/docs/guide/monorepo.md)
36-
- [Testing](../../../node_modules/rstack/dist/docs/guide/testing.md)
37-
- [Formatting](../../../node_modules/rstack/dist/docs/guide/formatting.md)
38-
- CLI commands: [dev](../../../node_modules/rstack/dist/docs/guide/cli/dev.md),
39-
[build](../../../node_modules/rstack/dist/docs/guide/cli/build.md),
40-
[preview](../../../node_modules/rstack/dist/docs/guide/cli/preview.md),
41-
[lib](../../../node_modules/rstack/dist/docs/guide/cli/lib.md),
42-
[doc](../../../node_modules/rstack/dist/docs/guide/cli/doc.md),
43-
[test](../../../node_modules/rstack/dist/docs/guide/cli/test.md),
44-
[lint](../../../node_modules/rstack/dist/docs/guide/cli/lint.md),
45-
[fmt](../../../node_modules/rstack/dist/docs/guide/cli/fmt.md),
46-
[setup](../../../node_modules/rstack/dist/docs/guide/cli/setup.md), and
47-
[staged](../../../node_modules/rstack/dist/docs/guide/cli/staged.md)

scripts/prepare-release.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22
import { spawn } from 'node:child_process';
3-
import { copyFile, mkdir, readdir, rm } from 'node:fs/promises';
3+
import { copyFile, mkdir, readFile, readdir, rm, writeFile } from 'node:fs/promises';
44
import path from 'node:path';
55

66
const rootDir = path.resolve(import.meta.dirname, '..');
@@ -71,4 +71,10 @@ for (const relativePath of markdownFiles) {
7171
await copyFile(path.join(websiteDistDir, relativePath), destination);
7272
}
7373

74-
console.log(`Copied ${markdownFiles.length} English Markdown files to ${packageDocsDir}.`);
74+
const llmsTxt = await readFile(path.join(websiteDistDir, 'llms.txt'), 'utf8');
75+
const packageLlmsTxt = llmsTxt.replace(/\]\(\/(?!\/)/g, '](./');
76+
await writeFile(path.join(packageDocsDir, 'llms.txt'), packageLlmsTxt);
77+
78+
console.log(
79+
`Copied ${markdownFiles.length} English Markdown files and llms.txt to ${packageDocsDir}.`,
80+
);

0 commit comments

Comments
 (0)