init repo

This commit is contained in:
2026-04-22 20:55:36 +02:00
commit 0155516457
32 changed files with 7712 additions and 0 deletions

47
ai/scripts/llama-task.sh Executable file
View File

@@ -0,0 +1,47 @@
#!/usr/bin/env bash
set -euo pipefail
MODE="${1:-}"
TASK="${2:-}"
if [ -z "${MODE}" ] || [ -z "${TASK}" ]; then
echo "usage: $0 <plan|fix|review> <task text>"
exit 1
fi
MODEL="${LLAMA_MODEL:-}"
if [ -z "${MODEL}" ]; then
echo "error: LLAMA_MODEL not set"
echo "export LLAMA_MODEL=/absolute/path/to/model.gguf"
exit 1
fi
case "${MODE}" in
plan|fix|review) ;;
*)
echo "error: mode must be one of: plan fix review"
exit 1
;;
esac
./ai/scripts/build-context.sh >/dev/null
TMP="$(mktemp)"
trap 'rm -f "$TMP"' EXIT
{
cat "ai/prompts/${MODE}.md"
echo
echo "User task:"
echo "${TASK}"
echo
echo "Project context follows:"
echo
cat ai/context/project-context.md
} > "${TMP}"
exec llama-cli \
-m "${MODEL}" \
-sysf ai/system-prompt.md \
-f "${TMP}" \
-st