loop & gate · assembly order

Getting started.

Eight steps for the Foundation, the bottom layer of Loop & Gate. They are in this order because each one depends on the last: a kit can't read memory that was never placed, and nothing works without the plan at step 1.

Commands below are quoted from the Foundation's README.md and GETTING-STARTED.md at the revision this site was built from. They were not executed while building this page.

Get a paid Claude plan

Pro or Max. The free plan does not include Claude Code, so nothing here works on it. This is the step people miss, so check it before anything else.

claude.ai

Install Claude Code

The desktop app is a normal application you double-click: the .dmg on a Mac, the .exe on Windows. On Windows the app may ask you to install Git first — say yes and reopen it. The Foundation's memory loader is a small shell script, so Git is the thing to check if memory doesn't load later.

Installers are on code.claude.com/docs. Sign in, then click the Code tab.

Terminal users install it instead of the app, and open the folder from there:

npm install -g @anthropic-ai/claude-code

Install the Foundation

Two ways in. They are not a sequence — read the one that matches how much of the loop you want.

Plugin — the quickest start

One command in the Code chat box, no download:

/plugin marketplace add slogsdon/loop-and-gate-foundation

A menu appears; click Install. The skills and the memory-loader are then available in every session, not just one folder.

The limit of this path. Skills live in a versioned cache that is replaced on every update. The agent still improves its memory, but edits it makes to its own instructions don't survive the next update, and that self-editing is half of what makes the loop interesting over months.

Clone — the full self-improving loop

Here the skills are your working copy, so the improve skill can edit them. Terminal:

git clone https://github.com/slogsdon/loop-and-gate-foundation.git
cd loop-and-gate-foundation

No terminal: on the Foundation repo, use the green Code button → Download ZIP, unzip it, then File → Open folder in the app and pick that folder.

pi — the other harness

Using pi (0.86.1 or later) instead of Claude Code:

pi install git:github.com/slogsdon/loop-and-gate-foundation

Every skill also becomes a /skill:<name> command. On first launch it offers, once, to install two community packages that stand in for Claude Code built-ins — pi-subagents for the subagent tool that loop, verify and improve dispatch, and rpiv-ask-user-question for the ask_user_question tool behind the setup and add-kits gates. Declining is remembered; delete ~/.config/loop-and-gate/pi-deps-declined to be asked again. A clone works in pi too — pi loads CLAUDE.md natively.

Place your vault

Open a folder to work in (File → Open folder — your Documents is fine), then ask, in plain words:

Set up my vault.

That runs the setup skill — or /setup, the same front door on both paths. It asks where the vault should live and scaffolds it. On a Mac it recommends the Obsidian iCloud folder, so the same notes sync to Obsidian on your phone and tablet for free. You do this once.

Advanced, clone path only: run the underlying script directly. Without a path it auto-picks a location (iCloud on macOS, else ~/second-brain) rather than asking.

./scripts/setup.sh ~/my-vault

Optional, worth it. git-init the vault — setup prints the command — so every change the agent makes to what it knows is tracked and reversible.

Run a first real session

Give it a goal instead of a test:

Get to know me: ask about my current project and preferences, then save what you learn.

What happens on its own:

  • A SessionStart hook injects vault/MEMORY.md — the index — plus the latest daily note and the latest reflection, every session.
  • The agent asks questions and captures the answers into vault/Knowledge/ notes, indexed by one line in MEMORY.md.
  • When you wrap up it reflects: logs the session to vault/Daily/, writes a self-review with one lesson to vault/Reflections/, and commits.

Then open the vault and look around. Everything the agent knows is readable markdown, and that transparency is the point.

Run the profile interview

One conversation, one question at a time, that writes two reference docs into vault/Profiles/: a voice profile (how you write) and a taste profile (how you judge). Re-run it any time; it merges rather than overwrites.

Run the profile interview so you know how I write and what good looks like to me.

This is optional for the Build and Accountability kits and required for the Grow Kit, whose design gate checks against the taste profile and whose copy gate checks against the voice profile.

Read the memory yourself

Install Obsidian — free, and optional: it's a viewer, and the system is just files. Choose Open folder as vault and point it at the folder setup just created.

Install the mobile app too, pointed at the same vault, and the inbox works: jot a thought into vault/Inbox/ from your phone, and next session ask the agent to triage the inbox. It sorts each thought into a fact, an idea, a task, or noise, shows you the sorting, and waits for your yes before it files anything.

The vault layout is small on purpose: MEMORY.md is the index, Inbox/ the raw capture, Profiles/ the voice and taste, Daily/ what happened, Knowledge/ what's true, Reflections/ the self-reviews.

Add a kit

Foundation is the ground floor. Three kits sit on it, and the Foundation's own add-kits skill offers each one, then offers each kit's pipeline separately — every piece a gated, declinable choice. It skips whatever is already installed, so it's safe to re-run.

Add the rest of the stack.

Or install one directly. Each kit needs a different amount of company:

what each kit needs
KitCommandAlso needs
Accountability /plugin marketplace add slogsdon/loop-and-gate-accountability-kit Nothing. Runs on Claude alone.
Build /plugin marketplace add slogsdon/loop-and-gate-build-kit superpowers + agent-skills — the free public plugins that run the loop between the gates.
Grow /plugin marketplace add slogsdon/loop-and-gate-grow-kit The Foundation, plus skills-design + skills-writing from the public slogsdon/claude-code-config marketplace.

That's a working setup. The Accountability Kit is the lightest place to start because it needs nothing else — install it, run /morning, and you have a Foundation that remembers you and a kit that keeps you honest about your days.

daily use

Open the folder and give it a goal — or none. With no goal it picks up open items from the last daily note. One session is one iteration of the loop: work until done or blocked, let it reflect, exit. The next session starts fresh and continues from what the files say.

MEMORY.md is the most-read file in the system, and the hook injects it at the top of every session. That's why it's written once, at session end, and why mid-session facts go into Knowledge/ notes immediately while their index lines wait for the close-out: one write per session keeps the cached prefix intact, and the session cheaper and faster.

For a goal too big for one session, ask for the loop skill — “run the loop on: <goal>”. Your session stays the orchestrator and the human gate; each iteration runs in a subagent with fresh context, and nothing lands in memory until the orchestrator verifies it.

After a handful of sessions, ask for an improvement pass — “run the improve pass: apply the reflections that have earned it”. Only lessons that came up more than once get applied, each is checked by a fresh agent that never saw the work, and every change is committed so you can read the diff.

working across devices

Remote Control lets a session running on your desktop be driven from another Claude app — web, mobile, tablet. It's off by default; turn it on once so it's the default for every session:

claude --remote-control

Permanent: "remoteControlAtStartup": true in settings, or Settings → Claude Code in the desktop app.

Dispatch is the other half: hand a task off from the mobile app and it spins up a Code session on your desktop, then notifies you when it's done or needs a decision. The session always runs on the machine that holds your vault, so memory and skills come along without copying anything.

The vault has to sync underneath. macOS and iOS get iCloud, which setup picks by default — tell iCloud Drive to keep the Obsidian folder downloaded on each device, or a larger vault is offloaded and slow to open. Android and Windows have no iCloud: Obsidian Sync, the community git plugin, or a Dropbox / OneDrive folder all do the same job. Sync isn't instant, so a note written on your phone can read as missing or stale to a desktop session for a few seconds. That's lag, not loss.

Running more than one session at once? Give each its own git worktree and delete them when you're done, and keep commits and pushes on one machine so history has a single writer. This applies to every kit, not just the Foundation: they all read and write the same vault.

limits worth knowing

Plugin vs clone
Plugin skills live in a read-only cache, so improve evolves your memory but not the skill files. Windows plugin users may also need developer mode for the compatibility symlink. Clone for the full self-improving loop.
Windows
The memory-loader is a small shell script that needs Git. If memory isn't loading on Windows, that's the thing to check.
The no-terminal path
Described in the source as new and being validated with first users. If a step doesn't match what you see, that's useful feedback.
Dials
config.yaml → vault points at a different vault once you outgrow the starter one. CLAUDE.md holds the agent's standing behavior rules.
The model never changes
What improves is the environment around it: notes, instructions, config. Mechanically it's markdown files getting better, and every memory change is a commit you can revert.

where to go