# Triton Agent State And Artifact Templates Keep Triton loop records under `.humanize/triton-agent/` in the target vLLM or SGLang checkout, in the nearest project root for direct-file mode, or in the user-provided workdir when the Triton file is standalone. Do not use `.humanize/lightop-agent/` for Triton work. ## refined-plan.md ```markdown # Refined Plan ## Target - Framework: - Repo path: - Target mode: - Target file: - Project root/workdir: - Commit: - Operator/kernel: - User goal: ## K/R/W/E/B/P - K: - R: - W: - E: - B: - P: ## Baseline Commands - install: - import smoke: - backend proof: - correctness: - benchmark: - profile: ## Candidate Plan 1. Baseline and backend proof. 2. First edit: 3. Validation: 4. Next gate: ## Stop Conditions - Correctness: - Performance: - Profiling: - User constraints: ``` ## backend-map.md ```markdown # Backend Map ## Framework Or Call-Site Routing - Entry point: - Backend registry: - Env vars: - CLI args: - Direct caller/harness: - Selected backend: - Fallback backend: ## Triton Kernel - Python file/function: - JIT/autotune decorators: - Config source: - Grid function: - Kernel name in profiler: - Triton cache or dump path: ## Proof - Command: - Evidence: - Caveats: ``` ## attempt-ledger.md ```markdown # Attempt Ledger | Version | Hypothesis | Files | Correct | p50 us | p90 us | Delta | Profile | Decision | | --- | --- | --- | --- | ---: | ---: | ---: | --- | --- | | v000 | baseline | none | pass | | | | | baseline | ``` ## kernel_opt_readme.md ```markdown # Kernel Optimization Report ## Summary - Best version: - Baseline: - Current best: - Target: - Selected card: - Backend: ## Validation Matrix | Test | Command | Result | | --- | --- | --- | ## Performance Matrix | Shape | Dtype | Backend | Config | Baseline us | Candidate us | Delta | Notes | | --- | --- | --- | --- | ---: | ---: | ---: | --- | ## Profile Evidence - Baseline artifact: - Candidate artifact: - Bottleneck: - Next edit: ## Rejected Lineages | Version | Reason | | --- | --- | ``` ## lineage.jsonl Write one JSON object per benchmarked candidate: ```json {"version":"v001","parent":"v000","hypothesis":"tune BLOCK_N for decode","correct":true,"decision":"keep","artifact":".humanize/triton-agent/profile-artifacts/v001/digest.md"} ```