このディレクトリは butler2 の正本設計と補助仕様をまとめる場所です。
現時点では再整備中のため、まず次の順に読むことを推奨します。
history/ は検討経緯と過去の設計例archive/ は退役文書の保管先他プロジェクトから Butler を使う場合は、対象プロジェクトの root / config / .env を指定して実行する。
詳細は 外部プロジェクト利用ガイド Ubuntu を参照。
Python API 例:
from butler import TaskContract, Constraints, execute_task
task = TaskContract(
intent="read_from_gitea",
target={"service": "gitea"},
constraints=Constraints(max_minutes=1),
success_criteria=["issue を読める"],
delegation_mode="known_only",
requested_by="external-client",
requested_at="2026-04-04T00:00:00Z",
payload={"operation": "list_issues", "owner": "team", "repo": "sample"},
)
result = execute_task(
task,
project_root="/path/to/target-project",
config_dir="/path/to/target-project/config",
env_path="/path/to/target-project/.env",
)
CLI 例:
butler2 task.json --project-root /path/to/target-project
MCP facade 例:
uv run butler2-mcp
この stdio server は execute_task tool を公開し、Butler core の execute_task() を薄く包む。
接続した Brain 向けに、初回案内として短い instructions と次の MCP resource / tool も公開する。
butler://usage-guidebutler://runtime-defaultsinspect_runtime_config