Configuration control — protocol v7.0, dispatcher orchestration
Summary
Protocol upgrade from v6.7 to v7.0. Two major changes: duplicate removal in QC flows, and splitting the monolithic 51KB protocol into a base file + per-flow files with dispatcher orchestration.
Changes
1. No-silent-overwrites exception for tagged duplicates
Problem: The protocol tagged duplicates (duplicate-of-<ref>) during QC but never deleted them, due to the no-silent-overwrites hard constraint. 25 duplicate requirements and 14 duplicate diagrams accumulated across 7 projects, inflating counts and creating noise in reports.
Fix: Tagged duplicates MAY now be deleted during QC sessions (Flows C and E), provided:
- The original requirement still exists and is not itself a duplicate
- The duplicate’s text matches the original
- Any trace links on the duplicate are re-pointed to the original first
- The deletion is logged in the journal findings section
Duplicate diagrams (same subsystem name, multiple IDs) may also be deleted — keep the oldest, delete the rest.
2. Duplicate deletion in Flow C step 5
Problem: QC detected and tagged duplicates but left them in place. Future sessions had to check against them, and duplicate counts grew with each system.
Fix: Flow C step 5 (“Fix issues found”) now includes:
- Query requirements with
duplicate-of-*tags - Verify original exists, re-point trace links, delete duplicate
- Query diagrams grouped by name, delete extras keeping oldest
3. Duplicate deletion in Flow E step 4a
Same cleanup runs in post-validation QC before marking a system complete. No system should reach complete status with duplicates remaining.
4. Telegram cleanup commands
Problem: No way to clean up the 25+14 existing duplicates across completed systems without running a full QC session.
Fix: Two new bot commands:
/cleanup [project]— dry run listing duplicate requirements and diagrams with what would be deleted/cleanup-confirm <project>— executes deletions, verifying originals exist before removing duplicates
Current duplicate inventory
| Project | Dup Reqs | Dup Diagrams |
|---|---|---|
| se-naval-cms | 2 | 2 pairs |
| se-nuclear-rps | 1 | 1 pair |
| se-water-treatment-plant | 2 | 0 |
| se-new-tyne-crossing-appraisal | 6 | 2 groups |
| se-automated-warehouse | 3 | 0 |
| se-emergency-dispatch | 6 | 0 |
| se-radiochem-lab | 5 | 0 |
| se-autonomous-vehicle | 0 | 2 pairs |
| se-precision-ag-drone | 0 | 3 pairs |
| Total | 25 | 14 |
5. Protocol split and dispatcher orchestration
Problem: The monolithic session_protocol.md had grown to 51KB / 1,248 lines (~14,500 tokens). All five flows (A-E) were sent to Claude every session, even though only one runs. This wasted context and increased the risk of API failures on large prompts.
Fix: Split the protocol into 6 files:
| File | Size | Content |
|---|---|---|
protocol-base.md | 23KB | Shared: environment, concepts, Phase 1-2, Phase 4-6, hard constraints |
flow-a-scaffold.md | 8KB | New system scaffolding |
flow-b-decompose.md | 10KB | Continuing decomposition |
flow-c-qc.md | 5KB | QC review (full + interim) |
flow-d-validate.md | 3KB | Validation |
flow-e-post-val.md | 2KB | Post-validation QC |
The dispatcher now queries DECOMPOSITION_STATUS and CURRENT_SE_PROJECT before invoking Claude, selects the appropriate flow file, and assembles base + flow into a single prompt.
| Session type | Before | After | Savings |
|---|---|---|---|
| Decomposition (Flow B) | 51KB | 33KB | 35% |
| QC (Flow C) | 51KB | 28KB | 45% |
| Validation (Flow D) | 51KB | 26KB | 49% |
| Post-val QC (Flow E) | 51KB | 25KB | 51% |
| Scaffold (Flow A) | 51KB | 31KB | 39% |
Phase 2 simplified from full selection logic to “Confirm Flow” — the dispatcher makes the selection, Claude verifies and adapts if needed.
Implications
- From session 273 onward, sessions use the split protocol with dispatcher orchestration.
- QC sessions will delete tagged duplicates automatically.
- Existing duplicates in completed systems can be cleaned up via
/cleanup-confirm. - Protocol version is now 7.0.
Version manifest
| Component | Version | Notes |
|---|---|---|
| Session protocol | 7.0 | Up from 6.7 |
| Architecture | Split + orchestrator | Was monolithic |
| Dispatcher | +pre-flight query | Selects flow before invoking Claude |
| Prompt size | 25-33KB | Was 51KB |
| No-silent-overwrites | +exception | Tagged duplicates deletable in QC |
| Flow C step 5 | +duplicate deletion | Reqs and diagrams |
| Flow E step 4a | +duplicate deletion | Final gate before complete |
| Telegram bot | +/cleanup, +/cleanup-confirm | Operator-triggered cleanup |