Skip to content

feat(cli): add --remove-language and language add/remove e2e#193

Merged
markcallen merged 6 commits into
mainfrom
feat/remove-language-flag-e2e
May 27, 2026
Merged

feat(cli): add --remove-language and language add/remove e2e#193
markcallen merged 6 commits into
mainfrom
feat/remove-language-flag-e2e

Conversation

@markcallen

Copy link
Copy Markdown
Contributor

Summary

  • add Existing CLAUDE.md found at /home/marka/src/ballast/CLAUDE.md. Patch the Installed agent rules section? [y/N]: Existing CLAUDE.md found at /home/marka/src/ballast/CLAUDE.md. Patch the Installed agent rules section? [y/N]: support in wrapper monorepo flow
  • remove temporary typo variant and keep only correct flag spelling
  • update docs and help text for language removal behavior
  • add end-to-end coverage that adds a language, validates , removes it, and validates cleanup

Validation

  • go test ./... (in )
  • scripts/e2e-add-remove-language-existing-install.sh

Copilot AI review requested due to automatic review settings May 26, 2026 15:51
@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.39216% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/ballast/main.go 80.39% 6 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds language-removal support to the Ballast wrapper’s monorepo install flow so users can drop one or more configured languages, persist the updated .rulesrc.json, and prune stale Ballast-managed rule files.

Changes:

  • Add --remove-language handling in the wrapper monorepo planner, including validation and cleanup-only execution paths.
  • Update CLI help text and documentation to describe language removal behavior.
  • Add unit + e2e coverage for adding a language, validating install artifacts, removing it, and validating cleanup.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/e2e-add-remove-language-existing-install.sh New e2e script exercising add/remove language and filesystem/config cleanup.
README.md Document --remove-language and clarify wrapper install behavior.
docs/installation.md Mirror docs updates for --remove-language.
cli/ballast/main.go Implement parsing/validation of --remove-language, monorepo plan filtering, and flag stripping.
cli/ballast/main_test.go Add unit tests covering cleanup-only plan creation and end-to-end wrapper cleanup behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

trap 'rm -rf "${WORKDIR}"' EXIT

# shellcheck source=./e2e/helpers.sh
source "${REPO_ROOT}/scripts/e2e/helpers.sh"
Comment thread cli/ballast/main.go
Comment on lines +922 to +943
func parseRemoveLanguageValues(args []string) []string {
return findFlagValues(args, "--remove-language", "")
}

func validateSelectedLanguages(values []string) error {
if len(values) == 0 {
return nil
}
allowed := map[string]struct{}{}
for _, lang := range supportedLanguages {
allowed[string(lang)] = struct{}{}
}
for _, value := range values {
if _, ok := allowed[value]; !ok {
return fmt.Errorf(
"invalid --remove-language: %s (valid: %s)",
value,
strings.Join(languageNames(), ", "),
)
}
}
return nil
Copilot AI review requested due to automatic review settings May 26, 2026 23:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comment thread cli/ballast/main.go Outdated
}
cleanupOnly := len(removeTargets) > 0 && len(requestedTargets) == 0 && !explicitAgentSelection && !explicitSkillSelection
if !cleanupOnly && (len(requestedTargets) == 0 || ((len(installAgents) == 0 && !installAll) && (len(installSkills) == 0 && !installAllSkills))) {
languageCleanupOnly := len(removeLanguages) > 0 && !explicitAgentSelection && !explicitSkillSelection
@@ -0,0 +1,53 @@
#!/usr/bin/env bash
Comment thread .pre-commit-config.yaml
Comment on lines +15 to +16
- id: end-of-file-fixer
- id: trailing-whitespace
@markcallen markcallen merged commit 6cde255 into main May 27, 2026
40 checks passed
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.

2 participants