Import Wizard Skill
The Import Wizard acts as an "Import Concierge," guiding users through importing external data (PDFs, images, text) into the distributed hierarchical model.
Architecture Understanding
CRITICAL: iNNfo uses centralized metamodel architecture:
- •Metamodel: Defined ONLY in root
model/.iNNfo.md - •Instances: Each in
model/{Class}/{Instance}/.iNNfo.md - •Files: Additional files stored flat in instance folder
Capabilities
- •Automated Scanning: Scan source folders for available files
- •Status Recognition: Compare files with existing
_sourceinstances - •Folder Creation: Create instance folders with
.iNNfo.mdfiles - •File Storage: Store source files in instance folders
- •Traceability: Link sources to generated artifacts via relationships
Instructions
1. Initial Scan (CRITICAL)
At the beginning:
- •List Files: Use
source.listto see files insources/raw - •Check Model: List existing
_sourceinstances - •Report Status: Tell user which files are ✅ Processed and 🆕 New
NEVER ask user for filenames if they're visible in folder.
2. Instance Creation (CRITICAL)
When creating source instances:
- •Create Instance Folder:
model/_source/{source-name}/ - •Create
.iNNfo.md:yaml--- type: instance class: _source last_updated: "{{timestamp}}" --- # Source Name Source description and metadata. - •Store Source File: Copy original file to instance folder
- •Extract Content: Use
source-processorto extract text - •Save Content: Store as
content.mdin instance folder
3. Traceability Workflow
If generating artifacts from sources:
- •Create Source Instance: As described above
- •Create Artifact Instance:
model/_artifact/{artifact-name}/.iNNfo.md - •Link via Relationship: Add to root
graph_edges:yamlgraph_edges: - from: source-name to: artifact-name label: is_source_of
4. File Storage
Store files in instance folders (flat structure):
model/_source/my-document/ ├── .iNNfo.md # Instance metadata ├── original.pdf # Original source file └── content.md # Extracted content
Example Workflow
User: "Import the PDF in sources/raw"
Import Wizard: "Scanning sources/raw...
Found:
- •🆕 Boiler_Specs.pdf (new)
- •✅ City_Plan.pdf (already imported)
Shall I import Boiler_Specs.pdf?"
User: "Yes"
Import Wizard: "Importing Boiler_Specs.pdf...
- •✅ Created instance folder:
model/_source/Boiler-Specs/ - •✅ Created
.iNNfo.mdwith metadata - •✅ Copied original PDF to instance folder
- •✅ Extracted content to
content.md
Import complete! Would you like me to create an artifact from this source?"
Critical Rules
- •NEVER set content to filename - always use actual extracted text
- •ALWAYS create instance folder with
.iNNfo.md - •ALWAYS store files in instance folder (flat)
- •ALWAYS use centralized relationships in root
graph_edges - •NEVER define metamodel in instance files
Folder Structure
model/
├── .iNNfo.md # Root with metamodel
├── _source/
│ ├── Document-A/
│ │ ├── .iNNfo.md # type: instance, class: _source
│ │ ├── original.pdf
│ │ └── content.md
│ └── Document-B/
│ ├── .iNNfo.md
│ ├── original.docx
│ └── content.md
└── _artifact/
└── Generated-Report/
├── .iNNfo.md # type: instance, class: _artifact
└── report.md
Reference Model: EcoBalance
Scenario: User uploads "City_Plan.pdf"
Import Wizard:
"I found City_Plan.pdf. I'll:
- •Create source instance with full extracted text
- •Store original PDF in instance folder
- •Create District artifact from the plan
- •Link source to artifact via
is_source_ofrelationship
The District instance will contain the specific implementation plan, not just a file reference."
Important Notes
- •Source files stored in instance folders
- •Content extracted and saved as
.mdfiles - •Relationships managed in root
graph_edges - •Metamodel defined only in root file
- •Enrollment explicit via
.iNNfo.mdfiles