Archived
Add submarine TUI prototype with mock data
Bubble Tea prototype for browsing repositories with many nested git submodules: collapsible tree, pins shown as ref + distance, summarized issue words with severity levels, detail pane, async loading via a Provider interface backed by mock data. Includes docs/ with requirements, state model, UX guide, architecture and decision log, plus AGENTS.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# AGENTS.md
|
||||
|
||||
submarine: a Go + Bubble Tea TUI for repositories with many git submodules.
|
||||
Currently a prototype on mock data.
|
||||
|
||||
## Read first
|
||||
|
||||
The `docs/` folder is the source of truth for requirements, state rules, UX
|
||||
and decisions. Read the relevant document before changing behavior:
|
||||
|
||||
- [docs/README.md](docs/README.md): overview, status, next steps
|
||||
- [docs/requirements.md](docs/requirements.md): what the tool must do
|
||||
- [docs/state-model.md](docs/state-model.md): states, issues, levels, pin → ref resolution
|
||||
- [docs/ux-guide.md](docs/ux-guide.md): layout, colors, wording, key bindings
|
||||
- [docs/architecture.md](docs/architecture.md): packages, provider boundary, loading, testing
|
||||
- [docs/decisions.md](docs/decisions.md): decision log with rationale
|
||||
|
||||
## Commands
|
||||
|
||||
```sh
|
||||
go run ./cmd/submarine # run (mock data)
|
||||
go vet ./...
|
||||
go test ./...
|
||||
gofmt -l . # must print nothing
|
||||
```
|
||||
|
||||
## Rules
|
||||
|
||||
- **Keep docs in sync.** A change to behavior, keys, colors, wording or
|
||||
architecture updates the matching document in `docs/`. A new significant
|
||||
decision gets an entry in `docs/decisions.md`.
|
||||
- **Layering.** `internal/submodule` has no UI imports and decides what a
|
||||
state means (`Status.Issues()`). `internal/tui/theme` decides how it looks.
|
||||
Components never classify states or define colors themselves.
|
||||
- **Data access** only through `submodule.Provider`.
|
||||
- **Colors** only from `theme.Theme`, ANSI 16 colors for meaning (see
|
||||
`docs/ux-guide.md#colors`). Render segments on a background with a `base`
|
||||
style (`LevelStyle(level, base)`, `Delta(pin, base)`).
|
||||
- **Tree navigation** stays in plain methods on `tree.Model` with unit tests
|
||||
in `internal/tui/tree/tree_test.go`.
|
||||
- **Verify UI changes** by running the app, e.g. headless in tmux (see
|
||||
`docs/architecture.md#testing`), not only by tests.
|
||||
Reference in New Issue
Block a user