AgentSkillsCN

soto-config

当您需要在此仓库中添加或修改用户可调优的默认值、阈值、超时时间,或行为标志时,亦或是将零散的常量重构至集中式的 `soto_config.ts` 模块时,可使用此技能。

SKILL.md
--- frontmatter
name: soto-config
description: This skill should be used when adding or changing user-tunable defaults, thresholds, timeouts, or behavior flags in this repo, or when refactoring scattered constants into the centralized `soto_config.ts` module.

Soto Config (Centralized Defaults)

[Created by Codex: 019b7ddb-6768-73f2-a5ef-a92e77f5fad1]

Purpose

Maintain a single source of truth for tunable app behavior by centralizing defaults in soto_config.ts (APP_CONFIG) and wiring UI + scripts to read from it.

When To Use

  • Add or change a default toggle/slider/view in the UI.
  • Tune Live Logs behavior (timeouts, debug limits, takeover behavior, tail-last-N policy).
  • Adjust “follow mode” / auto-scroll heuristics (thresholds, intent windows).
  • Eliminate hard-coded defaults spread across components or scripts.

Rules

  1. Store user-tunable defaults in soto_config.ts under APP_CONFIG (keep as const).
  2. Keep values stable and low-risk to consume (primitive/POJO; avoid functions).
  3. Import APP_CONFIG from ./soto_config or ../soto_config (do not reintroduce config.ts).
  4. Keep namespaces small and obvious (e.g., ui, liveLogs, replaySseLogs).
  5. Treat component-local constants as acceptable only when they are truly internal and not user-tunable.

Workflow (Agent Checklist)

  1. Decide whether the change is user-tunable.
  2. Add/update the knob in soto_config.ts under an appropriate namespace.
  3. Replace callsites to consume APP_CONFIG instead of literals.
  4. Update any scripts that parse soto_config.ts via regex/text scanning (keep parsing minimal and robust).
  5. Validate by running npm run build (and any relevant helper scripts).

Known Config Surface (This Repo)

  • UI defaults: APP_CONFIG.ui.*
  • Follow mode: APP_CONFIG.ui.followMode.scrollBottomThresholdPx
  • Live Logs: APP_CONFIG.liveLogs.*
  • Replay helpers: APP_CONFIG.replaySseLogs.*

Cross-Tool Note (Claude Code)

Claude Code loads project skills from .claude/skills. Keep canonical skills under skills/; expose them to Claude Code via a symlink from .claude/skills to skills/.