一键导入
lesson-capture
Capture project-specific operational lessons from mistakes, discoveries, and hard-won insights
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Capture project-specific operational lessons from mistakes, discoveries, and hard-won insights
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate and curate Claude-oriented bash-policy project rules. Use to run bash-policy export/report, review .bash-policy-candidates.yaml from Claude settings, update .bash-policy.yaml, normalize command-shape identities, or validate bash-policy configuration.
Assess whether an input document is ready for a specific §BRAND_NAME_TITLE§ MAS entry point. Use when a user asks whether a goal, functional spec, detailed spec, technical spec, PRD, story bundle, architecture plan, or other source document is solid enough to run through §BRAND_BINARY_NAME§ with `--entry-point general-objective`, `functional-spec`, `detailed-spec`, or `technical-spec`; when deciding which entry point fits a document; or before `§BRAND_BINARY_NAME§ init --spec`.
Coordinate Pairing-mode doer/reviewer sessions through a Markdown blackboard. Use when the user invokes /adversarial-pairing with role and blackboard-path arguments or asks multiple pairing agents to coordinate plan review, implementation, staged code review, and follow-up review rounds without §BRAND_NAME_TITLE§ multi-agent mode.
Define component boundaries, interfaces, and structural decisions for a change
Summarize artifacts produced by §BRAND_BINARY_NAME§ agents for human checkpoint review
Pre-commit Clean Code refactoring
| name | lesson-capture |
| description | Capture project-specific operational lessons from mistakes, discoveries, and hard-won insights |
Extract a lesson from the current conversation context and persist it as a structured file. Lessons are project-specific operational knowledge — gotchas, patterns, and hard-won insights that prevent recurring mistakes.
Lessons complement the contract: the contract governs how to work (behavioral, project-agnostic); lessons capture what we learned here (operational, project-specific).
Lessons are split by audience:
| Audience | Directory | Read During Init | Content |
|---|---|---|---|
| Agents | lessons/agents/ | Yes | Project-specific gotchas agents hit repeatedly |
| Humans | lessons/humans/ | No | Workflow habits, domain pitfalls, invariants to preserve |
If audience is ambiguous, ask.
Each lesson is a small .md file with yaml frontmatter.
---
title: "Descriptive title"
trigger: "When [succinct situational condition]"
keywords: [keyword1, keyword2, keyword3]
date: YYYY-MM-DD
---
## Context
[Situation, intent, and conditions that led to this lesson]
## Failure Mode
[What went wrong and why]
## Solution
[What to do instead]
## References
- [Links to relevant files, docs, specs, or external resources]
Frontmatter fields:
Body sections:
| Audience | Location |
|---|---|
| Agents | GUARDRAILS.md (Tier 2) |
| Humans | lessons/humans/README.md |
### G2.x: Lessons — [Agents|Humans]
Operational lessons from project experience. Read when a trigger matches.
| Trigger | File |
|---------|------|
| When ... | [filename.md](filename.md) |
The index is the discovery mechanism. Agents read it during session initialization and consult full lessons when a trigger matches their current task.
Identify the lesson from the current conversation. Look for:
Determine audience:
If unclear, ask: "Is this a lesson for agents, humans, or both?" If both, write two separate lessons tailored to each audience.
Propose the lesson content in the standard format. Present for approval before writing.
Naming convention: kebab-case, descriptive. Examples:
csv-field-escaping.mdfile-locking-shared-state.mddeployment-order-migrations.mdQuality bar:
After approval:
README.md index — append a row to the table"Lesson captured: [title] → lessons/[audience]/[filename]. Index updated."When invoked on an existing lesson (update or delete):
Position in workflow:
mistake/discovery → reflection → lesson-capture skill → lessons/ persisted
Invoked manually by the human. May later support automated triggers (post-bug-fix, post-review-finding, post-struggle).
Session initialization: Agents read lessons/agents/README.md during init. When a trigger matches current work, read the full lesson file before proceeding.
Discovery limitation: The trigger+keyword model relies on agents predicting which lessons are relevant. This handles known-unknowns (agent recognizes the trigger) but cannot surface unknown-unknowns (agent working on CSV export won't search for "file locking" until it's already hit the problem). Mitigation: write triggers and keywords broadly enough to match adjacent situations, not just the exact scenario where the lesson was learned.
Relation to other artifacts:
specs/ — Requirements and architecture (what to build)docs/ — Usage and setup (how to use)lessons/ — Operational knowledge (what we learned)