@chrono-meta/fh-gate 1.0.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.claude/agents/challenger.md +169 -0
  2. package/AGENTS.md +160 -0
  3. package/CATALOG.md +256 -0
  4. package/CHEATSHEET.md +367 -0
  5. package/CLAUDE.md +331 -0
  6. package/CONTRIBUTING.md +198 -0
  7. package/LICENSE +21 -0
  8. package/README.md +131 -418
  9. package/bin/fh-goal.js +9 -0
  10. package/bin/fh-run.js +9 -0
  11. package/docs/banner.png +0 -0
  12. package/docs/codex-compat.md +123 -0
  13. package/docs/pillars.svg +70 -0
  14. package/knowledge/shared/harness-core/fh_integration_contract.md +48 -29
  15. package/package.json +31 -6
  16. package/plugins/fh-commons/README.md +37 -0
  17. package/plugins/fh-commons/agents/quench-challenger.md +373 -0
  18. package/plugins/fh-commons/skills/convergence-loop/SKILL.md +155 -0
  19. package/plugins/fh-commons/skills/deliberation/SKILL.md +288 -0
  20. package/plugins/fh-commons/skills/mcp-circuit-breaker/SKILL.md +196 -0
  21. package/plugins/fh-commons/skills/token-budget-gate/SKILL.md +175 -0
  22. package/plugins/fh-meta/agents/fact-checker.md +121 -0
  23. package/plugins/fh-meta/agents/hub-persona-auditor.md +109 -0
  24. package/plugins/fh-meta/agents/persona-innovator.md +195 -0
  25. package/plugins/fh-meta/skills/agent-composer/SKILL.md +461 -0
  26. package/plugins/fh-meta/skills/agent-composer/SKILL_detail.md +464 -0
  27. package/plugins/fh-meta/skills/apex-review/SKILL.md +185 -0
  28. package/plugins/fh-meta/skills/asset-placement-gate/SKILL.md +135 -0
  29. package/plugins/fh-meta/skills/contention-layer/SKILL.md +127 -0
  30. package/plugins/fh-meta/skills/context-bridge-dispatch/SKILL.md +30 -0
  31. package/plugins/fh-meta/skills/context-bridge-dispatch/SKILL_detail.md +144 -0
  32. package/plugins/fh-meta/skills/context-doctor/SKILL.md +341 -0
  33. package/plugins/fh-meta/skills/cross-ecosystem-synergy-detection/SKILL.md +202 -0
  34. package/plugins/fh-meta/skills/deep-clarify/SKILL.md +144 -0
  35. package/plugins/fh-meta/skills/edit-manifest/SKILL.md +210 -0
  36. package/plugins/fh-meta/skills/field-harvest/SKILL.md +384 -0
  37. package/plugins/fh-meta/skills/frontier-digest/SKILL.md +272 -0
  38. package/plugins/fh-meta/skills/goal-quench/SKILL.md +509 -0
  39. package/plugins/fh-meta/skills/harness-doctor/SKILL.md +277 -0
  40. package/plugins/fh-meta/skills/harness-doctor/SKILL_detail.md +484 -0
  41. package/plugins/fh-meta/skills/harvest-loop/SKILL.md +231 -0
  42. package/plugins/fh-meta/skills/harvest-loop/SKILL_detail.md +201 -0
  43. package/plugins/fh-meta/skills/hub-cc-pr-reviewer/SKILL.md +129 -0
  44. package/plugins/fh-meta/skills/hub-cc-pr-reviewer/SKILL_detail.md +158 -0
  45. package/plugins/fh-meta/skills/install-doctor/SKILL.md +207 -0
  46. package/plugins/fh-meta/skills/install-wizard/SKILL.md +613 -0
  47. package/plugins/fh-meta/skills/marketplace-gate/SKILL.md +193 -0
  48. package/plugins/fh-meta/skills/memory-hygiene/SKILL.md +143 -0
  49. package/plugins/fh-meta/skills/meta-prompt-builder/SKILL.md +167 -0
  50. package/plugins/fh-meta/skills/meta-prompt-builder/SKILL_detail.md +37 -0
  51. package/plugins/fh-meta/skills/pipeline-conductor/SKILL.md +430 -0
  52. package/plugins/fh-meta/skills/plugin-recommender/SKILL.md +221 -0
  53. package/plugins/fh-meta/skills/plugin-recommender/SKILL_detail.md +220 -0
  54. package/plugins/fh-meta/skills/prompt-regression/SKILL.md +178 -0
  55. package/plugins/fh-meta/skills/public-surface-audit/SKILL.md +224 -0
  56. package/plugins/fh-meta/skills/return-path-gate/SKILL.md +257 -0
  57. package/plugins/fh-meta/skills/self-marketing-lint/SKILL.md +129 -0
  58. package/plugins/fh-meta/skills/sim-conductor/SKILL.md +364 -0
  59. package/plugins/fh-meta/skills/sim-conductor/SKILL_detail.md +337 -0
  60. package/plugins/fh-meta/skills/skill-splitter/SKILL.md +126 -0
  61. package/plugins/fh-meta/skills/skill-splitter/SKILL_detail.md +185 -0
  62. package/plugins/fh-meta/skills/source-grounding-audit/SKILL.md +230 -0
  63. package/plugins/fh-meta/skills/source-grounding-audit/SKILL_detail.md +182 -0
  64. package/plugins/fh-meta/skills/steel-quench/SKILL.md +226 -0
  65. package/plugins/fh-meta/skills/steel-quench/SKILL_detail.md +453 -0
  66. package/plugins/fh-meta/skills/verify-bidirectional/SKILL.md +238 -0
  67. package/scripts/fh-gate.sh +175 -40
  68. package/scripts/fh-goal.sh +182 -0
  69. package/scripts/fh-run.sh +269 -0
@@ -0,0 +1,337 @@
1
+ ---
2
+ name: sim-conductor-detail
3
+ description: Detail reference for sim-conductor — bash scripts, multi-team panel, Area B baseline methods, D-consumer execution, Area E execution, report template, PR bash, Path B. Load when executing a specific step.
4
+ load: on-demand
5
+ ---
6
+
7
+ # sim-conductor — Detail Reference
8
+
9
+ > Load when executing a specific step. SKILL.md contains triggers, target profile analysis, precondition table, area summaries with persona routing, human gate, and Done When.
10
+
11
+ ---
12
+
13
+ ## §Step0-Bash — Environment Sync Scripts
14
+
15
+ ```bash
16
+ HARNESS_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
17
+ SIM_CLONE=~/sim/your-hub-sim/forge-harness-via-clone
18
+ [ -d "$SIM_CLONE" ] && (cd "$SIM_CLONE" && git pull origin main) || SIM_CLONE="$HARNESS_ROOT"
19
+
20
+ # Report storage path
21
+ REPORT_DIR=$(find "$(dirname "$HARNESS_ROOT")" -maxdepth 2 -name "tracks" -type d 2>/dev/null | head -1)
22
+ REPORT_DIR="${REPORT_DIR:-$HARNESS_ROOT/tracks}/_meta"
23
+ mkdir -p "$REPORT_DIR"
24
+ ```
25
+
26
+ **Area B frequency check bash**:
27
+ ```bash
28
+ ls "$REPORT_DIR"/sim_*_area_B*.md 2>/dev/null | sort | tail -1
29
+ # If date within 7 days → output warning + stop
30
+ ```
31
+
32
+ ---
33
+
34
+ ## §PersonaDiscovery — Plugin-Recommender Integration
35
+
36
+ ### Query format for plugin-recommender
37
+
38
+ When a GAP is detected for a high-weight perspective:
39
+
40
+ ```
41
+ /plugin-recommender query:
42
+ context: "sim-conductor persona gap"
43
+ needed_perspective: [perspective name, e.g. "security-auditor"]
44
+ artifact_type: [from profile, e.g. "Python auth code"]
45
+ audience: [from profile]
46
+ constraints: "must work as Agent sub-agent dispatch (no interactive CLI)"
47
+ ```
48
+
49
+ plugin-recommender returns: ranked candidates with name · source (FH native / marketplace / external) · install command · token cost estimate · fit rationale.
50
+
51
+ ### Gap resolution decision tree
52
+
53
+ ```
54
+ GAP detected for [perspective X]:
55
+ Is it high-weight (profile score ≥ 0.7)?
56
+ YES → present plugin-recommender result → user: install / skip / substitute
57
+ install: run install cmd → register → continue Step 0.3
58
+ skip: auto-fill with ② built-in fallback, flag as "degraded coverage"
59
+ substitute: user names alternative agent → use it
60
+ NO → auto-fill with ② built-in fallback, no prompt
61
+ ```
62
+
63
+ ### Persona map by artifact type (typical optimal)
64
+
65
+ | Artifact type | Optimal personas | Likely GAP (not in FH native) |
66
+ |---|---|---|
67
+ | SKILL.md / governance doc | challenger · newcomer · governance-expert | governance-expert → query plugin-recommender |
68
+ | README / marketing copy | newcomer · devil-advocate · domain-expert | domain-expert (field-specific) → query |
69
+ | Python / JS code | challenger/Code · power-user · security-auditor | security-auditor → query if auth/data |
70
+ | Auth / security-sensitive code | security-auditor · challenger/Code · power-user | security-auditor → block if GAP (high-weight) |
71
+ | Design doc + citations | challenger · domain-expert · skeptic | domain-expert (field-specific) → query |
72
+
73
+ ### Degraded coverage flag
74
+
75
+ When any high-weight persona is substituted with built-in fallback (user chose "skip"):
76
+ ```
77
+ ⚠️ Degraded coverage: [perspective X] substituted with built-in [fallback name].
78
+ Risk: [what this perspective would have caught that built-in may miss].
79
+ Recommendation: install [plugin name] before external publish.
80
+ ```
81
+
82
+ Degraded coverage persists in Step 3 report under "Persona composition used."
83
+
84
+ ---
85
+
86
+ ## §Profile-Examples — Target Profile Worked Examples
87
+
88
+ ### Example 1: SKILL.md (governance doc)
89
+
90
+ ```
91
+ Target Profile:
92
+ artifact_type: SKILL.md (governance doc)
93
+ audience: mixed (internal FH users + potential external installers)
94
+ claim_density: medium (2 stated benefits, 1 "autonomous" claim)
95
+ risk_level: medium (not yet externally published)
96
+
97
+ Recommendation:
98
+ Areas: B (internal meta audit) + D-skill (cold-start validation)
99
+ Persona composition: challenger (high — claim verification), newcomer (medium — onboarding), governance-expert (medium)
100
+ Scale: Minimum (3)
101
+ Prerequisites: none (not yet external publish)
102
+ ```
103
+
104
+ ### Example 2: README (pre-publish)
105
+
106
+ ```
107
+ Target Profile:
108
+ artifact_type: README (external entry point)
109
+ audience: external installer (first-time user)
110
+ claim_density: high (5+ capability claims, "automatic", "zero config")
111
+ risk_level: high (marketplace / external publish imminent)
112
+
113
+ Recommendation:
114
+ Areas: A (external user perspective — primary) + C (naming gap scan)
115
+ Persona composition: newcomer (high), devil-advocate (high — claim density), power-user (medium)
116
+ Scale: Extended (4–5)
117
+ Prerequisites: steel-quench REQUIRED before Area A proceeds
118
+ ```
119
+
120
+ ### Example 3: Bash script / Python code
121
+
122
+ ```
123
+ Target Profile:
124
+ artifact_type: bash script (50 lines, 3 external commands)
125
+ audience: internal developer
126
+ claim_density: low (technical spec only)
127
+ risk_level: low (pre-PR, internal)
128
+
129
+ Recommendation:
130
+ Areas: D-code (primary)
131
+ Persona composition: challenger/Code (edge cases, security surface), power-user (performance)
132
+ Scale: Minimum (2 — third persona adds minimal value for bash)
133
+ Prerequisites: none
134
+ ```
135
+
136
+ ### Example 4: Design doc with arXiv citations
137
+
138
+ ```
139
+ Target Profile:
140
+ artifact_type: design doc (contains arXiv references + code blocks)
141
+ audience: internal team
142
+ claim_density: high (3 arXiv claims, 2 quantitative benchmarks cited)
143
+ risk_level: medium
144
+ novelty: high (references recent paper)
145
+
146
+ Recommendation:
147
+ Areas: D-code + source-grounding-audit (quantitative claims)
148
+ Persona composition: challenger (claim-evidence), domain-expert (arXiv validity)
149
+ Scale: Minimum (3)
150
+ Prerequisites: source-grounding-audit recommended (novelty + citations)
151
+ ```
152
+
153
+ ---
154
+
155
+ ## §MultiTeam — Multi-Team Panel Execution
156
+
157
+ ### Pre-entry confirmation dialog
158
+
159
+ ```
160
+ Area A — Multi-Team Mode available.
161
+ Detected external CLIs: [list or "none"]
162
+ Estimated additional token cost: ~2K–5K per external team (billed to that CLI's quota).
163
+ Run multi-team? (a) Full panel (b) Claude sub-agents only (c) Skip to Area B
164
+ ```
165
+
166
+ ### Team → Persona mapping
167
+
168
+ | Team | CLI | Personas | Dispatch method |
169
+ |---|---|---|---|
170
+ | T0 Claude | Agent sub-agent | hub-persona-auditor · challenger · domain-expert | Agent() call |
171
+ | T1 Gemini | `gemini` pipe | newcomer · power-user · devil | `echo PROMPT \| gemini` |
172
+ | T2 Copilot | `gh copilot suggest` | devil · domain-expert | `gh copilot suggest -t shell` |
173
+ | T3 Ollama | `ollama run` | devil | `ollama run llama3 PROMPT` |
174
+ | T4 Codex | `npx @openai/codex exec` | devil · edge-case-hunter | `echo PROMPT \| npx @openai/codex exec -m gpt-5 -` |
175
+
176
+ ### CLI detection bash
177
+
178
+ ```bash
179
+ # Detect available external CLIs
180
+ AVAILABLE_CLIS=""
181
+ command -v gemini &>/dev/null && AVAILABLE_CLIS="$AVAILABLE_CLIS gemini"
182
+ command -v gh &>/dev/null && gh copilot --version &>/dev/null && AVAILABLE_CLIS="$AVAILABLE_CLIS copilot"
183
+ command -v ollama &>/dev/null && AVAILABLE_CLIS="$AVAILABLE_CLIS ollama"
184
+ command -v npx &>/dev/null && npx @openai/codex --version &>/dev/null 2>&1 && AVAILABLE_CLIS="$AVAILABLE_CLIS codex"
185
+ echo "Available: ${AVAILABLE_CLIS:-none}"
186
+ ```
187
+
188
+ ### Cross-team synthesis format
189
+
190
+ ```
191
+ Cross-Team Synthesis:
192
+ | Issue | Teams | Grade |
193
+ |---|---|---|
194
+ | [issue description] | [T0+T1 / T1+T2 / etc.] | S-confirmed / A-confirmed |
195
+
196
+ Claude blind spots (external-only findings):
197
+ - [T1 found X, T0 missed → Claude blind spot: ...]
198
+ ```
199
+
200
+ **Path B fallback**: No external CLIs → cross-session `claude --print` as T0 cold-read variant.
201
+
202
+ ---
203
+
204
+ ## §AreaB-Baseline — External Baseline Injection Methods
205
+
206
+ Structural methods to reduce self-reference risk in Area B:
207
+
208
+ 1. **Regular devil attacks**: Area B once/month + devil attack (challenger) once/quarter. Route devil → defense results directly into SKILL.md via steel-quench handoff after Area B ends.
209
+ 2. **Direct external user validation**: Non-owner attempts install + invocation → collect reactions. (cascade β validated: first autonomous external run confirmed.)
210
+ 3. **steel-quench integration**: After Area B ends, hand off challenger findings to `/steel-quench` for deeper adversarial review + SKILL.md inscription.
211
+ 4. **Dual validation principle**: Internal validation (Area B) alone is insufficient — minimized only when combined with external install reaction collection or cross-model validation.
212
+
213
+ **Dispatch template for Area B parallel**:
214
+ ```
215
+ Agent A (hub-persona-auditor): target=[files], task="3+ persona simulation, 4-axis review, 3-tier suggestions"
216
+ Agent B (persona-innovator, Mode I): target=[files], task="naming gaps + structural gaps + 3-5 candidates"
217
+ → both complete →
218
+ Agent C (challenger, artifact_type="SKILL"): input=[A output + B output], task="what was missed? angles U2, D3, U5"
219
+ ```
220
+
221
+ ---
222
+
223
+ ## §AreaD-Consumer — D-consumer Execution Detail
224
+
225
+ ### D-session — Session Card Cold-Start
226
+
227
+ Auto-detect target (when `--target` not specified):
228
+ MEMORY.md → check `reference_next_session_starter.md` → if absent: search latest session-starter in `tracks/_meta/` or `memory/`.
229
+
230
+ Provide only that file to consumer agent (no context). Ask:
231
+ 1. The most important thing to do today
232
+ 2. Current work-in-progress status
233
+ 3. Events/deadlines that must not be missed
234
+ 4. Parts that are unclear or lack context
235
+
236
+ **Verdict**: Top priority matches + context reconstructable → F / Context reconstructed but gaps → P / Wrong top priority or key item missing → B.
237
+ B/P items: fix directly in session card + commit.
238
+
239
+ ### D-skill — Skill Trigger Utterance Consumer Simulation
240
+
241
+ Provide only one SKILL.md to consumer agent (no context, no SKILL_detail.md).
242
+ Assume first trigger sentence from Trigger Phrases was input → attempt to complete from Step 1.
243
+ Record: where it stalled, why, whether core task completes, what needs fixing.
244
+
245
+ **Verdict**: Core task completes → F / Partial completion (stalled mid-step) → P / Blocked at Step 1 → B.
246
+
247
+ ### D-memory — Memory File Cold-Start Validation
248
+
249
+ Provide only one memory file to consumer agent. Check:
250
+ ① When should this be applied?
251
+ ② Can current validity be determined from this file alone?
252
+ ③ Can the behavior guideline be executed from this file alone?
253
+ ④ Any stale or contradictory information?
254
+
255
+ **Verdict**: ③ executable + ④ none → F / Some unclear parts → P / Stale/contradiction found → B.
256
+
257
+ ---
258
+
259
+ ## §AreaE-Detail — Area E Execution
260
+
261
+ ### E-1 — Domain Expert Objection
262
+
263
+ Agent (subagent_type="challenger", artifact_type="Design"): false positive patterns (clearly wrong judgments) + false negative patterns (should-have-caught-but-didn't). Angles: U3 (evidence grounding), D4 (failure mode coverage).
264
+
265
+ Findings format: `[judgment type · pattern · root cause · fix direction]`
266
+
267
+ ### E-2 — Practitioner Confusion
268
+
269
+ Agent (Newcomer brief): confusing items, fix suggestions more awkward than original, classification criteria consistency breaks.
270
+
271
+ Findings format: `[item · confusion cause · improvement direction]`
272
+
273
+ ### E-3 — Pattern Structuring (direct execution)
274
+
275
+ Integrate E-1/E-2 → group false positives by root cause → assign pattern name → pinpoint fix location → M/S/R classification → fix target code/prompt → commit.
276
+
277
+ ---
278
+
279
+ ## §Report-Format — Report Template
280
+
281
+ ```markdown
282
+ ---
283
+ name: [date] sim-conductor — Area [X]
284
+ type: simulation-report
285
+ date: YYYY-MM-DD
286
+ areas: [A|B|C|D|E|all]
287
+ target_profile: [artifact_type | audience | risk_level]
288
+ m_count: N
289
+ s_count: N
290
+ r_count: N
291
+ ---
292
+
293
+ ## Target Profile
294
+ artifact_type: [type] · audience: [internal|external|mixed] · risk_level: [low|medium|high]
295
+
296
+ ## M-tier ([N] items)
297
+ | # | Issue | Location | Prescription |
298
+ ...
299
+
300
+ ## S-tier ([N] items)
301
+ | # | Issue | Location | Priority |
302
+ ...
303
+
304
+ ## R-tier ([N] items)
305
+ ...
306
+
307
+ ## Emerging asset candidates
308
+ ...
309
+
310
+ ## Persona composition used
311
+ [list of personas used + which were task-derived vs built-in]
312
+ ```
313
+
314
+ ---
315
+
316
+ ## §PR-Bash — PR Creation Scripts
317
+
318
+ ```bash
319
+ cd "$HARNESS_ROOT"
320
+ BRANCH="fix/sim-$(date +%Y%m%d)-m-tier"
321
+ git checkout -b "$BRANCH"
322
+ # [process M-tier items]
323
+ git add -p
324
+ git commit -m "fix(sim-conductor): resolve M-tier findings from simulation YYYY-MM-DD"
325
+ git push -u origin "$BRANCH"
326
+ # PR creation requires explicit user request per CLAUDE.md PR principle
327
+ ```
328
+
329
+ ---
330
+
331
+ ## §PathB-Detail — External Environment Fallback
332
+
333
+ When `~/sim/` is absent:
334
+ - Step 0: `SIM_CLONE="$HARNESS_ROOT"` (skip git clone)
335
+ - Logical isolation only: inject "Treat the following as if you have no prior development context" into each Agent prompt
336
+ - **Area B only recommended**: Area A/C technically executable but physical isolation not guaranteed (direct path references). Logical isolation via prompt directive is the only available control.
337
+ - Area D/E: fully functional (target-file-based, no sim clone needed)
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: skill-splitter
3
+ description: Splits an over-loaded SKILL.md into always-loaded (SKILL.md) + on-demand (SKILL_detail.md) layers using a governance-semantic criterion — not length, but when the content is needed. Connects the two files with imperative pointers. Based on paper §9.5 Protocol-Priority Split pattern. Diagnoses, classifies, splits, and verifies in one pass.
4
+ user-invocable: true
5
+ allowed-tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"]
6
+ model: sonnet
7
+ ---
8
+
9
+ # skill-splitter — SKILL.md Governance-Semantic Split
10
+
11
+ > A SKILL.md that does everything in one file is not simple — it is unscoped.
12
+ > The goal is two files each smaller than the original, not one file and its appendix.
13
+
14
+ ## Trigger Phrases
15
+
16
+ | Phrase | Situation |
17
+ |---|---|
18
+ | "this skill is getting too long", "trim the skill", "split this SKILL.md" | Direct split request |
19
+ | "context-doctor flagged this skill", "SKILL.md is bloated" | Post-diagnosis split |
20
+ | "I can't see the key parts", "too much detail in the skill file" | Readability problem |
21
+ | "separate the bash from the logic", "move the templates out" | Structural refactor request |
22
+ | `/skill-splitter` | Explicit invocation |
23
+
24
+ ---
25
+
26
+ ## Core Principle — Governance-Semantic Criterion
27
+
28
+ **The split criterion is NOT length. It is: when does this content need to be in memory?**
29
+
30
+ | Layer | When needed | Examples |
31
+ |---|---|---|
32
+ | **SKILL.md (always-loaded)** | Every invocation — session boundaries, trigger recognition, step overview, decision tables | Triggers, principles, step names + criteria, key decision tables, Done When |
33
+ | **SKILL_detail.md (on-demand)** | Only when executing a specific step | Bash scripts, format templates, edge cases, step-by-step execution detail |
34
+
35
+ **Behavioral rules stay in SKILL.md** — if a rule governs *what counts* (e.g. "these patterns = closed"), it is behavioral logic and must be always-loaded regardless of length.
36
+
37
+ **One test**: *"If a consumer agent had only SKILL.md, could they recognize the trigger, understand the full step sequence, and make the key decisions?"* → Yes = correct split. No = something behavioral is missing from SKILL.md.
38
+
39
+ ---
40
+
41
+ ## Step Overview
42
+
43
+ ```
44
+ Step 1 — Diagnose
45
+ Read target SKILL.md → classify every section as Always / On-demand / Ambiguous
46
+ → Produce classification table
47
+
48
+ Step 2 — Draft SKILL.md (trimmed)
49
+ Keep: triggers · principles · step names + one-line criteria · decision tables · Done When
50
+ Remove: bash scripts · format templates · multi-step execution detail · edge case catalogs
51
+ Add: imperative pointer for each removed section → SKILL_detail.md §SectionName
52
+
53
+ Step 3 — Draft SKILL_detail.md
54
+ One ## §SectionName header per pointer in SKILL.md
55
+ Move removed content under its section
56
+ Front-matter: name, description, load: on-demand
57
+
58
+ Step 4 — Verify
59
+ source-grounding-audit: every §pointer in SKILL.md resolves to ## §SectionName in SKILL_detail.md
60
+ sim-conductor Area D-skill: consumer agent with SKILL.md only → must reach grade F
61
+ → Any pointer mismatch or grade P/B → fix before commit
62
+ ```
63
+
64
+ > **Detail**: See `SKILL_detail.md §Verification-Checklist` — pre-commit checklist table (8 checks) — read when running Step 4 verification.
65
+
66
+ > **Detail**: See `SKILL_detail.md §Split-Execution` — step-by-step trimming procedure, SKILL_detail.md front-matter format, orphan §section check — read when executing Steps 2–3.
67
+
68
+ > **Detail**: See `SKILL_detail.md §Classification` — ambiguous content decision algorithm, behavioral-vs-implementation test, 12 annotated examples — read when unsure which layer a section belongs to.
69
+
70
+ ---
71
+
72
+ ## Imperative Pointer Format (required)
73
+
74
+ Pointers must be **imperative** (not advisory). The difference:
75
+
76
+ | Form | Risk |
77
+ |---|---|
78
+ | Advisory: `"see SKILL_detail.md for details"` | Consumer agent may skip |
79
+ | **Imperative**: `"> **Detail**: See \`SKILL_detail.md §SectionName\` — [what's there] — read when [specific condition]."` | Consumer agent loads on trigger |
80
+
81
+ Every removed section must have exactly one imperative pointer at the point of removal in SKILL.md.
82
+
83
+ > **Detail**: See `SKILL_detail.md §Pointers` — pointer format variants, multi-pointer blocks, pointer placement rules — read when writing pointers.
84
+
85
+ ---
86
+
87
+ ## Target Selection
88
+
89
+ Run on a SKILL.md when **any one** of:
90
+ - context-doctor flags the file as oversized
91
+ - SKILL.md exceeds ~300 lines
92
+ - sim-conductor Area D-skill grades P or B (cold-start fails)
93
+ - Consumer agent reports "could not proceed — too much detail before step 1"
94
+
95
+ **Not a target**: SKILL.md that has no bash scripts, format templates, or multi-step execution detail. Splitting a file with only behavioral content adds structure without governance value.
96
+
97
+ ---
98
+
99
+ ## Connected Skills
100
+
101
+ | Situation | Skill |
102
+ |---|---|
103
+ | Diagnose which SKILL.md files are candidates | `/context-doctor` or `/harness-doctor` |
104
+ | Verify §pointer grounding after split | `/source-grounding-audit` |
105
+ | Verify cold-start still works after split | `/sim-conductor D skill <name>` |
106
+ | Check new SKILL_detail.md for phantom claims | `/source-grounding-audit` |
107
+ | Adversarial review of the split result | `/steel-quench` |
108
+
109
+ ---
110
+
111
+ ## Done When
112
+
113
+ ```
114
+ Step 1 classification table produced
115
+ + SKILL.md trimmed: triggers · principles · step overview · decision tables · Done When retained
116
+ + SKILL.md has imperative pointer for every removed section (> **Detail**: See SKILL_detail.md §X)
117
+ + SKILL_detail.md created: ## §SectionName header for every pointer in SKILL.md
118
+ + source-grounding-audit: 0 phantoms (all §pointers resolve)
119
+ → Fallback (skill unavailable): run §Verification-Checklist manually from SKILL_detail.md
120
+ + sim-conductor Area D-skill: grade F (consumer completes core task from SKILL.md alone)
121
+ → Fallback (skill unavailable): manually confirm "trigger → step overview → key decision → Done When" all present in SKILL.md
122
+ ```
123
+
124
+ **Not done**: SKILL_detail.md has a §section with no pointer from SKILL.md (orphan section).
125
+ **Not done**: Consumer agent grade P/B after split — a behavioral rule was moved to SKILL_detail.md when it should have stayed.
126
+ **Not done**: Any behavioral rule present only in SKILL_detail.md.
@@ -0,0 +1,185 @@
1
+ ---
2
+ name: skill-splitter-detail
3
+ description: Detail reference for skill-splitter — content classification algorithm, pointer format variants, verification checklist. Load when executing a specific step.
4
+ load: on-demand
5
+ ---
6
+
7
+ # skill-splitter — Detail Reference
8
+
9
+ > Load when executing a specific step. SKILL.md contains the core principle, step overview, pointer format requirement, and Done When.
10
+
11
+ ---
12
+
13
+ ## §Classification — Content Classification Algorithm
14
+
15
+ ### Decision algorithm (per section)
16
+
17
+ ```
18
+ For each section in target SKILL.md:
19
+
20
+ 1. Is this content needed to RECOGNIZE the trigger or understand WHAT the skill does?
21
+ → YES → Always-loaded (keep in SKILL.md)
22
+
23
+ 2. Is this content a BEHAVIORAL RULE (governs what counts as X, what is allowed, what is forbidden)?
24
+ → YES → Always-loaded (keep in SKILL.md, regardless of length)
25
+ → "what counts as closed", "auto-allowed vs prohibited", "never touch" rules are behavioral
26
+
27
+ 3. Is this content needed only when EXECUTING a specific step?
28
+ → YES → On-demand (move to SKILL_detail.md)
29
+
30
+ 4. Is this a DECISION TABLE (compact lookup, not step-by-step procedure)?
31
+ → YES → Always-loaded (tables are high information density, keep)
32
+ → Exception: table > 20 rows → candidate for SKILL_detail.md
33
+
34
+ 5. Is this BASH CODE or a FORMAT TEMPLATE?
35
+ → YES → On-demand (move to SKILL_detail.md)
36
+ → Exception: one-liner illustration (≤1 line) used to identify a concept → may stay in SKILL.md
37
+ ```
38
+
39
+ ### 12 annotated examples
40
+
41
+ | Content type | Layer | Reason |
42
+ |---|---|---|
43
+ | Trigger phrases table | Always | Needed to recognize invocation |
44
+ | Step names + one-line criteria | Always | Overview — consumer needs to see the full sequence |
45
+ | Collision type routing table (3 rows) | Always | Decision table, compact |
46
+ | "natural-language close" patterns | Always | Behavioral rule — governs what counts as closed |
47
+ | "Memory curator safety: only INDEX-ORPHAN auto-allowed" | Always | Behavioral rule — prohibition |
48
+ | Multi-step synthesizer verdict matrix (5 rows) | Always | Decision table |
49
+ | Bash script for STALE detection | On-demand | Execution detail, step-specific |
50
+ | Agent() call format with prompt template | On-demand | Execution detail |
51
+ | 20-row edge case catalog | On-demand | Reference, not needed every invocation |
52
+ | Output format template (12 fields) | On-demand | Execution detail |
53
+ | "Done When" block | Always | Completion criterion — always needed |
54
+ | Connected skills table | Always | Navigation aid, compact |
55
+
56
+ ### Ambiguous content test
57
+
58
+ When unsure, apply the **D-skill cold-start test mentally**:
59
+
60
+ > *"If a consumer agent had only SKILL.md and typed the trigger phrase, would they need this content in the first 2 steps?"*
61
+ > - YES → Always-loaded
62
+ > - NO → On-demand
63
+
64
+ Behavioral rules always pass this test (even if rarely triggered, the consumer needs to know the constraint exists).
65
+
66
+ ---
67
+
68
+ ## §Pointers — Pointer Format Variants
69
+
70
+ ### Standard pointer (single section reference)
71
+
72
+ ```markdown
73
+ > **Detail**: See `SKILL_detail.md §SectionName` — [one-line description of what's there] — read when [specific condition that triggers need].
74
+ ```
75
+
76
+ ### Multi-item pointer (several related sections)
77
+
78
+ ```markdown
79
+ > **Detail**: See `SKILL_detail.md §SectionName-A` (bash scripts) · `§SectionName-B` (format templates) — read when executing this step.
80
+ ```
81
+
82
+ ### Pointer placement rules
83
+
84
+ 1. Place immediately **after** the summary/overview of the removed content in SKILL.md
85
+ 2. If an entire step's execution detail is removed, place pointer **at the end of the step's one-line summary**
86
+ 3. One pointer per removed block — do not stack multiple pointers for the same removal
87
+ 4. The `— read when [condition]` clause is mandatory — it is the activation trigger for imperative loading
88
+
89
+ ### What makes a pointer imperative vs advisory
90
+
91
+ Advisory (risky — consumer may skip):
92
+ ```
93
+ "See SKILL_detail.md for bash scripts."
94
+ "Refer to SKILL_detail.md §Step6-Detail for details."
95
+ ```
96
+
97
+ Imperative (required form):
98
+ ```
99
+ "> **Detail**: See `SKILL_detail.md §Step6-Detail` — bash for STALE detection, memory scan, skill usage leaderboard — read when executing Step 6."
100
+ ```
101
+
102
+ The imperative form includes:
103
+ - Blockquote + bold `**Detail**:` prefix (visual weight)
104
+ - Backtick-quoted path
105
+ - What's inside (one line)
106
+ - When to read (activation condition)
107
+
108
+ ---
109
+
110
+ ## §Split-Execution — Step-by-Step Procedure
111
+
112
+ ### Step 1: Produce classification table
113
+
114
+ Read target SKILL.md. For every H2/H3 section, output:
115
+
116
+ ```
117
+ | Section | Lines | Classification | Reason |
118
+ |---|---|---|---|
119
+ | ## Trigger Phrases | 8 | Always | Invocation recognition |
120
+ | ## Step 3 — bash scripts | 45 | On-demand | Execution detail, step-specific |
121
+ | "auto-allowed" rule | 2 | Always | Behavioral rule |
122
+ ...
123
+ ```
124
+
125
+ Count: Always N lines / On-demand N lines / Expected SKILL.md reduction: N%
126
+
127
+ ### Step 2: Trim SKILL.md
128
+
129
+ 1. For each On-demand section: delete content, replace with imperative pointer
130
+ 2. Pointer §SectionName must match the header you will create in SKILL_detail.md exactly
131
+ 3. Check: does SKILL.md still flow logically? Step overview must remain complete (names + criteria, no gaps)
132
+
133
+ ### Step 3: Create SKILL_detail.md
134
+
135
+ Front-matter:
136
+ ```yaml
137
+ ---
138
+ name: {skill-name}-detail
139
+ description: Detail reference for {skill-name} — [what's here]. Load when executing a specific step.
140
+ load: on-demand
141
+ ---
142
+ ```
143
+
144
+ Opening line:
145
+ ```
146
+ > Load when executing a specific step. SKILL.md contains [list what stays there].
147
+ ```
148
+
149
+ For each pointer in SKILL.md: create matching `## §SectionName` header, paste removed content under it.
150
+
151
+ Orphan check: every `## §SectionName` in SKILL_detail.md must have a corresponding pointer in SKILL.md. If not → either add pointer or merge with adjacent section.
152
+
153
+ ### Step 4: Verification sequence
154
+
155
+ ```bash
156
+ # 1. Pointer extraction from SKILL.md
157
+ grep -oE "SKILL_detail\.md §[A-Za-z0-9_-]+" plugins/{plugin}/skills/{name}/SKILL.md
158
+
159
+ # 2. Section headers in SKILL_detail.md
160
+ grep "^## §" plugins/{plugin}/skills/{name}/SKILL_detail.md
161
+
162
+ # 3. Diff — every pointer must have a matching section
163
+ # Any pointer with no matching section = Phantom → fix before commit
164
+ ```
165
+
166
+ Then run:
167
+ - `/source-grounding-audit` — artifact: SKILL.md, declared source: SKILL_detail.md
168
+ - `/sim-conductor D skill {name}` — provide SKILL.md only, attempt core task from trigger phrase
169
+
170
+ ---
171
+
172
+ ## §Verification-Checklist
173
+
174
+ Use before committing a completed split:
175
+
176
+ | Check | Pass condition |
177
+ |---|---|
178
+ | Trigger phrases ≥ 3 | SKILL.md §Trigger Phrases has 3+ entries |
179
+ | Done When defined | SKILL.md has Done When block with ≥1 measurable condition |
180
+ | All §pointers resolve | source-grounding-audit: 0 phantoms |
181
+ | Cold-start grade F | sim-conductor Area D-skill: consumer reaches core completion |
182
+ | No behavioral rule in SKILL_detail only | Any rule governing "what counts as X" present in SKILL.md |
183
+ | No orphan §sections | Every ## §SectionName in SKILL_detail.md has a pointer from SKILL.md |
184
+ | SKILL.md ≤ 50% of original | Line count check |
185
+ | SKILL.md flows without gaps | Reading SKILL.md alone gives complete step sequence understanding |