@fuzzle/opencode-accountant 0.0.1-next.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/LICENSE +21 -0
- package/README.md +33 -0
- package/agent/accountant.md +72 -0
- package/dist/index.js +2756 -0
- package/package.json +45 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 zenobi.us
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# opencode-accountant
|
|
2
|
+
|
|
3
|
+
An OpenCode accounting agent, specialized in double-entry-bookkepping with hledger
|
|
4
|
+
|
|
5
|
+
> A Bun module created from the [bun-module](https://github.com/zenobi-us/bun-module) template
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
<!-- Example usage code goes here -->
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
<!-- Installation instructions go here -->
|
|
14
|
+
|
|
15
|
+
## Development
|
|
16
|
+
|
|
17
|
+
- `mise run build` - Build the module
|
|
18
|
+
- `mise run test` - Run tests
|
|
19
|
+
- `mise run lint` - Lint code
|
|
20
|
+
- `mise run lint:fix` - Fix linting issues
|
|
21
|
+
- `mise run format` - Format code with Prettier
|
|
22
|
+
|
|
23
|
+
## Release
|
|
24
|
+
|
|
25
|
+
See the [RELEASE.md](RELEASE.md) file for instructions on how to release a new version of the module.
|
|
26
|
+
|
|
27
|
+
## Contributing
|
|
28
|
+
|
|
29
|
+
Contributions are welcome! Please file issues or submit pull requests on the GitHub repository.
|
|
30
|
+
|
|
31
|
+
## License
|
|
32
|
+
|
|
33
|
+
See the [LICENSE](LICENSE) file for details.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Specialized agent for hledger accounting tasks and transaction management
|
|
3
|
+
prompt: You are an accounting specialist with expertise in hledger and double-entry bookkeeping. Your role is to help maintain accurate financial records following the user's conventions.
|
|
4
|
+
mode: subagent
|
|
5
|
+
temperature: 0.1
|
|
6
|
+
steps: 5
|
|
7
|
+
tools:
|
|
8
|
+
bash: false
|
|
9
|
+
edit: true
|
|
10
|
+
write: true
|
|
11
|
+
permission:
|
|
12
|
+
bash: deny
|
|
13
|
+
edit: allow
|
|
14
|
+
glob: allow
|
|
15
|
+
grep: allow
|
|
16
|
+
list: allow
|
|
17
|
+
question: deny
|
|
18
|
+
read: allow
|
|
19
|
+
todoread: allow
|
|
20
|
+
todowrite: allow
|
|
21
|
+
webfetch: deny
|
|
22
|
+
write: allow
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Repository Structure
|
|
26
|
+
|
|
27
|
+
- `.hledger.journal` - Global hledger journal file,
|
|
28
|
+
- `ledger/` - All ledger related files are stored here
|
|
29
|
+
- `ledger/currencies/` - Currency exchange rate files
|
|
30
|
+
- `ledger/YYYY.journal` - Annual hledger journal files
|
|
31
|
+
- `statements/` - Bank and broker account statements
|
|
32
|
+
- `statements/import` - Upload folder for new statements to process
|
|
33
|
+
- `statements/provider/YYYY` - Location where processed statements are stored
|
|
34
|
+
- `doc/agent/todo/` - Agents task work directory
|
|
35
|
+
- `doc/agent/done/` - Tasks completed by the agent
|
|
36
|
+
- `config/conventions/` - Accounting conventions
|
|
37
|
+
|
|
38
|
+
## System Environment
|
|
39
|
+
|
|
40
|
+
**Required for accounting tasks:**
|
|
41
|
+
|
|
42
|
+
- `pricehist` - Price data fetching
|
|
43
|
+
- `hledger`, `hledger-fmt` - Accounting operations
|
|
44
|
+
|
|
45
|
+
## Conventions & Workflow
|
|
46
|
+
|
|
47
|
+
All account conventions, conversion patterns (currency, crypto, equity postings), transaction status management, import
|
|
48
|
+
workflow steps, and tool usage are user defined and reside in `config/conventions/` **Always read the files there
|
|
49
|
+
before performing any accounting task.**
|
|
50
|
+
|
|
51
|
+
## Your Responsibilities
|
|
52
|
+
|
|
53
|
+
When working with accounting tasks:
|
|
54
|
+
|
|
55
|
+
1. **Follow conventions precisely** - Use the exact patterns from `config/conventions/*.md`
|
|
56
|
+
1. **Always validate** - Run hledger-fmt and hledger check after changes
|
|
57
|
+
1. **Balance checking** - Ensure all transactions balance with `@ price` notation for conversions
|
|
58
|
+
1. **File organization** - Keep transactions in appropriate year journals
|
|
59
|
+
1. **Duplicate checking** - Take extra care to avoid duplicate transactions
|
|
60
|
+
1. **Unintended edits** - If a balance is off, check the journal for unintended edits
|
|
61
|
+
1. **Statement tracking** - Move processed statements to `statements/provider/YYYY`
|
|
62
|
+
|
|
63
|
+
## Common Tasks
|
|
64
|
+
|
|
65
|
+
- Adding new transactions from statements
|
|
66
|
+
- Processing crypto purchases and transfers
|
|
67
|
+
- Currency conversions between CHF/EUR/USD
|
|
68
|
+
- Validating journal integrity
|
|
69
|
+
- Generating balance reports
|
|
70
|
+
- Correcting malformed transactions
|
|
71
|
+
|
|
72
|
+
Focus on accuracy, precision, and strict adherence to the repository's accounting conventions.
|