ai-engineering-loop 1.0.13 → 1.0.15
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/devil-advocate.md +1 -1
- package/.agents/judge.md +1 -1
- package/.agents/workflows/ai-engineering-loop.md +1 -1
- package/.claude/agents/devil-advocate.md +1 -1
- package/.claude/agents/judge.md +1 -1
- package/.claude/skills/ai-engineering-loop/SKILL.md +2 -2
- package/.gemini/skills/ai-engineering-loop/SKILL.md +2 -2
- package/.grok/agents/devil-advocate.md +1 -1
- package/.grok/agents/judge.md +1 -1
- package/.grok/skills/ai-engineering-loop/SKILL.md +2 -2
- package/README.md +4 -4
- package/adapters/dot/README.md +8 -8
- package/adapters/dot/coreview.md +3 -2
- package/adapters/dot/gitlab.md +3 -3
- package/adapters/dot/mattermost.md +59 -71
- package/adapters/dot/multi-branch.md +3 -2
- package/adapters/dot/skills/dot-dev-workflow/SKILL.md +2 -2
- package/adapters/dot/skills/task-impact-inquiry/SKILL.md +155 -0
- package/agents/judge.md +2 -1
- package/agents/maker.md +1 -1
- package/agents/shared/devil-advocate.body.md +1 -1
- package/agents/shared/judge.body.md +1 -1
- package/bin/ai-engineering-loop.js +2 -2
- package/core/goal-contract.md +10 -3
- package/core/grill-policy.md +17 -11
- package/core/judge-policy.md +1 -0
- package/core/verification-loop.md +3 -1
- package/examples/backend-api/payment-idempotency/README.md +3 -3
- package/examples/dot/status-display/README.md +23 -0
- package/examples/dot/status-display/delivery-report.md +41 -0
- package/examples/dot/status-display/goal-contract.md +46 -0
- package/examples/dot/status-display/judge-verdict.md +44 -0
- package/examples/dot/status-display/review-findings.md +63 -0
- package/examples/initialization/README.md +2 -2
- package/examples/initialization/discovery-trace.md +1 -1
- package/examples/mobile-app/offline-sync-queue/README.md +3 -3
- package/lib/sync-hosts.js +4 -1
- package/package.json +1 -1
- package/policies/tdd-policy.md +23 -4
- package/tests/no-company-leak.test.js +82 -0
- package/tests/skill-host-compat.test.js +54 -7
- package/tests/sync-hosts.test.js +19 -1
- package/examples/dot/attendance-confirmation/README.md +0 -22
- package/examples/dot/attendance-confirmation/delivery-report.md +0 -51
- package/examples/dot/attendance-confirmation/goal-contract.md +0 -39
- package/examples/dot/attendance-confirmation/judge-verdict.md +0 -43
- package/examples/dot/attendance-confirmation/review-findings.md +0 -57
|
@@ -28,7 +28,7 @@ Do not ask for Maker rationale.
|
|
|
28
28
|
|
|
29
29
|
Report Spec and Standards as separate findings. Do not rerank one axis with the other. A change can pass Spec and fail Standards, or the reverse. Do not spawn children to split axes.
|
|
30
30
|
|
|
31
|
-
**Spec** (`axis: "spec"`): Goal Contract acceptance criteria, correctness, error handling, security, concurrency, tests that fail to prove an AC. BLOCKER or HIGH only for a real AC breach or runtime defect.
|
|
31
|
+
**Spec** (`axis: "spec"`): Goal Contract acceptance criteria, correctness, error handling, security, concurrency, tests that fail to prove an AC, happy-path-only suite vs written failure table. BLOCKER or HIGH only for a real AC breach or runtime defect.
|
|
32
32
|
|
|
33
33
|
**Standards** (`axis: "standards"`): `.ai-engineering-loop/conventions.md` plus the smell baseline below. Judgement calls: severity MEDIUM or LOW. Set `hardConvention: true` only when conventions.md states a hard rule that this hunk violates. A smell that hides an AC defect is Spec, not Standards.
|
|
34
34
|
|
package/.agents/judge.md
CHANGED
|
@@ -16,7 +16,7 @@ Use only paths in the spawn prompt: Goal Contract, verification evidence, Findin
|
|
|
16
16
|
|
|
17
17
|
AC source is the Goal Contract **file** only. Chat `setuju` and the parent transcript are not AC. Do not PASS because the parent agreed in chat. `CONTEXT_ISOLATION_ONLY` does not relax this.
|
|
18
18
|
|
|
19
|
-
ITERATE if verification is missing, vague, non-zero, proves a different artifact than the AC names,
|
|
19
|
+
ITERATE if verification is missing, vague, non-zero, proves a different artifact than the AC names, is only a source grep, or is happy-path-only while the Goal Contract lists empty, boundary, sibling, or error rows.
|
|
20
20
|
|
|
21
21
|
## Axes
|
|
22
22
|
|
|
@@ -5,7 +5,7 @@ description: Run the AI Engineering Loop on Antigravity (init, status, refresh,
|
|
|
5
5
|
|
|
6
6
|
Follow `policies/review-budget.md`. Parent is Maker plus orchestrator. Do not use `browser_subagent`.
|
|
7
7
|
|
|
8
|
-
Stage 1: if the user asks for ideas, list a short menu and wait; do not implement. Grill if the task is ambiguous (`core/grill-policy.md`), then freeze the Goal Contract file. Chat agreement is not freeze. On `adapter_type: dot`,
|
|
8
|
+
Stage 1: if the user asks for ideas, list a short menu and wait; do not implement. Grill if the task is ambiguous (`core/grill-policy.md`), then freeze the Goal Contract file. Chat agreement is not freeze. On business-logic change, and always on `adapter_type: dot`, grill includes blast radius: lifecycle sketch, four pillars (state, sibling, approval, queues), ASCII picture. Load `task-impact-inquiry` if present. Do not run a second interview. Passing unit tests are not isolation proof. Use `.ai-engineering-loop/glossary.md`. Name test seams. AC is a failure table (happy, empty/omit, boundary, sibling, error). One red test per AC row. Do not freeze sunny-path-only. Maker: TDD at those seams (`policies/tdd-policy.md`): one red test per AC row. Bugs: red repro first (`core/root-cause-analysis.md`). Mid-loop stop: `core/handoff-policy.md`.
|
|
9
9
|
|
|
10
10
|
If `invoke_subagent` (or Task) exists, spawn `devil-advocate` then `judge` as siblings. Wait for each child. Do not run them in the background. Use `general-purpose` only if the named type is rejected.
|
|
11
11
|
|
|
@@ -29,7 +29,7 @@ Do not ask for Maker rationale.
|
|
|
29
29
|
|
|
30
30
|
Report Spec and Standards as separate findings. Do not rerank one axis with the other. A change can pass Spec and fail Standards, or the reverse. Do not spawn children to split axes.
|
|
31
31
|
|
|
32
|
-
**Spec** (`axis: "spec"`): Goal Contract acceptance criteria, correctness, error handling, security, concurrency, tests that fail to prove an AC. BLOCKER or HIGH only for a real AC breach or runtime defect.
|
|
32
|
+
**Spec** (`axis: "spec"`): Goal Contract acceptance criteria, correctness, error handling, security, concurrency, tests that fail to prove an AC, happy-path-only suite vs written failure table. BLOCKER or HIGH only for a real AC breach or runtime defect.
|
|
33
33
|
|
|
34
34
|
**Standards** (`axis: "standards"`): `.ai-engineering-loop/conventions.md` plus the smell baseline below. Judgement calls: severity MEDIUM or LOW. Set `hardConvention: true` only when conventions.md states a hard rule that this hunk violates. A smell that hides an AC defect is Spec, not Standards.
|
|
35
35
|
|
package/.claude/agents/judge.md
CHANGED
|
@@ -17,7 +17,7 @@ Use only paths in the spawn prompt: Goal Contract, verification evidence, Findin
|
|
|
17
17
|
|
|
18
18
|
AC source is the Goal Contract **file** only. Chat `setuju` and the parent transcript are not AC. Do not PASS because the parent agreed in chat. `CONTEXT_ISOLATION_ONLY` does not relax this.
|
|
19
19
|
|
|
20
|
-
ITERATE if verification is missing, vague, non-zero, proves a different artifact than the AC names,
|
|
20
|
+
ITERATE if verification is missing, vague, non-zero, proves a different artifact than the AC names, is only a source grep, or is happy-path-only while the Goal Contract lists empty, boundary, sibling, or error rows.
|
|
21
21
|
|
|
22
22
|
## Axes
|
|
23
23
|
|
|
@@ -32,8 +32,8 @@ Claude Code talks to strict proxies (including Kiro). Follow this exactly:
|
|
|
32
32
|
Parent session is Maker plus orchestrator. Spawn Devil's Advocate and Judge as **siblings**, not nested.
|
|
33
33
|
|
|
34
34
|
1. Stage 0: `npx ai-engineering-loop sync-hosts` then `npx ai-engineering-loop status` (init or refresh if missing or stale). Read `.ai-engineering-loop/glossary.md`. If sync-hosts copied files, tell the user a new session is needed for updated skill text; keep going with this session.
|
|
35
|
-
2. Stage 1: Goal Contract (`core/goal-contract.md`). If the user asks for ideas, list a short menu and wait; do not implement. If the task is ambiguous and the user can answer, grill first (`core/grill-policy.md`): design tree, recommended answers, do not ask look-up facts. Skip grill if the contract is already frozen or the user waived it. On `adapter_type: dot`,
|
|
36
|
-
3. Stages 2-4: Maker in the parent. Bugs: red repro first (`core/root-cause-analysis.md`). Features: TDD at named seams (`policies/tdd-policy.md`). Surgical diff.
|
|
35
|
+
2. Stage 1: Goal Contract (`core/goal-contract.md`). If the user asks for ideas, list a short menu and wait; do not implement. If the task is ambiguous and the user can answer, grill first (`core/grill-policy.md`): design tree, recommended answers, do not ask look-up facts. Skip grill if the contract is already frozen or the user waived it. On business-logic change, and always on `adapter_type: dot`, grill includes blast radius: lifecycle sketch, four pillars (state, sibling, approval, queues), ASCII picture. Load `task-impact-inquiry` if present. Do not run a second interview. Passing unit tests are not isolation proof. Chat agreement is not freeze: every user-visible decision must be a numbered AC in the Goal Contract file. Freeze before any production edit. Name test seams. Use glossary terms. AC is a failure table (happy, empty/omit, boundary, sibling, error). One red test per AC row. Do not freeze sunny-path-only.
|
|
36
|
+
3. Stages 2-4: Maker in the parent. Bugs: red repro first (`core/root-cause-analysis.md`). Features: TDD at named seams (`policies/tdd-policy.md`): one red test per AC row. Surgical diff.
|
|
37
37
|
4. Stage 5: run commands from `.ai-engineering-loop/verification.md`. Keep command, exit code, stdout, test counts. Vague "seems green" is invalid.
|
|
38
38
|
5. Write artifacts, then spawn. Before Devil's Advocate:
|
|
39
39
|
- Write `git diff` to a file (for example `.ai-engineering-loop/tasks/current.diff`).
|
|
@@ -25,8 +25,8 @@ Canonical mode ids: `TRUE_INDEPENDENT_AGENT`, `ISOLATED_AGENT_INSTANCE`, `FRESH_
|
|
|
25
25
|
## Loop
|
|
26
26
|
|
|
27
27
|
1. Stage 0: `npx ai-engineering-loop sync-hosts` then `npx ai-engineering-loop status` (init or refresh if missing or stale). Read `.ai-engineering-loop/glossary.md`. If sync-hosts copied files, tell the user a new session is needed for updated skill text; keep going with this session.
|
|
28
|
-
2. Stage 1: Goal Contract (`core/goal-contract.md`). If the user asks for ideas, list a short menu and wait; do not implement. If the task is ambiguous and the user can answer, grill first (`core/grill-policy.md`): design tree, recommended answers, do not ask look-up facts. Skip grill if the contract is already frozen or the user waived it. On `adapter_type: dot`,
|
|
29
|
-
3. Stages 2-4: Maker in the parent. Bugs: red repro first (`core/root-cause-analysis.md`). Features: TDD at named seams (`policies/tdd-policy.md`). Surgical diff.
|
|
28
|
+
2. Stage 1: Goal Contract (`core/goal-contract.md`). If the user asks for ideas, list a short menu and wait; do not implement. If the task is ambiguous and the user can answer, grill first (`core/grill-policy.md`): design tree, recommended answers, do not ask look-up facts. Skip grill if the contract is already frozen or the user waived it. On business-logic change, and always on `adapter_type: dot`, grill includes blast radius: lifecycle sketch, four pillars (state, sibling, approval, queues), ASCII picture. Load `task-impact-inquiry` if present. Do not run a second interview. Passing unit tests are not isolation proof. Chat agreement is not freeze: every user-visible decision must be a numbered AC in the Goal Contract file. Freeze before any production edit. Name test seams. Use glossary terms. AC is a failure table (happy, empty/omit, boundary, sibling, error). One red test per AC row. Do not freeze sunny-path-only.
|
|
29
|
+
3. Stages 2-4: Maker in the parent. Bugs: red repro first (`core/root-cause-analysis.md`). Features: TDD at named seams (`policies/tdd-policy.md`): one red test per AC row. Surgical diff.
|
|
30
30
|
4. Stage 5: run commands from `.ai-engineering-loop/verification.md`. Keep command, exit code, stdout, test counts. Vague "seems green" is invalid.
|
|
31
31
|
5. Write artifacts, then spawn. Before Devil's Advocate:
|
|
32
32
|
- Write `git diff` to a file (for example `.ai-engineering-loop/tasks/current.diff`).
|
|
@@ -30,7 +30,7 @@ Do not ask for Maker rationale.
|
|
|
30
30
|
|
|
31
31
|
Report Spec and Standards as separate findings. Do not rerank one axis with the other. A change can pass Spec and fail Standards, or the reverse. Do not spawn children to split axes.
|
|
32
32
|
|
|
33
|
-
**Spec** (`axis: "spec"`): Goal Contract acceptance criteria, correctness, error handling, security, concurrency, tests that fail to prove an AC. BLOCKER or HIGH only for a real AC breach or runtime defect.
|
|
33
|
+
**Spec** (`axis: "spec"`): Goal Contract acceptance criteria, correctness, error handling, security, concurrency, tests that fail to prove an AC, happy-path-only suite vs written failure table. BLOCKER or HIGH only for a real AC breach or runtime defect.
|
|
34
34
|
|
|
35
35
|
**Standards** (`axis: "standards"`): `.ai-engineering-loop/conventions.md` plus the smell baseline below. Judgement calls: severity MEDIUM or LOW. Set `hardConvention: true` only when conventions.md states a hard rule that this hunk violates. A smell that hides an AC defect is Spec, not Standards.
|
|
36
36
|
|
package/.grok/agents/judge.md
CHANGED
|
@@ -18,7 +18,7 @@ Use only paths in the spawn prompt: Goal Contract, verification evidence, Findin
|
|
|
18
18
|
|
|
19
19
|
AC source is the Goal Contract **file** only. Chat `setuju` and the parent transcript are not AC. Do not PASS because the parent agreed in chat. `CONTEXT_ISOLATION_ONLY` does not relax this.
|
|
20
20
|
|
|
21
|
-
ITERATE if verification is missing, vague, non-zero, proves a different artifact than the AC names,
|
|
21
|
+
ITERATE if verification is missing, vague, non-zero, proves a different artifact than the AC names, is only a source grep, or is happy-path-only while the Goal Contract lists empty, boundary, sibling, or error rows.
|
|
22
22
|
|
|
23
23
|
## Axes
|
|
24
24
|
|
|
@@ -45,8 +45,8 @@ Run `npx ai-engineering-loop <command>` in the target repo. Do not commit unless
|
|
|
45
45
|
### `/ai-engineering-loop [task]`
|
|
46
46
|
|
|
47
47
|
1. Stage 0: `npx ai-engineering-loop sync-hosts` then `npx ai-engineering-loop status` (init/refresh if missing or stale). Read `.ai-engineering-loop/glossary.md`. If sync-hosts copied files, tell the user a new session is needed for updated skill text; keep going with this session.
|
|
48
|
-
2. Stage 1: Goal Contract (`core/goal-contract.md`). If the user asks for ideas, list a short menu and wait; do not implement. If the task is ambiguous and the user can answer, grill first (`core/grill-policy.md`): design tree, recommended answers, do not ask look-up facts. Skip grill if the contract is already frozen or the user waived it. On `adapter_type: dot`,
|
|
49
|
-
3. Stages 2–4: Maker work in the **parent**. Bugs: red repro first (`core/root-cause-analysis.md`). Features: TDD at named seams (`policies/tdd-policy.md`). Surgical diff. Parent may be the Maker; do not spawn Maker as a child if you still need to spawn DA/Judge afterward from the same parent.
|
|
48
|
+
2. Stage 1: Goal Contract (`core/goal-contract.md`). If the user asks for ideas, list a short menu and wait; do not implement. If the task is ambiguous and the user can answer, grill first (`core/grill-policy.md`): design tree, recommended answers, do not ask look-up facts. Skip grill if the contract is already frozen or the user waived it. On business-logic change, and always on `adapter_type: dot`, grill includes blast radius: lifecycle sketch, four pillars (state, sibling, approval, queues), ASCII picture. Load `task-impact-inquiry` if present. Do not run a second interview. Passing unit tests are not isolation proof. Chat agreement is not freeze: every user-visible decision must be a numbered AC in the Goal Contract file. Freeze before any production edit. Name test seams. Use glossary terms. AC is a failure table (happy, empty/omit, boundary, sibling, error). One red test per AC row. Do not freeze sunny-path-only.
|
|
49
|
+
3. Stages 2–4: Maker work in the **parent**. Bugs: red repro first (`core/root-cause-analysis.md`). Features: TDD at named seams (`policies/tdd-policy.md`): one red test per AC row. Surgical diff. Parent may be the Maker; do not spawn Maker as a child if you still need to spawn DA/Judge afterward from the same parent.
|
|
50
50
|
4. Stage 5: run verification from `.ai-engineering-loop/verification.md`. Keep command, exit code, stdout, test counts. Vague "seems green" is invalid.
|
|
51
51
|
5. Write artifacts to disk so children do not need parent chat:
|
|
52
52
|
- Goal Contract path
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
[](https://github.com/egagofur/ai-engineering-loop/pulls)
|
|
8
8
|
[](https://github.com/egagofur/ai-engineering-loop)
|
|
9
|
-
[](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
|
|
|
@@ -64,10 +64,10 @@ The 8-stage loop stays one OS. These techniques sit **inside** existing stages (
|
|
|
64
64
|
|
|
65
65
|
| Stage | Technique | Spec |
|
|
66
66
|
|---|---|---|
|
|
67
|
-
| 1 | Grill until the design-tree frontier is empty, then freeze the Goal Contract. Idea requests: menu, wait, then grill the pick. Chat `setuju` is not freeze; user-visible decisions must be numbered AC in the contract file. | `core/grill-policy.md` |
|
|
67
|
+
| 1 | Grill until the design-tree frontier is empty, then freeze the Goal Contract. Idea requests: menu, wait, then grill the pick. Chat `setuju` is not freeze; user-visible decisions must be numbered AC in the contract file. AC is a **failure table** (happy, empty/omit, boundary, sibling, error), not sunny path only. Business-logic change: **blast radius** (lifecycle sketch, four pillars, ASCII picture) via `task-impact-inquiry` inside grill — not a second loop. Passing unit tests are not isolation proof. | `core/grill-policy.md` |
|
|
68
68
|
| 1 | Ubiquitous language in `.ai-engineering-loop/glossary.md`; load-bearing choices in `.ai-engineering-loop/adrs/` | `core/repo-config-schema.md` |
|
|
69
69
|
| 2 | Bugs: red repro → minimise → hypothesise → instrument → fix | `core/root-cause-analysis.md` |
|
|
70
|
-
| 4–5 | Red-green at named **seams**;
|
|
70
|
+
| 4–5 | Red-green at named **seams**; failure table (not happy path only); coverage is a map; no grep/tautology | `policies/tdd-policy.md` |
|
|
71
71
|
| 6–7 | Spec vs Standards reported separately. Standards BLOCKER/HIGH iterate only when `hardConvention` is true | `policies/finding-policy.md` |
|
|
72
72
|
| any | Mid-loop stop writes `.ai-engineering-loop/tasks/handoff.md` | `core/handoff-policy.md` |
|
|
73
73
|
|
|
@@ -182,7 +182,7 @@ npx ai-engineering-loop run
|
|
|
182
182
|
npx ai-engineering-loop sync-hosts
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
-
`sync-hosts` updates only hosts that already exist on the machine. DOT skills (`dot-dev-skill-router`, `dot-dev-workflow`) are updated only if they are already installed.
|
|
185
|
+
`sync-hosts` updates only hosts that already exist on the machine. DOT skills (`dot-dev-skill-router`, `dot-dev-workflow`) are updated only if they are already installed. `task-impact-inquiry` is upserted onto Claude, Grok, and Gemini so blast-radius grill is available on those hosts. After a copy, start a new session so the host reloads skill text. `/ai-engineering-loop` Stage 0 and `run` call `sync-hosts` so a published package bump reaches global host files without a manual copy.
|
|
186
186
|
|
|
187
187
|
---
|
|
188
188
|
|
package/adapters/dot/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## 1. Overview & Architecture
|
|
4
4
|
|
|
5
|
-
The **DOT Delivery Adapter** connects the generic [AI Engineering Loop](
|
|
5
|
+
The **DOT Delivery Adapter** connects the generic [AI Engineering Loop](../../README.md) to DOT's delivery tools (GitLab, multi-branch, Coreview, Mattermost).
|
|
6
6
|
|
|
7
7
|
The generic engineering loop guarantees that code is correct, verified, and adversarially tested. The DOT adapter is responsible for downstream release engineering, collaboration tools, issue tracking, and multi-environment synchronization.
|
|
8
8
|
|
|
@@ -27,18 +27,18 @@ flowchart TD
|
|
|
27
27
|
|
|
28
28
|
The DOT adapter is organized into four dedicated specification modules:
|
|
29
29
|
|
|
30
|
-
1. **[GitLab Integration (`gitlab.md`)](
|
|
30
|
+
1. **[GitLab Integration (`gitlab.md`)](gitlab.md)**:
|
|
31
31
|
- CLI automation with `glab`.
|
|
32
32
|
- Standardized issue card templates with actual vs expected tables and QA testing steps.
|
|
33
33
|
- Standardized MR descriptions linking issue IDs and change summaries.
|
|
34
|
-
2. **[Multi-Branch Propagation (`multi-branch.md`)](
|
|
34
|
+
2. **[Multi-Branch Propagation (`multi-branch.md`)](multi-branch.md)**:
|
|
35
35
|
- Multi-environment branching model across `main`, `staging`, and `develop`.
|
|
36
36
|
- Clean cherry-picking workflow and target-specific test verification.
|
|
37
|
-
3. **[Coreview External Reviewer Triage (`coreview.md`)](
|
|
37
|
+
3. **[Coreview External Reviewer Triage (`coreview.md`)](coreview.md)**:
|
|
38
38
|
- Ingestion of `@coreview-bot` automated PR comments.
|
|
39
39
|
- Mandatory Phase 8 Triage reporting gate before Mattermost dispatch.
|
|
40
40
|
- Rigorous evaluation of bot suggestions into `VALID` (fix & propagate) vs `HALU` (false positive pushback) using principles from `gitlab-mr-feedback` and `receiving-code-review`.
|
|
41
|
-
4. **[Mattermost Notifications (`mattermost.md`)](
|
|
41
|
+
4. **[Mattermost Notifications (`mattermost.md`)](mattermost.md)**:
|
|
42
42
|
- Repository-to-channel resolution using persistent configuration.
|
|
43
43
|
- MCP `mattermost_send_message` dispatch with mandatory `from: "AI Agent"` attribution.
|
|
44
44
|
- Environment-tagged Markdown blocks (`[MR DEV]`, `[MR STAGING]`, `[MR MAIN]`) formatted with strict **`no-ai-slop`** human-written standards.
|
|
@@ -47,7 +47,7 @@ The DOT adapter is organized into four dedicated specification modules:
|
|
|
47
47
|
|
|
48
48
|
## 3. Official DOT Engineering Skills Integration
|
|
49
49
|
|
|
50
|
-
This adapter composes the DOT skill suite
|
|
50
|
+
This adapter composes the DOT skill suite. `task-impact-inquiry` ships in this package (`adapters/dot/skills/task-impact-inquiry/`) and `sync-hosts` upserts it to Claude, Grok, and Gemini. Other DOT skills (router, workflow) still update-if-exists only.
|
|
51
51
|
|
|
52
52
|
On a DOT repo (`adapter_type: dot`), **run `ai-engineering-loop`**, not the old 9-phase `dot-dev-workflow`, as the engineering OS. Stage 1 grill **includes** `task-impact-inquiry`. Do not run a second interview. After Judge `PASS`, Stage 8 is `dot-dev-workflow` delivery (GitLab, cherry-pick, Coreview, Mattermost). Canonical copies: `adapters/dot/skills/`. See `core/grill-policy.md`.
|
|
53
53
|
|
|
@@ -56,7 +56,7 @@ On a DOT repo (`adapter_type: dot`), **run `ai-engineering-loop`**, not the old
|
|
|
56
56
|
| **`ai-engineering-loop`** | Engineering OS (Stages 0-7). Use this for DOT bugfix/feature/refactor. |
|
|
57
57
|
| **`dot-dev-workflow`** | Stage 8 delivery only after Judge PASS. Not a parallel engineering loop. |
|
|
58
58
|
| **`dot-dev-skill-router`** | Routes commit-bound DOT work to `ai-engineering-loop`, then Stage 8. |
|
|
59
|
-
| **`task-impact-inquiry`** |
|
|
59
|
+
| **`task-impact-inquiry`** | Business blast radius (lifecycle sketch, four pillars, ASCII picture). Canonical: `adapters/dot/skills/task-impact-inquiry/`. Host copies: `~/.claude/skills/`, `~/.grok/skills/`, `~/.gemini/config/skills/`. Fills Stage 1 grill; impact-only stops after the matrix. Not a parallel OS. |
|
|
60
60
|
| **`backend-development`** | Framework-agnostic backend guidelines (clean naming, database queries, security, error handling). |
|
|
61
61
|
| **`backend-safety-guardrails`** | 6 architectural backend safety invariants (queue bypass, BigInt, status recalculation loops). |
|
|
62
62
|
| **`devils-advocate`** | Legacy DOT pre-commit skill. On AEL, Stages 6-7 are package Devil's Advocate + Judge. Do not re-run this skill after Judge PASS. |
|
|
@@ -73,7 +73,7 @@ On a DOT repo (`adapter_type: dot`), **run `ai-engineering-loop`**, not the old
|
|
|
73
73
|
| Generic Core Responsibility | DOT Adapter Responsibility |
|
|
74
74
|
|---|---|
|
|
75
75
|
| Goal Contract & Acceptance Criteria | GitLab Issue Card drafting |
|
|
76
|
-
| Unit testing, typecheck, lint, build |
|
|
76
|
+
| Unit testing, typecheck, lint, build | Commands from `.ai-engineering-loop/verification.md` |
|
|
77
77
|
| Internal Devil's Advocate Review | External `@coreview-bot` triage on GitLab MRs |
|
|
78
78
|
| Judge verdict & completion certificate | Multi-environment cherry-picking & branch synchronization |
|
|
79
79
|
| Evidence collection & finding logs | Mattermost channel notifications & MR link delivery |
|
package/adapters/dot/coreview.md
CHANGED
|
@@ -67,7 +67,8 @@ Every Coreview comment must be categorized into one of two paths:
|
|
|
67
67
|
1. Apply the fix surgically to the local working branch.
|
|
68
68
|
2. Re-run all unit tests and static analysis:
|
|
69
69
|
```bash
|
|
70
|
-
|
|
70
|
+
# commands from .ai-engineering-loop/verification.md
|
|
71
|
+
npx jest
|
|
71
72
|
npx tsc --noEmit
|
|
72
73
|
```
|
|
73
74
|
3. Commit and push the fix to the branch:
|
|
@@ -104,4 +105,4 @@ Every Coreview comment must be categorized into one of two paths:
|
|
|
104
105
|
|
|
105
106
|
## 5. Anti-Pattern: Blind Compliance
|
|
106
107
|
|
|
107
|
-
Agents must **never** rewrite working, verified code solely because an automated review bot posted a comment. If the bot's suggestion violates the [Goal Contract](
|
|
108
|
+
Agents must **never** rewrite working, verified code solely because an automated review bot posted a comment. If the bot's suggestion violates the [Goal Contract](../../core/goal-contract.md) or introduces broken dependencies, it MUST be triaged as `HALU` with evidence.
|
package/adapters/dot/gitlab.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## 1. Purpose & Scope
|
|
4
4
|
|
|
5
|
-
This module encapsulates
|
|
5
|
+
This module encapsulates GitLab operations for the DOT adapter. Once a change has passed the [generic AI Engineering Loop](../../README.md), this adapter automates issue tracking and Merge Request (MR) generation via the `glab` CLI.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -54,7 +54,7 @@ flowchart TD
|
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
### B. Create Standardized Issue Card
|
|
57
|
-
If no issue exists, create one in the
|
|
57
|
+
If no issue exists, create one in the current repository (or the tracker named in `.ai-engineering-loop/adapter.md`):
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
60
|
glab issue create \
|
|
@@ -79,7 +79,7 @@ glab issue create \
|
|
|
79
79
|
## Testing Steps
|
|
80
80
|
1. Login as [User Role / Email].
|
|
81
81
|
2. Navigate to [Target Menu / URL].
|
|
82
|
-
3. Perform [Action e.g. submit
|
|
82
|
+
3. Perform [Action e.g. submit the form, approve the request].
|
|
83
83
|
4. Verify [Expected Result].
|
|
84
84
|
|
|
85
85
|
## Expectation
|
|
@@ -2,74 +2,70 @@
|
|
|
2
2
|
|
|
3
3
|
## 1. Overview & Objectives
|
|
4
4
|
|
|
5
|
-
The **Mattermost Notification Module** formats final release notes and
|
|
5
|
+
The **Mattermost Notification Module** formats final release notes and delivers them to team channels via the Mattermost MCP server or CLI.
|
|
6
6
|
|
|
7
|
-
This
|
|
7
|
+
This gives QA, product, and reviewers visibility when the delivery pipeline finishes.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
## 2. Channel Resolution & Dispatch Flow
|
|
12
12
|
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Found -->|Yes| Dispatch[Dispatch via MCP mattermost_send_message]
|
|
20
|
-
Found -->|No| PromptUser[Ask User for Target Channel]
|
|
21
|
-
|
|
22
|
-
PromptUser --> SaveMap[Save New Channel to mattermost-channel-mapping.json]
|
|
23
|
-
SaveMap --> Dispatch
|
|
24
|
-
|
|
25
|
-
Dispatch --> CheckMCP{MCP Success?}
|
|
26
|
-
CheckMCP -->|Yes| Done([Notification Complete])
|
|
27
|
-
CheckMCP -->|No / Failed| FallbackCLI[Fallback to Mattermost Agent CLI]
|
|
28
|
-
FallbackCLI --> Done
|
|
13
|
+
```text
|
|
14
|
+
MRs created
|
|
15
|
+
-> read ~/.gemini/config/mattermost-channel-mapping.json
|
|
16
|
+
-> channel found -> MCP mattermost_send_message
|
|
17
|
+
-> channel missing -> ask user, save mapping, then send
|
|
18
|
+
-> if MCP fails -> Mattermost agent CLI once
|
|
29
19
|
```
|
|
30
20
|
|
|
21
|
+
Do not hard-code a machine path. The mapping file lives under the user's home directory.
|
|
22
|
+
|
|
31
23
|
---
|
|
32
24
|
|
|
33
25
|
## 3. Mandatory Attribution Rule
|
|
34
26
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
27
|
+
When sending messages or replying to threads (MCP or CLI):
|
|
28
|
+
|
|
29
|
+
- Always set sender attribution (`from: "AI Agent"`) in MCP calls:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"channel": "<team-channel>",
|
|
34
|
+
"message": "...",
|
|
35
|
+
"from": "AI Agent"
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- Always pass `--from "AI Agent"` on the CLI:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
<mattermost-cli> send <channel> "<message>" --from "AI Agent"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Resolve the CLI from PATH or the command the user already uses. Do not embed another developer's local checkout.
|
|
50
46
|
|
|
51
47
|
---
|
|
52
48
|
|
|
53
49
|
## 4. Channel Resolution Logic
|
|
54
50
|
|
|
55
|
-
1. **Inspect
|
|
56
|
-
Read
|
|
57
|
-
2. **Channel
|
|
58
|
-
Dispatch
|
|
59
|
-
3. **Channel
|
|
60
|
-
-
|
|
61
|
-
- Ask the user
|
|
62
|
-
-
|
|
51
|
+
1. **Inspect mapping file**:
|
|
52
|
+
Read `~/.gemini/config/mattermost-channel-mapping.json` using the current repository name or `git` remote slug (`<group>/<repo>`).
|
|
53
|
+
2. **Channel found**:
|
|
54
|
+
Dispatch to that channel name.
|
|
55
|
+
3. **Channel unknown**:
|
|
56
|
+
- Do not guess or broadcast.
|
|
57
|
+
- Ask the user for the channel for this repository.
|
|
58
|
+
- Persist the answer in `~/.gemini/config/mattermost-channel-mapping.json`.
|
|
63
59
|
|
|
64
60
|
---
|
|
65
61
|
|
|
66
62
|
## 5. Standardized Mattermost Markdown Report Format (No AI Slop + Human-Written + PIC at End)
|
|
67
63
|
|
|
68
|
-
Render
|
|
64
|
+
Render a ready-to-copy block per Merge Request:
|
|
69
65
|
|
|
70
66
|
```text
|
|
71
67
|
[MR <ENV_TAG>] <MR_URL>
|
|
72
|
-
Changes log
|
|
68
|
+
Changes log
|
|
73
69
|
- <Poin 1: Apa yang diperbaiki / fitur apa yang aktif>
|
|
74
70
|
- <Poin 2: Perubahan mekanisme/perilaku sistem secara gamblang>
|
|
75
71
|
- <Poin 3: Proteksi regresi atau pengujian yang ditambahkan>
|
|
@@ -78,37 +74,29 @@ cc: <PIC>
|
|
|
78
74
|
```
|
|
79
75
|
|
|
80
76
|
### Formatting & Writing Rules (Prinsip `no-ai-slop`):
|
|
81
|
-
|
|
82
|
-
- **
|
|
83
|
-
- **
|
|
84
|
-
- **
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
77
|
+
|
|
78
|
+
- **No markdown headings** (`#`, `##`, `###`): plain text so Mattermost does not enlarge fonts.
|
|
79
|
+
- **No long metadata tables** (branch, repo, verification). MR link + Changes log only.
|
|
80
|
+
- **PIC on the last line**: from the mapping file. If missing, ask and save. `cc: <PIC>`.
|
|
81
|
+
- **Concrete human language**:
|
|
82
|
+
- Start with an active verb: *"Memperbaiki..."*, *"Memigrasikan..."*, *"Menjaga..."*, *"Menambahkan..."*, *"Mengubah..."*.
|
|
83
|
+
- No puffery: `secara komprehensif`, `memastikan keakuratan`, `memfasilitasi`, `menyelaraskan alur`, `mengoptimalkan proses`, `solusi yang kokoh/robust`, `meningkatkan efisiensi`, `telah berhasil diimplementasikan`.
|
|
84
|
+
- No raw code / AST: do not name internal fields, queries, or ORM calls. Describe the user-visible change.
|
|
88
85
|
|
|
89
86
|
### Environment Tags:
|
|
90
|
-
- `[MR DEV]`: Merge Request targeting `develop`.
|
|
91
|
-
- `[MR STAGING]`: Merge Request targeting `staging`.
|
|
92
|
-
- `[MR MAIN]` (or `[MR PROD]`): Merge Request targeting `main` / `master`.
|
|
93
87
|
|
|
94
|
-
|
|
88
|
+
- `[MR DEV]`: `develop`
|
|
89
|
+
- `[MR STAGING]`: `staging`
|
|
90
|
+
- `[MR MAIN]` (or `[MR PROD]`): `main` / `master`
|
|
91
|
+
|
|
92
|
+
### Fictional sample (do not replace with a real ticket):
|
|
95
93
|
|
|
96
94
|
```text
|
|
97
|
-
[MR DEV] https://gitlab.
|
|
98
|
-
Changes log
|
|
99
|
-
- Memperbaiki
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
cc: @hanaaaca
|
|
105
|
-
|
|
106
|
-
[MR DEV] https://gitlab.dot.co.id/dot-system/dotify-new/-/merge_requests/963
|
|
107
|
-
Changes log
|
|
108
|
-
- Mengubah status entitas yang tadinya APPROVED menjadi NEED APPROVAL otomatis saat project atau jam kerjanya diedit.
|
|
109
|
-
- Memperbaiki sinkronisasi worker agar periode absensi berjalan (UNCONFIRMED) tetap diproses saat admin mengedit data.
|
|
110
|
-
- Menjaga entitas lain yang sudah disetujui PM di periode yang sama agar status approval-nya tidak ter-reset.
|
|
111
|
-
- Menambahkan unit test untuk skenario lembur multi-entry harian.
|
|
112
|
-
|
|
113
|
-
cc: @ulfa.mufida
|
|
95
|
+
[MR DEV] https://gitlab.example.com/example-org/work-portal/-/merge_requests/12
|
|
96
|
+
Changes log
|
|
97
|
+
- Memperbaiki status kartu di daftar request yang masih PENDING padahal semua baris sudah disetujui.
|
|
98
|
+
- Menjaga request lain di periode yang sama agar approval-nya tidak ter-reset.
|
|
99
|
+
- Menambahkan unit test untuk hari libur, jendela non-standar, dan koleksi baris yang kosong.
|
|
100
|
+
|
|
101
|
+
cc: @owner
|
|
114
102
|
```
|
|
@@ -53,7 +53,8 @@ git checkout -b <branch-name>-<target-env> origin/<target-env>
|
|
|
53
53
|
git cherry-pick <commit-hash>
|
|
54
54
|
|
|
55
55
|
# 4. Resolve any target-specific differences and verify tests pass
|
|
56
|
-
|
|
56
|
+
# commands from .ai-engineering-loop/verification.md
|
|
57
|
+
npx jest
|
|
57
58
|
npx tsc --noEmit
|
|
58
59
|
|
|
59
60
|
# 5. Push the branch to remote
|
|
@@ -75,7 +76,7 @@ glab mr create \
|
|
|
75
76
|
## 3. Conflict & Environment Discrepancy Handling
|
|
76
77
|
|
|
77
78
|
1. **Clean Cherry-Picks**:
|
|
78
|
-
Because the [
|
|
79
|
+
Because the [generic AI Engineering Loop](../../README.md) enforces surgical, minimal diffs, cherry-picking should be clean in >95% of cases.
|
|
79
80
|
2. **Merge Conflicts**:
|
|
80
81
|
If a merge conflict occurs due to divergent code between `main` and `develop`:
|
|
81
82
|
- Resolve the conflict surgically preserving the fix semantics.
|
|
@@ -32,7 +32,7 @@ While AEL Maker runs, still enforce:
|
|
|
32
32
|
|
|
33
33
|
- `backend-development` for naming, queries, layering.
|
|
34
34
|
- `backend-safety-guardrails` on mutations, jobs, recalculation: never bypass BullMQ; scope by entity id not coarse date strings; never overwrite `APPROVED`/`REJECTED` without explicit force; BigInt as string across boundaries; container moves sync old and new parents.
|
|
35
|
-
- Tests:
|
|
35
|
+
- Tests: commands in `.ai-engineering-loop/verification.md` (fallback `npx jest && npx tsc --noEmit`).
|
|
36
36
|
- Branch from a clean target (`main`, `staging`, or `develop`), then `git checkout -b <type>/<descriptive-name>`.
|
|
37
37
|
|
|
38
38
|
Print these six invariants before commit (N/A allowed only with one sentence citing the diff):
|
|
@@ -97,7 +97,7 @@ glab api "projects/:fullpath/merge_requests/<mr-id>/discussions/<discussion_id>/
|
|
|
97
97
|
|
|
98
98
|
Follow `adapters/dot/mattermost.md` when present.
|
|
99
99
|
|
|
100
|
-
1. Resolve channel and PIC from
|
|
100
|
+
1. Resolve channel and PIC from `~/.gemini/config/mattermost-channel-mapping.json`. If PIC is missing, ask the user and save it.
|
|
101
101
|
2. Send via MCP `mattermost_send_message` with `from: "AI Agent"`. Use the Mattermost CLI only if MCP fails. Do not send twice.
|
|
102
102
|
3. Put `cc: <PIC>` on the last line.
|
|
103
103
|
|