From 0952ff21b0fd30639b5c2de45e985d9be5f64e80 Mon Sep 17 00:00:00 2001 From: allexanderbergmans Date: Fri, 3 Jul 2026 16:17:59 +0200 Subject: docs(kernel): introduce commit message generator tool --- ai/Modelfile | 27 +++++++++++++++++++++++++++ scripts/commit.sh | 23 +++++++++++++++++++++++ sys/README.md | 5 +++++ 3 files changed, 55 insertions(+) create mode 100644 ai/Modelfile create mode 100644 scripts/commit.sh create mode 100644 sys/README.md 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: (): +- 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 -- cgit v1.3