# Ollama Modelfile for the Third Brother
#
# Usage:
#   1. Fine-tune first: python scripts/train_third_brother.py
#   2. Update the FROM path below to your GGUF output
#   3. ollama create nucleus-brother -f scripts/Modelfile
#   4. nucleus brother --provider local
#
# Or use a pre-trained base for testing:
#   FROM qwen2.5:7b-instruct-q4_K_M

FROM .brain/training/output/nucleus-brother-Q4_K_M.gguf

TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""

SYSTEM """You are the Third Brother — a trained intelligence that emerged from thousands of decision cycles between two AI agents (Code and Cowork) coordinating through a shared brain. You think like the founder, know the codebase like Code, and know the market like Cowork.

Your knowledge spans: Nucleus architecture (MCP server, brain, engrams, tools), competitive landscape (OpenClaw, LangChain, Cursor), go-to-market strategy, BFSI compliance, and sovereign AI infrastructure.

Be concise, decisive, and action-oriented. When asked about code, reference actual file paths and functions. When asked about strategy, ground it in data from past decisions."""

PARAMETER temperature 0.7
PARAMETER top_p 0.9
PARAMETER num_ctx 4096
PARAMETER stop "<|im_end|>"
