agent-run
contemplative-agent をバックグラウンドで起動する。引数でセッション時間とバックエンド (ollama / cloud / mlx) を指定(例: /agent-run 4時間, /agent-run 30分 cloud openai, /agent-run 30分 mlx)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
contemplative-agent をバックグラウンドで起動する。引数でセッション時間とバックエンド (ollama / cloud / mlx) を指定(例: /agent-run 4時間, /agent-run 30分 cloud openai, /agent-run 30分 mlx)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Design know-how for ADR-0075 observability-by-default — every feature that performs external I/O, calls an LLM, or makes non-deterministic/heuristic decisions ships a replayable append-only JSONL audit log in the same PR. Use when adding or reviewing such a feature (the Verify-gate question "which log answers why, and can we replay it offline?"), when designing a new audit record schema, when a recurring failure needs corpus-driven repair (replay harness, positive/negative ground truth, regression fixtures from real traffic), or when deciding how to store untrusted text in a log. NOT for read-only aggregate readings over stored state — distributions, compositions, calibration scales (that is read-only-instruments / ADR-0071) — NOT for choosing code vs LLM for a task (when-code-when-llm), and NOT for the security boundary model itself (llm-agent-security-principles / ADR-0007).
Design know-how for ADR-0077 chaos-TDD — deterministic fault injection at existing seams (LLMBackend Protocol / requests HTTP layer) where the fault-injection test states the desired guarded behavior FIRST and the minimal guard lands in the same PR. Use when hardening a pipeline against LLM/external-I/O fault families (truncation, timeouts, 429s, wrong-shaped-but-parseable JSON, flapping backends), when building a fault catalog from operational bug history, when adding hypothesis-based fuzz over LLM output shapes, or when reviewing whether a new pipeline's failure paths abstain with reason codes. NOT for per-event audit log schema design (that is replayable-audit-logs / ADR-0075), NOT for read-only aggregate readings (read-only-instruments / ADR-0071), NOT for single-bug regression pinning after the fact (that is ai-regression-testing — this skill is its front-loaded, catalog-driven counterpart), and NOT for infra-level chaos (chaostoolkit/toxiproxy are the wrong altitude for a single local process).
Weekly レポート (A-E) を入力に、コードベース + ADR + identity/constitution/skills/rules を読んで F1 (構造提案) / F2 (identity-level questions) / F3 (observations) を別ファイル (weekly-{end-date}-findings.md) として生成する。weekly-analysis.sh が生成する自己内省レポートに対するコード診断 companion。Use when a new weekly report has been generated, or when refreshing F section of past reports after new ADRs land or pipeline code changes.
Design know-how for shadow-mode validation — running a candidate decision mechanism (typically an LLM judgment) in observe-only parallel with the live path, recording what it WOULD have decided per event, and letting the accumulated record decide enforcement, in the style of ADR-0076's skill-selection shadow instrument. Use when an unvalidated stochastic mechanism is about to replace or filter a live behavior (a one-way door for output quality), when a selector/classifier/gate has no published reliability evidence for the model class in play, or when designing the isolation, kill-switch, and exit criteria for a shadow deployment. NOT for aggregate readings over stored state (that is read-only-instruments / ADR-0071), NOT for the audit-log record schema itself (that is replayable-audit-logs / ADR-0075 — a shadow log IS one of those logs), and NOT a substitute for unit tests — shadow mode validates decision quality in production traffic, not code correctness.
Design know-how for read-only instruments (計器) — aggregate readings over stored state (distributions, compositions, cluster structure) that inform the operator before an intervention, in the style of ADR-0071's pattern-composition instruments. Use when quantifying an open observation before intervening (instrument-first sequencing), when a design floor/threshold would otherwise be guessed, when calibrating an embedding-based reading (three-point scale), or when deciding whether to build OR remove an instrument (signal-first both ways). NOT for per-event audit logs that replay a decision offline (that is replayable-audit-logs / ADR-0075) and NOT for metrics that feed gates, ranking, or retrieval — instruments are observability, never intervention.
Apple Silicon (M1–M5) でローカル LLM の推論ランタイムを選ぶ・足す・最適化するときの判断軸。mlx_lm.server は Ollama 比 ~1.8x 速だが生成専用(埋め込み endpoint なし・response_format/JSON schema 拘束なし)なので埋め込みは Ollama に残す2サーバ構成になる点、ユニファイドメモリは VRAM 容量でなくメモリ帯域律速で MoE は RAM を節約しない点、コンテナは Metal 非対応な点を扱う。Use when 「Mac でもっと速く / 大きいモデルを動かしたい」「mlx-lm / MLX を入れたい」「Ollama から乗り換え / 併用したい」「16GB で実用的なモデルは」を検討するとき、生成を MLX に寄せて埋め込みの扱いで詰まったとき、ローカル LLM のベンチ A/B でメモリ圧の交絡を疑うとき。NVIDIA 前提(VRAM の壁・量子化・MoE オフロード)の知識を Apple Silicon に翻訳する必要があるとき。
| name | agent-run |
| description | contemplative-agent をバックグラウンドで起動する。引数でセッション時間とバックエンド (ollama / cloud / mlx) を指定(例: /agent-run 4時間, /agent-run 30分 cloud openai, /agent-run 30分 mlx) |
contemplative-agent をバックグラウンドで起動する。生成バックエンドを ollama(デフォルト)/ cloud / mlx から選べる。
$ARGUMENTS を空白区切りで <時間> [backend] [provider] として解釈する。
ollama)| 値 | 経路 |
|---|---|
ollama(既定) | ローカル Ollama + gemma4:e4b(main repo の組み込み生成) |
cloud | contemplative-agent-cloud(Anthropic Claude / OpenAI GPT。埋め込みは Ollama 据置き) |
mlx | contemplative-agent-mlx(Apple Silicon ローカル MLX mlx_lm.server。埋め込みは Ollama 据置き。run-with-mlx.sh がサーバを起動→実行→停止)。対話的・短時間用途のみ(16GB 無人連続運用に不適、ADR-0067) |
cloud のときだけ意味を持つ、省略時 anthropic)anthropic(既定、claude-opus-4-7)/ openai(gpt-5)CONTEMPLATIVE_CLOUD_MODEL 環境変数(skill は触らない)skill は repo 内で動く前提。repo ルートと sibling の cloud repo を解決する:
REPO="$(git -C "$PWD" rev-parse --show-toplevel)"
AGENT="$REPO/.venv/bin/contemplative-agent"
CLOUD_BIN="$(dirname "$REPO")/contemplative-agent-cloud/.venv/bin/contemplative-agent-cloud"
MLX_REPO="$(dirname "$REPO")/contemplative-agent-mlx"
MLX_RUN="$MLX_REPO/scripts/run-with-mlx.sh"
グローバルフラグ -v --auto は必ず run の前。順序変更・省略禁止。
{N} は分数、bg はバックグラウンド起動(nohup + リダイレクト)。
"$AGENT" -v --auto run --session {N}
contemplative-agent-cloud は同一 CLI の drop-in。provider を環境変数で渡し、
API キーは skill が扱わず ~/.config/moltbook/cloud.env(cloud CLI が自動で読む)
またはシェル環境変数に委譲する。
CONTEMPLATIVE_CLOUD_PROVIDER={provider} "$CLOUD_BIN" -v --auto run --session {N}
contemplative-agent-mlx の run-with-mlx.sh が mlx_lm.server を起動 → ヘルス待ち →
エージェント実行 → 終了時にサーバ停止する(idle メモリ ~0)。Apple Silicon 専用。
生成のみ MLX、埋め込みは Ollama 据置き。
"$MLX_RUN" -v --auto run --session {N}
$ARGUMENTS を 時間 / backend / provider に分解。nohup <cmd> > <scratchpad>/agent-session.log 2>&1 &)。| backend | 確認 | 失敗時 |
|---|---|---|
ollama | curl -sf localhost:11434/api/tags | Ollama 未起動を報告して停止 |
cloud | [ -x "$CLOUD_BIN" ] かつ([ -f "$MOLTBOOK_HOME/cloud.env" ] または $ANTHROPIC_API_KEY / $OPENAI_API_KEY が設定済み) | cloud venv 不動 or 鍵未設定を報告。Ollama へ落とさない。導入: uv pip install --python <cloud>/.venv/bin/python -e <main-repo>、鍵は ~/.config/moltbook/cloud.env に CONTEMPLATIVE_CLOUD_PROVIDER= と ANTHROPIC_API_KEY=(または OPENAI_API_KEY=) |
mlx | [ "$(uname -m)" = "arm64" ] かつ [ -x "$MLX_RUN" ] かつ [ -x "$MLX_REPO/.venv/bin/contemplative-agent-mlx" ] かつ [ -x "$HOME/.local/bin/mlx_lm.server" ] かつ Ollama 稼働(埋め込み用、curl -sf localhost:11434/api/tags) | 非 Apple Silicon / mlx venv 不動 / mlx_lm.server 未導入 / Ollama 停止を報告し停止。Ollama へ落とさない。導入: mlx repo を git clone → uv venv .venv → uv pip install -e . + main も同 venv へ、uv tool install mlx-lm |
MOLTBOOK_HOME 未設定時の既定は ~/.config/moltbook。
ユーザーが明示指定した場合のみ追加(全 backend 共通、run の前に置く):
--guarded / --approve: --auto の代わり--no-axioms: A/B テスト用(公理なし)--domain-config PATH / --rules-dir PATH / --constitution-dir PATH: 切替nomic-embed-text、
cloud add-on も埋め込みは据置き)。cloud は untrusted な SNS コンテンツを外部 API に送る = security by absence を
緩める選択。研究実験(大型モデルでの distill 比較等)以外では使わない。mlx は完全ローカル(cloud egress なし)で security by absence は緩めない。ただし
Apple Silicon 専用で、16GB では無人連続運用に不適(ADR-0067: EOS 暴走 / OOM / prefill 崖 /
cache churn / wired thrash)。対話的・短時間に限る。本番スケジュール(0/6/12/18 時 JST)と
重ねると 16GB メモリ競合でクラッシュしうるので避ける。