ai-engineering-loop 1.0.6 → 1.0.8

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.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ai-engineering-loop
3
3
  description: Run the AI Engineering Loop (init, status, refresh, or full Maker then Devil's Advocate then Judge).
4
+ allowed-tools: "Read, Grep, Glob, Edit, Write, Task, Bash(npm run *), Bash(npm test *), Bash(npx *), Bash(git *)"
4
5
  ---
5
6
 
6
7
  Follow `.claude/skills/ai-engineering-loop/SKILL.md`.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: ai-engineering-loop
3
3
  description: Use when the user runs /ai-engineering-loop, asks to init or refresh living project context, or wants the Maker / Devil's Advocate / Judge engineering loop on Claude Code.
4
+ allowed-tools: "Read, Grep, Glob, Edit, Write, Task, Bash(npm run *), Bash(npm test *), Bash(npx *), Bash(git *)"
4
5
  ---
5
6
 
6
7
  # AI Engineering Loop (Claude Code)
@@ -18,6 +19,7 @@ Claude Code talks to strict proxies (including Kiro). Follow this exactly:
18
19
  - `prompt`
19
20
  3. Do **not** add any other keys. Extra keys make Kiro return HTTP 400 `REQUEST_BODY_INVALID`.
20
21
  4. If no Task/Agent tool exists, review in this session and label it `CONTEXT_ISOLATION_ONLY`. Do not invent a tool name.
22
+ 5. If Bash or Write returns "cannot determine the safety" or HTTP 400 REQUEST_BODY_INVALID: stop that tool. Do not retry it. Continue with Read, Grep, and Glob. Tell the user to switch off auto permission mode (use default) or add a permissions.allow rule for the verification command, then start a new session.
21
23
 
22
24
  ## Commands
23
25
 
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
7
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/egagofur/ai-engineering-loop/pulls)
8
8
  [![AI Engineering](https://img.shields.io/badge/AI-Engineering%20Loop-orange.svg)](https://github.com/egagofur/ai-engineering-loop)
9
- [![Release](https://img.shields.io/badge/release-v1.0.6-purple.svg)](https://github.com/egagofur/ai-engineering-loop/releases)
9
+ [![Release](https://img.shields.io/badge/release-v1.0.8-purple.svg)](https://github.com/egagofur/ai-engineering-loop/releases)
10
10
 
11
11
  **A Reusable, Framework-Agnostic AI Engineering Operating System for Autonomous Coding Agents**
12
12
 
@@ -210,6 +210,8 @@ Repo-local Claude Code files:
210
210
  - `.claude/skills/ai-engineering-loop/SKILL.md`
211
211
  - `.claude/commands/ai-engineering-loop.md` → `/ai-engineering-loop`
212
212
 
213
+ On Kiro auto mode, pre-allow verification Bash or the safety classifier 400s the session. Copy `templates/repo-config/claude-permissions.json` into the target repo `.claude/settings.local.json` `permissions.allow` list. If Bash returns "cannot determine the safety", do not retry; switch permission mode to default and start a new session.
214
+
213
215
  See [docs/claude-code-feasibility.md](docs/claude-code-feasibility.md).
214
216
 
215
217
  ---
@@ -15,7 +15,7 @@ const path = require('path');
15
15
  const crypto = require('crypto');
16
16
  const { execSync } = require('child_process');
17
17
 
18
- const VERSION = '1.0.6';
18
+ const VERSION = '1.0.8';
19
19
  const CWD = process.cwd();
20
20
  const CONTEXT_DIR = path.join(CWD, '.ai-engineering-loop');
21
21
 
@@ -40,6 +40,39 @@ Repo files:
40
40
  | Task/Agent tool present, child result returned | `TRUE_INDEPENDENT_AGENT` |
41
41
  | No subagent tool | `CONTEXT_ISOLATION_ONLY` |
42
42
 
43
- ## 4. What stays in Grok-only files
43
+ ## 4. Second 400 path: auto-mode Bash classifier
44
+
45
+ A later failure looks like this:
46
+
47
+ ```
48
+ Error: kr/claude-sonnet-5 is temporarily unavailable, so auto mode
49
+ cannot determine the safety of Bash right now.
50
+ API Error: 400 [kiro/claude-sonnet-5] REQUEST_BODY_INVALID
51
+ ```
52
+
53
+ Read/Grep still work. The first Bash that needs the auto-mode safety classifier (`npm run typecheck`, `npm test`) is sent to Kiro. When that classifier request is invalid or the model is down, Claude Code retries and Kiro returns 400.
54
+
55
+ Mitigations shipped in the skill:
56
+
57
+ 1. `allowed-tools` pre-approves `Bash(npm run *)`, `Bash(npm test *)`, `Bash(npx *)`, `Bash(git *)` so those commands skip the classifier when the skill or slash command is active.
58
+ 2. The skill tells the model not to retry Bash/Write after a classifier or 400 failure.
59
+ 3. Project allow rules (copy into `.claude/settings.local.json`):
60
+
61
+ ```json
62
+ {
63
+ "permissions": {
64
+ "allow": [
65
+ "Bash(npm run *)",
66
+ "Bash(npm test *)",
67
+ "Bash(npx *)",
68
+ "Bash(git *)"
69
+ ]
70
+ }
71
+ }
72
+ ```
73
+
74
+ If 400 still happens on a fresh session with no Bash yet, it is the 9router `system` field bug, not this package.
75
+
76
+ ## 5. What stays in Grok-only files
44
77
 
45
78
  Grok spawn details live in `.grok/skills/ai-engineering-loop/SKILL.md`. Claude Code must not load that file as its skill. Claude Code discovers `.claude/` first.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-engineering-loop",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "A reusable, framework-agnostic AI Engineering Operating System for autonomous coding agents.",
5
5
  "main": "bin/ai-engineering-loop.js",
6
6
  "bin": {
@@ -20,7 +20,9 @@
20
20
  "tests/",
21
21
  "scripts/",
22
22
  ".grok/",
23
- ".claude/",
23
+ ".claude/agents/",
24
+ ".claude/commands/",
25
+ ".claude/skills/",
24
26
  "LICENSE",
25
27
  "README.md",
26
28
  "README.npm.md"
@@ -0,0 +1,10 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(npm run *)",
5
+ "Bash(npm test *)",
6
+ "Bash(npx *)",
7
+ "Bash(git *)"
8
+ ]
9
+ }
10
+ }
@@ -23,8 +23,10 @@ function parseFrontmatter(content, label) {
23
23
 
24
24
  test('Claude Code skill is Kiro-safe: no mermaid, latex, HTML breaks, or Grok tool keys', () => {
25
25
  const content = readRepo('.claude/skills/ai-engineering-loop/SKILL.md');
26
- parseFrontmatter(content, 'claude skill');
26
+ const { fm } = parseFrontmatter(content, 'claude skill');
27
27
 
28
+ assert.match(fm, /^allowed-tools:/m);
29
+ assert.match(fm, /Bash\(npm run \*\)/);
28
30
  assert.doesNotMatch(content, /```mermaid/);
29
31
  assert.doesNotMatch(content, /\$\\/);
30
32
  assert.doesNotMatch(content, /<br\s*\/?>/i);
@@ -35,6 +37,7 @@ test('Claude Code skill is Kiro-safe: no mermaid, latex, HTML breaks, or Grok to
35
37
  assert.match(content, /subagent_type/);
36
38
  assert.match(content, /devil-advocate/);
37
39
  assert.match(content, /\bjudge\b/);
40
+ assert.match(content, /cannot determine the safety/);
38
41
  });
39
42
 
40
43
  test('Claude Code agents exist with Claude tool names and Finding Ledger / verdict contracts', () => {
@@ -55,7 +58,9 @@ test('Claude Code agents exist with Claude tool names and Finding Ledger / verdi
55
58
 
56
59
  test('Claude Code slash command does not embed Grok spawn keys', () => {
57
60
  const cmd = readRepo('.claude/commands/ai-engineering-loop.md');
58
- parseFrontmatter(cmd, 'claude command');
61
+ const { fm } = parseFrontmatter(cmd, 'claude command');
62
+ assert.match(fm, /^allowed-tools:/m);
63
+ assert.match(fm, /Bash\(npm run \*\)/);
59
64
  assert.doesNotMatch(cmd, /spawn_subagent|capability_mode|resume_from/);
60
65
  assert.match(cmd, /ai-engineering-loop/);
61
66
  });
@@ -1,9 +0,0 @@
1
- {
2
- "enabledMcpjsonServers": [
3
- "browsermcp"
4
- ],
5
- "disabledMcpjsonServers": [
6
- "Figma-20182",
7
- "Figma-i5xgii"
8
- ]
9
- }