[PR #8089] [MERGED] [AI] Consolidate agent tooling and simplify developer guidance #127030

Closed
opened 2026-06-14 06:32:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/8089
Author: @MatissJanis
Created: 6/4/2026
Status: Merged
Merged: 6/8/2026
Merged by: @MatissJanis

Base: masterHead: claude/agent-hooks-nano-staged-XTx5W


📝 Commits (3)

  • 002e19f [AI] Replace mechanical agent rules with shared agent hooks + nano-staged
  • 600f5c5 [AI] Align PR-title wording in AGENTS.md with canonical rules
  • e3a5901 [AI] Fix check-on-stop hook on bash 3.2 and TSV column collapse

📊 Changes

23 files changed (+633 additions, -373 deletions)

View changed files

.claude/settings.json (+50 -0)
📝 .claude/skills/committing-actual-changes/SKILL.md (+4 -4)
.codex/config.toml (+51 -0)
.cursor/hooks.json (+7 -0)
.cursor/hooks/after-file-edit.sh (+38 -0)
.cursor/hooks/guard-shell.sh (+46 -0)
📝 .cursor/rules/pr-and-commit.mdc (+8 -63)
📝 .github/agents/pr-and-commit-rules.md (+12 -55)
📝 .husky/pre-commit (+1 -1)
.nano-staged.json (+8 -0)
📝 .oxlintrc.json (+11 -0)
📝 AGENTS.md (+26 -76)
📝 package.json (+1 -13)
📝 packages/eslint-plugin-actual/lib/index.js (+1 -0)
packages/eslint-plugin-actual/lib/rules/no-enum.js (+31 -0)
scripts/agent-hooks/check-on-stop.sh (+100 -0)
scripts/agent-hooks/common.sh (+15 -0)
scripts/agent-hooks/format-edited-file.sh (+32 -0)
scripts/agent-hooks/git-guard.sh (+101 -0)
scripts/agent-hooks/no-strict-ignore-new-file.sh (+28 -0)

...and 3 more files

📄 Description

Description

Warning: this was entirely vibe-coded. But since it is used by agents and does not actually impact the product.. IMO that's fine. Should just make the agents slightly more performant.

Ok, there's quite a few changes here, but the core idea behind all this is: lets add hooks (verification layer) that agents can use to check code validity. And then lets remove the same instructions from AGENTS.md.

Why? Doing reviews I noticed that code with these anti-patterns still slips through. Blocking it in eslint would be too harsh as it would block humans too (sometimes the rules deserve to be broken). But agents should obey the rules 100% of the time (within reason).

Hence.. this PR.

Also: swapping from lint-staged to nano-staged (smaller in size & faster)

Related issue(s)

N/A

Testing

Manual smoke tests ran locally with:

  • claude code
  • cursor
  • codex (don't have it :()

Checklist

  • No obvious regressions in affected areas
  • Self-review performed — changes consolidate tooling and documentation without altering core functionality

https://claude.ai/code/session_01WY4USd1DAk6YjdA7KdorRW


Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 37 14.07 MB → 14.07 MB (+44 B) +0.00%
loot-core 1 5.28 MB 0%
api 2 3.86 MB 0%
cli 1 7.97 MB → 7.97 MB (-52 B) -0.00%
crdt 1 11.12 kB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
37 14.07 MB → 14.07 MB (+44 B) +0.00%
Changeset
File Δ Size
node_modules/eventemitter3/index.mjs 📈 +22 B (+10.78%) 204 B → 226 B
node_modules/eventemitter3/index.js 📈 +22 B (+0.27%) 8.03 kB → 8.05 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/toString.js 705.14 kB → 705.18 kB (+44 B) +0.01%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 1.56 MB 0%
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 962.55 kB 0%
static/js/ManageRules.js 46.6 kB 0%
static/js/PayeeRuleCountLabel.js 7.33 kB 0%
static/js/ReportRouter.js 1.27 MB 0%
static/js/ScheduleEditForm.js 146.44 kB 0%
static/js/SchedulesTable.js 202.7 kB 0%
static/js/TransactionEdit.js 90.63 kB 0%
static/js/TransactionList.js 85.81 kB 0%
static/js/Value.js 5.08 MB 0%
static/js/_baseIsEqual.js 98.38 kB 0%
static/js/ca.js 185.63 kB 0%
static/js/client.js 451.37 kB 0%
static/js/da.js 100.19 kB 0%
static/js/de.js 170.1 kB 0%
static/js/en-GB.js 9.25 kB 0%
static/js/en.js 200.59 kB 0%
static/js/es.js 177.58 kB 0%
static/js/extends.js 508.06 kB 0%
static/js/fr.js 177.35 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 163.93 kB 0%
static/js/narrow.js 364.2 kB 0%
static/js/nb-NO.js 147.07 kB 0%
static/js/nl.js 119.3 kB 0%
static/js/pt-BR.js 187.34 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 173.33 kB 0%
static/js/theme.js 31.88 kB 0%
static/js/uk.js 207.84 kB 0%
static/js/useFormatList.js 2.52 kB 0%
static/js/useTransactionBatchActions.js 9.71 kB 0%
static/js/wide.js 298.88 kB 0%
static/js/workbox-window.prod.es5.js 7.33 kB 0%
static/js/zh-Hans.js 116.44 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.28 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.BkkH_8jr.js 5.28 MB 0%

api

Total

Files count Total bundle size % Changed
2 3.86 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 3.86 MB 0%
models.js 0 B 0%

cli

Total

Files count Total bundle size % Changed
1 7.97 MB → 7.97 MB (-52 B) -0.00%
Changeset
File Δ Size
node_modules/emoji-regex/index.js 📉 -26 B (-0.25%) 10.17 kB → 10.15 kB
node_modules/is-fullwidth-code-point/index.js 📉 -26 B (-2.36%) 1.08 kB → 1.05 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller

Asset File Size % Changed
cli.js 7.97 MB → 7.97 MB (-52 B) -0.00%

Unchanged
No assets were unchanged


crdt

Total

Files count Total bundle size % Changed
1 11.12 kB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 11.12 kB 0%

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/8089 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 6/4/2026 **Status:** ✅ Merged **Merged:** 6/8/2026 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `claude/agent-hooks-nano-staged-XTx5W` --- ### 📝 Commits (3) - [`002e19f`](https://github.com/actualbudget/actual/commit/002e19f3d4dcbccb58a83877d151afcf5f8784e3) [AI] Replace mechanical agent rules with shared agent hooks + nano-staged - [`600f5c5`](https://github.com/actualbudget/actual/commit/600f5c5d707531e21f5e29ee5f4b0ac029c1164a) [AI] Align PR-title wording in AGENTS.md with canonical rules - [`e3a5901`](https://github.com/actualbudget/actual/commit/e3a5901806c3c5c32388546c65db442b0259539e) [AI] Fix check-on-stop hook on bash 3.2 and TSV column collapse ### 📊 Changes **23 files changed** (+633 additions, -373 deletions) <details> <summary>View changed files</summary> ➕ `.claude/settings.json` (+50 -0) 📝 `.claude/skills/committing-actual-changes/SKILL.md` (+4 -4) ➕ `.codex/config.toml` (+51 -0) ➕ `.cursor/hooks.json` (+7 -0) ➕ `.cursor/hooks/after-file-edit.sh` (+38 -0) ➕ `.cursor/hooks/guard-shell.sh` (+46 -0) 📝 `.cursor/rules/pr-and-commit.mdc` (+8 -63) 📝 `.github/agents/pr-and-commit-rules.md` (+12 -55) 📝 `.husky/pre-commit` (+1 -1) ➕ `.nano-staged.json` (+8 -0) 📝 `.oxlintrc.json` (+11 -0) 📝 `AGENTS.md` (+26 -76) 📝 `package.json` (+1 -13) 📝 `packages/eslint-plugin-actual/lib/index.js` (+1 -0) ➕ `packages/eslint-plugin-actual/lib/rules/no-enum.js` (+31 -0) ➕ `scripts/agent-hooks/check-on-stop.sh` (+100 -0) ➕ `scripts/agent-hooks/common.sh` (+15 -0) ➕ `scripts/agent-hooks/format-edited-file.sh` (+32 -0) ➕ `scripts/agent-hooks/git-guard.sh` (+101 -0) ➕ `scripts/agent-hooks/no-strict-ignore-new-file.sh` (+28 -0) _...and 3 more files_ </details> ### 📄 Description ## Description **Warning:** this was entirely vibe-coded. But since it is used by agents and does not actually impact the product.. IMO that's fine. Should just make the agents slightly more performant. Ok, there's quite a few changes here, but the core idea behind all this is: lets add hooks (verification layer) that agents can use to check code validity. And then lets remove the same instructions from AGENTS.md. Why? Doing reviews I noticed that code with these anti-patterns still slips through. Blocking it in eslint would be too harsh as it would block humans too (sometimes the rules deserve to be broken). But agents should obey the rules 100% of the time (within reason). Hence.. this PR. Also: swapping from `lint-staged` to `nano-staged` (smaller in size & faster) ## Related issue(s) N/A ## Testing Manual smoke tests ran locally with: - [x] claude code - [x] cursor - [ ] codex (don't have it :() ## Checklist - [x] No obvious regressions in affected areas - [x] Self-review performed — changes consolidate tooling and documentation without altering core functionality https://claude.ai/code/session_01WY4USd1DAk6YjdA7KdorRW <!--- actual-bot-sections ---> <hr /> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 37 | 14.07 MB → 14.07 MB (+44 B) | +0.00% loot-core | 1 | 5.28 MB | 0% api | 2 | 3.86 MB | 0% cli | 1 | 7.97 MB → 7.97 MB (-52 B) | -0.00% crdt | 1 | 11.12 kB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 37 | 14.07 MB → 14.07 MB (+44 B) | +0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `node_modules/eventemitter3/index.mjs` | 📈 +22 B (+10.78%) | 204 B → 226 B `node_modules/eventemitter3/index.js` | 📈 +22 B (+0.27%) | 8.03 kB → 8.05 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- static/js/toString.js | 705.14 kB → 705.18 kB (+44 B) | +0.01% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 1.56 MB | 0% static/js/BackgroundImage.js | 121.09 kB | 0% static/js/FormulaEditor.js | 962.55 kB | 0% static/js/ManageRules.js | 46.6 kB | 0% static/js/PayeeRuleCountLabel.js | 7.33 kB | 0% static/js/ReportRouter.js | 1.27 MB | 0% static/js/ScheduleEditForm.js | 146.44 kB | 0% static/js/SchedulesTable.js | 202.7 kB | 0% static/js/TransactionEdit.js | 90.63 kB | 0% static/js/TransactionList.js | 85.81 kB | 0% static/js/Value.js | 5.08 MB | 0% static/js/_baseIsEqual.js | 98.38 kB | 0% static/js/ca.js | 185.63 kB | 0% static/js/client.js | 451.37 kB | 0% static/js/da.js | 100.19 kB | 0% static/js/de.js | 170.1 kB | 0% static/js/en-GB.js | 9.25 kB | 0% static/js/en.js | 200.59 kB | 0% static/js/es.js | 177.58 kB | 0% static/js/extends.js | 508.06 kB | 0% static/js/fr.js | 177.35 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 163.93 kB | 0% static/js/narrow.js | 364.2 kB | 0% static/js/nb-NO.js | 147.07 kB | 0% static/js/nl.js | 119.3 kB | 0% static/js/pt-BR.js | 187.34 kB | 0% static/js/resize-observer.js | 18.06 kB | 0% static/js/th.js | 173.33 kB | 0% static/js/theme.js | 31.88 kB | 0% static/js/uk.js | 207.84 kB | 0% static/js/useFormatList.js | 2.52 kB | 0% static/js/useTransactionBatchActions.js | 9.71 kB | 0% static/js/wide.js | 298.88 kB | 0% static/js/workbox-window.prod.es5.js | 7.33 kB | 0% static/js/zh-Hans.js | 116.44 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.28 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.BkkH_8jr.js | 5.28 MB | 0% </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 2 | 3.86 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- index.js | 3.86 MB | 0% models.js | 0 B | 0% </div> </details> --- #### cli **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 7.97 MB → 7.97 MB (-52 B) | -0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `node_modules/emoji-regex/index.js` | 📉 -26 B (-0.25%) | 10.17 kB → 10.15 kB `node_modules/is-fullwidth-code-point/index.js` | 📉 -26 B (-2.36%) | 1.08 kB → 1.05 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** Asset | File Size | % Changed ----- | --------- | --------- cli.js | 7.97 MB → 7.97 MB (-52 B) | -0.00% **Unchanged** No assets were unchanged </div> </details> --- #### crdt **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 11.12 kB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- index.js | 11.12 kB | 0% </div> </details> </details> <!--- bundlestats-action-comment key:combined end ---> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-14 06:32:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#127030