ln-010-dev-environment-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePaths: File paths (,shared/,references/) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.../ln-*
路径说明: 文件路径(、shared/、references/)均相对于技能仓库根目录。如果在当前工作目录找不到,请定位到当前SKILL.md文件所在目录,向上返回一级即为仓库根目录。../ln-*
Dev Environment Setup
开发环境搭建
Type: L2 Domain Coordinator
Category: 0XX Shared
Runtime-backed coordinator for environment setup. The runtime is the execution SSOT. Worker outputs are standalone summaries, not chat prose.
类型: L2 域协调器
分类: 0XX 共享类
基于运行时的环境搭建协调器,运行时是执行的唯一真实源(SSOT)。工作器输出为独立摘要,而非对话式文本。
MANDATORY READ
必读内容
Load these before execution:
shared/references/coordinator_runtime_contract.mdshared/references/environment_setup_runtime_contract.mdshared/references/coordinator_summary_contract.mdshared/references/environment_state_contract.mdshared/references/environment_state_schema.jsonshared/references/tools_config_guide.md
执行前请加载以下文件:
shared/references/coordinator_runtime_contract.mdshared/references/environment_setup_runtime_contract.mdshared/references/coordinator_summary_contract.mdshared/references/environment_state_contract.mdshared/references/environment_state_schema.jsonshared/references/tools_config_guide.md
When to Use
使用场景
- First-time environment setup
- Agent/MCP drift after installs or updates
- Config sync drift across Claude, Gemini, Codex
- Instruction file audit or repair
- 首次环境搭建
- 安装或更新后出现Agent/MCP漂移
- Claude、Gemini、Codex之间的配置同步漂移
- 指令文件审计或修复
Inputs
输入参数
| Parameter | Required | Default | Description |
|---|---|---|---|
| No | | |
| No | | Plan without mutating |
| 参数 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|
| 否 | | |
| 否 | | 仅输出执行计划,不实际修改配置 |
Runtime
运行时
Runtime family:
environment-setup-runtimeIdentifier:
targets-{normalizedTargets}
Phases:
PHASE_0_CONFIGPHASE_1_ASSESSPHASE_2_DISPATCH_PLANPHASE_3_WORKER_EXECUTIONPHASE_4_VERIFYPHASE_5_WRITE_ENV_STATEPHASE_6_SELF_CHECK
Terminal phases:
DONEPAUSED
运行时族:
environment-setup-runtime标识符:
targets-{normalizedTargets}
执行阶段:
PHASE_0_CONFIG 配置阶段PHASE_1_ASSESS 评估阶段PHASE_2_DISPATCH_PLAN 调度计划阶段PHASE_3_WORKER_EXECUTION 工作器执行阶段PHASE_4_VERIFY 验证阶段PHASE_5_WRITE_ENV_STATE 写入环境状态阶段PHASE_6_SELF_CHECK 自检阶段
终止阶段:
DONE 已完成PAUSED 已暂停
Phase Map
阶段详情
Phase 1: Assess
阶段1:评估
Collect one environment snapshot:
- agent availability and versions
- MCP registration/connection state
- hook state
- config sync state
- instruction file state
- disabled flags from if present
.hex-skills/environment_state.json
Checkpoint payload:
assess_summary
采集一份环境快照,包含以下内容:
- Agent可用性与版本
- MCP注册/连接状态
- hook状态
- 配置同步状态
- 指令文件状态
- 若存在,读取其中的禁用标记
.hex-skills/environment_state.json
检查点负载:
assess_summary 评估摘要
Phase 2: Dispatch Plan
阶段2:调度计划
Build selective dispatch plan. Only invoke workers that have work.
Workers:
ln-011-agent-installerln-012-mcp-configuratorln-013-config-syncerln-014-agent-instructions-manager
Checkpoint payload:
dispatch_plan
构建定向调度计划,仅调用有任务需要执行的工作器。
工作器列表:
ln-011-agent-installerln-012-mcp-configuratorln-013-config-syncerln-014-agent-instructions-manager
检查点负载:
dispatch_plan 调度计划
Phase 3: Worker Execution
阶段3:工作器执行
Invoke only selected workers. Do not re-probe the whole environment between worker calls.
Each worker:
- remains standalone-capable
- may receive
summaryArtifactPath - must return the same structured summary even without artifact writing
Expected summary kinds:
env-agent-installenv-mcp-configenv-config-syncenv-instructions
Record summaries with runtime .
record-worker仅调用选中的工作器,工作器调用间隔无需重新探测全量环境。
每个工作器:
- 保持独立运行能力
- 可接收参数
summaryArtifactPath - 即使不写入产物,也必须返回相同结构的摘要
预期摘要类型:
env-agent-installenv-mcp-configenv-config-syncenv-instructions
通过运行时接口记录摘要。
record-workerPhase 4: Verify
阶段4:验证
Run targeted verification against the post-worker state:
- health checks
- hook status
- sync status
- instruction file quality
- runtime dependency status (ripgrep, optional language servers)
Checkpoint payload:
verification_summary
针对工作器执行后的状态执行定向验证:
- 健康检查
- hook状态
- 同步状态
- 指令文件质量
- 运行时依赖状态(ripgrep、可选的语言服务器)
检查点负载:
verification_summary 验证摘要
Phase 5: Write Environment State
阶段5:写入环境状态
Write final durable state to:
.hex-skills/environment_state.json
Rules:
- runtime state is not environment state
- workers never write
.hex-skills/environment_state.json - validate output against shared schema before persisting
Checkpoint payload:
env_state_writtenfinal_result
将最终持久化状态写入以下路径:
.hex-skills/environment_state.json
规则:
- 运行时状态不属于环境状态
- 工作器永远不得写入
.hex-skills/environment_state.json - 持久化前需对照共享Schema验证输出内容
检查点负载:
env_state_written 环境状态已写入final_result 最终结果
Phase 6: Self-Check
阶段6:自检
Confirm:
- every required phase checkpoint exists
- dispatched worker summaries were recorded
- final state file was written unless
dry_run
Checkpoint payload:
passfinal_result
确认以下内容:
- 所有必填阶段的检查点均存在
- 调度的工作器摘要均已记录
- 若非模式,最终状态文件已写入
dry_run
检查点负载:
pass 检查通过final_result 最终结果
Output Policy
输出规则
Runtime artifacts:
.hex-skills/runtime-artifacts/runs/{run_id}/{summary_kind}/{identifier}.json
Durable environment output:
.hex-skills/environment_state.json
Do not mix these layers.
运行时产物路径:
.hex-skills/runtime-artifacts/runs/{run_id}/{summary_kind}/{identifier}.json
持久化环境输出路径:
.hex-skills/environment_state.json
请勿混合这两层输出。
Worker Invocation (MANDATORY)
工作器调用规则(强制要求)
| Phase | Worker | Context |
|---|---|---|
| 3 | | Install or update CLI agents |
| 3 | | Configure MCP servers, hooks, and permissions |
| 3 | | Sync config to Gemini and Codex |
| 3 | | Create and audit instruction files |
text
Skill(skill: "ln-011-agent-installer", args: "{targets} {dry_run}")
Skill(skill: "ln-012-mcp-configurator", args: "{dry_run}")
Skill(skill: "ln-013-config-syncer", args: "{targets} {dry_run}")
Skill(skill: "ln-014-agent-instructions-manager", args: "{dry_run}")| 阶段 | 工作器 | 上下文 |
|---|---|---|
| 3 | | 安装或更新CLI Agent |
| 3 | | 配置MCP服务器、hook与权限 |
| 3 | | 同步配置到Gemini和Codex |
| 3 | | 创建并审计指令文件 |
text
Skill(skill: "ln-011-agent-installer", args: "{targets} {dry_run}")
Skill(skill: "ln-012-mcp-configurator", args: "{dry_run}")
Skill(skill: "ln-013-config-syncer", args: "{targets} {dry_run}")
Skill(skill: "ln-014-agent-instructions-manager", args: "{dry_run}")TodoWrite format (mandatory)
待办写入格式(强制要求)
text
- Phase 1: Assess (pending)
- Phase 2: Build dispatch plan (pending)
- Phase 3: Run selected workers (pending)
- Phase 4: Verify final state (pending)
- Phase 5: Write environment_state.json (pending)
- Phase 6: Self-check (pending)text
- Phase 1: Assess (pending)
- Phase 2: Build dispatch plan (pending)
- Phase 3: Run selected workers (pending)
- Phase 4: Verify final state (pending)
- Phase 5: Write environment_state.json (pending)
- Phase 6: Self-check (pending)Critical Rules
关键规则
- Runtime state is the execution SSOT.
- Do not rely on chat memory for resume or recovery.
- Do not run non-selected workers.
- Do not repeat full-environment discovery after every worker.
- is written only in Phase 5.
.hex-skills/environment_state.json - may end with
dry_runand skip final state write.final_result=DRY_RUN_PLAN
- 运行时状态是执行的唯一真实源(SSOT)
- 不要依赖对话记忆进行任务恢复或续跑
- 不要运行未被选中的工作器
- 不要在每个工作器执行后重复全量环境探测
- 仅可在阶段5写入
.hex-skills/environment_state.json - 模式下最终结果会返回
dry_run,跳过最终状态写入DRY_RUN_PLAN
Definition of Done
完成定义
- Runtime started with identifier-scoped manifest and state
- Assessment snapshot recorded
- Dispatch plan checkpointed
- Worker summaries recorded through machine-readable contract
- Verification summary checkpointed
- validated and written, or explicit
.hex-skills/environment_state.jsonDRY_RUN_PLAN - Self-check passed
- 运行时已使用标识符范围的清单和状态启动
- 评估快照已记录
- 调度计划已存入检查点
- 工作器摘要已通过机器可读协议记录
- 验证摘要已存入检查点
- 已验证并写入,或显式返回
.hex-skills/environment_state.jsonDRY_RUN_PLAN - 自检通过
Meta-Analysis
元分析
MANDATORY READ: Load
shared/references/meta_analysis_protocol.mdSkill type: . Run after all phases complete. Output to chat using the protocol format.
domain-coordinatorVersion: 5.0.0
Last Updated: 2026-03-24
必读: 加载
shared/references/meta_analysis_protocol.md技能类型:。所有阶段完成后运行,按照协议格式输出到对话中。
domain-coordinator版本: 5.0.0
最后更新: 2026-03-24