Преглед изворни кода

docs(skills): enforce lazy reference loading levels

lingfengQAQ пре 4 месеци
родитељ
комит
494f647c2b

+ 25 - 20
.claude/skills/webnovel-init/SKILL.md

@@ -14,26 +14,31 @@ Goal: create a writing-ready project skeleton + creative constraints. No Quick/S
 4. Patch 总纲.md with the collected core info.
 4. Patch 总纲.md with the collected core info.
 5. Verify files.
 5. Verify files.
 
 
-## References (read at specific phases)
-**Before Wave 1**:
-- skills/webnovel-init/references/genre-tropes.md
-
-**After genre selection**:
-- templates/genres/{genre}.md (read for each genre in A+B)
-
-**Before Wave 3 (golden finger)**:
-- templates/golden-finger-templates.md
-
-**Before Wave 4 (world)**:
-- skills/webnovel-init/references/worldbuilding/faction-systems.md
-
-**Before Wave 4 (constraints)**:
-- skills/webnovel-init/references/creativity/creativity-constraints.md
-- skills/webnovel-init/references/creativity/anti-trope-xianxia.md (修仙/玄幻/高武/西幻)
-- skills/webnovel-init/references/creativity/anti-trope-rules-mystery.md (规则/悬疑/灵异)
-
-**Optional (only if user explicitly asks)**:
-- skills/webnovel-init/references/creativity/market-trends-2026.md
+## Reference Loading Levels (strict, lazy)
+
+Apply progressive disclosure:
+- L0: Load nothing extra until task type is confirmed.
+- L1: Load only the minimum file needed for the current wave.
+- L2: Load conditional files only when the user choice requires them.
+- L3: Load optional/time-sensitive files only on explicit user request.
+
+Do not recursively chase references inside a reference file unless blocked.
+
+### L1 (minimum, wave-gated)
+- Before Wave 1: `references/genre-tropes.md`
+
+### L2 (conditional)
+- After genre selection: `templates/genres/{genre}.md` (only for selected genres in A+B)
+- Before Wave 3 (golden finger): `templates/golden-finger-templates.md`
+- Before Wave 4 (world): `references/worldbuilding/faction-systems.md`
+- Before Wave 4 (constraints):
+  - `references/creativity/creativity-constraints.md`
+  - `references/creativity/anti-trope-xianxia.md` (修仙/玄幻/高武/西幻)
+  - `references/creativity/anti-trope-rules-mystery.md` (规则/悬疑/灵异)
+
+### L3 (optional, explicit only)
+- `references/creativity/market-trends-2026.md`
+- If used, explicitly mark it as time-sensitive and verify freshness before relying on it.
 
 
 ## Questioning style
 ## Questioning style
 - Ask in 3–4 conversational waves; avoid rigid templates.
 - Ask in 3–4 conversational waves; avoid rigid templates.

+ 17 - 8
.claude/skills/webnovel-plan/SKILL.md

@@ -11,14 +11,23 @@ Purpose: refine 总纲 into volume + chapter outlines. Do not redesign the globa
 - Must run inside a project containing `.webnovel/state.json`.
 - Must run inside a project containing `.webnovel/state.json`.
 - If missing, ask for the project path and `cd` into it.
 - If missing, ask for the project path and `cd` into it.
 
 
-## References (read at specific phases)
-**Before Step 3 (volume skeleton)**:
-- skills/webnovel-plan/references/strand-weave-pattern.md
-- skills/webnovel-plan/references/cool-points-guide.md
-- .claude/references/genre-profiles.md (load genre-specific standards)
-
-**Before Step 4 (chapter outlines)**:
-- .claude/references/reading-power-taxonomy.md (for hook types and pacing)
+## Reference Loading Levels (strict, lazy)
+
+Use progressive disclosure and load only what current step requires:
+- L0: No references before scope/volume is confirmed.
+- L1: Minimum set for current generation step.
+- L2: Conditional references only if constraints/genre details are needed.
+
+### L1 (step-gated minimum)
+- Before Step 3 (volume skeleton):
+  - `references/strand-weave-pattern.md`
+  - `.claude/references/genre-profiles.md`
+
+### L2 (conditional)
+- Before Step 3, load only if爽点结构需要细化:
+  - `references/cool-points-guide.md`
+- Before Step 4, load only if需要钩子/节奏细分:
+  - `.claude/references/reading-power-taxonomy.md`
 
 
 ## Workflow
 ## Workflow
 1. Load project data.
 1. Load project data.

+ 16 - 0
.claude/skills/webnovel-query/SKILL.md

@@ -29,6 +29,22 @@ Copy and track progress:
 
 
 ---
 ---
 
 
+## Reference Loading Levels (strict, lazy)
+
+- L0: 先识别查询类型,不预加载全部参考。
+- L1: 所有查询仅加载基础数据流规范。
+- L2: 仅按查询类型加载对应专题参考。
+
+### L1 (minimum)
+- `references/system-data-flow.md`
+
+### L2 (conditional by query type)
+- 伏笔查询:`references/advanced/foreshadowing.md`
+- 节奏查询:`../webnovel-plan/references/strand-weave-pattern.md`
+- 标签格式查询:`references/tag-specification.md`
+
+Do not load two or more L2 files unless the user request clearly spans multiple query types.
+
 ## Step 1: 识别查询类型
 ## Step 1: 识别查询类型
 
 
 | 关键词 | 查询类型 | 需加载 |
 | 关键词 | 查询类型 | 需加载 |

+ 12 - 0
.claude/skills/webnovel-resume/SKILL.md

@@ -29,6 +29,18 @@ Copy and track progress:
 
 
 ---
 ---
 
 
+## Reference Loading Levels (strict, lazy)
+
+- L0: 不加载任何参考,直到确认存在中断恢复需求。
+- L1: 只加载恢复协议主文件。
+- L2: 仅在数据一致性检查时加载数据规范。
+
+### L1 (minimum)
+- `references/workflow-resume.md`
+
+### L2 (conditional)
+- `references/system-data-flow.md`(仅在需要核对状态字段/恢复策略时)
+
 ## Step 1: 加载恢复协议(必须执行)
 ## Step 1: 加载恢复协议(必须执行)
 
 
 ```bash
 ```bash

+ 17 - 0
.claude/skills/webnovel-review/SKILL.md

@@ -19,6 +19,23 @@ allowed-tools: Read Grep Write Edit Bash Task AskUserQuestion
 
 
 ## Step 1: 加载参考(按需)
 ## Step 1: 加载参考(按需)
 
 
+## Reference Loading Levels (strict, lazy)
+
+- L0: 先确定审查深度(Core / Full),再加载参考。
+- L1: 每次只加载当前深度的最小文件。
+- L2: 仅在问题定位需要时加载扩展参考。
+
+### L1 (minimum)
+- Core 必读:`references/core-constraints.md`
+
+### L2 (conditional)
+- Full 或节奏/爽点相关问题时加载:
+  - `references/cool-points-guide.md`
+  - `references/strand-weave-pattern.md`
+- 仅在返工建议需要时加载:
+  - `references/common-mistakes.md`
+  - `references/pacing-control.md`
+
 **必读**:
 **必读**:
 ```bash
 ```bash
 cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-review/references/core-constraints.md"
 cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-review/references/core-constraints.md"

+ 19 - 0
.claude/skills/webnovel-write/SKILL.md

@@ -65,6 +65,25 @@ cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-write/references/core-constraints.md"
 
 
 场景写作与风格参考按需加载(见 `references/workflow-details.md`)。
 场景写作与风格参考按需加载(见 `references/workflow-details.md`)。
 
 
+## Reference Loading Levels (strict, lazy)
+
+- L0: 不加载额外参考,直到当前 step 明确。
+- L1: 仅加载本 step 的最小必需文件。
+- L2: 仅在触发条件满足时加载扩展参考。
+
+### L1 (minimum)
+- Step 2 写作前:`references/core-constraints.md`
+- Step 4 润色前:`references/polish-guide.md`
+
+### L2 (conditional)
+- 仅当 Step 1.5 需要风格/体裁细化时加载:
+  - `references/style-variants.md`
+  - `.claude/references/reading-power-taxonomy.md`
+  - `.claude/references/genre-profiles.md`
+- 仅当需要模板细节时加载:
+  - `references/workflow-details.md`
+  - `references/writing/typesetting.md`
+
 ## Step 3: 审查
 ## Step 3: 审查
 
 
 **默认核心4个 Checker**:
 **默认核心4个 Checker**: