You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**SubagentStop hook: seniority prefix.** The fallback agent detection pattern matched "As Principal Architect" → `principal-architect` instead of `architect`, breaking slug lookup and gate matching. Now extracts only the role word.
12
+
-**Missing page.** Added `/edikt:guideline:compile` website page (was dead link).
13
+
-**Test fixes.** All 25 suites pass after v0.3.0 regressions.
14
+
15
+
### Artifact generation: JSONB support and domain class diagram
16
+
17
+
`/edikt:sdlc:artifacts` now handles projects using JSONB aggregate storage (common DDD pattern in PostgreSQL) and generates a domain class diagram alongside the data model.
18
+
19
+
-**Storage strategy detection.** When DB type is `sql` or `mixed`, the command scans spec content and migrations for JSONB signals (`jsonb`, `json column`, `aggregate storage`, `embedded entity`, `nested entity`, etc.). Detected strategy is shown in the state checkpoint and routing output.
20
+
-**Three entity modes in `data-model.mmd`.** When storage strategy is `jsonb-aggregate`, the ERD distinguishes physical tables (normal), JSONB-embedded entities (relationship label contains `jsonb`), and reference-only entities from external bounded contexts (relationship label contains `ref`). Makes nested structure visible instead of hiding it in JSONB column comments.
21
+
-**Domain class diagram (`model.mmd`).** New artifact type, always generated alongside the data model regardless of DB type. Mermaid `classDiagram` showing aggregate roots, value objects, entities, inheritance, composition, and domain methods. Reviewed by the architect agent.
22
+
23
+
### Configurable artifact spec versions
24
+
25
+
Artifact templates now use configurable spec versions instead of hardcoded values. Defaults updated to latest stable:
26
+
27
+
| Format | Previous | Now (default) |
28
+
|---|---|---|
29
+
| OpenAPI | 3.0.0 |**3.1.0**|
30
+
| AsyncAPI | 2.6.0 |**3.0.0**|
31
+
| JSON Schema | draft-07 |**2020-12**|
32
+
33
+
Teams can pin older versions in `.edikt/config.yaml`:
34
+
35
+
```yaml
36
+
artifacts:
37
+
versions:
38
+
openapi: "3.0.0"# pin for tooling compatibility
39
+
asyncapi: "2.6.0"# pin if not ready for 3.0 breaking changes
The AsyncAPI template was updated for the 3.0 structure (separate `channels` and `operations` blocks replacing `publish`/`subscribe`). When pinning `asyncapi: "2.6.0"`, the agent uses the 2.x structure.
Copy file name to clipboardExpand all lines: commands/gov/score.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,6 +147,14 @@ Overall: {x}/10
147
147
}
148
148
```
149
149
150
+
### 8. Confirm
151
+
152
+
```
153
+
✅ Governance scored: {overall}/10
154
+
155
+
Next: Run /edikt:gov:review to review language quality, or /edikt:invariant:review for per-artifact scoring.
156
+
```
157
+
150
158
---
151
159
152
160
REMEMBER: This command scores the COMPILED output, not source documents. It answers: "How well will Claude follow our governance?" Run per-artifact reviews for source quality. Run this for the aggregate picture. Designed for CI — the `--json` output can be parsed by any CI tool.
@@ -127,6 +147,7 @@ Show the list with checkmarks. Include DB_TYPE source warning when applicable:
127
147
128
148
```
129
149
✓ data-model.mmd — sql detected via config (Mermaid ERD)
150
+
✓ model.mmd — domain class diagram (auto, alongside data-model)
130
151
✓ contracts/api.yaml — API endpoint references
131
152
✓ test-strategy.md — testing strategy section
132
153
✗ migrations/ — no schema changes
@@ -150,6 +171,7 @@ Each agent receives:
150
171
- The source PRD content (read from `source_prd:` in spec frontmatter)
151
172
- The project-context.md for project context
152
173
- Any referenced ADRs
174
+
- STORAGE_STRATEGY value (when generating data-model or model artifacts)
153
175
- The ACTIVE CONSTRAINTS block (if CONSTRAINTS is not `none`) injected before the artifact-specific instruction, in this format:
154
176
155
177
```
@@ -162,10 +184,13 @@ ACTIVE CONSTRAINTS (from governance — these override artifact defaults):
162
184
163
185
Show routing as it happens. Include constraint count when CONSTRAINTS is not `none`:
164
186
```
165
-
🔀 edikt: routing to dba (2 active constraints applied) — data-model.mmd
187
+
🔀 edikt: routing to dba (2 active constraints applied) — data-model.mmd [jsonb-aggregate]
188
+
🔀 edikt: routing to architect — model.mmd
166
189
🔀 edikt: routing to api — contracts/api.yaml
167
190
```
168
191
192
+
When STORAGE_STRATEGY is `jsonb-aggregate`, include `[jsonb-aggregate]` in the routing line for `data-model.mmd`. When `normalized`, omit the tag.
193
+
169
194
If CONSTRAINTS is `none`, omit the constraint count entirely.
170
195
171
196
### 5. Artifact Templates
@@ -183,26 +208,60 @@ Each generated artifact gets a design blueprint header. Native-format artifacts
183
208
**Frontmatter artifacts** (`test-strategy.md`, `config-spec.md`): use YAML frontmatter with `type: artifact`, `artifact_type:`, `status: draft`, `reviewed_by:`.
184
209
185
210
**data-model.mmd** — Mermaid ERD (when DB_TYPE is `sql`):
211
+
212
+
The ERD supports three entity modes based on STORAGE_STRATEGY:
213
+
214
+
| Mode | When | Rendering |
215
+
|---|---|---|
216
+
| Physical table | Entity has its own table (default) | Normal entity block |
217
+
| JSONB-embedded | STORAGE_STRATEGY is `jsonb-aggregate` and entity is stored as JSONB inside another table | Entity block with `%% JSONB-embedded in {ParentTable}` comment. Relationship label MUST include `jsonb` (e.g., `"contains jsonb"`) |
218
+
| Reference-only | Entity belongs to an external bounded context | Entity block with `%% External: {bounded context}` comment. Only PK field shown. Relationship label MUST include `ref` (e.g., `"references ref"`) |
219
+
220
+
When STORAGE_STRATEGY is `normalized`, all entities are physical tables (standard ERD behavior).
221
+
222
+
When STORAGE_STRATEGY is `jsonb-aggregate`:
223
+
- The aggregate root is a physical table with a JSONB column
224
+
- Nested entities stored in that JSONB column are JSONB-embedded entities
225
+
- Show the JSONB column in the aggregate root as `jsonb {column_name} "JSONB"` with a comment listing what it contains
226
+
- JSONB-embedded entities still get their own entity block (so the structure is visible) but are marked with the JSONB comment and relationship label
227
+
186
228
```
187
229
%% Design blueprint — implement in your stack's native format. This artifact defines intent, not implementation.
Include one entity block per entity. Add `PK`, `FK`, `UK` markers on key fields. List all relationships with cardinality. Add `%% Index: {field} — {rationale}` comments for recommended indexes.
257
+
Include one entity block per entity. Add `PK`, `FK`, `UK` markers on key fields. List all relationships with cardinality. Add `%% Index: {field} — {rationale}` comments for recommended indexes. When STORAGE_STRATEGY is `normalized`, omit the `storage_strategy` comment and JSONB-specific elements — produce a standard ERD.
199
258
200
259
**data-model.schema.yaml** — JSON Schema in YAML (when DB_TYPE is `document-mongo`):
201
260
```yaml
202
261
# Design blueprint — implement in your stack's native format. This artifact defines intent, not implementation.
For `mixed` DB_TYPE, generate one data model artifact per detected sub-type using the suffix naming convention (`data-model-sql.mmd`, `data-model-mongo.schema.yaml`, `data-model-dynamo.md`, `data-model-kv.md`).
278
337
279
-
**contracts/api.yaml** — OpenAPI 3.0:
338
+
**model.mmd** — Domain class diagram (always generated alongside data-model, any DB_TYPE):
339
+
340
+
This artifact shows the domain model independent of storage — entities, value objects, inheritance, and relationships. It complements the data-model artifact (which shows storage structure) by showing domain semantics.
341
+
342
+
```
343
+
%% Design blueprint — implement in your stack's native format. This artifact defines intent, not implementation.
0 commit comments