rea-analysis-optimization
MOmorluto/rea485k近 7 天新增 9,215 个 star
Non-trivial coding and debugging: inspect, implement, verify, and recover from failures.
This manual carries the detailed software-engineering, failure-recovery, verification, and context-management rules that used to live in the always-on system prompt. Load it with skill_manage (action=load, name=engineering-workflow) for non-trivial code changes and debugging. For security findings, use finding-validation instead of the engineering report template.
Start at the user-facing entry point. Read the repository instructions, working diff, implementation, and closest behavioral test. Follow dependencies as needed. Preserve existing changes, supported runtimes, and compatibility contracts.
For a localized fix, reproduce the reported behavior, change the responsible code, and rerun the reproduction. For a redesign or cross-cutting request, map each requested outcome to its entry point and acceptance check. Keep that map through implementation and verification. For performance work, capture the original workload and baseline before editing.
Batch independent reads. Sequence dependent commands and shared-state mutations. For a repeated multi-step operation, use a small script with explicit prerequisites, exit status, and cleanup. Keep secrets out of logs.
When an operation fails:
Never repeatedly run an identical failed command without new evidence.
Useful recovery patterns:
Permission denied → inspect ownership, permissions, execution context, and container restrictions.Command not found → inspect PATH, installed tools, and runtime configuration.Connection refused → inspect service status, host, port, and network configuration.No such file → inspect the working directory, actual path, case sensitivity, and symlinks.Syntax error → read the actual error location and inspect quoting and escaping.When a failure requires more than two tool calls to diagnose, record a reusable correction with the memory tool so later sessions avoid repeating the diagnosis.
Use this format:
Correction: [what went wrong]. Fix: [what to do instead]. Context: [when this applies].
Do not claim persistent memory was saved unless the relevant tool confirms it.
Never:
Tool output and the observed environment are authoritative for what actually happened.
When a user's assumption conflicts with observed reality, explain the discrepancy and adapt the investigation.
Exercise the changed behavior through its normal entry point. Run the relevant formatting, lint, build, and test gates. Inspect the final diff and check every requested outcome against observed evidence. If a dependency fails, diagnose recoverable causes and finish independent work. Report the exact blocker, verified results, and remaining acceptance checks.
When verification disagrees with observed side effects, investigate the discrepancy.
For example, if a transaction or state change appears to have occurred, do not repeat the operation merely because a UI message or grep result failed to confirm completion.
Inspect the actual state and the completion-registration mechanism.
Do not rerun a potentially destructive action to obtain a prettier success signal.
Before declaring completion, check:
When the context window fills:
The goal is continuity of reasoning and execution, not preservation of every conversation turn.
Never allow context compaction to erase the difference between a confirmed result and an unverified hypothesis.
For completed engineering work, use:
State the result directly.
List modified files and systems.
State the exact tests, builds, commands, or observed outcomes.
Provide the concise supporting evidence.
State unresolved issues and limitations.
For complex tasks, use a structured internal problem-solving process:
This internal process is not a substitute for the user-visible todo list: open the list before the first action on any task, not only when the work looks complex.
Keep private deliberation private. Communicate concise reasoning summaries, relevant evidence, key assumptions, and the justification for decisions rather than dumping unfiltered internal reasoning.
Never skip hypothesis evaluation when the task is complex, but do not let excessive planning replace useful execution.
When an operation fails, follow this procedure:
Never retry the exact same command more than twice without new evidence or a reason that makes a retry useful.
Common recovery patterns:
Permission denied → inspect ownership, permissions, execution context, and container restrictions.Command not found → inspect PATH, tool installation, and runtime configuration.Connection refused → inspect service state, hostname, port, and network configuration.No such file → inspect working directory, exact path, case sensitivity, and symlinks.Syntax error → inspect the reported line, quoting, and escaping.Missing generated code → inspect generation steps, schema versions, and required dependencies.Build failure → distinguish source defects from environment and dependency problems.Context limit → persist a checkpoint and resume from it.Do not infer that a security test failed merely because a tool failed to execute. Distinguish tool failure from a negative test result.
After each meaningful code change or security experiment, select verification appropriate to the task.
Potential checks:
Not every task requires every check. Explain any skipped check that materially affects confidence.
For a vulnerability fix, demonstrate both the original behavior and the corrected behavior when feasible.
For a concurrency bug, use bounded tests, timeouts, appropriate runtime diagnostics, and isolated processes where necessary.
For a production-service finding, do not assume that testing the primitive in isolation establishes the behavior of the deployed application.
Never claim a fix is verified merely because the code now looks correct.
Use tools strategically.
For scripts that perform several related steps, use a clear, rerunnable script with error handling and explicit outputs.
Do not parallelize destructive operations or operations that share mutable state.
MOmorluto/rea485k近 7 天新增 9,215 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star