@mcptoolshop/style-dataset-lab 2.2.0 → 2.2.1

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 (2) hide show
  1. package/README.md +80 -94
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -11,142 +11,128 @@
11
11
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License"></a>
12
12
  </p>
13
13
 
14
- # style-dataset-lab
14
+ Write your visual rules. Generate art. Judge every image against those rules. Ship the results as versioned, auditable training data.
15
15
 
16
- Define visual canon. Curate approved work. Produce versioned datasets. Build training packages. Score outputs against canon. Re-ingest accepted results. Repeat.
16
+ Style Dataset Lab connects the thing you wrote down about your art style to the dataset you actually train from. You define a constitution — silhouette rules, palette constraints, material language, whatever matters for your project. The pipeline generates candidates, scores them against those rules, and packages the approved work into reproducible datasets where every record explains why it was included.
17
17
 
18
- ## What this does
18
+ The loop closes: train a model, generate new outputs, score them against the same canon, re-ingest what passes. The dataset grows and the rules hold.
19
19
 
20
- Style Dataset Lab is a production pipeline for visual datasets. It takes a project from written canon through curation, dataset packaging, model training preparation, evaluation, and back again as a closed loop.
21
-
22
- Every asset in the system carries full provenance, canon-bound judgments, and per-dimension quality scores. Nothing is a label without a reason.
23
-
24
- ```
25
- canon → curate → bind → snapshot → split → export → train → eval → reingest
26
- ```
27
-
28
- ## The artifacts
29
-
30
- The pipeline produces seven first-class artifacts. Each is versioned, checksummed, and linked to its predecessors.
31
-
32
- | Artifact | What it is |
33
- |----------|-----------|
34
- | **Snapshot** | Frozen, fingerprinted record selection. Every inclusion has an explicit reason trace. |
35
- | **Split** | Leakage-safe train/val/test partition. Subject families never cross split boundaries. |
36
- | **Export package** | Self-contained dataset: manifest, metadata, images, splits, dataset card, checksums. |
37
- | **Eval pack** | Canon-aware test tasks: lane coverage, forbidden drift, anchor/gold, subject continuity. |
38
- | **Training package** | Trainer-ready layout built by adapters. Same truth, different format. |
39
- | **Eval scorecard** | Per-task pass/fail verdict from scoring generated outputs against eval packs. |
40
- | **Implementation pack** | Prompt examples, known failures, subject continuity tests, re-ingest guide. |
41
-
42
- ## Quick start
20
+ ## The pipeline
43
21
 
44
22
  ```bash
45
- npm install -g @mcptoolshop/style-dataset-lab
46
-
23
+ # Write your canon. Scaffold the project.
47
24
  sdlab init my-project --domain character-design
48
- sdlab project doctor --project my-project
49
- ```
50
-
51
- Available domains: `game-art`, `character-design`, `creature-design`, `architecture`, `vehicle-mech`.
52
25
 
53
- ## End-to-end example
26
+ # Generate candidates via ComfyUI, then review them
27
+ sdlab generate inputs/prompts/wave1.json --project my-project
28
+ sdlab curate <id> approved "Strong silhouette, correct faction palette"
54
29
 
55
- ```bash
56
- # 1. Curate and bind records to constitution rules
57
- sdlab curate <id> approved "Strong silhouette, correct palette"
30
+ # Bind approved work to constitution rules
58
31
  sdlab bind --project my-project
59
32
 
60
- # 2. Produce a versioned dataset
33
+ # Freeze a versioned dataset
61
34
  sdlab snapshot create --project my-project
62
- sdlab split build --project my-project
63
- sdlab export build --project my-project
35
+ sdlab split build
36
+ sdlab export build
64
37
 
65
- # 3. Build a training package
38
+ # Build a training package and close the loop
66
39
  sdlab training-manifest create --profile character-style-lora
67
- sdlab training-package build --project my-project
68
-
69
- # 4. Evaluate and close the loop
70
- sdlab eval-pack build --project my-project
71
- sdlab eval-run create --project my-project
72
- sdlab eval-run score <id> --outputs results.jsonl
40
+ sdlab training-package build
41
+ sdlab eval-run create && sdlab eval-run score <id> --outputs results.jsonl
73
42
  sdlab reingest generated --source ./outputs --manifest <id>
74
43
  ```
75
44
 
76
- ## Project structure
77
-
78
- Each project is self-contained under `projects/<name>/`:
45
+ That last command is the point. Generated outputs come back through the same review process as everything else. The loop closes.
79
46
 
80
- ```
81
- project.json Identity + generation defaults
82
- constitution.json Rules with rationale templates
83
- lanes.json Subject lanes with detection patterns
84
- rubric.json Scoring dimensions + thresholds
85
- terminology.json Group vocabulary + detection order
86
- canon/ Style constitution (markdown)
87
- records/ Per-asset JSON (provenance + judgment + canon)
88
- snapshots/ Frozen dataset snapshots
89
- splits/ Train/val/test partitions
90
- exports/ Versioned export packages
91
- eval-packs/ Canon-aware eval instruments
92
- training/
93
- profiles/ What kind of model asset to produce
94
- manifests/ Frozen training contracts
95
- packages/ Trainer-ready layouts
96
- eval-runs/ Scored output evaluations
97
- implementations/ Usage examples + re-ingest guides
98
- ```
47
+ ## What it produces
99
48
 
100
- ## Key properties
49
+ Seven versioned, checksummed artifacts. Each links to its predecessors so you can trace any training record back to the rule that approved it.
101
50
 
102
- **Snapshots are frozen.** Once created, a snapshot never silently changes. The config fingerprint (SHA-256 of all project config files) proves reproducibility.
51
+ | Artifact | What it is |
52
+ |----------|-----------|
53
+ | **Snapshot** | Frozen record selection with config fingerprint. Every inclusion has an explicit reason. |
54
+ | **Split** | Train/val/test partition where subject families never cross boundaries. |
55
+ | **Export package** | Self-contained dataset: manifest, metadata, images, splits, dataset card, checksums. |
56
+ | **Eval pack** | Canon-aware test tasks: lane coverage, forbidden drift, anchor/gold, subject continuity. |
57
+ | **Training package** | Trainer-ready layout via adapters (`diffusers-lora`, `generic-image-caption`). Same truth, different format. |
58
+ | **Eval scorecard** | Per-task pass/fail from scoring generated outputs against eval packs. |
59
+ | **Implementation pack** | Prompt examples, known failures, continuity tests, and re-ingest guidance. |
103
60
 
104
- **Splits prevent leakage.** Records sharing a subject family (by identity name, lineage chain, or ID suffix) always land in the same partition. Lane balance is maintained across train/val/test.
61
+ ## Why this exists
105
62
 
106
- **Manifests are immutable contracts.** A training manifest captures the exact export, split, profile, and config fingerprint. If anything changes, a new manifest is required.
63
+ Training data is the highest-leverage artifact in any visual AI pipeline. But most training data is a folder of images with no history, no judgment trail, and no connection to the style rules it was supposed to follow.
107
64
 
108
- **Adapters never mutate truth.** Trainer-specific adapters (`generic-image-caption`, `diffusers-lora`) transform layout but cannot add, remove, or reclassify records.
65
+ Style Dataset Lab makes the connection explicit. Your constitution defines the rules. Your rubric defines the scoring dimensions. Your curation records the judgment. Your canon binding proves the connection. And your dataset carries all of that forward as structured, queryable, reproducible truth.
109
66
 
110
- **Generated outputs re-enter through review.** Re-ingested work gets a new record with full provenance and must be curated and canon-bound like everything else. No bypass.
67
+ The practical result: when your LoRA drifts, you can ask *why*. When your next training round needs better data, you know exactly which records are near-misses and what single rule they failed. When a new team member asks what the project's visual language is, the answer isn't a Figma board — it's a searchable constitution with 1,182 graded examples.
111
68
 
112
- ## Domain templates
69
+ ## Five domains, real rules
113
70
 
114
- Five starter templates with real production rules, lane definitions, and scoring rubrics:
71
+ Not placeholder templates. Each domain ships with production-grade constitution rules, lane definitions, scoring rubrics, and group vocabulary.
115
72
 
116
- | Domain | Lanes | Key concerns |
117
- |--------|-------|-------------|
118
- | **game-art** | character, environment, prop, UI, ship, interior, equipment | Silhouette at gameplay scale, faction read, wear/aging |
119
- | **character-design** | portrait, full_body, turnaround, expression_sheet, action_pose | Proportions, costume logic, personality, gesture |
73
+ | Domain | Lanes | What gets judged |
74
+ |--------|-------|-----------------|
75
+ | **game-art** | character, environment, prop, UI, ship, interior, equipment | Silhouette at gameplay scale, faction read, wear and aging |
76
+ | **character-design** | portrait, full_body, turnaround, expression_sheet, action_pose | Proportions, costume logic, personality, gesture clarity |
120
77
  | **creature-design** | concept, orthographic, detail_study, action, scale_reference, habitat | Anatomy, evolutionary logic, silhouette distinction |
121
- | **architecture** | exterior, interior, streetscape, structural_detail, ruin, landscape | Structure, material consistency, perspective, era |
122
- | **vehicle-mech** | exterior, cockpit, component, schematic, silhouette_sheet, damage_variant | Mechanical logic, design language, access points |
78
+ | **architecture** | exterior, interior, streetscape, structural_detail, ruin, landscape | Structure, material consistency, perspective, era coherence |
79
+ | **vehicle-mech** | exterior, cockpit, component, schematic, silhouette_sheet, damage_variant | Mechanical logic, design language, access points, damage narrative |
123
80
 
124
- ## Downstream formats
81
+ ## Project structure
82
+
83
+ Each project is self-contained. Five JSON config files define the rules; everything else is data.
84
+
85
+ ```
86
+ projects/my-project/
87
+ project.json Identity + generation defaults
88
+ constitution.json Rules with rationale templates
89
+ lanes.json Subject lanes with detection patterns
90
+ rubric.json Scoring dimensions + thresholds
91
+ terminology.json Group vocabulary + detection order
92
+ records/ Per-asset JSON (provenance + judgment + canon)
93
+ snapshots/ Frozen dataset snapshots
94
+ splits/ Train/val/test partitions
95
+ exports/ Versioned export packages
96
+ training/ Profiles, manifests, packages, eval runs, implementations
97
+ ```
98
+
99
+ ## Trust properties
125
100
 
126
- `sdlab` defines and owns the dataset. Downstream format conversion is handled by [`repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset): TRL, LLaVA, Qwen2-VL, JSONL, Parquet, and more. `repo-dataset` renders formats; it never decides inclusion.
101
+ These are not aspirational. They are enforced.
102
+
103
+ - **Snapshots are immutable.** Config fingerprint (SHA-256) proves nothing changed.
104
+ - **Splits prevent leakage.** Subject families (by identity, lineage, or ID suffix) never cross partition boundaries.
105
+ - **Manifests are frozen contracts.** Export hash + config fingerprint. If anything changes, create a new one.
106
+ - **Adapters cannot mutate truth.** Different layout, same records. No additions, no removals, no reclassification.
107
+ - **Generated outputs re-enter through review.** No bypass. Curate and bind like everything else.
127
108
 
128
109
  ## Star Freight
129
110
 
130
- Clone the repo for a complete working example: 1,182 records, 5 factions, 7 lanes, 24 constitution rules, 2 training profiles.
111
+ The repo includes a complete working example: 1,182 records, 5 factions, 7 lanes, 24 constitution rules, 892 approved assets, 2 training profiles. A gritty sci-fi RPG visual canon, fully curated.
131
112
 
132
113
  ```bash
133
114
  git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
134
115
  cd style-dataset-lab
135
116
  sdlab project doctor --project star-freight
136
- sdlab snapshot create --project star-freight
137
- sdlab split build --project star-freight
138
- sdlab training-manifest create --profile character-style-lora --project star-freight
117
+ sdlab snapshot create --project star-freight # 839 eligible records
118
+ sdlab split build --project star-freight # zero subject leakage
139
119
  ```
140
120
 
141
- ## Security
121
+ ## Downstream formats
122
+
123
+ `sdlab` owns the dataset. Format conversion is handled by [`repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset): TRL, LLaVA, Qwen2-VL, JSONL, Parquet, and more. `repo-dataset` renders; it never decides inclusion.
124
+
125
+ ## Install
142
126
 
143
- Local-only. Talks to ComfyUI on `localhost:8188`. No telemetry, no analytics, no external requests. Images stay on your GPU and filesystem.
127
+ ```bash
128
+ npm install -g @mcptoolshop/style-dataset-lab
129
+ ```
144
130
 
145
- ## Requirements
131
+ Requires Node.js 20+ and [ComfyUI](https://github.com/comfyanonymous/ComfyUI) on localhost:8188 for generation.
132
+
133
+ ## Security
146
134
 
147
- - [ComfyUI](https://github.com/comfyanonymous/ComfyUI) running on localhost:8188
148
- - SDXL-compatible checkpoint + style LoRA
149
- - Node.js 20+
135
+ Local-only. No telemetry, no analytics, no external requests. Images stay on your GPU and filesystem.
150
136
 
151
137
  ## License
152
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcptoolshop/style-dataset-lab",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Visual canon and dataset production pipeline — snapshots, splits, versioned exports, eval packs, and canon-bound curation for any image production domain",
5
5
  "type": "module",
6
6
  "bin": {