project-athena 0.1.3 → 0.2.1
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 +83 -0
- package/README.md +103 -7
- package/dist/cli.js +2670 -1016
- package/dist/web/assets/{Editor-DmFaONG7.js → Editor-DAXvniWB.js} +1 -1
- package/dist/web/assets/{abnfDiagram-O67JEVCF-BEaDGLKl.js → abnfDiagram-O67JEVCF-Az7EW1BC.js} +1 -1
- package/dist/web/assets/architecture-7GRP2DOG-blXBarB2.js +1 -0
- package/dist/web/assets/{architectureDiagram-NJMV4G6O-Cr_YqU4C.js → architectureDiagram-NJMV4G6O-BxeXqSTn.js} +1 -1
- package/dist/web/assets/{blockDiagram-BEXU5L5S-NA64lNxM.js → blockDiagram-BEXU5L5S-aeKZl9lJ.js} +1 -1
- package/dist/web/assets/{c4Diagram-YGBWAQC7-C9OZTI8T.js → c4Diagram-YGBWAQC7-CgmntYsG.js} +1 -1
- package/dist/web/assets/channel-f4QzewnN.js +1 -0
- package/dist/web/assets/{chunk-3FUC2YCW-PivwegVV.js → chunk-3FUC2YCW-BpmRD2yo.js} +1 -1
- package/dist/web/assets/{chunk-5DYCD2WN-DH_dVKgx.js → chunk-5DYCD2WN-CRIFDwod.js} +1 -1
- package/dist/web/assets/{chunk-742MDFTN-DTR6iTOw.js → chunk-742MDFTN-hRW9VeNV.js} +1 -1
- package/dist/web/assets/{chunk-7INBJB4K-XeJOzIDQ.js → chunk-7INBJB4K-C6VEpT0Y.js} +1 -1
- package/dist/web/assets/{chunk-7M6MHVWA-Bn-cXg0l.js → chunk-7M6MHVWA-Dnajov2w.js} +1 -1
- package/dist/web/assets/{chunk-7PRAP22T-CPe5zfLc.js → chunk-7PRAP22T-DSAc0_CZ.js} +1 -1
- package/dist/web/assets/{chunk-GTNCS2PH-DSn-mpqy.js → chunk-GTNCS2PH-CefpYUjb.js} +1 -1
- package/dist/web/assets/{chunk-GWA4HPMP-DE4DJkth.js → chunk-GWA4HPMP-MLNflMmF.js} +1 -1
- package/dist/web/assets/{chunk-MBY4JIJT-9uaOqseW.js → chunk-MBY4JIJT-D3GmmEiU.js} +1 -1
- package/dist/web/assets/{chunk-NETBCI7D-bxqe7jPe.js → chunk-NETBCI7D-DzTj6xVk.js} +1 -1
- package/dist/web/assets/{chunk-O7XYJQB3-CjZQSnt8.js → chunk-O7XYJQB3-D1d0hCko.js} +1 -1
- package/dist/web/assets/{chunk-UA2S7LBM-BfYbPxwY.js → chunk-UA2S7LBM-C9hIFeWR.js} +1 -1
- package/dist/web/assets/{chunk-WEXAMYUT-CT8bG5L7.js → chunk-WEXAMYUT-BFGtcjsi.js} +1 -1
- package/dist/web/assets/{chunk-Z7XXMR3K-CHWuLoFG.js → chunk-Z7XXMR3K-BRZ8_wtE.js} +1 -1
- package/dist/web/assets/{chunk-ZIGJFQKS-C6SOqBs6.js → chunk-ZIGJFQKS-CTKOioal.js} +1 -1
- package/dist/web/assets/{classDiagram-v2-NBCMYWYE-CrSxkUNF.js → classDiagram-v2-NBCMYWYE-DJGKtWJv.js} +1 -1
- package/dist/web/assets/{cynefin-OW5HDTMX-CMbTYwga.js → cynefin-OW5HDTMX-hNq1kGmA.js} +1 -1
- package/dist/web/assets/{cynefinDiagram-VND7K2PF-B8wb03CF.js → cynefinDiagram-VND7K2PF-sODQM_ZZ.js} +1 -1
- package/dist/web/assets/{dagre-6A5THRUB-Bz-BHtjW.js → dagre-6A5THRUB-DEzTThIf.js} +1 -1
- package/dist/web/assets/{diagram-22UHCM2B-C9M-mcex.js → diagram-22UHCM2B-s_eellsa.js} +1 -1
- package/dist/web/assets/{diagram-3UASUU5V-q18RgATq.js → diagram-3UASUU5V-B2onY_Xw.js} +1 -1
- package/dist/web/assets/{diagram-ATOU4E4O-zywdDXPc.js → diagram-ATOU4E4O-B8V6s13s.js} +1 -1
- package/dist/web/assets/{diagram-CDSNMT55-BGMdofKO.js → diagram-CDSNMT55-CJxiE6mf.js} +1 -1
- package/dist/web/assets/{diagram-MLGK6HIB-BdT0J6Xl.js → diagram-MLGK6HIB-m5OHPLAp.js} +1 -1
- package/dist/web/assets/{diagram-MPIPVDR6-BXdFmdOp.js → diagram-MPIPVDR6-Buvvrk_A.js} +1 -1
- package/dist/web/assets/{ebnfDiagram-ZINNZB2B-B7Mz8zd0.js → ebnfDiagram-ZINNZB2B-CpL7Wt3R.js} +1 -1
- package/dist/web/assets/{elk-276RUBZZ-CQ4lVw-r.js → elk-276RUBZZ-CwYhbsXa.js} +1 -1
- package/dist/web/assets/{erDiagram-OPXOYQCR-DmmZBLvC.js → erDiagram-OPXOYQCR-DNikci2r.js} +1 -1
- package/dist/web/assets/eventmodeling-NTZA5JFV-CA_ZFPZ2.js +1 -0
- package/dist/web/assets/flowDiagram-KWPJA3E3-DObsBuWT.js +1 -0
- package/dist/web/assets/{ganttDiagram-FUAMR5RP-B0egPzgH.js → ganttDiagram-FUAMR5RP-d-ynDlvJ.js} +1 -1
- package/dist/web/assets/{gitGraph-4MIJSDKK-BdShI4JY.js → gitGraph-4MIJSDKK-DwIeBI91.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-X574FWY7-jwG6nUmP.js → gitGraphDiagram-X574FWY7-04RZccu6.js} +1 -1
- package/dist/web/assets/index-C3-8uYXr.js +45 -0
- package/dist/web/assets/{info-A6RAGUB7-Hm3KO-lX.js → info-A6RAGUB7-xf4Nzgv-.js} +1 -1
- package/dist/web/assets/{infoDiagram-VRGFBTTK-CdcggvNW.js → infoDiagram-VRGFBTTK-BYjw0eiK.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-OU5B5YK6-C8x3tV6X.js → ishikawaDiagram-OU5B5YK6-Bx9s4nPM.js} +1 -1
- package/dist/web/assets/{journeyDiagram-ZHPQQLJL-CLXIkiwl.js → journeyDiagram-ZHPQQLJL-DrdHs7B-.js} +1 -1
- package/dist/web/assets/{kanban-definition-PNTS6WVX-P94klDAy.js → kanban-definition-PNTS6WVX-CVd8v2Te.js} +1 -1
- package/dist/web/assets/{line-DtGZCXZs.js → line-V_WrJ-6y.js} +1 -1
- package/dist/web/assets/{mermaid-parser.core-Du2mcMMx.js → mermaid-parser.core-B-ilyEpO.js} +3 -3
- package/dist/web/assets/{mermaid.core-B4zgSyXF.js → mermaid.core-Bnyaa0nF.js} +4 -4
- package/dist/web/assets/{mindmap-definition-NLK3R4M7-C0EF7lWr.js → mindmap-definition-NLK3R4M7-B3AbvHPR.js} +1 -1
- package/dist/web/assets/{packet-AYTQ26CC-SJ1tKR5t.js → packet-AYTQ26CC-CBAIUXIc.js} +1 -1
- package/dist/web/assets/{pegDiagram-GJSIUBJH-Dek_S7Z0.js → pegDiagram-GJSIUBJH-DIdeELUM.js} +1 -1
- package/dist/web/assets/{pie-WAS4IAKB-C0wgWLu4.js → pie-WAS4IAKB-a1r3tzPR.js} +1 -1
- package/dist/web/assets/{pieDiagram-5QR66LMP-Dy1jV_P-.js → pieDiagram-5QR66LMP-pQBEio0x.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-O4NWA36T-Df6Jl4OG.js → quadrantDiagram-O4NWA36T-CkJK5Y03.js} +1 -1
- package/dist/web/assets/{radar-RG4KPBEZ-BCtk017a.js → radar-RG4KPBEZ-BZfLYjx5.js} +1 -1
- package/dist/web/assets/{railroad-74A4TZTK-_ZAooQok.js → railroad-74A4TZTK-CuIW1ZAU.js} +1 -1
- package/dist/web/assets/railroad-abnf-HS5TGJTU-6B4Ffbxn.js +1 -0
- package/dist/web/assets/railroad-ebnf-LZEXJU2U-BGL9lIQc.js +1 -0
- package/dist/web/assets/railroad-peg-WCYAUIDC-DcqxTem7.js +1 -0
- package/dist/web/assets/{railroadDiagram-XR7U4H2S-DNraioKj.js → railroadDiagram-XR7U4H2S-_BpGE8aJ.js} +1 -1
- package/dist/web/assets/{requirementDiagram-PLB6GJNP-C09s8xl6.js → requirementDiagram-PLB6GJNP-CnzF90GS.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-IPEJSGJF-cwVwdash.js → sankeyDiagram-IPEJSGJF-DYeisDj_.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-PO4LG4MO-Uz6m2m-d.js → sequenceDiagram-PO4LG4MO-ll9cBvca.js} +1 -1
- package/dist/web/assets/{stateDiagram-v2-GCMORJYK-DASY_MN7.js → stateDiagram-v2-GCMORJYK-CdKcOIKQ.js} +1 -1
- package/dist/web/assets/{swimlanes-2SLR337P-DjbxDj0Z.js → swimlanes-2SLR337P-y6piTWEW.js} +1 -1
- package/dist/web/assets/swimlanesDiagram-TC7HE7FX-DFS8a3jO.js +8 -0
- package/dist/web/assets/{timeline-definition-EJHVYXUP-Dffxj5AG.js → timeline-definition-EJHVYXUP-DuC_4xK0.js} +1 -1
- package/dist/web/assets/{treeView-Q6P3EWNA-CXAvuG6A.js → treeView-Q6P3EWNA-gCQFmND0.js} +1 -1
- package/dist/web/assets/{treemap-WGGIJYW6-D_BSE2GX.js → treemap-WGGIJYW6-BQ2010OY.js} +1 -1
- package/dist/web/assets/{usecaseDiagram-POWQR4AR-CKcfbpDB.js → usecaseDiagram-POWQR4AR-CCTqzHz6.js} +1 -1
- package/dist/web/assets/{vennDiagram-UO4OBE2U-DkJknm_I.js → vennDiagram-UO4OBE2U-0_O7guNq.js} +1 -1
- package/dist/web/assets/{wardley-WFR3VGLG-Drx6WB-t.js → wardley-WFR3VGLG-SsX7uMDs.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-VNRHLVJA-fdjd5am3.js → wardleyDiagram-VNRHLVJA-DlqH6Hox.js} +1 -1
- package/dist/web/assets/{xychartDiagram-PMCCYNJV-DCWTWMv0.js → xychartDiagram-PMCCYNJV-nr4UYDtd.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +6 -3
- 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/index-BSiW3yI1.js +0 -45
- 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,83 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.1 — 2026-09-30
|
|
4
|
+
|
|
5
|
+
Security release. Upgrading is recommended for everyone. After upgrading, run `athena sync` once (the `security.md` format changed) and, if you use the pre-commit hook with `--review`, run `athena git-hook install --review` again so it reviews staged changes.
|
|
6
|
+
|
|
7
|
+
### Breaking
|
|
8
|
+
|
|
9
|
+
- `athena review --base <ref>` exits with code 2 when the base can't be resolved or has no merge base with HEAD. Shallow CI clones need full history, e.g. `actions/checkout` with `fetch-depth: 0`.
|
|
10
|
+
- `ai.baseUrl` and `ai.consent` in the committed `.athena/config.json` are now ignored (with a warning in `athena ai status`, `athena ai enrich` and `athena doctor`). Move them to the environment (`ATHENA_AI_BASE_URL`, `ATHENA_AI_CONSENT=1`), `.athena/local.json` (gitignored), or your user config (`~/.config/athena/config.json`, `$XDG_CONFIG_HOME/athena/config.json`, or `%APPDATA%\athena\config.json` on Windows). `provider`, `model`, `mode` and `maxChars` still work from `.athena/config.json`.
|
|
11
|
+
- `--fail-on` now fails on unrated findings by default (`--unrated warn` to relax).
|
|
12
|
+
- `security-scan.json` and `athena security --json`: severity `unknown` has been renamed to `unrated`, in both findings and `counts`. Old scan files are still read. Tools that run once per input have a new optional `target` field (for example `pip-audit` per requirements file).
|
|
13
|
+
- The `security.md` format changed: the Fingerprint column was removed from Secret Management. Run `athena sync` to update it.
|
|
14
|
+
|
|
15
|
+
### Security
|
|
16
|
+
|
|
17
|
+
- `athena security --fail-on` now also fails when an audit tool ran but failed or timed out, since nothing was checked. A tool that isn't installed is still only reported. The web UI shows `unrated` findings.
|
|
18
|
+
- **AI credential exfiltration**: a repository could set its own `ai.baseUrl` and `ai.consent` in `.athena/config.json` and receive your API key and knowledge. Both are now read only from machine-local sources (env > `.athena/local.json` > user config), providers refuse a base URL without a trusted source, and an Ollama endpoint that isn't loopback counts as remote and needs consent.
|
|
19
|
+
- **Local server**: per-client rate limiting on `/api/*` (token bucket, 30 req/s, burst 120, 429 when exceeded); `--allow-remote` keeps the Host/Origin allowlist (bind address plus loopback) instead of disabling it, and warns that the connection is plain HTTP; `/api/context` clamps `maxChars` to 200,000; a failed security-scan start (e.g. missing `model.json`) no longer leaves every later scan stuck at 423; shutdown no longer hangs on open event streams.
|
|
20
|
+
- **MCP**: every tool that returns repository content redacts secret-looking values and wraps the text in `<athena-document path="…" trust="untrusted-data">` delimiters with a note that it is project data, not instructions (embedded delimiters are neutralized).
|
|
21
|
+
- **Agent hooks**: generated hook scripts quote `ATHENA_HOOK_COMMAND`, the agent name and the hook argument (POSIX single quotes; cmd.exe double quotes with `%` doubled), so paths with spaces, quotes, `$` or `&` can't break or inject into the script.
|
|
22
|
+
- **Agent activity log**: commands and messages are additionally masked for `Authorization: Bearer|Basic …`, `--password …`, `mysql -p…` and `scheme://user:password@` credentials; rotation renames the log to `.agent-events.1.jsonl` (one generation kept) instead of rewriting it, so concurrent appends are never lost, and recent-event reads include the previous generation.
|
|
23
|
+
- **GitHub Action**: the PR comment is only updated when it was written by `github-actions[bot]` and carries the versioned `<!-- athena-review:v1 -->` marker (the old marker is still recognized from the same bot), so another user's comment can't be hijacked. Review findings now also produce `::error`/`::warning` file annotations (with line numbers where available, escaped, never secret values).
|
|
24
|
+
- **Web UI**: the Security and graph views refresh after `security.*` and `graph.*` events.
|
|
25
|
+
- `athena review` scans each run of consecutive added lines as one block, so multi-line secrets such as PEM private keys are now flagged (at the line where they start, never with the value).
|
|
26
|
+
- `athena review` fails closed on Git errors: a failing `git` command, an unknown `--base`, or a missing merge base (shallow clone) is now an error (exit 2) instead of an empty, "clean" review. Ctrl+C stops running `git` processes.
|
|
27
|
+
- The diff is streamed with a 64 MB budget; a larger diff fails the review instead of being silently truncated.
|
|
28
|
+
- `--base` now compares `merge-base(base, HEAD)..HEAD` for both the file list and the patch, so commits that exist only on the base branch no longer appear in the review.
|
|
29
|
+
- The dependency check uses the analyzer's manifest parsers (`name =` / `version =` are no longer reported as dependencies), and a new manifest reports all of its dependencies.
|
|
30
|
+
- New `athena review --staged` reviews the index (contents read from Git, untracked files ignored). The `--review` pre-commit hook now runs `athena review --staged --no-sync`, so unstaged or untracked files (such as a local `.env`) no longer block commits while staged secrets still do, and a review that can't run blocks the commit with its own message. Re-run `athena git-hook install --review` to update an installed hook.
|
|
31
|
+
- Untracked files are read once, never through a symlink that points outside the project, and only up to 512 KB. Files that could not be checked are listed in a `skipped` warning (JSON: `incomplete`, `skipped`), and the review no longer says it found nothing to flag.
|
|
32
|
+
- `athena security --fail-on` now counts findings the tool did not rate. pip-audit and govulncheck never report severity, so these findings were stored as `unknown` and never failed the build. They are now `unrated` and fail by default; `--unrated warn` reports them without failing.
|
|
33
|
+
- pnpm audit output is parsed in pnpm's own advisories format. Before this, every pnpm project was reported as having no vulnerable dependencies.
|
|
34
|
+
- An npm audit that reports an error (for example when offline) is now marked `failed` with npm's message. Before, it was reported as a clean audit. The same applies to empty or unrecognised output from any audit tool. npm exiting 1 because it found vulnerabilities still counts as a successful run.
|
|
35
|
+
- govulncheck's multi-line JSON output is now parsed, and a vulnerability is reported only when govulncheck returns a finding for it. The title says whether the vulnerable code is called, only imported, or only required.
|
|
36
|
+
- pip-audit now audits each `requirements*.txt` (`-r <file>`, at most 10), or a PEP 621 `pyproject.toml` as a project path. It no longer audits whichever Python environment is active. With nothing to audit, pip-audit is reported as `unavailable` with the reason "no requirements file to audit".
|
|
37
|
+
- `athena security` scans the project files for secrets on every run. Before, it took the secret count from the cached `model.json`, so the count could be out of date.
|
|
38
|
+
- Rewrote the secret patterns to remove catastrophic backtracking (ReDoS). `generic-secret-assignment` took over 1 s on 40 KB of crafted input. It now finds a bounded quoted value first, then checks the identifier before it (at most 64 chars) for a keyword. Private keys are matched by finding the BEGIN header and then the END within 16 KB. Open-ended token patterns now use bounded or lookbehind-anchored matches. Generic keyword patterns skip lines longer than 4096 characters. CI checks every pattern for time on crafted input and with the `recheck` ReDoS analyzer.
|
|
39
|
+
- `security.md`, which is committed, no longer lists a fingerprint for each secret. The old value was an unsalted, truncated SHA-256 of the secret, so anyone could test guessed values against it offline. Secret fingerprints in `model.json` are now an HMAC keyed with the per-machine salt in `.athena/local.json` (gitignored), or with a random per-process key.
|
|
40
|
+
|
|
41
|
+
## 0.2.0 — 2026-09-26
|
|
42
|
+
|
|
43
|
+
- **Website link**: the terminal header, footer and next steps now link to https://athena.sabari.me, which is also the package homepage.
|
|
44
|
+
- **Releases**: the release workflow uses npm trusted publishing (no stored token), adds provenance automatically, and creates a GitHub release from the changelog.
|
|
45
|
+
- Source maps are no longer included in the npm package, and `CHANGELOG.md` is.
|
|
46
|
+
- Fixed a CI race in the Ctrl+C test that failed on slower runners.
|
|
47
|
+
- **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.
|
|
48
|
+
- **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.
|
|
49
|
+
- **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.
|
|
50
|
+
- `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.
|
|
51
|
+
- **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).
|
|
52
|
+
- **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.
|
|
53
|
+
- Removing one integration no longer removes the `AGENTS.md` block that another configured integration still uses.
|
|
54
|
+
- **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`.
|
|
55
|
+
- **`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.
|
|
56
|
+
- `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`.
|
|
57
|
+
- Change hotspots no longer count commits to `.athena/` itself, and ties are ordered by path instead of commit recency.
|
|
58
|
+
- `examples/demo-shop`: a small Express + Prisma project with its generated `.athena/` knowledge committed.
|
|
59
|
+
|
|
60
|
+
## 0.1.3 — 2026-09-22
|
|
61
|
+
|
|
62
|
+
- **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.
|
|
63
|
+
- `package.json` now links the GitHub repository, homepage and issue tracker.
|
|
64
|
+
|
|
65
|
+
## 0.1.2 — 2026-09-18
|
|
66
|
+
|
|
67
|
+
Republished with no functional changes.
|
|
68
|
+
|
|
69
|
+
## 0.1.1 — 2026-09-18
|
|
70
|
+
|
|
71
|
+
Packaging fix: the `bin` path in `package.json` is now `dist/cli.js`, and the description encoding was corrected. No functional changes.
|
|
72
|
+
|
|
73
|
+
## 0.1.0 — 2026-09-18
|
|
74
|
+
|
|
75
|
+
First public release.
|
|
76
|
+
|
|
77
|
+
- **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.
|
|
78
|
+
- **Knowledge**: 11 generated Markdown documents in `.athena/`, plus the developer-owned `rules.md`. Generated sections are refreshed; your edits are preserved.
|
|
79
|
+
- **Sync**: `athena sync` and `athena watch` propose updates only for documents that would actually change, with reasons and diffs. Nothing is written without review.
|
|
80
|
+
- **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.
|
|
81
|
+
- **Agents**: Claude Code, Cursor, Antigravity and AGENTS.md integrations, including activity hooks and MCP registration.
|
|
82
|
+
- **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.
|
|
83
|
+
- **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,9 +244,9 @@ 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
|
-
The server is **read-only by default**: `update_knowledge` reports what would change and refuses to write unless you start it with `--allow-write`.
|
|
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`. Repository content it returns is passed through the secret redactor and wrapped in `<athena-document … trust="untrusted-data">` delimiters, so agents can tell project data from instructions.
|
|
160
250
|
|
|
161
251
|
## Optional AI
|
|
162
252
|
|
|
@@ -168,8 +258,9 @@ athena ai enrich --dry-run # show exactly what would be sent
|
|
|
168
258
|
athena ai enrich --consent # ask for suggestions
|
|
169
259
|
```
|
|
170
260
|
|
|
171
|
-
- **Providers:** Anthropic, OpenAI, Google, and Ollama for a fully local setup.
|
|
172
|
-
- **
|
|
261
|
+
- **Providers:** Anthropic, OpenAI, Google, and Ollama for a fully local setup. Choose `provider`, `model` and `maxChars` in `.athena/config.json` under `"ai"`; API keys come from environment variables only and are never written to disk by Athena.
|
|
262
|
+
- **Trusted settings stay on your machine.** `.athena/config.json` is committed, so anyone who can push to the repository controls it. The two settings that decide where your API key and knowledge go — `baseUrl` (a custom endpoint or remote Ollama) and `consent` — are therefore only read from machine-local sources, in this order: environment variables `ATHENA_AI_BASE_URL` and `ATHENA_AI_CONSENT=1`; `.athena/local.json` (gitignored), e.g. `{ "ai": { "baseUrl": "https://proxy.internal", "consent": true } }`; your user config at `~/.config/athena/config.json` (`$XDG_CONFIG_HOME/athena/config.json`, or `%APPDATA%\athena\config.json` on Windows) with the same `"ai"` shape. If `.athena/config.json` sets them, Athena ignores them and says so in `athena ai status`, `athena ai enrich` and `athena doctor`.
|
|
263
|
+
- **Consent first.** Nothing leaves your machine without consent: `athena ai enrich --consent`, `ATHENA_AI_CONSENT=1`, or `"consent": true` in `.athena/local.json` or your user config. An Ollama endpoint that isn't `localhost`/`127.0.0.1`/`::1` counts as remote and needs consent too. `--dry-run` prints the provider, endpoint, documents and exact size first.
|
|
173
264
|
- **Knowledge only, redacted.** Athena sends your `.athena` documents — never source code — after the secret redactor, and refuses to send anything that still looks like a secret.
|
|
174
265
|
- **Output is INFERRED.** Suggestions land in `.athena/ai-suggestions.md` (gitignored), clearly labeled and attributed to the model. Nothing is added to your knowledge base automatically.
|
|
175
266
|
|
|
@@ -209,7 +300,12 @@ Security: the server binds to `127.0.0.1` only, on the first free port from 7432
|
|
|
209
300
|
|---|---|
|
|
210
301
|
| Claude Code | A marked block in `CLAUDE.md` that imports `.athena/rules.md` |
|
|
211
302
|
| Cursor | `.cursor/rules/athena.mdc` (always applied) |
|
|
303
|
+
| 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 |
|
|
304
|
+
| GitHub Copilot | A marked block in `.github/copilot-instructions.md`, the `athena` server in `.vscode/mcp.json`, and `.github/hooks/athena.json` |
|
|
305
|
+
| 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
306
|
| Antigravity | `.agents/rules/athena.md` (set to *Always On* in Antigravity if needed) |
|
|
307
|
+
| 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 |
|
|
308
|
+
| 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
309
|
| Others | A marked block in `AGENTS.md` |
|
|
214
310
|
|
|
215
311
|
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.
|