Expand description
§CVKG Agentic Development Guidelines (v1.2)
All AI agents contributing to this crate MUST follow ALL seven rules:
── Karpathy Guidelines (1–4) ────────────────────────────────────────────
- THINK FIRST – State assumptions. Surface ambiguity. Push back on complexity.
- STAY SIMPLE – Minimum code. No speculative features. No unasked-for abstractions.
- BE SURGICAL – Touch only what’s required. Own your orphans. Don’t improve neighbors.
- VERIFY GOALS – Turn tasks into checkable criteria. Loop until they pass. Never commit broken.
── CVKG Extended Protocols (5–7) ──────────────────────────────────────── 5. TRIPLE-PASS – Read the target, its surrounding context, and its full call graph 6. COMMENT ALL – Every major pub fn, unsafe block, and non-trivial algorithm in 7. MONITOR LOOPS – Check every tool call / command for progress every 30 seconds.
Sources:
Structs§
- Animation
Engine - Manages active physics transitions for layout bounding boxes.
- Aspect
Ratio - Constrains a child to a specific aspect ratio.
- Edge
Insets - Edge insets for padding, margins, and safe areas
- Flex
- Flex - a container that distributes space among its children flexibly
- Focus
Candidate - A focusable element produced by
compute_focus_order. - Grid
- A layout engine that computes coordinates for children positioned in a 2D grid.
- HStack
- HStack - lays out children horizontally
- Layout
Capabilities - Layout
Spatial Entry - A node entry stored in the spatial index after layout completes.
- Layout
Spatial Index - Axis-aligned 2-D quadtree that indexes laid-out view bounding boxes.
- Padding
- A layout view that adds padding around its child.
- Progressive
Layout Context - Opt-in wrapper that breaks a single synchronous layout pass into incremental batches so the UI thread is not blocked for large child lists.
- Safe
Area - A layout view that respects safe area insets (notches, status bars).
- Safe
Area Edges - Spacer
- Spacer - a layout view that expands to fill available space
- Taffy
Layout Engine - The central Taffy engine that computes flexbox and grid layouts.
Stored opaquely inside
cvkg_core::LayoutCache::engine. - VStack
- VStack - lays out children vertically
- ZStack
- ZStack - lays out children on top of each other
Enums§
- Grid
Track - Track sizing strategy for a single grid track (row or column).
- Layout
Modality - The current input modality that the layout engine adapts to.
Functions§
- compute_
focus_ order - Compute a deterministic keyboard-focus traversal order for a flat list of
FocusCandidates. - layout_
capabilities - Returns the layout capabilities supported by this engine.
- size_
views_ parallel - Compute size-that-fits for a batch of independent subviews in parallel when
the
parallelcargo feature is active. Falls back to sequential iteration when the feature is absent or whenrayonwould not help (≤ 1 view). - validate_
reading_ order - Validate that the focus order computed by
compute_focus_orderis consistent with visual reading order (P1-69 contract).