# Agent Knowledge Loop

> Manage a local, traceable Agent knowledge loop: ingest archived Codex tasks or trusted files, retrieve task context, govern provisional knowledge, record use, and capture feedback. Use when the user asks to install or operate Agent Knowledge Loop, search their personal knowledge before a task, review knowledge candidates, add a trusted source, diagnose sync, or record which knowledge influenced an output.

- Skill: `erduo1998-cell/agent-knowledge-loop` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add erduo1998-cell/agent-knowledge-loop`
- Raw SKILL.md: https://api.skillmd.com/api/skills/erduo1998-cell/agent-knowledge-loop/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: erduo1998-cell (https://skillmd.com/u/erduo1998-cell)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/erduo1998-cell/agent-knowledge-loop

---


# Agent Knowledge Loop

Operate the user's private knowledge system through the installed launcher:

`{{KNOWLEDGE_LOOP}}`

## Required behavior

1. Run `doctor --deep` before repairing an uncertain installation.
2. Search before a relevant development, content, or learning task. State each result's status and source locator.
3. Treat `provisional` and `contested` results as leads, not facts. Never describe them as accepted.
4. Never accept an item on the user's behalf. `review accept` requires the user to have actually reviewed it, plus a named reviewer and `--confirm reviewed`.
5. Record the knowledge IDs used in material output with `record-use`; record corrective or contradictory results with `feedback`.
6. Never copy raw private sources, databases, or Vault pages into a Git repository, prompt log, or external service.

## Common flows

### Retrieve before work

Run `query "<current task>" --json`. Prefer accepted results. If useful provisional results exist, show their uncertainty and source before relying on them.

### Sync

Run `sync --source all`. A source failure must remain visible; do not call a failed sync complete.

### Review

Run `review list`, show the source-backed content to the user, and wait for their judgment. Only after explicit approval run:

`review accept <knowledge-id> --reviewer "<name>" --confirm reviewed`

### Close the loop

After finishing a task, run `record-use` with the used knowledge IDs and an artifact locator. If the outcome changes the prior judgment, add `feedback`; feedback stays pending until human review.

Read [references/commands.md](references/commands.md) for exact commands, backups, and recovery.

