Skip to content

v1.13.10

Choose a tag to compare

@github-actions github-actions released this 13 Oct 04:14
9e4c0f9

Changes

Merges everything on dev into main: driver fixes, per-call API keys, and three new features (brand context for marketing work, assistants defined in files, and a tested feedback loop).

Drivers and extraction

  • Claude on the 5.x models. Fable 5.1, Mythos 5.1, Opus 5.5 and Sonnet 5.5 reject a forced tool_choice, so every JSON-mode call to them returned a 400. They now get structured output (output_config.format) instead. The driver no longer sends temperature to those families, and the effort option reaches output_config.effort.
  • ANTHROPIC_API_KEY now works as a fallback when CLAUDE_API_KEY is unset.
  • Per-call api_key. extract_with_model and extract_and_jsonify accept one, so an app can use each user's own key.
  • Null metrics no longer fail a generation. Debug logs formatted meta values with %d/%f, and a provider reporting null raised TypeError out of a rotating file handler.

New: prompture.marketing

  • BrandContext holds the customer, pains and objections, core messaging, offers, voice and banned words, verified proof and testimonials, contact details and brand colors.
    • It loads from YAML, JSON or a fill-in Markdown file (BrandContext.save_markdown_template() writes the blank one).
    • Pass it as brand= to Agent, AsyncAgent, Assistant and extract_with_model. It goes into the system prompt with rules against inventing numbers, testimonials or contact details.
  • ClaimsChecker flags URLs, emails and phone numbers the brand doesn't list, plus banned words. With a model, it also checks each factual claim against the proof points through FaithfulnessEvaluator.
  • Output models whose limits are validators, so extraction retries on the exact rule that broke: SocialPostSet, ShotList/VideoClip, EmailSequence, CoreMessaging, IdealCustomer, TopTens, LeadMagnetIdeas, OfferStack, ScorecardAnalysis.
    • Example limits: 5-word image hook, no text in image prompts, voiceover sized to the clip length, email send days in order.
  • marketing.generate() / agenerate() create any of those models for a task, with the brand applied. analyze_metric() does the scorecard arithmetic without a model.

New: Assistant.from_file()

Loads an assistant from YAML, JSON or Markdown (front matter plus body). A file can set instructions, knowledge documents (inlined, with PDF/DOCX through ingestion and a 200k-character cap), conversation starters, named tools, skills and a brand. with_instructions() swaps in a new version of the instructions.

New: FeedbackLoop (prompture.execution.improve)

  • FeedbackLog records user corrections. They are summarized into rules in a ## Feedback rules section, without touching the rest of the instructions.
  • Old and new instructions are scored with an LLMJudge whose rubric includes every rule.
  • The change is promoted through PromotionLedger only if it gains at least 0.01 on held-out prompts. rollback() restores the previous version.

Tests

  • 67 new tests cover the three features. All model calls are stubbed.
  • tests/test_reasoning.py: three driver stubs now accept the api_key keyword. Without this, the dev run on 97bcbb9 failed.
  • Locally: ruff check . and bandit -r prompture/ pass, and pytest gives 5,364 passed, 89 skipped.

Details