-
Notifications
You must be signed in to change notification settings - Fork 8
Reverse gap analysis: adopt parity innovations #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
954a31f
Fix profile catalog parity and extract test helper
jeremy 5fd85da
Add check-toolchain guard and coverage alias to Makefile
jeremy a1eec50
Fall back to debug.ReadBuildInfo for version detection
jeremy d0303be
Use XDG_STATE_HOME for resilience state on Linux/BSD
jeremy 10bae46
Add in-repo .surface baseline with shared surface package
jeremy 4c822dd
Add skill install subcommand
jeremy 54b6dad
Add editor package and --edit flag for comment and message commands
jeremy 9a3f756
Add STYLE.md and enrich SKILL.md with jq patterns and exit codes
jeremy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| @STYLE.md | ||
|
|
||
| # Basecamp CLI Development Context | ||
|
|
||
| ## Getting Started | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Basecamp CLI Style Guide | ||
|
|
||
| Conventions for contributors and agents working on basecamp-cli. | ||
|
|
||
| ## Command Constructors | ||
|
|
||
| Exported `NewXxxCmd() *cobra.Command` — one per top-level command group in `internal/commands/`. | ||
| Subcommands are unexported `newXxxYyyCmd()` added via `cmd.AddCommand()`. | ||
|
|
||
| ## Output | ||
|
|
||
| Success: `app.OK(data, ...options)` with optional `WithBreadcrumbs`, `WithSummary`, `WithContext`. | ||
| Errors: `output.ErrUsage()`, `output.ErrNotFound()`, SDK error conversion via `output.AsError()`. | ||
|
|
||
| ## Config Resolution | ||
|
|
||
| 6-layer precedence: flags > env > local > repo > global > system > defaults. | ||
| Trust boundaries enforced via `config.TrustStore`. | ||
| Source tracking via `cfg.Sources["field_name"]` records provenance of each value. | ||
|
|
||
| ## Catalog | ||
|
|
||
| Static `commandCategories()` in `commands.go`. Every registered command must appear. | ||
| `TestCatalogMatchesRegisteredCommands` enforces bidirectional parity. | ||
|
|
||
| ## Method Ordering | ||
|
|
||
| Invocation order: constructor, RunE, then helpers called by RunE. | ||
| Export order: public before private. | ||
|
|
||
| ## File Organization | ||
|
|
||
| One file per top-level command group in `internal/commands/`. | ||
| Shortcut commands (e.g., `todo`, `done`, `comment`) live alongside their parent group. |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package appctx | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/basecamp/basecamp-cli/internal/config" | ||
| "github.com/basecamp/basecamp-cli/internal/resilience" | ||
| ) | ||
|
|
||
| func TestResolveResilienceDirDefault(t *testing.T) { | ||
| cfg := &config.Config{ | ||
| CacheDir: "/home/user/.cache/basecamp", | ||
| Sources: map[string]string{}, | ||
| } | ||
| got := resolveResilienceDir(cfg) | ||
| if got != "" { | ||
| t.Errorf("resolveResilienceDir() = %q, want empty (delegate to defaultStateDir)", got) | ||
| } | ||
| } | ||
|
|
||
| func TestResolveResilienceDirExplicit(t *testing.T) { | ||
| cfg := &config.Config{ | ||
| CacheDir: "/custom/cache", | ||
| Sources: map[string]string{"cache_dir": "flag"}, | ||
| } | ||
| got := resolveResilienceDir(cfg) | ||
| want := "/custom/cache/" + resilience.DefaultDirName | ||
| if got != want { | ||
| t.Errorf("resolveResilienceDir() = %q, want %q", got, want) | ||
| } | ||
| } |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.