ai-engineering-loop 1.0.19 → 1.0.21

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.
@@ -17,4 +17,4 @@ If `invoke_subagent` (or Task) exists, spawn `devil-advocate` then `judge` as si
17
17
 
18
18
  If no subagent tool exists, run the same budgets in this session as CONTEXT_ISOLATION_ONLY. Do not claim independent agent execution.
19
19
 
20
- Init/status/refresh/sync-hosts/generate-adapter/generate-workflow: `npx ai-engineering-loop <command>`. generate-workflow grills Q1-Q6. Q6 Maker intern: pick from the host catalog (`grok models` or `/models` if that command exists); do not type a model name. Stage 0: `npx ai-engineering-loop sync-hosts` then `npx ai-engineering-loop status`. Read `.ai-engineering-loop/glossary.md`. Read `.ai-engineering-loop/lessons.md` and `.ai-engineering-loop/workflow.md` if they exist. Follow workflow.md hooks (`before_grill`, `after_freeze`, `after_pass`). Do not skip Goal Contract, verification, Devil's Advocate, or Judge even if workflow.md asks. If workflow.md is missing, run the default 8-stage loop (no extra hooks). If sync-hosts copied files, tell the user a new session is needed for updated skill text; keep going with this session. After Judge PASS: run the `after_pass` hook if it is not `none`. Stage 8: load `adapters/<adapter_type>/`. If adapter.md is missing, run `generate-adapter` (grill). Do not invent a company pipeline. Confirmed process lessons go to `lessons.md`, not a chat dump.
20
+ Init/status/refresh/sync-hosts/generate-adapter/generate-workflow: `npx ai-engineering-loop <command>`. generate-workflow grills Q1-Q6. Q6 Maker intern: pick from the host catalog (`grok models` or `/models` if that command exists); do not type a model name. Stage 0: `npx ai-engineering-loop sync-hosts` then `npx ai-engineering-loop status`. Read `.ai-engineering-loop/glossary.md`. Read `.ai-engineering-loop/lessons.md` and `.ai-engineering-loop/workflow.md` if they exist. Follow workflow.md hooks (`before_grill`, `after_freeze`, `after_pass`). Do not skip Goal Contract, verification, Devil's Advocate, or Judge even if workflow.md asks. If workflow.md is missing, run the default 8-stage loop (no extra hooks). If sync-hosts copied files, tell the user a new session is needed for updated skill text; keep going with this session. After Judge PASS: run the `after_pass` hook if it is not `none`. Stage 8: load `adapters/<adapter_type>/`. If adapter.md is missing, run `generate-adapter` (grill). Do not invent a company pipeline. PR/MR body must include `Steps to Reproduce & Testing (QA)` from the adapter (reproduce + how to test). On a bugfix, do not leave those placeholders empty. Confirmed process lessons go to `lessons.md`, not a chat dump.
@@ -48,7 +48,7 @@ Parent session is Maker plus orchestrator. Spawn Devil's Advocate and Judge as *
48
48
  6. Stage 6: Task `subagent_type: devil-advocate`. Use `general-purpose` only if that type is rejected. If the Task schema includes `run_in_background`, set it false. Then wait for Task to return. Do not start Judge or more Maker work until the Finding Ledger is back. Prompt: diff file path, name-only list, Goal Contract path, verification log path, conventions.md path, and "at most 8 tool calls; read the diff file; skip css and generated files". Report Spec and Standards axes separately.
49
49
  7. Stage 7: Task `subagent_type: judge` the same way (wait, no background). Use `general-purpose` only if `judge` is rejected. Prompt: Goal Contract path, verification evidence path, Finding Ledger, and "at most 4 tool calls; ledger and contract only; skip css; do not re-review the whole diff".
50
50
  8. ITERATE with iteration under 3: fix in the parent, re-verify, spawn a **new** Devil's Advocate (do not resume the previous child).
51
- 9. After Judge PASS: run the `after_pass` hook from workflow.md if it is not `none`. Then Stage 8: delivery from `.ai-engineering-loop/adapter.md`. Load shipped spec `adapters/<adapter_type>/` (`standard`, `github`, `gitlab`, `dot`). If adapter.md is missing or the type is unknown, run `generate-adapter` (grill). Do not invent a company pipeline. When the user confirms a process lesson, append one row to `lessons.md` (not a chat dump). Terms go to glossary.md.
51
+ 9. After Judge PASS: run the `after_pass` hook from workflow.md if it is not `none`. Then Stage 8: delivery from `.ai-engineering-loop/adapter.md`. Load shipped spec `adapters/<adapter_type>/` (`standard`, `github`, `gitlab`, `dot`). If adapter.md is missing or the type is unknown, run `generate-adapter` (grill). Do not invent a company pipeline. PR/MR body must include `Steps to Reproduce & Testing (QA)` from the adapter (reproduce + how to test). On a bugfix, do not leave those placeholders empty. When the user confirms a process lesson, append one row to `lessons.md` (not a chat dump). Terms go to glossary.md.
52
52
 
53
53
  ## Report header
54
54
 
@@ -41,7 +41,7 @@ Compact map (not a second OS): Specify (stages 0-1), Make (stages 2-4), Review (
41
41
  6. Stage 6: spawn `devil-advocate`. Wait. Prompt: diff file path, name-only list, Goal Contract path, verification log path, conventions.md path, and "at most 8 tool calls; read the diff file; skip css and generated files". Report Spec and Standards axes separately.
42
42
  7. Stage 7: spawn `judge` the same way (wait, no background). Prompt: Goal Contract path, verification evidence path, Finding Ledger, and "at most 4 tool calls; ledger and contract only; skip css; do not re-review the whole diff".
43
43
  8. ITERATE with iteration under 3: fix in the parent, re-verify, spawn a **new** Devil's Advocate.
44
- 9. After Judge PASS: run the `after_pass` hook from workflow.md if it is not `none`. Then Stage 8: delivery from `.ai-engineering-loop/adapter.md`. Load shipped spec `adapters/<adapter_type>/` (`standard`, `github`, `gitlab`, `dot`). If adapter.md is missing or the type is unknown, run `generate-adapter` (grill). Do not invent a company pipeline. When the user confirms a process lesson, append one row to `lessons.md` (not a chat dump). Terms go to glossary.md.
44
+ 9. After Judge PASS: run the `after_pass` hook from workflow.md if it is not `none`. Then Stage 8: delivery from `.ai-engineering-loop/adapter.md`. Load shipped spec `adapters/<adapter_type>/` (`standard`, `github`, `gitlab`, `dot`). If adapter.md is missing or the type is unknown, run `generate-adapter` (grill). Do not invent a company pipeline. PR/MR body must include `Steps to Reproduce & Testing (QA)` from the adapter (reproduce + how to test). On a bugfix, do not leave those placeholders empty. When the user confirms a process lesson, append one row to `lessons.md` (not a chat dump). Terms go to glossary.md.
45
45
 
46
46
  ## Report header
47
47
 
@@ -59,7 +59,7 @@ Compact map (not a second OS): Specify (stages 0-1), Make (stages 2-4), Review (
59
59
  6. Stage 6: `spawn_subagent` Devil's Advocate. `background: false`. `capability_mode: "execute"`. Do **not** pass `resume_from`. Wait for the child. Prompt: diff file path, name-only file list, Goal Contract path, verification log path, conventions.md path, plus "at most 8 tool calls; read the diff file; skip css and generated files". Report Spec and Standards axes separately.
60
60
  7. Stage 7: `spawn_subagent` Judge the same way (`background: false`, wait). Use `general-purpose` only if `judge` is rejected. Prompt: Goal Contract path, verification evidence path, Finding Ledger, and "at most 4 tool calls; ledger and contract only; skip css; do not re-review the whole diff".
61
61
  8. If Judge says `ITERATE` and iteration < 3, Maker fixes in the parent, re-verify, spawn a **fresh** DA (new spawn, no resume).
62
- 9. After Judge PASS: run the `after_pass` hook from workflow.md if it is not `none`. Then Stage 8: delivery from `.ai-engineering-loop/adapter.md`. Load shipped spec `adapters/<adapter_type>/` (`standard`, `github`, `gitlab`, `dot`). If adapter.md is missing or the type is unknown, run `generate-adapter` (grill). Do not invent a company pipeline. When the user confirms a process lesson, append one row to `lessons.md` (not a chat dump). Terms go to glossary.md.
62
+ 9. After Judge PASS: run the `after_pass` hook from workflow.md if it is not `none`. Then Stage 8: delivery from `.ai-engineering-loop/adapter.md`. Load shipped spec `adapters/<adapter_type>/` (`standard`, `github`, `gitlab`, `dot`). If adapter.md is missing or the type is unknown, run `generate-adapter` (grill). Do not invent a company pipeline. PR/MR body must include `Steps to Reproduce & Testing (QA)` from the adapter (reproduce + how to test). On a bugfix, do not leave those placeholders empty. When the user confirms a process lesson, append one row to `lessons.md` (not a chat dump). Terms go to glossary.md.
63
63
 
64
64
  After a proven Grok DA spawn, the report header must be:
65
65
 
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.19-purple.svg)](https://github.com/egagofur/ai-engineering-loop/releases)
9
+ [![Release](https://img.shields.io/badge/release-v1.0.21-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
 
@@ -14,10 +14,12 @@ flowchart TD
14
14
 
15
15
  subgraph DOTAdapter [DOT Delivery Pipeline]
16
16
  PASS --> Issue[1. GitLab Issue Card via glab]
17
- Issue --> BaseMR[2. Base Merge Request via glab]
18
- BaseMR --> MultiBranch[3. Multi-Branch Cherry-Pick: staging & develop]
19
- MultiBranch --> CoreviewTriage[4. External @coreview-bot Review Triage]
20
- CoreviewTriage --> MattermostDispatch[5. Mattermost Markdown Notification via MCP]
17
+ Issue --> BaseMR[2. One Merge Request via glab]
18
+ BaseMR --> AskPropagate{User named extra envs this turn?}
19
+ AskPropagate -->|No| CoreviewTriage[3. External @coreview-bot Review Triage]
20
+ AskPropagate -->|Yes| MultiBranch[Optional cherry-pick staging / develop]
21
+ MultiBranch --> CoreviewTriage
22
+ CoreviewTriage --> MattermostDispatch[4. Mattermost Markdown Notification via MCP]
21
23
  end
22
24
  ```
23
25
 
@@ -31,13 +33,15 @@ The DOT adapter is organized into four dedicated specification modules:
31
33
  - CLI automation with `glab`.
32
34
  - Standardized issue card templates with actual vs expected tables and QA testing steps.
33
35
  - Standardized MR descriptions linking issue IDs and change summaries.
34
- 2. **[Multi-Branch Propagation (`multi-branch.md`)](multi-branch.md)**:
35
- - Multi-environment branching model across `main`, `staging`, and `develop`.
36
- - Clean cherry-picking workflow and target-specific test verification.
36
+ 2. **[Topic branch and optional propagate (`multi-branch.md`)](multi-branch.md)**:
37
+ - Unrelated HEAD (`main` / `develop` / `staging` / other ticket): new `type/name` branch.
38
+ - Related `feat/…` or `fix/…`: stay. One MR. Do not open three MRs.
39
+ - Base: `origin/develop` when develop is in use (default branch is `develop`), including when HEAD is `main`. HEAD being `main` does not override an in-use `develop` default. `origin/main` only when develop is unused leftover (default branch is `main` / `master`). Do not force leftover develop.
40
+ - Cherry-pick extra envs only if the user named them this turn. Chat `setuju` is not propagate.
37
41
  3. **[Coreview External Reviewer Triage (`coreview.md`)](coreview.md)**:
38
42
  - Ingestion of `@coreview-bot` automated PR comments.
39
43
  - Mandatory Phase 8 Triage reporting gate before Mattermost dispatch.
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`.
44
+ - Rigorous evaluation of bot suggestions into `VALID` (fix on the same topic MR; do not cherry-pick unless the user named extra envs this turn) vs `HALU` (false positive pushback) using principles from `gitlab-mr-feedback` and `receiving-code-review`.
41
45
  4. **[Mattermost Notifications (`mattermost.md`)](mattermost.md)**:
42
46
  - Repository-to-channel resolution using persistent configuration.
43
47
  - MCP `mattermost_send_message` dispatch with mandatory `from: "AI Agent"` attribution.
@@ -76,11 +76,20 @@ glab issue create \
76
76
  - [x] [Component 2 modified]
77
77
  - [x] [Unit tests added in path/to/test.ts]
78
78
 
79
- ## Testing Steps
80
- 1. Login as [User Role / Email].
81
- 2. Navigate to [Target Menu / URL].
82
- 3. Perform [Action e.g. submit the form, approve the request].
83
- 4. Verify [Expected Result].
79
+ ## Steps to Reproduce & Testing (QA)
80
+ ### Pre-conditions
81
+ - <environment / data / permissions>
82
+ ### Steps to Reproduce
83
+ 1. <action>
84
+ 2. <action that triggers the bug or the new path>
85
+ ### How to Test
86
+ 1. <same path after the fix, or the feature path>
87
+ 2. <what QA should click / call / assert>
88
+ ### Actual Result (before the fix / sebelum fix)
89
+ - <error / status / log — N/A on a pure feature>
90
+ ### Expected Result (after the fix / setelah fix)
91
+ - <normal behaviour / status>
92
+ - <no error popup, no crash, no new error logs>
84
93
 
85
94
  ## Expectation
86
95
  | Kondisi / Skenario | Logika Lama (Sebelum) | Logika Baru (Sesudah) |
@@ -120,6 +129,21 @@ glab mr create \
120
129
  - <Concise point 2 explaining edge cases handled>
121
130
  - <Concise point 3 mentioning unit test coverage>
122
131
 
132
+ ## Steps to Reproduce & Testing (QA)
133
+ ### Pre-conditions
134
+ - <environment / data / permissions>
135
+ ### Steps to Reproduce
136
+ 1. <action>
137
+ 2. <action that triggers the bug or the new path>
138
+ ### How to Test
139
+ 1. <same path after the fix, or the feature path>
140
+ 2. <what QA should click / call / assert>
141
+ ### Actual Result (before the fix / sebelum fix)
142
+ - <error / status / log — N/A on a pure feature>
143
+ ### Expected Result (after the fix / setelah fix)
144
+ - <normal behaviour / status>
145
+ - <no error popup, no crash, no new error logs>
146
+
123
147
  ## Screenshot / Video
124
148
  <!-- Attach screenshots, terminal test logs, or UI captures if available -->
125
149
 
@@ -1,90 +1,69 @@
1
- # DOT Adapter: Multi-Branch Propagation
2
-
3
- ## 1. Overview & Branching Hierarchy
4
-
5
- DOT Indonesia repositories maintain synchronized deployments across multiple environments. A typical repository uses three primary target branches:
6
-
7
- ```mermaid
8
- gitGraph
9
- commit id: "Base"
10
- branch develop
11
- checkout develop
12
- commit id: "Dev Baseline"
13
- branch staging
14
- checkout staging
15
- commit id: "Staging Baseline"
16
- checkout main
17
- commit id: "Main Baseline"
18
-
19
- checkout main
20
- branch fix/attendance-status
21
- commit id: "Fix Commit"
22
- checkout main
23
- merge fix/attendance-status id: "MR MAIN"
24
-
25
- checkout staging
26
- cherry-pick id: "Fix Commit"
27
- checkout develop
28
- cherry-pick id: "Fix Commit"
1
+ # DOT Adapter: Topic branch, base, and optional propagate
2
+
3
+ ## 1. Default: one topic branch, one MR
4
+
5
+ Do not open three MRs. Cherry-pick to `staging` or `develop` is opt-in (section 4).
6
+
7
+ ### Related HEAD — stay
8
+
9
+ HEAD is related when the branch name is `feat/…` or `fix/…` (or the same ticket id) for **this** feature.
10
+
11
+ Stay on that branch. Do not create a new topic branch. Open **one MR** onto the branch it was cut from.
12
+
13
+ ### Unrelated HEAD — new topic branch
14
+
15
+ HEAD is unrelated when it is `main`, `master`, `develop`, `staging`, or another ticket's branch.
16
+
17
+ Create a new `type/descriptive-name` branch from the live integration base (section 2). Then open **one MR** onto that base.
18
+
19
+ ## 2. Pick the base
20
+
21
+ 1. `git fetch origin`
22
+ 2. Default branch: `git remote show origin` → `HEAD branch`.
23
+ 3. Do not `git pull` into the current HEAD. Cut the topic branch from `origin/<base>` so local `main` / leftover `develop` stay untouched.
24
+
25
+ **`develop` is in use** only when the default branch is `develop`. Then always cut the new topic branch from `origin/develop`, even if HEAD is `main`, `staging`, or another ticket. HEAD being `main` does not override an in-use `develop` default:
26
+
27
+ ```bash
28
+ git fetch origin
29
+ git checkout -b <type>/<descriptive-name> origin/develop
30
+ ```
31
+
32
+ **`develop` is unused** (leftover) when the default branch is `main` / `master`, even if `origin/develop` exists and even if HEAD is `develop`. Do not force leftover develop:
33
+
34
+ ```bash
35
+ git fetch origin
36
+ git checkout -b <type>/<descriptive-name> origin/main
29
37
  ```
30
38
 
31
- 1. **`main` / `master`** $\rightarrow$ Production Environment (`[MR MAIN]` / `[MR PROD]`).
32
- 2. **`staging`** $\rightarrow$ Staging / QA Testing Environment (`[MR STAGING]`).
33
- 3. **`develop`** $\rightarrow$ Active Development & Bot Review Environment (`[MR DEV]`).
39
+ (`master` if that is the default.)
40
+
41
+ ## 3. Environments (names only)
34
42
 
35
- ---
43
+ These exist on many DOT remotes. They are **not** automatic MR targets.
36
44
 
37
- ## 2. Multi-Branch Propagation Workflow
45
+ 1. **`main` / `master`** — production (`[MR MAIN]` / `[MR PROD]`).
46
+ 2. **`staging`** — QA (`[MR STAGING]`).
47
+ 3. **`develop`** — integration (`[MR DEV]`).
38
48
 
39
- Once the fix is committed on the source branch and the initial Merge Request is created, propagate the exact fix commit to all secondary environments.
49
+ ## 4. Optional propagate (this turn only)
40
50
 
41
- ### Step-by-Step Execution:
51
+ Do not cherry-pick to `staging` or `develop` unless the user named those branches **this turn** (`propagate`, `3 branch`, `staging dan develop`, `multi-branch`). Chat `setuju` is not propagate. `.ai-engineering-loop/adapter.md` cannot turn this on by itself.
42
52
 
43
- For each secondary target environment (`staging`, `develop`):
53
+ When asked, for each named extra target:
44
54
 
45
55
  ```bash
46
- # 1. Fetch latest changes from remote
47
56
  git fetch origin <target-env>
48
-
49
- # 2. Checkout a new dedicated branch tracking the remote environment
50
57
  git checkout -b <branch-name>-<target-env> origin/<target-env>
51
-
52
- # 3. Cherry-pick the verified fix commit
53
58
  git cherry-pick <commit-hash>
54
-
55
- # 4. Resolve any target-specific differences and verify tests pass
56
59
  # commands from .ai-engineering-loop/verification.md
57
- npx jest
58
- npx tsc --noEmit
59
-
60
- # 5. Push the branch to remote
61
60
  git push -u origin <branch-name>-<target-env>
62
-
63
- # 6. Create the environment-specific Merge Request via glab
64
61
  glab mr create \
65
- --repo <repo> \
66
62
  --source-branch <branch-name>-<target-env> \
67
63
  --target-branch <target-env> \
68
64
  --title "<type>(<scope>): <short description>" \
69
65
  --description "<MR Description Markdown>" \
70
- --assignee <username> \
71
66
  --yes
72
67
  ```
73
68
 
74
- ---
75
-
76
- ## 3. Conflict & Environment Discrepancy Handling
77
-
78
- 1. **Clean Cherry-Picks**:
79
- Because the [generic AI Engineering Loop](../../README.md) enforces surgical, minimal diffs, cherry-picking should be clean in >95% of cases.
80
- 2. **Merge Conflicts**:
81
- If a merge conflict occurs due to divergent code between `main` and `develop`:
82
- - Resolve the conflict surgically preserving the fix semantics.
83
- - Run the full test suite (`npx jest`) to prove correctness on the specific environment.
84
- - Complete the cherry-pick:
85
- ```bash
86
- git add <resolved-files>
87
- git cherry-pick --continue
88
- ```
89
- 3. **Environment-Specific Tests**:
90
- Always execute deterministic test suites (`npx jest`, `npx tsc --noEmit`) on each branch prior to pushing.
69
+ Conflicts: resolve surgically, re-run verification, `git cherry-pick --continue`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dot-dev-workflow
3
- description: DOT Stage 8 delivery after AI Engineering Loop Judge PASS. GitLab issue/MR, multi-branch cherry-pick, Coreview triage, Mattermost. Not a substitute for ai-engineering-loop.
3
+ description: DOT Stage 8 delivery after AI Engineering Loop Judge PASS. GitLab issue/MR, one topic-branch MR (extra env cherry-pick only if named this turn), Coreview triage, Mattermost. Not a substitute for ai-engineering-loop.
4
4
  ---
5
5
 
6
6
  # DOT Delivery Workflow (Stage 8)
@@ -33,7 +33,7 @@ While AEL Maker runs, still enforce:
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
35
  - Tests: commands in `.ai-engineering-loop/verification.md` (fallback `npx jest && npx tsc --noEmit`).
36
- - Branch from a clean target (`main`, `staging`, or `develop`), then `git checkout -b <type>/<descriptive-name>`.
36
+ - Topic branch: if HEAD is already `feat/…` or `fix/…` for this feature, stay on that branch. Do not create a new topic branch. If HEAD is unrelated (`main`, `master`, `develop`, `staging`, other ticket), `git fetch origin`, then `git checkout -b type/descriptive-name origin/develop` when develop is in use (default branch is `develop`). Do not `git pull` into the current HEAD. HEAD being `main` does not override an in-use `develop` default. If develop is unused leftover (default branch is `main` / `master`), `git checkout -b type/descriptive-name origin/main` even if HEAD is `develop`. Do not force leftover develop.
37
37
 
38
38
  Print these six invariants before commit (N/A allowed only with one sentence citing the diff):
39
39
 
@@ -46,7 +46,7 @@ Print these six invariants before commit (N/A allowed only with one sentence cit
46
46
 
47
47
  ---
48
48
 
49
- ## Stage 8a — Multi-branch MR and issue card (`glab`)
49
+ ## Stage 8a — Topic-branch MR and issue card (`glab`)
50
50
 
51
51
  If the workspace has `adapters/dot/gitlab.md` and `adapters/dot/multi-branch.md`, follow those. Otherwise:
52
52
 
@@ -57,11 +57,9 @@ git add <modified-files>
57
57
  git commit -m "<type>(<scope>): <summary>"
58
58
  ```
59
59
 
60
- 2. Create a GitLab issue if none is linked (`glab issue create` with module title, scope checkboxes, testing steps, expectation table, label `Ready to Test`).
60
+ 2. Create a GitLab issue if none is linked (`glab issue create` with module title, scope checkboxes, `Steps to Reproduce & Testing (QA)` from `adapters/dot/gitlab.md`, expectation table, label `Ready to Test`). On a bugfix, do not leave those placeholders empty.
61
61
 
62
- 3. Create the base MR (`glab mr create` onto the target branch, description links the issue).
63
-
64
- 4. Propagate to `staging` and `develop`: fetch, branch from origin, cherry-pick the commit, re-run verification, push, open MR per environment.
62
+ 3. Open **one** MR (`glab mr create` onto the live integration base from the topic-branch rules above; description links the issue). Issue and MR descriptions must include `Steps to Reproduce & Testing (QA)` (reproduce + how to test). On a bugfix, do not leave those placeholders empty. Do not cherry-pick to `staging` or `develop` unless the user named those branches this turn. Chat `setuju` is not propagate. Do not open three MRs.
65
63
 
66
64
  ---
67
65
 
@@ -88,7 +86,7 @@ glab api "projects/:fullpath/merge_requests/<mr-id>/discussions"
88
86
  glab api "projects/:fullpath/merge_requests/<mr-id>/discussions/<discussion_id>/notes" -X POST -F "body=<text>"
89
87
  ```
90
88
 
91
- - VALID: fix surgically, re-verify, commit, propagate, reply with commit hash.
89
+ - VALID: fix surgically, re-verify, commit, push to the same topic MR, reply with commit hash. Do not cherry-pick to `staging` or `develop` unless the user named those branches this turn. Chat `setuju` is not propagate.
92
90
  - HALU: do not change code; reply with file-cited technical pushback.
93
91
 
94
92
  ---
@@ -12,6 +12,21 @@ gh pr create \
12
12
  - <edge cases>
13
13
  - <tests added>
14
14
 
15
+ ## Steps to Reproduce & Testing (QA)
16
+ ### Pre-conditions
17
+ - <environment / data / permissions>
18
+ ### Steps to Reproduce
19
+ 1. <action>
20
+ 2. <action that triggers the bug or the new path>
21
+ ### How to Test
22
+ 1. <same path after the fix, or the feature path>
23
+ 2. <what QA should click / call / assert>
24
+ ### Actual Result (before the fix)
25
+ - <error / status / log — N/A on a pure feature>
26
+ ### Expected Result (after the fix)
27
+ - <normal behaviour / status>
28
+ - <no error popup, no crash, no new error logs>
29
+
15
30
  ## Verification
16
31
  Commands from `.ai-engineering-loop/verification.md` (exit 0).
17
32
  EOF
@@ -14,6 +14,21 @@ glab mr create \
14
14
  - <edge cases>
15
15
  - <tests added>
16
16
 
17
+ ## Steps to Reproduce & Testing (QA)
18
+ ### Pre-conditions
19
+ - <environment / data / permissions>
20
+ ### Steps to Reproduce
21
+ 1. <action>
22
+ 2. <action that triggers the bug or the new path>
23
+ ### How to Test
24
+ 1. <same path after the fix, or the feature path>
25
+ 2. <what QA should click / call / assert>
26
+ ### Actual Result (before the fix)
27
+ - <error / status / log — N/A on a pure feature>
28
+ ### Expected Result (after the fix)
29
+ - <normal behaviour / status>
30
+ - <no error popup, no crash, no new error logs>
31
+
17
32
  ## Verification
18
33
  Commands from `.ai-engineering-loop/verification.md` (exit 0).
19
34
  EOF
@@ -40,5 +40,6 @@ git push -u origin HEAD
40
40
 
41
41
  - One branch, one change request, default branch only.
42
42
  - Link the Goal Contract path in the PR/MR body (not the whole chat).
43
+ - If the human opens a PR/MR, the body must include `Steps to Reproduce & Testing (QA)` from `adapters/github/pull-request.md` or `adapters/gitlab/merge-request.md` (reproduce + how to test).
43
44
  - No secrets, no internal hostnames, no coworker handles in the description.
44
45
  - If the forge CLI is missing, do not install it silently. Tell the user.
@@ -34,7 +34,7 @@ const {
34
34
  lessonsMarkdown
35
35
  } = require('../lib/generate-workflow.js');
36
36
 
37
- const VERSION = '1.0.19';
37
+ const VERSION = '1.0.21';
38
38
  const CWD = process.cwd();
39
39
  const CONTEXT_DIR = path.join(CWD, '.ai-engineering-loop');
40
40
 
@@ -288,7 +288,7 @@ function generateContextFiles(rootDir, discovery, trigger = 'init', impact = 'IN
288
288
 
289
289
  // 0. metadata.json (Baseline)
290
290
  const metadataJson = {
291
- contextVersion: '1.0.19',
291
+ contextVersion: '1.0.21',
292
292
  generatedAt: new Date().toISOString(),
293
293
  repositoryRevision: currentRevision,
294
294
  projectProfile: discovery.profile,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-engineering-loop",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
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": {
@@ -0,0 +1,65 @@
1
+ 'use strict';
2
+
3
+ const test = require('node:test');
4
+ const assert = require('node:assert');
5
+ const fs = require('fs');
6
+ const path = require('path');
7
+
8
+ const ROOT = path.join(__dirname, '..');
9
+
10
+ function readRepo(rel) {
11
+ return fs.readFileSync(path.join(ROOT, rel), 'utf8');
12
+ }
13
+
14
+ const MULTI = 'adapters/dot/multi-branch.md';
15
+ const README = 'adapters/dot/README.md';
16
+ const WORKFLOW = 'adapters/dot/skills/dot-dev-workflow/SKILL.md';
17
+
18
+ test('AC-1 unrelated HEAD and in-use develop: new topic branch from origin/develop after fetch/pull', () => {
19
+ const text = `${readRepo(MULTI)}\n${readRepo(WORKFLOW)}`;
20
+ assert.match(text, /unrelated|not related/i);
21
+ assert.match(text, /git fetch origin/);
22
+ assert.match(text, /origin\/develop/);
23
+ assert.match(text, /git checkout -b/);
24
+ assert.match(text, /Do not `git pull` into the current HEAD/);
25
+ assert.doesNotMatch(readRepo(MULTI), /git pull origin develop/);
26
+ assert.match(text, /HEAD being `main` does not override an in-use `develop` default/);
27
+ });
28
+
29
+ test('AC-2 related feat/fix branch stays; do not create another topic branch or three MRs', () => {
30
+ const text = `${readRepo(MULTI)}\n${readRepo(WORKFLOW)}`;
31
+ assert.match(text, /feat\//);
32
+ assert.match(text, /fix\//);
33
+ assert.match(text, /Stay on that branch|keep the current branch/i);
34
+ assert.match(text, /Do not create a new topic branch/i);
35
+ assert.match(text, /Do not open three MRs|one MR/i);
36
+ });
37
+
38
+ test('AC-3 main or unused leftover develop: new topic branch from origin/main', () => {
39
+ const text = `${readRepo(MULTI)}\n${readRepo(WORKFLOW)}`;
40
+ assert.match(text, /unused leftover/i);
41
+ assert.match(text, /origin\/main/);
42
+ assert.match(text, /Do not force leftover develop/);
43
+ assert.match(text, /even if HEAD is `develop`/);
44
+ });
45
+
46
+ test('AC-4 generic GitHub/GitLab stay non-DOT; extra envs only if adapter.md lists them', () => {
47
+ const gitlab = readRepo('adapters/gitlab/README.md');
48
+ const github = readRepo('adapters/github/README.md');
49
+ assert.match(gitlab, /not the DOT adapter/);
50
+ assert.match(gitlab, /No extra environment cherry-picks unless/);
51
+ assert.doesNotMatch(gitlab, /Coreview/);
52
+ assert.match(github, /Extra branches, review bots, and chat are \*\*off\*\*/);
53
+ });
54
+
55
+ test('AC-5 chat setuju is not propagate; extra env MRs only if named this turn', () => {
56
+ const text = `${readRepo(MULTI)}\n${readRepo(WORKFLOW)}\n${readRepo(README)}`;
57
+ assert.match(text, /setuju/);
58
+ assert.match(text, /this turn/);
59
+ assert.match(text, /Do not cherry-pick to `staging` or `develop` unless/i);
60
+ const workflow = readRepo(WORKFLOW);
61
+ assert.doesNotMatch(workflow, /```mermaid/);
62
+ assert.doesNotMatch(workflow, /commit, propagate, reply/);
63
+ assert.match(workflow, /push to the same topic MR/);
64
+ assert.doesNotMatch(readRepo(README), /fix & propagate/);
65
+ });
@@ -0,0 +1,90 @@
1
+ 'use strict';
2
+
3
+ const test = require('node:test');
4
+ const assert = require('node:assert');
5
+ const fs = require('fs');
6
+ const path = require('path');
7
+
8
+ const ROOT = path.join(__dirname, '..');
9
+
10
+ function readRepo(rel) {
11
+ return fs.readFileSync(path.join(ROOT, rel), 'utf8');
12
+ }
13
+
14
+ const QA_HEADINGS = [
15
+ /## Steps to Reproduce & Testing \(QA\)/,
16
+ /### Pre-conditions/,
17
+ /### Steps to Reproduce/,
18
+ /### How to Test/,
19
+ /### Actual Result/,
20
+ /### Expected Result/
21
+ ];
22
+
23
+ const HOSTS = [
24
+ '.claude/skills/ai-engineering-loop/SKILL.md',
25
+ '.grok/skills/ai-engineering-loop/SKILL.md',
26
+ '.gemini/skills/ai-engineering-loop/SKILL.md',
27
+ '.agents/workflows/ai-engineering-loop.md'
28
+ ];
29
+
30
+ test('AC-1 GitHub PR and GitLab MR bodies include the QA reproduce and how-to-test block', () => {
31
+ for (const rel of [
32
+ 'adapters/github/pull-request.md',
33
+ 'adapters/gitlab/merge-request.md'
34
+ ]) {
35
+ const text = readRepo(rel);
36
+ for (const heading of QA_HEADINGS) {
37
+ assert.match(text, heading, `${rel} missing ${heading}`);
38
+ }
39
+ }
40
+ });
41
+
42
+ test('AC-2 pure feature may mark Actual Result N/A; How to Test stays required', () => {
43
+ for (const rel of [
44
+ 'adapters/github/pull-request.md',
45
+ 'adapters/gitlab/merge-request.md'
46
+ ]) {
47
+ const text = readRepo(rel);
48
+ assert.match(text, /N\/A on a pure feature/, rel);
49
+ assert.match(text, /### How to Test/, rel);
50
+ assert.match(text, /### Expected Result/, rel);
51
+ }
52
+ });
53
+
54
+ test('AC-3 QA block does not become a dump of diffs, tokens, or machine paths', () => {
55
+ for (const rel of [
56
+ 'adapters/github/pull-request.md',
57
+ 'adapters/gitlab/merge-request.md'
58
+ ]) {
59
+ const text = readRepo(rel);
60
+ assert.match(text, /Do not paste raw diffs, tokens, or local machine paths/, rel);
61
+ }
62
+ });
63
+
64
+ test('AC-4 generic GitLab stays non-DOT; standard does not copy the DOT issue card; DOT issue and MR both have the QA block', () => {
65
+ const gitlab = readRepo('adapters/gitlab/merge-request.md');
66
+ assert.doesNotMatch(gitlab, /Coreview/);
67
+ assert.doesNotMatch(gitlab, /Mattermost/);
68
+
69
+ const standard = readRepo('adapters/standard/README.md');
70
+ assert.match(standard, /Steps to Reproduce & Testing \(QA\)/);
71
+ assert.doesNotMatch(standard, /Ready to Test/);
72
+
73
+ const dot = readRepo('adapters/dot/gitlab.md');
74
+ const hits = dot.split('## Steps to Reproduce & Testing (QA)').length - 1;
75
+ assert.ok(hits >= 2, `DOT gitlab.md needs QA block on issue and MR, got ${hits}`);
76
+ for (const heading of QA_HEADINGS) {
77
+ assert.match(dot, heading, `DOT gitlab.md missing ${heading}`);
78
+ }
79
+ });
80
+
81
+ test('AC-5 host Stage 8 and DOT Stage 8a require the QA block; bugfix placeholders must not stay empty', () => {
82
+ for (const rel of HOSTS) {
83
+ const text = readRepo(rel);
84
+ assert.match(text, /Steps to Reproduce & Testing \(QA\)/, rel);
85
+ }
86
+ const delivery = readRepo('adapters/dot/skills/dot-dev-workflow/SKILL.md');
87
+ assert.match(delivery, /Steps to Reproduce & Testing \(QA\)/);
88
+ assert.match(delivery, /bugfix placeholders must not stay empty|do not leave those placeholders empty/i);
89
+ assert.doesNotMatch(delivery, /```mermaid/);
90
+ });