@1aboveio/skills 1.0.9 → 1.0.11

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 (213) hide show
  1. package/.codex-plugin/plugin.json +1 -1
  2. package/.codex-plugin/resources.json +297 -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 +124 -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 +37 -0
  86. package/skills/engineering/engineering/scripts/init.mjs +160 -0
  87. package/skills/engineering/{contributing → engineering}/scripts/persist-conventions.mjs +1 -1
  88. package/skills/engineering/engineering-runtime/SKILL.md +1 -1
  89. package/skills/engineering/engineering-runtime/coherence/workflow.json +19 -19
  90. package/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +1 -1
  91. package/skills/engineering/ensure-coverage/SKILL.md +22 -109
  92. package/skills/engineering/ensure-coverage/references/breadth/coverage-ledger.md +7 -5
  93. package/skills/engineering/ensure-coverage/references/breadth/surface-baseline.md +4 -4
  94. package/skills/engineering/ensure-coverage/references/breadth/surface-discovery.md +3 -3
  95. package/skills/engineering/ensure-coverage/references/depth/characterization.md +4 -65
  96. package/skills/engineering/ensure-coverage/references/depth/grading.md +5 -7
  97. package/skills/engineering/ensure-coverage/references/depth/mock-policy.md +6 -12
  98. package/skills/engineering/ensure-coverage/references/enforcement/ci-contract.md +1 -1
  99. package/skills/engineering/ensure-coverage/references/presentation/axis.md +6 -6
  100. package/skills/engineering/ensure-coverage/references/process/audit-mode.md +7 -23
  101. package/skills/engineering/ensure-coverage/references/process/output-template.md +18 -133
  102. package/skills/engineering/ensure-coverage/references/process/test-strategy.md +7 -12
  103. package/skills/engineering/ensure-coverage/scripts/README.md +12 -4
  104. package/skills/engineering/golden-path/SKILL.md +1 -1
  105. package/skills/engineering/harness-runtime/SKILL.md +3 -1
  106. package/skills/engineering/harness-runtime/bin/workspaces.mjs +52 -0
  107. package/skills/engineering/harness-runtime/native-workspace.mjs +239 -0
  108. package/skills/engineering/harness-runtime/references/workspaces.md +78 -0
  109. package/skills/engineering/harness-runtime/workspace-lifecycle.mjs +2154 -0
  110. package/skills/engineering/resolve-issues/SKILL.md +40 -61
  111. package/skills/engineering/resolve-issues/references/ci.md +13 -3
  112. package/skills/engineering/resolve-issues/references/delivery-progress.md +4 -3
  113. package/skills/engineering/resolve-issues/references/done.md +11 -2
  114. package/skills/engineering/resolve-issues/references/expire.md +9 -2
  115. package/skills/engineering/resolve-issues/references/implementation.md +33 -17
  116. package/skills/engineering/resolve-issues/references/preflight.md +3 -1
  117. package/skills/engineering/resolve-issues/references/principles.md +52 -0
  118. package/skills/engineering/resolve-issues/references/review.md +25 -15
  119. package/skills/engineering/resolve-issues/references/task-plan.md +64 -27
  120. package/skills/engineering/resolve-issues/references/workspaces.md +164 -0
  121. package/skills/engineering/resolve-issues/scripts/cleanup-runs.mjs +185 -317
  122. package/skills/engineering/resolve-issues/scripts/next-actions.mjs +44 -7
  123. package/skills/engineering/resolve-issues/scripts/rehydrate.mjs +36 -2
  124. package/skills/engineering/resolve-issues/scripts/review-verdict.mjs +9 -8
  125. package/skills/engineering/resolve-issues/scripts/workspace-lifecycle.mjs +1 -0
  126. package/skills/engineering/resolve-release/SKILL.md +1 -1
  127. package/skills/engineering/rush-issues/SKILL.md +7 -5
  128. package/skills/engineering/rush-release/SKILL.md +1 -1
  129. package/skills/engineering/test-quality/SKILL.md +19 -4
  130. package/skills/engineering/test-quality/references/lint.md +1 -1
  131. package/skills/engineering/test-quality/references/principles.md +2 -2
  132. package/skills/engineering/test-quality/references/testing-conventions.md +1 -1
  133. package/skills/risk-compliance/compliance-audit/SKILL.md +4 -8
  134. package/skills/risk-compliance/compliance-audit/references/audience-and-reports.md +12 -0
  135. package/skills/risk-compliance/contract-compare/SKILL.md +17 -1
  136. package/skills/risk-compliance/contract-review/SKILL.md +6 -1
  137. package/skills/risk-compliance/contract-review/references/report-stage.md +17 -0
  138. package/skills/risk-compliance/doc-authenticity/SKILL.md +11 -1
  139. package/skills/risk-compliance/fraud-detection/LICENSE +3 -0
  140. package/skills/risk-compliance/fraud-detection/SKILL.md +148 -0
  141. package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/archetypes/first-party-fraud.md +3 -2
  142. package/skills/risk-compliance/fraud-detection/references/archetypes/third-party-fraud.md +47 -0
  143. package/skills/risk-compliance/fraud-detection/references/collection-payout-features.md +151 -0
  144. package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/contexts/bank-transfer.md +4 -3
  145. package/skills/risk-compliance/fraud-detection/references/contexts/card-payment.md +70 -0
  146. package/skills/risk-compliance/fraud-detection/references/contexts/payment-collection.md +34 -0
  147. package/skills/risk-compliance/fraud-detection/references/contexts/payout.md +34 -0
  148. package/skills/risk-compliance/fraud-detection/references/enrichment.md +74 -0
  149. package/skills/risk-compliance/fraud-detection/references/entities.md +48 -0
  150. package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/feature-engineering.md +69 -33
  151. package/skills/risk-compliance/fraud-detection/references/feature-sql.md +150 -0
  152. package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/report-rationale.md +4 -2
  153. package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/report-template.md +45 -23
  154. package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/review-checklist.md +60 -20
  155. package/skills/risk-compliance/fraud-detection/references/workflow.md +216 -0
  156. package/skills/risk-compliance/fraud-detection/release-check.mjs +95 -0
  157. package/skills/risk-compliance/payment-analysis/SKILL.md +36 -17
  158. package/skills/risk-compliance/payment-analysis/references/auth-rate-actions.md +2 -2
  159. package/skills/risk-compliance/payment-analysis/references/report-template.md +10 -2
  160. package/skills/risk-compliance/payment-analysis/references/visualization.md +11 -1
  161. package/skills/risk-compliance/portfolio-payment-analysis/LICENSE +3 -0
  162. package/skills/risk-compliance/portfolio-payment-analysis/SKILL.md +170 -0
  163. package/skills/risk-compliance/portfolio-payment-analysis/references/identity-and-reconciliation.md +46 -0
  164. package/skills/risk-compliance/portfolio-payment-analysis/references/metrics-and-reporting.md +170 -0
  165. package/skills/risk-compliance/portfolio-payment-analysis/references/risk-history.md +89 -0
  166. package/skills/risk-compliance/portfolio-payment-analysis/release-check.mjs +95 -0
  167. package/skills/risk-compliance/portfolio-payment-analysis/scripts/analyze.py +636 -0
  168. package/skills/risk-compliance/portfolio-payment-analysis/scripts/build_report.py +386 -0
  169. package/skills/risk-compliance/portfolio-payment-analysis/scripts/comparison_charts.py +425 -0
  170. package/skills/risk-compliance/portfolio-payment-analysis/scripts/csv_export.py +52 -0
  171. package/skills/risk-compliance/portfolio-payment-analysis/scripts/render.py +160 -0
  172. package/skills/risk-compliance/portfolio-payment-analysis/scripts/risk_history.py +435 -0
  173. package/skills/risk-compliance/similar-domain/SKILL.md +9 -4
  174. package/skills/risk-compliance/tld-detection/SKILL.md +124 -239
  175. package/skills/risk-compliance/tld-detection/agents/openai.yaml +1 -1
  176. package/skills/risk-compliance/tld-detection/references/clean.md +18 -51
  177. package/skills/risk-compliance/tld-detection/references/fx-conversion.md +56 -219
  178. package/skills/risk-compliance/tld-detection/references/metric-contract.md +109 -0
  179. package/skills/risk-compliance/tld-detection/references/pattern.md +99 -0
  180. package/skills/risk-compliance/tld-detection/references/report-template.md +49 -272
  181. package/skills/risk-compliance/tld-detection/scripts/detect_ladders.py +46 -13
  182. package/skills/risk-compliance/tld-detection/scripts/detect_patterns.py +346 -0
  183. package/skills/risk-compliance/tld-detection/scripts/detect_streams.py +51 -19
  184. package/skills/risk-compliance/tld-detection/scripts/profile_groups.py +109 -0
  185. package/skills/risk-compliance/tld-detection/scripts/render_charts.py +218 -0
  186. package/skills/risk-compliance/tld-detection/scripts/tld_common.py +243 -0
  187. package/skills/engineering/contributing/SKILL.md +0 -70
  188. package/skills/risk-compliance/fraud-analysis/SKILL.md +0 -114
  189. package/skills/risk-compliance/fraud-analysis/references/archetypes/third-party-fraud.md +0 -27
  190. package/skills/risk-compliance/fraud-analysis/references/contexts/card-payment.md +0 -30
  191. package/skills/risk-compliance/fraud-analysis/references/contexts/payment-collection.md +0 -20
  192. package/skills/risk-compliance/fraud-analysis/references/contexts/payout.md +0 -20
  193. package/skills/risk-compliance/fraud-analysis/references/workflow.md +0 -175
  194. package/skills/risk-compliance/tld-detection/references/chinese-polish.md +0 -55
  195. package/skills/risk-compliance/tld-detection/references/clustering.md +0 -235
  196. package/skills/risk-compliance/tld-detection/references/decision.md +0 -189
  197. package/skills/risk-compliance/tld-detection/references/streams.md +0 -141
  198. package/skills/risk-compliance/tld-detection/references/terminology.md +0 -95
  199. package/skills/risk-compliance/tld-detection/references/workflow.md +0 -95
  200. /package/skills/{engineering/contributing → core/write-report}/LICENSE +0 -0
  201. /package/skills/core/{write-doc → write-report}/references/reports/audit-report-template.md +0 -0
  202. /package/skills/core/{write-doc → write-report}/references/reports/external-assessment-template.md +0 -0
  203. /package/skills/core/{write-doc → write-report}/references/reports/management-report-template.md +0 -0
  204. /package/skills/core/{write-doc → write-report}/references/reports/vars-report-template.md +0 -0
  205. /package/skills/{engineering/contributing → core/write-report}/release-check.mjs +0 -0
  206. /package/skills/{risk-compliance/fraud-analysis → engineering/engineering}/LICENSE +0 -0
  207. /package/skills/engineering/{contributing → engineering}/references/tracker-conventions.md +0 -0
  208. /package/skills/{risk-compliance/fraud-analysis → engineering/engineering}/release-check.mjs +0 -0
  209. /package/skills/engineering/{contributing → engineering}/scripts/persist-conventions-core.mjs +0 -0
  210. /package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/archetypes/authorized-payment-scam.md +0 -0
  211. /package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/mechanisms/account-takeover.md +0 -0
  212. /package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/taxonomy.md +0 -0
  213. /package/skills/risk-compliance/{fraud-analysis → fraud-detection}/references/terminology.md +0 -0
@@ -1,27 +0,0 @@
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.
@@ -1,30 +0,0 @@
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.
@@ -1,20 +0,0 @@
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.
@@ -1,20 +0,0 @@
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.
@@ -1,175 +0,0 @@
1
- # Fraud-analysis workflow (steps 0–9)
2
-
3
- Called from [SKILL.md](../SKILL.md). Paths below are relative to the skill root.
4
-
5
- ## 0 — Pre-flight
6
-
7
- Inspect the input, requested target, and label provenance before planning a
8
- supervised analysis. Record:
9
-
10
- ```yaml
11
- label_provenance: file-column | user-defined | absent
12
- positive_definition: ""
13
- negative_definition: ""
14
- unlabeled_definition: ""
15
- preflight_status: pass | needs-user-input | descriptive-only | blocked
16
- ```
17
-
18
- - Confirm the file is readable and identify its row grain, candidate time field,
19
- outcome/label fields, and requested positive definition.
20
- - When the positive label comes from an existing row-level outcome column, map
21
- its positive value(s). Assume the rest of the mature analysis population is
22
- negative, except explicit missing, pending, unknown, or unlabeled states.
23
- State this assumption and show the observed values to the user when ambiguous.
24
- - When the user defines the positive label as a condition or derived rule,
25
- require the user to define the negative condition during pre-flight. Do not
26
- infer `NOT positive` as negative. Ask one focused clarification and set status
27
- to `needs-user-input` until answered.
28
- - Rows matching neither class, both classes, explicit unknown states, or an
29
- immature outcome window are unlabeled.
30
- - If no usable positive and negative definitions exist, offer descriptive
31
- segmentation without precision/recall, or block supervised analysis.
32
-
33
- Do not proceed to the supervised workflow until pre-flight passes. A
34
- `descriptive-only` analysis may select a profile and explore segments, but it
35
- must not compute precision, recall, lift, or supervised strategy performance.
36
- Profile clarification may be grouped into the same user question when both
37
- label and attribution inputs are missing.
38
-
39
- ## 1 — Select analysis profile
40
-
41
- Read [taxonomy.md](taxonomy.md). Record:
42
-
43
- ```yaml
44
- archetype: third-party-fraud | first-party-fraud | authorized-payment-scam | unclassified
45
- customer_role: victim | perpetrator | knowing-participant | facilitator | unknown
46
- customer_consent: present | absent | disputed | unknown
47
- technical_authentication: passed | failed | not-applicable | unknown
48
- mechanisms: []
49
- contexts: []
50
- subtype: null
51
- attribution_confidence: confirmed | probable | proxy | unknown
52
- event_grain: ""
53
- decision_point: ""
54
- ```
55
-
56
- - Select exactly one primary archetype. Select one or more mechanisms and
57
- contexts when the data supports them.
58
- - Customer consent and technical authentication are separate facts. Passed
59
- login, MFA, or session checks do not prove genuine-customer consent.
60
- - `APP scam` is a subtype of `authorized-payment-scam` in a `bank-transfer`
61
- context; it is not a synonym for first-party fraud.
62
- - If victimization versus knowing participation is unresolved, use
63
- `unclassified`. Do not silently force attribution.
64
- - If multiple archetypes are confirmed, run separate labels, rules, metrics,
65
- and impact sections. Never blend them into one positive class.
66
-
67
- Read the selected archetype, mechanism, and context references before Step 2.
68
-
69
- ## 2 — Formalize label
70
-
71
- - One primary label per archetype analysis. Confirmed outcomes are ground truth;
72
- proxies must be identified as proxies.
73
- - Carry forward the pre-flight provenance and class definitions; do not discover
74
- the negative class here.
75
- - Validate the pre-flight mapping against observed rows and record the resulting
76
- positive, negative, and unlabeled counts.
77
- - If the mapping is incomplete or contradictory, return to pre-flight with
78
- `needs-user-input`; do not ask for or invent a negative class in this step.
79
- - Derive labels only from supplied data and documented business meaning. Positive
80
- and negative conditions must be disjoint. Rows matching neither, both, or an
81
- immature/pending state are unlabeled and excluded from supervised metrics.
82
- - Record positive definition/count, negative definition/count, unlabeled
83
- definition/count, base rate among labeled rows, maturity window, exclusions,
84
- and attribution confidence.
85
- - Exclude the label, synonyms, investigations, recalls, disputes, or other later
86
- outcomes from features when unavailable at the selected decision point.
87
- - For delayed outcomes, ensure enough observation time or mark recent rows as
88
- immature rather than negative.
89
- - Do not continue to precision, recall, or supervised rule scoring until both
90
- positive and negative classes are defined.
91
-
92
- ## 3 — Freeze temporal validation
93
-
94
- - Freeze the cut before feature work. Train is earlier; holdout is later.
95
- - Do not random-shuffle rows or use random k-fold as headline validation.
96
- - History and graph snapshots contain prior events only.
97
- - No time column means full-sample descriptive analysis; mark metrics
98
- **unvalidated**.
99
-
100
- ## 4 — Engineer candidates
101
-
102
- Read [feature-engineering.md](feature-engineering.md) and all selected
103
- profile packs.
104
-
105
- - Declare event grain and decision point before assessing columns.
106
- - Classify fields as allowed now, excluded for zero variance, excluded for
107
- timing, excluded for leakage, or context-only.
108
- - Build thresholds, rate lists, graph lists, and watchlists on train only.
109
- - Prefer interpretable conditions with explicit units and windows.
110
- - Do not invent columns, identity links, consent, intent, or actor attribution.
111
-
112
- ## 5 — Select shortlist
113
-
114
- Use train only: lift, support, stability, operability, and meaningful
115
- interactions. Keep tiny or attribution-uncertain spikes for monitoring.
116
-
117
- ## 6 — Score rules
118
-
119
- State explicit conditions, event grain, units, windows, and decision point.
120
- Headline holdout metrics use this order:
121
-
122
- **occurrence → precision → recall**
123
-
124
- Train metrics are debugging evidence only. If outcomes are value-bearing, also
125
- measure captured positive amount without replacing count-based metrics.
126
-
127
- ## 7 — Map actions and packages
128
-
129
- Use actions from the selected context packs; there is no universal 3DS action.
130
-
131
- | Metric and evidence profile | Shared guidance |
132
- |---|---|
133
- | High precision, stable, severe impact | Consider the context's strongest preventive action |
134
- | Higher recall, moderate precision | Add verification, review, warning, hold, or friction |
135
- | Weak, unstable, small-N, uncertain attribution | Monitor or investigate |
136
-
137
- - Legal, regulatory, policy, and operational authority constrain account holds,
138
- freezes, rejects, beneficiary blocks, and reporting.
139
- - Keep individual rules separate from multi-rule **strategy packages**.
140
- - Freeze default and comparison packages before report writing.
141
- - For each package compute triggered count/rate and amount/share, then precision
142
- and recall, plus the context-specific customer, operations, conversion, delay,
143
- and loss measures required by its pack.
144
-
145
- ## 8 — Write business report
146
-
147
- Read [report-template.md](report-template.md),
148
- [terminology.md](terminology.md), and selected profile packs.
149
-
150
- Use reader order:
151
-
152
- 执行摘要 → 抽样、分析画像与标签 → 规则发现 → 策略整体影响 → 特征 → 附录
153
-
154
- - Include the analysis profile and actor attribution near the start.
155
- - Report only domain-appropriate actions, denominators, and impact KPIs.
156
- - Strategy impact always includes count/rate and amount/share, then precision
157
- and recall. Add only the selected contexts' required impact measures.
158
- - Do not present scenario estimates or proxy-label value as measured loss saved.
159
- - Save to a path such as `reports/fraud-analysis/<scope>.md`.
160
- - Before finishing: grep the report for banned strings in
161
- [terminology.md](terminology.md) and fix language only (not numbers,
162
- BIN lists, or thresholds).
163
-
164
- ## 9 — Independent review
165
-
166
- Read [review-checklist.md](review-checklist.md) and selected packs.
167
-
168
- - Review the common method and presentation contract.
169
- - Apply checks from every selected archetype, mechanism, and context pack.
170
- - Auto-fix mechanical issues only. Do not silently change attribution, label,
171
- customer role, or action severity.
172
- - Prefer a fresh independent reviewer. If unavailable, use a fresh same-session
173
- checklist and disclose that only in the chat delivery note.
174
- - Deliver the business report plus a short note with verdict, fixes, and open
175
- judgment issues. Keep review process details out of the report.
@@ -1,55 +0,0 @@
1
- # Chinese polish guardrails
2
-
3
- The final step runs `polish-cn` (`{polish-cn baseDir}/SKILL.md`) after `editorial-review`. This
4
- file holds what `polish-cn` needs from this skill: what to cover, the protected terms, and the
5
- guardrails to send with the brief.
6
-
7
- ## Cover
8
-
9
- Every Chinese deliverable: the main report, complete evidence, methodology, any separate FX
10
- sensitivity reports, chart captions, expandable-view notes, and the Chinese chat handoff. Extract
11
- each `.zh.md`; when a script renders the files, polish its narrative source and re-render instead.
12
- Never send raw authorization records, card identifiers or credentials.
13
-
14
- ## Protected terms
15
-
16
- Pass these with `--protect-file`, plus every term in [terminology.md](terminology.md):
17
-
18
- ```text
19
- 高风险
20
- 中风险
21
- 低风险
22
- 直接充值模式
23
- 换汇充值模式
24
- 电商模式
25
- 其他模式
26
- 推断充值币种
27
- 扣款币种
28
- 授权拒绝
29
- 潜在 TLD
30
- ```
31
-
32
- Cluster ids (`C1`, `FXC1`), descriptors, amounts and currencies are protected by the script.
33
-
34
- ## Guardrails
35
-
36
- Send with the brief, plus [decision.md](decision.md) for business-reader terms:
37
-
38
- > 这是潜在交易洗钱(TLD)调查报告。保持三节主报告结构、风险等级顺序、证据—假设—关联关系的先后顺序。
39
- > 潜在 TLD 不是已确认的洗钱;收款模式名称是推断,不是已验证的经营类型;定额是补充特征。
40
- > 推断充值币种与扣款币种不得混用;原币结果 `C*` 与汇率敏感性结果 `FXC*` 分开表述,保留全部汇率集中度说明。
41
- > 结论摘要不超过三个短句,每句不超过 80 个字,数字事实合计不超过两个(日期区间和编号不计),
42
- > 并保留"审查谁、为什么、未知什么、下一步查什么"。授权拒绝不是拒付。
43
- > 未识别到聚类不等于商户风险低。不得补回已删除的诊断表或结尾 Verdict。
44
-
45
- ## Accept
46
-
47
- - Each protected value stays attached to the same descriptor, period, denominator and metric. A
48
- matching set of numbers is not enough if their labels moved.
49
- - Unspecified periods, denominators and reasons stay unknown. Other-pattern uncertainty never
50
- becomes a failed test, missing fields or low risk.
51
- - Recheck the summary's sentence and number limits, the banned strings in
52
- [terminology.md](terminology.md), paired links, and Markdown / HTML agreement, including visible
53
- chart labels, without changing chart data.
54
- - Write the `polish-cn` record (model, fallback reason, files covered) into the run's task record,
55
- never into the report's HTML footer.
@@ -1,235 +0,0 @@
1
- # Currency-amount-pair clustering
2
-
3
- Goal: partition the cleaned universe by descriptor, find stuffing (掺量)
4
- as **approximate geometric ladders** inside each descriptor, then decompose
5
- each qualifying ladder into BIN-country attribution components and contrast
6
- it against the remainder.
7
-
8
- ## Payment patterns before clustering
9
-
10
- Run [streams.md](streams.md) before ranking pairs, but keep the entire frozen
11
- descriptor as the canonical partition for rung pools, ladders, exact members,
12
- and baseline. Inferred payment patterns provide context only; they never filter
13
- or split this population. Date-varying converted presets can fragment exact
14
- anchors and are reported separately as pattern hypotheses. BIN-country groups
15
- used during inference are not ladder partitions or membership keys.
16
-
17
- ## Descriptor partition
18
-
19
- Partition key = `normalized descriptor`.
20
-
21
- - Trim, case-fold, and collapse repeated whitespace. Preserve the most
22
- frequent source spelling for display.
23
- - Do not fuzzy-match or strip dynamic suffixes unless the extract documents
24
- their semantics.
25
- - Use `UNKNOWN_DESCRIPTOR` for missing values; do not drop them.
26
-
27
- Freeze descriptor assignment before ranking amounts. Report each descriptor's
28
- attempt count and share of `U`. A ladder belongs to exactly one descriptor;
29
- the same exact currency-amount-pair may legitimately belong to ladders in
30
- different descriptors.
31
-
32
- BIN country is **not** a partition or membership key. Normalize it after
33
- ladder formation and report its attempt counts, shares, auth rates, suspected-
34
- fraud rates, and local-hour shapes as attribution components.
35
-
36
- ## Currency-amount-pair
37
-
38
- Key = (`currency`, `amount`) on the original (not FX-converted) amount. This is
39
- the canonical key. A requested BIN-country base-currency analysis is a separate
40
- sensitivity under [fx-conversion.md](fx-conversion.md), never a replacement for
41
- or input to canonical membership.
42
-
43
- Count = authorization **attempts** in the current partition. Rank
44
- descending by count. Ties: smaller amount first, then currency code.
45
-
46
- ## High-count set and rung pool
47
-
48
- Work **per partition, then per currency**. In the table below, `|P|` is
49
- the authorization-attempt count of the current partition.
50
-
51
- | Set | Membership |
52
- |---|---|
53
- | High-count (seeds) | union of (a) pairs with count ≥ `max(30, 0.5% of \|P\|)` (b) the partition top 25 pairs by count (c) per currency in the partition, the top 10 pairs with count ≥ 30 |
54
- | Rung pool | pairs with count ≥ `max(5, 0.1% of \|P\|)` |
55
-
56
- State the thresholds. Use the high-count set for ranking. Test every rung-pool
57
- pair as a possible seed for a three-level 2x relationship; otherwise a
58
- representative lower-volume path can be structurally impossible to discover.
59
- Extra levels may be quieter amounts in
60
- the rung pool, and (c) keeps a smaller currency visible inside the partition.
61
-
62
- If the rung pool has fewer than three pairs in every currency of a partition,
63
- that partition has no three-level ladder to test. Still publish its ranking
64
- table when it is among the largest partitions or has a below-threshold family.
65
-
66
- ## Ladder detection
67
-
68
- Ladder detection has two separate phases. **Discovery** uses an adjacent,
69
- currency-specific absolute residual cap. **Membership and every downstream
70
- metric use the exact descriptor plus selected currency-amount-pairs only.**
71
- Never widen final membership to a numeric interval or another descriptor.
72
-
73
- ### Adjacent absolute-residual rule
74
-
75
- For exact amounts `a < b` in one descriptor and currency, multiplier `m` has:
76
-
77
- ```text
78
- residual = |b - a · m|
79
- ```
80
-
81
- They are adjacent anchors only when `residual ≤ ε_currency`. Do not use one
82
- percentage tolerance across amounts: its absolute allowance grows with the
83
- amount and can merge materially different upper-rung prices.
84
-
85
- Configure and report one cap per currency represented in a partition's rung
86
- pool. For a two-decimal currency, test a sensitivity grid such as `0.02,
87
- 0.05, 0.10, 0.15, 0.25` and retain the smallest operationally justified cap
88
- under which material paths are stable. Fail closed when a rung-pool currency
89
- has no cap; currencies below the rung-pool threshold need no cap.
90
-
91
- Use the bundled deterministic implementation after producing a cleaned
92
- authorization CSV:
93
-
94
- ```bash
95
- python3 {baseDir}/scripts/detect_ladders.py cleaned-authorizations.csv \
96
- --descriptor-column descriptor --bin-country-column bin_country \
97
- --currency-column currency --amount-column amount \
98
- --cap USD=0.15 --multi-anchor-min-attempts 24 \
99
- --sensitivity-cap USD=0.02 --sensitivity-cap USD=0.05 \
100
- --sensitivity-cap USD=0.10 --sensitivity-cap USD=0.15 \
101
- --sensitivity-cap USD=0.25
102
- ```
103
-
104
- The CLI does not clean or deduplicate the CSV; complete
105
- [clean.md](clean.md) first.
106
-
107
- ### Family from a seed (up and down)
108
-
109
- Starting from every rung-pool seed, expand recursively upward and downward
110
- using only adjacent matches. A theoretical level may contain several exact
111
- anchors. Select the highest-count match as its primary anchor; retain an
112
- additional match only when that exact pair independently clears the stated
113
- portfolio support floor (default 24 attempts, corresponding to the Worldpay
114
- portfolio rung floor). Record that floor and test it separately for a new
115
- portfolio.
116
-
117
- Every retained key must be in the partition's rung pool and match an anchor
118
- in the adjacent level. The finite retained keys become the explicit anchor
119
- set. Tolerance never acts on transactions after selection: final membership
120
- is exact equality on (`descriptor`, `currency`, `amount`). BIN country is
121
- attached only after this membership is frozen.
122
-
123
- ### Required 2x family
124
-
125
- A candidate family must use **`m = 2`** between every adjacent theoretical
126
- level and contain **at least three theoretical levels**. Example: 1x, 2x, 4x,
127
- 8x around the seed, including downward (`19.99` can find `9.99` and `39.99`).
128
- There is no two-level exception, and relationships based on `m = 3`, `4`, `5`,
129
- `10`, or any other multiplier do not form clusters.
130
-
131
- For each seed, rank qualifying paths by: more theoretical levels; more exact-
132
- member attempts; then lower summed adjacent residual. The attempt threshold
133
- below independently determines whether the family becomes a reported cluster.
134
-
135
- ### Minimum cluster size
136
-
137
- Sum attempts only over rows in the partition whose keys are the selected
138
- exact currency-amount-pairs. A family is a reported cluster only when that
139
- exact membership has **≥100 authorization attempts**. Keep smaller
140
- families in the run methodology document as `below threshold`; do not validate them or
141
- issue cluster verdicts for them. Their rows remain in canonical baseline
142
- `B` and descriptor remainder `B_D` unless selected exact keys are claimed
143
- by another reported ladder in the same descriptor.
144
-
145
- ### Several groups
146
-
147
- Within each partition, process unused rung-pool seeds in descending attempt
148
- count. A currency-amount-pair joins **at most one** reported cluster in that
149
- partition — the first qualifying family that claims it. Below-threshold
150
- families do not reserve keys. Never let a claim in one partition reserve the
151
- same pair in another partition.
152
-
153
- Name clusters `C1`, `C2`, … by descending total attempts. For each, record
154
- the descriptor partition, seed, currency, multiplier, absolute cap, summed
155
- fit residual, theoretical levels, all exact anchors and counts, multi-anchor
156
- levels, total attempts, and post-formation BIN-country components.
157
-
158
- Ignore one-off round amounts (`100`, `1000`) unless they sit on a ladder.
159
- A popular SKU price is not a cluster by itself.
160
-
161
- ### None found
162
-
163
- If no family qualifies in any partition, **do not invent clusters** from
164
- MCC or comparison features. Publish the partition and pair rankings, contrast
165
- the top pairs only as context if useful, and skip cluster verdicts.
166
-
167
- ## Baseline
168
-
169
- For each cluster, **Baseline** means every authorization in the same descriptor
170
- after removing that cluster's exact member keys. Other identified
171
- currency-amount pairs remain in this baseline. This is the only comparison
172
- population used in cluster characteristics. If the cluster consumes the whole
173
- descriptor, report comparison values as `n/a`.
174
-
175
- For the overall impact table only, `Baseline` means rows in the cleaned universe
176
- that belong to no identified currency-amount pair. Keep this distinct from the
177
- per-cluster same-descriptor baseline.
178
-
179
- If two currencies each have a ladder, they are separate clusters. Do not
180
- merge across currencies.
181
-
182
- ## Contrast vs baseline
183
-
184
- Same window and descriptor. Compare each cluster with its baseline on:
185
-
186
- | Metric | Formula |
187
- |---|---|
188
- | Authorization success rate | approvals / attempts |
189
- | Suspected fraud as share of attempts | suspected-fraud attempts / attempts |
190
- | Top 3 issuing banks | count and share of that series |
191
- | Top 3 BIN countries | count and share of that series |
192
-
193
- Separately report Descriptor, descriptor total attempts, cluster attempts,
194
- cluster share of descriptor, and MCC.
195
-
196
- Require a stated min-n before ranking a cluster-versus-baseline rate
197
- (default attempts ≥ 30). Below that, show the contrast rate as `n/a (n=…)`.
198
- The definition anchor table is not a ranking contrast: always compute
199
- authorization success rate and suspected-fraud share for every theoretical
200
- level from that level's exact member attempts, including n < min-n. Combined
201
- `*` levels use the combined attempts of the level. Do not write `n/a` on the
202
- anchor table because the rung is small.
203
-
204
- Use the contrast to assign investigation-priority risk under
205
- [decision.md](decision.md), not as a fraud label. Treat materially different
206
- authorization, suspected-fraud, issuing-bank, date, and local-hour behavior as
207
- independent characteristics under thresholds declared in the run methodology.
208
-
209
- For each Top 3 cluster BIN country, report both its share of the cluster and
210
- the cluster's share of all attempts in the same descriptor-country slice. In
211
- the canonical original-currency run only, an exact 100% single-country cluster
212
- is a standout. `Mixed` is neutral, and country-slice coverage is descriptive
213
- only: do not set a universal threshold or award risk points for values such as
214
- 20% or 33.8%. In the FX sensitivity, even 100% concentration is descriptive,
215
- must be captioned as constructed by the target-currency mapping, and cannot
216
- raise the FX tier.
217
-
218
- ## What not to do
219
-
220
- - Do not treat MCC as a partition or clustering key.
221
- - Do not discover ladders across descriptor boundaries.
222
- - Do not use BIN country as a ladder partition or membership key.
223
- - Do not k-means the amounts.
224
- - Do not convert to USD or another currency and use that result as the canonical ladder run. Keep any BIN-country base-currency detection in the separate FX sensitivity.
225
- - Do not search only upward from the busiest rung.
226
- - Do not use a percentage tolerance across amounts.
227
- - Do not turn stream inference into cluster membership: its relative tolerance is discovery in the wallet currency; canonical membership stays exact on original currency and amount.
228
- - Do not assign every amount inside an interval; select finite exact anchors first.
229
- - Do not retain a low-support additional anchor merely because it is near a primary anchor.
230
- - Do not report a cluster with fewer than three theoretical levels.
231
- - Do not use any adjacent-level multiplier other than 2x.
232
- - Do not report a cluster with fewer than 100 attempts.
233
- - Do not put the same pair in two clusters within one partition.
234
- - Do not merge matching amount fingerprints across descriptors.
235
- - Do not call the output a customer segment or a marketing cohort.