Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ This repository contains the source for the Pulumi website, built with [Hugo](ht

---

## AI Assistant Information (llms.txt)

This repository implements the llms.txt standard for improved AI/LLM consumption:

- **Primary content index**: https://www.pulumi.com/llms.txt
- **Standard**: Following [llms.txt specification](https://llmstxt.org/)
- **Content structure**: Hierarchical documentation index optimized for LLM context windows
- **Focus areas for AI consumption**:
- `/docs/iac/` - Infrastructure as Code documentation
- `/docs/esc/` - Secrets and configuration management
- `/docs/pulumi-cloud/` - Platform capabilities
- `/registry/` - Provider and package documentation
- `/docs/reference/` - API references for all languages
- **Markdown versions**: Future enhancement - URLs may support `.md` extension for markdown-only output
- **Excluding content from llms.txt**: Add `llms_exclude: true` to front matter

When working with Pulumi documentation, consult the llms.txt file first for structured navigation and understanding of the documentation hierarchy.

---

## Build / Test / Lint Workflow

Agents must use these exact commands:
Expand Down
6 changes: 6 additions & 0 deletions config/_default/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ timeout: 300000
outputFormats:
rss:
baseName: rss
LLMSTXT:
mediaType: "text/plain"
baseName: "llms"
isPlainText: true
permalinkable: false

# We set the outputs explicitly to just "HTML" as otherwise they default to both
# "HTML" and "RSS", and we only want to generate RSS for the blog section -- not
Expand All @@ -43,6 +48,7 @@ outputs:
home:
- HTML
- JSON
- LLMSTXT
section:
- HTML

Expand Down
89 changes: 89 additions & 0 deletions layouts/index.llmstxt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{{- /* Generate llms.txt file for AI/LLM consumption */ -}}
{{- /* Static version for now - dynamic generation can be enabled later */ -}}
# Pulumi

> 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.

## Getting Started

{{- range where .Site.RegularPages "Section" "docs" }}
{{- if and (in .RelPermalink "/get-started/") (not (isset .Params "llms_exclude")) }}
- [{{ .Title }}]({{ .Permalink }}){{ if .Params.meta_desc }} - {{ .Params.meta_desc }}{{ end }}
{{- end }}
{{- end }}
- [Core Concepts](https://www.pulumi.com/docs/iac/concepts/) - Projects, stacks, resources, and state

## Infrastructure as Code (IaC)

- [Why Pulumi?](https://www.pulumi.com/docs/iac/) - Real code vs YAML configuration
{{- range where .Site.RegularPages "Section" "docs" }}
{{- if and (in .RelPermalink "/iac/") (not (in .RelPermalink "/get-started/")) (not (isset .Params "llms_exclude")) }}
{{- if or (in .RelPermalink "/languages-sdks/") (in .RelPermalink "/clouds/") (in .RelPermalink "/cli/") (in .RelPermalink "/automation-api/") (in .RelPermalink "/crossguard/") (in .RelPermalink "/adopting-pulumi/") }}
- [{{ .Title }}]({{ .Permalink }}){{ if .Params.meta_desc }} - {{ .Params.meta_desc | truncate 100 }}{{ end }}
{{- end }}
{{- end }}
{{- end }}

## Pulumi ESC (Environments, Secrets, Configuration)

{{- range where .Site.RegularPages "Section" "docs" }}
{{- if and (in .RelPermalink "/esc/") (not (isset .Params "llms_exclude")) }}
{{- if or (eq .RelPermalink "/docs/esc/") (in .RelPermalink "/get-started/") (in .RelPermalink "/environments/") (in .RelPermalink "/integrations/") (in .RelPermalink "/cli/") }}
- [{{ .Title }}]({{ .Permalink }}){{ if .Params.meta_desc }} - {{ .Params.meta_desc | truncate 100 }}{{ end }}
{{- end }}
{{- end }}
{{- end }}

## Pulumi Cloud Platform

{{- range where .Site.RegularPages "Section" "docs" }}
{{- if and (in .RelPermalink "/pulumi-cloud/") (not (isset .Params "llms_exclude")) }}
{{- if or (eq .RelPermalink "/docs/pulumi-cloud/") (in .RelPermalink "/deployments/") (in .RelPermalink "/copilot/") (in .RelPermalink "/access-management/") (in .RelPermalink "/admin/") }}
- [{{ .Title }}]({{ .Permalink }}){{ if .Params.meta_desc }} - {{ .Params.meta_desc | truncate 100 }}{{ end }}
{{- end }}
{{- end }}
{{- end }}
- [Pulumi Insights](https://www.pulumi.com/docs/insights/) - Infrastructure intelligence and search

## Registry (Providers & Packages)

- [AWS Provider](https://www.pulumi.com/registry/packages/aws/) - Complete AWS resource coverage
- [Azure Native Provider](https://www.pulumi.com/registry/packages/azure-native/) - Full Azure ARM API
- [Google Cloud Provider](https://www.pulumi.com/registry/packages/gcp/) - Complete GCP coverage
- [Kubernetes Provider](https://www.pulumi.com/registry/packages/kubernetes/) - Native Kubernetes support
- [All Providers](https://www.pulumi.com/registry/) - 150+ cloud and SaaS providers

## API Reference

- [Node.js/TypeScript](https://www.pulumi.com/docs/reference/pkg/nodejs/) - Complete TypeScript/JavaScript API
- [Python](https://www.pulumi.com/docs/reference/pkg/python/) - Complete Python API
- [Go](https://www.pulumi.com/docs/reference/pkg/go/) - Complete Go API
- [.NET/C#](https://www.pulumi.com/docs/reference/pkg/dotnet/) - Complete .NET API
- [Java](https://www.pulumi.com/docs/reference/pkg/java/) - Complete Java API

## Tutorials & Examples

{{- $tutorials := where .Site.RegularPages "Section" "tutorials" }}
{{- range first 10 $tutorials }}
{{- if not (isset .Params "llms_exclude") }}
- [{{ .Title }}]({{ .Permalink }}){{ if .Params.meta_desc }} - {{ .Params.meta_desc | truncate 100 }}{{ end }}
{{- end }}
{{- end }}
- [More Tutorials](https://www.pulumi.com/tutorials/) - Complete list of hands-on learning paths
- [Examples](https://github.com/pulumi/examples) - Production-ready templates
- [Templates](https://www.pulumi.com/templates/) - Starter templates for common architectures

## Optional
{{- $blogPosts := where .Site.RegularPages "Section" "blog" }}
{{- $recentPosts := first 20 (where $blogPosts ".Date" ">" (now.AddDate -1 0 0)) }}
{{- range $recentPosts }}
{{- if not (isset .Params "llms_exclude") }}
{{- if or (in .Title "Infrastructure as Code") (in .Title "Terraform") (in .Title "CloudFormation") (in .Title "AWS CDK") (in .Title "Kubernetes") (in .Title "Getting Started") }}
- [{{ .Title }}]({{ .Permalink }}){{ if .Params.meta_desc }} - {{ .Params.meta_desc | truncate 100 }}{{ end }}
{{- end }}
{{- end }}
{{- end }}
- [Blog](https://www.pulumi.com/blog/) - Latest features, best practices, and announcements
- [Case Studies](https://www.pulumi.com/case-studies/) - How BMW, Mercedes-Benz, Snowflake use Pulumi
- [What Is Pulumi?](https://www.pulumi.com/what-is/what-is-pulumi/) - Detailed explanation
- [Community](https://www.pulumi.com/community/) - Slack, discussions, events
3 changes: 3 additions & 0 deletions layouts/partials/assets.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
{{ $js := resources.Get "js/bundle.js" | fingerprint }}
<script src="{{ $js.RelPermalink }}" defer></script>

<!-- AI Bot Tracking for llms.txt experiment -->
<script src="{{ "/js/ai-bot-tracking.js" | relURL }}" defer></script>

<!--
Our marketing styles diverge a bit from the other parts of the website so we load
in a different bundle on our marketing pages.
Expand Down
119 changes: 119 additions & 0 deletions static/js/ai-bot-tracking.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/**
* AI Bot Detection and Tracking for llms.txt experiment
* Tracks AI/LLM bot access to pulumi.com to measure llms.txt effectiveness
*/

(function() {
'use strict';

/**
* Detects if the current user agent is an AI/LLM bot (CLIENT-SIDE ONLY)
* Note: Most LLM bots fetch llms.txt server-side without executing JavaScript.
* This detection is supplemental to server-side bot tracking in access logs.
* Based on actual bot traffic data from pulumi.com analytics.
* @returns {boolean} true if AI bot detected
*/
function detectAIBot() {
const ua = navigator.userAgent.toLowerCase();

// Known AI bot patterns from actual traffic data
const aiPatterns = [
/claudebot\/\d+\.\d+/i, // ClaudeBot/1.0
/amazonbot\/\d+\.\d+/i, // Amazonbot/0.1
/chatgpt-user\/\d+\.\d+/i, // ChatGPT-User/1.0
/oai-searchbot\/\d+\.\d+/i, // OAI-SearchBot/1.0, 1.3
/perplexitybot\/\d+\.\d+/i, // PerplexityBot/1.0
/gptbot/i, // GPTBot (general)
/anthropic/i, // Anthropic bots
/bingbot/i, // Bing (may use AI)
/baiduspider/i, // Baidu (has AI features)
/\bbot\b.*\/(ai|llm|gpt|claude)/i // Future-proofing pattern
];

return aiPatterns.some(pattern => pattern.test(ua));
}

/**
* Sends tracking event to analytics
* @param {string} eventName - Name of the event
* @param {object} eventData - Additional event data
*/
function trackEvent(eventName, eventData) {
// Use Segment analytics if available
if (typeof window.analytics !== 'undefined' && window.analytics.track) {
window.analytics.track(eventName, eventData);
}

// Also send to Google Analytics if available
if (typeof gtag !== 'undefined') {
gtag('event', eventName, {
'event_category': 'llms_txt',
...eventData
});
}

// Log to console in development
if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') {
console.log('[AI Bot Tracking]', eventName, eventData);
}
}

/**
* Initialize AI bot tracking
*/
function initAIBotTracking() {
// Check if current visitor is an AI bot
const isAIBot = detectAIBot();

if (isAIBot) {
// Track AI bot page access
trackEvent('ai_bot_access', {
user_agent: navigator.userAgent,
page_path: window.location.pathname,
page_url: window.location.href,
referrer: document.referrer,
timestamp: new Date().toISOString()
});

// Add data attribute to body for debugging
document.body.setAttribute('data-ai-bot', 'true');
}

// Track llms.txt file access specifically
if (window.location.pathname === '/llms.txt') {
trackEvent('llms_txt_fetch', {
user_agent: navigator.userAgent,
is_ai_bot: isAIBot,
referrer: document.referrer,
timestamp: new Date().toISOString()
});
}

// Track .md version requests (future enhancement)
if (window.location.pathname.endsWith('.md')) {
trackEvent('markdown_version_request', {
user_agent: navigator.userAgent,
is_ai_bot: isAIBot,
page_path: window.location.pathname,
referrer: document.referrer,
timestamp: new Date().toISOString()
});
}
}

// Wait for DOM and analytics to be ready
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initAIBotTracking);
} else {
// DOM already loaded, initialize immediately
// Give analytics libraries a moment to load
setTimeout(initAIBotTracking, 100);
}

// Export functions for testing/debugging
window.pulumiAITracking = {
detectAIBot: detectAIBot,
trackEvent: trackEvent,
initAIBotTracking: initAIBotTracking
};
})();
69 changes: 69 additions & 0 deletions static/llms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Pulumi

> 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.

## Getting Started

- [Installation](https://www.pulumi.com/docs/iac/get-started/install/) - Install Pulumi CLI and tools
- [AWS Quick Start](https://www.pulumi.com/docs/iac/get-started/aws/) - Deploy first AWS infrastructure
- [Azure Quick Start](https://www.pulumi.com/docs/iac/get-started/azure/) - Deploy first Azure infrastructure
- [GCP Quick Start](https://www.pulumi.com/docs/iac/get-started/gcp/) - Deploy first GCP infrastructure
- [Kubernetes Quick Start](https://www.pulumi.com/docs/iac/get-started/kubernetes/) - Deploy to Kubernetes
- [Core Concepts](https://www.pulumi.com/docs/iac/concepts/) - Projects, stacks, resources, and state

## Infrastructure as Code (IaC)

- [Why Pulumi?](https://www.pulumi.com/docs/iac/) - Real code vs YAML configuration
- [Languages & SDKs](https://www.pulumi.com/docs/iac/languages-sdks/) - TypeScript, Python, Go, C#, Java, YAML
- [Cloud Providers](https://www.pulumi.com/docs/iac/clouds/) - AWS, Azure, GCP, Kubernetes guides
- [CLI Commands](https://www.pulumi.com/docs/iac/cli/commands/) - Complete command reference
- [Automation API](https://www.pulumi.com/docs/iac/automation-api/) - Embed Pulumi in your applications
- [CrossGuard Policies](https://www.pulumi.com/docs/iac/crossguard/) - Policy as code enforcement
- [Terraform Migration](https://www.pulumi.com/docs/iac/adopting-pulumi/migrate-terraform/) - Migrate from Terraform
- [CloudFormation Migration](https://www.pulumi.com/docs/iac/adopting-pulumi/migrate-cloudformation/) - Migrate from CloudFormation

## Pulumi ESC (Environments, Secrets, Configuration)

- [Overview](https://www.pulumi.com/docs/esc/) - Centralized secrets and configuration management
- [Get Started](https://www.pulumi.com/docs/esc/get-started/) - Quick start guide
- [Environments](https://www.pulumi.com/docs/esc/environments/) - Define and manage environments
- [Integrations](https://www.pulumi.com/docs/esc/integrations/) - Integrate with external secret stores
- [CLI Reference](https://www.pulumi.com/docs/esc/cli/) - ESC command reference

## Pulumi Cloud Platform

- [Overview](https://www.pulumi.com/docs/pulumi-cloud/) - Managed platform capabilities
- [Deployments](https://www.pulumi.com/docs/pulumi-cloud/deployments/) - Automated deployments
- [Pulumi Copilot](https://www.pulumi.com/docs/pulumi-cloud/copilot/) - AI-powered infrastructure
- [Access Management](https://www.pulumi.com/docs/pulumi-cloud/access-management/) - Teams, roles, RBAC
- [Audit Logs](https://www.pulumi.com/docs/pulumi-cloud/admin/audit-logs/) - Compliance and security
- [Pulumi Insights](https://www.pulumi.com/docs/insights/) - Infrastructure intelligence and search

## Registry (Providers & Packages)

- [AWS Provider](https://www.pulumi.com/registry/packages/aws/) - Complete AWS resource coverage
- [Azure Native Provider](https://www.pulumi.com/registry/packages/azure-native/) - Full Azure ARM API
- [Google Cloud Provider](https://www.pulumi.com/registry/packages/gcp/) - Complete GCP coverage
- [Kubernetes Provider](https://www.pulumi.com/registry/packages/kubernetes/) - Native Kubernetes support
- [All Providers](https://www.pulumi.com/registry/) - 150+ cloud and SaaS providers

## API Reference

- [Node.js/TypeScript](https://www.pulumi.com/docs/reference/pkg/nodejs/) - Complete TypeScript/JavaScript API
- [Python](https://www.pulumi.com/docs/reference/pkg/python/) - Complete Python API
- [Go](https://www.pulumi.com/docs/reference/pkg/go/) - Complete Go API
- [.NET/C#](https://www.pulumi.com/docs/reference/pkg/dotnet/) - Complete .NET API
- [Java](https://www.pulumi.com/docs/reference/pkg/java/) - Complete Java API

## Tutorials & Examples

- [Tutorials](https://www.pulumi.com/tutorials/) - Hands-on learning paths
- [Examples](https://github.com/pulumi/examples) - Production-ready templates
- [Templates](https://www.pulumi.com/templates/) - Starter templates for common architectures

## Optional

- [Blog](https://www.pulumi.com/blog/) - Latest features, best practices, and announcements
- [Case Studies](https://www.pulumi.com/case-studies/) - How BMW, Mercedes-Benz, Snowflake use Pulumi
- [What Is Pulumi?](https://www.pulumi.com/what-is/what-is-pulumi/) - Detailed explanation
- [Community](https://www.pulumi.com/community/) - Slack, discussions, events
Loading