Skip to content

Split backends by agent and unify structured-output#2

Merged
palol merged 6 commits intomainfrom
unify-structured-output
Feb 20, 2026
Merged

Split backends by agent and unify structured-output#2
palol merged 6 commits intomainfrom
unify-structured-output

Conversation

@palol
Copy link
Owner

@palol palol commented Feb 20, 2026

Summary

  • Split by agent: OpenAI and Cursor live in integrations/ with registry-based selection via TOCIFY_BACKEND (no hard-coded model list).
  • Shared prompt/schema: _shared.py provides SCHEMA, build_triage_prompt(), and parse_structured_response() so all backends use one schema and one prompt builder; Cursor stays prompt-only + parse.
  • digest.py is orchestration only; backend is chosen via get_triage_backend().

Changes

  • integrations/_shared.py: SCHEMA, load_prompt_template, build_triage_prompt, parse_structured_response
  • integrations/openai_triage.py: OpenAI backend (from digest.py), uses shared prompt + parse
  • integrations/cursor_cli.py: uses build_triage_prompt and parse_structured_response
  • integrations/__init__.py: registry keyed by TOCIFY_BACKEND
  • digest.py: slimmed to config, RSS, prefilter, triage_in_batches, render; single call to get_triage_backend()

Made with Cursor

palol and others added 6 commits February 19, 2026 18:21
- Add integrations/_shared.py: SCHEMA, load_prompt_template, build_triage_prompt, parse_structured_response
- Add integrations/openai_triage.py (moved from digest.py), use shared prompt + parse helper
- Refactor integrations/cursor_cli.py to use build_triage_prompt and parse_structured_response
- Registry-based backend selection in integrations/__init__.py (TOCIFY_BACKEND)
- Slim digest.py to orchestration only; get_triage_backend() from integrations
- Single JSON Schema for OpenAI/Claude/Gemini; Cursor remains prompt-only + parse

Co-authored-by: Cursor <cursoragent@cursor.com>
- weekly-digest.yml: OpenAI only (uv sync, TOCIFY_BACKEND=openai, no Cursor CLI)
- weekly-digest-cursor.yml: Cursor only (install Cursor CLI, TOCIFY_BACKEND=cursor)

Co-authored-by: Cursor <cursoragent@cursor.com>
@palol palol merged commit f1b0d38 into main Feb 20, 2026
@palol palol deleted the unify-structured-output branch February 20, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant