Anthropic OAuth LLM, entitlements (feature 1), renewals, + 7 enhancements

- LLM: Anthropic Sonnet 5 (effort=low) via OAuth Bearer (Claude Code keychain
  token, expiry-aware); NVIDIA/LM Studio endpoints kept commented for switch-back.
- Entitlements: scripts/import_entitlements.py joins ACL export to accounts by
  normalized parent name (324/342 matched; ID column Excel-corrupted), maps
  products->capabilities via data/product_capability_map.json. Raw ACL csv and
  entitlements.json are gitignored (confidential); accounts.json carries derived
  currentProducts + ownedCapabilityIds. Owned capabilities tag briefs EXPANSION.
- Renewals: local renewal-proximity score boost (window 365d, max +0.10) +
  'renewals' report; briefs/digests show RENEWAL WINDOW context.
- Batch runs: loop --limit/--rep with persistent cursor (strategic + stale-first).
- Digests: per-rep HTML export; timestamped digest_<date>_<time>.md kept forever.
- Account narrative memory fed into relevance/synthesis; synthesis maintains it.
- Signal quality gate drops PR fluff pre-LLM; SEC EDGAR filings connector.
- Citation verification: talking points must cite [S#] signals or are dropped.
- Brief filenames use account-name slug; whitespace report + installed-base view.
- USAGE.md: full command/flag/env reference.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 19:12:36 -04:00
parent 9131e83c08
commit c2854ba163
23 changed files with 22050 additions and 144 deletions

View File

@@ -1,9 +1,17 @@
# Copy to .env and fill in. The loop runs WITHOUT a key using a mock reasoner.
# --- LLM provider ---
# LLM_PROVIDER: openai | gemini | anthropic (auto-detected from whichever key is
# set if blank; OpenAI-compatible preferred). Provider w/ a missing key => mock.
LLM_PROVIDER=openai
# LLM_PROVIDER: anthropic | openai | gemini (auto-detected if blank).
LLM_PROVIDER=anthropic
# Anthropic via OAuth (Claude subscription) — token from ANTHROPIC_OAUTH_TOKEN,
# else the Claude Code credential in the macOS keychain (auto-refreshed by
# Claude Code; run any `claude -p ...` command if it has expired).
LLM_MODEL=claude-sonnet-5
ANTHROPIC_EFFORT=low # low | medium | high | max
ANTHROPIC_USE_KEYCHAIN=1
# ANTHROPIC_OAUTH_TOKEN=
# ANTHROPIC_API_KEY=
# OpenAI-compatible endpoint — works with OpenAI, OpenRouter, Together, Groq,
# vLLM, Ollama, LM Studio, etc. Just point these three at any /chat/completions API:
@@ -20,8 +28,10 @@ LLM_RATELIMIT_MAX_RETRIES=24
# Other providers:
GEMINI_API_KEY=
GEMINI_MODEL=gemini-2.5-flash
ANTHROPIC_API_KEY=
LLM_MODEL=claude-sonnet-4-6
# --- SEC EDGAR filings harvester (free, no key; public accounts auto-matched) ---
SEC_ENABLED=1
SEC_MAX_FILINGS_PER_ACCOUNT=5
# Scoring thresholds (design Phase 5)
PRIORITY_THRESHOLD=0.72