一键导入
speckit-opsmill-retrospect
Run a session retrospective that surfaces context-management gaps and routes them to approved follow-up actions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run a session retrospective that surfaces context-management gaps and routes them to approved follow-up actions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Performs root-cause analysis of a bug — from a GitHub issue, an issue URL, or a free-text description — before any reproduction or fix is written. TRIGGER when: triaging or diagnosing a bug, investigating why something misbehaves, an issue number/URL handed over for analysis, needing the root cause before touching code. DO NOT TRIGGER when: a failing reproduction test already exists and you are ready to fix → opsmill-dev-fixing-bugs; writing that reproduction test → opsmill-dev-test-driving-bugs; capturing a new bug as a ticket → opsmill-dev-creating-issues.
Produces a breaking-change / deprecation / opportunity report for a dependency-bump PR, grounded in how this codebase actually uses each bumped package, not the changelog alone. TRIGGER when: the user gives a PR URL or number for a dependency version bump (Dependabot, Renovate, or hand-rolled) and asks what could break, what changed, or whether it is safe to merge (e.g. "scan this dependabot PR", "what breaks if we take this bump", "is <PR url> safe to merge"). DO NOT TRIGGER when: the PR is a feature or bugfix rather than a dependency version bump → a code-review or bug skill instead.
Ports an existing fix from one long-lived branch to another (e.g. a stable fix landed on the development branch), adapting it to the target branch's current code rather than cherry-picking blindly. TRIGGER when: phrasings like "backport <fix/PR/commit> to <branch>", "port this stable fix to develop", "land <ticket> on <branch> too", or a fix that already exists on one branch has to land on another. DO NOT TRIGGER when: syncing one whole branch into another wholesale → opsmill-dev-merging-branches; replaying local work onto its base → opsmill-dev-rebase; fixing a brand-new bug that has no existing fix → opsmill-dev-analyzing-bugs / opsmill-dev-fixing-bugs.
Stages and commits the current changes onto a safe working branch, enforcing branch discipline and optionally pushing upstream. TRIGGER when: the user wants to commit, save, or check in the current changes. DO NOT TRIGGER when: opening a pull request → opsmill-dev-pr.
Turns a single feature idea, improvement, or bug into ONE well-structured GitHub issue. TRIGGER when: the user wants to file/open/create an issue, turn a feature idea or improvement into a ticket, or capture something missing or broken as a ticket. DO NOT TRIGGER when: breaking work into multiple issues or planning a body of work → a planning skill; writing a full Product Requirements Document → opsmill-dev-creating-prd; the idea is still fuzzy and unhardened → opsmill-dev-grilling-ideas first.
Synthesises the current conversation context into a Product Requirements Document and publishes it to GitHub (as a comment on a referenced issue, or a new issue). Synthesises from context; does not interview. TRIGGER when: the conversation has produced enough understanding of a feature and the user wants it captured as a PRD. DO NOT TRIGGER when: a single small issue is enough → opsmill-dev-creating-issues; the idea has not been stress-tested yet → opsmill-dev-grilling-ideas first; bug reports.
| name | speckit-opsmill-retrospect |
| description | Run a session retrospective that surfaces context-management gaps and routes them to approved follow-up actions. |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"opsmill:commands/retrospect.md"} |
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty). Treat it as optional scope guidance, such as a focus area, a pasted transcript summary, or a preferred disposition.
Run a retrospective on the current agent session while the work is still fresh in context. The goal is to identify concrete improvements to the repository's context-management surface area: AGENTS.md, CLAUDE.md, .claude/settings.json, .agents/skills/, .agents/commands/, .specify/templates/, dev/knowledge/, dev/guides/, dev/guidelines/, dev/adr/, and product or architecture decisions that caused avoidable friction.
This command closes the loop from "the agent struggled with X" to "X is captured as an approved repo improvement, dedicated PR, GitHub issue, or local-only note."
fix-now, open-pr, github-issue, and local-only.fix-now, present a diff preview or precise patch plan before writing files. Apply only the approved changes.github-issue, defer to the existing opsmill-dev-creating-issues skill when available; if it is unavailable, use gh issue create only after the user approves the exact issue content.AGENTS.md guardrails. Ask First topics, including database migrations, GraphQL schema changes, new dependencies, CI/CD workflow changes, and authentication or authorization changes, are never auto-applied. Route them to open-pr or github-issue.local-only for non-project-specific workflow preferences.git rev-parse --show-toplevel.git branch --show-current.git status --short to understand whether there are existing edits..specify/scripts/bash/check-prerequisites.sh --json --paths-only.FEATURE_DIR and use FEATURE_DIR/retrospective.md as the report path..claude/retrospectives/YYYYMMDD-HHMMSS-<short-branch-or-session-slug>.md as the report path.AGENTS.md and any area-specific AGENTS.md touched this session.CLAUDE.md and .claude/settings.json if present..agents/skills/ and commands in .agents/commands/..specify/templates/.dev/knowledge/, dev/guides/, dev/guidelines/, or dev/adr/ pages.Review the current conversation and repository context for friction that was avoidable through better shared context. Organize findings into exactly these categories:
AGENTS.md, CLAUDE.md, .claude/settings.json, skill prompts, commands, or spec-kit templates.dev/knowledge/, dev/guides/, dev/guidelines/, or dev/adr/.Prefer concrete findings over broad observations. Each finding must cite the session event or repository location that motivated it.
For each finding, propose one disposition:
| Disposition | Use When | Action After Approval |
|---|---|---|
fix-now | Small, low-risk repo context updates that belong on the current branch and do not touch Ask First topics. | Show diff preview, then edit files only after approval. |
open-pr | Context or harness changes that should be reviewed separately from the current feature branch, or anything touching Ask First topics. | Draft a branch/PR plan. Do not branch, commit, push, or open a PR unless explicitly approved. |
github-issue | Larger work, ambiguous ownership, product/architecture debt, ADR candidates needing human authorship, or work outside current scope. | Use the opsmill-dev-creating-issues skill to draft each issue; create only after approval. |
local-only | Personal workflow preferences or notes that should not become repo policy. | Record only in approved local .specify/memory/report locations supported by the runtime. |
Disposition rules:
fix-now.github-issue unless the user explicitly asks for a dedicated PR.Before writing any files, present the retrospective in chat using this structure:
## Session Retrospective
**Scope**: <current feature, branch, or ad-hoc session>
**Proposed report path**: <path>
### Findings
| ID | Category | Evidence | Improvement | Disposition |
|----|----------|----------|-------------|-------------|
| R1 | Instructions / Configuration Gaps | <specific session event or file path> | <concrete change> | fix-now |
### Disposition Buckets
#### fix-now
- R1: <target file and change summary>
#### open-pr
- R2: <branch or PR scope>
#### github-issue
- R3: <issue title>
#### local-only
- R4: <memory/report note>
### Approval Request
Reply with one or more approved buckets, for example:
- `approve report only`
- `approve fix-now`
- `approve github-issue R3`
- `approve all except open-pr`
The report must include concrete findings in all four categories. If a category genuinely has no findings, include the category with None found and a one-sentence reason.
Save the retrospective report only after the user approves report only, a disposition bucket, or all.
Report path:
specs/<current-feature>/retrospective.md..claude/retrospectives/YYYYMMDD-HHMMSS-<short-branch-or-session-slug>.md.If the report path already exists, append a numeric suffix rather than overwriting it.
Process only the buckets the user approved.
opsmill-dev-creating-issues skill with the finding as source material.After approved actions are complete, provide a brief summary: