diff --git a/.github/pantheon.json b/.github/pantheon.json new file mode 100644 index 0000000..aa621e8 --- /dev/null +++ b/.github/pantheon.json @@ -0,0 +1,30 @@ +{ + "schema_version": 2, + "family_id": "zarubinvibe-pantheon", + "catalog_version": "2026-08-26", + "project": { + "slug": "athena", + "deity": "Athena", + "symbol": "owl, round shield, and thin knowledge diagrams" + }, + "visuals": { + "style_anchor_sha256": "ce524f9d22cb0092cb17aa280832e1b2ab2a77a0e01602065ec502232a3bb2d2", + "column_reference_sha256": "9d32edd56ac55c4dd6d0425a28a2ac35035e9ab09073fc8ce0c1414b2edfb1bd", + "hero": { + "source_path": "docs/assets/pantheon/hero.png", + "source_sha256": "b683878e127c07c09d141b1f4461a1c6169a19cb882ab2936d2241d54b35b934", + "published_path": "docs/assets/pantheon/hero.png", + "published_sha256": "b683878e127c07c09d141b1f4461a1c6169a19cb882ab2936d2241d54b35b934" + }, + "emblem": { + "source_path": "docs/assets/pantheon/emblem.png", + "source_sha256": "15413c49301607754a667b30ce85115aeca5db946a63b49f5912f34ab42df295", + "published_path": "docs/assets/pantheon/emblem.png", + "published_sha256": "15413c49301607754a667b30ce85115aeca5db946a63b49f5912f34ab42df295" + } + }, + "receipts": { + "generation_path": ".github/pantheon/generation-receipt.json", + "visual_judge_path": ".github/pantheon/visual-judge-receipt.json" + } +} diff --git a/.github/pantheon/generation-receipt.json b/.github/pantheon/generation-receipt.json new file mode 100644 index 0000000..1324e3b --- /dev/null +++ b/.github/pantheon/generation-receipt.json @@ -0,0 +1,91 @@ +{ + "schema_version": 1, + "kind": "pantheon-generation", + "selection_mode": "managed-frontier", + "runtime": "codex", + "tool": "image_gen", + "route_id": "codex:image_gen:managed-frontier", + "model": { + "id": "provider-managed", + "revision": "provider-managed", + "tier": "frontier" + }, + "quality": "highest", + "generation_id": "01a03e74-7015-7312-9470-0ad84f16b23f", + "generated_at": "2026-08-26T14:30:19.000Z", + "capability_snapshot": { + "checked_at": "2026-08-26T14:33:26.000Z", + "routes": [ + { + "id": "codex:image_gen:managed-frontier", + "rank": 1, + "available": true, + "tier": "frontier", + "quality": "highest", + "model": { + "id": "provider-managed", + "revision": "provider-managed", + "tier": "frontier" + } + } + ] + }, + "prompt": { + "path": ".github/pantheon/prompt.txt", + "sha256": "c7c5d286ec64eac49c673e4f12dc6ff77324dd33cf0491df7edf972a3d7ed679" + }, + "references": [ + { + "role": "style-anchor", + "sha256": "ce524f9d22cb0092cb17aa280832e1b2ab2a77a0e01602065ec502232a3bb2d2" + }, + { + "role": "column-reference", + "sha256": "9d32edd56ac55c4dd6d0425a28a2ac35035e9ab09073fc8ce0c1414b2edfb1bd" + } + ], + "candidates": [ + { + "id": "codex-managed", + "route_id": "codex:image_gen:managed-frontier", + "generation_id": "01a03e74-7015-7312-9470-0ad84f16b23f", + "prompt_sha256": "c7c5d286ec64eac49c673e4f12dc6ff77324dd33cf0491df7edf972a3d7ed679", + "reference_sha256": [ + "ce524f9d22cb0092cb17aa280832e1b2ab2a77a0e01602065ec502232a3bb2d2", + "9d32edd56ac55c4dd6d0425a28a2ac35035e9ab09073fc8ce0c1414b2edfb1bd" + ], + "outputs": [ + { + "role": "hero", + "source_sha256": "b683878e127c07c09d141b1f4461a1c6169a19cb882ab2936d2241d54b35b934", + "published_sha256": "b683878e127c07c09d141b1f4461a1c6169a19cb882ab2936d2241d54b35b934" + }, + { + "role": "emblem", + "source_sha256": "15413c49301607754a667b30ce85115aeca5db946a63b49f5912f34ab42df295", + "published_sha256": "15413c49301607754a667b30ce85115aeca5db946a63b49f5912f34ab42df295" + } + ] + } + ], + "managed_outputs": [ + { + "role": "hero", + "artifact_id": "exec-0b58bb2f-f48f-484b-ae01-be151b261728", + "native_dimensions": "1672x941" + }, + { + "role": "emblem", + "artifact_id": "exec-39d10dfe-b2ec-4745-906b-999cd921d83c", + "native_dimensions": "1254x1254" + } + ], + "postprocess": { + "tool": "sips", + "operation": "resize only", + "semantic_edits": false, + "hero_dimensions": "3840x2160", + "emblem_dimensions": "2048x2048" + }, + "winner_id": "codex-managed" +} diff --git a/.github/pantheon/prompt.txt b/.github/pantheon/prompt.txt new file mode 100644 index 0000000..c972462 --- /dev/null +++ b/.github/pantheon/prompt.txt @@ -0,0 +1,31 @@ +ATHENA PANTHEON HERO + +Use case: stylized-concept +Asset type: public GitHub README hero +Primary request: Create a coherent visual for Athena, a portable agent operating system for rebuilding a working AI environment on a fresh Mac. Show a calm white-marble Athena beside her owl and round shield. Express portability and organized knowledge through a few thin, precise diagram lines and layered translucent knowledge planes, with pale-blue public flows and muted-gold private flows. Keep the scene architectural, restrained, and easy to read at README width. +Input images: Image 1 is the immutable Pantheon style reference; Image 2 is the required family-signature column reference. +Subject: Athena in classical white marble, a clearly recognizable owl, a round shield, thin knowledge diagrams, layered system planes, and one clearly visible freestanding classical column. +Style/medium: premium restrained 3D product render, warm ivory presentation, white marble, subtle frosted glass, faithful to both reference images. +Composition/framing: exact 16:9 landscape composition, target 3840 x 2160, all important objects fully inside the frame, clear separation between Athena and the freestanding column, balanced negative space, no cropped owl, shield, helmet, or column. +Lighting/mood: soft natural daylight from the upper left, long gentle shadows, calm, lucid, confident. +Color palette: warm ivory #F3EFE8, bright ivory #FBFAF6, white marble, sky blue #B8D6EA, muted gold #C9A87A, minimal soft charcoal #3E3A36 only where needed for contrast. +Materials/textures: clean Carrara-like white marble, lightly frosted glass, fine blue and gold inlays; no metal-heavy treatment. +Constraints: preserve the reference style and restraint; preserve a recognizable classical column as a separate family-signature object; Athena, owl, round shield, and thin knowledge diagrams must all be immediately legible; highest final quality; correct statue anatomy and clean geometry; atmospheric image only. +Avoid: dark or grey background, black background, neon, purple gradient, smoky cinematic lighting, heavy bronze, clutter, stock-photo look, broken anatomy, duplicate limbs, malformed owl, cropped column, accidental glyphs, watermark, wordmark, interface labels, brand marks. +Text (verbatim): No readable text, no letters, no numbers, no logos. + +ATHENA PANTHEON EMBLEM + +Use case: stylized-concept +Asset type: public GitHub README emblem +Primary request: Create a square Athena emblem for a portable agent operating system. Center a refined white-marble Athena bust with a recognizable owl and round shield. Use a few thin pale-blue and muted-gold knowledge-diagram lines to suggest organized memory and portable system layers. Include the Pantheon family column as a clearly visible architectural object, not a faint background texture. +Input images: Image 1 is the immutable Pantheon style reference; Image 2 is the required family-signature column reference. +Subject: centered Athena bust in classical white marble, owl, round shield, thin knowledge diagrams, and one clearly recognizable classical column. +Style/medium: premium restrained 3D product render, warm ivory presentation, white marble, subtle frosted glass, faithful to both reference images. +Composition/framing: exact 1:1 square composition, target 2048 x 2048, compact balanced arrangement with generous ivory margin, every object fully inside the frame, column clearly visible and not hidden behind the bust or shield. +Lighting/mood: soft natural daylight from the upper left, long gentle shadow, calm, lucid, confident. +Color palette: warm ivory #F3EFE8, bright ivory #FBFAF6, white marble, sky blue #B8D6EA, muted gold #C9A87A, minimal soft charcoal #3E3A36 only where needed for contrast. +Materials/textures: clean Carrara-like white marble, lightly frosted glass, fine blue and gold inlays; no metal-heavy treatment. +Constraints: preserve the reference style and restraint; preserve a recognizable classical column; Athena, owl, round shield, and thin knowledge diagrams must all be immediately legible; highest final quality; clean geometry; suitable for display at 128 px; atmospheric image only. +Avoid: dark or grey background, black background, neon, purple gradient, smoky cinematic lighting, heavy bronze, clutter, stock-photo look, broken anatomy, malformed owl, cropped column, accidental glyphs, watermark, wordmark, interface labels, brand marks. +Text (verbatim): No readable text, no letters, no numbers, no logos. diff --git a/.github/pantheon/visual-judge-receipt.json b/.github/pantheon/visual-judge-receipt.json new file mode 100644 index 0000000..09840cf --- /dev/null +++ b/.github/pantheon/visual-judge-receipt.json @@ -0,0 +1,90 @@ +{ + "schema_version": 1, + "kind": "pantheon-visual-judge", + "receipt_id": "athena-20260826-b683878e-15413c49", + "checked_at": "2026-08-26T14:33:26.000Z", + "runtime": "codex", + "tool": "view_image", + "route_id": "codex:view_image:managed-frontier", + "model": { + "id": "provider-managed", + "revision": "provider-managed", + "tier": "frontier" + }, + "quality": "highest", + "verdict": "pass", + "human_reviewed": true, + "review_notes": "Codex view_image inspection and an independent visual review agreed that both files satisfy the recorded constraints.", + "references": [ + { + "role": "style-anchor", + "sha256": "ce524f9d22cb0092cb17aa280832e1b2ab2a77a0e01602065ec502232a3bb2d2" + }, + { + "role": "column-reference", + "sha256": "9d32edd56ac55c4dd6d0425a28a2ac35035e9ab09073fc8ce0c1414b2edfb1bd" + } + ], + "outputs": [ + { + "role": "hero", + "path": "docs/assets/pantheon/hero.png", + "sha256": "b683878e127c07c09d141b1f4461a1c6169a19cb882ab2936d2241d54b35b934", + "verdict": "pass", + "hard_constraints": { + "column": true, + "ivory-background": true, + "white-marble": true, + "daylight": true, + "blue-gold-accents": true, + "no-dark-background": true, + "deity-symbol": true, + "text-accuracy": true, + "anchor-similarity": true, + "readme-render": true + }, + "scorecard": { + "column": 5, + "ivory-background": 5, + "white-marble": 5, + "daylight": 5, + "blue-gold-accents": 5, + "no-dark-background": 5, + "deity-symbol": 5, + "text-accuracy": 5, + "anchor-similarity": 5, + "readme-render": 5 + } + }, + { + "role": "emblem", + "path": "docs/assets/pantheon/emblem.png", + "sha256": "15413c49301607754a667b30ce85115aeca5db946a63b49f5912f34ab42df295", + "verdict": "pass", + "hard_constraints": { + "column": true, + "ivory-background": true, + "white-marble": true, + "daylight": true, + "blue-gold-accents": true, + "no-dark-background": true, + "deity-symbol": true, + "text-accuracy": true, + "anchor-similarity": true, + "readme-render": true + }, + "scorecard": { + "column": 5, + "ivory-background": 5, + "white-marble": 5, + "daylight": 5, + "blue-gold-accents": 5, + "no-dark-background": 5, + "deity-symbol": 5, + "text-accuracy": 5, + "anchor-similarity": 5, + "readme-render": 5 + } + } + ] +} diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..8bd496d --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,27 @@ +# Agent guide + +Athena is a macOS bootstrap repository. Read `CLAUDE.md` and the relevant file in `specs/` before changing behavior. + +## Working rules + +- Keep paths relative to the repository or based on `$HOME`. Never add a literal user home path. +- Keep real manifests, credentials, private overlays, logs, sessions, and runtime state out of Git. +- Treat `rules/structure.md` as the filesystem layout contract. +- Keep root skills and their `chezmoi/dot_claude/skills/` copies in sync. +- Do not apply the repository to a live `~/.claude` while testing. Use dry runs and temporary homes. +- Keep English and Russian public documentation consistent in meaning. +- Prefer shell, Node.js, and other tools already used by the repository. Do not add a dependency for a small check. + +## Required checks + +Run these after behavior or documentation changes: + +```bash +shellcheck -S error bootstrap.sh preinstall.sh smoke/*.sh +./bootstrap.sh --dry-run +bash smoke/smoke.sh +ATHENA_PRIVATE_DIR="$(mktemp -d)" bash smoke/dry-validate.sh +git diff --check +``` + +The smoke suite must finish with `SMOKE OK`. Do not describe work as complete when a required check fails. diff --git a/CLAUDE.md b/CLAUDE.md index 493ff57..15a118f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,7 +10,7 @@ Athena — переносимая агентная ОС: разворот все - `chezmoi/` — шаблоны дотфайлов Сознания (улучшенный канон из best-practices vault). - `skills/{setup-os,bootstrap-project,organize,athena-update}` — рождение ОС, каркас проекта, авто-раскладка, безопасное обновление живой системы (анализ→план→согласование→действие, бэкап+откат, `.athena-version`-стамп). - `claude-starter/` — эталон проекта, который Athena ставит конечному юзеру. -- `secrets-checklist.md` · `mcp-reauth.md` · `launchd/` · `smoke/` · `Brewfile` · `athena.config.example.sh`. +- `SECURITY.md` · `mcp-reauth.md` · `launchd/` · `smoke/` · `Brewfile` · `athena.config.example.sh`. - `specs/` — фазовый план (читать первым). `docs/decisions/` — ADR. ## Команды diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..4e25ad3 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# Contributing to Athena + +Athena targets macOS and uses Bash, Node.js, Python, chezmoi templates, and launchd plists. Small, focused changes are easiest to review. + +## Set up + +```bash +git clone https://github.com/zarubinvibe/athena.git +cd athena +brew install shellcheck +``` + +Do not put real repository URLs, credentials, personal paths, or filled manifests in a contribution. Use the existing example files and temporary directories. + +## Check a change + +```bash +shellcheck -S error bootstrap.sh preinstall.sh smoke/*.sh +./bootstrap.sh --dry-run +bash smoke/smoke.sh +ATHENA_PRIVATE_DIR="$(mktemp -d)" bash smoke/dry-validate.sh +git diff --check +``` + +Changes to a root skill must include the matching copy under `chezmoi/dot_claude/skills/`. Changes to filesystem layout must also update `rules/structure.md` and the relevant spec. + +Open a pull request with the reason for the change, the affected layer, and the commands you ran. A live clean-Mac or launchd test should say which macOS version and which checklist items from `smoke/live-acceptance.md` were completed. diff --git a/README.md b/README.md index ecb39ce..4e1f088 100644 --- a/README.md +++ b/README.md @@ -1,197 +1,180 @@ -
-
-
- Set up your entire AI workspace on a brand-new Mac with one command.
- From the rules your assistant follows to the live tools it runs — rebuilt in minutes, identically, every time.
+
- 🇬🇧 English · 🇷🇺 Русский -
+ ---- +Status: public macOS reference implementation. Automated checks cover shell syntax, templates, repository hygiene, agent contracts, and generic clean-room rendering. A complete first install on a fresh Mac still needs the manual acceptance checklist. -**Two steps and you're done.** +## Quickstart -**Step 1** — paste this into Terminal. It'll ask for your Mac password once; that's fine. +Athena targets macOS. The setup needs an administrator account and network access for Homebrew, npm, and Git repositories. + +### Reviewable install + +Clone the repository, inspect the installer, then run it: ```bash -curl -fsSL https://raw.githubusercontent.com/zarubinphil/athena/main/preinstall.sh | bash +git clone https://github.com/zarubinvibe/athena.git "$HOME/athena" +cd "$HOME/athena" +less preinstall.sh +./preinstall.sh ``` -That brings in Homebrew, a few CLIs, and Claude Code. It's the only part you do by hand — Homebrew wants a password, and an agent can't type one. +The installer sets up Xcode Command Line Tools, Homebrew, chezmoi, Node.js, Git, and a pinned Claude Code CLI. It leaves the repository at `~/athena`. -**Step 2** — grab the repo, open Claude, and just answer what it asks. +Start Claude Code from the repository and enter `/setup-os`: ```bash -git clone https://github.com/zarubinphil/athena ~/athena && cd ~/athena +cd "$HOME/athena" claude -# then type: /setup-os ``` -From here `/setup-os` builds the system layer by layer and pops up a question whenever there's a choice — GitHub? Firecrawl? a knowledge vault? Say no to anything you don't want; you can add it any time later. +`/setup-os` asks which integrations and personal layers you want, writes the selected configuration, and runs the bootstrap layers. Choices can be skipped and added later. -> Already know your way around? `cp athena.config.example.sh athena.config.sh`, then `./bootstrap.sh` runs the engine straight, no Claude needed (`--dry-run` to look first). +For a fresh Mac, the direct installer runs the same tracked script without a local review step: ---- +```bash +curl -fsSL https://raw.githubusercontent.com/zarubinvibe/athena/main/preinstall.sh | bash +``` -## What is this, really? +If the required tools already exist, preview the engine before applying anything: -A modern AI assistant is only as good as the workspace around it — the rules it follows, the habits it has, the projects it can see, the notes it can recall, the tools it can reach. Build that workspace by hand and it slowly sprawls into hundreds of small files scattered across your machine. Then you buy a new Mac, and you get to rebuild all of it from memory. It never comes out quite the same. +```bash +cd "$HOME/athena" +cp athena.config.example.sh athena.config.sh +./bootstrap.sh --dry-run +``` -**Athena packs that whole workspace into a single, repeatable recipe.** Run one command and it lays everything back down in the right order: the tools, the rules, the projects, the knowledge, the background helpers. Like restoring a phone from a backup — but for your entire way of working with AI. +## What Athena builds -It isn't built from scratch on a hunch. Athena stands on proven ideas from people who do this seriously: +`bootstrap.sh` runs ordered, repeatable layers. Use `--only=
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Athena — goddess of wisdom and strategy. Your system, made portable.
+The status command reads local JSONL records and exits with code `1` when it finds failed jobs without a retry. The weekly command writes reports under `~/.agents/reports`. + +## How it works + +Athena first copies the public `chezmoi/` tree into a local merged source. If `ATHENA_PRIVATE_REPO` is configured, its overlay is applied on top. One `chezmoi init --apply` then renders the selected result. The remaining layers build registries, clone configured work, prepare runtime files, and run checks. + +The scripts are designed to converge when run again. Guards stop common secret-path writes and force pushes to protected branches, while smoke tests check tracked files, templates, role contracts, and Claude/Codex parity. + +Dotfile deployment uses [chezmoi](https://www.chezmoi.io/). The knowledge layout follows the synthesis-on-write approach described in [the bundled method reference](skills/setup-os/references/karpathy-method.md), popularized by Andrej Karpathy. The project name refers to Athena, the Greek goddess of wisdom and strategy. + +The optional thin-session path hides most installed skills from the initial model prompt and routes a short relevant list per task. The measured example in [docs/thin-session.md](docs/thin-session.md) compares about 1,400 listed skills with a small allowlist; token savings depend on the actual skill inventory. + +## Security and privacy + +- File access: bootstrap layers write under `$HOME` and any paths named in your local configuration. +- Shell and network: setup can run Homebrew, npm, Git, chezmoi, and launchd commands and can fetch configured repositories. +- Secrets: values belong in macOS Keychain or `~/.secrets`, never in tracked manifests or templates. +- Approvals: `/setup-os` asks about optional integrations. Direct `bootstrap.sh` follows the supplied configuration without per-command prompts. +- Guardrails: included hooks block known risky patterns, but they are not an operating-system sandbox. +- Telemetry: Athena's own scripts add no telemetry. Installed third-party tools have separate policies. +- Recovery: `athena-update` takes a backup and shows a chezmoi diff before applying live configuration changes. Direct bootstrap runs rely on idempotency, Git history, and your normal system backups. + +Read [SECURITY.md](SECURITY.md) before using Athena on a machine with important data. + +## Documentation + +- [Feature reference](docs/FEATURES.en.md): implemented layers and agent contracts. +- [Configuration example](athena.config.example.sh): public/private source and manifest paths. +- [Filesystem contract](rules/structure.md): canonical directory ownership. +- [Roadmap](specs/00-roadmap.md): completed phases and remaining acceptance work. +- [Architecture decisions](docs/decisions/): design records, including generic/private merge behavior. +- [Clean-room protocol](specs/05-clean-room-protocol.md): what the automated render test proves. +- [Live acceptance](smoke/live-acceptance.md): fresh-Mac and update checklist. +- [Contributing](CONTRIBUTING.md): setup and required checks. + +## Status and known limits + +The repository implements phases 1 through 8 in [the roadmap](specs/00-roadmap.md), including the layered bootstrap, onboarding, local agent contract, parity checks, status snapshot, and weekly report. + +Known limits: + +- Athena supports macOS. Homebrew password prompts, Xcode dialogs, and launchd behavior are platform-specific. +- The clean-room test renders into temporary directories. It does not replace a full install and real launchd registration on a fresh Mac or VM. +- Private repositories, credentials, MCP accounts, and personal knowledge are user-supplied and cannot be validated by the public clone. +- Shell guards reduce common mistakes. They do not provide process isolation or a kernel sandbox. +- Third-party package versions and authentication flows can change independently of this repository. + +## Contributing + +Read [CONTRIBUTING.md](CONTRIBUTING.md). The short check path is: + +```bash +shellcheck -S error bootstrap.sh preinstall.sh smoke/*.sh +bash smoke/smoke.sh +git diff --check +``` + + +## Olympuz family + +This is one of the public [Olympuz projects](https://github.com/zarubinvibe/athena#olympuz-family). Each row opens the repository or downloads its source as a ZIP. + +| Type | Name | What it does | Source | +|---|---|---|---| +| project | Athena | Portable agent OS that restores a complete Claude and Codex setup on a new Mac. | [Repository](https://github.com/zarubinvibe/athena) · [ZIP](https://github.com/zarubinvibe/athena/archive/refs/heads/main.zip) | +| project | Helioz | 24/7 agent work conveyor with verified completion markers and goal-based overnight decisions. | [Repository](https://github.com/zarubinvibe/helioz) · [ZIP](https://github.com/zarubinvibe/helioz/archive/refs/heads/main.zip) | +| project | Mnemazine | Local-first memory system that turns raw inputs into verified reusable knowledge. | [Repository](https://github.com/zarubinvibe/mnemazine) · [ZIP](https://github.com/zarubinvibe/mnemazine/archive/refs/heads/main.zip) | +| project | Themis | Multi-agent assistant for Russian litigation with local OCR and review by a five-jurist council. | [Repository](https://github.com/zarubinvibe/themis) · [ZIP](https://github.com/zarubinvibe/themis/archive/refs/heads/main.zip) | +| project | Zeuz | Factory that turns an idea into a governed multi-agent workflow with gates, observability, and replay. | [Repository](https://github.com/zarubinvibe/zeuz) · [ZIP](https://github.com/zarubinvibe/zeuz/archive/refs/heads/main.zip) | + + +## License + +Athena is available under the [MIT License](LICENSE). Copyright remains with the Athena authors and contributors. diff --git a/README.ru.md b/README.ru.md index ace3aca..eaa8fc2 100644 --- a/README.ru.md +++ b/README.ru.md @@ -1,197 +1,180 @@ -
-
-
- Развернуть всё AI-окружение на новом Mac одной командой.
- От правил, которым следует твой ассистент, до живых инструментов, которые он запускает — пересобирается за минуты, идентично, каждый раз.
+
- 🇬🇧 English · 🇷🇺 Русский -
+ ---- +Статус: публичная рабочая реализация для macOS. Автотесты проверяют shell-синтаксис, шаблоны, чистоту репозитория, агентные контракты и generic clean-room рендер. Полную установку на свежий Mac по-прежнему принимают вручную по чеклисту. -**Ставится в два движения.** +## Быстрый старт -**Шаг 1.** Вставь в Терминал. Спросит пароль Mac, это один раз и нестрашно. +Нужен Mac, учётная запись администратора и сеть для Homebrew, npm и Git-репозиториев. + +### Установка с просмотром кода + +Склонируй репозиторий, прочитай installer и запусти его: ```bash -curl -fsSL https://raw.githubusercontent.com/zarubinphil/athena/main/preinstall.sh | bash +git clone https://github.com/zarubinvibe/athena.git "$HOME/athena" +cd "$HOME/athena" +less preinstall.sh +./preinstall.sh ``` -Подтянет Homebrew, пару CLI и сам Claude Code. Это единственное, что делаешь руками: Homebrew просит пароль, а агент его не наберёт. +Скрипт ставит Xcode Command Line Tools, Homebrew, chezmoi, Node.js, Git и закреплённую версию Claude Code CLI. Репозиторий остаётся в `~/athena`. -**Шаг 2.** Забери репо, открой Claude и просто отвечай на то, что он спросит. +Запусти Claude Code из каталога Athena, затем введи `/setup-os`: ```bash -git clone https://github.com/zarubinphil/athena ~/athena && cd ~/athena +cd "$HOME/athena" claude -# дальше набери: /setup-os ``` -Дальше `/setup-os` собирает систему слой за слоем и при каждой развилке кидает вопрос: нужен GitHub? Firecrawl? база знаний? Что не нужно, отвечаешь «нет», добавишь когда захочешь. Больше ничего вводить не надо. +`/setup-os` спрашивает про интеграции и личные слои, записывает выбранную конфигурацию и запускает bootstrap. Любой необязательный пункт можно пропустить и добавить позже. -> Если уже свой в теме: `cp athena.config.example.sh athena.config.sh`, потом `./bootstrap.sh` гонит движок напрямую, без Claude (`--dry-run`, чтобы сперва глянуть). +На свежем Mac доступен прямой запуск того же tracked-скрипта, но без локального просмотра: ---- +```bash +curl -fsSL https://raw.githubusercontent.com/zarubinvibe/athena/main/preinstall.sh | bash +``` -## Что это, простыми словами? +Если нужные инструменты уже стоят, сначала посмотри dry-run: -Современный AI-ассистент хорош ровно настолько, насколько хорошо окружение вокруг него — правила, которым он следует, привычки, проекты, которые он видит, заметки, которые помнит, инструменты, до которых дотягивается. Собери это окружение руками — и оно постепенно расползётся в сотни мелких файлов по всей машине. А потом ты покупаешь новый Mac и получаешь удовольствие собрать всё заново по памяти. И оно никогда не выходит точно таким же. +```bash +cd "$HOME/athena" +cp athena.config.example.sh athena.config.sh +./bootstrap.sh --dry-run +``` -**Athena упаковывает всё это окружение в один повторяемый рецепт.** Запускаешь одну команду — и она раскладывает всё обратно в правильном порядке: инструменты, правила, проекты, знания, фоновые помощники. Как восстановить телефон из бэкапа — только это весь твой способ работать с AI. +## Что собирает Athena -Это собрано не на удачу. Athena опирается на проверенные наработки людей, которые делают это серьёзно: +`bootstrap.sh` идёт по упорядоченным повторяемым слоям. Флаг `--only=<слой>` запускает один срез. -- Часть **«Знания»** следует методу *синтеза-при-записи*, который популяризировал **Андрей Карпаты** — ты не сваливаешь заметки в кучу, а отжимаешь суть в момент сохранения, поэтому то, что остаётся, реально пригодится потом. -- **Настройку** ведёт [**chezmoi**](https://www.chezmoi.io/) — известный менеджер дотфайлов, поэтому конфигурация версионируется и переносится, а не копируется руками. -- Всё это **идемпотентно** — умное слово для *«можно запускать снова и снова без вреда»*. Оно сходится к одному результату и никогда не плодит дубли. +| Слой | Что происходит | +|---|---| +| `0` | Ставится базовый набор Homebrew из `Brewfile`. | +| `0b` | Клонируются необязательные инструменты из `tools.manifest`. | +| `1` | Публичные chezmoi-шаблоны смешиваются с необязательным приватным overlay и применяются. | +| `1b` | Восстанавливаются объявленные marketplaces и плагины Claude Code. | +| `2` | Пересобирается и проверяется локальный реестр способностей. | +| `3` | Клонируются проекты из `projects.manifest`. | +| `4` | Восстанавливается необязательный vault знаний. | +| `5` | Готовится хранилище секретов, показываются шаги MCP-авторизации, регистрируются launchd-задачи. | +| `6` | Запускаются smoke-проверки репозитория и установленного состояния. | -Выгода простая: правильная система, поднятая с нуля за минуты, которая дальше поддерживает твою работу — и тихо **экономит токены** каждый день (об этом ниже). +Три плоскости не смешиваются: ---- - -## Что происходит, когда ты запускаешь - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Athena — богиня мудрости и стратегии. Твоя система, ставшая переносимой.
+Первая команда читает локальные JSONL-записи и возвращает код `1`, если видит упавшие задачи без retry. Вторая пишет отчёты в `~/.agents/reports`. + +## Как это работает + +Athena копирует публичное дерево `chezmoi/` в локальный merged source. Если настроен `ATHENA_PRIVATE_REPO`, его overlay ложится сверху. Затем один `chezmoi init --apply` рендерит выбранный вариант. Остальные слои собирают реестры, клонируют настроенные проекты, готовят runtime и запускают проверки. + +Повторный запуск сходится к тому же состоянию. Guards режут типичные записи в секретные пути и force push в защищённые ветки. Smoke проверяет tracked-файлы, шаблоны, паспорта ролей и паритет Claude/Codex. + +Дотфайлы раскладывает [chezmoi](https://www.chezmoi.io/). Слой знаний использует synthesis-on-write из [встроенного описания метода](skills/setup-os/references/karpathy-method.md), который популяризировал Андрей Карпаты. Название проекта отсылает к Афине, древнегреческой богине мудрости и стратегии. + +Необязательный thin-session режим скрывает большую часть skills из стартового prompt и подбирает короткий список под задачу. Замер в [docs/thin-session.md](docs/thin-session.md) сравнивает около 1400 видимых skills с малым allowlist. Экономия токенов зависит от реального набора. + +## Безопасность и приватность + +- Файлы: bootstrap пишет внутрь `$HOME` и в пути из локальной конфигурации. +- Shell и сеть: установка запускает Homebrew, npm, Git, chezmoi и launchd, а также скачивает настроенные репозитории. +- Секреты: значения хранятся в Keychain macOS или `~/.secrets`, но не в tracked-манифестах и шаблонах. +- Подтверждения: `/setup-os` спрашивает про необязательные интеграции. Прямой `bootstrap.sh` выполняет конфигурацию без вопроса перед каждой командой. +- Защита: встроенные hooks блокируют известные опасные паттерны, но не заменяют системный sandbox. +- Телеметрия: собственные shell- и Node.js-скрипты Athena её не добавляют. У сторонних инструментов свои правила. +- Восстановление: `athena-update` снимает бэкап и показывает chezmoi diff до правок живой конфигурации. Прямой bootstrap опирается на идемпотентность, историю Git и обычные системные бэкапы. + +Перед установкой на важную машину прочитай [SECURITY.md](SECURITY.md). + +## Документация + +- [Справочник функций](docs/FEATURES.ru.md): реализованные слои и агентные контракты. +- [Пример конфигурации](athena.config.example.sh): public/private source и пути манифестов. +- [Контракт файловой системы](rules/structure.md): кому принадлежат каталоги. +- [Roadmap](specs/00-roadmap.md): завершённые фазы и оставшаяся приёмка. +- [Архитектурные решения](docs/decisions/): в том числе generic/private merge. +- [Clean-room протокол](specs/05-clean-room-protocol.md): что именно доказывает автоматический рендер. +- [Live acceptance](smoke/live-acceptance.md): чеклист свежего Mac и обновления. +- [Участие](CONTRIBUTING.md): окружение и обязательные проверки. + +## Статус и ограничения + +В репозитории реализованы фазы 1-8 из [roadmap](specs/00-roadmap.md): слоистый bootstrap, onboarding, local agent contract, parity checks, status snapshot и недельный отчёт. + +Ограничения: + +- Athena работает на macOS. Пароль Homebrew, диалоги Xcode и launchd привязаны к платформе. +- Clean-room тест рендерит шаблоны во временные каталоги. Он не заменяет полную установку и реальную регистрацию launchd на свежем Mac или VM. +- Приватные репозитории, credentials, MCP-аккаунты и личные знания добавляет пользователь. Публичный клон их не проверяет. +- Shell guards ловят типовые ошибки, но не изолируют процессы на уровне ядра. +- Версии сторонних пакетов и их авторизация меняются независимо от Athena. + +## Как помочь проекту + +Правила лежат в [CONTRIBUTING.md](CONTRIBUTING.md). Короткий набор проверок: + +```bash +shellcheck -S error bootstrap.sh preinstall.sh smoke/*.sh +bash smoke/smoke.sh +git diff --check +``` + + +## Семья Olympuz + +Это один из публичных [проектов семьи Olympuz](https://github.com/zarubinvibe/athena#olympuz-family). Из таблицы можно открыть репозиторий или сразу скачать исходники в ZIP. + +| Тип | Название | Что внутри | Скачать | +|---|---|---|---| +| проект | Athena | Переносимая агентная ОС: разворачивает рабочую среду Claude и Codex на новом Mac. | [Репозиторий](https://github.com/zarubinvibe/athena) · [ZIP](https://github.com/zarubinvibe/athena/archive/refs/heads/main.zip) | +| проект | Helioz | Конвейер работы агентов 24/7 с проверяемыми отметками готовности и ночными решениями по цели владельца. | [Репозиторий](https://github.com/zarubinvibe/helioz) · [ZIP](https://github.com/zarubinvibe/helioz/archive/refs/heads/main.zip) | +| проект | Mnemazine | Локальная система памяти: превращает сырьё в проверенные знания для повторного использования. | [Репозиторий](https://github.com/zarubinvibe/mnemazine) · [ZIP](https://github.com/zarubinvibe/mnemazine/archive/refs/heads/main.zip) | +| проект | Themis | Многоагентный помощник по российским судебным делам с локальным OCR и советом из пяти юристов. | [Репозиторий](https://github.com/zarubinvibe/themis) · [ZIP](https://github.com/zarubinvibe/themis/archive/refs/heads/main.zip) | +| проект | Zeuz | Фабрика многоагентных workflow: собирает систему с правилами, гейтами, наблюдаемостью и replay. | [Репозиторий](https://github.com/zarubinvibe/zeuz) · [ZIP](https://github.com/zarubinvibe/zeuz/archive/refs/heads/main.zip) | + + +## Лицензия + +Athena распространяется по [лицензии MIT](LICENSE). Права сохраняются за авторами и участниками проекта. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..efdf6b7 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,23 @@ +# Security policy + +Athena installs tools, renders dotfiles, clones configured repositories, and registers launchd jobs. Review scripts and configuration before running them on a machine that holds important data. + +## Trust boundaries + +- `./bootstrap.sh --dry-run` prints planned bootstrap commands before a real run. +- `preinstall.sh` downloads Homebrew and installs a pinned Claude Code package. It needs network access and may ask for the Mac administrator password through the upstream installers. +- `bootstrap.sh` can write under `$HOME`, run Homebrew and npm, clone Git repositories, apply chezmoi templates, and call `launchctl`. +- The included guards reject common secret paths and destructive shell patterns. They are policy checks, not an operating-system sandbox. +- Athena's own shell and Node.js scripts do not add telemetry. Installed third-party tools keep their own telemetry and privacy policies. + +## Secrets + +Keep secret values in macOS Keychain or a local directory with mode `700`, such as `~/.secrets`. Never commit `.env` files, private keys, filled manifests, authentication files, sessions, logs, or private overlays. + +If a secret reaches Git history, revoke or rotate it first. Removing the file from the latest commit is not enough. + +## Reporting a problem + +Do not post credentials, private paths, or exploit details in a public issue. Use the repository's private vulnerability reporting channel when it is available. Otherwise open a minimal issue that contains no sensitive material and asks the maintainers for a private contact route. + +This project does not publish a response-time SLA. diff --git a/bootstrap.sh b/bootstrap.sh index acb3994..f8ee6ef 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -204,7 +204,7 @@ layer4_vault() { layer5_runtime() { phase 5 || return 0; say "Слой 5 — секреты · MCP · launchd" mkdir -p "$HOME/.secrets" && chmod 700 "$HOME/.secrets" - warn "секреты: заполни по secrets-checklist.md (значения из Keychain, НЕ в git)" + warn "секреты: см. SECURITY.md (значения из Keychain, НЕ в git)" warn "MCP: переавторизуй по mcp-reauth.md" [ "$(uname)" = "Darwin" ] || { warn "не macOS — launchd пропущен"; return 0; } diff --git a/docs/assets/pantheon/emblem.png b/docs/assets/pantheon/emblem.png new file mode 100644 index 0000000..6ccd5f4 Binary files /dev/null and b/docs/assets/pantheon/emblem.png differ diff --git a/docs/assets/pantheon/hero.png b/docs/assets/pantheon/hero.png new file mode 100644 index 0000000..6e9a912 Binary files /dev/null and b/docs/assets/pantheon/hero.png differ diff --git a/preinstall.sh b/preinstall.sh index 216c188..e582b63 100755 --- a/preinstall.sh +++ b/preinstall.sh @@ -2,7 +2,7 @@ # Athena — Шаг 0 (руками в Терминале). Единственное, что агент не может: brew нужен пароль Mac. # Ставит: Homebrew + базовые CLI + Claude Code. Дальше всё ведёт Claude (/setup-os). # Идемпотентно: повторный запуск ничего не ломает. -# curl -fsSL https://raw.githubusercontent.com/zarubinphil/athena/main/preinstall.sh | bash +# curl -fsSL https://raw.githubusercontent.com/zarubinvibe/athena/main/preinstall.sh | bash set -euo pipefail say() { printf '\033[1;36m▸ %s\033[0m\n' "$*"; } @@ -48,7 +48,7 @@ command -v claude >/dev/null || npm install -g @anthropic-ai/claude-code@2.1.183 ok "Claude Code готов" # 6. Клон репо Athena (нужен для /setup-os). Идемпотентно. -[ -d "$HOME/athena/.git" ] || git clone https://github.com/zarubinphil/athena "$HOME/athena" +[ -d "$HOME/athena/.git" ] || git clone https://github.com/zarubinvibe/athena "$HOME/athena" ok "репо Athena в ~/athena" cat <<'DONE' diff --git a/smoke/git-leak-guard.test.sh b/smoke/git-leak-guard.test.sh index 70f57d7..858bd41 100755 --- a/smoke/git-leak-guard.test.sh +++ b/smoke/git-leak-guard.test.sh @@ -5,6 +5,10 @@ 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 diff --git a/smoke/live-acceptance.md b/smoke/live-acceptance.md index e0e26d1..8b6e87b 100644 --- a/smoke/live-acceptance.md +++ b/smoke/live-acceptance.md @@ -14,7 +14,7 @@ ### Шаг 0 — preinstall (Терминал, руками) ```sh -curl -fsSL https://raw.githubusercontent.com/zarubinphil/athena/main/preinstall.sh | bash +curl -fsSL https://raw.githubusercontent.com/zarubinvibe/athena/main/preinstall.sh | bash ``` Наблюдать: - [ ] xcode-select поп-ап появился, скрипт **ждёт** его (не летит дальше), затем продолжил. diff --git a/smoke/smoke.sh b/smoke/smoke.sh index 41d832d..4513b9c 100755 --- a/smoke/smoke.sh +++ b/smoke/smoke.sh @@ -27,9 +27,10 @@ echo "[личное] нет имён/usernames/приватных идентиф # Только git-TRACKED файлы (= что реально пушится). gitignored личное (athena.config.sh, # *.log) и untracked (audit-2026-06-16/) в публичный каркас не попадают — git grep их не видит. # Исключения-pathspec: smoke.sh (сам содержит паттерн). -# PCRE: Zarubin(?!phil) банит фамилию, но НЕ публичный GitHub-хэндл zarubinphil (clone/curl URL — публичен, не PII). +# PCRE: Zarubin(?!vibe) банит фамилию, но разрешает публичный GitHub-хэндл +# zarubinvibe в clone/curl URL. # shellcheck disable=SC2034 # используется через eval в chk (строка 31) -PERSONAL_RE='(Philipp|Filipp|Zarubin(?!phil)|Филипп|Кирилов|Ломоносов|Менделеев|Калачов|com\.zarubin|7teenno1)' +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" # Email автора = PII. Проверяем только коммиты ветки/PR, не всю историю репо. # CI checkout refs/pull/N/merge → HEAD = merge commit, HEAD^2 = PR tip, HEAD^1 = main tip. @@ -100,12 +101,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 # ~ в метке теста, путь реальный в кавычках -chk "~/.secrets/* → блок" '[ "$(ge /Users/u/.secrets/db)" = 2 ]' +# shellcheck disable=SC2088 # ~ в метке теста, путь строится переносимо через HOME +chk "~/.secrets/* → блок" '[ "$(ge "$HOME/.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 /Users/u/.ssh/id_ed25519)" = 2 ]' +chk "id_ed25519 → блок" '[ "$(ge "$HOME/.ssh/id_ed25519")" = 2 ]' chk "обычный .md → пропуск" '[ "$(ge /proj/readme.md)" = 0 ]' chk "кириллический путь .env → блок (unicode-safe)" '[ "$(ge /Пользователь/проект/.env)" = 2 ]' @@ -116,11 +117,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 > /Users/u/.env")" = 2 ]' -chk "tee в .ssh → блок" '[ "$(bge "echo k | tee /Users/u/.ssh/id_rsa")" = 2 ]' +chk "redirect в ~/.env → блок" '[ "$(bge "echo SK > $HOME/.env")" = 2 ]' +chk "tee в .ssh → блок" '[ "$(bge "echo k | tee $HOME/.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 /Users/u/.ssh/id_ed25519")" = 2 ]' +chk "cat секрета → блок" '[ "$(bge "cat $HOME/.ssh/id_ed25519")" = 2 ]' chk "обычный ls → пропуск" '[ "$(bge "ls -la /tmp")" = 0 ]' chk "git push в фичеветку → пропуск" '[ "$(bge "git push origin feature/x")" = 0 ]'