refactor(config): remove github_repo_directory and github_repo_url#8
Merged
Conversation
Drop the github_repo_directory and github_repo_url configuration attributes and all their plumbing. These were largely informational: github_repo_url only ever appeared in prompt text (system prompt and Telegram Quick Facts), and github_repo_directory added prompt text plus a Telegram-only os.Chdir into the project tree. Removed across the precedence chain: - Config file keys, ODEK_GITHUB_REPO_* env vars, and --github-repo-dir / --github-repo-url CLI flags (internal/config/loader.go, cmd/odek/main.go) - CLIFlags, Config, and ResolvedConfig struct fields plus expandEnv/merge handling - System prompt repo context block (buildSystemPrompt) - REPL repo hint, Telegram Quick Facts source line, Telegram chdir, and the /new repo line - Config template entry and help text - Associated test references Co-Authored-By: Claude Opus 4.8 (1M context) <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
Removes the
github_repo_directoryandgithub_repo_urlconfiguration attributes and all their plumbing across the config precedence chain.These attributes were largely informational:
github_repo_urlwas purely informational — it only ever appeared in prompt text (the shared system prompt and the Telegram "Quick Facts" block).github_repo_directorywas informational in the same way, plus had one functional effect: the Telegram entrypointos.Chdir'd into it so tools likesearch_filesscanned the project tree. The REPL andrunentrypoints only mentioned it in the prompt.Changes
Removed every consumption and definition site:
internal/config/loader.go,cmd/odek/main.go): config file keys (github_repo_directory,github_repo_url), env vars (ODEK_GITHUB_REPO_DIRECTORY,ODEK_GITHUB_REPO_URL), and CLI flags (--github-repo-dir,--github-repo-url), includingexpandEnvhandling and the merge/override logic.CLIFlags,Config, andResolvedConfig, plus therunFlagsfields andLoadConfigwiring.buildSystemPrompt): removed the appended "Repository directory / URL" context block.repl.go): removed the extra repo-directory hint line.telegram.go): removed the "Source code" Quick Fact, theos.Chdirinto the repo directory, and the/new"Repo:" reset line.inithelp text line.main_test.go): updatedbuildSystemPrompttests that referenced the removed fields.Verification
go build ./...— passesgo vet ./cmd/odek/... ./internal/config/...— cleango test ./cmd/odek/...— passesinternal/configtest failures are pre-existing onmain(a leaking env var causes the suite to read the user's real~/.odekconfig) and are unrelated to this change.🤖 Generated with Claude Code