doctrine-capture

Captures user-stated NEVER and ALWAYS rules as committed doctrine in the same session.

64|11|Updated May 24, 2026
One-click install
npx skills add https://github.com/AlexanderMattTurner/agent-glovebox --skill doctrine-capture-alexandermattturner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doctrine-capture
Source: https://github.com/AlexanderMattTurner/agent-glovebox/tree/main/.claude/skills/doctrine-capture
Command: npx skills add https://github.com/AlexanderMattTurner/agent-glovebox --skill doctrine-capture-alexandermattturner

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a user states a standing rule like "NEVER do X" or "ALWAYS do Y", an AI session that merely obeys it loses the rule forever once the conversation ends, since the next session starts only from the committed tree. This Skill ensures standing rules are written into the repository's guidance files in the same session they were heard. ## Core Features & Use Cases - Standing-rule detection: Activates on capitalized NEVER/ALWAYS and equivalent phrasings like "don't ever", "from now on", "every time", and "stop doing X". - Surface routing: Directs each rule to the narrowest correct surface — a .claude/rules/ file for path-scoped rules, the owning skill for activity-scoped rules, or root CLAUDE.md only when it must fire before any file is opened. - Same-PR capture: Rides the PR the session already has open as its own marked commit with a lead sentence naming the rule change, quoting the user's authorizing sentence, and answering the 500-session growth question. - Use Case: A user writes "NEVER fold text, put it all on one line." The session fixes the offending artifact, narrows the wrap exemption in root CLAUDE.md, adds the paragraph-per-line rule to the markdown-block skill, and carries both edits on its open branch. ## Quick Start Tell the agent a standing rule such as "NEVER merge without asking me" and have it fix the current instance and capture the rule into the correct guidance file on the open PR.

Frequently Asked Questions about doctrine-capture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make an AI coding agent remember a rule across sessions?

State the rule as a standing rule using NEVER or ALWAYS phrasing. The session then writes it into the appropriate guidance file — CLAUDE.md, a .claude/rules/ file, or a skill — and commits it on its open PR so future sessions load it from the tree.

What triggers the doctrine-capture workflow?

It activates when the user writes NEVER or ALWAYS in capitals, or equivalent shapes without capitals such as "don't ever", "from now on", "every time", or "stop doing X". One-off instructions for the current task do not trigger a capture.

Where should a new standing rule be written in a Claude repo?

Path-scoped rules go in a .claude/rules/ file with a matching paths glob, activity-scoped rules go in the skill that owns the activity, and root CLAUDE.md only takes rules that must fire before any file is opened or override the system prompt.

Should a doctrine change get its own pull request?

No. The capture rides the PR the session already has open as its own marked commit with a lead sentence naming the rule change. A separate PR is opened only when the branch exceeds the pr-creation skill's file-count bound or the session has no PR of its own.

When should an instruction not be captured as doctrine?

Do not capture instructions that bind only the current session, such as "always push to the probe branch" during one task. The test is whether the rule would be right for a session that never saw this conversation; if not, follow it without writing it down.