fix(adf): make adf init --module additive when .ai/ exists#13
Merged
SmartBrandStrategies merged 1 commit intomainfrom Mar 3, 2026
Merged
fix(adf): make adf init --module additive when .ai/ exists#13SmartBrandStrategies merged 1 commit intomainfrom
SmartBrandStrategies merged 1 commit intomainfrom
Conversation
When --module <name> is passed and .ai/ already has a manifest, delegate
to `adf create` to scaffold only the specified module and register it in
ON_DEMAND — without touching core.adf, state.adf, or any other files.
Previously the command either refused ("already exists") or with --yes
regenerated all scaffold files, potentially losing customizations.
Closes #5
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--module <name>is passed toadf initand.ai/already exists, delegate toadf createto scaffold only the specified module and register it inON_DEMANDcore.adf,state.adf,manifest.adfremain as-is.ai/doesn't exist, errors with a clear message pointing tocharter adf init--moduleto the "already exists" hint message and help textPreviously:
--yes: failed with "already exists" error--yes: regenerated all scaffold files, potentially losing customizationsCloses #5
Test plan
charter adf initon clean project → scaffolds all files (unchanged behavior)charter adf init --module loggingon existing.ai/→ creates onlylogging.adf, registers in manifestcharter adf init --module frontendon existing.ai/withfrontend.adf→ reports already exists/registeredcharter adf init --module infrawithout.ai/→ clear error message🤖 Generated with Claude Code