2. Platform Documentation Folder
Creating a dedicated Platform Documentation folder is essential for providing Claude Code with up-to-date information about the tools and technologies you're using in your project. This practice addresses one of the key limitations of AI models: their knowledge cutoff.
Why Platform Documentation Matters
Most AI coding models have knowledge that may be dated compared to the latest versions of frameworks, libraries, and technologies. By maintaining dedicated platform documentation, you ensure that Claude has access to the most current information, avoiding outdated implementation suggestions.
Platform documentation isn't just for the AI—it's for your application. The Claude.md tells Claude what you're going to do, while Platform Docs tells it what tools you're going to use.
What to Include in Your Platform Documentation
- Framework Documentation: Latest APIs, features, and best practices for your frameworks
- Library References: Documentation for the specific libraries your project uses
- Code Examples: Sample implementations using the latest versions of your tools
- Compatibility Information: Compatibility between different components of your stack
- Version-Specific Details: Information about the specific versions you're using
- Integration Patterns: How different parts of your technology stack should interact
Recommended Folder Structure
platform_docs/
├── frameworks/
│ ├── react.md
│ ├── nextjs.md
│ └── express.md
├── libraries/
│ ├── stripe-api.md
│ ├── aws-sdk.md
│ └── mongodb.md
├── tools/
│ ├── webpack.md
│ └── docker.md
├── integration/
│ ├── auth-flow.md
│ └── payment-flow.md
└── compatibility.md
Documentation Example
Here's an example of what a library documentation file might contain:
# Stripe API Documentation (v2023-10-16)
## Key Features
- Payment Intents API for direct card processing
- Customer Portal for subscription management
- Strong Customer Authentication (SCA) compliance
- Webhook event handling
## Basic Implementation
```javascript
// Creating a payment intent
const paymentIntent = await stripe.paymentIntents.create({
amount: 1000, // in smallest currency unit (e.g., cents)
currency: 'usd',
payment_method_types: ['card'],
metadata: { orderId: '12345' }
});
// Handling webhook events
app.post('/webhook', async (req, res) => {
const sig = req.headers['stripe-signature'];
const event = stripe.webhooks.constructEvent(
req.body,
sig,
process.env.STRIPE_WEBHOOK_SECRET
);
if (event.type === 'payment_intent.succeeded') {
const paymentIntent = event.data.object;
// Handle successful payment
}
});
```
## Important Notes
- Always use asynchronous code with await/then
- Test webhooks locally using the Stripe CLI
- Use idempotency keys for retries
- Store customer IDs in your database
## Resources
- [Official Documentation](https://stripe.com/docs/api)
- [Testing Guide](https://stripe.com/docs/testing)
- [Webhook Guide](https://stripe.com/docs/webhooks)
Best Practices
- Use Markdown Format: Simple, readable, and well-structured documentation
- Keep it Current: Update your documentation when you update your dependencies
- Include Code Examples: Practical examples help Claude understand implementation patterns
- Focus on What's Different: Highlight changes from previous versions or common patterns
- Reference External Resources: Link to official documentation for more details
This approach isn't just for Claude Code. It's a good development practice that helps maintain project knowledge and onboard new team members.