You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: S3 object-storage command suite + serverless (container/batchjob, pre-release) (#45)
* feat(serverless): add container + batchjob commands
`verda serverless container` and `verda serverless batchjob` manage the
two serverless deployment shapes on Verda Cloud: always-on HTTPS endpoints
and one-shot batch jobs. The web UI's "Deployment type" radio maps to the
subcommand choice; each subcommand calls its own SDK service
(/container-deployments vs /job-deployments).
refactor s3 and add tui for it
Copy file name to clipboardExpand all lines: AGENTS.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,10 @@ Skipping these steps leads to pattern violations, broken dual-mode, and pricing
29
29
## Execution Rules
30
30
31
31
-**Follow existing patterns** — find the nearest similar command, match its structure
32
+
-**Senior comment style** — default to no comments. Add one only when the WHY is non-obvious (invariant, workaround, gotcha, evolution point). One line, identifier-first. Never narrate WHAT — well-named identifiers do that. Delete comments when the reason expires. See CLAUDE.md "Comment style — write like a senior"
32
33
-**Preserve dual mode** — every command must work interactive AND non-interactive. Never build one without the other
34
+
-**Interactive hint bar** — every direct `prompter.Select(...)` outside the wizard engine must pass `tui.WithShowHints(true)` (and the equivalent option on `MultiSelect`) so the prompt renders its key hints below the choices. Wizard steps are exempt — the composite already renders the hint bar
35
+
-**Ctrl+C exits immediately, no confirmation** — use `cmdutil.IsPromptCancel(err)` to detect either Esc or Ctrl+C and return cleanly. When a flow needs different behavior per key (e.g. a "Back to list / Exit" gate where Esc means back), split with `IsPromptInterrupt(err)` (Ctrl+C) and `IsPromptBack(err)` (Esc). Never show an "Exit?" confirmation dialog — Unix users expect Ctrl+C to be terminal
33
36
-**Never modify `verdagostack`** directly — describe needed changes for the maintainer
34
37
-**Commit only when asked** — don't auto-commit
35
38
@@ -50,6 +53,51 @@ Skipping these steps leads to pattern violations, broken dual-mode, and pricing
50
53
-[ ]`make test` passes (runs lint + unit tests)
51
54
-[ ]`--help` renders correctly for changed commands
52
55
-[ ] Interactive and non-interactive modes both work
56
+
-[ ] Interactive Selects pass `tui.WithShowHints(true)` so the hint bar renders
53
57
-[ ] No leftover debug code, TODOs, or commented-out blocks
54
58
55
59
If `make lint` reports issues, fix them *before* announcing completion. See `CLAUDE.md` § "Go House Style" for the patterns that prevent the common hits (http.NoBody, American spelling, reused constants, rangeValCopy, nilerr annotations, etc.).
60
+
61
+
<!-- gitnexus:start -->
62
+
# GitNexus — Code Intelligence
63
+
64
+
This project is indexed by GitNexus as **verda-cli** (7546 symbols, 19146 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
65
+
66
+
> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.
67
+
68
+
## Always Do
69
+
70
+
-**MUST run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `gitnexus_impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user.
71
+
-**MUST run `gitnexus_detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows.
72
+
-**MUST warn the user** if impact analysis returns HIGH or CRITICAL risk before proceeding with edits.
73
+
- When exploring unfamiliar code, use `gitnexus_query({query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance.
74
+
- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `gitnexus_context({name: "symbolName"})`.
75
+
76
+
## Never Do
77
+
78
+
- NEVER edit a function, class, or method without first running `gitnexus_impact` on it.
79
+
- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis.
80
+
- NEVER rename symbols with find-and-replace — use `gitnexus_rename` which understands the call graph.
81
+
- NEVER commit changes without running `gitnexus_detect_changes()` to check affected scope.
82
+
83
+
## Resources
84
+
85
+
| Resource | Use for |
86
+
|----------|---------|
87
+
|`gitnexus://repo/verda-cli/context`| Codebase overview, check index freshness |
88
+
|`gitnexus://repo/verda-cli/clusters`| All functional areas |
89
+
|`gitnexus://repo/verda-cli/processes`| All execution flows |
Copy file name to clipboardExpand all lines: CLAUDE.md
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,15 @@ The repo lints with `golangci-lint` via `make lint` (included in `make test`). T
84
84
85
85
`.golangci.yaml` is the authoritative list — all of the above come from linters enabled there.
86
86
87
+
### Comment style — write like a senior
88
+
89
+
-**Default to no comment.** Well-named identifiers carry the meaning. Add a comment only when the *why* is non-obvious: an invariant, a workaround, a gotcha a future reader would miss, an evolution point.
-**Never narrate WHAT.**`// Loop over deployments and build labels` is noise — delete it.
92
+
-**Capture invariants, not history.**`// Describe still succeeds if status RPC fails.` is durable. `// Added for ticket VC-1234` rots — put it in the commit message.
93
+
-**Flag known evolution points.**`// if SDK gains json:"status", switch to explicit fields.` documents a future-failure mode so the next reader doesn't have to rediscover it.
94
+
-**Delete when the reason expires.** Workaround landed, gotcha fixed, SDK gap closed → remove the comment in the same commit.
@@ -98,6 +107,12 @@ The repo lints with `golangci-lint` via `make lint` (included in `make test`). T
98
107
- Require `prompter.Confirm()` — return nil on cancel or Esc
99
108
- In agent mode (`f.AgentMode()`): require `--yes` flag, never auto-confirm
100
109
110
+
### Interactive commands MUST:
111
+
112
+
-**Show the hint bar at the bottom of every direct `Prompter.Select`** — pass `tui.WithShowHints(true)` to render `↑/↓ navigate · type to filter · enter select · esc back · ctrl+c exit` below the choices. Same for `MultiSelect` via the equivalent option. Wizard step Loaders are exempt — the wizard composite already renders its own hint bar; double-rendering is a bug.
113
+
-**Treat Ctrl+C as a hard exit, Esc as a soft back** — never show a confirmation dialog on either. Unix users expect Ctrl+C to be terminal; an "Exit?" prompt is friction, and confirmation dialogs themselves can be cancelled which makes the design contradictory. Use `cmdutil.IsPromptInterrupt(err)` for Ctrl+C and `cmdutil.IsPromptBack(err)` for Esc when the two need different handling (e.g. in a "Back to list / Exit" gate, Esc returns to the list while Ctrl+C exits the whole loop). Both are cleanly distinguishable via `cmdutil.IsPromptCancel(err)` if a flow doesn't care which key triggered it.
114
+
-**Use `cmdutil.IsPromptCancel(err)`** — never bare-`return nil` on prompter errors; distinguish clean Ctrl+C / Esc from real I/O failures and propagate the latter.
115
+
101
116
### Pricing — get this wrong and users get billed wrong:
102
117
103
118
- Instance `price_per_hour` from API is **per-unit** (per-GPU or per-vCPU)
@@ -154,3 +169,47 @@ If you modified a command, also verify:
154
169
## Other Agents
155
170
156
171
This repo targets Claude Code and OpenAI Codex. Claude auto-loads this file; Codex auto-loads `AGENTS.md` (execution contract). A `.cursor/rules/main.mdc` pointer exists for Cursor users but is not a primary target — if Cursor drops out of the stack, delete it rather than letting it drift.
172
+
173
+
<!-- gitnexus:start -->
174
+
# GitNexus — Code Intelligence
175
+
176
+
This project is indexed by GitNexus as **verda-cli** (7546 symbols, 19146 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
177
+
178
+
> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.
179
+
180
+
## Always Do
181
+
182
+
-**MUST run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `gitnexus_impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user.
183
+
-**MUST run `gitnexus_detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows.
184
+
-**MUST warn the user** if impact analysis returns HIGH or CRITICAL risk before proceeding with edits.
185
+
- When exploring unfamiliar code, use `gitnexus_query({query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance.
186
+
- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `gitnexus_context({name: "symbolName"})`.
187
+
188
+
## Never Do
189
+
190
+
- NEVER edit a function, class, or method without first running `gitnexus_impact` on it.
191
+
- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis.
192
+
- NEVER rename symbols with find-and-replace — use `gitnexus_rename` which understands the call graph.
193
+
- NEVER commit changes without running `gitnexus_detect_changes()` to check affected scope.
194
+
195
+
## Resources
196
+
197
+
| Resource | Use for |
198
+
|----------|---------|
199
+
|`gitnexus://repo/verda-cli/context`| Codebase overview, check index freshness |
200
+
|`gitnexus://repo/verda-cli/clusters`| All functional areas |
201
+
|`gitnexus://repo/verda-cli/processes`| All execution flows |
0 commit comments