okf-gem · docs
Agent skill

consume: use a bundle as context

Read the bundle to do the task, and leave it better than you found it.

When to use it

  • A repo carries a bundle and your task needs its knowledge: planning a migration, touching a service the bundle describes, answering "how does this system work here".
  • Before grepping the codebase for tribal knowledge someone already wrote down.
  • In practice this verb often routes itself: a repo with a bundle plus a task needing its knowledge is consume, no invocation required.

What the agent does

Consume is deliberately the shortest playbook, because a well-curated bundle does most of the work:

  1. Orient first. okf index maps the whole bundle in one pass: every directory's index body, rollups, and listings. log.md gives recent history. This is the skill's always-on reflex: the map and the log come before grep or opening leaf files, because they are the cheapest high-signal context there is.
  2. Follow links, not directories. From the map, the agent follows cross-links only into the concepts the task actually needs, and okf search answers the pointed questions along the way in ranked rows. On a large bundle, okf graph --json --minimal hands over the whole link structure at once without carrying every body, so a traversal can be planned without opening any file, and the list views (okf catalog, okf files) filter by type, area, and tag for the narrow questions.
  3. Tolerate broken links. A link to a concept that does not exist yet is not-yet-written knowledge, not an error. The spec requires consumers to tolerate it, and lint's backlog view treats it as demand.
  4. Write back. If the task teaches something durable (a fact the bundle lacks, a link it is missing, a concept that no longer matches reality), the agent switches to maintain and records it before finishing.

The CLI serves the views; the judgment is in choosing which concepts matter for the task and in recognizing, mid-task, the moments worth writing back.

Try it

In Claude Code with the okf plugin, run /okf:gem consume, or ask the skill in plain words:

Use the knowledge bundle in .okf/ to plan the migration off the legacy auth service.

Pitfalls

  • Consume writes back what it learns. Ending the task without recording the durable learning is the failure that lets bundles rot into folklore. If the work taught it, the bundle should carry it; that write-back reflex is the whole flywheel.
  • Skipping orientation. Grepping straight into leaf files misses what the index would have shown in one pass, and it can never reveal the index entry that is missing.
  • Treating broken links as failures. They are demand signals for knowledge not yet written. Note them; do not "fix" them by deleting the link.
esc
navigate open