Summary
When diecut extract encounters a directory like skills/ that contains multiple sibling subdirectories with similar structures, it should detect this as a "collection" and offer to generate a nested diecut.toml for that subdirectory pattern.
This would enable diecut new to scaffold a new item within an existing project — e.g., adding a new skill to a skills package without re-scaffolding the whole project.
Example
Given a source project with:
skills/
convention-mining/ → SKILL.md, references/*.md
iterating-skill-audit/ → SKILL.md, review-focus.md
auditing-convention-skills/ → SKILL.md, references/*.md
writing-skills/ → SKILL.md, craft.md, testing.md, ...
reviewing-abstraction-boundaries/ → SKILL.md
extract would detect that all 5 subdirectories share SKILL.md (5/5 = high confidence), some share a references/ subdir (2/5 = lower confidence), and offer to:
- Generate a sub-template with its own
diecut.toml for the common pattern
- Mine common content structure across the shared files (e.g., common markdown headings in
SKILL.md)
- Produce a stub example that captures the pattern
Design considerations
- Structural similarity (file tree shape) is cheap and answers "is this a collection?"
- Content similarity (within common files) is more expensive and answers "what does the stub look like?"
- Confidence thresholds should differ for these two layers
- Interactive confirmation: show detected collections and let users confirm/adjust
- The generated sub-template should be a full
diecut.toml that works with diecut new independently
Summary
When
diecut extractencounters a directory likeskills/that contains multiple sibling subdirectories with similar structures, it should detect this as a "collection" and offer to generate a nesteddiecut.tomlfor that subdirectory pattern.This would enable
diecut newto scaffold a new item within an existing project — e.g., adding a new skill to a skills package without re-scaffolding the whole project.Example
Given a source project with:
extractwould detect that all 5 subdirectories shareSKILL.md(5/5 = high confidence), some share areferences/subdir (2/5 = lower confidence), and offer to:diecut.tomlfor the common patternSKILL.md)Design considerations
diecut.tomlthat works withdiecut newindependently