solidprivacy commited on
Commit
e83d3d1
·
2 Parent(s): 4ecbe93d54eb06

chore(ui): claim app shell and sync staged-workspace decision

Browse files
CHANGELOG.md CHANGED
@@ -1,3 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ## 2026-08-07 Europe/Amsterdam — Issue #70 Actions evidence recovery repair
2
 
3
  Status: `RELEASE_CANDIDATE_READY`; independent exact-head assurance pending.
 
1
+ ## 2026-08-08 Europe/Amsterdam — SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE — staged workspace architecture candidate
2
+
3
+ Status: `IMPLEMENTATION_IN_PROGRESS`; exact-head CI and independent assurance required before merge.
4
+
5
+ Purpose:
6
+ - convert the coordinator-approved first-principles comparison of three routed screens versus a one-page staged workspace into a binding Premium UI architecture decision;
7
+ - intervene before PR #85 enters production `presidio_streamlit.py` integration;
8
+ - make the Premium staged-workspace sequence the authoritative active execution queue.
9
+
10
+ Decision:
11
+ ```text
12
+ One document. One workspace. Three stages. One active task.
13
+
14
+ Toevoegen → Controleren → Downloaden
15
+ ```
16
+
17
+ Binding Standard behavior:
18
+ - all three stage headers remain in one persistent page/workspace;
19
+ - exactly one stage is expanded/dominant at a time;
20
+ - completed stages collapse to compact status summaries;
21
+ - future stages remain visible but passive;
22
+ - successful completion auto-advances to the next stage;
23
+ - deliberate return to an earlier stage remains possible;
24
+ - processing-affecting earlier changes invalidate processed/review/export lineage fail-closed;
25
+ - three separate routed pages are rejected for these core stages;
26
+ - a classic nested-expander form is also rejected as the default Standard pattern.
27
+
28
+ First-principles rationale:
29
+ - Scrub is an iterative document-review workflow, not a strictly linear checkout;
30
+ - the interface should represent document state rather than page navigation;
31
+ - the staged workspace preserves one-task-at-a-time focus while retaining document identity, progress, correction context and visible trust state;
32
+ - it aligns directly with the merged `premium_core_flow_state.py` generation/invalidation model and reduces routing/state-restoration complexity in Streamlit.
33
+
34
+ Current PR #85 consequence:
35
+ - PR #85 is amended, not discarded;
36
+ - current pure `premium_app_shell.py` helper work remains reusable;
37
+ - production Streamlit integration is gated until this decision is independently assured and incorporated;
38
+ - PR #85 must add/test completed/future/active panels, compact summaries, auto-progression hooks, prior-stage return/edit and no-three-page semantics before production integration.
39
+
40
+ Files added/changed in the candidate:
41
+ - added `PREMIUM_STAGED_WORKSPACE_DECISION.md`;
42
+ - updated `ROADMAP.md`;
43
+ - updated `WORKPACKAGES.md` with an authoritative current Premium queue while retaining older content as historical records;
44
+ - updated `DECISION_LOG.md` with D043;
45
+ - updated `CHANGELOG.md`;
46
+ - added `tests/test_premium_staged_workspace_decision.py`;
47
+ - added implementation claim and handover administration.
48
+
49
+ Validation boundary:
50
+ - documentation/architecture/contract-only package;
51
+ - no production Streamlit or runtime product behavior changes;
52
+ - no recognizer, threshold, replacement, review authority, export bytes/names/MIME, Scrub Key, reinsert, audit, dependency or Hugging Face behavior changes;
53
+ - Hugging Face sync: not applicable;
54
+ - app verification: not applicable;
55
+ - exact-head GitHub Actions and independent `governance_release_assurance` remain required before merge.
56
+
57
+ ---
58
+
59
  ## 2026-08-07 Europe/Amsterdam — Issue #70 Actions evidence recovery repair
60
 
61
  Status: `RELEASE_CANDIDATE_READY`; independent exact-head assurance pending.
DECISION_LOG.md CHANGED
@@ -1,3 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ## 2026-08-06 — D042 — Separate implementation from blind independent release assurance
2
 
3
  Status: accepted project-governance and release-control decision
 
1
+ ## 2026-08-08 — D043 — Freeze Premium Standard as a single-page staged document workspace
2
+
3
+ Status: accepted product/UX architecture direction; implementation candidate subject to normal independent assurance.
4
+
5
+ Decision:
6
+
7
+ ```text
8
+ For the Standard anonymization core flow, use one persistent document workspace containing Toevoegen → Controleren → Downloaden. Keep all three stage headers visible, allow exactly one expanded/dominant stage at a time, collapse completed stages to compact summaries, keep future stages passive, auto-advance after successful completion, and allow explicit return to an earlier stage with fail-closed downstream invalidation.
9
+ ```
10
+
11
+ Explicitly rejected for Standard:
12
+
13
+ ```text
14
+ Toevoegen page → Controleren page → Downloaden page
15
+ ```
16
+
17
+ The three core stages are states of the same document, not three separate routed screens. Also reject a conventional long Streamlit form rebuilt as a tree of independent or nested expanders.
18
+
19
+ First-principles reason:
20
+ - the scarce resource is user attention during a privacy-sensitive review task;
21
+ - Scrub is iterative: review can legitimately send the user back to input/profile correction;
22
+ - the interface must preserve confidence about source identity, completed work and whether downstream state is still current;
23
+ - page routing maximizes isolation but removes spatial workflow context and adds state-restoration/routing complexity;
24
+ - one staged workspace preserves the cognitive benefit of one task at a time while representing document state directly;
25
+ - the model maps naturally to the merged source/processed/review/export generation lineage in `premium_core_flow_state.py`.
26
+
27
+ Binding interaction consequences:
28
+ - one dominant primary action per active stage;
29
+ - no permanent configuration sidebar in Standard;
30
+ - completed stage summaries contain orientation/trust information only, not mini-forms;
31
+ - future stages show status rather than disabled control forests;
32
+ - successful processing opens Controleren automatically;
33
+ - explicit review completion opens Downloaden automatically;
34
+ - earlier processing-affecting edits invalidate downstream review/export state before those results can be presented as current;
35
+ - no nested core-flow accordion hierarchy in Standard;
36
+ - stage surfaces should read as application panels even when Streamlit primitives are used internally.
37
+
38
+ Current workpackage consequence:
39
+ - insert `SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE` before further production integration in `SCRUB-WP_PREMIUM_APP_SHELL_IMPLEMENTATION`;
40
+ - retain PR #85's compatible pure helper/test work;
41
+ - require PR #85 to incorporate the staged-workspace semantics before touching/merging production `presidio_streamlit.py` integration;
42
+ - continue sequentially with Input, Review, Export, Expert parity and live app closeout packages.
43
+
44
+ Safety boundary:
45
+ - this decision changes presentation architecture, not anonymization semantics;
46
+ - recognizers, thresholds, review authority, direct masking, export bytes/names/MIME, Scrub Key, reinsert, audit and human-review requirements remain unchanged;
47
+ - Standard is lower cognitive load, not lower safety.
48
+
49
+ Evidence:
50
+ - coordinator/user approval on 2026-08-08 Europe/Amsterdam after explicit first-principles comparison;
51
+ - `PREMIUM_STAGED_WORKSPACE_DECISION.md`;
52
+ - `PREMIUM_CORE_FLOW_UI_REALIGNMENT_PLAN.md`;
53
+ - merged Premium UI contract and state model.
54
+
55
+ ---
56
+
57
  ## 2026-08-06 — D042 — Separate implementation from blind independent release assurance
58
 
59
  Status: accepted project-governance and release-control decision
PREMIUM_STAGED_WORKSPACE_DECISION.md ADDED
@@ -0,0 +1,493 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Premium Staged Workspace Decision
2
+
3
+ Status: `APPROVED_DIRECTION — RELEASE_CANDIDATE`
4
+
5
+ Coordinator approval: 2026-08-08 Europe/Amsterdam
6
+ Repository: `solidprivacy-nl/scrub`
7
+ Workpackage: `SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE`
8
+
9
+ ## 1. Decision
10
+
11
+ The Premium Standard interface for the Scrub anonymization core flow will use a **single-page staged document workspace**.
12
+
13
+ The three core stages remain persistently represented in the same workspace:
14
+
15
+ ```text
16
+ 1. Toevoegen
17
+ 2. Controleren
18
+ 3. Downloaden
19
+ ```
20
+
21
+ Exactly one of those stages is expanded and dominant at any moment.
22
+
23
+ This is deliberately **not** a three-page wizard and deliberately **not** a conventional form with multiple independent expanders.
24
+
25
+ The governing product principle is:
26
+
27
+ ```text
28
+ One document. One workspace. Three stages. One active task.
29
+ ```
30
+
31
+ ## 2. Problem being solved
32
+
33
+ The current verified functional baseline still reads visually as a long Streamlit form. Input, settings, review, manual corrections, downloads, Scrub Key controls and audit evidence compete for attention in one vertical page.
34
+
35
+ Earlier decluttering improved individual surfaces but did not solve the structural problem: the UI still exposes too much workflow state simultaneously and therefore asks the user to understand the implementation rather than the task.
36
+
37
+ The Premium line must reduce cognitive load without reducing review, privacy, auditability or control.
38
+
39
+ ## 3. First-principles analysis
40
+
41
+ ### 3.1 What is the user actually trying to accomplish?
42
+
43
+ The user's primary job is not to navigate pages or configure an anonymization engine. It is:
44
+
45
+ ```text
46
+ safely transform one confidential document
47
+ → inspect the result
48
+ → obtain the right output
49
+ ```
50
+
51
+ The interface should therefore model the **state of the document**, not a collection of pages or forms.
52
+
53
+ The minimum state story is:
54
+
55
+ ```text
56
+ source supplied
57
+ → processing result exists
58
+ → result reviewed
59
+ → current export is eligible
60
+ ```
61
+
62
+ ### 3.2 What information must remain visible?
63
+
64
+ At any moment the user needs to know:
65
+
66
+ 1. what document/text is being worked on;
67
+ 2. where they are in the workflow;
68
+ 3. whether prior work is complete and still current;
69
+ 4. what action is required next;
70
+ 5. whether a later result has become stale after an earlier change.
71
+
72
+ A good UI should answer these questions without forcing navigation or exposing every control.
73
+
74
+ ### 3.3 Why one active task matters
75
+
76
+ Human attention is the scarce resource in Scrub review. Displaying input, settings, review helpers, export choices, Scrub Key and audit controls at the same visual level increases decision surface without increasing safety.
77
+
78
+ Premium Standard therefore optimizes for:
79
+
80
+ ```text
81
+ one dominant task
82
+ + one dominant primary action
83
+ + compact context from completed work
84
+ + visible but non-competing future stages
85
+ ```
86
+
87
+ This is lower cognitive load, not lower safety.
88
+
89
+ ## 4. Alternatives considered
90
+
91
+ ### Model A — three separate screens/pages
92
+
93
+ Concept:
94
+
95
+ ```text
96
+ Toevoegen → separate page
97
+ Controleren → separate page
98
+ Downloaden → separate page
99
+ ```
100
+
101
+ #### Advantages
102
+
103
+ - maximal visual isolation;
104
+ - very low per-screen control density;
105
+ - strong linear progress cue;
106
+ - naturally suppresses irrelevant controls;
107
+ - can feel polished when the process is strictly linear.
108
+
109
+ #### Disadvantages for Scrub
110
+
111
+ - loses document/workflow context when moving between stages;
112
+ - makes review-to-input correction feel like backward navigation rather than normal document iteration;
113
+ - creates more routing/state-restoration responsibility in Streamlit;
114
+ - increases the risk that users do not know whether a previous source/profile/result is still current;
115
+ - can encourage hidden reprocessing or stale-state bugs if navigation and processing state become coupled;
116
+ - makes the complete state of the document workflow less observable.
117
+
118
+ ### Model B — single-page staged workspace
119
+
120
+ Concept:
121
+
122
+ ```text
123
+ ✓ Toevoegen — compact summary
124
+ ▼ Controleren — active workspace
125
+ Downloaden — visible, passive
126
+ ```
127
+
128
+ #### Advantages
129
+
130
+ - preserves one-task-at-a-time focus;
131
+ - keeps the document workflow spatially coherent;
132
+ - makes progress and previous-state summaries visible without reopening full controls;
133
+ - makes deliberate return to an earlier stage natural;
134
+ - maps directly to the existing state-model concept of source/processed/review/export lineage;
135
+ - fits Streamlit without requiring page routing as the primary state mechanism;
136
+ - supports automatic progression while preserving explicit user control;
137
+ - allows stale downstream state to be represented clearly after earlier changes.
138
+
139
+ #### Risks
140
+
141
+ - can regress into the current form-like experience if implemented as generic/nested expanders;
142
+ - collapsed sections can become visually noisy if summaries contain too much detail;
143
+ - careless accordion controls can make the interface feel like a website FAQ rather than an application.
144
+
145
+ These risks are addressed through the rules below.
146
+
147
+ ## 5. Decision rationale
148
+
149
+ Scrub is not a strictly linear checkout flow. Human review is central, and review can legitimately cause a return to earlier work. The product must therefore preserve both **focus** and **workflow context**.
150
+
151
+ The staged workspace wins because it treats the source, review and output as states of one document rather than unrelated destinations.
152
+
153
+ The decision is especially strong for the current Streamlit architecture because it minimizes routing complexity while allowing the already merged `premium_core_flow_state.py` invariants to remain authoritative.
154
+
155
+ The design preference is approximately:
156
+
157
+ ```text
158
+ single-page staged workspace: strong preference
159
+ three separate core-flow pages: rejected for Standard
160
+ ```
161
+
162
+ Separate top-level workflows such as `Anonimiseren | Terugzetten` remain valid. The rejection applies to turning the three anonymization core stages into routed pages.
163
+
164
+ ## 6. Binding Standard-mode interaction contract
165
+
166
+ ### 6.1 Persistent stage rail/workspace
167
+
168
+ All three stage headers remain present in the same page/workspace:
169
+
170
+ ```text
171
+ 1. Toevoegen
172
+ 2. Controleren
173
+ 3. Downloaden
174
+ ```
175
+
176
+ They must not all expose their full internals simultaneously.
177
+
178
+ ### 6.2 Exactly one expanded stage
179
+
180
+ At all times exactly one core stage is dominant and expanded.
181
+
182
+ Opening a different eligible stage collapses the currently expanded stage.
183
+
184
+ There is no Standard-mode state where two core stages expose their full working surfaces at once.
185
+
186
+ ### 6.3 Completed-stage summaries
187
+
188
+ A completed prior stage collapses into a compact summary that gives only the information needed for trust and orientation.
189
+
190
+ Examples:
191
+
192
+ ```text
193
+ ✓ Toevoegen — contract.docx · Juridisch
194
+ ✓ Controleren — 14 gecontroleerd · 1 handmatig toegevoegd
195
+ ```
196
+
197
+ Summary content must not become a second mini-form.
198
+
199
+ ### 6.4 Future-stage visibility
200
+
201
+ Future stages remain visible so the complete workflow is understandable, but they are passive until prerequisites are satisfied.
202
+
203
+ Example:
204
+
205
+ ```text
206
+ Downloaden — beschikbaar na controle
207
+ ```
208
+
209
+ A passive future stage must not expose disabled forests of controls.
210
+
211
+ ### 6.5 Automatic progression
212
+
213
+ After successful processing:
214
+
215
+ ```text
216
+ Toevoegen collapses
217
+ → Controleren opens automatically
218
+ ```
219
+
220
+ After explicit review completion:
221
+
222
+ ```text
223
+ Controleren collapses
224
+ → Downloaden opens automatically
225
+ ```
226
+
227
+ The transition should feel like the workspace advancing, not a page reload/navigation event.
228
+
229
+ ### 6.6 Explicit return/edit
230
+
231
+ A user may deliberately return to an earlier eligible stage.
232
+
233
+ The action must be explicit, understandable and reversible where appropriate.
234
+
235
+ If the user changes input or a processing-affecting setting, downstream review/export lineage is invalidated according to `premium_core_flow_state.py`. Stale output must never remain visually presented as current.
236
+
237
+ ### 6.7 One dominant primary action
238
+
239
+ Each active stage has one visually dominant primary action.
240
+
241
+ Target examples:
242
+
243
+ ```text
244
+ Toevoegen: Document verwerken
245
+ Controleren: Controle afronden
246
+ Downloaden: Document downloaden
247
+ ```
248
+
249
+ Secondary actions remain subordinate and should not compete visually.
250
+
251
+ ### 6.8 No nested core-flow accordion hierarchy
252
+
253
+ Standard must not re-create form complexity through nested expanders inside the active stage.
254
+
255
+ Where secondary disclosure is necessary, prefer:
256
+
257
+ - inline contextual reveal;
258
+ - a compact secondary action;
259
+ - a modal/popover where technically appropriate and safe;
260
+ - Expert mode for genuinely technical controls.
261
+
262
+ Do not build an accordion inside an accordion as the default Standard interaction pattern.
263
+
264
+ ### 6.9 Stage panels, not generic Streamlit expanders
265
+
266
+ The interaction may use Streamlit primitives internally, but the user-facing presentation should read as a staged application workspace.
267
+
268
+ The stage header should communicate:
269
+
270
+ - stage number/name;
271
+ - status: active/completed/future;
272
+ - compact summary when completed;
273
+ - explicit edit/return affordance where allowed.
274
+
275
+ Avoid generic `st.expander` visual language when it reinforces a settings-form feeling.
276
+
277
+ ## 7. Standard and Expert relationship
278
+
279
+ `Standaard` and `Expert` are presentation modes over the same processing state.
280
+
281
+ Standard:
282
+
283
+ - staged workspace is the dominant interaction model;
284
+ - no permanent configuration sidebar;
285
+ - one primary task/action at a time;
286
+ - advanced settings, alternate output formats, Scrub Key and detailed audit are progressively disclosed.
287
+
288
+ Expert:
289
+
290
+ - may expose additional inspection/tuning surfaces;
291
+ - may retain the configuration sidebar or equivalent advanced controls;
292
+ - must preserve the same authoritative document lineage and review semantics;
293
+ - may not silently process a different document state from Standard.
294
+
295
+ Switching Standard ↔ Expert is presentation-only unless an explicitly changed expert setting affects processing; such a setting change must then invalidate downstream state according to the state model.
296
+
297
+ ## 8. Top-level workflows
298
+
299
+ The staged-workspace decision does not collapse `Anonimiseren` and `Terugzetten` into one ambiguous flow.
300
+
301
+ Top level remains:
302
+
303
+ ```text
304
+ Anonimiseren | Terugzetten
305
+ ```
306
+
307
+ The three-stage staged workspace is the binding Standard pattern for the anonymization core flow.
308
+
309
+ The Reinsert/Terugzetten flow should follow the same Premium principles — one task at a time, minimal controls, clear source/key/output state — but its exact staged structure remains governed by its own existing behavior and future dedicated UI work. This decision must not silently alter reinsert semantics.
310
+
311
+ ## 9. Safety and state invariants
312
+
313
+ This UI decision must not change:
314
+
315
+ - recognizers or thresholds;
316
+ - replacement decisions;
317
+ - review-table authority;
318
+ - direct missed-value masking semantics;
319
+ - export bytes, filenames or MIME types;
320
+ - Scrub Key schema, binding, warning or lifecycle;
321
+ - reinsert semantics;
322
+ - audit evidence;
323
+ - local-processing boundaries;
324
+ - human-review requirement.
325
+
326
+ The UI must fail closed on stale state:
327
+
328
+ ```text
329
+ source/profile/threshold change affecting processing
330
+ → processed lineage invalid
331
+ → reviewed lineage invalid
332
+ → export lineage invalid
333
+ → user returned to appropriate earlier stage
334
+ ```
335
+
336
+ ## 10. Visual hierarchy principles
337
+
338
+ Premium does not mean decoration. It means controlled hierarchy.
339
+
340
+ Standard should prioritize:
341
+
342
+ 1. document identity/context;
343
+ 2. current stage/task;
344
+ 3. current primary action;
345
+ 4. required review information;
346
+ 5. secondary safety/audit controls only when relevant.
347
+
348
+ Avoid:
349
+
350
+ - multiple equally prominent buttons;
351
+ - permanent explanatory text blocks;
352
+ - repeated labels already implied by stage context;
353
+ - technical variable-like terms;
354
+ - duplicated upload/input surfaces;
355
+ - default-open diagnostics;
356
+ - stacked download buttons of equal weight;
357
+ - nested accordion trees.
358
+
359
+ ## 11. Workpackage realignment
360
+
361
+ This decision intervenes in the current Premium sequence before production integration in PR #85.
362
+
363
+ ### Immediate package
364
+
365
+ `SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE`
366
+
367
+ Deliverables:
368
+
369
+ - this decision document;
370
+ - roadmap update;
371
+ - workpackage queue update;
372
+ - changelog entry;
373
+ - binding note on active App Shell issue/PR.
374
+
375
+ No runtime product behavior changes.
376
+
377
+ ### Current package — amended, not discarded
378
+
379
+ `SCRUB-WP_PREMIUM_APP_SHELL_IMPLEMENTATION`
380
+
381
+ PR #85's existing pure presentation helpers/tests remain reusable.
382
+
383
+ Before production Streamlit integration, extend/freeze its acceptance criteria so the shell represents:
384
+
385
+ - all three persistent stage headers;
386
+ - exactly one active/expanded stage;
387
+ - completed/future/active stage presentation states;
388
+ - compact completed summaries;
389
+ - passive future states;
390
+ - automatic next-stage progression hooks;
391
+ - explicit prior-stage return/edit affordances;
392
+ - no permanent Standard configuration sidebar;
393
+ - no three-page routing for the core stages.
394
+
395
+ Only after these shell semantics are testable should `presidio_streamlit.py` production integration proceed.
396
+
397
+ ### Subsequent stage packages
398
+
399
+ `SCRUB-WP_PREMIUM_INPUT_STAGE_SIMPLIFICATION`
400
+
401
+ - reduce Toevoegen to source + essential profile/context + one primary process action;
402
+ - hide nonessential tuning in Standard;
403
+ - preserve ingestion and processing semantics.
404
+
405
+ `SCRUB-WP_PREMIUM_REVIEW_STAGE_SIMPLIFICATION`
406
+
407
+ - make side-by-side/document review dominant;
408
+ - retain review table as authoritative fallback/source of truth;
409
+ - keep direct missed-value masking accessible;
410
+ - move technical review controls out of the primary visual hierarchy.
411
+
412
+ `SCRUB-WP_PREMIUM_EXPORT_STAGE_SIMPLIFICATION`
413
+
414
+ - present one recommended cleaned-document download as dominant;
415
+ - make alternate formats, Scrub Key and audit evidence secondary but accessible;
416
+ - do not alter export semantics.
417
+
418
+ `SCRUB-WP_PREMIUM_EXPERT_PARITY_REGRESSION`
419
+
420
+ - prove Standard hides complexity without removing capability;
421
+ - prove Standard/Expert switching preserves valid state;
422
+ - prove processing-affecting Expert changes invalidate downstream state correctly;
423
+ - prove no safety/export/reinsert capabilities disappeared.
424
+
425
+ `SCRUB-WP_PREMIUM_CORE_FLOW_APP_VERIFY_CLOSEOUT`
426
+
427
+ - verify deployment and actual live staged-workspace behavior;
428
+ - require coordinator/user UX confirmation because UI behavior changed;
429
+ - close only after exact GitHub Actions, Hugging Face synchronization and app verification evidence.
430
+
431
+ ## 12. Acceptance criteria for the final Premium Standard core flow
432
+
433
+ The final Premium Standard line is not complete until live app verification confirms all of the following:
434
+
435
+ 1. The first impression is a task workspace, not a long form.
436
+ 2. `Toevoegen`, `Controleren`, `Downloaden` remain visible as the workflow structure.
437
+ 3. Only one stage exposes its full contents at a time.
438
+ 4. Successful stage completion automatically advances the active workspace.
439
+ 5. Completed stages collapse to useful one-line/compact summaries.
440
+ 6. Future stages do not compete for attention.
441
+ 7. Returning to an earlier stage is obvious.
442
+ 8. Processing-affecting earlier changes visibly invalidate stale downstream results.
443
+ 9. There is one dominant primary action per active stage.
444
+ 10. Standard has no permanent configuration sidebar.
445
+ 11. The review surface remains sufficiently powerful for mandatory human review.
446
+ 12. The recommended cleaned-document download is dominant in the final stage.
447
+ 13. Scrub Key, alternate formats and audit remain accessible but secondary.
448
+ 14. No nested-expander form hierarchy has replaced the old long form.
449
+ 15. No export, Scrub Key, reinsert, recognition or audit semantics changed unintentionally.
450
+
451
+ ## 13. Non-goals
452
+
453
+ This decision does not authorize:
454
+
455
+ - a frontend framework migration;
456
+ - cloud document processing;
457
+ - a full document editor;
458
+ - occurrence-specific replacement;
459
+ - redesign of anonymization algorithms;
460
+ - new export formats;
461
+ - Scrub Key semantic changes;
462
+ - reinsert semantic changes;
463
+ - packaging/installer work.
464
+
465
+ ## 14. Governance and execution boundary
466
+
467
+ The Premium UI is consequential production-facing work.
468
+
469
+ Implementation workers create identifiable candidates and machine evidence. Separate `governance_release_assurance` workers issue `PASS | FAIL | INDETERMINATE` and may not silently repair candidates.
470
+
471
+ The current PR #85 must not be merged merely because its primitive helper tests are green. It must first incorporate this approved staged-workspace direction, complete its production integration, pass exact-head regression, and receive independent assurance.
472
+
473
+ ## 15. Short design test
474
+
475
+ When uncertain whether a control belongs in Standard, ask:
476
+
477
+ ```text
478
+ Does the user need this to complete the current stage safely?
479
+ ```
480
+
481
+ If no:
482
+
483
+ ```text
484
+ hide it, defer it, summarize it, or move it to Expert/secondary disclosure.
485
+ ```
486
+
487
+ When uncertain whether a new screen is needed, ask:
488
+
489
+ ```text
490
+ Is this a different top-level job, or merely another state of the same document?
491
+ ```
492
+
493
+ For `Toevoegen → Controleren → Downloaden`, the answer is: another state of the same document. Therefore it remains one staged workspace.
ROADMAP.md CHANGED
@@ -11,13 +11,13 @@ Use it together with:
11
  - `DECISION_LOG.md` for accepted strategic and architecture decisions;
12
  - `PROJECT_PROMPT.md` for worker rules and project governance.
13
 
14
- Last roadmap strategy update: 2026-08-06 — the Weekly ETF donor's canonical implementation-versus-release-assurance model is adopted for consequential Scrub work, strengthened with blind review before the initial assurance decision; the premium single-task app-shell line remains gated by independent governance passes after the cross-flow safety regression.
15
 
16
  ---
17
 
18
  ## Operational governance — implementation and blind release assurance
19
 
20
- Consequential Scrub work now follows the canonical cross-project two-role standard used by the Weekly ETF donor architecture:
21
 
22
  ```text
23
  implementation_operations
@@ -30,7 +30,9 @@ implementation_operations
30
 
31
  The user remains the single coordinator-facing principal. Implementation cannot certify its own candidate, and governance cannot silently repair it. Scrub adds a blind-review boundary: before its initial decision, governance may inspect source, criteria and raw machine evidence but not implementation handovers, self-assessments or conclusions.
32
 
33
- The current maturity is `LEVEL_1_CHECKLIST`, with a later target of `LEVEL_2_MACHINE_EVIDENCE`. This adoption does not claim a hard CI gate. The next premium UI package remains blocked until independent assurance passes both the governance-adoption candidate and the processed-text cross-flow regression candidate.
 
 
34
 
35
  Governed by:
36
  - `control/PROJECT_GOVERNANCE_BOOTSTRAP.md`;
@@ -139,6 +141,11 @@ SCRUB-WP_MVP_SCRUB_KEY_BINDING_MODEL_IMPLEMENTATION — completed with pure bind
139
  SCRUB-WP_MVP_SCRUB_KEY_BINDING_EXPORT_INTEGRATION — completed with bound placeholders and schema-1.1 key export.
140
  SCRUB-WP_MVP_SCRUB_KEY_BINDING_REINSERT_INTEGRATION — implemented with dual-read import, fail-closed binding enforcement and explicit legacy compatibility; app verification pending.
141
  SCRUB-WP_AI_FIRST_DESKTOP_PACKAGING_ROADMAP_ALIGNMENT — completed as a documentation-only Phase 9 execution-model refinement; installer implementation remains gated.
 
 
 
 
 
142
  ```
143
 
144
  Important UX status:
@@ -147,8 +154,8 @@ Important UX status:
147
  The review table remains source of truth and fallback.
148
  The old replacement decision helper panel must not return as normal user-facing UI.
149
  The unified side-by-side review, manual missed-value entry, compact placeholder display and grouped export flow form the verified functional baseline.
150
- Direct live-app evidence now confirms that this baseline still presents too much of the workflow as one long form.
151
- The next approved UI direction is a global Standard/Expert presentation model and a one-active-stage document workspace, not another isolated expander-cleanup pass.
152
  ```
153
 
154
  ---
@@ -204,7 +211,8 @@ This is governed by:
204
  - `SIDE_BY_SIDE_REVIEW_UX_DIRECTION.md`;
205
  - `REPLACE_LOGIC_UI_REDESIGN_PLAN.md`;
206
  - `MVP_UI_CLEANUP_AND_EXPORT_REDESIGN_PLAN.md`;
207
- - `PREMIUM_CORE_FLOW_UI_REALIGNMENT_PLAN.md`.
 
208
 
209
  UX principles:
210
 
@@ -217,45 +225,103 @@ UX principles:
217
  - no Scrub Key/export/reinsert behavior changes from review UX work without separate approval;
218
  - technical/debug-like details should move to secondary audit/advanced layers, not disappear.
219
 
 
220
 
221
- ### Premium core-flow UI realignment
222
-
223
- Direct coordinator/user evidence on 2026-08-05 establishes that the remaining interface problem is structural:
224
 
225
  ```text
226
  The app still behaves visually as one long Streamlit form.
227
  Input, settings, review, corrections, downloads, Scrub Key and audit controls compete on the same page.
228
  ```
229
 
230
- The approved target is:
231
 
232
  ```text
233
  Top-level workflow: Anonimiseren | Terugzetten
234
  Global presentation: Standaard | Expert
235
- One active stage: Toevoegen → Controleren → Downloaden
236
  One primary action per active stage
237
  Progressive and conditional disclosure for settings, other formats, Scrub Key and audit evidence
238
  ```
239
 
240
- `Standaard` is lower cognitive load, not lower safety. `Expert` preserves full inspection, tuning, audit and troubleshooting. The current permanent settings sidebar is not part of the Standard target. Completed stages collapse into compact summaries rather than remaining open above the current task.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
 
242
  The implementation remains within Streamlit first, but must approximate a single-task application shell. It must not change recognizers, replacement decisions, export bytes, filenames, MIME types, Scrub Key semantics, reinsert behavior, audit evidence or the human-review requirement.
243
 
244
- Sequential execution:
 
 
 
 
245
 
246
  ```text
247
- 0. SCRUB-WP_PROCESSED_TEXT_SELECTION_CROSS_FLOW_REGRESSION
248
- 1. SCRUB-WP_PREMIUM_CORE_FLOW_UI_CONTRACT
249
- 2. SCRUB-WP_PREMIUM_CORE_FLOW_STATE_MODEL
250
- 3. SCRUB-WP_PREMIUM_APP_SHELL_IMPLEMENTATION
251
- 4. SCRUB-WP_PREMIUM_INPUT_STAGE_SIMPLIFICATION
252
- 5. SCRUB-WP_PREMIUM_REVIEW_STAGE_SIMPLIFICATION
253
- 6. SCRUB-WP_PREMIUM_EXPORT_STAGE_SIMPLIFICATION
254
- 7. SCRUB-WP_PREMIUM_EXPERT_PARITY_REGRESSION
255
- 8. SCRUB-WP_PREMIUM_CORE_FLOW_APP_VERIFY_CLOSEOUT
 
256
  ```
257
 
258
- Do not combine the input, review and export restructuring into one patch. Do not run shared Streamlit UI packages in parallel.
 
 
259
 
260
  ### Phase 6 — MVP workflow validation and trust hardening
261
 
@@ -288,38 +354,37 @@ Phase 7 may reopen when the coordinator confirms the MVP product quality gate ha
288
 
289
  ## 7. Active next work direction
290
 
291
- The verified MVP UI baseline is now stable enough to move the active line into Phase 6 validation and trust hardening.
292
 
293
- Current execution queue:
294
 
295
  ```text
296
- 1. SCRUB-WP_MVP_E2E_SYNTHETIC_VALIDATION_MATRIX — completed
297
- 2. SCRUB-WP_MVP_FALSE_NEGATIVE_GAP_TRIAGE — completed
298
- 3. SCRUB-WP_MVP_DOCUMENT_HYGIENE_FIDELITY_HARDENING — completed and app-verified
299
- 4. SCRUB-WP_MVP_REINSERT_AUTO_FLOW_SIMPLIFICATION_IMPLEMENTATION — completed and app-verified
300
- 5. SCRUB-WP_MVP_SCRUB_KEY_ROUNDTRIP_VALIDATION — completed
301
- 6. SCRUB-WP_MVP_SCRUB_KEY_DOCUMENT_BINDING_GAP_TRIAGE — completed
302
- 7. SCRUB-WP_MVP_SCRUB_KEY_BINDING_CONTRACT_TESTS — completed
303
- 8. SCRUB-WP_MVP_SCRUB_KEY_BINDING_MODEL_IMPLEMENTATION — completed
304
- 9. SCRUB-WP_MVP_SCRUB_KEY_BINDING_EXPORT_INTEGRATION — completed
305
- 10. SCRUB-WP_MVP_SCRUB_KEY_BINDING_REINSERT_INTEGRATION — implemented
306
- 11. SCRUB-WP_MVP_SCRUB_KEY_BINDING_APP_VERIFY — active
307
- 12. SCRUB-WP_MVP_AUDIT_RESIDUAL_RISK_EVIDENCE
308
- 13. SCRUB-WP_MVP_PHASE6_QUALITY_GATE_CLOSEOUT
309
  ```
310
 
 
 
311
  Execution principles:
312
 
313
  - use synthetic data only;
314
- - validate the full supported workflow before adding new features;
315
- - create recognizer or document-processing fixes only from reproducible evidence;
316
  - preserve legal meaning and keep human review mandatory;
317
- - direct live-app evidence on 2026-08-05 establishes a concrete usability blocker: the functional baseline remains a long, form-like page; reopen UI work only through the approved premium core-flow sequence;
 
 
 
 
 
318
  - do not make production-readiness claims from prototype evidence.
319
 
320
  ### Candidate document-centric manual-correction line
321
 
322
- Direct usability evidence supports a future correction path in the main processed-text pane:
323
 
324
  ```text
325
  select an unmasked value
@@ -328,9 +393,9 @@ select an unmasked value
328
  → add through the existing manual replacement path
329
  ```
330
 
331
- The recommended first version is bounded to all exact occurrences of the selected value. It must create a normal document-scoped manual row, keep the replacement table authoritative and preserve current bound export, Scrub Key and reinsert semantics. Occurrence-specific replacement, a rich editor and a combined Streamlit upgrade are excluded.
332
 
333
- The proposed sequence is:
334
 
335
  ```text
336
  1. SCRUB-WP_PROCESSED_TEXT_SELECTION_MASKING_CONTRACT
@@ -341,9 +406,9 @@ The proposed sequence is:
341
  6. SCRUB-WP_PROCESSED_TEXT_SELECTION_APP_VERIFY
342
  ```
343
 
344
- The coordinator approved the direction and all-exact version-one boundary at 2026-08-04 00:09 Europe/Amsterdam. The contract, action model, component and production table integration are complete. The integration adds one normal bound manual row, reruns before exports, keeps the review table authoritative, retains the manual/static rollback path and changes no export/Scrub Key/reinsert semantics. GitHub-to-Hugging-Face synchronization and live app verification are green. The display-only placeholder compaction is also deployed and app-verified without changing binding grammar, entropy, export, Scrub Key or reinsert semantics. `SCRUB-WP_PROCESSED_TEXT_SELECTION_CROSS_FLOW_REGRESSION` is now the final safety baseline before the premium core-flow UI contract line starts.
345
 
346
- Recall/benchmark work is reopened only where the synthetic validation matrix exposes a concrete false-negative, misclassification or over-masking gap.
347
 
348
  Do not start local packaging next steps such as `WP48B` or `WP49B` by default. They require explicit coordinator approval.
349
 
@@ -392,7 +457,13 @@ Streamlit app + helper modules + GitHub Actions + Hugging Face Space demo.
392
  MVP architecture target:
393
 
394
  ```text
395
- Thin helper-driven Streamlit application shell; one active document stage at a time; global Standard/Expert presentation; tested safety boundaries; local-first direction; and a clear primary export with secondary restore/audit layers.
 
 
 
 
 
 
396
  ```
397
 
398
  Do not migrate frontend, add a full document editor, introduce cloud document processing, or alter export/Scrub Key/reinsert semantics without a dedicated approved package.
@@ -608,4 +679,4 @@ Safety boundaries:
608
  - no change to Scrub Key, export or reinsert semantics without a separate package;
609
  - human review remains required;
610
  - corpus or benchmark success does not prove production readiness;
611
- - no cloud document processing is introduced.
 
11
  - `DECISION_LOG.md` for accepted strategic and architecture decisions;
12
  - `PROJECT_PROMPT.md` for worker rules and project governance.
13
 
14
+ Last roadmap strategy update: 2026-08-08 — the Premium UI direction is now explicitly frozen as a **single-page staged document workspace**: `Toevoegen → Controleren → Downloaden` remain persistently represented in one workspace, exactly one stage is expanded at a time, completed stages collapse to compact summaries, future stages remain passive, and successful completion auto-advances. Three separate routed pages for these core stages are rejected for Standard. This urgent decision intervenes before production Streamlit integration in PR #85 and preserves its reusable pure helper work.
15
 
16
  ---
17
 
18
  ## Operational governance — implementation and blind release assurance
19
 
20
+ Consequential Scrub work follows the canonical cross-project two-role standard used by the Weekly ETF donor architecture:
21
 
22
  ```text
23
  implementation_operations
 
30
 
31
  The user remains the single coordinator-facing principal. Implementation cannot certify its own candidate, and governance cannot silently repair it. Scrub adds a blind-review boundary: before its initial decision, governance may inspect source, criteria and raw machine evidence but not implementation handovers, self-assessments or conclusions.
32
 
33
+ The current maturity is `LEVEL_1_CHECKLIST`, with a later target of `LEVEL_2_MACHINE_EVIDENCE`.
34
+
35
+ The governance/cross-flow gate that previously blocked the Premium UI line is closed. Issue #70 is closed, PR #73 is merged, the Premium UI contract is merged through PR #80, and the pure Premium core-flow state model is merged through PR #82. The active line is therefore Premium UI implementation, subject to independent assurance for each consequential candidate.
36
 
37
  Governed by:
38
  - `control/PROJECT_GOVERNANCE_BOOTSTRAP.md`;
 
141
  SCRUB-WP_MVP_SCRUB_KEY_BINDING_EXPORT_INTEGRATION — completed with bound placeholders and schema-1.1 key export.
142
  SCRUB-WP_MVP_SCRUB_KEY_BINDING_REINSERT_INTEGRATION — implemented with dual-read import, fail-closed binding enforcement and explicit legacy compatibility; app verification pending.
143
  SCRUB-WP_AI_FIRST_DESKTOP_PACKAGING_ROADMAP_ALIGNMENT — completed as a documentation-only Phase 9 execution-model refinement; installer implementation remains gated.
144
+ SCRUB-WP_PROCESSED_TEXT_SELECTION_CROSS_FLOW_REGRESSION — independently assured and governance gate closed through issue #70/#73 recovery.
145
+ SCRUB-WP_PREMIUM_CORE_FLOW_UI_CONTRACT — merged through PR #80; contract only, no production UI behavior.
146
+ SCRUB-WP_PREMIUM_CORE_FLOW_STATE_MODEL — merged through PR #82; pure state model only, no production UI behavior.
147
+ SCRUB-WP_PREMIUM_APP_SHELL_IMPLEMENTATION — active in draft PR #85; current candidate contains reusable presentation primitives/tests but production `presidio_streamlit.py` integration has not started.
148
+ SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE — urgent architecture/queue intervention approved by the coordinator on 2026-08-08; must be incorporated before PR #85 proceeds to production UI integration.
149
  ```
150
 
151
  Important UX status:
 
154
  The review table remains source of truth and fallback.
155
  The old replacement decision helper panel must not return as normal user-facing UI.
156
  The unified side-by-side review, manual missed-value entry, compact placeholder display and grouped export flow form the verified functional baseline.
157
+ Direct live-app evidence confirms that this baseline still presents too much of the workflow as one long form.
158
+ The Premium Standard target is one document workspace with three persistent stages and one active task, not another isolated expander-cleanup pass and not three routed core-flow pages.
159
  ```
160
 
161
  ---
 
211
  - `SIDE_BY_SIDE_REVIEW_UX_DIRECTION.md`;
212
  - `REPLACE_LOGIC_UI_REDESIGN_PLAN.md`;
213
  - `MVP_UI_CLEANUP_AND_EXPORT_REDESIGN_PLAN.md`;
214
+ - `PREMIUM_CORE_FLOW_UI_REALIGNMENT_PLAN.md`;
215
+ - `PREMIUM_STAGED_WORKSPACE_DECISION.md`.
216
 
217
  UX principles:
218
 
 
225
  - no Scrub Key/export/reinsert behavior changes from review UX work without separate approval;
226
  - technical/debug-like details should move to secondary audit/advanced layers, not disappear.
227
 
228
+ ### Premium core-flow UI realignment — binding staged-workspace decision
229
 
230
+ Direct coordinator/user evidence on 2026-08-05 established that the remaining interface problem is structural:
 
 
231
 
232
  ```text
233
  The app still behaves visually as one long Streamlit form.
234
  Input, settings, review, corrections, downloads, Scrub Key and audit controls compete on the same page.
235
  ```
236
 
237
+ The approved target remains:
238
 
239
  ```text
240
  Top-level workflow: Anonimiseren | Terugzetten
241
  Global presentation: Standaard | Expert
242
+ Core stages: Toevoegen → Controleren → Downloaden
243
  One primary action per active stage
244
  Progressive and conditional disclosure for settings, other formats, Scrub Key and audit evidence
245
  ```
246
 
247
+ On 2026-08-08 the coordinator explicitly chose how those three core stages must be presented. The Standard anonymization flow is a **single-page staged document workspace**, not three separate routed screens.
248
+
249
+ Binding interaction model:
250
+
251
+ ```text
252
+ One document
253
+ → one persistent workspace
254
+ → three persistent stage headers
255
+ → exactly one expanded/active stage
256
+ → completed stages collapse to compact summaries
257
+ → future stages remain visible but passive
258
+ → successful completion auto-opens the next stage
259
+ → explicit return to an earlier stage is allowed
260
+ → processing-affecting earlier changes invalidate downstream state fail-closed
261
+ ```
262
+
263
+ The first-principles reason is that Scrub is an iterative document-review workflow rather than a strictly linear checkout wizard. The interface should represent the **state of one document** rather than force the user to navigate separate pages. A staged workspace keeps the cognitive benefit of one task at a time while preserving context, progress, confidence and easy return from review to input.
264
+
265
+ The rejected Standard pattern is:
266
+
267
+ ```text
268
+ Toevoegen page → Controleren page → Downloaden page
269
+ ```
270
+
271
+ The rejected implementation shortcut is also:
272
+
273
+ ```text
274
+ classic long Streamlit form
275
+ + multiple independent/nested expanders
276
+ ```
277
+
278
+ Stage sections must read as application panels, not as a FAQ/settings accordion. There must be no default nested core-flow expander hierarchy in Standard.
279
+
280
+ `Standaard` is lower cognitive load, not lower safety. `Expert` preserves full inspection, tuning, audit and troubleshooting. The permanent settings sidebar is not part of the Standard target. Completed stages show only compact orientation/trust summaries rather than full controls.
281
+
282
+ Target progression example:
283
+
284
+ ```text
285
+ Initial:
286
+ ▼ 1 Toevoegen
287
+ 2 Controleren — beschikbaar na verwerking
288
+ 3 Downloaden — beschikbaar na controle
289
+
290
+ After processing:
291
+ ✓ 1 Toevoegen — contract.docx · Juridisch
292
+ ▼ 2 Controleren
293
+ 3 Downloaden — beschikbaar na controle
294
+
295
+ After review:
296
+ ✓ 1 Toevoegen — contract.docx · Juridisch
297
+ ✓ 2 Controleren — 14 gecontroleerd · 1 handmatig toegevoegd
298
+ ▼ 3 Downloaden
299
+ ```
300
 
301
  The implementation remains within Streamlit first, but must approximate a single-task application shell. It must not change recognizers, replacement decisions, export bytes, filenames, MIME types, Scrub Key semantics, reinsert behavior, audit evidence or the human-review requirement.
302
 
303
+ The detailed decision, alternative comparison, interaction rules, safety invariants and acceptance criteria are frozen in `PREMIUM_STAGED_WORKSPACE_DECISION.md`.
304
+
305
+ ### Premium execution sequence — urgent realignment
306
+
307
+ The previous Premium sequence is amended before production UI integration in PR #85:
308
 
309
  ```text
310
+ 0. SCRUB-WP_PROCESSED_TEXT_SELECTION_CROSS_FLOW_REGRESSION — completed / gate closed
311
+ 1. SCRUB-WP_PREMIUM_CORE_FLOW_UI_CONTRACT — completed / PR #80 merged
312
+ 2. SCRUB-WP_PREMIUM_CORE_FLOW_STATE_MODEL — completed / PR #82 merged
313
+ 3. SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE — URGENT CURRENT PACKAGE
314
+ 4. SCRUB-WP_PREMIUM_APP_SHELL_IMPLEMENTATION — active draft PR #85; production integration paused until package 3 is incorporated
315
+ 5. SCRUB-WP_PREMIUM_INPUT_STAGE_SIMPLIFICATION
316
+ 6. SCRUB-WP_PREMIUM_REVIEW_STAGE_SIMPLIFICATION
317
+ 7. SCRUB-WP_PREMIUM_EXPORT_STAGE_SIMPLIFICATION
318
+ 8. SCRUB-WP_PREMIUM_EXPERT_PARITY_REGRESSION
319
+ 9. SCRUB-WP_PREMIUM_CORE_FLOW_APP_VERIFY_CLOSEOUT
320
  ```
321
 
322
+ PR #85 is **amended, not discarded**. Its current pure `premium_app_shell.py` helpers/tests are consistent with the one-active-stage direction and may be retained. Before production `presidio_streamlit.py` integration, the candidate must additionally freeze/test active/completed/future stage presentation, compact completed summaries, passive future stages, explicit return/edit affordances, auto-progression hooks and the no-three-page-routing rule.
323
+
324
+ Do not combine input, review and export restructuring into one patch. Do not run shared Streamlit UI packages in parallel. Each consequential production UI candidate receives separate `governance_release_assurance` under the enforced contract.
325
 
326
  ### Phase 6 — MVP workflow validation and trust hardening
327
 
 
354
 
355
  ## 7. Active next work direction
356
 
357
+ The coordinator has explicitly prioritized the Premium interface. The Premium staged-workspace line is therefore the dominant execution queue until its live closeout, unless a privacy/safety blocker requires interruption.
358
 
359
+ Current dominant queue:
360
 
361
  ```text
362
+ 1. SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE — current; architecture/roadmap/workpackage binding
363
+ 2. SCRUB-WP_PREMIUM_APP_SHELL_IMPLEMENTATION — draft PR #85; resume production integration only after #1 is incorporated
364
+ 3. SCRUB-WP_PREMIUM_INPUT_STAGE_SIMPLIFICATION
365
+ 4. SCRUB-WP_PREMIUM_REVIEW_STAGE_SIMPLIFICATION
366
+ 5. SCRUB-WP_PREMIUM_EXPORT_STAGE_SIMPLIFICATION
367
+ 6. SCRUB-WP_PREMIUM_EXPERT_PARITY_REGRESSION
368
+ 7. SCRUB-WP_PREMIUM_CORE_FLOW_APP_VERIFY_CLOSEOUT
 
 
 
 
 
 
369
  ```
370
 
371
+ The earlier Phase 6 trust-hardening packages remain part of project history and may be reopened when required by evidence, but they are not allowed to dilute the current Premium UI focus by default.
372
+
373
  Execution principles:
374
 
375
  - use synthetic data only;
 
 
376
  - preserve legal meaning and keep human review mandatory;
377
+ - the Premium shell is presentation/state orchestration, not a license to change recognition or export semantics;
378
+ - one document, one workspace, three persistent stages, one active task;
379
+ - no three routed pages for `Toevoegen → Controleren → Downloaden` in Standard;
380
+ - no nested-expander recreation of the current long form;
381
+ - create recognizer or document-processing fixes only from reproducible safety evidence;
382
+ - live UI work must be sequential where it touches shared Streamlit/review/export surfaces;
383
  - do not make production-readiness claims from prototype evidence.
384
 
385
  ### Candidate document-centric manual-correction line
386
 
387
+ Direct usability evidence supports correction in the main processed-text pane:
388
 
389
  ```text
390
  select an unmasked value
 
393
  → add through the existing manual replacement path
394
  ```
395
 
396
+ The first version is bounded to all exact occurrences of the selected value. It creates a normal document-scoped manual row, keeps the replacement table authoritative and preserves current bound export, Scrub Key and reinsert semantics. Occurrence-specific replacement, a rich editor and a combined Streamlit upgrade are excluded.
397
 
398
+ The sequence was:
399
 
400
  ```text
401
  1. SCRUB-WP_PROCESSED_TEXT_SELECTION_MASKING_CONTRACT
 
406
  6. SCRUB-WP_PROCESSED_TEXT_SELECTION_APP_VERIFY
407
  ```
408
 
409
+ The coordinator approved the direction and all-exact version-one boundary at 2026-08-04 00:09 Europe/Amsterdam. The contract, action model, component and production table integration are complete. GitHub-to-Hugging-Face synchronization and live app verification are green. Display-only placeholder compaction is deployed and app-verified without changing binding grammar, entropy, export, Scrub Key or reinsert semantics. The cross-flow safety/governance gate is now closed and no longer blocks Premium UI work.
410
 
411
+ Recall/benchmark work is reopened only where reproducible safety evidence requires it.
412
 
413
  Do not start local packaging next steps such as `WP48B` or `WP49B` by default. They require explicit coordinator approval.
414
 
 
457
  MVP architecture target:
458
 
459
  ```text
460
+ Thin helper-driven Streamlit application shell;
461
+ one persistent document workspace;
462
+ three core Standard stages with exactly one active at a time;
463
+ global Standard/Expert presentation;
464
+ tested safety/state boundaries;
465
+ local-first direction;
466
+ and a clear primary export with secondary restore/audit layers.
467
  ```
468
 
469
  Do not migrate frontend, add a full document editor, introduce cloud document processing, or alter export/Scrub Key/reinsert semantics without a dedicated approved package.
 
679
  - no change to Scrub Key, export or reinsert semantics without a separate package;
680
  - human review remains required;
681
  - corpus or benchmark success does not prove production readiness;
682
+ - no cloud document processing is introduced.
WORKPACKAGES.md CHANGED
@@ -1,3 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ## 2026-08-07 Europe/Amsterdam — SCRUB-WP_ISSUE70_POST_MERGE_ACTIONS_EVIDENCE_RECOVERY — repaired candidate
2
 
3
  Status: `RELEASE_CANDIDATE_READY`; fresh exact-head blind assurance required before merge.
 
1
+ # SolidPrivacy Scrub — Current authoritative execution queue
2
+
3
+ > **Current status override — 2026-08-08 Europe/Amsterdam**
4
+ > This section is the authoritative current execution queue. Older queue/status sections retained below are historical records and must not override this section.
5
+
6
+ ## Premium UI priority
7
+
8
+ The coordinator has explicitly prioritized the Premium interface. The active Standard target is a **single-page staged document workspace**, not three separate routed core-flow pages and not a long form with nested expanders.
9
+
10
+ Binding principle:
11
+
12
+ ```text
13
+ One document. One workspace. Three stages. One active task.
14
+
15
+ Toevoegen → Controleren → Downloaden
16
+ ```
17
+
18
+ All three stage headers remain present in one workspace. Exactly one stage is expanded/dominant at a time. Completed stages collapse to compact summaries, future stages remain visible but passive, successful completion auto-advances, and explicit return to an earlier stage is allowed. Processing-affecting earlier changes invalidate downstream state fail-closed.
19
+
20
+ Governing design:
21
+ - `PREMIUM_STAGED_WORKSPACE_DECISION.md`;
22
+ - `PREMIUM_CORE_FLOW_UI_REALIGNMENT_PLAN.md`;
23
+ - merged `premium_core_flow_state.py` state invariants;
24
+ - ROADMAP Premium core-flow section.
25
+
26
+ Historical prerequisites now completed:
27
+ - `SCRUB-WP_PREMIUM_CORE_FLOW_UI_REALIGNMENT_PLAN` — planning completed;
28
+ - `SCRUB-WP_PROCESSED_TEXT_SELECTION_CROSS_FLOW_REGRESSION` — independent governance gate closed;
29
+ - `SCRUB-WP_PREMIUM_CORE_FLOW_UI_CONTRACT` — merged through PR #80;
30
+ - `SCRUB-WP_PREMIUM_CORE_FLOW_STATE_MODEL` — merged through PR #82.
31
+
32
+ ### 1. SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE — urgent architecture gate
33
+
34
+ Status: `IMPLEMENTATION_IN_PROGRESS` until exact-head CI and independent assurance.
35
+ Role: `implementation_operations`
36
+ Issue: #86
37
+ Dependency: merged PR #80 UI contract + merged PR #82 state model.
38
+ Parallelization: documentation/contract-only; production Streamlit integration in PR #85 must wait for this decision to be incorporated.
39
+
40
+ Goal:
41
+ - freeze the approved staged-workspace interaction model before the active App Shell package enters `presidio_streamlit.py`;
42
+ - remove ambiguity between three routed screens versus one persistent staged workspace;
43
+ - make the Premium line the dominant execution queue.
44
+
45
+ Required output:
46
+ - detailed first-principles design decision;
47
+ - roadmap realignment;
48
+ - this authoritative workpackage queue;
49
+ - changelog and decision-log record;
50
+ - contract tests;
51
+ - explicit binding note on issue #84 / PR #85;
52
+ - implementation claim and handover.
53
+
54
+ Acceptance:
55
+ - Standard explicitly means one persistent page/workspace with three persistent stage headers;
56
+ - exactly one stage exposes its full surface at a time;
57
+ - completed stages summarize, future stages remain passive;
58
+ - successful stage completion advances automatically;
59
+ - explicit prior-stage return is allowed;
60
+ - processing-affecting changes invalidate downstream state;
61
+ - three isolated routed pages are rejected for the Standard core flow;
62
+ - nested core-flow expanders are rejected as the default Standard pattern;
63
+ - no runtime/UI product semantics change in this package;
64
+ - exact-head GitHub Actions passes;
65
+ - fresh independent `governance_release_assurance` is required before merge.
66
+
67
+ Intentionally excluded:
68
+ - recognizers, thresholds, replacement logic, review authority;
69
+ - export bytes/names/MIME;
70
+ - Scrub Key/reinsert/audit semantics;
71
+ - production Streamlit integration;
72
+ - dependencies, runtime, deployment or Hugging Face behavior.
73
+
74
+ ### 2. SCRUB-WP_PREMIUM_APP_SHELL_IMPLEMENTATION — active draft PR #85, amended
75
+
76
+ Status: active draft; **production integration gated by package 1**.
77
+ Issue: #84
78
+ PR: #85
79
+ Dependency: `SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE` merged after independent PASS.
80
+
81
+ Existing reusable work:
82
+ - `premium_app_shell.py` presentation primitives;
83
+ - `tests/test_premium_app_shell.py`;
84
+ - top-level `Anonimiseren | Terugzetten` labels;
85
+ - global `Standaard | Expert` labels;
86
+ - stage labels and one-active-stage primitive;
87
+ - Standard sidebar-hidden / Expert sidebar-available primitive.
88
+
89
+ Required before production integration:
90
+ - model active / completed / future stage presentation explicitly;
91
+ - compact completed-stage summary contract;
92
+ - passive future-stage contract;
93
+ - automatic progression hooks from Add → Review → Download;
94
+ - explicit prior-stage return/edit affordance;
95
+ - no routed-page interpretation for the three anonymization stages;
96
+ - no generic nested-expander hierarchy in Standard;
97
+ - bind to `premium_core_flow_state.py` lineage/invalidation rules.
98
+
99
+ Production integration acceptance:
100
+ - integrate the staged shell in the existing Streamlit application without changing processing semantics;
101
+ - all three stage headers remain persistently represented;
102
+ - exactly one stage is dominant;
103
+ - no permanent Standard configuration sidebar;
104
+ - no stale review/export remains presented as current;
105
+ - current review table/include authority, direct masking, export, Scrub Key, reinsert and audit semantics remain intact;
106
+ - full exact-head regression green;
107
+ - independent assurance PASS before merge.
108
+
109
+ Do not merge PR #85 merely because helper tests are green.
110
+
111
+ ### 3. SCRUB-WP_PREMIUM_INPUT_STAGE_SIMPLIFICATION
112
+
113
+ Status: queued after App Shell PASS/merge.
114
+ Dependency: package 2 merged.
115
+ Shared UI rule: sequential; do not edit `presidio_streamlit.py` in parallel with another Premium production package.
116
+
117
+ Goal:
118
+ - make `Toevoegen` feel like one clear acquisition task rather than a settings form.
119
+
120
+ Target Standard surface:
121
+ - upload document OR paste text through one coherent source surface;
122
+ - essential recognition profile/context visible and understandable;
123
+ - one dominant action: `Document verwerken`;
124
+ - nonessential tuning hidden or moved to Expert/secondary disclosure;
125
+ - source identity survives into the compact completed-stage summary.
126
+
127
+ Acceptance:
128
+ - no duplicate input surfaces;
129
+ - no forest of default-open settings;
130
+ - one dominant processing action;
131
+ - profile never changes silently;
132
+ - ingestion, recognizer selection and processing semantics unchanged;
133
+ - processing-affecting edits invalidate downstream state;
134
+ - full regression + independent assurance before merge;
135
+ - live app verification after deployment because UI behavior changes.
136
+
137
+ ### 4. SCRUB-WP_PREMIUM_REVIEW_STAGE_SIMPLIFICATION
138
+
139
+ Status: queued after Input Stage PASS/merge.
140
+ Dependency: package 3.
141
+ Conflict boundary: exclusive ownership of shared review/Streamlit surfaces while active.
142
+
143
+ Goal:
144
+ - make `Controleren` the main document-review workspace rather than a collection of helper panels.
145
+
146
+ Target Standard surface:
147
+ - source and processed/checked text form the dominant review surface;
148
+ - direct missed-value masking remains accessible where the user notices a miss;
149
+ - review table remains authoritative source of truth and fallback, but not necessarily the visually dominant first surface;
150
+ - technical filters, diagnostics and tuning move out of the primary hierarchy;
151
+ - one dominant completion action: `Controle afronden`.
152
+
153
+ Acceptance:
154
+ - mandatory human review is not weakened;
155
+ - include/exclude state remains authoritative;
156
+ - direct masking produces normal document-bound manual rows;
157
+ - no recognizer/export/Scrub Key/reinsert semantic drift;
158
+ - compact completed review summary is trustworthy and nontechnical;
159
+ - full regression + independent assurance before merge;
160
+ - live app verification required.
161
+
162
+ ### 5. SCRUB-WP_PREMIUM_EXPORT_STAGE_SIMPLIFICATION
163
+
164
+ Status: queued after Review Stage PASS/merge.
165
+ Dependency: package 4.
166
+ Conflict boundary: exclusive ownership of shared export/Streamlit surfaces while active.
167
+
168
+ Goal:
169
+ - make `Downloaden` end with one obvious recommended cleaned-document action instead of multiple equal-weight download controls.
170
+
171
+ Target Standard surface:
172
+ - one dominant recommended document download selected only from already eligible outputs;
173
+ - alternate formats secondary;
174
+ - Scrub Key clearly separated as sensitive restoration material;
175
+ - audit/residual-risk evidence accessible but secondary;
176
+ - one dominant action: `Document downloaden`.
177
+
178
+ Acceptance:
179
+ - export bytes, eligibility, filenames and MIME types unchanged;
180
+ - Scrub Key lifecycle/warning/binding unchanged;
181
+ - audit evidence not removed;
182
+ - current-generation guard prevents stale downloads;
183
+ - full regression + independent assurance before merge;
184
+ - live app verification required.
185
+
186
+ ### 6. SCRUB-WP_PREMIUM_EXPERT_PARITY_REGRESSION
187
+
188
+ Status: queued after Export Stage PASS/merge.
189
+ Dependency: packages 2–5.
190
+
191
+ Goal:
192
+ - prove that Standard removes visual complexity without removing capability or safety.
193
+
194
+ Required evidence:
195
+ - Standard ↔ Expert presentation switch preserves valid source/review state;
196
+ - presentation-only changes do not reprocess;
197
+ - processing-affecting Expert changes invalidate downstream lineage correctly;
198
+ - all advanced review, audit and troubleshooting capabilities remain available where intended;
199
+ - no review/export/Scrub Key/reinsert capability is silently lost;
200
+ - Standard cannot expose stale current-looking output.
201
+
202
+ Acceptance:
203
+ - deterministic parity/regression tests;
204
+ - full suite green;
205
+ - independent assurance PASS.
206
+
207
+ ### 7. SCRUB-WP_PREMIUM_CORE_FLOW_APP_VERIFY_CLOSEOUT
208
+
209
+ Status: final queued Premium gate.
210
+ Dependency: packages 2–6 independently passed and merged.
211
+
212
+ Goal:
213
+ - verify the deployed Premium Standard flow end-to-end in the actual app.
214
+
215
+ Required live acceptance:
216
+ 1. first impression is a task workspace, not a long form;
217
+ 2. `Toevoegen`, `Controleren`, `Downloaden` remain visibly the workflow structure;
218
+ 3. only one stage is fully open at once;
219
+ 4. successful completion auto-advances;
220
+ 5. completed stages collapse into compact meaningful summaries;
221
+ 6. future stages remain passive and non-competing;
222
+ 7. returning to an earlier stage is obvious;
223
+ 8. stale downstream state is invalidated visibly and safely;
224
+ 9. one dominant primary action per active stage;
225
+ 10. Standard has no permanent configuration sidebar;
226
+ 11. review remains sufficient for mandatory human review;
227
+ 12. one recommended cleaned-document download dominates the final stage;
228
+ 13. Scrub Key, alternate formats and audit remain accessible but secondary;
229
+ 14. no nested-expander form hierarchy replaces the old long form;
230
+ 15. no recognizer/export/Scrub Key/reinsert/audit semantics changed unintentionally.
231
+
232
+ Validation:
233
+ - exact GitHub Actions evidence;
234
+ - GitHub → Hugging Face synchronization for the exact runtime candidate;
235
+ - runtime health/smoke evidence;
236
+ - coordinator/user subjective UX verification;
237
+ - final governance closeout.
238
+
239
+ ## Binding execution order
240
+
241
+ ```text
242
+ SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE
243
+ → SCRUB-WP_PREMIUM_APP_SHELL_IMPLEMENTATION
244
+ → SCRUB-WP_PREMIUM_INPUT_STAGE_SIMPLIFICATION
245
+ → SCRUB-WP_PREMIUM_REVIEW_STAGE_SIMPLIFICATION
246
+ → SCRUB-WP_PREMIUM_EXPORT_STAGE_SIMPLIFICATION
247
+ → SCRUB-WP_PREMIUM_EXPERT_PARITY_REGRESSION
248
+ → SCRUB-WP_PREMIUM_CORE_FLOW_APP_VERIFY_CLOSEOUT
249
+ ```
250
+
251
+ Safety/coordination rule:
252
+ - **do not run the shared Streamlit UI packages in parallel**;
253
+ - specifically avoid parallel edits to `presidio_streamlit.py`, `fix_streamlit_nested_expanders.py`, review-table flow and export/download flow;
254
+ - helper/spec/test work can proceed separately only when it does not create conflicting implementation authority;
255
+ - privacy/safety blockers may interrupt this sequence, but generic backlog work must not dilute the current Premium UI focus by default.
256
+
257
+ ---
258
+
259
  ## 2026-08-07 Europe/Amsterdam — SCRUB-WP_ISSUE70_POST_MERGE_ACTIONS_EVIDENCE_RECOVERY — repaired candidate
260
 
261
  Status: `RELEASE_CANDIDATE_READY`; fresh exact-head blind assurance required before merge.
handover/workpackages/20260808_1255_premium_staged_workspace_decision_freeze.md ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Handover — SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE
2
+
3
+ Repository: `solidprivacy-nl/scrub`
4
+ Workpackage title: `SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE — bind single-page three-stage workspace`
5
+ Role: `implementation_operations`
6
+ Status: `RELEASE_CANDIDATE_READY — independent governance_release_assurance required before merge`
7
+
8
+ ## Summary
9
+
10
+ The coordinator-approved Premium Standard interaction decision has been translated into a binding architecture specification, roadmap realignment, authoritative execution queue, decision-log record and regression contract.
11
+
12
+ The governing principle is:
13
+
14
+ ```text
15
+ One document. One workspace. Three stages. One active task.
16
+
17
+ Toevoegen → Controleren → Downloaden
18
+ ```
19
+
20
+ For Standard anonymization, the three stages remain represented in one persistent page/workspace. Exactly one stage is expanded/dominant at a time. Completed stages collapse to compact summaries, future stages remain visible but passive, successful completion auto-advances, explicit return to an earlier stage is allowed, and processing-affecting earlier changes invalidate downstream state fail-closed.
21
+
22
+ Three separate routed core-flow pages and a generic nested-expander form hierarchy are explicitly rejected for Standard.
23
+
24
+ This package deliberately intervenes before active PR #85 enters production `presidio_streamlit.py` integration. PR #85 is amended, not discarded: its existing pure `premium_app_shell.py` and test work remains reusable, but the production shell must first incorporate this staged-workspace contract.
25
+
26
+ ## Files added
27
+
28
+ - `PREMIUM_STAGED_WORKSPACE_DECISION.md`
29
+ - `tests/test_premium_staged_workspace_decision.py`
30
+ - `workpackage_claims/scrub_wp_premium_staged_workspace_decision_freeze.md`
31
+ - `handover/workpackages/20260808_1255_premium_staged_workspace_decision_freeze.md`
32
+
33
+ ## Files changed
34
+
35
+ - `ROADMAP.md`
36
+ - Premium staged workspace made the explicit strategic UI direction;
37
+ - Premium UI made the dominant execution line;
38
+ - new urgent architecture gate inserted before production PR #85 integration;
39
+ - current governance/contract/state-model status aligned with merged PRs #73, #80 and #82.
40
+ - `WORKPACKAGES.md`
41
+ - authoritative current Premium execution queue prepended without deleting historical workpackage records;
42
+ - detailed sequential packages and acceptance criteria frozen.
43
+ - `CHANGELOG.md`
44
+ - architecture-candidate entry added.
45
+ - `DECISION_LOG.md`
46
+ - D043 records the single-page staged workspace decision and rejected alternatives.
47
+
48
+ Issue #84 and PR #85 also contain binding comments pointing to issue #86 / PR #87.
49
+
50
+ ## Tests added / updated
51
+
52
+ Added `tests/test_premium_staged_workspace_decision.py` covering:
53
+
54
+ - one persistent document workspace;
55
+ - `Toevoegen | Controleren | Downloaden` stage contract;
56
+ - exactly one expanded/dominant stage;
57
+ - compact completed-stage summaries;
58
+ - passive future-stage visibility;
59
+ - automatic progression;
60
+ - rejection of three routed core-flow pages;
61
+ - rejection of nested core-flow accordion hierarchy;
62
+ - preservation of review/export/Scrub Key/reinsert/human-review safety boundaries;
63
+ - roadmap urgency and exact workpackage execution order;
64
+ - D043 decision-log binding.
65
+
66
+ One initial new-test assertion was overly literal about Markdown emphasis (`not a three-page wizard` versus `**not** a three-page wizard`). Raw run #2143 therefore produced `1 failed, 1189 passed`. The assertion was narrowed to the durable semantic contract without weakening the routed-page/nested-expander prohibitions.
67
+
68
+ Pre-final administrative candidate validation:
69
+
70
+ ```text
71
+ GitHub Actions Tests run #2145 / ID 31253772414
72
+ python -m pytest -q tests
73
+ 1190 passed in 12.23s
74
+ conclusion: success
75
+ ```
76
+
77
+ After that green run, a scope-cleanup commit only restored unrelated historical ROADMAP status wording and removed its temporary self-cleaning workflow. No product/runtime code changed.
78
+
79
+ The final handover/claim commits intentionally move the PR head once more. A fresh full `Tests` run on that final exact head is required before the candidate is handed to assurance. No further candidate edits are permitted after that exact-head run unless the candidate returns to implementation for repair.
80
+
81
+ ## Validation status
82
+
83
+ - GitHub Actions: `GREEN` on pre-final administrative candidate (`1190 passed in 12.23s`); fresh exact-final-head run required after this handover/claim commit.
84
+ - Hugging Face sync: `NOT APPLICABLE` — no runtime/deployment/Hugging Face product files are changed.
85
+ - App verification: `NOT APPLICABLE` — this package changes architecture/roadmap/contracts only; it does not change the live UI.
86
+ - Production Streamlit integration: deliberately not included.
87
+
88
+ ## GitHub Actions status
89
+
90
+ Pre-final green evidence:
91
+
92
+ - workflow: `Tests`
93
+ - run: #2145 / `31253772414`
94
+ - tested branch head: `6c72d87700683215bacf7115c82f72418d6da38e`
95
+ - tested PR merge candidate: `d72686b585a137adb9000c4457b262eecb0679e6`
96
+ - command: `python -m pytest -q tests`
97
+ - raw result: `1190 passed in 12.23s`
98
+ - conclusion: `success`
99
+
100
+ The exact final PR head and its fresh run must be recorded in PR #87 / issue #86 after this file and the final claim are committed.
101
+
102
+ ## Hugging Face sync status
103
+
104
+ `NOT APPLICABLE`.
105
+
106
+ This workpackage contains no production/runtime file intended for Hugging Face synchronization.
107
+
108
+ ## App verification status
109
+
110
+ `NOT APPLICABLE` for this package.
111
+
112
+ Actual staged-workspace behavior must be verified later in `SCRUB-WP_PREMIUM_CORE_FLOW_APP_VERIFY_CLOSEOUT` after the App Shell, Input, Review and Export implementation packages have been independently assured, merged and synchronized.
113
+
114
+ ## Remaining risks
115
+
116
+ 1. **Independent assurance not yet completed.** Implementation may not certify or merge its own PR #87.
117
+ 2. **PR #85 must remain aligned.** Its current helpers are reusable, but production integration must not proceed using three routed pages or a generic nested-expander hierarchy.
118
+ 3. **Streamlit implementation risk remains future work.** The staged workspace must feel like application panels, not cosmetically renamed `st.expander` form sections.
119
+ 4. **Standard must not become less safe.** Review-table/include authority, direct masking, Scrub Key, export, reinsert, audit and mandatory human review remain binding.
120
+ 5. **Final exact-head evidence is still required after this administrative closeout commit.** A failure returns to implementation; no inference of PASS is allowed.
121
+
122
+ ## Next recommended step
123
+
124
+ 1. Commit the final claim with `RELEASE_CANDIDATE_READY` status.
125
+ 2. Run/observe the normal full GitHub Actions `Tests` workflow on the exact final PR #87 head.
126
+ 3. If and only if that exact-head run is green, freeze the candidate and route PR #87 to a fresh independent `governance_release_assurance` reviewer for `PASS | FAIL | INDETERMINATE`.
127
+ 4. On independent PASS, merge PR #87 unchanged.
128
+ 5. Only then resume `SCRUB-WP_PREMIUM_APP_SHELL_IMPLEMENTATION` in PR #85 under the new staged-workspace contract.
129
+ 6. Continue sequentially: App Shell → Input → Review → Export → Expert parity → live app verification.
130
+
131
+ Implementation must not self-merge PR #87 and must not claim live Premium UI completion from this architecture package.
tests/test_premium_staged_workspace_decision.py ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ from pathlib import Path
4
+
5
+
6
+ ROOT = Path(__file__).resolve().parents[1]
7
+ DECISION = ROOT / "PREMIUM_STAGED_WORKSPACE_DECISION.md"
8
+ ROADMAP = ROOT / "ROADMAP.md"
9
+ WORKPACKAGES = ROOT / "WORKPACKAGES.md"
10
+ DECISION_LOG = ROOT / "DECISION_LOG.md"
11
+
12
+
13
+ def test_decision_freezes_one_document_one_workspace_model() -> None:
14
+ text = DECISION.read_text(encoding="utf-8")
15
+
16
+ for required in [
17
+ "single-page staged document workspace",
18
+ "One document. One workspace. Three stages. One active task.",
19
+ "1. Toevoegen",
20
+ "2. Controleren",
21
+ "3. Downloaden",
22
+ "Exactly one of those stages is expanded and dominant",
23
+ "completed prior stage collapses into a compact summary",
24
+ "Future stages remain visible",
25
+ "After successful processing",
26
+ "Controleren opens automatically",
27
+ "After explicit review completion",
28
+ "Downloaden opens automatically",
29
+ ]:
30
+ assert required in text
31
+
32
+
33
+ def test_decision_rejects_routed_pages_and_nested_form_accordion() -> None:
34
+ text = DECISION.read_text(encoding="utf-8")
35
+
36
+ for required in [
37
+ "three-page wizard",
38
+ "three separate core-flow pages: rejected for Standard",
39
+ "No nested core-flow accordion hierarchy",
40
+ "Do not build an accordion inside an accordion",
41
+ "Stage panels, not generic Streamlit expanders",
42
+ ]:
43
+ assert required in text
44
+
45
+
46
+ def test_decision_preserves_state_safety_and_product_semantics() -> None:
47
+ text = DECISION.read_text(encoding="utf-8")
48
+
49
+ for required in [
50
+ "review-table authority",
51
+ "export bytes, filenames or MIME types",
52
+ "Scrub Key schema, binding, warning or lifecycle",
53
+ "reinsert semantics",
54
+ "human-review requirement",
55
+ "processed lineage invalid",
56
+ "reviewed lineage invalid",
57
+ "export lineage invalid",
58
+ ]:
59
+ assert required in text
60
+
61
+
62
+ def test_roadmap_makes_staged_workspace_the_urgent_premium_gate() -> None:
63
+ text = ROADMAP.read_text(encoding="utf-8")
64
+
65
+ assert "PREMIUM_STAGED_WORKSPACE_DECISION.md" in text
66
+ assert "SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE — URGENT CURRENT PACKAGE" in text
67
+ assert "production integration paused until package 3 is incorporated" in text
68
+ assert "PR #85 is **amended, not discarded**" in text
69
+ assert "one persistent document workspace" in text
70
+ assert "no three routed pages" in text
71
+
72
+
73
+ def test_workpackages_and_decision_log_bind_the_execution_order() -> None:
74
+ workpackages = WORKPACKAGES.read_text(encoding="utf-8")
75
+ decisions = DECISION_LOG.read_text(encoding="utf-8")
76
+
77
+ assert "SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE" in workpackages
78
+ assert "SCRUB-WP_PREMIUM_APP_SHELL_IMPLEMENTATION" in workpackages
79
+ assert "SCRUB-WP_PREMIUM_INPUT_STAGE_SIMPLIFICATION" in workpackages
80
+ assert "SCRUB-WP_PREMIUM_REVIEW_STAGE_SIMPLIFICATION" in workpackages
81
+ assert "SCRUB-WP_PREMIUM_EXPORT_STAGE_SIMPLIFICATION" in workpackages
82
+ assert "SCRUB-WP_PREMIUM_EXPERT_PARITY_REGRESSION" in workpackages
83
+ assert "SCRUB-WP_PREMIUM_CORE_FLOW_APP_VERIFY_CLOSEOUT" in workpackages
84
+ assert "do not run the shared Streamlit UI packages in parallel" in workpackages
85
+
86
+ assert "D043" in decisions
87
+ assert "single-page staged document workspace" in decisions
88
+ assert "three separate routed screens" in decisions
workpackage_claims/scrub_wp_premium_app_shell_implementation.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Workpackage Claim — SCRUB-WP_PREMIUM_APP_SHELL_IMPLEMENTATION
2
+
3
+ Repository: `solidprivacy-nl/scrub`
4
+ Role: `implementation_operations`
5
+ Status: `IMPLEMENTATION_IN_PROGRESS`
6
+ Issue: #84
7
+ PR: #85
8
+ Branch: `wp/premium-app-shell-implementation`
9
+ Claimed: 2026-08-08 14:47 Europe/Amsterdam
10
+
11
+ ## Dependency check
12
+
13
+ The upstream staged-workspace architecture gate is satisfied:
14
+
15
+ - `SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE_VERIFY: PASS` was recorded independently for PR #87 exact head `4d99430225f5086a84f2db33089e19688ca7793f`;
16
+ - PR #87 merged unchanged as `d54eb06f9c6fea7c1f36cdb082b475c0d4666507`;
17
+ - the binding Standard model is therefore `One document. One workspace. Three stages. One active task.`
18
+
19
+ ## Scope
20
+
21
+ Implement the shared Premium App Shell only:
22
+
23
+ - top-level `Anonimiseren | Terugzetten`;
24
+ - global `Standaard | Expert`;
25
+ - persistent `Toevoegen → Controleren → Downloaden` stage presentation;
26
+ - exactly one dominant stage in Standard;
27
+ - explicit active/completed/future stage states;
28
+ - compact completed-stage summaries and passive future stages;
29
+ - explicit return/edit affordance;
30
+ - automatic progression hooks tied to current processing/review lineage;
31
+ - Standard without a permanent configuration sidebar;
32
+ - production integration into `presidio_streamlit.py` without redesigning stage internals beyond shell/grouping needs.
33
+
34
+ ## Safety boundary
35
+
36
+ Do not change recognizers, thresholds, replacement semantics, review-table/include authority, direct masking semantics, export bytes/names/MIME, Scrub Key schema/binding/lifecycle, reinsert semantics, audit semantics, dependencies, cloud/local-processing boundary, or the mandatory human-review requirement.
37
+
38
+ ## Coordination
39
+
40
+ Exclusive ownership is claimed for the shared Streamlit shell surface while this package is active. Do not run another package that edits `presidio_streamlit.py`, `fix_streamlit_nested_expanders.py`, review-table flow, export/download flow, or shared workflow state in parallel.
41
+
42
+ ## Validation plan
43
+
44
+ - focused pure shell/state tests first;
45
+ - production integration contract tests;
46
+ - full GitHub Actions regression on the exact candidate head;
47
+ - fresh independent `governance_release_assurance` before merge;
48
+ - after merge, exact-main Actions + GitHub→Hugging Face sync + live app verification because UI behavior changes.
49
+
50
+ Implementation will not self-certify or self-merge.
workpackage_claims/scrub_wp_premium_staged_workspace_decision_freeze.md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Workpackage Claim — SCRUB-WP_PREMIUM_STAGED_WORKSPACE_DECISION_FREEZE
2
+
3
+ Repository: `solidprivacy-nl/scrub`
4
+ Role: `implementation_operations`
5
+ Status: `RELEASE_CANDIDATE_READY`
6
+ Issue: #86
7
+ PR: #87
8
+ Base main: `d5fcd8d6019f136e82877b646af2d085f9eb1720`
9
+ Branch: `wp/premium-staged-workspace-decision`
10
+
11
+ ## Goal
12
+
13
+ Freeze the coordinator-approved Premium Standard interaction architecture before production Streamlit integration continues in PR #85.
14
+
15
+ Binding direction:
16
+
17
+ ```text
18
+ One document. One workspace. Three stages. One active task.
19
+
20
+ Toevoegen → Controleren → Downloaden
21
+ ```
22
+
23
+ The three stage headers remain in one persistent page/workspace. Exactly one stage is expanded at a time; completed stages collapse to compact summaries; future stages remain visible but passive; successful completion auto-advances; deliberate return to an earlier stage is allowed; processing-affecting changes invalidate downstream state fail-closed.
24
+
25
+ ## Scope
26
+
27
+ Planning, architecture, execution-order and contract-test changes only:
28
+
29
+ - `PREMIUM_STAGED_WORKSPACE_DECISION.md`;
30
+ - `ROADMAP.md`;
31
+ - `WORKPACKAGES.md`;
32
+ - `CHANGELOG.md`;
33
+ - `DECISION_LOG.md`;
34
+ - `tests/test_premium_staged_workspace_decision.py`;
35
+ - issue/PR binding notes for active PR #85;
36
+ - this claim and the final handover.
37
+
38
+ ## Explicit intervention in active Premium work
39
+
40
+ PR #85 is amended, not discarded. Its current `premium_app_shell.py` and `tests/test_premium_app_shell.py` helper work is reusable. Production `presidio_streamlit.py` integration must not proceed under a three-page or generic nested-expander interpretation; it must incorporate this staged-workspace decision after the decision candidate is independently assured and merged.
41
+
42
+ ## Administrative finalization
43
+
44
+ The large historical control files were updated through temporary self-cleaning PR workflows so their existing history was prepended to, not replaced or truncated. Those workflows and temporary helper files removed themselves and are absent from the persistent PR diff.
45
+
46
+ Persistent candidate paths are:
47
+
48
+ - `CHANGELOG.md`;
49
+ - `DECISION_LOG.md`;
50
+ - `PREMIUM_STAGED_WORKSPACE_DECISION.md`;
51
+ - `ROADMAP.md`;
52
+ - `WORKPACKAGES.md`;
53
+ - `tests/test_premium_staged_workspace_decision.py`;
54
+ - `workpackage_claims/scrub_wp_premium_staged_workspace_decision_freeze.md`;
55
+ - `handover/workpackages/20260808_1255_premium_staged_workspace_decision_freeze.md`.
56
+
57
+ ## Safety boundary
58
+
59
+ No production Streamlit/UI behavior changes in this package. No recognizer, threshold, replacement, review-table authority, direct masking, export bytes/names/MIME, Scrub Key, reinsert, audit, document-processing, dependency, hosting or Hugging Face behavior changes.
60
+
61
+ Human review remains mandatory. Synthetic/test content only.
62
+
63
+ ## Validation
64
+
65
+ One initial new-test assertion was overly literal about Markdown emphasis and produced `1 failed, 1189 passed` on run #2143. It was repaired without weakening the architecture contract.
66
+
67
+ Pre-final administrative candidate:
68
+
69
+ ```text
70
+ GitHub Actions Tests run #2145 / ID 31253772414
71
+ python -m pytest -q tests
72
+ 1190 passed in 12.23s
73
+ conclusion: success
74
+ ```
75
+
76
+ After that run, only roadmap scope cleanup plus this claim/handover administration changed. A fresh normal full `Tests` run on the exact final PR head is mandatory before assurance may treat this claim as machine-evidence-complete. No further candidate edits are permitted after that exact-head run unless the candidate returns to implementation for repair.
77
+
78
+ - Hugging Face sync: `NOT APPLICABLE` — no runtime/deployment files changed.
79
+ - App verification: `NOT APPLICABLE` — no live UI behavior changed.
80
+ - Independent `governance_release_assurance`: `REQUIRED` before merge.
81
+
82
+ Implementation does not self-certify or self-merge.