diff --git a/.github/workflows/agentic_v2_builder.yml b/.github/workflows/agentic_v2_builder.yml index 62e09107..1e409c5e 100644 --- a/.github/workflows/agentic_v2_builder.yml +++ b/.github/workflows/agentic_v2_builder.yml @@ -2,7 +2,17 @@ name: Nubenetes V2 Agentic Builder on: workflow_dispatch: - # Automatically run after a successful curation run to sync V2 + inputs: + force_reevaluate: + description: 'Force AI re-evaluation (ignores cache for tags/years)' + type: boolean + default: false + # Automatic detection: Sync V2 whenever V1 archive is updated (manual or automated) + push: + branches: [ develop ] + paths: + - 'docs/**' + # Support automated sync after curation run workflow_run: workflows: ["Nubenetes Automated Agentic Curation"] types: @@ -37,6 +47,7 @@ jobs: GEMINI_API_KEY_1: ${{ secrets.GEMINI_API_KEY_1 }} GEMINI_API_KEY_2: ${{ secrets.GEMINI_API_KEY_2 }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FORCE_EVAL: ${{ github.event.inputs.force_reevaluate }} PYTHONPATH: . run: | python -u src/v2_optimizer.py diff --git a/GEMINI.md b/GEMINI.md index a7624e76..5d73008f 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -15,7 +15,7 @@ This file contains the accumulated instructions and long-term vision for the aut 9. **URL Expansion**: All shortened links (t.co, bit.ly, buff.ly, etc.) MUST be expanded to their original long version before being evaluated or injected. This ensures inventory homogeneity and improves global deduplication precision. 10. **Official Language (English Only)**: All injected content (titles, descriptions, headers), execution logs, and automated communications (PRs) MUST be exclusively in ENGLISH. Nubenetes is a global resource and linguistic consistency is critical. 11. **Workflow-Config Synchronization**: The GitHub Actions curation workflow form (`agentic_cron.yml`) MUST remain perfectly synchronized with the curation sources configuration file (`data/curation_sources.yaml`). Any addition, removal, or renaming of topics/categories in the configuration file requires a corresponding update to the workflow's input fields (checkboxes) to ensure users can toggle those sources manually. This maintains consistency between data-driven sources and the UI trigger. -12. **V2 Elite Maintenance**: The Nubenetes V2 (Agentic Elite) edition is a derived view of the V1 archive. It is managed via the `src/v2_optimizer.py` script and stored in the `v2-docs/` directory. AI agents MUST NOT modify `v2-docs/` directly via standard curation workflows; they must only use the `agentic_v2_builder.yml` workflow to perform the periodic "Elite Selection" process. Standard curation and cleaning workflows must always target the `docs/` directory as the primary source of truth. +12. **V2 Elite Maintenance**: The Nubenetes V2 (Agentic Elite) edition is a derived view of the V1 archive. It is managed via the `src/v2_optimizer.py` script and stored in the `v2-docs/` directory. The `agentic_v2_builder.yml` workflow synchronizes V2 automatically whenever V1 (`docs/`) is updated (manually or via bot). Standard curation and cleaning workflows must always target the `docs/` directory as the primary source of truth. 13. **Detailed Logging for V2**: When running the V2 Optimizer, agents MUST use unbuffered logging and detailed output messages. If the optimizer returns '0 links kept', the agent MUST investigate the logs to determine if it was due to AI selection or a parsing/API error. 14. **Persistent V2 Caching**: The V2 Optimizer MUST use a persistent cache file (`data/v2_cache.json`) to store AI evaluations (year, quality, category). This is mandatory to minimize API costs and ensure execution speed across 15k+ links. 15. **GitHub Metadata Enrichment**: For all `github.com` resources, the bot MUST attempt to fetch real-time metadata (stars, last commit) using the GitHub API. This data must be included in the V2 rendering to provide current context. @@ -122,3 +122,8 @@ The bot must rotate between profiles to avoid detection: - **Relative Asset Routing**: Updated all V2 image and configuration paths to point relatively to `../docs/` to avoid asset duplication. - **Rendering & Path Resolution**: Implemented `