cognition-editor
Create or edit durable cognition and ontology through governed tools; For: 'remember this as a preference', 'create this project fact', 'change this rule'; Triggers: create cognition, remember this, edit cognition, correct ontology, change preference.
- License 许可
- MIT
- 所属仓库
- bonc-ai/cogseed
- 最近更新
- 2026-11-13
- Stars
- ★ 19
- Forks
- 10
01 前言 Front Matter
- name
- cognition-editor
- description
- Create or edit durable cognition and ontology through governed tools; For: 'remember this as a preference', 'create this project fact', 'change this rule'; Triggers: create cognition, remember this, edit cognition, correct ontology, change preference.
02 资源文件 13
- 参考文档_meta.json667 B
- 参考文档agents/openai.yaml623 B
- 参考文档evals/evals.json5.4 KB
- 参考文档references/eval-cases.yaml411 B
- 参考文档references/failure-modes.md810 B
- 参考文档references/governance-boundaries.md872 B
- 参考文档references/input-contract.md1.7 KB
- 参考文档references/kstar-evolution.md394 B
- 参考文档references/ontology-mapping.md1.7 KB
- 参考文档references/output-contract.md770 B
- 参考文档references/skill-spec.yaml852 B
- 参考文档references/validation-contract.md1.3 KB
- 参考文档schemas.json2.2 KB
03 SKILL.md 正文
Create or edit cognition
When to use
use_when:
- The user explicitly requests creating or saving durable cognition or ontology.
- The user explicitly names existing cognition and requests a bounded edit.
- A stored fact needs correction or a dated real-world change.
do_not_use_when:
- The user only asks a task question or provides material without requesting durable creation or an existing-record edit.
- The user asks to bypass source revocation, enable paused content implicitly, or write raw storage.
Separate an explicit creation request from an edit of an existing target. Ordinary task answers and facts discovered during work do not authorize saving durable content. Do not promise to create a candidate without an available tool and its actual receipt.
Preconditions and result
Use the current host-provided task and owner context; never invent identity or authorization. The required tools must be available. Return a short account of the actual state and changed content; retain the returned decision/version references as audit_refs. See references/input-contract.md and references/output-contract.md for the guide contract.
Create new cognition or ontology
- Confirm that the current user asks to create or save durable content. Keep the request's topic and boundaries; do not treat an assistant suggestion or a routine acknowledgment as authorization. The host verifies the actual user message, not an identity supplied in tool arguments.
- Inspect relevant existing items and ontology structures to avoid duplicates or invented identities. If the request actually changes an existing item, use the edit workflow. Do not choose another target merely to avoid a conflict.
- Call
create_cognitionwithtarget="cognition","ontology", or"joint", the complete supported content and conditions, any necessary new ontology actions, and the actual baseline. For ontology-only creation, provideexplanationwith the complete change description, title, future use and scope; do not invent a cognition asset. The host owns source references and the complete creation decision. For a joint shared rule, its requirement must be the same complete cognition body; do not keep an independent second copy. Do not invent executable conditions or effects from natural-language obligations. If validation reports field paths, correct that bounded argument shape. Never evade a requested joint save by splitting it into separate writes, dropping the ontology, removing meaningful fields or trying another target. - Use
mode="apply_if_authorized"or omit it for a normal creation request. The host displays the complete new content, conditions, scope and associated ontology for one human confirmation before saving. Do not ask a separate conversational confirmation first. Usemode="propose"only when the user asks to preview without saving; it does not open approval or create formal content. - Report only the actual returned state, new identity/version and receipt. Cancellation, a stale baseline or unavailable source is not a successful creation. Saving does not raise maturity or bypass ordinary next-turn qualification.
Edit an existing target
- Resolve the named existing target. Use
list_ability_assetsfor asset metadata. Read the target withread_ability_assetandmode="manage", orcognition_ontology_querywithmode="manage"and its record ID or exact name. Read every body chunk and the applicability and exclusion conditions. Ask the user to choose when names are ambiguous. - Preserve everything outside the requested change. For one quoted fragment, pass
replaceText={"before":"exact old fragment","after":"exact replacement"}; the old fragment must occur exactly once. For a whole new body usefields.statementinstead. Never send both body representations, and never put the unchanged old body infieldsas a baseline: use the version fields for that. Other explicit field changes also usefields. Do not silently paraphrase a precise user replacement. A rejected argument-shape error that saved nothing may be corrected within the same bounded turn; a human rejection is not permission to try again. - Call
edit_cognitionwith the existing target, changes, returned version baselines, the reason, andmode="apply_if_authorized"(the default). This is the normal edit path even when you draft or polish the new wording: the host presents the complete preview and waits for one human decision before saving when needed. Do not chooseproposemerely because you wrote the wording, and do not add a separate conversational confirmation. Usemode="propose"only when the user explicitly asks to see a plan/preview without saving yet; that mode returns preview text, requests no approval, and saves nothing. For a factual correction usefactIntent="correct"; for a real-world change usefactIntent="change"and the user's effective date. Do not guess that date. - Let the host resolve shared rule ownership and save the asset and linked ontology together. Include necessary existing linked ontology changes in
ontologyChanges; never edit a second body copy separately. The host presents one complete preview when rewriting, when the previous complete contract lacks a valid human decision, or when structural/access/additional impacts need review. - Report the returned state. Only
status="applied"means saved; use the returned version and receipt.pending_confirmationis only a preview, andblockedmeans nothing was saved. Do not claim an edit worked from a proposed patch alone.
Boundaries
- Use governed tools, not file or shell writes, for cognition and ontology storage. Never manufacture nightly provenance, use a manual flag to bypass a creation gate, or edit an unrelated candidate pool.
- The actor receiving the actual human instruction owns the write. A delegated worker may draft content but cannot promote a dispatch message into a human authorization.
- Managing a paused or owner-only item does not enable it for tasks. Revoked-source text remains unreadable.
- A verified precise edit continues the person's existing complete decision. Otherwise the complete new body and conditions require one human confirmation. Neither a model-authored origin label nor an old unrelated approval supplies authority.
- Saving does not verify effectiveness, grant tools, bind a Skill to an asset, or broaden access. Subsequent ordinary tasks use the saved current version only within its live source, scope, condition, and lifecycle boundaries.
Example
User: “Remember this as a preference: technical explanations should start with the conclusion, then give evidence; do not apply it to casual greetings.”
Inspect relevant existing cognition, then call create_cognition with the complete preference and both boundaries. Let the host show the complete creation preview once. Say it was saved only after the tool returns applied with the new identity and receipt.
User: “In the asset ‘Technical explanations’, replace ‘give the conclusion first’ with ‘give the evidence first’; leave its other conditions unchanged.”
Read that named asset in management mode, then call edit_cognition with mode="apply_if_authorized", its ID, the exact replaceText, both returned asset version baselines, and the user's instruction as the reason. Do not rewrite the rest of the statement or its conditions.
Negative example: “What should I put in this week’s report?” Use current information to answer the task; do not edit or create durable cognition.
04 同仓库更多 Skills
sample-supply-chain
供应链样本:安装钩子 + 拼写伪装 + 源覆盖。
sample-prose-only
纯散文安全守则样本:禁止某行为的说明不等于该行为。
sample-obfuscated
混淆载荷样本:解码与执行共现。
sample-hidden-content
隐藏内容载荷样本:用于回归「不可见字符不做上下文降权」这一不变量。
sample-evasion
反规避样本:危险内容只以「不可见字符切断」与「编码后」两种形式出现。
sample-agentic
代理运行时风险样本:配置篡改 + 隐蔽指令。