engineering-insights
Capture durable engineering insights into the host project's insights file (default docs/engineering-insights.md), and prune that log. Use during any session when a non-obvious discovery is confirmed — a gotcha, a fix's root cause, a why-it's-like-this decision, an antipattern, or a tool/library quirk — and at session wrap-up to sweep for learnings. Also use to review, dedup, or declutter the insights file. Trigger terms: insight, learning, gotcha, engineering insights, lesson learned, wrap-up, retrospective, prune insights.
- License 许可
- MIT
- 最近更新
- 2026-07-18
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- engineering-insights
- description
- Capture durable engineering insights into the host project's insights file (default docs/engineering-insights.md), and prune that log. Use during any session when a non-obvious discovery is confirmed — a gotcha, a fix's root cause, a why-it's-like-this decision, an antipattern, or a tool/library quirk — and at session wrap-up to sweep for learnings. Also use to review, dedup, or declutter the insights file. Trigger terms: insight, learning, gotcha, engineering insights, lesson learned, wrap-up, retrospective, prune insights.
- allowed-tools
- Read, Edit, Write, Grep, Glob
02 资源文件 1
- 参考文档reference.md6.2 KB
03 SKILL.md 正文
Engineering Insights
Persist hard-won, non-obvious engineering knowledge into the host project's insights file, append-only — so the next session starts knowing what this one learned.
Two modes: Capture (default) and Review / Prune. Details, section rubric, target-file rules, examples, and the full prune procedure live in reference.md — read it before a prune.
Target file
- Default:
docs/engineering-insights.mdin the host project. - Override: the caller may name any path (or several per-package files in a monorepo — see the reference for routing rules in that case).
- Never write inside this plugin's own directory: the plugin cache is read-only, shared across projects, and overwritten on update. Insights belong to the project they describe, committed with its code.
- If the target file does not exist, create it (check-before-create) with this header:
# Engineering insights
> Running log of non-obvious, durable engineering knowledge for this project.
> Append-only during capture; consolidated only during prune.
Start of session — read first
When a session begins and the user has stated their task, BEFORE doing the work: read the project's insights file first. It may already hold the gotcha, decision, or fix you'd otherwise rediscover. Mandatory, not optional — treat the entries as high-confidence guidance unless something proves one stale.
When to capture — double trigger
Capture at TWO moments:
- As you go — the instant you confirm something non-obvious during the work.
- At wrap-up — sweep the finished session for anything worth keeping.
Capture when a competent engineer reading the code would NOT already know it:
- a gotcha / footgun, or the root cause of a bug you just fixed;
- a "why it's like this" decision (with the reason);
- an antipattern ("X looks right but fails because…");
- a tool/library quirk (version-specific behavior, config landmine);
- something to revisit later → an Open Question.
Cadence / what NOT to capture: worth it after a substantive session (≈>30 min with a real problem, solution, or discovery). Skip trivia — renames, formatting, routine config edits, anything obvious from the code. Signal quality matters, not volume.
Don't skip the negatives: antipatterns and dead ends (What Doesn't Work / Recurring Errors) are often the most valuable entries — capture them as readily as wins.
Record format
One bullet, placed under the matching section header (the section is the category — see reference for the 7 sections, created lazily). Preserve the file's existing title and blockquote.
- [YYYY-MM-DD] <actionable gist — what to do / avoid / know>; `path` (symbol)
- Date today's entry (the harness provides the current date).
- Anchor evidence on a stable locator —
`path`+ symbol/function name (e.g.`src/db/migrate.ts` (runMigrations)). A line number is optional and approximate — lines drift, so don't rely on them. - Keep it terse and actionable cold: a reader who wasn't here must know what to do.
Anti-banality gate (apply before writing)
If this were obvious to anyone reading the code, don't write it.
Reject three failure modes:
- Too generic / platitude —
async can be tricky,tests are important. - Too specific / not transferable —
fixed a bug on line 47,renamed x to y(changelog or implementation detail, not a reusable lesson). - Too long — keep each entry to ≤2 sentences; split or summarize otherwise.
Good → - [2026-06-19] `Promise.all` on the index pipeline times out past ~30 items; use `Promise.allSettled` in batches of 10; `src/indexing/pipeline.ts` (runFullIndex)
If a candidate fails any check, sharpen it or drop it.
Capture procedure
- Read the target file first — the insight may already be there. If it (or an equivalent) is already recorded, do NOT write it again (append-only ≠ duplicate).
- Apply the anti-banality gate — real, non-obvious, and substantial? If not, drop it.
- Find or lazily create the right section header (only add a header once it has an entry — no empty sections).
- Append one entry (never rewrite or delete existing entries here — that's prune's job).
If by wrap-up nothing substantial and new emerged, write nothing — an empty capture is the correct outcome for a routine session.
Review / Prune mode
Triggered by "prune insights" / "review the insights file" / a periodic cadence. The log is a draft under review, so prune needs judgment — follow the full step-by-step in reference.md: dedup, conflict resolution (verify against live code; mark the stale entry with a dated correction, never silent-delete), staleness flags, the ~200-entry size cap → domain split (log what's dropped), and a final banality pass. Show a summary and apply only on confirmation.
Reliability note
A skill only runs when invoked, so capture is best-effort. The loop is closed by the
read-first rule, a pointer to this skill in the host project's CLAUDE.md, and manual
invocation (/sdd-engineering:engineering-insights). A host project may additionally wire a
Stop hook that re-invokes this skill at session wrap-up; such a hook is a trigger, not a
second implementation — the target-file rules, the anti-banality gate, and read-before-write
dedup still apply, so a redundant fire is a no-op.
04 同仓库更多 Skills
sample-skill
Reviews recent changes and reports actionable findings for testing purposes
workflow-retro
Post-run retrospective of the multi-agent SDD pipeline (spec-creator → implementation-planner → implementer / test-writer → architecture-reviewer / plan-verifier, plus nested researcher/Explore agents). Manually invoked after a run to produce TRUE token/tool/duration/parallelism metrics — deep mode parses session + subagent journals from disk because parent-visible usage EXCLUDES subagent tokens — plus insights with concrete optimization actions, a trend row appended to the retro ledger (default docs/retros/ledger.md), and an audit verdict. Trigger terms: workflow retro, retro, ретро, retrospective, pipeline metrics, agent token usage, cache hit, parallelism, як пройшов конвеєр.
run-plan
Executes an APPROVED Development Plan through the SDD implementation pipeline: implementer wave(s) → test-writer gap pass → green barrier (tests + typecheck) → architecture-reviewer ∥ plan-verifier → bounded fix loop (max 2 iterations) → final report. HARD GATE: an existing plan file is a required input — no plan, no run. Unlike implementer (ships ONE slice) — this skill orchestrates the WHOLE plan across agents; unlike workflow-retro (measures a PAST run) — this skill performs the run; unlike a pre-publish diff review — this skill implements and verifies, it never publishes. Trigger terms: run-plan, run the plan, execute the plan, run the implementation pipeline, запусти план, запусти конвеєр, виконай план, прожени план через конвеєр.
mermaid-diagram
Create Mermaid diagrams in markdown. Use when the user wants to visualize workflows, architectures, API flows, data models, state machines, or system designs. Covers flowcharts, sequence diagrams, class diagrams, ER diagrams, state diagrams, and more.
typescript-expert
TypeScript and JavaScript expert with deep knowledge of type-level programming, performance optimization, monorepo management, migration strategies, and modern tooling.
security
Web application security best practices based on OWASP Top 10:2025. Use when reviewing code for vulnerabilities, implementing auth/authorization, handling user input, working with file uploads, managing secrets, or building API endpoints. Covers React, Express, MongoDB, and JWT security.