Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
222 commits
Select commit Hold shift + click to select a range
73104e1
chore: remove legacy Python implementation
jeprecated May 25, 2026
19048d4
feat: add Rust Brain Brew core and CLI
jeprecated May 25, 2026
56b5e3f
test: add federation fixtures and regression coverage
jeprecated May 25, 2026
25ebf00
docs: add Brain Brew federation guidance
jeprecated May 25, 2026
6cb053b
chore: prepare brainbrew package for preview release
jeprecated May 25, 2026
1e02f2f
ci: add cargo-dist release automation
jeprecated May 25, 2026
3b5dec5
docs: document preview install and release flow
jeprecated May 25, 2026
1a3ad70
release: use 1.0 alpha version for Rust rewrite
jeprecated May 25, 2026
5f3b464
docs: replace ADRs with hindsight decision set
jeprecated May 25, 2026
dd25815
chore: migrate dev environment to devenv
jeprecated Jun 22, 2026
a060d89
fix: load devenv direnvrc
jeprecated Jun 22, 2026
f8d51e9
feat: add source includes and clarify translation overlays
jeprecated Jun 22, 2026
974a5df
refine contextual translation scopes
jeprecated Jun 22, 2026
1b35253
add translation coverage workflow
jeprecated Jun 22, 2026
6438e33
use local brainbrew in devenv
jeprecated Jun 22, 2026
99bf912
improve translation command UX
jeprecated Jun 22, 2026
375a0df
make translation workflow a real arrow-key TUI
jeprecated Jun 22, 2026
9e44eb8
fix raw-mode translation TUI line endings
jeprecated Jun 22, 2026
58c4202
scroll long translation TUI option lists
jeprecated Jun 22, 2026
5261555
focus translation reports on actionable text
jeprecated Jun 22, 2026
6a77210
bulk apply translation TUI actions
jeprecated Jun 22, 2026
b72fe4e
add explicit no-change translations
jeprecated Jun 22, 2026
fcc5fd4
mark unchanged UG language text explicitly
jeprecated Jun 22, 2026
b7c2544
simplify no-change translations to source lists
jeprecated Jun 22, 2026
2768978
add translation coverage summary export
jeprecated Jun 22, 2026
7d0fd92
align translation summary table output
jeprecated Jun 22, 2026
8bb4dc7
compact translation summary table
jeprecated Jun 22, 2026
feb51d4
add translator context view
jeprecated Jun 22, 2026
a923b2a
document non-Nix install path
jeprecated Jun 22, 2026
7ee471f
prepare crates.io publishing
jeprecated Jun 22, 2026
c8e3f59
add crates release task commands
jeprecated Jun 22, 2026
08d1a8c
update install docs for published crate
jeprecated Jun 22, 2026
83a26a9
strengthen semantic regression coverage
jeprecated Jun 22, 2026
e07724b
support structured translatable messages
jeprecated Jun 22, 2026
7fa52ec
migrate UG flag similarity messages
jeprecated Jun 23, 2026
58c4955
add inline formatted message variables
jeprecated Jun 23, 2026
0d3992b
Document Deck Workbench direction
jeprecated Jun 23, 2026
1ff6882
Add manifest language catalog
jeprecated Jun 23, 2026
2b4c6f8
Add workbench server scaffold
jeprecated Jun 23, 2026
aa711b3
Add workbench Iced WASM scaffold
jeprecated Jun 23, 2026
edaf00a
Add workbench browser E2E harness
jeprecated Jun 23, 2026
a16eef9
Implement workbench note pivot editing
jeprecated Jun 23, 2026
946b56f
Add stale translation records
jeprecated Jun 23, 2026
a95da4f
Implement workbench source note-field editing
jeprecated Jun 23, 2026
5bbe546
Implement workbench source string pivot
jeprecated Jun 23, 2026
a9f0984
Implement workbench new language scaffolding
jeprecated Jun 23, 2026
2335133
Implement workbench card pivot
jeprecated Jun 23, 2026
48fee98
Implement workbench flexible pane layouts
jeprecated Jun 23, 2026
6676cc0
Implement workbench comparison language panes
jeprecated Jun 23, 2026
0b14f3d
Implement workbench optional metadata checklist
jeprecated Jun 23, 2026
3543812
Add sd commands for Brain Brew workflows
jeprecated Jun 24, 2026
a9723fe
Add Ultimate Geography Workbench language catalog
jeprecated Jun 24, 2026
bb87958
Fix Workbench UX for Ultimate Geography
jeprecated Jun 24, 2026
73ad6e2
Lazy-load Workbench secondary pivots
jeprecated Jun 24, 2026
206d1bb
Document lazy Workbench editing architecture
jeprecated Jun 24, 2026
86de936
Add paginated Workbench navigation lists
jeprecated Jun 24, 2026
a64337c
Implement selected note detail Workbench
jeprecated Jun 24, 2026
bc21211
Implement selected Workbench card and source-string details
jeprecated Jun 24, 2026
b2e22e0
Add Workbench request freshness guards
jeprecated Jun 24, 2026
3ed9c90
Improve Workbench usability
jeprecated Jun 24, 2026
932a3c4
Add Workbench inline caret regression tests
jeprecated Jun 24, 2026
38fd212
Add real UG Workbench media E2E
jeprecated Jun 24, 2026
04992fe
Add Workbench media diagnostics tests
jeprecated Jun 24, 2026
9eb27f4
Add Workbench DOM UX contract E2E
jeprecated Jun 24, 2026
29a091b
Use real WebDriver Workbench E2E interactions
jeprecated Jun 24, 2026
a82baed
Improve Workbench E2E failure diagnostics
jeprecated Jun 24, 2026
63295e0
Default UG Workbench media root for sd task
jeprecated Jun 25, 2026
12f28d9
Configure Workbench metadata categories
jeprecated Jun 25, 2026
ec3a4bf
ongoing
jeprecated Jun 28, 2026
8086883
Report structured message render errors during variable rendering
jeprecated Jul 3, 2026
7578f5c
chore: track .frontloop task queue in version control
jeprecated Jul 3, 2026
aad89d9
chore: update frontloop queue to match wave-1 delegation state
jeprecated Jul 3, 2026
9c81472
Fail CrowdAnki import on stable ID collisions
jeprecated Jul 3, 2026
935174a
Cache workbench composition per freshness generation
jeprecated Jul 3, 2026
5dd27f8
chore: mark 0020 and 0030 done in frontloop queue
jeprecated Jul 3, 2026
5d52cd4
Refresh Ultimate Geography fixture from upstream
jeprecated Jul 3, 2026
d145e32
chore: 0040 integrated, judge pending; queue update
jeprecated Jul 3, 2026
81ae82c
Refactor translation resolution into shared resolver
jeprecated Jul 3, 2026
902969f
chore: 0040 done; 0050 integrated (judge pending)
jeprecated Jul 3, 2026
9710e5c
Unify YAML scalar emission
jeprecated Jul 3, 2026
dec2020
chore: 0060 integrated (judge pending)
jeprecated Jul 3, 2026
fab1b86
Preserve source includes during format verification
jeprecated Jul 3, 2026
c3328a8
chore: 0070 done (include-preserving fmt/verify)
jeprecated Jul 3, 2026
4d7e437
fix: pin translation semantics and canonicalize UG fixture
jeprecated Jul 3, 2026
af17e6f
enforce media integrity in verify and export
jeprecated Jul 3, 2026
d42a7ed
chore: 0050,0060 done; 0080 integrated (judge pending)
jeprecated Jul 3, 2026
b63a19a
Deduplicate translation helpers and glob matching
jeprecated Jul 3, 2026
b915943
chore: 0080 done; 0090 integrated (judge pending)
jeprecated Jul 3, 2026
a44cbb0
split brain-brew-core lib into modules
jeprecated Jul 3, 2026
c6cb89e
chore: 0100 integrated (judge pending)
jeprecated Jul 3, 2026
2db23cb
chore: 0090 done; 0110+0120 in progress (parallel)
jeprecated Jul 3, 2026
b6d6af3
Make workbench apply writes atomic
jeprecated Jul 3, 2026
ad3f15c
chore: 0100 done; 0120 integrated (judge pending)
jeprecated Jul 3, 2026
df60145
Add typed DeckPath grammar in core
jeprecated Jul 3, 2026
c3d42fa
chore: 0120 done; 0110 integrated (judge pending)
jeprecated Jul 3, 2026
d5ece6e
chore: 0190+0200 in progress (independent docs, parallel)
jeprecated Jul 3, 2026
f730eda
docs: mark lock package federation experimental
jeprecated Jul 3, 2026
0731a54
chore: 0190 done (docs target counts)
jeprecated Jul 3, 2026
a1ecc0d
docs: refresh ultimate geography target counts
jeprecated Jul 3, 2026
79a6fc5
chore: correct labels; 0190 (target counts) + 0200 (experimental) int…
jeprecated Jul 4, 2026
439cc74
chore: 0180 in progress (independent e2e test-only)
jeprecated Jul 4, 2026
c2db556
core: enforce DeckPath-safe stable ids
jeprecated Jul 4, 2026
ec0ec66
chore: 0140 (CLI half) in progress; workbench half deferred with 0130
jeprecated Jul 4, 2026
bb252f4
chore: 0170 (html/css validation) in progress (parallel with 0140)
jeprecated Jul 4, 2026
3207856
test: poll stale language reload e2e
jeprecated Jul 4, 2026
b9046b7
chore: 0180 done (e2e polling)
jeprecated Jul 4, 2026
fb412c2
Wire stale translation resolution into translations CLI
jeprecated Jul 4, 2026
15a53d9
chore: 0110 done; 0140 CLI integrated (judge pending); 0160 in progre…
jeprecated Jul 4, 2026
81e4d64
Add HTML and CSS content validation to verify
jeprecated Jul 4, 2026
ec33caa
docs: add ADR 0016 structured image references
jeprecated Jul 4, 2026
ab6fcab
chore: queue reconcile - 0110 + 0140 done (code integrated, judges AC…
jeprecated Jul 4, 2026
6a52d52
chore: 0170 done (html/css content validation, judge ACCEPT)
jeprecated Jul 4, 2026
fa9986a
docs: revise ADR-016 image refs to stable ids
jeprecated Jul 4, 2026
a660196
docs: mark ADR-016 Accepted (user approved !image stable-id)
jeprecated Jul 4, 2026
b308be7
Implement structured image field references
jeprecated Jul 4, 2026
630ff41
Implement structured image rendering and verification
jeprecated Jul 4, 2026
3b12d7a
Implement CrowdAnki import image reverse mapping
jeprecated Jul 4, 2026
5d467bc
Add media image reference migration tooling
jeprecated Jul 4, 2026
42aeb68
chore: 0160 (!image epic) + 0170 (content validation) done — queue co…
jeprecated Jul 4, 2026
ff6445b
formats: support media include maps
jeprecated Jul 4, 2026
983fbae
cli: support hoisted media maps
jeprecated Jul 4, 2026
b4203cf
fixture: hoist UG media map
jeprecated Jul 4, 2026
f1b864b
test: guard UG hoisted media map
jeprecated Jul 4, 2026
377a632
docs: document deck media includes
jeprecated Jul 4, 2026
199c4d7
implement overlay compose safety contracts
jeprecated Jul 4, 2026
d66bc90
fail closed on remaining CrowdAnki adapter data
jeprecated Jul 4, 2026
21fb0aa
harden formats YAML emitter round trips
jeprecated Jul 4, 2026
4b73773
fix media include manifest roots and diagnostics
jeprecated Jul 4, 2026
aa1f112
fix path lock verification and portability
jeprecated Jul 4, 2026
d63c3c0
fix default path locks and restore http github parsing
jeprecated Jul 4, 2026
2b60805
Fix stale translation resolution lifecycle
jeprecated Jul 4, 2026
77381ed
Enforce machine-parseable CLI contract
jeprecated Jul 4, 2026
7959365
Preserve structured CLI JSON error details
jeprecated Jul 4, 2026
4f6bf3f
Document July bug-fix behavior changes
jeprecated Jul 5, 2026
0bbd7e2
workbench-ui: swap Iced runtime for minimal Leptos CSR (stage 0010)
jeprecated Jul 6, 2026
66c9eee
workbench-ui: let Leptos own view skeleton
jeprecated Jul 6, 2026
ce55c86
workbench-ui: migrate note view interior to Leptos
jeprecated Jul 6, 2026
a80cedc
workbench-ui: preserve note contextual staging shape
jeprecated Jul 6, 2026
a152fc1
workbench-ui: port remaining notes workflow panels to leptos
jeprecated Jul 6, 2026
bc90007
workbench-ui: port remaining pivots to leptos
jeprecated Jul 6, 2026
0f4ff4e
workbench-ui: purge leptos migration leftovers
jeprecated Jul 6, 2026
37e4c72
frontloop: archive workbench leptos migration
jeprecated Jul 6, 2026
c089bb4
ci: add devenv shell ci workflow
jeprecated Jul 7, 2026
5289cca
ci: check workbench embedded assets freshness
jeprecated Jul 7, 2026
4e26c29
docs: add comprehensive audit remediation program
jeprecated Jul 9, 2026
ae77700
fix: reject duplicate keys in strict YAML maps
jeprecated Jul 9, 2026
66deb22
chore: complete duplicate-key integrity task
jeprecated Jul 9, 2026
c8303c0
fix: reject malformed YAML unions and scalar coercions
jeprecated Jul 9, 2026
17edca7
chore: complete strict YAML union validation task
jeprecated Jul 10, 2026
aec0685
formats: add include-preserving source documents
jeprecated Jul 10, 2026
2618f7c
chore: complete canonical source document task
jeprecated Jul 10, 2026
abdd32d
Add journaled recoverable workspace transactions
jeprecated Jul 10, 2026
66d66a4
Make rollback restore staging restart-idempotent
jeprecated Jul 10, 2026
cd3d47d
chore: complete recoverable workspace transaction task
jeprecated Jul 10, 2026
2ad3462
migrate fmt and translation writes to source documents
jeprecated Jul 10, 2026
c5963d5
chore: complete source-document formatting and translation migration
jeprecated Jul 10, 2026
3ded6c3
Contain unsafe Workbench writes behind development capability
jeprecated Jul 10, 2026
845ad1e
chore: complete Workbench write containment task
jeprecated Jul 10, 2026
1520cb8
chore: defer remaining mutator migration for package provenance
jeprecated Jul 10, 2026
363dc4a
security: centralize safe relative path authorization
jeprecated Jul 10, 2026
66ad012
chore: complete safe path authorization task
jeprecated Jul 10, 2026
ef5cc2c
security: require typed immutable lock entries
jeprecated Jul 10, 2026
0a4d559
chore: complete immutable lock schema task
jeprecated Jul 10, 2026
c8c8213
security: harden package tree extraction and snapshots
jeprecated Jul 10, 2026
98d17ca
chore: complete package extraction hardening task
jeprecated Jul 10, 2026
878e07b
Harden remote package fetch and extraction budgets
jeprecated Jul 10, 2026
db34083
chore: complete bounded package fetch task
jeprecated Jul 10, 2026
1545a1b
consolidate manifest operations behind registry planner
jeprecated Jul 10, 2026
3cfd19d
chore: complete registry-aware planner task
jeprecated Jul 10, 2026
522e853
Harden package graph and catalog compatibility validation
jeprecated Jul 10, 2026
2c708d9
chore: complete package graph and catalog validation task
jeprecated Jul 10, 2026
a1a97b0
secure federated media ownership
jeprecated Jul 10, 2026
86b5425
chore: complete federated media ownership task
jeprecated Jul 10, 2026
905debb
chore: unblock remaining mutator migration
jeprecated Jul 10, 2026
60df867
Migrate media import and Workbench writes to safe transactions
jeprecated Jul 10, 2026
51277ae
Anchor Workbench transactions to edit snapshots
jeprecated Jul 10, 2026
48db17c
chore: complete safe mutator migration task
jeprecated Jul 10, 2026
bc25b29
Normalize CLI output safety and diagnostics
jeprecated Jul 10, 2026
54de978
chore: complete CLI output safety task
jeprecated Jul 10, 2026
798b6a2
Limit default Rust test and build parallelism
jeprecated Jul 10, 2026
e101065
chore: complete CPU-friendly test defaults task
jeprecated Jul 10, 2026
0261caf
enforce release media integrity and safe rendered paths
jeprecated Jul 10, 2026
d2075a7
mark UG task helpers as reference-only
jeprecated Jul 10, 2026
de95fc9
chore: complete release media integrity task
jeprecated Jul 10, 2026
daaa42c
bound and prune package discovery
jeprecated Jul 10, 2026
78bdf46
chore: complete bounded package discovery task
jeprecated Jul 10, 2026
226a461
Unify note fields as semantic values
jeprecated Jul 10, 2026
58e8fa1
chore: complete semantic field value task
jeprecated Jul 10, 2026
a50e1a4
Enforce canonical expected-base entity fingerprints
jeprecated Jul 10, 2026
fe17817
chore: complete destructive expected-base task
jeprecated Jul 10, 2026
d5abb58
Implement typed path tombstones with provenance
jeprecated Jul 10, 2026
2ed3ec1
chore: complete typed tombstone task
jeprecated Jul 10, 2026
2327fcb
Resolve structured messages through validated field graph
jeprecated Jul 10, 2026
ae77837
chore: complete message dependency graph task
jeprecated Jul 10, 2026
76cd66b
core: make semantic diff exact and law tested
jeprecated Jul 10, 2026
8913594
chore: complete exact semantic diff task
jeprecated Jul 10, 2026
3e715b5
expose typed domain diagnostics end to end
jeprecated Jul 10, 2026
bb2dad4
complete typed diagnostics adapter transport
jeprecated Jul 10, 2026
8d12203
preserve typed diagnostics through workbench apply validation
jeprecated Jul 10, 2026
c423081
chore: complete typed diagnostics task
jeprecated Jul 10, 2026
6b8ab14
Generate Unicode-safe CrowdAnki imported note IDs
jeprecated Jul 10, 2026
d0e4231
Reject CrowdAnki GUID and template ordinal identity defects
jeprecated Jul 11, 2026
0e669d0
Add reviewable CrowdAnki import plans
jeprecated Jul 11, 2026
7a3b000
chore(frontloop): archive completed epics and record decisions
jeprecated Jul 11, 2026
bfdeee8
Import CrowdAnki media bytes transactionally
jeprecated Jul 11, 2026
2798667
Add normalized CrowdAnki equivalence oracle
jeprecated Jul 11, 2026
8a56a39
Document CrowdAnki bootstrap-only import boundary
jeprecated Jul 11, 2026
d5eaec0
chore(frontloop): archive completed CrowdAnki epic
jeprecated Jul 11, 2026
6069875
chore(release): synchronize publishable crates at alpha.2
jeprecated Jul 11, 2026
6ed7725
test(release): verify extracted crates in publication order
jeprecated Jul 11, 2026
1903356
ci(release): separate Nix package checks from browser E2E
jeprecated Jul 11, 2026
04f717d
ci(release): gate hosting on reusable artifact quality
jeprecated Jul 11, 2026
8a51b03
security(release): pin actions and installers
jeprecated Jul 11, 2026
34f99cf
security(release): add supply-chain policy and provenance gates
jeprecated Jul 11, 2026
80c4c5c
Refresh embedded Workbench release assets
jeprecated Jul 11, 2026
08044cc
security(release): scope attestations to shipped artifacts
jeprecated Jul 13, 2026
159c336
feat(translations): centralize dictionary mutation invariants
jeprecated Jul 13, 2026
49c78bc
fix(translations): close dictionary mutation bypasses
jeprecated Jul 13, 2026
6373167
fix(translations): validate Anki template field references
jeprecated Jul 13, 2026
9b95146
feat(translations): add compositional stack coverage
jeprecated Jul 14, 2026
8ffe9fe
feat(translations): model typed path-scoped adaptations
jeprecated Jul 14, 2026
f5f45a3
feat(translations): unify final-stack reports and JSON envelopes
jeprecated Jul 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml,json,toml}]
indent_size = 2
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

eval "$(devenv direnvrc)"
use devenv
98 changes: 98 additions & 0 deletions .frontloop/AUDIT-REMEDIATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Brain Brew audit remediation program

Source of truth: `audit/16-synthesis.md`, supported by `audit/01-flow-map.md` through `audit/15-release-security.md`.

This file defines cross-epic ordering. Within each epic, ready-task numeric prefixes are strict sequence, not estimates of parallel safety. A task whose Implementation Notes names a clarification or another epic must not start until that prerequisite is resolved.

## Epics

1. `release-baseline` — immutable versions, extracted crate verification, Nix, release gating, trusted channels.
2. `canonical-source-integrity` — fail-closed YAML, one source-document interface, recoverable transactions, safe CLI output.
3. `core-compose-correctness` — semantic field values, expected bases, tombstones, messages, semantic diff, typed errors.
4. `package-federation-security` — contained/authenticated packages, bounded fetches, one planner, media provenance.
5. `workbench-hardening` — containment, typed contract, security, CAS/preview/transactions, complete UI, bounded caches.
6. `translation-integrity` — structural content policy, compositional ownership, explicit deletion/adaptation, shared mutation policy.
7. `crowdanki-roundtrip` — Unicode identity, GUID/ordinal validation, reviewable import, media handoff, equivalence/reconciliation.
8. `ultimate-geography-production` — real-consumer canonical/media/translation/parity/package/release baseline.
9. `quality-docs-observability` — truthful ADRs/docs, initialization, executable examples, generated/fuzz/mutation/platform/budget gates.
10. `architecture-performance` — later structural deepening and measured optimization after correctness stabilizes.

## Phase 0 — decisions and immediate containment

Resolve these clarification gates before starting their dependent tasks:

- Release version and supported channels.
- Replacement precondition representation and typed tombstone model.
- Package symlink, compatibility-version, and release-media policies.
- Workbench trust/transaction scope.
- Structural field-name, strict translation ownership, and blank translation policies.
- UG fixture contract and legacy workflow disposition.
- Public Rust crate support commitment.
- Existing `default/clarify/7500` for Anki-to-existing-source reconciliation.

Immediate code containment that does not wait for every decision:

1. `workbench-hardening/0010` — mark Apply experimental or make release Workbench read-only.
2. `canonical-source-integrity/0010` — reject duplicate dynamic keys.
3. `package-federation-security/0010` — central safe-relative-path authorization.
4. `core-compose-correctness/0010` — semantic field values.
5. `ultimate-geography-production/0010` — pinned/reconciled consumer baseline.
6. `quality-docs-observability/0010` — make ADRs and architecture records truthful.

## Phase 1 — integrity foundations

These streams may proceed in parallel, preserving each epic's numeric order:

- `canonical-source-integrity/0010–0040`: strict decoding, source documents, transactions.
- `core-compose-correctness/0010–0050`: value semantics, preconditions, tombstones, messages, complete diff.
- `package-federation-security/0010–0030`: path authorization, immutable lock schema, safe extraction.
- `release-baseline/0010–0030`: version synchronization, extracted crates, Nix/E2E separation.
- `crowdanki-roundtrip/0010–0020`: imported stable IDs and identity validation.

Exit: no silent source loss, no unauthenticated package-tree reads, destructive composition has complete regression coverage, and package artifacts can be verified independently.

## Phase 2 — shared mutation, planning, and Workbench safety

1. Complete `canonical-source-integrity/0050–0070`.
2. Complete `package-federation-security/0040–0090`.
3. Complete `translation-integrity/0010–0050` once its decisions are resolved.
4. Complete `workbench-hardening/0020–0060`; remove read-only/experimental containment only after 0030–0060 pass.
5. Complete `crowdanki-roundtrip/0030–0050`.
6. Complete `core-compose-correctness/0060` with the typed Workbench contract.

Exit: every mutator plans and validates before writing, uses canonical document operations, has recoverable commit semantics, and carries package/media provenance.

## Phase 3 — production Ultimate Geography acceptance

Follow `ultimate-geography-production/0020–0100` in order. Translation tasks 0050/0060 require the translation-integrity epic; golden tasks 0070/0080 require the complete CrowdAnki oracle; packaging and final consumer gate require media ownership and release verification policy.

In parallel after their prerequisites:

- `release-baseline/0040–0070`.
- `quality-docs-observability/0020–0040`.

Exit: actual UG—not only the fixture—formats, verifies all 74+26 targets with media, exports representative goldens, packages declared media reproducibly, and gates Brain Brew releases.

## Phase 4 — product completeness

- `workbench-hardening/0070–0110`: complete list/detail, drafts, bounded caches, accessibility/lifecycle, pivot removal.
- `crowdanki-roundtrip/0060`: implement or deprecate existing-source reconciliation after `default/7500`.
- Remaining executable docs and supported installation/Rust interface work.
- Resolve/complete existing `default/ready/0150` cross-language matrix in coordination with Workbench pagination and translation ownership; do not duplicate it.

## Phase 5 — architecture and long-horizon quality

Only after affected behavior is stable:

1. `architecture-performance/0010–0040` — typed paths and implementation splits.
2. `architecture-performance/0050–0070` — measured composition, media, and list-index optimization.
3. `quality-docs-observability/0050–0100` — property, fuzz, mutation, cross-platform, accessibility/performance, and public-crate gates.

## Global delivery rules

- Use red-green-refactor for every behavior change.
- Each task must preserve deterministic canonical output and run the relevant Devenv gates.
- Security/correctness tasks require the reproduced audit probe as a regression test.
- Structural cleanup follows behavior fixes; do not mix mass refactors with semantic corrections.
- Real UG acceptance is mandatory before release claims are restored.
- Do not mark an epic done while any clarification that affects its shipped behavior remains unresolved.
12 changes: 12 additions & 0 deletions .frontloop/_archive/DECISIONS-2026-07-11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Remediation decision record — 2026-07-11

These decisions close the Frontloop clarification gates created by the audit-remediation plan.

- **Release**: next preview is `1.0.0-alpha.2`. Supported channels are crates.io (manually published once gates pass), pinned GitHub release artifacts, and a pinned Nix flake/tag channel.
- **Workbench**: local user-selected workspaces are trusted; the experimental local API may be reached by any local browser page; Apply rejects cross-root and cross-filesystem batches. This is not a release-safe browser trust boundary.
- **Translations**: field-name translations are optional display labels and do not count toward required coverage by default. True Anki identifier renames require an explicit atomic validated operation. Ownership belongs to the overlay that introduces a unit; completeness is checked across the final target stack. Blank direct translations are invalid; explicit path-scoped deletion/adaptation intents are required.
- **Ultimate Geography fixture**: Brain Brew maintains an exact pinned production snapshot plus explicit reviewed migration transform and requires fixture plus live-consumer gates. UG legacy workflow choices are out of scope for Brain Brew and belong to the external UG migration PR.
- **Rust crates**: `brain-brew-core` and `brain-brew-formats` are implementation packages for alpha.2, without a supported public Rust API commitment.
- **Core replacement safety**: complete replacements use canonical stable fingerprints; sparse changes use typed property-level expectations.
- **Core tombstones**: typed entity/path variants remain canonical, with a compatibility reader for the prior flat representation.
- **CrowdAnki pull-back**: defer the optional Anki/CrowdAnki-to-source workflow until a real maintainer requests it; it is not current Brain Brew scope.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Reject duplicate keys in every dynamic YAML map
priority: critical
---

## Goal

Make canonical deck, overlay, translation, manifest, lock, and media-map decoders reject duplicate IDs or fields before any value is overwritten.

## Acceptance Criteria

- Duplicate keys fail at all dynamic map levels identified by the audit
- Errors name the source file, schema path, and duplicate key where available
- `fmt` and every mutator leave bytes unchanged on duplicate-key failure
- Regression tests cover overlays, contextual translations, manifests, locks, media maps, notes, and targets
- Canonical positive round trips remain byte-stable

## Implementation Notes

First implementation task in this epic; use TDD against the reproduced data-loss probes.


## Completion Summary

- Added recursive fail-closed duplicate-key detection before serde map deserialization
- Wired strict duplicate validation through canonical decks, overlays/translations, manifests, locks, media maps, includes, CLI mutators, verify, and Workbench
- Added source/schema/key diagnostics and byte-unchanged failure regressions
- Added focused coverage for notes, targets, contextual translations, overlays, locks, manifests, media maps, and canonical round trips
- Passed delegated fmt, 413-test non-browser suite, clippy, and independent Claude judgment

### Files Changed

- crates/brain-brew-formats/src/strict_yaml.rs
- crates/brain-brew-formats/src/canonical_yaml.rs
- crates/brain-brew-formats/src/manifest.rs
- crates/brain-brew-formats/src/lockfile.rs
- crates/brain-brew-formats/src/media_map.rs
- crates/brain-brew-formats/src/source_includes.rs
- crates/brain-brew-formats/src/lib.rs
- crates/brain-brew-formats/tests/canonical_yaml.rs
- crates/brain-brew-formats/tests/overlay_yaml.rs
- crates/brain-brew-formats/tests/manifest_yaml.rs
- crates/brain-brew-formats/tests/lockfile_yaml.rs
- crates/brain-brew-formats/tests/media_map.rs
- crates/brain-brew-cli/src/io.rs
- crates/brain-brew-cli/src/commands/lock.rs
- crates/brain-brew-cli/src/commands/media.rs
- crates/brain-brew-cli/src/commands/verify.rs
- crates/brain-brew-cli/src/commands/workbench.rs
- crates/brain-brew-cli/tests/cli.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Validate YAML unions and scalar types before conversion
priority: critical
---

## Goal

Reject conflicting, orphaned, or partial field/message/image/media alternatives and unintended YAML scalar coercions instead of accepting then discarding data.

## Acceptance Criteria

- Each union shape has exactly one valid representation
- Conflicting or incomplete structured values fail with schema-location diagnostics
- Boolean, null, and numeric scalars are rejected where canonical strings are required
- Public emitters return errors rather than panic on constructible invalid map keys
- A malformed-union matrix and hostile scalar corpus cover all decoder entry points

## Implementation Notes

Depends on duplicate-aware decoding so one strict decoder path owns all failures.


## Completion Summary

- Added fail-closed schema validation for malformed field, message, image, media, and overlay union representations
- Rejected unintended boolean, null, and numeric coercion at canonical string positions while preserving intentional typed schema values
- Added schema-path diagnostics and unchanged-byte CLI failure coverage
- Made overlay, manifest, and lock emitters fallible and validated constructible invalid states instead of panicking
- Added malformed-union/scalar matrices and preserved UG canonical formatting, idempotence, and all-target composition
- Passed delegated fmt, full non-browser tests, clippy, focused fixture tests, and independent Claude judgment

### Files Changed

- crates/brain-brew-formats/src/strict_yaml.rs
- crates/brain-brew-formats/src/canonical_yaml.rs
- crates/brain-brew-formats/src/manifest.rs
- crates/brain-brew-formats/src/lockfile.rs
- crates/brain-brew-formats/src/media_map.rs
- crates/brain-brew-formats/tests/yaml_schema_strictness.rs
- crates/brain-brew-formats/tests/yaml_scalar_adversarial.rs
- crates/brain-brew-formats/tests/emitter_roundtrip.rs
- crates/brain-brew-formats/tests/overlay_yaml.rs
- crates/brain-brew-formats/tests/ultimate_geography_fixture.rs
- crates/brain-brew-cli/src/commands/diff.rs
- crates/brain-brew-cli/src/commands/lock.rs
- crates/brain-brew-cli/src/commands/translations.rs
- crates/brain-brew-cli/src/commands/workbench.rs
- crates/brain-brew-cli/tests/cli.rs
- crates/brain-brew-cli/tests/media_includes.rs
- crates/brain-brew-cli/tests/translations_cli.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: Introduce include-preserving canonical source document modules
priority: critical
---

## Goal

Create deep `CanonicalSourceDocument` and `OverlaySourceDocument` modules in formats that expose validated edits while preserving include directives and canonical emission.

## Acceptance Criteria

- Deck and overlay documents preserve scalar/media includes through unrelated edits
- Typed operations cover field, translation, media, and metadata changes needed by current mutators
- All operations enforce duplicate, union, and canonical invariants
- The interface returns source/schema-aware errors without filesystem dependencies
- Round-trip and edit-locality tests demonstrate unchanged unrelated bytes or defined canonical changes

## Implementation Notes

Depends on strict decoders; this becomes the sole source-mutation seam for later tasks.


## Completion Summary

- Added pure include-preserving CanonicalSourceDocument and OverlaySourceDocument modules in brain-brew-formats
- Kept YAML representation private while exposing typed metadata, field, translation, media, image, stale-resolution, and import construction edits
- Routed included scalar/media edits to provenance-tagged outputs while preserving unrelated directives and canonical root bytes
- Made edits atomic by validating cloned state before commit and reused strict duplicate/union/scalar/canonical invariants
- Added exact-byte locality, include routing, source/schema diagnostics, translation/media/image, and idempotence tests
- Passed focused formats tests, full repository tests, fmt, clippy, and independent Claude judgment

### Files Changed

- crates/brain-brew-formats/src/canonical_source_document.rs
- crates/brain-brew-formats/src/overlay_source_document.rs
- crates/brain-brew-formats/src/source_document.rs
- crates/brain-brew-formats/src/source_includes.rs
- crates/brain-brew-formats/src/lib.rs
- crates/brain-brew-formats/tests/source_documents.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Build a journaled recoverable workspace transaction module
priority: critical
---

## Goal

Replace misleading sequential-renames atomicity with plan, validate, commit, rollback, and restart recovery for multi-file workspace writes.

## Acceptance Criteria

- All target files and expected fingerprints are validated before mutation
- Commit records a journal and recoverable backups before the first replacement
- Injected failures at every commit step either roll back or leave an explicit recoverable state
- Cross-filesystem and external-include cases are rejected or handled according to a documented contract
- Crash/restart recovery tests prove no silently mixed old/new workspace

## Implementation Notes

May be developed beside source-document modules; filesystem implementation belongs in CLI.


## Completion Summary

- Added a CLI-owned typed workspace transaction plan with canonical-root, target-type, duplicate, expected fingerprint/existence, and same-filesystem validation
- Persisted durable journals, staged replacements, complete backups, commit progress, rollback state, and cooperative locking before replacements
- Added deterministic failure injection across prepare, backup, replace, finalize, rollback, and restart recovery
- Rejected external-root, cross-filesystem, symlink-escape, unsupported, and conflicting target plans under a documented fail-closed contract
- Fixed judge-found stale rollback restore-stage recovery wedge and proved attacker-modified derived stages are discarded and regenerated from verified backups
- Documented durability, platform, recovery, and migration contracts; left existing mutators unmigrated for tasks 0050/0060
- Passed focused transaction tests, full fmt/test/clippy, parent full CI, and independent Claude re-judgment

### Files Changed

- Cargo.lock
- crates/brain-brew-cli/Cargo.toml
- crates/brain-brew-cli/src/main.rs
- crates/brain-brew-cli/src/workspace_transaction.rs
- documentation/docs/reference/workspace-transactions.md
- documentation/sidebars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Migrate formatting and translation mutations to source documents
priority: high
---

## Goal

Remove direct serde-value and line-surgery paths from `fmt` and translation insertion/resolution, using the canonical source-document and transaction modules.

## Acceptance Criteria

- Formatting and translation writes use typed document operations
- Include-bearing files remain canonical after edits
- All multi-file translation operations are plan-first and recoverable
- Existing formatting/idempotence and stale-translation behavior remain green
- Direct mutation implementations are deleted rather than retained as fallbacks

## Implementation Notes

Depends on source-document and transaction modules.


## Completion Summary

- Migrated canonical and overlay fmt paths to typed source documents with strict validation and canonical emission
- Migrated all CLI translation apply, interactive/contextual insertion, stale confirm/replace/batch, and source-impact writes to typed overlay operations
- Added plan-first affected-target composition validation, expected fingerprints, recovery-first behavior, and one journaled transaction per operation
- Removed legacy YAML line-surgery, serde-value mutation, and direct command write fallback implementations
- Preserved unrelated scalar includes, canonical idempotence, stale precedence, and shadowed current translation decisions
- Documented canonical rewrite and transaction behavior; retained format-specific strict codecs where appropriate
- Passed full fmt/test/clippy, focused CLI/formats/UG suites, and independent Claude judgment

### Files Changed

- crates/brain-brew-cli/src/commands/fmt.rs
- crates/brain-brew-cli/src/commands/translations.rs
- crates/brain-brew-cli/src/io.rs
- crates/brain-brew-cli/src/main.rs
- crates/brain-brew-cli/src/workspace_mutation.rs
- crates/brain-brew-cli/src/workspace_transaction.rs
- crates/brain-brew-cli/tests/cli.rs
- crates/brain-brew-cli/tests/translations_cli.rs
- crates/brain-brew-formats/src/overlay_source_document.rs
- crates/brain-brew-formats/tests/source_documents.rs
- documentation/docs/authoring/translations.md
- documentation/docs/reference/workspace-transactions.md
Loading
Loading