ワンクリックで
spek-knowledge
Search, contribute to, or update the project's knowledge base.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Search, contribute to, or update the project's knowledge base.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Create a new Plan from an approved Specification.
Execute an approved Plan to implement the feature.
Search, contribute to, or update the project's knowledge base.
Create a new Specification for a feature.
Create a new Plan from an approved Specification.
Execute an approved Plan to implement the feature.
| name | spek-knowledge |
| description | Search, contribute to, or update the project's knowledge base. |
This skill orchestrates the existing {{command}} knowledge CRUD surface for ad-hoc read, contribute, and update operations on the project's knowledge store, without starting a spec/plan/implement flow. Unlike spek-new, spek-plan, and spek-implement, it does not drive an interactive CLI state machine — it is a static playbook. The agent recognises the user's natural-language intent, picks one of three branches (lookup / contribute / update), and calls the matching {{command}} knowledge command directly.
Invoke this skill any time the user references the knowledge base, an entry, a convention worth remembering, or asks a question that the knowledge store might already answer. Typical natural-language triggers include:
One skill handles all three intents. Discriminate by what the user actually said — do not ask the user to pick a slash command per intent.
Triggered when the user wants to read or search existing entries. A lookup does not dump the raw hit list — it returns a single consolidated, source-cited answer with duplicates removed and the most specific source winning. The flow has a deterministic stage (exact de-dup) and a judgement stage (consolidation), kept strictly separate.
Search. Run {{command}} knowledge search <query> with a concise query derived from the user's question. The output is a ranked list of results — one per matching document, strongest match first — each carrying its scope (e.g. project, team, global), path, title, score, category (the kind of knowledge: e.g. gotchas, architecture, learnings), checksum (a content hash), and up to three excerpts. A document matches when every query word occurs somewhere in it, in any order. If there are no hits, say so plainly and stop — do not fall back to a write unless the user explicitly asks to add a new entry.
Exact de-dup (deterministic — no judgement). Group the hits by their checksum. Hits sharing a checksum are byte-identical copies of the same entry held in more than one place; collapse each such group to a single candidate, unioning the scope/path citations of every copy in the group. This is pure equality — never merge two entries whose checksums differ at this stage, however similar they look. The result is a list of unique candidates, each with one or more source citations.
Consolidate (judgement — delegated to a sub-agent). Hand the unique candidates to a consolidation sub-agent so the raw bodies never crowd the main context. The sub-agent's contract:
scope(s), path(s), and category).{{command}} knowledge read --data '{"scope":"<scope>","path":"<path>"}', then classify the relationship between candidates and combine them:
project (most specific) → team → global (least specific); a project entry overrides a team entry overrides a global one for the same item. State the winning guidance and note what it overrode.Present the sub-agent's consolidated answer to the user, keeping every citation (scope + path) visible so the user can see which configured store each point came from. Never present the raw hit list as the result.
If the executing agent cannot spawn a sub-agent, run the exact same consolidation inline in the main context instead: read the unique candidates' bodies, apply the identical relationship-classification and layered-precedence rules, and present the same single cited answer. The output is identical; only the context isolation is weaker. Do not block on the absence of sub-agent orchestration.
Triggered when the user wants to record something new.
{{command}} knowledge sources to enumerate configured scopes (the authoritative list of writable destinations), and {{command}} knowledge categories to load the category definitions — each category's purpose, boundary, retrieval tier, and expected entry shape.convention, a defined term is a glossary entry, the reasoning behind a choice is a decision, an empirical finding is a learning, a structural fact is architecture, a sharp edge is a gotcha. Honour the entry shape: the glossary is for a term and a short gloss only — steer over-long or multi-paragraph content to a more fitting category (architecture, learnings, decisions) rather than letting it bloat the always-applied glossary. The entry's path is then <category>/<slug>.md, a slug-style filename under the chosen category..spektacular/tmp/<slug>.md using the Write tool. Do not pipe the body via stdin; the only supported invocation is --file <staged>.{{command}} knowledge write --data '{"scope":"<scope>","path":"<category>/<slug>.md"}' --file .spektacular/tmp/<slug>.md
rm .spektacular/tmp/<slug>.md.Triggered when the user wants to revise an existing entry.
{{command}} knowledge search <query> (or read the user-supplied path directly) to locate it. Confirm the scope and path with the user if there is any ambiguity.{{command}} knowledge read --data '{"scope":"<scope>","path":"<path>"}'..spektacular/tmp/<slug>.md using the Write tool.{{command}} knowledge write --data '{"scope":"<scope>","path":"<path>"}' --file .spektacular/tmp/<slug>.md
The scope and path must match the original — that is what makes this an update rather than a new entry.rm .spektacular/tmp/<slug>.md.If the user declines, asks for changes, or expresses uncertainty at any propose-then-confirm checkpoint, do not invoke {{command}} knowledge write. Either loop back to refine the proposal — adjust scope, path, or body and re-show — or stop and leave the knowledge store untouched. Removing the staged scratch file at .spektacular/tmp/<slug>.md is fine either way; a half-finished proposal should not linger on disk.
The propose-then-confirm contract is enforced by this prose, not by a CLI guard. Treat it as load-bearing: a write without explicit user approval is a bug in the skill's execution, not an acceptable shortcut.