* fix(SPEC_11): address CodeRabbit review feedback
- Update run_full.py docstring to reference sexual health pipeline (not drug repurposing)
- Update run_full.py help text to use sexual health query example
- Fix app.py domain display to show "Sexual Health" (not "Sexual_Health")
- Update test_nodes.py mock data to use sexual health terms (Testosterone, Androgen Receptor)
- Add @pytest.mark.unit markers to test_judges.py test classes
- Add specific assertion for next_search_queries in test_judges.py
- Add missing @pytest.mark.asyncio marker to test_mcp_tools.py
- Update test_mcp_tools.py and test_clinicaltrials.py to use sexual health queries
- Fix SPEC_12 markdown bare code fence (MD040)
* fix(SPEC_11): comprehensive domain alignment audit
Second pass of CodeRabbit review fixes - found additional domain mismatches:
- examples/search_demo/run_search.py: Update docstring from "drug repurposing" to "sexual health"
- examples/orchestrator_demo/run_agent.py: Update help text from "metf…
feat(SPEC_11): finalize transition to Sexual Health Research Specialist
This commit completes the transition of DeepBoner to a dedicated Sexual Health Research Agent by removing all references to "general" and "drug repurposing" domains. Key changes include:
- Updated domain defaults to exclusively use "sexual_health".
- Replaced all example queries and documentation to reflect a focus on sexual health topics.
- Removed any lingering references to non-sexual health concepts in code and tests.
- Ensured all tests are aligned with the new domain focus, passing successfully.
This change reinforces the project's identity and simplifies the codebase, enhancing clarity and usability for users focused on sexual health research.
Closes #89.
* feat: implement SPEC_10 domain-agnostic refactor
* fix: complete SPEC_10 audit - license + HierarchicalOrchestrator domain
License Fixes:
- LICENSE: Fix copyright "Antibody Training Pipeline ESM" → "DeepBoner Contributors"
- pyproject.toml: Add missing license = "Apache-2.0" field
- README.md: Fix frontmatter license: mit → apache-2.0
Domain Threading Fixes:
- hierarchical.py: Add domain param to __init__ and pass to ResearchTeam
- factory.py: Pass domain to HierarchicalOrchestrator
All 237 tests pass. Domain now properly threaded through all orchestrators.
* test: enhance domain handling in orchestrators and judges
- Updated unit tests for `configure_orchestrator` to include mock mode and free tier scenarios, ensuring the domain is correctly passed to handlers.
- Refactored tests for `JudgeHandler` to mock model retrieval, allowing for domain acceptance without API key requirements.
- Improved `AdvancedOrchestrator` tests to mock API key validation and ensure domain handling i…
feat: Wire LlamaIndex RAG into Simple Mode (Tiered Embedding) (#83)
* feat: implement SPEC_06 fixes for simple mode synthesis
Implements research-backed architecture changes for Simple mode:
- Diverse evidence selection with lost-in-the-middle mitigation
- Debiased judge prompt (scoring only, no decision making)
- Code-enforced termination criteria (prevents infinite loops)
- Real partial synthesis with drug candidates when max iterations reached
- Unit and integration tests for all new logic
* fix: address CodeRabbit review feedback
- Fix type annotation: recommendation str -> Literal["continue", "synthesize"]
- Add @pytest.mark.unit markers to unit tests
- Add @pytest.mark.integration markers to integration tests
- Simplify early/late evidence assertions using set intersection
- Replace next() with explicit filtering for clearer test diagnostics
- Extract hardcoded thresholds (50, 30) to TERMINATION_CRITERIA
- Fix e2e mock to accept iteration/max_iterations parameters
All 177 tests pass, mypy clean, ruff clean.
* docs: add P3 architectural gap r…
feat: implement HFInferenceJudgeHandler for free-tier AI analysis
Replace MockJudgeHandler with real AI analysis using HuggingFace Inference API:
- Add HFInferenceJudgeHandler with chat_completion API
- Model fallback chain: Llama 3.1 → Mistral → Zephyr (ungated)
- Robust JSON extraction (handles markdown blocks, nested braces)
- Tenacity retry with exponential backoff for rate limits
- Fix app.py to use HF Inference when no paid API keys present
Priority: User API key → Env API key → HF Inference (free)
Hackathon judges now get real AI analysis without needing API keys.
Set HF_TOKEN as Space secret for best model (Llama 3.1).
fix(report): add explicit JSON structure guidance in prompt
The LLM was returning incorrect JSON structures:
- hypotheses_tested: dict instead of list
- references: string URLs instead of list of dicts
Added explicit format examples in SYSTEM_PROMPT to guide
the LLM to produce valid structured output that passes
Pydantic validation.
This fixes the full_stack_demo ReportAgent validation errors.
fix: apply lazy init pattern and pydantic-ai fixes to ReportAgent (#12)
Applies the same fixes as Phase 7 HypothesisAgent:
- Lazy initialization via _get_agent() to avoid API key requirement at import
- Use output_type instead of result_type (pydantic-ai API)
- Use result.output instead of result.data
- Fix line length issues in tests
- Proper mocking of get_model in tests
feat(phase7): implement Hypothesis Agent for mechanistic reasoning
* feat: initialize deepcritical project structure with core configuration and main functionality
- Added initial project files including `.python-version`, `pyproject.toml`, and main application logic in `main.py`.
- Implemented application configuration using Pydantic in `src/utils/config.py` with environment variable support.
- Created directory structure for source code and tests, including placeholders for agents, prompts, tools, and utilities.
- Added unit tests for configuration loading and validation in `tests/unit/utils/test_config.py`.
Review Score: 100/100 (Ironclad Gucci Banger Edition)
* feat(phase1): complete foundation with Python 3.11, tests, and tooling
- Fix Python version to 3.11 for HuggingFace Spaces compatibility
- Add config.py with pydantic-settings for typed configuration
- Add exceptions.py with custom exception hierarchy
- Add conftest.py with test fixtures (sample_evidence deferred to Phase 2)
- Add .env.example and .pre-commit-config.yaml
- Remove refere…