Parse $ARGUMENTS:
- First positional arg = path to add
--id <name>= optional explicit id (defaults to dirname of path)
Validate path exists:
ls "$PATH_ARG" 2>/dev/null || echo "PATH_NOT_FOUND"If the path doesn't exist, offer to create it.
Check for duplicate: Read
planning-config.tomland verify the path isn't already registered. If already present, show the existing entry and exit.Ensure
.planning/exists:mkdir -p "$PATH_ARG/.planning"Append
[[planning.roots]]entry toplanning-config.toml:[[planning.roots]] id = "<id>" path = "<path>" planningDir = ".planning" discover = falseConfirm:
✓ Added [<id>] → <path>/.planning/