ワンクリックで
lessons-learned
Review project activity and draft entries for lessons_learned.md. Use when asked to update or review lessons learned.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Review project activity and draft entries for lessons_learned.md. Use when asked to update or review lessons learned.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
End-to-end workflow for adding a new tree-sitter language to big-code-analysis. Wires up the grammar crate, regenerates the language enum, implements Checker/Getter/Alterator/metrics, adds per-metric tests, updates docs, then runs simplify-rust, rust-optimize, and audit-tests. Does NOT commit — leaves the working tree dirty for final user review.
Audit a Rust crate in the big-code-analysis workspace for logic errors, complexity, bugs, security issues, and code smells. Operates at the crate level via `cargo -p`. Use when asked to audit or review a crate.
Audit a single Rust source file in the big-code-analysis workspace for logic errors, complexity, bugs, security issues, and code smells. Use when asked to audit or review a specific file.
Audit naming quality in a crate or directory for misleading, inconsistent, or unclear names. Use when asked to audit or review naming.
Audit test suites for tests that pass trivially, mask bugs, or assert the wrong thing. Finds tests designed to pass rather than designed to catch regressions.
Fix multiple GitHub issues on an integration branch. Issues touching different crates run in parallel worktrees; issues sharing a crate or affecting cross-language code run sequentially. Each goes through fix, simplify, review, and remediation before merging. Use when asked to fix several issues at once.
| name | lessons-learned |
| description | Review project activity and draft entries for lessons_learned.md. Use when asked to update or review lessons learned. |
Review recent project activity (issues, commits, changelog) to identify
hard-won lessons, evaluate them against a strict quality bar, and draft
entries for docs/development/lessons_learned.md.
If docs/development/lessons_learned.md does not yet exist, create the
directory and seed the file with a short header before the first entry —
do not begin appending into a missing file.
Argument: $ARGUMENTS — empty for the full workflow, or hint text to
narrow the search (e.g., "tree-sitter parser", "halstead metric").
Determine the time boundary for evidence gathering — everything since the last update to the lessons file:
git log -1 --format=%aI -- docs/development/lessons_learned.md
If the file has never been modified beyond its initial creation (no substantive history), fall back to the repository's first commit date:
git log --reverse --format=%aI | head -1
Record the boundary date as $BOUNDARY.
Read docs/development/lessons_learned.md in full. Record:
This step is mandatory. Overlap detection in Steps 5 and 6 depends on it.
If the file is brand new and contains no lessons yet, record the highest lesson number as 0 and proceed.
Collect evidence from four sources. When $ARGUMENTS contains hint text,
add the hint as an additional search keyword to narrow results.
gh issue list --state closed --search "closed:>$BOUNDARY" --limit 100 \
--json number,title,body,labels,closedAt
Triage: scan titles and bodies for hard-lesson signals:
Deep-dive on comments only for candidates that show signals:
gh issue view <N> --json comments
git log --since="$BOUNDARY" --format="%H %s" -- src/ tests/ big-code-analysis-cli/ big-code-analysis-web/ docs/
Look for:
If CHANGELOG.md exists, read it and identify entries added since the
boundary date. Focus on entries under "Fixed" and "Changed" sections — these
are most likely to contain lesson-worthy material.
git log --since="$BOUNDARY" --name-only --format="" -- docs/ big-code-analysis-book/ README.md CLAUDE.md
Look for new or substantially updated documentation that may reflect hard-won understanding.
For items from Step 3 showing hard-lesson signals:
git show <commit>Record each potential lesson:
This is the core quality gate. The bar:
"Genuinely hard (cost real debugging time or caused real bugs) AND important (likely to recur)."
Present candidates as a ranked batch:
### Candidate N: <summary>
- Source: #<issue>, <commit>
- Quality: QUALIFIES / DOES NOT QUALIFY
- Overlap: None / Related to lesson #N (explain distinction or overlap)
- Reasoning: <why it meets or fails the quality bar>
For each candidate that does not qualify, suggest an alternative home with case-by-case reasoning:
| Signal | Alternative Home |
|---|---|
| One-off debugging trick | Code comment at the relevant site |
| Architectural decision | Module-level //! doc or design doc |
| Testing pattern | Test file comment, or a testing rule under .claude/rules/ if present |
| Project convention | CLAUDE.md, README.md, or .claude/rules/ |
| Already covered by existing lesson | Merge into existing lesson #N |
| Too specific to one issue | Issue comment or PR description |
Push-back language must be explicit. "No candidates qualify" is a valid success state. Do not force entries to justify the workflow.
Wait for the user to select which candidates to draft. Do not proceed to Step 6 without user confirmation.
For each user-selected candidate, draft an entry matching the established
format in docs/development/lessons_learned.md:
## N. <Pithy Principle Name> — use the next sequential number**Description of specific instance** (#42, abc1234).)**Lesson:** paragraph summarizing the actionable takeaway---) separator after the entry"Inserting here will change lesson numbers. Other skills (e.g.,
fix-issue,audit-tests) reference lessons by number. Consider grepping.claude/skills/for affected references before applying."
Show the complete draft in context (the markdown that would be appended). Wait for user approval before applying.
After user approval:
docs/development/lessons_learned.mdrumdl check docs/development/lessons_learned.md to ensure
the file passes lintgit add docs/development/lessons_learned.mdPost-completion notes to display:
fix-issue, audit-tests, review) may reference
lessons by number. If new lessons changed the numbering of existing
entries, grep .claude/skills/ for stale references."