@adia-ai/adia-ui-forge 0.1.2 → 0.8.0
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/.claude-plugin/plugin.json +3 -6
- package/CHANGELOG.md +27 -26
- package/README.md +35 -40
- package/agents/a2ui-engineer.md +26 -0
- package/agents/component-author.md +29 -0
- package/agents/framework-verifier.md +26 -0
- package/agents/release-engineer.md +25 -0
- package/agents/routing-corpus.json +318 -0
- package/bin/demo-postwrite-pattern-gate +94 -0
- package/bin/forge-lint +17 -2
- package/bin/sidecar-prewrite-guard +104 -0
- package/commands/deploy.md +9 -0
- package/commands/dogfood.md +10 -0
- package/commands/gen-review.md +9 -0
- package/commands/release.md +10 -0
- package/hooks/hooks.json +15 -0
- package/package.json +3 -5
- package/references/contracts/a2ui-mcp-surface.md +35 -0
- package/references/contracts/migration-guide-format.md +34 -0
- package/references/shared/content-trust.md +19 -74
- package/skills/adia-a2ui/SKILL.md +99 -0
- package/skills/{adia-ui-a2ui → adia-a2ui}/evals/routing-corpus.json +10 -10
- package/skills/adia-a2ui/references/anti-patterns.md +27 -0
- package/skills/adia-a2ui/references/chunk-authoring.md +71 -0
- package/skills/adia-a2ui/references/corpus-discipline.md +68 -0
- package/skills/adia-a2ui/references/eval-diagnostics.md +86 -0
- package/skills/adia-a2ui/references/format-extension-decisions.md +66 -0
- package/skills/adia-a2ui/references/leverage-rules.md +52 -0
- package/skills/adia-a2ui/references/mcp-pipeline-ops.md +83 -0
- package/skills/adia-a2ui/references/mcp-tool-reference.md +59 -0
- package/skills/adia-a2ui/references/pipeline-overview.md +115 -0
- package/skills/adia-a2ui/references/semantic-fail-lifting.md +74 -0
- package/skills/adia-a2ui/references/strategy-engines.md +109 -0
- package/skills/adia-a2ui/references/zettel-calibration.md +104 -0
- package/skills/adia-author/SKILL.md +112 -0
- package/skills/adia-author/evals/routing-corpus.json +222 -0
- package/skills/{adia-ui-authoring → adia-author}/references/anti-patterns.md +33 -4
- package/skills/{adia-ui-authoring → adia-author}/references/authoring-cycle.md +9 -11
- package/skills/adia-author/references/canonical-pattern-index.md +243 -0
- package/skills/{adia-ui-authoring → adia-author}/references/code-style.md +19 -21
- package/skills/adia-author/references/common-gotchas.md +129 -0
- package/skills/adia-author/references/composite-demo-protocol.md +271 -0
- package/skills/{adia-ui-authoring → adia-author}/references/css-patterns.md +19 -6
- package/skills/{adia-ui-authoring → adia-author}/references/lifecycle-patterns.md +1 -0
- package/skills/{adia-ui-authoring → adia-author}/references/llm-bridge.md +3 -5
- package/skills/{adia-ui-authoring → adia-author}/references/module-promotion.md +22 -40
- package/skills/{adia-ui-authoring → adia-author}/references/primitive-audit.md +2 -4
- package/skills/{adia-ui-authoring → adia-author}/references/shell-patterns.md +12 -18
- package/skills/{adia-ui-authoring → adia-author}/references/token-contract.md +5 -7
- package/skills/{adia-ui-authoring → adia-author}/references/worked-example.md +3 -3
- package/skills/{adia-ui-authoring → adia-author}/references/yaml-contract.md +3 -3
- package/skills/{adia-ui-authoring → adia-author}/scripts/build-canonical-pattern-index.mjs +3 -3
- package/skills/adia-deploy/SKILL.md +128 -0
- package/skills/adia-deploy/references/deploy-playbooks.md +276 -0
- package/skills/adia-dogfood/SKILL.md +124 -0
- package/skills/adia-dogfood/references/admin-shell-anatomy.md +77 -0
- package/skills/adia-dogfood/references/app-shell-pitfalls.md +66 -0
- package/skills/adia-dogfood/references/card-anatomy-sweep.md +66 -0
- package/skills/adia-dogfood/references/html-attr-sweep.md +63 -0
- package/skills/adia-dogfood/references/native-leak-annotations.md +73 -0
- package/skills/adia-dogfood/references/visual-probe-triage.md +80 -0
- package/skills/{adia-ui-dogfood → adia-dogfood}/scripts/analyze.mjs +30 -14
- package/skills/adia-gen-review/SKILL.md +127 -0
- package/skills/adia-gen-review/references/corpus-html-patterns.md +279 -0
- package/skills/adia-gen-review/references/loop-protocol.md +216 -0
- package/skills/adia-gen-review/references/rubric-cosmetic.md +100 -0
- package/skills/adia-gen-review/references/rubric-decompose.md +101 -0
- package/skills/adia-gen-review/references/rubric-score.md +214 -0
- package/skills/{adia-ui-gen-review → adia-gen-review}/references/scores.schema.json +2 -2
- package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-coverage-audit.mjs +4 -4
- package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-decompose.mjs +10 -6
- package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-status.mjs +5 -5
- package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/validate-cycle-scores.mjs +5 -5
- package/skills/adia-llm-internals/SKILL.md +77 -0
- package/skills/{adia-ui-llm → adia-llm-internals}/references/adapter-contract.md +4 -2
- package/skills/{adia-ui-llm → adia-llm-internals}/references/add-a-provider.md +4 -5
- package/skills/{adia-ui-llm → adia-llm-internals}/references/bridge-facade.md +10 -3
- package/skills/{adia-ui-llm → adia-llm-internals}/references/browser-proxy-boundary.md +1 -1
- package/skills/{adia-ui-llm → adia-llm-internals}/references/model-registry.md +5 -3
- package/skills/{adia-ui-llm → adia-llm-internals}/references/streaming-sse.md +2 -2
- package/skills/adia-release/SKILL.md +72 -0
- package/skills/adia-release/references/changelog-discipline.md +119 -0
- package/skills/adia-release/references/cut-procedure.md +247 -0
- package/skills/adia-release/references/gates-catalog.md +222 -0
- package/skills/adia-release/references/independent-package-release.md +52 -0
- package/skills/adia-release/references/migration-guide-authoring.md +86 -0
- package/skills/adia-release/references/notes-authoring.md +90 -0
- package/skills/adia-release/references/recovery-paths.md +106 -0
- package/skills/{adia-ui-release → adia-release}/scripts/bump.mjs +27 -2
- package/skills/{adia-ui-release → adia-release}/scripts/dispatch-publish.mjs +72 -6
- package/skills/{adia-ui-release → adia-release}/scripts/insert-stub.mjs +6 -4
- package/skills/adia-release/scripts/package-paths.mjs +50 -0
- package/skills/{adia-ui-release → adia-release}/scripts/promote-unreleased.mjs +4 -3
- package/skills/{adia-ui-release → adia-release}/scripts/release-pack.mjs +48 -27
- package/skills/{adia-ui-release → adia-release}/scripts/tag-lockstep.mjs +15 -3
- package/skills/adia-site-docs/SKILL.md +68 -0
- package/skills/adia-site-docs/evals/audit-report.md +30 -0
- package/skills/adia-site-docs/evals/routing-corpus.json +176 -0
- package/skills/adia-site-docs/intent.md +72 -0
- package/bin/lib/audit-axes.mjs +0 -555
- package/bin/lib/dry-run-irreversible.mjs +0 -236
- package/bin/lib/run-skill-evals.mjs +0 -487
- package/bin/lib/teach-router.mjs +0 -250
- package/commands/adia-forge-a2ui.md +0 -10
- package/commands/adia-forge-author.md +0 -10
- package/commands/adia-forge-dogfood.md +0 -8
- package/commands/adia-forge-llm.md +0 -8
- package/commands/adia-forge-orient.md +0 -10
- package/commands/adia-forge-release.md +0 -8
- package/commands/adia-forge-review.md +0 -10
- package/references/shared/pev-rationale.md +0 -64
- package/references/shared/skill-conventions.md +0 -133
- package/skills/adia-ui-a2ui/CHANGELOG.md +0 -32
- package/skills/adia-ui-a2ui/SKILL.md +0 -243
- package/skills/adia-ui-a2ui/evals/adversarial-corpus.json +0 -75
- package/skills/adia-ui-a2ui/evals/teach-routing-cases.json +0 -100
- package/skills/adia-ui-a2ui/references/anti-patterns.md +0 -24
- package/skills/adia-ui-a2ui/references/chunk-authoring.md +0 -88
- package/skills/adia-ui-a2ui/references/corpus-discipline.md +0 -56
- package/skills/adia-ui-a2ui/references/eval-diagnostics.md +0 -127
- package/skills/adia-ui-a2ui/references/fragment-graph.md +0 -91
- package/skills/adia-ui-a2ui/references/mcp-pipeline-ops.md +0 -106
- package/skills/adia-ui-a2ui/references/mcp-tool-reference.md +0 -398
- package/skills/adia-ui-a2ui/references/pipeline-overview.md +0 -175
- package/skills/adia-ui-a2ui/references/semantic-fail-lifting.md +0 -120
- package/skills/adia-ui-a2ui/references/strategy-engines.md +0 -111
- package/skills/adia-ui-a2ui/references/teach-protocol.md +0 -220
- package/skills/adia-ui-a2ui/references/zettel-calibration.md +0 -93
- package/skills/adia-ui-a2ui/scripts/audit-a2ui-roster.mjs +0 -96
- package/skills/adia-ui-a2ui/scripts/teach-route.mjs +0 -157
- package/skills/adia-ui-a2ui/skill.json +0 -38
- package/skills/adia-ui-authoring/CHANGELOG.md +0 -32
- package/skills/adia-ui-authoring/SKILL.md +0 -256
- package/skills/adia-ui-authoring/assets/case-studies/admin-shell-decomposition.md +0 -101
- package/skills/adia-ui-authoring/assets/case-studies/maxtokens-32768-discovery.md +0 -109
- package/skills/adia-ui-authoring/assets/case-studies/theme-panel-promotion.md +0 -113
- package/skills/adia-ui-authoring/evals/adversarial-design-plan-gates.json +0 -138
- package/skills/adia-ui-authoring/evals/routing-corpus.json +0 -245
- package/skills/adia-ui-authoring/references/canonical-pattern-index.md +0 -179
- package/skills/adia-ui-authoring/references/common-gotchas.md +0 -93
- package/skills/adia-ui-authoring/references/composite-demo-protocol.md +0 -1084
- package/skills/adia-ui-authoring/references/teach-protocol.md +0 -428
- package/skills/adia-ui-authoring/scripts/audit-authoring-roster.mjs +0 -148
- package/skills/adia-ui-authoring/skill.json +0 -45
- package/skills/adia-ui-dogfood/CHANGELOG.md +0 -17
- package/skills/adia-ui-dogfood/README.md +0 -62
- package/skills/adia-ui-dogfood/SKILL.md +0 -866
- package/skills/adia-ui-dogfood/skill.json +0 -40
- package/skills/adia-ui-forge/SKILL.md +0 -88
- package/skills/adia-ui-forge/evals/routing-corpus.json +0 -30
- package/skills/adia-ui-gen-review/CHANGELOG.md +0 -108
- package/skills/adia-ui-gen-review/SKILL.md +0 -266
- package/skills/adia-ui-gen-review/references/loop-protocol.md +0 -712
- package/skills/adia-ui-gen-review/references/rubric-cosmetic.md +0 -144
- package/skills/adia-ui-gen-review/references/rubric-decompose.md +0 -117
- package/skills/adia-ui-gen-review/references/rubric-score.md +0 -249
- package/skills/adia-ui-gen-review/references/teach-protocol.md +0 -214
- package/skills/adia-ui-gen-review/skill.json +0 -22
- package/skills/adia-ui-llm/CHANGELOG.md +0 -25
- package/skills/adia-ui-llm/SKILL.md +0 -165
- package/skills/adia-ui-llm/evals/adversarial-corpus.json +0 -75
- package/skills/adia-ui-llm/evals/routing-corpus.json +0 -30
- package/skills/adia-ui-llm/evals/teach-routing-cases.json +0 -73
- package/skills/adia-ui-llm/references/teach-protocol.md +0 -78
- package/skills/adia-ui-llm/scripts/audit-llm-roster.mjs +0 -93
- package/skills/adia-ui-llm/scripts/teach-route.mjs +0 -119
- package/skills/adia-ui-llm/skill.json +0 -33
- package/skills/adia-ui-release/CHANGELOG.md +0 -23
- package/skills/adia-ui-release/SKILL.md +0 -295
- package/skills/adia-ui-release/assets/case-studies/2026-05-20-batch-push-v0.6.14-v0.6.15.md +0 -144
- package/skills/adia-ui-release/assets/case-studies/2026-05-20-corpus-drift-remediation-v0.6.15.md +0 -155
- package/skills/adia-ui-release/assets/case-studies/2026-05-20-version-skip-correction-v0.6.12.md +0 -114
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-author-from-scratch-v0.6.18.md +0 -139
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-feedback37-retraction-v0.6.21.md +0 -124
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-fn1-enrichment-pass-v0.6.19.md +0 -125
- package/skills/adia-ui-release/assets/case-studies/2026-05-21-stale-test-detection-v0.6.20.md +0 -142
- package/skills/adia-ui-release/assets/case-studies/2026-05-23-freshness-gate-recovery-v0.6.32.md +0 -97
- package/skills/adia-ui-release/assets/case-studies/2026-05-26-catalog-drift-recurring-v0.6.40.md +0 -147
- package/skills/adia-ui-release/assets/templates/stub-changelog.template.md +0 -22
- package/skills/adia-ui-release/evals/evals.json +0 -164
- package/skills/adia-ui-release/references/changelog-discipline.md +0 -250
- package/skills/adia-ui-release/references/cycle-happy-path.md +0 -520
- package/skills/adia-ui-release/references/exe-deploy.md +0 -149
- package/skills/adia-ui-release/references/gates-catalog.md +0 -778
- package/skills/adia-ui-release/references/ledger-discipline.md +0 -232
- package/skills/adia-ui-release/references/migration-guide-authoring.md +0 -174
- package/skills/adia-ui-release/references/multi-agent-baseline.md +0 -207
- package/skills/adia-ui-release/references/notes-authoring.md +0 -212
- package/skills/adia-ui-release/references/recovery-paths.md +0 -215
- package/skills/adia-ui-release/references/rollup-notes.md +0 -208
- package/skills/adia-ui-release/references/teach-protocol.md +0 -468
- package/skills/adia-ui-release/scripts/audit-gate-roster.mjs +0 -196
- package/skills/adia-ui-release/scripts/make-ledger.mjs +0 -179
- package/skills/adia-ui-release/skill.json +0 -75
- /package/skills/{adia-ui-authoring → adia-author}/references/api-contract.md +0 -0
- /package/skills/{adia-ui-release → adia-release}/scripts/assert-monorepo-root.mjs +0 -0
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
# `ledger-discipline.md` — audit-history JSON schema + what to capture
|
|
2
|
-
|
|
3
|
-
> Loaded by mode 1 Step 11 (Ledger), mode 4 (batch-push ledger), and mode 8 (Investigation — reads past ledgers).
|
|
4
|
-
|
|
5
|
-
Every release cycle writes a JSON ledger to `.brain/audit-history/YYYY-MM-DD-<kind>-vX.Y.Z.json`. The ledger is the long-term memory of the cycle — what shipped, what was excluded, what was learned. Future cycles read past ledgers (mode 8) and the post-mortem flow (mode 7 + `ops-postmortem` skill) cross-references them.
|
|
6
|
-
|
|
7
|
-
This file documents the canonical schema + what to capture for each release-kind.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## §The canonical schema
|
|
12
|
-
|
|
13
|
-
```json
|
|
14
|
-
{
|
|
15
|
-
"kind": "release-cut" | "batch-push" | "p1-hotfix" | "post-release-fix",
|
|
16
|
-
"audit_id": "YYYY-MM-DD-<kind>-vX.Y.Z",
|
|
17
|
-
"repo": "<org>/<repo>",
|
|
18
|
-
"released_at": "YYYY-MM-DD",
|
|
19
|
-
"version": "X.Y.Z",
|
|
20
|
-
"release_type": "MAJOR" | "MINOR" | "PATCH",
|
|
21
|
-
"summary": "<one-paragraph>",
|
|
22
|
-
"scope": { /* free-form keys, one per substantive package or topic */ },
|
|
23
|
-
"release_commit": "<sha>",
|
|
24
|
-
"tag_commit": "<sha>",
|
|
25
|
-
"tags": [ /* all 10 tags */ ],
|
|
26
|
-
"verification": { /* gate-by-gate summary */ },
|
|
27
|
-
"publish_workflows": { "dispatched": "9/9 ...", "conclusions": "9/9 success" },
|
|
28
|
-
"notes": [ /* one entry per lesson, exclusion, anomaly */ ]
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
The `audit_id` is the file's basename (without `.json`). The `.brain/audit-history/` directory accumulates one such ledger per release cycle. (`make-ledger.mjs` scaffolds the file from git state + `--repo-slug`; the `9/9` counts below are the @adia-ai monorepo's 9-package worked example — substitute your monorepo's package count.)
|
|
33
|
-
|
|
34
|
-
No `$schema` key: ledgers are self-describing local audit records, so `make-ledger.mjs` deliberately emits no `$schema` (it pointed at a non-bundled external host that this skill does not own or validate against). If your ops setup validates ledgers against a hosted JSON Schema, add the `$schema` field in your own post-processing.
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## §What every ledger MUST capture
|
|
39
|
-
|
|
40
|
-
These fields are required and the cycle is incomplete without them:
|
|
41
|
-
|
|
42
|
-
### `audit_id` + `released_at` + `version`
|
|
43
|
-
|
|
44
|
-
- `audit_id` matches the filename. Format: `YYYY-MM-DD-release-vX.Y.Z` (single-version) or `YYYY-MM-DD-batch-push-vA-vZ` (batch).
|
|
45
|
-
- `released_at` is the YYYY-MM-DD cycle date.
|
|
46
|
-
- `version` is the published semver (no `v` prefix).
|
|
47
|
-
|
|
48
|
-
### `summary` (the one-paragraph)
|
|
49
|
-
|
|
50
|
-
A single paragraph (4–6 sentences) covering: substantive packages + scope + new primitives/APIs + retracted features + bundled skill cuts. This is what future operators READ when grepping `.brain/audit-history/`.
|
|
51
|
-
|
|
52
|
-
Example (v0.6.21):
|
|
53
|
-
|
|
54
|
-
> "9-package lockstep PATCH cut, authored from scratch. @adia-ai/web- components: table-ui truncate-by-default with [wrap]/[data-wrap] opt-in (§403), toast/feed-item variant text colour fix, input-ui slot-label spacing. @adia-ai/web-modules: `<admin-entity-item>` row- inset alignment, FEEDBACK-37 retraction (admin-shell spurious slot- contract console.warn removed), page-header title-row :first-of-type selector fix. @adia-ai/a2ui-corpus: catalog regen."
|
|
55
|
-
|
|
56
|
-
### `release_commit` + `tag_commit`
|
|
57
|
-
|
|
58
|
-
- `release_commit`: the SHA of the actual `chore(release):` or `release(*):` commit (typically the same as `tag_commit` unless an enrichment-pass amended it).
|
|
59
|
-
- `tag_commit`: the SHA the 10 tags point at (= HEAD at tag time).
|
|
60
|
-
|
|
61
|
-
If those differ (F-N1 enrichment scenario), record BOTH and explain in a `notes` entry.
|
|
62
|
-
|
|
63
|
-
### `tags` array
|
|
64
|
-
|
|
65
|
-
All 10 tags (umbrella + 9 per-package), in that order.
|
|
66
|
-
|
|
67
|
-
### `verification` (gate-by-gate)
|
|
68
|
-
|
|
69
|
-
A flat object with gate-name → status. Use the same keys across cycles so future search can find regression patterns:
|
|
70
|
-
|
|
71
|
-
```json
|
|
72
|
-
"verification": {
|
|
73
|
-
"check_lockstep": "OK at X.Y.Z / ^X.Y.0",
|
|
74
|
-
"test_unit": "NNNN/NNNN across NN files",
|
|
75
|
-
"typecheck": "clean",
|
|
76
|
-
"components_verify": "clean — NN files",
|
|
77
|
-
"verify_traits": "56/56 (100%)",
|
|
78
|
-
"check_demo_shells": "clean — NN shells",
|
|
79
|
-
"check_lightningcss_build": "NN CSS files clean",
|
|
80
|
-
"verify_corpus": "0 errors / 0 warns",
|
|
81
|
-
"check_embeddings_fresh": "OK",
|
|
82
|
-
"check_links": "NNNN files clean",
|
|
83
|
-
"smoke_engines": "green",
|
|
84
|
-
"smoke_register_engine": "11/11",
|
|
85
|
-
"eval_diff_zettel": "cov=N% avg=N (floor cov≥5% avg≥85)",
|
|
86
|
-
"fn1_trip_wire": "9/9 per-package clean ...",
|
|
87
|
-
"npm_latest": "X.Y.Z across all 9 packages",
|
|
88
|
-
"exe_serves": "HTTP 200 (gen-ui)",
|
|
89
|
-
"gh_releases": "9 created per-package"
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Use underscores (`check_demo_shells`) not colons (`check:demo-shells`) in JSON keys — colons aren't valid JSON identifier punctuation.
|
|
94
|
-
|
|
95
|
-
If a gate FAILED at first and was recovered — record the recovery in `notes`, not in `verification` (which shows final state).
|
|
96
|
-
|
|
97
|
-
### `publish_workflows`
|
|
98
|
-
|
|
99
|
-
```json
|
|
100
|
-
"publish_workflows": {
|
|
101
|
-
"dispatched": "9/9 via gh workflow run --ref <pkg>-vX.Y.Z",
|
|
102
|
-
"conclusions": "9/9 success"
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
For batch push, expand:
|
|
107
|
-
|
|
108
|
-
```json
|
|
109
|
-
"publish_workflows": {
|
|
110
|
-
"dispatched": "18/18 — vA.B.C set dispatched + settled FIRST, then vA.B.D set (ordering ensures npm latest lands on vA.B.D)",
|
|
111
|
-
"conclusions": "18/18 success"
|
|
112
|
-
}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### `notes` (the lesson log)
|
|
116
|
-
|
|
117
|
-
Array of strings, one per significant observation. Examples:
|
|
118
|
-
|
|
119
|
-
- "STALE TEST FIXED: ..." — when a stale test required updating.
|
|
120
|
-
- "PEER-IN-FLIGHT EXCLUDED: ..." — when a peer file was stashed.
|
|
121
|
-
- "STRAY UNCOMMITTED CHANGE EXCLUDED: ..." — when an uncommitted-but-undocumented change was stashed.
|
|
122
|
-
- "F-N1 flagged N cosmetic diff-coverage warns; enrichment pass applied to ..." — when the enrichment pass ran.
|
|
123
|
-
- "Companion: `<companion-plugin>` vX.Y.Z bundled with this cut" — when a tooling/skill update rides along.
|
|
124
|
-
- "Umbrella tag vX.Y.Z fails F-N1 pattern check — expected; lockstep convention" — boilerplate but worth keeping for archaeological consistency.
|
|
125
|
-
|
|
126
|
-
The `notes` array is the **highest-information part of the ledger**. This is what future operators read first when investigating a past release.
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## §What ELSE to capture per kind
|
|
131
|
-
|
|
132
|
-
### `kind: release-cut` (standard single-version)
|
|
133
|
-
|
|
134
|
-
Add `scope` keys per substantive package:
|
|
135
|
-
|
|
136
|
-
```json
|
|
137
|
-
"scope": {
|
|
138
|
-
"web_components": "<one-sentence per substantive feature in this package, with FEEDBACK numbers>",
|
|
139
|
-
"web_modules": "<same>",
|
|
140
|
-
"a2ui_corpus": "<same>",
|
|
141
|
-
"ride_along_stubs": "@adia-ai/llm, @adia-ai/a2ui-compose, ... — version bump only."
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### `kind: batch-push` (multi-version)
|
|
146
|
-
|
|
147
|
-
Add `versions` array + per-version `tag_commits` + `scope` per-version:
|
|
148
|
-
|
|
149
|
-
```json
|
|
150
|
-
"versions": ["A.B.C", "A.B.D"],
|
|
151
|
-
"tag_commits": {
|
|
152
|
-
"vA.B.C": "<sha>",
|
|
153
|
-
"vA.B.D": "<sha>"
|
|
154
|
-
},
|
|
155
|
-
"scope": {
|
|
156
|
-
"vA.B.C": "<one-paragraph summary of this version>",
|
|
157
|
-
"vA.B.D": "<same>"
|
|
158
|
-
}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### `kind: p1-hotfix` (urgent fix without normal cycle)
|
|
162
|
-
|
|
163
|
-
Add `incident` block:
|
|
164
|
-
|
|
165
|
-
```json
|
|
166
|
-
"incident": {
|
|
167
|
-
"trigger": "<the symptom that demanded a hotfix>",
|
|
168
|
-
"detection_lag": "<when shipped → when noticed>",
|
|
169
|
-
"scope_minimization": "<what was deliberately NOT included to keep the hotfix small>"
|
|
170
|
-
}
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
Cross-reference `ops-postmortem` skill — the hotfix usually pairs with a postmortem doc.
|
|
174
|
-
|
|
175
|
-
### `kind: post-release-fix` (correction after publish)
|
|
176
|
-
|
|
177
|
-
Add `corrects` block:
|
|
178
|
-
|
|
179
|
-
```json
|
|
180
|
-
"corrects": {
|
|
181
|
-
"version": "<the version being corrected>",
|
|
182
|
-
"issue": "<what was wrong>",
|
|
183
|
-
"resolution_path": "<how — typically a follow-up release>"
|
|
184
|
-
}
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
Example: a future "v0.6.21.1" or "v0.6.22 fix-only" cycle correcting a v0.6.21 defect would carry this block.
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## §Where to write it
|
|
192
|
-
|
|
193
|
-
Path: `.brain/audit-history/YYYY-MM-DD-release-vX.Y.Z.json`.
|
|
194
|
-
|
|
195
|
-
Convention:
|
|
196
|
-
|
|
197
|
-
- Date is the cycle's `released_at` field (not strictly the local filesystem date; they should match but the field is authoritative).
|
|
198
|
-
- For batch push: `.brain/audit-history/YYYY-MM-DD-batch-push-vA-vZ.json` where A is the oldest and Z is the newest version in the batch.
|
|
199
|
-
|
|
200
|
-
The file MUST be added in a separate `chore(audit-history)` commit after the release commit ships. Don't bundle it into the release commit — the ledger commit is the cycle's epilogue.
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
## §Reading past ledgers (mode 8)
|
|
205
|
-
|
|
206
|
-
When the operator asks "what shipped in v0.6.X?" or "did we ever fix `<symptom>`?":
|
|
207
|
-
|
|
208
|
-
```bash
|
|
209
|
-
# Single-version lookup
|
|
210
|
-
cat .brain/audit-history/*-release-v0.6.X.json | jq .
|
|
211
|
-
|
|
212
|
-
# Search across cycles
|
|
213
|
-
grep -l "FEEDBACK-37" .brain/audit-history/*.json | sort
|
|
214
|
-
grep -l "stale test" .brain/audit-history/*.json | sort
|
|
215
|
-
grep -l "version-skip" .brain/audit-history/*.json | sort
|
|
216
|
-
|
|
217
|
-
# What gates were ever flagged?
|
|
218
|
-
for f in .brain/audit-history/*.json; do
|
|
219
|
-
echo "$(basename $f):"
|
|
220
|
-
jq -r '.notes[] | select(test("FAILED|enrichment|STASHED|EXCLUDED"))' "$f" 2>/dev/null
|
|
221
|
-
done
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
Memory: `reference_findings_index_and_postmortems` — there's a `.brain/findings/INDEX.md` for open follow-ups and `.brain/postmortems/` for incident write-ups. The audit-history ledgers complement those: ledgers are per-cycle, INDEX/postmortems are per-issue.
|
|
225
|
-
|
|
226
|
-
---
|
|
227
|
-
|
|
228
|
-
## §When this reference is "done v1"
|
|
229
|
-
|
|
230
|
-
- Every cycle's ledger uses the canonical schema with no key drift (verifiable via a JSON schema validator or `jq` keys diff).
|
|
231
|
-
- The `notes` array has at least one entry per cycle (the umbrella F-N1 boilerplate counts as the minimum).
|
|
232
|
-
- The next mode-8 investigation (what shipped in v0.6.X?) reads the ledger first, not the GH release page.
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
# `migration-guide-authoring.md` — authoring the MIGRATION GUIDE when cutting a breaking release
|
|
2
|
-
|
|
3
|
-
> Loaded by **mode 11 (Author a migration guide)** and by **mode 1 / 2** whenever the cut is a **MINOR** (an API-surface break — removed/renamed prop, attribute, slot, event, token, or tag). The **producer** side of migrations: you are shipping the breaking change, so you author the guide section consumers will follow. Companion: `changelog-discipline.md` (the CHANGELOG records _what_ landed; the migration guide tells consumers _how to absorb it_).
|
|
4
|
-
|
|
5
|
-
This is the **producer counterpart** to consumer-side migration. When the framework ships a breaking release, `MIGRATION GUIDE.md` is the canonical record of every BREAKING item + its mechanical search-and-replace recipe. The **consumer side** (sweeping a consumer app's call sites with `git grep` + `perl -i -pe`, then verifying with the build gate) lives in the separate consumer/app-author plugin — it READS this guide. Your job here is to WRITE the section it reads.
|
|
6
|
-
|
|
7
|
-
> **Scope split (don't blur it):**
|
|
8
|
-
>
|
|
9
|
-
> - **Producer (this skill, this file)** — author the `MIGRATION GUIDE.md` version section + migrate the IN-REPO surfaces (demo / exemplar / playground / catalog pages) so the release ships clean.
|
|
10
|
-
> - **Consumer (separate plugin)** — sweep a downstream consumer app against a published guide section. NOT this skill.
|
|
11
|
-
> - **Designing the breaking change itself** — a contract decision, not a migration. Upstream of both.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## §When you need a migration guide section
|
|
16
|
-
|
|
17
|
-
Author (or extend) a `MIGRATION GUIDE.md` section when the cut removes or renames a **public API symbol**:
|
|
18
|
-
|
|
19
|
-
- a removed/renamed **prop or attribute** (e.g. `variant="danger"` → `color="danger"`);
|
|
20
|
-
- a removed/renamed **slot** or **slot semantics flip** (e.g. `[open]` default-hidden → `[collapsed]` default-visible);
|
|
21
|
-
- a removed/renamed **event name** (e.g. `chat-submit` → `submit`);
|
|
22
|
-
- a removed/renamed **token** (e.g. `--n-*` → `--a-*`);
|
|
23
|
-
- a removed/renamed **tag** (e.g. `app-shell` → `adia-shell`);
|
|
24
|
-
- a **Boolean → enum** migration (e.g. `completed` → `status="completed"`);
|
|
25
|
-
- a **default-value behavior change** wide enough that consumers must act.
|
|
26
|
-
|
|
27
|
-
This is the same line as the **PATCH-vs-MINOR** rule in `cycle-happy-path.md` §Step 4b: **MINOR is reserved for API-surface breaks ONLY.** If you're cutting MINOR, you almost certainly owe a migration-guide section. If the change is a visible-behavior change with no removed/renamed symbol, it stays PATCH and usually needs only a CHANGELOG `### Changed` bullet — **not** a guide section.
|
|
28
|
-
|
|
29
|
-
Additive cuts (new component, new opt-in attribute, new API) need **no** migration section — note "additive; no consumer sweep" in the version table and move on.
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## §Where the guide lives
|
|
34
|
-
|
|
35
|
-
`MIGRATION GUIDE.md` is a **top-level consumer artifact at the repo root** (not under `docs/` — the space in the filename is intentional; it's surfaced to consumers as a first-class document). It is READ by the consumer side but MODIFIED only here, at producer time, when a new breaking release is cut.
|
|
36
|
-
|
|
37
|
-
One section per release that introduces breaking changes, newest at the top. A consumer jumping multiple versions reads the merged span of all sections between their source and target.
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## §The authoring workflow
|
|
42
|
-
|
|
43
|
-
### Step 1 — Enumerate the breaking surface
|
|
44
|
-
|
|
45
|
-
From the cut's diff + CHANGELOG `[vX.Y.Z]` `### Removed` / `### Changed` entries, list every breaking item. For each, capture:
|
|
46
|
-
|
|
47
|
-
- **The symbol** — the exact prop / attr / slot / event / token / tag.
|
|
48
|
-
- **The before → after** — old shape and new shape.
|
|
49
|
-
- **The kind** — pure rename (mechanical) · semantic flip (needs author judgment) · Boolean→enum · removal (no replacement).
|
|
50
|
-
- **The audit grep** — the `git grep -nE` that surfaces call sites.
|
|
51
|
-
- **The sweep** — the `git grep -lE | xargs perl -i -pe` incantation, OR "manual review" if the change can't be safely mechanized.
|
|
52
|
-
|
|
53
|
-
### Step 2 — Write the section
|
|
54
|
-
|
|
55
|
-
Section skeleton (per release):
|
|
56
|
-
|
|
57
|
-
```markdown
|
|
58
|
-
## Migrating to @adia-ai/web-components@X.Y.Z (YYYY-MM-DD)
|
|
59
|
-
|
|
60
|
-
<one-line scope: how many breaking items, the headline.>
|
|
61
|
-
|
|
62
|
-
### <item 1 — bold headline> (`old` → `new`)
|
|
63
|
-
|
|
64
|
-
<one sentence: what changed and why.>
|
|
65
|
-
|
|
66
|
-
**Audit:**
|
|
67
|
-
|
|
68
|
-
\`\`\`bash
|
|
69
|
-
git grep -nE '<pattern that surfaces call sites>'
|
|
70
|
-
\`\`\`
|
|
71
|
-
|
|
72
|
-
**Sweep:**
|
|
73
|
-
|
|
74
|
-
\`\`\`bash
|
|
75
|
-
git grep -nlE '<pattern>' \
|
|
76
|
-
| xargs perl -i -pe 's/<old>/<new>/g'
|
|
77
|
-
\`\`\`
|
|
78
|
-
|
|
79
|
-
### <item 2 …>
|
|
80
|
-
...
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Shape rules:
|
|
84
|
-
|
|
85
|
-
- **One item = one subsection.** Each removed/renamed symbol gets its own `###` with audit + sweep (or a "manual review" note).
|
|
86
|
-
- **Bold-prefix headline + before→after in the heading** — readers grep the heading for the symbol they hit.
|
|
87
|
-
- **Audit grep first, sweep second.** The consumer side ALWAYS audits (lists call sites) before sweeping. Author both so they can.
|
|
88
|
-
- **Mechanical vs manual, explicitly labeled.** A pure rename ships a `perl -i -pe`. A semantic flip / opt-out-Boolean / ownership-move ships a **"manual review — here's why"** note instead, because sed can't tell author intent (see §Manual-review classes below).
|
|
89
|
-
- **One component per sweep regex.** Don't merge `<(toast|alert|tag)-ui …>` alternations — perl/sed alternation captures don't preserve the matched alternative cleanly. One component at a time.
|
|
90
|
-
- **HTML-attribute regexes only match HTML/JSX.** A `<button-ui variant="danger">` sweep won't touch JS `el.variant = 'danger'` — author a separate JS-side regex when the symbol has a programmatic form.
|
|
91
|
-
|
|
92
|
-
### Step 3 — Migrate the in-repo surfaces FIRST
|
|
93
|
-
|
|
94
|
-
Before the cut ships, sweep the framework's OWN consumer surfaces — the demo pages, exemplars, playgrounds, and catalog — so the release doesn't ship broken examples of the thing it just changed. Run your own audit + sweep against `apps/`, `playgrounds/`, `catalog/`, `packages/web-components/components/*/*.html`. This is the producer dogfooding the migration: if the in-repo sweep is awkward, the consumer sweep will be worse — fix the recipe now.
|
|
95
|
-
|
|
96
|
-
### Step 4 — Verify
|
|
97
|
-
|
|
98
|
-
Run the cut's normal pre-flight gate roster (`cycle-happy-path.md` §Step 3). For a breaking cut, pay special attention to the structural/demo gates (`check:demo-shells`, the static-HTML probes) — they catch in-repo surfaces you missed. A **sweep-verification grep audit** across all extensions catches the trap where a vocabulary migration touched the markup but NOT the CSS selectors that style it or the JS comments that reference it (different files; a markup-only commit looks complete but leaves drift):
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
# For any vocabulary migration where legacy → new shapes coexist or get
|
|
102
|
-
# retired, grep the full legacy-pattern set across ALL extensions at the
|
|
103
|
-
# END of the in-repo sweep. 0 hits = sweep verified clean.
|
|
104
|
-
LEGACY_PATTERNS=( '<old-tag' 'old-attr=' '--old-token' )
|
|
105
|
-
for pat in "${LEGACY_PATTERNS[@]}"; do
|
|
106
|
-
echo "=== $pat ==="
|
|
107
|
-
grep -rln -E "$pat" apps playgrounds catalog \
|
|
108
|
-
--include='*.css' --include='*.html' --include='*.js' --include='*.yaml' 2>/dev/null
|
|
109
|
-
done
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Step 5 — Cross-reference from the CHANGELOG + release notes
|
|
113
|
-
|
|
114
|
-
- The breaking package's CHANGELOG `[vX.Y.Z]` `### Removed` / `### Changed` entry should name the symbol AND point at the guide ("see `MIGRATION GUIDE.md` §X.Y.Z").
|
|
115
|
-
- The release notes (`notes-authoring.md`) carry a `⚠️` heads-up paragraph naming the break + linking the guide section, so consumers reading the announcement know to migrate.
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## §Manual-review classes (do NOT auto-sweep)
|
|
120
|
-
|
|
121
|
-
Some breaking changes look mechanical but aren't. Document them as **manual review** with the reason, never as a `perl -i -pe`:
|
|
122
|
-
|
|
123
|
-
- **Semantic flips** — a rename that inverts default behavior. Example: `[open]` (default-hidden, opt-in) → `[collapsed]` (default-visible, opt-out). The right migration depends on author intent: if the surface wanted the thing expanded, drop the attr; if hidden, add `collapsed`. List occurrences, ask.
|
|
124
|
-
- **Opt-out Booleans that default true** — when `<x-ui filterable>` is the same as bare `<x-ui>` (filter on by default), the migration only matters where a consumer EXPLICITLY disabled an affordance (`searchable="false"`). Sed can't tell the difference.
|
|
125
|
-
- **Ownership moves** — moving a message/prop from a wrapper to a child (e.g. `<field-ui error="…">` → the message moves to the slotted control) requires knowing which child is the form control; the slot may not exist yet. Manual.
|
|
126
|
-
- **kebab-string property keys** — when the HTML _attribute_ name is unchanged but the JS _programmatic_ form changed (`el['submit-label']` → `el.submitLabel`), attribute-only consumers need no migration. Audit programmatic access only.
|
|
127
|
-
- **Wide tag/token renames (50+ symbols)** — the `@agent-ui-kit/*` → `@adia-ai/*` namespace rename class: tag renames, token-namespace renames (`--n-*` → `--a-*`), class renames (`NanoElement` → `AdiaElement`). Don't auto-sweep the whole surface blind — false positives are likely (a `variant="danger"` on a non-`*-ui` element that shares a prefix). List by table; require human approval per cluster.
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## §The version-coverage table
|
|
132
|
-
|
|
133
|
-
Maintain a table at the top of `MIGRATION GUIDE.md` that classifies every release so a consumer jumping a gap knows which sections apply:
|
|
134
|
-
|
|
135
|
-
```markdown
|
|
136
|
-
| Version | Type | Sweeps |
|
|
137
|
-
|---|---|---|
|
|
138
|
-
| `0.0.22` | additive | New shell components; net-new APIs. No consumer sweep needed. |
|
|
139
|
-
| `0.0.21` | additive (no runtime change) | JSDoc/source-doc refresh. Bump the dep; no sweep. |
|
|
140
|
-
| `0.0.20` | BREAKING (N items) | <bullet list of every breaking item + its sweep>. |
|
|
141
|
-
| `0.0.5`–`0.0.19` | additive | No migration sweeps. Bump the dep version. |
|
|
142
|
-
| `0.0.4` | structural | Runtime extracted to a new package; imports retarget. |
|
|
143
|
-
| `@agent-ui-kit/*` → `@adia-ai/*` | rename | Tag + token + class renames (50+). Don't auto-migrate without approval. |
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
`additive` = bump and go. `BREAKING` = the version has a `###` section with audit + sweep per item. `structural` = import retargeting (package extraction / move). `rename` = wide namespace rename, manual-review by cluster.
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
## §Forward-looking surfaces (the next guide author's heads-up)
|
|
151
|
-
|
|
152
|
-
When a surface is currently additive but accumulating breaking pressure, note it at the bottom of the guide so the NEXT breaking-release author knows where the churn is concentrated — shell components, the gen-UI MCP op-type names, table-family opt-out attributes, etc. A future author reading "this area is volatile" writes a tighter section faster.
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## §Anti-patterns
|
|
157
|
-
|
|
158
|
-
- **Authoring the guide AFTER the cut ships.** The guide section is part of the breaking-release scope — write it in the same cycle, before the in-repo sweep, so you dogfood the recipe.
|
|
159
|
-
- **A `perl -i -pe` for a semantic flip.** If author intent decides the migration, it's manual review. A mechanical sweep applied to a flip silently mis-migrates surfaces.
|
|
160
|
-
- **Merging component sweeps into one alternation regex.** One component per regex (capture-group preservation).
|
|
161
|
-
- **Skipping the in-repo sweep.** Shipping a breaking release whose own demo pages still use the old shape teaches consumers the wrong thing and trips the demo gates.
|
|
162
|
-
- **A bare CHANGELOG bullet with no guide section for a real break.** The CHANGELOG says _what_; the guide says _how_. A removed symbol needs both.
|
|
163
|
-
- **Treating this as the consumer sweep.** This skill authors the guide + migrates in-repo surfaces. Sweeping a downstream consumer app is the separate consumer/app-author plugin's job.
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
## §Verify target (mode 11)
|
|
168
|
-
|
|
169
|
-
The migration-guide section is "done" when:
|
|
170
|
-
|
|
171
|
-
1. Every breaking item in the cut's CHANGELOG has a matching `###` subsection (audit + sweep, or a labeled manual-review note).
|
|
172
|
-
2. The in-repo surfaces (demo / playground / catalog) are swept and the sweep-verification grep audit reports **0 legacy hits**.
|
|
173
|
-
3. The breaking cut's structural/demo gates pass.
|
|
174
|
-
4. The release notes carry the `⚠️` heads-up linking the guide section.
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
# `multi-agent-baseline.md` — peer-in-flight classification + stash discipline
|
|
2
|
-
|
|
3
|
-
> Loaded by every mode when the working tree shows files you didn't author. Companion to `AGENTS.md` § "Multi-agent baseline assumption" — release-side specialization.
|
|
4
|
-
|
|
5
|
-
The AdiaUI monorepo is **always** worked on by multiple agents concurrently. At any moment a peer agent may be: writing source, drafting tickets, updating skills, regenerating corpus chunks, fixing demo shells, or running an unrelated cycle. Your context is stale at the start of every turn.
|
|
6
|
-
|
|
7
|
-
Release work is unusually sensitive to peer activity because:
|
|
8
|
-
|
|
9
|
-
- A release commit's CHANGELOG makes claims (`### Added — X`); peer files in the working tree may **contradict** those claims (the classic v0.6.20 case: peer revert of FEEDBACK-37 while the v0.6.20 CHANGELOG documented FEEDBACK-37 as added).
|
|
10
|
-
- A release tarball is built from the tag's tree; peer-in-flight uncommitted files don't ship — but the site build (working-tree driven) DOES include them. This split is silent and easy to miss.
|
|
11
|
-
- A `git add -A` on a peer-dirty tree sweeps in peer work without consent. The release commit then makes claims it doesn't authorize.
|
|
12
|
-
|
|
13
|
-
This reference encodes the four disciplines that prevent these defects.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## §Discipline 1 — Re-baseline at every turn
|
|
18
|
-
|
|
19
|
-
Non-negotiable. The first **four** commands of every release-cycle turn:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
git -C $REPO branch --show-current # MUST equal main before cutting
|
|
23
|
-
git -C $REPO status --short
|
|
24
|
-
git -C $REPO log --oneline -8
|
|
25
|
-
git -C $REPO fetch && git -C $REPO log HEAD..origin/main --oneline
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Then read the output BEFORE running anything mutating:
|
|
29
|
-
|
|
30
|
-
- `branch --show-current` shows the checked-out branch. **It must be `main`.** Peers in this shared clone sometimes work on local feature branches (`fix/*`, `feat/*`) — the AGENTS.md session snapshot saying "Current branch: main" reflects the _prior_ session, not now. Cutting on a feature branch means `git push origin main` pushes the stale `main` ref (not your release commit) while the tags point at the feature tip → tags ahead of main. See the §Wrong-branch recovery below.
|
|
31
|
-
- `status` shows working-tree changes. Every modified or untracked file is a classification decision.
|
|
32
|
-
- `log -8` shows recent commits. Peer commits since your last turn? New work staged for the release? An unexpected revert?
|
|
33
|
-
- `fetch && log HEAD..origin/main` shows remote drift. Did someone else push?
|
|
34
|
-
|
|
35
|
-
> **§Wrong-branch recovery (v0.7.4 incident, 2026-06-02).** Cut the release on a peer's local-only `fix/font-family-floor-and-css-rollups` instead of main; caught at push (origin/main landed at a mid-window commit, tags pointed at the feature tip). Recovery was clean **because publish is `workflow_dispatch`, not tag-triggered** — npm stayed at the prior version through the whole tangle. If the feature tip's parent is an ancestor of the old main (it was: ff-able), recover with `git branch -f main <release-sha>` → `git checkout main` (no churn since main now == HEAD) → `git push origin main` to fast-forward origin/main to the release commit. Verify `origin/main == vX.Y.Z tag == HEAD` BEFORE dispatching publish. Moving tags while local is free (`tag-lockstep --delete`); moving them after a publish is not.
|
|
36
|
-
|
|
37
|
-
If anything is unexpected, **diff before deciding**:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
git -C $REPO diff <path> # working-tree changes
|
|
41
|
-
git -C $REPO show <sha> --stat # peer commits
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Never proceed past surprising state without classifying it.
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## §Discipline 2 — Classification taxonomy
|
|
49
|
-
|
|
50
|
-
Every modified or untracked file falls into one of these buckets:
|
|
51
|
-
|
|
52
|
-
| Bucket | Definition | Action |
|
|
53
|
-
| --- | --- | --- |
|
|
54
|
-
| **Mine** | You authored this in the current turn | Stage explicitly |
|
|
55
|
-
| **Peer-release-relevant** | Peer authored, part of THIS release's scope (the peer's release-prep work — Variant A) | Stage explicitly |
|
|
56
|
-
| **Peer-in-flight, release-relevant, undocumented, contradicts CHANGELOG** | Peer authored, would change the release's behavior but has no CHANGELOG entry and may contradict an existing one | **Stash** — exclude from release; flag to operator |
|
|
57
|
-
| **Peer-in-flight, future-release scope** | Peer's working-tree progress destined for a later cut (e.g. `[Unreleased]` block additions, demo-page updates not yet documented) | Leave uncommitted — not yours to commit |
|
|
58
|
-
| **Ticket-lane / skill / journal** | `.agents/team/tickets/**`, `.agents/skills/**`, `docs/journal/**` peer work | Leave uncommitted — ticket / skill / docs lane |
|
|
59
|
-
| **Generated / regenerable** | `package-lock.json` after a bump, sidecar `.a2ui.json`, `chunk-embeddings.json` after regen | Stage iff you ran the generator this turn |
|
|
60
|
-
| **Unknown** | Diff doesn't tell you intent | Ask the operator OR check the most recent commit message for clues OR check `.brain/notes/` for a peer prep note |
|
|
61
|
-
|
|
62
|
-
The decision is **per-file**, not per-directory. A peer might have modified `admin-shell.js` (release-relevant) AND `SKILL.md` (skill-lane) in the same turn — they get different verdicts.
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## §Discipline 3 — Explicit allowlist staging
|
|
67
|
-
|
|
68
|
-
**Never** `git add -A` or `git add .` on a peer-dirty tree. The staging area is opaque without inspection; a peer may have left files staged from a prior partial workflow.
|
|
69
|
-
|
|
70
|
-
The defensive pattern:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
# 1. Reset the staging area defensively.
|
|
74
|
-
git -C $REPO reset HEAD >/dev/null 2>&1
|
|
75
|
-
|
|
76
|
-
# 2. Stage the explicit allowlist by name.
|
|
77
|
-
git -C $REPO add \
|
|
78
|
-
package-lock.json \
|
|
79
|
-
packages/web-components/package.json \
|
|
80
|
-
packages/web-components/CHANGELOG.md \
|
|
81
|
-
packages/web-modules/package.json \
|
|
82
|
-
packages/web-modules/CHANGELOG.md \
|
|
83
|
-
packages/llm/package.json \
|
|
84
|
-
packages/llm/CHANGELOG.md \
|
|
85
|
-
packages/a2ui/compose/package.json \
|
|
86
|
-
packages/a2ui/compose/CHANGELOG.md \
|
|
87
|
-
packages/a2ui/corpus/package.json \
|
|
88
|
-
packages/a2ui/corpus/CHANGELOG.md \
|
|
89
|
-
packages/a2ui/mcp/package.json \
|
|
90
|
-
packages/a2ui/mcp/CHANGELOG.md \
|
|
91
|
-
packages/a2ui/retrieval/package.json \
|
|
92
|
-
packages/a2ui/retrieval/CHANGELOG.md \
|
|
93
|
-
packages/a2ui/runtime/package.json \
|
|
94
|
-
packages/a2ui/runtime/CHANGELOG.md \
|
|
95
|
-
packages/a2ui/validator/package.json \
|
|
96
|
-
packages/a2ui/validator/CHANGELOG.md
|
|
97
|
-
|
|
98
|
-
# 3. Verify staged count matches the allowlist.
|
|
99
|
-
git -C $REPO diff --cached --stat | tail -3
|
|
100
|
-
# Expected: "19 files changed" for a pure-stub release; more if you
|
|
101
|
-
# also staged source files (test updates, etc.)
|
|
102
|
-
|
|
103
|
-
# 4. Confirm peer-in-flight files are NOT in the staged set.
|
|
104
|
-
git -C $REPO diff --cached --name-only | sort
|
|
105
|
-
# Eyeball — no surprises.
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
The memory `feedback_git_commit_targeted` records this rule as a "4th incident" — peer renames absorbed silently 4 times before the `git reset HEAD` defensive prefix became standard.
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## §Discipline 4 — Stash workflow for strays
|
|
113
|
-
|
|
114
|
-
A stray = a peer-in-flight file that is:
|
|
115
|
-
|
|
116
|
-
1. Uncommitted,
|
|
117
|
-
2. Undocumented (no CHANGELOG entry covers it, no commit message explains it),
|
|
118
|
-
3. Would change behavior visible to consumers, AND
|
|
119
|
-
4. Contradicts an existing release-relevant artifact.
|
|
120
|
-
|
|
121
|
-
The canonical example: `admin-shell.tokens.css` `--page-content-header-bg` changed from `--a-canvas-1` to `--a-canvas-0` uncommitted, with the inline comment still describing `canvas-1`. Sat across v0.6.17/0.6.18/0.6.19 cycles. Resolved when the operator confirmed "keep canvas-0" in the v0.6.19→v0.6.20 boundary.
|
|
122
|
-
|
|
123
|
-
The stash workflow:
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
# 1. Stash the stray file(s) by name. Include a clear message so the
|
|
127
|
-
# next operator (or you next turn) understands why.
|
|
128
|
-
git -C $REPO stash push <path1> <path2> \
|
|
129
|
-
-m "vX.Y.Z-cycle: <stray reason> — parked during release"
|
|
130
|
-
|
|
131
|
-
# 2. Verify the working tree is sane.
|
|
132
|
-
git -C $REPO status --short
|
|
133
|
-
# Stashed files no longer appear as modified.
|
|
134
|
-
|
|
135
|
-
# 3. Do the full release (Steps 3–10 of cycle-happy-path.md).
|
|
136
|
-
|
|
137
|
-
# 4. Restore the stash AFTER the cycle ships.
|
|
138
|
-
git -C $REPO stash pop
|
|
139
|
-
# If "Dropped stash" prints, it applied cleanly.
|
|
140
|
-
# If "kept the stash" prints, there's a conflict — the working tree
|
|
141
|
-
# moved while you were releasing. Investigate before dropping.
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
**Always stash, never revert** unless the operator explicitly says "discard." Revert (`git checkout <file>`) destroys peer work; stash preserves it.
|
|
145
|
-
|
|
146
|
-
**Note the stash in the audit-history ledger** so the next operator can see what was excluded and why.
|
|
147
|
-
|
|
148
|
-
The 4 case studies in `assets/case-studies/` covering this discipline:
|
|
149
|
-
|
|
150
|
-
- `2026-05-21-stale-test-detection-v0.6.20.md` — peer changed CSS, didn't update test; deploy session updated the test (NOT stashed — fixed forward because the test was legitimately stale).
|
|
151
|
-
- `2026-05-21-feedback37-retraction-v0.6.21.md` — peer staged a revert of FEEDBACK-37 mid-cycle; stashed (would contradict the v0.6.20 CHANGELOG); the peer committed the revert post-publish for v0.6.21.
|
|
152
|
-
- `2026-05-20-version-skip-correction-v0.6.12.md` — peer mislabeled the cut v0.6.13; corrected 25 files across the release commit.
|
|
153
|
-
- (Phase 3) `2026-05-21-stash-pop-conflict-v0.6.20.md` — concurrent peer activity caused stash pop to keep-the-stash. Resolution: drop if the working tree has caught up (committed the same content); preserve if not. Never blind drop.
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
## §Pre-cut state classification flowchart
|
|
158
|
-
|
|
159
|
-
When you re-baseline at Step 1 and find a non-clean working tree, walk this in order. The output is "what mode" + "what to stash."
|
|
160
|
-
|
|
161
|
-
```text
|
|
162
|
-
Is there an unpushed release commit (`release(*): vX.Y.Z`)?
|
|
163
|
-
├── Yes, exactly one → Mode 3 (Deploy handoff) — peer pre-cut
|
|
164
|
-
│ └── Are there commits AFTER it?
|
|
165
|
-
│ ├── Yes, with CHANGELOG additions to [Unreleased] → §Boundary check
|
|
166
|
-
│ │ (see recovery-paths.md § [Unreleased] promotion, Phase 2 —
|
|
167
|
-
│ │ the v0.6.18 case: peer release commit fails check:demo-shells
|
|
168
|
-
│ │ because the demo-shell fix landed entangled with future work)
|
|
169
|
-
│ └── No → Mode 3 happy path; tag at HEAD
|
|
170
|
-
├── Yes, multiple → Mode 4 (Batch push)
|
|
171
|
-
│ (see recovery-paths.md § batch-push, Phase 2 — the v0.6.14+v0.6.15
|
|
172
|
-
│ case: publish in version order for npm latest)
|
|
173
|
-
└── No → Mode 2 (Author from scratch); promote [Unreleased] → [vX.Y.Z]
|
|
174
|
-
|
|
175
|
-
Is the working tree clean?
|
|
176
|
-
├── Yes → proceed with the determined mode.
|
|
177
|
-
└── No → classify per the §Discipline 2 taxonomy.
|
|
178
|
-
For every file: Mine? Peer-release-relevant? Stray? Ticket-lane?
|
|
179
|
-
Stash strays, leave ticket-lane alone, stage release-relevant.
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
## §The audit-history ledger contract
|
|
185
|
-
|
|
186
|
-
Every cycle's ledger (Step 11 of `cycle-happy-path.md`) includes a `notes` array. Entries about peer-in-flight handling go there. Standard phrasings:
|
|
187
|
-
|
|
188
|
-
```json
|
|
189
|
-
"notes": [
|
|
190
|
-
"STRAY UNCOMMITTED CHANGE EXCLUDED: <file> — <one-line summary>. git-stashed during the release; restored to the working tree after. Flagged to operator.",
|
|
191
|
-
"PEER-IN-FLIGHT EXCLUDED: <file> — <one-line summary>. v0.X.Y ships the committed state, NOT the peer's uncommitted change. The revert was restored post-release.",
|
|
192
|
-
"Peer cycle activity: skill v2.X.Y / journal §NNN / ticket-lane grooming rode along on main inside the unpushed range — already committed by peers; not npm release artifacts.",
|
|
193
|
-
"Concurrent peer modified <file> mid-cycle; was committed by the peer in <sha> as `<message>`. v0.X.Y absorbed / excluded per <reason>."
|
|
194
|
-
]
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
The ledger is the long-term memory of the peer-classification decision. Future cycles read past ledgers (Mode 8 — Phase 3 Investigation).
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
## §When this reference is "done v1"
|
|
202
|
-
|
|
203
|
-
- Every modified file in a release cycle classifies cleanly into one bucket from §Discipline 2 (zero "unknown" verdicts).
|
|
204
|
-
- Every stash command in the release uses the `vX.Y.Z-cycle:` prefix
|
|
205
|
-
- a meaningful reason.
|
|
206
|
-
- Every audit-history ledger has at least one `notes` entry per excluded / stashed / peer-in-flight file.
|
|
207
|
-
- The §Pre-cut state classification flowchart correctly routes the next 3 cycles without operator override.
|