---
name: project-step1088-seed-cooldown
description: STEP 1088 (2026-05-12) SeedTheory cooldown 実装. invention-engine 6th iteration hardening. addedDate + cooldownDays field 追加 + transplantStructure 内 cooldown filter (graceful fallback). 5/4+5/8+5/10+5/11 pool-expansion-self-pollination 4 例 systemic root cause fix.
metadata: 
  node_type: memory
  type: project
  originSessionId: e5ec4e43-958a-4a47-a6f0-4513f218941f
---

# STEP 1088 — SeedTheory Cooldown (Invention Pipeline 6th Iteration Hardening)

**実装日**: 2026-05-12 (STEP 1087 同 turn 続編)
**Trigger**: 藤本さん指示「(b) cooldownDays のみ今 turn 実装」 + 5/4 + 5/8 + 5/10 + 5/11 mass-generation 4 例 systemic 確定
**Status**: ✅ test/step1088 **12/12 PASS** + regression 51/51 累計 0 breaking

## Root cause (final fix at SEED side)

STEP 1040 (2026-05-10) で SEED_KERNEL に 5 civilizations × 2 axioms = 10 SeedTheory 新追加 → 翌日 invention engine が **新追加 pool への mass-generation** = pool-expansion-self-pollination.

STEP 1019 + 1040 + 1047 + 1087 は **engine 側** での dedup hardening だった. STEP 1088 は **SEED 側** で「新追加 SEED は cooldown 期間 invention generation から除外」 = root cause fix.

## 修正実装

### 1. SeedTheory interface 拡張 (seed-kernel.ts + invention-engine.ts 同期)

```typescript
export interface SeedTheory {
  id: string;
  axiom: string;
  category: string;
  keywords: string[];
  addedDate?: string;     // ISO YYYY-MM-DD
  cooldownDays?: number;  // days after addedDate that SEED is excluded from invention
}
```

### 2. `enableSeedCooldown` option (default ON)

```typescript
export interface InventionEngineOptions {
  // ... existing ...
  enableSeedCooldown?: boolean;  // default true (!== false check)
}
```

### 3. `isSeedInCooldown(theory, today?)` helper

```typescript
private isSeedInCooldown(theory: SeedTheory, today?: string): boolean {
  if (this.opts.enableSeedCooldown === false) return false;
  if (!theory.addedDate || !theory.cooldownDays || theory.cooldownDays <= 0) return false;
  const todayStr = today ?? new Date().toISOString().slice(0, 10);
  const cutoff = new Date(theory.addedDate);
  if (isNaN(cutoff.getTime())) return false;
  cutoff.setDate(cutoff.getDate() + theory.cooldownDays);
  return new Date(todayStr) < cutoff;
}
```

### 4. `transplantStructure` 内 cooldown filter + graceful fallback

```typescript
const allTheoriesA = this.kernel.filter(t => t.category === voidItem.categoryA);
const allTheoriesB = this.kernel.filter(t => t.category === voidItem.categoryB);
const filteredA = allTheoriesA.filter(t => !this.isSeedInCooldown(t));
const filteredB = allTheoriesB.filter(t => !this.isSeedInCooldown(t));
// Fallback: 全 SEED cooldown なら all theories 使用 (graceful)
const theoriesA = filteredA.length > 0 ? filteredA : allTheoriesA;
const theoriesB = filteredB.length > 0 ? filteredB : allTheoriesB;
```

### 5. STEP 1040 SEED 10 件に cooldown 付与

10 entries (seed-kernel.ts lines 333-348):
- inuit: dfumt-inunnguiniq, dfumt-isuma
- ainu: dfumt-kamuy, dfumt-iyomante
- aboriginal: dfumt-tjukurpa, dfumt-songline
- yoruba: dfumt-ase, dfumt-ori
- andean: dfumt-pachamama, dfumt-sumak-kawsay

全て `addedDate: '2026-05-10', cooldownDays: 30` → **2026-06-09 まで invention generation excluded**.

★ approved-* に promoted 済の Tjukurpa (5/10) / Songline (5/11) は `invented-*` id の別 entry (`invented-20260510-zero-ext-aboriginal-tjukurpa` / `invented-20260511-logic-aboriginal-songline`) なので **影響なし**.

## Test 結果

| # | Test | 内容 | 結果 |
|---|---|---|---|
| 1 | cooldown active | 中 SEED 除外 (SOURCE-NORMAL + TARGET-NORMAL 選択) | ✅ ✅ |
| 2 | cooldown expired | 期限切れ後 normal selection | ✅ ✅ |
| 3 | fallback | category 内全 cooldown で all theories 使用 | ✅ |
| 4 | 明示 OFF | enableSeedCooldown: false で legacy | ✅ |
| 5 | missing field | addedDate or cooldownDays 欠落で no cooldown | ✅ |
| 6 | STEP 1087 共存 | cooldown filter 後 source diversity | ✅ ✅ |
| 7 | 5/11 incident reproduction | category 全 cooldown で graceful fallback | ✅ |
| 8 | 実 SEED_KERNEL | 10 件 cooldown SEED 存在 + id 一致 | ✅ ✅ |

★ **test/step1088: 12/12 PASS**.

## Regression

- step1019: 9/9 PASS
- step1040: 11/11 PASS
- step1047: 9/9 PASS
- step1087: 10/10 PASS
- **step1088: 12/12 PASS**
- **累計 51/51 PASS** / 0 breaking change

## 6 段重ね hardening 完成

| iteration | STEP | option |
|---|---|---|
| 1st | 1019 | recentCooldownDays 7→60 + requireDifferentTarget |
| 2nd | 1040 | requireDifferentTargetAxiom (literal substring) |
| 3rd | 1047 | 全 dedup option default ON 化 |
| 4th | 1087 | requireSourceDiversity (voidIndex source offset) |
| **5th** | **1088** | **SeedTheory cooldown (addedDate + cooldownDays + enableSeedCooldown option)** |

★ 5 段重ね dedup hardening series が同 file (invention-engine.ts) で生存 + 全 default ON.

★ 5/4 + 5/8 + 5/10 + 5/11 mass-generation 4 例の **root cause fix** (engine 側でなく SEED 側).

## 7th iteration 候補 (retain)

- **(c) `requireSympatheticDegreeFilter` option** — 構造同型度 0.5 以上 require (LLM-free heuristic: source axiom keywords + target axiom keywords の Jaccard overlap + D-FUMT₈ concept distance). sympathetic-degree filter (5/10 Tjukurpa + 5/11 Songline approval reasoning) の auto 化.

## 関連 file

- `src/axiom-os/seed-kernel.ts` (interface 拡張 + 10 SEED に cooldown 付与)
- `src/aios/invention/invention-engine.ts` (option + helper + transplantStructure filter)
- `test/step1088-seed-cooldown-test.ts` (12 assertion / 8 scenario, 12/12 PASS)
- `package.json` (test:step1088 script)

関連 memory: [[project-step1087-require-source-diversity]] / [[project-invention-2026-05-11-approval-record]] / [[feedback-invention-duplicate-prevention]]
