Skip to content

fix(adf): make adf init --module additive when .ai/ exists#13

Merged
SmartBrandStrategies merged 1 commit intomainfrom
fix/adf-init-additive-module
Mar 3, 2026
Merged

fix(adf): make adf init --module additive when .ai/ exists#13
SmartBrandStrategies merged 1 commit intomainfrom
fix/adf-init-additive-module

Conversation

@SmartBrandStrategies
Copy link
Copy Markdown
Contributor

Summary

  • When --module <name> is passed to adf init and .ai/ already exists, delegate to adf create to scaffold only the specified module and register it in ON_DEMAND
  • No other files are touched — core.adf, state.adf, manifest.adf remain as-is
  • When .ai/ doesn't exist, errors with a clear message pointing to charter adf init
  • Added --module to the "already exists" hint message and help text

Previously:

  • Without --yes: failed with "already exists" error
  • With --yes: regenerated all scaffold files, potentially losing customizations

Closes #5

Test plan

  • charter adf init on clean project → scaffolds all files (unchanged behavior)
  • charter adf init --module logging on existing .ai/ → creates only logging.adf, registers in manifest
  • charter adf init --module frontend on existing .ai/ with frontend.adf → reports already exists/registered
  • charter adf init --module infra without .ai/ → clear error message
  • All 200 existing tests pass, LOC ceiling at 590/650

🤖 Generated with Claude Code

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>
@SmartBrandStrategies SmartBrandStrategies merged commit 5c39367 into main Mar 3, 2026
4 checks passed
@SmartBrandStrategies SmartBrandStrategies deleted the fix/adf-init-additive-module branch March 3, 2026 00:21
SmartBrandStrategies pushed a commit that referenced this pull request Mar 3, 2026
Link merged PRs #13-#17 to their issues and record merge SHAs.
Phase 1 (blocking bugs) and Phase 2 (bootstrap/migrate features) are
fully landed. Phase 3 (ADF architecture P0) is now unblocked.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SmartBrandStrategies pushed a commit that referenced this pull request Mar 3, 2026
Comprehensive changelog entries for 7 issues (#3-#9) across 7 PRs
(#13-#19) covering bootstrap fixes, docs preset, migrate improvements,
bundler architecture split, and unified evidence pipeline.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(adf): adf init --module <name> should be additive when .ai/ exists

2 participants