

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456## Context78This instruction file applies to all Infrastructure as Code: AWS CDK TypeScript stacks and Terraform HCL modules. IaC is production code and must meet the same quality bar: code review, testing, version control, and documentation.910---1112## CDK TypeScript Standards1314### Project Structure1516```17infrastructure/18├── bin/19│ └── app.ts # CDK app entry point20├── lib/21│ ├── stacks/22│ │ ├── network-stack.ts # VPC, subnets, security groups23│ │ ├── database-stack.ts # RDS, ElastiCache24│ │ └── app-stack.ts # ECS, ALB, IAM25│ └── constructs/26│ └── fargate-service.ts # Reusable custom construct27├── test/28│ └── stacks/29│ └── app-stack.test.ts # CDK assertions tests30├── cdk.json31└── tsconfig.json32```3334### CDK Code Rules3536- **L2/L3 constructs preferred** over L1 (`CfnXxx`) — less code, more defaults, fewer mistakes37- **Stack props typed** — every stack has a typed `interface XxxStackProps extends cdk.StackProps`38- **No hardcoded account/region** — use `this.account`, `this.region`, or context39- **Secrets via `SecretValue.ssmSecure()` or `Secret.fromSecretNameV2()`**40- **`RemovalPolicy.RETAIN`** for production databases, S3 buckets with data, DynamoDB tables41- **CDK Aspects** for organisation-wide cross-cutting concerns (tagging, compliance)42- **CDK Assertions** (`@aws-cdk/assertions`) for unit tests on stack templates4344```typescript45// CORRECT: Environment-aware removal policy46const isProd = props.env === 'prod';47new dynamodb.Table(this, 'OrdersTable', {48 removalPolicy: isProd ? cdk.RemovalPolicy.RETAIN : cdk.RemovalPolicy.DESTROY,49});50```5152### CDK Testing5354CDK stacks must have unit tests using `@aws-cdk/assertions`:5556```typescript57import { Template } from 'aws-cdk-lib/assertions';5859test('ECS service has correct CPU and memory', () => {60 const template = Template.fromStack(stack);61 template.hasResourceProperties('AWS::ECS::TaskDefinition', {62 Cpu: '512',63 Memory: '1024',64 });65});66```6768---6970## Terraform Standards7172### Module Structure7374```75modules/76└── ecs-fargate-service/77 ├── main.tf # Resources78 ├── variables.tf # Input variables with descriptions and types79 ├── outputs.tf # Output values80 ├── versions.tf # Required providers and versions81 └── README.md # Module documentation82```8384### Remote State (Required)8586```hcl87terraform {88 backend "s3" {89 bucket = "{project}-terraform-state-{account_id}"90 key = "{env}/{component}/terraform.tfstate"91 region = "eu-west-1"92 encrypt = true93 dynamodb_table = "{project}-terraform-locks"94 }95}96```9798### Provider Configuration99100```hcl101terraform {102 required_version = ">= 1.6.0"103 required_providers {104 aws = {105 source = "hashicorp/aws"106 version = "~> 5.0"107 }108 }109}110111provider "aws" {112 region = var.aws_region113 default_tags {114 tags = {115 Project = var.project_name116 Environment = var.environment117 ManagedBy = "Terraform"118 Owner = var.team_name119 CostCentre = var.cost_centre120 }121 }122}123```124125### Variables126127```hcl128variable "environment" {129 description = "Deployment environment: dev, staging, or prod"130 type = string131 validation {132 condition = contains(["dev", "staging", "prod"], var.environment)133 error_message = "Environment must be dev, staging, or prod."134 }135}136```137138---139140## Naming Conventions141142| Resource | Convention | Example |143|----------|-----------|---------|144| S3 bucket | `{project}-{env}-{purpose}` | `smart-retail-prod-assets` |145| ECR repository | `{project}/{service}` | `smart-retail/order-service` |146| ECS cluster | `{project}-{env}` | `smart-retail-prod` |147| Lambda function | `{project}-{env}-{function}` | `smart-retail-prod-order-processor` |148| IAM role | `{project}-{env}-{service}-role` | `smart-retail-prod-order-service-role` |149150---151152## Anti-Patterns to Avoid153154- ❌ Hardcoded account IDs, region names, or ARNs155- ❌ Secrets in plain text in variables or environment blocks156- ❌ `terraform apply` without `terraform plan` review157- ❌ Shared state file across environments158- ❌ `force_destroy = true` on production S3 buckets159- ❌ Unversioned provider dependencies (`version = "*"`)160
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| doubts-suplab/eeik-bootstrap.clinerules/golden-rules.md · 1 | Cline rules | gitsecuritydo-not | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.clinerules/project.md · 1 | Cline rules | teststylegit | 63/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/architecture.mdc · 1 | Cursor rules | do-not | 52/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/capabilities.mdc · 1 | Cursor rules | teststylegit | 58/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/golden-rules.mdc · 1 | Cursor rules | gitsecuritydo-not | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/python.mdc · 1 | Cursor rules | lint-formatstyletypesapi+1 | 77/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/security.mdc · 1 | Cursor rules | security | 39/100 | today | |
| doubts-suplab/eeik-bootstrap.github/copilot-instructions.md · 1 | Copilot instructions | lint-formatstyletesting-strategygit+2 | 54/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/a2a-protocol.instructions.md · 1 | Copilot instructions | styleagent-behaviour | 48/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/ai-governance.instructions.md · 1 | Copilot instructions | stylearchdo-notagent-behaviour | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/angular.instructions.md · 1 | Copilot instructions | teststyletypestesting-strategy+4 | 69/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/architecture-governance.instructions.md · 1 | Copilot instructions | testlint-formatstylegit+4 | 65/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/autogen.instructions.md · 1 | Copilot instructions | typessecurityagent-behaviour | 50/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/aws-architecture.instructions.md · 1 | Copilot instructions | styletypessecurityperformance | 58/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/aws-data-ml-ai.instructions.md · 1 | Copilot instructions | deployment | 54/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/cicd.instructions.md · 1 | Copilot instructions | stylesecuritydeploymentdo-not+1 | 65/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/containerisation.instructions.md · 1 | Copilot instructions | buildstylesecuritydo-not | 77/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/crewai.instructions.md · 1 | Copilot instructions | styleagent-behaviour | 48/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/data-engineering.instructions.md · 1 | Copilot instructions | teststyletypesgit+5 | 69/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/deployment.instructions.md · 1 | Copilot instructions | teststylegitdeployment | 77/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 65 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 14 days ago | |
| pytorch/pytorch.github/copilot-instructions.md · 102k | Copilot instructions | setupbuildteststyle+5 | 100/100 | 14 days ago | |
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17 | Copilot instructions | setupbuildtestlint-format+7 | 100/100 | 14 days ago | |
| bagisto/bagisto.github/copilot-instructions.md · 28k | Copilot instructions | setupbuildteststyle+5 | 97/100 | 14 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 32k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 7 days ago | |
| hiyouga/LlamaFactory.github/copilot-instructions.md · 74k | Copilot instructions | setupbuildtestlint-format+5 | 97/100 | 13 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 25 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/doubts-suplab-eeik-bootstrap-github-instructions-cdk-terraform-instructions)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.