/
rustaibragimov
/
atlas-platform
Обзор
Документация
Войти
/
rustaibragimov
/
atlas-platform
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
scripts/process_check.sh
58 строк
2 KB
arsen_note
Add OpenSpec process and universal AI assistant proposal.
30 июн 2026, 00:01
30 июн 2026, 00:01
fabe8e1
Код
Авторство
О чём код?
#!/usr/bin/env bash # Validate OpenSpec and process conventions for atlas-platform. set -euo pipefail ROOT="$(cd "$(dirname "$0")/.." && pwd)" cd "$ROOT" errors=0 warn() { echo "WARN: $*" >&2; } fail() { echo "ERROR: $*" >&2; errors=$((errors + 1)); } # Required process docs for f in \ docs/openspec/README.md \ docs/NEWCOMER_FEATURE_DEVELOPMENT.md \ docs/CURSOR_ONBOARDING.md \ .cursorrules; do if [[ ! -f "$f" ]]; then fail "Missing process file: $f" fi done # OpenSpec directories with meta.yaml if [[ -d docs/openspec ]]; then shopt -s nullglob for dir in docs/openspec/20*/; do [[ -d "$dir" ]] || continue base="$(basename "$dir")" if [[ "$base" == "README.md" ]] || [[ -f "$dir/README.md" && ! -f "$dir/meta.yaml" ]]; then continue fi if [[ ! -f "$dir/meta.yaml" ]]; then fail "OpenSpec dir missing meta.yaml: $dir" continue fi if [[ ! -f "$dir/spec.md" ]]; then fail "OpenSpec dir missing spec.md: $dir" fi if [[ ! -f "$dir/design.md" ]]; then fail "OpenSpec dir missing design.md: $dir" fi status="$(grep -E '^status:' "$dir/meta.yaml" | head -1 | sed 's/status:[[:space:]]*//' | tr -d '\r' || true)" if [[ "$status" == "approved" || "$status" == "review" ]]; then if ! grep -q "## Beads" "$dir/design.md" 2>/dev/null; then warn "No ## Beads section in $dir/design.md (status=$status)" fi fi done shopt -u nullglob fi if [[ "$errors" -gt 0 ]]; then echo "process-check: $errors error(s)" >&2 exit 1 fi echo "process-check: OK"