Skip to content

feat: add devup-retro command to turn session follow-ups into improvement prompts - #126

Open
devfive-relay-c70423[bot] wants to merge 1 commit into
mainfrom
devfive/3099154426bffbeef8b62999b80bb038/devup-retro
Open

devfive-relay-c70423[bot] wants to merge 1 commit into
mainfrom
devfive/3099154426bffbeef8b62999b80bb038/devup-retro

Conversation

@devfive-relay-c70423

Copy link
Copy Markdown
Contributor

What

/devup-retro: one command to type when a piece of devup-mcp work is finished. The agent reviews the conversation from the first devup-mcp call to now, extracts every follow-up prompt the user had to write to correct or complete the result, and turns them into ready-to-paste improvement prompts for devup-mcp development. The goal is that the same follow-up never has to be written twice.

Three phases, never merged:

  1. review: each item carries the user's prompt quoted verbatim, what was wrong, the evidence (file / Figma node / tool output), and exactly one surface that should have prevented it: codegen, export-output, validation-rule, runtime-audit, skill-guidance, bootstrap-instructions, project-plan-intake, or out-of-scope:devup-ui|app|figma-data. Items with no user-prompt evidence are excluded. Items already fixed are marked fixed-in-installed / fixed-not-installed / already-recorded, or unverified when release notes cannot be read.
  2. confirm: the list is shown as a table and the runtime question tool asks OK / Edit items / Drop items / Cancel. Nothing is written and no prompt is printed before OK.
  3. prompts: one prompt per surface, in the user's language, each with goal, required behaviour, acceptance checks / regression tests, and scope boundary. If the project has a .feedback/ folder and the user chose to save, records are added in that folder's existing format, numbering and index.

How it ships

Investigated first: devup-mcp had no MCP prompts. /devup reaches clients as an embedded own skill that devup_skills install writes into the workspace skill root (Claude Code offers a project skill as a slash command of the same name), plus a command file for OpenCode. devup-retro uses the same path, and adds a prompt so it works without an install.

Client How to invoke
Claude Code /devup-retro [scope or notes] after devup_skills install (.claude/skills/devup-retro/SKILL.md). Without the install: the MCP prompt, /mcp__<server name>__devup-retro
OpenCode /devup-retro: .opencode/command/devup-retro.md, generated from the skill body at install so the two cannot drift
Codex and other .agents/skills runtimes the skill loads by name; no slash-command location is verified, and devup_skills says so instead of guessing a path
Any MCP client prompts/list -> devup-retro (arguments scope, language, both optional); devup://skill/devup-retro; listed in devup_skills status

Server support (minimal, read-only)

devup_skills gets a third action, retro. It writes nothing and returns:

  • server: installed version / commit / buildId (same identity every response carries)
  • callLog: the devup-mcp calls this server process served, oldest first: tool, action, outputs, a short target (frameIds=...), UTC time, duration, ok. Bounded to 200. It keeps names and times only, never argument contents or results, and it says in the response that a reconnect empties it, so a short log is not read as "nothing was called"
  • surfaces, phases: the same list the skill's table has (a test holds them together)
  • feedback: whether .feedback/ exists, its index file, nextNumber / nextFilePrefix, the files to read first, and each record's title and status line
  • releases: where release notes live and the installed tag, with the rule that an unreadable changelog means unverified, never a guessed "fixed"

The MCP prompts capability is now advertised with one prompt.

Name

devup-retro, defined once: the retro_name! macro in crates/devup-mcp/src/server/skills/commands.rs. The embedded path, the command, the OpenCode file, the prompt and the tool report all derive from it. A rename is that literal, git mv skills/devup-retro skills/<new>, and the name in the skill frontmatter and its manifest.json entry (plus bytes/sha256); the_retro_name_is_spelled_in_one_place fails until they agree. Alternatives considered: devup-review-next, devup-confirm. The tool action stays retro either way.

Other changes

  • skills/commands.rs: the /devup command code moved out of installation.rs and generalised to a COMMANDS table. /devup behaviour and command_state output are unchanged; install now reports both commands under commands for OpenCode.
  • mod_parts/error_envelopes.rs: to_mcp_error and structured_tool_error moved out of exploration_and_responses.rs, unchanged, to keep that file under 1000 lines after the prompt handlers were added (914 now).
  • Bootstrap INSTRUCTIONS are untouched (1490 of 1500 bytes, and another PR is editing them). The pointer is a short section at the end of devup://guide/usage instead.
  • README section, changepack (Minor).

Tests

Local (Windows), all green:

  • cargo test --workspace --all-features --no-fail-fast: 2300 passed, 0 failed, 2 ignored
  • cargo insta test --workspace --all-features --check: 2300 passed, no snapshots to review
  • cargo clippy --locked --workspace --all-targets --all-features -- -D warnings: clean; cargo fmt --all -- --check: clean
  • node --test ... (CI set): 82 pass, 1 skipped; python packaging/test_release.py: 15 OK

New tests (10):

  • skills/retro_tests.rs (8): the name is spelled in one place; the skill states review -> confirm -> prompts with its honesty rules (doc contract); skill table and tool surfaces are identical; prompt arguments and body; call log ordering, bounding and that it keeps no argument contents; UTC timestamps; .feedback/ numbering read without writing; command install per runtime (OpenCode file generated / alreadyPresent / leftAlone, Claude Code via skill, Codex unsupported)
  • tests/retro_command.rs (2, real stdio process): prompts capability, prompts/list has devup-retro with optional scope/language, prompts/get returns the three phases, unknown prompt is an error; devup_skills retro returns identity, logged calls (including a refused one as ok: false), feedback state, and leaves .feedback/ untouched; install flips the command to installed
  • updated: skills_install.rs own-skill list; manifest well-formedness covers the new entry (bytes/sha256)

Sample run (synthetic, modelled on the Prime animation follow-up)

> /devup-retro

● devup_skills(action: "retro", projectRoot: "apps/prime")
  server 0.21.0 / 5436249 · callLog 14 calls (first: devup_figma_export 2026-11-09T05:12:40Z)
  feedback: .feedback/ exists, index 000-index.txt, nextNumber 34

검토 범위: 2026-11-09T05:12 devup_figma_export(frameIds 33:3550 외 2) 이후의 사용자 메시지 9개.
그중 후속 수정 요청은 4개(항목 3개)입니다. 나머지 5개는 새 요구사항·승인이라 제외했습니다.

| # | 사용자 프롬프트 (원문) | 무엇이 잘못됐나 | surface | 증거 | 상태 |
|---|---|---|---|---|---|
| 1 | "애니메이션을 추가해야 함" / "스크롤할 때 다시 재생되면 안 돼" | 내보낸 랜딩 섹션에 진입 모션이 없었고, 직접 추가한 reveal이 재진입 때 다시 재생됨 | validation-rule | devup_ui_validate(seq 6) errors 0 · apps/prime/src/components/pages/landing/Hero.tsx에 transition/keyframes 없음 | fixed-not-installed (0.22.0 릴리스 노트: entrance-motion rules) |
| 2 | "모바일에서 CTA 줄바꿈이 피그마랑 달라" | 360px CTA에서 '개선을'이 통째로 다음 줄로 넘어감 | codegen | node 33:3550 · devup_visual_compare(seq 11) diff 6.1% | already-recorded (.feedback/016-korean-wrapping-vs-figma.txt) |
| 3 | "CI 통과했다고 했는데 그 run은 이전 커밋이야" | 완료 보고가 HEAD가 아닌 커밋의 run ID를 인용 | skill-guidance | 완료 보고의 run ID ↔ git rev-parse HEAD 불일치 | open |

후속 프롬프트에서 나오지 않은 관찰(프롬프트로 만들지 않음): hero 이미지 alt가 비어 있음.

? 검토 목록          ❯ OK (Recommended) / Edit items / Drop items / Cancel
? .feedback/에 저장   ❯ Yes / No

> OK, Yes

설치된 빌드: devup-mcp 0.21.0 / commit 5436249 / buildId 5436249-…

── skill-guidance ─────────────────────────────────────────────
devup-mcp의 완료 보고 지침에 "CI 증거는 현재 HEAD의 run이어야 한다"를 필수 항목으로 추가해 주세요.

필수 동작
1. devup / devup-implementation-plan 스킬의 완료 조건에 "보고하는 CI run의 head SHA가 `git rev-parse HEAD`와 같아야 한다"를 명시합니다.
2. 다르면 완료로 보고하지 않고, 해당 SHA의 run을 기다리거나 unresolved로 남기도록 합니다.
3. 최종 보고 표에 head SHA와 run ID를 함께 적게 합니다.
근거: 사용자 프롬프트 "CI 통과했다고 했는데 그 run은 이전 커밋이야" · 완료 보고의 run ID와 HEAD 불일치.

수용 기준·회귀 테스트
- 스킬 문서에 위 문구가 없으면 실패하는 skills 단위 테스트를 추가합니다.
- development contract의 required terms에 "head SHA"가 포함됩니다.

범위 경계
- CI 워크플로 자체나 앱의 테스트는 다루지 않습니다(out-of-scope:app).
───────────────────────────────────────────────────────────────

프롬프트가 필요 없는 항목
- #1 fixed-not-installed → devup-mcp를 0.22.0으로 업데이트하고 devup_skills install로 스킬을 갱신하세요.
- #2 already-recorded → .feedback/016-korean-wrapping-vs-figma.txt

저장: .feedback/034-ci-evidence-must-match-head.txt, 000-index.txt에 1줄 추가.
요약: 후속 프롬프트 4개 검토 · 항목 3개 확인 · 프롬프트 1개(skill-guidance) · 프롬프트 불필요 2개 · 파일 2개 기록.

Open items

  • The call log covers one server process; a resumed or reconnected session gets a partial log (stated in the response). Persisting it across processes was left out on purpose.
  • "Already fixed" is judged by the agent from release notes; the binary carries no changelog.
  • Codex has no verified slash-command location, so it gets the skill and the prompt, not a command file.

🤖 Generated with Claude Code


Submitted via Devfive hub. Employee: ; device: 3099154426bffbeef8b62999b80bb038

…ment prompts

A session retrospective for work done with devup-mcp: review the follow-up
prompts the user had to write, confirm the list with the user, then print
ready-to-paste improvement prompts per devup-mcp surface.

- skills/devup-retro: own skill, installed with the others (Claude Code
  /devup-retro), plus an OpenCode command generated from the skill body
- MCP prompt devup-retro (scope, language) for workspaces without the skill
- devup_skills action retro: read-only build identity, this process's call
  log with timestamps, surface list and .feedback folder state
- commands.rs: /devup command code generalised to a COMMANDS table
- error_envelopes.rs: error helpers moved to keep files under 1000 lines

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@owjs3901
owjs3901 marked this pull request as ready for review November 10, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants