ever-brain / brain /templates /project_memory.py
AlexKurian's picture
Final Clean Deploy
a02272f
Raw
History Blame Contribute Delete
1.44 kB
"""Project memory templates β€” scaffolding for per-project cognition."""
from pathlib import Path
# ── Directories ────────────────────────────────────────────
PROJECT_DIRS = [
"docs",
"logs",
"agents",
]
# ── Template content ──────────────────────────────────────
PROJECT_TEMPLATES: dict[str, str] = {
"context.md": """\
# Project Context
## Overview
## Technologies
## Key Components
""",
"architecture.md": """\
# Architecture
## Overview
## Structure
## Key Patterns
""",
"decisions.md": """\
# Architecture Decisions
| Date | Decision | Rationale | Status |
|------|----------|-----------|--------|
""",
"tasks.md": """\
# Active Tasks
## In Progress
## Pending
## Completed
""",
"handoff.md": """\
# Current Objective
# Current State
# Active Tasks
# Blockers
# Suggested Next Step
""",
}
def scaffold_project_memory(project_path: Path) -> None:
"""Create project memory structure with template files."""
project_path.mkdir(parents=True, exist_ok=True)
for d in PROJECT_DIRS:
(project_path / d).mkdir(parents=True, exist_ok=True)
for rel_path, content in PROJECT_TEMPLATES.items():
file_path = project_path / rel_path
file_path.write_text(content, encoding="utf-8")