paste to any AI agent
view raw
# Usage: curl -sSL https://seed.show/accounting.month.end | bash -s <install-path>
# <install-path> is the directory where the file should land.
set -euo pipefail
[ -z "${1:-}" ] && {
echo "install requires a path: curl -sSL https://seed.show/accounting.month.end | bash -s <install-path>" >&2
exit 1
}
TARGET="$1"
mkdir -p "$TARGET"
DEST="$TARGET/seed-fold.0FoEj7.folded.md"
cat > "$DEST" <<'PORTDOWN_04164B9B'
<!--
This is a `.folded.md` archive — a directory packed into one markdown
file. The markers below are load-bearing; don't edit them directly.
To unpack (requires bash — if you have no shell, tell the user):
1. curl -sSLf https://fold.dom.vin/skill | bash -s <INSTALL_DIR>
2. <INSTALL_DIR>/fold/scripts/unfold <this-file>
(or: unfold <this-file> if fold/scripts is on your PATH)
-->
---
fold: true
marker: e3ff3e
at: 2026-05-07T16:15:57Z
root: seed-pack.U4JKiN
---
<!--fold:e3ff3e@file path="README.md" mode="644"-->
# accounting.month.end
Month-end and quarter-end close context for agents. Controller-level. Load this before drafting journal entries, writing accruals, preparing reconciliations, or producing variance commentary.
**What not to do:** Do not produce financial statements, post journal entries, or release management reports without completing the dependency chain documented here. Do not treat the close as a checklist of tasks that can run in any order. Do not write variance commentary on a number that isn't locked.
## Mental model: the close as a dependency graph
The close is not a checklist. It is a directed acyclic graph with hard sequencing constraints. Nodes are sub-processes; edges are dependencies. Get the order wrong and upstream nodes produce numbers that downstream nodes must restate.
The wrong mental model: a list of tasks, each independent, that can be parallelized or reordered to save time.
The right mental model: a pipeline where each stage produces a locked output that the next stage consumes as an input. You cannot consume an unlocked input without invalidating your own output. Violate one dependency and everything downstream is provisional.
The three properties the graph is trying to produce: **accuracy** (every balance supported by evidence), **completeness** (all period transactions recorded in the period, accrual basis), and **cut-off** (the period boundary enforced by economic event date, not invoice date or cash date).
Speed is a proxy metric. The actual goal is: **financial statements any auditor could pick up and trace to source documentation, with no material misstatements and no period-boundary violations.**
## The dependency chain
The close runs roughly bottom-up through this sequence. Violating any dependency forces a restatement of everything downstream.
**1. Sub-ledgers before GL.** Accounts receivable (AR), accounts payable (AP), inventory, fixed assets, payroll, and intercompany must each be reconciled and locked before they feed into the general ledger. The GL is downstream of the sub-ledgers. Opening a sub-ledger after the GL closes is a restatement trigger.
**2. Revenue before COGS.** Cost of goods sold cannot be accurately computed until revenue recognition is complete. Under ASC 606 / IFRS 15, the matching of cost follows the recognition of revenue. Booking COGS before revenue is recognized creates temporary gross margin distortions that cascade through the income statement.
**3. Operating expenses before tax provision.** The tax provision (ASC 740) is calculated on pre-tax income. Every late journal entry to operating expenses changes the pre-tax number and requires recalculating deferred tax assets and liabilities. Tax runs after operating expenses are locked — not before, not simultaneously.
**4. All subsidiaries before consolidation.** In a multi-entity structure, every subsidiary must close its own books before the consolidation layer can run. A single open sub pulls the consolidation date to the right. Intercompany eliminations require confirmed, matched balances from both sides before they can zero out.
**5. Locked trial balance before variance analysis.** Flux commentary on a moving number is wasted effort and can produce misleading narrative. Lock the trial balance first. Explain it second.
The close calendar in workflow.md makes these dependencies visible with day-relative timing. Every "why is this taking so long?" conversation traces back to a violated dependency.
## Account reconciliation framework
Every financial statement line item must be traceable through this chain:
```
Source document
→ Sub-ledger (AR aging, AP aging, asset register, payroll register)
→ GL account (trial balance)
→ Financial statement line item
```
The reconciliation is the document proving each step connects to the next. A GL balance with no sub-ledger reconciliation is an asserted number, not a proved one. Missing a link is a control failure, not a process gap.
## Period-end accrual logic
An accrual is not optional. If goods or services were received in the period and no invoice has arrived, the expense exists and the accrual is required under GAAP's matching principle (ASC 420-10 general accrual guidance; ASC 450-20-25 for contingent obligations).
The amount does not need to be certain — it needs to be probable and estimable. GAAP requires a best estimate when the obligation is probable; omitting a probable accrual because the exact amount is unknown is not conservative, it is a misstatement.
The question cut-off asks is: *when did the economic event occur?* Not when was the invoice dated. Not when was the cash paid. Not when was the document received. The economic event date determines the period.
Accrual reversal: most period-end accruals reverse in the next period when the actual invoice arrives. The reversal entry is booked in the opening days of the new period so the expense is captured once — via the accrual — not twice — via the accrual plus the invoice posting.
## What agents get wrong
**Sequencing errors.** Agents will run steps in parallel or out of order — posting tax before operating expenses are locked, running variance analysis on a preliminary trial balance, posting consolidation entries before subsidiaries have closed. Each of these produces a number that must later be restated.
**Accrual timing errors.** Agents assign transactions to periods by invoice date or cash date rather than economic event date. The cut-off question is always: when did the obligation arise? A December service received with a January invoice is a December accrual.
**Omitting accruals for uncertain amounts.** Agents will skip accruals when the exact amount is unknown. GAAP requires booking probable obligations at the best estimate. The uncertainty about precision does not eliminate the obligation.
**Journal entries without backup.** An accrual JE is not a guess — it is an estimate supported by a calculation, a contract, a vendor invoice, or some other artifact. Every JE requires a preparer, a reviewer, and backup documentation. The supported, reviewed JE is the deliverable; the unsupported number is not.
**Confusing the close calendar with the reporting calendar.** The reporting calendar (SEC filings, board pack, earnings release) is downstream of the close calendar. External deadlines do not compress internal dependency chains. Working backward from the filing deadline without accounting for the close process produces a schedule that cannot be executed.
**Flux analysis without a prior-period anchor and decomposition.** Directional commentary ("revenue increased $2M") is meaningless without a comparison point, rate/volume/mix decomposition, and a threshold that defines what requires explanation. The standard: direction + magnitude + business driver + reference to the specific underlying event.
**Treating the reconciliation hierarchy as optional.** Reconciliation is the evidence layer. Jumping from assumption to financial statement line without the sub-ledger middle step leaves the number asserted, not proved.
## What AI is changing
**Automated reconciliation matching.** High-volume, rule-based transaction matching — bank reconciliation, intercompany confirmation — is the first wave of automation. ML models identify likely matches across slightly inconsistent data formats, reducing the manual matching queue significantly. Residual items requiring human review shrink; they do not disappear.
**Routine journal entry drafting.** LLMs can draft recurring entries (depreciation, prepaid amortization, accrual reversals) from templates and historical patterns. The judgment layer remains human: is the backup sufficient? Is the estimate defensible? Does the entry reflect the right economic event? Automated drafting accelerates preparation; it does not replace review.
**Anomaly detection in reconciliations.** ML-based anomaly detection flags unexpected balances, unusual movement patterns, and accounts behaving outside historical ranges before the trial balance is locked. This shifts the controller's attention from searching for problems to investigating flagged items — a meaningful change in how the close works.
**AI-assisted variance narrative.** Auto-generated flux commentary is now embedded in FP&A platforms (Workiva, Cube, Pigment, others). Quality has improved but still requires a reviewer who understands the business drivers and can distinguish a system-generated plausible explanation from an accurate one. The draft narrative saves time; it does not replace business judgment.
**Continuous close as a direction.** The traditional batch-close model — all activity compressed into Days +1 through +10 — is under pressure from real-time subledger feeds, automated matching, and always-on reconciliation. High-maturity finance functions are moving toward a perpetual reconciliation posture where month-end is a confirmation of a running balance rather than a scramble to establish one. The dependency graph does not disappear in a continuous close; it runs continuously rather than in a sprint.
**What stays human.** Judgment calls on estimates (bad debt reserves, warranty accruals, variable consideration under ASC 606), materiality determinations, management reporting framing, and the narrative that explains business performance to non-accountants. These require business context that AI systems do not have access to. The controller's role shifts from transaction processor to judgment provider and AI output reviewer.
<!--fold:e3ff3e@file path="sources.md" mode="644"-->
# sources
Fetch these at task time. Ordered by importance.
## Standards — US GAAP
1. FASB ASC (free read-only) — the single authoritative source for US GAAP; search by topic:
https://asc.fasb.org
2. ASC 606 — Revenue from Contracts with Customers; drives cut-off for revenue recognition and the matching of COGS:
https://asc.fasb.org/606
3. ASC 740 — Income Taxes; tax provision calculation depends on locked pre-tax income; deferred tax assets and liabilities:
https://asc.fasb.org/740
4. ASC 450-20 — Loss Contingencies; when a probable, estimable obligation requires accrual regardless of invoice receipt:
https://asc.fasb.org/450
5. ASC 805 — Business Combinations; purchase accounting and goodwill affect close complexity for entities mid-acquisition:
https://asc.fasb.org/805
## Standards — IFRS
6. IFRS 15 — Revenue from Contracts with Customers (IFRS equivalent of ASC 606); five-step model, cut-off treatment:
https://www.ifrs.org/issued-standards/list-of-standards/ifrs-15-revenue-from-contracts-with-customers/
7. IAS 37 — Provisions, Contingent Liabilities and Contingent Assets (IFRS equivalent of ASC 450 for accruals):
https://www.ifrs.org/issued-standards/list-of-standards/ias-37-provisions-contingent-liabilities-and-contingent-assets/
8. IFRS Foundation — Education material and application guidance by standard, including period-end treatment:
https://www.ifrs.org/issued-standards/list-of-standards/
## Close process methodology
9. AICPA — Close Process Best Practices and internal control guidance for financial reporting:
https://www.aicpa-cima.com/resources/landing/audit-and-accounting-guide
10. Deloitte Roadmap: Revenue Recognition (ASC 606 close implications, including cut-off and variable consideration):
https://dart.deloitte.com/USDART/
11. PwC Viewpoint — Close and consolidation guidance, journal entry controls, and reconciliation frameworks:
https://viewpoint.pwc.com/
12. EY AccountingLink — Month-end close checklists, accrual methodology, and variance analysis frameworks:
https://www.ey.com/en_us/assurance/accountinglink
## ERP and close workflow documentation
13. NetSuite Financial Close Management — period-lock procedures, task sequencing, and intercompany elimination:
https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/book_3714703028.html
14. SAP Financial Closing Cockpit — guided close workflow, dependency management, and period-end tasks for SAP environments:
https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/financials-and-controlling/financial-closing-cockpit
15. BlackLine Close Management — reconciliation automation, journal entry workflow, task management for high-volume close:
https://www.blackline.com/solutions/financial-close-management/
## SEC filing deadlines (US public companies)
16. SEC — Accelerated filer deadlines and Form 10-Q/10-K filing requirements:
https://www.sec.gov/divisions/corpfin/deregistration/forms10-k10-q.htm
17. SEC EDGAR — Filed 10-Ks and 10-Qs showing how public companies structure close disclosures and critical accounting estimates:
https://www.sec.gov/cgi-bin/browse-edgar
<!--fold:e3ff3e@file path="workflow.md" mode="644"-->
# workflow
The standard close calendar as a decision framework. Day numbers are relative to the last day of the accounting period (Day 0). Negative days are pre-close prep; positive days are post-period work.
## The calendar
### Day -5 to Day -1: Pre-close
**Goal:** Eliminate surprises before the period ends. Nothing discovered after Day 0 should have been predictable before it.
Tasks:
- Circulate the accruals request list to department heads. Get estimates for unbilled services, unrecorded expenses, and open purchase orders with goods received.
- Confirm the recurring journal entry schedule — depreciation, prepaid amortization, deferred revenue, subscription accruals. These should run automatically; confirm they are configured and amounts are current.
- Lock the prior-period sub-ledger if still open. AP should have no open items from the prior period awaiting approval.
- Preliminary intercompany confirmation: subsidiaries exchange expected balances so Day +5 elimination isn't the first time anyone compares numbers.
- Alert the AR team: all invoices for the period must be raised by Day 0 close of business. No backdating.
Hard dependency: Everything on this list is soft. None of it can be "completed" until Day 0. The purpose is reducing the queue, not closing it.
---
### Day 0: Period End
**Goal:** The period closes. No more transactions enter without explicit approval and a documented business reason.
Tasks:
- Cut-off enforcement. Goods receipts and service confirmations received after this point are next-period unless documented as belonging to the current period by the business owner.
- AP cut-off: invoices received post-close are accrued, not posted as AP.
- AR cut-off: revenue recognition runs on delivered obligations only. Undelivered performance obligations under ASC 606 / IFRS 15 are deferred.
- Payroll: confirm the payroll period aligns with the accounting period. Mid-period payroll runs require an accrual for the stub period.
- Inventory: if the entity runs a periodic inventory system, the physical count or cycle count data is captured at this point.
Hard dependency: Period lock is binary. Either it's locked or it isn't. A "soft close" that allows late entries is not a close — it's a delay.
---
### Day +1 to Day +3: Sub-ledger close
**Goal:** Every sub-ledger is reconciled, reviewed, and locked. The GL cannot receive reliable feeds until this is done.
Sequence within this phase (strict):
1. **Bank reconciliation.** Match all cash transactions to bank statements. Outstanding items (deposits in transit, outstanding checks) are documented and aged. No unreconciled difference proceeds.
2. **Accounts receivable.** AR aging is reviewed. Bad debt reserve is updated based on aging buckets and any specific customer information (bankruptcy, dispute, collection status). AR balance reconciles to GL.
3. **Accounts payable.** AP aging is reviewed. Unvouchered receipts (goods received, no invoice) are accrued. AP balance reconciles to GL.
4. **Inventory.** Inventory is costed. Any shrinkage, obsolescence reserve adjustments, or lower-of-cost-or-net-realizable-value (LCNRV) write-downs are calculated and recorded.
5. **Fixed assets.** Depreciation runs. Asset additions and disposals are posted. Accumulated depreciation reconciles to the asset register.
6. **Payroll.** Payroll journal entries are posted. Benefits accruals (vacation, bonuses) are updated. W-2/1099 withholding accounts reconcile.
Hard dependency: Sub-ledger reconciliations must complete before GL close. Any sub-ledger item posted after GL close triggers a restatement of the GL period — the most expensive outcome in the close process.
Common bottleneck: AP accruals. Department heads are slow to respond to accrual requests. Build a hard deadline into the process: Day +2, responses or department default applies. Default is: last month's accrual amount re-runs.
---
### Day +3 to Day +5: GL close and journal entry posting
**Goal:** All adjusting journal entries are posted. The trial balance is complete.
Tasks:
- Post accrual reversals first. Prior-period accruals that were set to reverse should post at Day +1 of the new period (often automated); confirm they ran before posting any new accruals to avoid double-counting.
- Post all new accruals from the accruals request list. Each accrual JE requires: preparer, reviewer, calculation backup, and accounting policy reference (the specific ASC or IFRS section governing the estimate). "No invoice received" is not a reason to omit an accrual; it is the reason an accrual is required.
- Accrual estimation hierarchy when exact amounts are unavailable: (1) vendor quote or purchase order amount, (2) contractual rate × measured consumption, (3) prior-period actuals adjusted for known volume or rate changes, (4) department head estimate with documented basis. Document which method was used and why.
- Post recurring entries (depreciation, amortization, prepaid release) — these should already be in queue from pre-close configuration. Confirm amounts are current; useful-life changes or new additions in the period may require manual adjustment.
- Intercompany: each entity posts its side of intercompany transactions. Balances are confirmed against the counterparty before posting. Any difference requires a root-cause — timing, unapproved transaction, or currency — resolved before the consolidation phase.
- Revenue: deferred revenue is released for recognized amounts. Variable consideration (rebates, returns, volume discounts under ASC 606 / IFRS 15 step 4) is estimated using the expected-value or most-likely-amount method, constrained by the ASC 606 constraint principle (only recognize to the extent that a significant reversal is not probable).
- Tax provision: preliminary calculation runs after operating expenses are posted. Effective tax rate check against prior periods and against the jurisdictional statutory rate. Deferred tax assets and liabilities are adjusted for temporary difference movements.
- Review the trial balance for anomalies before locking: negative balances in debit-normal accounts (cash, receivables, inventory), credit balances in debit-normal accounts, zero-balance accounts that historically carry balances, movements that are large relative to historical range. Each anomaly requires a documented explanation or a correcting entry.
Hard dependency: Tax provision cannot run until operating expenses are finalized. Running a preliminary provision early is acceptable for planning; it must be refreshed after the operating expense lock.
Hard dependency on accrual reversals: Post reversals before posting new accruals. If reversals did not run, posting new accruals double-counts the expense. The reversal is period-opener work, not period-closer work — it belongs at Day +1 of the new period, not at the end of Day +5.
Common bottleneck: Late journal entries from business units. Establish a JE submission deadline (Day +3, 5 PM) with a documented exception process. After that, entries are next period unless approved by the Controller. The exception process is not a workaround — it is a documented decision with a named approver.
---
### Day +5 to Day +7: Consolidation and intercompany eliminations
**Goal:** Multi-entity financials are consolidated. Intercompany transactions zero out.
Tasks (multi-entity entities only):
- Collect trial balances from all subsidiaries. All must be in the reporting currency (translation adjustment calculated for foreign subs under ASC 830 / IAS 21).
- Run intercompany eliminations: intercompany receivables vs. payables, intercompany revenue vs. expense, intercompany profit in inventory (if applicable).
- Reconcile any intercompany differences. Common causes: timing (one entity booked in period, counterparty booked next period), currency translation, or unapproved transactions.
- Goodwill and purchase price allocation amortization (for entities carrying acquisition-related intangibles) are confirmed against the acquisition schedule.
Hard dependency: All subsidiaries must be closed before consolidation. A single open sub pulls the consolidation close date to the right. The pre-close intercompany confirmation (Day -3) is the mitigation — it surfaces mismatches before the deadline.
Common bottleneck: Foreign subsidiaries in different time zones or on different ERP systems. Establish subsidiary close deadlines explicitly (e.g., Day +4 for all subs, consolidated entity closes Day +6).
---
### Day +7 to Day +10: Financial statement preparation and variance analysis
**Goal:** Draft financial statements are complete and reviewed. Variance commentary is written and causation-anchored.
Tasks:
- Produce draft income statement, balance sheet, and statement of cash flows from the locked trial balance.
- Flux analysis structure: for each P&L line, compare to (a) prior month, (b) prior year same period, (c) current-period budget. The comparison set is not optional — a single comparison point is insufficient because seasonal effects, budget variances, and run-rate changes have different explanations. Any line exceeding the materiality threshold (typically ±5% and ±$X, using the larger of the two as the trigger) requires a written explanation.
- Flux analysis decomposition: a meaningful variance explanation decomposes into drivers. For revenue: rate variance (price × same volume) + volume variance (same price × volume change) + mix variance (change in product/customer mix). For expenses: rate variance (unit cost change) + volume variance (activity level change) + scope variance (new/discontinued activities). Commentary that doesn't decompose into drivers is directional description, not analysis.
- Flux commentary standard: direction + magnitude + decomposition + business driver + reference to the specific event. "Revenue increased $2.3M vs. prior month: $1.8M volume variance from the Acme Corp enterprise contract signed November 15 (recognized ratably from contract start), $0.5M rate variance from the Q4 price adjustment effective November 1. No mix effect — product composition unchanged."
- Balance sheet roll-forward: for each balance sheet account, confirm that ending balance = beginning balance + period activity. Any unexplained change (balance that changed without a corresponding P&L entry or cash movement) flags for investigation. The cash flow statement is a byproduct of the roll-forward; if it doesn't reconcile, the balance sheet has an error.
- One-time items and accounting policy changes: disclosed explicitly in the management package, not embedded in run-rate commentary. If an item affects comparability, say so and quantify the effect.
- Management reporting package: executive summary, key metrics, variance commentary, and any disclosures. Assembled after variance review is complete, not during.
- Controller/CFO sign-off on draft financials before distribution.
Hard dependency: Variance analysis must run on the locked trial balance. Analysis on a preliminary balance that subsequently changes is wasted work and produces misleading narrative — the commentary gets anchored to a number that is later revised.
Common bottleneck: Variance commentary quality. The instinct is to write directional commentary ("revenue increased $2M") without decomposition or causation. The test for a complete flux explanation: could a reader who doesn't have access to the underlying data understand what specific business event caused this movement? If not, the explanation is incomplete.
---
## The reconciliation hierarchy
Every financial statement line traces back through this chain. Missing a link is a control failure, not just a process gap.
```
Source document
→ Sub-ledger (AR aging, AP aging, asset register, payroll register)
→ GL account (trial balance)
→ Financial statement line item
```
The reconciliation is the document that proves each step connects to the next. A GL balance with no sub-ledger reconciliation is an asserted number, not a proved one.
---
## Hard dependencies summary
| Later step | Must wait for |
|---|---|
| GL close | All sub-ledger closes |
| COGS posting | Revenue recognition complete |
| Tax provision (final) | Operating expense lock |
| Consolidation | All subsidiary closes |
| Intercompany eliminations | All intercompany balances confirmed |
| Variance analysis | Trial balance locked |
| Management reporting | Variance analysis complete |
Any close that tries to run these steps in parallel or out of order will produce a number it has to restate. The calendar exists to make the dependencies visible, not to create bureaucracy.
<!--fold:e3ff3e@end-->
PORTDOWN_04164B9B
# ── post ──
MARKER=$(awk '/^---$/ { f++; if (f==2) exit; next } f==1 && /^marker:[[:space:]]/ { sub(/^marker:[[:space:]]+/, ""); print; exit }' "$DEST")
[ -z "$MARKER" ] && { echo "seed: archive has no marker — corrupt" >&2; exit 1; }
awk -v m="$MARKER" -v outdir="$TARGET" '
BEGIN {
# Match <!--fold:<m>@file path="X"--> with an optional mode attr after
# the path (fold emits mode="644" on executables).
file_re = "^<!--fold:" m "@file path=\"([^\"]+)\"( mode=\"[0-9]+\")?-->$"
end_re = "^<!--fold:" m "@end-->$"
}
$0 ~ end_re { if (current) close(current); exit }
$0 ~ file_re {
if (current) close(current)
line = $0
sub(/^<!--fold:[^@]+@file path="/, "", line); sub(/".*$/, "", line)
current = outdir "/" line
dir = current; sub(/\/[^\/]*$/, "", dir)
if (dir != current) system("mkdir -p \"" dir "\"")
printf "" > current
next
}
current { print >> current }
' "$DEST"
SEED_EXTRACTED=$(find "$TARGET" -type f -not -path "$DEST" 2>/dev/null | wc -l)
if [ "$SEED_EXTRACTED" = "0" ]; then
echo "seed: archive contained no files — refusing to delete the source" >&2
echo " archive preserved at: $DEST" >&2
exit 1
fi
rm -f "$DEST"
echo "" >&2
echo "✓ seed unpacked → $TARGET ($SEED_EXTRACTED files)" >&2
find "$TARGET" -type f | sort | while IFS= read -r _sf; do
echo " ${_sf#${TARGET}/}" >&2
done
echo "" >&2
if [ -f "$TARGET/SKILL.md" ]; then
echo "This seed contains a skill (SKILL.md). Install it in your agent's skills directory." >&2
echo "" >&2
fi
echo "Install the seed skill if not already installed:" >&2
echo " https://seed.show/skill" >&2
echo "" >&2
echo "Publisher prompt:" >&2
sed 's/^/ /' >&2 <<'__SEED_PROMPT_END_AC1F2B__'
Month-end and quarter-end close for agents: the close as a dependency graph, sequencing hard dependencies, accrual timing logic, reconciliation hierarchy, what agents get wrong, and what AI is and isn't changing in the close process.
__SEED_PROMPT_END_AC1F2B__
exit 0
Month-end and quarter-end close for agents: the close as a dependency graph, sequencing hard dependencies, accrual timing logic, reconciliation hierarchy, what agents get wrong, and what AI is and isn't changing in the close process.