---
version: 1
mode:
always_use_skills: []
prefer_skills: []
avoid_skills: []
skill_rules:
  - when: writing or editing docs, plans, records, handoffs, PR text, or other human-readable prose
    use:
      - human-writing
  - when: building repo orientation, architecture maps, generated repo map, subsystem inventory, or durable codebase context
    use:
      - repo-map
  - when: optimizing a measurable metric through experiments, benchmarks, performance work, bundle size, test speed, or model quality
    use:
      - autoresearch
custom_instructions: []
models: {}
skill_discovery:
skill_staleness_days:
auto_supervisor: {}
git:
  auto_push:
  push_branches:
  remote:
  snapshots:
  pre_merge_check:
  commit_type:
  main_branch:
  merge_strategy:
  isolation:
  manage_gitignore:
  worktree_post_create:
unique_milestone_ids:
budget_ceiling:
budget_enforcement:
context_pause_threshold:
token_profile:
phases:
  skip_research:
  skip_reassess:
  reassess_after_slice:
  skip_slice_research:
  # SF ADR-011 P1: progressive planning. When true, the milestone planner
  # can mark slices as sketches (is_sketch=1, sketch_scope=<2-3 sentence
  # hint>) and refine-slice expands each one just-in-time using prior slice
  # summaries as context. When false (default), all slices get full plans up
  # front. (Note: SF's local ADR-011 is "Swarm Chat" — unrelated.)
  progressive_planning:
  # SF ADR-011 P2: mid-execution escalation. When true, complete_task honors
  # an optional escalation: { question, options, recommendation, ... } payload.
  # The agent's choice carries forward as a hard constraint into the next
  # executor. See escalation_auto_accept for whether autonomous mode pauses or
  # auto-accepts.
  mid_execution_escalation:
  # When true (default), an escalation in autonomous mode auto-accepts the agent's
  # recommendation and continues — autonomous mode is autonomous. The user can
  # review/override later via `/escalate list --all`. Set false to keep
  # SF's pause-and-ask behavior (loop halts until user runs
  # `/escalate resolve`).
  escalation_auto_accept:
# Deep-mode planning gate (top-level, not under phases). When set to "deep",
# autonomous mode runs project-level discussion → requirements → optional research
# BEFORE any milestone work. Default: light (current SF behavior).
planning_depth:
dynamic_routing:
  enabled:
  tier_models: {}
  escalate_on_failure:
  budget_pressure:
  cross_provider:
  hooks:
uok:
  enabled: true
  gates:
    enabled: true
  model_policy:
    enabled: true
  execution_graph:
    enabled: true
  gitops:
    enabled: true
    turn_action: commit
    turn_push: false
  audit_envelope:
    enabled: true
  planning_flow:
    enabled: true
auto_visualize:
auto_report:
parallel:
  enabled:
  max_workers:
  budget_ceiling:
  merge_strategy:
  auto_merge:
verification_commands: []
verification_auto_fix:
verification_max_retries:
notifications:
  enabled:
  on_complete:
  on_error:
  on_budget:
  on_milestone:
  on_attention:
cmux:
  enabled:
  notifications:
  sidebar:
  splits:
  browser:
remote_questions:
  channel:
  channel_id:
  timeout_minutes:
  poll_interval_seconds:
uat_dispatch:
post_unit_hooks: []
pre_dispatch_hooks: []
# experimental:
#   rtk: false
---

# SF Skill Preferences

See `~/.sf/agent/extensions/sf/docs/preferences-reference.md` for full field documentation and examples.

## Environment variables (not in YAML — set via shell)

These are runtime-only; SF reads them at startup, never persists them, never logs the key.

| Variable | Purpose | Default |
|---|---|---|
| `SF_LLM_GATEWAY_KEY` | Bearer token for the inference-fabric llm-gateway. Also accepts `LLM_GATEWAY_API_KEY`, `LLM_GATEWAY_BEARER_KEY`, and `LLM_MUX_API_KEY`. **When unset, embeddings are disabled** and `getRelevantMemoriesRanked` falls back to static (confidence × hit-count) ranking. | (unset) |
| `SF_LLM_GATEWAY_URL` | OpenAI-compatible endpoint base, including `/v1`. Also accepts `LLM_GATEWAY_BASE_URL` and `LLM_MUX_BASE_URL`. | `https://llm-gateway.centralcloud.com/v1` |
| `SF_LLM_GATEWAY_EMBED_MODEL` | Embedding model id served by the gateway. | `Qwen/Qwen3-Embedding-4B` |
| `SF_LLM_GATEWAY_RERANK_MODEL` | Rerank model id. When the gateway key is set, SF defaults to `Qwen/Qwen3-Reranker-0.6B`; if no rerank worker is online, rerank silently degrades and the cosine pass alone ranks results. | `Qwen/Qwen3-Reranker-0.6B` |

Once `SF_LLM_GATEWAY_KEY` is set, the agent_end hook opportunistically backfills embeddings for any memories without vectors (50 per turn, 16 per batch). `/memory search "<query>"` lights up the embedding-ranked path; without the key it shows static rank.
