create_entity
Create an observation, rule, or knowledge entity to store AI agent findings, directives, or reference docs in CogZ's knowledge layer.
Instructions
Create a knowledge-layer entity. entity_type picks the lifecycle, not the topic — ask what the entry IS: 'observation' = something that happened (bug found, surprising behavior, decision noticed) — raw, append-only, unvalidated; consolidation promotes the good ones to rules. 'rule' = a verified directive agents must always follow (conventions, constraints) — pushed into every context pack; change via supersede, not edits. 'knowledge' = a curated reference doc (architecture, gotchas, design decisions) — the only editable type (update_knowledge). Requires: content always; title+category for knowledge.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Absolute path to the project root containing `.cogz/`. | |
| tags | No | `knowledge` only. | |
| title | No | Title. Required for `knowledge`; auto-generated for observation/rule when omitted. | |
| source | No | `observation` only: who or what produced it. Default: "agent". | |
| content | Yes | Entity body. Required for all types. | |
| category | No | Category — required for `knowledge` (e.g. architecture, decisions, gotchas). Ignored otherwise. | |
| confidence | No | `rule` only: confidence 0..1. | |
| references | No | UUIDs of entities this entry references (code or knowledge). | |
| entity_type | Yes | Which lifecycle class to create: `observation` (raw finding, append-only, unvalidated), `rule` (verified directive, always delivered in packs, supersede to change), or `knowledge` (curated reference doc, editable via update_knowledge). | |
| supporting_ids | No | `observation` only: UUIDs of observations this one supports — creates `supports` edges for promotion consolidation. |