mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 08:55:58 +03:00
[PR #392] [MERGED] Add contextuality validation and low-context quality status to daily workflow plan generation #697
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#697
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AJaySi/ALwrity/pull/392
Author: @AJaySi
Created: 3/6/2026
Status: ✅ Merged
Merged: 3/8/2026
Merged by: @AJaySi
Base:
main← Head:codex/add-plan-validation-step-before-db-persistence📝 Commits (1)
7096f03Add contextuality validation and low-context workflow status📊 Changes
3 files changed (+201 additions, -6 deletions)
View changed files
📝
backend/api/today_workflow.py(+2 -0)📝
backend/services/today_workflow_service.py(+152 -5)📝
backend/sif_release_readiness_checks.py(+47 -1)📄 Description
Motivation
quality_statusand validation payload.Description
MIN_TASK_EVIDENCE_LINKSandPLAN_CONTEXT_THRESHOLDand implementedvalidate_plan_contextuality(plan, grounding)inbackend/services/today_workflow_service.pyto score per-task contextual anchors and compute a plan-level contextuality score._derive_onboarding_evidence_linksand_valid_evidence_linksand enhanced grounding to includealert_identries so tasks can reference concrete alert anchors.generate_agent_enhanced_plansignature to acceptgroundingandstrict_contextuality, added strict prompt constraints whenstrict_contextuality=True, and prevented agent-committee short-circuiting in strict mode so regeneration enforces evidence requirements.get_or_create_daily_workflow_planperform validation after generation, trigger one strict regeneration if below threshold, setplan_data["quality_status"]to either"contextual"or"low_context", attachcontextuality_validationtoplan_json, and persist.quality_statusandcontextuality_validationin the Today Workflow API response atbackend/api/today_workflow.pyso product analytics and UX can consume low-context signals.backend/sif_release_readiness_checks.pythat exercise evidence-link handling and threshold behavior.Testing
python -m py_compile backend/services/today_workflow_service.py backend/api/today_workflow.py backend/sif_release_readiness_checks.pywhich succeeded.python -m unittest sif_release_readiness_checks.SIFReleaseReadinessTests.test_validate_plan_contextuality_passes_with_evidence_links sif_release_readiness_checks.SIFReleaseReadinessTests.test_validate_plan_contextuality_flags_missing_evidence_links(frombackend/), and both tests passed.sif_release_readiness_checkssuite surfaced pre-existing unrelated test failures in the repository, but the newly added contextuality tests succeeded and the code changes compile.Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.