This directory contains reusable templates for bootstrapping new projects and creating standardized documentation.
templates/
├── README.md # This file
├── new-project/ # Complete new project structure
│ ├── docs/ # Documentation templates
│ ├── .gitignore.template
│ ├── README.template.md
│ └── CONTEXT.template.md
├── docs-structure/ # Documentation file templates
│ ├── product-manager-output.template.md
│ ├── architecture-output.template.md
│ ├── style-guide.template.md
│ └── feature-spec.template.md
├── best-practices/ # Framework-specific coding guidelines
│ └── coding-guidelines.md # React Native, NestJS, TypeScript
└── common-files/ # Reusable configuration files
├── .editorconfig
├── .gitattributes
└── framework-config.yaml
Templates in new-project/ are automatically used by the initialization script:
# The init script copies these templates
.ai-framework/scripts/init-new-project.shTemplates in docs-structure/ can be copied manually:
# Copy a template
cp .ai-framework/templates/docs-structure/feature-spec.template.md \
docs/features/my-feature/spec.md
# Edit the template
# Fill in all [PLACEHOLDER] sectionsTemplates in common-files/ provide best practices:
# Copy configuration templates
cp .ai-framework/templates/common-files/.editorconfig .Templates use the following placeholder format:
[PROJECT_NAME]- Name of the project[PROJECT_DESC]- Project description[DATE]- Current date[VERSION]- Version number[AUTHOR]- Author name[TECH_STACK_*]- Technology stack details
# [PROJECT_NAME]
Created: [DATE]
Version: [VERSION]
## Description
[PROJECT_DESC]Becomes:
# Recipe Generator App
Created: 2025-10-14
Version: 0.1.0
## Description
AI-powered app that generates restaurant-quality recipes from photosTo create a custom template:
- Create the template file with
.templateextension - Add placeholder variables using
[VARIABLE_NAME]format - Document required variables in header comment
- Add to appropriate directory (new-project, docs-structure, or common-files)
- Update this README with usage instructions
<!--
Template: [Template Name]
Description: [What this template is for]
Variables:
- [VAR1]: Description of variable 1
- [VAR2]: Description of variable 2
Usage: [How to use this template]
-->
# [TITLE]
[Content with placeholders...]Complete documentation structure for new projects:
- project-documentation/
- design-documentation/
- features/
Variables: PROJECT_NAME, PROJECT_DESC, DATE
Usage: Automatically used by init-new-project.sh
Template for product manager specifications
Variables: PROJECT_NAME, PROJECT_DESC, DATE, AUTHOR
Usage:
cp .ai-framework/templates/docs-structure/product-manager-output.template.md \
docs/project-documentation/product-manager-output.mdTemplate for system architecture documentation
Variables: PROJECT_NAME, TECH_STACK_FRONTEND, TECH_STACK_BACKEND, DATE
Usage:
cp .ai-framework/templates/docs-structure/architecture-output.template.md \
docs/project-documentation/architecture-output.mdTemplate for design system style guide
Variables: PROJECT_NAME, PRIMARY_COLOR, SECONDARY_COLOR, FONT_PRIMARY
Usage:
cp .ai-framework/templates/docs-structure/style-guide.template.md \
docs/design-documentation/design-system/style-guide.mdTemplate for individual feature specifications
Variables: FEATURE_NAME, FEATURE_DESC, PRIORITY, DATE
Usage:
FEATURE="user-authentication"
cp .ai-framework/templates/docs-structure/feature-spec.template.md \
docs/features/$FEATURE/spec.mdComprehensive coding standards and best practices for common tech stacks
Includes:
- React Native & Expo guidelines (code style, performance, navigation, testing)
- NestJS backend patterns (modular architecture, API design, security)
- General TypeScript standards (naming, error handling, testing)
- Project-specific guidelines (Docker, environment variables, Git workflow)
Tech Stacks Covered:
- Frontend: React Native, Expo, TypeScript
- Backend: NestJS, Express, TypeScript
- Testing: Jest, React Native Testing Library, Detox
- State Management: Context, Zustand, Redux Toolkit
- Database: TypeORM, MikroORM
Variables: None (reference document)
Usage:
# Reference during implementation
# Implementation agents should follow these guidelines
cat templates/best-practices/coding-guidelines.mdWhen to Reference:
- Before starting implementation (Phase 2)
- During code reviews
- When setting up new features
- For onboarding new team members
Customization: Copy to your project and modify for team-specific conventions:
cp templates/best-practices/coding-guidelines.md \
docs/development/coding-standards.md
# Edit to add project-specific rulesStandardized editor configuration for consistent code style
Variables: None
Usage:
cp .ai-framework/templates/common-files/.editorconfig .Git attributes for handling different file types
Variables: None
Usage:
cp .ai-framework/templates/common-files/.gitattributes .AI Framework configuration template
Variables: PROJECT_NAME, TECH_STACK_, PATHS_
Usage: Automatically generated by scripts
Good: [PROJECT_NAME]
Bad: <project>, {{project}}, $PROJECT<!-- Replace [AUTHOR_NAME] with the name of the primary developer -->
Author: [AUTHOR_NAME]<!-- Example: "React Native with Expo" -->
Frontend: [TECH_STACK_FRONTEND]<!-- REQUIRED -->
Project Name: [PROJECT_NAME]
<!-- OPTIONAL - defaults to current date if not provided -->
Created: [DATE]- Placeholders:
[UPPERCASE_WITH_UNDERSCORES] - Comments:
<!-- HTML-style comments for markdown --> - Sections: Use markdown headers consistently
You can override framework templates by creating a .templates/ directory in your project:
my-project/
├── .templates/ # Project-specific overrides
│ └── feature-spec.template.md # Overrides framework template
└── .ai-framework/ # Framework (don't modify)
└── templates/
Scripts will check .templates/ first, then fall back to framework templates.
To add new template variables:
- Update script that processes templates (e.g.,
init-new-project.sh) - Add variable to template file
- Document in template header comment
- Update this README
Example:
# In script:
sed "s/\[NEW_VAR\]/$NEW_VAR_VALUE/g" template.md > output.md
# In template:
<!--
Variables:
- [NEW_VAR]: Description of what this is
-->To contribute a new template:
- Create template file with clear placeholders
- Add comprehensive header documentation
- Test with actual project
- Document in this README
- Submit PR with example usage
Need Help? See the main framework documentation in .ai-framework/README.md