ai-engineering-loop 1.1.0 → 1.5.0
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/.agents/workflows/ai-engineering-loop.md +5 -5
- package/.claude/skills/ai-engineering-loop/SKILL.md +7 -5
- package/.gemini/skills/ai-engineering-loop/SKILL.md +7 -5
- package/.grok/skills/ai-engineering-loop/SKILL.md +7 -5
- package/README.md +56 -6
- package/README.npm.md +9 -1
- package/SECURITY.md +8 -2
- package/agents/judge.md +5 -5
- package/agents/maker.md +6 -6
- package/agents/recipe-builder.md +28 -0
- package/bin/ai-engineering-loop.js +521 -16
- package/core/configuration-precedence.md +4 -4
- package/core/context-impact-assessment.md +1 -1
- package/core/controlled-workflow-runtime.md +77 -0
- package/core/definition-of-done.md +3 -3
- package/core/escalation-policy.md +2 -2
- package/core/goal-contract.md +2 -2
- package/core/iteration-policy.md +4 -4
- package/core/project-initialization.md +2 -2
- package/core/runtime-safety.md +75 -0
- package/core/verification-loop.md +1 -1
- package/core/workflow-recipes.md +140 -0
- package/lib/budget.js +258 -0
- package/lib/doctor.js +38 -2
- package/lib/gates.js +55 -1
- package/lib/node-registry.js +155 -0
- package/lib/package-audit.js +78 -0
- package/lib/recipe-builder.js +200 -0
- package/lib/recipe.js +495 -0
- package/lib/run-state.js +94 -8
- package/lib/runtime-files.js +54 -0
- package/lib/runtime-policy.js +118 -0
- package/lib/safe-context.js +3 -0
- package/lib/sandbox.js +305 -0
- package/lib/workflow-runtime.js +692 -0
- package/package.json +7 -3
- package/policies/finding-policy.md +2 -2
- package/policies/no-progress-policy.md +2 -2
- package/profiles/README.md +5 -5
- package/profiles/backend-api.md +1 -1
- package/profiles/library.md +1 -1
- package/profiles/mobile-app.md +1 -1
- package/profiles/monorepo.md +1 -1
- package/profiles/web-app.md +1 -1
- package/recipes/audit.json +32 -0
- package/recipes/bugfix.json +63 -0
- package/recipes/default.json +49 -0
- package/recipes/docs-light.json +63 -0
- package/recipes/high-risk.json +69 -0
- package/recipes/refactor.json +63 -0
- package/schemas/compiled-plan.schema.json +19 -0
- package/schemas/delivery.schema.json +2 -1
- package/schemas/node-definition.schema.json +33 -0
- package/schemas/recipe.schema.json +26 -0
- package/schemas/report.schema.json +17 -0
- package/schemas/workflow-event.schema.json +28 -0
- package/schemas/workflow-state.schema.json +29 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-engineering-loop",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "A reusable, framework-agnostic AI Engineering Operating System for
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"description": "A reusable, framework-agnostic AI Engineering Operating System for safe coding agents.",
|
|
5
5
|
"main": "bin/ai-engineering-loop.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"ai-engineering-loop": "bin/ai-engineering-loop.js"
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"policies/",
|
|
15
15
|
"profiles/",
|
|
16
16
|
"adapters/",
|
|
17
|
+
"recipes/",
|
|
17
18
|
"schemas/",
|
|
18
19
|
"evals/",
|
|
19
20
|
".agents/",
|
|
@@ -31,7 +32,10 @@
|
|
|
31
32
|
"init": "node bin/ai-engineering-loop.js",
|
|
32
33
|
"test": "node --test",
|
|
33
34
|
"doctor": "node bin/ai-engineering-loop.js doctor",
|
|
34
|
-
"eval": "node bin/ai-engineering-loop.js eval"
|
|
35
|
+
"eval": "node bin/ai-engineering-loop.js eval",
|
|
36
|
+
"audit:package": "node scripts/audit-package.js",
|
|
37
|
+
"verify:release": "node scripts/verify-release.js",
|
|
38
|
+
"prepublishOnly": "npm test && npm run doctor && npm run eval && npm run audit:package"
|
|
35
39
|
},
|
|
36
40
|
"engines": {
|
|
37
41
|
"node": ">=18"
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## 1. Purpose & Core Philosophy
|
|
4
4
|
|
|
5
|
-
The **Finding Policy** defines the standardized schema, severity definitions, validity rules, and lifecycle states for all issues identified by review agents (such as the [Devil's Advocate](
|
|
5
|
+
The **Finding Policy** defines the standardized schema, severity definitions, validity rules, and lifecycle states for all issues identified by review agents (such as the [Devil's Advocate](../agents/devil-advocate.md) or external review bots).
|
|
6
6
|
|
|
7
7
|
A standardized finding schema ensures that:
|
|
8
8
|
1. Every criticism is actionable, localized, and backed by factual code evidence.
|
|
9
9
|
2. Review findings can be parsed, hashed, and tracked across autonomous iterations.
|
|
10
|
-
3. The [Judge Agent](
|
|
10
|
+
3. The [Judge Agent](../agents/judge.md) can evaluate findings deterministically based on **Validity + Severity** without subjective bias.
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
A major risk in autonomous AI agent loops is **thrashing (stagnation)**: the agent modifies code repeatedly across iterations without actually resolving the underlying defect, oscillating between two broken states, or generating the same unresolved findings repeatedly.
|
|
6
6
|
|
|
7
|
-
The **No-Progress Policy** defines an algorithmic mechanism to detect stagnation early and halt the loop with a [Human Escalation](
|
|
7
|
+
The **No-Progress Policy** defines an algorithmic mechanism to detect stagnation early and halt the loop with a [Human Escalation](../core/escalation-policy.md) rather than wasting tokens and computational cycles.
|
|
8
8
|
|
|
9
9
|
```mermaid
|
|
10
10
|
flowchart LR
|
|
@@ -89,4 +89,4 @@ def check_stagnation(
|
|
|
89
89
|
When `check_stagnation` returns `True`:
|
|
90
90
|
1. The Judge Agent immediately sets the verdict to **`ESCALATE`**.
|
|
91
91
|
2. Autonomous iteration stops.
|
|
92
|
-
3. The agent generates the standardized [Human Escalation Report](
|
|
92
|
+
3. The agent generates the standardized [Human Escalation Report](../core/escalation-policy.md) highlighting the recurring signature and exact blocking contradiction.
|
package/profiles/README.md
CHANGED
|
@@ -23,11 +23,11 @@ flowchart TD
|
|
|
23
23
|
|
|
24
24
|
| Profile | Target Archetype | Primary Verification Focus | Active Review Domains |
|
|
25
25
|
|---|---|---|---|
|
|
26
|
-
| **[`web-app`](
|
|
27
|
-
| **[`backend-api`](
|
|
28
|
-
| **[`mobile-app`](
|
|
29
|
-
| **[`library`](
|
|
30
|
-
| **[`monorepo`](
|
|
26
|
+
| **[`web-app`](./web-app.md)** | Single-Page Apps, SSR/SSG websites, Admin Portals | DOM rendering, browser responsiveness, bundle size, CSS/tokens | Responsive layout, accessibility (a11y), client state, Core Web Vitals |
|
|
27
|
+
| **[`backend-api`](./backend-api.md)** | REST / GraphQL / gRPC Microservices, Background Workers | Unit tests, database migrations, schema contracts | Auth/Authz, SQL injection, concurrency, transactions, API contracts |
|
|
28
|
+
| **[`mobile-app`](./mobile-app.md)** | iOS, Android, React Native, Flutter | Platform builds, simulator smoke tests, widget tests | Offline sync, device permissions, lifecycle transitions, network resilience |
|
|
29
|
+
| **[`library`](./library.md)** | Reusable SDKs, packages, shared utilities | Broad runtime compatibility, zero external dependencies | Public API stability, semver breaking changes, bundle tree-shaking |
|
|
30
|
+
| **[`monorepo`](./monorepo.md)** | Turborepo, Nx, Lerna, Yarn/pnpm Workspaces | Workspace scope tests, affected package compilation | Cross-package boundaries, circular dependencies, dependency isolation |
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
package/profiles/backend-api.md
CHANGED
|
@@ -30,7 +30,7 @@ When working in a `backend-api` repository, deterministic verification should pr
|
|
|
30
30
|
|
|
31
31
|
## 4. Active Review Domains for Devil's Advocate
|
|
32
32
|
|
|
33
|
-
When reviewing diffs in a `backend-api` project, the [Devil's Advocate](
|
|
33
|
+
When reviewing diffs in a `backend-api` project, the [Devil's Advocate](../agents/devil-advocate.md) activates these targeted checks:
|
|
34
34
|
|
|
35
35
|
```mermaid
|
|
36
36
|
flowchart LR
|
package/profiles/library.md
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
## 4. Active Review Domains for Devil's Advocate
|
|
29
29
|
|
|
30
|
-
When reviewing diffs in a `library` project, the [Devil's Advocate](
|
|
30
|
+
When reviewing diffs in a `library` project, the [Devil's Advocate](../agents/devil-advocate.md) activates these targeted checks:
|
|
31
31
|
|
|
32
32
|
```mermaid
|
|
33
33
|
flowchart LR
|
package/profiles/mobile-app.md
CHANGED
|
@@ -30,7 +30,7 @@ When working in a `mobile-app` repository, deterministic verification should pri
|
|
|
30
30
|
|
|
31
31
|
## 4. Active Review Domains for Devil's Advocate
|
|
32
32
|
|
|
33
|
-
When reviewing diffs in a `mobile-app` project, the [Devil's Advocate](
|
|
33
|
+
When reviewing diffs in a `mobile-app` project, the [Devil's Advocate](../agents/devil-advocate.md) activates these targeted checks:
|
|
34
34
|
|
|
35
35
|
```mermaid
|
|
36
36
|
flowchart LR
|
package/profiles/monorepo.md
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
## 4. Active Review Domains for Devil's Advocate
|
|
28
28
|
|
|
29
|
-
When reviewing diffs in a `monorepo` project, the [Devil's Advocate](
|
|
29
|
+
When reviewing diffs in a `monorepo` project, the [Devil's Advocate](../agents/devil-advocate.md) activates these targeted checks:
|
|
30
30
|
|
|
31
31
|
```mermaid
|
|
32
32
|
flowchart LR
|
package/profiles/web-app.md
CHANGED
|
@@ -30,7 +30,7 @@ When working in a `web-app` repository, deterministic verification should priori
|
|
|
30
30
|
|
|
31
31
|
## 4. Active Review Domains for Devil's Advocate
|
|
32
32
|
|
|
33
|
-
When reviewing diffs in a `web-app` project, the [Devil's Advocate](
|
|
33
|
+
When reviewing diffs in a `web-app` project, the [Devil's Advocate](../agents/devil-advocate.md) activates these targeted checks:
|
|
34
34
|
|
|
35
35
|
```mermaid
|
|
36
36
|
flowchart LR
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "audit",
|
|
4
|
+
"version": 1,
|
|
5
|
+
"description": "Read-only repository analysis with a structured report and no mutation or remote side effects.",
|
|
6
|
+
"compatibleModes": ["REPORT_ONLY"],
|
|
7
|
+
"nodes": [
|
|
8
|
+
{
|
|
9
|
+
"id": "goal",
|
|
10
|
+
"type": "goal-contract"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "repository-analysis",
|
|
14
|
+
"type": "agent",
|
|
15
|
+
"dependsOn": ["goal"],
|
|
16
|
+
"role": "repository-auditor",
|
|
17
|
+
"context": {
|
|
18
|
+
"maxFiles": 40,
|
|
19
|
+
"maxTokens": 12000
|
|
20
|
+
},
|
|
21
|
+
"output": {
|
|
22
|
+
"artifact": "repository-analysis",
|
|
23
|
+
"schema": "schemas/report.schema.json"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "report",
|
|
28
|
+
"type": "report",
|
|
29
|
+
"dependsOn": ["repository-analysis"]
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "bugfix",
|
|
4
|
+
"version": 1,
|
|
5
|
+
"description": "Root-cause-first repair workflow with the complete production safety backbone.",
|
|
6
|
+
"compatibleModes": ["ASSISTED", "UNATTENDED"],
|
|
7
|
+
"nodes": [
|
|
8
|
+
{
|
|
9
|
+
"id": "goal",
|
|
10
|
+
"type": "goal-contract"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "root-cause",
|
|
14
|
+
"type": "agent",
|
|
15
|
+
"dependsOn": ["goal"],
|
|
16
|
+
"role": "root-cause-analyst",
|
|
17
|
+
"context": {
|
|
18
|
+
"maxFiles": 30,
|
|
19
|
+
"maxTokens": 10000
|
|
20
|
+
},
|
|
21
|
+
"output": {
|
|
22
|
+
"artifact": "root-cause-analysis",
|
|
23
|
+
"schema": "schemas/report.schema.json"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "maker",
|
|
28
|
+
"type": "maker",
|
|
29
|
+
"dependsOn": ["root-cause"]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "verification",
|
|
33
|
+
"type": "verification",
|
|
34
|
+
"dependsOn": ["maker"]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "review",
|
|
38
|
+
"type": "devil-advocate",
|
|
39
|
+
"dependsOn": ["verification"]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "judge",
|
|
43
|
+
"type": "judge",
|
|
44
|
+
"dependsOn": ["review"]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "delivery-approval",
|
|
48
|
+
"type": "approval",
|
|
49
|
+
"dependsOn": ["judge"],
|
|
50
|
+
"when": {
|
|
51
|
+
"field": "run.mode",
|
|
52
|
+
"operator": "equals",
|
|
53
|
+
"value": "ASSISTED"
|
|
54
|
+
},
|
|
55
|
+
"message": "Approve the verified bug fix for delivery."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "delivery",
|
|
59
|
+
"type": "delivery",
|
|
60
|
+
"dependsOn": ["judge", "delivery-approval"]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "default",
|
|
4
|
+
"version": 1,
|
|
5
|
+
"description": "The existing Maker, verification, Devil's Advocate, Judge, and delivery workflow.",
|
|
6
|
+
"compatibleModes": ["ASSISTED", "UNATTENDED"],
|
|
7
|
+
"nodes": [
|
|
8
|
+
{
|
|
9
|
+
"id": "goal",
|
|
10
|
+
"type": "goal-contract"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "maker",
|
|
14
|
+
"type": "maker",
|
|
15
|
+
"dependsOn": ["goal"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "verification",
|
|
19
|
+
"type": "verification",
|
|
20
|
+
"dependsOn": ["maker"]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "review",
|
|
24
|
+
"type": "devil-advocate",
|
|
25
|
+
"dependsOn": ["verification"]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "judge",
|
|
29
|
+
"type": "judge",
|
|
30
|
+
"dependsOn": ["review"]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "delivery-approval",
|
|
34
|
+
"type": "approval",
|
|
35
|
+
"dependsOn": ["judge"],
|
|
36
|
+
"when": {
|
|
37
|
+
"field": "run.mode",
|
|
38
|
+
"operator": "equals",
|
|
39
|
+
"value": "ASSISTED"
|
|
40
|
+
},
|
|
41
|
+
"message": "Approve the verified change for delivery."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "delivery",
|
|
45
|
+
"type": "delivery",
|
|
46
|
+
"dependsOn": ["judge", "delivery-approval"]
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "docs-light",
|
|
4
|
+
"version": 1,
|
|
5
|
+
"description": "Documentation-focused workflow with bounded context and the standard quality gates.",
|
|
6
|
+
"compatibleModes": ["ASSISTED", "UNATTENDED"],
|
|
7
|
+
"nodes": [
|
|
8
|
+
{
|
|
9
|
+
"id": "goal",
|
|
10
|
+
"type": "goal-contract"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "documentation-context",
|
|
14
|
+
"type": "agent",
|
|
15
|
+
"dependsOn": ["goal"],
|
|
16
|
+
"role": "documentation-planner",
|
|
17
|
+
"context": {
|
|
18
|
+
"maxFiles": 20,
|
|
19
|
+
"maxTokens": 6000
|
|
20
|
+
},
|
|
21
|
+
"output": {
|
|
22
|
+
"artifact": "documentation-plan",
|
|
23
|
+
"schema": "schemas/report.schema.json"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "maker",
|
|
28
|
+
"type": "maker",
|
|
29
|
+
"dependsOn": ["documentation-context"]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "verification",
|
|
33
|
+
"type": "verification",
|
|
34
|
+
"dependsOn": ["maker"]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "review",
|
|
38
|
+
"type": "devil-advocate",
|
|
39
|
+
"dependsOn": ["verification"]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "judge",
|
|
43
|
+
"type": "judge",
|
|
44
|
+
"dependsOn": ["review"]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "delivery-approval",
|
|
48
|
+
"type": "approval",
|
|
49
|
+
"dependsOn": ["judge"],
|
|
50
|
+
"when": {
|
|
51
|
+
"field": "run.mode",
|
|
52
|
+
"operator": "equals",
|
|
53
|
+
"value": "ASSISTED"
|
|
54
|
+
},
|
|
55
|
+
"message": "Approve the verified documentation change for delivery."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "delivery",
|
|
59
|
+
"type": "delivery",
|
|
60
|
+
"dependsOn": ["judge", "delivery-approval"]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "high-risk",
|
|
4
|
+
"version": 1,
|
|
5
|
+
"description": "Change workflow with explicit blast-radius analysis and approval before mutation.",
|
|
6
|
+
"compatibleModes": ["ASSISTED", "UNATTENDED"],
|
|
7
|
+
"nodes": [
|
|
8
|
+
{
|
|
9
|
+
"id": "goal",
|
|
10
|
+
"type": "goal-contract"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "risk-analysis",
|
|
14
|
+
"type": "agent",
|
|
15
|
+
"dependsOn": ["goal"],
|
|
16
|
+
"role": "blast-radius-analyst",
|
|
17
|
+
"context": {
|
|
18
|
+
"maxFiles": 50,
|
|
19
|
+
"maxTokens": 16000
|
|
20
|
+
},
|
|
21
|
+
"output": {
|
|
22
|
+
"artifact": "risk-analysis",
|
|
23
|
+
"schema": "schemas/report.schema.json"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "plan-approval",
|
|
28
|
+
"type": "approval",
|
|
29
|
+
"dependsOn": ["risk-analysis"],
|
|
30
|
+
"message": "Approve the high-risk implementation plan before repository mutation."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "maker",
|
|
34
|
+
"type": "maker",
|
|
35
|
+
"dependsOn": ["plan-approval"]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "verification",
|
|
39
|
+
"type": "verification",
|
|
40
|
+
"dependsOn": ["maker"]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "review",
|
|
44
|
+
"type": "devil-advocate",
|
|
45
|
+
"dependsOn": ["verification"]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "judge",
|
|
49
|
+
"type": "judge",
|
|
50
|
+
"dependsOn": ["review"]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "delivery-approval",
|
|
54
|
+
"type": "approval",
|
|
55
|
+
"dependsOn": ["judge"],
|
|
56
|
+
"when": {
|
|
57
|
+
"field": "run.mode",
|
|
58
|
+
"operator": "equals",
|
|
59
|
+
"value": "ASSISTED"
|
|
60
|
+
},
|
|
61
|
+
"message": "Approve the verified high-risk change for delivery."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "delivery",
|
|
65
|
+
"type": "delivery",
|
|
66
|
+
"dependsOn": ["judge", "delivery-approval"]
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "refactor",
|
|
4
|
+
"version": 1,
|
|
5
|
+
"description": "Behavior-preserving refactor workflow with explicit baseline analysis.",
|
|
6
|
+
"compatibleModes": ["ASSISTED", "UNATTENDED"],
|
|
7
|
+
"nodes": [
|
|
8
|
+
{
|
|
9
|
+
"id": "goal",
|
|
10
|
+
"type": "goal-contract"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "behavior-baseline",
|
|
14
|
+
"type": "agent",
|
|
15
|
+
"dependsOn": ["goal"],
|
|
16
|
+
"role": "behavior-baseline-analyst",
|
|
17
|
+
"context": {
|
|
18
|
+
"maxFiles": 35,
|
|
19
|
+
"maxTokens": 10000
|
|
20
|
+
},
|
|
21
|
+
"output": {
|
|
22
|
+
"artifact": "behavior-baseline",
|
|
23
|
+
"schema": "schemas/report.schema.json"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "maker",
|
|
28
|
+
"type": "maker",
|
|
29
|
+
"dependsOn": ["behavior-baseline"]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "verification",
|
|
33
|
+
"type": "verification",
|
|
34
|
+
"dependsOn": ["maker"]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "review",
|
|
38
|
+
"type": "devil-advocate",
|
|
39
|
+
"dependsOn": ["verification"]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "judge",
|
|
43
|
+
"type": "judge",
|
|
44
|
+
"dependsOn": ["review"]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "delivery-approval",
|
|
48
|
+
"type": "approval",
|
|
49
|
+
"dependsOn": ["judge"],
|
|
50
|
+
"when": {
|
|
51
|
+
"field": "run.mode",
|
|
52
|
+
"operator": "equals",
|
|
53
|
+
"value": "ASSISTED"
|
|
54
|
+
},
|
|
55
|
+
"message": "Approve the verified refactor for delivery."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "delivery",
|
|
59
|
+
"type": "delivery",
|
|
60
|
+
"dependsOn": ["judge", "delivery-approval"]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/egagofur/ai-engineering-loop/schemas/compiled-plan.schema.json",
|
|
4
|
+
"title": "AI Engineering Loop Compiled Plan",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "compilerVersion", "recipe", "mode", "nodes", "graphHash"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": 1 },
|
|
9
|
+
"compilerVersion": { "const": 1 },
|
|
10
|
+
"recipe": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"required": ["id", "version", "sourceHash"]
|
|
13
|
+
},
|
|
14
|
+
"mode": { "enum": ["REPORT_ONLY", "ASSISTED", "UNATTENDED"] },
|
|
15
|
+
"nodes": { "type": "array", "minItems": 1, "maxItems": 64 },
|
|
16
|
+
"graphHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
|
17
|
+
},
|
|
18
|
+
"additionalProperties": true
|
|
19
|
+
}
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"schemaVersion": { "const": 1 },
|
|
9
9
|
"runId": { "type": "string", "minLength": 1 },
|
|
10
10
|
"destination": { "type": "string", "minLength": 1 },
|
|
11
|
-
"summary": { "type": "string", "minLength": 1 }
|
|
11
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
12
|
+
"humanApproved": { "type": "boolean" }
|
|
12
13
|
},
|
|
13
14
|
"additionalProperties": true
|
|
14
15
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/egagofur/ai-engineering-loop/schemas/node-definition.schema.json",
|
|
4
|
+
"title": "AI Engineering Loop Node Definition",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["id", "type"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$" },
|
|
9
|
+
"type": {
|
|
10
|
+
"enum": [
|
|
11
|
+
"goal-contract",
|
|
12
|
+
"agent",
|
|
13
|
+
"command",
|
|
14
|
+
"condition",
|
|
15
|
+
"approval",
|
|
16
|
+
"artifact-check",
|
|
17
|
+
"maker",
|
|
18
|
+
"verification",
|
|
19
|
+
"devil-advocate",
|
|
20
|
+
"judge",
|
|
21
|
+
"report",
|
|
22
|
+
"delivery"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"dependsOn": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"uniqueItems": true,
|
|
28
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$" }
|
|
29
|
+
},
|
|
30
|
+
"when": { "type": "object" }
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": true
|
|
33
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/egagofur/ai-engineering-loop/schemas/recipe.schema.json",
|
|
4
|
+
"title": "AI Engineering Loop Recipe",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "id", "version", "description", "compatibleModes", "nodes"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": 1 },
|
|
9
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$" },
|
|
10
|
+
"version": { "type": "integer", "minimum": 1 },
|
|
11
|
+
"description": { "type": "string", "minLength": 1 },
|
|
12
|
+
"compatibleModes": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"minItems": 1,
|
|
15
|
+
"uniqueItems": true,
|
|
16
|
+
"items": { "enum": ["REPORT_ONLY", "ASSISTED", "UNATTENDED"] }
|
|
17
|
+
},
|
|
18
|
+
"nodes": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"minItems": 1,
|
|
21
|
+
"maxItems": 64,
|
|
22
|
+
"items": { "$ref": "node-definition.schema.json" }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"additionalProperties": false
|
|
26
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/egagofur/ai-engineering-loop/schemas/report.schema.json",
|
|
4
|
+
"title": "Report-only completion",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "runId", "summary", "recommendations"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": 1 },
|
|
9
|
+
"runId": { "type": "string", "minLength": 1 },
|
|
10
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
11
|
+
"recommendations": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": { "type": "string", "minLength": 1 }
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"additionalProperties": true
|
|
17
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/egagofur/ai-engineering-loop/schemas/workflow-event.schema.json",
|
|
4
|
+
"title": "AI Engineering Loop Workflow Event",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "sequence", "previousHash", "at", "type", "runId", "graphHash", "hash"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": 1 },
|
|
9
|
+
"sequence": { "type": "integer", "minimum": 1 },
|
|
10
|
+
"previousHash": { "type": ["string", "null"] },
|
|
11
|
+
"at": { "type": "string", "format": "date-time" },
|
|
12
|
+
"type": {
|
|
13
|
+
"enum": [
|
|
14
|
+
"WORKFLOW_CREATED",
|
|
15
|
+
"NODE_STARTED",
|
|
16
|
+
"NODE_COMPLETED",
|
|
17
|
+
"NODE_FAILED",
|
|
18
|
+
"NODE_RETRIED",
|
|
19
|
+
"NODE_APPROVED",
|
|
20
|
+
"GATE_PASSED"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"runId": { "type": "string", "minLength": 1 },
|
|
24
|
+
"graphHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
25
|
+
"hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
|
26
|
+
},
|
|
27
|
+
"additionalProperties": true
|
|
28
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/egagofur/ai-engineering-loop/schemas/workflow-state.schema.json",
|
|
4
|
+
"title": "AI Engineering Loop Workflow Runtime State",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "runId", "graphHash", "sequence", "eventHash", "nodes"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": 1 },
|
|
9
|
+
"runId": { "type": "string", "minLength": 1 },
|
|
10
|
+
"graphHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
11
|
+
"sequence": { "type": "integer", "minimum": 1 },
|
|
12
|
+
"eventHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
13
|
+
"nodes": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["status", "attempts", "updatedAt"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"status": {
|
|
20
|
+
"enum": ["PENDING", "READY", "RUNNING", "PASSED", "FAILED", "SKIPPED", "BLOCKED"]
|
|
21
|
+
},
|
|
22
|
+
"attempts": { "type": "integer", "minimum": 0 },
|
|
23
|
+
"updatedAt": { "type": "string", "format": "date-time" }
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"additionalProperties": false
|
|
29
|
+
}
|