Add files using upload-large-folder tool
Browse files- README.md +30 -0
- docs/HUGGINGFACE_CODEX_PUBLISHING_KIT.md +62 -0
- skills/hf-codex-publisher/SKILL.md +25 -0
- snippets/build_irpf_family.sh +8 -0
- snippets/codex_hf_task_prompt.md +3 -0
- snippets/publish_hf_kit.sh +7 -0
- snippets/quality_gate_zero.sh +6 -0
- templates/HF_CODEX_KIT_PUBLISH_MANIFEST.template.json +6 -0
- templates/IRPF_BUILD_MANIFEST.template.json +22 -0
README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# irpf-codex-build-kit
|
| 2 |
+
|
| 3 |
+
Reusable Hugging Face + Codex kit extracted from `pro_05_irpf_creator`.
|
| 4 |
+
|
| 5 |
+
## Included
|
| 6 |
+
|
| 7 |
+
- `docs/HUGGINGFACE_CODEX_PUBLISHING_KIT.md`
|
| 8 |
+
- `templates/IRPF_BUILD_MANIFEST.template.json`
|
| 9 |
+
- `templates/HF_CODEX_KIT_PUBLISH_MANIFEST.template.json`
|
| 10 |
+
- `snippets/`
|
| 11 |
+
- `skills/hf-codex-publisher/SKILL.md`
|
| 12 |
+
|
| 13 |
+
## Purpose
|
| 14 |
+
|
| 15 |
+
This bundle standardizes how to:
|
| 16 |
+
|
| 17 |
+
1. drive IRPF builds from versioned manifests
|
| 18 |
+
2. apply objective quality gates
|
| 19 |
+
3. package reusable docs/templates/snippets
|
| 20 |
+
4. publish a clean, no-PII kit to the Hugging Face Hub
|
| 21 |
+
|
| 22 |
+
## Source repository
|
| 23 |
+
|
| 24 |
+
- local source: `pro_05_irpf_creator`
|
| 25 |
+
- publish manifest: `frontend_report/HF_CODEX_KIT_PUBLISH_MANIFEST.json`
|
| 26 |
+
|
| 27 |
+
## Notes
|
| 28 |
+
|
| 29 |
+
- Generated fiscal artifacts are intentionally excluded.
|
| 30 |
+
- Use the templates and snippets as the starting point for new lots and new repos.
|
docs/HUGGINGFACE_CODEX_PUBLISHING_KIT.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Hugging Face + Codex Publishing Kit
|
| 2 |
+
|
| 3 |
+
## Objetivo
|
| 4 |
+
|
| 5 |
+
Padronizar a publicação de um kit reutilizável do projeto para o Hugging Face, sem empurrar dados fiscais reais.
|
| 6 |
+
|
| 7 |
+
O kit deve conter apenas:
|
| 8 |
+
|
| 9 |
+
- README operacional
|
| 10 |
+
- documentação de uso
|
| 11 |
+
- templates versionados
|
| 12 |
+
- snippets de execução
|
| 13 |
+
- skill local para fluxo Hugging Face + Codex
|
| 14 |
+
|
| 15 |
+
## Fonte de verdade
|
| 16 |
+
|
| 17 |
+
- manifesto do build IRPF: `frontend_report/IRPF_FAMILY_BUILD_MANIFEST.json`
|
| 18 |
+
- manifesto de publicação HF: `frontend_report/HF_CODEX_KIT_PUBLISH_MANIFEST.json`
|
| 19 |
+
- templates: `frontend_report/templates`
|
| 20 |
+
- snippets: `frontend_report/snippets`
|
| 21 |
+
- skill: `skills/hf-codex-publisher/SKILL.md`
|
| 22 |
+
- exportador/publicador: `src/irpf_creator/hf_codex_kit.py`
|
| 23 |
+
|
| 24 |
+
## Regras
|
| 25 |
+
|
| 26 |
+
1. nunca publique `frontend_report/static/generated/`
|
| 27 |
+
2. nunca publique PDFs, JSONs processados ou planilhas com PII
|
| 28 |
+
3. publique apenas material genérico e replicável
|
| 29 |
+
4. use manifesto versionado para o repo alvo no Hugging Face
|
| 30 |
+
|
| 31 |
+
## Comandos
|
| 32 |
+
|
| 33 |
+
Exportar bundle local:
|
| 34 |
+
|
| 35 |
+
```bash
|
| 36 |
+
uv run irpf-hf-kit \
|
| 37 |
+
--manifest frontend_report/HF_CODEX_KIT_PUBLISH_MANIFEST.json
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
Publicar no Hugging Face:
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
uv run irpf-hf-kit \
|
| 44 |
+
--manifest frontend_report/HF_CODEX_KIT_PUBLISH_MANIFEST.json \
|
| 45 |
+
--publish
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
## Estrutura esperada do bundle exportado
|
| 49 |
+
|
| 50 |
+
```text
|
| 51 |
+
README.md
|
| 52 |
+
docs/
|
| 53 |
+
templates/
|
| 54 |
+
snippets/
|
| 55 |
+
skills/
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
## Resultado esperado
|
| 59 |
+
|
| 60 |
+
- repo dedicado no Hugging Face com documentação clara
|
| 61 |
+
- material reproduzível para novos lotes
|
| 62 |
+
- trilha consistente entre Codex, README, snippets e skill local
|
skills/hf-codex-publisher/SKILL.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# hf-codex-publisher
|
| 2 |
+
|
| 3 |
+
## Quando usar
|
| 4 |
+
|
| 5 |
+
Use esta skill quando a tarefa exigir empacotar documentação, templates, snippets e skills do projeto em um bundle publicável no Hugging Face e manter esse fluxo alinhado com Codex.
|
| 6 |
+
|
| 7 |
+
## Leitura mínima
|
| 8 |
+
|
| 9 |
+
1. `README.md`
|
| 10 |
+
2. `12_docs/irpf/HUGGINGFACE_CODEX_PUBLISHING_KIT.md`
|
| 11 |
+
3. `frontend_report/HF_CODEX_KIT_PUBLISH_MANIFEST.json`
|
| 12 |
+
|
| 13 |
+
## Workflow
|
| 14 |
+
|
| 15 |
+
1. Gere ou atualize o bundle com `uv run irpf-hf-kit --manifest frontend_report/HF_CODEX_KIT_PUBLISH_MANIFEST.json`.
|
| 16 |
+
2. Não publique artefatos com PII, planilhas finais ou `frontend_report/static/generated/`.
|
| 17 |
+
3. Valide o README do kit, templates e snippets antes do upload.
|
| 18 |
+
4. Para publicar, use `--publish` e confirme que o `repo_id` do manifesto está correto.
|
| 19 |
+
5. Se a skill ou o fluxo mudarem, atualize `README.md`, `instructions/`, `skills/` e `ai-context/`.
|
| 20 |
+
|
| 21 |
+
## Resultado esperado
|
| 22 |
+
|
| 23 |
+
- bundle exportado para Hugging Face
|
| 24 |
+
- documentação operacional consistente
|
| 25 |
+
- repo do Hub criado ou atualizado sem dados sensíveis
|
snippets/build_irpf_family.sh
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
uv sync
|
| 5 |
+
uv run irpf-family-build \
|
| 6 |
+
--manifest frontend_report/IRPF_FAMILY_BUILD_MANIFEST.json
|
| 7 |
+
|
| 8 |
+
uv run irpf-http-gateway
|
snippets/codex_hf_task_prompt.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Prompt snippet: Codex + Hugging Face publish flow
|
| 2 |
+
|
| 3 |
+
Padronize este lote IRPF usando o manifesto versionado, gere o bundle limpo sem PII para o Hugging Face, valide o gate de qualidade e publique no repo configurado em `frontend_report/HF_CODEX_KIT_PUBLISH_MANIFEST.json`.
|
snippets/publish_hf_kit.sh
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
uv sync
|
| 5 |
+
uv run irpf-hf-kit \
|
| 6 |
+
--manifest frontend_report/HF_CODEX_KIT_PUBLISH_MANIFEST.json \
|
| 7 |
+
--publish
|
snippets/quality_gate_zero.sh
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
uv run irpf-family-build \
|
| 5 |
+
--manifest frontend_report/IRPF_FAMILY_BUILD_MANIFEST.json \
|
| 6 |
+
--max-warnings 0
|
templates/HF_CODEX_KIT_PUBLISH_MANIFEST.template.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"profile_name": "irpf-codex-build-kit",
|
| 3 |
+
"repo_id": "seu-usuario/irpf-codex-build-kit",
|
| 4 |
+
"repo_type": "dataset",
|
| 5 |
+
"export_dir": "frontend_report/hf_export/irpf-codex-build-kit"
|
| 6 |
+
}
|
templates/IRPF_BUILD_MANIFEST.template.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"profile_name": "irpf_lote_exemplo",
|
| 3 |
+
"ano_exercicio": 2025,
|
| 4 |
+
"ano_calendario": 2024,
|
| 5 |
+
"source_roots": [
|
| 6 |
+
".",
|
| 7 |
+
"../repositorio_origem"
|
| 8 |
+
],
|
| 9 |
+
"dashboard_json_name": "irpf_lote_exemplo_dashboard.json",
|
| 10 |
+
"consolidated_xlsx_name": "IRPF_LOTE_EXEMPLO_CONSOLIDADO_2025.xlsx",
|
| 11 |
+
"build_report_name": "irpf_lote_exemplo_build_report.json",
|
| 12 |
+
"taxpayers": [
|
| 13 |
+
{
|
| 14 |
+
"cpf": "00000000000",
|
| 15 |
+
"name": "Contribuinte Exemplo 1"
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"cpf": "11111111111",
|
| 19 |
+
"name": "Contribuinte Exemplo 2"
|
| 20 |
+
}
|
| 21 |
+
]
|
| 22 |
+
}
|