| title | YAML Formatting Standards | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| description | Guides Kiro to write clean, properly indented YAML configuration files | ||||||||
| category | code-quality | ||||||||
| tags |
|
||||||||
| inclusion | always | ||||||||
| applicableTo |
|
||||||||
| requiredDependencies |
|
||||||||
| filePatterns |
|
Kiro writes clean, consistently formatted YAML that prevents indentation errors and maintains readable configuration structure.
2-space indentation: Consistent spacing for all nested structures
# Kiro will write:
services:
web:
image: nginx:latest
ports:
- "80:80"
environment:
NODE_ENV: production
# Not:
services:
web:
image: nginx:latest
ports:
- "80:80"
Consistent key-value spacing: Space after colon, no space before
# Kiro will write:
database:
host: localhost
port: 5432
name: myapp
credentials:
username: admin
password: secret
# Not:
database:
host : localhost
port:5432
name:myapp
Clear list structure: Consistent dash placement and indentation
# Kiro will write:
dependencies:
- express
- mongoose
- dotenv
features:
- name: authentication
enabled: true
- name: caching
enabled: false
# Not:
dependencies:
- express
- mongoose
- dotenv
features:
- name: authentication
enabled: true
- name: caching
enabled: false
Quote when necessary: Use quotes for special characters or ambiguous values
# Kiro will write:
message: "Hello, World!"
version: "1.0.0"
port: 8080
enabled: true
description: Simple message
# Not:
message: Hello, World!
version: 1.0.0
port: "8080"
enabled: "true"
-
Indentation errors that break YAML parsing
-
Inconsistent formatting across configuration files
-
Ambiguous value types (strings vs numbers vs booleans)
-
Hard-to-read nested structures
-
Merge conflicts from inconsistent spacing
This is a starting point! You can modify these rules by editing this steering document:
-
Adjust indentation from 2 spaces to 4 spaces if preferred
-
Change quoting preferences for strings
-
Modify list formatting style
-
Add project-specific conventions
Want to validate that generated YAML follows these standards? Add these tools:
npm install --save-dev prettier prettier-plugin-yaml
# or
pip install yamllint
Note: These tools validate the YAML after Kiro writes it, but aren't required for the steering document to work.