@1aboveio/skills 1.0.10 → 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
@@ -0,0 +1,216 @@
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 discovery.
8
+ Read [entities.md](entities.md) and [enrichment.md](enrichment.md). Record the
9
+ transaction ID, retry/duplicate/lifecycle policy, decision point, timestamp and
10
+ timezone, available ordering/arrival evidence, entity keys, original currency,
11
+ conversion currency, and enrichment availability. Do not invent missing inputs.
12
+ Missing prerequisites block affected features, not unrelated discovery. Record:
13
+
14
+ ```yaml
15
+ label_provenance: file-column | user-defined | absent
16
+ positive_definition: ""
17
+ negative_definition: ""
18
+ unlabeled_definition: ""
19
+ preflight_status: pass | needs-user-input | descriptive-only | blocked
20
+ ```
21
+
22
+ - Confirm the file is readable and identify its row grain, candidate time field,
23
+ outcome/label fields, and requested positive definition.
24
+ - When the positive label comes from an existing row-level outcome column, map
25
+ its positive value(s). Assume the rest of the mature analysis population is
26
+ negative, except explicit missing, pending, unknown, or unlabeled states.
27
+ State this assumption and show the observed values to the user when ambiguous.
28
+ - When the user defines the positive label as a condition or derived rule,
29
+ request a negative definition before computing metrics that require it. Do not
30
+ infer `NOT positive` as negative. Continue rapid discovery with other rows
31
+ unlabeled if no negative definition is available.
32
+ - Rows matching neither class, both classes, explicit unknown states, or an
33
+ immature outcome window are unlabeled.
34
+ - If classes are incomplete, continue descriptive discovery and report observed
35
+ known-fraud hits and transaction reach. Mark unsupported metrics unavailable.
36
+
37
+ Label completeness is a metric gate, not a prerequisite for discovering rules.
38
+ `descriptive-only` permits profile selection, transaction feature engineering,
39
+ and candidate rules without precision, lift, or claims of future performance.
40
+ Recall may be reported only against a defined, labeled positive population, with
41
+ its scope explicit; fraud-only samples do not establish portfolio recall.
42
+ Profile clarification may be grouped with missing label or attribution questions.
43
+
44
+ ## 1 — Select analysis profile
45
+
46
+ Read [taxonomy.md](taxonomy.md). Record:
47
+
48
+ ```yaml
49
+ archetype: third-party-fraud | first-party-fraud | authorized-payment-scam | unclassified
50
+ customer_role: victim | perpetrator | knowing-participant | facilitator | unknown
51
+ customer_consent: present | absent | disputed | unknown
52
+ technical_authentication: passed | failed | not-applicable | unknown
53
+ mechanisms: []
54
+ contexts: []
55
+ subtype: null
56
+ attribution_confidence: confirmed | probable | proxy | unknown
57
+ event_grain: transaction
58
+ analysis_track: real-time | post-transaction-review
59
+ decision_point: ""
60
+ ```
61
+
62
+ - Select exactly one primary archetype. Select one or more mechanisms and
63
+ contexts when the data supports them.
64
+ - Customer consent and technical authentication are separate facts. Passed
65
+ login, MFA, or session checks do not prove genuine-customer consent.
66
+ - `APP scam` is a subtype of `authorized-payment-scam` in a `bank-transfer`
67
+ context; it is not a synonym for first-party fraud.
68
+ - If victimization versus knowing participation is unresolved, use
69
+ `unclassified`. Do not silently force attribution.
70
+ - If multiple archetypes are confirmed, run separate labels, rules, metrics,
71
+ and impact sections. Never blend them into one positive class.
72
+
73
+ Read the selected archetype, mechanism, and context references before Step 2.
74
+
75
+ ## 2 — Formalize label
76
+
77
+ - One primary label per archetype analysis. Confirmed outcomes are ground truth;
78
+ proxies must be identified as proxies.
79
+ - Carry forward known class definitions. Request missing definitions only for
80
+ metrics that need them; discovery may continue with unlabeled transactions.
81
+ - Validate the pre-flight mapping against observed rows and record the resulting
82
+ positive, negative, and unlabeled counts.
83
+ - If the mapping is contradictory, clarify it before using affected labels.
84
+ Missing negatives do not stop transaction-level candidate discovery.
85
+ - Derive labels only from supplied data and documented business meaning. Positive
86
+ and negative conditions must be disjoint. Rows matching neither, both, or an
87
+ immature/pending state are unlabeled and excluded from supervised metrics.
88
+ - Record positive definition/count, negative definition/count, unlabeled
89
+ definition/count, base rate among labeled rows, maturity window, exclusions,
90
+ and attribution confidence.
91
+ - Exclude the label, synonyms, investigations, recalls, disputes, or other later
92
+ outcomes from features when unavailable at the selected decision point.
93
+ - For delayed outcomes, ensure enough observation time or mark recent rows as
94
+ immature rather than negative.
95
+ - Compute precision, false-positive rates, and lift only with a justified labeled
96
+ negative population. State labeled-hit coverage separately from all-hit reach.
97
+ Unlabeled transactions can contribute eligible velocity history.
98
+
99
+ ## 3 — Declare evidence basis
100
+
101
+ - Default to rapid discovery on recent transactions. No train/test/holdout split
102
+ is required. Record discovery and scoring windows, observation cutoff, sample
103
+ coverage, and whether rules were selected on the same transactions scored.
104
+ - Recent observed evidence supports known-fraud hits and transaction reach.
105
+ Retrospective labels support sample metrics only where class definitions and
106
+ maturity justify them. Neither establishes future performance.
107
+ - Optional subsequent monitoring or temporal validation measures transactions
108
+ after rule definitions and reference lists were fixed. If used, freeze the
109
+ discovery/scoring boundary and do not tune on the claimed validation outcomes.
110
+ - Decision-time correctness remains mandatory regardless of validation choice.
111
+ History/reference artifacts must have been available at each scored decision;
112
+ current transaction inputs are included by default, not current outcomes.
113
+ - Without usable timestamps, omit rolling/sequence features; continue with
114
+ available attributes and state that real-time historical replay is unproven.
115
+
116
+ ## 4 — Engineer candidates
117
+
118
+ Read [feature-engineering.md](feature-engineering.md) and all selected
119
+ profile packs.
120
+
121
+ - Declare event grain and decision point before assessing columns.
122
+ - Classify fields as allowed now, excluded for zero variance, excluded for
123
+ timing, excluded for leakage, or context-only.
124
+ - Record the discovery population for thresholds and candidate lists. Keep
125
+ encoding, outcome-rate, graph, and watchlist inputs causal at decision time;
126
+ later discoveries can define prospective rules, not rewrite earlier features.
127
+ - Read [feature-sql.md](feature-sql.md) for mismatch, frequency encoding, and
128
+ count/sum/distinct velocities. Use standard windows and include current.
129
+ - Keep completed entity/period aggregates in post-transaction review. Read the
130
+ selected profile's expert patterns as hypotheses, with benign explanations.
131
+ - Prefer interpretable conditions with explicit units and windows.
132
+ - Do not invent columns, identity links, consent, intent, or actor attribution.
133
+
134
+ ## 5 — Select shortlist
135
+
136
+ Use observed support, known-fraud hits, transaction reach, operability, and
137
+ meaningful interactions. Add precision/lift and temporal stability only when
138
+ supported. Keep tiny or attribution-uncertain spikes for monitoring. Do not wait
139
+ for a complete mechanism diagnosis before expressing a useful candidate rule.
140
+
141
+ ## 6 — Score rules
142
+
143
+ State explicit conditions, transaction grain, units, windows, and decision point.
144
+ Retain `(transaction_id, rule_id)` hits for every matching rule. Present:
145
+
146
+ **occurrence → precision → recall**, with unsupported metrics unavailable.
147
+
148
+ Name the scoring population, discovery overlap, and outcome cutoff. Define
149
+ precision over labeled hits and disclose unlabeled hits separately; do not imply
150
+ that partial-label precision describes all triggered transactions. Define recall
151
+ over the stated known-positive population. Report known-fraud hits without
152
+ claiming precision when negatives are unavailable. Amount metrics supplement,
153
+ not replace, counts. Same-sample metrics describe observations, not validation.
154
+
155
+ ## 7 — Map actions and packages
156
+
157
+ Use actions from the selected context packs; there is no universal 3DS action.
158
+
159
+ | Metric and evidence profile | Shared guidance |
160
+ |---|---|
161
+ | High precision, stable, severe impact | Consider the context's strongest preventive action |
162
+ | Higher recall, moderate precision | Add verification, review, warning, hold, or friction |
163
+ | Weak, unstable, small-N, uncertain attribution | Monitor or investigate |
164
+
165
+ - Legal, regulatory, policy, and operational authority constrain account holds,
166
+ freezes, rejects, beneficiary blocks, and reporting.
167
+ - Keep individual rules separate from multi-rule **strategy packages**.
168
+ - Freeze default and comparison packages before report writing.
169
+ - Compute package unions by transaction ID, never by summing per-rule hits.
170
+ Show overlap and incremental coverage relative to the named base package.
171
+ For action-level totals, declare precedence when several actions match.
172
+ - For each package compute triggered count/rate and amount/share, then supported
173
+ precision and recall, plus the context-specific customer, operations,
174
+ conversion, delay, and loss measures required by its pack.
175
+
176
+ ## 8 — Write business report
177
+
178
+ Read [report-template.md](report-template.md),
179
+ [terminology.md](terminology.md), selected profile packs, and
180
+ `{house-style baseDir}/references/analytical-reporting.md` and its required references.
181
+ Use `{write-report baseDir}/SKILL.md` with frozen results for this stage, without
182
+ rerunning discovery. If a required skill or reference is unavailable, report the blocker.
183
+
184
+ Use reader order:
185
+
186
+ 执行摘要 → 抽样、分析画像与标签 → 规则发现 → 策略整体影响 → 特征 → 附录
187
+
188
+ - Include the analysis profile and actor attribution near the start.
189
+ - Report only domain-appropriate actions, denominators, and impact KPIs.
190
+ - Strategy impact always includes count/rate and amount/share, then precision
191
+ and recall where supported. Add only the selected contexts' required impact measures.
192
+ - Do not present scenario estimates or proxy-label value as measured loss saved.
193
+ - Save to a path such as `reports/fraud-detection/<scope>.md`.
194
+ - Before finishing: grep the report for banned strings in
195
+ [terminology.md](terminology.md) and fix language only (not numbers,
196
+ BIN lists, or thresholds).
197
+
198
+ ## 9 — Independent review
199
+
200
+ Read [review-checklist.md](review-checklist.md), selected packs, and
201
+ `{house-style baseDir}/references/analytical-reporting.md` and its required references.
202
+ Give these to the reviewer for the report review.
203
+
204
+ This independent domain review checks the selected packs and methods; it is not a second
205
+ generic editorial pass. Reuse the writer's recorded editorial findings and checked version.
206
+ Additional domain findings return to the writer for affected passages and any needed recheck,
207
+ without repeating completed review or optional polish solely because this stage was reached.
208
+
209
+ - Review the common method and presentation contract.
210
+ - Apply checks from every selected archetype, mechanism, and context pack.
211
+ - Auto-fix mechanical issues only. Do not silently change attribution, label,
212
+ customer role, or action severity.
213
+ - Prefer a fresh independent reviewer. If unavailable, use a fresh same-session
214
+ checklist and disclose that only in the chat delivery note.
215
+ - Deliver the business report plus a short note with verdict, fixes, and open
216
+ judgment issues. Keep review process details out of the report.
@@ -0,0 +1,95 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
3
+ import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
4
+ import { homedir } from 'node:os';
5
+ import { dirname, join, resolve } from 'node:path';
6
+ import { fileURLToPath } from 'node:url';
7
+
8
+ const DAY_MS = 24 * 60 * 60 * 1000;
9
+ const WEEK_MS = 7 * DAY_MS;
10
+ const here = dirname(fileURLToPath(import.meta.url));
11
+
12
+ function readJson(path, fallback = {}) {
13
+ try { return JSON.parse(readFileSync(path, 'utf8')); } catch { return fallback; }
14
+ }
15
+
16
+ function frontmatterValue(text, key) {
17
+ const frontmatter = /^---\n([\s\S]*?)\n---/.exec(text)?.[1] ?? '';
18
+ const match = new RegExp('^' + key + ':\\s*([^\\n]+)$', 'm').exec(frontmatter);
19
+ return match?.[1].trim().replace(/^['"]|['"]$/g, '') ?? null;
20
+ }
21
+
22
+ function repositoryOf(source) {
23
+ const value = String(source ?? '').trim();
24
+ const match = /^(?:git@github\.com:|https:\/\/github\.com\/)?([A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+?)(?:\.git)?$/.exec(value);
25
+ return match?.[1] ?? null;
26
+ }
27
+
28
+ function stableVersion(value) {
29
+ const match = /^v?(\d+)\.(\d+)\.(\d+)$/.exec(String(value ?? '').trim());
30
+ return match ? match.slice(1).map(Number) : null;
31
+ }
32
+
33
+ function newer(left, right) {
34
+ for (let index = 0; index < 3; index += 1) {
35
+ if (left[index] !== right[index]) return left[index] > right[index];
36
+ }
37
+ return false;
38
+ }
39
+
40
+ function writeCache(path, value) {
41
+ try {
42
+ mkdirSync(dirname(path), { recursive: true });
43
+ writeFileSync(path, JSON.stringify(value));
44
+ } catch { /* A read-only cache must not block skill use. */ }
45
+ }
46
+
47
+ function main(now = Date.now()) {
48
+ if (process.env.ONEABOVEIO_NO_UPDATE_CHECK) return;
49
+ const bundle = readJson(join(resolve(here, '../../..'), 'package.json'));
50
+ if (bundle.name === '@1aboveio/skills' && bundle.nativeCodex?.schemaVersion === 1) return;
51
+ const skill = readFileSync(join(here, 'SKILL.md'), 'utf8');
52
+ const name = frontmatterValue(skill, 'name');
53
+ const localVersion = stableVersion(frontmatterValue(skill, 'release-version'));
54
+ if (!name || !localVersion) return;
55
+
56
+ const lock = readJson(join(process.env.HOME || homedir(), '.agents', '.skill-lock.json'));
57
+ const entry = lock.skills?.[name];
58
+ const repository = repositoryOf(entry?.sourceUrl || entry?.source);
59
+ if (!repository) return;
60
+
61
+ const cacheRoot = process.env.XDG_CACHE_HOME || join(process.env.HOME || homedir(), '.cache');
62
+ const cachePath = join(cacheRoot, '1aboveio-skills', 'release-check.json');
63
+ const all = readJson(cachePath);
64
+ const cache = all[repository] && typeof all[repository] === 'object' ? all[repository] : {};
65
+
66
+ if (!cache.lastCheck || now - cache.lastCheck >= DAY_MS) {
67
+ const result = spawnSync('gh', ['api', 'repos/' + repository + '/releases/latest', '--jq', '.tag_name'], {
68
+ encoding: 'utf8',
69
+ stdio: ['ignore', 'pipe', 'ignore'],
70
+ timeout: 1500,
71
+ });
72
+ cache.lastCheck = now;
73
+ if (result.status === 0 && stableVersion(result.stdout)) cache.latestTag = result.stdout.trim();
74
+ else delete cache.latestTag;
75
+ all[repository] = cache;
76
+ writeCache(cachePath, all);
77
+ }
78
+
79
+ const latestVersion = stableVersion(cache.latestTag);
80
+ if (!latestVersion || !newer(latestVersion, localVersion)) return;
81
+ if (cache.notifiedTag === cache.latestTag && cache.notifiedAt && now - cache.notifiedAt < WEEK_MS) return;
82
+
83
+ cache.notifiedTag = cache.latestTag;
84
+ cache.notifiedAt = now;
85
+ all[repository] = cache;
86
+ writeCache(cachePath, all);
87
+ const command = `npx skills@1.5.23 add '${repository}#${cache.latestTag}' --global --agent universal claude-code --skill ${name} --yes`;
88
+ process.stdout.write(
89
+ `UPDATE_AVAILABLE: A newer 1AboveIO skills release (${cache.latestTag}) is available; this skill is `
90
+ + `v${localVersion.join('.')}. Ask once whether to refresh ${name}. On approval run \`${command}\`. `
91
+ + 'The refreshed instructions apply next session. Either way, continue the current task and do not ask again this session.\n',
92
+ );
93
+ }
94
+
95
+ try { main(); } catch { /* Update checks are advisory and always fail silent. */ }
@@ -12,9 +12,9 @@ description: >
12
12
  decline mix, BIN/issuer-country contribution, settlement GMV, payment journey,
13
13
  Sankey funnel, FX-to-USD, chargeback rate, 运营影响, or "business analysis of
14
14
  transactions" — even if they do not say payment-analysis. Do NOT use for
15
- supervised fraud-rule mining (fraud-analysis) or TLD / MCC-miscoding
15
+ fraud rule discovery (fraud-detection) or TLD / MCC-miscoding
16
16
  clusters (tld-detection).
17
- release-version: 0.44.1
17
+ release-version: 0.45.0
18
18
  ---
19
19
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
20
20
  # Payment Analysis
@@ -33,7 +33,7 @@ optional topic fuel, not required for the journey core.
33
33
 
34
34
  **Produce:** Markdown + preferred Chinese/bilingual HTML under
35
35
  `reports/payment-analysis/`.
36
- **Do not produce:** supervised precision/recall packages (`fraud-analysis`) or TLD clusters (`tld-detection`).
36
+ **Do not produce:** fraud detection rule packages (`fraud-detection`) or TLD clusters (`tld-detection`).
37
37
 
38
38
  Read the playbook for the step you are on. Paths under `references/` are
39
39
  relative to this skill.
@@ -101,6 +101,16 @@ when authentication fields are empty; caption the skips.
101
101
 
102
102
  ### 4 — Write outputs
103
103
 
104
+ Read `{house-style baseDir}/references/analytical-reporting.md` and its required
105
+ references. Use `{write-report baseDir}/SKILL.md` for this report stage; if a
106
+ required skill or reference is unavailable, report the blocker rather than claim
107
+ the report stage is complete. Pass the domain template and frozen results; do not
108
+ rerun the analysis. Pass the selected review mode, this template, required artifacts and,
109
+ for Chinese delivery, the required `polish-cn` pass and its guardrails. `write-report`
110
+ coordinates draft, editorial review, fixes, selected polish and regenerated-output checks.
111
+ This workflow retains domain validation and delivery; steps 5-7 verify and reuse those
112
+ results rather than scheduling a second writing pipeline.
113
+
104
114
  Structure and chapter minima:
105
115
  [report-template.md](references/report-template.md). Chart marks:
106
116
  [visualization.md](references/visualization.md). English/Chinese terms:
@@ -114,8 +124,13 @@ reports/payment-analysis/<scope>_overview.zh.md
114
124
  reports/payment-analysis/<scope>_overview.zh.html
115
125
  ```
116
126
 
117
- HTML is preferred when there are charts. Glossary applies to headings, KPI
118
- labels, legends, and Sankey skip chips.
127
+ HTML is preferred when there are charts; it is not mandatory solely because it is
128
+ preferred. The applicable topic charts and supporting tables in the domain template
129
+ are required in the chosen format, including English-only output. A small sample
130
+ limits the conclusions; it does not turn a chart requirement into prose or a table.
131
+ For unavailable dimensions, follow the template's omission and coverage rules rather
132
+ than inventing series. Glossary applies to headings, KPI labels, legends, and Sankey
133
+ skip chips.
119
134
 
120
135
  ### 5 — Language proofread
121
136
 
@@ -128,9 +143,11 @@ Do not change numbers, joins, or chart data.
128
143
  - [ ] Main, trend, and fraud & chargeback periods and the cutoff are stated in the report header
129
144
  - [ ] Trend charts span the trend period; fraud/chargeback charts span their period
130
145
  - [ ] Structure is summary → top stats → Sankey → topics → 运营影响
146
+ - [ ] Each applicable chart and supporting table in report-template.md exists at a recorded output location; unavailable dimensions follow its omission/coverage rules
131
147
  - [ ] Auth + settlement both used when both files exist
132
148
  - [ ] Sankey skips unavailable risk/3DS checkpoints and says so
133
149
  - [ ] Count/amount are bars; rate is a line; dual axes when combined
150
+ - [ ] Open the saved charts in an available renderer and check representative plotted values against their labeled scales and supporting tables, including rate-axis positions and clipped dates; record any unverified rendering as incomplete
134
151
  - [ ] Amount axes/legends include currency (`授权尝试金额 USD`, …)
135
152
  - [ ] No supervised fraud-rule metrics
136
153
  - [ ] Non-USD amounts converted per fx.md; all-USD books say 金额均为 USD
@@ -143,25 +160,27 @@ Do not change numbers, joins, or chart data.
143
160
 
144
161
  ### 7 — Editorial review and Chinese polish (required)
145
162
 
146
- After the sanity check, run `editorial-review` (`{editorial-review baseDir}/SKILL.md`)
147
- on the report's narrative source, naming
148
- [report-template.md](references/report-template.md) as its template, then rerun the
149
- sanity check. Then run `polish-cn` (`{polish-cn baseDir}/SKILL.md`) on the Chinese
150
- prose with the blocks, protected terms and guardrails in
151
- [chinese-polish.md](references/chinese-polish.md). Record the model that ran and any fallback in the run record, not the report's
152
- data-source footer. Only language may change in the polish. Re-render every
153
- Chinese artifact from the polished source and rerun the glossary and
154
- fact-preservation checks before delivery.
163
+ Verify the writing stage returned the reviewed path/version, findings/fixes and open issues,
164
+ covering this template, required analytical rules and domain checks. A read of the review
165
+ instructions alone does not complete it. Resume a missing stage through `write-report`;
166
+ reuse a completed pass rather than starting another `editorial-review` or polish call.
167
+
168
+ Chinese delivery still requires `polish-cn` with the blocks, protected terms and guardrails in
169
+ [chinese-polish.md](references/chinese-polish.md); fast mode does not waive this domain requirement.
170
+ The writer records the actual model or permitted fallback outside the report, applies only
171
+ wording changes to the narrative source, regenerates Chinese outputs and reruns glossary and
172
+ fact-preservation checks. Verify that result here, rerun the applicable sanity checks and
173
+ report any incomplete required stage before delivery. English-only delivery needs no Chinese polish.
155
174
 
156
- ## Boundary with fraud-analysis and tld-detection
175
+ ## Boundary with fraud-detection and tld-detection
157
176
 
158
177
  | Need | Skill |
159
178
  |---|---|
160
179
  | Volume, journey Sankey, auth rate, decline mix, settlement overview, 运营影响 routing | `payment-analysis` |
161
- | Proxy/confirmed fraud labels, holdout precision/recall, 3DS/block **packages** | `fraud-analysis` |
180
+ | Transaction-level fraud rule discovery and evidence-qualified metrics, 3DS/block **packages** | `fraud-detection` |
162
181
  | Potential TLD clusters, currency-amount-pair ladders, MCC miscoding, stuffing | `tld-detection` |
163
182
 
164
- Routing 3DS / 风控拦截 / retry from this extract is not a fraud-analysis rule
183
+ Routing 3DS / 风控拦截 / retry from this extract is not a fraud-detection rule
165
184
  package.
166
185
 
167
186
  ## Reference index
@@ -2,7 +2,7 @@
2
2
 
3
3
  Use this list when writing **运营影响**. Pick only items the extract
4
4
  supports. Do not dump the whole list. These are routing / retry operations,
5
- not a `fraud-analysis` rule package (no precision/recall, no “loss saved”).
5
+ not a `fraud-detection` rule package (no precision/recall, no “loss saved”).
6
6
 
7
7
  Auth rate = 授权成功 / 授权尝试. BIN country = 发卡行国家.
8
8
 
@@ -25,6 +25,6 @@ report (country, share, 软性拒绝 count). Example shapes:
25
25
 
26
26
  ## Out of scope
27
27
 
28
- - Supervised thresholds, holdout, 3DS/block “packages” → `fraud-analysis`
28
+ - Fraud detection thresholds and 3DS/block “packages” → `fraud-detection`
29
29
  - Inventing retry counts or expected auth-rate lift
30
30
  - Mixing portfolio and merchant grains in one file
@@ -88,6 +88,12 @@ Each topic: short lede + chart(s) + supporting table.
88
88
  | 4.8 Chargebacks | every month of the fraud & chargeback period (default 12) including the report month: monthly normal/pre-dispute/unclassified counts and amounts; reason-category bars; Visa normal 拒付率, separate Visa pre-dispute-rate series, and Mastercard normal monthly 拒付率 per [chargebacks.md](chargebacks.md); preserve all month labels/table rows, leave missing points as gaps, put formulas/coverage caveats under the rate chart |
89
89
 
90
90
  Use both authorization and settlement data when both files are present.
91
+ For 4.5, keep the decline-count chart when declines exist but their reasons are missing.
92
+ Group those records as `Reason unknown` (`拒绝原因未知`); a generic `Declined` status is
93
+ not a specific reason. If every decline lacks a reason, show one unknown-reason bar with
94
+ the observed count and a matching table row. If only some lack reasons, retain the unknown
95
+ group beside the recorded categories so the counts reconcile. This is a coverage group,
96
+ not evidence of a cause or a retry/risk action.
91
97
  Section 4.8 always uses the fraud & chargeback period (default `M-11` through
92
98
  `M`), independently of the main analysis period. The supporting table includes every month, cases/amounts by
93
99
  stage, each rate's numerator and denominator, denominator month, coverage, and
@@ -111,8 +117,10 @@ chargeback rates are network-style estimates).
111
117
 
112
118
  ## Final Chinese language pass
113
119
 
114
- After factual validation, run `editorial-review`, then `polish-cn` for the final
115
- Chinese polish per [chinese-polish.md](chinese-polish.md).
120
+ Pass this template and the required Chinese polish guardrails in
121
+ [chinese-polish.md](chinese-polish.md) to `write-report`. The writer runs editorial review,
122
+ fixes and the required polish after factual validation; this domain workflow reuses the
123
+ completed passes rather than invoking them again.
116
124
  Synchronize accepted language across the Chinese artifacts being delivered,
117
125
  without adding a format requirement or changing facts/chart data. If both Chinese
118
126
  Markdown and HTML are delivered, use the same accepted wording. A glossary grep
@@ -28,6 +28,14 @@ ECharts (Sankey). Markdown tables remain required beside charts.
28
28
  - Stacked bars = mix within a group (e.g. decline reasons by country), never rate.
29
29
  - Sort categories by a stated order (usually attempts desc).
30
30
 
31
+ Check the saved, rendered charts before delivery, not just their file existence or labels.
32
+ Use the project's chart library for scales and axes when available. If a dependency is missing,
33
+ choose an available chart tool or report the blocker; do not replace a quantitative plot with
34
+ an uncalibrated schematic. Check representative marks against labeled tick positions and the
35
+ supporting table. A caption that lists the correct figures does not repair a wrong position or
36
+ an absent scale. One supported rate point may stand alone in a line series; do not extend it
37
+ across weeks without coverage just to draw a segment.
38
+
31
39
  ## Required charts (HTML)
32
40
 
33
41
  1. Payment journey Sankey — see [journey.md](journey.md)
@@ -35,7 +43,9 @@ ECharts (Sankey). Markdown tables remain required beside charts.
35
43
  spanning the trend period (default last 6 months, `M-5`–`M`)
36
44
  3. Authorization rate by segment (card product and/or country): rate as line
37
45
  4. BIN-country contribution: count bar + amount bar (dual axis)
38
- 5. Decline by reason: count bars (+ amount bars/dual axis if shown)
46
+ 5. Decline by reason: count bars (+ amount bars/dual axis if shown). Missing reasons use an
47
+ explicit `Reason unknown` group, including one bar for all declines when no reasons exist;
48
+ see [report-template.md](report-template.md). Do not infer a reason from a generic status.
39
49
  6. Decline mix by BIN country: stacked count bars
40
50
  7. Section 4.8 monthly dispute-rate lines: an ascending calendar-month axis
41
51
  covering the fraud & chargeback period (default 12 months) and ending in
@@ -0,0 +1,3 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 1AboveIO