Skip to content

refactor(config): remove github_repo_directory and github_repo_url#8

Merged
jkyberneees merged 1 commit into
mainfrom
remove-github-repo-attrs
Jun 6, 2026
Merged

refactor(config): remove github_repo_directory and github_repo_url#8
jkyberneees merged 1 commit into
mainfrom
remove-github-repo-attrs

Conversation

@jkyberneees
Copy link
Copy Markdown
Contributor

Summary

Removes the github_repo_directory and github_repo_url configuration attributes and all their plumbing across the config precedence chain.

These attributes were largely informational:

  • github_repo_url was purely informational — it only ever appeared in prompt text (the shared system prompt and the Telegram "Quick Facts" block).
  • github_repo_directory was informational in the same way, plus had one functional effect: the Telegram entrypoint os.Chdir'd into it so tools like search_files scanned the project tree. The REPL and run entrypoints only mentioned it in the prompt.

Changes

Removed every consumption and definition site:

  • Config precedence chain (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), including expandEnv handling and the merge/override logic.
  • Struct fields: dropped from CLIFlags, Config, and ResolvedConfig, plus the runFlags fields and LoadConfig wiring.
  • System prompt (buildSystemPrompt): removed the appended "Repository directory / URL" context block.
  • REPL (repl.go): removed the extra repo-directory hint line.
  • Telegram (telegram.go): removed the "Source code" Quick Fact, the os.Chdir into the repo directory, and the /new "Repo:" reset line.
  • Scaffolding: removed the config template entry and the init help text line.
  • Tests (main_test.go): updated buildSystemPrompt tests that referenced the removed fields.

Verification

  • go build ./... — passes
  • go vet ./cmd/odek/... ./internal/config/... — clean
  • go test ./cmd/odek/... — passes
  • Remaining internal/config test failures are pre-existing on main (a leaking env var causes the suite to read the user's real ~/.odek config) and are unrelated to this change.

🤖 Generated with Claude Code

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>
@jkyberneees jkyberneees changed the title Remove github_repo_directory and github_repo_url config attributes refactor(config): remove github_repo_directory and github_repo_url Jun 6, 2026
@jkyberneees jkyberneees merged commit 119b6b0 into main Jun 6, 2026
6 checks passed
@jkyberneees jkyberneees deleted the remove-github-repo-attrs branch June 6, 2026 06:37
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.

1 participant