원클릭으로
codex-pr-distill
Distillation phase for codex-pr-lessons playbook — compress raw learnings into patterns and update skills
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Distillation phase for codex-pr-lessons playbook — compress raw learnings into patterns and update skills
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Make Codex CLI behave more like Claude Code for Kookr by preserving the known fork, branch, build, deploy, daily upstream sync, and live-verification workflow for Claude-compatible skills, agents, settings, hooks, and related UX.
Kookr-internal extension to rfc-iterative-review that captures append-only critic traces for later meta-analysis of RFC reviewer subagents.
Analyze an open question by casting 3-5 deliberately conflicting expert roles, running them in parallel and blind to each other, sharpening them in a debate round, attacking their consensus with a devil's advocate, then synthesizing a verdict that preserves disagreement instead of averaging it. Use for decisions, strategy, idea generation, hypothesis triage, experiment post-mortems, or any question where a single lens would return "it depends".
Iterative RFC drafting workflow — draft in worktree, run parallel critic subagents, incorporate feedback over N rounds, present to user before any action
How to create, structure, and launch Kookr playbook tasks — reusable agent task templates with dynamic sources and project identity
Build a Ralph-like sequential Kookr task chain where each task completes one independent unit, records durable state, and spawns the next task with the same continuation contract. Use for issue batches, queue drains, staged migrations, or other long runs that should proceed one task at a time without relying on conversation memory.
| name | codex-pr-distill |
| description | Distillation phase for codex-pr-lessons playbook — compress raw learnings into patterns and update skills |
| keywords | codex, pr, distill, patterns, generalize, skill, synthesis |
| related | ["codex-pr-threshold","codex-pr-state","codex-pr-critic"] |
Requires: the
pr-contribution-excellenceskill at~/.claude/skills/pr-contribution-excellence/SKILL.md(bundled with thekookr-toolkitplugin since 0.5 — seedocs/hooks-setup.md). If absent, the plugin is not installed; stop and report the missing dependency rather than fabricating distilled patterns.
This skill is invoked when codex-pr-threshold returns DISTILL. It reads all accumulated raw learnings, identifies patterns, and writes them to the appropriate output files.
| # | Rule | Violation Example | Correct Pattern |
|---|---|---|---|
| 1 | Read ALL raw learnings before distilling | Only reading the latest batch | Read entire learnings-raw.md |
| 2 | Preserve prior distilled content as foundation | Overwriting previous distillation from scratch | Read existing distilled files, merge new patterns |
| 3 | Separate codex-specific from general patterns | Putting "use cargo fmt" in general skill | Codex-specific → repo/openai-codex.md; General → user skill SKILL.md |
| 4 | Reset learnings-raw.md after distillation | Leaving raw file to grow unboundedly | Reset to header template (6 lines) |
| 5 | Update distillation_count in state.json | Forgetting to track distillation | Increment count, set last_distillation_at |
| 6 | Patterns must be evidence-based | "I think PRs should..." | "PRs that {observed pattern} were {merged/rejected} — seen in #{n1}, #{n2}" |
cat ~/.claude/codex-pr-lessons/learnings-raw.md
cat ~/.claude/skills/pr-contribution-excellence/repo/openai-codex.md
cat ~/.claude/codex-pr-lessons/learnings-distilled.md
cat ~/.claude/skills/pr-contribution-excellence/SKILL.md
cat ~/.claude/skills/pr-contribution-excellence/evidence.md
Look for:
| Pattern Type | Output Target | Example |
|---|---|---|
| Codex repo conventions | repo/openai-codex.md | "Rust PRs must pass cargo clippy --tests" |
| Codex reviewer preferences | repo/openai-codex.md | "Maintainer X prefers exhaustive match over if-else" |
| Codex process rules | repo/openai-codex.md | "Feature PRs without pre-approved issues get closed" |
| General PR description patterns | User skill SKILL.md | "Link to issue in first line of PR body" |
| General review navigation | User skill SKILL.md | "Address blocking feedback before nits" |
| General contribution etiquette | User skill SKILL.md | "Respond to every review comment, even nits" |
| General scope management | User skill SKILL.md | "Keep PRs under 300 changed lines" |
Update ~/.claude/skills/pr-contribution-excellence/repo/openai-codex.md with the format:
# Codex-Specific Contribution Patterns
Last updated: {date} | Distillation #{count} | Based on {N} PRs analyzed
---
## Repository Conventions
{patterns about code style, testing, tooling specific to openai/codex}
## Reviewer Expectations
{patterns about what maintainers look for, common feedback themes}
## Process & Workflow
{patterns about the contribution process, issue-first requirements, CLA}
## Common Rejection Reasons
{patterns about why PRs get closed without merge}
## Success Patterns
{patterns about what gets merged quickly and cleanly}
Update ~/.claude/skills/pr-contribution-excellence/SKILL.md with only universal patterns (no evidence entries). Evidence and distillation log entries go to ~/.claude/skills/pr-contribution-excellence/evidence.md.
SKILL.md format (universal patterns only):
---
name: pr-contribution-excellence
description: Patterns for excellent open-source PR contributions, distilled from analyzing real PRs
keywords: pr, contribution, review, open source, pull request, code review
---
## When to Use
When preparing a PR for any open-source project.
## Non-Negotiable Rules
| # | Rule | Violation Example | Correct Pattern |
|---|------|-------------------|-----------------|
{Numbered rules distilled from observations}
## Patterns
{Detailed patterns with evidence references}
## Anti-Patterns
{Common mistakes observed in rejected PRs}
evidence.md format (append new entries):
## Distillation #{count} ({date})
- {pattern}: evidence from PR #{a}, #{b}, #{c}
Update ~/.claude/codex-pr-lessons/learnings-distilled.md:
# Distilled PR Learnings
Last updated: {date} | Distillation #{count}
---
## Distillation #{count} ({date})
### New patterns identified
- {pattern 1} (evidence: PR #{a}, #{b}, #{c})
- {pattern 2} (evidence: PR #{d}, #{e})
### Patterns reinforced
- {existing pattern} now supported by {N} additional PRs
### Patterns revised
- {old pattern} updated because {new evidence}
---
{Previous distillation entries preserved below}
Reset ~/.claude/codex-pr-lessons/learnings-raw.md to:
# Raw PR Learnings
Accumulated observations from analyzing closed PRs in openai/codex.
Each batch appends a section below. When this file exceeds 200 lines, distillation is triggered.
---
# Increment distillation_count
# Set last_distillation_at to current ISO timestamp
NOW=$(date -u +%Y-%m-%dT%H:%M:%SZ)
cat ~/.claude/codex-pr-lessons/state.json | jq \
".distillation_count += 1 | .last_distillation_at = \"${NOW}\"" \
> /tmp/state-tmp.json && mv /tmp/state-tmp.json ~/.claude/codex-pr-lessons/state.json
A good distilled pattern must be: