Skip to content

feat(wallet_screening): schema v2 verdicts and hop-1 exposures (#439) - #447

Merged
rosspeili merged 1 commit into
ARPAHLS:mainfrom
Hendobox:feat/issue-439-wallet-screening-slice2-schema-v2
Oct 20, 2026
Merged

rosspeili merged 1 commit into
ARPAHLS:mainfrom
Hendobox:feat/issue-439-wallet-screening-slice2-schema-v2

Conversation

@Hendobox

Copy link
Copy Markdown
Contributor

Description

Slice 2 of #439: bump finance/wallet_screening to 2.0.0 with report schema v2 (verdict, risk_factors, hop-1 indirect_exposures / risky_counterparties) while dual-emitting summary.risk_flag and summary.total_transactions for v1 hosts.

Acceptance criteria → diff:

  • Deterministic compute_risk_level() matrix (critical/high/medium/low → DENY/REVIEW/ALLOW) → skills/finance/wallet_screening/skill.py; covered by test_compute_risk_level_matrix in test_skill.py
  • Hop-1 counterparty sanctions screening → _collect_indirect_exposures; covered by test_hop1_sanctioned_counterparty_is_high_deny
  • Schema v2 report (schema_version, verdict, risk_factors, aliases) → _generate_report_data; covered by test_execute_success, tornado / internal flags, test_direct_sanctions_hit_is_critical_deny
  • Version / catalog / card / instructions → manifest.yaml 2.0.0, docs/skills/finance/wallet_screening.md (+ hubs), card.json, instructions.md, CHANGELOG [Unreleased]; skill-history Commit cell is TBD (no local SHA)
  • Card UI fixture keys resolve → tests/fixtures/card_ui_schema/finance__wallet_screening.json

Out of this PR (later #439 slices): offline-direct mode, live Chainalysis/TRM, provenance.report_hash.

Type of Change

  • New Skill — new registry bundle under skills/
  • Skill Upgrade — changes to an existing skill under skills/
  • Bug Fix — incorrect runtime or framework behavior
  • Documentation — docs, README, CONTRIBUTING only
  • Framework Feature — skillware/core/ loader, env, adapters
  • CLI — skillware/cli.py, docs/usage/cli.md
  • Examples — examples/*.py, agent loops, examples/README.md
  • Packaging — PyPI wheel, pyproject.toml, MANIFEST.in
  • RFC / meta — templates, labels, CI, or large design doc

Checklist (all PRs)

  • Linked GitHub issue (Fixes #… or Refs #…)
  • Scope matches the issue — no unrelated refactors
  • Contribution complies with Legal notice and code ownership (original work, MIT license grant, no malicious logic)
  • python -m black --check ., flake8, and ruff check . pass locally (or CI-equivalent subset)
  • pytest skills/ and pytest tests/ pass locally when relevant
  • CHANGELOG.md updated under [Unreleased] when user-visible behavior changes
  • examples/README.md updated if this PR adds, renames, or removes a runnable script
  • Ran pytest tests/test_registry_docs.py when skills, examples index, or agent-loops matrix changed
  • Ran pytest tests/test_skill_docs.py when catalog Usage Examples or provider snippets changed

New or updated skill

Skip unless this PR adds or changes files under skills/.

Bundle and metadata

  • Skill at skills/<category>/<skill_name>/ (from templates/python_skill/ or equivalent)
  • manifest.yaml: name (full ID), version, description, parameters, constitution, real issuer
  • Optional: short_description, issuer.github, issuer.org, requirements, env_vars

Effect, Directive, Assurance

  • Deterministic skill.py (Effect; no ad-hoc LLM-generated execution paths)
  • instructions.md (Directive) explains when and how to use the skill
  • card.json (Presentation) issuer matches manifest when present
  • test_skill.py (Assurance) covers execution and schema expectations
  • SkillLoader.load_skill("<category>/<skill_name>") succeeds (or deps documented)

Documentation and catalog

  • docs/skills/<category>/<skill_name>.md, category hub row, row in docs/skills/README.md, and docs/sitemap.md
  • Usage Examples for Gemini, Claude, OpenAI, DeepSeek, Ollama per skill usage template

Constitution and safety (skills only)

Read-only screening against bundled public lists plus Etherscan history. No signing, broadcasting, or live Chainalysis/TRM calls. Hosts should halt on verdict.decision of DENY and require a person on REVIEW. Not legal advice.

Related Issues

Refs #439

…LS#439)

Add deterministic risk tiers, verdict/risk_factors, and hop-1 sanctions screening while dual-emitting risk_flag for v1 hosts.

@rosspeili rosspeili left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hendobox this LGTM! Thanks.

My only comments would be, is this the right time to bump the skill to v2? it's ok if you did it on purpose and next slice will be the last but won't change the version, eg. keep next slices also v2 to avoid drift. or v2.x.x.

Also in instructions, no need for the host/agent to know the schema v2, the summarization line could stay as it was, but again, minor and non blocking, we can you think about these and patch in next slice if needed.

Will merge this as is. <3

@rosspeili
rosspeili merged commit ec30a64 into ARPAHLS:main Oct 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants