Skip to content

Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.

fix(constraints): add tool-specific examples for constraints feature

neerajdad123-byte7434ba8fc78a
diff --git a/examples/claude-code/constraints.md b/examples/claude-code/constraints.md
new file mode 100644
index 0000000..683e620
--- /dev/null
+++ b/examples/claude-code/constraints.md
@@ -0,0 +1,30 @@
+# Constraints — Claude Code
+
+Add rules your loop must never break. The `loop-constraints` skill reads `loop-constraints.md` at the start of every run.
+
+## Quick start
+
+```bash
+# Add a constraint (appends to loop-constraints.md)
+/constraints Don't push before telling me. Never edit auth/. Always run tests first.
+```
+
+## Before every loop run
+
+```bash
+# The loop-constraints skill runs first — it reads loop-constraints.md and bakes
+# every rule into the agent's context BEFORE triage or any action skill runs.
+/loop 1d Run $loop-constraints, then $loop-triage. Update STATE.md. No auto-fix in week one.
+```
+
+## How it works
+
+1. `/constraints <rule>` appends your rule to `loop-constraints.md`
+2. The `loop-constraints` skill (from `templates/SKILL.md.loop-constraints`) must be installed in `.claude/skills/loop-constraints/SKILL.md`
+3. Every loop run starts with `$loop-constraints` — it reads the file, loads rules, enforces them
+
+## Scaffold automatically
+
+```bash
+npx @cobusgreyling/loop-init . --pattern daily-triage --tool claude
+```
diff --git a/examples/codex/constraints.md b/examples/codex/constraints.md
new file mode 100644
index 0000000..163cb3f
--- /dev/null
+++ b/examples/codex/constraints.md
@@ -0,0 +1,29 @@
+# Constraints — Codex
+
+Add rules your loop must never break. The `loop-constraints` skill reads `loop-constraints.md` at the start of every run.
+
+## Quick start
+
+Add to your Automation prompt:
+
+```text
+Before any triage or fix: run $loop-constraints. Read loop-constraints.md and enforce every rule.
+```
+
+## Adding constraints
+
+Edit `loop-constraints.md` directly:
+
+```
+loop-constraints.md rules:
+- Don't push before telling me
+- Never edit auth/
+- Always run tests first
+- Max 3 fix attempts per item
+```
+
+## Scaffold automatically
+
+```bash
+npx @cobusgreyling/loop-init . --pattern daily-triage --tool codex
+```
diff --git a/examples/grok/constraints.md b/examples/grok/constraints.md
new file mode 100644
index 0000000..34026da
--- /dev/null
+++ b/examples/grok/constraints.md
@@ -0,0 +1,32 @@
+# Constraints — Grok Build TUI
+
+Add rules your loop must never break. The `loop-constraints` skill reads `loop-constraints.md` at the start of every run.
+
+## Quick start
+
+```bash
+# Add a constraint (appends to loop-constraints.md)
+/constraints Don't push before telling me. Never edit auth/. Always run tests first.
+```
+
+The agent appends your rules to `loop-constraints.md`.
+
+## Before every loop run
+
+```bash
+# The loop-constraints skill runs first — it reads loop-constraints.md and bakes
+# every rule into the agent's context BEFORE triage or any action skill runs.
+/loop 1d Run loop-constraints, then loop-triage. Update STATE.md. No auto-fix in week one.
+```
+
+## How it works
+
+1. `/constraints <rule>` appends your rule to `loop-constraints.md`
+2. The `loop-constraints` skill (from `templates/SKILL.md.loop-constraints`) must be installed in `.grok/skills/loop-constraints/SKILL.md`
+3. Every loop run starts with `loop-constraints` — it reads the file, loads rules, enforces them
+
+## Scaffold automatically
+
+```bash
+npx @cobusgreyling/loop-init . --pattern daily-triage --tool grok
+```