# Spec Sheet — Reconcile Thinking

**What you are building:** A skill that reads structured "capture" files from an inbox folder, classifies each item, folds it into a small set of versioned source-of-truth knowledge files, archives the processed captures, and reminds you to re-sync any changed file to wherever it is consumed (e.g. a Claude.ai Project).

> Bracketed [PLACEHOLDERS] are yours to fill in. This skill operates on the local filesystem only and uses no credentials; if you extend it to push or sync anywhere, do not inline a token — supply it from your own secret store.

## 1. Purpose

You keep durable "settled thinking" in a few markdown files (positions, project context, current state, an idea backlog). Conversations elsewhere produce capture files summarizing what changed. This skill is the reconciler: it merges captures into the durable files **without silently overwriting anything**, versions every change so it is reversible, and tells you what to re-upload. The discipline it enforces: settled-thinking files must reflect only what you actually decided, and must never quietly drift from the copy you consume.

## 2. Activation

- **name:** `reconcile-thinking-patterns` (or your own slug).
- **description:** must make the model auto-trigger on reconciliation intent. Include the trigger verbs and a one-line statement of behavior. Trigger phrases to cover: "reconcile", "process captures", "process the inbox", "update patterns", "run reconciliation". State that it reads captures, classifies each (net-new / refinement / contradiction / current-state update / tracks update), writes versioned updates to the source-of-truth files, archives processed captures, and reminds you to re-sync changed files. Naming the classification taxonomy and the inbox in the description sharpens triggering.

## 3. Inputs and preconditions

- Capture files in `[INBOX_DIR]`, named `YYYY-MM-DD-{slug}.md`.
- Each capture is expected to contain a subset of these sections: **settled positions**, **changes to standing thinking**, **updates to current state**, **updates to tracks/project context**, **[IDEA_BACKLOG] ideas**.
- The source-of-truth files must already exist (see §5).
- Precondition check: if the inbox is empty, report "nothing to reconcile" and exit.

## 4. Outputs and side effects

- In-place edits to the versioned source-of-truth files that changed.
- A timestamped copy of each changed versioned file in `[VERSIONS_DIR]` **before** it is written.
- Verbatim appends to the idea-backlog file (NOT versioned).
- Processed captures moved from `[INBOX_DIR]` to `[ARCHIVE_DIR]`, original filename preserved.
- A printed summary plus a re-sync reminder for every changed file.

## 5. Environment and dependencies

Everything is local files; no MCP tools, no network. Generalized layout:

- `[THINKING_DIR]/` — root for the whole system.
  - `inbox/` — incoming captures.
  - `archive/` — processed captures.
  - `versions/` — timestamped pre-write snapshots of the versioned files.
- The **versioned source-of-truth files** (snapshot before every write):
  - `[POSITIONS_FILE]` — settled positions / standing decisions. The primary target; most work lands here.
  - `[TRACKS_FILE]` — slow-moving project/track context. Higher bar to change.
  - `[STATE_FILE]` — fluid current-state notes.
- The **un-versioned backlog file:**
  - `[BACKLOG_FILE]` — flat idea backlog, with an "Open ideas" section.
- A downstream consumer the files are uploaded to (for example, a Claude.ai Project). The skill never talks to it directly; re-sync is manual.
- An upstream capture producer (a separate capture skill/prompt) that writes the inbox files. Not invoked here.

## 6. Procedure

1. **Read the inbox.** List `[INBOX_DIR]`. For each file: if the name doesn't match `YYYY-MM-DD-{slug}.md`, note it but continue; read contents. If the inbox is empty, say so and exit.
2. **Validate format.** Confirm each capture has clear section headers and structured content under them.
   - If a file is not a capture at all: STOP, show it, ask whether to process best-effort, move to archive without processing, or leave in inbox. Wait.
   - If it is a capture but malformed (missing sections, gibberish): STOP, show what's wrong, ask process-best-effort / skip / leave in inbox. Wait.
3. **Read the targets.** Read `[POSITIONS_FILE]`, `[TRACKS_FILE]`, `[STATE_FILE]` in full (needed for classification and contradiction detection). Also read `[BACKLOG_FILE]` if any capture has an idea-backlog section.
4. **Classify each item.**
   - *Settled positions* → `[POSITIONS_FILE]`. Label each: **net-new** (not present), **refinement** (sharpens an existing one), **contradiction** (incompatible with an existing one), **fuzzy** (looks like a position but reads half-formed).
   - *Changes to standing thinking* → `[POSITIONS_FILE]`, but labeled only **refinement** or **contradiction** (the capture prompt has already flagged them as one of the two).
   - *Current-state updates* → `[STATE_FILE]`: **add** / **replace** / **remove**.
   - *Tracks/project updates* → `[TRACKS_FILE]`: **substantive update** (record it) / **passing thought** (surface but do NOT write).
   - Idea-backlog items are NOT classified here.
5. **(Backlog step, runs independently.)** Collect every backlog line (`- [YYYY-MM-DD] idea text`) across all captures into one block, verbatim. Do not classify, contradiction-check, dedup, or reorder. "None this conversation" contributes nothing. Defer the write to step 7.
6. **Stop on contradictions and fuzzy items.**
   - Each contradiction: STOP. Quote the existing position and the conflicting capture. Ask: replace existing with new / keep existing and discard new / merge as nuance / other. Apply the answer.
   - Each fuzzy item: STOP. Quote it, say why it reads fuzzy, ask: add anyway / skip / send back to inbox.
   - Net-new, refinements, current-state, and tracks updates proceed without asking. Backlog items never reach this step.
7. **Write changes.** For each versioned file that changed:
   - Snapshot first: copy it to `[VERSIONS_DIR]/{name}-YYYY-MM-DD-HHMM.{ext}` using a **24-hour** clock.
   - Apply: net-new → append to the right section (or add a section); refinement → edit the existing entry in place; contradiction → apply the chosen resolution; current-state → apply add/replace/remove; tracks → substantive only.
   - A file with no changes gets no snapshot and no write — skip it entirely.
   - Backlog write: if step 5 collected anything, append the block verbatim to the "Open ideas" section of `[BACKLOG_FILE]`. Do NOT snapshot it. Do NOT reformat/reorder/dedup. If nothing was collected, do not touch the file.
8. **Archive captures.** Move each fully processed capture from `[INBOX_DIR]` to `[ARCHIVE_DIR]`, original name preserved. A capture is "fully processed" only once all its sections, backlog included, are handled. Anything you chose to leave in the inbox stays and is noted.
9. **Summary + re-sync reminder.** Print: captures read / processed-and-archived / left-in-inbox; per-file change tallies (with brief lists); versions saved (the backlog file never appears here); and, for **every** changed file including the backlog file, the literal re-sync steps. If nothing changed, say so explicitly: "No files changed. No re-sync needed."
10. **Stop.** Do not propose further work.

## 7. Edge cases and failure handling

- **Empty inbox** → report and exit (step 1).
- **Non-capture file in inbox** → halt and ask; never best-effort silently.
- **Malformed capture** → halt and ask; offer skip / leave-in-inbox.
- **Filename off-pattern** → note, keep going.
- **Same-day reruns** → 24-hour `HHMM` in version names prevents filename collisions; do not use 12-hour times.
- **No-op reconciliation** → no snapshots, no writes, explicit "no re-sync needed."
- **Backlog says "None this conversation"** → contributes nothing; do not touch `[BACKLOG_FILE]`.

## 8. Guardrails / hard rules

- **Never silently overwrite a settled position.** Contradictions always stop and ask — even when the new capture seems more current or better worded.
- **Never file a fuzzy item as net-new.** Half-formed content gets surfaced, not merged.
- **Never classify or contradiction-check backlog items.** They are flat appends, full stop.
- **Never version the backlog file.** Only the three source-of-truth files are snapshotted.
- **Never skip the pre-write snapshot** for a file that is changing.
- **Never write a file that didn't change.**
- **Never omit the re-sync reminder** when a file changed — this is the single most important behavior; without it the consumer drifts from the filesystem.
- **Operate on the filesystem only.** Re-sync to the consumer is manual.

## 9. Acceptance criteria

- Empty inbox → clean "nothing to reconcile" exit, no writes.
- A capture with one net-new position → `[POSITIONS_FILE]` snapshotted to `[VERSIONS_DIR]` with a 24-hour timestamp, the position appended, the capture moved to `[ARCHIVE_DIR]`, and a re-sync reminder for that file.
- A capture that contradicts an existing position → run halts, both sides quoted, resolution options offered; nothing written until you answer.
- A fuzzy settled-position → run halts and asks; not added unless you say so.
- A capture with backlog lines → lines appended verbatim to the "Open ideas" section of `[BACKLOG_FILE]`, file NOT snapshotted, file NOT listed under "versions saved," but DOES get a re-sync reminder.
- A file with no changes → no snapshot, no write, absent from the versions list.
- Two runs in one day → version filenames do not collide.
- No-op run → output states "No files changed. No re-sync needed."

## 10. Adapt to your setup

- Repoint `[THINKING_DIR]` and the four target files to your own paths and names.
- Rename the classification buckets if your domain differs, but keep the **net-new / refinement / contradiction / fuzzy** distinction for the primary file — that is what protects it from drift and bloat.
- Decide which files are "moat" (versioned, judged) vs. "flat backlog" (append-only, never versioned). The asymmetry is the point; don't collapse it.
- Replace the re-sync target. If your consumer has an API, you may automate the upload — but then store any credential in a secret store, never inline in the skill.
- Keep the upstream capture step a **separate** skill. This one only reconciles.

---

```markdown
---
name: reconcile-thinking-patterns
description: Process new thought-partnership captures from the inbox into the source-of-truth knowledge files. Use when the user asks to reconcile, process captures, process the inbox, update positions, or run reconciliation. Reads captures, classifies each (net-new, refinement, contradiction, current-state update, tracks update), writes versioned updates to the source-of-truth files, archives processed captures, and reminds the user to re-sync changed files to the downstream consumer.
---

# Reconcile Thinking Patterns

## Context
<!-- Name [THINKING_DIR], the inbox/archive/versions folders, the three
     versioned source-of-truth files, the un-versioned backlog file, and the
     downstream consumer the files get re-synced to. -->

## Operating principles
<!-- Surface contradictions, never overwrite. Honest classification (push
     back on fuzzy). Backlog ideas are appended verbatim, never classified.
     Preserve provenance (archive, don't delete; snapshot before write).
     Always remind to re-sync changed files. -->

## Procedure
<!-- Steps 1-10 from §6: read inbox → validate → read targets → classify →
     collect backlog → stop on contradictions/fuzzy → write (snapshot first,
     24h timestamps) → archive → summary + re-sync reminder → stop. -->

## Common pitfalls to avoid
<!-- No silent overwrite; no fuzzy-as-net-new; no classifying backlog; never
     version the backlog file; never skip the snapshot; never write an
     unchanged file; never omit the re-sync reminder; use 24-hour timestamps. -->
```
