# Prime

> Loads and summarizes session context by reading the doctrine, project index, queue, and triage state.

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

---


# Prime — Session Context Loading

Read the domain's core files and summarize the current state for the operator.

## Process

### Step 1 — Load Doctrine

Discover the domain's doctrine file at the workspace root by what distinguishes it from the workspace's recognized structural files — not by matching a fixed list of domain names. The doctrine file is the root-level `.md` file that is *not* one of the known structural files: `PIN.md`, `QUEUE.md`, `TRIAGE.md`, `CLAUDE.md`, `AGENTS.md`, or a transient Q-keyed `Q*-gate.md` / `Q*-why.md`. Whatever root `.md` remains after excluding those is the domain doctrine file — `WORKSHOP.md`, `FORGE.md`, `LAB.md`, and `RESEARCH.md` are the 3I domains, but the rule is name-agnostic: a consumer whose doctrine file is `PERSONAL.md` (or any other `{DOMAIN}.md`) is discovered the same way. Read whichever file the exclusion leaves.

If more than one candidate remains after the exclusion, warn the operator — a workspace should belong to exactly one domain. If no candidate remains, note the doctrine file's absence and continue with the remaining steps.

### Step 2 — Load Project Index

Read `PIN.md` at the workspace root — the project index tracking what's here and what state it's in. If PIN.md does not exist, note its absence and skip.

List the subdirectories in the workspace root to cross-reference against PIN.md entries. Exclude `gates/` — that's the gate archive, not a project. Validate PIN.md against the [workspace standard](references/workspace-standard.md). Flag stale status values, PIN.md entries without a directory on disk, or directories on disk without PIN.md entries. Don't block on these — report them as part of the summary.

List files at the workspace root (not subdirectories). The expected set is: the domain doctrine file, PIN.md, QUEUE.md, TRIAGE.md, the workspace agent-instruction file `CLAUDE.md` (or its `AGENTS.md` sibling) if the workspace carries one, any active gate files matching `Q*-gate.md`, and any frozen intent records matching `Q*-why.md` — the transient, Q-keyed record a triage freezes, present at root during an item's life and parallel to `Q*-gate.md`. Flag any file not in this set as unexpected — it may be an orphaned artifact, an uncleared gate that wasn't moved to `gates/`, or scratch work that should be filed or removed. Report unexpected files as part of the summary alongside any directory mismatches. Don't block on these.

### Step 3 — Load Queue

Read `QUEUE.md` at the workspace root — the operational intent tracker. If QUEUE.md does not exist, note its absence and skip.

### Step 4 — Check Triage

Check `TRIAGE.md` — raw intake. Only check whether content exists below the `---` separator. If content exists, output exactly this line and nothing more: "TRIAGE.md has pending intake — triage when ready?" Do not read the file contents. Do not list, describe, or summarize what is in TRIAGE.md. The operator knows what they put there.

### Step 5 — Summarize

Summarize current state: active projects, what state they're in, what needs attention, and what the operator is currently working on (from the queue).

Keep the summary concise. Focus on current state: what's in flight, what's converged, what needs attention, and what intent is queued. If workspace hygiene issues are found, note them briefly at the end.

## Reference Files

- **[workspace-standard.md](references/workspace-standard.md)** — Workspace organization: domain workspace principles, PIN.md structure, QUEUE.md schema, TRIAGE.md lifecycle, workspace hygiene rules

