project-athena 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/README.md +99 -4
- package/dist/cli.js +1585 -395
- package/dist/web/assets/{Editor-DmFaONG7.js → Editor-CL6A82dQ.js} +1 -1
- package/dist/web/assets/{abnfDiagram-O67JEVCF-BEaDGLKl.js → abnfDiagram-O67JEVCF-BuFfjTfx.js} +1 -1
- package/dist/web/assets/architecture-7GRP2DOG-CGSEE8po.js +1 -0
- package/dist/web/assets/{architectureDiagram-NJMV4G6O-Cr_YqU4C.js → architectureDiagram-NJMV4G6O-BTsv87pA.js} +1 -1
- package/dist/web/assets/{blockDiagram-BEXU5L5S-NA64lNxM.js → blockDiagram-BEXU5L5S-CNXqyKIx.js} +1 -1
- package/dist/web/assets/{c4Diagram-YGBWAQC7-C9OZTI8T.js → c4Diagram-YGBWAQC7-kksFXQoJ.js} +1 -1
- package/dist/web/assets/channel-Dneho6u-.js +1 -0
- package/dist/web/assets/{chunk-3FUC2YCW-PivwegVV.js → chunk-3FUC2YCW-BY99XYBs.js} +1 -1
- package/dist/web/assets/{chunk-5DYCD2WN-DH_dVKgx.js → chunk-5DYCD2WN-h-PRThMP.js} +1 -1
- package/dist/web/assets/{chunk-742MDFTN-DTR6iTOw.js → chunk-742MDFTN-BIxfyBUj.js} +1 -1
- package/dist/web/assets/{chunk-7INBJB4K-XeJOzIDQ.js → chunk-7INBJB4K-DZtctDdk.js} +1 -1
- package/dist/web/assets/{chunk-7M6MHVWA-Bn-cXg0l.js → chunk-7M6MHVWA-BX9fUUbL.js} +1 -1
- package/dist/web/assets/{chunk-7PRAP22T-CPe5zfLc.js → chunk-7PRAP22T-X1s3e81n.js} +1 -1
- package/dist/web/assets/{chunk-GTNCS2PH-DSn-mpqy.js → chunk-GTNCS2PH-Bh8eluU-.js} +1 -1
- package/dist/web/assets/{chunk-GWA4HPMP-DE4DJkth.js → chunk-GWA4HPMP-D1KATAi0.js} +1 -1
- package/dist/web/assets/{chunk-MBY4JIJT-9uaOqseW.js → chunk-MBY4JIJT-CEErv5kP.js} +1 -1
- package/dist/web/assets/{chunk-NETBCI7D-bxqe7jPe.js → chunk-NETBCI7D-BXiH4aPa.js} +1 -1
- package/dist/web/assets/{chunk-O7XYJQB3-CjZQSnt8.js → chunk-O7XYJQB3-Dede62yi.js} +1 -1
- package/dist/web/assets/{chunk-UA2S7LBM-BfYbPxwY.js → chunk-UA2S7LBM-KZ9aWRTa.js} +1 -1
- package/dist/web/assets/{chunk-WEXAMYUT-CT8bG5L7.js → chunk-WEXAMYUT-xf-3L2zU.js} +1 -1
- package/dist/web/assets/{chunk-Z7XXMR3K-CHWuLoFG.js → chunk-Z7XXMR3K-DLpRdZ8n.js} +1 -1
- package/dist/web/assets/{chunk-ZIGJFQKS-C6SOqBs6.js → chunk-ZIGJFQKS-BdJ0_J-U.js} +1 -1
- package/dist/web/assets/{classDiagram-v2-NBCMYWYE-CrSxkUNF.js → classDiagram-v2-NBCMYWYE-C5VzGDGq.js} +1 -1
- package/dist/web/assets/{cynefin-OW5HDTMX-CMbTYwga.js → cynefin-OW5HDTMX-BqOgbE7U.js} +1 -1
- package/dist/web/assets/{cynefinDiagram-VND7K2PF-B8wb03CF.js → cynefinDiagram-VND7K2PF-CCC_feG5.js} +1 -1
- package/dist/web/assets/{dagre-6A5THRUB-Bz-BHtjW.js → dagre-6A5THRUB-SLP-94sd.js} +1 -1
- package/dist/web/assets/{diagram-22UHCM2B-C9M-mcex.js → diagram-22UHCM2B-DpHwEBYM.js} +1 -1
- package/dist/web/assets/{diagram-3UASUU5V-q18RgATq.js → diagram-3UASUU5V-iGFwuMEk.js} +1 -1
- package/dist/web/assets/{diagram-ATOU4E4O-zywdDXPc.js → diagram-ATOU4E4O-Csx9hj0z.js} +1 -1
- package/dist/web/assets/{diagram-CDSNMT55-BGMdofKO.js → diagram-CDSNMT55-yGKrLRO5.js} +1 -1
- package/dist/web/assets/{diagram-MLGK6HIB-BdT0J6Xl.js → diagram-MLGK6HIB-mDpCormD.js} +1 -1
- package/dist/web/assets/{diagram-MPIPVDR6-BXdFmdOp.js → diagram-MPIPVDR6-BJHdatrF.js} +1 -1
- package/dist/web/assets/{ebnfDiagram-ZINNZB2B-B7Mz8zd0.js → ebnfDiagram-ZINNZB2B-ClJbCBBu.js} +1 -1
- package/dist/web/assets/{elk-276RUBZZ-CQ4lVw-r.js → elk-276RUBZZ-C5tFZMYm.js} +1 -1
- package/dist/web/assets/{erDiagram-OPXOYQCR-DmmZBLvC.js → erDiagram-OPXOYQCR-u7_UFZot.js} +1 -1
- package/dist/web/assets/eventmodeling-NTZA5JFV-CA-vzJb3.js +1 -0
- package/dist/web/assets/flowDiagram-KWPJA3E3-Ca_1cbbS.js +1 -0
- package/dist/web/assets/{ganttDiagram-FUAMR5RP-B0egPzgH.js → ganttDiagram-FUAMR5RP-B4hrLcLf.js} +1 -1
- package/dist/web/assets/{gitGraph-4MIJSDKK-BdShI4JY.js → gitGraph-4MIJSDKK-Dxx-Bl-U.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-X574FWY7-jwG6nUmP.js → gitGraphDiagram-X574FWY7-DKjDV5Kr.js} +1 -1
- package/dist/web/assets/{index-BSiW3yI1.js → index-s6lwoj84.js} +2 -2
- package/dist/web/assets/{info-A6RAGUB7-Hm3KO-lX.js → info-A6RAGUB7-CgqIdgQA.js} +1 -1
- package/dist/web/assets/{infoDiagram-VRGFBTTK-CdcggvNW.js → infoDiagram-VRGFBTTK-D-qjWkwy.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-OU5B5YK6-C8x3tV6X.js → ishikawaDiagram-OU5B5YK6-CzpqV6WN.js} +1 -1
- package/dist/web/assets/{journeyDiagram-ZHPQQLJL-CLXIkiwl.js → journeyDiagram-ZHPQQLJL-BBnOUDzw.js} +1 -1
- package/dist/web/assets/{kanban-definition-PNTS6WVX-P94klDAy.js → kanban-definition-PNTS6WVX-Di9sTFB1.js} +1 -1
- package/dist/web/assets/{line-DtGZCXZs.js → line-B8ehGiwF.js} +1 -1
- package/dist/web/assets/{mermaid-parser.core-Du2mcMMx.js → mermaid-parser.core-DWsT24e5.js} +3 -3
- package/dist/web/assets/{mermaid.core-B4zgSyXF.js → mermaid.core-DzYpaVzI.js} +4 -4
- package/dist/web/assets/{mindmap-definition-NLK3R4M7-C0EF7lWr.js → mindmap-definition-NLK3R4M7-CxagBsH3.js} +1 -1
- package/dist/web/assets/{packet-AYTQ26CC-SJ1tKR5t.js → packet-AYTQ26CC-CmxbS0qf.js} +1 -1
- package/dist/web/assets/{pegDiagram-GJSIUBJH-Dek_S7Z0.js → pegDiagram-GJSIUBJH-_3jnD3q8.js} +1 -1
- package/dist/web/assets/{pie-WAS4IAKB-C0wgWLu4.js → pie-WAS4IAKB-DppCWOqP.js} +1 -1
- package/dist/web/assets/{pieDiagram-5QR66LMP-Dy1jV_P-.js → pieDiagram-5QR66LMP-DTVThTqz.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-O4NWA36T-Df6Jl4OG.js → quadrantDiagram-O4NWA36T-BJ_OFnht.js} +1 -1
- package/dist/web/assets/{radar-RG4KPBEZ-BCtk017a.js → radar-RG4KPBEZ-B6quSMjs.js} +1 -1
- package/dist/web/assets/{railroad-74A4TZTK-_ZAooQok.js → railroad-74A4TZTK-CErU7RG3.js} +1 -1
- package/dist/web/assets/railroad-abnf-HS5TGJTU-CWsEvTRR.js +1 -0
- package/dist/web/assets/railroad-ebnf-LZEXJU2U-Cyq9ELNn.js +1 -0
- package/dist/web/assets/railroad-peg-WCYAUIDC-BX1hI1hV.js +1 -0
- package/dist/web/assets/{railroadDiagram-XR7U4H2S-DNraioKj.js → railroadDiagram-XR7U4H2S-Zu0N_D-D.js} +1 -1
- package/dist/web/assets/{requirementDiagram-PLB6GJNP-C09s8xl6.js → requirementDiagram-PLB6GJNP-Bl6CN3ul.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-IPEJSGJF-cwVwdash.js → sankeyDiagram-IPEJSGJF-DdpKzZV8.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-PO4LG4MO-Uz6m2m-d.js → sequenceDiagram-PO4LG4MO-BwUqrl9F.js} +1 -1
- package/dist/web/assets/{stateDiagram-v2-GCMORJYK-DASY_MN7.js → stateDiagram-v2-GCMORJYK-C3vZGpAi.js} +1 -1
- package/dist/web/assets/{swimlanes-2SLR337P-DjbxDj0Z.js → swimlanes-2SLR337P-BjoMa2HW.js} +1 -1
- package/dist/web/assets/swimlanesDiagram-TC7HE7FX-BGNz1HGG.js +8 -0
- package/dist/web/assets/{timeline-definition-EJHVYXUP-Dffxj5AG.js → timeline-definition-EJHVYXUP-0apcf2l2.js} +1 -1
- package/dist/web/assets/{treeView-Q6P3EWNA-CXAvuG6A.js → treeView-Q6P3EWNA-BOPWzyg3.js} +1 -1
- package/dist/web/assets/{treemap-WGGIJYW6-D_BSE2GX.js → treemap-WGGIJYW6-CC6rU6dD.js} +1 -1
- package/dist/web/assets/{usecaseDiagram-POWQR4AR-CKcfbpDB.js → usecaseDiagram-POWQR4AR-BFclVNBG.js} +1 -1
- package/dist/web/assets/{vennDiagram-UO4OBE2U-DkJknm_I.js → vennDiagram-UO4OBE2U-D2XPv-zb.js} +1 -1
- package/dist/web/assets/{wardley-WFR3VGLG-Drx6WB-t.js → wardley-WFR3VGLG-Btz6ID8P.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-VNRHLVJA-fdjd5am3.js → wardleyDiagram-VNRHLVJA-DFYPvGpS.js} +1 -1
- package/dist/web/assets/{xychartDiagram-PMCCYNJV-DCWTWMv0.js → xychartDiagram-PMCCYNJV-DMkQD-sV.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +12 -2
- package/dist/cli.js.map +0 -1
- package/dist/web/assets/architecture-7GRP2DOG-CHNxu4zI.js +0 -1
- package/dist/web/assets/channel-D_T5GGJX.js +0 -1
- package/dist/web/assets/eventmodeling-NTZA5JFV-BgPhBkRf.js +0 -1
- package/dist/web/assets/flowDiagram-KWPJA3E3-C3wNriu7.js +0 -1
- package/dist/web/assets/railroad-abnf-HS5TGJTU-Bacbbg7g.js +0 -1
- package/dist/web/assets/railroad-ebnf-LZEXJU2U-Cb23oOsU.js +0 -1
- package/dist/web/assets/railroad-peg-WCYAUIDC-EPh5LyCw.js +0 -1
- package/dist/web/assets/swimlanesDiagram-TC7HE7FX-Bv90z5my.js +0 -8
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.0 — 2026-09-26
|
|
4
|
+
|
|
5
|
+
- **Website link**: the terminal header, footer and next steps now link to https://athena.sabari.me, which is also the package homepage.
|
|
6
|
+
- **Releases**: the release workflow uses npm trusted publishing (no stored token), adds provenance automatically, and creates a GitHub release from the changelog.
|
|
7
|
+
- Source maps are no longer included in the npm package, and `CHANGELOG.md` is.
|
|
8
|
+
- Fixed a CI race in the Ctrl+C test that failed on slower runners.
|
|
9
|
+
- **Codex support**: `athena agents add codex` (also picked up by `athena init` when a `.codex/` folder exists). Athena writes its block in `AGENTS.md`, registers the MCP server in `.codex/config.toml` and installs activity hooks in `.codex/hooks.json`, keeping everything else in those files. `athena doctor` warns when Codex hasn't trusted the project yet, since Codex ignores `.codex/` until then. Athena only reads Codex's trust setting and never changes it.
|
|
10
|
+
- **GitHub Copilot support**: `athena agents add copilot` (aliases `github-copilot`, `gh-copilot`). Athena writes a marked block in `.github/copilot-instructions.md`, registers the MCP server under `servers` in `.vscode/mcp.json`, and installs activity hooks in its own `.github/hooks/athena.json` (read by Copilot CLI and VS Code). Hook commands always exit 0, because Copilot denies a tool call when a pre-tool hook fails. `athena init` detects Copilot from `.github/copilot-instructions.md`, `.github/instructions/`, `.github/hooks/` or a `.vscode/mcp.json` Athena didn't create.
|
|
11
|
+
- **Gemini CLI support**: `athena agents add gemini-cli`. Athena writes a marked block in `GEMINI.md`, and adds the `athena` MCP server and activity hooks (`SessionStart`, `BeforeAgent`, `BeforeTool`, `AfterAgent`, `SessionEnd`) to `.gemini/settings.json`, keeping everything else in those files.
|
|
12
|
+
- `gemini` now selects Gemini CLI rather than Antigravity, and a `GEMINI.md` file no longer counts as evidence of Antigravity. `GEMINI.md` is Gemini CLI's context file; Antigravity also reads it, but so do other tools, so only `.agents/` or `.agent/` mean Antigravity is in use.
|
|
13
|
+
- **Windsurf support**: `athena agents add windsurf` (alias `codeium`; picked up by `athena init` when `.windsurf/` or `.windsurfrules` exists). Athena writes an owned rule at `.windsurf/rules/athena.md` with `trigger: always_on`, kept under the documented 12,000-character limit; Windsurf and Devin Desktop (its new name) read it. MCP and activity hooks are not configured: Windsurf's MCP config is per user, and Cascade hooks only apply to the legacy Cascade agent (available through July 2026).
|
|
14
|
+
- **Cline support**: `athena agents add cline` (picked up by `athena init` when `.clinerules` or `.cline/` exists). Athena writes an owned rule at `.clinerules/athena.md`; if `.clinerules` is a single file, Athena leaves it alone and uses `.cline/rules/athena.md`, which Cline also reads. MCP and activity hooks are not configured: Cline's MCP settings are per user, and its hooks are SDK plugins.
|
|
15
|
+
- Removing one integration no longer removes the `AGENTS.md` block that another configured integration still uses.
|
|
16
|
+
- **GitHub Action** (`uses: Sabari-Vasan-SM/athena@v0`): a composite action that runs `athena sync --check` and, on pull requests, `athena review --base <PR base>`, failing on stale knowledge or review blockers. With `comment: true` it keeps one pull request comment up to date with the findings (type and location only, never values). Outputs `in-sync` and `blockers`. Linux and macOS runners; see `examples/github-workflow.yml`.
|
|
17
|
+
- **`athena git-hook install|uninstall|status`**: a `#!/bin/sh` pre-commit hook that blocks commits when `.athena/` is out of date (`--review` also blocks possible secrets and env files). It honours `core.hooksPath` and worktrees, adds a marked block to an existing shell hook instead of replacing it, refuses non-shell hooks and hooks managed by husky, lefthook or pre-commit (printing the `npx --no-install athena sync --check` line to use instead), and lets commits through when `athena` isn't installed.
|
|
18
|
+
- `athena sync --check` no longer fails when only the Git change hotspots in `debugging.md` differ. They come from commit history and moved with every commit, so the check failed right after committing up-to-date knowledge. `--check --json` now includes `inSync` and `stale`.
|
|
19
|
+
- Change hotspots no longer count commits to `.athena/` itself, and ties are ordered by path instead of commit recency.
|
|
20
|
+
- `examples/demo-shop`: a small Express + Prisma project with its generated `.athena/` knowledge committed.
|
|
21
|
+
|
|
22
|
+
## 0.1.3 — 2026-09-22
|
|
23
|
+
|
|
24
|
+
- **Terminal UI**: `athena init`, `analyze` and `open` show a branded header (logo, links) sized to the terminal, a live checklist of the real pipeline stages with measured timings and results, and summary panels for project overview, generated files and next steps. It falls back to narrower layouts, plain text without Unicode, and no animation when output is not a TTY. `--json` and `--quiet` are unchanged.
|
|
25
|
+
- `package.json` now links the GitHub repository, homepage and issue tracker.
|
|
26
|
+
|
|
27
|
+
## 0.1.2 — 2026-09-18
|
|
28
|
+
|
|
29
|
+
Republished with no functional changes.
|
|
30
|
+
|
|
31
|
+
## 0.1.1 — 2026-09-18
|
|
32
|
+
|
|
33
|
+
Packaging fix: the `bin` path in `package.json` is now `dist/cli.js`, and the description encoding was corrected. No functional changes.
|
|
34
|
+
|
|
35
|
+
## 0.1.0 — 2026-09-18
|
|
36
|
+
|
|
37
|
+
First public release.
|
|
38
|
+
|
|
39
|
+
- **Analysis**: detects languages, frameworks, monorepos, commands, env var names, database schema, HTTP routes, auth signals, containers, CI and tests across 10 ecosystems. Every statement is labeled `FACT`, `DETECTED`, `INFERRED` or `UNKNOWN` with file/line evidence.
|
|
40
|
+
- **Knowledge**: 11 generated Markdown documents in `.athena/`, plus the developer-owned `rules.md`. Generated sections are refreshed; your edits are preserved.
|
|
41
|
+
- **Sync**: `athena sync` and `athena watch` propose updates only for documents that would actually change, with reasons and diffs. Nothing is written without review.
|
|
42
|
+
- **Web UI**: `athena open` — knowledge viewer/editor, rules editor, sync review with diffs, security scan, context explorer and activity timeline, on `127.0.0.1` with a per-session token.
|
|
43
|
+
- **Agents**: Claude Code, Cursor, Antigravity and AGENTS.md integrations, including activity hooks and MCP registration.
|
|
44
|
+
- **Security & review**: `athena security` runs the audit tools your ecosystems provide; `athena review` checks the current diff for secrets, missing tests, new dependencies and more.
|
|
45
|
+
- **Intelligence**: project graph, deterministic context engine (`athena context`), MCP server (`athena mcp`), and optional consent-gated AI suggestions (`athena ai`).
|
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
**Project intelligence for AI coding agents.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
🌐 **Website & docs:** [athena.sabari.me](https://athena.sabari.me) · 📦 [npm](https://www.npmjs.com/package/project-athena) · [Changelog](CHANGELOG.md)
|
|
6
|
+
|
|
7
|
+
Athena analyzes your repository and maintains a structured, human-readable understanding of it in `.athena/`: architecture, database, API, auth, security, testing, deployment, and your own project rules. It then points Claude Code, Cursor, Codex, GitHub Copilot, Gemini CLI, Antigravity, Windsurf, Cline and other agents at that knowledge, so they plan and change code with real project context.
|
|
6
8
|
|
|
7
9
|
Athena doesn't replace your coding agent, and it doesn't claim to make code bug-free or secure. It makes agents more **project-aware**, and it is honest about what it knows.
|
|
8
10
|
|
|
@@ -57,10 +59,11 @@ Generated content sits between `athena:generated` markers. Anything outside the
|
|
|
57
59
|
| `athena watch` | Watch the project and propose updates as files change (`--auto-apply` to write automatically) |
|
|
58
60
|
| `athena doctor` | Check the installation, project, knowledge files and agent integrations |
|
|
59
61
|
| `athena rules` | `list`, `add "<rule>" --section <name>`, `edit`, `enable`, `disable`, `remove` |
|
|
60
|
-
| `athena agents` | `list`, `add <claude-code\|cursor\|antigravity\|agents-md\|all>`, `remove` |
|
|
62
|
+
| `athena agents` | `list`, `add <claude-code\|cursor\|codex\|copilot\|gemini-cli\|antigravity\|windsurf\|cline\|agents-md\|all>`, `remove` |
|
|
61
63
|
| `athena activity` | Show AI agent activity observed through hooks (`-n`, `--agent`) |
|
|
62
64
|
| `athena security` | Audit dependencies with the tools installed for this project, and report secret findings (`--fail-on`, `--last`, `--no-audit`) |
|
|
63
65
|
| `athena review` | Check the current diff for facts worth reviewing, and list your rules and checklist (`--base`, `--no-fail`) |
|
|
66
|
+
| `athena git-hook` | `install` (`--review`), `uninstall`, `status` — a Git pre-commit hook that blocks commits when knowledge is out of date |
|
|
64
67
|
| `athena context <task>` | Show which knowledge an agent should read for a task (`--full`, `--json`) |
|
|
65
68
|
| `athena graph` | Inspect the project graph (`--build`, `--search`, `--node`, `--kind`) |
|
|
66
69
|
| `athena mcp` | Serve project intelligence to agents over MCP (stdio; `--allow-write`) |
|
|
@@ -100,7 +103,7 @@ Apply updates to 2 documents? [y/N]
|
|
|
100
103
|
- **Nothing is written without review.** `athena watch` and the web UI only propose updates. You can apply or ignore a proposal (an ignored proposal stays quiet until the files change again), or opt in to `--auto-apply`.
|
|
101
104
|
- **Your edits are still safe.** Developer-edited sections are preserved and listed. Applying is refused if a document changed after the proposal was made.
|
|
102
105
|
- When files change but no knowledge is affected, only the local index is refreshed.
|
|
103
|
-
- `athena sync --check` exits with 1 when knowledge is out of date, which is useful in CI or a pre-commit hook.
|
|
106
|
+
- `athena sync --check` exits with 1 when knowledge is out of date, which is useful in CI or a pre-commit hook (see [Use in CI and git hooks](#use-in-ci-and-git-hooks)). Change hotspots come from Git history and move with every commit, so the check ignores them; `athena sync` still refreshes them.
|
|
104
107
|
- Ignore rules: defaults, root and nested `.gitignore` files, `.git/info/exclude`, and `.athena/config.json`.
|
|
105
108
|
|
|
106
109
|
## Watching what agents do
|
|
@@ -111,7 +114,12 @@ Athena configures hooks for agents that support them, so it can show what they a
|
|
|
111
114
|
|---|---|
|
|
112
115
|
| Claude Code | Hooks in `.claude/settings.json` running `athena event` (async, so the agent is never blocked) |
|
|
113
116
|
| Cursor | Hooks in `.cursor/hooks.json` plus a small forwarding script |
|
|
117
|
+
| Codex | Hooks in `.codex/hooks.json` running `athena event` (Codex loads them only for trusted projects) |
|
|
118
|
+
| GitHub Copilot | Hooks in `.github/hooks/athena.json` running `athena event` (read by Copilot CLI and VS Code, where hooks are in Preview). Each command always exits 0, so a machine without Athena — such as Copilot cloud agent — is never blocked |
|
|
119
|
+
| Gemini CLI | Hooks in `.gemini/settings.json` running `athena event` (Gemini CLI warns once when it sees new project hooks) |
|
|
114
120
|
| Antigravity | No documented hook mechanism — activity is reported as unavailable |
|
|
121
|
+
| Windsurf | Not installed: Cascade hooks applied only to the legacy Cascade agent, which Devin Desktop (Windsurf's new name) kept available only through July 2026 — activity is reported as unavailable |
|
|
122
|
+
| Cline | Not installed: Cline's hooks are SDK plugins (TypeScript) that don't run in the IDE extensions — activity is reported as unavailable |
|
|
115
123
|
|
|
116
124
|
Hooks append events to `.athena/.agent-events.jsonl` (gitignored, rotated, no network). The UI tails that file, so activity shows up live and history survives with the UI closed.
|
|
117
125
|
|
|
@@ -136,6 +144,88 @@ athena review # check the current diff before you commit
|
|
|
136
144
|
|
|
137
145
|
**`athena review`** checks facts about your current diff: secrets in added lines (a blocker, exit 1), committed env files, new dependencies, source changed without tests, API/schema/auth touchpoints, large files, debug leftovers, and whether Athena knowledge is stale. It then lists your enabled rules and the project's review checklist for you or your agent to apply — Athena does not claim to judge whether they are met, and it runs no AI.
|
|
138
146
|
|
|
147
|
+
## Use in CI and git hooks
|
|
148
|
+
|
|
149
|
+
Commit `.athena/` so your team and CI share it. Athena can then keep it honest in two places.
|
|
150
|
+
|
|
151
|
+
### GitHub Action
|
|
152
|
+
|
|
153
|
+
```yaml
|
|
154
|
+
# .github/workflows/athena.yml
|
|
155
|
+
on: pull_request
|
|
156
|
+
permissions:
|
|
157
|
+
contents: read
|
|
158
|
+
pull-requests: write # only for `comment: true`
|
|
159
|
+
jobs:
|
|
160
|
+
athena:
|
|
161
|
+
runs-on: ubuntu-latest
|
|
162
|
+
steps:
|
|
163
|
+
- uses: actions/checkout@v4
|
|
164
|
+
with:
|
|
165
|
+
fetch-depth: 0 # the review diffs the pull request against its base commit
|
|
166
|
+
- uses: Sabari-Vasan-SM/athena@v0
|
|
167
|
+
with:
|
|
168
|
+
comment: true
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
| Input | Default | |
|
|
172
|
+
|---|---|---|
|
|
173
|
+
| `check-sync` | `true` | Run `athena sync --check`; fail when `.athena/` is out of date |
|
|
174
|
+
| `review` | `true` | On `pull_request` events, run `athena review --base <PR base>`; fail on blockers (possible secrets, committed env files). Skipped on other events |
|
|
175
|
+
| `review-base` | PR base SHA | Ref to review against, for example on `push` events |
|
|
176
|
+
| `comment` | `false` | Post the findings as one pull request comment and update it on later pushes (marked with `<!-- athena-review -->`) |
|
|
177
|
+
| `version` | `latest` | `project-athena` version to install with `npm install -g` |
|
|
178
|
+
| `working-directory` | `.` | Folder that contains `.athena/` |
|
|
179
|
+
| `github-token` | `github.token` | Token for the comment |
|
|
180
|
+
|
|
181
|
+
Outputs: `in-sync` (`true`/`false`) and `blockers` (a count). The comment and logs show each finding's type and file location, never the matched value.
|
|
182
|
+
|
|
183
|
+
- The action uses Node.js if it is already 22.12 or newer, and otherwise installs Node.js 22 with `actions/setup-node`.
|
|
184
|
+
- It is a composite action written in bash, so it runs on Linux and macOS runners. Windows runners are not supported.
|
|
185
|
+
- Without `fetch-depth: 0` the base commit is missing and the review step fails with a message saying so.
|
|
186
|
+
- Pull requests from forks get a read-only token, so the comment is skipped with a warning; the checks still run.
|
|
187
|
+
|
|
188
|
+
A complete workflow is in [examples/github-workflow.yml](examples/github-workflow.yml).
|
|
189
|
+
|
|
190
|
+
### Git pre-commit hook
|
|
191
|
+
|
|
192
|
+
```text
|
|
193
|
+
$ athena git-hook install
|
|
194
|
+
✓ Installed the pre-commit hook (knowledge check) at .git/hooks/pre-commit
|
|
195
|
+
Commits are blocked when .athena/ knowledge is out of date. Teammates without Athena installed are not blocked.
|
|
196
|
+
Using husky, lefthook or pre-commit? Add `npx --no-install athena sync --check` to its pre-commit config instead.
|
|
197
|
+
|
|
198
|
+
$ git commit -m "Add refunds"
|
|
199
|
+
Proposed: api.md, security.md
|
|
200
|
+
Knowledge is out of date. Run `athena sync` to review and apply.
|
|
201
|
+
athena: commit blocked: .athena/ knowledge is out of date. Run `athena sync`, stage .athena/ and commit again (or skip once with `git commit --no-verify`).
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
- `athena git-hook install --review` also runs `athena review` and blocks commits that add possible secrets or env files. It checks the whole working tree (staged, unstaged and untracked files that aren't ignored), not only what is staged.
|
|
205
|
+
- The hook is a `#!/bin/sh` script in the directory Git actually uses (`git rev-parse --git-path hooks`), so `core.hooksPath` and linked worktrees work. For a project in a subfolder of the repository, the hook runs Athena there.
|
|
206
|
+
- If `athena` is not on `PATH`, the hook prints a note and lets the commit through, so it never blocks teammates who don't use Athena.
|
|
207
|
+
- **An existing pre-commit hook is kept.** If it is a shell script, Athena adds its block between `# athena:start` and `# athena:end` right after the shebang, so it runs before your own commands. Athena refuses to touch hooks written in other languages and hooks it recognizes as managed by husky, lefthook or pre-commit (from `core.hooksPath` or the hook's contents), and prints the line to add instead.
|
|
208
|
+
- `athena git-hook uninstall` removes only Athena's block (or the file, if Athena created it). `athena git-hook status` shows what is installed.
|
|
209
|
+
|
|
210
|
+
**husky, lefthook and other hook managers:** add one line to your pre-commit config instead of installing the hook. It needs `project-athena` as a devDependency or installed globally.
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# .husky/pre-commit
|
|
214
|
+
npx --no-install athena sync --check
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
```yaml
|
|
218
|
+
# lefthook.yml
|
|
219
|
+
pre-commit:
|
|
220
|
+
commands:
|
|
221
|
+
athena:
|
|
222
|
+
run: npx --no-install athena sync --check
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Example project
|
|
226
|
+
|
|
227
|
+
[examples/demo-shop](examples/demo-shop) is a small Express + Prisma API with its generated `.athena/` knowledge committed, so you can see what Athena writes before running it on your own code. See [examples/README.md](examples/README.md).
|
|
228
|
+
|
|
139
229
|
## Context engine, graph and MCP
|
|
140
230
|
|
|
141
231
|
Reading twelve documents for every task wastes an agent's context. Athena picks what matters:
|
|
@@ -154,7 +244,7 @@ Documents to read
|
|
|
154
244
|
- **Sections, not whole files.** Only the relevant sections are returned, under a character budget, with your rules always included.
|
|
155
245
|
- **Project graph.** `athena graph --build` writes `.athena/graph.json`: packages, files, routes, entities, frameworks and commands, connected by `contains`, `imports`, `handles`, `defines` and `depends_on`. It comes from the analysis, so it never asserts more than DETECTED evidence.
|
|
156
246
|
|
|
157
|
-
**MCP.** `athena mcp` serves this to any MCP-capable agent over stdio, and `athena agents add` registers it (`.mcp.json` for Claude Code, `.cursor/mcp.json` for Cursor). Tools: `get_relevant_context`, `get_project_context`, `get_architecture`, `get_database_schema`, `get_api_context`, `get_security_context`, `get_project_rules`, `get_knowledge_document`, `get_project_changes`, `get_project_graph`, `get_athena_status`, `update_knowledge`.
|
|
247
|
+
**MCP.** `athena mcp` serves this to any MCP-capable agent over stdio, and `athena agents add` registers it (`.mcp.json` for Claude Code, `.cursor/mcp.json` for Cursor, `[mcp_servers.athena]` in `.codex/config.toml` for Codex, `servers.athena` in `.vscode/mcp.json` for GitHub Copilot in VS Code, `mcpServers.athena` in `.gemini/settings.json` for Gemini CLI). Tools: `get_relevant_context`, `get_project_context`, `get_architecture`, `get_database_schema`, `get_api_context`, `get_security_context`, `get_project_rules`, `get_knowledge_document`, `get_project_changes`, `get_project_graph`, `get_athena_status`, `update_knowledge`.
|
|
158
248
|
|
|
159
249
|
The server is **read-only by default**: `update_knowledge` reports what would change and refuses to write unless you start it with `--allow-write`.
|
|
160
250
|
|
|
@@ -209,7 +299,12 @@ Security: the server binds to `127.0.0.1` only, on the first free port from 7432
|
|
|
209
299
|
|---|---|
|
|
210
300
|
| Claude Code | A marked block in `CLAUDE.md` that imports `.athena/rules.md` |
|
|
211
301
|
| Cursor | `.cursor/rules/athena.mdc` (always applied) |
|
|
302
|
+
| Codex | The marked block in `AGENTS.md` (which Codex reads), plus `.codex/config.toml` and `.codex/hooks.json`. Codex ignores `.codex/` until you trust the project; `athena doctor` tells you if it isn't trusted yet |
|
|
303
|
+
| GitHub Copilot | A marked block in `.github/copilot-instructions.md`, the `athena` server in `.vscode/mcp.json`, and `.github/hooks/athena.json` |
|
|
304
|
+
| Gemini CLI | A marked block in `GEMINI.md`, plus the `athena` MCP server and hooks in `.gemini/settings.json`. If you enabled Gemini CLI's folder trust, trust the project, or it ignores `.gemini/settings.json` |
|
|
212
305
|
| Antigravity | `.agents/rules/athena.md` (set to *Always On* in Antigravity if needed) |
|
|
306
|
+
| Windsurf | `.windsurf/rules/athena.md` (`trigger: always_on`, under the 12,000-character limit), read by Windsurf and Devin Desktop. MCP is per-user in Windsurf, so add `athena mcp` to your `mcp_config.json` yourself |
|
|
307
|
+
| Cline | `.clinerules/athena.md`, or `.cline/rules/athena.md` if `.clinerules` is a single file (Athena never touches that file). MCP is per-user in Cline, so add `athena mcp` in Cline's MCP settings yourself |
|
|
213
308
|
| Others | A marked block in `AGENTS.md` |
|
|
214
309
|
|
|
215
310
|
The instructions include a **relevance map**. A database task reads `database.md`, `architecture.md`, `api.md`, `security.md`, `testing.md` and `rules.md`, while a styling tweak reads only `project.md`, `architecture.md` and `rules.md`. Agents don't load everything for every task.
|