Agent skill
ralph-knowledge-merge-and-promotion
Ralph-v2 knowledge extraction, staging, merge, and promotion reference. Use when running Librarian EXTRACT, STAGE, or PROMOTE modes, applying merge rules, writing extracted frontmatter, or promoting staged knowledge into `.docs`.
Install this agent skill to your Project
npx add-skill https://github.com/arisng/github-copilot-fc/tree/main/skills/ralph-knowledge-merge-and-promotion
SKILL.md
Ralph Knowledge Merge And Promotion
This skill contains the deterministic parts of Ralph-v2's knowledge pipeline.
Pipeline Tiers
- Iteration scope:
iterations/<N>/knowledge/ - Session scope:
knowledge/ - Workspace scope:
.docs/
Preflight Gates
| Gate | Mode | Creates If Missing |
|---|---|---|
| 0 | EXTRACT | iterations/<N>/knowledge/ + Diátaxis subdirs |
| 1 | STAGE | knowledge/ + Diátaxis subdirs |
| 2 | PROMOTE | .docs/ + Diátaxis subdirs |
If auto-creation or validation fails, return blocked.
Extracted File Frontmatter
---
category: tutorials | how-to | reference | explanation
source_session: <SESSION_ID>
source_iteration: <N>
source_artifacts:
- iterations/<N>/tasks/task-3.md
extracted_at: <ISO8601>
staged: false
staged_at: null
promoted: false
promoted_at: null
---
Merge Algorithm
| Case | Condition | Action |
|---|---|---|
| New file | No matching filename in target | Copy directly |
| Source newer | Source timestamp greater than target | Overwrite target |
| Target newer | Target timestamp greater than source | Skip |
| Content overlap | Same category and >50% H2/H3 heading overlap | Append unique sections |
| Contradictory content | Same heading, different body | Newer content wins |
EXTRACT Checklist
- Poll signals.
- Initialize
## Knowledge Progressif missing. - Run Gate 0.
- Collect evidence from tasks, reports, plan, and review artifacts.
- Re-poll signals.
- Filter to reusable knowledge only.
- Classify into exactly one Diátaxis category.
- Write iteration knowledge files with traceability frontmatter.
- Update
iterations/<N>/knowledge/index.md. - Update knowledge progress.
STAGE Checklist
- Poll signals.
- Run Gate 1.
- Resolve source iterations.
- Inventory current session knowledge.
- Merge selected iteration knowledge into session knowledge.
- Mark source entries as staged.
- Update
knowledge/index.md. - Update
plan-knowledge-staging.
PROMOTE Checklist
- Poll signals.
- Initialize knowledge progress section if needed.
- Respect
INFO + target: Librarian + SKIP_PROMOTION:. - Run Gate 2.
- Read staged, unpromoted knowledge files.
- Re-poll signals.
- Merge into
.docs/. - Strip staging-only frontmatter and normalize content.
- Apply
diataxis-categorizerfor sub-category resolution. - Mark entries promoted.
- Update
knowledge/index.mdand.docs/index.md.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
openspec-propose
Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
openspec-archive-change
Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
openspec-explore
Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
openspec-apply-change
Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
fleet
Multi-iteration parallel subagent orchestrator for Kimi Code CLI with streamlined observability, automated documentation, and atomic commits. Use when orchestrating complex work across multiple subagents, enabling parallel execution, or when explicitly requesting fleet mode with '/flow:fleet'. Integrates diataxis documentation and git-atomic-commit workflow.
github-pages-deploy
Deploy a static HTML file or static site directory to GitHub Pages. Use when the user wants a durable GitHub-hosted URL for a static page, diagram, report, or generated site, and can provide GitHub authentication via GITHUB_TOKEN or GH_TOKEN.
Didn't find tool you were looking for?