Year-End Closing & Financial Statement Preparation (Year-End Settlement)
This skill is for registering year-end closing journal entries at the end of the fiscal year and verifying the trial balance sheet, income statement, and balance sheet.
It assumes that daily journal entries have been completed using the journal skill.
Load Settings (Execute First)
- Load the file using the Read tool
- If the file does not exist, guide the user to execute the skill and exit
- Understand the configuration values, and convert relative paths to absolute paths based on the CWD:
- : Used for the argument in CLI scripts
- : Base directory for outputting progress files and other items
- Each directory: Used when referencing files
Path Resolution Example
If the
in the config is
,
is
, and the CWD is
:
ledger.py trial-balance --db-path /home/user/tax-2025/shinkoku.db --input query.json
shinkoku ledger bs --db-path /home/user/tax-2025/shinkoku.db --input query.json
Load Progress Information
After loading the settings, load the handover files to understand the results of the previous steps.
- Load
.shinkoku/progress/progress-summary.md
using the Read tool (if it exists)
- Load the following handover files using the Read tool (if they exist):
.shinkoku/progress/04-journal.md
.shinkoku/progress/02-assess.md
- Utilize the loaded information in subsequent steps (avoid re-asking the user)
- If the files do not exist, skip this step and directly confirm necessary information with the user
Basic Guidelines
- Confirm that journal entries have been completed using the journal skill before starting the settlement process
- Verify account balances in the trial balance sheet to determine the need for year-end closing journal entries
- Calculate depreciation based on the rules in references/depreciation-rules.md
- Always confirm year-end closing journal entries with the user before registering them
- Finally, verify that total assets equal total liabilities plus equity in the balance sheet
Prerequisite Checks
Confirm the following before starting the settlement process:
- Have daily journal entries been completed?: Prompt the user to confirm there are no unrecorded transactions
- Fiscal year: Confirm the target year (e.g., January 1 to December 31, 2025)
- Blue return type: ¥650,000 deduction (double-entry bookkeeping + e-Tax/electronic book storage), ¥550,000 deduction (double-entry bookkeeping + paper submission), ¥100,000 deduction (simplified bookkeeping)
- Confirm prior year's final tax return: Check the following from the assess skill results or prior year's tax return
- Presence and amount of estimated tax payments (prepayment of income tax)
- Presence of net loss carryforward deductions
- Whether the prior year's ending balance matches the current year's opening balance
- Accumulated depreciation amount from the prior year (if there are fixed assets)
※ If prior year data has not been confirmed, first use the assess skill to confirm, or ask the user to provide the prior year's final tax return.
0-1. Confirm & Set Opening Balances
- Check if opening balances have been set using
ledger.py ob-list --db-path DB --fiscal-year YEAR
- If not set, confirm the following with the user:
- Is it the first year of business? (→ No opening balance, skip)
- Ask the user to provide the ending column of the prior year's final tax return (balance sheet from the blue return settlement statement)
- Use OCR to read if it is an image/PDF
- Batch register the prior year's ending balances using
- After registration, verify the content using and obtain user approval
Step 1: Verify Trial Balance Sheet
Call
bash
shinkoku ledger trial-balance --db-path DB_PATH --input query.json
Input JSON:
Output:
- : Debit total, credit total, and balance for each account
- : Total debits
- : Total credits
Verification Items:
- Do total debits equal total credits?
- Are each account's balances reasonable? (Are there any negative balances?)
- If there are balances in the following accounts, year-end closing is required:
- Prepaid expenses (1060) → Settle and transfer to appropriate accounts
- Unearned revenue (2060) → Confirm details and transfer
- Prepaid consumption tax (1090)/Accrued consumption tax (2070) → Reflect consumption tax calculation results
Step 2: Register Year-End Closing Journal Entries
Confirm and process the following year-end closing items in order. Register each journal entry using
ledger.py add-journal --db-path DB_PATH --input journal.json
.
2-1. Record Depreciation Expense
If there are balances in fixed assets (1100-1160), record depreciation expense.
Call Calculation Tool:
bash
shinkoku tax calc-depreciation --input depreciation_input.json
For straight-line method:
json
{
"method": "straight_line",
"acquisition_cost": 300000,
"useful_life": 4,
"business_use_ratio": 100,
"months": 12
}
For declining balance method:
json
{
"method": "declining_balance",
"acquisition_cost": 300000,
"book_value": 200000,
"useful_life": 4,
"declining_rate": 500,
"business_use_ratio": 100,
"months": 12
}
Register Journal Entry:
Debit: Depreciation Expense (5200) / Credit: Corresponding Fixed Asset Account
Amount: Calculated depreciation amount
- Refer to references/depreciation-rules.md for useful life
- If the business start date is mid-year, calculate on a monthly pro-rata basis
- For lump-sum depreciation assets (1160), record 1/3 of the acquisition cost (equal depreciation over 3 years)
- If there is a household allocation, only record the amount multiplied by the business use ratio
2-2. Evaluate Inventory Assets
If there is inventory at the end of the period, record the inventory amount.
Register Inventory Data
First, check registered inventory data using
ledger.py list-inventory --db-path DB_PATH --input query.json
.
If not registered, register opening and ending inventory amounts using
ledger.py set-inventory --db-path DB_PATH --input inventory.json
:
json
{
"fiscal_year": 2025,
"detail": {
"period": "ending",
"amount": 200000,
"method": "cost",
"details": "Item details, etc."
}
}
Register Inventory Journal Entry
Ending Inventory Journal Entry:
Debit: Inventory Assets (1030) / Credit: Purchases (5001) Amount: Ending inventory amount
Opening Inventory Journal Entry (Memo for automatic transfer to next period's opening):
Debit: Purchases (5001) / Credit: Inventory Assets (1030) Amount: Opening inventory amount
- Confirm the ending inventory quantity and unit price with the user
- Confirm the valuation method (e.g., last-in first-out cost method)
- Cost of Goods Sold Calculation: Opening inventory amount + Purchases amount - Ending inventory amount
- Registered inventory data is automatically reflected in and the blue return settlement statement PDF
2-3. Record Accrued Unpaid Expenses
Record expenses that have been incurred but not paid as of the end of the year.
Debit: Corresponding Expense Account / Credit: Accrued Expenses (2031)
- December rent (if paid the following month)
- December utility and communication fees
- Unpaid social insurance premiums
2-4. Record Prepaid Expenses
If expenses for the next period have been paid in the current period, transfer them to prepaid expenses.
Debit: Prepaid Expenses (1041) / Credit: Corresponding Expense Account
- Portion of annual insurance premiums applicable to the next period
- Portion of annual subscription fees applicable to the next period
2-5. Verify Accounts Receivable & Accounts Payable
- Confirm that the accounts receivable (1010) balance matches the list of uncollected invoices
- Confirm that the accounts payable (2001) balance matches the list of unpaid supplier invoices
- If there are uncollectible accounts receivable, consider transferring them to Bad Debt Expense (5260)
2-6. Verify Proprietor Accounts
- Proprietor's Drawings (1200): Total amount used for personal purposes from business funds
- Proprietor's Contributions (3010): Total amount used for business purposes from personal funds
- These are not offset in the settlement process (carry over to the next period's opening with initial deposit processing)
Step 2.7: Register Rent Breakdown
If rent has been recorded for the business, register the breakdown (attachment to the blue return settlement statement).
Call ledger.py add-rent-detail
bash
shinkoku ledger add-rent-detail --db-path DB_PATH --input rent.json
Input JSON:
json
{
"fiscal_year": 2025,
"detail": {
"property_type": "Home & Office",
"usage": "Home & Office",
"landlord_name": "Landlord Name",
"landlord_address": "Landlord Address",
"monthly_rent": 100000,
"annual_rent": 1200000,
"deposit": 0,
"business_ratio": 50
}
}
Verification Items:
- For home & office properties, confirm that the business ratio is set appropriately
- Confirm that annual rent = monthly rent × number of payment months is correct
- Register all properties if there are multiple
Step 3: Generate Settlement Statements
Generate settlement statements after all year-end closing journal entries have been registered.
3-1. Verify Income Statement ()
bash
shinkoku ledger pl --db-path DB_PATH --input query.json
Input JSON:
Output:
- : Breakdown and total of revenue
- : Breakdown and total of expenses
- : Net income for the period (total revenue - total expenses)
Verification Items:
- Does the sales amount match actual results?
- Is each expense account reasonable? (Are there any abnormally large/small accounts?)
- Confirm the income amount before the blue return special deduction
3-2. Verify Balance Sheet ()
bash
shinkoku ledger bs --db-path DB_PATH --input query.json
Input JSON:
Output:
- : Breakdown and total of assets
- : Breakdown and total of liabilities
- : Breakdown and total of equity
Verification Items:
- Does total assets equal total liabilities plus total equity? (Balance sheet equality)
- Does the cash and bank deposit balance match the actual balance?
- Is the book value of fixed assets the amount after depreciation?
Step 4: Present Settlement Result Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Settlement Result Summary (FY ○ Reiwa)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
■ Income Statement
Sales: ○○○,○○○ JPY
Cost of Goods Sold: ○○○,○○○ JPY
Total Expenses: ○○○,○○○ JPY
Income Before Blue Return Special Deduction: ○○○,○○○ JPY
■ Balance Sheet
Total Assets: ○○○,○○○ JPY
Total Liabilities: ○○○,○○○ JPY
Total Equity: ○○○,○○○ JPY
Balance Difference: 0 JPY (Matching)
■ Year-End Closing Journal Entries: N Items
- Depreciation Expense: ○○○,○○○ JPY
- Inventory Adjustment: ○○○,○○○ JPY
- Accrued Expenses: ○○○,○○○ JPY
■ Next Steps:
→ Calculate income tax using /income-tax
→ Calculate consumption tax using /consumption-tax
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Output Handover Files
After presenting the summary, output the following files using the Write tool.
This allows results to be carried over to the next step even if the session is interrupted or compacted.
Output Step-by-Step Files
Output to
.shinkoku/progress/06-settlement.md
in the following format:
---
step: 6
skill: settlement
status: completed
completed_at: "{Current Date YYYY-MM-DD}"
fiscal_year: {tax_year}
---
# Year-End Closing & Financial Statement Preparation Results
## Income Statement (PL) Summary
- Sales: {Amount} JPY
- Cost of Goods Sold: {Amount} JPY
- Total Expenses: {Amount} JPY
- Income Before Blue Return Special Deduction: {Amount} JPY
## Balance Sheet (BS) Summary
- Total Assets: {Amount} JPY
- Total Liabilities: {Amount} JPY
- Total Equity: {Amount} JPY
- Balance Difference: {Amount} JPY (Matching/Not Matching)
## List of Year-End Closing Journal Entries
| Description | Debit Account | Credit Account | Amount |
|------|---------|---------|------|
| {Depreciation Expense, etc.} | {Account Name} | {Account Name} | {Amount} JPY |
(Include depreciation, rent allocation, inventory adjustment, accrued expenses, etc.)
## Next Steps
Calculate income tax using /income-tax
Calculate consumption tax using /consumption-tax
Update Progress Summary
Update
.shinkoku/progress/progress-summary.md
(create a new file if it does not exist):
- YAML frontmatter: fiscal_year, last_updated (current date), current_step: settlement
- Table: Update the status of all steps (set settlement to completed)
- Include guidance on next steps
Guidance After Output
After outputting the files, inform the user:
- "Handover files have been saved to . Results can be carried over to the next skill even if the session is interrupted."
- Guidance on next steps