ai-engineering-loop 1.0.14 → 1.0.16
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 +2 -2
- package/.claude/commands/ai-engineering-loop.md +1 -1
- package/.claude/skills/ai-engineering-loop/SKILL.md +4 -3
- package/.gemini/skills/ai-engineering-loop/SKILL.md +4 -3
- package/.grok/commands/ai-engineering-loop.md +1 -1
- package/.grok/skills/ai-engineering-loop/SKILL.md +4 -4
- package/README.md +16 -10
- package/adapters/README.md +27 -0
- 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/adapters/generate-adapter/SKILL.md +123 -0
- package/adapters/github/README.md +28 -0
- package/adapters/github/pull-request.md +23 -0
- package/adapters/gitlab/README.md +28 -0
- package/adapters/gitlab/merge-request.md +26 -0
- package/adapters/standard/README.md +44 -0
- package/bin/ai-engineering-loop.js +31 -3
- package/core/grill-policy.md +14 -10
- package/core/repo-config-schema.md +1 -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/generate-adapter.js +118 -0
- package/lib/sync-hosts.js +7 -1
- package/package.json +1 -1
- package/templates/repo-config/adapter.md +1 -1
- package/tests/generate-adapter.test.js +80 -0
- package/tests/no-company-leak.test.js +82 -0
- package/tests/skill-host-compat.test.js +45 -7
- package/tests/sync-hosts.test.js +33 -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
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-impact-inquiry
|
|
3
|
+
description: Map business blast radius before code. Use for impact, side effects, sibling data, approval, queues, or when a new developer must learn the current flow. Triggers: cek impactnya, blast radius, analisa pengaruh, brainstorming impact. Not a substitute for ai-engineering-loop.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Task Impact Inquiry
|
|
7
|
+
|
|
8
|
+
Map the **current business flow** and the **blast radius** of a change before any production edit.
|
|
9
|
+
|
|
10
|
+
This skill fills AI Engineering Loop Stage 1 grill. It is not a parallel engineering OS.
|
|
11
|
+
|
|
12
|
+
If Stage 1 grill already produced this matrix and the user confirmed it, stop. Do not interview again. On commit-bound work, continue in `ai-engineering-loop` (freeze the Goal Contract, then Maker). Do not start `dot-dev-workflow` Phases 1-6.
|
|
13
|
+
|
|
14
|
+
## Hard gate
|
|
15
|
+
|
|
16
|
+
Do not create a branch or edit production code until:
|
|
17
|
+
|
|
18
|
+
1. The current lifecycle is drawn from evidence (not guessed).
|
|
19
|
+
2. The impact matrix is on screen.
|
|
20
|
+
3. The user has answered the probing questions (or waived them).
|
|
21
|
+
|
|
22
|
+
Green unit tests later are not proof that siblings, approvals, or downstream jobs survived. A 100% passing suite can still reset approved history or fire the wrong downstream job.
|
|
23
|
+
|
|
24
|
+
## When to use
|
|
25
|
+
|
|
26
|
+
- "cek impactnya", "blast radius", "analisa pengaruh", "brainstorming impact"
|
|
27
|
+
- Bug, edge case, or business-logic change
|
|
28
|
+
- Shared service, status transition, calculation, validation, authorization, schema
|
|
29
|
+
- The user is new to the domain and does not know the flow
|
|
30
|
+
|
|
31
|
+
Impact-only (no implementation): run this skill and stop after the report.
|
|
32
|
+
|
|
33
|
+
Commit-bound work: run this inside AEL Stage 1, then freeze. Do not run it a second time after grill.
|
|
34
|
+
|
|
35
|
+
## Host notes
|
|
36
|
+
|
|
37
|
+
Claude Code / Kiro: no mermaid, no LaTeX, no extra tool keys. ASCII diagrams only.
|
|
38
|
+
|
|
39
|
+
Grok: do not spawn children for this skill. Stay in the parent.
|
|
40
|
+
|
|
41
|
+
Look up facts (files, enums, jobs). Grill only **decisions**.
|
|
42
|
+
|
|
43
|
+
## Steps
|
|
44
|
+
|
|
45
|
+
### 1. Look up (do not ask)
|
|
46
|
+
|
|
47
|
+
Read in this order. Skip a source if it is missing. Do not invent statuses.
|
|
48
|
+
|
|
49
|
+
1. `.ai-engineering-loop/glossary.md`
|
|
50
|
+
2. Existing FSD if present (`docs/fsd/`, `specs-book/fsd/`, especially `impact-matrix.md`). Read only. Do not generate an FSD.
|
|
51
|
+
3. Status enums, services, validators, listeners, BullMQ / cron / queue processors
|
|
52
|
+
4. Matching FE pages, routes, and permission guards when both FE and BE are in the workspace
|
|
53
|
+
|
|
54
|
+
Cite the path for each claim. If FE or BE is missing, say so.
|
|
55
|
+
|
|
56
|
+
### 2. New-dev briefing + lifecycle picture
|
|
57
|
+
|
|
58
|
+
Explain the current flow in plain language for someone new to the app: who acts, what status changes, when a period locks.
|
|
59
|
+
|
|
60
|
+
Then draw the lifecycle in ASCII. Do not ask the user what the code already shows.
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
Author submit -> DRAFT
|
|
64
|
+
Author send -> NEED_APPROVAL
|
|
65
|
+
Reviewer approve -> APPROVED
|
|
66
|
+
period lock -> CONFIRMED --> billing / aggregate job
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
If the flow cannot be determined from the repo, say what is missing.
|
|
70
|
+
|
|
71
|
+
### 3. Four-pillar scan
|
|
72
|
+
|
|
73
|
+
**State and conditions.** Does the rule apply the same in normal vs special cases (rush vs standard, holiday, locked vs open period)? What happens in DRAFT, SUBMITTED, NEED_APPROVAL, APPROVED, REJECTED, CONFIRMED, UNCONFIRMED?
|
|
74
|
+
|
|
75
|
+
**Sibling / historical isolation.** If entity A in parent P changes, do B and C in the same parent, period, or cart change? Can already-approved history reset?
|
|
76
|
+
|
|
77
|
+
**Actor and approval.** Who creates, who may edit, who must re-approve? When is an existing approval void, and when must it be kept?
|
|
78
|
+
|
|
79
|
+
**Downstream.** BullMQ, cron, listeners, billing, dashboard totals.
|
|
80
|
+
|
|
81
|
+
### 4. Where it hits (hit map + blast picture)
|
|
82
|
+
|
|
83
|
+
List the surfaces a naive edit would touch. Empty rows mean you have not finished looking.
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
Surface Path / job Naive risk
|
|
87
|
+
FE page <route or page> <what the user would see>
|
|
88
|
+
BE service <service / status write> <what the row would become>
|
|
89
|
+
Sibling rows <same parent / period / cart> isolate | also-update
|
|
90
|
+
Approval <who, void vs keep> <approval lost or kept>
|
|
91
|
+
Queue / billing <job name> rerun | skip
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Then the blast-radius picture (ASCII only):
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
edit(A in period P)
|
|
98
|
+
|- sibling B in P : isolate | also-update
|
|
99
|
+
|- approval on A : void | keep
|
|
100
|
+
|- billing / queue : rerun | skip
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 5. Impact matrix (failure table)
|
|
104
|
+
|
|
105
|
+
| Scenario | Current logic (cite path) | Side effect if we ship naive | Proposed treatment |
|
|
106
|
+
|---|---|---|---|
|
|
107
|
+
| Happy path | | | |
|
|
108
|
+
| Empty / omitted field | | | |
|
|
109
|
+
| Boundary (min/max, locked vs open) | | | |
|
|
110
|
+
| Sibling in the same parent | | | |
|
|
111
|
+
| Error / denied / unauthorized | | | |
|
|
112
|
+
|
|
113
|
+
A matrix with only the sunny path is not done.
|
|
114
|
+
|
|
115
|
+
### 6. Probing questions
|
|
116
|
+
|
|
117
|
+
Ask 2-3 decisions. Number them. Give a recommended answer. Wait.
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
Q1 - <title>: <choices>
|
|
121
|
+
Recommended: <your answer>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Typical decisions: void vs keep approval; isolate vs also-update siblings; rerun vs skip the downstream job.
|
|
125
|
+
|
|
126
|
+
### 7. Contract rows
|
|
127
|
+
|
|
128
|
+
Each accepted matrix row becomes a numbered AC in the Goal Contract **file** (failure table). Name the seam or artifact.
|
|
129
|
+
|
|
130
|
+
If this session is AEL: freeze after those ACs are in the file. Chat `setuju` is not freeze.
|
|
131
|
+
|
|
132
|
+
If this session is impact-only: print the report and stop. Do not implement.
|
|
133
|
+
|
|
134
|
+
## Output
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
Task impact inquiry
|
|
138
|
+
Briefing: <plain-language current flow>
|
|
139
|
+
Lifecycle: <ASCII>
|
|
140
|
+
Hit map: <surfaces + paths>
|
|
141
|
+
Blast radius: <ASCII>
|
|
142
|
+
Matrix: <table>
|
|
143
|
+
Questions: Q1..Qn with Recommended
|
|
144
|
+
Proposed AC: AC-1..N (happy, empty/omit, boundary, sibling, error)
|
|
145
|
+
Next: freeze Goal Contract | stop (impact-only)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Forbidden
|
|
149
|
+
|
|
150
|
+
- Implementing, branching, or "small fix while we discuss"
|
|
151
|
+
- Second interview after AEL grill already captured the matrix
|
|
152
|
+
- Mermaid or LaTeX
|
|
153
|
+
- Claiming isolation because unit tests passed
|
|
154
|
+
- Inventing business rules the repo and the user did not supply
|
|
155
|
+
- Generating an FSD or starting `dot-dev-workflow` as a second loop
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: generate-adapter
|
|
3
|
+
description: Grill then write a Stage 8 delivery adapter for this repo. Use when the user says generate-adapter, buat adapter, or each team needs its own forge. Not a substitute for ai-engineering-loop.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Generate Adapter
|
|
7
|
+
|
|
8
|
+
Write **this repo's** Stage 8 delivery adapter. Every team has different tools. Do not copy DOT, and do not invent Slack/Jira/bots the user did not name.
|
|
9
|
+
|
|
10
|
+
This skill is not the engineering OS. After the adapter file exists, commit-bound work still runs `ai-engineering-loop`. Stage 8 reads the file this skill writes.
|
|
11
|
+
|
|
12
|
+
## Hard gate
|
|
13
|
+
|
|
14
|
+
Do not edit production code. Do not create a feature branch for the product.
|
|
15
|
+
|
|
16
|
+
Do not write `.ai-engineering-loop/adapter.md` until:
|
|
17
|
+
|
|
18
|
+
1. Look-up is done (remote, CI, existing adapter).
|
|
19
|
+
2. Q1–Q5 are on screen with a recommended answer.
|
|
20
|
+
3. The user has answered or waived.
|
|
21
|
+
|
|
22
|
+
## When to use
|
|
23
|
+
|
|
24
|
+
- `generate-adapter`, `buat adapter`, `adapter sendiri`
|
|
25
|
+
- `.ai-engineering-loop/adapter.md` missing, `adapter_type` unknown, or Stage 8 would have to guess
|
|
26
|
+
- The user wants GitHub / GitLab / standard / custom delivery
|
|
27
|
+
|
|
28
|
+
If Stage 1 grill for a **product task** is already running, do not start this skill as a second interview. Finish that Goal Contract first.
|
|
29
|
+
|
|
30
|
+
## Host notes
|
|
31
|
+
|
|
32
|
+
Claude Code / Kiro: no mermaid, no LaTeX, no extra tool keys.
|
|
33
|
+
|
|
34
|
+
Grok: do not spawn children. Stay in the parent.
|
|
35
|
+
|
|
36
|
+
Look up facts. Grill only **decisions**.
|
|
37
|
+
|
|
38
|
+
## Steps
|
|
39
|
+
|
|
40
|
+
### 1. Look up
|
|
41
|
+
|
|
42
|
+
Read, in order. Skip if missing.
|
|
43
|
+
|
|
44
|
+
1. `git remote -v` and `.git/config`
|
|
45
|
+
2. `.github/workflows/`, `.gitlab-ci.yml`
|
|
46
|
+
3. `.ai-engineering-loop/adapter.md`
|
|
47
|
+
4. Shipped specs: `adapters/standard/`, `adapters/github/`, `adapters/gitlab/`, `adapters/dot/` (in the ai-engineering-loop package)
|
|
48
|
+
|
|
49
|
+
Or run `npx ai-engineering-loop generate-adapter` and use its detected block.
|
|
50
|
+
|
|
51
|
+
Cite the remote host. Do not ask what git already shows.
|
|
52
|
+
|
|
53
|
+
Recommended type:
|
|
54
|
+
|
|
55
|
+
- `github.com` → `github`
|
|
56
|
+
- GitLab host that is not a named company adapter → `gitlab`
|
|
57
|
+
- no remote / unknown → `standard`
|
|
58
|
+
- user said they need the DOT pipeline → `dot` (load `adapters/dot/`, do not invent extra tools)
|
|
59
|
+
|
|
60
|
+
### 2. Grill (wait)
|
|
61
|
+
|
|
62
|
+
Ask all five in one round. Number them. Give Recommended. Wait.
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
Q1 - Forge: github | gitlab | standard (git only) | custom
|
|
66
|
+
Recommended: <from look-up>
|
|
67
|
+
|
|
68
|
+
Q2 - Open the change with: gh | glab | human copies the URL
|
|
69
|
+
Recommended: <binary that exists, else human>
|
|
70
|
+
|
|
71
|
+
Q3 - Extra environment branches after the default: none | list them
|
|
72
|
+
Recommended: none
|
|
73
|
+
|
|
74
|
+
Q4 - Notify after the PR/MR: none | name the tool you already use
|
|
75
|
+
Recommended: none
|
|
76
|
+
|
|
77
|
+
Q5 - Issue tracker: github | gitlab | none | name it
|
|
78
|
+
Recommended: same as forge, or none
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
If the user picks **custom**, they must name the tools. Do not fill Linear/Slack/Bitbucket unless they said so.
|
|
82
|
+
|
|
83
|
+
### 3. Write
|
|
84
|
+
|
|
85
|
+
Write `.ai-engineering-loop/adapter.md` (create `.ai-engineering-loop/` if needed).
|
|
86
|
+
|
|
87
|
+
- `adapter_type`: `standard` | `github` | `gitlab` | `dot` | `custom`
|
|
88
|
+
- `spec`: shipped folder (`adapters/github/`) or `.ai-engineering-loop/adapter/delivery.md` for custom
|
|
89
|
+
- remote, default branch, ci_provider from look-up
|
|
90
|
+
- extra branches and notify only if the user named them
|
|
91
|
+
- no tokens, no webhooks with secrets, no coworker handles, no internal ticket URLs
|
|
92
|
+
|
|
93
|
+
If `custom`, also write `.ai-engineering-loop/adapter/delivery.md` from their answers, following the same hard gate as `adapters/standard/` (Judge PASS first, no silent installs).
|
|
94
|
+
|
|
95
|
+
Headless alternative the user can run:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
npx ai-engineering-loop generate-adapter --type github
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`--type` skips this interview. Do not pass `--type` yourself unless they waived the grill.
|
|
102
|
+
|
|
103
|
+
### 4. Stop
|
|
104
|
+
|
|
105
|
+
Print the path written and the type. Do not start Maker. Do not open a PR.
|
|
106
|
+
|
|
107
|
+
## Output
|
|
108
|
+
|
|
109
|
+
```text
|
|
110
|
+
Generate adapter
|
|
111
|
+
Detected: <remote> <ci>
|
|
112
|
+
Questions: Q1..Q5 with Recommended
|
|
113
|
+
Wrote: .ai-engineering-loop/adapter.md (type=<type>)
|
|
114
|
+
Next: /ai-engineering-loop for product work. Stage 8 uses this file.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Forbidden
|
|
118
|
+
|
|
119
|
+
- Copying `adapters/dot/` onto a non-DOT repo
|
|
120
|
+
- Inventing company chat, review bots, or extra branches
|
|
121
|
+
- Mermaid or LaTeX
|
|
122
|
+
- Putting secrets or private ticket URLs in adapter.md
|
|
123
|
+
- Running the 8-stage product loop inside this skill
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# GitHub delivery adapter
|
|
2
|
+
|
|
3
|
+
Stage 8 after Judge `PASS` on GitHub-hosted repos.
|
|
4
|
+
|
|
5
|
+
This is not the engineering OS. Do not run Maker. Do not skip Devil's Advocate or Judge.
|
|
6
|
+
|
|
7
|
+
Requires `gh` authenticated to the current remote. If `gh` is missing, fall back to [`../standard/`](../standard/) and print the compare URL.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. Re-run `.ai-engineering-loop/verification.md` if the log is stale.
|
|
12
|
+
2. Commit the surgical diff. Push the topic branch. Never push the default branch.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git push -u origin HEAD
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
3. Optional issue if none is linked (branch name, `Fixes #n`, or `gh issue list`):
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
gh issue create --title "<summary>" --body "<Goal Contract path and AC list>"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
4. Open the pull request. Follow [`pull-request.md`](pull-request.md).
|
|
25
|
+
|
|
26
|
+
5. Extra branches, review bots, and chat are **off** unless `.ai-engineering-loop/adapter.md` names them. Do not invent Actions secrets or Slack webhooks.
|
|
27
|
+
|
|
28
|
+
6. Stop. The human merges on GitHub.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# GitHub pull request
|
|
2
|
+
|
|
3
|
+
```bash
|
|
4
|
+
gh pr create \
|
|
5
|
+
--title "<type>(<scope>): <summary>" \
|
|
6
|
+
--body "$(cat <<'EOF'
|
|
7
|
+
## Goal Contract
|
|
8
|
+
`.ai-engineering-loop/tasks/goal-contract.md` (or the path this repo uses)
|
|
9
|
+
|
|
10
|
+
## What changed
|
|
11
|
+
- <root cause or behaviour>
|
|
12
|
+
- <edge cases>
|
|
13
|
+
- <tests added>
|
|
14
|
+
|
|
15
|
+
## Verification
|
|
16
|
+
Commands from `.ai-engineering-loop/verification.md` (exit 0).
|
|
17
|
+
EOF
|
|
18
|
+
)"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Link an issue with `Fixes #n` in the body when an issue exists.
|
|
22
|
+
|
|
23
|
+
Do not paste raw diffs, tokens, or local machine paths.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# GitLab delivery adapter
|
|
2
|
+
|
|
3
|
+
Stage 8 after Judge `PASS` on GitLab.com or self-hosted GitLab.
|
|
4
|
+
|
|
5
|
+
This is the **generic** GitLab adapter. It is not the DOT adapter. Do not load `adapters/dot/`. No extra environment cherry-picks unless `.ai-engineering-loop/adapter.md` lists those branches.
|
|
6
|
+
|
|
7
|
+
Requires `glab` authenticated to the current remote. If `glab` is missing, fall back to [`../standard/`](../standard/) and print the branch name.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. Re-run `.ai-engineering-loop/verification.md` if the log is stale.
|
|
12
|
+
2. Commit the surgical diff. Push the topic branch. Never push the default branch.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git push -u origin HEAD
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
3. Optional issue if none is linked:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
glab issue create --title "<summary>" --description "<Goal Contract path and AC list>" --yes
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
4. Open the merge request. Follow [`merge-request.md`](merge-request.md).
|
|
25
|
+
|
|
26
|
+
5. Extra environments and chat notifications stay off unless `adapter.md` lists them.
|
|
27
|
+
|
|
28
|
+
6. Stop. The human merges on GitLab.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# GitLab merge request
|
|
2
|
+
|
|
3
|
+
```bash
|
|
4
|
+
glab mr create \
|
|
5
|
+
--source-branch <branch-name> \
|
|
6
|
+
--target-branch <default-branch> \
|
|
7
|
+
--title "<type>(<scope>): <summary>" \
|
|
8
|
+
--description "$(cat <<'EOF'
|
|
9
|
+
## Goal Contract
|
|
10
|
+
`.ai-engineering-loop/tasks/goal-contract.md` (or the path this repo uses)
|
|
11
|
+
|
|
12
|
+
## What changed
|
|
13
|
+
- <root cause or behaviour>
|
|
14
|
+
- <edge cases>
|
|
15
|
+
- <tests added>
|
|
16
|
+
|
|
17
|
+
## Verification
|
|
18
|
+
Commands from `.ai-engineering-loop/verification.md` (exit 0).
|
|
19
|
+
EOF
|
|
20
|
+
)" \
|
|
21
|
+
--yes
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Link the issue URL in the description when an issue exists.
|
|
25
|
+
|
|
26
|
+
Do not paste raw diffs, tokens, or local machine paths.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Standard delivery adapter
|
|
2
|
+
|
|
3
|
+
General Stage 8 for any git project. No GitHub, GitLab, Slack, or company bot is required.
|
|
4
|
+
|
|
5
|
+
Use this when the remote is unknown, the human merges by hand, or you have not generated a forge-specific adapter yet.
|
|
6
|
+
|
|
7
|
+
## Hard gate
|
|
8
|
+
|
|
9
|
+
Do not commit, push, or open a change request until Judge `PASS`.
|
|
10
|
+
|
|
11
|
+
If `.ai-engineering-loop/adapter.md` names a more specific type (`github`, `gitlab`, `dot`), follow that spec instead.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Read `.ai-engineering-loop/verification.md`. Re-run those commands if the last log is stale. Keep exit codes.
|
|
16
|
+
2. Commit only the surgical diff for this Goal Contract.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
git status
|
|
20
|
+
git diff
|
|
21
|
+
git add <modified-files>
|
|
22
|
+
git commit -m "<type>(<scope>): <summary>"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. Push the topic branch. Do not push to `main` / `master` / the default branch.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git push -u origin HEAD
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
4. Open a change request **with the tool that already exists**, or stop and give the human the compare URL:
|
|
32
|
+
- `gh pr create` if GitHub and `gh` works
|
|
33
|
+
- `glab mr create` if GitLab and `glab` works
|
|
34
|
+
- otherwise print `git remote -v` and the branch name; the human opens the PR/MR
|
|
35
|
+
5. Do not cherry-pick to extra environments unless `adapter.md` lists those branches.
|
|
36
|
+
6. Do not send chat notifications unless `adapter.md` names a channel and a tool. Never invent a webhook or token.
|
|
37
|
+
7. Stop. Merge is a human action unless the user already said to merge.
|
|
38
|
+
|
|
39
|
+
## Best practice
|
|
40
|
+
|
|
41
|
+
- One branch, one change request, default branch only.
|
|
42
|
+
- Link the Goal Contract path in the PR/MR body (not the whole chat).
|
|
43
|
+
- No secrets, no internal hostnames, no coworker handles in the description.
|
|
44
|
+
- If the forge CLI is missing, do not install it silently. Tell the user.
|
|
@@ -20,8 +20,14 @@ const {
|
|
|
20
20
|
planHostSync,
|
|
21
21
|
formatHostSyncReport
|
|
22
22
|
} = require('../lib/sync-hosts.js');
|
|
23
|
+
const {
|
|
24
|
+
detectAdapterHints,
|
|
25
|
+
writeShippedAdapter,
|
|
26
|
+
formatGenerateAdapterReport,
|
|
27
|
+
parseTypeArg
|
|
28
|
+
} = require('../lib/generate-adapter.js');
|
|
23
29
|
|
|
24
|
-
const VERSION = '1.0.
|
|
30
|
+
const VERSION = '1.0.16';
|
|
25
31
|
const CWD = process.cwd();
|
|
26
32
|
const CONTEXT_DIR = path.join(CWD, '.ai-engineering-loop');
|
|
27
33
|
|
|
@@ -275,7 +281,7 @@ function generateContextFiles(rootDir, discovery, trigger = 'init', impact = 'IN
|
|
|
275
281
|
|
|
276
282
|
// 0. metadata.json (Baseline)
|
|
277
283
|
const metadataJson = {
|
|
278
|
-
contextVersion: '1.0.
|
|
284
|
+
contextVersion: '1.0.16',
|
|
279
285
|
generatedAt: new Date().toISOString(),
|
|
280
286
|
repositoryRevision: currentRevision,
|
|
281
287
|
projectProfile: discovery.profile,
|
|
@@ -365,7 +371,7 @@ ${discovery.scripts.e2e ? `- **e2e**: \`${discovery.scripts.e2e}\`` : ''}
|
|
|
365
371
|
const adapterMd = `# Project Delivery Adapter Configuration
|
|
366
372
|
|
|
367
373
|
## Delivery Pipeline
|
|
368
|
-
- **adapter_type**: "${discovery.adapter.type}" #
|
|
374
|
+
- **adapter_type**: "${discovery.adapter.type}" # standard | github | gitlab | dot | custom
|
|
369
375
|
${discovery.adapter.repoSlug ? `- **remote_repository**: "${discovery.adapter.repoSlug}"` : ''}
|
|
370
376
|
- **default_target_branch**: "${discovery.adapter.defaultBranch}"
|
|
371
377
|
- **ci_provider**: "${discovery.adapter.ciProvider}"
|
|
@@ -654,6 +660,23 @@ function handleSyncHosts() {
|
|
|
654
660
|
console.log(formatHostSyncReport(results, { version: VERSION, dryRun }));
|
|
655
661
|
}
|
|
656
662
|
|
|
663
|
+
function handleGenerateAdapter() {
|
|
664
|
+
log.info('AI Engineering Loop — Generate delivery adapter (generate-adapter)');
|
|
665
|
+
const hints = detectAdapterHints(CWD);
|
|
666
|
+
const type = parseTypeArg(process.argv);
|
|
667
|
+
if (!type) {
|
|
668
|
+
console.log(formatGenerateAdapterReport(hints, { version: VERSION }));
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
671
|
+
try {
|
|
672
|
+
const wrote = writeShippedAdapter(CWD, { type, hints });
|
|
673
|
+
console.log(formatGenerateAdapterReport(hints, { version: VERSION, wrote }));
|
|
674
|
+
} catch (err) {
|
|
675
|
+
log.error(err.message);
|
|
676
|
+
process.exit(1);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
|
|
657
680
|
function detectGrokHost() {
|
|
658
681
|
try {
|
|
659
682
|
const { detectGrokRuntime } = require('../lib/orchestration.js');
|
|
@@ -746,6 +769,8 @@ Commands:
|
|
|
746
769
|
sync-hosts Copy package skills/agents/commands into ~/.claude ~/.grok ~/.gemini ~/.agents
|
|
747
770
|
(only hosts that already exist; DOT skills only if already installed)
|
|
748
771
|
--dry-run print the plan without writing
|
|
772
|
+
generate-adapter Print detected forge and grill protocol for Stage 8
|
|
773
|
+
--type standard|github|gitlab|dot write .ai-engineering-loop/adapter.md (skip grill)
|
|
749
774
|
|
|
750
775
|
Options:
|
|
751
776
|
-h, --help Show this help menu
|
|
@@ -776,6 +801,9 @@ switch (command) {
|
|
|
776
801
|
case 'sync-hosts':
|
|
777
802
|
handleSyncHosts();
|
|
778
803
|
break;
|
|
804
|
+
case 'generate-adapter':
|
|
805
|
+
handleGenerateAdapter();
|
|
806
|
+
break;
|
|
779
807
|
case '-v':
|
|
780
808
|
case '--version':
|
|
781
809
|
console.log(`ai-engineering-loop v${VERSION}`);
|
package/core/grill-policy.md
CHANGED
|
@@ -45,22 +45,26 @@ Before Maker starts:
|
|
|
45
45
|
|
|
46
46
|
If a decision was agreed in chat and is missing from the file, the contract is not frozen. Do not start Maker.
|
|
47
47
|
|
|
48
|
-
##
|
|
48
|
+
## Business blast radius
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
Green unit tests are not proof that sibling rows, approvals, or downstream jobs survived.
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
When the change can touch state, siblings, actors/approvals, or downstream work, grill **must** include blast radius — even if AC look obvious or the user said "just do it". Typo, lint, and version-bump skips still apply.
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
2. Sibling / historical isolation (other entities in the same parent, period, or cart)
|
|
56
|
-
3. Actor and approval authority (who edits, when an existing approval is void vs kept)
|
|
57
|
-
4. Downstream jobs and queues (BullMQ, cron, payroll/aggregates)
|
|
54
|
+
On `adapter_type: dot`, this is mandatory. On other adapters, skip only when the change cannot touch those four (copy, CSS, comment).
|
|
58
55
|
|
|
59
|
-
|
|
56
|
+
Canonical skill: `adapters/dot/skills/task-impact-inquiry/SKILL.md`. Host copies via `sync-hosts`: `~/.claude/skills/task-impact-inquiry/`, `~/.grok/skills/task-impact-inquiry/`, `~/.gemini/config/skills/task-impact-inquiry/`. Load that skill if present. If it is missing, still run this section. Do not claim the skill ran.
|
|
60
57
|
|
|
61
|
-
If
|
|
58
|
+
If Stage 1 grill already produced the matrix and the user confirmed it, do not run a second interview.
|
|
62
59
|
|
|
63
|
-
|
|
60
|
+
In the same grill round:
|
|
61
|
+
|
|
62
|
+
1. Look up the current flow. Draw an ASCII lifecycle (actor → status → lock). Do not ask look-up facts.
|
|
63
|
+
2. Scan four pillars: state/conditions; sibling/historical isolation; actor and approval (void vs keep); downstream jobs and queues.
|
|
64
|
+
3. ASCII blast-radius picture. No mermaid.
|
|
65
|
+
4. Impact matrix (happy, empty/omit, boundary, sibling, error). Sunny-path-only is not done.
|
|
66
|
+
5. 2–3 probing questions with recommended answers. Wait.
|
|
67
|
+
6. Each accepted row becomes a numbered AC in the Goal Contract **file** (failure table).
|
|
64
68
|
|
|
65
69
|
## Design tree
|
|
66
70
|
|
|
@@ -64,7 +64,7 @@ Maintains lightweight state for instant drift detection:
|
|
|
64
64
|
- `e2e`: (Optional) End-to-end / browser test command.
|
|
65
65
|
|
|
66
66
|
### 6. `adapter.md` — Delivery Pipeline Configuration
|
|
67
|
-
- `adapter_type`: Configured adapter (`
|
|
67
|
+
- `adapter_type`: Configured adapter (`standard`, `github`, `gitlab`, `dot`, `custom`). Shipped specs live in `adapters/<type>/`. Generate with `npx ai-engineering-loop generate-adapter` (grill) or `--type`.
|
|
68
68
|
- `remote_repository`: Git remote repository slug.
|
|
69
69
|
- `default_target_branch`: Base target branch.
|
|
70
70
|
- `ci_provider`: Detected CI engine (GitHub Actions, GitLab CI).
|
|
@@ -22,12 +22,12 @@ Task: Implement atomic idempotency key validation and SELECT FOR UPDATE row lock
|
|
|
22
22
|
|
|
23
23
|
## 3. Walkthrough Artifacts
|
|
24
24
|
|
|
25
|
-
1. **[Goal Contract (`goal-contract.md`)](
|
|
25
|
+
1. **[Goal Contract (`goal-contract.md`)](./goal-contract.md)**:
|
|
26
26
|
- AC-1: Idempotency-Key header mandatory on POST `/api/v1/payments/charge`.
|
|
27
27
|
- AC-2: Atomic reservation using PostgreSQL `INSERT ... ON CONFLICT DO NOTHING`.
|
|
28
28
|
- AC-3: Concurrent requests for same user wallet serialized with `SELECT ... FOR UPDATE`.
|
|
29
|
-
2. **[Adversarial Review Findings (`review-findings.md`)](
|
|
29
|
+
2. **[Adversarial Review Findings (`review-findings.md`)](./review-findings.md)**:
|
|
30
30
|
- Devil's Advocate activates `backend-api` rules (concurrency, database atomicity).
|
|
31
31
|
- Flags missing rollback on external gateway timeout (`ERR-001`).
|
|
32
|
-
3. **[Judge Verdict (`judge-verdict.md`)](
|
|
32
|
+
3. **[Judge Verdict (`judge-verdict.md`)](./judge-verdict.md)**:
|
|
33
33
|
- Evaluates parallel test execution (`go test -race ./...`), verifies concurrency safety, and issues `PASS` verdict.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Reference Example: Request Display Status Fix
|
|
2
|
+
|
|
3
|
+
## 1. Context & Scenario
|
|
4
|
+
|
|
5
|
+
This walkthrough shows how a status-display bug moves through the **AI Engineering Loop** and the **DOT Delivery Adapter**. Names, URLs, and schema below are **fictional**. Do not copy real client tickets, GitLab links, or field names into this package.
|
|
6
|
+
|
|
7
|
+
### The Problem
|
|
8
|
+
|
|
9
|
+
On an employee portal, request cards on the list and pagination endpoints showed `"PENDING"` after every line item was already approved or rejected. Non-standard-window records were also scored with the standard-day rule.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 2. Walkthrough Stages & Artifacts
|
|
14
|
+
|
|
15
|
+
1. **[Stage 1: Goal Contract (`goal-contract.md`)](./goal-contract.md)**:
|
|
16
|
+
- Objective, acceptance criteria (standard window, holiday, non-standard window, null values), and verification plan.
|
|
17
|
+
2. **[Stage 2: Adversarial Review & Triage (`review-findings.md`)](./review-findings.md)**:
|
|
18
|
+
- Devil's Advocate flags a null-safety bug (`COR-001`) and an invalid nitpick (`MAINT-001`).
|
|
19
|
+
- Maker triage and surgical fix.
|
|
20
|
+
3. **[Stage 3: Judge Evaluation & Verdict (`judge-verdict.md`)](./judge-verdict.md)**:
|
|
21
|
+
- Audit of tests, typecheck, finding resolutions, and `PASS`.
|
|
22
|
+
4. **[Stage 4: DOT Delivery Pipeline (`delivery-report.md`)](./delivery-report.md)**:
|
|
23
|
+
- Fictional issue, base MR, cherry-picks to `staging` and `develop`, Coreview triage, Mattermost notice.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# DOT Delivery Report: Request Display Status Fix
|
|
2
|
+
|
|
3
|
+
Fictional sample. Replace host, group, repo, issue, and MR ids from `glab` output. Never paste real client URLs into this package.
|
|
4
|
+
|
|
5
|
+
## 1. Summary of Delivery Actions
|
|
6
|
+
|
|
7
|
+
1. **GitLab Issue Created**: [Issue #42 - [BE] [Requests] Fix display status](https://gitlab.example.com/example-org/work-portal/-/issues/42).
|
|
8
|
+
2. **Primary MR Created**: [MR !10 targeting `main`](https://gitlab.example.com/example-org/work-portal/-/merge_requests/10).
|
|
9
|
+
3. **Multi-Branch Cherry-Pick**:
|
|
10
|
+
- [MR !11 targeting `staging`](https://gitlab.example.com/example-org/work-portal/-/merge_requests/11).
|
|
11
|
+
- [MR !12 targeting `develop`](https://gitlab.example.com/example-org/work-portal/-/merge_requests/12).
|
|
12
|
+
4. **Coreview Bot Triage**:
|
|
13
|
+
- Comments fetched on MR !12. Zero blocking comments.
|
|
14
|
+
5. **Mattermost Notification**:
|
|
15
|
+
- Resolved repository `example-org/work-portal` to channel `"team-work-portal"`.
|
|
16
|
+
- Dispatched via MCP `mattermost_send_message` with `from: "AI Agent"`.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 2. GitLab Links
|
|
21
|
+
|
|
22
|
+
| Artifact | Branch | Link |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| **GitLab Issue** | — | [Issue #42](https://gitlab.example.com/example-org/work-portal/-/issues/42) |
|
|
25
|
+
| **Merge Request DEV** | `develop` | [MR !12](https://gitlab.example.com/example-org/work-portal/-/merge_requests/12) |
|
|
26
|
+
| **Merge Request STAGING** | `staging` | [MR !11](https://gitlab.example.com/example-org/work-portal/-/merge_requests/11) |
|
|
27
|
+
| **Merge Request MAIN** | `main` | [MR !10](https://gitlab.example.com/example-org/work-portal/-/merge_requests/10) |
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 3. Dispatched Mattermost Notification
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
[MR DEV] https://gitlab.example.com/example-org/work-portal/-/merge_requests/12
|
|
35
|
+
Changes log
|
|
36
|
+
- Include standard-window and rush-note fields when loading request list pages.
|
|
37
|
+
- Resolve display status from all line items, including holiday and null collections.
|
|
38
|
+
- Add unit tests for standard, holiday, non-standard-window, and null line-item cases.
|
|
39
|
+
|
|
40
|
+
cc: @owner
|
|
41
|
+
```
|