ccoalm/ccl-skills / skills/skill-extraction-workflow
skill-extraction-workflow
Flagged复盘 / 沉淀 / 总结经验 / 补进技能 / 技能缺陷 / 流程优化 / would other teammates hit this / will we forget next time / teamwide recurrence / extract skill / post-mortem / 深度 review·审计技能仓库 / 对标外部技能包找 gap(benchmark superpowers·gstack 等) / 核查全局安装点(~/.config/opencode 等)旧快照是否遮蔽本仓技能 / 本仓(ccl-skills 等共享技能仓)OpenCode 项目配置·命令治理 → turn reusable lessons into durable CCL skills.
references/extraction-lifecycle-handoff.md
View on GitHub# Extraction Lifecycle Handoff
The SKILL.md entrypoint states the principle: project-specific provenance never enters the shared skill tree. This file is the operational mechanism: what lives where in each lifecycle phase, what migrates between phases, what the shared-repo history (commits, branch refs, and the MR/PR record) is allowed to say, and how to handle existing dirty registers.
Sibling skills routing to "Extraction lifecycle handoff" (e.g. the `software-architecture`, `go-microservice-dev`, and `python-service-dev` source-evidence-map files) route to this rule as a whole.
## The Three Phases
| Phase | Lives in | Contents |
|---|---|---|
| **Work in progress** | per-host scratch `~/.<host>/skills/.extraction-work/` | charters tied to one Figma project / one codebase / one document set, source registers populated with that project's file keys and paths, batch findings, extraction reports, review packets, codex replies |
| **Closed batch — provenance archive** | per-host private alias `~/.<host>/.private-aliases/<project>.yaml` | file keys, project URLs, real subproject paths, real branches, dated re-extraction logs, known-debt list, sanitized-label dictionary |
| **Shared skill tree** | the ccl-skills repo | label-based capability rules only |
Working artifacts are NEVER committed to the shared skill tree. The shared tree only sees the rules abstracted from the work, not the work itself.
## Migration — Scratch → Private Alias
Once an extraction batch closes, its provenance migrates from the scratch folder into the private alias file:
- File keys, project URLs, real subproject paths, real branches, dated re-extraction logs, known-debt list all move into `~/.<host>/.private-aliases/<project>.yaml`.
- The matching shared-skill content keeps only label-based capability rules — no concrete artifact names, paths, or dates.
- The scratch folder can be deleted or kept for the maintainer's own reference; either way, the shared skill tree must not know it existed.
## Shared VCS-Surface Discipline (commit, branch, MR record)
Every shared surface the integration flow creates names only:
- The sanitized capability labels touched
- The target skill / reference path
- The private alias archive that holds the provenance (by alias label, not by real project name)
This applies to the commit message(s), the **feature branch name**, the eventual **merge/squash message**, and the **entire MR/PR record** (title, body, comments/discussion, labels/metadata) — not the commit body alone. Never name real source artifacts (real repo names, real Figma project names, real document titles, real branch/ticket names, real contributor names) in any of them. Git history, branch refs, and the MR record are all the shared skill tree's history — a sanitized commit under a source-shaped branch name or MR title still leaks, and leaks here are as severe as leaks in skill text. When unsure whether a surface is shared, treat it as shared and sanitize.
## R0 Audit Scope
The R0 leakage audit (see `references/r0-leakage-audit.md`) runs against the shared-skill content, NOT against the working artifacts in scratch. Scratch is the maintainer's private workspace; R0 has no jurisdiction there. R0's jurisdiction begins at the commit boundary into the shared repo.
## Generic Methodology Carve-Out
A generic, reusable register / template / methodology reference (one that documents the *shape* of charters, registers, evidence maps, or judgment matrices without naming any specific project's keys / paths) MAY live in the shared skill tree.
**Example**: a `references/source-register.md` that is a template / sample is allowed; it may also carry a source-neutral ledger zone, as long as it describes reusable columns, methodology, and shared impact-chain history without containing any project's actual rows.
The distinction is **shape vs content**: shape-documenting refs are shared, content-bearing artifacts are private.
## Grandfather Rule — Existing Dirty Registers
Any existing in-skill register that already contains real project provenance (concrete file keys, dated re-extraction logs, real repo names) is grandfathered as `known_debt`. It can stay in place temporarily but:
- It MUST be migrated to a private alias file before new project-specific provenance is added to it.
- Adding fresh project provenance to a grandfathered register is treated as a new R0 hit, not protected by the grandfather status.
- The grandfather status is for cleanup planning, not for indefinite tolerance.
## Authoring From a Plugin / Read-Only Install
When the workflow is consumed as a plugin (or any read-only install mechanism), skills load from a consumption cache, not from an editable checkout. To land an extraction you must author in the canonical source repo — and that repo is discoverable from the install itself, so do not guess a path or edit the wrong copy:
- **Discover the source URL from the install.** The plugin/marketplace registration that shipped with the install records it: the marketplace clone's git remote (`git -C <marketplace-clone> remote get-url origin`), the marketplace `source.url` in the host's plugin config/registry, and the install URLs documented in the consuming project's README each help identify the canonical repo. Cross-check them rather than trusting one — a README can be stale or absent, and an install/marketplace URL can differ from the canonical source repo (e.g. http vs ssh, or a mirror).
- **Author in one standing checkout — clone once, reuse.** Clone that URL a single time (or reuse an existing checkout) and reuse it for every later extraction. Do not clone per change.
- **Never edit the consumption copies.** The plugin cache and the marketplace-managed clone are overwritten on update; edits there are lost and never reach the repo. Author only in your own checkout, then land through the normal review/MR gates.
- **Isolate each change with a worktree, not a clone.** Make every extraction in a dedicated worktree off the standing checkout — worktrees share the object store and are not full repo copies — and remove it once the change lands, following the closeout section (`## 收尾`) of `worktree-isolation/references/merge-and-teardown.md`: you must scan its gitignored outputs before removal (`git -C <worktree> status --ignored -s`, which must exit 0) and copy any output that is costly to recreate back to the standing checkout, because `git worktree remove` deletes gitignored files without asking. This meets the concurrent-session isolation rule without proliferating repo copies.
- **Accumulation is consumption-side, not authoring.** Plugin caches on some hosts keep one directory per installed version, so old version dirs can linger after updates — unrelated to authoring. Prune them with the host's plugin prune command if disk matters.
After landing, the change reaches every install through the normal update path (marketplace refresh + plugin update); the exact update command lives in the consuming project's README, not in the shared skill tree.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |