riftbound-scraper 1.0.0__tar.gz

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 (312) hide show
  1. riftbound_scraper-1.0.0/.cursor/agents/README.md +26 -0
  2. riftbound_scraper-1.0.0/.cursor/agents/code-reviewer-ia.md +84 -0
  3. riftbound_scraper-1.0.0/.cursor/agents/functional-reviewer-ia.md +71 -0
  4. riftbound_scraper-1.0.0/.cursor/agents/qa-test-engineer-ia.md +85 -0
  5. riftbound_scraper-1.0.0/.cursor/agents/security-reviewer-ia.md +71 -0
  6. riftbound_scraper-1.0.0/.cursor/rules/000_project_governance.mdc +45 -0
  7. riftbound_scraper-1.0.0/.cursor/rules/001_hybrid_agent_execution_policy.mdc +63 -0
  8. riftbound_scraper-1.0.0/.cursor/rules/010_python_quality_constraints.mdc +96 -0
  9. riftbound_scraper-1.0.0/.cursor/rules/011_python_code_organization_constraints.mdc +134 -0
  10. riftbound_scraper-1.0.0/.cursor/rules/020_prompt_driven_workflow.mdc +50 -0
  11. riftbound_scraper-1.0.0/.cursor/rules/030_git_branch_pr_policy.mdc +71 -0
  12. riftbound_scraper-1.0.0/.cursor/rules/040_no_go_policy.mdc +49 -0
  13. riftbound_scraper-1.0.0/.cursor/rules/050_parallel_development_policy.mdc +59 -0
  14. riftbound_scraper-1.0.0/.cursor/rules/060_documentation_policy.mdc +48 -0
  15. riftbound_scraper-1.0.0/.cursor/rules/070_security_policy.mdc +37 -0
  16. riftbound_scraper-1.0.0/.cursor/rules/080_cursor_artifacts_policy.mdc +54 -0
  17. riftbound_scraper-1.0.0/.cursor/rules/090_agent_communication_policy.mdc +122 -0
  18. riftbound_scraper-1.0.0/.cursor/rules/100_cursor_subagents_usage_policy.mdc +81 -0
  19. riftbound_scraper-1.0.0/.cursor/skills/agent-handoff/SKILL.md +79 -0
  20. riftbound_scraper-1.0.0/.cursor/skills/backlog-impact-analysis/SKILL.md +75 -0
  21. riftbound_scraper-1.0.0/.cursor/skills/branch-pr-risk-audit/SKILL.md +51 -0
  22. riftbound_scraper-1.0.0/.cursor/skills/code-review/SKILL.md +71 -0
  23. riftbound_scraper-1.0.0/.cursor/skills/conflict-resolution/SKILL.md +66 -0
  24. riftbound_scraper-1.0.0/.cursor/skills/decision-log/SKILL.md +44 -0
  25. riftbound_scraper-1.0.0/.cursor/skills/documentation-update/SKILL.md +78 -0
  26. riftbound_scraper-1.0.0/.cursor/skills/functional-validation/SKILL.md +52 -0
  27. riftbound_scraper-1.0.0/.cursor/skills/implementation-planning/SKILL.md +88 -0
  28. riftbound_scraper-1.0.0/.cursor/skills/no-go-remediation/SKILL.md +65 -0
  29. riftbound_scraper-1.0.0/.cursor/skills/pr-preparation/SKILL.md +94 -0
  30. riftbound_scraper-1.0.0/.cursor/skills/python-code-organization-audit/SKILL.md +92 -0
  31. riftbound_scraper-1.0.0/.cursor/skills/qa-validation/SKILL.md +77 -0
  32. riftbound_scraper-1.0.0/.cursor/skills/security-review/SKILL.md +59 -0
  33. riftbound_scraper-1.0.0/.cursor/skills/status-board-update/SKILL.md +32 -0
  34. riftbound_scraper-1.0.0/.cursor/skills/workflow-run-management/SKILL.md +68 -0
  35. riftbound_scraper-1.0.0/.cursor/worktrees.json +21 -0
  36. riftbound_scraper-1.0.0/.github/workflows/ci.yml +80 -0
  37. riftbound_scraper-1.0.0/.github/workflows/release.yml +175 -0
  38. riftbound_scraper-1.0.0/.gitignore +413 -0
  39. riftbound_scraper-1.0.0/AGENTS.md +237 -0
  40. riftbound_scraper-1.0.0/CHANGELOG.md +20 -0
  41. riftbound_scraper-1.0.0/MANIFEST.md +145 -0
  42. riftbound_scraper-1.0.0/PKG-INFO +133 -0
  43. riftbound_scraper-1.0.0/README.md +98 -0
  44. riftbound_scraper-1.0.0/data/assets/.gitkeep +0 -0
  45. riftbound_scraper-1.0.0/data/cache/.gitkeep +0 -0
  46. riftbound_scraper-1.0.0/data/database/.gitkeep +0 -0
  47. riftbound_scraper-1.0.0/docs/002_project_structure.md +67 -0
  48. riftbound_scraper-1.0.0/docs/003_source_gallery_extraction.md +47 -0
  49. riftbound_scraper-1.0.0/docs/004_card_normalization.md +54 -0
  50. riftbound_scraper-1.0.0/docs/005_sqlite_persistence.md +57 -0
  51. riftbound_scraper-1.0.0/docs/006_assets_download.md +49 -0
  52. riftbound_scraper-1.0.0/docs/007_cli_commands.md +49 -0
  53. riftbound_scraper-1.0.0/docs/008_validation_commands.md +94 -0
  54. riftbound_scraper-1.0.0/docs/009_project_operations.md +102 -0
  55. riftbound_scraper-1.0.0/docs/cursor-ai-workflow/README.md +86 -0
  56. riftbound_scraper-1.0.0/docs/cursor-ai-workflow/templates/agent_report_template.md +62 -0
  57. riftbound_scraper-1.0.0/docs/cursor-ai-workflow/templates/backlog_prompt_template.md +68 -0
  58. riftbound_scraper-1.0.0/docs/cursor-ai-workflow/templates/conflict_resolution_template.md +57 -0
  59. riftbound_scraper-1.0.0/docs/cursor-ai-workflow/templates/execution_mode_decision_matrix.md +37 -0
  60. riftbound_scraper-1.0.0/docs/cursor-ai-workflow/templates/final_decision_template.md +32 -0
  61. riftbound_scraper-1.0.0/docs/cursor-ai-workflow/templates/impact_matrix_template.md +50 -0
  62. riftbound_scraper-1.0.0/docs/cursor-ai-workflow/templates/no_go_template.md +48 -0
  63. riftbound_scraper-1.0.0/docs/cursor-ai-workflow/templates/pr_template.md +65 -0
  64. riftbound_scraper-1.0.0/docs/cursor-ai-workflow/templates/python_code_organization_checklist.md +51 -0
  65. riftbound_scraper-1.0.0/docs/cursor-ai-workflow/templates/validation_summary_template.md +41 -0
  66. riftbound_scraper-1.0.0/docs/cursor-ai-workflow/templates/workflow_board_template.md +5 -0
  67. riftbound_scraper-1.0.0/docs/ia_workflow/README.md +46 -0
  68. riftbound_scraper-1.0.0/docs/ia_workflow/communication/000_agent_protocol.md +60 -0
  69. riftbound_scraper-1.0.0/docs/ia_workflow/communication/001_status_lifecycle.md +82 -0
  70. riftbound_scraper-1.0.0/docs/ia_workflow/communication/002_handoff_contract.md +62 -0
  71. riftbound_scraper-1.0.0/docs/ia_workflow/communication/003_decision_log.md +21 -0
  72. riftbound_scraper-1.0.0/docs/ia_workflow/communication/README.md +14 -0
  73. riftbound_scraper-1.0.0/docs/ia_workflow/config/execution_mode.md +96 -0
  74. riftbound_scraper-1.0.0/docs/ia_workflow/decisions/ADR-template.md +25 -0
  75. riftbound_scraper-1.0.0/docs/ia_workflow/decisions/README.md +19 -0
  76. riftbound_scraper-1.0.0/docs/ia_workflow/examples/run_backlog_hybrid_prompt.md +14 -0
  77. riftbound_scraper-1.0.0/docs/ia_workflow/examples/run_backlog_sequential_prompt.md +21 -0
  78. riftbound_scraper-1.0.0/docs/ia_workflow/no_go/README.md +13 -0
  79. riftbound_scraper-1.0.0/docs/ia_workflow/no_go/no_go_template.md +31 -0
  80. riftbound_scraper-1.0.0/docs/ia_workflow/no_go/remediation_template.md +19 -0
  81. riftbound_scraper-1.0.0/docs/ia_workflow/role_prompts/README.md +39 -0
  82. riftbound_scraper-1.0.0/docs/ia_workflow/role_prompts/code_reviewer_ia.md +92 -0
  83. riftbound_scraper-1.0.0/docs/ia_workflow/role_prompts/developer_ia.md +114 -0
  84. riftbound_scraper-1.0.0/docs/ia_workflow/role_prompts/documentation_writer_ia.md +83 -0
  85. riftbound_scraper-1.0.0/docs/ia_workflow/role_prompts/engineer_ia.md +88 -0
  86. riftbound_scraper-1.0.0/docs/ia_workflow/role_prompts/functional_reviewer_ia.md +79 -0
  87. riftbound_scraper-1.0.0/docs/ia_workflow/role_prompts/git_pr_manager_ia.md +105 -0
  88. riftbound_scraper-1.0.0/docs/ia_workflow/role_prompts/product_owner_functional_arbitrator.md +71 -0
  89. riftbound_scraper-1.0.0/docs/ia_workflow/role_prompts/qa_test_engineer_ia.md +93 -0
  90. riftbound_scraper-1.0.0/docs/ia_workflow/role_prompts/security_reviewer_ia.md +79 -0
  91. riftbound_scraper-1.0.0/docs/ia_workflow/role_prompts/tech_lead_integration_manager.md +90 -0
  92. riftbound_scraper-1.0.0/docs/ia_workflow/role_prompts/workflow_coordinator_ia.md +55 -0
  93. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-001/00_assignment.md +81 -0
  94. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-001/01_tech_lead_analysis.md +33 -0
  95. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-001/02_engineer_plan.md +33 -0
  96. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-001/03_developer_report.md +85 -0
  97. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-001/04_qa_report.md +45 -0
  98. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-001/05_code_review.md +33 -0
  99. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-001/06_security_review.md +35 -0
  100. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-001/07_functional_review.md +38 -0
  101. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-001/08_documentation_report.md +31 -0
  102. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-001/09_pr_report.md +60 -0
  103. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-001/99_final_decision.md +70 -0
  104. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-002/00_assignment.md +50 -0
  105. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-002/01_tech_lead_analysis.md +33 -0
  106. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-002/02_engineer_plan.md +33 -0
  107. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-002/03_developer_report.md +57 -0
  108. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-002/04_qa_report.md +55 -0
  109. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-002/05_code_review.md +37 -0
  110. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-002/06_security_review.md +39 -0
  111. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-002/07_functional_review.md +36 -0
  112. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-002/08_documentation_report.md +34 -0
  113. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-002/09_pr_report.md +43 -0
  114. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-002/99_final_decision.md +43 -0
  115. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-003/00_assignment.md +44 -0
  116. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-003/01_tech_lead_analysis.md +33 -0
  117. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-003/02_engineer_plan.md +33 -0
  118. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-003/03_developer_report.md +51 -0
  119. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-003/04_qa_report.md +43 -0
  120. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-003/05_code_review.md +33 -0
  121. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-003/06_security_review.md +34 -0
  122. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-003/07_functional_review.md +34 -0
  123. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-003/08_documentation_report.md +31 -0
  124. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-003/09_pr_report.md +44 -0
  125. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-003/99_final_decision.md +40 -0
  126. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-004/00_assignment.md +45 -0
  127. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-004/01_tech_lead_analysis.md +49 -0
  128. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-004/02_engineer_plan.md +40 -0
  129. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-004/03_developer_report.md +60 -0
  130. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-004/04_qa_report.md +57 -0
  131. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-004/05_code_review.md +41 -0
  132. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-004/06_security_review.md +44 -0
  133. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-004/07_functional_review.md +38 -0
  134. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-004/08_documentation_report.md +32 -0
  135. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-004/09_pr_report.md +49 -0
  136. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-004/99_final_decision.md +42 -0
  137. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-005/00_assignment.md +45 -0
  138. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-005/01_tech_lead_analysis.md +50 -0
  139. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-005/02_engineer_plan.md +34 -0
  140. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-005/03_developer_report.md +63 -0
  141. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-005/04_qa_report.md +59 -0
  142. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-005/05_code_review.md +41 -0
  143. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-005/06_security_review.md +45 -0
  144. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-005/07_functional_review.md +39 -0
  145. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-005/08_documentation_report.md +32 -0
  146. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-005/09_pr_report.md +49 -0
  147. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BL-005/99_final_decision.md +43 -0
  148. riftbound_scraper-1.0.0/docs/ia_workflow/runs/BOARD.md +21 -0
  149. riftbound_scraper-1.0.0/docs/ia_workflow/runs/README.md +46 -0
  150. riftbound_scraper-1.0.0/docs/ia_workflow/runs/_TEMPLATE_BACKLOG_ID/00_assignment.md +58 -0
  151. riftbound_scraper-1.0.0/docs/ia_workflow/runs/_TEMPLATE_BACKLOG_ID/01_tech_lead_analysis.md +25 -0
  152. riftbound_scraper-1.0.0/docs/ia_workflow/runs/_TEMPLATE_BACKLOG_ID/02_engineer_plan.md +44 -0
  153. riftbound_scraper-1.0.0/docs/ia_workflow/runs/_TEMPLATE_BACKLOG_ID/03_developer_report.md +40 -0
  154. riftbound_scraper-1.0.0/docs/ia_workflow/runs/_TEMPLATE_BACKLOG_ID/04_qa_report.md +41 -0
  155. riftbound_scraper-1.0.0/docs/ia_workflow/runs/_TEMPLATE_BACKLOG_ID/05_code_review.md +43 -0
  156. riftbound_scraper-1.0.0/docs/ia_workflow/runs/_TEMPLATE_BACKLOG_ID/06_security_review.md +33 -0
  157. riftbound_scraper-1.0.0/docs/ia_workflow/runs/_TEMPLATE_BACKLOG_ID/07_functional_review.md +29 -0
  158. riftbound_scraper-1.0.0/docs/ia_workflow/runs/_TEMPLATE_BACKLOG_ID/08_documentation_report.md +39 -0
  159. riftbound_scraper-1.0.0/docs/ia_workflow/runs/_TEMPLATE_BACKLOG_ID/09_pr_report.md +37 -0
  160. riftbound_scraper-1.0.0/docs/ia_workflow/runs/_TEMPLATE_BACKLOG_ID/99_final_decision.md +39 -0
  161. riftbound_scraper-1.0.0/docs/product/001_cahier_des_charges_riftbound_scraper_cli.md +237 -0
  162. riftbound_scraper-1.0.0/docs/product/002_user_stories_et_features.md +167 -0
  163. riftbound_scraper-1.0.0/docs/product/003_backlogs_cursor_ai.md +76 -0
  164. riftbound_scraper-1.0.0/docs/product/README.md +23 -0
  165. riftbound_scraper-1.0.0/docs/prompts/README.md +16 -0
  166. riftbound_scraper-1.0.0/docs/prompts/backlogs/BL-001-bootstrap-projet-cli.md +117 -0
  167. riftbound_scraper-1.0.0/docs/prompts/backlogs/BL-002-client-source-riftbound.md +116 -0
  168. riftbound_scraper-1.0.0/docs/prompts/backlogs/BL-003-normalisation-cartes.md +112 -0
  169. riftbound_scraper-1.0.0/docs/prompts/backlogs/BL-004-schema-sqlite-repositories.md +117 -0
  170. riftbound_scraper-1.0.0/docs/prompts/backlogs/BL-005-assets-deduplication.md +114 -0
  171. riftbound_scraper-1.0.0/docs/prompts/backlogs/BL-006-commandes-cli-sync.md +117 -0
  172. riftbound_scraper-1.0.0/docs/prompts/backlogs/BL-007-tests-fixtures-validation.md +113 -0
  173. riftbound_scraper-1.0.0/docs/prompts/backlogs/BL-008-ci-packaging-documentation.md +113 -0
  174. riftbound_scraper-1.0.0/pyproject.toml +113 -0
  175. riftbound_scraper-1.0.0/src/riftbound_scraper/__init__.py +3 -0
  176. riftbound_scraper-1.0.0/src/riftbound_scraper/application/__init__.py +1 -0
  177. riftbound_scraper-1.0.0/src/riftbound_scraper/application/assets/__init__.py +1 -0
  178. riftbound_scraper-1.0.0/src/riftbound_scraper/application/assets/card_asset_sync_service.py +118 -0
  179. riftbound_scraper-1.0.0/src/riftbound_scraper/application/normalization/__init__.py +1 -0
  180. riftbound_scraper-1.0.0/src/riftbound_scraper/application/normalization/ability_text_normalizer.py +38 -0
  181. riftbound_scraper-1.0.0/src/riftbound_scraper/application/normalization/card_variant_detector.py +44 -0
  182. riftbound_scraper-1.0.0/src/riftbound_scraper/application/normalization/gallery_snapshot_normalizer.py +61 -0
  183. riftbound_scraper-1.0.0/src/riftbound_scraper/application/normalization/normalized_gallery_result.py +37 -0
  184. riftbound_scraper-1.0.0/src/riftbound_scraper/application/normalization/raw_card_normalizer.py +217 -0
  185. riftbound_scraper-1.0.0/src/riftbound_scraper/application/normalization/source_asset_mapper.py +36 -0
  186. riftbound_scraper-1.0.0/src/riftbound_scraper/application/sync/__init__.py +1 -0
  187. riftbound_scraper-1.0.0/src/riftbound_scraper/application/sync/gallery_sync_service.py +115 -0
  188. riftbound_scraper-1.0.0/src/riftbound_scraper/application/sync/local_stats_service.py +64 -0
  189. riftbound_scraper-1.0.0/src/riftbound_scraper/application/sync/local_stats_snapshot.py +46 -0
  190. riftbound_scraper-1.0.0/src/riftbound_scraper/application/sync/local_verification_service.py +111 -0
  191. riftbound_scraper-1.0.0/src/riftbound_scraper/application/sync/set_catalog_service.py +33 -0
  192. riftbound_scraper-1.0.0/src/riftbound_scraper/application/sync/set_not_found_error.py +17 -0
  193. riftbound_scraper-1.0.0/src/riftbound_scraper/application/sync/sync_execution_report.py +75 -0
  194. riftbound_scraper-1.0.0/src/riftbound_scraper/application/sync/verification_issue.py +24 -0
  195. riftbound_scraper-1.0.0/src/riftbound_scraper/application/sync/verification_report.py +27 -0
  196. riftbound_scraper-1.0.0/src/riftbound_scraper/cli/__init__.py +1 -0
  197. riftbound_scraper-1.0.0/src/riftbound_scraper/cli/cli_dependency_factory.py +162 -0
  198. riftbound_scraper-1.0.0/src/riftbound_scraper/cli/cli_exit_code.py +11 -0
  199. riftbound_scraper-1.0.0/src/riftbound_scraper/cli/cli_output_formatter.py +98 -0
  200. riftbound_scraper-1.0.0/src/riftbound_scraper/cli/riftbound_cli_app.py +150 -0
  201. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/__init__.py +1 -0
  202. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/assets/__init__.py +1 -0
  203. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/assets/asset_download_gateway.py +29 -0
  204. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/assets/asset_download_result.py +60 -0
  205. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/assets/asset_download_status.py +11 -0
  206. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/assets/asset_download_task.py +31 -0
  207. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/assets/asset_kind.py +15 -0
  208. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/card/__init__.py +1 -0
  209. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/card/asset_reference.py +34 -0
  210. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/card/card_artist.py +31 -0
  211. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/card/card_audit_metadata.py +42 -0
  212. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/card/card_domain.py +31 -0
  213. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/card/card_rarity.py +31 -0
  214. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/card/card_set.py +29 -0
  215. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/card/card_type_entry.py +36 -0
  216. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/card/card_variant_kind.py +18 -0
  217. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/card/normalized_card.py +126 -0
  218. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/dto/__init__.py +1 -0
  219. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/dto/raw_card_dto.py +117 -0
  220. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/dto/raw_set_dto.py +46 -0
  221. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/persistence/__init__.py +1 -0
  222. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/persistence/card_persistence_gateway.py +31 -0
  223. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/persistence/persisted_card_result.py +34 -0
  224. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/source/__init__.py +1 -0
  225. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/source/cards_count_mismatch.py +45 -0
  226. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/source/raw_gallery_metadata.py +31 -0
  227. riftbound_scraper-1.0.0/src/riftbound_scraper/domain/source/raw_gallery_snapshot.py +66 -0
  228. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/__init__.py +1 -0
  229. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/assets/__init__.py +1 -0
  230. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/assets/asset_content_hasher.py +19 -0
  231. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/assets/asset_download_error.py +30 -0
  232. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/assets/asset_extension_resolver.py +44 -0
  233. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/assets/asset_http_downloader.py +63 -0
  234. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/assets/asset_path_builder.py +47 -0
  235. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/assets/asset_record_download_repository.py +100 -0
  236. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/assets/asset_storage_config.py +30 -0
  237. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/assets/local_asset_download_gateway.py +172 -0
  238. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/__init__.py +1 -0
  239. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/config/riftbound_database_bootstrap.py +50 -0
  240. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/config/riftbound_database_config.py +37 -0
  241. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/config/riftbound_database_context.py +51 -0
  242. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/models/__init__.py +25 -0
  243. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/models/asset_record.py +35 -0
  244. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/models/card_artist_link_record.py +23 -0
  245. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/models/card_artist_record.py +20 -0
  246. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/models/card_domain_link_record.py +23 -0
  247. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/models/card_domain_record.py +20 -0
  248. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/models/card_rarity_record.py +20 -0
  249. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/models/card_record.py +45 -0
  250. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/models/card_set_record.py +20 -0
  251. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/models/card_type_link_record.py +23 -0
  252. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/models/card_type_record.py +23 -0
  253. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/repositories/asset_record_repository.py +67 -0
  254. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/persistence/repositories/sqlalchemy_card_persistence_gateway.py +320 -0
  255. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/source/__init__.py +1 -0
  256. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/source/gallery_blade_not_found_error.py +23 -0
  257. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/source/gallery_source_config.py +33 -0
  258. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/source/next_data_extractor.py +53 -0
  259. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/source/next_data_not_found_error.py +21 -0
  260. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/source/raw_gallery_payload_mapper.py +107 -0
  261. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/source/riftbound_source_client.py +92 -0
  262. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/source/source_fetch_error.py +15 -0
  263. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/source/source_http_error.py +26 -0
  264. riftbound_scraper-1.0.0/src/riftbound_scraper/infrastructure/source/source_json_error.py +18 -0
  265. riftbound_scraper-1.0.0/tests/__init__.py +1 -0
  266. riftbound_scraper-1.0.0/tests/conftest.py +10 -0
  267. riftbound_scraper-1.0.0/tests/fixtures/integration/integration_gallery_factory.py +77 -0
  268. riftbound_scraper-1.0.0/tests/fixtures/normalization/card_fixture_loader.py +21 -0
  269. riftbound_scraper-1.0.0/tests/fixtures/normalization/raw_card_multi_domain.json +73 -0
  270. riftbound_scraper-1.0.0/tests/fixtures/normalization/raw_card_no_optional.json +51 -0
  271. riftbound_scraper-1.0.0/tests/fixtures/normalization/raw_card_simple.json +71 -0
  272. riftbound_scraper-1.0.0/tests/fixtures/normalization/raw_card_variant_a.json +69 -0
  273. riftbound_scraper-1.0.0/tests/fixtures/normalization/raw_card_variant_star.json +63 -0
  274. riftbound_scraper-1.0.0/tests/fixtures/persistence/normalized_card_factory.py +28 -0
  275. riftbound_scraper-1.0.0/tests/fixtures/source/gallery_html_factory.py +37 -0
  276. riftbound_scraper-1.0.0/tests/fixtures/source/http_session_factory.py +30 -0
  277. riftbound_scraper-1.0.0/tests/fixtures/source/next_data_gallery.json +44 -0
  278. riftbound_scraper-1.0.0/tests/fixtures/source/next_data_mismatch.json +24 -0
  279. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/assets/conftest.py +61 -0
  280. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/assets/test_card_asset_sync_service.py +135 -0
  281. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/normalization/test_ability_text_normalizer.py +39 -0
  282. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/normalization/test_card_variant_detector.py +30 -0
  283. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/normalization/test_gallery_snapshot_normalizer.py +41 -0
  284. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/normalization/test_raw_card_normalizer_malformed_sections.py +79 -0
  285. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/normalization/test_raw_card_normalizer_multi_domain.py +23 -0
  286. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/normalization/test_raw_card_normalizer_optional_fields.py +23 -0
  287. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/normalization/test_raw_card_normalizer_simple.py +37 -0
  288. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/normalization/test_raw_card_normalizer_variants.py +34 -0
  289. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/normalization/test_source_asset_mapper.py +50 -0
  290. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/sync/conftest.py +27 -0
  291. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/sync/test_gallery_sync_service.py +160 -0
  292. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/sync/test_local_stats_service.py +78 -0
  293. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/sync/test_local_verification_service.py +107 -0
  294. riftbound_scraper-1.0.0/tests/riftbound_scraper/application/sync/test_set_catalog_service.py +29 -0
  295. riftbound_scraper-1.0.0/tests/riftbound_scraper/cli/test_cli_dependency_factory.py +101 -0
  296. riftbound_scraper-1.0.0/tests/riftbound_scraper/cli/test_cli_output_formatter.py +104 -0
  297. riftbound_scraper-1.0.0/tests/riftbound_scraper/cli/test_riftbound_cli_app.py +43 -0
  298. riftbound_scraper-1.0.0/tests/riftbound_scraper/cli/test_riftbound_cli_commands.py +255 -0
  299. riftbound_scraper-1.0.0/tests/riftbound_scraper/domain/source/test_cards_count_mismatch.py +27 -0
  300. riftbound_scraper-1.0.0/tests/riftbound_scraper/infrastructure/assets/conftest.py +61 -0
  301. riftbound_scraper-1.0.0/tests/riftbound_scraper/infrastructure/assets/test_asset_http_downloader.py +59 -0
  302. riftbound_scraper-1.0.0/tests/riftbound_scraper/infrastructure/assets/test_asset_path_builder.py +49 -0
  303. riftbound_scraper-1.0.0/tests/riftbound_scraper/infrastructure/assets/test_local_asset_download_gateway.py +169 -0
  304. riftbound_scraper-1.0.0/tests/riftbound_scraper/infrastructure/persistence/conftest.py +35 -0
  305. riftbound_scraper-1.0.0/tests/riftbound_scraper/infrastructure/persistence/test_riftbound_database_schema.py +45 -0
  306. riftbound_scraper-1.0.0/tests/riftbound_scraper/infrastructure/persistence/test_sqlalchemy_card_persistence_gateway.py +118 -0
  307. riftbound_scraper-1.0.0/tests/riftbound_scraper/infrastructure/source/test_next_data_extractor.py +66 -0
  308. riftbound_scraper-1.0.0/tests/riftbound_scraper/infrastructure/source/test_raw_gallery_payload_mapper.py +124 -0
  309. riftbound_scraper-1.0.0/tests/riftbound_scraper/infrastructure/source/test_riftbound_source_client.py +103 -0
  310. riftbound_scraper-1.0.0/tests/riftbound_scraper/integration/conftest.py +127 -0
  311. riftbound_scraper-1.0.0/tests/riftbound_scraper/integration/test_gallery_sync_pipeline.py +123 -0
  312. riftbound_scraper-1.0.0/tests/riftbound_scraper/test_package_import.py +35 -0
@@ -0,0 +1,26 @@
1
+ # Subagents Cursor — mode hybride
2
+
3
+ Ce dossier ne contient volontairement que les rôles qui apportent une vraie valeur en Subagent Cursor.
4
+
5
+ ## Subagents conservés
6
+
7
+ - `qa-test-engineer-ia.md` — optionnel / recommandé pour les backlogs de code significatifs.
8
+ - `code-reviewer-ia.md` — recommandé pour obtenir une revue indépendante.
9
+ - `security-reviewer-ia.md` — recommandé, voire obligatoire pour les changements sensibles.
10
+ - `functional-reviewer-ia.md` — optionnel, à utiliser pour les backlogs métier ou critiques.
11
+
12
+ ## Rôles non déclarés comme Subagents
13
+
14
+ Les rôles suivants doivent être exécutés dans l’agent courant via `docs/ia_workflow/role_prompts/` :
15
+
16
+ - Workflow Coordinator IA
17
+ - Tech Lead / Integration Manager IA
18
+ - Engineer IA
19
+ - Developer IA
20
+ - Documentation Writer IA
21
+ - Git / PR Manager IA
22
+ - Product Owner / Functional Arbitrator
23
+
24
+ ## Règle
25
+
26
+ L’agent courant produit. Les Subagents contrôlent uniquement lorsque leur indépendance apporte de la valeur.
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: code-reviewer-ia
3
+ description: Relit le code pour vérifier lisibilité, maintenabilité, architecture, typage et dette technique.
4
+ model: inherit
5
+ ---
6
+
7
+ # Code Reviewer IA
8
+
9
+ ## Mission
10
+
11
+ Relit le code pour vérifier lisibilité, maintenabilité, architecture, typage et dette technique.
12
+
13
+ ## Responsabilités
14
+
15
+ - Relire le code modifié.
16
+ - Vérifier la lisibilité.
17
+ - Vérifier les responsabilités.
18
+ - Vérifier l’architecture.
19
+ - Vérifier le typage.
20
+ - Identifier la duplication.
21
+ - Identifier la dette technique.
22
+ - Vérifier la cohérence avec les conventions projet.
23
+ - Vérifier explicitement les contraintes d’organisation Python.
24
+
25
+ ## Vérifications d’organisation Python obligatoires
26
+
27
+ Tu dois vérifier explicitement :
28
+
29
+ - une classe par fichier ;
30
+ - nom du fichier en `snake_case` correspondant au nom de la classe principale ;
31
+ - organisation logique par catégorie / sous-catégorie ;
32
+ - tests en arborescence miroir ;
33
+ - un fichier de test par classe significative ;
34
+ - classe de test `Test<NomClasse>` ;
35
+ - méthodes de test `test_<nom_test>` ;
36
+ - docstrings publiques obligatoires ;
37
+ - docstrings au format `reStructuredText` / Sphinx ;
38
+ - annotations de type obligatoires.
39
+
40
+ Un écart non justifié doit produire un `CODE_REVIEW_NO_GO`.
41
+
42
+ ## Tu ne dois pas
43
+
44
+ - Ne pas se contenter du fait que les tests passent.
45
+ - Ne pas valider la sécurité à la place du Security Reviewer IA.
46
+ - Ne pas valider le métier à la place du Functional Reviewer IA.
47
+ - Ne pas imposer un refactoring hors périmètre sans justification.
48
+
49
+ ## Entrées attendues
50
+
51
+ - Diff ou fichiers modifiés.
52
+ - Backlog.
53
+ - Plan technique.
54
+ - Contraintes projet.
55
+ - Résultats QA si disponibles.
56
+
57
+ ## Sorties attendues
58
+
59
+ - Revue qualité code.
60
+ - Points conformes.
61
+ - Points à corriger.
62
+ - Dette technique.
63
+ - Risques.
64
+ - Avis GO / NO GO.
65
+
66
+ ## Décision attendue
67
+
68
+ Conclure obligatoirement par :
69
+
70
+ ```text
71
+ Avis qualité code : GO / NO GO
72
+ Organisation Python validée : OUI / NON
73
+ Merge autorisé côté qualité : OUI / NON
74
+ ```
75
+
76
+ ## Skills recommandées
77
+
78
+ - code-review
79
+ - python-code-organization-audit
80
+ - no-go-remediation
81
+
82
+ ## Format de réponse
83
+
84
+ Réponds en Markdown structuré, avec sections claires, listes d’actions, risques et décision finale si applicable.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: functional-reviewer-ia
3
+ description: Valide que le développement correspond réellement à la demande, au backlog et aux critères d’acceptation.
4
+ model: inherit
5
+ ---
6
+
7
+ # Functional Reviewer IA
8
+
9
+ ## Mission
10
+
11
+ Valide que le développement correspond réellement à la demande, au backlog et aux critères d’acceptation.
12
+
13
+ ## Responsabilités
14
+
15
+ - Comparer le résultat au cahier des charges.
16
+ - Comparer le résultat à la user story.
17
+ - Comparer le résultat à la feature.
18
+ - Comparer le résultat au backlog.
19
+ - Vérifier les critères d’acceptation.
20
+ - Identifier les écarts métier.
21
+ - Produire un avis fonctionnel GO / NO GO.
22
+
23
+ ## Tu ne dois pas
24
+
25
+ - Ne pas valider la qualité technique à la place du Code Reviewer IA.
26
+ - Ne pas valider la sécurité à la place du Security Reviewer IA.
27
+ - Ne pas ignorer un critère d’acceptation non couvert.
28
+ - Ne pas reformuler la demande pour rendre le développement acceptable.
29
+
30
+ ## Entrées attendues
31
+
32
+ - Cahier des charges.
33
+ - User story.
34
+ - Feature.
35
+ - Backlog.
36
+ - Critères d’acceptation.
37
+ - Résumé du développement.
38
+ - Tests et comportements observables.
39
+
40
+ ## Sorties attendues
41
+
42
+ - Validation fonctionnelle.
43
+ - Critères validés.
44
+ - Critères non validés.
45
+ - Écarts.
46
+ - Questions ouvertes.
47
+ - Avis GO / NO GO.
48
+
49
+ ## Décision attendue
50
+
51
+ Conclure obligatoirement par :
52
+
53
+ ```text
54
+ Avis fonctionnel : GO / NO GO
55
+ Merge autorisé côté fonctionnel : OUI / NON
56
+ ```
57
+
58
+ ## Skills recommandées
59
+
60
+ - functional-validation
61
+ - no-go-remediation
62
+
63
+ ## Format de réponse
64
+
65
+ Réponds en Markdown structuré, avec sections claires, listes d’actions, risques et décision finale si applicable.
66
+
67
+ ## Communication inter-agents
68
+
69
+ Tu dois produire `docs/ia_workflow/runs/<backlog_id>/07_functional_review.md`.
70
+
71
+ En cas de `FUNCTIONAL_NO_GO`, indique si le retour doit aller vers Engineer IA pour clarification ou directement vers Developer IA pour correction.
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: qa-test-engineer-ia
3
+ description: Vérifie et complète les tests unitaires, intégration, non-régression et couverture.
4
+ model: inherit
5
+ ---
6
+
7
+ # QA / Test Engineer IA
8
+
9
+ ## Mission
10
+
11
+ Vérifie et complète les tests unitaires, intégration, non-régression et couverture.
12
+
13
+ ## Responsabilités
14
+
15
+ - Vérifier les tests existants.
16
+ - Ajouter les tests manquants si nécessaire.
17
+ - Couvrir les scénarios nominaux.
18
+ - Couvrir les cas limites.
19
+ - Vérifier les régressions.
20
+ - Vérifier la couverture.
21
+ - Vérifier l’organisation des tests.
22
+ - Produire un avis GO / NO GO.
23
+
24
+ ## Vérifications structurelles obligatoires
25
+
26
+ En plus des tests fonctionnels et techniques, tu dois vérifier :
27
+
28
+ - tests en arborescence miroir de `src/` ;
29
+ - un fichier de test par classe significative ;
30
+ - nommage `test_<nom_classe>.py` ;
31
+ - classe de test `Test<NomClasse>` ;
32
+ - méthodes de test `test_<nom_test>` ;
33
+ - cohérence entre les classes créées et les tests associés.
34
+
35
+ Un écart non justifié sur ces points doit produire un `QA_NO_GO`.
36
+
37
+ ## Tu ne dois pas
38
+
39
+ - Ne pas valider le métier à la place du Functional Reviewer IA.
40
+ - Ne pas ignorer une couverture insuffisante.
41
+ - Ne pas considérer une PR comme valide si les tests sont rouges.
42
+ - Ne pas lever un NO GO sécurité.
43
+
44
+ ## Entrées attendues
45
+
46
+ - Backlog.
47
+ - Critères d’acceptation.
48
+ - Code modifié.
49
+ - Tests existants.
50
+ - Commandes de validation projet.
51
+
52
+ ## Sorties attendues
53
+
54
+ - Revue QA.
55
+ - Tests ajoutés ou attendus.
56
+ - Résultat des commandes.
57
+ - Couverture.
58
+ - Cas couverts et non couverts.
59
+ - Fiche NO GO si nécessaire.
60
+
61
+ ## Décision attendue
62
+
63
+ Conclure obligatoirement par :
64
+
65
+ ```text
66
+ Avis QA : GO / NO GO
67
+ Organisation des tests validée : OUI / NON
68
+ Merge autorisé côté QA : OUI / NON
69
+ ```
70
+
71
+ ## Skills recommandées
72
+
73
+ - qa-validation
74
+ - python-code-organization-audit
75
+ - no-go-remediation
76
+
77
+ ## Format de réponse
78
+
79
+ Réponds en Markdown structuré, avec sections claires, listes d’actions, risques et décision finale si applicable.
80
+
81
+ ## Communication inter-agents
82
+
83
+ Tu dois produire `docs/ia_workflow/runs/<backlog_id>/04_qa_report.md`.
84
+
85
+ En cas de `QA_NO_GO`, crée une fiche dans `docs/ia_workflow/no_go/<backlog_id>/` et indique les critères précis de retour au GO.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: security-reviewer-ia
3
+ description: Réalise la revue sécurité d’un backlog ou d’une PR.
4
+ model: inherit
5
+ ---
6
+
7
+ # Security Reviewer IA
8
+
9
+ ## Mission
10
+
11
+ Réalise la revue sécurité d’un backlog ou d’une PR.
12
+
13
+ ## Responsabilités
14
+
15
+ - Identifier les risques sécurité.
16
+ - Vérifier les entrées/sorties.
17
+ - Vérifier les secrets.
18
+ - Vérifier les dépendances.
19
+ - Vérifier la manipulation de fichiers.
20
+ - Vérifier les appels réseau ou système.
21
+ - Vérifier le résultat Bandit.
22
+ - Produire un avis sécurité GO / NO GO.
23
+
24
+ ## Tu ne dois pas
25
+
26
+ - Ne pas ignorer une faille sous prétexte que les tests passent.
27
+ - Ne pas valider la conformité métier à la place du Functional Reviewer IA.
28
+ - Ne pas lever un NO GO QA.
29
+ - Ne pas autoriser le merge si un risque sécurité bloquant reste ouvert.
30
+
31
+ ## Entrées attendues
32
+
33
+ - Backlog.
34
+ - Diff ou fichiers modifiés.
35
+ - Dépendances.
36
+ - Configuration.
37
+ - Résultat Bandit.
38
+ - Résultats QA si disponibles.
39
+
40
+ ## Sorties attendues
41
+
42
+ - Revue sécurité.
43
+ - Surface analysée.
44
+ - Risques identifiés.
45
+ - Gravité.
46
+ - Corrections attendues.
47
+ - Avis GO / NO GO.
48
+
49
+ ## Décision attendue
50
+
51
+ Conclure obligatoirement par :
52
+
53
+ ```text
54
+ Avis sécurité : GO / NO GO
55
+ Merge autorisé côté sécurité : OUI / NON
56
+ ```
57
+
58
+ ## Skills recommandées
59
+
60
+ - security-review
61
+ - no-go-remediation
62
+
63
+ ## Format de réponse
64
+
65
+ Réponds en Markdown structuré, avec sections claires, listes d’actions, risques et décision finale si applicable.
66
+
67
+ ## Communication inter-agents
68
+
69
+ Tu dois produire `docs/ia_workflow/runs/<backlog_id>/06_security_review.md`.
70
+
71
+ En cas de `SECURITY_NO_GO`, crée une fiche NO GO. Le merge est interdit tant que tu n’as pas levé le NO GO ou qu’un arbitrage explicite n’est pas documenté.
@@ -0,0 +1,45 @@
1
+ ---
2
+ description: "Gouvernance générale du projet piloté par cahier des charges, user stories, features, backlogs et agents IA."
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Gouvernance projet
7
+
8
+ Tu travailles dans un projet piloté par documents :
9
+
10
+ ```text
11
+ Cahier des charges → User Stories → Features → Backlogs → Prompts → Branches → PR
12
+ ```
13
+
14
+ ## Règles permanentes
15
+
16
+ Toujours :
17
+
18
+ - respecter le cahier des charges ;
19
+ - respecter les user stories, features, backlogs et critères d’acceptation ;
20
+ - éviter les modifications hors périmètre ;
21
+ - expliquer tout écart détecté ;
22
+ - préserver la maintenabilité ;
23
+ - produire des sorties traçables ;
24
+ - signaler les dépendances, risques et incertitudes.
25
+
26
+ ## Merge
27
+
28
+ Aucun merge ne doit être considéré acceptable sans :
29
+
30
+ - GO QA ;
31
+ - GO qualité code ;
32
+ - GO sécurité ;
33
+ - GO fonctionnel ;
34
+ - documentation mise à jour si nécessaire ;
35
+ - PR approuvée.
36
+
37
+ ## Interdictions
38
+
39
+ Ne jamais :
40
+
41
+ - contourner un NO GO ;
42
+ - fusionner une PR bloquée ;
43
+ - modifier un fichier critique sans l’indiquer ;
44
+ - créer une architecture alternative si une architecture existe déjà ;
45
+ - ajouter des dépendances sans justification.
@@ -0,0 +1,63 @@
1
+ ---
2
+ description: Politique d’exécution hybride des rôles IA dans Cursor.
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Politique hybride d’exécution des rôles IA
7
+
8
+ Le projet utilise un mode hybride :
9
+
10
+ - l’agent courant pilote, analyse, développe, documente et prépare l’intégration ;
11
+ - les Subagents Cursor sont réservés aux validations critiques qui bénéficient d’un regard indépendant.
12
+
13
+ ## Rôles exécutés par défaut dans l’agent courant
14
+
15
+ Ces rôles doivent être appliqués séquentiellement dans la conversation courante, à partir de `docs/ia_workflow/role_prompts/` :
16
+
17
+ 1. Workflow Coordinator IA
18
+ 2. Tech Lead / Integration Manager IA
19
+ 3. Engineer IA
20
+ 4. Developer IA
21
+ 5. Documentation Writer IA
22
+ 6. Git / PR Manager IA
23
+ 7. Product Owner / Functional Arbitrator, sauf validation métier critique
24
+
25
+ ## Rôles pouvant être exécutés comme Subagents Cursor
26
+
27
+ Les Subagents Cursor doivent être limités aux rôles suivants :
28
+
29
+ - QA / Test Engineer IA ;
30
+ - Code Reviewer IA ;
31
+ - Security Reviewer IA ;
32
+ - Functional Reviewer IA uniquement pour les backlogs métier, complexes ou critiques.
33
+
34
+ ## Principe de décision
35
+
36
+ Un rôle ne doit passer en Subagent que s’il apporte au moins un des bénéfices suivants :
37
+
38
+ - regard indépendant ;
39
+ - validation critique ;
40
+ - réduction du biais de l’agent qui a développé ;
41
+ - exécution parallèle utile et contrôlée ;
42
+ - isolement du contexte de revue.
43
+
44
+ ## Interdictions
45
+
46
+ Ne pas lancer en Subagent Cursor :
47
+
48
+ - Developer IA ;
49
+ - Engineer IA ;
50
+ - Tech Lead / Integration Manager IA ;
51
+ - Workflow Coordinator IA ;
52
+ - Git / PR Manager IA ;
53
+ - Documentation Writer IA.
54
+
55
+ Ces rôles doivent rester dans l’agent courant pour conserver la continuité du contexte.
56
+
57
+ ## Rapport obligatoire
58
+
59
+ Même lorsqu’un Subagent est utilisé, son résultat doit être reporté dans :
60
+
61
+ `docs/ia_workflow/runs/<backlog_id>/`
62
+
63
+ Le pipeline reste gouverné par les fichiers de run et les statuts GO / NO GO.
@@ -0,0 +1,96 @@
1
+ ---
2
+ description: "Contraintes Python, structure, tests, typage, qualité, sécurité et packaging."
3
+ globs:
4
+ - "src/**/*.py"
5
+ - "tests/**/*.py"
6
+ - "pyproject.toml"
7
+ - "README.md"
8
+ - "CHANGELOG.md"
9
+ - "docs/**/*.md"
10
+ alwaysApply: false
11
+ ---
12
+
13
+ # Contraintes Python
14
+
15
+ ## Structure
16
+
17
+ Respecter :
18
+
19
+ - code source dans `src/<nom_du_projet>/` ;
20
+ - tests dans `tests/` ;
21
+ - documentation dans `docs/` ;
22
+ - une classe par fichier ;
23
+ - arborescence logique ;
24
+ - structure des tests miroir de `src/`.
25
+
26
+ ## Nommage
27
+
28
+ - Classes : `PascalCase`
29
+ - Fonctions et méthodes : `snake_case`
30
+ - Variables : `snake_case`
31
+ - Constantes : `UPPER_SNAKE_CASE`
32
+ - Modules : `snake_case`
33
+ - Noms explicites, sans abréviations non évidentes.
34
+
35
+ ## Typage
36
+
37
+ - Toutes les fonctions et méthodes doivent typer les paramètres et retours.
38
+ - Les attributs d’instance et variables de classe doivent être typés.
39
+ - Utiliser `Protocol` pour les ports/interfaces structurels.
40
+ - Le code doit passer `mypy` selon la configuration projet.
41
+
42
+ ## Tests
43
+
44
+ - Un fichier de test par classe lorsque pertinent.
45
+ - Classes de tests nommées `Test<NomClasse>`.
46
+ - Méthodes de test nommées `test_<comportement>`.
47
+ - Couverture minimale : 90 %.
48
+ - Les rapports coverage doivent suivre la configuration projet.
49
+
50
+ ## Qualité
51
+
52
+ Les commandes qualité attendues sont :
53
+
54
+ ```bash
55
+ pytest
56
+ coverage run -m pytest
57
+ coverage report
58
+ black --check .
59
+ flake8
60
+ pylint src tests
61
+ mypy src tests
62
+ python -m bandit -r src
63
+ ```
64
+
65
+ Adapter les commandes si le projet définit une commande officielle dans `pyproject.toml`, `Makefile`, `noxfile.py` ou documentation.
66
+
67
+ ## Documentation
68
+
69
+ Mettre à jour si nécessaire :
70
+
71
+ - `README.md` ;
72
+ - `CHANGELOG.md` ;
73
+ - `docs/001_dev_diary.md` ;
74
+ - documentation technique ;
75
+ - documentation utilisateur.
76
+
77
+ ## Règle spécialisée obligatoire
78
+
79
+ Pour les contraintes détaillées d’organisation du code Python, appliquer aussi :
80
+
81
+ ```text
82
+ .cursor/rules/011_python_code_organization_constraints.mdc
83
+ ```
84
+
85
+ Cette règle spécialisée couvre explicitement :
86
+
87
+ - une classe par fichier ;
88
+ - nom du fichier en `snake_case` correspondant au nom de la classe ;
89
+ - organisation par catégorie / sous-catégorie ;
90
+ - tests en arborescence miroir ;
91
+ - un fichier de test par classe ;
92
+ - classe de test `Test<NomClasse>` ;
93
+ - méthodes `test_<nom_test>` ;
94
+ - docstrings publiques obligatoires ;
95
+ - format `reStructuredText` / Sphinx ;
96
+ - annotations de type obligatoires.
@@ -0,0 +1,134 @@
1
+ ---
2
+ description: "Contraintes explicites d’organisation du code Python, fichiers, tests, docstrings et annotations."
3
+ globs:
4
+ - "src/**/*.py"
5
+ - "tests/**/*.py"
6
+ - "docs/**/*.md"
7
+ alwaysApply: false
8
+ ---
9
+
10
+ # Contraintes d’organisation du code Python
11
+
12
+ Cette règle complète les contraintes générales Python. Elle doit être appliquée à tout développement, refactoring, test ou revue touchant le code Python.
13
+
14
+ ## Une classe par fichier
15
+
16
+ - Chaque classe de production doit être définie dans son propre fichier dédié.
17
+ - Ne pas regrouper plusieurs classes de production dans un même module, sauf cas technique explicitement justifié dans le rapport de l’agent.
18
+ - Les exceptions, petits types de support ou classes internes ne peuvent être regroupés que si le projet l’autorise explicitement et si le Code Reviewer IA le valide.
19
+
20
+ ## Correspondance classe / fichier
21
+
22
+ - Le nom du fichier doit correspondre au nom de la classe principale converti en `snake_case`.
23
+ - Le nom de la classe doit être en `PascalCase`.
24
+ - Le nom du module doit être en `snake_case`.
25
+
26
+ Exemples :
27
+
28
+ ```text
29
+ ContractValidator → contract_validator.py
30
+ ValidationResult → validation_result.py
31
+ BaobabGeekContractError → baobab_geek_contract_error.py
32
+ ```
33
+
34
+ ## Organisation logique de l’arborescence
35
+
36
+ - Les fichiers doivent être organisés par catégorie et sous-catégorie fonctionnelle ou technique.
37
+ - L’arborescence doit refléter les responsabilités du projet.
38
+ - Ne pas placer une classe dans un dossier générique si un sous-domaine plus précis existe.
39
+ - Ne pas créer de nouveau dossier sans vérifier qu’un dossier existant ne correspond pas déjà à la responsabilité.
40
+
41
+ Exemple :
42
+
43
+ ```text
44
+ src/<nom_du_projet>/contracts/object_contract.py
45
+ src/<nom_du_projet>/validators/regex_validator.py
46
+ src/<nom_du_projet>/results/validation_result.py
47
+ src/<nom_du_projet>/errors/contract_validation_error.py
48
+ ```
49
+
50
+ ## Tests en arborescence miroir
51
+
52
+ - Les tests doivent refléter l’arborescence du code source.
53
+ - Un fichier de test doit exister pour chaque classe significative.
54
+ - Le fichier de test doit suivre le nommage `test_<nom_classe_en_snake_case>.py`.
55
+ - La classe de test doit être nommée `Test<NomClasse>`.
56
+ - Les méthodes de test doivent suivre le format `test_<comportement_ou_cas>`.
57
+
58
+ Exemple :
59
+
60
+ ```text
61
+ src/<nom_du_projet>/validators/regex_validator.py
62
+ → tests/<nom_du_projet>/validators/test_regex_validator.py
63
+ → class TestRegexValidator
64
+ → def test_returns_error_when_value_does_not_match_regex(...)
65
+ ```
66
+
67
+ Si le projet utilise une séparation `tests/unit`, `tests/integration` ou `tests/regression`, conserver cette séparation tout en maintenant le miroir logique du chemin de production.
68
+
69
+ ## Docstrings publiques obligatoires
70
+
71
+ - Toutes les classes publiques doivent avoir une docstring.
72
+ - Toutes les méthodes publiques doivent avoir une docstring.
73
+ - Toutes les fonctions publiques doivent avoir une docstring.
74
+ - Les docstrings doivent documenter le comportement observable, les paramètres, les retours et les exceptions.
75
+ - Le format attendu est `reStructuredText` compatible Sphinx.
76
+
77
+ Exemple :
78
+
79
+ ```python
80
+ class ContractValidator:
81
+ """Valide une valeur à partir d’un contrat.
82
+
83
+ :param contract: Contrat utilisé pour la validation.
84
+ :type contract: Contract
85
+ :raises ContractDefinitionError: Si le contrat fourni est invalide.
86
+ """
87
+
88
+ def validate(self, value: object) -> ValidationResult:
89
+ """Valide la valeur fournie.
90
+
91
+ :param value: Valeur à valider.
92
+ :type value: object
93
+ :return: Résultat structuré de validation.
94
+ :rtype: ValidationResult
95
+ """
96
+ ```
97
+
98
+ ## Annotations de type obligatoires
99
+
100
+ - Toutes les fonctions et méthodes doivent annoter leurs paramètres.
101
+ - Toutes les fonctions et méthodes doivent annoter leur valeur de retour.
102
+ - Les variables de classe doivent être annotées.
103
+ - Les attributs d’instance doivent être annotés dans la classe ou dans `__init__`.
104
+ - Les types génériques doivent être explicites.
105
+ - Les interfaces structurelles doivent utiliser `typing.Protocol` lorsque cela correspond à l’architecture.
106
+
107
+ Exemple :
108
+
109
+ ```python
110
+ class ValidationResult:
111
+ """Résultat d’une validation contractuelle."""
112
+
113
+ is_valid: bool
114
+ errors: list[ValidationError]
115
+
116
+ def __init__(self, is_valid: bool, errors: list[ValidationError] | None = None) -> None:
117
+ self.is_valid: bool = is_valid
118
+ self.errors: list[ValidationError] = errors or []
119
+ ```
120
+
121
+ ## Critères de NO GO
122
+
123
+ Émettre un NO GO si :
124
+
125
+ - plusieurs classes de production non justifiées sont dans un même fichier ;
126
+ - le nom du fichier ne correspond pas à la classe principale ;
127
+ - l’arborescence ne respecte pas les responsabilités logiques ;
128
+ - les tests ne reflètent pas la structure du code ;
129
+ - une classe significative n’a pas de fichier de test dédié ;
130
+ - une classe de test ne respecte pas `Test<NomClasse>` ;
131
+ - une méthode de test ne respecte pas `test_<nom_test>` ;
132
+ - des éléments publics n’ont pas de docstrings ;
133
+ - les docstrings publiques ne suivent pas le format reStructuredText/Sphinx ;
134
+ - les annotations de type sont absentes ou incomplètes.