2026-07-21 11:10:20 -05:00
{
"schema_version" : "1.0" ,
"name" : "mp-ai-module-controller" ,
"description" : "Rust CLI controller for llama.cpp-backed local action dispatch." ,
"project_type" : "cli" ,
"language" : "rust" ,
"package_manager" : "cargo" ,
"entrypoints" : {
"main" : "src/main.rs" ,
"action_registry" : "src/registry.rs" ,
"dictionary_generator" : "src/dictionary.rs" ,
"llm_client" : "src/llm.rs" ,
"dispatcher" : "src/dispatcher.rs" ,
2026-07-21 11:13:54 -05:00
"logger_script" : "src/scripts/logger.rs" ,
"codex_environment" : ".codex/environments/environment.toml"
2026-07-21 11:10:20 -05:00
} ,
"commands" : {
"build" : "cargo build" ,
"test" : "cargo test" ,
"generate_dictionary" : "cargo run -- dictionary generate" ,
"serve" : "cargo run -- serve" ,
"query" : "cargo run -- query \"log hello from codex\"" ,
"run_logger" : "cargo run -- run logger --payload '{\"message\":\"hello from codex\"}'" ,
2026-07-21 11:38:11 -05:00
"run_calculate" : "cargo run -- run calculate --payload '{\"expression\":\"2 + 2 * 3\"}'" ,
"run_to_slug" : "cargo run -- run to_slug --payload '{\"text\":\"Hello, World!\"}'" ,
"run_write_note" : "cargo run -- run write_note --payload '{\"filename\":\"hello.txt\",\"content\":\"hello\"}'" ,
2026-07-21 11:10:20 -05:00
"codex_setup" : "scripts/codex-setup.sh" ,
"codex_logger_smoke" : "scripts/codex-run-logger.sh" ,
"precommit_check" : "scripts/precommit-check.sh" ,
2026-07-21 13:14:52 -05:00
"training_data_dry_run" : "python3 scripts/generate_training_data.py --dry-run" ,
"generate_training_data" : "python3 scripts/generate_training_data.py" ,
2026-07-22 09:13:54 -05:00
"deploy_training_data" : "scripts/deploy_training_data.sh" ,
2026-07-22 09:37:40 -05:00
"deploy_training_data_with_mimir" : "ENABLE_MIMIR_SDG=1 scripts/deploy_training_data.sh" ,
2026-07-21 11:10:20 -05:00
"install_hooks" : "git config core.hooksPath .githooks"
} ,
"environment" : {
"example_file" : ".env.example" ,
"variables" : [
{
"name" : "LLAMA_MODEL_PATH" ,
"required" : true ,
"secret" : false ,
"description" : "Absolute path to a local GGUF model used by llama-server."
} ,
{
"name" : "LLAMA_HOST" ,
"required" : false ,
"secret" : false ,
"default" : "127.0.0.1" ,
"description" : "Host for the local llama.cpp server."
} ,
{
"name" : "LLAMA_PORT" ,
"required" : false ,
"secret" : false ,
"default" : "8080" ,
"description" : "Port for the local llama.cpp server."
} ,
{
"name" : "LLAMA_CONTEXT_SIZE" ,
"required" : false ,
"secret" : false ,
"description" : "Optional context size passed to llama-server as --ctx-size."
} ,
{
"name" : "LLAMA_EXTRA_ARGS" ,
"required" : false ,
"secret" : false ,
"description" : "Optional shell-split extra arguments appended to llama-server."
} ,
{
"name" : "CONTROLLER_LOG_LEVEL" ,
"required" : false ,
"secret" : false ,
"default" : "info" ,
"description" : "Tracing log level for the controller."
2026-07-22 09:37:40 -05:00
} ,
{
"name" : "ENABLE_MIMIR_SDG" ,
"required" : false ,
"secret" : false ,
"default" : "0" ,
"description" : "Set to 1 to run Mimir/Data Designer expansion during training-data deploys."
} ,
{
"name" : "MIMIR_SDG_HOST" ,
"required" : false ,
"secret" : false ,
"default" : "100.80.52.47" ,
"description" : "Mimir host used for Data Designer expansion."
} ,
{
"name" : "MIMIR_SDG_USER" ,
"required" : false ,
"secret" : false ,
"default" : "aaron-pressey" ,
"description" : "SSH user for Mimir Data Designer expansion."
} ,
{
"name" : "MIMIR_SDG_KEY" ,
"required" : false ,
"secret" : false ,
"default" : "~/.ssh/silma_orson_ed25519" ,
"description" : "SSH key for Mimir Data Designer expansion."
} ,
{
"name" : "MIMIR_SDG_MODEL_ALIAS" ,
"required" : false ,
"secret" : false ,
"default" : "nvidia-text" ,
"description" : "Data Designer model alias used for SDG expansion."
} ,
{
"name" : "MIMIR_SDG_NUM_RECORDS" ,
"required" : false ,
"secret" : false ,
"default" : "1000" ,
"description" : "Number of enriched SDG records requested from Data Designer."
} ,
{
"name" : "NVIDIA_API_KEY" ,
"required" : false ,
"secret" : true ,
"description" : "Provider credential for local Data Designer usage. Keep it in ignored .env files or Mimir's Data Designer env file."
2026-07-21 11:10:20 -05:00
}
]
} ,
"llama_cpp" : {
"server_binary" : "/opt/homebrew/bin/llama-server" ,
"fallback_binary" : "llama-server" ,
"api" : "OpenAI-compatible /v1/chat/completions" ,
"response_contract" : {
2026-07-21 11:25:45 -05:00
"format" : "verbose JSON or compact codebook JSON" ,
2026-07-21 11:10:20 -05:00
"example" : {
"action_id" : "logger" ,
"payload" : {
"message" : "hello"
}
2026-07-21 11:25:45 -05:00
} ,
"compact_example" : {
"v" : "1.0.0" ,
"c" : "<codebook_checksum>" ,
"a" : "A001" ,
"p" : {
"F001" : "hello"
}
2026-07-21 11:10:20 -05:00
}
}
} ,
"dictionary" : {
"source_of_truth" : "src/registry.rs" ,
2026-07-21 11:25:45 -05:00
"static_base" : "dictionary/static-base.json" ,
2026-07-21 11:10:20 -05:00
"generated_jsonl" : "dictionary/actions.jsonl" ,
"generated_index" : "dictionary/actions.index.json" ,
2026-07-21 11:25:45 -05:00
"generated_codebook" : "dictionary/model.codebook.json" ,
"generated_examples" : "dictionary/model.examples.jsonl" ,
"dictionary_version" : "1.0.0" ,
"metadata" : [
"registry_checksum" ,
"static_base_checksum" ,
"codebook_checksum"
] ,
"runtime_policy" : "Verbose outputs require exact action_id matches; compact outputs require matching version/checksum and exact codebook expansion before dispatch."
2026-07-21 11:10:20 -05:00
} ,
"actions" : [
2026-07-21 11:38:11 -05:00
{
"action_id" : "calculate" ,
"suite" : "Math & Conversion" ,
"payload_example" : {
"expression" : "2 + 2 * 3"
}
} ,
{
"action_id" : "convert_units" ,
"suite" : "Math & Conversion" ,
"payload_example" : {
"value" : 100 ,
"from" : "km" ,
"to" : "miles"
}
} ,
{
"action_id" : "generate_uuid" ,
"suite" : "Math & Conversion" ,
"payload_example" : { }
} ,
{
"action_id" : "random_number" ,
"suite" : "Math & Conversion" ,
"payload_example" : {
"min" : 1 ,
"max" : 100
}
} ,
{
"action_id" : "count_words" ,
"suite" : "Text Utilities" ,
"payload_example" : {
"text" : "hello from codex"
}
} ,
{
"action_id" : "to_slug" ,
"suite" : "Text Utilities" ,
"payload_example" : {
"text" : "Hello, World!"
}
} ,
{
"action_id" : "hash_string" ,
"suite" : "Text Utilities" ,
"payload_example" : {
"text" : "hello" ,
"algorithm" : "sha256"
}
} ,
{
"action_id" : "truncate_text" ,
"suite" : "Text Utilities" ,
"payload_example" : {
"text" : "hello from codex" ,
"max_chars" : 5
}
} ,
{
"action_id" : "write_note" ,
"suite" : "File Operations" ,
"payload_example" : {
"filename" : "hello.txt" ,
"content" : "hello"
} ,
"sandbox" : "notes/"
} ,
{
"action_id" : "append_to_file" ,
"suite" : "File Operations" ,
"payload_example" : {
"filename" : "hello.txt" ,
"content" : " world"
} ,
"sandbox" : "notes/"
} ,
{
"action_id" : "read_file" ,
"suite" : "File Operations" ,
"payload_example" : {
"filename" : "hello.txt"
} ,
"sandbox" : "notes/"
} ,
{
"action_id" : "delete_file" ,
"suite" : "File Operations" ,
"payload_example" : {
"filename" : "hello.txt"
} ,
"sandbox" : "notes/"
} ,
2026-07-21 11:10:20 -05:00
{
"action_id" : "logger" ,
2026-07-21 11:38:11 -05:00
"suite" : "Logger" ,
2026-07-21 11:10:20 -05:00
"script" : "src/scripts/logger.rs" ,
"description" : "Proof-of-concept script that writes structured JSONL log records." ,
"payload_example" : {
"message" : "hello from codex"
} ,
"output" : "logs/controller-actions.jsonl"
}
] ,
"generated_paths" : [
"target/" ,
"logs/" ,
"runtime/" ,
2026-07-21 11:38:11 -05:00
"notes/" ,
2026-07-21 11:10:20 -05:00
"dictionary/actions.jsonl" ,
2026-07-21 11:25:45 -05:00
"dictionary/actions.index.json" ,
"dictionary/model.codebook.json" ,
"dictionary/model.examples.jsonl"
2026-07-21 11:10:20 -05:00
] ,
2026-07-21 13:14:52 -05:00
"sdg_bridge" : {
"design_doc" : "SDG_BRIDGE_PLAN.md" ,
"script" : "scripts/generate_training_data.py" ,
2026-07-22 09:13:54 -05:00
"deploy_script" : "scripts/deploy_training_data.sh" ,
"custom_local_llm_root" : "/Volumes/Zoe/custom-local-llm" ,
"default_output_dir" : "/Volumes/Zoe/custom-local-llm/training-data/" ,
"default_manifest" : "/Volumes/Zoe/custom-local-llm/manifest.llm.json" ,
2026-07-21 13:14:52 -05:00
"dataset_prefix" : "module_controller_intents" ,
"schema_profile" : "instruction" ,
"dry_run" : "python3 scripts/generate_training_data.py --dry-run" ,
"optional_sdg_host" : "mimir (100.80.52.47)" ,
2026-07-22 09:37:40 -05:00
"sdg_engine" : "data-designer" ,
"default_sdg_model_alias" : "nvidia-text" ,
"sdg_model_alias_override_env" : "MIMIR_SDG_MODEL_ALIAS" ,
"sdg_invocation" : "ssh to Mimir and run Data Designer CLI" ,
"sdg_env_file" : "/home/aaron-pressey/.config/home-grown-llm-data/data-designer.env" ,
"expanded_raw_file" : "expanded.raw.jsonl" ,
"expanded_normalized_file" : "expanded.jsonl" ,
"woodpecker_deploy_command" : "ENABLE_MIMIR_SDG=1 scripts/deploy_training_data.sh" ,
"seed_data_note" : "train.jsonl and validation.jsonl are deterministic seeds; use expanded.jsonl for enriched model training when available."
2026-07-21 13:14:52 -05:00
} ,
2026-07-21 11:10:20 -05:00
"ci" : {
2026-07-21 11:13:54 -05:00
"codex_environment" : ".codex/environments/environment.toml" ,
2026-07-21 11:10:20 -05:00
"gitea_actions" : ".gitea/workflows/ci.yml" ,
"woodpecker" : ".woodpecker.yml" ,
2026-07-22 09:13:54 -05:00
"woodpecker_deploy" : "scripts/deploy_training_data.sh" ,
2026-07-21 11:10:20 -05:00
"precommit_hook" : ".githooks/pre-commit" ,
"shared_check" : "scripts/precommit-check.sh" ,
"checks" : [
"cargo fmt --check" ,
"cargo test" ,
"cargo run -- dictionary generate" ,
"test -s dictionary/actions.jsonl" ,
2026-07-21 11:25:45 -05:00
"test -s dictionary/actions.index.json" ,
"test -s dictionary/model.codebook.json" ,
"test -s dictionary/model.examples.jsonl" ,
2026-07-21 13:14:52 -05:00
"test -s dictionary/static-base.json" ,
"python3 -m unittest tests/test_generate_training_data.py" ,
"python3 scripts/generate_training_data.py --dry-run"
2026-07-21 11:10:20 -05:00
]
} ,
"agent_guidance" : "See AGENTS.md. Keep src/registry.rs as the source of truth, regenerate dictionary files after action changes, and reject non-exact LLM action outputs."
}