Skip to content

[Extension]: Update OKF Knowledge Bundle Generator to v0.5.0 #4439

Description

@alexcpn

Extension ID

okf

Extension Name

OKF Knowledge Bundle Generator

Version

0.5.0

Description

Generates and maintains an Open Knowledge Format (OKF v0.1) knowledge bundle from a source-code repository, mining git history for rationale and parking what it cannot verify as open questions.

Author

Alex Punnen

Repository URL

https://github.com/alexcpn/speckit_okf

Download URL

https://github.com/alexcpn/speckit_okf/archive/refs/tags/v0.5.0.zip

License

MIT

Homepage (optional)

https://github.com/alexcpn/speckit_okf

Documentation URL (optional)

https://github.com/alexcpn/speckit_okf/blob/main/README.md

Changelog URL (optional)

https://github.com/alexcpn/speckit_okf/blob/main/CHANGELOG.md

Required Spec Kit Version

=0.12.0

Required Tools (optional)

  • bash - required
  • python3 (>=3.9) - required
  • git - optional (used for churn ranking, history mining and incremental update; everything else works without it)

Number of Commands

4

Number of Hooks (optional)

0

Tags

knowledge, okf, documentation, metadata, catalog

Key Features

  • Generates a conformant OKF v0.1 bundle: cross-linked markdown concepts with YAML frontmatter for services, modules, APIs, data models and operations
  • Mines git history for design rationale, following reverts back to the commit they reverted, so invariants recorded nowhere else are captured with commit citations
  • Parks what it cannot establish as open_questions instead of guessing, and /speckit.okf.clarify folds human answers back in behind <!-- clarified --> sentinels that later updates will not overwrite
  • Incremental /speckit.okf.update diffs since the last logged commit and refreshes only affected concepts, deprecating rather than deleting
  • /speckit.okf.validate enforces the OKF §9 conformance rules (4 error classes, 9 warning classes)

Testing Checklist

  • Extension installs successfully via download URL
  • All commands execute without errors
  • Documentation is complete and accurate
  • No security vulnerabilities identified
  • Tested on at least one real project

Submission Requirements

  • Valid extension.yml manifest included
  • README.md with installation and usage instructions
  • LICENSE file included
  • GitHub release created with version tag
  • All command files exist and are properly formatted
  • Extension ID follows naming conventions (lowercase-with-hyphens)

Testing Details

Please note — this update also corrects the repository URLs. The existing catalog entry (from #3602) points at alexcpn/speckit_ofk, a typo for speckit_okf. Those URLs currently resolve only because GitHub redirects renamed repositories. All five fields above use the correct name.

Tested on: Linux, Python 3.10 and 3.11.

Test project: kubernetes/kubernetes at d5ccf7968e5 — 25,917 files, 500,022 lines of Go, 140,761 commits. Plus a synthetic non-git project to cover the new degradation path.

Release archive verified: downloaded v0.5.0.zip, confirmed extension.yml declares version 0.5.0, all four declared command files resolve, and both bash scripts are present and executable.

Test scenarios:

  1. Inventory scan of the full Kubernetes tree — completes in 2.1s, writes a 56 KB JSON inventory.
  2. Per-path history mining on pkg/kubelet/cm — surfaces the revert/hotfix commits the workflow depends on.
  3. Generated a 9-concept bundle for pkg/kubelet and validated it — RESULT: CONFORMANT (OKF v0.1), 0 errors.
  4. Same on a project with no .git — inventory reports git.is_git_repo: false, history exits 0 with a notice, bundle still validates CONFORMANT.
  5. Negative case — a git repository whose log.md omits the required Commit: line still fails with E4, confirming the non-git relaxation did not weaken the check inside a repository.

Changes since 0.3.0:

  • Fixed a bug that made the extension unusable on large repositories. okf-inventory.sh exited 141 with no output on any repo big enough for a head -N pipeline to close on a still-writing producer under set -o pipefail. It never fired on small repos, so it only affected the repositories the tool exists for.
  • Works without git. Rule E4 previously made a conformant bundle impossible outside a repository, since every log.md block must record a commit SHA and there is none to record. E4 now accepts none and is skipped outside a repository; the inventory reports a git.is_git_repo flag rather than a fabricated branch name.
  • Richer generated concepts. # Interfaces and # Dependencies are now required for Service and Module concepts and must be extracted from the source and derived from real imports rather than recalled; history mining follows reverts to their originals; open_questions are interrogated against five fixed categories instead of noted incidentally.
  • Also packaged as an Agent Skill for agents outside Spec Kit, and available standalone on PyPI as catalogify. The Spec Kit commands and the skill drive identical workflows.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions