@1aboveio/skills 1.0.10 → 1.0.12

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.
Files changed (214) hide show
  1. package/.codex-plugin/plugin.json +1 -1
  2. package/.codex-plugin/resources.json +298 -216
  3. package/README.md +3 -3
  4. package/package.json +10 -8
  5. package/skills/app-dev/airflow/SKILL.md +1 -1
  6. package/skills/app-dev/android-foundation/SKILL.md +35 -37
  7. package/skills/app-dev/android-foundation/references/delivery-focus.md +4 -2
  8. package/skills/app-dev/android-foundation/references/feature-work.md +50 -0
  9. package/skills/app-dev/android-foundation/references/setup.md +24 -9
  10. package/skills/app-dev/android-foundation/references/workspace.md +81 -0
  11. package/skills/app-dev/android-foundation/scripts/workspace-runtime/bin/workspaces.mjs +52 -0
  12. package/skills/app-dev/android-foundation/scripts/workspace-runtime/native-workspace.mjs +239 -0
  13. package/skills/app-dev/android-foundation/scripts/workspace-runtime/workspace-lifecycle.mjs +2154 -0
  14. package/skills/app-dev/app-debug/SKILL.md +1 -1
  15. package/skills/app-dev/better-auth/SKILL.md +1 -1
  16. package/skills/app-dev/data-catalog/SKILL.md +1 -1
  17. package/skills/app-dev/data-quality/SKILL.md +1 -1
  18. package/skills/app-dev/ios-foundation/SKILL.md +15 -10
  19. package/skills/app-dev/ios-foundation/references/setup.md +25 -9
  20. package/skills/app-dev/ios-foundation/references/workspace.md +82 -0
  21. package/skills/app-dev/ios-foundation/scripts/workspace-runtime/bin/workspaces.mjs +52 -0
  22. package/skills/app-dev/ios-foundation/scripts/workspace-runtime/native-workspace.mjs +239 -0
  23. package/skills/app-dev/ios-foundation/scripts/workspace-runtime/workspace-lifecycle.mjs +2154 -0
  24. package/skills/app-dev/monorepo/SKILL.md +1 -1
  25. package/skills/app-dev/nextjs-fullstack/SKILL.md +1 -1
  26. package/skills/app-dev/prisma-setup/SKILL.md +1 -1
  27. package/skills/app-dev/pyspark/SKILL.md +1 -1
  28. package/skills/app-dev/python-backend/SKILL.md +1 -1
  29. package/skills/app-dev/shadcn/SKILL.md +1 -1
  30. package/skills/app-dev/zod-v4/SKILL.md +1 -1
  31. package/skills/cicd/cloud-build/SKILL.md +1 -1
  32. package/skills/cicd/cloud-debug/SKILL.md +1 -1
  33. package/skills/cicd/cloud-deploy/SKILL.md +1 -1
  34. package/skills/cicd/docker/SKILL.md +1 -1
  35. package/skills/cicd/github-actions/SKILL.md +1 -1
  36. package/skills/cicd/github-flow/SKILL.md +1 -1
  37. package/skills/cicd/google-cloud/SKILL.md +1 -1
  38. package/skills/cicd/mergify/SKILL.md +1 -1
  39. package/skills/cicd/podman/SKILL.md +1 -1
  40. package/skills/content/article-review/SKILL.md +1 -1
  41. package/skills/content/article-to-image/SKILL.md +1 -1
  42. package/skills/content/flowchart-svg/SKILL.md +1 -1
  43. package/skills/content/image-gen/SKILL.md +1 -1
  44. package/skills/content/mermaid/SKILL.md +1 -1
  45. package/skills/content/wechat-article-writer/SKILL.md +1 -1
  46. package/skills/content/wechat-publisher/SKILL.md +1 -1
  47. package/skills/content/wechat-search/SKILL.md +1 -1
  48. package/skills/content/xai-search/SKILL.md +1 -1
  49. package/skills/core/distill-writing/SKILL.md +3 -3
  50. package/skills/core/distill-writing/references/extraction.md +1 -1
  51. package/skills/core/doc-to-md/SKILL.md +1 -1
  52. package/skills/core/editorial-review/SKILL.md +82 -12
  53. package/skills/core/editorial-review/references/checklist.md +26 -1
  54. package/skills/core/house-style/SKILL.md +8 -3
  55. package/skills/core/house-style/references/analytical-reporting.md +123 -0
  56. package/skills/core/house-style/references/analytical-writing-patterns.md +79 -0
  57. package/skills/core/house-style/references/analytical-writing-research.md +129 -0
  58. package/skills/core/{write-doc → house-style}/references/bilingual.md +7 -5
  59. package/skills/core/house-style/references/definitions-and-metrics.md +86 -0
  60. package/skills/core/house-style/references/document-workflow.md +193 -0
  61. package/skills/core/house-style/references/initialization.md +66 -0
  62. package/skills/core/house-style/references/persistence.md +9 -4
  63. package/skills/core/house-style/references/rules.md +11 -4
  64. package/skills/core/house-style/scripts/init-guidance.mjs +213 -0
  65. package/skills/core/house-style/templates/analytical-report.md +54 -0
  66. package/skills/core/house-style/templates/gap-analysis.md +1 -1
  67. package/skills/core/plain-language/SKILL.md +2 -2
  68. package/skills/core/polish-cn/SKILL.md +9 -2
  69. package/skills/core/reg-parser/SKILL.md +3 -3
  70. package/skills/core/terminology/SKILL.md +8 -4
  71. package/skills/core/write-doc/SKILL.md +40 -151
  72. package/skills/core/write-report/SKILL.md +129 -0
  73. package/skills/core/{write-doc → write-report}/references/compliance-reports.md +4 -4
  74. package/skills/engineering/better-review/SKILL.md +37 -37
  75. package/skills/engineering/better-review/references/passes.md +35 -41
  76. package/skills/engineering/better-review/references/result.md +10 -9
  77. package/skills/engineering/e2e-test/SKILL.md +17 -17
  78. package/skills/engineering/e2e-test/references/authoring/playwright-config.md +11 -13
  79. package/skills/engineering/e2e-test/references/presentation-sweep.md +7 -7
  80. package/skills/engineering/e2e-test/references/reviewing.md +9 -11
  81. package/skills/engineering/e2e-test/references/route-manifest.md +1 -1
  82. package/skills/engineering/engineering/SKILL.md +201 -0
  83. package/skills/engineering/engineering/references/engineering-conventions.md +32 -0
  84. package/skills/engineering/engineering/references/feature-delivery.md +8 -0
  85. package/skills/engineering/engineering/references/init-scope.md +45 -0
  86. package/skills/engineering/engineering/references/scope-management.md +85 -0
  87. package/skills/engineering/engineering/scripts/init.mjs +160 -0
  88. package/skills/engineering/{contributing → engineering}/scripts/persist-conventions.mjs +1 -1
  89. package/skills/engineering/engineering-runtime/SKILL.md +1 -1
  90. package/skills/engineering/engineering-runtime/coherence/workflow.json +19 -19
  91. package/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +1 -1
  92. package/skills/engineering/ensure-coverage/SKILL.md +22 -109
  93. package/skills/engineering/ensure-coverage/references/breadth/coverage-ledger.md +7 -5
  94. package/skills/engineering/ensure-coverage/references/breadth/surface-baseline.md +4 -4
  95. package/skills/engineering/ensure-coverage/references/breadth/surface-discovery.md +3 -3
  96. package/skills/engineering/ensure-coverage/references/depth/characterization.md +4 -65
  97. package/skills/engineering/ensure-coverage/references/depth/grading.md +5 -7
  98. package/skills/engineering/ensure-coverage/references/depth/mock-policy.md +6 -12
  99. package/skills/engineering/ensure-coverage/references/enforcement/ci-contract.md +1 -1
  100. package/skills/engineering/ensure-coverage/references/presentation/axis.md +6 -6
  101. package/skills/engineering/ensure-coverage/references/process/audit-mode.md +7 -23
  102. package/skills/engineering/ensure-coverage/references/process/output-template.md +18 -133
  103. package/skills/engineering/ensure-coverage/references/process/test-strategy.md +7 -12
  104. package/skills/engineering/ensure-coverage/scripts/README.md +12 -4
  105. package/skills/engineering/golden-path/SKILL.md +1 -1
  106. package/skills/engineering/harness-runtime/SKILL.md +3 -1
  107. package/skills/engineering/harness-runtime/bin/workspaces.mjs +52 -0
  108. package/skills/engineering/harness-runtime/native-workspace.mjs +239 -0
  109. package/skills/engineering/harness-runtime/references/workspaces.md +78 -0
  110. package/skills/engineering/harness-runtime/workspace-lifecycle.mjs +2154 -0
  111. package/skills/engineering/resolve-issues/SKILL.md +40 -61
  112. package/skills/engineering/resolve-issues/references/ci.md +13 -3
  113. package/skills/engineering/resolve-issues/references/delivery-progress.md +4 -3
  114. package/skills/engineering/resolve-issues/references/done.md +11 -2
  115. package/skills/engineering/resolve-issues/references/expire.md +9 -2
  116. package/skills/engineering/resolve-issues/references/implementation.md +33 -17
  117. package/skills/engineering/resolve-issues/references/preflight.md +3 -1
  118. package/skills/engineering/resolve-issues/references/principles.md +52 -0
  119. package/skills/engineering/resolve-issues/references/review.md +25 -15
  120. package/skills/engineering/resolve-issues/references/task-plan.md +64 -27
  121. package/skills/engineering/resolve-issues/references/workspaces.md +164 -0
  122. package/skills/engineering/resolve-issues/scripts/cleanup-runs.mjs +185 -317
  123. package/skills/engineering/resolve-issues/scripts/next-actions.mjs +44 -7
  124. package/skills/engineering/resolve-issues/scripts/rehydrate.mjs +36 -2
  125. package/skills/engineering/resolve-issues/scripts/review-verdict.mjs +9 -8
  126. package/skills/engineering/resolve-issues/scripts/workspace-lifecycle.mjs +1 -0
  127. package/skills/engineering/resolve-release/SKILL.md +1 -1
  128. package/skills/engineering/rush-issues/SKILL.md +7 -5
  129. package/skills/engineering/rush-release/SKILL.md +1 -1
  130. package/skills/engineering/test-quality/SKILL.md +19 -4
  131. package/skills/engineering/test-quality/references/lint.md +1 -1
  132. package/skills/engineering/test-quality/references/principles.md +2 -2
  133. package/skills/engineering/test-quality/references/testing-conventions.md +1 -1
  134. package/skills/risk-compliance/compliance-audit/SKILL.md +4 -8
  135. package/skills/risk-compliance/compliance-audit/references/audience-and-reports.md +12 -0
  136. package/skills/risk-compliance/contract-compare/SKILL.md +17 -1
  137. package/skills/risk-compliance/contract-review/SKILL.md +6 -1
  138. package/skills/risk-compliance/contract-review/references/report-stage.md +17 -0
  139. package/skills/risk-compliance/doc-authenticity/SKILL.md +11 -1
  140. package/skills/risk-compliance/fraud-detection/LICENSE +3 -0
  141. package/skills/risk-compliance/fraud-detection/SKILL.md +148 -0
  142. package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/archetypes/first-party-fraud.md +3 -2
  143. package/skills/risk-compliance/fraud-detection/references/archetypes/third-party-fraud.md +47 -0
  144. package/skills/risk-compliance/fraud-detection/references/collection-payout-features.md +151 -0
  145. package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/contexts/bank-transfer.md +4 -3
  146. package/skills/risk-compliance/fraud-detection/references/contexts/card-payment.md +70 -0
  147. package/skills/risk-compliance/fraud-detection/references/contexts/payment-collection.md +34 -0
  148. package/skills/risk-compliance/fraud-detection/references/contexts/payout.md +34 -0
  149. package/skills/risk-compliance/fraud-detection/references/enrichment.md +74 -0
  150. package/skills/risk-compliance/fraud-detection/references/entities.md +48 -0
  151. package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/feature-engineering.md +69 -33
  152. package/skills/risk-compliance/fraud-detection/references/feature-sql.md +150 -0
  153. package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/report-rationale.md +4 -2
  154. package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/report-template.md +45 -23
  155. package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/review-checklist.md +60 -20
  156. package/skills/risk-compliance/fraud-detection/references/workflow.md +216 -0
  157. package/skills/risk-compliance/fraud-detection/release-check.mjs +95 -0
  158. package/skills/risk-compliance/payment-analysis/SKILL.md +36 -17
  159. package/skills/risk-compliance/payment-analysis/references/auth-rate-actions.md +2 -2
  160. package/skills/risk-compliance/payment-analysis/references/report-template.md +10 -2
  161. package/skills/risk-compliance/payment-analysis/references/visualization.md +11 -1
  162. package/skills/risk-compliance/portfolio-payment-analysis/LICENSE +3 -0
  163. package/skills/risk-compliance/portfolio-payment-analysis/SKILL.md +170 -0
  164. package/skills/risk-compliance/portfolio-payment-analysis/references/identity-and-reconciliation.md +46 -0
  165. package/skills/risk-compliance/portfolio-payment-analysis/references/metrics-and-reporting.md +170 -0
  166. package/skills/risk-compliance/portfolio-payment-analysis/references/risk-history.md +89 -0
  167. package/skills/risk-compliance/portfolio-payment-analysis/release-check.mjs +95 -0
  168. package/skills/risk-compliance/portfolio-payment-analysis/scripts/analyze.py +636 -0
  169. package/skills/risk-compliance/portfolio-payment-analysis/scripts/build_report.py +386 -0
  170. package/skills/risk-compliance/portfolio-payment-analysis/scripts/comparison_charts.py +425 -0
  171. package/skills/risk-compliance/portfolio-payment-analysis/scripts/csv_export.py +52 -0
  172. package/skills/risk-compliance/portfolio-payment-analysis/scripts/render.py +160 -0
  173. package/skills/risk-compliance/portfolio-payment-analysis/scripts/risk_history.py +435 -0
  174. package/skills/risk-compliance/similar-domain/SKILL.md +9 -4
  175. package/skills/risk-compliance/tld-detection/SKILL.md +124 -239
  176. package/skills/risk-compliance/tld-detection/agents/openai.yaml +1 -1
  177. package/skills/risk-compliance/tld-detection/references/clean.md +18 -51
  178. package/skills/risk-compliance/tld-detection/references/fx-conversion.md +56 -219
  179. package/skills/risk-compliance/tld-detection/references/metric-contract.md +109 -0
  180. package/skills/risk-compliance/tld-detection/references/pattern.md +99 -0
  181. package/skills/risk-compliance/tld-detection/references/report-template.md +49 -272
  182. package/skills/risk-compliance/tld-detection/scripts/detect_ladders.py +46 -13
  183. package/skills/risk-compliance/tld-detection/scripts/detect_patterns.py +346 -0
  184. package/skills/risk-compliance/tld-detection/scripts/detect_streams.py +51 -19
  185. package/skills/risk-compliance/tld-detection/scripts/profile_groups.py +109 -0
  186. package/skills/risk-compliance/tld-detection/scripts/render_charts.py +218 -0
  187. package/skills/risk-compliance/tld-detection/scripts/tld_common.py +243 -0
  188. package/skills/engineering/contributing/SKILL.md +0 -70
  189. package/skills/risk-compliance/fraud-analysis/SKILL.md +0 -114
  190. package/skills/risk-compliance/fraud-analysis/references/archetypes/third-party-fraud.md +0 -27
  191. package/skills/risk-compliance/fraud-analysis/references/contexts/card-payment.md +0 -30
  192. package/skills/risk-compliance/fraud-analysis/references/contexts/payment-collection.md +0 -20
  193. package/skills/risk-compliance/fraud-analysis/references/contexts/payout.md +0 -20
  194. package/skills/risk-compliance/fraud-analysis/references/workflow.md +0 -175
  195. package/skills/risk-compliance/tld-detection/references/chinese-polish.md +0 -55
  196. package/skills/risk-compliance/tld-detection/references/clustering.md +0 -235
  197. package/skills/risk-compliance/tld-detection/references/decision.md +0 -189
  198. package/skills/risk-compliance/tld-detection/references/streams.md +0 -141
  199. package/skills/risk-compliance/tld-detection/references/terminology.md +0 -95
  200. package/skills/risk-compliance/tld-detection/references/workflow.md +0 -95
  201. /package/skills/{engineering/contributing → core/write-report}/LICENSE +0 -0
  202. /package/skills/core/{write-doc → write-report}/references/reports/audit-report-template.md +0 -0
  203. /package/skills/core/{write-doc → write-report}/references/reports/external-assessment-template.md +0 -0
  204. /package/skills/core/{write-doc → write-report}/references/reports/management-report-template.md +0 -0
  205. /package/skills/core/{write-doc → write-report}/references/reports/vars-report-template.md +0 -0
  206. /package/skills/{engineering/contributing → core/write-report}/release-check.mjs +0 -0
  207. /package/skills/{risk-compliance/fraud-analysis → engineering/engineering}/LICENSE +0 -0
  208. /package/skills/engineering/{contributing → engineering}/references/tracker-conventions.md +0 -0
  209. /package/skills/{risk-compliance/fraud-analysis → engineering/engineering}/release-check.mjs +0 -0
  210. /package/skills/engineering/{contributing → engineering}/scripts/persist-conventions-core.mjs +0 -0
  211. /package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/archetypes/authorized-payment-scam.md +0 -0
  212. /package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/mechanisms/account-takeover.md +0 -0
  213. /package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/taxonomy.md +0 -0
  214. /package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/terminology.md +0 -0
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: fraud-detection
3
+ description: >
4
+ Rapidly discover interpretable transaction-level fraud detection rules from
5
+ tabular payment, transfer, collection, payout, account, or fraud-case data
6
+ (CSV, XLSX, TXT).
7
+ Supports third-party fraud (including stolen credentials and account takeover),
8
+ first-party fraud or deliberate account abuse, and authorized payment scams
9
+ (including APP scams), across card payments, collections, bank transfers, and
10
+ payouts. Supports rapid rule discovery, evidence-qualified metrics,
11
+ domain-appropriate actions, strategy
12
+ impact, and a business report. Use for fraud, scam, mule, account-takeover,
13
+ chargeback, dispute, transfer, collection, or payout risk analysis even when the
14
+ user does not name this skill.
15
+ release-version: 0.45.1
16
+ ---
17
+ **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
18
+ # Fraud Detection
19
+
20
+ Analyze fraud through composable dimensions rather than treating every case as
21
+ card fraud:
22
+
23
+ - **Archetype** — the genuine customer's relationship to the fraud
24
+ - **Mechanism** — how compromise, deception, or abuse occurred
25
+ - **Context** — the product or money-movement surface where a rule fires
26
+
27
+ Run this **10-step** loop:
28
+
29
+ 0. Pre-flight → 1. Profile → 2. Label → 3. Evidence basis → 4. Engineer features →
30
+ 5. Shortlist → 6. Score rules → 7. Map actions + packages → 8. Write report →
31
+ 9. Review
32
+
33
+ **Produce:** operable rules and portfolio impact in a business report.
34
+ **Do not produce:** a black-box model as the main answer. Design and evaluate
35
+ rules; do not deploy or operate a live detection engine.
36
+
37
+ ## Foundational contract
38
+
39
+ - Score one transaction at a declared decision point; retain every applicable
40
+ rule hit. A transaction may trigger zero, one, or several rules.
41
+ - Real-time features combine the current transaction with history available to
42
+ the detector. Include the current transaction in velocity by default.
43
+ - Transaction-triggered rolling aggregates are real-time features. Completed
44
+ entity/period summaries are post-transaction review, not real-time rules.
45
+ - Discover rules rapidly from recent transactions without requiring a
46
+ train/test/holdout split. State the evidence and limits of each metric.
47
+ - Keep the core generic. Load selected domain references for expert candidate
48
+ patterns, not universal diagnoses, mandatory features, or thresholds.
49
+
50
+ > Paths under `references/` are relative to this skill directory. Step detail:
51
+ > [references/workflow.md](references/workflow.md).
52
+
53
+ ## Required references
54
+
55
+ | File | When |
56
+ |---|---|
57
+ | [references/workflow.md](references/workflow.md) | Every step — full procedure |
58
+ | [references/taxonomy.md](references/taxonomy.md) | Step 1; select archetype, mechanism, and context |
59
+ | [references/entities.md](references/entities.md) | Pre-flight and Step 4; entity definitions and matching |
60
+ | [references/enrichment.md](references/enrichment.md) | Pre-flight and Step 4; BIN, IP, FX, phone, bank-account, and ID-document readiness |
61
+ | [references/feature-sql.md](references/feature-sql.md) | Step 4; executable SQL and standard rolling windows |
62
+ | [references/feature-engineering.md](references/feature-engineering.md) | Step 4; shared decision-time rules |
63
+ | [references/report-template.md](references/report-template.md) | Step 8; common report contract and overlay selection |
64
+ | [references/terminology.md](references/terminology.md) | Step 8; fixed terms and language proofread |
65
+ | [references/review-checklist.md](references/review-checklist.md) | Step 9; common and selected-profile checks |
66
+
67
+ After Step 1, read only the selected profile references:
68
+
69
+ | Dimension | References |
70
+ |---|---|
71
+ | Archetype | `references/archetypes/<archetype>.md` |
72
+ | Mechanism | `references/mechanisms/<mechanism>.md` when present |
73
+ | Context | `references/contexts/<context>.md` for every selected context |
74
+
75
+ Read [references/collection-payout-features.md](references/collection-payout-features.md)
76
+ for collection/payout features and review: event sequences, FIFO fund lots, and
77
+ counterparty velocity. This is domain guidance across archetypes, not evidence
78
+ that every rapid flow is knowing abuse.
79
+
80
+ Current packs: archetypes `third-party-fraud`, `first-party-fraud`,
81
+ `authorized-payment-scam`; mechanism `account-takeover`; contexts
82
+ `card-payment`, `payment-collection`, `bank-transfer`, `payout`.
83
+
84
+ ## Progress
85
+
86
+ Track a task plan. One item is `in_progress` at a time.
87
+
88
+ 1. Pass pre-flight
89
+ 2. Select analysis profile
90
+ 3. Formalize label
91
+ 4. Declare discovery and scoring evidence
92
+ 5. Engineer candidate features
93
+ 6. Select shortlist
94
+ 7. Score candidate rules
95
+ 8. Map actions and packages
96
+ 9. Write business report and proofread language
97
+ 10. Independent review
98
+
99
+ Suggested notes: `preflight=…`, `profile=…`, `label=…`, `evidence=…`,
100
+ `allowed/excluded=…`, `shortlist=…`, `N rules, recent|retrospective|subsequent`,
101
+ `packages=…`, `report=…`, `verdict=…`.
102
+
103
+ ## Input
104
+
105
+ CSV / XLSX / TXT; optional outcome column. Input may contain transaction,
106
+ event, or case records, but real-time rule scoring is always transaction-level.
107
+ Resolve transaction identity, retries, duplicates, and lifecycle updates first.
108
+ Other events can supply context; entity/case summaries belong to review.
109
+
110
+ ## Workflow
111
+
112
+ Follow [references/workflow.md](references/workflow.md) for each step. The map:
113
+
114
+ | Step | Do | Gate |
115
+ |---|---|---|
116
+ | 0 Pre-flight | Transaction, entity, enrichment, and label readiness | Missing inputs block affected features or metrics, not all discovery |
117
+ | 1 Profile | Archetype + mechanism(s) + context(s) from taxonomy | Read selected packs before Step 2 |
118
+ | 2 Label | Formalize known positives / negatives / unlabeled | Do not invent negative labels or unsupported metrics |
119
+ | 3 Evidence | Declare discovery/scoring windows and selection overlap | Temporal validation is optional |
120
+ | 4 Features | Engineer transaction-triggered candidates | Current transaction included; no future information |
121
+ | 5 Shortlist | Support / known fraud caught / reach / operability | Explain hypotheses and benign alternatives |
122
+ | 6 Score | occurrence → precision → recall when supported | Name evidence basis and denominators |
123
+ | 7 Actions | Map to context packs + strategy packages | Freeze packages before report |
124
+ | 8 Report | Business report per template; grep terminology banned strings | No review process in the file |
125
+ | 9 Review | Checklist + selected packs | Prefer fresh independent reviewer |
126
+
127
+ ## Output contract
128
+
129
+ | Item | Requirement |
130
+ |---|---|
131
+ | Analysis profile | Archetype, role, consent, technical authentication, mechanism, context, confidence, grain, decision point |
132
+ | Rule metrics | occurrence → precision → recall where supported; discovery/scoring windows and same-sample selection disclosed |
133
+ | Strategy coverage | Union of triggered transactions: count + rate and amount + share, with currency; overlap and incremental coverage |
134
+ | Domain impact | Measures and denominators from selected context packs only |
135
+ | Uncertainty | Proxy labels, immature outcomes, weak identity links, and unresolved attribution stated |
136
+ | Report file | Business content only; no reviewer model, verdict, or repair log |
137
+
138
+ Steps 0–7 are analysis and its entry gate. Step 8 writes the report. Step 9
139
+ reviews it.
140
+
141
+ For step 8, read `{house-style baseDir}/references/analytical-reporting.md` and its
142
+ required references, then use `{write-report baseDir}/SKILL.md`, passing this skill's
143
+ report template, selected context packs, frozen results and required output artifacts.
144
+ Keep all domain metrics, uncertainty disclosures and step 9 checks; report writing does
145
+ not rerun rule discovery or replace the domain review. If a required skill or reference
146
+ is unavailable, report the blocker instead of claiming the report stage is complete.
147
+ For step 9, give the independent reviewer the shared analytical entrypoint and its
148
+ required references as well as the domain checklist and selected packs.
@@ -14,7 +14,7 @@ claim, knowing mule activity, or another subtype.
14
14
 
15
15
  Do not classify a deceived, coerced, compromised, or merely unusual customer as
16
16
  first-party fraud without evidence of participation. Outcome maturity may extend
17
- beyond transaction settlement and must be reflected in the split.
17
+ beyond transaction settlement and must be reflected in label eligibility.
18
18
 
19
19
  ## Feature families
20
20
 
@@ -39,6 +39,7 @@ from a proxy label alone.
39
39
 
40
40
  - Evidence supports knowing participation rather than victimization.
41
41
  - Mule status is not inferred from transaction shape alone.
42
- - Graph features and linked-entity lists are train-fit and point-in-time.
42
+ - Graph features and linked-entity lists declare their discovery evidence and
43
+ are available at the scored decision.
43
44
  - Account restrictions and reporting recommendations identify policy and legal
44
45
  dependencies.
@@ -0,0 +1,47 @@
1
+ # Archetype: third-party fraud
2
+
3
+ The genuine customer did not consent; an external actor used the customer's
4
+ identity, account, credentials, token, or payment instrument.
5
+
6
+ ## Label guidance
7
+
8
+ Prefer confirmed unauthorized-fraud outcomes. Chargebacks, customer claims,
9
+ issuer codes, account compromise flags, and manual decisions may be proxies;
10
+ state their scope and maturity. Do not treat every decline or dispute as fraud.
11
+
12
+ ## Useful evidence
13
+
14
+ - Instrument, account, customer, device, IP, email, phone, and session history
15
+ - Deviation from the genuine customer's prior behavior
16
+ - New or shared identifiers, credential failures, and compromise events
17
+ - Transaction velocity, retries, beneficiary novelty, and location changes
18
+
19
+ Use only evidence available at the selected decision point. A current response,
20
+ claim, chargeback, or investigation outcome is not a pre-decision feature.
21
+
22
+ ## Velocity-pattern catalog
23
+
24
+ These are hypotheses for transaction-triggered aggregates, not diagnoses, mandatory
25
+ Cartesian combinations or prescribed thresholds. Use only available normalized
26
+ identifiers and the decision-time windows in [feature engineering](../feature-engineering.md);
27
+ include the current transaction. Examine support and benign alternatives before action.
28
+ [Entities](../entities.md) explains weak linkage; [feature SQL](../feature-sql.md)
29
+ shows the eligibility and null rules.
30
+
31
+ | Candidate | What it may suggest | Benign alternatives |
32
+ |---|---|---|
33
+ | One email with multiple distinct PANs | Stolen-card use or card testing | Family purchases, shared mailbox, card replacement |
34
+ | One device fingerprint with multiple distinct PANs | Concentrated stolen-card use or card testing | Shared household device, merchant terminal, fingerprint collision |
35
+ | One IP with multiple distinct emails | Coordinated activity | NAT, workplace, VPN, public Wi-Fi |
36
+ | Same PAN, amount and currency repeated | Split payments, repeated charges, or testing | Customer retry, network timeout, recurring purchases; splitting can also use differing amounts |
37
+ | One PAN with multiple distinct names, with name role explicit | Card testing or identity variation | Authorized users, cardholder name variants, gifts or different shipping recipients |
38
+
39
+ A completed-period entity review can investigate these patterns retrospectively,
40
+ but cannot be substituted for the per-transaction features available at a decision.
41
+
42
+ ## Actions and review
43
+
44
+ Actions depend on context: block or authenticate a card payment; terminate or
45
+ reauthenticate a compromised session; hold/review a transfer or payout; restrict
46
+ an account where policy permits. Review that technical authentication is not
47
+ used as proof of genuine-customer consent.
@@ -0,0 +1,151 @@
1
+ # Collection and payout feature candidates
2
+
3
+ Use at Steps 4 and 9 with the selected context packs and the shared feature,
4
+ entity, enrichment, and review references. These are hypotheses, not diagnoses,
5
+ mandatory features, thresholds, or evidence of a person's role. They apply across
6
+ supported archetypes; retain the selected profile and its attribution confidence.
7
+
8
+ ## Decision-time sequence
9
+
10
+ Score the current collection or payout transaction at its declared real-time
11
+ decision point. Include current in eligible transaction counts and sums. Use only
12
+ prior events and attributes available then, plus current attributes; never use
13
+ current or later outcomes. An example journey is payer receipt → funds available →
14
+ beneficiary setup → payout request. At receipt, a later payout, its completion,
15
+ or its outcome cannot be a feature. At payout, prior known receipts and beneficiary
16
+ setup may be features. Record the event timestamp, availability time, order,
17
+ source, identity links and their confidence. Late-arriving records cannot rewrite
18
+ what the earlier scorer knew. Deduplicate lifecycle updates and duplicate deliveries;
19
+ count retries according to the declared transaction-identity policy.
20
+
21
+ Candidates include time since last available receipt, receipt-to-payout sequences,
22
+ new beneficiary followed by a payout, and number of prior receipts before current.
23
+ Fast movement may also reflect scheduled supplier payments, payroll, or a merchant
24
+ settling its sales. A sequence alone does not establish intent or participation.
25
+
26
+ ## FIFO funding attribution
27
+
28
+ FIFO is an accounting attribution convention for candidate features, not a trace
29
+ of actual money or proof of common ownership or intent. Scope lots to the
30
+ balance-owning ledger account and currency. Use the availability timestamp of
31
+ each eligible incoming receipt, then the actual deterministic order known to the
32
+ ledger for ties. Never pool currencies or invent a tie-break order. If account,
33
+ currency, available balance, receipt availability, or order is unknown, ask for
34
+ the missing semantics and mark affected features unavailable.
35
+
36
+ Reconstruct the state known immediately before the current payout debit, including
37
+ prior committed debits and existing reservations. For the current payout, propose
38
+ an allocation oldest available lot first, consuming partial lots and as many lots
39
+ as needed. This is a preview: do not debit the candidate first and then allocate
40
+ it again. For a release of an existing reservation, include its own reserved lots
41
+ in the preview without allocating them a second time; exclude other reservations.
42
+ Commit or release allocations only according to declared ledger lifecycle rules.
43
+ Rejected or failed attempts before any reservation/debit consume no funds. A
44
+ failure after a committed debit does not restore its lots: keep them consumed
45
+ until an explicit reversal/return entry makes funds available under the declared
46
+ policy. Restore reservations only when the ledger releases them; failure alone
47
+ is not a release. Pending reservations cannot fund another payout. Ask which
48
+ statuses reserve, debit, fail, and release, and when;
49
+ if undefined, leave affected features unavailable rather than guessing. Reconcile
50
+ retries and duplicate events against the same reservation/debit.
51
+
52
+ Reconcile opening balance and known available lots to the ledger. Do not truncate
53
+ FIFO state to a rolling velocity window: old unspent lots can still fund current
54
+ payouts. Carry forward reconciled remaining lots or disclose missing history.
55
+ Report unmatched
56
+ opening balance and unknown or truncated history separately; do not invent source
57
+ lots or treat unknown funding as zero. If ledger balance and reconstructable lots
58
+ differ, expose both the matched and unmatched amounts and ask how the difference
59
+ should be handled. An insufficient balance or incomplete history is not evidence
60
+ of fraud. FX, fees, reversals and refunds require explicit point-in-time ledger
61
+ entries and allocation semantics; do not assume ordinary inflows or rewrite a
62
+ past decision using later corrections. Do not silently convert or pool currencies.
63
+
64
+ For current payout amount `P > 0`, let `a_i` be each proposed matched amount,
65
+ `age_i` the elapsed time from lot availability to the decision, and `M = Σa_i`.
66
+ Report `M`, `P - M` as unmatched, and `M / P` as attribution coverage. Define:
67
+
68
+ - Matched weighted fund age: `Σ(a_i × age_i) / M` when `M > 0`; otherwise unknown.
69
+ Label it matched-only and report coverage alongside it.
70
+ - Recent funds share for a declared elapsed window: `Σ(a_i for lots available
71
+ in (t − window, t]) / P`. Report coverage; unmatched is unknown, not known old
72
+ funding. With incomplete attribution, this is the known recent share, not the
73
+ full share.
74
+ - Distinct known funding counterparties among matched lots: count non-null,
75
+ normalized payer keys; report matched amount with known payer divided by `P`,
76
+ plus unknown-payer and unmatched amounts. A missing key is not a counterparty.
77
+ State entity type, role, linkage method and confidence; do not infer a person
78
+ from an account key or pool nulls.
79
+
80
+ ### Worked example
81
+
82
+ At payout decision time `t`, one USD ledger account has two available receipts:
83
+ A: $60 available 10 hours ago from known payer X; B: $50 available 2 hours ago
84
+ with unknown payer. No other balance or reservations exist. A $90 payout previews
85
+ $60 from A and $30 from B, leaving $20 of B. The $110 opening amount equals
86
+ $90 allocated plus $20 remaining. Matched coverage is $90/$90 = 100%; weighted
87
+ fund age is `(60 × 10 + 30 × 2) / 90 = 7.33 hours`. For a 6-hour window,
88
+ recent share is $30/$90 = 33.33%. Distinct known payers = 1; known-payer coverage
89
+ is $60/$90 = 66.67%, and $30 has unknown payer. These are proposed allocations,
90
+ not proof of where the payout's money went.
91
+
92
+ If a separate $130 candidate is scored against the same $110 pre-debit balance,
93
+ FIFO matches $60 + $50 = $110 and leaves $20 unmatched: coverage is 84.62%.
94
+ The known recent share is $50/$130 = 38.46%, not $50/$110. Weighted age of the
95
+ matched portion is `(60 × 10 + 50 × 2) / 110 = 6.36 hours`; known-payer coverage
96
+ is $60/$130 = 46.15%. Report the $20 shortfall and do not infer a funding source
97
+ or a payout outcome. If a reservation or an unknown opening balance exists, the
98
+ example's inputs and results change according to the declared ledger semantics.
99
+
100
+ ### Lifecycle example
101
+
102
+ Given $100 available in one ledger account/currency, reserving $70 leaves $30
103
+ spendable and $70 reserved. Committing that debit leaves $30 spendable, $0
104
+ reserved, and $70 consumed. A later payout-failed notification without a return
105
+ entry leaves those amounts unchanged; another $40 request has a $10 shortfall.
106
+ If the ledger later posts a $70 return as available, spendable balance becomes
107
+ $100. Whether returned funds restore original lot age or create a new available
108
+ lot is a declared ledger policy, not inferred from the failure notification.
109
+ Before the return, conservation is $100 = $30 remaining + $70 consumed; after
110
+ it, account reconciliation is $100 original + $70 returned − $70 debited = $100.
111
+ Do not both undo consumption and add the same return as a second credit.
112
+
113
+ ## Counterparty velocity
114
+
115
+ Choose only useful combinations of direction, entity type and window. Name the
116
+ balance-owning account, inbound payer or outbound beneficiary, and whether each
117
+ key is an account, person, business, instrument or other declared type. Keep
118
+ inbound and outbound roles separate, and disclose deterministic versus probabilistic
119
+ links and confidence. Unknown identifiers are not pooled or counted as distinct.
120
+
121
+ For each direction, distinguish (1) transaction count and same-currency amount
122
+ sum for the same account–counterparty pair from (2) distinct inbound payers or
123
+ distinct outbound beneficiaries per balance-owning account. Include the current
124
+ transaction in eligible counts, sums and distinct values when its key is known.
125
+ Missing keys yield unknown for the affected pair feature; report missing-key
126
+ coverage for distinct counts. Missing amount or currency makes the affected sum
127
+ unknown; do not silently omit it or sum currencies. Follow the shared as-of
128
+ availability and tie-order rules and `(t − window, t]` boundaries.
129
+
130
+ - `counterparty_pair_txn_count_<window>`: count on the declared account/payer
131
+ or account/beneficiary pair, with direction encoded in the specification.
132
+ - `account_inbound_payer_distinct_count_<window>` and
133
+ `account_outbound_beneficiary_distinct_count_<window>`: distinct role-specific
134
+ keys for the same balance-owning account. Record entity type in the spec.
135
+
136
+ The standard windows are 1m, 5m, 15m, 30m, 1h, 2h, 6h, 24h, 2d, 7d,
137
+ 14d, 21d and 30d; a day is 86,400 seconds. For example, a high count for one
138
+ account–payer pair differs from many distinct payers; a marketplace may naturally
139
+ have both many payers and many beneficiaries. Frequent payments to one beneficiary
140
+ may be routine supplier settlement. Treat these as candidates with benign
141
+ alternatives, not proof of fraud or a customer role.
142
+
143
+ ## Step 9 checks
144
+
145
+ Check that sequence inputs were known at the decision, current is counted once,
146
+ and no later outcome leaks into an earlier score. Check account/currency scope,
147
+ actual lot order, pre-debit preview, partial allocations, reservation lifecycle,
148
+ conservation, unknown history and coverage, and explicit nonordinary ledger
149
+ semantics. Check pair versus distinct direction, entity linkage confidence and
150
+ benign alternatives. Escalate undefined business or ledger semantics rather than
151
+ inventing a policy; independent review remains owned by the reviewer.
@@ -1,8 +1,9 @@
1
1
  # Context: bank transfer
2
2
 
3
- Typical grains are beneficiary creation, transfer instruction, transfer
4
- execution, recall, or case. Decision points may be beneficiary setup,
5
- pre-execution, or post-transfer investigation.
3
+ Score one transfer transaction, normally at instruction or pre-execution.
4
+ Beneficiary creation supplies prior context; recall and case records supply
5
+ outcomes or post-transaction review. Do not score beneficiary creation as a
6
+ transaction.
6
7
 
7
8
  ## Features
8
9
 
@@ -0,0 +1,70 @@
1
+ # Context: card payment
2
+
3
+ Score one payment transaction, normally at pre-authorization. Authorization
4
+ attempts need a retry policy; clearing and dispute records supply lifecycle
5
+ context or post-transaction review, not additional scored copies.
6
+
7
+ ## Reported-fraud labels
8
+
9
+ For reported-fraud rule analysis, combine available network/acquirer fraud reports
10
+ (such as Worldpay DART/340FRD) with fraud-category disputes, including pre-dispute
11
+ resolution records. A transaction is positive if either source reports it. Do not
12
+ restrict fraud labels to financially settled or first-chargeback stages. This
13
+ label is reported fraud, not necessarily independently confirmed fraud or loss.
14
+ An explicit task-specific label definition overrides this default.
15
+
16
+ - Identify fraud from documented category/reason mappings, not the mere presence
17
+ of a dispute or a pre-dispute stage. Non-fraud quality, service and clerical
18
+ disputes are not positive solely because they appear in the dispute file.
19
+ - Link each source to a unique transaction using corroborated references and
20
+ original transaction attributes. Preserve unmatched/ambiguous records and
21
+ conflicting evidence instead of forcing a match.
22
+ - Union positives by transaction ID. Repeated reports, multiple dispute stages,
23
+ and DART/dispute overlap contribute one positive transaction, not extra cases.
24
+ - Retain evidence provenance and lifecycle. A later reversal or recovery does not
25
+ erase an earlier fraud allegation from a reported-fraud label; do not call its
26
+ disputed amount a confirmed or unrecovered loss.
27
+ - Report DART-only, dispute-only, overlap and union counts in each scoring window,
28
+ plus pre-dispute/stage coverage. A transaction may appear in several stage
29
+ subsets, so do not sum those subsets as unique fraud transactions.
30
+ - Network-metric exclusions (for example excluding certain pre-disputes from a
31
+ scheme monitoring ratio) do not define the fraud-detection positive class.
32
+ Keep regulatory/scheme ratio calculations separate from rule labels.
33
+ - Absence from both feeds remains unlabeled unless a justified negative
34
+ definition exists. Delayed reports affect capture completeness, not whether an
35
+ already observed fraud pre-dispute qualifies as positive.
36
+ - These later reports supply evaluation labels only. Historical fraud evidence
37
+ can enter a real-time feature only after it became available to the detector;
38
+ never leak the current transaction's future dispute into its own features.
39
+
40
+ ## Features
41
+
42
+ Amount and currency, network, card type, token/PAN-derived identity, BIN, country,
43
+ channel, entry method, MCC, merchant, device, customer history, and prior-event
44
+ velocity. A masked PAN may be a weak identity key.
45
+
46
+ CVV, AVS, authorization response, and 3DS result are same-response or later
47
+ fields unless the chosen decision point explicitly occurs after them. Issuing
48
+ bank name may be derived; prefer BIN for pre-authorization lists.
49
+
50
+ Record discovery evidence and versions for BIN, country, merchant, and other
51
+ lists. Reference rates must have been available at the scored decision; newly
52
+ discovered lists are prospective candidates. Tiny lists remain monitor-only.
53
+
54
+ ## Actions and impact
55
+
56
+ Actions: block, require 3DS/additional authentication, route, manual review, or
57
+ monitor. For 3DS scenarios, failed authentication does not enter the subsequent
58
+ authorization denominator. Report authorization success and absolute approval
59
+ change only when measured or under explicit pass/conversion assumptions.
60
+
61
+ ## Review overlay
62
+
63
+ - Available DART/network fraud reports and fraud disputes are unioned by
64
+ transaction, including fraud pre-disputes, with source overlap disclosed.
65
+ - Non-fraud disputes are not positive; lifecycle reversals are not confused with
66
+ absence of an allegation or confirmed loss.
67
+ - Current CVV/AVS/auth response/3DS result respects decision timing.
68
+ - BIN lists declare discovery evidence and causal availability; issuer names
69
+ are operable only if available live.
70
+ - 3DS and authorization denominators are explicit.
@@ -0,0 +1,34 @@
1
+ # Context: payment collection
2
+
3
+ Score one collection transaction at its declared attempt or receipt decision.
4
+ Settlement, return, and linked outflow records supply context at the time they
5
+ become known, not duplicate scored transactions. State whether funds are card,
6
+ bank debit, transfer, cash-equivalent, or mixed because reversibility differs.
7
+
8
+ ## Features
9
+
10
+ For Step 4 feature engineering and Step 9 review, read
11
+ [collection and payout features](../collection-payout-features.md). First-class
12
+ entities include the balance-owning ledger account, inbound payer and funding
13
+ instrument/account, plus linked outbound beneficiary where known. Enrichment may
14
+ include point-in-time receipt availability, ledger status and currency, event
15
+ order, and role-link confidence; use only available sources.
16
+
17
+ Mandatory matching prerequisites are in [entities](../entities.md); inspect
18
+ [enrichment](../enrichment.md) for phone country/area, bank-account platform/PSP
19
+ and holder-type flags, and jurisdiction-specific ID-document geography. Company,
20
+ person, role-specific address, and composite bank account are first-class
21
+ entities, not interchangeable counterparty identifiers.
22
+
23
+ Payer and funding-source novelty, amount and velocity, return history, settlement
24
+ state known at decision time, payer concentration, many-payer fan-in, linked
25
+ accounts/devices, account age, and elapsed time from receipt to intended outflow.
26
+
27
+ Do not use a later return, recall, dispute, or investigation outcome to decide an
28
+ earlier collection. Do not describe unsettled or reversible funds as final.
29
+
30
+ ## Actions and impact
31
+
32
+ Actions: accept, review, delay availability, reserve, restrict downstream use,
33
+ or reject where supported. Measure accepted/held value, return and loss exposure,
34
+ funds-availability delay, review workload, and legitimate-customer impact.
@@ -0,0 +1,34 @@
1
+ # Context: payout
2
+
3
+ Score one payout transaction at its declared request, approval, or release
4
+ point. Beneficiary setup is context; completion, return, and investigation are
5
+ later lifecycle evidence, not additional scored copies.
6
+
7
+ ## Features
8
+
9
+ For Step 4 feature engineering and Step 9 review, read
10
+ [collection and payout features](../collection-payout-features.md). First-class
11
+ entities include the balance-owning ledger account, inbound payer or funding
12
+ account, and outbound beneficiary and beneficiary account. Enrichment may include
13
+ point-in-time available receipt lots, ledger balance, currency, status and
14
+ reservation lifecycle, event order, and role-link confidence; use only available
15
+ sources.
16
+
17
+ Read [entities](../entities.md) and [enrichment](../enrichment.md) for company,
18
+ person, role-specific address and composite bank-account definitions, plus phone
19
+ country/area, bank-account platform/PSP/holder classifications, and supported
20
+ ID-document location. Keep sender/beneficiary roles and uncertain links explicit.
21
+
22
+ Beneficiary novelty and sharing, payout velocity and amount, balance-drain ratio,
23
+ time from collection to payout, account age, KYC state, device/account links,
24
+ fan-out, counterparty concentration, prior returns, and point-in-time graph risk.
25
+
26
+ Do not use later payout completion, return, recall, restriction, or investigation
27
+ as a pre-release feature.
28
+
29
+ ## Actions and impact
30
+
31
+ Actions: approve, verify, review, delay, hold, reject, restrict account, or
32
+ monitor where policy permits. Measure held/reviewed count and value, payout
33
+ completion, release delay, review workload, legitimate-customer intervention,
34
+ exposure, and confirmed value captured.
@@ -0,0 +1,74 @@
1
+ # Optional enrichment
2
+
3
+ Use only data and versions actually available at the transaction decision. Record
4
+ source, lookup key, as-of time, coverage, unknown values and normalization. A later
5
+ lookup can support retrospective review but is not a causal real-time feature.
6
+
7
+ - Inventory existing attributes before deriving missing ones. BIN can supply
8
+ `bin_country`, issuer and card type from an identified reference table or
9
+ lookup. Do not require a service integration now; a future BIN service is an
10
+ optional adapter. These are lookup attributes, not proof of customer location, identity
11
+ or intent. Handle missing, stale and ambiguous mappings explicitly.
12
+ - IP geolocation can derive `ip_country`, `ip_state`/region and `ip_city` from
13
+ an available IP and point-in-time database. VPNs, proxies, shared networks and database error limit
14
+ its interpretation. Unknown geography is not a mismatch.
15
+ - Preserve original amount and currency. For cross-currency comparison declare the
16
+ common currency, FX source, rate and as-of time available at decision, plus the
17
+ conversion convention. Missing currency or rate means the converted amount is
18
+ unknown; do not invent a local currency or mix currencies in a sum.
19
+
20
+ ## Collection and payout enrichment
21
+
22
+ Apply these only where the source fields and jurisdiction support them. Read
23
+ [entity definitions](entities.md) before resolving names or ownership. Missing
24
+ lookups block the affected feature, not other rapid rule discovery.
25
+
26
+ ### Phone geography
27
+
28
+ Derive `phone_country` and `phone_area` from a documented numbering-plan source
29
+ and a reliably normalized phone number. Record number type and portability
30
+ limits where supported. Area may be unavailable for mobile or non-geographic
31
+ numbers. Numbering-plan country/area is not the person's current location,
32
+ residence, nationality, or proof of a country mismatch's cause.
33
+
34
+ ### Bank-account classification
35
+
36
+ Resolve using account name, account number and institution with evidence, not
37
+ name substrings alone. Record the classified object (account holder, institution,
38
+ platform association or PSP relationship) so one flag does not imply another.
39
+
40
+ | Attribute | Meaning and limits |
41
+ |---|---|
42
+ | `is_platform` | Account is associated with an identified commerce/platform role, for example Amazon, under a stated relationship. Does not imply platform ownership. |
43
+ | `is_psp` | Account is associated with an identified payment-service provider, for example PingPong or Airwallex, under a stated relationship. Does not identify the ultimate merchant/customer. |
44
+ | `holder_type` | `corporate`, `non_corporate`, or `unknown`, supported by holder/legal-entity evidence. Non-corporate does not mean fraudulent. |
45
+ | `is_corporate` / `is_non_corporate` | Optional nullable flags derived from the same holder classification. Unknown maps to null for both, not false; contradictory evidence remains unresolved. |
46
+
47
+ Platform and PSP flags are independent of holder type and can overlap. Set false
48
+ only where evidence supports a negative classification; absence from a reference
49
+ list is unknown unless that list's coverage justifies a negative. Example names
50
+ illustrate categories, not hard-coded watchlists or automatic matches.
51
+ Record source, evidence, lookup version, effective/available time, confidence,
52
+ and unresolved classifications. Neither PSP/platform association nor corporate
53
+ status alone is a fraud diagnosis or verified account ownership.
54
+
55
+ ### ID-card geography
56
+
57
+ For supported jurisdiction/document types, derive `id_document_location` and its
58
+ administrative level from an authorized, versioned reference. Record whether the
59
+ value represents an encoded administrative origin, registration, or issuance
60
+ location according to that document's actual rules. Do not assume every ID has
61
+ an embedded location, decode unsupported documents, or equate that location with
62
+ current residence. Handle historical administrative boundaries and invalid IDs
63
+ explicitly. Retain only necessary derived fields; do not expose full ID numbers
64
+ in feature reports or lookup logs.
65
+
66
+ ## Encoding and mismatch
67
+
68
+ Frequency encoding counts how often a known attribute value appears in eligible
69
+ history, optionally including the current transaction for transaction velocity.
70
+ Mismatch compares two explicitly named comparable attributes, such as known BIN
71
+ country and known IP country. Return unknown if either side is missing; a mismatch
72
+ is a hypothesis, not a fraud diagnosis. An encoding based on outcomes must obey
73
+ label availability and maturity rules. Read [feature engineering](feature-engineering.md)
74
+ and [feature SQL](feature-sql.md) for encoding definitions and examples.
@@ -0,0 +1,48 @@
1
+ # Entity definitions and linkage
2
+
3
+ Normalize consistently before matching; retain original values under appropriate
4
+ access controls. Empty, malformed or unavailable identifiers become null, not a
5
+ shared identity. Null keys never form a pooled entity or count as a distinct value.
6
+ Record normalization version, source, availability and collisions. Do not generate
7
+ an identifier or recover sensitive values that the source did not provide.
8
+
9
+ | Entity | Meaning and normalization | Limits |
10
+ |---|---|---|
11
+ | `pan` | Payment account number or stable token for the same instrument. Remove formatting only where permitted; use a consistent secure token. | Masked PANs collide; token scopes can differ. A card may have several users. Protect full PAN under applicable controls. |
12
+ | `email` | Email address; trim whitespace and normalize domain case. Apply local-part case or alias rules only if justified by the provider and source. | Shared mailboxes and aliases can join or split people. |
13
+ | `phone` | Telephone number; normalize to international form only with a reliable country context. | Numbers are shared, recycled or changed; do not invent a country code. |
14
+ | `address` | Registered, operating, residential, billing, shipping or another explicit address role; normalize components with locale-aware rules. | Shared premises and incomplete addresses are weak links. Keep roles separate; registered and operating addresses need not match. |
15
+ | `company` | Legal or business entity; record jurisdiction, registration identifier where available, legal name and aliases. | A name match alone is not one company; distinguish legal entity, trading brand and platform. |
16
+ | `person` | Natural person with explicit roles: account holder, beneficial owner, payer, beneficiary or representative. Use a lawful stable identifier where available. | Names are not unique; name similarity, shared contact details or an address do not establish identity. |
17
+ | `bank_account` | Composite account name + account number + institution; preserve and normalize all three, including institution/branch/routing scope where needed. | Same numbers at different institutions are different accounts. Name variants are not automatically new accounts; masked numbers and missing components weaken matching. |
18
+ | `ip` | Parsed IPv4 or IPv6 address in canonical form; preserve version. | NAT, proxies, VPNs and mobile networks share or change addresses. |
19
+ | `device_fingerprint` | Source-issued fingerprint under a known version and scope. | Fingerprints can collide, reset, be shared or be unavailable; they are not verified people. |
20
+
21
+ An exact normalized match is a deterministic match of an attribute, not proof of
22
+ one customer, account, intent or fraud. Probabilistic links need stated evidence
23
+ and uncertainty. Declare the chosen IP source (for example, trusted client IP
24
+ rather than an untrusted forwarded header). Keep name roles, such as cardholder,
25
+ account holder, billing recipient, or shipping recipient, separate and normalize
26
+ consistently when counting distinct names.
27
+
28
+ ## Collection and payout relationships
29
+
30
+ Represent `person -> company`, `person/company -> bank_account`, and
31
+ `person/company -> address` as typed, sourced relationships, not inferred ownership.
32
+ Record role, evidence, confidence, and when each relationship became known.
33
+ A counterparty is a transaction role, not a new entity type: specify whether it
34
+ is a person, company, bank account, platform, or PSP. Do not mix those grains in
35
+ one distinct-counterparty count.
36
+
37
+ Keep the balance-owning internal ledger account separate from an external
38
+ `bank_account`. Virtual accounts, pooled accounts, and underlying settlement
39
+ accounts need explicit links; an account number alone does not reveal the
40
+ ultimate customer or beneficial owner. Preserve raw evidence under access
41
+ controls, but use safe identifiers in reports and examples.
42
+
43
+ Prefer supplied stable account IDs backed by the composite components. Track
44
+ name variants separately; do not split a known account solely on spelling or
45
+ merge accounts solely on a name. If institution or number is missing/ambiguous,
46
+ mark linkage confidence or omit features requiring a reliable account identity.
47
+ An ID-card reference identifies a document under a jurisdiction and document
48
+ type; it is not by itself verified person identity or a public report field.