Skip to content

Add accounting diagnostic guides: invoice/timesheet locking + prepaid/receipt/recurring#9

Merged
jernejk merged 3 commits into
mainfrom
jk/accounting-diagnostic-guides
Jun 27, 2026
Merged

Add accounting diagnostic guides: invoice/timesheet locking + prepaid/receipt/recurring#9
jernejk merged 3 commits into
mainfrom
jk/accounting-diagnostic-guides

Conversation

@jernejk

@jernejk jernejk commented Jun 27, 2026

Copy link
Copy Markdown
Member

What

Five new tp accounting guide recipes for recurring real-world finance diagnostics, plus a dev cross-link. All examples use Northwind placeholders (no real client/personal data — enforced by the existing sanitization test).

Guide Diagnoses
invoice-timesheet-locked Timesheet can't be edited/moved or invoice can't be updated/posted — invoice-lock vs timesheet-locked-by-invoice vs external sync
prepaid-reconciliation-delta Non-zero prepaid delta (original − drawnDown − credited ≠ remaining)
credit-note-prepaid-credit Credit note didn't reduce the prepaid balance (isCreditingInvoice + associatedInvoiceId rule)
receipt-allocation Payment left an invoice outstanding / split across invoices wrong
recurring-invoice-gap Stalled/overdue recurring invoice template

Notes

  • Commands validated against the real tp surface (tp invoice get/timesheets [--writeoff], tp receipt get/outstanding, tp prepaid summary, tp creditnote list, tp recurring list --outdated).
  • The dev guide saved-timesheets-wrong now carries locked timesheet keywords + a cross-ref, so tp dev guide routes developers to the locking guide too.
  • Adds 5 exact-match ranking tests; full suite green (201).

Draft for review. Sourced from mined diagnostic history.

🤖 Generated with Claude Code

…ipt/recurring diagnostics

Five new accounting guides driven by recurring real-world diagnostic patterns
(scrubbed to Northwind placeholders):
- invoice-timesheet-locked: locked invoice vs timesheet-locked-by-invoice vs sync
- prepaid-reconciliation-delta: chase a non-zero prepaid delta
- credit-note-prepaid-credit: why a credit note didn't reduce the prepaid balance
- receipt-allocation: payment applied to the wrong invoice / split
- recurring-invoice-gap: stalled/overdue recurring template

Cross-link locked timesheets from the dev saved-timesheets-wrong guide so
`tp dev guide` surfaces it too. All commands verified against the real tp surface;
adds exact-match ranking tests for each new guide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new set of accounting diagnostic “guide recipes” to the TimePro CLI guide system (plus a dev-guide cross-link), improving the discoverability of common finance investigations via tp accounting guide.

Changes:

  • Added 5 new accounting diagnostic guides (locking, prepaid delta/crediting, receipt allocation, recurring invoice gaps) and registered them in the accounting guide index.
  • Updated the dev “saved timesheets wrong” guide + keywords to route “locked timesheet” investigations to the accounting locking guide.
  • Added guide-ranking tests to ensure these new use-cases resolve as exact matches.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/SSW.TimePro.Cli.Tests/Features/Guides/GuideRankingTests.cs Adds ranking coverage for the 5 new accounting guides.
guides/dev/saved-timesheets-wrong.md Adds a cross-reference for “locked timesheet” scenarios to the accounting locking guide.
guides/dev/index.json Adds new keywords so dev guide search can route “locked timesheet” queries appropriately.
guides/accounting/index.json Registers the 5 new accounting guides (slugs, keywords, commands, MCP tools, skills).
guides/accounting/invoice-timesheet-locked.md New guide: diagnose invoice lock vs timesheet-locked-by-invoice vs external sync.
guides/accounting/prepaid-reconciliation-delta.md New guide: diagnose non-zero prepaid reconciliation deltas.
guides/accounting/credit-note-prepaid-credit.md New guide: explain why a credit note doesn’t reduce prepaid balance.
guides/accounting/receipt-allocation.md New guide: diagnose misallocated receipts across invoices.
guides/accounting/recurring-invoice-gap.md New guide: diagnose stalled/overdue recurring invoice templates.

Comment thread guides/dev/saved-timesheets-wrong.md
Comment thread tests/SSW.TimePro.Cli.Tests/Features/Guides/GuideRankingTests.cs Outdated
Comment thread guides/accounting/index.json Outdated
@jernejk jernejk marked this pull request as ready for review June 27, 2026 12:49
…t, wording

- receipt-allocation guide: populate mcpTools with the real accounting MCP tools
  (GetReceiptDetail, GetInvoiceReceipts, GetClientOutstanding).
- GuideRankingTests: assert MatchType on the matched element (fold into ContainSingle)
  instead of indexing [0], so a tie can't validate the wrong guide.
- saved-timesheets-wrong: 'invoice/lock problem' -> 'invoice lock problem'.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread guides/accounting/index.json Outdated
Comment thread guides/accounting/index.json Outdated
Comment thread guides/accounting/index.json Outdated
- prepaid-reconciliation-delta + credit-note-prepaid-credit: add GetPrepaidStatus
- recurring-invoice-gap: add ListRecurringInvoices, GetRecurringInvoice
All verified to exist in AccountingMcpTools.cs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jernejk jernejk merged commit 420c8cc into main Jun 27, 2026
1 check passed
@jernejk jernejk deleted the jk/accounting-diagnostic-guides branch June 27, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants