knowledge

Manages an OKF knowledge bundle with retrieve, capture, curate, and migrate operations.

Updated Jul 19, 2026
One-click install
npx skills add https://github.com/forhas/pure-dev --skill knowledge-forhas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: knowledge
Source: https://github.com/forhas/pure-dev/tree/main/plugins/notion-dev/skills/knowledge
Command: npx skills add https://github.com/forhas/pure-dev --skill knowledge-forhas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires iwe, and includes references (resource) components.

What problem does it solve? Engineering teams lose hard-won context — rejected approaches, gotchas, and design decisions — after every merge, forcing engineers to rediscover what the code alone cannot explain. This Skill maintains a per-repo OKF v0.2 knowledge bundle that assembles one budgeted context block before a run and captures durable facts after each merge. ## Core Features & Use Cases - Budgeted retrieval: retrieve assembles one token-budgeted context block from the epic's root concept via iwe retrieve, with a read-once rule so no fact enters a run twice. - Post-merge capture: capture filters candidate facts, dedupes against existing concepts with iwe find, and writes created/updated/superseded concepts with schema validation before commit and push. - Curation and migration: curate resolves near-duplicate concepts via iwe stats similarity, and migrate moves a client's existing bundle onto the OKF schema with all-or-nothing rollback. - Use Case: After a pull request merges, the post-merge hook runs capture <ticket-id> <merge-sha> to record why an approach was ruled out, so the next ticket's retrieve surfaces that decision instead of the team re-litigating it. ## Quick Start Ask the assistant to run the knowledge retrieve operation for your epic ID to load the bundle's context block before starting a ticket.

Frequently Asked Questions about knowledge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I retrieve knowledge context for an epic before starting a ticket?

Run the retrieve operation with the epic ID, which locates the epic's root concept on the epic branch and calls iwe retrieve with a token budget. It returns one KNOWLEDGE_CONTEXT block plus parsed fields like NEXT, BLOCKED, and STATUS, and degrades to serving the brief alone if iwe fails.

How does the capture operation decide what to write after a merge?

Capture filters candidate facts by asking whether an engineer reading the merged code would still not know them, keeping rejected approaches, traps, and decisions while dropping anything the code or diff already says. Each surviving candidate is deduped against existing concepts and resolved as untouched, updated, superseded, or created.

What dependencies does the knowledge bundle require?

The bundle requires iwe version 0.19 or later on PATH, installable via cargo, brew, or npm, plus a Python 3 interpreter to run the knowledge.py script. The script uses only the Python standard library, so no pip install step is needed.

What happens when the knowledge check or retrieve fails during a run?

Operations fail closed on checks and degrade on reads. A failed check means nothing is written and the working tree is restored, while a failed retrieve serves the epic brief alone and records a partial:knowledge-retrieve signature so the ticket run continues.

How do I migrate an existing knowledge bundle to the OKF schema?

Run the migrate operation, first without --apply to print the full diff, then with --apply to rewrite concepts, move the epic brief, fix broken links, and update the config. The migration is all-or-nothing: a failed final check reverts everything it wrote.