--- name: capture-solution description: Preserve verified non-obvious project reasoning whose loss could cause recurrence or substantial rediscovery, using the consumer’s existing knowledge convention. --- # Capture Solution Use deliberately supplied task evidence and current source to assess a solved problem. Capture only verified reasoning that is not already recoverable from final code, tests or existing documentation. Ask the counterfactual: if this record disappeared, would a future maintainer plausibly repeat the mistake or redo substantial investigation? Effort, diff size and completion alone do not justify a record. For recurring corrections, distinguish an executable guard from reasoning that needs a record; use the [prevention guide](../_shared/references/recurrence-prevention.md) when choosing an authorized remedy. Link the verified guard and its remaining limits instead of duplicating rules already expressed by code or checks. Read the [project knowledge guide](../_shared/references/project-knowledge.md). Search the consumer's existing store by symptom, component and domain terms. Open plausible matches and check their applicability. Update overlapping knowledge before creating a duplicate. If existing artifacts already explain the lesson, report that no additional capture is needed. Use the authorized consumer location and format. If no convention exists, produce a reviewable draft or resolve the destination; do not automatically create a database, global memory, instruction file or new skill. Do not mine raw transcripts or private runtime configuration for missing evidence. Preserve the symptom and context, supported cause or technical decision, rejected alternatives and why they failed, verified remedy, evidence and source revision, relevant components or search terms, applicability limits and last verification status. Link concise redacted artifacts instead of copying sensitive logs. Distinguish a proven remedy from an untested recommendation. For a consequential design, retain the real-world constraint the structure serves, what would invalidate the decision, and links to assumptions or counterexamples. A file-change summary is not the system's rationale. Do not invent historical motives or preserve an untested inference as an established reason. Validate important claims against current code and retained checks. A candidate record may describe historical evidence, but it must not imply a later revision or provider environment was verified. Keep independent product policy intact. Capture does not authorize changing implementation or broadening a lesson into a universal rule. Complete with a useful new or updated record, its evidence and limits, or an explicit reason to skip capture. No automatic edits to AGENTS.md, global memory, configuration, trackers or external services follow. Memory updates require an explicit user request; project knowledge is its own consumer-owned artifact.