config: Reduce workflow instruction duplication - #270
Merged
Conversation
Render one compact execution contract in five workflows across four targets. Preserve phase bodies, gates, permissions, layouts, and unrelated generated artifacts. Add independent contract and negative-fixture checks, refresh fifteen tracked mirrors, and update the affected context. Preamble bytes decrease by 48.62-50.98 percent. Focused generation checks and all-artifact comparisons passed; full Nix CI remains pending. Plan: compress-workflow-execution-preamble, T01.
github-actions
Bot
force-pushed
the
codex/compress-workflow-preambles
branch
from
September 8, 2026 08:55
164f2b6 to
bd0e8c6
Compare
github-actions
Bot
force-pushed
the
codex/compress-workflow-preambles
branch
from
September 8, 2026 09:00
bd0e8c6 to
dafbafb
Compare
davidabram
force-pushed
the
codex/compress-workflow-preambles
branch
from
September 8, 2026 13:18
c73aacd to
a4a2bf0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reduce duplicated workflow instructions, repair one related next-task recovery contract, and normalize workflow terminology in 12 commits covering 11 tracked changes while preserving workflow behavior.
1. Compact shared execution preambles
Replace the repeated
Purpose,User-visible output, andComposite control flowsections with one inlineExecution contractin change-to-plan, next-task, commit, validate, and handover.workflow-content.pkl, using explicit standard and task-decision variants.sce-decisionexception.2. Deduplicate next-task approval-gate ownership
sce-next-task/SKILL.mdparsesapprovedand conditionally passes theapproveflag.references/task-execution.mdowns gate behavior, waits, decisions, and the no-edit-before-approval boundary.references/output.mdowns the exact gate layout and approval question.3. Deduplicate next-task complete execution handoff
references/task-execution.mdowns the composite livecompletehandoff field list exactly once.sce-next-task/SKILL.mdpasses the result verbatim.references/context-sync.mdvalidates and consumes that contract without restating the live field list.references/execution-contract.yaml; cross-session retry remains a distinct persisted completed-task record shape.4. Repair synchronization-debt recovery
Remove the stale dependency on a persisted
Context synchronization handoff, which no longer exists./next-taskonly routes that resolved record to the Task context synchronization phase.5. Deduplicate the mandatory five-root context pass
Make task context synchronization the sole owner of the exact mandatory root-file set.
references/task-execution.mdnow only validates and hands offcontext_impact; it no longer restates synchronization policy.references/context-sync.mddiscovery points to the named mandatory-root-pass subsection instead of relisting the five root paths.context/overview.md,context/architecture.md,context/glossary.md,context/patterns.md, andcontext/context-map.md.6. Deduplicate change-to-plan template policy
Make
references/plan-template.mdthe sole owner of persisted plan schema and generic plan-authoring rules.references/plan-authoring.mdnow owns planning process only: resolving the target, challenging the change, clarification, deriving plan-specific criteria, deciding task boundaries/dependencies/order,no_actionable_work, and writing/revising one plan.references/plan-template.mdowns acceptance-criteria format and validation semantics, task fields and atomic slicing, the no-validation-task rule, completion records, and existing-plan update preservation.T01..T0Nrule moved into the template rather than being dropped.7. Deduplicate commit bypass execution
Make
references/atomic-commit.mdthe sole owner of the exact bypass execution handoff.sce-commit/SKILL.mdinvokes that handoff once instead of restating the temp-file, commit, hash, cleanup, and failure procedure./commitworkflow still performs the actual commit.git commit -F,git rev-parse --verify HEAD^{commit}only after success, no retry/amend/staging/hash fabrication on failure, and cleanup where practical.references/atomic-commit.mdand rejects its reappearance insce-commit/SKILL.md.8. Deduplicate validation report policy
Make
references/validation.mdthe sole owner of validation execution policy and keepreferences/validation-report.mdfocused on persisted presentation.references/validation.mdowns command selection and execution, evidence interpretation, acceptance-criterion state, outcome classification, and the non-repairing boundary.references/validation-report.mdowns only the persisted## Validation Reportschema and rendering of already-established status, command results, criterion evidence, failures, and retry guidance.9. Deduplicate handover completeness contract
Make
references/handover-template.mdthe sole owner of the persisted handover schema and completeness validity rules.Completeness contractinstead of restating the section requirement.None identified.-style valid content.sce-handover/SKILL.md.10. Deduplicate decision qualification and ADR-template ownership
sce-decision.sce-decisionconsumes the caller's gate result and owns ADR lifecycle, history, path, and internal-result behavior without redefining the threshold.references/adr-template.mdsolely owns the persisted ADR schema and section semantics.11. Normalize workflow language and document format
context/sce/workflow-vocabulary.mdas the single authority for workflow terminology, lifecycle language, verbs, and document roles.The PR contains 12 commits implementing 11 tracked changes (T01–T11); the workflow-language and document-consistency work was completed in two commits. No temporary preparation scripts, workflow files, or generated config trees are included. The runtime-managed root
.opencode/tree is untouched.Measured reduction
For the first commit, the replaced workflow preambles shrink by 48.62–50.98% in UTF-8 bytes. The five
.pientrypoints contain 78 fewer Markdown lines; all fifteen tracked mirrors contain 234 fewer lines from that preamble change alone.For the third commit, the selected next-task entrypoint/execution/context-sync documents shrink by another 19 Markdown lines per tracked Pi/Claude/Codex target.
For the fifth commit,
task-execution.mdandcontext-sync.mdshrink by another 7 Markdown lines per tracked target, 21 lines across Pi/Claude/Codex.For the sixth commit,
plan-authoring.mdplusplan-template.mdshrink by another 16 Markdown lines per tracked target, 48 lines across Pi/Claude/Codex.For the seventh commit,
sce-commit/SKILL.mdplusreferences/atomic-commit.mdshrink by another 7 Markdown lines per tracked target, 21 lines across Pi/Claude/Codex.For the eighth commit,
references/validation.mdplusreferences/validation-report.mdshrink by another 6 Markdown lines per tracked target, 18 lines across Pi/Claude/Codex.For the ninth tracked change,
sce-handover/SKILL.mdplusreferences/handover-template.mdshrink by another 3 Markdown lines per tracked target, 9 lines across Pi/Claude/Codex.For the tenth tracked change, the selected decision skill/template and next-task context-sync documents shrink by another 13 Markdown lines per tracked target, 39 lines across Pi/Claude/Codex.
The eleventh tracked change standardizes terminology and document format; no additional size-reduction claim is made for it.
Verification
Passed in branch-only Nix verification environments:
pkl eval config/pkl/renderers/generation-contract-check.pkl.nix run .#pkl-check-generated.references/validation.mdwhilereferences/validation-report.mdonly renders established results.git diff --checkpassed.Preamble generation/measurement evidence: https://github.com/crocoder-dev/shared-context-engineering/actions/runs/34204063303
Preamble context/contract verification: https://github.com/crocoder-dev/shared-context-engineering/actions/runs/34204430298
Approval-gate implementation verification: https://github.com/crocoder-dev/shared-context-engineering/actions/runs/34206812301
Final approval-reference verification: https://github.com/crocoder-dev/shared-context-engineering/actions/runs/34207392059
Execution-handoff generation and ownership verification: https://github.com/crocoder-dev/shared-context-engineering/actions/runs/34209628861
Synchronization-debt recovery verification: https://github.com/crocoder-dev/shared-context-engineering/actions/runs/34213665376
Root-pass ownership verification: https://github.com/crocoder-dev/shared-context-engineering/actions/runs/34214976922
Plan-template ownership verification: https://github.com/crocoder-dev/shared-context-engineering/actions/runs/34216059288
Commit-bypass ownership verification: https://github.com/crocoder-dev/shared-context-engineering/actions/runs/34218845674
Validation-report ownership verification: https://github.com/crocoder-dev/shared-context-engineering/actions/runs/34221068225
Handover schema/completeness ownership verification: https://github.com/crocoder-dev/shared-context-engineering/actions/runs/34225274990
Textual and generation checks do not prove identical model behavior; no model-run or tokenizer-based savings claim is made.
Plan and scope
Plan:
context/plans/compress-workflow-execution-preamble.md. It records completed work items T01 through T11 for the eleven tracked changes above.Still out of scope: other workflow-duplication audit findings not represented by T01–T11.