[PR #364] [MERGED] Add competitor-aware originality checks, fix agent initialization, add release-readiness tests and docs #669

Closed
opened 2026-03-13 21:02:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AJaySi/ALwrity/pull/364
Author: @AJaySi
Created: 3/2/2026
Status: Merged
Merged: 3/3/2026
Merged by: @AJaySi

Base: mainHead: codex/review-sif-folder-implementation-status


📝 Commits (1)

  • 60e6cbd Harden SIF release readiness gaps and add regression checks

📊 Changes

5 files changed (+219 additions, -22 deletions)

View changed files

📝 backend/services/intelligence/agents/agent_orchestrator.py (+0 -6)
📝 backend/services/intelligence/agents/specialized_agents.py (+50 -8)
📝 backend/services/intelligence/sif_agents.py (+50 -8)
backend/sif_release_readiness_checks.py (+89 -0)
📝 docs/SIF/TODAYS_TASKS_WORKFLOW_IMPLEMENTATION_PLAN.md (+30 -0)

📄 Description

Motivation

  • Replace a placeholder originality stub with a real competitor-aware verification to surface evidence-backed originality scores and warnings.
  • Ensure intelligence services are initialized for agents that require TxtaiIntelligenceService and remove duplicated StrategyArchitectAgent initialization.
  • Add automated checks and documentation to enforce SIF Today's Tasks workflow release gates.

Description

  • Implemented verify_originality in ContentGuardianAgent (both sif_agents.py and specialized_agents.py) to query either a provided competitor index or the intelligence index, parse result metadata, and compute originality_score, confidence, warning, top_competitor_match, and related metadata.
  • Updated agent_orchestrator.py to remove a duplicate StrategyArchitectAgent init and to initialize TxtaiIntelligenceService for TrendSurferAgent and ContentGuardianAgent where needed.
  • Added backend/sif_release_readiness_checks.py which contains unit tests that validate single StrategyArchitectAgent initialization, semantic health aggregation contract, originality score computation paths for both guardian agents, and pillar coverage backfill behavior.
  • Updated docs at docs/SIF/TODAYS_TASKS_WORKFLOW_IMPLEMENTATION_PLAN.md to include a "Production Release Gates (SIF Today Workflow)" checklist describing the required quality and observability gates.

Testing

  • Added sif_release_readiness_checks.py unit tests: test_single_strategy_architect_init_block, test_semantic_health_returns_canonical_metric, test_verify_originality_uses_real_scores_sif_guardian, test_verify_originality_uses_real_scores_specialized_guardian, and test_pillar_coverage_guardrail_backfills_missing.
  • Executed the new unittest suite and all tests succeeded.
  • Logging and error handling paths were exercised in the new verify_originality implementation to ensure safe fallbacks on exceptions.

Codex Task


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AJaySi/ALwrity/pull/364 **Author:** [@AJaySi](https://github.com/AJaySi) **Created:** 3/2/2026 **Status:** ✅ Merged **Merged:** 3/3/2026 **Merged by:** [@AJaySi](https://github.com/AJaySi) **Base:** `main` ← **Head:** `codex/review-sif-folder-implementation-status` --- ### 📝 Commits (1) - [`60e6cbd`](https://github.com/AJaySi/ALwrity/commit/60e6cbd34bdf7f0aabbac41ee8deacf7626a27bd) Harden SIF release readiness gaps and add regression checks ### 📊 Changes **5 files changed** (+219 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `backend/services/intelligence/agents/agent_orchestrator.py` (+0 -6) 📝 `backend/services/intelligence/agents/specialized_agents.py` (+50 -8) 📝 `backend/services/intelligence/sif_agents.py` (+50 -8) ➕ `backend/sif_release_readiness_checks.py` (+89 -0) 📝 `docs/SIF/TODAYS_TASKS_WORKFLOW_IMPLEMENTATION_PLAN.md` (+30 -0) </details> ### 📄 Description ### Motivation - Replace a placeholder originality stub with a real competitor-aware verification to surface evidence-backed originality scores and warnings. - Ensure intelligence services are initialized for agents that require `TxtaiIntelligenceService` and remove duplicated `StrategyArchitectAgent` initialization. - Add automated checks and documentation to enforce SIF Today's Tasks workflow release gates. ### Description - Implemented `verify_originality` in `ContentGuardianAgent` (both `sif_agents.py` and `specialized_agents.py`) to query either a provided competitor index or the intelligence index, parse result metadata, and compute `originality_score`, `confidence`, `warning`, `top_competitor_match`, and related metadata. - Updated `agent_orchestrator.py` to remove a duplicate `StrategyArchitectAgent` init and to initialize `TxtaiIntelligenceService` for `TrendSurferAgent` and `ContentGuardianAgent` where needed. - Added `backend/sif_release_readiness_checks.py` which contains unit tests that validate single `StrategyArchitectAgent` initialization, semantic health aggregation contract, originality score computation paths for both guardian agents, and pillar coverage backfill behavior. - Updated docs at `docs/SIF/TODAYS_TASKS_WORKFLOW_IMPLEMENTATION_PLAN.md` to include a "Production Release Gates (SIF Today Workflow)" checklist describing the required quality and observability gates. ### Testing - Added `sif_release_readiness_checks.py` unit tests: `test_single_strategy_architect_init_block`, `test_semantic_health_returns_canonical_metric`, `test_verify_originality_uses_real_scores_sif_guardian`, `test_verify_originality_uses_real_scores_specialized_guardian`, and `test_pillar_coverage_guardrail_backfills_missing`. - Executed the new unittest suite and all tests succeeded. - Logging and error handling paths were exercised in the new `verify_originality` implementation to ensure safe fallbacks on exceptions. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69a45ffc5200832895c2a1fb2df4c63e) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-13 21:02:55 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ALwrity#669
No description provided.