Summary
charter adf init --module frontend fails with a misleading message when .ai/ already exists:
.ai/ already exists at .ai/
Use --force (or --yes) to overwrite.
The --module flag implies adding a single module to the existing directory, but the command treats it as a full re-initialization. Using --yes works but regenerates all files (manifest.adf, core.adf, state.adf) — potentially overwriting customized content.
Steps to Reproduce
charter bootstrap --yes # creates .ai/ with core.adf, state.adf, manifest.adf
# customize core.adf ...
charter adf init --module frontend # fails
charter adf init --module frontend --yes # works but regenerates everything
Expected Behavior
adf init --module <name> with an existing .ai/ directory should:
- Create only the specified module file if it doesn't exist
- Register it in the manifest if not already listed
- Leave all other files untouched
Actual Behavior
- Without
--yes: fails entirely with "already exists" error
- With
--yes: recreates all ADF files, potentially losing customizations to core.adf
Suggested Fix
Separate the "add a single module" path from the "initialize entire ADF directory" path. When --module is specified and .ai/ exists, operate additively on just that module.
Summary
charter adf init --module frontendfails with a misleading message when.ai/already exists:The
--moduleflag implies adding a single module to the existing directory, but the command treats it as a full re-initialization. Using--yesworks but regenerates all files (manifest.adf, core.adf, state.adf) — potentially overwriting customized content.Steps to Reproduce
Expected Behavior
adf init --module <name>with an existing.ai/directory should:Actual Behavior
--yes: fails entirely with "already exists" error--yes: recreates all ADF files, potentially losing customizations to core.adfSuggested Fix
Separate the "add a single module" path from the "initialize entire ADF directory" path. When
--moduleis specified and.ai/exists, operate additively on just that module.