Files
krust/AGENTS.md
T
Erfan Yousefi ffa8a7cb50 feat: establish krust v0.1 foundation with k9s-compatible UX and OSS release scaffolding
This commit consolidates the first production-ready baseline for krust, including core runtime behavior, operator UX, safety rails, and project publication assets.\n\nCore runtime and architecture\n- Implement lazy, active-scope watch-plan reconciliation across contexts/kinds/namespaces\n- Keep warm-context retention bounded by TTL for faster context switching\n- Add bounded watch reconnect handling and terminal handling for RBAC-forbidden watchers\n- Keep invalidation-driven rendering with FPS control and bounded log/state paths\n\nOperator UX and workflows\n- Expand k9s-style navigation/command aliases for supported Kubernetes resources\n- Improve pane consistency for table/detail/log overlays and scrolling behavior\n- Add detail viewer search semantics (non-destructive search/highlight) with match navigation\n- Add YAML/JSON detail format toggle and syntax highlighting for both formats\n- Add secret decode pane improvements and format-aware edit/apply behavior\n- Add clipboard copy and dump flows with native backend + OSC52 fallback\n\nSafety and action model\n- Keep readonly enforcement for mutation paths\n- Maintain guarded action behavior and clearer error/status surfacing\n\nDocumentation and open-source readiness\n- Rewrite README for community-facing onboarding and operational clarity\n- Add architecture and performance guides under docs/\n- Add CONTRIBUTING guide and PR template\n- Add GitHub Actions CI pipeline (fmt/check/test/release build)\n- Add GitHub Actions release pipeline for tagged multi-platform artifacts\n- Add Cargo package metadata and repository links\n- Add .gitignore hygiene for macOS Finder artifacts\n\nQuality and verification\n- Bring strict clippy (-D warnings) to clean state for current codebase\n- Validate full required pipeline: fmt, check, test, and release build
2026-03-08 03:29:19 +01:00

3.2 KiB

AGENTS.md

Project Intent

krust is a latency-first, power-user Kubernetes TUI for very large environments:

  • many contexts/clusters
  • many resources per cluster
  • frequent churn

Agent behavior must prioritize snappiness and controlled API pressure over feature breadth.

Mandatory Change Pipeline

After every code change, run validation in this order:

  1. cargo fmt --all
  2. cargo check
  3. cargo test
  4. cargo build --release

Rules:

  • If tests fail, do not proceed to release build until fixed.
  • Always report all four outcomes in the update.

Commit Autonomy And Authorization

Agents are allowed to decide logical commit boundaries while working, especially when moving from one feature/fix area to another.

Hard rule:

  • Before creating a commit, stop and request explicit user authorization.
  • No commit without a clear user approval in the current thread.

Commit request format:

  • Summary of what will be committed
  • Files touched
  • Validation status (fmt/check/test/release)
  • Proposed commit title

Performance Thinking Model (Non-Negotiable)

When designing or changing behavior, explicitly reason in this order.

1) Scope activation

  • Default to lazy activation.
  • Do not eagerly watch all contexts or all kinds unless explicitly requested.
  • Only activate watches required by the visible pane/action.

2) API pressure control

  • Prefer watch over poll where possible.
  • Keep reconnect backoff bounded.
  • Avoid fan-out explosions (context x kind x namespace) unless user-initiated.
  • Treat RBAC denials and unavailable APIs as expected states, not fatal paths.

3) Compute budget

  • Avoid full recompute on every event/keypress.
  • Recompute only affected projections.
  • Keep filtering/sorting scoped to active view.
  • Favor stable O(visible) or O(active-view) paths over O(total-store) paths.

4) Render budget

  • Render on invalidation, not continuous redraw.
  • Cap frame rate.
  • Avoid rebuilding large text buffers unless source changed.
  • Clamp vertical/horizontal scrolling to content bounds.

5) Memory bounds

  • Use bounded channels/ring buffers for high-volume streams (logs/events).
  • Ensure no unbounded queue growth under churn.
  • Prune or expire caches when no longer active.

6) Logs at scale

  • Stream only what user asked for (pod/container/replica scope).
  • Support multi-source aggregation without duplicate stream restarts.
  • Prefix source identity clearly for merged streams.
  • Reconnect with backoff; avoid replay storms.

7) UX under load

  • Keep input responsive even when data updates are heavy.
  • Never block UI navigation on slow API calls.
  • Show partial data quickly; degrade gracefully with clear status.

Implementation Guardrails

  • Prefer minimal diffs that preserve current fast paths.
  • Avoid introducing background work that scales with total cluster size by default.
  • If adding a new feature, define:
    • activation trigger
    • steady-state CPU/memory impact
    • API call/watch impact

Verification Expectations For Perf-Sensitive Changes

For changes touching watches, filtering/sorting, rendering, or logs, include:

  • what hot path changed
  • why the new path is cheaper or safer
  • potential regressions to watch for

If measurement is available, include it. If not, provide complexity-level reasoning.