Upstream v0.74.0 lockfile omits resolved/integrity metadata needed by buildNpmPackage's offline NPM cache. Add a package-local enriched lockfile, a script to regenerate it from the npm registry, and a prePatch step to copy it into the build sandbox.
2.0 KiB
AI Agent Guidelines
Be cognizant of context use; this file is loaded for all LLMs. Keep guidance concise and high-signal.
Critical Rules
-
Bash timeouts: Every
bashtool call MUST specify a timeout.bash(command="some command", timeout=30) -
File writing: Do NOT use
catwith heredocs to write files. Usewritefor new/rewritten files andeditfor targeted modifications. -
Scratch files: Put temporary scripts, plans, notes, and reusable exploration artifacts in
_scratch/. It is gitignored. -
Missing commands: If a tool is not installed, prefer
nix runinstead of installing it.nix run nixpkgs#python3 -- script.py
Context Discipline
Prefer a search → targeted read pattern:
- Search with
rg -n/grep -nto find relevant line numbers. - Read only the needed range with
read(path, offset, limit).
Full-file reads are fine when genuinely needed, but avoid them as the default reflex.
Principles
-
KISS / YAGNI: Keep solutions simple. Avoid abstractions, generics, or indirection unless there is a concrete need.
-
Maintain AGENTS.md: Keep project guidance up to date, but BLUF: concise, actionable, and context-size conscious.
-
Knowledge Capture Check: Before the final response, ask whether the task revealed a non-obvious convention, pitfall, repeatable workflow, or missing helper. If yes, briefly recommend exactly where to capture it: package/project AGENTS.md, global AGENTS.md, a skill, or a helper script. Skip this note when there is nothing meaningful.
Style
Comment Style
A logical block of code (not necessarily a language scope) should have a short Title Case comment above it:
// Map Component Results
for _, comp := range components {
results[comp.Name] = comp.Result
}
If the block is more complicated or non-obvious, explain why after the title:
// Map Component Results - Downstream consumers expect a name-keyed lookup.
for _, comp := range components {
results[comp.Name] = comp.Result
}