chore(repository): initialize project foundation
This commit is contained in:
@@ -0,0 +1,53 @@
|
|||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# EditorConfig
|
||||||
|
# https://editorconfig.org
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.py]
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[*.toml]
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.yml]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.yaml]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.json]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.json5]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.html]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.css]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.js]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.ts]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.tsx]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[Makefile]
|
||||||
|
indent_style = tab
|
||||||
+118
@@ -0,0 +1,118 @@
|
|||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Python
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# Compiled extensions
|
||||||
|
*.so
|
||||||
|
*.pyd
|
||||||
|
*.dll
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Virtual Environments
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.venv/
|
||||||
|
venv/
|
||||||
|
env/
|
||||||
|
ENV/
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Distribution / Packaging
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
site/
|
||||||
|
*.egg-info/
|
||||||
|
.eggs/
|
||||||
|
pip-wheel-metadata/
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Testing
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.pytest_cache/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
htmlcov/
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Type Checking
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.mypy_cache/
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Ruff
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.ruff_cache/
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# MkDocs
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/site/
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# IDEs
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Operating System
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
desktop.ini
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Logs
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Environment Variables
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Temporary Files
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
*.tmp
|
||||||
|
*.temp
|
||||||
|
*.bak
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Jupyter
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.ipynb_checkpoints/
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Coverage Reports
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
coverage.xml
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# PyInstaller
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
repos:
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Generic hooks
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v5.0.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-toml
|
||||||
|
- id: check-json
|
||||||
|
- id: check-added-large-files
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: mixed-line-ending
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Ruff
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
|
rev: v0.12.9
|
||||||
|
hooks:
|
||||||
|
- id: ruff
|
||||||
|
args:
|
||||||
|
- --fix
|
||||||
|
|
||||||
|
- id: ruff-format
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# MyPy
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
|
rev: v1.18.1
|
||||||
|
hooks:
|
||||||
|
- id: mypy
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
Copyright (c) 2026 Spiral
|
||||||
|
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
SMAVS (Su Misura Al Vostro Sistema) is proprietary software developed by Spiral.
|
||||||
|
|
||||||
|
Permission is not granted to use, copy, modify, merge, publish, distribute, sublicense, sell, or create derivative works from this software or any portion of it without prior written authorization from Spiral.
|
||||||
|
|
||||||
|
This repository and its contents are confidential and proprietary.
|
||||||
|
|
||||||
|
Unless otherwise agreed in writing by Spiral, this software is provided solely for internal development, evaluation, and authorized use.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||||
|
|
||||||
|
IN NO EVENT SHALL SPIRAL OR THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF THE SOFTWARE.
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
# SMAVS
|
||||||
|
|
||||||
|
> **SMAVS (Su Misura Al Vostro Sistema)**
|
||||||
|
> The Composition Engine developed by **Spiral**.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
SMAVS is a deterministic composition engine designed to transform structured specifications into complete software artifacts through a modular composition pipeline.
|
||||||
|
|
||||||
|
Rather than generating code directly, SMAVS analyzes a specification, selects compatible modules, resolves dependencies, builds an execution plan, and composes the final artifact.
|
||||||
|
|
||||||
|
The framework is built around the principles of:
|
||||||
|
|
||||||
|
- Deterministic execution
|
||||||
|
- Modular architecture
|
||||||
|
- Composition over inheritance
|
||||||
|
- Domain-Driven Design
|
||||||
|
- Clean Architecture
|
||||||
|
- Layer isolation
|
||||||
|
- Dependency inversion
|
||||||
|
- Immutability
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
The composition pipeline follows the architecture defined by the Software Architecture Specification (SAS):
|
||||||
|
|
||||||
|
```
|
||||||
|
JSON
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
FastAPI
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Application
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
SMAVSEngine
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Analysis
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Knowledge
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Composition
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Artifact
|
||||||
|
```
|
||||||
|
|
||||||
|
Each layer communicates exclusively through Contracts.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Repository Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
smavs/
|
||||||
|
|
||||||
|
├── api/
|
||||||
|
├── artifacts/
|
||||||
|
├── core/
|
||||||
|
├── docs/
|
||||||
|
├── examples/
|
||||||
|
├── modules/
|
||||||
|
├── scripts/
|
||||||
|
├── shared/
|
||||||
|
├── templates/
|
||||||
|
└── tests/
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Current Status
|
||||||
|
|
||||||
|
Current version:
|
||||||
|
|
||||||
|
```
|
||||||
|
0.1.0 (Foundation)
|
||||||
|
```
|
||||||
|
|
||||||
|
Current implementation phase:
|
||||||
|
|
||||||
|
```
|
||||||
|
PHASE 0 — Foundation
|
||||||
|
```
|
||||||
|
|
||||||
|
Current sprint:
|
||||||
|
|
||||||
|
```
|
||||||
|
Sprint 0.1 — Repository
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Project Goals
|
||||||
|
|
||||||
|
SMAVS aims to provide a deterministic engine capable of:
|
||||||
|
|
||||||
|
- analyzing project specifications;
|
||||||
|
- building composition contexts;
|
||||||
|
- resolving module dependencies;
|
||||||
|
- selecting compatible variants;
|
||||||
|
- composing software artifacts;
|
||||||
|
- producing reproducible outputs.
|
||||||
|
|
||||||
|
Given the same:
|
||||||
|
|
||||||
|
- specification;
|
||||||
|
- framework version;
|
||||||
|
- module versions;
|
||||||
|
|
||||||
|
SMAVS always produces the same artifact.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Technology Stack
|
||||||
|
|
||||||
|
- Python 3.12+
|
||||||
|
- Domain-Driven Design
|
||||||
|
- Clean Architecture
|
||||||
|
- SOLID
|
||||||
|
- Dataclasses
|
||||||
|
- Protocols
|
||||||
|
- Pydantic v2 (API only)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
Project documentation is organized under the `docs/` directory.
|
||||||
|
|
||||||
|
It includes:
|
||||||
|
|
||||||
|
- Architecture
|
||||||
|
- Guides
|
||||||
|
- API
|
||||||
|
- Contracts
|
||||||
|
- Modules
|
||||||
|
- Examples
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This project is licensed under the terms described in the `LICENSE` file.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Developed by
|
||||||
|
|
||||||
|
**Spiral**
|
||||||
|
|
||||||
|
SMAVS is the proprietary Composition Engine powering the Spiral ecosystem.
|
||||||
+182
@@ -0,0 +1,182 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["setuptools>=69.0"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "smavs"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "SMAVS - Spiral Composition Engine."
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.11"
|
||||||
|
license = { file = "LICENSE" }
|
||||||
|
|
||||||
|
authors = [
|
||||||
|
{ name = "Spiral" }
|
||||||
|
]
|
||||||
|
|
||||||
|
keywords = [
|
||||||
|
"composition",
|
||||||
|
"engine",
|
||||||
|
"framework",
|
||||||
|
"modular",
|
||||||
|
"spiral",
|
||||||
|
"smavs",
|
||||||
|
]
|
||||||
|
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 2 - Pre-Alpha",
|
||||||
|
"Intended Audience :: Developers",
|
||||||
|
"License :: Other/Proprietary License",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"Programming Language :: Python :: 3.11",
|
||||||
|
"Typing :: Typed",
|
||||||
|
]
|
||||||
|
|
||||||
|
dependencies = []
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Homepage = "https://gitea.netbird.smavs.duckdns.org/SMAVS/smavs"
|
||||||
|
Repository = "https://gitea.netbird.smavs.duckdns.org/SMAVS/smavs"
|
||||||
|
Documentation = "https://gitea.netbird.smavs.duckdns.org/SMAVS/smavs"
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
|
||||||
|
dev = [
|
||||||
|
"ruff",
|
||||||
|
"mypy",
|
||||||
|
"pytest",
|
||||||
|
"pytest-cov",
|
||||||
|
"coverage",
|
||||||
|
"mkdocs",
|
||||||
|
"mkdocs-material",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
[tool.setuptools]
|
||||||
|
include-package-data = true
|
||||||
|
|
||||||
|
[tool.ruff]
|
||||||
|
target-version = "py311"
|
||||||
|
line-length = 88
|
||||||
|
src = ["api", "artifacts", "core", "modules", "shared", "tests"]
|
||||||
|
|
||||||
|
[tool.ruff.lint]
|
||||||
|
select = [
|
||||||
|
"E",
|
||||||
|
"F",
|
||||||
|
"W",
|
||||||
|
"I",
|
||||||
|
"UP",
|
||||||
|
"B",
|
||||||
|
"SIM",
|
||||||
|
"C4",
|
||||||
|
"N",
|
||||||
|
"ANN",
|
||||||
|
"RET",
|
||||||
|
"RUF",
|
||||||
|
]
|
||||||
|
|
||||||
|
ignore = [
|
||||||
|
"ANN101",
|
||||||
|
"ANN102",
|
||||||
|
]
|
||||||
|
|
||||||
|
fixable = ["ALL"]
|
||||||
|
|
||||||
|
[tool.ruff.format]
|
||||||
|
quote-style = "double"
|
||||||
|
indent-style = "space"
|
||||||
|
line-ending = "lf"
|
||||||
|
docstring-code-format = true
|
||||||
|
|
||||||
|
|
||||||
|
[tool.mypy]
|
||||||
|
python_version = "3.11"
|
||||||
|
|
||||||
|
strict = true
|
||||||
|
|
||||||
|
warn_unused_configs = true
|
||||||
|
warn_unused_ignores = true
|
||||||
|
warn_return_any = true
|
||||||
|
warn_redundant_casts = true
|
||||||
|
warn_unreachable = true
|
||||||
|
|
||||||
|
disallow_untyped_defs = true
|
||||||
|
disallow_incomplete_defs = true
|
||||||
|
disallow_untyped_calls = true
|
||||||
|
|
||||||
|
check_untyped_defs = true
|
||||||
|
|
||||||
|
no_implicit_optional = true
|
||||||
|
strict_equality = true
|
||||||
|
pretty = true
|
||||||
|
|
||||||
|
show_error_codes = true
|
||||||
|
|
||||||
|
exclude = [
|
||||||
|
"^docs/",
|
||||||
|
"^examples/",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
|
||||||
|
minversion = "8.0"
|
||||||
|
|
||||||
|
testpaths = [
|
||||||
|
"tests",
|
||||||
|
]
|
||||||
|
|
||||||
|
python_files = [
|
||||||
|
"test_*.py",
|
||||||
|
]
|
||||||
|
|
||||||
|
python_classes = [
|
||||||
|
"Test*",
|
||||||
|
]
|
||||||
|
|
||||||
|
python_functions = [
|
||||||
|
"test_*",
|
||||||
|
]
|
||||||
|
|
||||||
|
addopts = [
|
||||||
|
"-ra",
|
||||||
|
"--strict-markers",
|
||||||
|
"--strict-config",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
[tool.coverage.run]
|
||||||
|
|
||||||
|
branch = true
|
||||||
|
|
||||||
|
source = [
|
||||||
|
"api",
|
||||||
|
"artifacts",
|
||||||
|
"core",
|
||||||
|
"modules",
|
||||||
|
"shared",
|
||||||
|
]
|
||||||
|
|
||||||
|
omit = [
|
||||||
|
"tests/*",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.coverage.report]
|
||||||
|
|
||||||
|
show_missing = true
|
||||||
|
skip_empty = true
|
||||||
|
|
||||||
|
fail_under = 95
|
||||||
|
|
||||||
|
exclude_lines = [
|
||||||
|
"pragma: no cover",
|
||||||
|
"if TYPE_CHECKING:",
|
||||||
|
"raise NotImplementedError",
|
||||||
|
"pass",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
[tool.mkdocs]
|
||||||
|
config_file = "mkdocs.yml"
|
||||||
Reference in New Issue
Block a user