AGENT SKILL

serenata-de-amor

Use Operação Serenata de Amor's Rosie suspicious-expense pipeline and Jarbas Django data API, setup, and data-loading workflows.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
serenata-de-amor
license
MIT
metadata
{ "disco-role": "operating" }
description
Use Operação Serenata de Amor's Rosie suspicious-expense pipeline and Jarbas Django data API, setup, and data-loading workflows.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

Serenata de Amor

Use this repo skill when a task involves Operação Serenata de Amor, especially Rosie suspicious-reimbursement analysis, Jarbas Django/DRF reimbursement APIs, or the service/data setup that connects them.

First checks

  • Read references/repo-provenance.md before assuming this skill is current for a checkout. Refresh if the commit, dirty state, source roots, dependencies, or public workflow files changed.
  • Use scripts/check_serenata_imports.py for a safe import/Django setup preflight. It does not run migrations, start services, download datasets, or call external APIs.
  • Read references/troubleshooting.md for cross-cutting legacy dependency, non-packaged checkout, service, and safety boundaries.

Route by task

  • Generate or inspect suspicious-expense output with Rosie -> sub-skills/rosie-suspicion-pipeline/. Use it for rosie.py run, rosie.py test, classifier required columns, Core(settings, adapter), suspicions.xz, model caches, and no-download classifier smoke checks.
  • Use, build, or debug Jarbas API queries -> sub-skills/jarbas-data-api/. Use it for reimbursement/company/applicant/subquota/receipt endpoints, query parameters, pagination, serializers, CNPJ/CPF cleaning, same-day logic, and PostgreSQL search-vector caveats.
  • Set up services, load data, or operate maintenance commands -> sub-skills/deployment-and-data-ops/. Use it for Docker/local setup, .env variables, migrations, sample data load order, management commands, Celery/cache/PostgreSQL/Node/Elm boundaries, and reference-only research/deploy scripts.

Typical workflow map

  1. If starting from raw civic spending data, use rosie-suspicion-pipeline to understand or run Rosie and produce suspicions.xz.
  2. Use deployment-and-data-ops to prepare Jarbas configuration, migrate the database, load reimbursements/companies/suspicions, and rebuild search vectors when PostgreSQL is available.
  3. Use jarbas-data-api to query or explain API results after data exists.
  4. When a failure crosses boundaries, start with the owning sub-skill and follow its sibling links rather than duplicating setup or API details.

Runtime and service expectations

Serenata de Amor is a legacy multi-service project, not a single modern pip package. Public evidence shows Python 3.6-era CI and pinned 2019 dependencies. For practical inspection or maintenance, use a compatible legacy Python environment and avoid unpinned upgrades unless the task is explicitly to modernize the repo.

Full Jarbas behavior uses PostgreSQL-specific fields and search vectors. SQLite can be enough for import/system-check preflights, but it is not evidence that search or all model-field behavior works in production. RabbitMQ/Celery, memcached, Docker, Node/Elm, Twitter credentials, DigitalOcean credentials, and network-backed dataset downloads are optional or service-bound surfaces; do not start or mutate them without task-specific authorization.

Safe validation commands

From a target checkout with suitable dependencies installed:

$ python scripts/check_serenata_imports.py --repo-root <serenata-checkout>
$ python sub-skills/rosie-suspicion-pipeline/scripts/rosie_smoke.py --repo-root <serenata-checkout>
$ python sub-skills/jarbas-data-api/scripts/jarbas_api_probe.py smoke
$ python sub-skills/deployment-and-data-ops/scripts/jarbas_manage_check.py --repo-root <serenata-checkout>

These helpers are bundled with the skill and are safe by default. They do not replace native unit tests, migrations, sample data loads, or service-backed API verification.

Do not use this skill for

  • Generic Django, Celery, scikit-learn, or civic-tech questions that do not involve Serenata de Amor concepts, commands, data columns, APIs, or errors.
  • Executing production deploy/update/cron/research fetch scripts without explicit credentials, target environment, rollback plan, and user authorization.
  • Claiming current compatibility with modern Python/NumPy/Django stacks unless you have refreshed and verified the repository.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351