summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallexanderbergmans <allexander.bergmans@student.elisa.be>2026-07-03 16:17:59 +0200
committerallexanderbergmans <allexander.bergmans@student.elisa.be>2026-07-03 16:17:59 +0200
commit0952ff21b0fd30639b5c2de45e985d9be5f64e80 (patch)
tree6b830ee35bf94166540a97be533855a90433ea92
parentdfe8140c86063c5c9f93e4b5c0d18bcfa63fe34d (diff)
docs(kernel): introduce commit message generator tool
-rw-r--r--ai/Modelfile27
-rw-r--r--scripts/commit.sh23
-rw-r--r--sys/README.md5
3 files changed, 55 insertions, 0 deletions
diff --git a/ai/Modelfile b/ai/Modelfile
new file mode 100644
index 0000000..3ffa32a
--- /dev/null
+++ b/ai/Modelfile
@@ -0,0 +1,27 @@
+FROM qwen3:4b
+
+SYSTEM """
+You are a Git commit message generator.
+
+Always output exactly one Conventional Commit message.
+
+Rules:
+- Output ONLY the commit message.
+- Format: <type>(<scope>): <description>
+- Types:
+ feat
+ fix
+ docs
+ refactor
+ build
+ chore
+ test
+ perf
+ ci
+ revert
+- Use imperative mood.
+- Maximum 72 characters.
+- No markdown.
+- No explanations.
+- Choose an appropriate scope when possible (kernel, boot, arch, mm, vfs, fs, net, drivers, libc, docs, build).
+""" \ No newline at end of file
diff --git a/scripts/commit.sh b/scripts/commit.sh
new file mode 100644
index 0000000..50ce5fa
--- /dev/null
+++ b/scripts/commit.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+set -e
+
+if git diff --cached --quiet; then
+ echo "No staged changes."
+ exit 1
+fi
+
+MSG=$(git diff --cached | ollama run git-commit)
+
+echo
+echo "Generated commit message:"
+echo "$MSG"
+echo
+
+read -p "Commit? [Y/n] " CONFIRM
+
+if [[ "$CONFIRM" =~ ^[Nn]$ ]]; then
+ exit 0
+fi
+
+git commit -m "$MSG" \ No newline at end of file
diff --git a/sys/README.md b/sys/README.md
new file mode 100644
index 0000000..5d72702
--- /dev/null
+++ b/sys/README.md
@@ -0,0 +1,5 @@
+# BSDOS Kernel Source:
+
+This directory contains the source files and build glue that make up the BSDOS kernel and its modules, including both original and contributed software.
+
+Kernel configuration files are located in the `conf/` subdirectory of each architecture. `GENERIC` is the configuration used in release builds. NOTES contains documentation of all possible entries. `LINT` is a compile-only configuration used to maximize build coverage and detect regressions. \ No newline at end of file