name: create-runfile description: Use when authoring or repairing Kilroy run config YAML/JSON files, including DOT-to-provider backend alignment and runtime policy defaults.
Create Runfile
Scope
This skill owns run config authoring (run.yaml / run.json) for kilroy attractor run and resume.
In scope:
- Building config structure (
version: 1schema). - Aligning provider backends with DOT model/provider usage.
- Setting runtime, preflight, modeldb, git, and CXDB defaults.
Out of scope:
- DOT graph authoring and routing design. Use
create-dotfilefor graph work.
Overview
Core principle:
- Keep execution policy in run config, not in DOT topology.
- Align run config with what the graph needs to execute now.
- Favor explicit, deterministic defaults over implicit behavior.
Default run-config source:
skills/create-runfile/reference_run_template.yaml
Workflow
- Collect inputs.
- Read the target DOT graph and detect provider usage (
llm_providerattrs andmodel_stylesheet). - Capture user constraints for production/test mode and backend policy.
- Choose run mode explicitly.
- Production mode:
llm.cli_profile: realand no test-shim flags. - Test mode:
llm.cli_profile: test_shimwith shim-compatible provider config.
- Start from the template and fill required fields.
- Required:
version,repo.path,cxdb.binary_addr,cxdb.http_base_url,modeldb.openrouter_model_info_path. - Keep absolute paths for repo/modeldb/script entries.
- Emit only fields supported by
internal/attractor/engine/config.go. - Unknown keys are rejected at load time; do not emit unsupported keys.
- Align providers with DOT.
- For every provider used by DOT, set
llm.providers.<provider>.backend(apiorcli). - Do not edit DOT to force backend execution strategy.
4.5 Resolve model names deterministically when catalogs are unavailable.
- Model resolution order: user-specified model -> run snapshot/modeldb path ->
internal/attractor/modeldb/pinned/openrouter_models.json->internal/attractor/modeldb/manual_models.yaml->skills/shared/model_fallbacks.yaml. - Use
skills/shared/model_fallbacks.yamlonly as backup; never let backup entries override explicit user model/provider choices. - Normalize known aliases through fallback mappings before emitting YAML (for example provider
zai:glm-5.0->glm-5).
- Populate artifact_policy from skills/shared/profile_default_env.yaml.
- The engine applies only env overrides declared explicitly in the run config.
- Read
skills/shared/profile_default_env.yamlfor per-profile reference values. - Emit all required env vars for each profile used by the DOT graph.
- Set
artifact_policy.checkpoint.exclude_globsfor checkpoint hygiene. - Do not use deprecated
git.checkpoint_exclude_globs.
5.5 Declare secrets the project needs at build/test time.
- If the project under construction needs API keys at test or build time (e.g.
GEMINI_API_KEYfor smoke tests that call a live LLM), declare them inartifact_policy.env.overridesso they pass through to the agent shell. - The agent shell deny-lists env vars whose names contain
API_KEY,SECRET,TOKEN,PASSWORD, orCREDENTIALby default. Vars declared inartifact_policy.env.overridesbypass this deny list because they represent explicit operator intent. - Store the actual secret values in a
.envfile at the repo root (gitignored). The engine loads.envat startup and declared override keys pick up the OS values automatically. - Use an empty string as the override value — the engine substitutes the real value from the environment at resolve time:
artifact_policy: env: overrides: generic: GEMINI_API_KEY: "" # value comes from .env / shell environment - Never put actual secret values in the run config file.
- Apply runtime defaults and safety guardrails.
- Set
git.run_branch_prefix,git.commit_per_node, andgit.require_cleanintentionally. - Keep
runtime_policyexplicit (stage_timeout_ms,stall_timeout_ms, retry cap). - Enable
preflight.prompt_probesand use a non-aggressive timeout baseline for real-provider runs.
- Preserve local-run robustness.
- In this repo, keep
cxdb.autostartlauncher wiring when generating local CXDB configs. - Keep artifact/checkpoint hygiene settings where relevant (for example managed tool-cache roots).
- Validate alignment before handoff.
- Confirm every DOT provider has a run-config backend entry.
- Confirm mode consistency (
realvstest_shim) with intended command flags. - Confirm config has no unresolved placeholder paths.
- If graph prompts consume scratch artifacts, require run-scoped paths (
.ai/runs/$KILROY_RUN_ID/...); root.aiis not implicitly ingested.
Non-Negotiable Guardrails
- Backend policy lives in run config; do not encode it in DOT structure.
- Do not omit providers that are referenced by the graph.
- Do not use fragile preflight probe timeouts for real-provider runs.
- Do not emit local CXDB configs without
cxdb.autostartwiring in this repository context. - Do not emit unsupported keys (for example:
runtime_robustness,provider_capability_constraints).
References
docs/strongdm/attractor/attractor-spec.mddocs/strongdm/attractor/unified-llm-spec.mdREADME.mdskills/create-runfile/reference_run_template.yamlskills/shared/profile_default_env.yamlskills/shared/model_fallbacks.yaml