Experiments
Experiments Scratchpad
Section titled “Experiments Scratchpad”Document code experiments, proof-of-concepts, and technical explorations.
Content Collection Experiments
Section titled “Content Collection Experiments”Custom Schema Extension
Section titled “Custom Schema Extension”Date: 2025-08-28
Goal: Explore extending Starlight’s schema for scratchpad-specific metadata.
// Potential content.config.ts extensionimport { defineCollection } from 'astro:content';import { docsSchema } from '@astrojs/starlight/schema';
const scratchpadSchema = docsSchema().extend({ category: z.enum(['idea', 'research', 'experiment', 'performance', 'deployment']), status: z.enum(['draft', 'active', 'completed', 'archived']).optional(), tags: z.array(z.string()).optional(), priority: z.enum(['low', 'medium', 'high']).optional(),});
export const collections = { docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), scratchpad: defineCollection({ loader: docsLoader(), schema: scratchpadSchema }),};Status: Experimental - needs validation with Astro build process Next Step: Test schema extension without breaking existing functionality
Development-Only Navigation
Section titled “Development-Only Navigation”Date: 2025-08-28
Goal: Show scratchpad only in development environment.
// astro.config.mjs experimentconst isDevelopment = import.meta.env.DEV;
const sidebarItems = [ { label: 'Getting Started', items: [{ label: 'Introduction', slug: 'introduction' }], }, // ... other sections];
// Add scratchpad only in developmentif (isDevelopment) { sidebarItems.push({ label: 'Scratchpad', items: [ { label: 'Overview', slug: 'scratchpad' }, { label: 'Ideas', slug: 'scratchpad/ideas' }, { label: 'Research', slug: 'scratchpad/research' }, // ... other scratchpad items ], });}Status: Theoretical - requires testing with Astro’s build process Consideration: May need different approach for static generation
GitHub Integration Experiments
Section titled “GitHub Integration Experiments”Automated Issue Creation
Section titled “Automated Issue Creation”Date: 2025-08-28
Goal: Script to convert scratchpad entries to GitHub issues.
#!/bin/bash# scratchpad-to-issue.sh - Convert scratchpad entry to GitHub issue
SCRATCHPAD_FILE=$1TITLE=$(grep "^### " "$SCRATCHPAD_FILE" | head -1 | sed 's/### //')CONTENT=$(sed -n '/^### /,/^### /p' "$SCRATCHPAD_FILE" | sed '1d;$d')
gh issue create \ --title "[From Scratchpad]: $TITLE" \ --body "$CONTENT
Originated from scratchpad entry in: $SCRATCHPAD_FILE" \ --label "scratchpad-origin"Status: Proof-of-concept - needs refinement for production use Enhancement: Add template selection based on scratchpad category
Issue Template Enhancement
Section titled “Issue Template Enhancement”Date: 2025-08-28
Goal: Add scratchpad-specific issue template.
name: Scratchpad to Issuedescription: Convert a scratchpad entry into a formal GitHub issuetitle: "[Scratchpad]: "labels: ["scratchpad-origin"]
body: - type: input id: scratchpad-source attributes: label: Scratchpad Source description: Which scratchpad file/section does this come from? placeholder: "scratchpad/ideas.md - Interactive Documentation" validations: required: true
- type: textarea id: scratchpad-content attributes: label: Original Scratchpad Content description: Copy the relevant scratchpad entry here validations: required: true
- type: textarea id: additional-context attributes: label: Additional Context description: Any new information or context since the scratchpad entryStatus: Ready for implementation Integration: Fits well with existing issue template system
Build Process Experiments
Section titled “Build Process Experiments”Conditional Content Generation
Section titled “Conditional Content Generation”Date: 2025-08-28
Goal: Exclude scratchpad from production builds while keeping in development.
// Experimental build configurationexport default defineConfig({ // ... other config vite: { define: { __DEV_SCRATCHPAD__: JSON.stringify(process.env.NODE_ENV === 'development'), }, }, integrations: [ starlight({ // ... existing config customCss: process.env.NODE_ENV === 'development' ? ['./src/styles/scratchpad-dev.css'] : [], }), ],});Status: Experimental - needs validation with Cloudflare Pages build Risk: Static generation may not support runtime environment detection
Performance Experiments
Section titled “Performance Experiments”Search Index Optimization
Section titled “Search Index Optimization”Date: 2025-08-28
Goal: Optimize Pagefind indexing for scratchpad content.
// Potential pagefind configuration{ "glob": "**/*.{html}", "exclude_selectors": [ ".scratchpad-dev-only", ".private-note" ], "meta_selector": "meta[name='pagefind-meta']", "filters": { "section": "data-section" }}Research: Pagefind supports filtering and selective indexing Application: Could categorize scratchpad vs documentation in search results
Experiment Guidelines
Section titled “Experiment Guidelines”Documentation Standards
Section titled “Documentation Standards”- Goal: Clear statement of what the experiment aims to achieve
- Code/Config: Include relevant code snippets or configuration
- Status: Current state (experimental, tested, ready, abandoned)
- Next Steps: What needs to happen to move forward
- Risks: Potential issues or limitations identified
Testing Approach
Section titled “Testing Approach”- Create isolated test in feature branch
- Validate with minimal reproduction case
- Test integration with existing systems
- Document results and learnings
- Convert successful experiments to formal implementation
Integration Process
Section titled “Integration Process”- Move successful experiments to implementation todos
- Create GitHub issues for complex experiments requiring formal development
- Update documentation when experiments prove valuable
- Archive unsuccessful experiments with lessons learned