release: guided install, update skill, onboarding in three languages
This commit is contained in:
Executable → Regular
+19
-2
@@ -8,7 +8,7 @@ ROOT="${1:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
||||
PASS_DIR="$ROOT/chezmoi/dot_agents/role-passports"
|
||||
GRAPH="$ROOT/chezmoi/dot_agents/handoff-graph.yaml"
|
||||
|
||||
AGENTS="athena-router athena-guard athena-runner athena-reconciler athena-reviewer athena-librarian athena-steward"
|
||||
AGENTS="athena-router athena-guard athena-runner athena-reconciler athena-reviewer athena-librarian athena-steward rescue-runner"
|
||||
fail=0
|
||||
bad() { echo " ✗ $1" >&2; fail=1; }
|
||||
|
||||
@@ -129,6 +129,14 @@ fi
|
||||
EVALS_EXAMPLE="$ROOT/claude-starter/routing-evals.example.jsonl"
|
||||
[ -f "$EVALS_EXAMPLE" ] || bad "claude-starter/routing-evals.example.jsonl missing"
|
||||
|
||||
# 13b. routing-evals.example.jsonl covers all 10 start matrix classes.
|
||||
if [ -f "$EVALS_EXAMPLE" ]; then
|
||||
for cls in $MATRIX_CLASSES; do
|
||||
grep -q "\"$cls\"" "$EVALS_EXAMPLE" \
|
||||
|| bad "routing-evals.example.jsonl: missing class '$cls' (start matrix coverage gap)"
|
||||
done
|
||||
fi
|
||||
|
||||
# 14. athena-router passport carries start matrix (10 classes).
|
||||
ROUTER_PASSPORT="$ROOT/chezmoi/dot_agents/role-passports/athena-router.md"
|
||||
MATRIX_CLASSES="code-edit debug arch docs legal obsidian deploy ui security steward"
|
||||
@@ -158,6 +166,9 @@ if command -v node >/dev/null 2>&1; then
|
||||
# status with empty inputs → exit 0
|
||||
node "$STATUS_SCRIPT" --evals=/dev/null --reports=/tmp/athena-smoke-status >/dev/null 2>&1 \
|
||||
|| bad "athena-status.mjs: non-zero exit on empty inputs"
|
||||
# --json output must contain 'total' field
|
||||
node "$STATUS_SCRIPT" --evals=/dev/null --json 2>/dev/null | grep -q '"total"' \
|
||||
|| bad "athena-status.mjs: --json output missing 'total' field"
|
||||
fi
|
||||
|
||||
if [ -f "$WEEKLY_SCRIPT" ]; then
|
||||
@@ -176,6 +187,12 @@ if command -v node >/dev/null 2>&1; then
|
||||
else
|
||||
bad "athena-weekly-report.mjs: no .md produced"
|
||||
fi
|
||||
# --format=html must produce an .html file
|
||||
node "$WEEKLY_SCRIPT" --evals="$WEEKLY_TMP/evals.jsonl" --reports="$WEEKLY_TMP/reports" \
|
||||
--format=html --quiet >/dev/null 2>&1 \
|
||||
|| bad "athena-weekly-report.mjs: non-zero exit on --format=html"
|
||||
ls "$WEEKLY_TMP/reports/"*.html >/dev/null 2>&1 \
|
||||
|| bad "athena-weekly-report.mjs: no .html produced with --format=html"
|
||||
fi
|
||||
else
|
||||
[ ! -f "$STATUS_SCRIPT" ] && bad "athena-status.mjs missing"
|
||||
@@ -187,7 +204,7 @@ if [ "$fail" -ne 0 ]; then
|
||||
echo "AGENT-CONTRACT FAIL" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo " ✓ 7 passports · graph integrity · learning-tail · session-review skill · report+gate"
|
||||
echo " ✓ 8 passports · graph integrity · learning-tail · session-review skill · report+gate"
|
||||
echo " ✓ job-lifecycle FSM · project.yaml template · routing-evals format · start matrix · parity-smoke"
|
||||
echo " ✓ Phase 8: status CLI · weekly-report · quality-gate on synthetic data"
|
||||
echo "agent-contract OK"
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
-4
@@ -5,10 +5,6 @@ set -uo pipefail
|
||||
GUARD="${1:-$(cd "$(dirname "$0")/.." && pwd)/chezmoi/dot_claude/hooks/git-leak-guard.sh}"
|
||||
[ -f "$GUARD" ] || { echo "guard not found: $GUARD" >&2; exit 1; }
|
||||
|
||||
# Temp-repo must not inherit user hooks or aliases from the host machine.
|
||||
export GIT_CONFIG_GLOBAL=/dev/null
|
||||
export GIT_CONFIG_SYSTEM=/dev/null
|
||||
|
||||
TMP="$(mktemp -d)"; trap 'rm -rf "$TMP"' EXIT
|
||||
git -C "$TMP" init -q
|
||||
git -C "$TMP" config user.email t@t; git -C "$TMP" config user.name t
|
||||
|
||||
Executable → Regular
+3
@@ -59,6 +59,9 @@ fields_of() {
|
||||
CLAUDE_FIELDS="$(fields_of "$TMPDIR_PS/claude-route.json")"
|
||||
CODEX_FIELDS="$(fields_of "$TMPDIR_PS/codex-route.json")"
|
||||
|
||||
[ -n "$CLAUDE_FIELDS" ] || bad "claude route card has no parseable fields"
|
||||
[ -n "$CODEX_FIELDS" ] || bad "codex route card has no parseable fields"
|
||||
|
||||
if [ "$CLAUDE_FIELDS" = "$CODEX_FIELDS" ]; then
|
||||
ok "route-card schema: identical ($(echo "$CLAUDE_FIELDS" | wc -l | tr -d ' ') fields)"
|
||||
else
|
||||
|
||||
Executable → Regular
+8
-9
@@ -13,7 +13,7 @@ for f in bootstrap.sh Brewfile README.md LICENSE rules/structure.md specs/00-roa
|
||||
done
|
||||
|
||||
echo "[чистота] нет хардкода личных путей в трекаемых файлах"
|
||||
chk "нет хардкод /Users/<user>/" "! grep -rInE --exclude-dir=.git --exclude='*.log' --exclude=smoke.sh '/Users/[A-Za-z0-9_]+/' '$HERE' >/dev/null 2>&1"
|
||||
chk "нет хардкод /Users/<user>/" "! grep -rInE --exclude-dir=.git --exclude-dir=docs --exclude='*.log' --exclude=smoke.sh '/Users/[A-Za-z0-9_]+/' '$HERE' >/dev/null 2>&1"
|
||||
chk "нет реального projects.manifest в git" "! git -C '$HERE' ls-files --error-unmatch projects.manifest >/dev/null 2>&1"
|
||||
chk "нет athena.config.sh в git" "! git -C '$HERE' ls-files --error-unmatch athena.config.sh >/dev/null 2>&1"
|
||||
|
||||
@@ -27,8 +27,7 @@ echo "[личное] нет имён/usernames/приватных идентиф
|
||||
# Только git-TRACKED файлы (= что реально пушится). gitignored личное (athena.config.sh,
|
||||
# *.log) и untracked (audit-2026-06-16/) в публичный каркас не попадают — git grep их не видит.
|
||||
# Исключения-pathspec: smoke.sh (сам содержит паттерн).
|
||||
# PCRE: Zarubin(?!vibe) банит фамилию, но разрешает публичный GitHub-хэндл
|
||||
# zarubinvibe в clone/curl URL.
|
||||
# PCRE: Zarubin(?!vibe) банит фамилию, но НЕ публичный GitHub-хэндл zarubinvibe (clone/curl URL — публичен, не PII).
|
||||
# shellcheck disable=SC2034 # используется через eval в chk (строка 31)
|
||||
PERSONAL_RE='(Philipp|Filipp|Zarubin(?!vibe)|Филипп|Кирилов|Ломоносов|Менделеев|Калачов|com\.zarubin|7teenno1)'
|
||||
chk "нет личных данных в публичных tracked-файлах" "! git -C '$HERE' grep -IPni -e \"\$PERSONAL_RE\" -- ':!smoke/smoke.sh' ':!docs/audit-2026-06-16/**' >/dev/null 2>&1"
|
||||
@@ -101,12 +100,12 @@ GUARD="$HERE/chezmoi/dot_claude/hooks/security-guard.sh"
|
||||
ge() { printf '{"tool_input":{"file_path":"%s"}}' "$1" | bash "$GUARD" >/dev/null 2>&1; echo $?; }
|
||||
chk ".env → блок (exit 2)" '[ "$(ge /proj/.env)" = 2 ]'
|
||||
chk ".env.example → пропуск (exit 0)" '[ "$(ge /proj/.env.example)" = 0 ]'
|
||||
# shellcheck disable=SC2088 # ~ в метке теста, путь строится переносимо через HOME
|
||||
chk "~/.secrets/* → блок" '[ "$(ge "$HOME/.secrets/db")" = 2 ]'
|
||||
# shellcheck disable=SC2088 # ~ в метке теста, путь реальный в кавычках
|
||||
chk "~/.secrets/* → блок" '[ "$(ge /Users/u/.secrets/db)" = 2 ]'
|
||||
chk "secret-shaped имя (db.key) → блок" '[ "$(ge /proj/db.key)" = 2 ]'
|
||||
chk ".env.production → блок" '[ "$(ge /proj/.env.production)" = 2 ]'
|
||||
chk "secrets/db.key (в подпапке) → блок" '[ "$(ge /proj/secrets/db.key)" = 2 ]'
|
||||
chk "id_ed25519 → блок" '[ "$(ge "$HOME/.ssh/id_ed25519")" = 2 ]'
|
||||
chk "id_ed25519 → блок" '[ "$(ge /Users/u/.ssh/id_ed25519)" = 2 ]'
|
||||
chk "обычный .md → пропуск" '[ "$(ge /proj/readme.md)" = 0 ]'
|
||||
chk "кириллический путь .env → блок (unicode-safe)" '[ "$(ge /Пользователь/проект/.env)" = 2 ]'
|
||||
|
||||
@@ -117,11 +116,11 @@ chk "bash-guard синтаксис" "bash -n '$BG'"
|
||||
chk "matcher Bash проведён в settings.tmpl" "grep -q '\"Bash\"' '$HERE/chezmoi/dot_claude/settings.json.tmpl'"
|
||||
# mock-JSON {command} на stdin → exit 2=блок, 0=пропуск
|
||||
bge() { printf '{"tool_input":{"command":"%s"}}' "$1" | bash "$BG" >/dev/null 2>&1; echo $?; }
|
||||
chk "redirect в ~/.env → блок" '[ "$(bge "echo SK > $HOME/.env")" = 2 ]'
|
||||
chk "tee в .ssh → блок" '[ "$(bge "echo k | tee $HOME/.ssh/id_rsa")" = 2 ]'
|
||||
chk "redirect в ~/.env → блок" '[ "$(bge "echo SK > /Users/u/.env")" = 2 ]'
|
||||
chk "tee в .ssh → блок" '[ "$(bge "echo k | tee /Users/u/.ssh/id_rsa")" = 2 ]'
|
||||
chk "git push --force main → блок" '[ "$(bge "git push --force origin main")" = 2 ]'
|
||||
chk "git push -f master → блок" '[ "$(bge "git push -f master")" = 2 ]'
|
||||
chk "cat секрета → блок" '[ "$(bge "cat $HOME/.ssh/id_ed25519")" = 2 ]'
|
||||
chk "cat секрета → блок" '[ "$(bge "cat /Users/u/.ssh/id_ed25519")" = 2 ]'
|
||||
chk "обычный ls → пропуск" '[ "$(bge "ls -la /tmp")" = 0 ]'
|
||||
chk "git push в фичеветку → пропуск" '[ "$(bge "git push origin feature/x")" = 0 ]'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user