Skip to content

Commit dcdc5eb

Browse files
Update documentation/architecture/openspec/project.md with project details and conventions
- Filled in Purpose, Tech Stack, Project Conventions, Domain Context, and External Dependencies sections. - Referenced `documentation/architecture/filesystem.rst` in Project Conventions. - Referenced architectural decision records for Three-Tier Architecture and Centralized Import Pattern. - Referenced test plan summary in Testing Strategy.
1 parent 73487dc commit dcdc5eb

1 file changed

Lines changed: 63 additions & 10 deletions

File tree

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,84 @@
11
# Project Context
22

33
## Purpose
4-
[Describe your project's purpose and goals]
4+
5+
The **emcd-projects** project addresses the complete lifecycle of Python projects, from creation to maintenance. It provides:
6+
7+
1. **Project Template**: A Copier-based template for rapid scaffolding of new Python projects with consistent structure and configuration.
8+
2. **Runtime Management**: A Python package (`emcdproj`) for ongoing project maintenance, including static site generation and badge management.
9+
3. **Automation**: A collection of reusable GitHub Actions workflows for CI/CD, testing, and documentation.
10+
11+
The goal is to facilitate a "single-maintainer model" while supporting community contributions, ensuring separation of concerns between template generation, workflow automation, and maintenance tooling.
512

613
## Tech Stack
7-
- [List your primary technologies]
8-
- [e.g., TypeScript, React, Node.js]
14+
15+
- **Language**: Python (>= 3.10)
16+
- **Project Management**: Hatch (build backend, environment management)
17+
- **Templating**: Copier, Jinja2
18+
- **Documentation**: Sphinx, myst-parser
19+
- **Testing**: Pytest, coverage
20+
- **Linting/Formatting**: Ruff, Pyright, isort, Vulture
21+
- **CLI**: Tyro
22+
- **CI/CD**: GitHub Actions
23+
- **Utilities**: `defusedxml`, `icecream-truck`, `absence`, `accretive`, `frigid`, `classcore`
924

1025
## Project Conventions
1126

27+
### Filesystem Organization
28+
29+
The project follows a specific filesystem organization documented in:
30+
- `documentation/architecture/filesystem.rst`
31+
32+
This document details the root directory structure, source code organization (including the `__` subpackage pattern), template system structure, and component integration.
33+
1234
### Code Style
13-
[Describe your code style preferences, formatting rules, and naming conventions]
35+
36+
- **Formatting**: Enforced by Ruff and isort. Line length is set to 79 characters.
37+
- **Typing**: Strict static typing checked by Pyright.
38+
- **Lints**: Comprehensive linting via Ruff and Vulture (dead code detection).
1439

1540
### Architecture Patterns
16-
[Document your architectural decisions and patterns]
41+
42+
- **Three-Tier Architecture**: The project is structured into three distinct tiers (Template Generation, CI/CD Automation, Project Maintenance) as detailed in:
43+
- `documentation/architecture/decisions/001-three-tier-architecture.rst`
44+
- **Centralized Import Pattern**: A double underscore (`__`) subpackage pattern is used for centralized import management to prevent namespace pollution and duplications. Details in:
45+
- `documentation/architecture/decisions/002-centralized-import-pattern.rst`
46+
- **CLI Structure**: The CLI uses `tyro` and separates command definition (`cli.py`, `website.py`) from the entry point (`__main__.py`).
1747

1848
### Testing Strategy
19-
[Explain your testing approach and requirements]
49+
50+
Testing follows the principles outlined in:
51+
- `documentation/architecture/testplans/summary.rst`
52+
53+
Key aspects include:
54+
- **Coverage**: High coverage requirements (near 100%) for core logic.
55+
- **Cross-platform**: Testing across multiple Python versions and operating systems via GitHub Actions.
56+
- **Types**: Doctests are run via Sphinx; unit tests via Pytest.
2057

2158
### Git Workflow
22-
[Describe your branching strategy and commit conventions]
59+
60+
- **Branching**:
61+
- `master` (or `main`): Primary development branch.
62+
- `publication`: Dedicated branch for hosting the versioned static website (documentation + coverage reports).
63+
- **Workflows**:
64+
- `tester`: Runs on push/PR to verify code and tests.
65+
- `docsgen`: Generates documentation.
66+
- `linters`: Checks code style and static analysis.
67+
- `packagers`: Builds the distribution packages.
2368

2469
## Domain Context
25-
[Add domain-specific knowledge that AI assistants need to understand]
70+
71+
- **emcdproj**: The CLI tool included in the project. It handles tasks like `website update` to manage the static documentation site, ensuring versioned docs and coverage badges are up-to-date without relying on external services like ReadTheDocs.
72+
- **Template Processing**: The `template/` directory contains the source for the Copier template. It mirrors the generated project structure but uses Jinja2 for customization.
73+
- **Auxiliary Workspace**: The `.auxiliary/` directory is used for local development artifacts, caches, and tool configurations, keeping the root clean.
2674

2775
## Important Constraints
28-
[List any technical, business, or regulatory constraints]
76+
77+
- **Single-Maintainer Focus**: The architecture is designed to minimize overhead for a single maintainer while still allowing for community input.
78+
- **No External Doc Hosting Services**: The project explicitly avoids services like ReadTheDocs or Codecov in favor of a self-managed static site on GitHub Pages (via the `publication` branch).
2979

3080
## External Dependencies
31-
[Document key external services, APIs, or systems]
81+
82+
- **GitHub Actions**: Heavily relied upon for all automation (testing, publishing, etc.).
83+
- **PyPI**: Target for package distribution.
84+
- **Copier**: Required for using and updating the project template.

0 commit comments

Comments
 (0)