Imported from Kaz9487/bend-conv (
AGENTS.md). Install upstream withnpx skills add Kaz9487/bend-conv. Copyright stays with the author.
Workspace maintenance
- Keep user-facing explanations in Traditional Chinese.
- User examples illustrate general requirements; do not turn example numbers, shapes or operations into acceptance limits.
- Organize by capability and workflow, regardless of implementation language. lib/ and convolution/ own their proofs/ subdirectory. Each example or benchmark owns its Bend, Python, C/CUDA, PowerShell and shell sources. Keep at most one functional subdirectory below each root folder.
- Library source and proofs must not depend on convolution, applications or benchmarks. A proof that depends on convolution assumptions belongs to convolution/proofs/, even if it is about arrays or arithmetic.
- Put generated Bend/C, binaries, caches, inventories and reports under out/. Never regenerate maintained source or proof terms. No proof templates, proof generators or maintained symbol-renaming tables.
- Delete superseded custom experiments, duplicate launchers and obsolete artifacts. Do not create archive trees or compatibility wrappers merely to retain a difference. Preserve upstream tools, necessary inputs, frozen contracts and useful performance comparisons. Retain only the pinned official Bend compiler.
- Use descriptive snake_case files/functions, PascalCase types/aliases, and explicit public argument names. Local mathematical notation is acceptable when its role is clear.
- Vector/matrix/tensor share storage. Express element type, shape and layout as parameters. New representations require a semantic or storage justification; specializations must refine common contracts and have measurement evidence.
- Do not reuse metadata fields for a different meaning just because their types match.
- Share paired/tail state, MAC, reduction and store; retain only genuinely distinct tail behavior.
- Preserve the exact unconditional native-inference-versus-matrix root. Do not weaken its guards or replace the candidate with the reference.
- Frozen hashes remain unchanged. Only documented import-line relocations may be reversed for original-hash verification.
- Use only the unmodified official checker. Machine bounds and certificates live in lib/machine_limits.bend; defaults in lib/default_machine_limits.bend. No checker fork or second proof verdict.
- All proof terms live with their owning package. scripts/check_official.bend is a load entry; run.ps1 proofs is the normal acceptance command.
- Conditional readback lemmas must not be reported as proving the actual caller schedule without discharging their premises.
- Bend imports can fill laws in another namespace. An unused local alias alone is not evidence that an import can be removed.
- Keep imports, generators, every language's launch scripts, documentation and validation paths consistent when moving or merging files.
- Reuse numerical checks for compiler/runtime and model integration. Do not add repetitive tests of proved laws or deliberate fault mutations. Upstream regression tests are discretionary unless relevant.
- Complete the coherent design, implementation, proof integration and obsolete-path cleanup before consolidated acceptance. Identify algorithmic complexity, ownership dependencies, copies and allocation sites by source analysis first. Do not repeatedly benchmark known limitations or run the full acceptance suite after each small edit. After the batch is ready, run the official checker and necessary numerical/performance checks together; repeat only checks affected by actual failures or subsequent corrections. Never treat source analysis as measured performance or an unchecked proof as accepted.