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:

  1. The original requirement still exists and is not itself a duplicate
  2. The duplicate’s text matches the original
  3. Any trace links on the duplicate are re-pointed to the original first
  4. 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

ProjectDup ReqsDup Diagrams
se-naval-cms22 pairs
se-nuclear-rps11 pair
se-water-treatment-plant20
se-new-tyne-crossing-appraisal62 groups
se-automated-warehouse30
se-emergency-dispatch60
se-radiochem-lab50
se-autonomous-vehicle02 pairs
se-precision-ag-drone03 pairs
Total2514

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:

FileSizeContent
protocol-base.md23KBShared: environment, concepts, Phase 1-2, Phase 4-6, hard constraints
flow-a-scaffold.md8KBNew system scaffolding
flow-b-decompose.md10KBContinuing decomposition
flow-c-qc.md5KBQC review (full + interim)
flow-d-validate.md3KBValidation
flow-e-post-val.md2KBPost-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 typeBeforeAfterSavings
Decomposition (Flow B)51KB33KB35%
QC (Flow C)51KB28KB45%
Validation (Flow D)51KB26KB49%
Post-val QC (Flow E)51KB25KB51%
Scaffold (Flow A)51KB31KB39%

Phase 2 simplified from full selection logic to “Confirm Flow” — the dispatcher makes the selection, Claude verifies and adapts if needed.

Implications

  1. From session 273 onward, sessions use the split protocol with dispatcher orchestration.
  2. QC sessions will delete tagged duplicates automatically.
  3. Existing duplicates in completed systems can be cleaned up via /cleanup-confirm.
  4. Protocol version is now 7.0.

Version manifest

ComponentVersionNotes
Session protocol7.0Up from 6.7
ArchitectureSplit + orchestratorWas monolithic
Dispatcher+pre-flight querySelects flow before invoking Claude
Prompt size25-33KBWas 51KB
No-silent-overwrites+exceptionTagged duplicates deletable in QC
Flow C step 5+duplicate deletionReqs and diagrams
Flow E step 4a+duplicate deletionFinal gate before complete
Telegram bot+/cleanup, +/cleanup-confirmOperator-triggered cleanup
← all entries