Thank you for your interest in contributing to Amiable Templates! This document provides guidelines and instructions for contributing to our documentation site.
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
If you'd like to see a new Railway template documented:
- Check existing issues to avoid duplicates
- Open a Feature Request
- Provide the template repository URL and description
- Fix typos or unclear explanations
- Add examples or clarifications
- Improve navigation or structure
- Broken links
- Build failures
- Display problems
- Python 3.11 or higher
- uv package manager
- Git
-
Fork and clone the repository:
git clone https://github.com/YOUR-USERNAME/amiable-templates.git cd amiable-templates -
Install dependencies:
uv sync
-
Create environment file (for aggregation script):
cp .env.example .env # Add your GITHUB_TOKEN for API access -
Run the docs locally:
uv run mkdocs serve
-
Visit http://localhost:8000 to preview the site
amiable-templates/
├── docs/ # Documentation source
│ ├── index.md # Home page
│ ├── quickstart.md # Quick start guide
│ ├── templates/ # Template documentation
│ │ └── index.md # Template grid
│ ├── adrs/ # Architecture Decision Records
│ └── blog/ # Blog posts
├── scripts/ # Build scripts
│ └── aggregate_templates.py
├── templates.yaml # Template registry
├── mkdocs.yml # MkDocs configuration
└── requirements.txt # Python dependencies
Create a feature branch from main:
git checkout main
git pull origin main
git checkout -b feature/your-feature-nameBranch naming conventions:
feature/- New features or templatesfix/- Bug fixesdocs/- Documentation changeschore/- Maintenance tasks
- Edit documentation in the
docs/directory - Preview locally:
uv run mkdocs serve
- Check for broken links (run lychee or similar)
- Commit your changes
We follow conventional commit format:
<type>(<scope>): <description>
[optional body]
Use the commit template (optional but recommended):
git config commit.template .gitmessageTypes:
feat: New feature or templatefix: Bug fixdocs: Documentation onlystyle: Formatting, no content changechore: Maintenance tasks
Examples:
docs(templates): Add LiteLLM configuration examples
feat(grid): Add filtering by category
fix(links): Correct broken GitHub links in ADR-001
-
Push your branch:
git push -u origin feature/your-feature-name
-
Create a pull request via GitHub
-
Fill out the PR template with:
- Summary of changes
- Screenshots (if UI changes)
- Checklist completion
-
Address review feedback promptly
-
Ensure CI passes before requesting merge
The template manager CLI provides validated operations with clear error messages:
# 1. Create a branch
git checkout -b add-my-template
# 2. Add the template via CLI
python scripts/template_manager.py add \
--id your-template-name \
--repo amiable-dev/your-template-repo \
--title "Your Template Title" \
--description "Brief description" \
--category observability \
--tier starter
# 3. Validate (runs automatically, but can verify)
python scripts/template_manager.py validate
# 4. Commit and create PR
git add templates.yaml
git commit -m "feat: add your-template-name to registry"
git push -u origin add-my-template
gh pr create --title "Add your-template-name" --body "Adds new template..."Available CLI commands:
python scripts/template_manager.py --help # Show all commands
python scripts/template_manager.py list # List all templates
python scripts/template_manager.py validate # Validate registry
python scripts/template_manager.py add # Add new template
python scripts/template_manager.py update # Update existing template
python scripts/template_manager.py remove # Remove templateIf you're using Claude Code, you can use the template-registry skill:
- The skill is in
.claude/skills/template-registry/ - Ask Claude to "add a new template" or "update template X"
- Claude will use the CLI tool with proper validation
See .claude/skills/template-registry/SKILL.md for skill documentation.
For direct YAML editing (advanced users):
-
Ensure the template repo exists and has documentation
-
Update
templates.yaml:templates: - id: your-template-name repo: owner: "amiable-dev" name: "your-template-repo" title: "Your Template Title" description: "Brief description" category: observability # or ai-infrastructure, etc. directories: docs: - path: "README.md" target: "overview.md" links: github: "https://github.com/amiable-dev/your-template-repo"
-
Validate the registry:
python scripts/template_manager.py validate
-
Run aggregation locally:
python scripts/aggregate_templates.py
-
Preview the site to verify the template appears correctly
-
Submit a PR with your changes
The templates.yaml file is validated against templates.schema.yaml. Key fields:
| Field | Required | Description |
|---|---|---|
id |
Yes | Unique identifier (lowercase, hyphens) |
repo.owner |
Yes | GitHub organization or user |
repo.name |
Yes | Repository name |
title |
Yes | Display title |
description |
Yes | Brief description for template grid |
category |
Yes | Category ID (e.g., observability) |
directories.docs |
Yes | List of docs to fetch |
tags |
No | Tags for filtering |
features |
No | Feature highlights |
estimated_cost |
No | Cost estimate object |
links.railway_template |
No | Railway deploy URL |
links.github |
No | GitHub repository URL |
For the full schema, see templates.schema.yaml or ADR-003.
- Use clear, concise language
- Include code examples where helpful
- Use admonitions for warnings, tips, notes
- Keep paragraphs short (3-4 sentences max)
Admonitions:
!!! note "Title"
Note content here.
!!! warning
Warning content here.
!!! tip "Pro Tip"
Helpful tip here.Code blocks with titles:
```yaml title="mkdocs.yml"
site_name: My Site
**Tabs:**
```markdown
=== "Python"
```python
print("Hello")
```
=== "JavaScript"
```javascript
console.log("Hello");
```
| Label | Description |
|---|---|
bug |
Site issues, broken links |
enhancement |
Site improvements |
documentation |
Documentation updates |
good-first-issue |
Good for newcomers |
help-wanted |
Extra attention needed |
template-request |
Request for new template |
Install pre-commit hooks to catch security issues before they're committed:
pip install pre-commit
pre-commit installThis enables:
- Gitleaks: Detects accidentally committed secrets
- yamllint: Validates YAML configuration files
- check-jsonschema: Validates templates.yaml schema
- template-manager-validate: Semantic validation (duplicate IDs, references)
- Trailing whitespace/EOF: Code hygiene checks
- Never commit secrets - Use
.envfiles (git-ignored) - Review diffs - Check for accidental API keys before pushing
- Report vulnerabilities - See SECURITY.md for responsible disclosure
All security checks run without repository secrets. Your PR will pass CI checks as long as:
- No secrets are detected by Gitleaks
- YAML files are valid
- Dependencies don't have high-severity vulnerabilities
- Check existing Discussions
- Open a new Discussion for questions
- See SUPPORT.md for support channels
By contributing, you agree that your contributions will be licensed under the MIT License.