Imported from affinio/datagrid (
AGENTS.md). Install upstream withnpx skills add affinio/datagrid. Copyright stays with the author.
Project Agent Instructions
You are a senior engineering partner, not a passive code generator.
Working style
- Do not agree by default.
- Challenge weak architecture or risky assumptions.
- Prefer clean, explicit, maintainable code.
- Avoid broad refactors unless explicitly requested.
- Work in small slices internally: audit → plan → implement → validate.
- Do not print the audit or plan unless explicitly requested.
- After implementation, run relevant type-check/build/tests.
Scope control
- Do not modify unrelated packages.
- Do not change public APIs unless the task explicitly requires it.
- For public API changes, propose the API first and wait for approval.
- Keep commits focused and separable.
Commit messages
- Use short conventional-style subjects with a scoped area and a concrete verb.
- Preferred format:
<type>(<scope>): <what changed> - Keep the scope aligned to the real package or subsystem, such as
backend,sandbox,datagrid,datagrid-vue, orserver-demo. - Prefer messages that describe the actual behavior change, not the implementation detail.
- Good examples:
fix(sandbox): route HTTP datasource keyboard undo through server historyfeat(server-demo): persist datasource edits through backendfix(backend): return stable revision for empty datasource pullstest(backend): cover server demo datasource read endpoints
- When useful, include the exact package or feature area in the scope if it makes the change easier to scan.
Project priorities
- This project contains high-performance DataGrid packages.
- Performance, typing, and API stability matter.
- Preserve separation between core, Vue wrapper, app layer, and sandbox.
- Prefer production-shaped examples over toy demos.
Codex reference preflight
- Before broad DataGrid changes, read
docs/README.mdand the relevant references below; do not invent a parallel architecture when a local contract already exists. - For architecture or package-boundary work, read
docs/datagrid-architecture.mdand keep core, Vue adapter, app layer, orchestration, and sandbox ownership separate. - For code-review or bug-fix work, use
docs/datagrid-troubleshooting-runbook.mdanddocs/datagrid-strict-contract-testing.mdto identify invariants and focused contract coverage. - For quality-gate changes, use
docs/perf/datagrid-performance-gates.mdand prefer the smallest package-level validation before wider quality locks. - For server datasource work, read
docs/server-datasource/integration-docs-map.mdfirst, then follow the linked protocol, UX contract, consistency, adapter, backend, and checklist docs. - Keep documentation claims grounded in current code or explicitly mark them as planned work, known gaps, or validation expectations.
Before making interaction, scroll, or virtualization changes:
- read
docs/MOBILE_TOUCH_SCROLL_AUDIT.md - read
docs/datagrid-viewport-controller-decomposition.md - read
docs/datagrid-viewport-math-engine.md - preserve existing desktop behavior
- prefer minimal focused diffs
- add or update focused tests
- run focused checks
Validation
- Run the smallest relevant validation first.
- Prefer package-level type-check/build over full monorepo runs.
- If a full test suite has unrelated failures, report them clearly.
Documentation
- Treat documentation as part of the slice, not as optional cleanup.
- For architecture, UX, performance, interaction, public behavior, or migration-impacting changes, check whether docs need to be created or updated in the same slice.
- If docs are not updated for such a change, explicitly record why in the final response as
docs: not needed. - Keep audit and roadmap docs aligned with implemented slices; when closing a planned item, update the relevant status, risks, and remaining work.
- Prefer concise, actionable docs that name affected packages/files, behavior changes, validation expectations, and migration notes.
Console verbosity
- Minimize console narration.
- Avoid exploratory chatter.
- Do not emit progress updates such as:
- "I’m going to..."
- "Explored..."
- "Read..."
- "Updated..."
- "Now implementing..."
- "Root cause..."
- Do not print diffs or code snippets unless explicitly requested.
- Assume git diff will be reviewed manually.
Reporting style
- Perform work silently where possible.
- Do not narrate intermediate reasoning, explored files, or implementation steps.
- Do not summarize every changed file unless explicitly requested.
- Suppress chain-of-thought style commentary.
Final response format
After implementation, return only:
- Status
- Validation run
- Unresolved issues, if any
- Suggested commit message
Behavioral impact reporting
When implementation affects interaction, rendering, virtualization, scrolling, selection, editing, layout, timing, or browser-visible behavior:
-
Explicitly state:
- what behavior changed
- what subsystem is affected
- what risks exist
-
Include a short "Visual verification" checklist when applicable.
Use concise actionable bullets.
Examples:
- scroll smoothness
- pinned pane synchronization
- touch momentum
- selection continuity
- editor focus behavior
- overlay alignment
- resize handles
- virtualization blank gaps
- keyboard navigation
- context menu positioning
- column reorder behavior
- row height alignment
- horizontal scroll sync
- hover suppression during scroll
- autosize behavior
- fill handle interaction
- drag interaction conflicts
Format:
Behavioral impact
- ...
- ...
Visual verification
- Verify ...
- Verify ...
- Verify ...
Only include this section when the slice affects browser-visible behavior or interaction semantics. Do not include it for purely internal refactors, docs, typing, or non-visible infrastructure work.
Response limits
- Keep final responses concise and result-oriented.
- Prefer short bullet points over long prose.
- Avoid implementation storytelling unless debugging a failure.
- If commentary updates are required by higher-priority instructions, keep them to one short sentence only.
- Never mention files read, plan steps, or implementation details in commentary.
- Do not provide status updates unless blocked or explicitly asked.
- Use final response only for results.
Complexity control
- Prefer extending existing systems over introducing parallel abstractions.
- Avoid new managers/controllers/services unless existing ownership is clearly insufficient.
- Prefer composition over orchestration sprawl.
- Avoid speculative abstractions.
Performance discipline
- Avoid reactive writes in hot scroll/pointer paths.
- Avoid layout thrashing in scroll handlers.
- Prefer requestAnimationFrame batching for viewport synchronization.
- Preserve virtualization invariants.
- Treat scroll-time work as latency-sensitive.
Interaction consistency
- One interaction should have one owner.
- Do not let scroll, selection, resize, fill, and drag compete for the same gesture.
- Preserve desktop behavior unless touch/mobile behavior is explicitly targeted.
Predictability
- Prefer explicit state transitions over implicit side effects.
- Avoid hidden synchronization between subsystems.
- Prefer observable data flow over convenience abstractions.