[Announcement] Agent-facing documentation is now available in the CDK repo
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
## What's new
We added structured documentation for AI coding assistants working on the CDK codebase. If you use Copilot, Cursor, Claude Code, Codex, Kiro, or a similar tool when contributing to CDK, these files help your agent follow CDK conventions and avoid common mistakes.
Four files were added in [#37565](https://github.com/aws/aws-cdk/pull/37565):
| File | Purpose |
|------|---------|
| [`AGENTS.md`](https://github.com/aws/aws-cdk/blob/main/AGENTS.md) | Main entry point. Build/test commands, codebase layout, L1/L2/L3 model, construct anatomy, naming, props design, security rules, implementation patterns, documentation standards, testing conventions, PR format, anti-patterns. Most AI tools auto-discover this file at the repo root. |
| [`CLAUDE.md`](https://github.com/aws/aws-cdk/blob/main/CLAUDE.md) | One-line pointer to `AGENTS.md` for Claude Code users. |
| [`docs/AGENTS_CONSTRUCT_DESIGN.md`](https://github.com/aws/aws-cdk/blob/main/docs/AGENTS_CONSTRUCT_DESIGN.md) | Design rules for L2 constructs: feature placement (mixin vs facade vs trait), API shape, interface design, type hierarchy, naming. |
| [`docs/AGENTS_CONSTRUCT_IMPLEMENTATION.md`](https://github.com/aws/aws-cdk/blob/main/docs/AGENTS_CONSTRUCT_IMPLEMENTATION.md) | Implementation patterns: grants, metrics, events, connections, IAM integration, L1/L2 mapping, mixin implementation. |
## How to use them
**Human contributors:** These files are useful as a quick reference even without an AI assistant. The rules are the same ones in [DESIGN_GUIDELINES.md](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md), written in a structured, prescriptive format with explicit MUST/SHOULD/MAY severity levels.
**Using an AI coding assistant:** Most tools automatically pick up `AGENTS.md` from the repo root. Point your tool at the repo root and it will discover the file on its own. For deeper design or implementation questions, the agent can follow references to the two supplementary files in `docs/`.
**Building or configuring an AI agent for CDK work:** Start with `AGENTS.md` as the primary context file. It covers the common case. Add `docs/AGENTS_CONSTRUCT_DESIGN.md` when the agent is designing new constructs or extending existing ones, and `docs/AGENTS_CONSTRUCT_IMPLEMENTATION.md` when it is implementing cross-cutting patterns like grants or metrics.
## Relationship to existing docs
These files do not replace anything. [DESIGN_GUIDELINES.md](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md), [MIXINS_DESIGN_GUIDELINES.md](https://github.com/aws/aws-cdk/blob/main/docs/MIXINS_DESIGN_GUIDELINES.md), [NEW_CONSTRUCTS_GUIDE.md](https://github.com/aws/aws-cdk/blob/main/docs/NEW_CONSTRUCTS_GUIDE.md), and [CONTRIBUTING.md](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) remain the authoritative references for human contributors. The agent-facing files are a structured interpretation of the same rules, optimized for how AI tools process instructions.
When rules change, `DESIGN_GUIDELINES.md` is updated first, and the agent-facing files are updated to match.
## Feedback
If you notice gaps, incorrect rules, or places where your AI assistant still gets things wrong despite these files, open an issue or comment here. This is a first iteration and we expect to refine the content based on real-world usage.
Contributor guide
Research direction
Read AGENTS.md first, then compare docs/AGENTS_CONSTRUCT_DESIGN.md and docs/AGENTS_CONSTRUCT_IMPLEMENTATION.md with docs/DESIGN_GUIDELINES.md. This issue is an announcement and names no documentation change to make, so there is no defined completion check beyond reviewing the listed files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100