docs: prepare Olympuz public release
This commit is contained in:
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
@@ -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.
|
||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -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.
|
||||||
@@ -10,7 +10,7 @@ Athena — переносимая агентная ОС: разворот все
|
|||||||
- `chezmoi/` — шаблоны дотфайлов Сознания (улучшенный канон из best-practices vault).
|
- `chezmoi/` — шаблоны дотфайлов Сознания (улучшенный канон из best-practices vault).
|
||||||
- `skills/{setup-os,bootstrap-project,organize,athena-update}` — рождение ОС, каркас проекта, авто-раскладка, безопасное обновление живой системы (анализ→план→согласование→действие, бэкап+откат, `.athena-version`-стамп).
|
- `skills/{setup-os,bootstrap-project,organize,athena-update}` — рождение ОС, каркас проекта, авто-раскладка, безопасное обновление живой системы (анализ→план→согласование→действие, бэкап+откат, `.athena-version`-стамп).
|
||||||
- `claude-starter/` — эталон проекта, который Athena ставит конечному юзеру.
|
- `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.
|
- `specs/` — фазовый план (читать первым). `docs/decisions/` — ADR.
|
||||||
|
|
||||||
## Команды
|
## Команды
|
||||||
|
|||||||
@@ -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.
|
||||||
@@ -1,197 +1,180 @@
|
|||||||
<p align="center">
|
# Athena
|
||||||
<img src="docs/assets/hero.png" alt="Athena — a portable agent operating system" width="100%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h1 align="center">Athena</h1>
|
Athena is a portable agent OS for macOS that rebuilds a Claude Code and Codex workspace from versioned templates, manifests, and checks.
|
||||||
|
|
||||||
|
[Russian](README.ru.md) | [Feature reference](docs/FEATURES.en.md) | [Quickstart](#quickstart) | [Security](#security-and-privacy) | [Contributing](CONTRIBUTING.md)
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<strong>Set up your entire AI workspace on a brand-new Mac with one command.</strong><br>
|
<img src="docs/assets/pantheon/emblem.png" width="144" alt="Athena marble emblem with an owl, round shield, knowledge lines, and classical column">
|
||||||
From the rules your assistant follows to the live tools it runs — rebuilt in minutes, identically, every time.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|

|
||||||
🇬🇧 English · <a href="README.ru.md">🇷🇺 Русский</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
---
|
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
|
```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
|
```bash
|
||||||
git clone https://github.com/zarubinphil/athena ~/athena && cd ~/athena
|
cd "$HOME/athena"
|
||||||
claude
|
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=<layer>` to run one slice.
|
||||||
|
|
||||||
- The **Knowledge** part follows the *synthesis-on-write* approach popularized by **Andrej Karpathy** — you don't just dump notes, you distill them as you save, so what you keep is genuinely useful later.
|
| Layer | Responsibility |
|
||||||
- The **setup** is driven by [**chezmoi**](https://www.chezmoi.io/), the well-known dotfile manager, so your configuration is versioned and portable instead of hand-copied.
|
|---|---|
|
||||||
- The whole thing is **idempotent** — a fancy word for *safe to run again and again*. It converges to the same result; it never piles up duplicates.
|
| `0` | Install the Homebrew tool baseline from `Brewfile`. |
|
||||||
|
| `0b` | Clone optional tools from `tools.manifest`. |
|
||||||
|
| `1` | Merge public chezmoi templates with an optional private overlay, then apply the result. |
|
||||||
|
| `1b` | Reinstall declared Claude Code marketplaces and plugins. |
|
||||||
|
| `2` | Rebuild and validate the local capability registry. |
|
||||||
|
| `3` | Clone projects listed in `projects.manifest`. |
|
||||||
|
| `4` | Restore an optional knowledge vault. |
|
||||||
|
| `5` | Prepare secret storage, show MCP reauthentication work, and register launchd jobs. |
|
||||||
|
| `6` | Run repository and installed-state smoke checks. |
|
||||||
|
|
||||||
The payoff is simple: a correct system, stood up from zero in minutes, that keeps supporting your work — and quietly **saves you tokens** every day (more on that below).
|
The layout keeps three kinds of state apart:
|
||||||
|
|
||||||
---
|
| Plane | Contents | Default location |
|
||||||
|
|
||||||
## What happens when you run it
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/journey.png" alt="One command turns an empty Mac into a complete system" width="92%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
You start with an empty Mac and type one command. Athena does the rest, step by step — every step automatic, ordered, and checked. If anything fails to start, the run stops and tells you; you never end up with a half-built machine that pretends it's fine.
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/journey-diagram.png" alt="Step-by-step: empty Mac to working system" width="100%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## The big idea: three planes, never mixed
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/three-planes.png" alt="The three planes: Consciousness, Knowledge, Work" width="92%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
Everything you own lives in exactly one of three "planes." Keeping them apart is what stops the mess: temporary clutter never pollutes your rules, secrets never touch your code, and notes never get lost inside project folders.
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/planes-diagram.png" alt="Consciousness, Knowledge and Work — the three planes" width="100%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
| Plane | In plain terms | Where it lives |
|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| **Consciousness** | how your assistant thinks and behaves | `~/.claude` · `~/.codex` · `~/.agents` |
|
| Consciousness | Agent rules, skills, hooks, and registries | `~/.claude`, `~/.codex`, `~/.agents` |
|
||||||
| **Knowledge** | your personal, distilled library | `~/Мозг` |
|
| Knowledge | Personal notes and synthesized reference material | `~/Мозг` |
|
||||||
| **Work** | your actual projects and files | `~/Проекты` · `~/Хранилище` · `~/Архив` |
|
| Work | Projects, active files, and archives | Configured under `$HOME` |
|
||||||
|
|
||||||
The rules for *what goes where* live inside the system itself, so it grows tidily instead of turning into a junk drawer.
|
The public repository contains generic templates and examples. Personal repositories, filled manifests, credentials, and knowledge content stay in an optional private overlay. Generic-only setup remains a supported path.
|
||||||
|
|
||||||
---
|
## Examples
|
||||||
|
|
||||||
## How it builds: six calm layers
|
Preview every layer or run one layer:
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/six-layers.png" alt="Six layers stacking into one system" width="92%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
The setup script builds your machine from the ground up in ordered layers — like assembling floors of a building. Each layer is safe to repeat, and you can run just one if you want.
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/layers-diagram.png" alt="The layers, from Base to Checks" width="100%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
| Layer | What it sets up |
|
|
||||||
|---|---|
|
|
||||||
| **0 · Base** | the core command-line tools (`claude`, `codex`, `git`, `node`, `python`…) |
|
|
||||||
| **0b · Tools** | extra tools like bots, placed before the rules so they can wire themselves up |
|
|
||||||
| **1 · Consciousness** | your assistant's rules, habits, and helpers |
|
|
||||||
| **2 · Registry** | a searchable map of every skill and tool, so the right one is found fast |
|
|
||||||
| **3 · Work** | clones and installs your projects |
|
|
||||||
| **4 · Knowledge** | restores your personal library |
|
|
||||||
| **5 · Runtime** | secrets (kept in the macOS Keychain) and background helpers |
|
|
||||||
| **6 · Checks** | runs final checks to prove the whole thing actually works |
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./bootstrap.sh --only=1 # run a single layer
|
./bootstrap.sh --dry-run
|
||||||
./bootstrap.sh --dry-run # show everything, change nothing
|
./bootstrap.sh --only=1
|
||||||
|
./bootstrap.sh --only=6
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
Run the same checks used by the repository workflow:
|
||||||
|
|
||||||
## Share the structure, keep your secrets
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/merge.png" alt="A public stream and a private stream merging into one" width="92%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
Here's the tricky part of sharing a personal setup: the *structure* is worth opening up, but the *contents* — your secrets, your private notes — are not. Athena solves it by blending two sources at setup time: a **public** skeleton (this repo) and your own **private** layer. They merge into one, and your private layer always wins.
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/merge-diagram.png" alt="Public skeleton plus private layer blend into your machine" width="100%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
- Skip the private layer → you still get a complete, working **public-only** setup.
|
|
||||||
- Add it → your personal details are layered in on top.
|
|
||||||
- A built-in guard **fails the build** if any personal data ever slips into a public file. The boundary is enforced, not just hoped for.
|
|
||||||
|
|
||||||
This repository is the **public skeleton**. It contains zero personal data — no secrets, no private content, no hardcoded paths.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Why it saves you tokens
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/token-economy.png" alt="A tidy index lighting one direct path to the right answer" width="92%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
Every time an AI assistant has to rediscover its own tools, re-read scattered instructions, or wander around looking for the right skill, it burns tokens — and tokens are money and time. Athena gives the assistant a **tidy index of everything it can do**, so it walks straight to the right tool instead of searching.
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/token-diagram.png" alt="Without a map: wandering. With Athena: a direct path." width="100%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
Less wandering means fewer tokens spent on overhead and more spent on your actual problem. The structure does the remembering, so the assistant doesn't have to.
|
|
||||||
|
|
||||||
**Thin session — thousands of skills, near-zero startup cost.** Listing every skill to the assistant up front costs ~11k tokens *per session*. Athena hides the bulk behind a native, reversible `skillOverrides` map and surfaces only the ~5 most relevant skills per prompt (a fail-open `UserPromptSubmit` router), so the model starts clean and pulls capability on demand — every skill still reachable by `/name`. **~11k tokens saved per session.** See [docs/thin-session.md](docs/thin-session.md).
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Why it's efficient (in short)
|
|
||||||
|
|
||||||
- **One command, idempotent.** Nothing to skip or misremember; re-running converges instead of duplicating.
|
|
||||||
- **Fail-closed.** A half-finished setup never reports success — if something doesn't start, the run fails loudly.
|
|
||||||
- **Provable.** Built-in checks confirm both assistants see the same tools, every helper is valid, and no personal data leaked.
|
|
||||||
- **Token-aware by design.** The tool map routes to the right capability first, so reasoning goes to the task, not to overhead.
|
|
||||||
- **Tidy as it grows.** Clear rules for what-goes-where keep the system legible for years.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## What's in the repo (and what isn't)
|
|
||||||
|
|
||||||
| In the repo (safe to share) | **Not** in the repo |
|
|
||||||
|---|---|
|
|
||||||
| the setup script, tool list, checks | secret **values** (Keychain / `~/.secrets`) |
|
|
||||||
| layout rules, skills, helpers | your private notes (your own repo) |
|
|
||||||
| config templates, a project starter | your personal config & project list |
|
|
||||||
|
|
||||||
A personal instance = your filled-in config + your private layer, on top of this public skeleton.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Commands
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
shellcheck bootstrap.sh smoke/*.sh # lint
|
shellcheck -S error bootstrap.sh preinstall.sh smoke/*.sh
|
||||||
./bootstrap.sh --dry-run # dry run (preview, change nothing)
|
./bootstrap.sh --dry-run
|
||||||
./bootstrap.sh --only=<0|0b|1..6> # run a single layer
|
bash smoke/smoke.sh
|
||||||
smoke/smoke.sh # final checks
|
ATHENA_PRIVATE_DIR="$(mktemp -d)" bash smoke/dry-validate.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
**Go deeper:** [`docs/FEATURES.en.md`](docs/FEATURES.en.md) documents every function in detail. See [`specs/`](specs/) for the plan, [`docs/decisions/`](docs/decisions/) for architecture decisions, and [`CLAUDE.md`](CLAUDE.md) for the map.
|
After the agent layer is installed, inspect routing activity or build a weekly report:
|
||||||
|
|
||||||
---
|
```bash
|
||||||
|
node "$HOME/.agents/registry/scripts/athena-status.mjs" --days=7
|
||||||
|
node "$HOME/.agents/registry/scripts/athena-weekly-report.mjs" --format=html
|
||||||
|
```
|
||||||
|
|
||||||
<p align="center"><sub>Athena — goddess of wisdom and strategy. Your system, made portable.</sub></p>
|
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
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- pantheon-family:start -->
|
||||||
|
## 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) |
|
||||||
|
<!-- pantheon-family:end -->
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Athena is available under the [MIT License](LICENSE). Copyright remains with the Athena authors and contributors.
|
||||||
|
|||||||
+139
-156
@@ -1,197 +1,180 @@
|
|||||||
<p align="center">
|
# Athena
|
||||||
<img src="docs/assets/hero.png" alt="Athena — переносимая агентная операционная система" width="100%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h1 align="center">Athena</h1>
|
Athena - переносимая агентная ОС для macOS: собирает окружение Claude Code и Codex из версионируемых шаблонов, манифестов и проверок.
|
||||||
|
|
||||||
|
[English](README.md) | [Справочник функций](docs/FEATURES.ru.md) | [Быстрый старт](#быстрый-старт) | [Безопасность](#безопасность-и-приватность) | [Участие](CONTRIBUTING.md)
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<strong>Развернуть всё AI-окружение на новом Mac одной командой.</strong><br>
|
<img src="docs/assets/pantheon/emblem.png" width="144" alt="Мраморная эмблема Athena с совой, круглым щитом, схемой знаний и классической колонной">
|
||||||
От правил, которым следует твой ассистент, до живых инструментов, которые он запускает — пересобирается за минуты, идентично, каждый раз.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|

|
||||||
<a href="README.md">🇬🇧 English</a> · 🇷🇺 Русский
|
|
||||||
</p>
|
|
||||||
|
|
||||||
---
|
Статус: публичная рабочая реализация для macOS. Автотесты проверяют shell-синтаксис, шаблоны, чистоту репозитория, агентные контракты и generic clean-room рендер. Полную установку на свежий Mac по-прежнему принимают вручную по чеклисту.
|
||||||
|
|
||||||
**Ставится в два движения.**
|
## Быстрый старт
|
||||||
|
|
||||||
**Шаг 1.** Вставь в Терминал. Спросит пароль Mac, это один раз и нестрашно.
|
Нужен Mac, учётная запись администратора и сеть для Homebrew, npm и Git-репозиториев.
|
||||||
|
|
||||||
|
### Установка с просмотром кода
|
||||||
|
|
||||||
|
Склонируй репозиторий, прочитай installer и запусти его:
|
||||||
|
|
||||||
```bash
|
```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
|
```bash
|
||||||
git clone https://github.com/zarubinphil/athena ~/athena && cd ~/athena
|
cd "$HOME/athena"
|
||||||
claude
|
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-проверки репозитория и установленного состояния. |
|
||||||
|
|
||||||
Выгода простая: правильная система, поднятая с нуля за минуты, которая дальше поддерживает твою работу — и тихо **экономит токены** каждый день (об этом ниже).
|
Три плоскости не смешиваются:
|
||||||
|
|
||||||
---
|
| Плоскость | Что хранит | Базовое место |
|
||||||
|
|
||||||
## Что происходит, когда ты запускаешь
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/journey.png" alt="Одна команда превращает пустой Mac в готовую систему" width="92%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
Ты начинаешь с пустого Mac и набираешь одну команду. Дальше Athena делает всё сама, шаг за шагом — каждый шаг автоматический, по порядку и с проверкой. Если что-то не поднялось — прогон останавливается и говорит об этом; ты никогда не остаёшься с полусобранной машиной, которая делает вид, что всё в порядке.
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/journey-diagram.png" alt="Шаг за шагом: от пустого Mac до готовой системы" width="100%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
> Подписи на схемах — на английском (универсально); текст рядом всё поясняет.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Главная идея: три плоскости, не смешивать
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/three-planes.png" alt="Три плоскости: Сознание, Знания, Работа" width="92%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
Всё, чем ты владеешь, лежит ровно в одной из трёх «плоскостей». Их разделение и спасает от каши: временный мусор не пачкает правила, секреты не касаются кода, а заметки не теряются внутри папок проектов.
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/planes-diagram.png" alt="Сознание, Знания и Работа — три плоскости" width="100%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
| Плоскость | Простыми словами | Где живёт |
|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| **Сознание** | как ассистент думает и ведёт себя | `~/.claude` · `~/.codex` · `~/.agents` |
|
| Сознание | Правила агентов, skills, hooks и реестры | `~/.claude`, `~/.codex`, `~/.agents` |
|
||||||
| **Знания** | твоя личная отжатая библиотека | `~/Мозг` |
|
| Знания | Личные заметки и синтезированные справочные материалы | `~/Мозг` |
|
||||||
| **Работа** | твои настоящие проекты и файлы | `~/Проекты` · `~/Хранилище` · `~/Архив` |
|
| Работа | Проекты, активные файлы и архивы | Настраиваемые каталоги внутри `$HOME` |
|
||||||
|
|
||||||
Правила *что куда класть* живут внутри самой системы — поэтому она растёт аккуратно, а не превращается в свалку.
|
В публичном репозитории лежат generic-шаблоны и примеры. Личные репозитории, заполненные манифесты, учётные данные и содержимое vault остаются в необязательном приватном overlay. Публичный generic-вариант работает и без него.
|
||||||
|
|
||||||
---
|
## Примеры
|
||||||
|
|
||||||
## Как собирается: шесть спокойных слоёв
|
Посмотреть все слои или запустить один:
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/six-layers.png" alt="Шесть слоёв складываются в одну систему" width="92%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
Скрипт настройки собирает машину снизу вверх упорядоченными слоями — как этажи здания. Каждый слой можно безопасно повторить, и при желании запустить только один.
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/layers-diagram.png" alt="Слои, от Базы до Проверок" width="100%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
| Слой | Что настраивает |
|
|
||||||
|---|---|
|
|
||||||
| **0 · Base** | базовые CLI-инструменты (`claude`, `codex`, `git`, `node`, `python`…) |
|
|
||||||
| **0b · Tools** | дополнения вроде ботов, ставятся до правил, чтобы успеть подключиться |
|
|
||||||
| **1 · Consciousness** | правила, привычки и помощники ассистента |
|
|
||||||
| **2 · Registry** | поисковая карта всех навыков и инструментов — нужный находится быстро |
|
|
||||||
| **3 · Work** | клонирует и ставит твои проекты |
|
|
||||||
| **4 · Knowledge** | восстанавливает личную библиотеку |
|
|
||||||
| **5 · Runtime** | секреты (в Keychain macOS) и фоновые помощники |
|
|
||||||
| **6 · Checks** | гоняет финальные проверки, что всё реально работает |
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./bootstrap.sh --only=1 # один слой
|
./bootstrap.sh --dry-run
|
||||||
./bootstrap.sh --dry-run # показать всё, не менять ничего
|
./bootstrap.sh --only=1
|
||||||
|
./bootstrap.sh --only=6
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
Прогнать тот же набор, который использует workflow репозитория:
|
||||||
|
|
||||||
## Делись структурой, храни секреты
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/merge.png" alt="Публичный и приватный потоки сливаются в один" width="92%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
Вот в чём хитрость шеринга личной настройки: *структуру* открыть стоит, а *содержимое* — секреты, личные заметки — нет. Athena решает это, смешивая два источника при настройке: **публичный** скелет (этот репо) и твой **приватный** слой. Они сливаются в один, и приватный слой всегда побеждает.
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/merge-diagram.png" alt="Публичный скелет плюс приватный слой сливаются в твою машину" width="100%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
- Пропусти приватный слой → всё равно получишь полноценную **публичную** настройку.
|
|
||||||
- Добавь → твои личные детали лягут сверху.
|
|
||||||
- Встроенный страж **валит сборку**, если личные данные хоть раз просочатся в публичный файл. Граница обеспечена, а не «на авось».
|
|
||||||
|
|
||||||
Этот репозиторий — **публичный скелет**. Ноль личных данных: ни секретов, ни приватного контента, ни захардкоженных путей.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Почему это экономит токены
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/token-economy.png" alt="Аккуратный индекс подсвечивает один прямой путь к ответу" width="92%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
Каждый раз, когда ассистент заново ищет свои же инструменты, перечитывает разбросанные инструкции или бродит в поисках нужного навыка — он жжёт токены. А токены — это деньги и время. Athena даёт ассистенту **аккуратный индекс всего, что он умеет**, и он идёт прямо к нужному инструменту, а не ищет.
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="docs/assets/token-diagram.png" alt="Без карты: блуждание. С Athena: прямой путь." width="100%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
Меньше блужданий — меньше токенов на накладные расходы и больше на твою настоящую задачу. Структура запоминает за ассистента, чтобы ему не приходилось.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Почему это эффективно (коротко)
|
|
||||||
|
|
||||||
- **Одна команда, идемпотентно.** Нечего пропустить или забыть; повтор сходится, а не дублирует.
|
|
||||||
- **Fail-closed.** Полусобранная настройка никогда не отрапортует «успех» — если что-то не поднялось, прогон падает громко.
|
|
||||||
- **Доказуемо.** Встроенные проверки подтверждают: оба ассистента видят одни инструменты, каждый помощник валиден, личное не утекло.
|
|
||||||
- **Учитывает токены by design.** Карта инструментов ведёт к нужной способности сразу — рассуждение идёт на задачу, а не на накладные расходы.
|
|
||||||
- **Аккуратно растёт.** Чёткие правила «что куда» держат систему читаемой годами.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Что в репо (и чего нет)
|
|
||||||
|
|
||||||
| В репо (безопасно делиться) | **Нет** в репо |
|
|
||||||
|---|---|
|
|
||||||
| скрипт настройки, список инструментов, проверки | **значения** секретов (Keychain / `~/.secrets`) |
|
|
||||||
| правила раскладки, навыки, помощники | твои личные заметки (твой репо) |
|
|
||||||
| шаблоны конфига, стартер проекта | твой личный конфиг и список проектов |
|
|
||||||
|
|
||||||
Личная инстанция = твой заполненный конфиг + твой приватный слой поверх этого публичного скелета.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Команды
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
shellcheck bootstrap.sh smoke/*.sh # линт
|
shellcheck -S error bootstrap.sh preinstall.sh smoke/*.sh
|
||||||
./bootstrap.sh --dry-run # сухой прогон (предпросмотр, ничего не меняет)
|
./bootstrap.sh --dry-run
|
||||||
./bootstrap.sh --only=<0|0b|1..6> # один слой
|
bash smoke/smoke.sh
|
||||||
smoke/smoke.sh # финальные проверки
|
ATHENA_PRIVATE_DIR="$(mktemp -d)" bash smoke/dry-validate.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
**Глубже:** [`docs/FEATURES.ru.md`](docs/FEATURES.ru.md) описывает каждую функцию детально. Смотри [`specs/`](specs/) для плана, [`docs/decisions/`](docs/decisions/) для архитектурных решений, и [`CLAUDE.md`](CLAUDE.md) как карту.
|
После установки агентного слоя можно посмотреть routing-активность или собрать недельный отчёт:
|
||||||
|
|
||||||
---
|
```bash
|
||||||
|
node "$HOME/.agents/registry/scripts/athena-status.mjs" --days=7
|
||||||
|
node "$HOME/.agents/registry/scripts/athena-weekly-report.mjs" --format=html
|
||||||
|
```
|
||||||
|
|
||||||
<p align="center"><sub>Athena — богиня мудрости и стратегии. Твоя система, ставшая переносимой.</sub></p>
|
Первая команда читает локальные 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
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- pantheon-family:start -->
|
||||||
|
## Семья 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) |
|
||||||
|
<!-- pantheon-family:end -->
|
||||||
|
|
||||||
|
## Лицензия
|
||||||
|
|
||||||
|
Athena распространяется по [лицензии MIT](LICENSE). Права сохраняются за авторами и участниками проекта.
|
||||||
|
|||||||
+23
@@ -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.
|
||||||
+1
-1
@@ -204,7 +204,7 @@ layer4_vault() {
|
|||||||
layer5_runtime() {
|
layer5_runtime() {
|
||||||
phase 5 || return 0; say "Слой 5 — секреты · MCP · launchd"
|
phase 5 || return 0; say "Слой 5 — секреты · MCP · launchd"
|
||||||
mkdir -p "$HOME/.secrets" && chmod 700 "$HOME/.secrets"
|
mkdir -p "$HOME/.secrets" && chmod 700 "$HOME/.secrets"
|
||||||
warn "секреты: заполни по secrets-checklist.md (значения из Keychain, НЕ в git)"
|
warn "секреты: см. SECURITY.md (значения из Keychain, НЕ в git)"
|
||||||
warn "MCP: переавторизуй по mcp-reauth.md"
|
warn "MCP: переавторизуй по mcp-reauth.md"
|
||||||
[ "$(uname)" = "Darwin" ] || { warn "не macOS — launchd пропущен"; return 0; }
|
[ "$(uname)" = "Darwin" ] || { warn "не macOS — launchd пропущен"; return 0; }
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.5 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.5 MiB |
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
# Athena — Шаг 0 (руками в Терминале). Единственное, что агент не может: brew нужен пароль Mac.
|
# Athena — Шаг 0 (руками в Терминале). Единственное, что агент не может: brew нужен пароль Mac.
|
||||||
# Ставит: Homebrew + базовые CLI + Claude Code. Дальше всё ведёт Claude (/setup-os).
|
# Ставит: 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
|
set -euo pipefail
|
||||||
|
|
||||||
say() { printf '\033[1;36m▸ %s\033[0m\n' "$*"; }
|
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 готов"
|
ok "Claude Code готов"
|
||||||
|
|
||||||
# 6. Клон репо Athena (нужен для /setup-os). Идемпотентно.
|
# 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"
|
ok "репо Athena в ~/athena"
|
||||||
|
|
||||||
cat <<'DONE'
|
cat <<'DONE'
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ set -uo pipefail
|
|||||||
GUARD="${1:-$(cd "$(dirname "$0")/.." && pwd)/chezmoi/dot_claude/hooks/git-leak-guard.sh}"
|
GUARD="${1:-$(cd "$(dirname "$0")/.." && pwd)/chezmoi/dot_claude/hooks/git-leak-guard.sh}"
|
||||||
[ -f "$GUARD" ] || { echo "guard not found: $GUARD" >&2; exit 1; }
|
[ -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
|
TMP="$(mktemp -d)"; trap 'rm -rf "$TMP"' EXIT
|
||||||
git -C "$TMP" init -q
|
git -C "$TMP" init -q
|
||||||
git -C "$TMP" config user.email t@t; git -C "$TMP" config user.name t
|
git -C "$TMP" config user.email t@t; git -C "$TMP" config user.name t
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
### Шаг 0 — preinstall (Терминал, руками)
|
### Шаг 0 — preinstall (Терминал, руками)
|
||||||
```sh
|
```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 поп-ап появился, скрипт **ждёт** его (не летит дальше), затем продолжил.
|
- [ ] xcode-select поп-ап появился, скрипт **ждёт** его (не летит дальше), затем продолжил.
|
||||||
|
|||||||
+9
-8
@@ -27,9 +27,10 @@ echo "[личное] нет имён/usernames/приватных идентиф
|
|||||||
# Только git-TRACKED файлы (= что реально пушится). gitignored личное (athena.config.sh,
|
# Только git-TRACKED файлы (= что реально пушится). gitignored личное (athena.config.sh,
|
||||||
# *.log) и untracked (audit-2026-06-16/) в публичный каркас не попадают — git grep их не видит.
|
# *.log) и untracked (audit-2026-06-16/) в публичный каркас не попадают — git grep их не видит.
|
||||||
# Исключения-pathspec: smoke.sh (сам содержит паттерн).
|
# Исключения-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)
|
# 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"
|
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, не всю историю репо.
|
# Email автора = PII. Проверяем только коммиты ветки/PR, не всю историю репо.
|
||||||
# CI checkout refs/pull/N/merge → HEAD = merge commit, HEAD^2 = PR tip, HEAD^1 = main tip.
|
# 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 $?; }
|
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 → блок (exit 2)" '[ "$(ge /proj/.env)" = 2 ]'
|
||||||
chk ".env.example → пропуск (exit 0)" '[ "$(ge /proj/.env.example)" = 0 ]'
|
chk ".env.example → пропуск (exit 0)" '[ "$(ge /proj/.env.example)" = 0 ]'
|
||||||
# shellcheck disable=SC2088 # ~ в метке теста, путь реальный в кавычках
|
# shellcheck disable=SC2088 # ~ в метке теста, путь строится переносимо через HOME
|
||||||
chk "~/.secrets/* → блок" '[ "$(ge /Users/u/.secrets/db)" = 2 ]'
|
chk "~/.secrets/* → блок" '[ "$(ge "$HOME/.secrets/db")" = 2 ]'
|
||||||
chk "secret-shaped имя (db.key) → блок" '[ "$(ge /proj/db.key)" = 2 ]'
|
chk "secret-shaped имя (db.key) → блок" '[ "$(ge /proj/db.key)" = 2 ]'
|
||||||
chk ".env.production → блок" '[ "$(ge /proj/.env.production)" = 2 ]'
|
chk ".env.production → блок" '[ "$(ge /proj/.env.production)" = 2 ]'
|
||||||
chk "secrets/db.key (в подпапке) → блок" '[ "$(ge /proj/secrets/db.key)" = 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 "обычный .md → пропуск" '[ "$(ge /proj/readme.md)" = 0 ]'
|
||||||
chk "кириллический путь .env → блок (unicode-safe)" '[ "$(ge /Пользователь/проект/.env)" = 2 ]'
|
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'"
|
chk "matcher Bash проведён в settings.tmpl" "grep -q '\"Bash\"' '$HERE/chezmoi/dot_claude/settings.json.tmpl'"
|
||||||
# mock-JSON {command} на stdin → exit 2=блок, 0=пропуск
|
# mock-JSON {command} на stdin → exit 2=блок, 0=пропуск
|
||||||
bge() { printf '{"tool_input":{"command":"%s"}}' "$1" | bash "$BG" >/dev/null 2>&1; echo $?; }
|
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 "redirect в ~/.env → блок" '[ "$(bge "echo SK > $HOME/.env")" = 2 ]'
|
||||||
chk "tee в .ssh → блок" '[ "$(bge "echo k | tee /Users/u/.ssh/id_rsa")" = 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 --force main → блок" '[ "$(bge "git push --force origin main")" = 2 ]'
|
||||||
chk "git push -f master → блок" '[ "$(bge "git push -f master")" = 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 "обычный ls → пропуск" '[ "$(bge "ls -la /tmp")" = 0 ]'
|
||||||
chk "git push в фичеветку → пропуск" '[ "$(bge "git push origin feature/x")" = 0 ]'
|
chk "git push в фичеветку → пропуск" '[ "$(bge "git push origin feature/x")" = 0 ]'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user