@eventmodelers/cli 2.0.1 → 2.0.3
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/README.md +27 -9
- package/cli.js +369 -36
- package/lib/build-kits.js +23 -0
- package/lib/scaffold-model.js +71 -0
- package/lib/scaffold.js +224 -0
- package/lib/supervise.js +60 -0
- package/lib/ui-baseline.js +123 -0
- package/package.json +1 -1
- package/shared/build-kit/lib/build-log-share.js +149 -0
- package/shared/build-kit/lib/events-view.js +18 -3
- package/shared/build-kit/lib/ralph.js +27 -16
- package/shared/build-kit/lib/slice-events.js +42 -2
- package/shared/build-kit/lib/slice-info.js +52 -0
- package/shared/build-kit/lib/slice-run.js +2 -2
- package/shared/build-kit/lib/slice-state.js +6 -4
- package/shared/scaffold/LICENSE-em-scaffold +21 -0
- package/shared/scaffold/supabase/generate.mjs +290 -0
- package/shared/scaffold/supabase/template/scripts/create-user.mjs.tmpl +29 -0
- package/shared/scaffold/supabase/template/scripts/dev.mjs.tmpl +145 -0
- package/shared/scaffold/supabase/template/scripts/write-env.mjs.tmpl +44 -0
- package/shared/scaffold/supabase/template/server.ts.tmpl +168 -0
- package/shared/scaffold/supabase/template/src/common/extraEndpoints.ts.tmpl +5 -0
- package/shared/scaffold/supabase/template/src/common/notImplemented.test.ts.tmpl +58 -0
- package/shared/scaffold/supabase/template/src/common/notImplemented.ts.tmpl +29 -0
- package/shared/scaffold/supabase/template/supabase/migrations/_V0__supabase_stubs.sql.tmpl +34 -0
- package/shared/scaffold/supabase/template/web/src/App.tsx.tmpl +38 -0
- package/shared/scaffold/supabase/template/web/src/app/Layout.tsx.tmpl +48 -0
- package/shared/scaffold/supabase/template/web/src/app/NotFound.tsx.tmpl +12 -0
- package/shared/scaffold/supabase/template/web/src/app/SignIn.tsx.tmpl +42 -0
- package/shared/scaffold/supabase/template/web/src/app/TimelinePage.tsx.tmpl +73 -0
- package/shared/scaffold/supabase/template/web/src/app/pages.ts.tmpl +26 -0
- package/shared/scaffold/supabase/template/web/src/app/skeleton.css.tmpl +25 -0
- package/shared/scaffold/supabase/template/web/src/lib/NotBuilt.tsx.tmpl +12 -0
- package/shared/scaffold/supabase/template/web/src/lib/api.ts.tmpl +226 -0
- package/shared/scaffold/supabase/template/web/src/main.tsx.tmpl +13 -0
- package/shared/skills/learn-eventmodelers-api/SKILL.md +4 -4
- package/shared/skills/ui-contract/SKILL.md +6 -6
- package/shared/skills/update-slice-status/SKILL.md +1 -1
- package/stacks/axon/templates/build-kit/CLAUDE.md +4 -3
- package/stacks/axon/templates/build-kit/lib/backend-prompt.md +11 -1
- package/stacks/axon/templates/build-kit/lib/prompt.md +24 -0
- package/stacks/blank/templates/build-kit/CLAUDE.md +4 -3
- package/stacks/blank/templates/build-kit/lib/backend-prompt.md +11 -1
- package/stacks/blank/templates/build-kit/lib/prompt.md +24 -0
- package/stacks/classic/templates/build-kit/CLAUDE.md +6 -5
- package/stacks/classic/templates/build-kit/lib/backend-prompt.md +11 -1
- package/stacks/classic/templates/build-kit/lib/prompt.md +24 -0
- package/stacks/kurrent/templates/build-kit/CLAUDE.md +4 -3
- package/stacks/kurrent/templates/build-kit/lib/backend-prompt.md +11 -1
- package/stacks/kurrent/templates/build-kit/lib/prompt.md +24 -0
- package/stacks/modeling-kit/templates/.claude/skills/analyze-existing-model/SKILL.md +1 -1
- package/stacks/modeling-kit/templates/.claude/skills/prototype/SKILL.md +2 -0
- package/stacks/modeling-kit/templates/.claude/skills/prototype/assets/prototype.mjs +7 -5
- package/stacks/modeling-kit/templates/kit/CLAUDE-STANDALONE.md +1 -1
- package/stacks/modeling-kit/templates/kit/CLAUDE.md +11 -5
- package/stacks/node/templates/build-kit/CLAUDE.md +4 -3
- package/stacks/node/templates/build-kit/lib/backend-prompt.md +11 -1
- package/stacks/node/templates/build-kit/lib/prompt.md +10 -0
- package/stacks/opencqrs/templates/build-kit/CLAUDE.md +4 -3
- package/stacks/opencqrs/templates/build-kit/lib/backend-prompt.md +11 -1
- package/stacks/opencqrs/templates/build-kit/lib/prompt.md +24 -0
- package/stacks/react/templates/build-kit/CLAUDE.md +4 -3
- package/stacks/react/templates/build-kit/lib/AGENT.md +1 -1
- package/stacks/react/templates/build-kit/lib/backend-prompt.md +17 -7
- package/stacks/react/templates/build-kit/lib/kit.json +1 -1
- package/stacks/react/templates/build-kit/lib/prompt.md +39 -2
- package/stacks/supabase/templates/.claude/skills/build-state-view/SKILL.md +15 -0
- package/stacks/supabase/templates/build-kit/CLAUDE.md +4 -3
- package/stacks/supabase/templates/build-kit/lib/backend-prompt.md +11 -1
- package/stacks/supabase/templates/build-kit/lib/prompt.md +10 -0
- package/stacks/supabase-react/templates/.claude/skills/build-state-change/SKILL.md +78 -6
- package/stacks/supabase-react/templates/.claude/skills/build-state-view/SKILL.md +64 -11
- package/stacks/supabase-react/templates/build-kit/CLAUDE.md +5 -4
- package/stacks/supabase-react/templates/build-kit/lib/AGENT.md +1 -1
- package/stacks/supabase-react/templates/build-kit/lib/backend-prompt.md +17 -7
- package/stacks/supabase-react/templates/build-kit/lib/kit.json +1 -1
- package/stacks/supabase-react/templates/build-kit/lib/prompt.md +40 -3
- package/stacks/umadb/templates/build-kit/CLAUDE.md +4 -3
- package/stacks/umadb/templates/build-kit/lib/backend-prompt.md +11 -1
- package/stacks/umadb/templates/build-kit/lib/prompt.md +24 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { supabase } from './supabase';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Common API client — the ONLY place that knows about base URLs, auth headers,
|
|
5
|
+
* correlation/causation tracing, and how to reach Supabase tables. Slice components
|
|
6
|
+
* must never call `fetch` directly, read the Supabase session, or import
|
|
7
|
+
* `./supabase` themselves — they call `postCommand`/`queryReadModel` and handle only
|
|
8
|
+
* the request/response shape their command/read model defines.
|
|
9
|
+
*
|
|
10
|
+
* Every call here has two implementations: a real one (Supabase) and a mock one that
|
|
11
|
+
* serves a numbered sample instead. This is what makes every slice component testable
|
|
12
|
+
* in isolation — flip `VITE_DATA_MODE` to `mock` and every read/write in the app is
|
|
13
|
+
* served from `samples/sample-<VITE_MOCK_SAMPLE>.json` files instead of a live backend.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export const API_BASE = import.meta.env.VITE_API_BASE ?? '';
|
|
17
|
+
|
|
18
|
+
/** `true` when reads/writes should be served from samples instead of Supabase/the backend. */
|
|
19
|
+
export function isMockMode(): boolean {
|
|
20
|
+
return import.meta.env.VITE_DATA_MODE === 'mock';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Which numbered sample set is active in mock mode, e.g. `"1"`, `"2"`. */
|
|
24
|
+
export function activeMockSample(): string {
|
|
25
|
+
return import.meta.env.VITE_MOCK_SAMPLE ?? '1';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async function getAuthHeaders(json = true): Promise<Record<string, string>> {
|
|
29
|
+
const {
|
|
30
|
+
data: { session },
|
|
31
|
+
} = await supabase.auth.getSession();
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
// multipart bodies must leave Content-Type unset so the browser adds the boundary
|
|
35
|
+
...(json ? { 'Content-Type': 'application/json' } : {}),
|
|
36
|
+
Authorization: session ? `Bearer ${session.access_token}` : '',
|
|
37
|
+
'x-correlation-id': crypto.randomUUID(),
|
|
38
|
+
'x-causation-id': crypto.randomUUID(),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** 501 means the endpoint is modeled but its slice is not built yet (distinct from a 404 for a wrong URL). */
|
|
43
|
+
export const NOT_BUILT_MESSAGE = 'This feature is not built yet.';
|
|
44
|
+
|
|
45
|
+
function errorMessage(status: number, payload: { error?: string; message?: string } | undefined): string {
|
|
46
|
+
if (status === 501) return NOT_BUILT_MESSAGE;
|
|
47
|
+
return (payload && (payload.error || payload.message)) || `Request failed with status ${status}`;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** True when an error from this module means "modeled, but its slice is not built yet" (HTTP 501). */
|
|
51
|
+
export function isNotBuilt(err: unknown): boolean {
|
|
52
|
+
return err instanceof ApiError && err.status === 501;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export class ApiError extends Error {
|
|
56
|
+
status: number;
|
|
57
|
+
body: unknown;
|
|
58
|
+
|
|
59
|
+
constructor(message: string, status: number, body?: unknown) {
|
|
60
|
+
super(message);
|
|
61
|
+
this.name = 'ApiError';
|
|
62
|
+
this.status = status;
|
|
63
|
+
this.body = body;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* POST a command to `path` (taken verbatim from the command's API description in
|
|
69
|
+
* slice.json — never invented) with `body` as the JSON payload. Resolves with the
|
|
70
|
+
* parsed JSON response, or throws `ApiError` on a non-2xx response.
|
|
71
|
+
*
|
|
72
|
+
* In mock mode this never hits the network — it resolves with `{ ok: true }` so a
|
|
73
|
+
* command component can be exercised (submitting/success states) fully offline.
|
|
74
|
+
*/
|
|
75
|
+
export async function postCommand<TResponse = unknown>(
|
|
76
|
+
path: string,
|
|
77
|
+
body: unknown,
|
|
78
|
+
): Promise<TResponse> {
|
|
79
|
+
if (isMockMode()) {
|
|
80
|
+
return { ok: true } as TResponse;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const headers = await getAuthHeaders();
|
|
84
|
+
const res = await fetch(`${API_BASE}${path}`, {
|
|
85
|
+
method: 'POST',
|
|
86
|
+
headers,
|
|
87
|
+
body: JSON.stringify(body),
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const payload = await res.json().catch(() => undefined);
|
|
91
|
+
|
|
92
|
+
if (!res.ok) {
|
|
93
|
+
throw new ApiError(errorMessage(res.status, payload), res.status, payload);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return payload as TResponse;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* POST a multipart/form-data command (e.g. one carrying a file) to `path`. Same contract as
|
|
101
|
+
* `postCommand`: resolves with the parsed JSON response, throws `ApiError` on a non-2xx
|
|
102
|
+
* response, and resolves with `{ ok: true }` locally in mock mode.
|
|
103
|
+
*/
|
|
104
|
+
export async function postForm<TResponse = unknown>(
|
|
105
|
+
path: string,
|
|
106
|
+
body: FormData,
|
|
107
|
+
): Promise<TResponse> {
|
|
108
|
+
if (isMockMode()) {
|
|
109
|
+
return { ok: true } as TResponse;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const headers = await getAuthHeaders(false);
|
|
113
|
+
const res = await fetch(`${API_BASE}${path}`, { method: 'POST', headers, body });
|
|
114
|
+
|
|
115
|
+
const payload = await res.json().catch(() => undefined);
|
|
116
|
+
|
|
117
|
+
if (!res.ok) {
|
|
118
|
+
throw new ApiError(errorMessage(res.status, payload), res.status, payload);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return payload as TResponse;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface ReadModelParams {
|
|
125
|
+
/** `readmodel.apiEndpoint`, verbatim — the Postgres table/view name. */
|
|
126
|
+
table: string;
|
|
127
|
+
/** Column names to select, comma-separated (never `'*'`). */
|
|
128
|
+
select: string;
|
|
129
|
+
/** Simple equality filters, e.g. `{ customer_id: customerId }`. */
|
|
130
|
+
filters?: Record<string, unknown>;
|
|
131
|
+
/** `true` for a single-row read model (`.maybeSingle()`), `false` for a list. */
|
|
132
|
+
single?: boolean;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Read a read model's data — `params.table` via Supabase in the real implementation,
|
|
137
|
+
* or `samples[activeMockSample()]` in mock mode. `samples` is this component's own
|
|
138
|
+
* `samples/sample-*.json` map (see the component for how it's built); every read model
|
|
139
|
+
* component supplies its own, `queryReadModel` never reaches into a slice folder itself.
|
|
140
|
+
*/
|
|
141
|
+
export async function queryReadModel<T>(
|
|
142
|
+
params: ReadModelParams,
|
|
143
|
+
samples?: Record<string, T>,
|
|
144
|
+
): Promise<T> {
|
|
145
|
+
if (isMockMode()) {
|
|
146
|
+
return mockSample(samples, `table "${params.table}"`);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
let query = supabase.from(params.table).select(params.select);
|
|
150
|
+
for (const [column, value] of Object.entries(params.filters ?? {})) {
|
|
151
|
+
query = query.eq(column, value);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const { data, error } = params.single ? await query.maybeSingle() : await query;
|
|
155
|
+
// A read-model table that does not exist yet means its slice is not built: same 501 as the backend fallback.
|
|
156
|
+
if (error && (error.code === '42P01' || error.code === 'PGRST205')) throw new ApiError(NOT_BUILT_MESSAGE, 501, error);
|
|
157
|
+
if (error) throw new ApiError(error.message, 500, error);
|
|
158
|
+
return data as T;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* GET a read model from a backend query route, e.g. `/api/query/orderlist-collection` —
|
|
163
|
+
* for read models whose table has RLS on with no policies (kept off Supabase's Data API),
|
|
164
|
+
* so `queryReadModel` would only ever see an empty result. Resolves with the parsed JSON
|
|
165
|
+
* response, or throws `ApiError` on a non-2xx response; mock-aware like `queryReadModel`.
|
|
166
|
+
*/
|
|
167
|
+
export async function getReadModel<T>(path: string, samples?: Record<string, T>): Promise<T> {
|
|
168
|
+
if (isMockMode()) {
|
|
169
|
+
return mockSample(samples, `"${path}"`);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const headers = await getAuthHeaders();
|
|
173
|
+
const res = await fetch(`${API_BASE}${path}`, { method: 'GET', headers });
|
|
174
|
+
|
|
175
|
+
const payload = await res.json().catch(() => undefined);
|
|
176
|
+
|
|
177
|
+
if (!res.ok) {
|
|
178
|
+
throw new ApiError(errorMessage(res.status, payload), res.status, payload);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return payload as T;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
async function fetchFile(path: string): Promise<Blob> {
|
|
185
|
+
const headers = await getAuthHeaders(false);
|
|
186
|
+
const res = await fetch(`${API_BASE}${path}`, { method: 'GET', headers });
|
|
187
|
+
if (!res.ok) {
|
|
188
|
+
const payload = await res.json().catch(() => undefined);
|
|
189
|
+
throw new ApiError(errorMessage(res.status, payload), res.status, payload);
|
|
190
|
+
}
|
|
191
|
+
return res.blob();
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* GET a binary file (e.g. a generated PDF) from `path` with auth headers and open it in a new
|
|
196
|
+
* browser tab. In mock mode nothing is fetched; the call just resolves.
|
|
197
|
+
*/
|
|
198
|
+
export async function openFile(path: string): Promise<void> {
|
|
199
|
+
if (isMockMode()) return;
|
|
200
|
+
|
|
201
|
+
const url = URL.createObjectURL(await fetchFile(path));
|
|
202
|
+
window.open(url, '_blank');
|
|
203
|
+
setTimeout(() => URL.revokeObjectURL(url), 60_000);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* GET a file (e.g. a template logo) from `path` with auth headers and return a blob URL for an
|
|
208
|
+
* `<img src>`, which would send no bearer token itself. The caller revokes it with
|
|
209
|
+
* `URL.revokeObjectURL`. In mock mode nothing is fetched; resolves with `null`.
|
|
210
|
+
*/
|
|
211
|
+
export async function fileUrl(path: string): Promise<string | null> {
|
|
212
|
+
if (isMockMode()) return null;
|
|
213
|
+
|
|
214
|
+
return URL.createObjectURL(await fetchFile(path));
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function mockSample<T>(samples: Record<string, T> | undefined, source: string): T {
|
|
218
|
+
const n = activeMockSample();
|
|
219
|
+
const sample = samples?.[n];
|
|
220
|
+
if (sample === undefined) {
|
|
221
|
+
throw new Error(
|
|
222
|
+
`Mock mode is on (VITE_MOCK_SAMPLE=${n}) but no sample-${n}.json exists for ${source} — add one under this component's samples/ folder.`,
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
return sample;
|
|
226
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StrictMode } from 'react'
|
|
2
|
+
import { createRoot } from 'react-dom/client'
|
|
3
|
+
__CSS_IMPORT__
|
|
4
|
+
import { BrowserRouter } from 'react-router-dom'
|
|
5
|
+
import App from './App.tsx'
|
|
6
|
+
|
|
7
|
+
createRoot(document.getElementById('root')!).render(
|
|
8
|
+
<StrictMode>
|
|
9
|
+
<BrowserRouter>
|
|
10
|
+
<App />
|
|
11
|
+
</BrowserRouter>
|
|
12
|
+
</StrictMode>,
|
|
13
|
+
)
|
|
@@ -646,7 +646,7 @@ Create a complete slice (1 column + its nodes automatically placed).
|
|
|
646
646
|
interaction?: Partial<NodeData> & { rowId?: string, fields?: FieldDef[] }
|
|
647
647
|
swimlane?: Partial<NodeData> & { rowId?: string, fields?: FieldDef[] }
|
|
648
648
|
}
|
|
649
|
-
status?: 'Created' | 'Ready' | 'Planned' | 'InProgress' | '
|
|
649
|
+
status?: 'Created' | 'Ready' | 'Planned' | 'InProgress' | 'Waiting' | 'Review' | 'Done' | 'Blocked' | 'Assigned' | 'Informational'
|
|
650
650
|
}
|
|
651
651
|
```
|
|
652
652
|
|
|
@@ -673,7 +673,7 @@ Create a standalone SLICE_BORDER node spanning an **existing** column. Unlike th
|
|
|
673
673
|
{
|
|
674
674
|
columnId: string // id of an existing column on this timeline
|
|
675
675
|
title: string // slice title — always taken from this field, never derived
|
|
676
|
-
status?: 'Created' | 'Ready' | 'Planned' | 'InProgress' | '
|
|
676
|
+
status?: 'Created' | 'Ready' | 'Planned' | 'InProgress' | 'Waiting' | 'Review' | 'Done' | 'Blocked' | 'Assigned' | 'Informational'
|
|
677
677
|
data?: Record<string, unknown> // optional node.data payload
|
|
678
678
|
meta?: Record<string, unknown> // optional extra meta fields (type, colId, title are always set explicitly and cannot be overridden here)
|
|
679
679
|
}
|
|
@@ -847,8 +847,8 @@ How much each slice of one context has been reworked — read-only, derived from
|
|
|
847
847
|
for it.
|
|
848
848
|
|
|
849
849
|
A slice's rework is read from its own SLICE_BORDER history. Going backwards means a step down the progress order
|
|
850
|
-
(Created → Ready → Planned → Assigned → InProgress →
|
|
851
|
-
`
|
|
850
|
+
(Created → Ready → Planned → Assigned → InProgress → Waiting → Review → Done), or reaching `Blocked` from
|
|
851
|
+
`Waiting`/`Review`/`Done`;
|
|
852
852
|
`Informational` is never scored. `reopens` counts transitions leading away from `Done`, `changes` counts writes to the
|
|
853
853
|
slice itself. This says nothing about edits to the elements inside a slice.
|
|
854
854
|
|
|
@@ -18,7 +18,7 @@ records that as a contract — the endpoint's **OpenAPI operation**, one per sli
|
|
|
18
18
|
|
|
19
19
|
## When
|
|
20
20
|
|
|
21
|
-
**Only when handover is on** — the task request's `Handover: on|off` line (authoritative; the runner resolves `run --handover` over the project setting), else `"handover": true` in `.eventmodelers/config.json`. With handover **off/unset**, do nothing: publish no contract, write no `## UI Contract` section, and finish the slice as `Done` (Step 4). The contract exists only for the UI kit that picks up `
|
|
21
|
+
**Only when handover is on** — the task request's `Handover: on|off` line (authoritative; the runner resolves `run --handover` over the project setting), else `"handover": true` in `.eventmodelers/config.json`. With handover **off/unset**, do nothing: publish no contract, write no `## UI Contract` section, and finish the slice as `Done` (Step 4). The contract exists only for the UI kit that picks up `Waiting` slices.
|
|
22
22
|
|
|
23
23
|
At the end of building a slice, **after** the endpoint exists (so the contract describes the real
|
|
24
24
|
route, not the plan), before the final commit:
|
|
@@ -99,7 +99,7 @@ every MARKDOWN node of the slice's column as a plain string in `slice.json` `not
|
|
|
99
99
|
`outline` / `fields` / `specs` projections leave `notes` out). The UI build kit therefore needs no
|
|
100
100
|
extra file and no board call.
|
|
101
101
|
|
|
102
|
-
## Step 4 — Completion status: `
|
|
102
|
+
## Step 4 — Completion status: `Waiting` instead of `Done`
|
|
103
103
|
|
|
104
104
|
A slice with a UI is only finished once the UI kit has built its half. Whether this build kit hands
|
|
105
105
|
over is decided per run, in this order: the task request's `Handover: on|off` line (authoritative — the
|
|
@@ -107,11 +107,11 @@ runner resolves `run --handover` over the project setting), else `"handover": tr
|
|
|
107
107
|
`.eventmodelers/config.json` (saved by `init --handover` / `eventmodelers config --handover on|off`).
|
|
108
108
|
|
|
109
109
|
- **On** — the build kit's "set the slice to `Done`" for a STATE_VIEW / STATE_CHANGE slice means
|
|
110
|
-
**`
|
|
111
|
-
kit's prompt says to call `update-slice-status` (a queued task), set `
|
|
110
|
+
**`Waiting`** instead: after the contract is published and the commit/merge succeeded. Where the build
|
|
111
|
+
kit's prompt says to call `update-slice-status` (a queued task), set `Waiting` through it,
|
|
112
112
|
mirrored in the local `index.json`. For a run-loop build (the task request names the slice), record it
|
|
113
|
-
with `npx @eventmodelers/cli slice-status
|
|
114
|
-
`update-slice-status`. The UI kit claims `
|
|
113
|
+
with `npx @eventmodelers/cli slice-status Waiting` — the run loop pushes it to the board; do not call
|
|
114
|
+
`update-slice-status`. The UI kit claims `Waiting` slices and sets `Done` when its UI is built.
|
|
115
115
|
- **Off / unset** — nothing changes: `Done`.
|
|
116
116
|
- Automations and translations have no UI → always `Done`.
|
|
117
117
|
|
|
@@ -26,7 +26,7 @@ Valid status values (case-sensitive):
|
|
|
26
26
|
| `Ready` | Modeling is done — specified and ready to be planned for implementation |
|
|
27
27
|
| `Planned` | Work is planned — queued for the backend build kit |
|
|
28
28
|
| `InProgress` | Work is actively in progress |
|
|
29
|
-
| `
|
|
29
|
+
| `Waiting` | Backend built and its UI contract published (`## UI Contract` in the slice's markdown note) — queued for the UI build kit |
|
|
30
30
|
| `Review` | Ready for review |
|
|
31
31
|
| `Done` | Completed |
|
|
32
32
|
| `Blocked` | Blocked by something |
|
|
@@ -53,9 +53,10 @@ When asked to build a slice, always follow this flow:
|
|
|
53
53
|
- **State-view** — `projections` or `queries` array is non-empty → invoke `/build-state-view`
|
|
54
54
|
- **State-change** — default (has `commands` / `events`) → invoke `/build-state-change`
|
|
55
55
|
3. Invoke the matching skill and follow its instructions completely. Do not deviate.
|
|
56
|
-
4. **
|
|
57
|
-
5.
|
|
58
|
-
6.
|
|
56
|
+
4. **Baseline gate**: run `npx @eventmodelers/cli build-baseline check --scope backend` first and act only on its verdict — `UNCHANGED` means nothing on the board changed since the last recorded build: do not rebuild, just run the slice's tests and finish; `NO_BASELINE`/`UNKNOWN` mean one full field-by-field diff of slice.json against the code; `CHANGED` lists exactly which elements changed, were added or removed — diff and fix only those. After the checks pass and before committing, run `build-baseline record --scope backend`. A screen or UI prompt change never triggers a backend build.
|
|
57
|
+
5. **Verify against slice.json**: After the skill completes, check that every command field, event field, and specification in slice.json appears in the implementation. No invented fields — if it is not in slice.json, it must not be in the code. This applies even when the slice was previously `Done` and reappears as `Planned` — never dismiss a mismatch as "already implemented" or harmless drift; diff slice.json against the code field by field and update the code to match every change.
|
|
58
|
+
6. Run quality checks (`./mvnw compile -q`, then the slice tests only).
|
|
59
|
+
7. If checks pass, commit with `feat: [Slice Name]` and set slice status to `Done`. For STATE_VIEW/STATE_CHANGE slices when `handover` is enabled the status to set is `Waiting`, not `Done` — see the `ui-contract` skill, Step 4.
|
|
59
60
|
|
|
60
61
|
After you are done, automatically run the tests for the slice that was edited.
|
|
61
62
|
|
|
@@ -42,7 +42,7 @@ You work within **exactly ONE context at a time** — the one named in `.build-k
|
|
|
42
42
|
If the tests for the slice are not yet named predictably, run `./mvnw test -q` and check for failures.
|
|
43
43
|
15. If checks pass, commit ALL changes with message: `feat: [Slice Name]` and merge back to main as FF merge ( update
|
|
44
44
|
first )
|
|
45
|
-
16. Record the outcome with `npx @eventmodelers/cli slice-status Done` — not by editing index.json, and do not call `update-slice-status`: the run loop pushes the status to the board when your turn ends. For STATE_VIEW/STATE_CHANGE slices when `handover` is enabled the status to record is `
|
|
45
|
+
16. Record the outcome with `npx @eventmodelers/cli slice-status Done` — not by editing index.json, and do not call `update-slice-status`: the run loop pushes the status to the board when your turn ends. For STATE_VIEW/STATE_CHANGE slices when `handover` is enabled the status to record is `Waiting`, not `Done` — see the `ui-contract` skill, Step 4. A slice you could not finish needs no status: leave it as it is and the run loop discards the attempt.
|
|
46
46
|
17. Record any reusable learning you have not recorded yet (see **Recording Learnings**).
|
|
47
47
|
18. If an entry in `.build-kit/AGENTS.md` turned out wrong or obsolete, retract it (see **Recording Learnings**).
|
|
48
48
|
19. Finish the iteration.
|
|
@@ -64,6 +64,16 @@ npx @eventmodelers/cli learn "<one terse line>" --topic "<topic>"
|
|
|
64
64
|
- `--scope system` for what is true of the modeled domain (a business rule, a naming convention of the model); `repo` (the default) for the codebase and its tooling. `--tag <tag>` labels it (repeatable).
|
|
65
65
|
- One in `.build-kit/AGENTS.md` that turned out wrong or obsolete: `npx @eventmodelers/cli learnings --ids` lists each with its id, `npx @eventmodelers/cli learn --retract <id>` removes it.
|
|
66
66
|
|
|
67
|
+
### Recording Info
|
|
68
|
+
|
|
69
|
+
Something that is **not** a reusable learning — you cannot change something and why, a decision you took, a note for whoever reads the board — is an info, not a learning. Never leave it only in your reply:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
npx @eventmodelers/cli info "<one terse line>" --kind limitation|decision|note
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
It is recorded as an event and posted as a comment on the slice you are building (`--slice <id>` to name another). Reusable knowledge stays a `learn`.
|
|
76
|
+
|
|
67
77
|
## Update AGENTS.md Files
|
|
68
78
|
|
|
69
79
|
Before committing, check if any edited files have learnings worth preserving in nearby AGENTS.md files:
|
|
@@ -58,6 +58,20 @@ This is the build trigger. Setting `InProgress` and building are one atomic step
|
|
|
58
58
|
|
|
59
59
|
4. Invoke the matching skill and follow its instructions **completely**. Do NOT implement the slice manually.
|
|
60
60
|
|
|
61
|
+
**Baseline gate** — before touching any code, run `npx @eventmodelers/cli build-baseline check --scope backend`.
|
|
62
|
+
It compares the board's node hashes of every element of the slice (commands, events, read models,
|
|
63
|
+
processors, specifications, ...) with what was recorded after the last successful build:
|
|
64
|
+
- `UNCHANGED` — nothing on the board changed. Do not rebuild or re-diff; run the slice's tests and
|
|
65
|
+
finish. Only now is "no code changes needed" a valid outcome.
|
|
66
|
+
- `NO_BASELINE` / `UNKNOWN` — no recorded build, or the board could not be read: do one full
|
|
67
|
+
field-by-field diff of slice.json against the code (never treat `UNKNOWN` as `UNCHANGED`).
|
|
68
|
+
- `CHANGED` — it lists the elements that changed, were added or were removed. Diff slice.json
|
|
69
|
+
against the code for exactly those and fix every drift; leave what matches alone.
|
|
70
|
+
|
|
71
|
+
When the checks pass, run `npx @eventmodelers/cli build-baseline record --scope backend` **before
|
|
72
|
+
committing**, so `ui-baseline.json` is committed with the slice. Never record without having done the
|
|
73
|
+
work the verdict asked for. Screens and UI prompts are not this kit's business and never trigger a build.
|
|
74
|
+
|
|
61
75
|
5. **Verify against slice.json**: Cross-check the implementation — every command field, event field, and specification in slice.json must appear in the code. No invented fields — if it is not in slice.json, it must not be in the code.
|
|
62
76
|
|
|
63
77
|
6. Run quality checks:
|
|
@@ -98,6 +112,16 @@ npx @eventmodelers/cli learn "<one terse line>" --topic "<topic>"
|
|
|
98
112
|
- `--scope system` for what is true of the modeled domain (a business rule, a naming convention of the model); `repo` (the default) for the codebase and its tooling. `--tag <tag>` labels it (repeatable).
|
|
99
113
|
- One in `.build-kit/AGENTS.md` that turned out wrong or obsolete: `npx @eventmodelers/cli learnings --ids` lists each with its id, `npx @eventmodelers/cli learn --retract <id>` removes it.
|
|
100
114
|
|
|
115
|
+
### Recording Info
|
|
116
|
+
|
|
117
|
+
Something that is **not** a reusable learning — you cannot change something and why, a decision you took, a note for whoever reads the board — is an info, not a learning. Never leave it only in your reply:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
npx @eventmodelers/cli info "<one terse line>" --kind limitation|decision|note
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
It is recorded as an event and posted as a comment on the slice you are building (`--slice <id>` to name another). Reusable knowledge stays a `learn`.
|
|
124
|
+
|
|
101
125
|
## Important
|
|
102
126
|
|
|
103
127
|
- Process **one task per iteration**.
|
|
@@ -43,9 +43,10 @@ When asked to build a slice, always follow this flow:
|
|
|
43
43
|
- **State-view** — `projections` or `queries` array is non-empty → invoke `/build-state-view`
|
|
44
44
|
- **State-change** — default (has `commands` / `events`) → invoke `/build-state-change`
|
|
45
45
|
3. Invoke the matching skill and follow its instructions completely. Do not deviate.
|
|
46
|
-
4. **
|
|
47
|
-
5.
|
|
48
|
-
6.
|
|
46
|
+
4. **Baseline gate**: run `npx @eventmodelers/cli build-baseline check --scope backend` first and act only on its verdict — `UNCHANGED` means nothing on the board changed since the last recorded build: do not rebuild, just run the slice's tests and finish; `NO_BASELINE`/`UNKNOWN` mean one full field-by-field diff of slice.json against the code; `CHANGED` lists exactly which elements changed, were added or removed — diff and fix only those. After the checks pass and before committing, run `build-baseline record --scope backend`. A screen or UI prompt change never triggers a backend build.
|
|
47
|
+
5. **Verify against slice.json**: After the skill completes, check that every command field, event field, and specification in slice.json appears in the implementation. No invented fields — if it is not in slice.json, it must not be in the code. This applies even when the slice was previously `Done` and reappears as `Planned` — never dismiss a mismatch as "already implemented" or harmless drift; diff slice.json against the code field by field and update the code to match every change.
|
|
48
|
+
6. Run quality checks (TODO: this stack's build + test commands), then the slice tests only.
|
|
49
|
+
7. If checks pass, commit with `feat: [Slice Name]` and set slice status to `Done`. For STATE_VIEW/STATE_CHANGE slices when `handover` is enabled the status to set is `Waiting`, not `Done` — see the `ui-contract` skill, Step 4.
|
|
49
50
|
|
|
50
51
|
After you are done, automatically run the tests for the slice that was edited.
|
|
51
52
|
|
|
@@ -32,7 +32,7 @@ You work within **exactly ONE context at a time** — the one named in `.build-k
|
|
|
32
32
|
12. Only when `handover` is on (the task's `Handover: on` line), invoke the `ui-contract` skill for STATE_VIEW / STATE_CHANGE slices; with handover off skip this step (publishes the UI Contract section to the slice's feedback-lane markdown node)
|
|
33
33
|
13. Run quality checks — TODO: your stack's build command, TODO: your stack's test command (slice-scoped only; do not run all tests).
|
|
34
34
|
14. If checks pass, commit ALL changes with message: `feat: [Slice Name]` and merge back to main as FF merge (update first)
|
|
35
|
-
15. Record the outcome with `npx @eventmodelers/cli slice-status Done` — not by editing index.json, and do not call `update-slice-status`: the run loop pushes the status to the board when your turn ends. For STATE_VIEW/STATE_CHANGE slices when `handover` is enabled the status to record is `
|
|
35
|
+
15. Record the outcome with `npx @eventmodelers/cli slice-status Done` — not by editing index.json, and do not call `update-slice-status`: the run loop pushes the status to the board when your turn ends. For STATE_VIEW/STATE_CHANGE slices when `handover` is enabled the status to record is `Waiting`, not `Done` — see the `ui-contract` skill, Step 4. A slice you could not finish needs no status: leave it as it is and the run loop discards the attempt.
|
|
36
36
|
16. Record any reusable learning you have not recorded yet (see **Recording Learnings**).
|
|
37
37
|
17. If an entry in `.build-kit/AGENTS.md` turned out wrong or obsolete, retract it (see **Recording Learnings**).
|
|
38
38
|
18. Finish the iteration.
|
|
@@ -54,6 +54,16 @@ npx @eventmodelers/cli learn "<one terse line>" --topic "<topic>"
|
|
|
54
54
|
- `--scope system` for what is true of the modeled domain (a business rule, a naming convention of the model); `repo` (the default) for the codebase and its tooling. `--tag <tag>` labels it (repeatable).
|
|
55
55
|
- One in `.build-kit/AGENTS.md` that turned out wrong or obsolete: `npx @eventmodelers/cli learnings --ids` lists each with its id, `npx @eventmodelers/cli learn --retract <id>` removes it.
|
|
56
56
|
|
|
57
|
+
### Recording Info
|
|
58
|
+
|
|
59
|
+
Something that is **not** a reusable learning — you cannot change something and why, a decision you took, a note for whoever reads the board — is an info, not a learning. Never leave it only in your reply:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
npx @eventmodelers/cli info "<one terse line>" --kind limitation|decision|note
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
It is recorded as an event and posted as a comment on the slice you are building (`--slice <id>` to name another). Reusable knowledge stays a `learn`.
|
|
66
|
+
|
|
57
67
|
## Update AGENTS.md Files
|
|
58
68
|
|
|
59
69
|
Before committing, check if any edited files have learnings worth preserving in nearby AGENTS.md files — API patterns/conventions, gotchas, dependencies between files, testing approaches, configuration/environment requirements.
|
|
@@ -56,6 +56,20 @@ This is the build trigger. Setting `InProgress` and building are one atomic step
|
|
|
56
56
|
|
|
57
57
|
4. Invoke the matching skill and follow its instructions **completely**. Do NOT implement the slice manually.
|
|
58
58
|
|
|
59
|
+
**Baseline gate** — before touching any code, run `npx @eventmodelers/cli build-baseline check --scope backend`.
|
|
60
|
+
It compares the board's node hashes of every element of the slice (commands, events, read models,
|
|
61
|
+
processors, specifications, ...) with what was recorded after the last successful build:
|
|
62
|
+
- `UNCHANGED` — nothing on the board changed. Do not rebuild or re-diff; run the slice's tests and
|
|
63
|
+
finish. Only now is "no code changes needed" a valid outcome.
|
|
64
|
+
- `NO_BASELINE` / `UNKNOWN` — no recorded build, or the board could not be read: do one full
|
|
65
|
+
field-by-field diff of slice.json against the code (never treat `UNKNOWN` as `UNCHANGED`).
|
|
66
|
+
- `CHANGED` — it lists the elements that changed, were added or were removed. Diff slice.json
|
|
67
|
+
against the code for exactly those and fix every drift; leave what matches alone.
|
|
68
|
+
|
|
69
|
+
When the checks pass, run `npx @eventmodelers/cli build-baseline record --scope backend` **before
|
|
70
|
+
committing**, so `ui-baseline.json` is committed with the slice. Never record without having done the
|
|
71
|
+
work the verdict asked for. Screens and UI prompts are not this kit's business and never trigger a build.
|
|
72
|
+
|
|
59
73
|
5. **Verify against slice.json**: cross-check the implementation — every command field, event field, and specification in slice.json must appear in the code. No invented fields — if it is not in slice.json, it must not be in the code.
|
|
60
74
|
|
|
61
75
|
6. Run quality checks (TODO: your stack's build + test commands — slice-scoped tests only, not the full suite).
|
|
@@ -98,6 +112,16 @@ npx @eventmodelers/cli learn "<one terse line>" --topic "<topic>"
|
|
|
98
112
|
- `--scope system` for what is true of the modeled domain (a business rule, a naming convention of the model); `repo` (the default) for the codebase and its tooling. `--tag <tag>` labels it (repeatable).
|
|
99
113
|
- One in `.build-kit/AGENTS.md` that turned out wrong or obsolete: `npx @eventmodelers/cli learnings --ids` lists each with its id, `npx @eventmodelers/cli learn --retract <id>` removes it.
|
|
100
114
|
|
|
115
|
+
### Recording Info
|
|
116
|
+
|
|
117
|
+
Something that is **not** a reusable learning — you cannot change something and why, a decision you took, a note for whoever reads the board — is an info, not a learning. Never leave it only in your reply:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
npx @eventmodelers/cli info "<one terse line>" --kind limitation|decision|note
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
It is recorded as an event and posted as a comment on the slice you are building (`--slice <id>` to name another). Reusable knowledge stays a `learn`.
|
|
124
|
+
|
|
101
125
|
## Important
|
|
102
126
|
|
|
103
127
|
- Process **one task per iteration**.
|
|
@@ -48,11 +48,12 @@ When asked to build a slice, always follow this flow:
|
|
|
48
48
|
- **State-view** — `projections` or `queries` array is non-empty → invoke `/build-state-view`
|
|
49
49
|
- **State-change** — default (has `commands` / `events`) → invoke `/build-state-change`
|
|
50
50
|
4. Invoke the matching skill and follow its instructions completely. Do not deviate.
|
|
51
|
-
5. **
|
|
52
|
-
6.
|
|
53
|
-
7.
|
|
54
|
-
8.
|
|
55
|
-
9.
|
|
51
|
+
5. **Baseline gate**: run `npx @eventmodelers/cli build-baseline check --scope backend` first and act only on its verdict — `UNCHANGED` means nothing on the board changed since the last recorded build: do not rebuild, just run the slice's tests and finish; `NO_BASELINE`/`UNKNOWN` mean one full field-by-field diff of slice.json against the code; `CHANGED` lists exactly which elements changed, were added or removed — diff and fix only those. After the checks pass and before committing, run `build-baseline record --scope backend`. A screen or UI prompt change never triggers a backend build.
|
|
52
|
+
6. **Verify against slice.json**: After the skill completes, check that every command field, event field, read model field and specification in slice.json has its counterpart in the implementation. No invented fields — if it is not in slice.json, it must not be in the code. This applies even when the slice was previously `Done` and reappears as `Planned` — never dismiss a mismatch as "already implemented" or harmless drift; diff slice.json against the code field by field and update the code to match every change.
|
|
53
|
+
7. Run the quality checks from `.build-kit/ARCHITECTURE.md` (build/compile, then only the tests this slice touched).
|
|
54
|
+
8. If checks pass, make sure the slice's row in the Slice map is added/updated and commit with `feat: [Slice Name]`.
|
|
55
|
+
9. Invoke `/record-evidence` — it writes the implementation evidence (element → code mapping, files, specification → test mapping, seams, assumptions, commit) as a markdown note into the slice's column, in the chapter's `Implementation` feedback lane.
|
|
56
|
+
10. Set slice status to `Done`.
|
|
56
57
|
|
|
57
58
|
After you are done, automatically run the tests for the slice that was edited.
|
|
58
59
|
|
|
@@ -36,7 +36,7 @@ You work within **exactly ONE context at a time** — the one named in `.build-k
|
|
|
36
36
|
13. Run the quality checks listed in `.build-kit/ARCHITECTURE.md` — build/compile, then only the tests touched by this slice (do not run all tests).
|
|
37
37
|
14. If checks pass, commit ALL changes with message: `feat: [Slice Name]` and merge back to main as FF merge (update first)
|
|
38
38
|
15. Invoke `/record-evidence` to write the implementation evidence (element → code mapping, files, specification → test mapping, seams, assumptions, commit) as a note into the slice's column, in the chapter's `Implementation` feedback lane.
|
|
39
|
-
16. Record the outcome with `npx @eventmodelers/cli slice-status Done` — not by editing index.json, and do not call `update-slice-status`: the run loop pushes the status to the board when your turn ends. For STATE_VIEW/STATE_CHANGE slices when `handover` is enabled the status to record is `
|
|
39
|
+
16. Record the outcome with `npx @eventmodelers/cli slice-status Done` — not by editing index.json, and do not call `update-slice-status`: the run loop pushes the status to the board when your turn ends. For STATE_VIEW/STATE_CHANGE slices when `handover` is enabled the status to record is `Waiting`, not `Done` — see the `ui-contract` skill, Step 4. A slice you could not finish needs no status: leave it as it is and the run loop discards the attempt.
|
|
40
40
|
17. Record any reusable learning you have not recorded yet (see **Recording Learnings**).
|
|
41
41
|
18. If an entry in `.build-kit/AGENTS.md` turned out wrong or obsolete, retract it (see **Recording Learnings**).
|
|
42
42
|
19. Finish the iteration.
|
|
@@ -58,6 +58,16 @@ npx @eventmodelers/cli learn "<one terse line>" --topic "<topic>"
|
|
|
58
58
|
- `--scope system` for what is true of the modeled domain (a business rule, a naming convention of the model); `repo` (the default) for the codebase and its tooling. `--tag <tag>` labels it (repeatable).
|
|
59
59
|
- One in `.build-kit/AGENTS.md` that turned out wrong or obsolete: `npx @eventmodelers/cli learnings --ids` lists each with its id, `npx @eventmodelers/cli learn --retract <id>` removes it.
|
|
60
60
|
|
|
61
|
+
### Recording Info
|
|
62
|
+
|
|
63
|
+
Something that is **not** a reusable learning — you cannot change something and why, a decision you took, a note for whoever reads the board — is an info, not a learning. Never leave it only in your reply:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
npx @eventmodelers/cli info "<one terse line>" --kind limitation|decision|note
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
It is recorded as an event and posted as a comment on the slice you are building (`--slice <id>` to name another). Reusable knowledge stays a `learn`.
|
|
70
|
+
|
|
61
71
|
## Update AGENTS.md Files
|
|
62
72
|
|
|
63
73
|
Before committing, check if any edited files have learnings worth preserving in nearby AGENTS.md files — API patterns/conventions, gotchas, dependencies between files, testing approaches, configuration/environment requirements.
|
|
@@ -58,6 +58,20 @@ This is the build trigger. Setting `InProgress` and building are one atomic step
|
|
|
58
58
|
|
|
59
59
|
5. Invoke the matching skill and follow its instructions **completely**. Do NOT implement the slice manually.
|
|
60
60
|
|
|
61
|
+
**Baseline gate** — before touching any code, run `npx @eventmodelers/cli build-baseline check --scope backend`.
|
|
62
|
+
It compares the board's node hashes of every element of the slice (commands, events, read models,
|
|
63
|
+
processors, specifications, ...) with what was recorded after the last successful build:
|
|
64
|
+
- `UNCHANGED` — nothing on the board changed. Do not rebuild or re-diff; run the slice's tests and
|
|
65
|
+
finish. Only now is "no code changes needed" a valid outcome.
|
|
66
|
+
- `NO_BASELINE` / `UNKNOWN` — no recorded build, or the board could not be read: do one full
|
|
67
|
+
field-by-field diff of slice.json against the code (never treat `UNKNOWN` as `UNCHANGED`).
|
|
68
|
+
- `CHANGED` — it lists the elements that changed, were added or were removed. Diff slice.json
|
|
69
|
+
against the code for exactly those and fix every drift; leave what matches alone.
|
|
70
|
+
|
|
71
|
+
When the checks pass, run `npx @eventmodelers/cli build-baseline record --scope backend` **before
|
|
72
|
+
committing**, so `ui-baseline.json` is committed with the slice. Never record without having done the
|
|
73
|
+
work the verdict asked for. Screens and UI prompts are not this kit's business and never trigger a build.
|
|
74
|
+
|
|
61
75
|
6. **Verify against slice.json**: cross-check the implementation — every command field, event field, and specification in slice.json must appear in the code. No invented fields — if it is not in slice.json, it must not be in the code.
|
|
62
76
|
|
|
63
77
|
7. Run the quality checks listed in `.build-kit/ARCHITECTURE.md` (build/compile, then only the tests touched by this slice — not the full suite).
|
|
@@ -102,6 +116,16 @@ npx @eventmodelers/cli learn "<one terse line>" --topic "<topic>"
|
|
|
102
116
|
- `--scope system` for what is true of the modeled domain (a business rule, a naming convention of the model); `repo` (the default) for the codebase and its tooling. `--tag <tag>` labels it (repeatable).
|
|
103
117
|
- One in `.build-kit/AGENTS.md` that turned out wrong or obsolete: `npx @eventmodelers/cli learnings --ids` lists each with its id, `npx @eventmodelers/cli learn --retract <id>` removes it.
|
|
104
118
|
|
|
119
|
+
### Recording Info
|
|
120
|
+
|
|
121
|
+
Something that is **not** a reusable learning — you cannot change something and why, a decision you took, a note for whoever reads the board — is an info, not a learning. Never leave it only in your reply:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
npx @eventmodelers/cli info "<one terse line>" --kind limitation|decision|note
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
It is recorded as an event and posted as a comment on the slice you are building (`--slice <id>` to name another). Reusable knowledge stays a `learn`.
|
|
128
|
+
|
|
105
129
|
## Important
|
|
106
130
|
|
|
107
131
|
- Process **one task per iteration**.
|
|
@@ -87,13 +87,14 @@ When asked to build a slice, always follow this flow:
|
|
|
87
87
|
- **State-view** — `projections` or `queries` array is non-empty → invoke `/build-state-view`
|
|
88
88
|
- **State-change** — default (has `commands` / `events`) → invoke `/build-state-change`
|
|
89
89
|
3. Invoke the matching skill and follow its instructions completely. Do not deviate.
|
|
90
|
-
4. **
|
|
90
|
+
4. **Baseline gate**: run `npx @eventmodelers/cli build-baseline check --scope backend` first and act only on its verdict — `UNCHANGED` means nothing on the board changed since the last recorded build: do not rebuild, just run the slice's tests and finish; `NO_BASELINE`/`UNKNOWN` mean one full field-by-field diff of slice.json against the code; `CHANGED` lists exactly which elements changed, were added or removed — diff and fix only those. After the checks pass and before committing, run `build-baseline record --scope backend`. A screen or UI prompt change never triggers a backend build.
|
|
91
|
+
5. **Verify against slice.json**: After the skill completes, check that every command field, event field,
|
|
91
92
|
and specification in slice.json appears in the implementation. No invented fields — if it is not in
|
|
92
93
|
slice.json, it must not be in the code. This applies even when the slice was previously `Done` and
|
|
93
94
|
reappears as `Planned` — never dismiss a mismatch as "already implemented" or harmless drift; diff
|
|
94
95
|
slice.json against the code field by field and update the code to match every change.
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
6. Run quality checks (`./mvnw compile -q`, then the slice tests only).
|
|
97
|
+
7. If checks pass, commit with `feat: [Slice Name]` and set slice status to `Done`. For STATE_VIEW/STATE_CHANGE slices when `handover` is enabled the status to set is `Waiting`, not `Done` — see the `ui-contract` skill, Step 4.
|
|
97
98
|
|
|
98
99
|
After you are done, automatically run the tests for the slice that was edited.
|
|
99
100
|
|