@adamchanadam/cer-workflow 0.3.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,174 @@
1
+ # Parallel Candidate Producers
2
+
3
+ <!-- cer-parallel-producers-owner -->
4
+
5
+ This file is the sole complete rule owner for CER parallel candidate producers. It defines how C
6
+ may use an inline, informal capability on demand while preserving formal roles, the single writer,
7
+ fresh Reviewers, source-based adjudication, and stop boundaries.
8
+
9
+ ## Contents
10
+
11
+ - [Position And Role Boundary](#position-and-role-boundary)
12
+ - [Keep User Operation Simple](#keep-user-operation-simple)
13
+ - [Activation Eligibility](#activation-eligibility)
14
+ - [Frozen Lane Contract](#frozen-lane-contract)
15
+ - [Modes And Write Boundary](#modes-and-write-boundary)
16
+ - [Mechanical Scratch-Root Boundary](#mechanical-scratch-root-boundary)
17
+ - [Candidate Return](#candidate-return)
18
+ - [C Readback, Adjudication, And Convergence](#c-readback-adjudication-and-convergence)
19
+ - [Failure, Drift, And Lifecycle](#failure-drift-and-lifecycle)
20
+ - [Prohibitions](#prohibitions)
21
+
22
+ ## Position And Role Boundary
23
+
24
+ - CER has only the formal roles C, E1, R, and E2. A parallel candidate producer is not a fifth
25
+ role and receives no formal title, cycle, ready, result, batch lifecycle, or Reviewer identity.
26
+ - A producer is C's inline, informal, on-demand candidate capability. It adds no slash command,
27
+ lock, registry, run id, resident mode, or background service.
28
+ - A producer does not replace E1 for writes to the formal project, replace R for independent
29
+ challenge, or communicate directly with E1, E2, or R.
30
+ - The formal project still has only one writer, E1. E2 may take over only after the existing
31
+ takeover conditions hold. No producer, C, or R becomes a parallel project writer.
32
+
33
+ ## Keep User Operation Simple
34
+
35
+ Normal CER use keeps the existing explicit trigger and five commands. The user does not configure
36
+ producers, lanes, scratch roots, hashes, roles, or extra review procedures and does not need to
37
+ learn the term "parallel candidate producer." C decides internally whether parallel work is
38
+ worthwhile, assigns lanes, and verifies isolation. When value or safety cannot be proven, C uses
39
+ zero producers and returns to serial analysis. Report only results, unknowns, blockers, or risks
40
+ that materially affect the user, without exposing internal lane ceremony.
41
+
42
+ ## Activation Eligibility
43
+
44
+ C may start two or more parallel lanes only when every condition below holds:
45
+
46
+ 1. At least two work lanes are independent and need no result from each other, shared mutable
47
+ state, or fixed execution order.
48
+ 2. Each lane's input and source identity is frozen.
49
+ 3. C has non-duplicative critical analysis, gating, or adjudication work to do concurrently and
50
+ does not degrade into a candidate organizer.
51
+ 4. C can independently verify each candidate against authoritative sources.
52
+ 5. Expected net time savings materially exceed startup, readback, hashing, deduplication, and
53
+ adjudication costs.
54
+ 6. Required parallel execution slots are available without reducing capacity needed by formal E1
55
+ or a fresh R.
56
+
57
+ If any condition fails, is uncertain, or one bounded read is sufficient, `producer_count=0` and C
58
+ completes the analysis serially. This is normal auto-idle, not degradation, an error, or a mode the
59
+ user must configure.
60
+
61
+ ## Frozen Lane Contract
62
+
63
+ Before a lane starts, C freezes all of the following:
64
+
65
+ - `lane_label`, used only to identify this candidate and not as a formal role or run id.
66
+ - `mode`, which must be either `read_only` or `isolated_artifact`.
67
+ - One objective.
68
+ - Input identity and version, source identity, and verifiable source coordinates.
69
+ - Allowed and forbidden scope.
70
+ - Expected candidate output.
71
+ - Acceptance method.
72
+ - Stop condition.
73
+ - For `isolated_artifact`, a lane-specific `scratch_root` explicitly supplied by C and already
74
+ accepted by the mechanical boundary check.
75
+
76
+ A lane does not start, or becomes invalid immediately, when its contract is unfrozen,
77
+ contradictory, or rewritten by the producer. A producer cannot expand its objective, sources,
78
+ permissions, output, or acceptance.
79
+
80
+ ## Modes And Write Boundary
81
+
82
+ ### `read_only`
83
+
84
+ - The lane must perform zero writes everywhere, including the project, scratch space, temporary
85
+ storage, external systems, and the producer's visible workspace.
86
+ - It may read only inputs and sources assigned by C and return a text candidate.
87
+
88
+ ### `isolated_artifact`
89
+
90
+ - The lane may write only to its task-owned, lane-specific `scratch_root` explicitly supplied by C.
91
+ - It must not write the target project, formal sources of truth, another lane, a user root, system
92
+ location, external service, or any unlisted target.
93
+ - An artifact is a candidate, not a formal project result. Only C may read it back, recompute its
94
+ hash, and converge it. A producer cannot send it directly to E1 or R for use.
95
+
96
+ ## Mechanical Scratch-Root Boundary
97
+
98
+ Before an artifact lane starts, C resolves the actual absolute path and proves every condition:
99
+
100
+ 1. `scratch_root` and the target project do not contain each other; neither is an ancestor of the
101
+ other.
102
+ 2. `scratch_root` is not a drive root, user root, system root, or equivalent high-risk root.
103
+ 3. The existing path chain contains no symlink, junction, Windows reparse point, mount, or other
104
+ link that redirects writes to an unverified location.
105
+ 4. Lane roots are distinct, are not ancestors of one another, and do not overlap formal sources
106
+ of truth, another lane, or an external system.
107
+ 5. Actual tool permissions allow only that lane's explicit root. Relative paths, wildcards,
108
+ environment fallback, or a producer-selected location cannot expand the boundary.
109
+
110
+ If any condition cannot be proven, the lane does not start. Do not fall back to staging inside the
111
+ project, shared scratch space, a user root, or another more dangerous location.
112
+
113
+ ## Candidate Return
114
+
115
+ Every naturally arriving candidate includes at least:
116
+
117
+ - `lane_label`.
118
+ - Frozen input identity.
119
+ - Actual source coordinates.
120
+ - `claims`, with each candidate claim verifiable from its source.
121
+ - `unknowns`, covering missing, conflicting, unverified, or restricted material.
122
+
123
+ An `isolated_artifact` candidate also lists the actual absolute path and SHA-256 for each artifact.
124
+ A return is not a formal CER ready/result, uses no formal batch identity, and is not acceptance,
125
+ progress, or Reviewer evidence.
126
+
127
+ ## C Readback, Adjudication, And Convergence
128
+
129
+ - C personally reads back sources and artifacts supporting critical claims; a producer summary is
130
+ not a substitute.
131
+ - C recomputes SHA-256 for every artifact and verifies that its path remains under the accepted
132
+ scratch root, input identity has not drifted, and source coordinates are replayable.
133
+ - When sources or candidates conflict, C adjudicates from user decisions, project sources of
134
+ truth, and authoritative sources required by the task. C must not accept by vote, quantity,
135
+ completion order, or matching answers.
136
+ - C converges only material still inside the intake boundary with unchanged sources and hashes
137
+ that can be independently verified.
138
+ - Only after C completes readback, deduplication, conflict adjudication, and convergence may it
139
+ form a formal self-contained batch for E1. E1 receives only that C-converged batch and must not
140
+ use raw producer communication, lane summaries, or unconverged scratch artifacts directly.
141
+ - R still challenges the frozen original evidence independently. A producer candidate cannot
142
+ impersonate fresh R evidence.
143
+
144
+ ## Failure, Drift, And Lifecycle
145
+
146
+ - C does not wait, poll, or background-monitor producers. It uses only candidates that arrive
147
+ naturally while the intake boundary remains open.
148
+ - A late candidate is invalid after intake closes, the formal batch is frozen, or `/CER-stop` or
149
+ `/CER-close` begins. It cannot reopen an adjudicated batch.
150
+ - Input or source drift discards only lanes that depend on that identity. Unaffected lanes do not
151
+ rerun.
152
+ - An out-of-bounds artifact path, hash drift, tamper, unreplayable source, or lane-contract drift
153
+ fails closed and cannot be converged.
154
+ - If producer creation fails, subagent capability is unavailable, a producer times out, no result
155
+ arrives naturally, or a candidate cannot be verified, C returns to ordinary serial analysis and
156
+ does not repeat the same failure. CER blocks only when the missing evidence is itself a task
157
+ blocker.
158
+ - `/CER-stop` and `/CER-close` do not wait for producers. C stops accepting new candidates, lets
159
+ late material expire, and follows the formal E1/R lifecycle for stop or close.
160
+
161
+ ## Prohibitions
162
+
163
+ - A producer impersonates C, E1, R, E2, or a fresh Reviewer.
164
+ - A producer uses a formal title, cycle, ready, result, slash, lock, registry, or run id.
165
+ - C, R, or a producer writes the target project, or any shared-workspace writer exists besides E1.
166
+ - A `read_only` lane writes anything.
167
+ - An `isolated_artifact` lane writes outside its accepted lane root or uses a project-contained or
168
+ ancestral path, drive root, user root, system root, link, junction, reparse point, mount, or
169
+ overlapping lane.
170
+ - A producer sends a candidate directly to E1, E2, or R, or E1 uses unconverged scratch.
171
+ - Producer count, votes, speed, or matching answers replace C's source-based adjudication.
172
+ - The user must configure lanes, scratch roots, hashes, roles, review procedures, or a new command.
173
+ - C polls or background-monitors producers, delays stop/close to wait for them, or accepts a late,
174
+ drifted, tampered, or out-of-bounds candidate.
@@ -0,0 +1,198 @@
1
+ # User Checkpoints And Roadmap
2
+
3
+ ## Contents
4
+
5
+ - [Two Different Surfaces](#two-different-surfaces)
6
+ - [Standard Inline Visualizer Timing](#standard-inline-visualizer-timing)
7
+ - [Fixed Lifecycle Cards](#fixed-lifecycle-cards)
8
+ - [Other Fixed Checkpoint Cards](#other-fixed-checkpoint-cards)
9
+ - [Bear Card Timing](#bear-card-timing)
10
+ - [Display Priority](#display-priority)
11
+ - [Role Display Boundary](#role-display-boundary)
12
+ - [Roadmap Source](#roadmap-source)
13
+
14
+ ## Two Different Surfaces
15
+
16
+ - The **inline visualizer roadmap** is the standard progress surface for long-running,
17
+ multi-stage, multi-batch, or first-public-alignment CER work without requiring user action. Layout, stage count, and
18
+ extra fields adapt to the project. Do not use a fixed four-box or fixed-table template as a
19
+ substitute for real task information. Minimum content is defined under "Display Priority".
20
+ Work that needs convergence also shows the living task brief, current batch freeze, and next
21
+ observable checkpoint.
22
+ - The **four-color ASCII bear card** is a checkpoint signal. It answers whether the user must preview,
23
+ decide, handle a blocker, or accept a result. It is not the roadmap or a continuous tracker.
24
+
25
+ Both may appear in one message, but they do not repeat content: the roadmap shows global
26
+ position, while the card names the current checkpoint.
27
+
28
+ ## Standard Inline Visualizer Timing
29
+
30
+ 1. When C classifies work as multi-stage, multi-batch, or a new product, flow, design, content,
31
+ or experience deliverable that needs first public alignment, show the initial roadmap before
32
+ the first real batch. It includes the living task brief, current batch freeze, and next preview
33
+ or decision point.
34
+ 2. Update it after C reads back and accepts a result that creates an outcome difference for a user
35
+ completion condition, or after a necessary diagnostic changes the next handoff path.
36
+ 3. When a user decision, an actual new constraint, or R evidence materially changes direction,
37
+ scope, deliverable shape, risk, or acceptance state, show the difference from the prior version
38
+ before updating it.
39
+ 4. Show the matching terminal state at staged delivery, technical acceptance, fit check, or closeout.
40
+
41
+ Do not update it for ordinary internal reads, E1 substeps, polling, unadjudicated candidates,
42
+ review completion, format pass, file consistency, logged issues, completed designs, or details
43
+ that do not change a user completion condition. Progress comes only from bounded readback after
44
+ direct-push, C adjudication, and an accepted outcome difference against `outcome_anchor`.
45
+
46
+ ## Fixed Lifecycle Cards
47
+
48
+ Before showing any lifecycle or checkpoint bear card, read `VERSION` again from this Skill root.
49
+ Stable semver `X.Y.Z` renders as `vX.Y.Z`; a missing, unreadable, or malformed value renders as
50
+ `version unverified`. `{package_version}` in the cards below is a template placeholder. Replace
51
+ it completely with the current `VERSION` before output and never display the placeholder itself.
52
+ Every card must be output as a standalone fenced `text` code block. Do not put it in a bullet,
53
+ block quote, ordinary paragraph, or the same Markdown block as other text.
54
+
55
+ ```text
56
+ ()_() CER Workflow v{package_version}
57
+ ( o.o ) ๐Ÿ”ต CER started
58
+ ( ^ )
59
+ ```
60
+
61
+ Every successfully accepted `CER-start`, including simple single-batch work, uses this fixed
62
+ open-eye start card. Keep the complete three-line ASCII bear: version on the first line, status on
63
+ the second line, and only the bear base line on the third line.
64
+
65
+ A successful `/CER-stop` uses this fixed closed-eye stop card:
66
+
67
+ ```text
68
+ ()_() CER Workflow v{package_version}
69
+ ( -.- ) โšช CER stopped ยท CER inactive
70
+ ( ^ )
71
+ ```
72
+
73
+ A successful `/CER-close` uses this fixed closed-eye close card:
74
+
75
+ ```text
76
+ ()_() CER Workflow v{package_version}
77
+ ( -.- ) ๐ŸŸข CER closed ยท writer closed
78
+ ( ^ )
79
+ ```
80
+
81
+ A closed-eye card is proof of a verified terminal state, not an intent receipt. Show the stop
82
+ card only after proving no active writer or a stopped writer and completing required readback.
83
+ Show the close card only after proving `writer closed`, completing required readback, and reading
84
+ back either a `โœ“` appended to this cycle's cycle number in every verifiable C/E/R title or a
85
+ `title sync warning`. The closed-eye close card proves writer close and required readback, not
86
+ all-green title sync. When any evidence is missing, use the open-eye red blocker card:
87
+
88
+ ```text
89
+ ()_() CER Workflow v{package_version}
90
+ ( o.o ) ๐Ÿ”ด Major blocker ยท checkpoint blocked
91
+ ( ^ )
92
+ ```
93
+
94
+ ## Other Fixed Checkpoint Cards
95
+
96
+ Non-lifecycle checkpoints keep the open-eye ASCII bear and also use a standalone fenced `text`
97
+ code block. Version stays on the first line, and the status is replaced on the second line. If the
98
+ version is invalid, they also show `version unverified`.
99
+
100
+ - `๐ŸŸก Direction decision`
101
+ - `๐Ÿ”ด Major blocker`
102
+ - `๐ŸŸข Staged delivery / final acceptance`
103
+
104
+ ## Bear Card Timing
105
+
106
+ CER is a continuous loop, but it does not show a card for every small step:
107
+
108
+ 1. Every successfully accepted `CER-start` first uses one fixed `๐Ÿ”ต CER started` card as the
109
+ startup receipt, including single-batch work. Long-running, multi-batch, or first-public-
110
+ alignment work adds the full inline roadmap in the same message.
111
+ 2. Use `๐ŸŸก Direction decision` when the user must choose a material direction, scope,
112
+ deliverable shape, cost, knowledge source, or acceptance standard.
113
+ 3. Use `๐Ÿ”ด Major blocker` when a communication path, threadId or platform-equivalent coordinate, permission,
114
+ source of truth, knowledge foundation, platform capability, or safety condition is
115
+ insufficient for reliable continuation.
116
+ 4. Use `๐ŸŸข Staged delivery` when an observable stage is ready for user acceptance after C
117
+ adjudication or risk-based R review.
118
+ 5. A successful `/CER-stop` shows the fixed closed-eye `โšช CER stopped` card. A successful
119
+ `/CER-close` shows the fixed closed-eye `๐ŸŸข CER closed` card. Ordinary final acceptance may
120
+ still use the open-eye `๐ŸŸข Final acceptance` checkpoint and must not impersonate a lifecycle
121
+ terminal state.
122
+
123
+ Do not show a card for ordinary internal reads, low-risk small edits, E1 substeps, ordinary batch
124
+ acceptance, R completion that creates no user checkpoint, or a clear next action. Update only the
125
+ inline roadmap when progress changed.
126
+
127
+ ## Display Priority
128
+
129
+ The inline roadmap shows at minimum: a testable destination; ordered stages with
130
+ complete/current/pending state; overall progress; the current action and verified evidence or
131
+ blocker; C/E1/R state; the next checkpoint; and knowledge-foundation state only for
132
+ knowledge-heavy work. First public alignment also shows scope/exclusions, key assumptions, the
133
+ smallest observable result, whether technical acceptance and fit check apply, and whether a user
134
+ decision is needed. Work that needs convergence also shows the living task brief: confirmed
135
+ requirements/exclusions, safe inferences, critical gaps, latest feedback, current batch freeze,
136
+ the next preview or decision point, and what changed from the previous version. A bear card reduces the current situation to a preview, decision,
137
+ blocker, or acceptance checkpoint. Both derive from existing project plan/progress or verified
138
+ execution state and do not create a second progress source.
139
+ Any user-visible living-brief rendering must carry `CER` identity and C/E1/R or
140
+ Controller/Executor/Reviewer context. Do not present it as a Codex task brief, Goal plan,
141
+ assistant plan, or unbranded internal feature.
142
+ The living task brief also derives only from the highest available authority and C-adjudicated facts.
143
+ Long multi-batch work also shows the unfinished `outcome_anchor` conditions, accepted outcome
144
+ differences, whether diagnostic/mechanism work is non-mainline only, and how the next batch
145
+ continues a completion condition. Do not substitute batch, task, or review counts for outcome
146
+ progress.
147
+
148
+ 1. When Codex exposes a callable in-conversation visualization capability, create an inline HTML visualization by default and use the capability's official rendering instruction, such as `::codex-inline-vis{file="..."}`.
149
+ 2. Mermaid does not satisfy the first layer. Use Mermaid only when inline visualization is unavailable, not callable, cannot write to its required visual directory, or fails to render.
150
+ 3. Use fixed Markdown or plain text only when Mermaid is also unavailable.
151
+ 4. State the fallback reason in one sentence. Do not silently downgrade, and do not block the project because visualization is unavailable.
152
+
153
+ Plain-text fallback:
154
+
155
+ ```text
156
+ CER roadmap | live brief
157
+ CER goal: <destination>
158
+ CER scope/exclusions: <in scope / not doing now>
159
+ CER assumptions: <confirmed / safe inference / decision needed>
160
+ CER live brief: confirmed=<...> | safe inference=<...> | decisions needed=<...>
161
+ CER outcome anchor: unfinished=<completion condition> | accepted delta=<outcome difference / none>
162
+ CER current batch freeze: <only what this batch will do>
163
+ CER work lane: <mainline_outcome / diagnostic / mechanism_improvement / governance_self_improvement>
164
+ CER last feedback / change: <... / none>
165
+ [Public alignment: <confirmed / safe inference / decision needed>]
166
+ [โœ“] Complete -> [โ— Now] Current stage -> [โ—‹] Later stage -> [โ—‹] Final delivery / closeout
167
+ Current: <one sentence>
168
+ Smallest observable outcome: <next thing the user will see>
169
+ Acceptance: technical acceptance=<condition / not applicable>; fit check=<condition / not applicable>
170
+ Next checkpoint: <one sentence>
171
+ Knowledge foundation: <confirmed / source missing / not applicable>
172
+ CER roles: C=<state> | E1=<state> | R=<not created / reviewing / complete>
173
+ ```
174
+
175
+ ## Role Display Boundary
176
+
177
+ Roadmaps and lifecycle cards show only formal C, E1, R, and E2 when takeover occurs. Parallel
178
+ candidate producers are C's internal on-demand capability. They do not enter role columns,
179
+ lifecycle cards, user settings, or separate progress displays. Only report missing evidence in
180
+ ordinary risk language when it becomes a material blocker.
181
+
182
+ ## Roadmap Source
183
+
184
+ Use the highest available authority and do not create a second progress record. The living task
185
+ brief and `outcome_anchor` also derive only from the highest available authority and C-adjudicated facts in this
186
+ cycle; it is not a second plan, fixed document set, or new workflow:
187
+
188
+ 1. If the target project has an authoritative progress source or roadmap, derive from it.
189
+ 2. If it has only an accepted plan, derive temporary state from that plan plus verified execution evidence.
190
+ 3. If it has no plan, derive temporary state from the current user request and verified role/blocker facts, and label it `initial / pending convergence`.
191
+
192
+ When `$project-context-workflow` is also in use, read only its accepted plan and progress. Do not repeat its five-step process or create a duplicate consensus gate.
193
+
194
+ Do not show cards for ordinary implementation detail. Use yellow for material direction or
195
+ deliverable-shape choices, open-eye red for reliability blockers, and open-eye green for
196
+ observable staged results and ordinary final acceptance. Only a proven stop/close terminal state
197
+ uses a closed-eye card. Ordinary batch state does not show a card; update the inline roadmap only
198
+ when the outcome-anchor progress gate is satisfied.