aios-core
Version:
Synkra AIOS: AI-Orchestrated System for Full Stack Development - Core Framework
178 lines (155 loc) • 6.45 kB
Markdown
# {{PROJECT_NAME}} Source Tree Standard
> **Auto-generated by AIOS** on {{GENERATED_DATE}}
> **Mode:** {{INSTALLATION_MODE}}
> **Tech Stack:** {{TECH_STACK}}
## Overview
This document defines the directory structure and file organization standards for **{{PROJECT_NAME}}**.
## Directory Structure
```
{{PROJECT_NAME}}/
├── .aios-core/ # AIOS configuration
│ └── core-config.yaml # Project configuration
│
├── .github/ # GitHub configuration
│ └── workflows/ # CI/CD workflows
│ ├── quality-gates.yml # Quality checks
│ └── deploy.yml # Deployment automation
│
├── docs/ # Documentation
│ ├── architecture/ # Project architecture docs
│ │ ├── source-tree.md # THIS FILE
│ │ ├── coding-standards.md # Coding conventions
│ │ └── tech-stack.md # Technology decisions
│ ├── guides/ # User guides
│ └── api/ # API documentation
│
{{#if IS_NODE}}
├── src/ # Source code
│ ├── index.{{FILE_EXT}} # Entry point
│ ├── config/ # Configuration modules
│ ├── services/ # Business logic
│ ├── utils/ # Utility functions
│ └── types/ # TypeScript types (if applicable)
│
├── tests/ # Test files
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
│ └── fixtures/ # Test fixtures
│
├── scripts/ # Build and utility scripts
│
├── package.json # Node.js dependencies
├── tsconfig.json # TypeScript config (if applicable)
{{/if}}
{{#if IS_PYTHON}}
├── {{PYTHON_PACKAGE_NAME}}/ # Python package
│ ├── __init__.py # Package init
│ ├── main.py # Entry point
│ ├── config/ # Configuration
│ ├── services/ # Business logic
│ └── utils/ # Utilities
│
├── tests/ # Test files
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
│ └── conftest.py # Pytest configuration
│
├── requirements.txt # Python dependencies
├── pyproject.toml # Project configuration
{{/if}}
{{#if IS_GO}}
├── cmd/ # Command entry points
│ └── {{PROJECT_NAME}}/
│ └── main.go # Main entry point
│
├── internal/ # Private packages
│ ├── config/ # Configuration
│ ├── services/ # Business logic
│ └── utils/ # Utilities
│
├── pkg/ # Public packages
│
├── go.mod # Go modules
├── go.sum # Dependency checksums
{{/if}}
│
├── .gitignore # Git ignore rules
├── .env.example # Environment template
└── README.md # Project documentation
```
## File Placement Rules
### Documentation Files
| File Pattern | Location | Purpose |
|--------------|----------|---------|
| `*.md` (project docs) | `docs/` | Project documentation |
| Architecture docs | `docs/architecture/` | Technical standards |
| User guides | `docs/guides/` | How-to documentation |
| API docs | `docs/api/` | API reference |
### Source Code
| File Pattern | Location | Purpose |
|--------------|----------|---------|
{{#if IS_NODE}}
| `*.js`, `*.ts` | `src/` | Application source code |
| `*.test.js`, `*.test.ts` | `tests/` | Test files |
| `*.d.ts` | `src/types/` | TypeScript declarations |
{{/if}}
{{#if IS_PYTHON}}
| `*.py` | `{{PYTHON_PACKAGE_NAME}}/` | Application source code |
| `test_*.py` | `tests/` | Test files |
{{/if}}
{{#if IS_GO}}
| `*.go` | `cmd/`, `internal/`, `pkg/` | Go source files |
| `*_test.go` | Same as source | Test files |
{{/if}}
### Configuration Files
| File | Location | Purpose |
|------|----------|---------|
| `.aios-core/core-config.yaml` | Root | AIOS configuration |
| `.env`, `.env.*` | Root | Environment variables |
| `.gitignore` | Root | Git ignore rules |
{{#if IS_NODE}}
| `package.json` | Root | Node.js dependencies |
| `tsconfig.json` | Root | TypeScript configuration |
| `.eslintrc.*` | Root | ESLint configuration |
| `.prettierrc` | Root | Prettier configuration |
{{/if}}
{{#if IS_PYTHON}}
| `pyproject.toml` | Root | Python project config |
| `requirements.txt` | Root | Python dependencies |
| `.flake8` | Root | Flake8 configuration |
{{/if}}
## Anti-Patterns (Files NOT Allowed at Root)
The following files should NOT be placed at the project root:
| Pattern | Correct Location | Reason |
|---------|------------------|--------|
| `*.md` (except README) | `docs/` | Documentation belongs in docs |
{{#if IS_NODE}}
| `*.js`, `*.ts` (source) | `src/` | Source code belongs in src |
| `*.test.js` | `tests/` | Tests belong in tests |
{{/if}}
{{#if IS_PYTHON}}
| `*.py` (source) | `{{PYTHON_PACKAGE_NAME}}/` | Source code belongs in package |
| `test_*.py` | `tests/` | Tests belong in tests |
{{/if}}
| Temporary files | N/A | Should not be committed |
## Naming Conventions
### Directories
- Use **kebab-case** for directory names: `my-feature/`
- Use lowercase: `services/` not `Services/`
### Files
{{#if IS_NODE}}
- Source files: **kebab-case** - `user-service.js`
- Test files: **kebab-case** with `.test` suffix - `user-service.test.js`
- React components: **PascalCase** - `UserProfile.tsx`
{{/if}}
{{#if IS_PYTHON}}
- Source files: **snake_case** - `user_service.py`
- Test files: **snake_case** with `test_` prefix - `test_user_service.py`
{{/if}}
{{#if IS_GO}}
- Source files: **snake_case** - `user_service.go`
- Test files: **snake_case** with `_test` suffix - `user_service_test.go`
{{/if}}
*Generated by AIOS Documentation Integrity System*
*Template Version: 1.0.0*