version: 1
skill: product-data
description: Product-data portable tool manifest. Scripts are the source of capability; platform tool registration is only an adapter.
runtime:
  language: python
  min_python: "3.10"
  dependencies: []
tools:
  - name: product_data_normalize_dataset_draft
    description: Parse dataset draft text v1 into canonical records with generated ids, timestamps, source metadata, context, labels and dimensions.complex.
    script: scripts/normalize_dataset_draft.py
    input_schema: schemas/normalize_dataset_draft.input.schema.json
    output_schema: schemas/normalize_dataset_draft.output.schema.json
    fallback:
      command: python skills/product-data/scripts/normalize_dataset_draft.py --input <input.json>
      stdin: true
  - name: product_data_validate_dataset_records
    description: Validate canonical product-data records for required fields, labels, dimensions.complex, timestamp order and prompt stitching constraints.
    script: scripts/validate_dataset_records.py
    input_schema: schemas/validate_dataset_records.input.schema.json
    output_schema: schemas/validate_dataset_records.output.schema.json
    fallback:
      command: python skills/product-data/scripts/validate_dataset_records.py --input <input.json>
      stdin: true
  - name: product_data_export_dataset_records
    description: Validate canonical records and write compact JSONL or JSON files plus a sibling records.csv sharing table whose function column combines complex and label target.
    script: scripts/export_dataset_records.py
    input_schema: schemas/export_dataset_records.input.schema.json
    output_schema: schemas/export_dataset_records.output.schema.json
    fallback:
      command: python skills/product-data/scripts/export_dataset_records.py --input <input.json>
      stdin: true
  - name: product_data_export_dataset_table
    description: Convert existing canonical records into the shared records.csv table format without rewriting the metadata file; function column combines complex and label target.
    script: scripts/export_dataset_table.py
    input_schema: schemas/export_dataset_table.input.schema.json
    output_schema: schemas/export_dataset_table.output.schema.json
    fallback:
      command: python skills/product-data/scripts/export_dataset_table.py --input <input.json>
      stdin: true
  - name: product_data_export_training_jsonl
    description: Convert canonical records into training JSONL lines with system, instruction and output fields; output combines complex and label target.
    script: scripts/export_training_jsonl.py
    input_schema: schemas/export_training_jsonl.input.schema.json
    output_schema: schemas/export_training_jsonl.output.schema.json
    fallback:
      command: python skills/product-data/scripts/export_training_jsonl.py --input <input.json>
      stdin: true
  - name: product_data_export_planning_eval_csv
    description: Convert canonical records into evaluation CSV with request_id, newPrompt, query, 类别真实标签, code标签 and complex columns; newPrompt uses chat-template tags and complex is read from dimensions.complex as TRUE/FALSE.
    script: scripts/export_planning_eval_csv.py
    input_schema: schemas/export_planning_eval_csv.input.schema.json
    output_schema: schemas/export_planning_eval_csv.output.schema.json
    fallback:
      command: python skills/product-data/scripts/export_planning_eval_csv.py --input <input.json>
      stdin: true
