@adia-ai/adia-ui-factory 0.2.2 → 0.2.4

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 (95) hide show
  1. package/.claude-plugin/plugin.json +12 -3
  2. package/.mcp.json +1 -1
  3. package/CHANGELOG.md +12 -0
  4. package/README.md +24 -1
  5. package/bin/adia-scaffold +93 -13
  6. package/package.json +1 -1
  7. package/references/shell-embed.md +10 -0
  8. package/references/spa-architecture.md +7 -0
  9. package/skills/adia-ui-kit/CHANGELOG.md +41 -0
  10. package/skills/adia-ui-kit/SKILL.md +442 -0
  11. package/skills/adia-ui-kit/assets/figma-make/guidelines/Guidelines.md +87 -0
  12. package/skills/adia-ui-kit/assets/figma-make/guidelines/components.md +142 -0
  13. package/skills/adia-ui-kit/assets/figma-make/guidelines/styles.md +118 -0
  14. package/skills/adia-ui-kit/assets/figma-make/guidelines/tokens.md +120 -0
  15. package/skills/adia-ui-kit/assets/team-scaffold/archive-README.md +30 -0
  16. package/skills/adia-ui-kit/assets/team-scaffold/drafts-README.md +57 -0
  17. package/skills/adia-ui-kit/assets/team-scaffold/inbox-README.md +76 -0
  18. package/skills/adia-ui-kit/assets/team-scaffold/outbox-README.md +46 -0
  19. package/skills/adia-ui-kit/assets/team-scaffold/team-root.README.md +51 -0
  20. package/skills/adia-ui-kit/assets/team-scaffold/tickets-README.md +208 -0
  21. package/skills/adia-ui-kit/assets/team-scaffold/tickets-REGISTRY.md +81 -0
  22. package/skills/adia-ui-kit/assets/templates/AGENTS.template.md +128 -0
  23. package/skills/adia-ui-kit/assets/templates/CLAUDE.template.md +1 -0
  24. package/skills/adia-ui-kit/assets/templates/FEEDBACK-OMISSIONS-DEFENSE.template.md +150 -0
  25. package/skills/adia-ui-kit/assets/templates/FEEDBACK.template.md +213 -0
  26. package/skills/adia-ui-kit/assets/templates/RESPONSE.template.md +114 -0
  27. package/skills/adia-ui-kit/assets/templates/figma-make-guidelines.md +90 -0
  28. package/skills/adia-ui-kit/evals/adversarial-content-trust.json +83 -0
  29. package/skills/adia-ui-kit/evals/evals.json +55 -0
  30. package/skills/adia-ui-kit/evals/routing-corpus.json +121 -0
  31. package/skills/adia-ui-kit/evals/teach-routing-cases.json +92 -0
  32. package/skills/adia-ui-kit/references/capabilities.md +245 -0
  33. package/skills/adia-ui-kit/references/catalog-lookup.md +186 -0
  34. package/skills/adia-ui-kit/references/changelog-archive/CHANGELOG-v1.md +8 -0
  35. package/skills/adia-ui-kit/references/changelog-archive/CHANGELOG-v2.md +3585 -0
  36. package/skills/adia-ui-kit/references/changelog-archive/CHANGELOG-v3.md +1899 -0
  37. package/skills/adia-ui-kit/references/common-gotchas-consumer.md +522 -0
  38. package/skills/adia-ui-kit/references/component-literacy.md +291 -0
  39. package/skills/adia-ui-kit/references/composition.md +245 -0
  40. package/skills/adia-ui-kit/references/correction-loop.md +462 -0
  41. package/skills/adia-ui-kit/references/css-policy.md +343 -0
  42. package/skills/adia-ui-kit/references/decision-model.md +158 -0
  43. package/skills/adia-ui-kit/references/diagnostic-output.md +57 -0
  44. package/skills/adia-ui-kit/references/docs-catalog.md +239 -0
  45. package/skills/adia-ui-kit/references/exclusions.md +225 -0
  46. package/skills/adia-ui-kit/references/feedback-authoring.md +466 -0
  47. package/skills/adia-ui-kit/references/figma-make.md +244 -0
  48. package/skills/adia-ui-kit/references/flows-auth.md +307 -0
  49. package/skills/adia-ui-kit/references/flows-content.md +206 -0
  50. package/skills/adia-ui-kit/references/flows-data.md +348 -0
  51. package/skills/adia-ui-kit/references/flows-interaction.md +181 -0
  52. package/skills/adia-ui-kit/references/flows-shells.md +336 -0
  53. package/skills/adia-ui-kit/references/gap-detection.md +266 -0
  54. package/skills/adia-ui-kit/references/harness.md +284 -0
  55. package/skills/adia-ui-kit/references/loading-protocol.md +406 -0
  56. package/skills/adia-ui-kit/references/local-link.md +198 -0
  57. package/skills/adia-ui-kit/references/mcp.md +401 -0
  58. package/skills/adia-ui-kit/references/migration.md +116 -0
  59. package/skills/adia-ui-kit/references/mission.md +194 -0
  60. package/skills/adia-ui-kit/references/mode-routing.md +298 -0
  61. package/skills/adia-ui-kit/references/patterns-agent.md +223 -0
  62. package/skills/adia-ui-kit/references/patterns-data.md +1065 -0
  63. package/skills/adia-ui-kit/references/patterns-forms.md +223 -0
  64. package/skills/adia-ui-kit/references/patterns-layout.md +326 -0
  65. package/skills/adia-ui-kit/references/patterns-recipes.md +1416 -0
  66. package/skills/adia-ui-kit/references/patterns-shells.md +1097 -0
  67. package/skills/adia-ui-kit/references/patterns-traits.md +259 -0
  68. package/skills/adia-ui-kit/references/patterns-wiring.md +339 -0
  69. package/skills/adia-ui-kit/references/pev-rationale.md +137 -0
  70. package/skills/adia-ui-kit/references/reasoning-gate.md +146 -0
  71. package/skills/adia-ui-kit/references/reasoning-methodologies.md +112 -0
  72. package/skills/adia-ui-kit/references/recon.md +192 -0
  73. package/skills/adia-ui-kit/references/rendering-model.md +431 -0
  74. package/skills/adia-ui-kit/references/response-authoring.md +398 -0
  75. package/skills/adia-ui-kit/references/session-log-schema.md +203 -0
  76. package/skills/adia-ui-kit/references/session-log-template.md +118 -0
  77. package/skills/adia-ui-kit/references/setup.md +652 -0
  78. package/skills/adia-ui-kit/references/skill-hygiene.md +135 -0
  79. package/skills/adia-ui-kit/references/spec-to-ui-reasoning.md +394 -0
  80. package/skills/adia-ui-kit/references/state.md +229 -0
  81. package/skills/adia-ui-kit/references/teach-protocol.md +421 -0
  82. package/skills/adia-ui-kit/references/theme.md +142 -0
  83. package/skills/adia-ui-kit/references/version-check.md +69 -0
  84. package/skills/adia-ui-kit/scripts/audit-decision-trace.mjs +198 -0
  85. package/skills/adia-ui-kit/scripts/audit-kit-roster.mjs +366 -0
  86. package/skills/adia-ui-kit/scripts/changelog-archive.mjs +126 -0
  87. package/skills/adia-ui-kit/scripts/check-adia-versions.py +404 -0
  88. package/skills/adia-ui-kit/scripts/run-skill-evals.mjs +358 -0
  89. package/skills/adia-ui-kit/scripts/validate-session-log.mjs +242 -0
  90. package/skills/adia-ui-kit/skill.json +102 -0
  91. package/skills/adia-ui-migration/CHANGELOG.md +47 -0
  92. package/skills/adia-ui-migration/SKILL.md +381 -0
  93. package/skills/adia-ui-migration/skill.json +29 -0
  94. package/skills/adia-ui-spa/SKILL.md +1 -1
  95. package/skills/adia-ui-verify/SKILL.md +2 -2
@@ -0,0 +1,398 @@
1
+ # Reference: Response Authoring — Defensible Upstream Reviews (vendored from color-app)
2
+
3
+ **Vendored:** 2026-05-20, from `/Users/kimba/Projects/adia/color-app/.agents/team/skills/response-authoring.md`.
4
+ **Original upstream:** `~/.pi/agent/memory/skills/review-and-respond-to-feedback-ticket.md`.
5
+ **Why vendored:** Companion to `feedback-authoring.md`. When upstream
6
+ sends a RESPONSE to a FEEDBACK ticket (filed in `.agents/team/tickets/inbox/`),
7
+ or when self-reviewing a draft FEEDBACK before submission, this is the canonical
8
+ procedure. Verdict taxonomy (✅ confirmed / ⚠️ partial / ⏳ deferred / ❌ dismissed /
9
+ 🔍 needs-clarification / 🔀 out-of-scope) is normative.
10
+
11
+ **Used by:** `adia-ui-kit` skill, when:
12
+ - Triaging an incoming RESPONSE-NN in `.agents/team/tickets/inbox/`
13
+ - Self-reviewing a draft FEEDBACK before submission (sniff-test #2: write the
14
+ RESPONSE you'd expect upstream to write, see if it rejects any claims)
15
+
16
+ **Companion:** `feedback-authoring.md` (the author half of the dyad).
17
+
18
+ ---
19
+
20
+ ## When to Use
21
+
22
+ - Responding to incoming `FEEDBACK-NN` from upstream (AdiaUI, partner teams)
23
+ - Writing `RESPONSE-NN` files in `.agents/team/tickets/inbox/`
24
+ - Self-review before filing your own FEEDBACK — write the RESPONSE you'd *expect* upstream to write, and see if it rejects any of your claims
25
+ - Triaging whether upstream fixes actually work in our installed runtime
26
+
27
+ **Trigger phrases:** "respond to FEEDBACK", "review this ticket", "write the RESPONSE doc", "audit these claims", "self-review this before sending"
28
+
29
+ ---
30
+
31
+ ## Core Principles
32
+
33
+ 1. **Verdict-per-claim, not per-ticket.** A ticket with 7 items may land at 3 confirmed / 2 dismissed / 1 deferred / 1 clarification. Single overall verdicts are wrong.
34
+
35
+ 2. **Quote original claims verbatim.** No paraphrasing. The author must recognize their own words.
36
+
37
+ 3. **Verify against runtime, not docs.** Open `node_modules/@adia-ai/web-components/` and read `.js`/`.ts` source. Cite `file.js:LINE`.
38
+
39
+ 4. **Dismissals carry same burden as confirmations.** "We don't think this is a problem" without a runtime cite is opinion, not verdict.
40
+
41
+ 5. **"Fixed in vX.Y" must cite commit + runtime line.** CHANGELOGs lie. Verify the actual code.
42
+
43
+ 6. **Distinguish "won't fix" from "can't reproduce" from "disagree."** Different next steps.
44
+
45
+ ---
46
+
47
+ ## Verdict Taxonomy
48
+
49
+ | Marker | Verdict | Meaning |
50
+ |---|---|---|
51
+ | ✅ | **Confirmed — already shipped** | Fixed in vX.Y; cite runtime line |
52
+ | ✅ | **Confirmed — accepting** | True; will fix; cite planned milestone |
53
+ | ⚠️ | **Confirmed — partial** | Real problem but framed wrong, or fix differs from proposal |
54
+ | ⏳ | **Deferred** | True but not scheduled; give cut horizon |
55
+ | ❌ | **Dismissed — not reproducible** | Repro failed; show attempt, ask for missing input |
56
+ | ❌ | **Dismissed — by design** | Intentional behavior; cite ADR / design doc |
57
+ | ❌ | **Dismissed — incorrect claim** | Author's premise wrong; cite runtime line proving it |
58
+ | 🔍 | **Needs clarification** | Cannot triage; list exact questions |
59
+ | 🔀 | **Out of scope — redirected** | Wrong package/team; name correct destination |
60
+
61
+ Every verdict MUST have a marker. Verdicts without markers are invalid.
62
+
63
+ ---
64
+
65
+ ## Procedure
66
+
67
+ ### Step 0 — Locate and stage the ticket
68
+
69
+ ```bash
70
+ # Find the FEEDBACK being responded to
71
+ ls .agents/team/tickets/outbox/ | grep "FEEDBACK-NN"
72
+
73
+ # Read it end-to-end BEFORE opening code
74
+ cat .agents/team/tickets/outbox/FEEDBACK-NN--<author>--<date>.md
75
+ ```
76
+
77
+ Note front-matter: `version`, `references`, `priority`. Verdict must address the version the author measured against.
78
+
79
+ **Optional: Write placeholder RESPONSE early** so parallel agents know the ticket is being worked:
80
+
81
+ ```yaml
82
+ ---
83
+ id: "NN"
84
+ type: response
85
+ recipient: color-app
86
+ date: "YYYY-MM-DD"
87
+ author: "Adia UI maintainers"
88
+ project: "chat-ui"
89
+ references:
90
+ - "FEEDBACK-NN--color-app--YYYY-MM-DD"
91
+ version: "@adia-ai/web-components@0.7.13"
92
+ status: in-progress
93
+ ---
94
+
95
+ # RESPONSE-NN — receipt acknowledged, full triage in flight
96
+
97
+ Will follow up with claim-by-claim verdict within 24h.
98
+ ```
99
+
100
+ ### Step 1 — Build claim inventory
101
+
102
+ ```bash
103
+ # Extract every distinct claim
104
+ grep -n '^## [0-9]+\.' .agents/team/tickets/outbox/FEEDBACK-NN-*.md
105
+ grep -n 'Ask:|Request:|Proposed' .agents/team/tickets/outbox/FEEDBACK-NN-*.md
106
+ ```
107
+
108
+ Also check the "Related observations / not full items" block — they still need verdicts.
109
+
110
+ ### Step 2 — Verify each claim against installed source
111
+
112
+ For each claim:
113
+
114
+ 1. **Reproduce symptom** (if repro provided):
115
+ ```bash
116
+ # Run exact commands from ticket
117
+ # If succeeds → confirms symptom
118
+ # If fails → check version skew first before dismissing
119
+ ```
120
+
121
+ 2. **Read cited runtime path**:
122
+ ```bash
123
+ sed -n 'L1,L2p' node_modules/@adia-ai/web-components/components/<name>/class.js
124
+ # Cite exact line range in response — no paraphrasing
125
+ ```
126
+
127
+ 3. **Cross-check shipped artefacts**:
128
+ - `.d.ts` matches runtime?
129
+ - YAML sidecar `events:` / `props:` matches `dispatchEvent` / property definitions?
130
+ - CHANGELOG entry for "fixed in vX.Y" claim?
131
+
132
+ 4. **For "already shipped" verdicts**, verify from clean tree:
133
+ ```bash
134
+ npm i @adia-ai/web-components@<claimed-fix-version>
135
+ # Re-run ticket's repro
136
+ # If still broken → fix didn't fully land
137
+ ```
138
+
139
+ 5. **Record every verification step** — author must be able to re-run.
140
+
141
+ ### Step 3 — Distinguish symptom from root cause
142
+
143
+ Common failure: verdict-on-symptom without root cause. If author reported a symptom with two causes and only one was fixed → `⚠️ Confirmed — partial`, not `✅ Already shipped`. Spell out which sub-symptom remains.
144
+
145
+ ### Step 4 — Draft response, claim-by-claim
146
+
147
+ Match ticket's numbering. For each item:
148
+
149
+ ```markdown
150
+ ### {marker} #{N} — {Author's heading verbatim} ({priority}) — **Audit verdict: {conclusion}**
151
+
152
+ **Author claim (verbatim):**
153
+ > {quote exact text from ticket}
154
+
155
+ **Verification:**
156
+ - {what you ran / read}
157
+ - {file:line citations}
158
+ - {repro outcome}
159
+
160
+ **Verdict:** {Confirmed | Dismissed | Deferred | …}
161
+
162
+ **Disposition:**
163
+ {What's happening / when}
164
+
165
+ **Next action for author (if any):**
166
+ {Specific thing author needs to provide or change}
167
+ ```
168
+
169
+ Six conventional parts:
170
+ 1. Header with marker + verdict summary
171
+ 2. Verbatim quote of consumer's framing
172
+ 3. Evidence with cited `file:line` ranges
173
+ 4. Verdict statement
174
+ 5. Disposition (what's happening)
175
+ 6. Optional: next action required from author
176
+
177
+ Every ⚠️ confirmed bug needs all six. A clean ✅ already-shipped may need only 1, 2, 3, 5.
178
+
179
+ ### Step 5 — Address omissions and "Known omissions" section
180
+
181
+ If author wrote a §"Items deliberately NOT included" block, **honor it explicitly**:
182
+
183
+ ```markdown
184
+ ## Confirming the consumer's exclusions
185
+
186
+ - **<excluded item>** — ✅ Agreed. Verified at `<file:line>`.
187
+ - **<excluded item>** — ⚠️ Flipped. Verification anchor incomplete — symbol exists at
188
+ `<file:line>` but with different shape than assumed. Reopened as #N+1 below.
189
+ - **<excluded item>** — 🔀 Wrong scope. This is our problem, not consumer's.
190
+ Bringing back as new line item.
191
+ ```
192
+
193
+ If author did NOT include omissions but you see adjacent bugs they missed, add a §"Reviewer-identified additions" section.
194
+
195
+ ### Step 6 — Aggregate meta-patterns
196
+
197
+ After 3+ rounds with same consumer:
198
+
199
+ ```markdown
200
+ ## Meta-observation (round N closes the <pattern> pattern)
201
+
202
+ Across rounds 01–NN:
203
+
204
+ | Round | Claims | Real bugs | Real gaps | Already-shipped | Already-documented |
205
+ |---|---|---|---|---|---|
206
+ | 01 | 8 | 0 | 4 | 0 | 4 |
207
+ | 02 | 10 | 0 | 3 | 4 | 3 |
208
+ | … |
209
+ | **Total** | **N** | **N (X%)** | **N (X%)** | **N (X%)** | **N (X%)** |
210
+
211
+ **<Pattern statement>** — e.g. "More than half trace to functionality that exists
212
+ but isn't discoverable."
213
+
214
+ <Structural fix addressing pattern> — e.g. "Per-component reference generator in
215
+ v<X.Y.Z> closes discoverability lag."
216
+ ```
217
+
218
+ Tally tables compound: by round 4, predict next round's distribution. Structural fix is more valuable than any individual verdict.
219
+
220
+ ### Step 7 — Write release-planning section
221
+
222
+ ```markdown
223
+ ## What's in v0.5.18 vs v0.5.19
224
+
225
+ ### Shipped (already on main, lands at v0.5.18 tag)
226
+ | # | Item | Where |
227
+ |---|---|---|
228
+ | 1 | <fix> | §<journal>, this response |
229
+
230
+ ### Already-shipped (closes on upgrade)
231
+ | # | Item | Where |
232
+ |---|---|---|
233
+ | 4 | <thing> | v<earlier> §<journal> |
234
+
235
+ ### Deferred to v0.5.19
236
+ | # | Item | Why deferred |
237
+ |---|---|---|
238
+ | 2 | <thing> | API design call / scope / cost |
239
+ ```
240
+
241
+ Pair with TL;DR for upgrading:
242
+ ```markdown
243
+ ## TL;DR for upgrading
244
+ ```bash
245
+ npm install @adia-ai/web-components@^0.5.18
246
+ ```
247
+ After upgrade:
248
+ 1. <consumer-visible win 1>
249
+ 2. <consumer-visible win 2>
250
+ ```
251
+
252
+ ### Step 8 — Set front-matter and ownership
253
+
254
+ ```yaml
255
+ ---
256
+ id: "NN"
257
+ type: response
258
+ recipient: color-app
259
+ date: "YYYY-MM-DD"
260
+ author: "Adia UI maintainers"
261
+ project: "chat-ui"
262
+ status: draft # → acknowledged → resolved
263
+ references:
264
+ - "FEEDBACK-NN--color-app--YYYY-MM-DD"
265
+ version: "@adia-ai/web-components@0.7.13"
266
+ verdicts:
267
+ confirmed: [1, 4]
268
+ partial: [3]
269
+ dismissed: [2]
270
+ deferred: [5, 6]
271
+ needs-clarification: [7]
272
+ ---
273
+ ```
274
+
275
+ Close with §Pointers:
276
+ ```markdown
277
+ ## Pointers
278
+
279
+ - **§331 journal:** `packages/web-components/CHANGELOG.md`
280
+ - **§314 (prior FEEDBACK):** `.agents/team/tickets/outbox/FEEDBACK-34.md` §314
281
+ - **Component reference:** `node_modules/@adia-ai/web-components/components/swatch/class.js`
282
+ - **For round 40+ feedback** — drop `FEEDBACK-40--chat-ui--YYYY-MM-DD.md` in this directory.
283
+ ```
284
+
285
+ ### Step 9 — Self-audit before committing
286
+
287
+ - [ ] Every claim has exactly one verdict marker
288
+ - [ ] Every "already shipped" cites commit/version AND runtime line
289
+ - [ ] Every "dismissed" cites runtime line OR ADR OR failed-repro log
290
+ - [ ] Every "deferred" names cut horizon and gating concern
291
+ - [ ] Author's verbatim claim text appears before each verdict
292
+ - [ ] No paraphrase drift — `diff` quoted claims against original
293
+ - [ ] `version:` field matches verified runtime
294
+ - [ ] `references:` includes original FEEDBACK
295
+ - [ ] Controversial dismissals have §"Anticipated disputes" subsection
296
+ - [ ] 3+ rounds with same consumer → meta-pattern tally present
297
+ - [ ] Registry (`REGISTRY.md`) updated
298
+ - [ ] Reproducibility: every cited command runs on clean checkout
299
+
300
+ ### Step 10 — Commit and cross-link
301
+
302
+ ```bash
303
+ git add .agents/team/tickets/inbox/RESPONSE-NN--{author}--{date}.md
304
+ git add .agents/team/tickets/REGISTRY.md
305
+ git commit -m "docs(tickets): RESPONSE-NN to {author} — {verdict summary}
306
+
307
+ Verdict rollup:
308
+ ⚠️ Confirmed bugs (now fixed): N
309
+ 🐛 Confirmed bugs (deferred): M
310
+ ✅ Already-shipped: K
311
+ 📚 Already-documented: J
312
+ 🟡 Partial accept: I
313
+ ❌ Declined-with-reason: H
314
+
315
+ Excluded — peer-agent in-flight: <none>"
316
+ ```
317
+
318
+ ---
319
+
320
+ ## Self-Review Variant (Critical for This Project)
321
+
322
+ **Same agent writes FEEDBACK then self-RESPONSE as steelman audit.**
323
+
324
+ 1. **Switch mental context.** RESPONSE front-matter `project:` is maintainer's (chat-ui), not consumer's (color-app). `author:` is maintainer role.
325
+ 2. **Read ticket cold.** Pretend you didn't write it. Look for weak asks.
326
+ 3. **Try to dismiss each claim first.** Apply verdict taxonomy strictly.
327
+ 4. **Cite recipient's runtime.** Open `node_modules/@adia-ai/web-components/` and quote actual code.
328
+ 5. **Output indistinguishable from real maintainer.** Same structure, same burden, same front-matter.
329
+
330
+ **If self-RESPONSE downgrades any P0 to P2 or dismisses any claim → GO BACK AND REVISE FEEDBACK before submitting.** Don't ship a ticket your own steelman rejects.
331
+
332
+ ---
333
+
334
+ ## Pitfalls
335
+
336
+ ### "We don't see it" reflex
337
+ "Can't reproduce" is not a verdict — it's a state. Show failed-repro log AND ask for missing input.
338
+
339
+ ### "Fixed in v0.5.2" trap
340
+ Don't claim without verifying runtime. `CHANGELOG.md` and `.d.ts` are downstream of code.
341
+
342
+ ### Paraphrase drift
343
+ If response says "author reported X" but author said "Y", you've lost the conversation.
344
+
345
+ ### Verdict mixing
346
+ Don't bundle "fixed in 0.5.2" + "won't fix rest" into one ✅. Split into multiple numbered items.
347
+
348
+ ### Ignoring omissions
349
+ If author defended exclusions and you silently disagree, you must call it out.
350
+
351
+ ### Symptom-only verdicts
352
+ "Can't reproduce crash" may be true while "root cause still present" is also true. Address both.
353
+
354
+ ### Asymmetric rigor
355
+ Confirmations get evidence; dismissals get hand-waving. This is the #1 reviewer failure mode.
356
+
357
+ ### Stale `version:` field
358
+ If reviewed against v0.5.18 but ticket measured against v0.5.16, say so explicitly.
359
+
360
+ ### Forgetting registry update
361
+ Every RESPONSE needs a row in `REGISTRY.md`.
362
+
363
+ ### Pre-emptive defensiveness
364
+ Don't write anticipating a fight. State verdicts factually, cite evidence, let evidence carry argument. "I think" / "we believe" more than once per response = insufficient evidence.
365
+
366
+ ---
367
+
368
+ ## Verification
369
+
370
+ Before merging response:
371
+ 1. **Independent re-verification:** Second engineer reads ticket + response, decides if they'd reach same verdict from cited evidence.
372
+ 2. **Author-perspective read-back:** Imagine hostile author. Which verdicts would they push back on hardest? Pre-empt in §"Anticipated disputes".
373
+ 3. **Registry consistency:** `REGISTRY.md` has new row, related FEEDBACK status updated.
374
+ 4. **Reproducibility audit:** Every cited command runs on clean checkout.
375
+ 5. **Front-matter completeness:** `id`, `type=response`, `references`, `version`, `status` all populated.
376
+ 6. **No paraphrase drift:** `diff` quoted claims against original ticket — byte-identical.
377
+
378
+ ---
379
+
380
+ ## Meta: Round Tallying
381
+
382
+ Across 43 rounds (R7–R43) in this project:
383
+
384
+ | Stat | Value |
385
+ |---|---|
386
+ | Total rounds | 43 |
387
+ | Real bugs confirmed | 28 (65%) |
388
+ | Real gaps confirmed | 5 (12%) |
389
+ | Already-shipped | 7 (16%) |
390
+ | Clarifications | 2 (5%) |
391
+ | Dismissals | 1 (2%) |
392
+ | Zero dismissals across entire run | — |
393
+
394
+ This tally validates the "consumer dogfooding surfaces bugs faster than maintainer test matrices" pattern. The meta-observation is structural: maintainer test matrices miss lifecycle-timing axes that consumer adoption discovers.
395
+
396
+ ---
397
+
398
+ *Companion: `.agents/team/skills/feedback-authoring.md` — the author half. Both skills enforce the same evidentiary contract from both sides.*
@@ -0,0 +1,203 @@
1
+ # Session Log Schema — adia-ui-kit v3.1.0+
2
+
3
+ **Purpose.** Define a structured emission format for agent session events so consumers, operators, and future audits have a tractable audit trail. Per REFACTOR-SPEC P5(a).
4
+
5
+ **Status.** v3.1.0 ships the schema + a validator (`scripts/validate-session-log.mjs`). Emission is **optional but recommended** in v3.1.0; the schema is documented so consumers can opt in. v3.2.0 may promote emission to required for the senior-skill harness once a stable cadence is observed.
6
+
7
+ **File location.** JSONL (one event per line). Per-session file at `.agents/team/session-logs/YYYY-MM-DD/<session-id>.jsonl` (under each kit's own `team/` dir, or a substrate-wide path when running from a substrate).
8
+
9
+ **Why JSONL not JSON?** Append-only — agents can flush an event after each tool-call without re-reading + re-writing the file. Tail-friendly. Per-line atomic — partial writes don't corrupt the whole log.
10
+
11
+ ---
12
+
13
+ ## Event Schema (v1)
14
+
15
+ Every line in a session log is a JSON object with these fields:
16
+
17
+ ```json
18
+ {
19
+ "schema_version": "1",
20
+ "session_id": "string",
21
+ "timestamp": "ISO 8601 (UTC)",
22
+ "skill": "string",
23
+ "skill_version": "string",
24
+ "event_type": "string",
25
+ "payload": {}
26
+ }
27
+ ```
28
+
29
+ ### Required fields
30
+
31
+ | Field | Type | Notes |
32
+ |---|---|---|
33
+ | `schema_version` | string | Always `"1"` for this version. Increment on breaking changes. |
34
+ | `session_id` | string | Unique per agent run. Format: `<ISO-date>-<short-uuid>` (e.g. `2026-05-22-a1b2c3d4`). |
35
+ | `timestamp` | string | ISO 8601 UTC. Must include `Z` suffix. |
36
+ | `skill` | string | Skill name (e.g. `adia-ui-kit`, `adia-ui-release`). |
37
+ | `skill_version` | string | Skill version at emission time (e.g. `3.1.0`). |
38
+ | `event_type` | enum | One of: `skill_loaded`, `mode_entered`, `decision_made`, `component_named`, `verify_target_run`, `correction_applied`, `teach_landing`, `session_closed`. |
39
+ | `payload` | object | Event-specific fields (see below). |
40
+
41
+ ### Optional fields
42
+
43
+ | Field | Type | Notes |
44
+ |---|---|---|
45
+ | `parent_session_id` | string | If this session was spawned by another (delegate-task, cron, etc.). |
46
+ | `mode` | string | Which mode (1-12) the skill is operating in. |
47
+ | `gate_result` | object | If a verify-target ran, the gate name + result + duration. |
48
+
49
+ ---
50
+
51
+ ## Event Payloads (per event_type)
52
+
53
+ ### `skill_loaded`
54
+ ```json
55
+ {
56
+ "event_type": "skill_loaded",
57
+ "payload": {
58
+ "trigger": "user_request | auto_load | cron",
59
+ "trigger_phrase": "string (optional)",
60
+ "loaded_references": ["references/foo.md", "..."]
61
+ }
62
+ }
63
+ ```
64
+
65
+ ### `mode_entered`
66
+ ```json
67
+ {
68
+ "event_type": "mode_entered",
69
+ "mode": "mode-3-screen-composition",
70
+ "payload": {
71
+ "mode_id": 3,
72
+ "mode_name": "screen-composition",
73
+ "verify_target": "node scripts/audit-shell-composition.mjs"
74
+ }
75
+ }
76
+ ```
77
+
78
+ ### `decision_made`
79
+ **This is the load-bearing event for P5(b) DecisionModel.** A `decision_made` event records (a) the named decision, (b) the signal that resolved it, (c) the action taken.
80
+ ```json
81
+ {
82
+ "event_type": "decision_made",
83
+ "payload": {
84
+ "decision": "string — what was being decided",
85
+ "required_signal": "string — what input the decision depended on",
86
+ "signal_value": "string — the actual input observed",
87
+ "possible_actions": ["action-a", "action-b", "action-c"],
88
+ "chosen_action": "string",
89
+ "rationale": "string"
90
+ }
91
+ }
92
+ ```
93
+
94
+ ### `component_named`
95
+ ```json
96
+ {
97
+ "event_type": "component_named",
98
+ "payload": {
99
+ "tag": "button-ui",
100
+ "context": "kit-compose | recipe-application | direct-mention",
101
+ "traced_to_decision_id": "string (optional but recommended for P5(b))"
102
+ }
103
+ }
104
+ ```
105
+
106
+ ### `verify_target_run`
107
+ ```json
108
+ {
109
+ "event_type": "verify_target_run",
110
+ "payload": {
111
+ "verify_target": "node scripts/audit-shell-composition.mjs --root=...",
112
+ "exit_code": 0,
113
+ "duration_ms": 1234,
114
+ "findings_count": 0
115
+ }
116
+ }
117
+ ```
118
+
119
+ ### `correction_applied`
120
+ ```json
121
+ {
122
+ "event_type": "correction_applied",
123
+ "payload": {
124
+ "feedback_ticket": "FB-42",
125
+ "skill_section": "§CorrectionLoop",
126
+ "what_skill_said_before": "string",
127
+ "what_corrected_to": "string",
128
+ "bug_shape_class": "string"
129
+ }
130
+ }
131
+ ```
132
+
133
+ ### `teach_landing`
134
+ Emitted whenever `scripts/teach-route.mjs` is invoked to classify a knowledge payload (advisory; helps build the eval corpus over time).
135
+ ```json
136
+ {
137
+ "event_type": "teach_landing",
138
+ "payload": {
139
+ "input_payload": "string",
140
+ "branch": "A | B | C | D | E | F | G",
141
+ "landing_target": "string (file path or 'journal-only')",
142
+ "confidence": "high | medium | low",
143
+ "human_overrode": false
144
+ }
145
+ }
146
+ ```
147
+
148
+ ### `session_closed`
149
+ ```json
150
+ {
151
+ "event_type": "session_closed",
152
+ "payload": {
153
+ "duration_ms": 12345678,
154
+ "total_events": 47,
155
+ "outcome": "completed | interrupted | error",
156
+ "summary": "string (≤ 500 chars)"
157
+ }
158
+ }
159
+ ```
160
+
161
+ ---
162
+
163
+ ## Worked Example A — minimal session
164
+
165
+ A 6-event session: skill loaded, mode entered, one decision, one component named, one verify run, session closed.
166
+
167
+ ```jsonl
168
+ {"schema_version":"1","session_id":"2026-05-22-a1b2c3d4","timestamp":"2026-05-22T14:00:00.000Z","skill":"adia-ui-kit","skill_version":"3.1.0","event_type":"skill_loaded","payload":{"trigger":"user_request","trigger_phrase":"compose me a login page"}}
169
+ {"schema_version":"1","session_id":"2026-05-22-a1b2c3d4","timestamp":"2026-05-22T14:00:01.234Z","skill":"adia-ui-kit","skill_version":"3.1.0","event_type":"mode_entered","mode":"mode-3-screen-composition","payload":{"mode_id":3,"mode_name":"screen-composition","verify_target":"node scripts/audit-shell-composition.mjs"}}
170
+ {"schema_version":"1","session_id":"2026-05-22-a1b2c3d4","timestamp":"2026-05-22T14:00:02.500Z","skill":"adia-ui-kit","skill_version":"3.1.0","event_type":"decision_made","payload":{"decision":"which shell wraps the login page","required_signal":"page has no chrome/nav requirements","signal_value":"login is a marketing-style standalone page","possible_actions":["admin-shell","simple-shell","editor-shell","none (raw)"],"chosen_action":"simple-shell","rationale":"login pages are standalone without admin chrome"}}
171
+ {"schema_version":"1","session_id":"2026-05-22-a1b2c3d4","timestamp":"2026-05-22T14:00:03.100Z","skill":"adia-ui-kit","skill_version":"3.1.0","event_type":"component_named","payload":{"tag":"simple-shell","context":"recipe-application","traced_to_decision_id":"decision-1"}}
172
+ {"schema_version":"1","session_id":"2026-05-22-a1b2c3d4","timestamp":"2026-05-22T14:00:09.876Z","skill":"adia-ui-kit","skill_version":"3.1.0","event_type":"verify_target_run","payload":{"verify_target":"node scripts/audit-shell-composition.mjs","exit_code":0,"duration_ms":2345,"findings_count":0}}
173
+ {"schema_version":"1","session_id":"2026-05-22-a1b2c3d4","timestamp":"2026-05-22T14:01:00.000Z","skill":"adia-ui-kit","skill_version":"3.1.0","event_type":"session_closed","payload":{"duration_ms":60000,"total_events":6,"outcome":"completed","summary":"Composed login page with simple-shell + simple-hero + form-field. All gates green."}}
174
+ ```
175
+
176
+ ## Worked Example B — session with feedback resolution
177
+
178
+ ```jsonl
179
+ {"schema_version":"1","session_id":"2026-05-22-e5f6g7h8","timestamp":"2026-05-22T16:00:00.000Z","skill":"adia-ui-kit","skill_version":"3.1.0","event_type":"skill_loaded","payload":{"trigger":"user_request","trigger_phrase":"resolve FB-42"}}
180
+ {"schema_version":"1","session_id":"2026-05-22-e5f6g7h8","timestamp":"2026-05-22T16:00:01.000Z","skill":"adia-ui-kit","skill_version":"3.1.0","event_type":"teach_landing","payload":{"input_payload":"FB-42 resolved upstream; skill said admin-statusbar defaults slot=footer but was wrong","branch":"F","landing_target":"SKILL.md §CorrectionLoop + reference correction-loop.md","confidence":"high","human_overrode":false}}
181
+ {"schema_version":"1","session_id":"2026-05-22-e5f6g7h8","timestamp":"2026-05-22T16:00:30.000Z","skill":"adia-ui-kit","skill_version":"3.1.0","event_type":"correction_applied","payload":{"feedback_ticket":"FB-42","skill_section":"§CorrectionLoop","what_skill_said_before":"admin-statusbar defaults to slot=footer","what_corrected_to":"admin-statusbar has no default slot; explicit slot=trailing on host","bug_shape_class":"misdiagnosed-default-slot"}}
182
+ {"schema_version":"1","session_id":"2026-05-22-e5f6g7h8","timestamp":"2026-05-22T16:01:00.000Z","skill":"adia-ui-kit","skill_version":"3.1.0","event_type":"session_closed","payload":{"duration_ms":60000,"total_events":4,"outcome":"completed","summary":"FB-42 correction applied to §CorrectionLoop. Bug-shape taxonomy updated."}}
183
+ ```
184
+
185
+ ---
186
+
187
+ ## Operational notes
188
+
189
+ - **Append-only** — never rewrite past events. Bugs in past entries are corrected by emitting a `correction_applied` event referencing them.
190
+ - **Retention** — operator-owned. The skill does NOT prescribe a retention policy (don't be opinionated about ops). Recommend rotating per-month or per-quarter for long-running deployments.
191
+ - **Privacy** — payloads may contain user-facing content. Treat as user-confidential at the same level as the agent's tool-call transcripts.
192
+ - **Validation** — `scripts/validate-session-log.mjs <path>` lints a JSONL file against this schema. Fails on missing required fields, unknown event types, or invalid timestamps.
193
+ - **Not a billing log** — this is for audit/QA/eval-corpus-growth, not metering.
194
+
195
+ ---
196
+
197
+ ## Cross-references
198
+
199
+ - `scripts/validate-session-log.mjs` — runtime validator
200
+ - `scripts/teach-route.mjs` — emits `teach_landing` event candidates
201
+ - `decision-model.md` — DecisionModel contract that produces `decision_made` events (v3.1.0 advisory, v3.2.0+ may become required)
202
+ - REFACTOR-SPEC P5(a) — origin of this schema
203
+ - AGENTS.md journal discipline — orthogonal to session logs (journals = human prose, session logs = structured event stream)