Guided workflow to import data into a trestle workspace — OSCAL files via trestle import, or external formats (CSV/XLSX/XCCDF/Tanium) via trestle tasks
From compliance-trestlenpx claudepluginhub ethanolivertroy/compliance-trestle-skills<file_or_url> [--type catalog|profile|component-definition|ssp]workflow/Execute a guided data import workflow. Handles both native OSCAL imports and external-format conversions.
Verify we are in a trestle workspace (check for .trestle/ directory).
Parse $ARGUMENTS for the source file path or URL and optional --type flag. If not provided, ask the user:
Detect format — Examine the source to determine the import path:
Path A — Native OSCAL (JSON/YAML with OSCAL top-level keys like catalog, profile, component-definition, system-security-plan, etc.):
--type was not specifiedPath B — External format (requires conversion via trestle task):
.csv → csv-to-oscal-cd.xlsx / .xls → Check content for CIS benchmark indicators:
cis-xlsx-to-oscal-cd or cis-xlsx-to-oscal-catalogxlsx-to-oscal-cd or xlsx-to-oscal-profile.xml → Check for XCCDF namespace:
xccdf-result-to-oscal-ar.json (non-OSCAL) → Check for Tanium format:
tanium-result-to-oscal-arIf the format is ambiguous, ask the user which path to follow.
Inspect source data:
Show Import Preview:
catalogs/<name>/catalog.json)Import / Convert:
Path A — Native OSCAL import:
trestle import -f <source_file> -o <model_name>
Path B — External format conversion:
.trestle/config.ini and either update an existing [task.<name>] section or create a new onetrestle task <task_name>
Post-Import Validation: Validate the result:
trestle validate -t <model_type> -n <model_name>
Or for task output:
trestle validate -f <output_file>
Report Results:
/compliance-trestle:catalog-roundtrip to begin editing"/compliance-trestle:profile-roundtrip to customize control selections"/compliance-trestle:component-roundtrip to edit component controls"/compliance-trestle:ssp-roundtrip to author implementation responses"trestle import — supports JSON and YAML OSCAL filestrestle task — supports CSV, XLSX, XML (XCCDF), and Tanium JSON.trestle/config.ini for reuse