Skip to content

Commit e624aaa

Browse files
authored
Add llms.txt implementation for improved AI/LLM visibility (#16656)
* feat: Add llms.txt implementation for AI/LLM consumption Implement llms.txt standard to improve Pulumi's visibility in AI-generated content and responses. Changes: - Add static llms.txt file with curated Pulumi documentation structure - Configure Hugo to generate llms.txt dynamically via new output format - Create Hugo template for future dynamic llms.txt generation - Add AI bot tracking JavaScript to measure experiment effectiveness - Update AGENTS.md with llms.txt guidance for AI assistants - Track known AI bots: ClaudeBot, Amazonbot, ChatGPT-User, OAI-SearchBot, PerplexityBot The blockquote summary uses Pulumi's Entry Segment Messaging emphasizing: - Real programming languages vs YAML - IDE support, type safety, automated testing - Multi-cloud support (AWS, Azure, GCP, Kubernetes, 150+ providers) - 3x faster deployment with 90% fewer configuration errors Bot detection based on actual traffic data from pulumi.com analytics. * fix: Remove specific metrics claim from llms.txt blockquote Remove '3x faster with 90% fewer configuration errors' from the blockquote summary to keep the messaging focused on core value propositions rather than specific metrics. * fix: Address PR review feedback for llms.txt implementation - Add trailing newlines to all new files (llms.txt, index.llmstxt.txt, ai-bot-tracking.js) - Clarify AGENTS.md documentation: .md URLs are a future enhancement, not currently implemented - Remove Hugo template comment that was generating unwanted blank line in output - Add clarification to JavaScript that bot detection is supplemental client-side tracking (primary measurement is via server-side access logs) These changes address all required fixes from the documentation review and improve code clarity per reviewer suggestions. * feat: Address sicarul's feedback on llms.txt implementation Based on PR review feedback: 1. Move blog content out of 'Optional' section - Created new 'Blog & Resources' section with higher priority - Blog posts are valuable for LLMs to understand recent features and best practices - Case studies remain with blog as related resources 2. Clarify JavaScript/HTML separation - Added clear comments explaining ai-bot-tracking.js is ONLY for HTML pages - Emphasized that JavaScript does NOT interact with llms.txt file - llms.txt is served as plain text, completely separate from website JS 3. Improve blog template visibility - Added example blog posts to static llms.txt to show intended output - Added comment explaining Hugo dynamically generates blog posts - Template filters for high-value posts (IaC, Terraform, Kubernetes topics) These changes address confusion about file purposes and improve content organization. * Simplify llms.txt implementation - Remove AI bot tracking JavaScript entirely - Remove script reference from assets.html - Simplify Hugo template by removing complex blog post generation logic - Update static llms.txt to match simplified structure - Keep blog section as simple link without specific posts This addresses PR review feedback about unnecessary complexity and confusion around the JavaScript tracking * Simplify llms.txt structure - Merge Tutorials & Examples and Blog & Resources into unified Resources section - Remove Optional section (What Is Pulumi?, Community) - Remove CrossGuard reference from IaC section - Rename Hugo template from index.llmstxt.txt to index.llms.txt - Update output format name from LLMSTXT to llms in config
1 parent 2a97d39 commit e624aaa

File tree

5 files changed

+160
-0
lines changed

5 files changed

+160
-0
lines changed

AGENTS.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@ This repository contains the source for the Pulumi website, built with [Hugo](ht
1010

1111
---
1212

13+
## AI Assistant Information (llms.txt)
14+
15+
This repository implements the llms.txt standard for improved AI/LLM consumption:
16+
17+
- **Primary content index**: https://www.pulumi.com/llms.txt
18+
- **Standard**: Following [llms.txt specification](https://llmstxt.org/)
19+
- **Content structure**: Hierarchical documentation index optimized for LLM context windows
20+
- **Focus areas for AI consumption**:
21+
- `/docs/iac/` - Infrastructure as Code documentation
22+
- `/docs/esc/` - Secrets and configuration management
23+
- `/docs/pulumi-cloud/` - Platform capabilities
24+
- `/registry/` - Provider and package documentation
25+
- `/docs/reference/` - API references for all languages
26+
- **Markdown versions**: Future enhancement - URLs may support `.md` extension for markdown-only output
27+
- **Excluding content from llms.txt**: Add `llms_exclude: true` to front matter
28+
29+
When working with Pulumi documentation, consult the llms.txt file first for structured navigation and understanding of the documentation hierarchy.
30+
31+
---
32+
1333
## Build / Test / Lint Workflow
1434

1535
Agents must use these exact commands:

config/_default/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ timeout: 300000
3333
outputFormats:
3434
rss:
3535
baseName: rss
36+
llms:
37+
mediaType: "text/plain"
38+
baseName: "llms"
39+
isPlainText: true
40+
permalinkable: false
3641

3742
# We set the outputs explicitly to just "HTML" as otherwise they default to both
3843
# "HTML" and "RSS", and we only want to generate RSS for the blog section -- not
@@ -43,6 +48,7 @@ outputs:
4348
home:
4449
- HTML
4550
- JSON
51+
- LLMSTXT
4652
section:
4753
- HTML
4854

layouts/index.llms.txt

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{{- /* Generate llms.txt file for AI/LLM consumption */ -}}
2+
{{- /* Static version for now - dynamic generation can be enabled later */ -}}
3+
# Pulumi
4+
5+
> Infrastructure as code using real programming languages. Write, test, and deploy cloud infrastructure with TypeScript, Python, Go, C#, or Java instead of YAML. Get IDE support, type safety, and automated testing for AWS, Azure, GCP, Kubernetes, and 150+ providers.
6+
7+
## Getting Started
8+
9+
{{- range where .Site.RegularPages "Section" "docs" }}
10+
{{- if and (in .RelPermalink "/get-started/") (not (isset .Params "llms_exclude")) }}
11+
- [{{ .Title }}]({{ .Permalink }}){{ if .Params.meta_desc }} - {{ .Params.meta_desc }}{{ end }}
12+
{{- end }}
13+
{{- end }}
14+
- [Core Concepts](https://www.pulumi.com/docs/iac/concepts/) - Projects, stacks, resources, and state
15+
16+
## Infrastructure as Code (IaC)
17+
18+
- [Why Pulumi?](https://www.pulumi.com/docs/iac/) - Real code vs YAML configuration
19+
{{- range where .Site.RegularPages "Section" "docs" }}
20+
{{- if and (in .RelPermalink "/iac/") (not (in .RelPermalink "/get-started/")) (not (isset .Params "llms_exclude")) }}
21+
{{- if or (in .RelPermalink "/languages-sdks/") (in .RelPermalink "/clouds/") (in .RelPermalink "/cli/") (in .RelPermalink "/automation-api/") (in .RelPermalink "/adopting-pulumi/") }}
22+
- [{{ .Title }}]({{ .Permalink }}){{ if .Params.meta_desc }} - {{ .Params.meta_desc | truncate 100 }}{{ end }}
23+
{{- end }}
24+
{{- end }}
25+
{{- end }}
26+
27+
## Pulumi ESC (Environments, Secrets, Configuration)
28+
29+
{{- range where .Site.RegularPages "Section" "docs" }}
30+
{{- if and (in .RelPermalink "/esc/") (not (isset .Params "llms_exclude")) }}
31+
{{- if or (eq .RelPermalink "/docs/esc/") (in .RelPermalink "/get-started/") (in .RelPermalink "/environments/") (in .RelPermalink "/integrations/") (in .RelPermalink "/cli/") }}
32+
- [{{ .Title }}]({{ .Permalink }}){{ if .Params.meta_desc }} - {{ .Params.meta_desc | truncate 100 }}{{ end }}
33+
{{- end }}
34+
{{- end }}
35+
{{- end }}
36+
37+
## Pulumi Cloud Platform
38+
39+
{{- range where .Site.RegularPages "Section" "docs" }}
40+
{{- if and (in .RelPermalink "/pulumi-cloud/") (not (isset .Params "llms_exclude")) }}
41+
{{- if or (eq .RelPermalink "/docs/pulumi-cloud/") (in .RelPermalink "/deployments/") (in .RelPermalink "/copilot/") (in .RelPermalink "/access-management/") (in .RelPermalink "/admin/") }}
42+
- [{{ .Title }}]({{ .Permalink }}){{ if .Params.meta_desc }} - {{ .Params.meta_desc | truncate 100 }}{{ end }}
43+
{{- end }}
44+
{{- end }}
45+
{{- end }}
46+
- [Pulumi Insights](https://www.pulumi.com/docs/insights/) - Infrastructure intelligence and search
47+
48+
## Registry (Providers & Packages)
49+
50+
- [AWS Provider](https://www.pulumi.com/registry/packages/aws/) - Complete AWS resource coverage
51+
- [Azure Native Provider](https://www.pulumi.com/registry/packages/azure-native/) - Full Azure ARM API
52+
- [Google Cloud Provider](https://www.pulumi.com/registry/packages/gcp/) - Complete GCP coverage
53+
- [Kubernetes Provider](https://www.pulumi.com/registry/packages/kubernetes/) - Native Kubernetes support
54+
- [All Providers](https://www.pulumi.com/registry/) - 150+ cloud and SaaS providers
55+
56+
## API Reference
57+
58+
- [Node.js/TypeScript](https://www.pulumi.com/docs/reference/pkg/nodejs/) - Complete TypeScript/JavaScript API
59+
- [Python](https://www.pulumi.com/docs/reference/pkg/python/) - Complete Python API
60+
- [Go](https://www.pulumi.com/docs/reference/pkg/go/) - Complete Go API
61+
- [.NET/C#](https://www.pulumi.com/docs/reference/pkg/dotnet/) - Complete .NET API
62+
- [Java](https://www.pulumi.com/docs/reference/pkg/java/) - Complete Java API
63+
64+
## Resources
65+
66+
- [Tutorials](https://www.pulumi.com/tutorials/) - Hands-on learning paths
67+
- [Examples](https://github.com/pulumi/examples) - Production-ready templates
68+
- [Templates](https://www.pulumi.com/templates/) - Starter templates for common architectures
69+
- [Blog](https://www.pulumi.com/blog/) - Latest features, best practices, and announcements
70+
- [Case Studies](https://www.pulumi.com/case-studies/) - How BMW, Mercedes-Benz, Snowflake use Pulumi

layouts/partials/assets.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
{{ $js := resources.Get "js/bundle.js" | fingerprint }}
1313
<script src="{{ $js.RelPermalink }}" defer></script>
1414

15+
1516
<!--
1617
Our marketing styles diverge a bit from the other parts of the website so we load
1718
in a different bundle on our marketing pages.

static/llms.txt

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Pulumi
2+
3+
> Infrastructure as code using real programming languages. Write, test, and deploy cloud infrastructure with TypeScript, Python, Go, C#, or Java instead of YAML. Get IDE support, type safety, and automated testing for AWS, Azure, GCP, Kubernetes, and 150+ providers.
4+
5+
## Getting Started
6+
7+
- [Installation](https://www.pulumi.com/docs/iac/get-started/install/) - Install Pulumi CLI and tools
8+
- [AWS Quick Start](https://www.pulumi.com/docs/iac/get-started/aws/) - Deploy first AWS infrastructure
9+
- [Azure Quick Start](https://www.pulumi.com/docs/iac/get-started/azure/) - Deploy first Azure infrastructure
10+
- [GCP Quick Start](https://www.pulumi.com/docs/iac/get-started/gcp/) - Deploy first GCP infrastructure
11+
- [Kubernetes Quick Start](https://www.pulumi.com/docs/iac/get-started/kubernetes/) - Deploy to Kubernetes
12+
- [Core Concepts](https://www.pulumi.com/docs/iac/concepts/) - Projects, stacks, resources, and state
13+
14+
## Infrastructure as Code (IaC)
15+
16+
- [Why Pulumi?](https://www.pulumi.com/docs/iac/) - Real code vs YAML configuration
17+
- [Languages & SDKs](https://www.pulumi.com/docs/iac/languages-sdks/) - TypeScript, Python, Go, C#, Java, YAML
18+
- [Cloud Providers](https://www.pulumi.com/docs/iac/clouds/) - AWS, Azure, GCP, Kubernetes guides
19+
- [CLI Commands](https://www.pulumi.com/docs/iac/cli/commands/) - Complete command reference
20+
- [Automation API](https://www.pulumi.com/docs/iac/automation-api/) - Embed Pulumi in your applications
21+
- [Terraform Migration](https://www.pulumi.com/docs/iac/adopting-pulumi/migrate-terraform/) - Migrate from Terraform
22+
- [CloudFormation Migration](https://www.pulumi.com/docs/iac/adopting-pulumi/migrate-cloudformation/) - Migrate from CloudFormation
23+
24+
## Pulumi ESC (Environments, Secrets, Configuration)
25+
26+
- [Overview](https://www.pulumi.com/docs/esc/) - Centralized secrets and configuration management
27+
- [Get Started](https://www.pulumi.com/docs/esc/get-started/) - Quick start guide
28+
- [Environments](https://www.pulumi.com/docs/esc/environments/) - Define and manage environments
29+
- [Integrations](https://www.pulumi.com/docs/esc/integrations/) - Integrate with external secret stores
30+
- [CLI Reference](https://www.pulumi.com/docs/esc/cli/) - ESC command reference
31+
32+
## Pulumi Cloud Platform
33+
34+
- [Overview](https://www.pulumi.com/docs/pulumi-cloud/) - Managed platform capabilities
35+
- [Deployments](https://www.pulumi.com/docs/pulumi-cloud/deployments/) - Automated deployments
36+
- [Pulumi Copilot](https://www.pulumi.com/docs/pulumi-cloud/copilot/) - AI-powered infrastructure
37+
- [Access Management](https://www.pulumi.com/docs/pulumi-cloud/access-management/) - Teams, roles, RBAC
38+
- [Audit Logs](https://www.pulumi.com/docs/pulumi-cloud/admin/audit-logs/) - Compliance and security
39+
- [Pulumi Insights](https://www.pulumi.com/docs/insights/) - Infrastructure intelligence and search
40+
41+
## Registry (Providers & Packages)
42+
43+
- [AWS Provider](https://www.pulumi.com/registry/packages/aws/) - Complete AWS resource coverage
44+
- [Azure Native Provider](https://www.pulumi.com/registry/packages/azure-native/) - Full Azure ARM API
45+
- [Google Cloud Provider](https://www.pulumi.com/registry/packages/gcp/) - Complete GCP coverage
46+
- [Kubernetes Provider](https://www.pulumi.com/registry/packages/kubernetes/) - Native Kubernetes support
47+
- [All Providers](https://www.pulumi.com/registry/) - 150+ cloud and SaaS providers
48+
49+
## API Reference
50+
51+
- [Node.js/TypeScript](https://www.pulumi.com/docs/reference/pkg/nodejs/) - Complete TypeScript/JavaScript API
52+
- [Python](https://www.pulumi.com/docs/reference/pkg/python/) - Complete Python API
53+
- [Go](https://www.pulumi.com/docs/reference/pkg/go/) - Complete Go API
54+
- [.NET/C#](https://www.pulumi.com/docs/reference/pkg/dotnet/) - Complete .NET API
55+
- [Java](https://www.pulumi.com/docs/reference/pkg/java/) - Complete Java API
56+
57+
## Resources
58+
59+
- [Tutorials](https://www.pulumi.com/tutorials/) - Hands-on learning paths
60+
- [Examples](https://github.com/pulumi/examples) - Production-ready templates
61+
- [Templates](https://www.pulumi.com/templates/) - Starter templates for common architectures
62+
- [Blog](https://www.pulumi.com/blog/) - Latest features, best practices, and announcements
63+
- [Case Studies](https://www.pulumi.com/case-studies/) - How BMW, Mercedes-Benz, Snowflake use Pulumi

0 commit comments

Comments
 (0)