Files
portal/engines/mailbox.sh
T
Bendik Aagaard LynghaugandClaude Fable 5.1 b6bdac6f62 Generator, LLM backends, and the onboarding site
`portal-trainer generate` turns a plain-words business intake into a
content repo in three phases, each held to portal's question_lint:
needs.yaml (then frozen, so the generator cannot weaken the spec to
pass), structure (revised against the lint's findings until green),
and wording (personas answered blind, misroutes fed back; a rewrite
that breaks structure is reverted). Model output is written to disk
only under aggregates.yaml, site.yaml and questions/**.yaml.
`portal-trainer answer` is the blind answerer alone.

The LLM is an external command, prompt on stdin, text on stdout:
engines/ollama.sh (local Ollama), engines/anthropic.sh (API key),
engines/mailbox.sh (hand each prompt to an agent or a person).

portal-portal/ is the onboarding site as a portal content repo: the
front door is the intake interview, records land in `onboardings`
(open -> drafted <-> revising -> live | declined), and it passes its
own needs spec.

runs/uhhm-2026-09-21/ollama: qwen3:8b and granite4.1:8b as blind
answerers on the same eight tasks.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L4jrCgLiKKHAEFuZUJjckH
2026-09-21 18:14:25 +02:00

13 lines
447 B
Bash
Executable File

#!/bin/sh
# LLM backend that hands each prompt to whoever watches $MAILBOX:
# prompt-N.md goes out, the reply is read from reply-N.md. For driving
# the generator from an agent session, or by hand.
set -eu
: "${MAILBOX:?set MAILBOX to a directory}"
mkdir -p "$MAILBOX"
n=$(( $(ls "$MAILBOX" | grep -c '^prompt-' || true) + 1 ))
cat > "$MAILBOX/prompt-$n.md"
until [ -s "$MAILBOX/reply-$n.md" ]; do sleep 2; done
sleep 1
cat "$MAILBOX/reply-$n.md"