feat: универсальный шаблон проектов контура Raisa

- base_templates/: шаблоны платформы fastapi, streamlit, airflow без изменений
- contour/: платформа, подтверждённые версии, грабли, профили 4 типов приложений
- project-kit/: SDD (S/M/L, delta/spec/plan, constitution, DoR/DoD) + grill,
  критик тестов, UX gate, handoff; один канон AGENTS.md для Cursor и Claude Code
- scripts/init_project.sh: сборка нового проекта или подключение kit к существующему
- docs/decisions/0001: что перенесено из elite_vibecoding и dmukp и почему

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0139EkK4ShEj52pM9Z5UCwM1
This commit is contained in:
2026-11-09 17:44:48 +03:00
parent 66a2c6b487
commit 13d4be5464
105 changed files with 2548 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
# Опциональные файлы
Не копируются автоматически: добавляются в проект осознанно (отдельной S-задачей), потому что меняют рабочий процесс команды.
| Файл | Куда положить | Источник |
|------|---------------|----------|
| `pre-commit-config.fastapi-backend.yaml` | `.pre-commit-config.yaml` | `fastapi_dkr_frm_dev_backend`: black 90, isort, flake8, autoflake, bandit; pytest на pre-push |
| `flake8.fastapi-backend` | `.flake8` | там же |
| `pytest.fastapi-backend.ini` | `pytest.ini` | там же (`testpaths = api/tests`) |
Для streamlit/airflow тот же pre-commit подходит после правки `bandit`-исключений и пути тестов в хуке `pytest`.

View File

@@ -0,0 +1,4 @@
[flake8]
ignore = C901, E711, E712, E203, E266, E501, W503, F403, F401, F405
max-complexity = 18
select = B,C,E,F,W,T4,B9

View File

@@ -0,0 +1,82 @@
default_install_hook_types:
- pre-commit
- pre-push
repos:
- repo: https://github.com/psf/black
rev: "26.5.1"
hooks:
- id: black
args: ["--line-length=90"]
stages: [ pre-commit ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v6.0.0"
hooks:
- id: check-yaml
stages: [ pre-commit ]
- id: check-toml
stages: [ pre-commit ]
- id: end-of-file-fixer
stages: [ pre-commit ]
- id: trailing-whitespace
stages: [ pre-commit ]
- id: check-merge-conflict
stages: [ pre-commit ]
- id: debug-statements
stages: [ pre-commit ]
- repo: https://github.com/pycqa/flake8
rev: 7.4.1
hooks:
- id: flake8
args: [--max-line-length=90]
stages: [ pre-commit ]
- repo: https://github.com/pycqa/isort
rev: "9.0.2"
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black"]
stages: [ pre-commit ]
- id: isort
name: isort (pyi)
types: [pyi]
args: ["--profile", "black"]
stages: [ pre-commit ]
- repo: https://github.com/PyCQA/autoflake
rev: "v2.4.0"
hooks:
- id: autoflake
args:
[
"-i",
"--remove-duplicate-keys",
"--remove-unused-variables",
"--expand-star-imports",
"--remove-all-unused-imports",
"--exclude=__init__.py",
]
stages: [ pre-commit ]
- repo: https://github.com/PyCQA/bandit
rev: '1.9.4'
hooks:
- id: bandit
args:
[
'--recursive',
'--exclude',
'tests',
'-ll',
'web_app',
'1*',
'2*',
]
stages: [ pre-commit ]
- repo: local
hooks:
- id: pytest
name: Run tests
entry: bash -c 'if [ -d "api/tests" ] && ls api/tests/*.py 2>/dev/null; then pytest -v; else echo "No tests found in api/tests/, skipping"; exit 0; fi'
language: system
pass_filenames: false
always_run: true
stages: [ pre-push ]

View File

@@ -0,0 +1,3 @@
[pytest]
pythonpath = .
testpaths = api/tests