opencode-skills-collection 4.1.0 → 4.1.2
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/README.md +46 -42
- package/bundled-skills/.antigravity-install-manifest.json +127 -1
- package/bundled-skills/360-feedback-system/SKILL.md +481 -0
- package/bundled-skills/access-matrix/SKILL.md +338 -0
- package/bundled-skills/accounting-audit-system-builder/SKILL.md +302 -0
- package/bundled-skills/accounting-audit-system-builder/references/catalog.md +114 -0
- package/bundled-skills/accounting-software-selection/SKILL.md +427 -0
- package/bundled-skills/accounting-software-selection/references/build-artifacts.md +362 -0
- package/bundled-skills/accounting-software-selection/references/common-pitfalls.md +44 -0
- package/bundled-skills/accounting-software-selection/references/field-reference.md +93 -0
- package/bundled-skills/accounting-software-selection/references/select-options.md +202 -0
- package/bundled-skills/admin-access-register/SKILL.md +381 -0
- package/bundled-skills/advanced-analytics-dashboard/SKILL.md +318 -0
- package/bundled-skills/ai-image-generation-studio/SKILL.md +259 -0
- package/bundled-skills/ai-logo-maker/SKILL.md +259 -0
- package/bundled-skills/ai-multilingual-dubbing/SKILL.md +259 -0
- package/bundled-skills/ai-photo-restyler/SKILL.md +259 -0
- package/bundled-skills/ai-podcast-voiceover/SKILL.md +259 -0
- package/bundled-skills/alumni-re-hire-tracker/SKILL.md +314 -0
- package/bundled-skills/announcement-board/SKILL.md +336 -0
- package/bundled-skills/antigravity-maintainer-batch-release/SKILL.md +48 -3
- package/bundled-skills/asset-it-management/SKILL.md +407 -0
- package/bundled-skills/attendance/SKILL.md +331 -0
- package/bundled-skills/audit-log/SKILL.md +314 -0
- package/bundled-skills/audit-preparation/SKILL.md +416 -0
- package/bundled-skills/beatra/SKILL.md +260 -0
- package/bundled-skills/board-governance/SKILL.md +360 -0
- package/bundled-skills/brand-growth-system-builder/SKILL.md +360 -0
- package/bundled-skills/brand-kit-print-collateral/SKILL.md +498 -0
- package/bundled-skills/buddy-program-manager/SKILL.md +329 -0
- package/bundled-skills/budget-cash-flow/SKILL.md +352 -0
- package/bundled-skills/busabase/SKILL.md +118 -0
- package/bundled-skills/business-email-template/SKILL.md +480 -0
- package/bundled-skills/business-email-template/references/common-pitfalls.md +30 -0
- package/bundled-skills/business-website-setup/SKILL.md +489 -0
- package/bundled-skills/business-website-setup/references/common-pitfalls.md +32 -0
- package/bundled-skills/candidate-talent-pool/SKILL.md +359 -0
- package/bundled-skills/capacity-workload-planner/SKILL.md +354 -0
- package/bundled-skills/changelog-entry/SKILL.md +141 -0
- package/bundled-skills/clients-accounts/SKILL.md +398 -0
- package/bundled-skills/code-of-conduct/SKILL.md +488 -0
- package/bundled-skills/code-of-conduct/references/common-pitfalls.md +31 -0
- package/bundled-skills/company-email-accounts/SKILL.md +404 -0
- package/bundled-skills/competency-matrix/SKILL.md +335 -0
- package/bundled-skills/contract-document-renewal/SKILL.md +396 -0
- package/bundled-skills/course-upskilling-requests/SKILL.md +354 -0
- package/bundled-skills/credit-cycle-analysis/SKILL.md +303 -0
- package/bundled-skills/credit-cycle-analysis/references/best-practices.md +35 -0
- package/bundled-skills/credit-cycle-analysis/references/common-pitfalls.md +5 -0
- package/bundled-skills/credit-cycle-analysis/references/examples.md +34 -0
- package/bundled-skills/credit-cycle-analysis/references/field-reference.md +47 -0
- package/bundled-skills/credit-cycle-analysis/references/how-it-works.md +494 -0
- package/bundled-skills/credit-cycle-analysis/references/security-notes.md +16 -0
- package/bundled-skills/credit-cycle-analysis/references/select-options.md +32 -0
- package/bundled-skills/csv-manual-export/SKILL.md +499 -0
- package/bundled-skills/csv-manual-export/references/common-pitfalls.md +19 -0
- package/bundled-skills/culture-retention/SKILL.md +346 -0
- package/bundled-skills/data-export-engine/SKILL.md +308 -0
- package/bundled-skills/data-privacy-controls/SKILL.md +317 -0
- package/bundled-skills/day-book/SKILL.md +499 -0
- package/bundled-skills/day-book/references/best-practices.md +32 -0
- package/bundled-skills/day-book/references/common-pitfalls.md +58 -0
- package/bundled-skills/day-book/references/field-reference.md +45 -0
- package/bundled-skills/day-book/references/how-it-works.md +7 -0
- package/bundled-skills/day-book/references/related-skills.md +18 -0
- package/bundled-skills/day-book/references/relations.md +14 -0
- package/bundled-skills/day-book/references/reusable-prompt.md +50 -0
- package/bundled-skills/day-book/references/security-safety-notes.md +19 -0
- package/bundled-skills/day-book/references/select-options.md +38 -0
- package/bundled-skills/dei-dashboard/SKILL.md +307 -0
- package/bundled-skills/design-theme-guide/SKILL.md +472 -0
- package/bundled-skills/disciplinary-pip-tracker/SKILL.md +345 -0
- package/bundled-skills/document-management-system/SKILL.md +328 -0
- package/bundled-skills/ecommerce-listing-image-set/SKILL.md +259 -0
- package/bundled-skills/employee-suggestion-hub/SKILL.md +322 -0
- package/bundled-skills/esop-equity-tracker/SKILL.md +331 -0
- package/bundled-skills/events-activities/SKILL.md +355 -0
- package/bundled-skills/expense-accounting/SKILL.md +496 -0
- package/bundled-skills/expense-accounting/references/common-pitfalls.md +41 -0
- package/bundled-skills/expense-accounting/references/related-skills.md +11 -0
- package/bundled-skills/expense-accounting/references/reusable-prompt.md +36 -0
- package/bundled-skills/expense-management/SKILL.md +351 -0
- package/bundled-skills/free-design-resources/SKILL.md +480 -0
- package/bundled-skills/free-design-resources/references/common-pitfalls.md +44 -0
- package/bundled-skills/free-design-resources/references/related-skills.md +24 -0
- package/bundled-skills/free-design-resources/references/reusable-prompt.md +12 -0
- package/bundled-skills/gamification-engine/SKILL.md +307 -0
- package/bundled-skills/gbp-local-seo-intent/SKILL.md +466 -0
- package/bundled-skills/gbp-local-seo-intent/references/best-practices.md +41 -0
- package/bundled-skills/gbp-local-seo-intent/references/common-pitfalls.md +40 -0
- package/bundled-skills/gbp-local-seo-intent/references/related-skills.md +17 -0
- package/bundled-skills/gbp-local-seo-intent/references/reusable-prompt.md +11 -0
- package/bundled-skills/gbp-local-seo-intent/references/security-safety-notes.md +27 -0
- package/bundled-skills/health-wellness/SKILL.md +334 -0
- package/bundled-skills/intern-program/SKILL.md +354 -0
- package/bundled-skills/internal-communication/SKILL.md +318 -0
- package/bundled-skills/inventory-stock-reconciliation/SKILL.md +470 -0
- package/bundled-skills/inventory-stock-reconciliation/references/best-practices.md +18 -0
- package/bundled-skills/inventory-stock-reconciliation/references/common-pitfalls.md +42 -0
- package/bundled-skills/inventory-stock-reconciliation/references/related-skills.md +13 -0
- package/bundled-skills/inventory-stock-reconciliation/references/relations.md +8 -0
- package/bundled-skills/inventory-stock-reconciliation/references/reusable-prompt.md +31 -0
- package/bundled-skills/inventory-stock-reconciliation/references/security-safety-notes.md +17 -0
- package/bundled-skills/inventory-stock-reconciliation/references/select-options.md +45 -0
- package/bundled-skills/invoices-billing/SKILL.md +385 -0
- package/bundled-skills/issue-grievance-tracker/SKILL.md +400 -0
- package/bundled-skills/json-schema-manual/SKILL.md +309 -0
- package/bundled-skills/json-schema-manual/references/best-practices.md +9 -0
- package/bundled-skills/json-schema-manual/references/common-pitfalls.md +25 -0
- package/bundled-skills/json-schema-manual/references/input-modules.md +203 -0
- package/bundled-skills/json-schema-manual/references/related-skills.md +8 -0
- package/bundled-skills/json-schema-manual/references/reusable-prompt.md +10 -0
- package/bundled-skills/json-schema-manual/references/security-safety-notes.md +13 -0
- package/bundled-skills/knowledge-base/SKILL.md +318 -0
- package/bundled-skills/kpi-tracker/SKILL.md +345 -0
- package/bundled-skills/learning-career-development/SKILL.md +349 -0
- package/bundled-skills/leave-management/SKILL.md +341 -0
- package/bundled-skills/legal-compliance-vault/SKILL.md +324 -0
- package/bundled-skills/linktree-link-hub/SKILL.md +453 -0
- package/bundled-skills/logo-image-design/SKILL.md +459 -0
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package-lock.json +3 -3
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package.json +2 -1
- package/bundled-skills/mentorship-program/SKILL.md +332 -0
- package/bundled-skills/mirrord/SKILL.md +90 -0
- package/bundled-skills/monthly-closing-statements/SKILL.md +488 -0
- package/bundled-skills/monthly-closing-statements/references/related-skills.md +17 -0
- package/bundled-skills/monthly-closing-statements/references/reusable-prompt.md +8 -0
- package/bundled-skills/music-generation-studio/SKILL.md +259 -0
- package/bundled-skills/notification-reminder-hub/SKILL.md +324 -0
- package/bundled-skills/notion-manual-import/SKILL.md +376 -0
- package/bundled-skills/notion-manual-import/references/best-practices.md +10 -0
- package/bundled-skills/notion-manual-import/references/common-pitfalls.md +26 -0
- package/bundled-skills/notion-manual-import/references/input-modules.md +203 -0
- package/bundled-skills/notion-manual-import/references/related-skills.md +7 -0
- package/bundled-skills/notion-manual-import/references/reusable-prompt.md +8 -0
- package/bundled-skills/notion-manual-import/references/security-safety-notes.md +15 -0
- package/bundled-skills/observability-cloud-planning/SKILL.md +487 -0
- package/bundled-skills/observability-cloud-planning/references/common-pitfalls.md +39 -0
- package/bundled-skills/observability-cloud-planning/references/related-skills.md +20 -0
- package/bundled-skills/observability-cloud-planning/references/reusable-prompt.md +12 -0
- package/bundled-skills/observability-cloud-planning/references/security-safety-notes.md +30 -0
- package/bundled-skills/offboarding-exit/SKILL.md +343 -0
- package/bundled-skills/offer-appointment/SKILL.md +351 -0
- package/bundled-skills/okr-system/SKILL.md +355 -0
- package/bundled-skills/omentir-linkedin-outreach/SKILL.md +96 -0
- package/bundled-skills/onboarding-playbook/SKILL.md +292 -0
- package/bundled-skills/organization-design/SKILL.md +324 -0
- package/bundled-skills/party-ledger-reconciliation/SKILL.md +411 -0
- package/bundled-skills/payment-accounting/SKILL.md +421 -0
- package/bundled-skills/payments-received/SKILL.md +315 -0
- package/bundled-skills/payroll-finance/SKILL.md +351 -0
- package/bundled-skills/people-directory/SKILL.md +459 -0
- package/bundled-skills/performance-management/SKILL.md +367 -0
- package/bundled-skills/petty-cash-management/SKILL.md +448 -0
- package/bundled-skills/policy-acknowledgement/SKILL.md +314 -0
- package/bundled-skills/policy-library/SKILL.md +327 -0
- package/bundled-skills/poster-design-studio/SKILL.md +259 -0
- package/bundled-skills/pre-boarding/SKILL.md +326 -0
- package/bundled-skills/presentation-deck/SKILL.md +491 -0
- package/bundled-skills/presentation-deck/references/related-skills.md +19 -0
- package/bundled-skills/presentation-deck/references/reusable-prompt.md +11 -0
- package/bundled-skills/probation-tracker/SKILL.md +347 -0
- package/bundled-skills/product-photo-studio/SKILL.md +259 -0
- package/bundled-skills/project-based-performance/SKILL.md +323 -0
- package/bundled-skills/projects-work-management/SKILL.md +368 -0
- package/bundled-skills/promotion-upgrade-requests/SKILL.md +377 -0
- package/bundled-skills/purchase-accounting/SKILL.md +414 -0
- package/bundled-skills/receipt-accounting/SKILL.md +424 -0
- package/bundled-skills/recognition-rewards/SKILL.md +324 -0
- package/bundled-skills/recruitment-pipeline/SKILL.md +399 -0
- package/bundled-skills/remote-work-tracker/SKILL.md +306 -0
- package/bundled-skills/reports-analytics/SKILL.md +320 -0
- package/bundled-skills/salary-benchmarking/SKILL.md +318 -0
- package/bundled-skills/salary-wage-accounting/SKILL.md +412 -0
- package/bundled-skills/sales-accounting/SKILL.md +494 -0
- package/bundled-skills/sales-accounting/references/common-pitfalls.md +28 -0
- package/bundled-skills/sales-accounting/references/related-skills.md +13 -0
- package/bundled-skills/sales-accounting/references/reusable-prompt.md +8 -0
- package/bundled-skills/seo-directory-backlinks/SKILL.md +484 -0
- package/bundled-skills/seo-directory-backlinks/references/common-pitfalls.md +36 -0
- package/bundled-skills/seo-directory-backlinks/references/related-skills.md +15 -0
- package/bundled-skills/seo-directory-backlinks/references/reusable-prompt.md +11 -0
- package/bundled-skills/since-cutoff/SKILL.md +68 -0
- package/bundled-skills/skill-gap-analysis/SKILL.md +338 -0
- package/bundled-skills/social-media-setup/SKILL.md +477 -0
- package/bundled-skills/social-media-setup/references/common-pitfalls.md +34 -0
- package/bundled-skills/social-media-setup/references/related-skills.md +19 -0
- package/bundled-skills/social-media-setup/references/reusable-prompt.md +11 -0
- package/bundled-skills/social-media-setup/references/security-safety-notes.md +27 -0
- package/bundled-skills/sop-company-wiki/SKILL.md +324 -0
- package/bundled-skills/source-document-filing/SKILL.md +368 -0
- package/bundled-skills/spreadsheet-manual-build/SKILL.md +493 -0
- package/bundled-skills/spreadsheet-manual-build/references/best-practices.md +9 -0
- package/bundled-skills/spreadsheet-manual-build/references/common-pitfalls.md +22 -0
- package/bundled-skills/spreadsheet-manual-build/references/related-skills.md +8 -0
- package/bundled-skills/spreadsheet-manual-build/references/reusable-prompt.md +9 -0
- package/bundled-skills/spreadsheet-manual-build/references/security-safety-notes.md +16 -0
- package/bundled-skills/stakeholder-investor-reports/SKILL.md +303 -0
- package/bundled-skills/suno-lyrics-to-song/SKILL.md +259 -0
- package/bundled-skills/talking-avatar-video/SKILL.md +260 -0
- package/bundled-skills/tax-register/SKILL.md +363 -0
- package/bundled-skills/tds-booking-payment/SKILL.md +405 -0
- package/bundled-skills/team-calendar/SKILL.md +312 -0
- package/bundled-skills/telegram/assets/boilerplate/nodejs/package-lock.json +3 -3
- package/bundled-skills/telegram/assets/boilerplate/nodejs/package.json +1 -0
- package/bundled-skills/template-library/SKILL.md +304 -0
- package/bundled-skills/time-tracking/SKILL.md +353 -0
- package/bundled-skills/vendor-contractor-management/SKILL.md +327 -0
- package/bundled-skills/viral-video-teardown-remake/SKILL.md +260 -0
- package/bundled-skills/voice-cloning-studio/SKILL.md +260 -0
- package/bundled-skills/voiceover-narration-studio/SKILL.md +259 -0
- package/bundled-skills/whatsapp-cloud-api/assets/boilerplate/nodejs/package-lock.json +3 -3
- package/bundled-skills/whatsapp-cloud-api/assets/boilerplate/nodejs/package.json +1 -0
- package/dist/skill-pointer/index.d.ts +2 -1
- package/dist/skill-pointer/index.js +2 -1
- package/dist/skill-pointer/pointer-generator.d.ts +4 -2
- package/dist/skill-pointer/pointer-generator.js +4 -2
- package/package.json +1 -1
- package/skills_index.json +4312 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Credit Cycle Analysis: Best Practices
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
- Build when requested; recommend and offer a build for advice-only requests.
|
|
5
|
+
- One question per message. A batched intake reads as a form and gets guessed at.
|
|
6
|
+
- Ask the customer question and the supplier question separately. One answer about terms does not
|
|
7
|
+
carry over to the other side.
|
|
8
|
+
- Keep the six concepts apart. Terms, actual, benchmark, aging, gap and funding are six different
|
|
9
|
+
numbers and each has its own field.
|
|
10
|
+
- Never substitute terms for actual days, or a benchmark for a target, or a day count for a money
|
|
11
|
+
amount. When the underlying data is missing, the answer is `Unknown`.
|
|
12
|
+
- Never put one `Aging Bucket` on a party row. The party row carries bucket amounts; the bucket
|
|
13
|
+
itself belongs to an invoice or a bill.
|
|
14
|
+
- Name the two movement fields `Credit Movement` and `Settlement` so the same fields read correctly
|
|
15
|
+
for customers and for suppliers.
|
|
16
|
+
- Test the balance identity before reading a single day figure off a row. A cycle measured on an
|
|
17
|
+
unreconciled balance is precise and wrong.
|
|
18
|
+
- Record a difference, never repair one. `Adjustments` is where a real adjustment goes, with a
|
|
19
|
+
reason; an unexplained break is left visible with a status.
|
|
20
|
+
- Write the basis into `Measurement Basis` and keep it stable across periods. Changing the basis
|
|
21
|
+
mid-year makes the trend a measurement change, not a change in behaviour.
|
|
22
|
+
- Where part-payments happen, use the weighted settlement calculation above and say so. Taking the
|
|
23
|
+
final payment date as if it settled the whole invoice understates every day count.
|
|
24
|
+
- A benchmark must be the user’s, explicitly chosen, or labelled a proposed default. Never present
|
|
25
|
+
one as a business target.
|
|
26
|
+
- Convert days to money only with a recorded monetary basis, and record that basis every time.
|
|
27
|
+
- State the gap descriptively. This module measures the timing difference and does not decide
|
|
28
|
+
whether it is acceptable.
|
|
29
|
+
- Keep every field name identical across CSV, SQL, JSON Schema and the Notion mapping, in the same
|
|
30
|
+
order. A field that exists in one and not the others is a defect.
|
|
31
|
+
- Money fields are `currency`, never `text`. Dates are `date`, never free text. Days are numeric.
|
|
32
|
+
Percentages are stored as `97` for 97%, never `0.97`.
|
|
33
|
+
- Round once, at the end, so the components re-derive the total.
|
|
34
|
+
- If the user requests an example row, keep it obviously fake so nobody imports it as real data.
|
|
35
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Credit Cycle Analysis: Examples
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
**Prompt**
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
We are profitable on paper but cash is always tight and we cannot say why.
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
**Context first** - one question per message, nothing already answered:
|
|
11
|
+
|
|
12
|
+
> **Q:** How long do your customers take to pay you?
|
|
13
|
+
> **A:** Terms are 30 days, but the big ones take about six weeks.
|
|
14
|
+
>
|
|
15
|
+
> **Q:** And how long do you take to pay your suppliers?
|
|
16
|
+
> **A:** Most of them are 45 days and they are strict about it.
|
|
17
|
+
>
|
|
18
|
+
> **Q:** Do you track any of it today?
|
|
19
|
+
> **A:** No. We just look at the bank balance and hope.
|
|
20
|
+
|
|
21
|
+
**Recommended next step** - offered, not built:
|
|
22
|
+
|
|
23
|
+
> Three datasets. A party-period credit-cycle summary in the same shape for debtors and for
|
|
24
|
+
> creditors; an invoice/bill aging detail carrying the evidence and the buckets; and a per-period
|
|
25
|
+
> debtor-versus-creditor comparison where the gap, and the funding effect only if a monetary basis
|
|
26
|
+
> exists, are recorded.
|
|
27
|
+
>
|
|
28
|
+
> Workflow: Party selected → Period movement recorded as credit movement and settlement → Cycle
|
|
29
|
+
> days measured on the documented basis → Overdue and bucket amounts reviewed → Compared against
|
|
30
|
+
> the other side → Gap priced only if a monetary basis exists → Trend recorded → Reconciled,
|
|
31
|
+
> marked and reviewed
|
|
32
|
+
>
|
|
33
|
+
> Want the CSV, SQL, JSON Schema and Notion mapping for this?
|
|
34
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Credit Cycle Analysis: Field Reference
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
| # | Field | Type | SQL | JSON Schema | Notion | CSV example |
|
|
5
|
+
|---:|---|---|---|---|---|---|
|
|
6
|
+
| 1 | Analysis Number | `text` | `VARCHAR(255)` | `string` | Text | `CCA-EXAMPLE-001` |
|
|
7
|
+
| 2 | Period Start | `date` | `DATE` | `string, format: date` | Date | `2026-01-01` |
|
|
8
|
+
| 3 | Period End | `date` | `DATE` | `string, format: date` | Date | `2026-01-31` |
|
|
9
|
+
| 4 | Party Type | `select` | `VARCHAR(100)` | `string` | Select (add options after import) | `Customer/Debtor` |
|
|
10
|
+
| 5 | Party Name | `text` | `VARCHAR(255)` | `string` | Text | `Example Customer` |
|
|
11
|
+
| 6 | Opening Balance | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `420000.00` |
|
|
12
|
+
| 7 | Credit Movement | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `114000.00` |
|
|
13
|
+
| 8 | Settlement | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `47800.00` |
|
|
14
|
+
| 9 | Adjustments | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `150.00` |
|
|
15
|
+
| 10 | Closing Balance | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `486500.00` |
|
|
16
|
+
| 11 | Average Balance | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `453175.00` |
|
|
17
|
+
| 12 | Measurement Basis | `text` | `VARCHAR(255)` | `string` | Text | `Invoice date to settlement date` |
|
|
18
|
+
| 13 | Contractual Terms Days | `number` | `NUMERIC` | `number` | Number | `30` |
|
|
19
|
+
| 14 | Actual Collection/Payment Days | `number` | `NUMERIC` | `number` | Number | `42` |
|
|
20
|
+
| 15 | Weighted Days | `number` | `NUMERIC` | `number` | Number | `38` |
|
|
21
|
+
| 16 | Overdue Amount | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `254869.60` |
|
|
22
|
+
| 17 | Current Amount | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `231630.40` |
|
|
23
|
+
| 18 | Aging 0-30 Amount | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `92340.00` |
|
|
24
|
+
| 19 | Aging 31-60 Amount | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `61100.00` |
|
|
25
|
+
| 20 | Aging 61-90 Amount | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `30000.00` |
|
|
26
|
+
| 21 | Aging 91-180 Amount | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `41429.60` |
|
|
27
|
+
| 22 | Aging Over 180 Amount | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `30000.00` |
|
|
28
|
+
| 23 | Customer Credit Limit | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) | `500000.00` |
|
|
29
|
+
| 24 | Customer Credit Utilisation % | `number` | `NUMERIC` | `number` | Number | `97.27` |
|
|
30
|
+
| 25 | Benchmark Days | `number` | `NUMERIC` | `number` | Number | `35` |
|
|
31
|
+
| 26 | Gap vs Benchmark | `number` | `NUMERIC` | `number` | Number | `7` |
|
|
32
|
+
| 27 | Cycle Trend | `select` | `VARCHAR(100)` | `string` | Select (add options after import) | `Deteriorating` |
|
|
33
|
+
| 28 | Reconciliation Status | `select` | `VARCHAR(100)` | `string` | Select (add options after import) | `Needs Review` |
|
|
34
|
+
| 29 | Data Quality Status | `select` | `VARCHAR(100)` | `string` | Select (add options after import) | `Incomplete` |
|
|
35
|
+
| 30 | Reviewed By | `text` | `VARCHAR(255)` | `string` | Text | `Example Reviewer` |
|
|
36
|
+
| 31 | Status | `select` | `VARCHAR(100)` | `string` | Select (add options after import) | `In progress` |
|
|
37
|
+
| 32 | Notes | `long_text` | `TEXT` | `string` | Text | `The 150.00 difference against the balance identity is left open, not adjusted. Benchmark of 35 days is a proposed default, not an agreed target. Two invoices carry no due date, so their bucket and the utilisation figure stay Unknown.` |
|
|
38
|
+
| 33 | Cycle Analysis ID | `id` | `SERIAL PRIMARY KEY` | `integer` | Text (preserve source ID) | `(blank)` |
|
|
39
|
+
|
|
40
|
+
`Measurement Basis` is in this list because the day counts above it cannot be interpreted without
|
|
41
|
+
it, and because the reviewer's first question - actual behaviour or agreed terms - only has an
|
|
42
|
+
answer if the basis is written on the row. `Customer Credit Limit` and `Customer Credit
|
|
43
|
+
Utilisation %` are **customer-only**: they are filled only where `Party Type` is
|
|
44
|
+
`Customer/Debtor` and a credit limit actually exists. On a `Supplier/Creditor` row both stay
|
|
45
|
+
blank. A supplier has no customer credit limit, and writing one there is a category error, not a
|
|
46
|
+
default. Where no limit exists, `Customer Credit Utilisation %` is `Unknown`, never `0`.
|
|
47
|
+
|
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
# Credit Cycle Analysis: How It Works
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Follow the shared execution contract. The module-specific rules below define only domain fields, decisions, calculations, and safety constraints.
|
|
5
|
+
|
|
6
|
+
### Step 1 - Identify intent
|
|
7
|
+
|
|
8
|
+
Read the request and pick the intent before asking anything.
|
|
9
|
+
|
|
10
|
+
- "set up" or "build" or "create" -> the user wants artifacts; go to Step 2.
|
|
11
|
+
- "our process is ..." or "we have a sheet" -> `import` or `fix`; capture what is there, then Step 2.
|
|
12
|
+
- "is this right" or "review this" or "audit this" -> `review`; answer from what they share and do
|
|
13
|
+
not rebuild anything.
|
|
14
|
+
- "show me the cycle" or "analyse this" -> `report`; answer from what they share.
|
|
15
|
+
- "how do I ..." -> advice question; answer directly and offer the build only if it helps.
|
|
16
|
+
|
|
17
|
+
If the intent is already clear from the request, do not ask the user to repeat it.
|
|
18
|
+
|
|
19
|
+
On a `review`, check the design against nine things and report concrete issues with concrete
|
|
20
|
+
fixes: the data model, the calculation logic, the reconciliation, the aging, debtor/creditor
|
|
21
|
+
comparability, the benchmark logic, the working-capital methodology, the data quality, and whether
|
|
22
|
+
the four artifacts agree. Do not rebuild the system because a review was asked for.
|
|
23
|
+
|
|
24
|
+
On a `fix`, preserve every valid fact the user has already supplied, identify the contradictions,
|
|
25
|
+
correct the model, avoid fields that were not asked for, and explain the material changes briefly.
|
|
26
|
+
Rebuild the artifacts only when the fix request asks for them.
|
|
27
|
+
|
|
28
|
+
One message, one question, no batching. Open with the question that decides the design:
|
|
29
|
+
|
|
30
|
+
> **Q:** How long do your customers take to pay you?
|
|
31
|
+
|
|
32
|
+
### Step 2 - Ask only what is missing
|
|
33
|
+
|
|
34
|
+
Treat ambiguous replies as unanswered and ask which explicit option the user means. Record unknown values as `Unknown`; `Unknown` is not zero. A record must not be `Done` when a required check fails.
|
|
35
|
+
|
|
36
|
+
Skip anything the user already answered, in any earlier message. Ask the rest one at a time, and
|
|
37
|
+
stop as soon as the remaining answers would not change the recommendation or the requested
|
|
38
|
+
artifact. Never batch two questions into one message.
|
|
39
|
+
|
|
40
|
+
- **Parties** - Are customers included? Are suppliers included? How many of each? Are parties
|
|
41
|
+
tracked individually? Is a customer credit limit maintained for anyone?
|
|
42
|
+
- **Cycle, customers** - What are the contractual payment terms in days? What does the customer
|
|
43
|
+
cycle actually measure? Which dates does the business already hold? Do part-payments happen?
|
|
44
|
+
- **Cycle, suppliers** - Same four questions, asked separately. Do not assume the customer answer
|
|
45
|
+
carries over to the supplier side.
|
|
46
|
+
- **Measurement basis** - Is the cycle measured from invoice/bill date to settlement date, to
|
|
47
|
+
first settlement date, from due date to settlement date, or on a weighted settlement date?
|
|
48
|
+
Select a basis only from evidence in the user's process, never by default.
|
|
49
|
+
- **Aging** - Do invoice or bill dates exist? Do due dates exist? Are outstanding amounts
|
|
50
|
+
available? Can aging be done at invoice or bill level? Which buckets are already in use?
|
|
51
|
+
- **Current process** - Spreadsheet, accounting software, manual, or an existing report? How is it
|
|
52
|
+
reconciled today? What data-quality problem is known?
|
|
53
|
+
- **Outcome** - Cycle measurement, aging, the debtor-vs-creditor comparison, working-capital
|
|
54
|
+
analysis, or all of them?
|
|
55
|
+
|
|
56
|
+
**An ambiguous answer is not an answer.** `yes`, `no`, `maybe`, `same`, `okay` and `fine` do not
|
|
57
|
+
answer a multiple-choice question. Re-ask as an explicit choice:
|
|
58
|
+
|
|
59
|
+
> **Q:** Which do you mean: **the days you agreed in writing** or **the days you actually wait**?
|
|
60
|
+
|
|
61
|
+
A partial answer keeps only the part that was answered. "Customers take somewhere between thirty
|
|
62
|
+
and fifty days" records a range for the actual cycle and leaves the contractual terms `Unknown`.
|
|
63
|
+
|
|
64
|
+
**Never invent a business fact.** Not a party name, a balance, an invoice number, a payment date,
|
|
65
|
+
a due date, a payment term, a credit limit, a benchmark, a currency, a collection day, a payment
|
|
66
|
+
day, an aging figure, a working-capital amount or a trend. If a value was not supplied by the user
|
|
67
|
+
or derived by a documented formula from supplied data, it is `Unknown` or blank.
|
|
68
|
+
Never turn Unknown into zero - a blank is an answer about what is missing, a zero is an answer
|
|
69
|
+
about the business. Record `Unknown`, move on, and never re-ask an unknown the user has already
|
|
70
|
+
said they do not have.
|
|
71
|
+
|
|
72
|
+
When the answer to a question is genuinely `Unknown`, the calculated values that depend on it stay
|
|
73
|
+
`Unknown` too, and the row's `Data Quality Status` records why. `Actual Collection/Payment Days`
|
|
74
|
+
is never filled with the contractual terms, and `Estimated Working-Capital Funding` is never
|
|
75
|
+
filled with a number when the monetary basis is missing.
|
|
76
|
+
|
|
77
|
+
### Step 3 - Hold the internal context
|
|
78
|
+
|
|
79
|
+
Hold the answers in this shape. It stays internal - it is not shown to the user unless they ask,
|
|
80
|
+
and it never carries a value the user did not give.
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
module: credit-cycle-analysis
|
|
84
|
+
intent: null # setup | advice | review | fix | build | convert | export
|
|
85
|
+
scale: null # Starter | Growth | Scale, only if the answer changes it
|
|
86
|
+
areas:
|
|
87
|
+
"Parties": null
|
|
88
|
+
"Cycle": null
|
|
89
|
+
"Aging": null
|
|
90
|
+
"Current process": null
|
|
91
|
+
"Outcome": null
|
|
92
|
+
debtor_terms_days: null
|
|
93
|
+
debtor_actual_days: null
|
|
94
|
+
debtor_measurement_basis: null
|
|
95
|
+
creditor_terms_days: null
|
|
96
|
+
creditor_actual_days: null
|
|
97
|
+
creditor_measurement_basis: null
|
|
98
|
+
partial_payments: null
|
|
99
|
+
credit_limits_maintained: null
|
|
100
|
+
due_dates_available: null
|
|
101
|
+
invoice_level_aging: null
|
|
102
|
+
aging_buckets: null
|
|
103
|
+
annualised_basis_appropriate: null
|
|
104
|
+
requested_outputs: [] # csv | sql | json | notion | xlsx - requested formats only
|
|
105
|
+
confirmed_facts: [] # only what the user actually said
|
|
106
|
+
unknowns: [] # asked and not answered
|
|
107
|
+
open_questions: [] # the unanswered ones, in the order worth asking
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Step 4 - Recommend the smallest workflow
|
|
111
|
+
|
|
112
|
+
Build an already requested artifact without asking again. For advice-only requests, give a short recommendation and offer the relevant artifact.
|
|
113
|
+
|
|
114
|
+
**Recommended approach:** Three logical datasets, kept apart. A party-period credit-cycle summary in
|
|
115
|
+
the same shape for debtors and for creditors; an invoice/bill aging detail carrying the evidence
|
|
116
|
+
and the buckets; and a per-period debtor-versus-creditor comparison where the gap and, if a
|
|
117
|
+
monetary basis exists, the funding effect are recorded.
|
|
118
|
+
|
|
119
|
+
**Why this one:** The three layers do three different jobs and conflating any two of them is what
|
|
120
|
+
produces a wrong number. The summary is the management view. The detail is the evidence behind
|
|
121
|
+
every aging bucket and behind every day count, and it is the only place a single `Aging Bucket`
|
|
122
|
+
can honestly sit. The comparison is the only place the two sides can be subtracted at all, and it
|
|
123
|
+
is the only place a monetary basis is recorded. Forcing all of it into one row is what makes a
|
|
124
|
+
party's aging position unrepresentable.
|
|
125
|
+
|
|
126
|
+
**Workflow:** Party selected → Period movement recorded as credit movement and settlement →
|
|
127
|
+
Cycle days measured on the documented basis → Overdue and bucket amounts reviewed → Compared
|
|
128
|
+
against the other side → Gap priced only if a monetary basis exists → Trend recorded → Reconciled,
|
|
129
|
+
marked and reviewed
|
|
130
|
+
|
|
131
|
+
### Step 5 - Build only on request
|
|
132
|
+
|
|
133
|
+
Once the user asks for it, derive the fields from one canonical field dictionary and emit the
|
|
134
|
+
requested artifacts. For machine-readable text, keep prose outside the data; for files,
|
|
135
|
+
provide a usable link. Report material validation failures or limitations separately. A field present in one artifact
|
|
136
|
+
is present in all four, in the same order. Build only what was asked for: CSV, SQL, JSON Schema and
|
|
137
|
+
Notion mapping on request, and one of them if that is all that was asked for.
|
|
138
|
+
|
|
139
|
+
**A selected Notion output is rendered by `notion-manual-import`, so route the
|
|
140
|
+
Notion step there.** When the user selects Notion, hand that step to
|
|
141
|
+
@notion-manual-import: it holds the CSV, the property
|
|
142
|
+
mapping, the import steps and the verification checklist, and it renders the Field
|
|
143
|
+
Reference below instead of defining a table of its own. Do not restate the mapping
|
|
144
|
+
here and do not improvise the import steps. Manual CSV and mapping outputs need no
|
|
145
|
+
connection. For requested workspace changes, follow the shared contract: verify actual
|
|
146
|
+
tool access and the target before writing. A user saying "connected" is not tool evidence.
|
|
147
|
+
Never ask for a Notion password or token.
|
|
148
|
+
|
|
149
|
+
```csv
|
|
150
|
+
Analysis Number,Period Start,Period End,Party Type,Party Name,Opening Balance,Credit Movement,Settlement,Adjustments,Closing Balance,Average Balance,Measurement Basis,Contractual Terms Days,Actual Collection/Payment Days,Weighted Days,Overdue Amount,Current Amount,Aging 0-30 Amount,Aging 31-60 Amount,Aging 61-90 Amount,Aging 91-180 Amount,Aging Over 180 Amount,Customer Credit Limit,Customer Credit Utilisation %,Benchmark Days,Gap vs Benchmark,Cycle Trend,Reconciliation Status,Data Quality Status,Reviewed By,Status,Notes,Cycle Analysis ID
|
|
151
|
+
CCA-EXAMPLE-001,2026-01-01,2026-01-31,Customer/Debtor,Example Customer,420000.00,114000.00,47800.00,150.00,486500.00,453175.00,Invoice date to settlement date,30,42,38,254869.60,231630.40,92340.00,61100.00,30000.00,41429.60,30000.00,500000.00,97.27,35,7,Deteriorating,Needs Review,Incomplete,Example Reviewer,In progress,"The 150.00 difference against the balance identity is left open, not adjusted. Benchmark of 35 days is a proposed default, not an agreed target. Two invoices carry no due date, so their bucket and the utilisation figure stay Unknown.",
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
```sql
|
|
155
|
+
-- Engine assumption: PostgreSQL. If the target database is not PostgreSQL, replace
|
|
156
|
+
-- SERIAL PRIMARY KEY with that engine's auto-increment form; nothing else here is
|
|
157
|
+
-- engine-specific.
|
|
158
|
+
CREATE TABLE credit_cycle_analysis (
|
|
159
|
+
analysis_number VARCHAR(255),
|
|
160
|
+
period_start DATE NOT NULL,
|
|
161
|
+
period_end DATE NOT NULL,
|
|
162
|
+
party_type VARCHAR(100) NOT NULL,
|
|
163
|
+
party_name VARCHAR(255),
|
|
164
|
+
opening_balance NUMERIC(14,2) NOT NULL,
|
|
165
|
+
credit_movement NUMERIC(14,2) NOT NULL,
|
|
166
|
+
settlement NUMERIC(14,2) NOT NULL,
|
|
167
|
+
adjustments NUMERIC(14,2),
|
|
168
|
+
closing_balance NUMERIC(14,2) NOT NULL,
|
|
169
|
+
average_balance NUMERIC(14,2),
|
|
170
|
+
measurement_basis VARCHAR(255),
|
|
171
|
+
contractual_terms_days NUMERIC,
|
|
172
|
+
actual_collection_payment_days NUMERIC,
|
|
173
|
+
weighted_days NUMERIC,
|
|
174
|
+
overdue_amount NUMERIC(14,2),
|
|
175
|
+
current_amount NUMERIC(14,2),
|
|
176
|
+
aging_0_30_amount NUMERIC(14,2),
|
|
177
|
+
aging_31_60_amount NUMERIC(14,2),
|
|
178
|
+
aging_61_90_amount NUMERIC(14,2),
|
|
179
|
+
aging_91_180_amount NUMERIC(14,2),
|
|
180
|
+
aging_over_180_amount NUMERIC(14,2),
|
|
181
|
+
customer_credit_limit NUMERIC(14,2),
|
|
182
|
+
customer_credit_utilisation_pct NUMERIC,
|
|
183
|
+
benchmark_days NUMERIC,
|
|
184
|
+
gap_vs_benchmark NUMERIC,
|
|
185
|
+
cycle_trend VARCHAR(100) NOT NULL,
|
|
186
|
+
reconciliation_status VARCHAR(100) NOT NULL,
|
|
187
|
+
data_quality_status VARCHAR(100) NOT NULL,
|
|
188
|
+
reviewed_by VARCHAR(255),
|
|
189
|
+
status VARCHAR(100) NOT NULL,
|
|
190
|
+
notes TEXT,
|
|
191
|
+
cycle_analysis_id SERIAL PRIMARY KEY,
|
|
192
|
+
created_at TIMESTAMP DEFAULT NOW(),
|
|
193
|
+
updated_at TIMESTAMP DEFAULT NOW(),
|
|
194
|
+
CONSTRAINT credit_cycle_period_order CHECK (period_start <= period_end),
|
|
195
|
+
CONSTRAINT credit_cycle_money_non_negative CHECK (
|
|
196
|
+
opening_balance >= 0
|
|
197
|
+
AND credit_movement >= 0
|
|
198
|
+
AND settlement >= 0
|
|
199
|
+
AND closing_balance >= 0)
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
CREATE INDEX idx_credit_cycle_analysis_status ON credit_cycle_analysis (status);
|
|
203
|
+
CREATE INDEX idx_credit_cycle_analysis_party ON credit_cycle_analysis (party_name);
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
209
|
+
"title": "Debtor & Creditor Credit-Cycle Analysis",
|
|
210
|
+
"type": "object",
|
|
211
|
+
"additionalProperties": false,
|
|
212
|
+
"properties": {
|
|
213
|
+
"Analysis Number": { "type": "string" },
|
|
214
|
+
"Period Start": { "type": "string", "format": "date" },
|
|
215
|
+
"Period End": { "type": "string", "format": "date" },
|
|
216
|
+
"Party Type": { "type": "string" },
|
|
217
|
+
"Party Name": { "type": "string" },
|
|
218
|
+
"Opening Balance": { "type": "number" },
|
|
219
|
+
"Credit Movement": { "type": "number" },
|
|
220
|
+
"Settlement": { "type": "number" },
|
|
221
|
+
"Adjustments": { "type": "number" },
|
|
222
|
+
"Closing Balance": { "type": "number" },
|
|
223
|
+
"Average Balance": { "type": "number" },
|
|
224
|
+
"Measurement Basis": { "type": "string" },
|
|
225
|
+
"Contractual Terms Days": { "type": "number" },
|
|
226
|
+
"Actual Collection/Payment Days": { "type": "number" },
|
|
227
|
+
"Weighted Days": { "type": "number" },
|
|
228
|
+
"Overdue Amount": { "type": "number" },
|
|
229
|
+
"Current Amount": { "type": "number" },
|
|
230
|
+
"Aging 0-30 Amount": { "type": "number" },
|
|
231
|
+
"Aging 31-60 Amount": { "type": "number" },
|
|
232
|
+
"Aging 61-90 Amount": { "type": "number" },
|
|
233
|
+
"Aging 91-180 Amount": { "type": "number" },
|
|
234
|
+
"Aging Over 180 Amount": { "type": "number" },
|
|
235
|
+
"Customer Credit Limit": { "type": "number" },
|
|
236
|
+
"Customer Credit Utilisation %": { "type": "number" },
|
|
237
|
+
"Benchmark Days": { "type": "number" },
|
|
238
|
+
"Gap vs Benchmark": { "type": "number" },
|
|
239
|
+
"Cycle Trend": { "type": "string" },
|
|
240
|
+
"Reconciliation Status": { "type": "string" },
|
|
241
|
+
"Data Quality Status": { "type": "string" },
|
|
242
|
+
"Reviewed By": { "type": "string" },
|
|
243
|
+
"Status": { "type": "string" },
|
|
244
|
+
"Notes": { "type": "string" },
|
|
245
|
+
"Cycle Analysis ID": { "type": "integer" }
|
|
246
|
+
},
|
|
247
|
+
"required": [
|
|
248
|
+
"Period Start",
|
|
249
|
+
"Period End",
|
|
250
|
+
"Party Type",
|
|
251
|
+
"Opening Balance",
|
|
252
|
+
"Credit Movement",
|
|
253
|
+
"Settlement",
|
|
254
|
+
"Closing Balance",
|
|
255
|
+
"Cycle Trend",
|
|
256
|
+
"Reconciliation Status",
|
|
257
|
+
"Data Quality Status",
|
|
258
|
+
"Status"
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
`required` is a business-necessity list, not an availability list. `Opening Balance`,
|
|
264
|
+
`Credit Movement`, `Settlement` and `Closing Balance` are required because the balance identity
|
|
265
|
+
cannot be tested without all four. `Period Start` and `Period End` are required because every
|
|
266
|
+
other date on the row is measured against the period. `Party Type` is required because the
|
|
267
|
+
customer-only fields are only meaningful with it. Every calculated field - the days, the bucket
|
|
268
|
+
amounts, the credit limit, the utilisation, the benchmark and the gap - is deliberately optional,
|
|
269
|
+
because each of them has a legitimate `Unknown`.
|
|
270
|
+
|
|
271
|
+
```markdown
|
|
272
|
+
| CSV column | Notion property | Set after import |
|
|
273
|
+
|---|---|---|
|
|
274
|
+
| Analysis Number | Title | Use as the database title |
|
|
275
|
+
| Period Start | Date | Convert to Date |
|
|
276
|
+
| Period End | Date | Convert to Date |
|
|
277
|
+
| Party Type | Select (add options after import) | Convert to Select, add options: "Customer/Debtor", "Supplier/Creditor" |
|
|
278
|
+
| Party Name | Text | Leave as Text |
|
|
279
|
+
| Opening Balance | Number (format: currency) | Convert to Number, set format to Currency |
|
|
280
|
+
| Credit Movement | Number (format: currency) | Convert to Number, set format to Currency |
|
|
281
|
+
| Settlement | Number (format: currency) | Convert to Number, set format to Currency |
|
|
282
|
+
| Adjustments | Number (format: currency) | Convert to Number, set format to Currency |
|
|
283
|
+
| Closing Balance | Number (format: currency) | Convert to Number, set format to Currency |
|
|
284
|
+
| Average Balance | Number (format: currency) | Convert to Number, set format to Currency |
|
|
285
|
+
| Measurement Basis | Text | Leave as Text |
|
|
286
|
+
| Contractual Terms Days | Number | Convert to Number |
|
|
287
|
+
| Actual Collection/Payment Days | Number | Convert to Number |
|
|
288
|
+
| Weighted Days | Number | Convert to Number |
|
|
289
|
+
| Overdue Amount | Number (format: currency) | Convert to Number, set format to Currency |
|
|
290
|
+
| Current Amount | Number (format: currency) | Convert to Number, set format to Currency |
|
|
291
|
+
| Aging 0-30 Amount | Number (format: currency) | Convert to Number, set format to Currency |
|
|
292
|
+
| Aging 31-60 Amount | Number (format: currency) | Convert to Number, set format to Currency |
|
|
293
|
+
| Aging 61-90 Amount | Number (format: currency) | Convert to Number, set format to Currency |
|
|
294
|
+
| Aging 91-180 Amount | Number (format: currency) | Convert to Number, set format to Currency |
|
|
295
|
+
| Aging Over 180 Amount | Number (format: currency) | Convert to Number, set format to Currency |
|
|
296
|
+
| Customer Credit Limit | Number (format: currency) | Convert to Number, set format to Currency |
|
|
297
|
+
| Customer Credit Utilisation % | Number | Convert to Number |
|
|
298
|
+
| Benchmark Days | Number | Convert to Number |
|
|
299
|
+
| Gap vs Benchmark | Number | Convert to Number |
|
|
300
|
+
| Cycle Trend | Select (add options after import) | Convert to Select, add options: "Improving", "Stable", "Deteriorating", "Unknown" |
|
|
301
|
+
| Reconciliation Status | Select (add options after import) | Convert to Select, add options: "Reconciled", "Needs Review", "Unreconciled", "Unknown" |
|
|
302
|
+
| Data Quality Status | Select (add options after import) | Convert to Select, add options: "Complete", "Incomplete", "Needs Review", "Blocked" |
|
|
303
|
+
| Reviewed By | Text | Leave as Text |
|
|
304
|
+
| Status | Select (add options after import) | Convert to Select, add options: "Not started", "In progress", "Blocked", "Done", "Cancelled" |
|
|
305
|
+
| Notes | Text | Leave as Text |
|
|
306
|
+
| Cycle Analysis ID | Text (preserve source ID) | Keep imported IDs as Text; optionally add a separate Unique ID property |
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
The rows above are documentation examples only. Emit empty templates unless the user explicitly requests examples. Money stays `currency`, dates stay `date`, and
|
|
310
|
+
anything pointing at another table stays `relation`.
|
|
311
|
+
|
|
312
|
+
### Dataset 2 - Invoice/Bill Aging Detail
|
|
313
|
+
|
|
314
|
+
One record per invoice or supplier bill, and the only place a single `Aging Bucket` belongs. Its
|
|
315
|
+
CSV header is the Field column below in order; its JSON Schema mirrors the SQL column; its Notion
|
|
316
|
+
mapping mirrors the Notion column. Where the business already uses its own buckets, keep the
|
|
317
|
+
business's buckets and rename the columns to match rather than forcing these.
|
|
318
|
+
|
|
319
|
+
| Field | Type | SQL | JSON Schema | Notion |
|
|
320
|
+
|---|---|---|---|---|
|
|
321
|
+
| Aging Detail ID | `id` | `SERIAL PRIMARY KEY` | `integer` | Text (preserve source ID) |
|
|
322
|
+
| Party Type | `select` | `VARCHAR(100)` | `string` | Select (add options after import) |
|
|
323
|
+
| Party Name | `text` | `VARCHAR(255)` | `string` | Text |
|
|
324
|
+
| Invoice/Bill Number | `text` | `VARCHAR(255)` | `string` | Text |
|
|
325
|
+
| Invoice/Bill Date | `date` | `DATE` | `string, format: date` | Date |
|
|
326
|
+
| Due Date | `date` | `DATE` | `string, format: date` | Date |
|
|
327
|
+
| Original Amount | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) |
|
|
328
|
+
| Settled Amount | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) |
|
|
329
|
+
| Outstanding Amount | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) |
|
|
330
|
+
| Settlement Date | `date` | `DATE` | `string, format: date` | Date |
|
|
331
|
+
| Days Overdue | `number` | `NUMERIC` | `number` | Number |
|
|
332
|
+
| Aging Bucket | `select` | `VARCHAR(100)` | `string` | Select (add options after import) |
|
|
333
|
+
| Period End | `date` | `DATE` | `string, format: date` | Date |
|
|
334
|
+
| Notes | `long_text` | `TEXT` | `string` | Text |
|
|
335
|
+
|
|
336
|
+
`Party Type` options as above. `Aging Bucket` starting set: `Current`, `0-30 days`, `31-60 days`,
|
|
337
|
+
`61-90 days`, `91-180 days`, `180+ days`, `Unknown`.
|
|
338
|
+
|
|
339
|
+
`Days Overdue = Period End - Due Date`. Zero or negative is `Current`; 1-30 is `0-30 days`; 31-60
|
|
340
|
+
is `31-60 days`; 61-90 is `61-90 days`; 91-180 is `91-180 days`; 181 and above is `180+ days`. A
|
|
341
|
+
`Due Date` that is not recorded leaves `Days Overdue` and `Aging Bucket` as `Unknown`. Do not guess
|
|
342
|
+
a due date from payment terms - a term is the agreement, the due date is a fact about this
|
|
343
|
+
invoice, and reconstructing it produces an aging profile that looks measured and is not.
|
|
344
|
+
|
|
345
|
+
`Outstanding Amount = Original Amount - Settled Amount`. Where a part-payment has been received,
|
|
346
|
+
`Settlement Date` is the date of the **final** settlement and the day count is the weighted
|
|
347
|
+
settlement calculation below.
|
|
348
|
+
|
|
349
|
+
```sql
|
|
350
|
+
-- Engine assumption: PostgreSQL, as above.
|
|
351
|
+
CREATE TABLE credit_cycle_aging_detail (
|
|
352
|
+
aging_detail_id SERIAL PRIMARY KEY,
|
|
353
|
+
party_type VARCHAR(100) NOT NULL,
|
|
354
|
+
party_name VARCHAR(255),
|
|
355
|
+
invoice_bill_number VARCHAR(255),
|
|
356
|
+
invoice_bill_date DATE,
|
|
357
|
+
due_date DATE,
|
|
358
|
+
original_amount NUMERIC(14,2),
|
|
359
|
+
settled_amount NUMERIC(14,2),
|
|
360
|
+
outstanding_amount NUMERIC(14,2),
|
|
361
|
+
settlement_date DATE,
|
|
362
|
+
days_overdue NUMERIC,
|
|
363
|
+
aging_bucket VARCHAR(100),
|
|
364
|
+
period_end DATE,
|
|
365
|
+
notes TEXT,
|
|
366
|
+
created_at TIMESTAMP DEFAULT NOW(),
|
|
367
|
+
updated_at TIMESTAMP DEFAULT NOW(),
|
|
368
|
+
CONSTRAINT credit_cycle_aging_money_non_negative CHECK (
|
|
369
|
+
original_amount >= 0
|
|
370
|
+
AND settled_amount >= 0
|
|
371
|
+
AND outstanding_amount >= 0)
|
|
372
|
+
);
|
|
373
|
+
|
|
374
|
+
CREATE INDEX idx_credit_cycle_aging_detail_bucket ON credit_cycle_aging_detail (aging_bucket);
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Dataset 3 - Working-Capital Comparison
|
|
378
|
+
|
|
379
|
+
One record per reporting period, and the only place the two sides are subtracted. Its CSV header
|
|
380
|
+
is the Field column below in order; its JSON Schema mirrors the SQL column; its Notion mapping
|
|
381
|
+
mirrors the Notion column.
|
|
382
|
+
|
|
383
|
+
| Field | Type | SQL | JSON Schema | Notion |
|
|
384
|
+
|---|---|---|---|---|
|
|
385
|
+
| Comparison ID | `id` | `SERIAL PRIMARY KEY` | `integer` | Text (preserve source ID) |
|
|
386
|
+
| Period Start | `date` | `DATE` | `string, format: date` | Date |
|
|
387
|
+
| Period End | `date` | `DATE` | `string, format: date` | Date |
|
|
388
|
+
| Debtor Collection Days | `number` | `NUMERIC` | `number` | Number |
|
|
389
|
+
| Creditor Payment Days | `number` | `NUMERIC` | `number` | Number |
|
|
390
|
+
| Cycle Gap Days | `number` | `NUMERIC` | `number` | Number |
|
|
391
|
+
| Relevant Daily Credit Movement | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) |
|
|
392
|
+
| Estimated Working-Capital Funding | `currency` | `NUMERIC(14,2)` | `number` | Number (format: currency) |
|
|
393
|
+
| Calculation Basis | `text` | `VARCHAR(255)` | `string` | Text |
|
|
394
|
+
| Data Quality Status | `select` | `VARCHAR(100)` | `string` | Select (add options after import) |
|
|
395
|
+
| Cycle Trend | `select` | `VARCHAR(100)` | `string` | Select (add options after import) |
|
|
396
|
+
| Reviewed By | `text` | `VARCHAR(255)` | `string` | Text |
|
|
397
|
+
| Status | `select` | `VARCHAR(100)` | `string` | Select (add options after import) |
|
|
398
|
+
| Notes | `long_text` | `TEXT` | `string` | Text |
|
|
399
|
+
|
|
400
|
+
`Data Quality Status`, `Cycle Trend` and `Status` take the option lists above.
|
|
401
|
+
|
|
402
|
+
`Cycle Gap Days = Debtor Collection Days - Creditor Payment Days`, read descriptively only. A
|
|
403
|
+
positive gap is not automatically bad; the module does not call it bad, and it does not recommend
|
|
404
|
+
a change of terms, a change of supplier or a new facility. `Cycle Gap Days` and
|
|
405
|
+
`Estimated Working-Capital Funding` are both optional, because either side of the comparison can
|
|
406
|
+
legitimately be `Unknown`.
|
|
407
|
+
|
|
408
|
+
`Estimated Working-Capital Funding = Cycle Gap Days x Relevant Daily Credit Movement` **only** when
|
|
409
|
+
a monetary basis exists. `Calculation Basis` is never optional on a row that carries the estimate,
|
|
410
|
+
and it names the basis in words - for example "relevant annual credit movement divided by 365",
|
|
411
|
+
together with which annual figure was chosen and why. With no monetary basis, the estimate is
|
|
412
|
+
`Unknown` and `Calculation Basis` says why.
|
|
413
|
+
|
|
414
|
+
```sql
|
|
415
|
+
-- Engine assumption: PostgreSQL, as above.
|
|
416
|
+
CREATE TABLE credit_cycle_working_capital_comparison (
|
|
417
|
+
comparison_id SERIAL PRIMARY KEY,
|
|
418
|
+
period_start DATE NOT NULL,
|
|
419
|
+
period_end DATE NOT NULL,
|
|
420
|
+
debtor_collection_days NUMERIC,
|
|
421
|
+
creditor_payment_days NUMERIC,
|
|
422
|
+
cycle_gap_days NUMERIC,
|
|
423
|
+
relevant_daily_credit_movement NUMERIC(14,2),
|
|
424
|
+
estimated_working_capital_funding NUMERIC(14,2),
|
|
425
|
+
calculation_basis VARCHAR(255),
|
|
426
|
+
data_quality_status VARCHAR(100) NOT NULL,
|
|
427
|
+
cycle_trend VARCHAR(100) NOT NULL,
|
|
428
|
+
reviewed_by VARCHAR(255),
|
|
429
|
+
status VARCHAR(100) NOT NULL,
|
|
430
|
+
notes TEXT,
|
|
431
|
+
created_at TIMESTAMP DEFAULT NOW(),
|
|
432
|
+
updated_at TIMESTAMP DEFAULT NOW(),
|
|
433
|
+
CONSTRAINT credit_cycle_comparison_period_order CHECK (
|
|
434
|
+
period_start <= period_end)
|
|
435
|
+
);
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
### How the day counts are calculated
|
|
439
|
+
|
|
440
|
+
Every calculated cycle metric states its source dates, its formula, its settlement treatment, its
|
|
441
|
+
partial-payment treatment, and whether it is exact or estimated. `Measurement Basis` on the
|
|
442
|
+
summary row and `Notes` on the detail row are where that record lives.
|
|
443
|
+
|
|
444
|
+
**Actual cycle, preferred invoice-level basis:**
|
|
445
|
+
|
|
446
|
+
```
|
|
447
|
+
Actual Days = Settlement Date - Invoice/Bill Date
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
**Partial payments.** Where an invoice is settled in more than one payment, use the weighted
|
|
451
|
+
settlement calculation and record that this is what was used:
|
|
452
|
+
|
|
453
|
+
```
|
|
454
|
+
Weighted Settlement Date =
|
|
455
|
+
SUM (Settled Amount_i x Settlement Date_i) / SUM (Settled Amount_i)
|
|
456
|
+
|
|
457
|
+
Weighted Days = Weighted Settlement Date - Invoice/Bill Date
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
`Weighted Days` on the party-period row is the average of the invoice-level weighted day counts
|
|
461
|
+
for that party in that period, and `Measurement Basis` says so. The plain
|
|
462
|
+
`Actual Collection/Payment Days` on the same row is the unweighted mean, and it is left `Unknown`
|
|
463
|
+
where the weighted figure is the one that was calculated. Both figures on one row, with the basis
|
|
464
|
+
named, is the honest answer; a single number that is quietly one or the other is not.
|
|
465
|
+
|
|
466
|
+
Where the business uses a different documented basis, that basis is used instead - and it is
|
|
467
|
+
written into `Measurement Basis`. The basis is never assumed.
|
|
468
|
+
|
|
469
|
+
**Where the required dates do not exist**, `Actual Collection/Payment Days` is `Unknown`. It is not
|
|
470
|
+
filled with the contractual terms, and it is not filled with zero.
|
|
471
|
+
|
|
472
|
+
**Trend.** `Cycle Trend` compares the current actual cycle with the previous comparable period.
|
|
473
|
+
Starting set: `Improving`, `Stable`, `Deteriorating`, `Unknown`. With no comparable prior period
|
|
474
|
+
the value is `Unknown`. A trend is never inferred from a single period, and a direction is never
|
|
475
|
+
assigned because the number looks uncomfortable.
|
|
476
|
+
|
|
477
|
+
**Reconciliation and data quality, before a record is complete.** Check the balance identity; check
|
|
478
|
+
`Period Start` is not after `Period End`; check that the dates each calculated cycle metric needs
|
|
479
|
+
actually exist; check that due dates exist for every line being aged; check that the monetary
|
|
480
|
+
values are valid; check that part-settlements are handled rather than ignored; check that the
|
|
481
|
+
debtor and creditor cycles were measured on comparable definitions; check that a customer
|
|
482
|
+
utilisation figure has a customer credit limit behind it; check that any working-capital funding
|
|
483
|
+
figure has a documented monetary basis. Record the outcome:
|
|
484
|
+
|
|
485
|
+
```
|
|
486
|
+
Reconciliation Status: Reconciled | Needs Review | Unreconciled | Unknown
|
|
487
|
+
Data Quality Status: Complete | Incomplete | Needs Review | Blocked
|
|
488
|
+
Status: Not started | In progress | Blocked | Done | Cancelled
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
A record must not be `Done` while a required reconciliation or calculation check fails. A
|
|
492
|
+
difference is recorded and marked, never corrected to make the row tie out. Missing information is
|
|
493
|
+
never represented as zero.
|
|
494
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Credit Cycle Analysis: Security Notes
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
- Never fill in real customer or supplier names, balances, invoice numbers or bank details.
|
|
5
|
+
Placeholders only.
|
|
6
|
+
- Label example rows as synthetic, and keep bank and payment references masked.
|
|
7
|
+
- Local reads, generation commands, and validation are part of a requested artifact build.
|
|
8
|
+
External writes, messages, provisioning, and publication require authorization for that
|
|
9
|
+
action and target; existing explicit authorization does not need to be repeated.
|
|
10
|
+
- If the user pastes a real ledger extract, generate the template and tell them to delete the
|
|
11
|
+
pasted data from the conversation.
|
|
12
|
+
- A cycle analysis names customers and suppliers alongside how badly each one is paying. Treat it
|
|
13
|
+
as commercially sensitive and keep it inside the finance function.
|
|
14
|
+
- Privacy, legal and disciplinary cases need a qualified human reviewer before anything is acted
|
|
15
|
+
on.
|
|
16
|
+
|