ai-engineering-loop 1.0.14 → 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.
Files changed (33) hide show
  1. package/.agents/workflows/ai-engineering-loop.md +1 -1
  2. package/.claude/skills/ai-engineering-loop/SKILL.md +1 -1
  3. package/.gemini/skills/ai-engineering-loop/SKILL.md +1 -1
  4. package/.grok/skills/ai-engineering-loop/SKILL.md +1 -1
  5. package/README.md +3 -3
  6. package/adapters/dot/README.md +8 -8
  7. package/adapters/dot/coreview.md +3 -2
  8. package/adapters/dot/gitlab.md +3 -3
  9. package/adapters/dot/mattermost.md +59 -71
  10. package/adapters/dot/multi-branch.md +3 -2
  11. package/adapters/dot/skills/dot-dev-workflow/SKILL.md +2 -2
  12. package/adapters/dot/skills/task-impact-inquiry/SKILL.md +155 -0
  13. package/bin/ai-engineering-loop.js +2 -2
  14. package/core/grill-policy.md +14 -10
  15. package/examples/backend-api/payment-idempotency/README.md +3 -3
  16. package/examples/dot/status-display/README.md +23 -0
  17. package/examples/dot/status-display/delivery-report.md +41 -0
  18. package/examples/dot/status-display/goal-contract.md +46 -0
  19. package/examples/dot/status-display/judge-verdict.md +44 -0
  20. package/examples/dot/status-display/review-findings.md +63 -0
  21. package/examples/initialization/README.md +2 -2
  22. package/examples/initialization/discovery-trace.md +1 -1
  23. package/examples/mobile-app/offline-sync-queue/README.md +3 -3
  24. package/lib/sync-hosts.js +4 -1
  25. package/package.json +1 -1
  26. package/tests/no-company-leak.test.js +82 -0
  27. package/tests/skill-host-compat.test.js +24 -7
  28. package/tests/sync-hosts.test.js +19 -1
  29. package/examples/dot/attendance-confirmation/README.md +0 -22
  30. package/examples/dot/attendance-confirmation/delivery-report.md +0 -51
  31. package/examples/dot/attendance-confirmation/goal-contract.md +0 -39
  32. package/examples/dot/attendance-confirmation/judge-verdict.md +0 -43
  33. package/examples/dot/attendance-confirmation/review-findings.md +0 -57
@@ -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`, that grill includes `task-impact-inquiry` (Antigravity skill under `~/.gemini/config/skills/`); do not run a second interview. 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`.
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
 
@@ -32,7 +32,7 @@ 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`, that grill includes the four-pillar blast radius (state, sibling, approval, queues). Do not run a second interview. 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.
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
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:
@@ -25,7 +25,7 @@ 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`, that grill includes `task-impact-inquiry` (this host: `~/.gemini/config/skills/task-impact-inquiry`); do not run a second interview. 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.
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
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:
@@ -45,7 +45,7 @@ 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`, that grill includes the four-pillar blast radius (state, sibling, approval, queues). Do not run a second interview. 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.
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
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:
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.14-purple.svg)](https://github.com/egagofur/ai-engineering-loop/releases)
9
+ [![Release](https://img.shields.io/badge/release-v1.0.15-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
 
@@ -64,7 +64,7 @@ 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. AC is a **failure table** (happy, empty/omit, boundary, sibling, error), not sunny path only. | `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
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` |
@@ -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. It does not install `task-impact-inquiry`. 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.
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
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## 1. Overview & Architecture
4
4
 
5
- The **DOT Delivery Adapter** connects the generic [AI Engineering Loop](file:///Users/egagofur/Development/work/ai-engineering-loop/README.md) to the specific development infrastructure of **DOT Indonesia**.
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`)](file:///Users/egagofur/Development/work/ai-engineering-loop/adapters/dot/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`)](file:///Users/egagofur/Development/work/ai-engineering-loop/adapters/dot/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`)](file:///Users/egagofur/Development/work/ai-engineering-loop/adapters/dot/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`)](file:///Users/egagofur/Development/work/ai-engineering-loop/adapters/dot/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 that Antigravity loads from `~/.gemini/config/skills/` (not from `~/.claude/skills/` and not from this npm package). Claude Code and Grok do not get these skills unless the same files are installed on those hosts.
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`** | Antigravity skill at `~/.gemini/config/skills/task-impact-inquiry/`. Four-pillar blast radius (state, sibling, approval, downstream queues). Fills Stage 1 grill on DOT; then freeze the Goal Contract. |
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 | Running DOT-specific scripts (`npx jest --testPathIgnorePatterns="dotify-api"`) |
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 |
@@ -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
- npx jest --testPathIgnorePatterns="dotify-api"
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](file:///Users/egagofur/Development/work/ai-engineering-loop/core/goal-contract.md) or introduces broken dependencies, it MUST be triaged as `HALU` with evidence.
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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## 1. Purpose & Scope
4
4
 
5
- This module encapsulates all GitLab operations within the DOT ecosystem. Once a code change has successfully passed the [Generic AI Engineering Loop](file:///Users/egagofur/Development/work/ai-engineering-loop/README.md), this adapter automates issue tracking and Merge Request (MR) generation via the `glab` CLI.
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 designated tracker (e.g. `dot-system/dotify-new` for central Dotify tracker, or the target repository):
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 attendance, clock-in, approve overtime].
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 automatically delivers them to designated team channels via the Mattermost MCP server or CLI.
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 provides seamless visibility to QA engineers, product managers, and reviewers upon successful completion of the delivery pipeline.
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
- ```mermaid
14
- flowchart TD
15
- Complete[MRs Created Across Environments] --> CheckMap[Check /Users/egagofur/.gemini/config/mattermost-channel-mapping.json]
16
-
17
- CheckMap --> Found{Channel Found for Repo?}
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
- > [!IMPORTANT]
36
- > When sending messages or replying to threads on Mattermost (via MCP tools or CLI):
37
- > - **Always** include the sender attribution parameter (`from: "AI Agent"`) in MCP calls:
38
- > ```json
39
- > {
40
- > "channel": "internal-dotify",
41
- > "message": "...",
42
- > "from": "AI Agent"
43
- > }
44
- > ```
45
- > - **Always** include the CLI flag (`--from "AI Agent"`) in CLI calls:
46
- > ```bash
47
- > node /Users/egagofur/Development/work/kontribusi/mattermost-agent/dist/cli/index.js send <channel> "<message>" --from "AI Agent"
48
- > ```
49
- > - Do not omit or suppress sender attribution.
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 Mapping File**:
56
- Read `/Users/egagofur/.gemini/config/mattermost-channel-mapping.json` using the current repository name or project slug (e.g. `dotify-new`, `dotify-api`, `dot-system/dotify-new`).
57
- 2. **Channel Found**:
58
- Dispatch message to the mapped channel name (e.g. `"internal-dotify"`).
59
- 3. **Channel Unknown**:
60
- - **DO NOT GUESS** or broadcast to arbitrary channels.
61
- - Ask the user to specify the target channel for this repository.
62
- - Immediately persist the user's answer into `/Users/egagofur/.gemini/config/mattermost-channel-mapping.json` for future automated runs.
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 separate, ready-to-copy Markdown blocks for every generated Merge Request using a simple, clean, and punchy format:
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
- - **DILARANG MENGGUNAKAN HEADING MARKDOWN (`#`, `##`, `###`, `####`)**: Gunakan teks polos agar font di Mattermost tidak membesar secara berlebihan.
82
- - **Format Sederhana Tanpa Metadata Bertele-tele**: Jangan menyertakan tabel metadata yang panjang (seperti Branch, Repo, Status Verifikasi). Cukup link MR dan list `Changes log`.
83
- - **Sertakan PIC di Akhir Pesan**: Ambil PIC dari file konfigurasi `mattermost-channel-mapping.json`. Jika belum ada, tanyakan kepada user dan simpan ke file mapping. Tambahkan `cc: <PIC>` di baris paling bawah.
84
- - **Gunakan Bahasa Manusia yang Lugas & Konkret**:
85
- - **Awali dengan kata kerja aktif**: *"Memperbaiki..."*, *"Memigrasikan..."*, *"Menjaga..."*, *"Menambahkan..."*, *"Mengubah..."*.
86
- - **Dilarang kata-kata AI Slop / Puffery**: `secara komprehensif`, `memastikan keakuratan`, `memfasilitasi`, `menyelaraskan alur`, `mengoptimalkan proses`, `solusi yang kokoh/robust`, `meningkatkan efisiensi`, `telah berhasil diimplementasikan`.
87
- - **Dilarang raw code / AST leakage**: Jangan menyebut nama variabel internal atau query mentah (misal `user.type.hasNormalHours`, `attendanceConfirmationPagination Prisma query`). Jelaskan dampak fungsionalnya.
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
- ### Contoh Penerapan Nyata:
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.dot.co.id/playground/bikin-rindu-tools-v2/-/merge_requests/108
98
- Changes log
99
- - Memperbaiki crash halaman dashboard di Safari setelah login akibat QuotaExceededError pada localStorage.
100
- - Memigrasikan penyimpanan cache browser ke IndexedDB (idb-keyval) sehingga kapasitas penyimpanan leluasa dan tidak memblokir main thread.
101
- - Menjaga synchronous script di head untuk preferensi tema agar tidak terjadi kedipan tampilan (FOUC).
102
- - Menambahkan auto-migration otomatis untuk memindahkan data lama dari localStorage ke IndexedDB sekaligus membebaskan kuota browser.
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
- npx jest --testPathIgnorePatterns="dotify-api"
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 [Generic AI Engineering Loop](file:///Users/egagofur/Development/work/ai-engineering-loop/README.md) enforces surgical, minimal diffs, cherry-picking should be clean in >95% of cases.
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: `npx jest --testPathIgnorePatterns="dotify-api"` unless `.ai-engineering-loop/verification.md` says otherwise.
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 `/Users/egagofur/.gemini/config/mattermost-channel-mapping.json`. If PIC is missing, ask the user and save it.
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
 
@@ -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
@@ -21,7 +21,7 @@ const {
21
21
  formatHostSyncReport
22
22
  } = require('../lib/sync-hosts.js');
23
23
 
24
- const VERSION = '1.0.14';
24
+ const VERSION = '1.0.15';
25
25
  const CWD = process.cwd();
26
26
  const CONTEXT_DIR = path.join(CWD, '.ai-engineering-loop');
27
27
 
@@ -275,7 +275,7 @@ function generateContextFiles(rootDir, discovery, trigger = 'init', impact = 'IN
275
275
 
276
276
  // 0. metadata.json (Baseline)
277
277
  const metadataJson = {
278
- contextVersion: '1.0.14',
278
+ contextVersion: '1.0.15',
279
279
  generatedAt: new Date().toISOString(),
280
280
  repositoryRevision: currentRevision,
281
281
  projectProfile: discovery.profile,
@@ -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
- ## DOT adapter (`adapter_type: dot`)
48
+ ## Business blast radius
49
49
 
50
- On DOT repositories, grill is **one** session that includes the four-pillar blast radius from Antigravity skill `task-impact-inquiry` (`~/.gemini/config/skills/task-impact-inquiry/SKILL.md`). Do not run that skill as a second interview after grill.
50
+ Green unit tests are not proof that sibling rows, approvals, or downstream jobs survived.
51
51
 
52
- The four pillars must appear in the grill (and then in the Goal Contract) whenever the change can touch:
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
- 1. State and condition permutations (status, overtime vs normal hours, locked vs open periods)
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
- **Do not skip grill** for those four cases, even if AC look obvious or the user said "just do it". Typo, lint, and version-bump skips still apply.
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 the skill file is missing on this host, still ask the four pillars from this section. Do not claim the Gemini skill ran.
58
+ If Stage 1 grill already produced the matrix and the user confirmed it, do not run a second interview.
62
59
 
63
- Present the impact matrix and 2–3 probing questions in the same grill round as other Stage 1 decisions. Recommended answers required. After the frontier is empty, freeze the Goal Contract once.
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