-
Notifications
You must be signed in to change notification settings - Fork 0
[codex] create sessions from unmatched picker input #1
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
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5b7c55e
create sessions from unmatched picker input
uzulla 62f2bda
guard invalid picker-created session names
uzulla 365cd92
Add documentation for conventions, core structure, memory maintenance…
uzulla c86cc18
Address CodeRabbit review on PR #1
uzulla 0cc8acf
Normalize TUI-created session names to the safe charset
uzulla 1973479
Ignore Claude Code runtime dir (.claude/)
uzulla 014c0b2
Never create or attach dash-leading session names
uzulla 7a2fea9
Label sanitized name as (existing) when it collides with a session
uzulla c041d31
Base (existing) label on real sessions, not the injected cwd default
uzulla fc9df4a
Clarify whitespace-trim docs and fix memory-file nits
uzulla 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
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 |
|---|---|---|
|
|
@@ -3,3 +3,4 @@ | |
| *.test | ||
| *.out | ||
| /tmp | ||
| /.claude/ | ||
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,2 @@ | ||
| /cache | ||
| /project.local.yml |
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,6 @@ | ||
| # Conventions | ||
|
|
||
| - Keep package boundaries narrow: CLI branching in `cmd/shp`, path-to-name logic in `internal/session`, shpool process/list parsing in `internal/shpool`, picker state/rendering in `internal/tui`. | ||
| - Session names are cwd/home-relative path strings with `/` mapped to `.`, only `[A-Za-z0-9._-]` preserved, other chars mapped to `_`, and short hash suffix added when needed for collision mitigation. | ||
| - Attach always uses `shpool attach [ -f ] --dir . <name>` so newly-created sessions start in the current directory. | ||
| - TUI filtering is case-insensitive substring AND over whitespace-separated tokens; Backspace deletes by rune; default cwd item is prepended/deduped and labeled `(cwd)`. |
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,6 @@ | ||
| # Core | ||
|
|
||
| - Go CLI wrapping `shpool attach`; executable entrypoint `cmd/shp/main.go`. | ||
| - Packages: `internal/session` derives session names from cwd/path; `internal/shpool` wraps `shpool` CLI list/attach; `internal/tui` is the Bubble Tea picker. | ||
| - `shp` with no args shows TUI using cwd-derived default plus existing `shpool list` sessions; explicit names bypass TUI and attach directly. | ||
| - Read `mem:tech_stack` for tools/deps, `mem:conventions` for implementation style, `mem:suggested_commands` for local commands, `mem:task_completion` before finishing coding tasks. |
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,33 @@ | ||
| # Memory Maintenance | ||
|
|
||
| ## Discovery Model | ||
|
|
||
| - Core principle: progressive discovery through references, building a graph of memories. | ||
| - Initially, agents are provided with the list of all memories (names only). | ||
| - Agents should read `mem:core` as the top-level entry point (graph root). | ||
| This memory should contain references to other memories covering major project domains. | ||
| The referenced memories shall, in turn, contain references to even more specific memories, and so on. | ||
| The depth of the graph shall depend on the project complexity. | ||
| - Use topics/folders to group related memories in order to make the content structure explicit. | ||
| Folders can mirror project structure (e.g. modules like frontend/backend) or topics like debugging, architecture, etc. | ||
| - Memory references must use a mem: prefix inside backticks, e.g. `mem:frontend/core`. | ||
| The surrounding text should clearly indicate when to read the memory/which content to expect. | ||
| The text should provide more precise guidance than the memory name alone, | ||
| i.e. avoid a reference like "frontend debugging: `mem:frontend/debugging` and instead make clear which aspects of frontend debugging are covered. | ||
| - Memories themselves should not contain information about when to read them; this is the responsibility of the referring memory. | ||
|
|
||
| ## Style | ||
|
|
||
| Dense agent notes, not prose docs. Prefer invariants, terse bullets. | ||
| Avoid obvious context, rationale, and examples unless they prevent likely mistakes. | ||
| Keep guidance durable and generalizable, not task-local. | ||
|
|
||
| ## Add/update threshold | ||
|
|
||
| Add or update memories only with stable, non-obvious project conventions that avoid complex rediscovery in the future. | ||
| Do not add: quick-read facts; generic language/framework knowledge; one-off task notes; volatile line-level details; behavior likely to change soon. | ||
|
|
||
| ## Maintenance Actions | ||
|
|
||
| - Renaming memories: References are updated automatically if handled via Serena's memory rename tool. | ||
| - Checking for stale memories (e.g. after deletion): Call `serena memories check` for a report. |
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,7 @@ | ||
| # Suggested Commands | ||
|
|
||
| - `mise install` installs the pinned Go toolchain. | ||
| - `mise run build` builds `./bin/shp`; equivalent: `go build -o ./bin/shp ./cmd/shp`. | ||
| - `mise run test` runs `go test ./...`; `mise run vet` runs `go vet ./...`; `mise run check` runs both. | ||
| - `go run ./cmd/shp --print-name` exercises session-name generation without requiring `shpool` runtime behavior. | ||
| - `go run ./cmd/shp --help` checks CLI usage text. |
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,6 @@ | ||
| # Task Completion | ||
|
|
||
| - Run `gofmt` on changed Go files. | ||
| - Run `go test ./...` for coding changes. | ||
| - Run `go vet ./...` when behavior crosses package boundaries or before release-level changes; `mise run check` covers vet + tests. | ||
| - For TUI behavior changes, add/adjust unit tests in `internal/tui/select_test.go`; avoid relying only on manual interactive checks. |
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,5 @@ | ||
| # Tech Stack | ||
|
|
||
| - Go module `github.com/uzulla/shpool-launch`; Go version pinned in `go.mod` as `go 1.25.10`, mise pins `go = "1.25"`. | ||
| - Dependencies are intentionally small: Bubble Tea v1 and Lipgloss for TUI; standard library `flag` for CLI parsing; `syscall.Exec` for attach handoff. | ||
| - Build/install/test tasks are defined in `mise.toml`; plain `go` commands also work. |
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
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.