Skip to content

chore: skill rename to doc#92

Merged
lxfu1 merged 2 commits into
feat-context-servicefrom
chore/skill-to-doc
Jul 2, 2026
Merged

chore: skill rename to doc#92
lxfu1 merged 2 commits into
feat-context-servicefrom
chore/skill-to-doc

Conversation

@lxfu1

@lxfu1 lxfu1 commented Jul 1, 2026

Copy link
Copy Markdown
Member
  1. skill 重命名为 doc
  2. 删除无用 title_en 字段

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the codebase by renaming the concept of 'skills' to 'docs' (and 'SKILL.md' to 'DOC.md') across all APIs, CLI commands, tests, and build scripts, as well as removing the title_en field from the document schema. Feedback on the changes highlights two issues: a critical bug in applyTokenBudget where direct mutation of doc.content pollutes cached objects, and a potential side effect in buildDocMap caused by sorting the libs array in-place.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/core/token-budget.ts
Comment thread src/core/index-loader.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR renames the core “skill” concept to “doc” throughout the TypeScript codebase, removes the unused title_en metadata field, and updates build/retrieval tooling and CLI/API surfaces accordingly.

Changes:

  • Renamed Skill/SkillIndex/SkillInfo to Doc/DocIndex/DocInfo and updated JSON index shape from skills[] to docs[].
  • Updated zvec index build + schema naming and retrieval pipeline to operate on docs.
  • Updated CLI commands, public API exports, and tests to use the new doc terminology; bumped package version and added publishConfig.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/scripts/build.ts Generates doc-based JSON indexes and drops title_en from parsed frontmatter.
src/scripts/build-zvec.ts Builds zvec indexes from docs in the JSON index and renames variables accordingly.
src/index.ts Updates CLI description from skills to docs.
src/core/types.ts Renames core public types to Doc* and removes title_en.
src/core/token-budget.ts Renames token-budget helpers to operate on Doc instead of Skill.
src/core/retriever.ts Updates retrieval pipeline to return Doc[] and uses doc maps/info.
src/core/retrieval/zvec-store.ts Renames scalar-field constants and zvec schema builder to “doc”.
src/core/retrieval/embedder.ts Formatting/wording updates to align terminology (skill → doc) and improves readability.
src/core/index-loader.ts Loads DocIndex and builds Doc maps; renames list/get/info helpers to doc variants.
src/commands/retrieve.ts CLI retrieve now outputs docs and “DOC CONSTRAINTS” blocks.
src/commands/list.ts CLI list now lists docs and groups by library using Doc type.
src/commands/info.ts CLI info command now uses doc terminology.
src/commands/get.ts CLI get command now returns a doc by ID.
src/api.ts Public API now exports doc-based types/functions (getDocById, listDocs, etc.).
package.json Bumps version to 0.1.4-beta.1 and adds npm publishConfig.
tests/token-budget.test.ts Updates token-budget tests to use Doc and removes title_en assumptions.
tests/retrieve.test.ts Updates test naming to “docs”.
tests/info.test.ts Updates test naming to “doc info” terminology.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/core/retriever.ts
Comment on lines 15 to 21
import {
loadIndex,
availableLibraries,
buildSkillMap,
getSkillInfo as _getSkillInfo,
getSkillById as _getSkillById,
listSkills as _listSkills,
buildDocMap,
getDocInfo as _getDocInfo,
getDocById as _getDocById,
listDocs as _listDocs
} from './index-loader';
Comment thread src/core/retriever.ts
Comment on lines 26 to 29
// ---------------------------------------------------------------------------
// Exports for backward compatibility — redirect to index-loader
// ---------------------------------------------------------------------------

Comment thread src/api.ts
Comment thread src/api.ts
Comment thread src/api.ts
Comment thread src/commands/info.ts
Comment thread src/core/types.ts
Comment thread __tests__/info.test.ts
@lxfu1
lxfu1 merged commit ae9ffdd into feat-context-service Jul 2, 2026
4 checks passed
@lxfu1
lxfu1 deleted the chore/skill-to-doc branch July 2, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants