| name | regenerate |
| description | Removes the docudart/ directory in a target folder and re-runs docudart create --full to regenerate it. Accepts an optional directory argument (defaults to "example"). |
When this skill is invoked:
-
Determine the target directory from the argument:
- If an argument is provided (e.g.,
/regenerate example), use that as the target directory
- If no argument is provided, default to
example
-
Validate the target directory exists at <project_root>/<target>/:
- If it does NOT exist, report an error: "Directory '/' does not exist."
- If it exists, continue
-
Back up user assets before deleting:
- If
<target>/docudart/assets/ exists, copy it to a temporary location (e.g., /tmp/docudart-assets-backup/)
- This preserves custom logos, favicons, and other user-modified assets
-
Remove <target>/docudart/ if it exists
-
Run docudart create --full from the target directory:
cd <target> && dart run ../bin/docudart.dart create --full
-
Restore user assets:
- Copy the backed-up assets back over
<target>/docudart/assets/, overwriting the defaults
- Remove the temporary backup directory
-
Report the result to the user