群星模组实现方案设计
stellaris-design
为《群星》(Stellaris)模组设计确定性的实现路径。
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 65
- Forks
- 0
01 前言 Front Matter
- name
- stellaris-design
- description
- Design deterministic implementation paths for Stellaris mods.
03 SKILL.md 正文
Objective
Cross-analyze implementation options and give a deterministic implementation path. Compatibility is currency: prefer hooks (on_action) over hacks (overwrites).
Rules
- Every flag and variable key uses the project namespace; fail generation when one is generic (e.g.
set_global_flag = story_started). - Use
@scripted_variablesfor all balance values. - Always include
exists = scopein logic chains.
1. Implementation Matrix
Present 3 distinct paths for the requested feature:
| Path | Strategy | File pattern | Pros | Cons |
|---|---|---|---|---|
| A. The Extension (Green) | Additive | common/ + on_action |
100% Compatible. Survives updates. | Limited triggers. Cannot change base logic. |
| B. The Soft Override (Yellow) | Value Merge | z_[NS]_[VanillaName].txt |
Merges keys via load order. Good for tweaking defines. | Load Order Wars. Hard to debug "Double Entry" bugs. |
| C. The Nuclear Option (Red) | Hard Overwrite | Same filename as Vanilla | Total Control. Replaces core logic. | Incompatible. Requires manual merge every patch. |
Default to path A. Use path B only for defines, map_modes, or name_lists, and path C only for total conversions or modifying hardcoded AI logic.
2. Technical Specification
For the selected path, define the engineering constraints:
- Scope chain: ROOT is the origin (e.g. country, pop); FROM is the target (e.g. planet, system); filter with
limit = { is_ai = no }as a performance guard. - Persistence: flags as
set_country_flag = [NS]_flag_name, variables asset_variable = { which = [NS]_var value = 1 }. - Performance budget: reject anything running on
on_daily_pulse; reject anything usingany_poporevery_ship, or move it toon_yearly_pulse; useon_tech_researchedinstead of a monthly check where possible.
Output
An ADR in docs/design/[feature].md (or a chat snippet):
## ADR: [Feature Name]
> Path: [A/B/C] | Namespace: [NS]
### 1. Logic Flow (Pseudocode)
TRIGGER: `on_entering_system`
LIMIT: `exists = owner` AND `owner = { is_ai = no }`
EFFECT:
Scope to System
If `has_star_flag = [NS]_visited`: STOP
Else: Fire Event `[NS].100`
### 2. File Manifest
- `src/common/scripted_effects/[NS]_effects.txt`
- `src/events/[NS]_exploration_events.txt`
### 3. Data Schema
- Flag: `[NS]_system_visited` (Prevent spam)
- Variable: `@[NS]_spawn_chance = 50` (Scripted Variable)
04 同仓库更多 Skills
工作流运行时验证
workflow-runtime
在将 CLI、扩展、提供程序或模型分配给工作流角色之前,先验证技能或工作流的发现能力、完全自主的工具执行能力,以及任务形态的具体化。
工作流成果审查
workflow-reviewer
依据 BOSS 规格说明和证据,审查批量实现的输出。
工作流故障修复
workflow-rescue
通过一次果断的行动解决反复出现的工作流失败。
多智能体工作流编排
workflow-orchestrator
运行风险自适应的开发、评审、多智能体和发布工作流,具备运行时预检、有限重试、存活检查、写入隔离以及有证据支撑的交接能力。
工作流失败仲裁
workflow-judger
仲裁反复出现的任务失败,并决定是合并、返工还是升级处理。
工作流状态验证
workflow-doctor
在任何角色对活动工作流状态执行操作之前,先对其进行验证。