@fuzzle/opencode-accountant 0.5.5 → 0.5.6

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.
Files changed (2) hide show
  1. package/agent/accountant.md +39 -10
  2. package/package.json +1 -1
@@ -15,7 +15,7 @@ permissions:
15
15
  glob: allow
16
16
  grep: allow
17
17
  list: allow
18
- question: deny
18
+ question: allow
19
19
  read: allow
20
20
  todoread: allow
21
21
  todowrite: allow
@@ -65,18 +65,47 @@ These tools handle validation, deduplication, error checking, and file organizat
65
65
 
66
66
  ## Bash Usage Policy
67
67
 
68
- Bash is allowed ONLY for:
68
+ Bash is allowed ONLY for **read-only operations**:
69
69
 
70
- - Validation commands: `hledger check`, `hledger-fmt`, `hledger bal`
71
- - Read-only queries: `hledger print`, `hledger reg`, `hledger accounts`
72
- - File inspection: `cat`, `head`, `tail` (read-only)
70
+ - **Validation**: `hledger check`, `hledger bal`
71
+ - **Formatting check**: `hledger-fmt` (WITHOUT `--fix` - shows diff only)
72
+ - **Queries**: `hledger print`, `hledger reg`, `hledger accounts`
73
+ - **File inspection**: `cat`, `head`, `tail`, `grep`
73
74
 
74
- Bash is FORBIDDEN for:
75
+ Bash is **FORBIDDEN** for:
75
76
 
76
- - `hledger import` - use `import-pipeline` tool instead
77
- - Moving/copying CSV files - use `import-pipeline` tool instead
78
- - Editing journal files directly - use `edit` tool only for rules files
79
- - Fetching prices - use `fetch-currency-prices` tool instead
77
+ - **`hledger-fmt --fix`** - Mass-reformats files, destroys formatting
78
+ - **`hledger import`** - Use `import-pipeline` tool instead
79
+ - **Moving/copying CSV files** - Use `import-pipeline` tool instead
80
+ - **Writing to files** - Use `edit`/`write` tools with user approval only
81
+ - **Fetching prices** - Use `fetch-currency-prices` tool instead
82
+
83
+ ## Manual Editing Policy
84
+
85
+ **Before making ANY edits** to journal (.journal) or rules (.rules) files:
86
+
87
+ 1. **Ask for approval** using the question tool
88
+ 2. **Show what will change**: file path, specific lines, before/after
89
+ 3. **Wait for confirmation** before using edit/write tools
90
+
91
+ ### Allowed Edits (With Approval)
92
+
93
+ ✅ Add transactions (append to end, match existing format exactly)
94
+ ✅ Update specific account names/amounts/dates (change only target lines)
95
+ ✅ Add account declarations (at top of year journals)
96
+ ✅ Update rules files (add/modify directives)
97
+
98
+ ### Absolutely Forbidden
99
+
100
+ ❌ **NEVER run `hledger-fmt --fix`** - mass-reformats entire files
101
+ ❌ **NEVER reformat existing transactions** - preserve exact spacing/separators
102
+ ❌ **NEVER use `hledger print` to rewrite transactions** - changes formatting
103
+
104
+ ### Edit Guidelines
105
+
106
+ 1. **Use edit tool surgically** - change only necessary lines
107
+ 2. **Preserve formatting exactly** - match spacing, indentation, separators
108
+ 3. **Validate after**: Run `hledger check`, then `hledger-fmt` (no --fix) to verify no unintended changes
80
109
 
81
110
  ## Statement Import Workflow
82
111
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzzle/opencode-accountant",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "An OpenCode accounting agent, specialized in double-entry-bookkepping with hledger",
5
5
  "author": {
6
6
  "name": "ali bengali",