@cobusgreyling/loop-init 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -194,6 +194,14 @@ async function scaffoldObservability(pattern, tool, targetDir, templatesRoot, dr
194
194
  }
195
195
  await copyTemplateSkill(templatesRoot, 'SKILL.md.loop-budget', targetDir, tool, 'loop-budget', dryRun);
196
196
  }
197
+ async function scaffoldConstraints(targetDir, templatesRoot, tool, dryRun) {
198
+ const constraintsPath = path.join(targetDir, 'loop-constraints.md');
199
+ const constraintsTemplate = path.join(templatesRoot, 'loop-constraints.md');
200
+ if (!(await exists(constraintsPath)) && (await exists(constraintsTemplate))) {
201
+ await copyFile(constraintsTemplate, constraintsPath, dryRun);
202
+ }
203
+ await copyTemplateSkill(templatesRoot, 'SKILL.md.loop-constraints', targetDir, tool, 'loop-constraints', dryRun);
204
+ }
197
205
  async function copyFile(src, dest, dryRun) {
198
206
  if (!(await exists(src)))
199
207
  return false;
@@ -352,6 +360,7 @@ Examples:
352
360
  }
353
361
  await copyL2Templates(pattern, tool, targetDir, templatesRoot, dryRun);
354
362
  await scaffoldObservability(pattern, tool, targetDir, templatesRoot, dryRun);
363
+ await scaffoldConstraints(targetDir, templatesRoot, tool, dryRun);
355
364
  if (!dryRun && !(await exists(path.join(targetDir, 'AGENTS.md')))) {
356
365
  const agentsTemplate = `# AGENTS.md
357
366
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobusgreyling/loop-init",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Scaffold loop engineering patterns and starters into any project. Supports Grok, Claude Code, Codex and more. npx @cobusgreyling/loop-init . --pattern daily-triage --tool grok",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,6 +13,13 @@ Last release tag: v2.14.0 (2026-06-01)
13
13
  ## Recently Published
14
14
  - v2.14.0 — published 2026-06-01 (human reviewed draft)
15
15
 
16
+ ## Post-Run Critique (from last run)
17
+ - **Missed items**: 0 reported
18
+ - **False positives**: 2 internal chore PRs — tightened bot filter
19
+ - **Grouping issues**: 1 fix in Features — add label check
20
+ - **Retries**: 0
21
+ - **Prompt/policy adjustments**: None needed this run
22
+
16
23
  ## Scan Window Notes
17
24
  - Ignore Dependabot / Renovate PRs (handled by dependency-sweeper)
18
25
  - Direct commits on main are included if they have conventional type or linked issue
@@ -8,5 +8,12 @@ Last run: never
8
8
 
9
9
  ## Recent Noise (ignored this run)
10
10
 
11
+ ## Post-Run Critique (from last run)
12
+ - High-noise: dependabot PRs surfaced again — add to ignore list
13
+ - False positives: 1 CI flake (known flaky test)
14
+ - Deprioritize: lint warnings moved to Watch List
15
+ - Friction: triage missed nightly deploy failure (was infra, not code)
16
+ - Adjustment: include infra check status in scan
17
+
11
18
  ---
12
19
  Run log: —
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: loop-constraints
3
+ description: >
4
+ Read loop-constraints.md at the start of every run and enforce every rule.
5
+ This skill runs BEFORE triage or any action skill. Constraints are binding.
6
+ user_invocable: true
7
+ ---
8
+
9
+ # Loop Constraints Enforcer
10
+
11
+ You are the guardrail. Before any other work begins, you MUST:
12
+
13
+ 1. Read `loop-constraints.md` from the project root.
14
+ 2. Load every rule into your working memory.
15
+ 3. Check if `loop-pause-all` is active → exit immediately.
16
+ 4. Apply these rules to EVERY action that follows.
17
+
18
+ ## How to enforce
19
+
20
+ - Before pushing: re-read the Push & Merge section. If ANY rule blocks it, stop and tell the human.
21
+ - Before editing a file: re-read the Paths section. If the path matches a denylist pattern, escalate.
22
+ - Before proposing a fix: re-read the Code section. Run tests. One fix per run.
23
+ - Before merging: re-read the Push & Merge section. Human must approve.
24
+
25
+ ## Output at start of run
26
+
27
+ Always begin with a one-line confirmation:
28
+
29
+ ```
30
+ Constraints loaded from loop-constraints.md: N rules active.
31
+ ```
32
+
33
+ If no `loop-constraints.md` exists, say so and proceed with default safety rules from `docs/safety.md`.
34
+
35
+ ## Interaction with other skills
36
+
37
+ - `loop-triage` — constraints may override triage priority (e.g. "don't push" means don't act on CI fixes)
38
+ - `minimal-fix` — constraints limit what files can be touched
39
+ - `loop-verifier` — constraints define denylist paths the verifier must check
40
+ - `loop-budget` — constraints may impose stricter budget than loop-budget.md
41
+
42
+ ## Default constraints (when no file exists)
43
+
44
+ If `loop-constraints.md` is absent, enforce these minimums:
45
+ - Never edit `.env`, `.env.*`, `auth/`, `payments/`, `secrets/`, `credentials/`
46
+ - Never auto-merge to main
47
+ - Never disable tests
48
+ - Escalate after 3 failed fix attempts
@@ -0,0 +1,31 @@
1
+ # Loop Constraints
2
+
3
+ > Add rules below with `/constraints <rule>` in your agent.
4
+ > The `loop-constraints` skill reads this file at the start of every run.
5
+ > Constraints here are **binding** — the agent MUST follow them.
6
+
7
+ ## Push & Merge
8
+ - Don't push before telling me
9
+ - Never auto-merge to main without human approval
10
+ - Always create a draft PR first; let me review before marking ready
11
+
12
+ ## Paths
13
+ - Never edit .env, .env.*, auth/, payments/, secrets/, credentials/
14
+ - Never edit infrastructure configs without human approval
15
+
16
+ ## Code
17
+ - Always run tests before proposing a fix
18
+ - Never disable tests to make CI green
19
+ - Never refactor unrelated code — one fix per run
20
+ - Max 3 fix attempts per item; escalate after
21
+
22
+ ## Communication
23
+ - Always tell me what you're about to do before doing it
24
+ - Never close an issue or PR without my approval
25
+
26
+ ## Budget
27
+ - If token spend hits 80% of daily cap, switch to report-only
28
+ - If loop-pause-all is active, exit immediately
29
+
30
+ ---
31
+ <!-- Add your own rules below. Use plain English. The loop reads this verbatim. -->