diff --git a/docs/llms.md b/docs/llms.md new file mode 100644 index 000000000..d06e46f37 --- /dev/null +++ b/docs/llms.md @@ -0,0 +1,34 @@ +--- +sidebar_position: 5 +sidebar_label: "🤖 LLMs.txt" +title: "LLMs.txt" +--- + +# LLMs.txt + +CoW DAO documentation follows the [llmstxt.org](https://llmstxt.org/) standard, making it easy for AI tools and large language models to understand our documentation. + +## Available files + +| File | Description | +|------|-------------| +| [llms.txt](https://docs.cow.fi/llms.txt) | Structured overview with links to all documentation pages | +| [llms-full.txt](https://docs.cow.fi/llms-full.txt) | Complete documentation content in a single file | + +## Usage + +### Cursor + +Use the `@Docs` feature to add the llms.txt URL as a documentation source. This gives Cursor accurate context about CoW Protocol, CoW AMM, and Governance when generating code suggestions. + +See [Cursor docs](https://docs.cursor.com/context/@-symbols/@-docs) for more details. + +### Windsurf + +Reference the llms.txt file using `@` mentions or add it to your `.windsurfrules` configuration to enhance Windsurf's understanding of CoW DAO products. + +See [Windsurf docs](https://docs.windsurf.com/windsurf/memories) for more details. + +### Other tools + +Any AI tool that supports the llms.txt standard can use these files. Point it to `https://docs.cow.fi/llms.txt` or `https://docs.cow.fi/llms-full.txt` depending on whether you need an overview or full content. diff --git a/docusaurus.config.ts b/docusaurus.config.ts index b0fe17c87..50a2844e1 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -98,6 +98,19 @@ const config: Config = { anonymizeIP: true, }, ], + [ + 'docusaurus-plugin-llms', + { + generateLLMsTxt: true, + generateLLMsFullTxt: true, + excludeImports: true, + removeDuplicateHeadings: true, + ignoreFiles: ['mevblocker/**'], + pathTransformation: { + ignorePaths: ['docs'], + }, + }, + ], ], stylesheets: [ diff --git a/package.json b/package.json index 448dc21c8..1ac9fb925 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@docusaurus/tsconfig": "3.9.2", "@docusaurus/types": "3.9.2", "@types/react": "^18.0.0", + "docusaurus-plugin-llms": "^0.3.0", "docusaurus-plugin-typedoc": "^0.21.0", "dotenv": "^16.3.1", "prettier": "^3.0.3", diff --git a/yarn.lock b/yarn.lock index f17676c50..e072a3928 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5452,6 +5452,15 @@ docusaurus-json-schema-plugin@^1.15.0: monaco-editor-webpack-plugin "^7.1.0" react-monaco-editor "^0.59.0" +docusaurus-plugin-llms@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/docusaurus-plugin-llms/-/docusaurus-plugin-llms-0.3.0.tgz#de4dc96c1cfd460eb92eb5f1a09a63df94e43804" + integrity sha512-JuADAJA2fjTv1U4XQUoIu1LyjISDzxFhRK5HbCZiHum4HlmdPwyx8NBXsi+LfdUyjK9acbZgazGsHPhdwEZs0g== + dependencies: + gray-matter "^4.0.3" + minimatch "^9.0.3" + yaml "^2.8.1" + docusaurus-plugin-typedoc@^0.21.0: version "0.21.0" resolved "https://registry.yarnpkg.com/docusaurus-plugin-typedoc/-/docusaurus-plugin-typedoc-0.21.0.tgz#b65b87acc40689f0fc8ba3aea0420af5fae2ebbb" @@ -10754,16 +10763,7 @@ streamx@^2.15.0, streamx@^2.21.0: optionalDependencies: bare-events "^2.2.0" -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.1.0, string-width@^4.2.0: +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -10812,14 +10812,7 @@ stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -11835,16 +11828,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -11923,6 +11907,11 @@ yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yaml@^2.8.1: + version "2.8.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.2.tgz#5694f25eca0ce9c3e7a9d9e00ce0ddabbd9e35c5" + integrity sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A== + yocto-queue@^1.0.0: version "1.2.1" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.2.1.tgz#36d7c4739f775b3cbc28e6136e21aa057adec418"