Use this skill to help users enable and maintain the "project knowledge base".
The project knowledge base is not a folder, nor a draft area. It is used to let AI organize, over the long term, the stable understanding that will be repeatedly used in the current project. Raw materials still go in the reference materials area, and drafts and deliverables still enter the output area according to the workbench rules.
Main entry boundary
If the user is only asking about the product overview, getting-started path, installation entry, or which StarWork capability to use, return to the starwork main entry. General material organization, README organization, and phase wrap-up do not belong to this skill; only long-term stable knowledge accumulation, knowledge base enablement, and knowledge base maintenance use starworkKnowledge。
First screen: enable or maintain the knowledge base
When the user says "enable the knowledge base", "initialize the knowledge base", or "let AI remember project knowledge", first explain clearly what this step is, and do not directly throw out CLI commands:
项目知识库是让 AI 长期记住项目稳定理解的地方。
它不是原始资料文件夹,也不是草稿区。原始材料仍放在参考资料区,临时想法仍放在草稿区;知识库只沉淀会反复用到、已经比较稳定的判断,比如客户背景、产品规则、术语解释、长期策略和复盘结论。
Next, I will guide you through enabling it in three steps:
- First check whether the current project already has a knowledge base;
- Then preview which knowledge base files StarWork is preparing to create;
- After you confirm, formally enable it and do a structure check.
I will not move old materials wholesale into the knowledge base, nor will I modify raw materials before you confirm.
当用户给资料、说“帮我记住”“建知识库”“这一堆材料整理一下”时,先输出:
```text
我会先帮你判断这些材料哪些适合进入长期知识库。
知识库不是把所有资料搬进去的文件夹,也不是草稿区。它只保存以后会反复用到、已经比较稳定的理解,例如项目规则、术语解释、客户背景、长期策略、阶段复盘结论。
接下来我会先做三件事:
1. 把你给的材料分成长期知识、临时资料、草稿、参考来源和待确认事实;
2. 预览我建议写入知识库的条目、来源、保存理由和位置;
3. 等你确认后,再写入正式知识文件。
在你确认前,我不会把整批资料直接搬进知识库,也不会改动已有知识文件。
Skill / CLI boundary
starwork knowledge = 创建和检查知识库结构
starworkKnowledge skill = 判断、采访、分类、预览、整理、写入知识内容
starworkKnowledgeProject = 项目开启知识库后安装到当前项目里的维护助手
The CLI must be used first:
- Enable the knowledge base: first run
starwork knowledge init --dry-run, and after the user confirms, runstarwork knowledge init --yes。 - Check status: run
starwork knowledge status --json。 - Check structure: run
starwork knowledge check。 - Involving old
知识/、knowledge/or custom paths: first generate thestarwork.knowledgeblueprint, then runstarwork knowledge apply --blueprint <file> --dry-run, and execute after the user confirms.
Do not bypass the CLI to hand-write another directory structure.starwork knowledge init After success, the CLI will install starworkKnowledgeProject into the current project. Do not let the user install this project-internal business Skill globally.
Incoming Material Classification
When the user provides materials, the first step is classification and explanation, not direct writing. A piece of material can contain multiple categories at the same time.
| Category | User-visible explanation | Default handling | Can it enter the knowledge base |
|---|---|---|---|
| Long-term knowledge | Project understanding that will be repeatedly used later and is already relatively stable | Candidate for writing to pages/ or synthesis/ |
Yes, but still requires preview confirmation |
| Temporary material | May be useful for this task, but not necessarily reused long term | Leave in reference materials, task context, or a user-specified location | Does not enter by default |
| Draft | Content still being written, not yet finalized, and possibly subject to major changes | Leave in the draft or output process | Does not enter unless converted into a confirmed conclusion |
| Reference source | Original sources, links, files, and interview records that support knowledge judgments | Record to sources/ or cite the existing source location |
The source can be recorded, but the full text is not copied |
| Fact to be confirmed | Looks important, but the source, authenticity, or stability is insufficient | Put it in the candidate list and ask the user follow-up questions | Do not write formal knowledge before user confirmation |
Judgment rules:
- The source is not the knowledge body itself; web pages, PDFs, meeting minutes, and chat logs can serve as sources, but they cannot be moved in wholesale as
pages/orsynthesis/。 - A draft can only be converted into long-term knowledge after the user confirms that a certain judgment has become stable.
- Facts pending confirmation cannot be disguised as definite conclusions; at most they can be placed in a pending-confirmation list or
inbox/, with a clear explanation of why they are pending confirmation.
Preview before writing
Before any formal write to pages/、synthesis/、sources/、index.md or log.md , a pre-write preview table must first be shown to the user.
| Knowledge entry | Source | Why it is worth keeping long-term | Suggested placement | Whether user confirmation is needed |
|---|---|---|---|---|
| ... | ... | ... | ... | ... |
After the preview, you must list the content that is not recommended for writing into the knowledge base this time:
这次我不建议写入知识库的内容:
- 原始资料全文:只作为来源保留。
- 尚未定稿的段落:仍按草稿处理。
- 来源不明确的判断:先列为待确认事实。
The confirmation wording must be specific:
请确认:是否按上表写入这些知识条目?
如果你只想保存其中几条,也可以告诉我编号。
Vague authorization such as "I'll keep organizing" or "I'll take care of it for you" must not be used as a substitute for user confirmation.
Workflow
1. The user wants to enable the knowledge base
First confirm the current directory:
starwork knowledge status --json
If it has not been enabled yet, explain it in plain language, then run:
starwork knowledge init --dry-run
After the user confirms:
starwork knowledge init --yes
starwork knowledge check
2. The user provided new material
First read schema.md and index.md, to understand the current knowledge base rules and the existing map. Then do incoming material classification, provide a pre-write preview table, and wait for user confirmation.
After the user confirms:
- Single stable topic: update or create
pages/。 - Strategies, retrospectives, methods, or judgments formed across multiple topics: update or create
synthesis/。 - Important sources: record to
sources/。 - Temporarily unclassifiable or needs confirmation: place in
inbox/, with a clear explanation of the reason and follow-up confirmation questions.
Finally update index.md and log.md。
3. The user asks a question related to long-term knowledge
First read index.md, then read the relevant pages/ and synthesis/. After answering the user, if a new long-term reusable judgment has emerged, first tell the user where you suggest depositing it in the knowledge base; update only after the user confirms.
4. The user requests a strategy, retrospective, or stage judgment
Prioritize writing to or updating synthesis/。synthesis/ It should connect multiple topic pages, sources, and project experience. Do not directly rewrite a piece of raw material into a synthesis.
5. The user already has an old knowledge directory
If you see an old 知识/、knowledge/、资料库/ or a similar directory, do not directly migrate, rename, or delete it. First determine whether it is more like a raw material area, old knowledge drafts, an old-version project knowledge base, a project-center shared knowledge link, or an ordinary historical directory, then confirm with the user, and only then generate a blueprint.
pages/ and synthesis/
pages/ = 知识卡片
synthesis/ = 思考成果
pages/ are suitable for user profiles, title structures, product modules, customer needs, and competitor accounts.synthesis/ is suitable for 30-day cold-start strategies, stage retrospectives, growth methodologies, and positioning adjustment suggestions.
When the user does not need to understand the internal directory, you can say:
我会把稳定主题放成知识卡片,把跨主题的判断放成思考成果;在你确认前,两类都不会正式写入。
Prohibitions
- Do not treat an entire batch of material as the knowledge base body.
- Do not do whole-package import-style organization.
- Do not move raw material wholesale into the knowledge base.
- Do not directly treat the host transcript, memory, or summary as the knowledge base.
- Do not put temporary material, drafts, command output, or single-task processes into the knowledge base.
- Do not treat drafts as long-term knowledge.
- Do not state unconfirmed facts as definite conclusions.
- Do not commit to the project center by default.
- Do not automatically move, delete, or rename old
知识//knowledge/。 - Do not write vague summaries without sources or context.