openspec-codekb-integration

Enriches OpenSpec workflow stages with CodeKB semantic knowledge retrieval and feedback.

1|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill openspec-codekb-integration-te-quanbzhang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openspec-codekb-integration
Source: https://github.com/TE-QuanBZhang/skills-pool/tree/main/codekb/skills/openspec-codekb-integration
Command: npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill openspec-codekb-integration-te-quanbzhang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @yun918/codekb.

What problem does it solve? When running OpenSpec change workflows (explore, propose, apply, archive, android-bug), agents lack access to the project's accumulated design decisions, business rules, and historical bug patterns, leading to proposals that violate existing constraints and fixes that reintroduce old defects. ## Core Features & Use Cases - Stage-by-stage knowledge enrichment: Injects CodeKB semantic search, conventions, and symbol explanations into each OpenSpec stage, from exploration overviews to constraint association during proposals. - Archive knowledge feedback: Distills new design decisions and rules from completed changes via codekb extract --from-change, marking superseded entries and maintaining traceability with source_change. - Bug pattern retrieval: Surfaces known_issues and historical defect patterns on suspect symbols during Android bug investigation so fixes do not reintroduce past failures. - Use Case: While drafting a proposal for a payment module change, the agent queries CodeKB for decisions and rules scoped to that module, discovers the constraint that amounts must use BigDecimal, and adds a "相关约束" section referencing the knowledge entry IDs. ## Quick Start Ask the agent to enrich the current OpenSpec proposal with relevant CodeKB design decisions and conventions for the affected module.

Frequently Asked Questions about openspec-codekb-integration

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

FAQPage Schema
How do I integrate CodeKB with the OpenSpec workflow?

Install the CodeKB CLI globally and run codekb init in your project, then verify with codekb status. Once the index is healthy, each OpenSpec stage automatically gains semantic search, conventions, and explanation queries as described in the integration guidance.

How do I extract design knowledge from a completed OpenSpec change?

Run codekb extract --from-change with the change name during the archive stage. It reads proposal, design, spec-delta, and archive files to distill new decisions and rules, marks superseded entries, and records source_change for traceability.

Does this integration work without CodeKB installed?

No CodeKB steps run when the CLI is absent or the project is not initialized. The standard openspec skills plus CodeGraph workflow continues unchanged, since the integration is strictly an optional best-effort enhancement.

What confidence threshold applies to knowledge used in proposals?

Only knowledge entries with confidence of 0.7 or higher may be associated during the propose stage. Low-confidence entries must not guide design decisions, and conflicts between the proposal and existing knowledge should be flagged.

How does CodeKB help investigate Android bugs?

During the android-bug stage, search CodeKB for bug-pattern and decision knowledge matching the symptom keywords, then explain the suspect symbol. Its known_issues field reveals historical defect patterns the fix must not reintroduce.