PITWALL

pitwall rules

Rule sets (rulesync) for agents and projects.

rules list

The library's skills and rules (with their type), and each agent's rules state.

pitwall rules list [OPTIONS]

rules new

Write a new rule into the library: from scratch, a file, or a library entry. A rule is in every session's context.

pitwall rules new [OPTIONS] <NAME>
Argument
NAMEThe rule's name (its file name in the library, without .md).
Option
--from <ID|PATH>Start from a library entry (id), or a file.
--description <DESCRIPTION>What it's about (shown in lists).
--targets <TARGETS>rulesync targets it's for, comma-separated (default: every tool).
--as-rule--from is a skill: make a rule of it (its other files are left out, and it will be in every session's context).
--overwriteReplace a rule of that name (asks you in Pitwall).
pitwall rules new tabs --description "Tabs, not spaces" --from ~/notes/tabs.md
pitwall rules new deploy-rule --from library:skills/deploy --as-rule   # a skill made a rule: always in context

rules skill new

Write a new skill into the library (a folder with SKILL.md): from scratch, a skill's folder (its other files come along), a file, or a library entry.

pitwall rules skill new [OPTIONS] <NAME>
Argument
NAMEThe skill's name (its folder in the library).
Option
--from <ID|PATH>Start from a library entry (id), a skill's folder, or a file.
--description <DESCRIPTION>When to use it: agents read this to decide (required unless --from has one).
--targets <TARGETS>rulesync targets it's for, comma-separated (default: every tool).
--as-skill--from is a rule: make a skill of it.
--overwriteReplace a skill of that name (asks you in Pitwall).
pitwall rules skill new review --description "Review a diff for bugs and tests"
pitwall rules skill new deploy --from ./tools/deploy-skill      # a folder with SKILL.md and its files
pitwall rules skill new deploy --from ./deploy.md --overwrite  # replaces: asks first

rules sets

Rule sets, and each project's default set.

pitwall rules sets [OPTIONS]

rules show

What a project's agents get: its default set, each agent's own set, and the rules those add up to for the agent's kind (or one agent's, with --agent).

pitwall rules show [OPTIONS] [PROJECT]
Argument
PROJECT (optional)The project folder (default: the current folder).
Option
--agent <AGENT>One agent (id or name) instead of a whole project.
pitwall rules show ~/code/api --human
pitwall rules show --agent api

rules apply

Generate an agent's rule files now (used from its next session), or every agent's whose rules changed (--stale).

pitwall rules apply [OPTIONS] [AGENT]
Argument
AGENT (optional)The agent (id or name).
Option
--set <SET>Give the agent this set of its own first (id or name; none clears). With --stale: only agents that use this set.
--main-checkoutThe agent works in the main checkout: write there anyway (asks you in Pitwall).
--staleEvery agent whose rules changed or failed since its session started (in its own worktree, or a main checkout you confirmed).
--project <PATH>With --stale: only this project's agents.
--restartThen restart each re-applied agent that is running, so the rules take effect now (each restart asks you in Pitwall).
pitwall rules apply api --set strict
pitwall rules apply --stale --restart            # every agent whose rules changed
pitwall rules apply --stale --project ~/code/api

rules default

A project's default rule set (none clears it).

pitwall rules default [OPTIONS] <PROJECT> <SET>
Argument
PROJECTThe project folder.
SETA set id or name, or none.

rules set create

A new rule set (rules by id from rules list, or by file name when only one rule has it).

pitwall rules set create [OPTIONS] <NAME>
Argument
NAMEThe set's name.
Option
--rule <RULE>A rule to put in it. Repeatable.
pitwall rules set create Web --rule style.md --rule testing.md

rules set add

Add rules to a set.

pitwall rules set add [OPTIONS] <SET> <RULE>...
Argument
SETThe set (id or name).
RULERules to add.
pitwall rules set add Web library:terse.md

rules set remove

Take rules out of a set.

pitwall rules set remove [OPTIONS] <SET> <RULE>...
Argument
SETThe set (id or name).
RULERules to take out.

rules set rename

Rename a set.

pitwall rules set rename [OPTIONS] <SET> <NAME>
Argument
SETThe set (id or name).
NAMEThe new name.

rules set delete

Delete a set (asks you in Pitwall). Projects and agents that use it lose it; agents keep their files until rules are re-applied.

pitwall rules set delete [OPTIONS] <SET>
Argument
SETThe set (id or name).

rules project status

The project's rules (copied from the library or its own), updates waiting, whether its generated files are out of date, and what to do first.

pitwall rules project status [OPTIONS] [PROJECT]
Argument
PROJECT (optional)The project folder (default: the current folder).
pitwall rules project status ~/code/api --human

rules project assign

Copy a rule set and/or single library rules into the project (asks). A different file already there is left alone unless named with --overwrite.

pitwall rules project assign [OPTIONS] <PROJECT>
Argument
PROJECTThe project folder.
Option
--set <SET>A rule set (id or name): all its rules.
--rule <RULE>A library rule (id, or file name when only one rule has it). Repeatable.
--skill <SKILL>A library skill (its name or id). Repeatable.
--overwrite <NAME>Replace this file in .rulesync/rules/ although it differs. Repeatable.
pitwall rules project assign ~/code/api --set Web            # asks first
pitwall rules project assign ~/code/api --rule testing.md

rules project unassign

Remove copied rules from the project (asks). Rules changed there are kept unless --force.

pitwall rules project unassign [OPTIONS] <PROJECT> <RULE>...
Argument
PROJECTThe project folder.
RULERules: names under .rulesync/rules/ or library ids.
Option
--forceRemove them even if they were changed in the project.

rules project updates

Rules whose library version changed since they were copied, or that were changed in the project, with a diff.

pitwall rules project updates [OPTIONS] [PROJECT]
Argument
PROJECT (optional)The project folder (default: the current folder).

rules project update

Take library updates into the project (asks): the named rules, or every rule with an update. Rules changed in both places need --take.

pitwall rules project update [OPTIONS] <PROJECT> [RULE]...
Argument
PROJECTThe project folder.
RULE (optional)Rules (names or library ids); none: every rule with an update.
Option
--take <TAKE>For rules changed in both places: library (replace the project's copy) or project (keep it).
pitwall rules project updates ~/code/api --human          # what changed, with diffs
pitwall rules project update ~/code/api                   # every rule with an update
pitwall rules project update ~/code/api style.md --take library

rules project import-existing

Import the project's hand-written CLAUDE.md / AGENTS.md / GEMINI.md into .rulesync/rules/ with rulesync (asks), so generating keeps their text. Do this before the first generate.

pitwall rules project import-existing [OPTIONS] [PROJECT]
Argument
PROJECT (optional)The project folder (default: the current folder).

rules project generate

Generate the project's instruction files (CLAUDE.md, AGENTS.md, …) from its .rulesync/ with rulesync (asks). Only files Pitwall generated before are replaced, unless named with --overwrite.

pitwall rules project generate [OPTIONS] <PROJECT>
Argument
PROJECTThe project folder.
Option
--targets <TARGETS>rulesync targets, comma-separated (default: the ones used last, else those of the project's agents).
--overwrite <PATH>Replace this file although Pitwall didn't write it. Repeatable.
pitwall rules project import-existing ~/code/api   # a hand-written CLAUDE.md first
pitwall rules project generate ~/code/api --targets claudecode,codexcli

rules project move-default

Copy the project's default rule set (kept in Pitwall) into the project, and drop the default (asks).

pitwall rules project move-default [OPTIONS] [PROJECT]
Argument
PROJECT (optional)The project folder (default: the current folder).

rules import

Add rules and skills to the library: a project's own .rulesync/ (read in place) and its .claude/skills (copied), a CLAUDE.md / AGENTS.md / GEMINI.md (needs rulesync), or a git repository (cloned). A file or a repository asks you in Pitwall.

pitwall rules import [OPTIONS] <KIND> <SOURCE>
Argument
KINDWhere from: project, file or git.
SOURCEThe project folder, the file, or the repository's URL.
pitwall rules import project ~/code/api          # its own .rulesync/
pitwall rules import file ~/code/api/CLAUDE.md   # asks first
pitwall rules import git https://github.com/acme/ai-rules.git   # asks first