Skip to content

Commit a2a2e80

Browse files
committed
Update cursor rules to document version-agnostic README standards
Rule updates: - Add 'Available Tags' as required section in image READMEs (Quick Start) - Remove 'Version Information' tables from required sections - Document that root README should not have detailed tag documentation - Update image README template with Available Tags section format - Add guidelines for using version placeholders (<version>, <commit>) - Emphasize version-agnostic approach throughout all rules Changes in: - documentation-standards.mdc: Added note about root README, updated required sections - image-readme-standards.mdc: Added Available Tags to template, updated guidelines - adding-new-images.mdc: Added Available Tags requirement, emphasized placeholders Rationale: - Tag information is image-specific, belongs in image READMEs - Root README stays minimal and generic - Version placeholders keep documentation accurate as versions change - Consistent with recent README refactoring (commit 26ee08a)
1 parent 26ee08a commit a2a2e80

File tree

3 files changed

+47
-19
lines changed

3 files changed

+47
-19
lines changed

.cursor/rules/adding-new-images.mdc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@ Create new directory: `images/<image-name>/` containing:
3131
Image README must include:
3232
- Overview and description
3333
- What's Inside (capabilities and tools, not specific versions)
34-
- Quick Start (pull, build, run)
34+
- Quick Start
35+
- **Available Tags** section with tag types, examples, and recommendations
36+
- Pull commands with tag examples (use `<version>`, `<commit>` placeholders)
3537
- Usage Examples
3638
- CI/CD Integration examples
3739
- Environment Variables
38-
- Building the Image
40+
- Building the Image (use `<version>` placeholders in build arg examples)
3941

40-
**Important:** Do not hardcode specific version numbers in READMEs. Focus on capabilities and tools. See [Documentation Standards](documentation-standards.mdc) for version handling guidelines.
42+
**Important:** Do not hardcode specific version numbers in READMEs. Focus on capabilities and tools. Use placeholders like `<version>`, `<commit>` in all examples. See [Documentation Standards](documentation-standards.mdc) for version handling guidelines and [Image README Standards](image-readme-standards.mdc) for complete template.
4143

4244
## Update Root README
4345

.cursor/rules/documentation-standards.mdc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ Structure:
1515
2. Table of current images with links
1616
3. Generic quick start
1717
4. Project structure diagram
18-
5. Registry information
18+
5. Registry information (minimal, no detailed tag documentation)
1919
6. License
2020

21+
**Note:** Detailed tag information belongs in individual image READMEs, not the root README.
22+
2123
## Image READMEs
2224

2325
Must be:
@@ -30,8 +32,10 @@ Must be:
3032

3133
Required sections:
3234
1. Overview
33-
2. What's Inside (capabilities and tools)
35+
2. What's Inside (capabilities and tools, no specific versions)
3436
3. Quick Start
37+
- **Available Tags** - Tag types, examples, and recommendations
38+
- Pull commands with tag examples
3539
4. Usage Examples (Docker commands, CI/CD integration)
3640
5. Environment Variables
3741
6. Building the Image
@@ -43,7 +47,7 @@ Sections to AVOID:
4347
- Feature explanations (framework features, not image features)
4448
- Troubleshooting (users can refer to upstream documentation)
4549
- Design Decisions (keep documentation focused on usage)
46-
- Version Information tables (versions change frequently)
50+
- Version Information tables (hardcoded versions change frequently)
4751

4852
## Version Handling
4953

.cursor/rules/image-readme-standards.mdc

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ Image READMEs should focus on **how to use the Docker image**, not **how to deve
1010

1111
**Required Sections:**
1212
1. **Overview** - What this image provides and its purpose
13-
2. **What's Inside** - Installed tools, versions, and components
13+
2. **What's Inside** - Installed tools and components (no specific versions)
1414
3. **Quick Start** - Pull, build, run commands using the image
15+
- **Available Tags** - Tag types, examples, and usage recommendations
16+
- Pull commands with examples for different tag types
1517
4. **Supported Chips/Platforms** - What the image supports
1618
5. **Usage Examples** - Docker commands showing image usage
1719
- CI/CD Integration (GitHub Actions, GitLab CI)
@@ -20,10 +22,9 @@ Image READMEs should focus on **how to use the Docker image**, not **how to deve
2022
- Image-specific configurations (e.g., ccache setup)
2123
6. **Environment Variables** - Variables set by the image
2224
7. **Building the Image** - How to build locally, build args
23-
8. **Version Information** - Component versions in the image
24-
9. **Additional Resources** - Links to framework documentation
25-
10. **License** - License information
26-
11. **Related Images** - Links to other project images
25+
8. **Additional Resources** - Links to framework documentation
26+
9. **License** - License information
27+
10. **Related Images** - Links to other project images
2728

2829
**Optional Sections:**
2930
- **Notes** - Image-specific notes (e.g., excluded tools, limitations)
@@ -62,7 +63,7 @@ Image READMEs should focus on **how to use the Docker image**, not **how to deve
6263
## Structure Template
6364

6465
```markdown
65-
# [Image Name] [Version]
66+
# [Image Name] Development Image
6667

6768
Brief one-line description optimized for CI/CD and development.
6869

@@ -73,12 +74,34 @@ What this image provides and its purpose.
7374
## What's Inside
7475

7576
**Component Category:**
76-
- Component 1 (version)
77-
- Component 2 (version)
77+
- Component 1 (no specific version)
78+
- Component 2 (no specific version)
7879

7980
## Quick Start
8081

82+
### Available Tags
83+
84+
| Tag Type | Example | Usage |
85+
|----------|---------|-------|
86+
| **Latest** | `latest` | Always points to newest build (floating) |
87+
| **Stable** | `stable` | Same as latest (semantic preference) |
88+
| **Version** | `<prefix>-v<version>` | Pin to specific version (recommended for CI/CD) |
89+
| **Commit** | `sha-<commit>` | Pin to exact git commit (debugging) |
90+
91+
**Tag Recommendations:**
92+
- **Development**: Use `latest` for convenience
93+
- **CI/CD**: Use version tags (`<prefix>-v<version>`) for reproducibility
94+
- **Debugging**: Use commit tags (`sha-<commit>`) to reproduce exact build
95+
8196
### Pull Image
97+
```bash
98+
# Latest build
99+
docker pull ghcr.io/jethome-iot/jethome-dev-<image>:latest
100+
101+
# Specific version (recommended for CI/CD)
102+
docker pull ghcr.io/jethome-iot/jethome-dev-<image>:<prefix>-v<version>
103+
```
104+
82105
### Build Your Project
83106
### Interactive Development
84107

@@ -105,12 +128,9 @@ Variables set by the image.
105128

106129
### Standard Build
107130
### Custom Build Arguments
131+
Use `<version>` placeholders, not specific versions.
108132
### Multi-Platform Support
109133

110-
## Version Information
111-
112-
Table of component versions.
113-
114134
## Notes
115135

116136
Image-specific notes (optional).
@@ -185,7 +205,9 @@ void app_main(void) {
185205
2. **Link to Official Docs** - Provide links for framework-specific help
186206
3. **Keep It Concise** - Target ~250-350 lines for most images
187207
4. **Show Real Examples** - Use actual Docker commands, not pseudocode
188-
5. **Update Version Info** - Keep version table accurate
208+
5. **Use Version Placeholders** - Use `<version>`, `<commit>` instead of specific versions
209+
6. **Document Available Tags** - Every image README must have an "Available Tags" section in Quick Start
210+
7. **Version-Agnostic** - Describe capabilities, not specific version numbers (see documentation-standards.mdc)
189211

190212
## When Framework Content is Acceptable
191213

0 commit comments

Comments
 (0)