diff --git a/.github/ISSUE_TEMPLATE/epic.md b/.github/ISSUE_TEMPLATE/epic.md new file mode 100644 index 0000000..a521256 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/epic.md @@ -0,0 +1,30 @@ +--- +name: Epic +about: Большая задача/эпик — используйте для крупных фич и релизов +labels: epic +--- + +# Заголовок epica + +Опишите цель эпика, scope и критерии приёма. + +## Описание + +(Кратко опишите проблему/цель) + +## Критерии приёма (GIVEN / WHEN / THEN) + +- GIVEN ... +- WHEN ... +- THEN ... + +## Артефакты + +- OpenAPI spec (если есть) +- Proposed image tag +- Доп. доки + +## Дополнительно + +Предполагаемые owners: @backend, @devops, @qa +Оценка: (story points) diff --git a/.github/ISSUE_TEMPLATE/release_request.md b/.github/ISSUE_TEMPLATE/release_request.md new file mode 100644 index 0000000..2946a40 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/release_request.md @@ -0,0 +1,16 @@ +--- +name: Release Request +about: Запрос на релиз +labels: release +--- + +# Release Request + +Версия: +Image tag: +Список PRs/links: +CI status link: +Test report link: + +Релиз в staging: [ ] +Релиз в prod: [ ] (требует TechLead approval) diff --git a/.github/ISSUE_TEMPLATE/task.md b/.github/ISSUE_TEMPLATE/task.md new file mode 100644 index 0000000..3dc3f05 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/task.md @@ -0,0 +1,18 @@ +--- +name: Task +about: Конкретная задача +labels: task +--- + +# Заголовок задачи + +Описание: + +Acceptance criteria: +- GIVEN +- WHEN +- THEN + +Owner: @ +Estimate (SP): +Priority: low/medium/high diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 0000000..afa6b42 --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,28 @@ +# Labels for project +- name: epic + color: ffbf00 + description: large feature or project +- name: backend + color: 0e8a16 + description: backend related work +- name: frontend + color: 1d76db + description: frontend related work +- name: devops + color: e99695 + description: infra / deployment +- name: qa + color: cfd3d7 + description: testing +- name: task + color: ededed + description: generic task +- name: blocker + color: b60205 + description: blocking issue +- name: release + color: 5319e7 + description: release request +- name: hotfix + color: fbca04 + description: urgent hotfix diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..55b9b4d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,13 @@ +# PR Title + +Описание изменений: + +Checklist: +- [ ] CI green +- [ ] Unit tests passed +- [ ] Integration tests (mock) passed +- [ ] Coverage >= 70% +- [ ] Security scan: no high/critical findings +- [ ] Assigned reviewer(s) + +Ссылки на связанные issue: diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..076878a --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,7 @@ +# CODEOWNERS file +# Format: path @owner + +/backend/ @backend +/frontend/ @frontend +/devops/ @devops +/tests/ @qa diff --git a/exports/techlead_payload.yaml b/exports/techlead_payload.yaml new file mode 100644 index 0000000..c1b079d --- /dev/null +++ b/exports/techlead_payload.yaml @@ -0,0 +1,45 @@ +# TechLead agent payload for Hermes import +id: techlead +persona: "TechLead‑bot проекта VPN Gateway" +responsibilities: + - Руководство архитектурой и принятие релизов + - Декомпозиция эпиков, утверждение DoD + - Назначение владельцев и приоритизация задач + - Эскалация blocker'ов и контроль качества +triggers: + - epic_created + - release_request + - blocker_over_48h +inputs: + - epic_description + - backlog_status + - ci_status + - test_reports +outputs: + - decomposed_issues + - release_checklist + - comments_on_issues_prs +allowed_actions: + - create_issue + - update_issue + - add_comment + - set_labels + - assign_users +decision_rules: + merge_requirements: "CI == green AND coverage >= 70% AND security_scan == low/none AND >=1 code review" + hotfix: "manual TechLead approval required (tag: hotfix-bypass)" + deploy_prod: "only after TechLead approval + smoke tests green" +escalation: + delay_hours: 48 + action: "create issue 'escalation', mention owners, propose meeting within 24h" +required_permissions: + - repo: issues write + - repo: pull_request comment + - ci: read_artifacts +observability: + - action_log: /var/log/hermes/techlead_actions.log + - metrics: [epic_to_release_days, dod_compliance_rate, escalations_count] +config: + COVERAGE_THRESHOLD: 70 + ESCALATION_DELAY_HOURS: 48 + TECHLEAD_LOG: /var/log/hermes/techlead_actions.log diff --git a/scripts/start_techlead_agent.sh b/scripts/start_techlead_agent.sh new file mode 100644 index 0000000..d782409 --- /dev/null +++ b/scripts/start_techlead_agent.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +# Start TechLead Hermes agent in tmux session +set -euo pipefail + +TECHLEAD_LOG=${TECHLEAD_LOG:-/var/log/hermes/techlead_actions.log} +COVERAGE_THRESHOLD=${COVERAGE_THRESHOLD:-70} +ESCALATION_DELAY_HOURS=${ESCALATION_DELAY_HOURS:-48} +TMUX_SESSION=${TMUX_SESSION:-techlead} +PROFILE=${HERMES_PROFILE:-default} + +mkdir -p "$(dirname "$TECHLEAD_LOG")" + +# Start tmux session with hermes interactive chat +if ! tmux has-session -t "$TMUX_SESSION" 2>/dev/null; then + tmux new-session -d -s "$TMUX_SESSION" "hermes --profile $PROFILE chat" + sleep 2 + # Send initial system instruction + tmux send-keys -t "$TMUX_SESSION" "You are TechLead-bot. Load persona from /workspace/exports/techlead_payload.yaml and start monitoring issues with label 'epic'." C-m + tmux send-keys -t "$TMUX_SESSION" "COVERAGE_THRESHOLD=$COVERAGE_THRESHOLD ESCALATION_DELAY_HOURS=$ESCALATION_DELAY_HOURS TECHLEAD_LOG=$TECHLEAD_LOG" C-m + echo "Started tmux session '$TMUX_SESSION' with TechLead agent." +else + echo "Tmux session '$TMUX_SESSION' already exists. Attach with: tmux attach -t $TMUX_SESSION" +fi + +# One-shot alternative (no tmux): +# hermes --profile $PROFILE chat -q "You are TechLead-bot. Load persona from /workspace/exports/techlead_payload.yaml and decompose epic: ..."