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
- 参考文档references/repo-provenance.md3.3 KB
- 参考文档references/repo-routing-metadata.json413 B
- 参考文档references/troubleshooting.md3.3 KB
- 脚本scripts/check_serenata_imports.py5.2 KB
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 forrosie.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,.envvariables, migrations, sample data load order, management commands, Celery/cache/PostgreSQL/Node/Elm boundaries, and reference-only research/deploy scripts.
Typical workflow map
- If starting from raw civic spending data, use
rosie-suspicion-pipelineto understand or run Rosie and producesuspicions.xz. - Use
deployment-and-data-opsto prepare Jarbas configuration, migrate the database, load reimbursements/companies/suspicions, and rebuild search vectors when PostgreSQL is available. - Use
jarbas-data-apito query or explain API results after data exists. - 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
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.
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.
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.
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.
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.
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).