Files
APAW/.architect/conventions/conventions.md
¨NW¨ 6b71ea2b57 feat: add .architect/ project mapping system with architect-indexer agent and Docker containerization
- Add .architect/ directory structure (10 template files) as project brain for agent orientation
- Add architect-indexer agent that scans codebase and generates structured architecture docs
- Add Docker containerization: Dockerfile.architect-indexer, docker-compose.architect.yml
- Add TypeScript project-mapper module with staleness detection and context injection
- Add /index-project command, architect-first-contact rule, project-mapping skill
- Integrate orchestrator first-contact check: triggers indexing before any task delegation
- Add npm arch:* scripts for Docker-based indexing workflow
- Register agent in capability-index.yaml and AGENTS.md
2026-04-22 20:01:38 +01:00

2.1 KiB

Project Conventions

Auto-generated by architect-indexer. DO NOT edit manually.

Naming Conventions

Element Pattern Example
Files pending pending
Variables pending pending
Classes pending pending
Functions pending pending
Constants pending pending
Database tables pending pending
API endpoints pending pending

This section is populated after the first index run.

Code Patterns

Pattern When to Use Example File
Repository Data access pending
Service Business logic pending
Controller HTTP handling (thin) pending
Event Cross-module communication pending
Value Object Immutable type pending

Architectural Patterns

  1. Service Layer — Business logic in services, not controllers
  2. Repository Pattern — Data access abstracted behind interfaces
  3. Thin Controllers — Controllers delegate to services, max 10 lines per method
  4. Event-Driven — Cross-module via events, never direct model imports

Maximum Sizes

Element Max Enforcement
File 100 lines Architect check
Function 30 lines Lint rule
Class methods 5 public Code review
Controller method 10 lines Code review

Forbidden Practices

  1. Direct model imports from other modules
  2. Business logic in controllers
  3. Raw SQL queries outside repositories
  4. Hardcoded secrets or credentials
  5. Mutable global state
  6. Catching exceptions silently

Testing Conventions

Type Location Naming
Unit pending {name}.test.{ext}
Integration pending {name}.integration.test.{ext}
E2E pending {name}.e2e.test.{ext}

Git Conventions

Convention Pattern
Branch naming feature/{issue}-{slug}
Commit prefix feat:, fix:, refactor:, test:, docs:
PR naming #{issue}: brief description