@1aboveio/skills 0.14.0 → 0.16.1

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 (54) hide show
  1. package/README.md +8 -2
  2. package/package.json +1 -1
  3. package/runtime/skills/distribution/generated/recipes.json +178 -34
  4. package/runtime/skills/distribution/scripts/bundles.mjs +11 -3
  5. package/runtime/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +1 -1
  6. package/skills/{backend → data-science}/pyspark/SKILL.md +42 -40
  7. package/skills/{backend → data-science}/pyspark/references/diagnosis-and-profiling.md +28 -13
  8. package/skills/data-science/pyspark/references/production-validation.md +130 -0
  9. package/skills/data-science/pyspark/references/reconciliation.md +38 -0
  10. package/skills/{backend → data-science}/pyspark/references/transformation-design.md +30 -2
  11. package/skills/engineering/engineering-runtime/coherence/workflow.json +14 -14
  12. package/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +1 -1
  13. package/skills/engineering/resolve-issues/generated/workflow-repair-policy.json +11 -11
  14. package/skills/engineering/resolve-issues/scripts/run-state.mjs +1 -1
  15. package/skills/payment/fraud-analysis/LICENSE +3 -0
  16. package/skills/payment/fraud-analysis/SKILL.md +113 -0
  17. package/skills/payment/fraud-analysis/evals/evals.json +40 -0
  18. package/skills/payment/fraud-analysis/references/archetypes/authorized-payment-scam.md +41 -0
  19. package/skills/payment/fraud-analysis/references/archetypes/first-party-fraud.md +44 -0
  20. package/skills/payment/fraud-analysis/references/archetypes/third-party-fraud.md +27 -0
  21. package/skills/payment/fraud-analysis/references/contexts/bank-transfer.md +24 -0
  22. package/skills/payment/fraud-analysis/references/contexts/card-payment.md +30 -0
  23. package/skills/payment/fraud-analysis/references/contexts/payment-collection.md +20 -0
  24. package/skills/payment/fraud-analysis/references/contexts/payout.md +20 -0
  25. package/skills/payment/fraud-analysis/references/feature-engineering.md +158 -0
  26. package/skills/payment/fraud-analysis/references/mechanisms/account-takeover.md +36 -0
  27. package/skills/payment/fraud-analysis/references/report-rationale.md +45 -0
  28. package/skills/payment/fraud-analysis/references/report-template.md +190 -0
  29. package/skills/payment/fraud-analysis/references/review-checklist.md +175 -0
  30. package/skills/payment/fraud-analysis/references/taxonomy.md +79 -0
  31. package/skills/payment/fraud-analysis/references/terminology.md +108 -0
  32. package/skills/payment/fraud-analysis/references/workflow.md +175 -0
  33. package/skills/payment/payment-analysis/LICENSE +3 -0
  34. package/skills/payment/payment-analysis/SKILL.md +127 -0
  35. package/skills/payment/payment-analysis/references/auth-rate-actions.md +30 -0
  36. package/skills/payment/payment-analysis/references/chargebacks.md +88 -0
  37. package/skills/payment/payment-analysis/references/event-layers.md +79 -0
  38. package/skills/payment/payment-analysis/references/fx.md +59 -0
  39. package/skills/payment/payment-analysis/references/journey.md +78 -0
  40. package/skills/payment/payment-analysis/references/metrics.md +62 -0
  41. package/skills/payment/payment-analysis/references/report-template.md +98 -0
  42. package/skills/payment/payment-analysis/references/terminology.md +85 -0
  43. package/skills/payment/payment-analysis/references/visualization.md +47 -0
  44. package/skills/backend/pyspark/references/parity-testing.md +0 -83
  45. package/skills/backend/pyspark/references/production-validation.md +0 -166
  46. /package/skills/{backend → data-science}/airflow-dag-develop/LICENSE +0 -0
  47. /package/skills/{backend → data-science}/airflow-dag-develop/SKILL.md +0 -0
  48. /package/skills/{backend → data-science}/pyspark/LICENSE +0 -0
  49. /package/skills/{backend → data-science}/pyspark/assets/templates/etl.py +0 -0
  50. /package/skills/{backend → data-science}/pyspark/assets/templates/utils/__init__.py +0 -0
  51. /package/skills/{backend → data-science}/pyspark/assets/templates/utils/hudi_metadata.py +0 -0
  52. /package/skills/{backend → data-science}/pyspark/references/etl-contract.md +0 -0
  53. /package/skills/{backend → data-science}/pyspark/references/velocity-feature-calculation.md +0 -0
  54. /package/skills/{backend → data-science}/pyspark/scripts/spark_eventlog_summary.py +0 -0
@@ -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.
@@ -0,0 +1,190 @@
1
+ # Business report contract
2
+
3
+ Read this in Step 8 with the selected profile packs and
4
+ [terminology.md](terminology.md). This file owns common reader order and metric
5
+ presentation. Profile packs own domain-specific actions, sections, denominators,
6
+ and impact measures.
7
+
8
+ ## Required chapter order
9
+
10
+ 1. 执行摘要
11
+ 2. 抽样、分析画像与标签定义
12
+ 3. 规则发现
13
+ 4. 策略整体影响
14
+ 5. 特征
15
+ 6. 附录
16
+
17
+ Do not title chapters as analysis steps. Keep review details out of the report.
18
+
19
+ ## 1. 执行摘要
20
+
21
+ Use no more than five top-level findings:
22
+
23
+ 1. Analysis profile, sample span, and positive-label baseline
24
+ 2. Adopted rule classes and domain-appropriate actions
25
+ 3. Adopted strategy package impact
26
+ 4. Material attribution or validation limitation, only when decision-critical
27
+
28
+ For strategy impact, report triggered count/rate and amount/share, followed by
29
+ precision and recall. Add the selected contexts' main customer, operations,
30
+ conversion, delay, exposure, or loss measure.
31
+
32
+ Nested numbered lists use three-space indentation and `1.`, `2.`, `3.` markers.
33
+ Do not use Markdown bold markers in the report body.
34
+
35
+ ## 2. 抽样、分析画像与标签定义
36
+
37
+ ### 2.1 样本范围
38
+
39
+ Data source, event grains, time span, currencies, and portfolio constants.
40
+
41
+ ### 2.2 分析画像与归因
42
+
43
+ Use a compact table:
44
+
45
+ | Field | Value |
46
+ |---|---|
47
+ | Archetype | Third-party fraud / First-party fraud / Authorized payment scam / Unclassified |
48
+ | Customer role | Victim / Perpetrator / Knowing participant / Facilitator / Unknown |
49
+ | Customer consent | Present / Absent / Disputed / Unknown |
50
+ | Technical authentication | Passed / Failed / Not applicable / Unknown |
51
+ | Mechanism | e.g. Account takeover |
52
+ | Context | Card payment / Collection / Bank transfer / Payout |
53
+ | Attribution confidence | Confirmed / Probable / Proxy / Unknown |
54
+ | Decision point | Exact operational point |
55
+
56
+ Explain unresolved attribution. Do not imply consent from authentication.
57
+
58
+ ### 2.3 标签定义
59
+
60
+ State label provenance (`file-column` or `user-defined`), confirmed versus proxy,
61
+ and maturity window. Define and count all three populations:
62
+
63
+ | Population | Required content |
64
+ |---|---|
65
+ | Positive | Exact values/conditions and count |
66
+ | Negative | Exact values/conditions and count |
67
+ | Unlabeled | Pending, immature, unknown, overlapping, or out-of-scope conditions and count |
68
+
69
+ Report the positive base rate among labeled rows and its denominator. If an
70
+ existing outcome column supplies the positive label, disclose the assumption
71
+ that its other mature, non-explicitly-unlabeled values are negative. If the user
72
+ defined the positive condition, show the separately supplied negative condition.
73
+ Separate labels for separate archetypes.
74
+
75
+ ### 2.4 时间切分
76
+
77
+ State cut and train/holdout sizes, or state that metrics are in-sample and
78
+ unvalidated. Name the decision point again in one line.
79
+
80
+ ## 3. 规则发现
81
+
82
+ ### 3.1 规则清单与验证集指标
83
+
84
+ Suggested columns:
85
+
86
+ ```text
87
+ 规则类 | 事件与决策时点 | 条件 | 触发率 | 精准率 | 召回率 | lift | 建议动作
88
+ ```
89
+
90
+ - Group conditions into a few operational rule classes.
91
+ - State explicit windows, units, currency, and frozen-list versions.
92
+ - Use actions supplied by selected context packs.
93
+ - List rules once. Multi-rule unions belong to strategy packages in chapter 4.
94
+
95
+ ### 3.2 稳定性与归因
96
+
97
+ Report temporal instability, small support, weak identity links, proxy outcomes,
98
+ and actor-attribution uncertainty that change action severity.
99
+
100
+ ### 3.3 可落地运营建议
101
+
102
+ Describe the default package and optional higher-coverage package. Identify
103
+ policy, legal, rail, and operational dependencies for severe interventions.
104
+
105
+ ## 4. 策略整体影响
106
+
107
+ This is always a standalone chapter.
108
+
109
+ ### 4.1 触发覆盖与标签效果
110
+
111
+ For every package/action row, report in this order:
112
+
113
+ 1. Triggered count and rate
114
+ 2. Triggered amount and amount share, with currency
115
+ 3. Precision
116
+ 4. Recall
117
+
118
+ Suggested columns:
119
+
120
+ ```text
121
+ 方案 | 动作 | 触发笔数 | 触发率 | 金额 | 金额占比 | 精准率 | 召回率
122
+ ```
123
+
124
+ For mixed currencies without FX conversion, do not sum unlike currencies; show
125
+ separate currency rows or explicitly label any supplied reporting currency.
126
+
127
+ ### 4.2 Domain impact
128
+
129
+ Use only measures required by selected context packs:
130
+
131
+ | Context | Typical measures |
132
+ |---|---|
133
+ | Card payment | 3DS/block coverage, authorization success, approval count |
134
+ | Collection | availability delay, return/loss exposure, accepted value |
135
+ | Bank transfer | completion/abandonment, warning/review load, delay, reimbursement exposure |
136
+ | Payout | completion/release, hold duration, review load, exposure |
137
+
138
+ Separate observed measures from scenario estimates. State every scenario
139
+ assumption and denominator. Do not claim loss prevented from proxy labels.
140
+
141
+ ### 4.3 方案比较(optional)
142
+
143
+ Compare one recommended and one higher-coverage package under identical
144
+ assumptions. Keep stricter non-default actions visibly separate.
145
+
146
+ ## 5. 特征
147
+
148
+ ### 5.1 入选短名单
149
+ ### 5.2 候选特征集
150
+ ### 5.3 训练拟合的观察名单或图谱特征(when applicable)
151
+
152
+ Keep this shorter than rule findings. Name point-in-time construction and weak
153
+ links where material.
154
+
155
+ ## 6. 附录
156
+
157
+ ### A. 决策时点与字段排除
158
+ ### B. 标签成熟度、时间切分与训练指标
159
+ ### C. 仅描述性信号与未入选候选
160
+ ### D. 假设、限制与政策依赖
161
+
162
+ ## Skeleton
163
+
164
+ ```markdown
165
+ # 风险规则分析 — <scope>
166
+
167
+ 数据源:`…`
168
+ 分析画像:<archetype> / <mechanism> / <contexts>
169
+ 决策时点:<event and point>
170
+
171
+ ## 1. 执行摘要
172
+ ## 2. 抽样、分析画像与标签定义
173
+ ### 2.1 样本范围
174
+ ### 2.2 分析画像与归因
175
+ ### 2.3 标签定义
176
+ ### 2.4 时间切分
177
+ ## 3. 规则发现
178
+ ### 3.1 规则清单与验证集指标
179
+ ### 3.2 稳定性与归因
180
+ ### 3.3 可落地运营建议
181
+ ## 4. 策略整体影响
182
+ ### 4.1 触发覆盖与标签效果
183
+ ### 4.2 <selected context impact>
184
+ ### 4.3 方案比较
185
+ ## 5. 特征
186
+ ### 5.1 入选短名单
187
+ ### 5.2 候选特征集
188
+ ### 5.3 观察名单或图谱特征
189
+ ## 6. 附录
190
+ ```