diff --git a/.peppa/memory.md b/.peppa/memory.md index f0da349..c81b107 100644 --- a/.peppa/memory.md +++ b/.peppa/memory.md @@ -10,3 +10,4 @@ ## Соглашения - Тексты страницы — только в `site/i18n/{ru,kk,en}.json` (в HTML ключи `data-i18n`), слова — из `docs/glossary.md`; список «Нельзя» продублирован в `scripts/test-site.sh` (`banned`) — меняй оба. Технические детали — в `
` «Подробнее». +- `hello.txt` в корне (SBX-1) — файл проекта, не страница: правило i18n к нему не относится; его проверяет `scripts/test-site.sh`. diff --git a/hello.txt b/hello.txt new file mode 100644 index 0000000..0ea322e --- /dev/null +++ b/hello.txt @@ -0,0 +1 @@ +Привет! Это песочница Пеппы. diff --git a/openspec/changes/archive/2026-11-26-sbx-1-hello/.openspec.yaml b/openspec/changes/archive/2026-11-26-sbx-1-hello/.openspec.yaml new file mode 100644 index 0000000..7ed429c --- /dev/null +++ b/openspec/changes/archive/2026-11-26-sbx-1-hello/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-11-26 diff --git a/openspec/changes/archive/2026-11-26-sbx-1-hello/design.md b/openspec/changes/archive/2026-11-26-sbx-1-hello/design.md new file mode 100644 index 0000000..70ba06e --- /dev/null +++ b/openspec/changes/archive/2026-11-26-sbx-1-hello/design.md @@ -0,0 +1,15 @@ +# Design: sbx-1-hello + +## Context +Песочница проверяет работу Пеппы. Задача — создать `hello.txt` с приветствием. +Язык выбрал PM: русский. + +## Decisions +- `hello.txt` лежит в корне репозитория, а не в `site/`: это файл проекта, а не часть + страницы продукта, поэтому правило «тексты только в `site/i18n`» к нему не относится. +- Кодировка UTF-8, одна строка с переводом строки в конце. +- Проверка добавлена в `scripts/test-site.sh` (он уже стоит в `checks.test`), чтобы + не трогать `.peppa/project.json` и `.gitea/`. + +## Risks +Нет. diff --git a/openspec/changes/archive/2026-11-26-sbx-1-hello/proposal.md b/openspec/changes/archive/2026-11-26-sbx-1-hello/proposal.md new file mode 100644 index 0000000..94aa94f --- /dev/null +++ b/openspec/changes/archive/2026-11-26-sbx-1-hello/proposal.md @@ -0,0 +1,25 @@ +# SBX-1: hello.txt с приветствием + +Задача Пеппы: SBX-1. Проверка цикла Пеппы на простом изменении. + +## Why + +Песочнице нужен минимальный результат, на котором видно весь путь задачи: план, +изменение, проверки, ревью. PM выбрал язык приветствия — русский (вопрос #21). + +## What Changes + +- Файл `hello.txt` в корне репозитория с приветствием на русском. +- Проверка в `scripts/test-site.sh`: файл есть, не пустой и содержит «Привет». + +## Capabilities + +### New Capabilities +- `hello-file`: файл приветствия в корне репозитория. + +### Modified Capabilities +— + +## Impact + +Только новый файл и одна проверка в существующем скрипте; сайт и деплой не меняются. diff --git a/openspec/changes/archive/2026-11-26-sbx-1-hello/specs/hello-file/spec.md b/openspec/changes/archive/2026-11-26-sbx-1-hello/specs/hello-file/spec.md new file mode 100644 index 0000000..0c16bb4 --- /dev/null +++ b/openspec/changes/archive/2026-11-26-sbx-1-hello/specs/hello-file/spec.md @@ -0,0 +1,14 @@ +## ADDED Requirements + +### Requirement: Файл приветствия +В корне репозитория SHALL лежать файл `hello.txt` в UTF-8 с приветствием на русском языке. + +#### Scenario: Файл содержит приветствие +- **GIVEN** рабочая копия репозитория на основной ветке +- **WHEN** открываешь файл `hello.txt` в корне +- **THEN** в нём строка «Привет! Это песочница Пеппы.» + +#### Scenario: Файл пропал или пуст +- **GIVEN** в рабочей копии нет `hello.txt` или он пустой +- **WHEN** запускаются проверки `bash scripts/test-site.sh` +- **THEN** проверки падают с сообщением «hello.txt: нет приветствия» diff --git a/openspec/changes/archive/2026-11-26-sbx-1-hello/tasks.md b/openspec/changes/archive/2026-11-26-sbx-1-hello/tasks.md new file mode 100644 index 0000000..8fbb35e --- /dev/null +++ b/openspec/changes/archive/2026-11-26-sbx-1-hello/tasks.md @@ -0,0 +1,5 @@ +## 1. Приветствие + +- [x] 1.1 Создать `hello.txt` в корне с текстом «Привет! Это песочница Пеппы.» +- [x] 1.2 Добавить проверку `hello.txt` в `scripts/test-site.sh` +- [x] 1.3 Прогнать проверки `bash .gitea/peppa-check.sh <проверка>` для lint, typecheck, test, build diff --git a/openspec/specs/hello-file/spec.md b/openspec/specs/hello-file/spec.md new file mode 100644 index 0000000..50942fc --- /dev/null +++ b/openspec/specs/hello-file/spec.md @@ -0,0 +1,19 @@ +# hello-file Specification + +## Purpose +TBD - created by archiving change sbx-1-hello. Update Purpose after archive. + +## Requirements + +### Requirement: Файл приветствия +В корне репозитория SHALL лежать файл `hello.txt` в UTF-8 с приветствием на русском языке. + +#### Scenario: Файл содержит приветствие +- **GIVEN** рабочая копия репозитория на основной ветке +- **WHEN** открываешь файл `hello.txt` в корне +- **THEN** в нём строка «Привет! Это песочница Пеппы.» + +#### Scenario: Файл пропал или пуст +- **GIVEN** в рабочей копии нет `hello.txt` или он пустой +- **WHEN** запускаются проверки `bash scripts/test-site.sh` +- **THEN** проверки падают с сообщением «hello.txt: нет приветствия» diff --git a/scripts/test-site.sh b/scripts/test-site.sh index 4a8c570..96b6f35 100644 --- a/scripts/test-site.sh +++ b/scripts/test-site.sh @@ -49,6 +49,10 @@ for l in "${LANGS[@]}"; do else pass "$l: тексты соответствуют словарю"; fi done +# SBX-1, сценарии «Файл содержит приветствие», «Файл пропал или пуст» +if [[ -s hello.txt ]] && grep -q 'Привет' hello.txt; then pass "hello.txt: приветствие на месте" +else fail "hello.txt: нет приветствия"; fi + # Сценарии «Страница открывается по ссылке», «Несуществующий адрес», проверка здоровья на $PORT if command -v python3 >/dev/null 2>&1 && command -v curl >/dev/null 2>&1; then port=$(python3 -c 'import socket; s = socket.socket(); s.bind(("127.0.0.1", 0)); print(s.getsockname()[1])')