Skip to content

refactor: move schedule commands under project/defaults groups#9

Merged
Flyrell merged 2 commits intomainfrom
refactor/project-schedule
Mar 15, 2026
Merged

refactor: move schedule commands under project/defaults groups#9
Flyrell merged 2 commits intomainfrom
refactor/project-schedule

Conversation

@Flyrell
Copy link
Owner

@Flyrell Flyrell commented Mar 15, 2026

Summary

  • Move config get/set/reset/report commands under project schedule as a subcommand group
  • Move defaults get/set/reset/report under defaults schedule subcommand group
  • Add optional [PROJECT] positional arg and --project/-p flag to project remove and project assign for auto-detection from repo config
  • Consolidate project resolution to use ResolveProjectContext() consistently across commands
  • Centralize day budget computation into timetrack.ComputeDayBudget() and fix status idle trimming
  • Rename all related files, variables, functions, and tests to match the new structure
  • Update README.md, CLAUDE.md, and web/docs markdown files

Test plan

  • Run task test — all existing and new tests pass
  • Run task lint — no lint errors
  • Verify hourgit project schedule get works (previously hourgit config get)
  • Verify hourgit defaults schedule get works (previously hourgit defaults get)
  • Verify hourgit project assign auto-detects project from repo config
  • Verify hourgit project remove auto-detects project from repo config
  • Verify help output reflects the new command hierarchy

🤖 Generated with Claude Code

Flyrell and others added 2 commits March 15, 2026 22:27
Restructure CLI command hierarchy:
- config get/set/reset/report -> project schedule get/set/reset/report
- defaults get/set/reset/report -> defaults schedule get/set/reset/report

Rename files to match new structure (config_*.go -> schedule_*.go,
defaults_*.go -> defaults_schedule_*.go). Add --project flag and
optional positional arg to project remove and project assign for
auto-detection from repo config. Update README, web docs, and tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ProjectContext

The resolveProjectFromRepo() helper in project_remove.go duplicated
the logic already provided by ResolveProjectContext(). Both
project_remove.go and project_assign.go now use the shared resolver,
reducing maintenance surface and keeping project resolution consistent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Flyrell Flyrell merged commit 999f4e8 into main Mar 15, 2026
2 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.

1 participant