AI Import guide
AI Import is a path for getting a pattern you already have — as a PDF, a photo, or transcribed text — into your library without retyping it row by row. The wizard hands you a prompt that, paired with your pattern file, teaches an AI chatbot how to produce a Knit in Time pattern. You paste the reply back into the wizard and it imports.
When to reach for it
AI Import is the right tool when:
- You already have the pattern as a PDF, photo, or pasted text and don't want to retype it.
- The pattern's structure fits the Builder's model — segments, rows, repeats, and rule blocks — so the AI has something to map onto.
- You want to track the pattern, not edit it. (You can always tweak the imported result afterwards in the Builder.)
If you're authoring a brand-new pattern, the Builder, DSL, or JavaScript SDK are usually faster — you skip the AI round-trip entirely.
Step-by-step
1. Open the wizard
From your library, tap Add to library and pick AI Import. The wizard opens in three steps: prompt, response, preview.
2. Copy the prompt
The first screen shows a long prompt and a Copy prompt button. The prompt teaches an AI assistant how to produce a Knit in Time pattern — what the DSL looks like, what shapes are allowed, what to do if the input is ambiguous. Copy it as-is; don't trim it.
3. Hand the prompt and your pattern to an AI chatbot
Open your AI assistant of choice — Claude, ChatGPT, Gemini, or whatever you use — and start a new conversation. Paste the prompt, then attach your pattern source: a PDF upload, a photo, or pasted text. Send. The assistant should reply with a code block containing a Knit in Time pattern.
4. Paste the reply
Back in the wizard, tap Next and paste the assistant's entire reply into the textarea. You don't need to strip out the prose — the wizard extracts the code block automatically. Tap Parse & preview.
5. Preview and import
If parsing succeeds, you'll see the pattern name, segment count, and parameter count. Tap Import to save it to your library. The pattern lands as a regular library entry — open it in the Builder anytime to refine.
Where your data goes
Knit in Time itself is local-first: nothing about your pattern is sent to a Knit in Time backend (there isn't one). But the AI conversation happens entirely outside the app — in your chatbot of choice. Whatever you upload to the assistant is subject to its terms, not ours. If your pattern is private or copyrighted, check the assistant's data policy first.
When the parser complains
If the assistant's reply doesn't parse cleanly, the wizard shows the parser error and a pre-filled retry message — copy that message back to the same chat, send it, and the assistant gets the error context and tries again.
Common fixes:
- "Nothing to parse" — you pasted prose with no code block. Ask the assistant to wrap the pattern in a fenced code block.
- Syntax errors — usually a missing brace, an extra quote, or an undefined parameter. Use the retry message; the assistant typically fixes it in one shot.
- Looks right but wrong structure — import it anyway, then open it in the Builder. It's almost always faster to fix three rows than to argue with the assistant about them.
- Hard-coded numbers where a parameter would help — ask the assistant to extract the cast-on count (or whatever number you want to vary) as a parameter.
Things AI Import isn't good at
- Charted patterns. Charts are spatial; the DSL is sequential. If your pattern is mostly a chart, the assistant will struggle.
- Very long patterns. Some assistants truncate; some lose track of segment boundaries. Prefer feeding it one section at a time and merging in the Builder.
- Heavily abbreviated or designer-specific notation. The more standard the abbreviations, the better the result.
After importing
Imported patterns are full library citizens — you can fork them, fix mistakes in the Builder, copy their DSL, or delete them. If you want to see the DSL the assistant produced, open the pattern and use Copy DSL from the library card.
Where to next?
If the assistant keeps tripping over your pattern's structure, the visual Builder lets you reproduce it click-by-click. If you'd rather hand-edit the DSL the assistant produced, the DSL primer walks through every construct. For generative or parametric patterns, the JavaScript SDK is more direct than going through an AI.