-
Notifications
You must be signed in to change notification settings - Fork 0
feat: ml-model-structure skill 追加 (ndf v4.10.0) #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
takemi-ohama
wants to merge
5
commits into
main
Choose a base branch
from
feature/add-ml-model-structure-skill
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a41fb26
feat: ml-model-structure skill を ndf に追加し v4.10.0 へ更新
takemi-ohama 1c5c0b2
docs: skill カテゴリ数を実数に整合 (全ドキュメント45個で統一)
takemi-ohama 77a3c1a
Fix: v4.10.0 向けバージョン表記とエージェント一覧の不整合を修正
takemi-ohama ac88061
Update: CHANGELOG に v4.10.0 エントリを追加しリファレンスとの整合を修正
takemi-ohama 8f7e740
Fix: README 比較表のスキル数を実数 45個 に更新 (旧表記23個を修正)
takemi-ohama File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| # [新規skill] ml-model-structure を ndf に登録する | ||
|
|
||
| - 対象 plugin: `ndf` (現 v4.9.0) | ||
| - 種別: 新規 skill 追加 (登録作業のみ依頼。skill 実体は作成済み) | ||
| - 報告者: takemi-ohama | ||
| - 起点: `carmo-screening` の PLAN43 (OAC予測モデルの analysis ディレクトリ再編) で確立した | ||
| 「機械学習モデルの構築・推論API開発の標準構造」を、横展開可能な基準として skill 化したもの | ||
|
|
||
| ## 背景・目的 | ||
|
|
||
| 機械学習モデルの学習コードと推論API(コンテナ)を、連番スクリプトでプロジェクト直下にフラットに並べると | ||
| 「どれがデプロイ済みの正規コードか」「どれが旧版・ボツ実験か」が判別できなくなる。 | ||
| また将来 v2/v3 を champion/challenger・shadow で**並行運用**する際、全版が単一の特徴量ライブラリを | ||
| 共有する設計は (特徴量ロジックが版ごとに進化するため) 破綻する。 | ||
|
|
||
| これを **版 (version) 単位の自己完結ディレクトリ + 版内 feature SSoT** で解決する構造・実装方法を、 | ||
| `carmo-screening` の実プロジェクトで確立・検証した。これを ndf の標準 skill として登録し、 | ||
| 以後のモデル構築・API開発の基準としたい。 | ||
|
|
||
| ## 追加する skill (作成済み) | ||
|
|
||
| - パス: `plugins/ndf/skills/ml-model-structure/` | ||
| - `SKILL.md` (148 行) | ||
| - `references/inference-and-contract.md` (117 行、推論コンテナ規約 + TRAIN_SPEC テンプレ) | ||
| - `name`: `ml-model-structure` | ||
| - `description` (要約): 機械学習モデルの構築・再学習・推論API(SageMaker等)開発における標準ディレクトリ構造と | ||
| 実装方法。版ごとに自己完結する構造 (`vN/`) + 版内 feature SSoT (`features.py`) + 推論コンテナ規約で、 | ||
| train/serve skew を版内で防ぎ champion/challenger の並行運用に備える。 | ||
| - `when_to_use` (要約): モデルの新規構築・再学習・推論コンテナ開発・バージョン管理/並行運用を行うとき。 | ||
| Triggers: 'モデル構築', 'モデル再学習', '推論コンテナ', 'SageMaker', 'feature SSoT', 'train/serve skew', | ||
| 'champion challenger', '並行運用' 等。 | ||
|
|
||
| ### skill が定める基準 (要点) | ||
|
|
||
| 1. **版ごとに自己完結** (`vN/` が独自の `features.py`/`train/`/`inference/` を持つ)。 | ||
| 版跨ぎ共有 (`shared/`) や `current -> vN` symlink は作らない。 | ||
| 2. **版内 feature SSoT** (`vN/features.py` を学習・推論・テストが共有)。train/serve skew は版内で保証。 | ||
| 3. **「コードの並行」と「デプロイの並行」は別レイヤー** (デプロイ並行は推論基盤側で解決)。 | ||
| 4. 推論コンテナ規約 (SageMaker 標準ハンドラ / build context=版ルート / `COPY features.py` / | ||
| `.dockerignore` は context ルート / `model.tar.gz` は成果物のみ)。 | ||
| 5. `train/` の canonical・採用根拠系 experiments・`lab/` (不採用)・`v1/` (read-only) の区分。 | ||
| 6. `TRAIN_SPEC.md` (train↔serve 契約書) の章立て。 | ||
| 7. 受け入れ基準 (テスト緑 / py_compile / docker build smoke / dead-link なし / `git mv` で履歴保持)。 | ||
|
|
||
| ASCII ツリー以外の図は mermaid を使用 (`ndf:markdown-writing` 準拠)。 | ||
|
|
||
| ## 依頼内容 (登録作業) | ||
|
|
||
| skill 実体は配置済みのため、以下の **plugin への登録のみ** をお願いしたい | ||
| (本リポジトリ側の規約・version 運用に合わせて実施してください): | ||
|
|
||
| 1. `plugins/ndf/.claude-plugin/plugin.json` | ||
| - `skills` 配列に `"./skills/ml-model-structure"` を追加。 | ||
| - `version` を bump (新規 skill 追加のため、運用ルールに従って minor 等)。 | ||
| - `description` 内の skill 数表記 ("… skills including …") を +1 に更新。 | ||
| 2. `.claude-plugin/marketplace.json` — ndf エントリの version/description が plugin.json に追従する場合は更新。 | ||
| 3. `plugins/ndf/AGENTS.md` / ルート `README.md` の skill 数・一覧記述があれば更新 | ||
| (現状 "39個のSkills" 等の表記は既に実数とずれている可能性があるため、合わせて整合を取ると望ましい)。 | ||
|
|
||
| > skill の中身 (`SKILL.md` / `references/`) のレビュー・微修正は ai-plugins 側の判断で実施して構いません。 | ||
| > 命名 (`ml-model-structure`) や粒度に異論があれば調整可。 | ||
|
|
||
| ## 検証済み事項 (skill の根拠となった実プロジェクト) | ||
|
|
||
| `carmo-screening` PLAN43 にて本構造を実装・検証済み: | ||
|
|
||
| - 推論コンテナ単体テスト 18 passed (train/serve 一致の回帰テスト含む)。 | ||
| - 全 `.py` `py_compile` OK / `docker build` (版ルート context) exit 0 / `export --dry-run` OK。 | ||
| - ドキュメント dead-link なし (リポジトリ全体 grep)。 | ||
| - 全移動を `git mv` で履歴保持。 | ||
|
|
||
| ## 関連 | ||
|
|
||
| - 由来プロジェクト: `carmo-screening` `analysis/20260505_oac-prediction/` | ||
| (設計書 `issues/PLAN43-restructure-design.md`、PR #288) | ||
| - 既存類似 skill: `ndf:implementation-plan`, `ndf:issue-plan-strategy`, `ndf:mcp-builder` | ||
| (本 skill は「ML モデル構築・推論API の構造基準」を担い、これらと相補) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.