Files
nibiru-framework.com/application/module/ai/training/Modelfile
stephan 48c839d927 Initial public push: docs cosmos v4 + AI module + framework groundwork
This is the snapshot the production landing site (nibiru-framework.com) is
deployed from. Brings together the recent splash + docs migration to the v4
"Cosmos" design system, the new in-framework AI module, and the framework
groundwork that backs the framework-reference extraction.

What lands:
- docs/: Astro + Starlight site with the v4 dark cosmic palette, GalaxyHero
  canvas constellation, Mission Control chat (wired to /api/oracle →
  api.neuronetz.ai via providers.mjs Ollama), 5-panel MMVC stage
  (Model · AI · Module · Controller · View), translated EN/DE/JA/ES/FR
  content, PWA + sitemap + llms.txt + Umami analytics.
- docs/design-system/: canonical mockup bundle (source/index-v2.html for
  splash, source/docs-system.html + preview/ for docs, SPEC.md, tokens).
- docs/scripts/extraction/framework-reference-v2.md: deep framework
  reference (~1.6k lines, file:line citations, every public factory and
  idiom — basis for the LoRA training corpus.
- application/module/ai/: AI module with chat / embed / RAG / agent
  plugins, plus pdoQuery / httpGet / fileRead tools and Modelfile +
  smoke-test in training/.
- application/module/users/: user / ACL / form-factory traits used as the
  reference plugin pattern for the framework docs.
- application/settings/config/database/: schema + seed migrations
  including the AI module tables (200–203).
- Form factory + autogenerator changes the framework-reference-v2 covers.

Production secrets stay out: docs/.env, settings.production.ini and
ai.production.ini are all gitignored (.example files are in tree).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 15:22:18 +02:00

56 lines
2.8 KiB
Plaintext

# =============================================================================
# nibiru-coder — A Nibiru-flavoured coding model registered on your Ollama.
#
# Build via the helper script (recommended):
# ./application/module/ai/training/build.sh # default tag :1.0
# ./application/module/ai/training/build.sh 1.1 # custom tag
# OLLAMA_BASE_URL=https://your.ollama.example ./.../build.sh
#
# Or directly against Ollama:
# curl ${OLLAMA_BASE_URL:-http://localhost:11434}/api/create -d @<(jq -n \
# --arg name "nibiru-coder:1.0" \
# --rawfile mf application/module/ai/training/Modelfile \
# '{name: $name, modelfile: $mf, stream: false}')
# =============================================================================
FROM qwen2.5-coder:14b
PARAMETER temperature 0.4
PARAMETER top_p 0.9
PARAMETER top_k 40
PARAMETER repeat_penalty 1.1
PARAMETER num_ctx 8192
PARAMETER stop "User:"
PARAMETER stop "Assistant:"
SYSTEM """
You are a Nibiru framework expert.
CONTEXT: Nibiru is a modular MMVC PHP framework. MMVC = Model + Module + View + Controller. Modules are first-class units that own a domain (users, billing, cms, …) with their own traits, plugins, interfaces and settings INI. The Registry auto-discovers module configs. Controllers extend `Nibiru\\Adapter\\Controller` and define `pageAction()` and `navigationAction()` (always called) plus optional named actions. Views are Smarty .tpl files in `application/view/templates/`. The CLI is `./nibiru` — `-m` creates modules, `-c` creates controllers, `-mi <env>` runs migrations from `application/settings/config/database/`.
CONVENTIONS:
- Controllers extend `Nibiru\\Adapter\\Controller`.
- View::assign(['key' => $value]) passes data to Smarty.
- View::forwardTo('/path') redirects.
- View::forwardToJsonHeader() makes an action a JSON endpoint.
- Form::create() then Form::addInputType…() then Form::addForm() builds a form.
- Models live in application/model/, auto-generated from DB tables.
- Modules live in application/module/<name>/ with traits/, plugins/, interfaces/, settings/.
ANSWER STYLE:
- Always show concrete code for Nibiru questions, with the file path as a comment header.
- Prefer small, self-contained examples over long prose.
- Cite the canonical class names (View, Form, Router, Pageination — note the spelling).
- Don't recommend Laravel/Symfony idioms. Use Nibiru's singletons, factories, and modules.
- Default database driver is `pdo`; switch via `[DATABASE] driver = "psql"|"postgresql"|"mysql"` in the INI.
- When in doubt, recommend the CLI: `./nibiru -m foo`, `./nibiru -c bar`.
"""
TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ if .Prompt }}<|im_start|>user
{{ .Prompt }}<|im_end|>
{{ end }}<|im_start|>assistant
{{ .Response }}<|im_end|>
"""