@1aboveio/skills 1.0.22 → 1.0.24

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 (92) hide show
  1. package/.codex-plugin/plugin.json +1 -1
  2. package/.codex-plugin/resources.json +155 -136
  3. package/package.json +4 -4
  4. package/skills/app-dev/airflow/SKILL.md +1 -1
  5. package/skills/app-dev/android-development/SKILL.md +1 -1
  6. package/skills/app-dev/app-debug/SKILL.md +1 -1
  7. package/skills/app-dev/better-auth/SKILL.md +1 -1
  8. package/skills/app-dev/data-catalog/SKILL.md +1 -1
  9. package/skills/app-dev/data-quality/SKILL.md +1 -1
  10. package/skills/app-dev/ios-foundation/SKILL.md +1 -1
  11. package/skills/app-dev/maestro/SKILL.md +1 -1
  12. package/skills/app-dev/monorepo/SKILL.md +1 -1
  13. package/skills/app-dev/nextjs-fullstack/SKILL.md +1 -1
  14. package/skills/app-dev/prisma-setup/SKILL.md +1 -1
  15. package/skills/app-dev/pyspark/SKILL.md +1 -1
  16. package/skills/app-dev/python-backend/SKILL.md +1 -1
  17. package/skills/app-dev/shadcn/SKILL.md +1 -1
  18. package/skills/app-dev/zod-v4/SKILL.md +1 -1
  19. package/skills/cicd/cloud-build/SKILL.md +1 -1
  20. package/skills/cicd/cloud-debug/SKILL.md +1 -1
  21. package/skills/cicd/cloud-deploy/SKILL.md +1 -1
  22. package/skills/cicd/docker/SKILL.md +1 -1
  23. package/skills/cicd/github-actions/SKILL.md +1 -1
  24. package/skills/cicd/github-flow/SKILL.md +1 -1
  25. package/skills/cicd/google-cloud/SKILL.md +1 -1
  26. package/skills/cicd/mergify/SKILL.md +11 -3
  27. package/skills/cicd/podman/SKILL.md +1 -1
  28. package/skills/content/article-review/SKILL.md +1 -1
  29. package/skills/content/article-to-image/SKILL.md +1 -1
  30. package/skills/content/flowchart-svg/SKILL.md +1 -1
  31. package/skills/content/image-gen/SKILL.md +1 -1
  32. package/skills/content/mermaid/SKILL.md +1 -1
  33. package/skills/content/wechat-article-writer/SKILL.md +1 -1
  34. package/skills/content/wechat-publisher/SKILL.md +1 -1
  35. package/skills/content/wechat-search/SKILL.md +1 -1
  36. package/skills/content/xai-search/SKILL.md +1 -1
  37. package/skills/core/distill-writing/SKILL.md +1 -1
  38. package/skills/core/doc-to-md/SKILL.md +1 -1
  39. package/skills/core/editorial-review/SKILL.md +1 -1
  40. package/skills/core/house-style/SKILL.md +1 -1
  41. package/skills/core/plain-language/SKILL.md +1 -1
  42. package/skills/core/polish-cn/SKILL.md +1 -1
  43. package/skills/core/reg-parser/SKILL.md +1 -1
  44. package/skills/core/terminology/SKILL.md +1 -1
  45. package/skills/core/write-doc/SKILL.md +1 -1
  46. package/skills/core/write-report/SKILL.md +1 -1
  47. package/skills/engineering/better-review/SKILL.md +1 -1
  48. package/skills/engineering/e2e-test/SKILL.md +1 -1
  49. package/skills/engineering/engineering/SKILL.md +1 -1
  50. package/skills/engineering/engineering-runtime/SKILL.md +1 -1
  51. package/skills/engineering/engineering-runtime/coherence/workflow.json +13 -13
  52. package/skills/engineering/ensure-coverage/SKILL.md +1 -1
  53. package/skills/engineering/golden-path/SKILL.md +1 -1
  54. package/skills/engineering/harness-runtime/SKILL.md +1 -1
  55. package/skills/engineering/resolve-issues/SKILL.md +1 -1
  56. package/skills/engineering/resolve-release/SKILL.md +1 -1
  57. package/skills/engineering/rush-issues/SKILL.md +1 -1
  58. package/skills/engineering/rush-release/SKILL.md +1 -1
  59. package/skills/engineering/test-quality/SKILL.md +1 -1
  60. package/skills/risk-compliance/compliance-audit/SKILL.md +1 -1
  61. package/skills/risk-compliance/contract-compare/SKILL.md +1 -1
  62. package/skills/risk-compliance/contract-review/SKILL.md +1 -1
  63. package/skills/risk-compliance/doc-authenticity/SKILL.md +1 -1
  64. package/skills/risk-compliance/fraud-detection/SKILL.md +1 -1
  65. package/skills/risk-compliance/payment-analysis/SKILL.md +1 -1
  66. package/skills/risk-compliance/portfolio-payment-analysis/SKILL.md +76 -156
  67. package/skills/risk-compliance/portfolio-payment-analysis/references/metrics-and-reporting.md +37 -170
  68. package/skills/risk-compliance/portfolio-payment-analysis/references/risk-history.md +32 -15
  69. package/skills/risk-compliance/portfolio-payment-analysis/references/workflow-and-contracts.md +71 -0
  70. package/skills/risk-compliance/portfolio-payment-analysis/scripts/analyze.py +10 -1
  71. package/skills/risk-compliance/portfolio-payment-analysis/scripts/assets/charts.css +1 -0
  72. package/skills/risk-compliance/portfolio-payment-analysis/scripts/assets/charts.js +60 -0
  73. package/skills/risk-compliance/portfolio-payment-analysis/scripts/assets/tabs.js +2 -0
  74. package/skills/risk-compliance/portfolio-payment-analysis/scripts/build_report.py +28 -137
  75. package/skills/risk-compliance/portfolio-payment-analysis/scripts/echarts_report.py +43 -0
  76. package/skills/risk-compliance/portfolio-payment-analysis/scripts/interactive_report.py +3 -0
  77. package/skills/risk-compliance/portfolio-payment-analysis/scripts/issuer_data.py +52 -0
  78. package/skills/risk-compliance/portfolio-payment-analysis/scripts/payment_amounts.py +20 -0
  79. package/skills/risk-compliance/portfolio-payment-analysis/scripts/render.py +6 -157
  80. package/skills/risk-compliance/portfolio-payment-analysis/scripts/render_base.py +164 -0
  81. package/skills/risk-compliance/portfolio-payment-analysis/scripts/render_custom.py +30 -0
  82. package/skills/risk-compliance/portfolio-payment-analysis/scripts/report_data.py +39 -0
  83. package/skills/risk-compliance/portfolio-payment-analysis/scripts/report_model.py +45 -0
  84. package/skills/risk-compliance/portfolio-payment-analysis/scripts/risk_dual.py +54 -0
  85. package/skills/risk-compliance/portfolio-payment-analysis/scripts/vamp_detail.py +27 -0
  86. package/skills/risk-compliance/portfolio-payment-analysis/scripts/vamp_opened_disputes.py +30 -0
  87. package/skills/risk-compliance/portfolio-payment-analysis/scripts/vendor/LICENSE +222 -0
  88. package/skills/risk-compliance/portfolio-payment-analysis/scripts/vendor/NOTICE +5 -0
  89. package/skills/risk-compliance/portfolio-payment-analysis/scripts/vendor/echarts-provenance.json +6 -0
  90. package/skills/risk-compliance/portfolio-payment-analysis/scripts/vendor/echarts.min.js +45 -0
  91. package/skills/risk-compliance/similar-domain/SKILL.md +1 -1
  92. package/skills/risk-compliance/tld-detection/SKILL.md +1 -1
@@ -369,7 +369,7 @@
369
369
  "repository": "1aboveio/ai",
370
370
  "revision": "main"
371
371
  },
372
- "contentDigest": "522a4876e0519a4163ff85976caa478a024aaacb3115f1e0cb1b4ac2832c90df",
372
+ "contentDigest": "29683c062ba8b578e045766c7cb7f289f8a71297935bf010b4eb460340563607",
373
373
  "digestExcludes": []
374
374
  },
375
375
  {
@@ -382,7 +382,7 @@
382
382
  "repository": "1aboveio/ai",
383
383
  "revision": "main"
384
384
  },
385
- "contentDigest": "e1d2a60487eec9d1fd4fec1a4f0357069904db25577c08b811a72106da86c140",
385
+ "contentDigest": "e3d3eaef2db3103142a762562ea6d7e677b18b7e3c38b1ec4236cbc4d09cac18",
386
386
  "digestExcludes": []
387
387
  },
388
388
  {
@@ -395,7 +395,7 @@
395
395
  "repository": "1aboveio/ai",
396
396
  "revision": "main"
397
397
  },
398
- "contentDigest": "81c172a2db0fe9750447af937247b8e6aed9c47928db1c0e003bba7e5c64bbc3",
398
+ "contentDigest": "5dd7c2517cf5eb057185f85529c45ff5c224ef80da402ab0f3b08c813da5a7d1",
399
399
  "digestExcludes": []
400
400
  },
401
401
  {
@@ -408,7 +408,7 @@
408
408
  "repository": "1aboveio/ai",
409
409
  "revision": "main"
410
410
  },
411
- "contentDigest": "351eaa56339849c1994c0d5735a287d5bb1aabc02225b93336b1bbc547696390",
411
+ "contentDigest": "aeda57d34ef5ef67685c1da51ec8e51222944ecd31c2c88655f3dac3a6883477",
412
412
  "digestExcludes": []
413
413
  },
414
414
  {
@@ -421,7 +421,7 @@
421
421
  "repository": "1aboveio/ai",
422
422
  "revision": "main"
423
423
  },
424
- "contentDigest": "6a1a1689ae2616d2f6f4afe4442ec72f0a54e8d829ddbf38546ed0d881a14da1",
424
+ "contentDigest": "045d39cf7e09f6c6b0873f2ed0864099c53d7c19fff6010e7934d3f506b9dbfa",
425
425
  "digestExcludes": []
426
426
  },
427
427
  {
@@ -434,7 +434,7 @@
434
434
  "repository": "1aboveio/ai",
435
435
  "revision": "main"
436
436
  },
437
- "contentDigest": "b740e99373209a7691f412d5bf7e685d82f5a50a1943ef2fd75f0395048aec4a",
437
+ "contentDigest": "c0e6a5e98ca8ba16f74db327f8e1a904b203b2cc27c7117cab2915053eb79b02",
438
438
  "digestExcludes": []
439
439
  },
440
440
  {
@@ -447,7 +447,7 @@
447
447
  "repository": "1aboveio/ai",
448
448
  "revision": "main"
449
449
  },
450
- "contentDigest": "d6589a126bc271d6b7953fc68c316c3f5b229c34215c3624074c0ffe657ef718",
450
+ "contentDigest": "a328bebf87a4c4ef2ebd2fd583121a716c1604ba030e8646faaa8d57ea39acb4",
451
451
  "digestExcludes": []
452
452
  },
453
453
  {
@@ -460,7 +460,7 @@
460
460
  "repository": "1aboveio/ai",
461
461
  "revision": "main"
462
462
  },
463
- "contentDigest": "e38611409ef33c5b33ae489c43c476f85e176003db7d24b031891e52c2875d8e",
463
+ "contentDigest": "b53f8bace45c4e33a64d2a312935353b0aad3b796b62ec88837253ae7a59373c",
464
464
  "digestExcludes": []
465
465
  },
466
466
  {
@@ -473,7 +473,7 @@
473
473
  "repository": "1aboveio/ai",
474
474
  "revision": "main"
475
475
  },
476
- "contentDigest": "7f78a80abbadcc3bfdf9d70f477b26370758d4ad3a3f860c1b73db5d3166c10a",
476
+ "contentDigest": "996ca889528de252b26ccd7d3abff3be4e84c5d3764a36b987a557e77f3c8dc2",
477
477
  "digestExcludes": []
478
478
  },
479
479
  {
@@ -486,7 +486,7 @@
486
486
  "repository": "1aboveio/ai",
487
487
  "revision": "main"
488
488
  },
489
- "contentDigest": "ae28f9f440c015a3ac9935cd050f8d489d6355172cb3cff5df72ab50e1c7dc89",
489
+ "contentDigest": "01139259ede94fa4eeca72b5f24e09cdea6f142f629d602aa834ec1d47ad52cd",
490
490
  "digestExcludes": []
491
491
  },
492
492
  {
@@ -499,7 +499,7 @@
499
499
  "repository": "1aboveio/ai",
500
500
  "revision": "main"
501
501
  },
502
- "contentDigest": "ffc64d184a564bcc131edb40d2b71ecfb63ba96a53cb25d810235e09ad0222b4",
502
+ "contentDigest": "9900e06e2edaaa3b22244f4e3d2b35ee7fcd22e8cf1d851b4624777f8e3f48c3",
503
503
  "digestExcludes": []
504
504
  },
505
505
  {
@@ -512,13 +512,13 @@
512
512
  "repository": "1aboveio/ai",
513
513
  "revision": "main"
514
514
  },
515
- "contentDigest": "3f11192933319bed874a91b004a2f41629a74b3d5f44e0c27d6a8ba2b31ce2dd",
515
+ "contentDigest": "1fe2db94e6ddd37e2e3d31aece765171cb71e196f7efed0db34ea14b50a6c397",
516
516
  "digestExcludes": [
517
517
  "coherence/workflow.json"
518
518
  ]
519
519
  }
520
520
  ],
521
- "releaseIdentity": "40e572635a1e002b4ab249a50b88a1e07cc59a64d8fcb39b5efa91c3bd6091ff",
521
+ "releaseIdentity": "79ed0ccd1faeea594111478cfd1efd095b941ad2680904ff48d9e5859a5f64d9",
522
522
  "lifecycleAuthority": "native-skills-cli",
523
523
  "repairRecipe": {
524
524
  "id": "engineering-workflow-dependency-first",
@@ -2,7 +2,7 @@
2
2
  name: ensure-coverage
3
3
  description: "Define or audit behavior-first test criteria — ACs, required test levels, mock/integration/E2E policy — across three axes: breadth (Coverage Ledger), depth (over-mocking), presentation (perceivability of browser surfaces). NOT judging whether a single test is any good (test-quality), authoring browser tests (e2e-test), reviewing a PR (better-review), or delivering issues (resolve-issues)."
4
4
  disable-model-invocation: true
5
- release-version: 0.50.2
5
+ release-version: 0.50.4
6
6
  ---
7
7
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
8
8
  # Ensure Coverage
@@ -3,7 +3,7 @@ name: golden-path
3
3
  description: "Golden-path E2E: the short list of user journeys whose failure blocks a release, kept in a repo as one contract (golden-paths.json) with a generated GOLDEN_PATHS.md and a generated GitHub Actions workflow, and run against a local build or a deployed URL for an ALIVE/DEAD verdict. Use to set golden paths up in a repo ('init golden paths', 'add golden-path CI'), to migrate an older smoke.manifest.json or a hand-built smoke setup ('audit', 'migrate smoke'), to add, change, or remove a golden path, to ask 'is the build alive?' or run them before a PR or release, or when a change touches a flow listed in GOLDEN_PATHS.md. NOT for writing the Playwright specs themselves (e2e-test), deciding what a change must prove (ensure-coverage), or general workflow YAML (github-actions)."
4
4
  dependencies:
5
5
  - e2e-test
6
- release-version: 0.50.2
6
+ release-version: 0.50.4
7
7
  ---
8
8
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
9
9
  # Golden path
@@ -3,7 +3,7 @@ name: harness-runtime
3
3
  description: Internal import-only library shared by first-party engineering packages. Not a workflow skill; never select or invoke it as a user capability.
4
4
  disable-model-invocation: true
5
5
  user-invocable: false
6
- release-version: 0.50.2
6
+ release-version: 0.50.4
7
7
  ---
8
8
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
9
9
  # Harness Runtime
@@ -8,7 +8,7 @@ dependencies:
8
8
  - better-review
9
9
  - golden-path
10
10
  - harness-runtime
11
- release-version: 0.50.2
11
+ release-version: 0.50.4
12
12
  ---
13
13
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
14
14
  # Resolve issues
@@ -4,7 +4,7 @@ description: "Slash/explicit-only (/resolve-release). Full GitHub Flow release f
4
4
  disable-model-invocation: true
5
5
  metadata:
6
6
  workflow-role: coordinator
7
- release-version: 0.50.2
7
+ release-version: 0.50.4
8
8
  ---
9
9
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
10
10
  # Resolve release
@@ -6,7 +6,7 @@ metadata:
6
6
  workflow-role: coordinator
7
7
  dependencies:
8
8
  - resolve-issues
9
- release-version: 0.50.2
9
+ release-version: 0.50.4
10
10
  ---
11
11
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
12
12
  # Rush issues (shortcut of resolve-issues)
@@ -6,7 +6,7 @@ metadata:
6
6
  workflow-role: coordinator
7
7
  dependencies:
8
8
  - resolve-release
9
- release-version: 0.50.2
9
+ release-version: 0.50.4
10
10
  ---
11
11
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
12
12
  # Rush release (shortcut of resolve-release)
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: test-quality
3
3
  description: "Seven principles for tests that catch real bugs, and an audit that reports weak, redundant, and not-coverage tests without fixing them. Use when writing, changing, or reviewing tests, or when asked whether tests are useful, redundant, over-mocked, flaky, only assert static text, or test config files, or asked to make a slow test suite faster without losing coverage, or when the user asks to write the testing conventions into a repo's CONTRIBUTING.md. NOT defining what a spec must prove (ensure-coverage) or authoring browser tests (e2e-test)."
4
- release-version: 0.50.2
4
+ release-version: 0.50.4
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Test Quality
@@ -2,7 +2,7 @@
2
2
  name: compliance-audit
3
3
  version: 2.9.0
4
4
  description: "Audit operations against financial-compliance checklists (AML/KYC, VARS, PCI-DSS, TPA oversight, onboarding, transaction monitoring). Produces tracker.md (with a tracker.xlsx export) and phase-trail.md with layered validation; cites evidence by original filename. Input: reg-parser or the built-in VARS checklist."
5
- release-version: 0.50.2
5
+ release-version: 0.50.4
6
6
  ---
7
7
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
8
8
  # Compliance Audit
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: contract-compare
3
3
  description: "Compare two or more contracts side-by-side for structured diff, gap analysis, and benchmarking. Use when: comparing contracts or agreements, contract diff, compare terms, vendor-vs-vendor, compare our template vs theirs, compliance gap between contracts. NOT for single-contract risk review — use contract-review for that."
4
- release-version: 0.50.2
4
+ release-version: 0.50.4
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Contract Compare
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: contract-review
3
3
  description: "Review contracts for legal, commercial, and compliance risks via convert → chunk review → merge → validate (+ optional mandate preprocessing). Use for reviewing, auditing, or checking any contract, agreement, NDA, MSA, or SLA; input a file path (PDF/DOCX/TXT) or pasted text."
4
- release-version: 0.50.2
4
+ release-version: 0.50.4
5
5
  ---
6
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
7
7
  # Contract Review
@@ -3,7 +3,7 @@ name: doc-authenticity
3
3
  version: 0.4.1
4
4
  description: "Screen PDF documents and raster images for fabrication, tampering, Photoshop or other image-editor use, and content validity. Detects file type, runs format-specific authenticity forensics, classifies bank statements, conversation logs, invoices, agreements, and other documents, then applies type-specific validity checks. Produces separate authenticity (NO_EVIDENCE_OF_MODIFICATION / SUSPICIOUS / LIKELY_MODIFIED / INCONCLUSIVE) and validity (VALID / INVALID / INCONCLUSIVE) verdicts. Use whenever a user asks whether a document, screenshot, scan, statement, invoice, contract, chat log, receipt, or payment evidence is genuine, original, edited, Photoshopped, manipulated, fake, or valid."
5
5
  disable-model-invocation: true
6
- release-version: 0.50.2
6
+ release-version: 0.50.4
7
7
  ---
8
8
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
9
9
  # Document and Image Authenticity
@@ -12,7 +12,7 @@ description: >
12
12
  impact, and a business report. Use for fraud, scam, mule, account-takeover,
13
13
  chargeback, dispute, transfer, collection, or payout risk analysis even when the
14
14
  user does not name this skill.
15
- release-version: 0.50.2
15
+ release-version: 0.50.4
16
16
  ---
17
17
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
18
18
  # Fraud Detection
@@ -14,7 +14,7 @@ description: >
14
14
  transactions" — even if they do not say payment-analysis. Do NOT use for
15
15
  fraud rule discovery (fraud-detection) or TLD / MCC-miscoding
16
16
  clusters (tld-detection).
17
- release-version: 0.50.2
17
+ release-version: 0.50.4
18
18
  ---
19
19
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
20
20
  # Payment Analysis
@@ -1,170 +1,90 @@
1
1
  ---
2
2
  name: portfolio-payment-analysis
3
- description: >
4
- Analyze submerchants in Helipay/Worldpay aggregator exports: compare merchants
5
- and investigate selected merchants' authorization, settlement and disputes,
6
- including descriptor mapping and overlapping exports. Portfolio-level payment
7
- overviews belong to payment-analysis; fraud rule discovery belongs to fraud-detection.
8
- release-version: 0.50.2
3
+ description: Analyze Helipay/Worldpay submerchants from authorization, settlement, dispute and DART-340 exports; compare merchants and produce an offline interactive Chinese merchant report. Use for aggregator merchant comparisons, merchant authorization performance, issuer drilldown, merchant fraud/dispute histories and VAMP extract estimates. Portfolio-wide overviews belong to payment-analysis; fraud rule discovery belongs to fraud-detection.
4
+ release-version: 0.50.4
9
5
  ---
10
6
  **Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
11
7
  # Portfolio payment analysis
12
8
 
13
- Before report drafting or substantive review, read
14
- `{house-style baseDir}/references/analytical-reporting.md` and its
15
- required writing-pattern and definition references. Use `write-report` for the report stage
16
- with this skill's merchant template, not `write-doc` or the portfolio report layout. Give
17
- delegated writers and reviewers the same resolved reference paths and require the reads;
18
- keep merchant metrics, confidentiality and specialist checks unchanged. Individual native
19
- selections also need `write-report` and its required `terminology` dependency; installation
20
- metadata does not load instructions. Missing required resources leave the report stage incomplete.
9
+ Analyze attributed payment portfolios and produce an internal Chinese merchant report
10
+ by default. Worldpay CSV and DART-340 are the bundled adapters; other sources need
11
+ verified field and identity mappings. Keep private extracts local and synthetic
12
+ fixtures in the repository.
21
13
 
22
- Produce an internal submerchant report in Chinese by default, with merchant comparisons
23
- and detail for merchants the user selects. Treat the extracts as confidential; do not
24
- publish them or include cardholder data in the report. Use the installed
25
- `payment-analysis` skill as the base: read its `SKILL.md` and relevant references for
26
- periods, event layers, metrics, daily USD FX, disputes, visualization and editorial
27
- checks. This skill owns the aggregator report structure in
28
- [metrics and reporting](references/metrics-and-reporting.md); that template replaces
29
- the base report's chapter order and mandatory Sankey. Inherit the base's metric,
30
- FX, dispute, terminology and fact-preservation rules. Pass the aggregator template
31
- to editorial review. Scope any payment-stage evidence to a merchant; do not include a
32
- portfolio funnel or Sankey.
33
-
34
- For a clean individual native installation, select `portfolio-payment-analysis`,
35
- `payment-analysis`, `write-report`, `editorial-review`, `polish-cn`, `terminology`, and `house-style`; the native
36
- picker does not install dependencies automatically. The generated Payment install
37
- group recipe includes the dependency closure.
14
+ Start with [workflow and module contracts](references/workflow-and-contracts.md), then
15
+ apply the [report structure](references/metrics-and-reporting.md). Follow the stages
16
+ below in order; scripts implement these contracts rather than define business scope.
38
17
 
39
18
  ## Workflow
40
19
 
41
- 1. Inventory authorized Helipay/Worldpay inputs, source coverage, event dates,
42
- timezone, currencies, identifiers, field dictionaries and reporting periods.
43
- Record missing and partial layers. Use the requested period and merchant selection;
44
- otherwise apply the base skill's period-selection rule, then pass both required
45
- CLI dates explicitly. Identify an unsupported or unresolved period
46
- rather than inventing one.
47
- 2. Read [identity and reconciliation](references/identity-and-reconciliation.md)
48
- before deduplication or joining. Build the mapping and reconciliation evidence;
49
- scope every join to the same verified merchant and source namespace. Unknown or
50
- conflicting identities are not reassigned by descriptor or order similarity.
51
- 3. Read [metrics and reporting](references/metrics-and-reporting.md). Compute
52
- merchant rates with merchant-specific denominators and disclose sample counts.
53
- Include week-by-week comparisons for every submerchant within the report period,
54
- using Monday–Sunday weeks and explicit partial-week labels. Compare other periods
55
- for individual merchants when explicitly requested and supported.
56
- Read [risk history](references/risk-history.md) for 340FRD, dispute histories
57
- and VAMP. Use the base skill's FX and dispute rules; leave unsupported figures
58
- unresolved, not zero.
59
- 4. Present merchant findings, comparison, selected merchant detail and merchant-specific
60
- investigation actions. Explain missing data, conflicts, unmatched records, rate
61
- denominators and attribution limits. Keep totals only as internal reconciliation
62
- evidence; do not report portfolio summaries, trends, decomposition, funnels or
63
- overall dispute chapters.
64
- Follow the base skill's editorial review, Chinese polish and fact-preservation
65
- checks when producing a complete report.
66
-
67
- ## CLI and scope
68
-
69
- The bundled workflow uses Python 3 standard-library scripts and local Worldpay CSV
70
- exports. It makes no network calls. Authorization data is required; settlement and
71
- dispute files are used when supplied. Run all three commands:
20
+ 1. Read the installed `payment-analysis/SKILL.md` and its event-layer, metric, FX,
21
+ dispute and terminology references. Inventory authorized inputs, source dictionaries,
22
+ merchant/provider identifiers, coverage, timezone and currencies. Fix explicit main
23
+ dates using the user's period or the base period-selection question. The common cutoff
24
+ is the earliest supplied layer's last event date for the main table and risk history.
25
+ Authorization charts use the earlier of requested end and last authorization date,
26
+ independently of settlement coverage; disclose both cutoffs and partial periods.
27
+ 2. Before deduplication or joins, read [identity and reconciliation](references/identity-and-reconciliation.md).
28
+ Scope identity and joins to the verified merchant/provider namespace. Descriptor,
29
+ Gateway MID and MID are not interchangeable submerchant keys. Conflicting auth or
30
+ settlement identities stop generation; retain unresolved attribution explicitly.
31
+ 3. Read [metrics and reporting](references/metrics-and-reporting.md) and
32
+ [risk history](references/risk-history.md). Use the bundled calculator and builder
33
+ for merchant-specific denominators, two-period detail, current-week issuer top five,
34
+ eight-week amount/count trends and risk count/rate histories. Unknown amounts or
35
+ missing daily USD FX leave affected sums unavailable, not mixed-currency totals.
36
+ 4. Use `write-report` for the report stage with this skill's template. Read
37
+ `house-style/references/analytical-reporting.md`, `analytical-writing-patterns.md`
38
+ and `definitions-and-metrics.md`; load required `terminology`, `editorial-review`
39
+ and domain-required `polish-cn`. Pass the same references and merchant template to
40
+ any authorized writer/reviewer. Missing dependencies leave report review incomplete.
41
+ Review `presentation.json`, apply narrative edits there and rerender both outputs.
42
+ 5. Verify arithmetic, chart values, current-week issuer selection, null/zero semantics,
43
+ tabs, tooltips, drilldown and offline printing. Open the saved HTML in a local browser;
44
+ rendering instructions alone are not visual verification. Retain check evidence outside
45
+ the business report and state any unverified rendering or missing data.
46
+
47
+ ## Local CLI
48
+
49
+ The calculator uses Python standard-library CSV exports. ECharts is pinned and bundled;
50
+ report generation and viewing make no network calls.
72
51
 
73
52
  ```sh
74
- python3 {portfolio-payment-analysis baseDir}/scripts/analyze.py --input PATH --output OUTPUT --main-start YYYY-MM-DD --main-end YYYY-MM-DD
75
- python3 {portfolio-payment-analysis baseDir}/scripts/build_report.py --facts OUTPUT/facts.json --output OUTPUT
76
- # After editing or polishing presentation.json, rerender without rebuilding its narrative:
77
- python3 {portfolio-payment-analysis baseDir}/scripts/render.py --model OUTPUT/presentation.json --output OUTPUT
53
+ python3 {skill-dir}/scripts/analyze.py --input PATH --output OUTPUT --main-start YYYY-MM-DD --main-end YYYY-MM-DD
54
+ python3 {skill-dir}/scripts/build_report.py --facts OUTPUT/facts.json --output OUTPUT
55
+ python3 {skill-dir}/scripts/render.py --model OUTPUT/presentation.json --output OUTPUT
78
56
  ```
79
57
 
80
- The calculator caps the requested end at the earliest last event date among supplied
81
- layers. It reports the effective cutoff and compares the corresponding prior-month
82
- dates. Source event ranges alone do not establish continuous coverage. Check period lengths
83
- and source coverage before interpreting a comparison.
84
-
85
- The report outputs are `overview.zh.html` and `overview.zh.md`, backed by the reviewed
86
- `presentation.json`. Supporting internal files are `facts.json`, `merchant-metrics.csv`,
87
- `merchant-mapping.csv`, `merchant-weekly.csv`, `merchant-segments.csv`,
88
- `merchant-detail-comparison.csv`, `merchant-risk-history.csv`, and
89
- `coverage-and-reconciliation.json`; legacy aggregate fields
90
- in these files are not report deliverables. The HTML is self-contained, supports
91
- merchant filtering and printing, and sends no data to external services. Use
92
- `--detail-merchant ID` on `build_report.py` (repeat it for several IDs) when the user
93
- names merchants. Otherwise expand the largest merchant by attempts and the lowest-rate
94
- merchant with at least 30 attempts, while keeping every other merchant available in
95
- collapsed detail sections. This is a navigation rule, not a significance test.
96
- Section 2 retains full weekly history. Section 3 uses charts to compare only this week
97
- with last week, matching weekdays when the current week is partial. Every merchant
98
- has BIN-country, card-product (payment method × card type), fixed USD amount-bucket,
99
- authentication and unsuccessful-response charts. Country and card-product charts use
100
- compact paired bars. Amount buckets use side-by-side histograms, unsuccessful responses
101
- use side-by-side bars, and authentication uses paired pies for counts and USD amounts,
102
- not rates. Each pair compares aligned weeks. Use the shared `comparison_charts.py` for
103
- all report charts. Section 3 omits settlement sales/refunds. Include merchant risk
104
- history charts as specified in the risk reference. Treat 340FRD file generation date
105
- as its report date, retaining the earliest date for exact repeats. Monthly dispute
106
- and fraud charts offer counts and network-style rate estimates with numerator and
107
- denominator details; weekly charts retain counts. Visa uses same-month sales,
108
- Mastercard ECP uses prior-month sales, and EFM uses fraud chargebacks divided by
109
- prior-month e-commerce sales, not all 340FRD Mastercard reports. Fix groups across the union of the
110
- two comparison periods, and display
111
- only those two ranges in chart legends and expandable metric-row tables. Follow the
112
- segment and denominator contract in the reporting reference.
113
- Include merchant-specific historical refund and dispute follow-ups in the action table
114
- when supported, without adding portfolio history chapters. If the user says a merchant is
115
- historical and out of this report, pass `--exclude-merchant ID` (repeat it for several IDs).
116
- That removes the merchant from comparison, weekly tables, detail, the action list, and every
117
- linked merchant CSV. State the exclusion once: it is not a closure finding and not missing data.
118
- Do not lead the report with an excluded merchant. A later rebuild without the flag puts the
119
- merchant back.
120
-
121
- The generated lowest-authorization-rate sentence only chooses an authorization review. It is
122
- not the investigation order. If fraud or predispute history would change who a reader checks
123
- first, put that merchant and month in the opening, and say whether the month is inside the
124
- report window. Do not title a real extract 样本报告; 样本 is only for a small attempt count.
125
-
126
- A packed week cell that includes dollars must say 授权成功 USD. The rule against repeating a
127
- metric label applies only when the column header already names that measure. When the sales
128
- column contains both 0.00 and blank, say which merchants have an observed zero and which have
129
- no settlement layer. An invalid or post-cutoff 340FRD file must state the effect on counts, not
130
- only the date. Unmatched fraud records must state the count and amount excluded from merchant
131
- figures.
132
-
133
- The report includes per-submerchant weekly counts, rates, successful authorization
134
- amount USD, settled sales, refunds and dispute observations. Each merchant's breakdown
135
- uses date/week columns and metric rows; successful authorization amount has its own
136
- row and never substitutes settled sales. Only adjacent full calendar weeks with available observations and valid
137
- denominators receive week-over-week changes; partial weeks retain their metrics but
138
- have no week-over-week change. Read the weekly contract in the reporting reference.
139
-
140
- The optional `--fx-rates` accepts caller-supplied daily USD rates. The CLI does not
141
- verify their provenance; obtain and preserve Forex Service evidence as specified by
142
- the base FX contract before relying on converted amounts. Without a required rate,
143
- the affected amount is unavailable while count metrics remain available. Render unavailable
144
- cells blank, not N/A; show only `USD 33...` in a USD value cell, without repeating its
145
- metric label. Remove extra explanatory prose while retaining necessary coverage limits.
146
-
147
- Source fields remain unchanged in JSON. CSV exports prefix spreadsheet-sensitive
148
- text with an apostrophe so opening a report does not execute merchant names or
149
- labels as formulas; numeric metrics remain numeric.
150
-
151
- Treat internal authorization counters together with `layer_observed.auth`: a zero
152
- observation count with that flag false is not confirmed zero business activity.
153
- The report and business CSV cells remain blank in that case. Distinguish observed
154
- dispute snapshots from deduplicated case-stage counts and verified opening counts;
155
- they answer different questions and need not match. Formatting-only aliases of a
156
- verified provider are duplicates, not new snapshots. Sales or refunds without
157
- stable event identity remain observations, not confirmed monetary totals.
158
-
159
- The report is an extract-based operational view. The v1 CLI refuses generation if
160
- any authorization or settlement identity has conflicting values; resolve those
161
- sources before rerunning. This conservative refusal can block clean periods too.
162
- It never substitutes totals from an unlabeled clean subset. An absent layer or a
163
- window without observed settlement/dispute rows produces unavailable metrics, not
164
- confirmed zero activity. Dispute rows remain observed
165
- snapshots until opening semantics are verified. The CLI computes supported
166
- network-style extract estimates, not official network assessments; unsupported rate
167
- cells stay blank. Merchant-scoped settlement and join evidence must not imply that all
168
- current-period sales descend from current-period approvals. Review the saved
169
- `presentation.json` as the narrative source, then rerender both formats. Preserve
170
- raw customer data in the input project; use synthetic fixtures for repository tests.
58
+ Outputs: `overview.zh.html`, `overview.zh.md`, reviewed `presentation.json`, `facts.json`
59
+ and merchant CSV/JSON reconciliation evidence. HTML embeds ECharts, all aggregate data
60
+ and third-party notices; it works offline without React or a CDN. Calculations stay in
61
+ facts, presentation owns narrative, rendering does not recompute payments.
62
+
63
+ `--detail-merchant ID` selects the initial merchant tab; all merchants remain accessible.
64
+ `--exclude-merchant ID` removes an explicitly excluded historical merchant from report and
65
+ business exports; repeat either flag as needed. State an exclusion once, not as a closure
66
+ finding. `--fx-rates` accepts daily USD rates only with preserved Forex Service provenance;
67
+ the CLI cannot certify caller-supplied provenance.
68
+
69
+ For selected Parquet snapshots, retain their source-selection accounting. Recover missing
70
+ source fields only through verified file hashes and source row references, with row-count
71
+ reconciliation. Do not rerun raw overlapping exports as a second payment population or
72
+ infer merchant identity from descriptors. The CSV CLI does not directly read Parquet.
73
+
74
+ ## Presentation contract
75
+
76
+ Use only `1. 子商户对比` and `3. 重点子商户详情`, with merchant findings above them.
77
+ The first table includes daily authorization-attempt count sparklines and actual approved
78
+ authorization USD amounts, not sales. Every merchant gets a tab; the tab starts with up
79
+ to eight observed calendar weeks of amount bars and count lines. Country and card-product
80
+ charts show approval rate plus approvals/attempts only. Country drilldown selects its
81
+ Top 5 banks using positive **current-period** attempts, keeps prior-period values for
82
+ those same banks and retains undefined rates as gaps. Other comparison dimensions keep
83
+ the paired-chart layouts in the reporting reference.
84
+
85
+ All five risk histories show count bars and rate lines simultaneously. VAMP is an explicitly
86
+ labeled extract estimate from Visa TC40 plus already-opened formal disputes over same-month
87
+ merchant Visa sales; pending/response/loss/reversal status does not remove a formal case.
88
+ Official network assessment remains distinct. No portfolio funnel, totals chapter, weekly
89
+ summary chapter, action chapter, coverage chapter, chart detail expansion or VAMP component
90
+ table is rendered; supporting evidence remains available in files.