# @sakura2333/kancolle-data

Versioned data projections generated by `kancolle-item-improvement-spider`.
The package exposes file paths and does not eagerly load large JSON/NeDB files.

```js
const data = require('@sakura2333/kancolle-data')

console.log(data.improvement.listPath)
console.log(data.schemas.improvementDetailPath)
console.log(data.equipment.dropFromPath)
console.log(data.equipment.acquisitionPath)
console.log(data.equipment.sourcesPath) // deprecated compatibility projection
console.log(data.equipment.specialBonusesPath)
console.log(data.master.equipmentPath)
console.log(data.i18n.zhTWPath)
```

Datasets:

- `improvement/list.json`: compact all + weekday list projection.
- `improvement/detail.nedb`: full routes plus ★0..★MAX effect expectations and 11 explicit per-route actions (including optional MAX conversion).
- `schemas/improvement-detail.schema.json`: JSON Schema for each schema-4 NeDB record.
- `equipment/drop-from.nedb`: detailed ship initial/remodel loadout evidence.
- `equipment/acquisition.nedb`: canonical acquisition authority with discriminated `ship`, `upgrade`, `quest`, and `development` methods.
- `schemas/equipment-acquisition.schema.json`: JSON Schema for acquisition authority.
- `equipment/sources.nedb`: deprecated compatibility shape, mechanically derived from acquisition only.
- `schemas/equipment-sources.schema.json`: JSON Schema for the deprecated compatibility projection.
- `equipment/special-bonuses.nedb`: bonus rules targeting either concrete equipment IDs or equipment-type IDs.
- `master/*.json`: stable-ID master entity facts; equipment/ships/useitems carry Japanese game/master labels. Quests are key-only and intentionally limited to the `questKey` closure actually referenced by exported datasets; unrelated upstream catalog quests are not shipped.
- `i18n/{en-US,zh-CN,zh-TW}.json`: identity-aligned display localization. There is no physical `ja-JP` file. Quest labels enter i18n only after their source code resolves to a canonical `questKey` inside the exported quest closure; unmatched or unreferenced source rows are excluded rather than guessed.

Canonical images are intentionally absent. Install `@sakura2333/kancolle-asset` for `equip/{id}.webp` and `useitem/{id}.webp`. Data and asset package versions are independent.

Special-bonus targets are discriminated by `target.kind`:

```json
{"target":{"kind":"equipment","equipmentIds":[315]}}
{"target":{"kind":"equipment-type","equipmentTypeIds":[9]}}
```

Use `manifest.json` to verify package schema 5, dataset schemas, source freshness and file hashes. Asset completeness is validated against the separate asset-package manifest during release validation. `RELEASES.json` contains machine-readable release metrics.

Strict releases require same-run network validation for the canonical Akashi improvement source and the KcWiki/KC3 supplemental datasets. A cached projection cannot be promoted as a fresh release.

## Legacy `poi-plugin-item-improvement2` distribution

The Stable main release builds two npm variants from the same canonical candidate. The `improvement2` business data is refreshed every release, while its legacy consumer contract is frozen:

```text
@sakura2333/kancolle-data@latest
  normal paths -> canonical improvement detail schema 4

@sakura2333/kancolle-data@improvement2
  normal paths -> frozen improvement detail schema 3
  assets/useitem/{id}.png -> legacy official PNGs
  equipment datasets/images -> intentionally absent
```

The compatibility package is regenerated from the same frozen build candidate and published as `<canonical-version>-improvement2`. Its schema version, file paths, field set/meaning, PNG asset contract, and intentionally omitted equipment surface are frozen; only business data is allowed to refresh.

Legacy consumers keep their existing code and install the tag:

```bash
npm install @sakura2333/kancolle-data@improvement2
```

Future canonical fields do not change the compatibility surface. Business data may refresh, but schema version, paths, field set/meaning, PNG asset contract, and omitted equipment surface are frozen for the retired plugin.
