@1aboveio/skills 0.15.0 → 0.17.0
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 +8 -2
- package/package.json +1 -1
- package/runtime/skills/distribution/generated/recipes.json +178 -34
- package/runtime/skills/distribution/scripts/bundles.mjs +11 -3
- package/runtime/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +1 -1
- package/skills/data-science/pyspark/SKILL.md +126 -0
- package/skills/{backend → data-science}/pyspark/assets/templates/etl.py +51 -0
- package/skills/{backend → data-science}/pyspark/references/diagnosis-and-profiling.md +38 -14
- package/skills/{backend → data-science}/pyspark/references/etl-contract.md +19 -0
- package/skills/data-science/pyspark/references/production-validation.md +131 -0
- package/skills/data-science/pyspark/references/reconciliation.md +38 -0
- package/skills/{backend → data-science}/pyspark/references/transformation-design.md +30 -2
- package/skills/engineering/engineering-runtime/coherence/workflow.json +14 -14
- package/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +1 -1
- package/skills/engineering/resolve-issues/generated/workflow-repair-policy.json +11 -11
- package/skills/engineering/resolve-issues/scripts/run-state.mjs +1 -1
- package/skills/payment/fraud-analysis/LICENSE +3 -0
- package/skills/payment/fraud-analysis/SKILL.md +113 -0
- package/skills/payment/fraud-analysis/evals/evals.json +40 -0
- package/skills/payment/fraud-analysis/references/archetypes/authorized-payment-scam.md +41 -0
- package/skills/payment/fraud-analysis/references/archetypes/first-party-fraud.md +44 -0
- package/skills/payment/fraud-analysis/references/archetypes/third-party-fraud.md +27 -0
- package/skills/payment/fraud-analysis/references/contexts/bank-transfer.md +24 -0
- package/skills/payment/fraud-analysis/references/contexts/card-payment.md +30 -0
- package/skills/payment/fraud-analysis/references/contexts/payment-collection.md +20 -0
- package/skills/payment/fraud-analysis/references/contexts/payout.md +20 -0
- package/skills/payment/fraud-analysis/references/feature-engineering.md +158 -0
- package/skills/payment/fraud-analysis/references/mechanisms/account-takeover.md +36 -0
- package/skills/payment/fraud-analysis/references/report-rationale.md +45 -0
- package/skills/payment/fraud-analysis/references/report-template.md +190 -0
- package/skills/payment/fraud-analysis/references/review-checklist.md +175 -0
- package/skills/payment/fraud-analysis/references/taxonomy.md +79 -0
- package/skills/payment/fraud-analysis/references/terminology.md +108 -0
- package/skills/payment/fraud-analysis/references/workflow.md +175 -0
- package/skills/payment/payment-analysis/LICENSE +3 -0
- package/skills/payment/payment-analysis/SKILL.md +127 -0
- package/skills/payment/payment-analysis/references/auth-rate-actions.md +30 -0
- package/skills/payment/payment-analysis/references/chargebacks.md +88 -0
- package/skills/payment/payment-analysis/references/event-layers.md +79 -0
- package/skills/payment/payment-analysis/references/fx.md +59 -0
- package/skills/payment/payment-analysis/references/journey.md +78 -0
- package/skills/payment/payment-analysis/references/metrics.md +62 -0
- package/skills/payment/payment-analysis/references/report-template.md +98 -0
- package/skills/payment/payment-analysis/references/terminology.md +85 -0
- package/skills/payment/payment-analysis/references/visualization.md +47 -0
- package/skills/backend/pyspark/SKILL.md +0 -116
- package/skills/backend/pyspark/references/parity-testing.md +0 -83
- package/skills/backend/pyspark/references/production-validation.md +0 -166
- /package/skills/{backend → data-science}/airflow-dag-develop/LICENSE +0 -0
- /package/skills/{backend → data-science}/airflow-dag-develop/SKILL.md +0 -0
- /package/skills/{backend → data-science}/pyspark/LICENSE +0 -0
- /package/skills/{backend → data-science}/pyspark/assets/templates/utils/__init__.py +0 -0
- /package/skills/{backend → data-science}/pyspark/assets/templates/utils/hudi_metadata.py +0 -0
- /package/skills/{backend → data-science}/pyspark/references/velocity-feature-calculation.md +0 -0
- /package/skills/{backend → data-science}/pyspark/scripts/spark_eventlog_summary.py +0 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fraud-analysis
|
|
3
|
+
description: >
|
|
4
|
+
Analyze tabular payment, transfer, collection, payout, account, or fraud-case
|
|
5
|
+
data (CSV, XLSX, TXT) to find interpretable features and operable risk rules.
|
|
6
|
+
Supports third-party fraud (including stolen credentials and account takeover),
|
|
7
|
+
first-party fraud or deliberate account abuse, and authorized payment scams
|
|
8
|
+
(including APP scams), across card payments, collections, bank transfers, and
|
|
9
|
+
payouts. Produces temporal holdout metrics, domain-appropriate actions, strategy
|
|
10
|
+
impact, and a business report. Use for fraud, scam, mule, account-takeover,
|
|
11
|
+
chargeback, dispute, transfer, collection, or payout risk analysis even when the
|
|
12
|
+
user does not name this skill.
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Fraud Analysis
|
|
16
|
+
|
|
17
|
+
Analyze fraud through composable dimensions rather than treating every case as
|
|
18
|
+
card fraud:
|
|
19
|
+
|
|
20
|
+
- **Archetype** — the genuine customer's relationship to the fraud
|
|
21
|
+
- **Mechanism** — how compromise, deception, or abuse occurred
|
|
22
|
+
- **Context** — the product or money-movement surface where a rule fires
|
|
23
|
+
|
|
24
|
+
Run this **10-step** loop:
|
|
25
|
+
|
|
26
|
+
0. Pre-flight → 1. Profile → 2. Label → 3. Time split → 4. Engineer features →
|
|
27
|
+
5. Shortlist → 6. Score rules → 7. Map actions + packages → 8. Write report →
|
|
28
|
+
9. Review
|
|
29
|
+
|
|
30
|
+
**Produce:** operable rules and portfolio impact in a business report.
|
|
31
|
+
**Do not produce:** a black-box model as the main answer.
|
|
32
|
+
|
|
33
|
+
> Paths under `references/` are relative to this skill directory. Step detail:
|
|
34
|
+
> [references/workflow.md](references/workflow.md).
|
|
35
|
+
|
|
36
|
+
## Required references
|
|
37
|
+
|
|
38
|
+
| File | When |
|
|
39
|
+
|---|---|
|
|
40
|
+
| [references/workflow.md](references/workflow.md) | Every step — full procedure |
|
|
41
|
+
| [references/taxonomy.md](references/taxonomy.md) | Step 1; select archetype, mechanism, and context |
|
|
42
|
+
| [references/feature-engineering.md](references/feature-engineering.md) | Step 4; shared decision-time rules |
|
|
43
|
+
| [references/report-template.md](references/report-template.md) | Step 8; common report contract and overlay selection |
|
|
44
|
+
| [references/terminology.md](references/terminology.md) | Step 8; fixed terms and language proofread |
|
|
45
|
+
| [references/review-checklist.md](references/review-checklist.md) | Step 9; common and selected-profile checks |
|
|
46
|
+
|
|
47
|
+
After Step 1, read only the selected profile references:
|
|
48
|
+
|
|
49
|
+
| Dimension | References |
|
|
50
|
+
|---|---|
|
|
51
|
+
| Archetype | `references/archetypes/<archetype>.md` |
|
|
52
|
+
| Mechanism | `references/mechanisms/<mechanism>.md` when present |
|
|
53
|
+
| Context | `references/contexts/<context>.md` for every selected context |
|
|
54
|
+
|
|
55
|
+
Current packs: archetypes `third-party-fraud`, `first-party-fraud`,
|
|
56
|
+
`authorized-payment-scam`; mechanism `account-takeover`; contexts
|
|
57
|
+
`card-payment`, `payment-collection`, `bank-transfer`, `payout`.
|
|
58
|
+
|
|
59
|
+
## Progress
|
|
60
|
+
|
|
61
|
+
Track a task plan. One item is `in_progress` at a time.
|
|
62
|
+
|
|
63
|
+
1. Pass pre-flight
|
|
64
|
+
2. Select analysis profile
|
|
65
|
+
3. Formalize label
|
|
66
|
+
4. Freeze time split
|
|
67
|
+
5. Engineer candidate features
|
|
68
|
+
6. Select shortlist
|
|
69
|
+
7. Score candidate rules
|
|
70
|
+
8. Map actions and packages
|
|
71
|
+
9. Write business report and proofread language
|
|
72
|
+
10. Independent review
|
|
73
|
+
|
|
74
|
+
Suggested notes: `preflight=…`, `profile=…`, `label=…`, `cut=…`,
|
|
75
|
+
`allowed/excluded=…`, `shortlist=…`, `N rules, holdout|in-sample`,
|
|
76
|
+
`packages=…`, `report=…`, `verdict=…`.
|
|
77
|
+
|
|
78
|
+
## Input
|
|
79
|
+
|
|
80
|
+
CSV / XLSX / TXT; one row per event or case; optional outcome column. A dataset
|
|
81
|
+
may contain more than one event type, but every scored rule needs a declared
|
|
82
|
+
event grain and decision point.
|
|
83
|
+
|
|
84
|
+
## Workflow
|
|
85
|
+
|
|
86
|
+
Follow [references/workflow.md](references/workflow.md) for each step. The map:
|
|
87
|
+
|
|
88
|
+
| Step | Do | Gate |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| 0 Pre-flight | Label provenance; pass / needs-user-input / descriptive-only / blocked | No supervised metrics until pass |
|
|
91
|
+
| 1 Profile | Archetype + mechanism(s) + context(s) from taxonomy | Read selected packs before Step 2 |
|
|
92
|
+
| 2 Label | Formalize positive / negative / unlabeled | Both classes defined before scoring |
|
|
93
|
+
| 3 Time split | Freeze train/holdout before features | No random shuffle as headline |
|
|
94
|
+
| 4 Features | Engineer candidates at decision time | Train-only thresholds |
|
|
95
|
+
| 5 Shortlist | Lift / support / stability / operability | Train only |
|
|
96
|
+
| 6 Score | occurrence → precision → recall on holdout | Headline = holdout |
|
|
97
|
+
| 7 Actions | Map to context packs + strategy packages | Freeze packages before report |
|
|
98
|
+
| 8 Report | Business report per template; grep terminology banned strings | No review process in the file |
|
|
99
|
+
| 9 Review | Checklist + selected packs | Prefer fresh independent reviewer |
|
|
100
|
+
|
|
101
|
+
## Output contract
|
|
102
|
+
|
|
103
|
+
| Item | Requirement |
|
|
104
|
+
|---|---|
|
|
105
|
+
| Analysis profile | Archetype, role, consent, technical authentication, mechanism, context, confidence, grain, decision point |
|
|
106
|
+
| Rule metrics | occurrence → precision → recall; headline window identified |
|
|
107
|
+
| Strategy coverage | triggered count + rate and amount + share, with currency |
|
|
108
|
+
| Domain impact | Measures and denominators from selected context packs only |
|
|
109
|
+
| Uncertainty | Proxy labels, immature outcomes, weak identity links, and unresolved attribution stated |
|
|
110
|
+
| Report file | Business content only; no reviewer model, verdict, or repair log |
|
|
111
|
+
|
|
112
|
+
Steps 0–7 are analysis and its entry gate. Step 8 writes the report. Step 9
|
|
113
|
+
reviews it.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill_name": "fraud-analysis",
|
|
3
|
+
"evals": [
|
|
4
|
+
{
|
|
5
|
+
"id": 1,
|
|
6
|
+
"prompt": "Analyze transfers.csv. The transactions passed login and MFA, but customers later confirmed they did not initiate them. Most transfers followed a password reset and new beneficiary setup. Find rules we can apply before transfer execution.",
|
|
7
|
+
"expected_output": "Routes to third-party fraud with account-takeover mechanism and bank-transfer context; separates technical authentication from customer consent; excludes later customer confirmation from pre-transfer features; proposes point-in-time access, beneficiary, and transfer features."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": 2,
|
|
11
|
+
"prompt": "Analyze collections_and_payouts.xlsx for customers who knowingly receive funds from many unrelated payers and rapidly cash out to linked beneficiaries. Confirmed investigation outcomes identify participating account holders.",
|
|
12
|
+
"expected_output": "Routes to first-party fraud with payment-collection and payout contexts; uses confirmed knowing participation as the label; engineers point-in-time fan-in, fan-out, collection-to-payout, account, device, and graph features; reports hold/review workload, delay, legitimate-customer impact, and exposure."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": 3,
|
|
16
|
+
"prompt": "Analyze bank_transfers.csv for APP scams. Customers themselves sent the payments after impersonation calls. We have later scam claims, reimbursement decisions, beneficiary data, warning interactions, and transfer timestamps.",
|
|
17
|
+
"expected_output": "Routes to authorized payment scam with APP subtype and bank-transfer context; treats customers as deceived victims; distinguishes claims and reimbursement decisions from decision-time features; evaluates warnings, confirmation, review, delay, completion, and reimbursement impact."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": 4,
|
|
21
|
+
"prompt": "Review card_auths.csv and propose pre-authorization rules for confirmed stolen-card transactions. It includes BIN, token, amount, CVV response, AVS response, issuer decline code, 3DS result, and chargeback outcome.",
|
|
22
|
+
"expected_output": "Routes to third-party fraud and card-payment; preserves card/BIN/history feature guidance; excludes current CVV, AVS, authorization response, 3DS result, and chargeback outcome at pre-auth; evaluates block, 3DS, or monitor actions with correct authorization denominators."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": 5,
|
|
26
|
+
"prompt": "Analyze suspicious payout accounts. Some may be knowing mules, some may be scam victims, and some may have been taken over. The file has behavior flags but no completed investigations or customer-consent evidence.",
|
|
27
|
+
"expected_output": "Keeps archetype unclassified rather than forcing mule, scam, or ATO attribution; treats behavior flags as proxy signals; avoids a blended confirmed-fraud label; limits severe actions and clearly states attribution and evidence gaps."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": 6,
|
|
31
|
+
"prompt": "Use outcome.csv where the existing case_result column has CONFIRMED_FRAUD, LEGITIMATE, and PENDING. Treat CONFIRMED_FRAUD as positive and analyze the rules.",
|
|
32
|
+
"expected_output": "Records file-column provenance; maps CONFIRMED_FRAUD to positive, LEGITIMATE to negative, and PENDING to unlabeled rather than negative; reports all counts and computes the base rate over labeled mature rows."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": 7,
|
|
36
|
+
"prompt": "For transfers.csv, define positives as accounts with at least three payouts within one hour after receiving funds. Find first-party fraud rules.",
|
|
37
|
+
"expected_output": "Pre-flight recognizes a user-defined positive condition and asks the user to define the negative condition before profile selection or supervised analysis; does not treat every other account as negative; leaves unmatched rows unlabeled."
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Archetype: authorized payment scam
|
|
2
|
+
|
|
3
|
+
The genuine customer consents to a payment but is deceived about the recipient
|
|
4
|
+
or purpose. The customer is the victim and is not knowingly party to the fraud.
|
|
5
|
+
|
|
6
|
+
Use subtype `app-scam` only for an authorized push payment, normally a bank
|
|
7
|
+
transfer. Record the scam subtype when supported, such as impersonation,
|
|
8
|
+
purchase, investment, romance, or invoice redirection; do not infer it from
|
|
9
|
+
amount or beneficiary shape alone.
|
|
10
|
+
|
|
11
|
+
## Label guidance
|
|
12
|
+
|
|
13
|
+
Prefer adjudicated scam outcomes. Customer reports, recalls, warnings ignored,
|
|
14
|
+
beneficiary risk, and reimbursement decisions can be useful but may be proxies
|
|
15
|
+
or policy outcomes rather than ground truth. Distinguish scams from civil
|
|
16
|
+
disputes and first-party participation.
|
|
17
|
+
|
|
18
|
+
## Feature families
|
|
19
|
+
|
|
20
|
+
- New beneficiary, beneficiary risk, payee-name mismatch, and counterparty graph
|
|
21
|
+
- Unusual amount, frequency, payment purpose, and deviation from customer history
|
|
22
|
+
- Session/payment journey, warning interaction, confirmation responses, and
|
|
23
|
+
contact-channel changes available before execution
|
|
24
|
+
- Urgency patterns, repeated limit-sized payments, and rapid beneficiary changes
|
|
25
|
+
- Prior complaints or confirmed beneficiary outcomes known before the payment
|
|
26
|
+
|
|
27
|
+
## Actions and impact
|
|
28
|
+
|
|
29
|
+
Potential actions include contextual warning, payee confirmation, customer
|
|
30
|
+
confirmation, cooling-off delay, manual review, transfer hold, or reject where
|
|
31
|
+
policy permits. Measure warning/review/hold volume and value, completion and
|
|
32
|
+
abandonment, review workload, delay, reimbursement exposure, and confirmed scam
|
|
33
|
+
value captured. Do not optimize only for authorization success.
|
|
34
|
+
|
|
35
|
+
## Review overlay
|
|
36
|
+
|
|
37
|
+
- Genuine customer consent and deception are both supported.
|
|
38
|
+
- The customer is not knowingly participating; otherwise route to first-party.
|
|
39
|
+
- APP terminology is used only for push payments.
|
|
40
|
+
- Post-payment reports, recalls, reimbursements, and investigations do not leak.
|
|
41
|
+
- Warnings and holds account for vulnerable-customer and policy considerations.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Archetype: first-party fraud
|
|
2
|
+
|
|
3
|
+
The genuine customer or account holder is the perpetrator or a knowing
|
|
4
|
+
participant who misrepresents, manipulates, or deliberately misuses their own
|
|
5
|
+
account for financial or material gain.
|
|
6
|
+
|
|
7
|
+
## Label guidance
|
|
8
|
+
|
|
9
|
+
Prefer confirmed investigation outcomes that establish knowing participation.
|
|
10
|
+
Operational holds, rapid payout, negative balance, returns, complaints, or mule
|
|
11
|
+
signals are proxies unless the business has validated them as outcomes. State
|
|
12
|
+
whether the target is account misuse, collection abuse, payout abuse, false
|
|
13
|
+
claim, knowing mule activity, or another subtype.
|
|
14
|
+
|
|
15
|
+
Do not classify a deceived, coerced, compromised, or merely unusual customer as
|
|
16
|
+
first-party fraud without evidence of participation. Outcome maturity may extend
|
|
17
|
+
beyond transaction settlement and must be reflected in the split.
|
|
18
|
+
|
|
19
|
+
## Feature families
|
|
20
|
+
|
|
21
|
+
- Account age, identity/KYC state, linked accounts, and shared devices
|
|
22
|
+
- Collection-to-transfer/payout sequence, elapsed time, and value passed through
|
|
23
|
+
- Fan-in, fan-out, counterparty concentration, and beneficiary reuse
|
|
24
|
+
- Balance drain, return/recall history, negative exposure, and claim behavior
|
|
25
|
+
- Deviation from the account's history and cross-account coordinated behavior
|
|
26
|
+
|
|
27
|
+
Graph and network features must be point-in-time snapshots. Investigation
|
|
28
|
+
findings and future counterparties must not leak into earlier rows.
|
|
29
|
+
|
|
30
|
+
## Actions and impact
|
|
31
|
+
|
|
32
|
+
Potential actions include review, reserve, delayed availability, payout hold,
|
|
33
|
+
account restriction, enhanced due diligence, or rejection where authorized by
|
|
34
|
+
policy. Report review workload, legitimate-customer impact, completion/release
|
|
35
|
+
rate, delay, exposure, and confirmed value captured. Do not claim loss prevented
|
|
36
|
+
from a proxy label alone.
|
|
37
|
+
|
|
38
|
+
## Review overlay
|
|
39
|
+
|
|
40
|
+
- Evidence supports knowing participation rather than victimization.
|
|
41
|
+
- Mule status is not inferred from transaction shape alone.
|
|
42
|
+
- Graph features and linked-entity lists are train-fit and point-in-time.
|
|
43
|
+
- Account restrictions and reporting recommendations identify policy and legal
|
|
44
|
+
dependencies.
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
## Actions and review
|
|
23
|
+
|
|
24
|
+
Actions depend on context: block or authenticate a card payment; terminate or
|
|
25
|
+
reauthenticate a compromised session; hold/review a transfer or payout; restrict
|
|
26
|
+
an account where policy permits. Review that technical authentication is not
|
|
27
|
+
used as proof of genuine-customer consent.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Context: bank transfer
|
|
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.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
Beneficiary novelty and age, payee verification, amount deviation, transfer
|
|
10
|
+
velocity, device/session context, customer history, beneficiary/account graph,
|
|
11
|
+
counterparty concentration, and prior confirmed outcomes known at the time.
|
|
12
|
+
|
|
13
|
+
For APP scams, the genuine customer authorizes the push payment while deceived.
|
|
14
|
+
For account takeover, technical authentication may pass without customer consent.
|
|
15
|
+
|
|
16
|
+
## Actions and impact
|
|
17
|
+
|
|
18
|
+
Actions: warning, payee/customer confirmation, reauthentication, cooling-off,
|
|
19
|
+
manual review, hold, reject, or monitor. Measure interventions by count/value,
|
|
20
|
+
completion/abandonment, delay, review workload, recalls/reimbursements, and
|
|
21
|
+
confirmed fraud or scam value captured.
|
|
22
|
+
|
|
23
|
+
Irreversibility and hold authority depend on rail, market, and policy; state the
|
|
24
|
+
applicable assumptions.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Context: card payment
|
|
2
|
+
|
|
3
|
+
Typical grains are authorization attempt, payment attempt, clearing event, or
|
|
4
|
+
dispute. Default decision point for preventive rules is pre-authorization.
|
|
5
|
+
|
|
6
|
+
## Features
|
|
7
|
+
|
|
8
|
+
Amount and currency, network, card type, token/PAN-derived identity, BIN, country,
|
|
9
|
+
channel, entry method, MCC, merchant, device, customer history, and prior-event
|
|
10
|
+
velocity. A masked PAN may be a weak identity key.
|
|
11
|
+
|
|
12
|
+
CVV, AVS, authorization response, and 3DS result are same-response or later
|
|
13
|
+
fields unless the chosen decision point explicitly occurs after them. Issuing
|
|
14
|
+
bank name may be derived; prefer BIN for pre-authorization lists.
|
|
15
|
+
|
|
16
|
+
Fit BIN, country, merchant, and other rate lists on train only. Tiny lists remain
|
|
17
|
+
monitor-only.
|
|
18
|
+
|
|
19
|
+
## Actions and impact
|
|
20
|
+
|
|
21
|
+
Actions: block, require 3DS/additional authentication, route, manual review, or
|
|
22
|
+
monitor. For 3DS scenarios, failed authentication does not enter the subsequent
|
|
23
|
+
authorization denominator. Report authorization success and absolute approval
|
|
24
|
+
change only when measured or under explicit pass/conversion assumptions.
|
|
25
|
+
|
|
26
|
+
## Review overlay
|
|
27
|
+
|
|
28
|
+
- Current CVV/AVS/auth response/3DS result respects decision timing.
|
|
29
|
+
- BIN lists are train-fit; issuer names are operable only if available live.
|
|
30
|
+
- 3DS and authorization denominators are explicit.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Context: payment collection
|
|
2
|
+
|
|
3
|
+
Typical grains are collection attempt, receipt, settlement, return, or linked
|
|
4
|
+
collection-to-outflow sequence. State whether funds are card, bank debit,
|
|
5
|
+
transfer, cash-equivalent, or mixed because timing and reversibility differ.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
Payer and funding-source novelty, amount and velocity, return history, settlement
|
|
10
|
+
state known at decision time, payer concentration, many-payer fan-in, linked
|
|
11
|
+
accounts/devices, account age, and elapsed time from receipt to intended outflow.
|
|
12
|
+
|
|
13
|
+
Do not use a later return, recall, dispute, or investigation outcome to decide an
|
|
14
|
+
earlier collection. Do not describe unsettled or reversible funds as final.
|
|
15
|
+
|
|
16
|
+
## Actions and impact
|
|
17
|
+
|
|
18
|
+
Actions: accept, review, delay availability, reserve, restrict downstream use,
|
|
19
|
+
or reject where supported. Measure accepted/held value, return and loss exposure,
|
|
20
|
+
funds-availability delay, review workload, and legitimate-customer impact.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Context: payout
|
|
2
|
+
|
|
3
|
+
Typical grains are beneficiary setup, payout request, approval, release,
|
|
4
|
+
completion, return, or investigation. State the rule's exact decision point.
|
|
5
|
+
|
|
6
|
+
## Features
|
|
7
|
+
|
|
8
|
+
Beneficiary novelty and sharing, payout velocity and amount, balance-drain ratio,
|
|
9
|
+
time from collection to payout, account age, KYC state, device/account links,
|
|
10
|
+
fan-out, counterparty concentration, prior returns, and point-in-time graph risk.
|
|
11
|
+
|
|
12
|
+
Do not use later payout completion, return, recall, restriction, or investigation
|
|
13
|
+
as a pre-release feature.
|
|
14
|
+
|
|
15
|
+
## Actions and impact
|
|
16
|
+
|
|
17
|
+
Actions: approve, verify, review, delay, hold, reject, restrict account, or
|
|
18
|
+
monitor where policy permits. Measure held/reviewed count and value, payout
|
|
19
|
+
completion, release delay, review workload, legitimate-customer intervention,
|
|
20
|
+
exposure, and confirmed value captured.
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Shared feature engineering
|
|
2
|
+
|
|
3
|
+
Read this in Step 4 after pre-flight passes, the analysis profile is selected,
|
|
4
|
+
and its packs are loaded.
|
|
5
|
+
This file defines invariants. Archetype, mechanism, and context packs supply the
|
|
6
|
+
actual feature families and operational constraints.
|
|
7
|
+
|
|
8
|
+
The goal is a small set of interpretable, decision-time-valid inputs that can
|
|
9
|
+
become rules. Build thresholds, lists, rates, and graph artifacts on train only.
|
|
10
|
+
|
|
11
|
+
## 1. Declare grain and decision point
|
|
12
|
+
|
|
13
|
+
Name what one scored row represents and when the rule fires. Examples include a
|
|
14
|
+
login, card authorization, collection receipt, beneficiary creation, transfer
|
|
15
|
+
instruction, payout request, or investigation case.
|
|
16
|
+
|
|
17
|
+
A feature is usable only if its value existed at that decision point in the live
|
|
18
|
+
workflow. Correlation with the eventual label is insufficient.
|
|
19
|
+
|
|
20
|
+
For linked journeys, a rule may use prior event types, but never a future event:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
login → profile change → beneficiary creation → collection → transfer → payout
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The position of the scored event determines what is known.
|
|
27
|
+
|
|
28
|
+
## 2. Classify every field
|
|
29
|
+
|
|
30
|
+
For each source and engineered field, record:
|
|
31
|
+
|
|
32
|
+
1. Business meaning
|
|
33
|
+
2. Event grain
|
|
34
|
+
3. When it becomes known
|
|
35
|
+
4. Whether it is the label or a synonym
|
|
36
|
+
5. Whether it uses current, prior, or future events
|
|
37
|
+
6. Whether the identity link is strong enough for the claim
|
|
38
|
+
|
|
39
|
+
Place it in one list:
|
|
40
|
+
|
|
41
|
+
- **Allowed now** — decision-time-valid and variable
|
|
42
|
+
- **Excluded: zero variance** — baseline context, not a feature
|
|
43
|
+
- **Excluded: timing** — real information available too late
|
|
44
|
+
- **Excluded: leakage** — target, synonym, or post-outcome artifact
|
|
45
|
+
- **Context only** — useful description but not operable in the target system
|
|
46
|
+
|
|
47
|
+
Do not silently drop exclusions. Include them in analysis notes and summarize
|
|
48
|
+
material exclusions in the report appendix.
|
|
49
|
+
|
|
50
|
+
## 3. Shared feature families
|
|
51
|
+
|
|
52
|
+
Use only families supported by the selected packs and source data:
|
|
53
|
+
|
|
54
|
+
- Current-event attributes: amount, currency, channel, product, state available
|
|
55
|
+
at decision time
|
|
56
|
+
- Entity history: customer, account, instrument, beneficiary, device, session,
|
|
57
|
+
IP, email, phone, merchant, or counterparty
|
|
58
|
+
- Velocity: prior counts, amounts, distinct entities, and elapsed time over
|
|
59
|
+
operational windows
|
|
60
|
+
- Novelty and deviation: new entity, behavior unlike the entity's prior history,
|
|
61
|
+
amount relative to prior behavior
|
|
62
|
+
- Sequences: explicit prior-event patterns across the money or access journey
|
|
63
|
+
- Networks: fan-in, fan-out, shared identifiers, clusters, and risky-neighbor
|
|
64
|
+
evidence from a point-in-time graph
|
|
65
|
+
- Train-fit lists: entities or segments with minimum support and elevated rate
|
|
66
|
+
|
|
67
|
+
## 4. Point-in-time history
|
|
68
|
+
|
|
69
|
+
- Sort events deterministically by time within each identity key.
|
|
70
|
+
- Use timestamps strictly before the current event. Define tie behavior.
|
|
71
|
+
- Holdout rows may use train-era history that predates the row.
|
|
72
|
+
- Never use the current row's outcome in its own features.
|
|
73
|
+
- Graph nodes, edges, labels, and aggregates must be snapshots as of the event.
|
|
74
|
+
- Outcome labels become historical evidence only after they would have been known
|
|
75
|
+
operationally, not merely after the underlying transaction occurred.
|
|
76
|
+
|
|
77
|
+
Use windows operations can implement, such as 10m, 1h, 24h, or 7d. Avoid exact
|
|
78
|
+
sequences and fine windows selected only because they maximize train fit.
|
|
79
|
+
|
|
80
|
+
## 5. Identity-link quality
|
|
81
|
+
|
|
82
|
+
Document whether keys identify a person, account, instrument, device, session,
|
|
83
|
+
or merely a shared attribute. Masked identifiers, IPs, addresses, and devices may
|
|
84
|
+
collide or be shared.
|
|
85
|
+
|
|
86
|
+
- Do not turn a weak key into a claimed unique customer or account.
|
|
87
|
+
- Do not infer knowing participation from shared infrastructure alone.
|
|
88
|
+
- Distinguish deterministic links from probabilistic links.
|
|
89
|
+
- Keep network-derived high-risk lists monitor-only when link quality or actor
|
|
90
|
+
attribution is weak.
|
|
91
|
+
|
|
92
|
+
## 6. Labels and outcome maturity
|
|
93
|
+
|
|
94
|
+
Fraud, scam, recalls, returns, disputes, reimbursements, investigations, and
|
|
95
|
+
account restrictions often mature after the event.
|
|
96
|
+
|
|
97
|
+
- Define when an outcome becomes observable.
|
|
98
|
+
- Exclude immature recent events or treat them as unlabeled, not clean negatives.
|
|
99
|
+
- Record whether the label comes from an existing outcome column or a
|
|
100
|
+
user-defined condition.
|
|
101
|
+
- For an existing row-level outcome column, mapped positive values may use all
|
|
102
|
+
other mature values as negative unless an explicit pending/unknown/unlabeled
|
|
103
|
+
value exists. State this assumption and preserve those explicit states as
|
|
104
|
+
unlabeled.
|
|
105
|
+
- For a user-defined positive condition, require a separate user-defined
|
|
106
|
+
negative condition. Rows outside the positive condition are not automatically
|
|
107
|
+
negative.
|
|
108
|
+
- Verify positive and negative conditions are disjoint. Exclude rows matching
|
|
109
|
+
neither or both from supervised metrics and report their count.
|
|
110
|
+
- Fit label-rate lists on mature train outcomes only.
|
|
111
|
+
- Do not use an operational action as both label and feature.
|
|
112
|
+
- Do not blend separate archetypes into a single positive label.
|
|
113
|
+
|
|
114
|
+
## 7. Train-fit thresholds and lists
|
|
115
|
+
|
|
116
|
+
- Propose thresholds from business meaning or train distributions.
|
|
117
|
+
- Require minimum support for entity, graph, or segment lists.
|
|
118
|
+
- Freeze conditions and memberships before holdout scoring.
|
|
119
|
+
- Apply frozen artifacts to holdout without reranking on holdout outcomes.
|
|
120
|
+
- Small-N spikes remain monitoring candidates.
|
|
121
|
+
|
|
122
|
+
## 8. Rule-ready conditions
|
|
123
|
+
|
|
124
|
+
Every shortlisted candidate must specify:
|
|
125
|
+
|
|
126
|
+
```text
|
|
127
|
+
event grain + decision point + fields + operator + threshold/list + units + window
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Prefer:
|
|
131
|
+
|
|
132
|
+
- `amount >= <currency threshold>` over “high amount”
|
|
133
|
+
- `prior_attempts_1h >= 3` over “high velocity”
|
|
134
|
+
- `beneficiary_age_minutes <= 30` over “new beneficiary”
|
|
135
|
+
- `entity in train_fit_watchlist_v1` over a holdout-ranked list
|
|
136
|
+
|
|
137
|
+
## 9. Universal do-not list
|
|
138
|
+
|
|
139
|
+
- Do not use zero-variance fields as rule conditions.
|
|
140
|
+
- Do not use future events, current outcomes, or investigation results.
|
|
141
|
+
- Do not treat technical authentication as proof of customer consent.
|
|
142
|
+
- Do not infer victim, perpetrator, mule, or facilitator role from behavior alone.
|
|
143
|
+
- Do not fit thresholds, rates, graph lists, or watchlists on holdout.
|
|
144
|
+
- Do not present proxy labels as confirmed fraud or loss avoided.
|
|
145
|
+
- Do not invent missing fields, identity links, currencies, or event semantics.
|
|
146
|
+
|
|
147
|
+
## 10. Ready-for-selection checklist
|
|
148
|
+
|
|
149
|
+
- [ ] Analysis profile loaded
|
|
150
|
+
- [ ] Event grain and decision point stated
|
|
151
|
+
- [ ] Outcome maturity defined
|
|
152
|
+
- [ ] Label provenance and positive/negative/unlabeled definitions recorded
|
|
153
|
+
- [ ] Positive and negative conditions are disjoint
|
|
154
|
+
- [ ] Fields classified into allowed/excluded/context-only lists
|
|
155
|
+
- [ ] History and graph features are point-in-time
|
|
156
|
+
- [ ] Identity-link strength documented
|
|
157
|
+
- [ ] Thresholds and lists fit on train only
|
|
158
|
+
- [ ] Candidates expressed as operable conditions
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Mechanism: account takeover
|
|
2
|
+
|
|
3
|
+
An external actor gains control of a genuine customer's account or authenticated
|
|
4
|
+
session. This normally composes with `third-party-fraud`; if consent or knowing
|
|
5
|
+
participation is unresolved, keep the archetype `unclassified`.
|
|
6
|
+
|
|
7
|
+
## Key distinction
|
|
8
|
+
|
|
9
|
+
Technical authentication is not customer consent. A criminal may pass password,
|
|
10
|
+
MFA, device, session, or transaction authentication using compromised access.
|
|
11
|
+
|
|
12
|
+
## Feature families
|
|
13
|
+
|
|
14
|
+
- New device, browser, IP, ASN, geography, or session
|
|
15
|
+
- Password, MFA, phone, email, recovery, or trusted-device changes
|
|
16
|
+
- Failed-login bursts, credential-stuffing indicators, and impossible travel
|
|
17
|
+
- Session age, authentication strength, and deviation from trusted behavior
|
|
18
|
+
- New beneficiary after access changes; login-to-transfer/payout velocity
|
|
19
|
+
- Shared devices, IPs, recovery identifiers, or beneficiaries across accounts
|
|
20
|
+
|
|
21
|
+
Only use events before the rule's decision point. Do not use later compromise
|
|
22
|
+
confirmation, customer contact, session revocation, or investigation findings.
|
|
23
|
+
|
|
24
|
+
## Actions
|
|
25
|
+
|
|
26
|
+
Depending on context: terminate session, require reauthentication through an
|
|
27
|
+
independent channel, reset credentials, remove trusted devices, cool off new
|
|
28
|
+
beneficiaries, hold/review money movement, and restrict the account where policy
|
|
29
|
+
permits.
|
|
30
|
+
|
|
31
|
+
## Review overlay
|
|
32
|
+
|
|
33
|
+
- Authentication success is not described as genuine-customer authorization.
|
|
34
|
+
- Recovery and profile-change timestamps precede the scored event.
|
|
35
|
+
- Device/IP novelty uses only prior customer history.
|
|
36
|
+
- Shared infrastructure such as carrier NAT is not treated as identity proof.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Report rationale (agent only)
|
|
2
|
+
|
|
3
|
+
This explains the business report contract. Do not copy it into deliverables.
|
|
4
|
+
|
|
5
|
+
## Why composition matters
|
|
6
|
+
|
|
7
|
+
Archetype, mechanism, and context answer different questions:
|
|
8
|
+
|
|
9
|
+
- Archetype identifies the genuine customer's relationship to fraud.
|
|
10
|
+
- Mechanism explains compromise, deception, or deliberate abuse.
|
|
11
|
+
- Context identifies the operational control point and business denominator.
|
|
12
|
+
|
|
13
|
+
Keeping them independent prevents category errors such as treating account
|
|
14
|
+
takeover as a peer of first-party fraud, treating every authenticated transfer as
|
|
15
|
+
customer-authorized, or applying 3DS and authorization-success metrics to payout
|
|
16
|
+
and collection controls.
|
|
17
|
+
|
|
18
|
+
## Report choices
|
|
19
|
+
|
|
20
|
+
| Choice | Reason |
|
|
21
|
+
|---|---|
|
|
22
|
+
| Profile before label | The same status can represent different actors and outcomes across archetypes |
|
|
23
|
+
| Explicit negative class | Precision, recall, and lift are undefined or misleading when “not positive” silently mixes genuine negatives with unknown outcomes |
|
|
24
|
+
| Consent separate from authentication | Compromised credentials can pass technical checks |
|
|
25
|
+
| Reader order differs from workflow | Operators need decisions before methodology |
|
|
26
|
+
| Standalone strategy impact | Portfolio friction and exposure determine whether rules should ship |
|
|
27
|
+
| Count/rate and amount/share | Both operational volume and value matter |
|
|
28
|
+
| Context-specific impact | Authorization, completion, delay, review, and exposure use different denominators |
|
|
29
|
+
| Proxy and maturity disclosure | Delayed outcomes and operational actions are not confirmed fraud by default |
|
|
30
|
+
| Point-in-time graphs | Future counterparties and investigations otherwise leak into earlier events |
|
|
31
|
+
| No review process in report | Review metadata is not business content |
|
|
32
|
+
|
|
33
|
+
## Domain examples
|
|
34
|
+
|
|
35
|
+
- `third-party-fraud + card-payment` loads card/BIN/3DS and authorization-impact
|
|
36
|
+
guidance.
|
|
37
|
+
- `third-party-fraud + account-takeover + bank-transfer` loads access/session,
|
|
38
|
+
beneficiary, transfer, and consent-versus-authentication guidance.
|
|
39
|
+
- `first-party-fraud + payment-collection + payout` loads money-flow, graph,
|
|
40
|
+
settlement, hold, workload, delay, and exposure guidance.
|
|
41
|
+
- `authorized-payment-scam + bank-transfer + app-scam` loads deception,
|
|
42
|
+
beneficiary, warnings, completion, reimbursement, and customer-impact guidance.
|
|
43
|
+
|
|
44
|
+
If archetype attribution is unresolved, the report should say so and limit claims
|
|
45
|
+
and actions accordingly rather than manufacturing certainty.
|