# Ldclabs Kip Kip Cognitive Nexus

> KIP Cognitive Nexus

- Skill: `tomevault-io/ldclabs-kip-kip-cognitive-nexus` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/ldclabs-kip-kip-cognitive-nexus`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/ldclabs-kip-kip-cognitive-nexus/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/ldclabs-kip-kip-cognitive-nexus

---


# KIP Cognitive Nexus

You have a **Cognitive Nexus** (external persistent memory) accessible via KIP commands.

## Operating Principle

You are **not stateless**—you have persistent memory. Your job:
1. **Retrieve first**: Before answering non-trivial questions, check memory
2. **Store selectively**: Capture stable facts, preferences, relationships
3. **Use silently**: Do not expose KIP syntax to users

## Script Interface

```bash
# Single command
python scripts/execute_kip.py --command 'DESCRIBE PRIMER'

# With parameters (safe substitution)
python scripts/execute_kip.py \
  --command 'FIND(?p) WHERE { ?p {type: :type} } LIMIT :limit' \
  --params '{"type": "Person", "limit": 5}'

# Batch commands
python scripts/execute_kip.py \
  --commands '["DESCRIBE PRIMER", "FIND(?t.name) WHERE { ?t {type: \"$ConceptType\"} }"]'

# Dry run (validation only, use before DELETE)
python scripts/execute_kip.py --command 'DELETE CONCEPT ?n DETACH WHERE {...}' --dry-run
```

**Environment**: `KIP_SERVER_URL` (default: `http://127.0.0.1:8080/kip`), `KIP_API_KEY` (optional)

## Core Operations

### 1. Schema Discovery (Start Here)
```prolog
DESCRIBE PRIMER                      -- Global summary + domain map
DESCRIBE CONCEPT TYPE "Person"       -- Type schema
SEARCH CONCEPT "alice" LIMIT 5       -- Fuzzy entity search
```

### 2. Query (KQL)
```prolog
FIND(?p, ?p.attributes.role) WHERE { ?p {type: "Person"} } LIMIT 10
FIND(?e) WHERE { ?e {type: "Event"} (?e, "belongs_to_domain", {type: "Domain", name: "Projects"}) }
```

### 3. Store (KML)
```prolog
UPSERT {
  CONCEPT ?e {
    {type: "Event", name: "conv:2025-01-09:topic"}
    SET ATTRIBUTES { event_class: "Conversation", content_summary: "..." }
    SET PROPOSITIONS { ("belongs_to_domain", {type: "Domain", name: "Projects"}) }
  }
}
WITH METADATA { source: "conversation", author: "$self", confidence: 0.9 }
```

### 4. Delete (Carefully)
```prolog
DELETE CONCEPT ?n DETACH WHERE { ?n {type: "Event", name: "old_event"} }
-- Always use --dry-run first; DETACH is mandatory
```

## What to Store

| Store ✓                   | Do NOT Store ✗                          |
| ------------------------- | --------------------------------------- |
| Stable preferences, goals | Secrets, credentials                    |
| Identities, relationships | Raw transcripts (use `raw_content_ref`) |
| Decisions, commitments    | Low-signal chit-chat                    |
| Corrected facts           | Highly sensitive data                   |

## Memory Types

| Layer        | Type             | Lifespan            | Example                            |
| ------------ | ---------------- | ------------------- | ---------------------------------- |
| **Episodic** | `Event`          | Short → consolidate | "User asked about X on 2025-01-09" |
| **Semantic** | `Person`, custom | Long-term           | "User prefers dark mode"           |

**Consolidation**: After storing an `Event`, ask "Does this reveal something stable?" If yes, extract to durable concept.

## References

- **Agent workflow patterns and KIP syntax**: [references/INSTRUCTIONS.md](references/INSTRUCTIONS.md)

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/ldclabs) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

