knowledge-vault/skills/knowledge-processing/viewpoint-discussion-distil.../ccpe-sync-request-2026-06-0...

14 KiB

CCPE Sync Request: Whole-Source Gestalt Alignment

1. Background

Knowledge Vault discovered a structural weakness in the current viewpoint-discussion-distillation flow.

The previous flow was too chunk-first / worker-first:

source registration -> segmentation -> worker topic extraction -> synthesis -> routing

This works for loose, very long, multi-topic material, but it is risky for coherent discussion drafts under the high-context limit. Range workers see local evidence and can lose the global shape. The failure mode is that tools, layers, cases, action tracks, and model-upgrade relations get flattened into peer topics.

2. Required Runtime Change

Upgrade the Runtime to a 9-step operational flow by adding Step 0. Step 0 should be treated as a human-confirmed alignment loop, not as a one-shot summary:

0. Whole-Source Gestalt Alignment
1. Segmentation
2. Worker Topic Extraction
3. Topic Graph Synthesis
4. Human Structure Confirmation
5. Material Routing
6. Topic Docs / Material Extraction
7. Coverage / Distortion Audit
8. Downstream Task Routing

Knowledge Vault still needs source registration before this operational flow so it can create the workspace, source map, run notes, and invocation records. If CCPE keeps source registration inside the canonical Runtime, the practical order should be:

registration -> Step 0 whole-source gestalt -> segmentation -> worker passes

3. New Participant Needed

Add a canonical participant:

participant_id: whole-source-gestalt-reviewer
participant_type: high_context_participant
runtime: viewpoint-discussion-distillation
invocation_mode: real sub-session only
main_session_may_simulate: false

The main session must not perform this pass itself. It prepares the invocation packet, records the returned output, and uses it as orientation for downstream segmentation and worker extraction.

The participant output must be inspected by the user before it becomes a binding worker lens. If the user corrects the global structure, the Runtime should support another Step 0 pass or an explicit human-correction record before segmentation.

4. Output Contract

The participant output should include:

- participant identity and invocation metadata
- source document path and source version note
- coherence judgment: coherent / mixed / fragmented
- coherence rationale and split recommendation if mixed or fragmented
- recommended downstream mode: structure-first / macro-topic split / flat-discovery
- global topic portrait
- main structure or candidate layers
- core tensions and governing questions
- model-evolution line
- parent/child/tool/case/action-layer distinctions
- chunk-first distortion risks
- segmentation guidance for downstream workers
- worker lens recommendation: required / partial / omitted
- confidence notes and unresolved structure questions
- human confirmation status: pending / confirmed / needs revision / rejected

This output is not a final topic map, material routing log, or coverage audit. It is an upstream global orientation layer.

5. Worker Rule Change

Worker behavior depends on Step 0 coherence judgment.

For coherent sources, worker participants should no longer discover the global structure from zero. They should work under the confirmed global portrait.

They should:

- receive the accepted gestalt summary in their thread-start packet
- extract local evidence, refinements, contradictions, and exceptions
- explicitly mark any challenge to the global portrait
- cite local source ranges for every challenge

For fragmented sources, worker participants should remain minimally biased and continue flat topic discovery. For mixed sources, the Runtime should split macro-topics before worker extraction.

6. Topic Docs / Material Extraction Confirmation

Add a second human confirmation gate after Topic Docs / Material Extraction:

gate_id: topic_docs_human_confirmation
required_before:
  - coverage completion claims
  - downstream handoff
  - model mining
  - writing handoff
purpose:
  - confirm that extracted materials are useful enough for downstream automation
  - decide whether another extraction pass is needed
  - record user corrections before downstream work

For coherent sources where Step 0 is confirmed, this gate can replace the old topic-granularity pause. The user reviews the actual extracted content rather than only reviewing candidate topic labels.

7. Worker/Sub-Session Rule For Extraction

CCPE should make explicit that source analysis, splitting, routing, and material extraction should be performed by worker/sub-session participants when they require reading substantial source material.

Main session responsibilities:

- create invocation packets
- preserve run notes and source maps
- collect returned outputs
- integrate indexes
- perform bounded verification
- record human confirmations

Worker/sub-session responsibilities:

- full-source gestalt alignment
- source-range extraction
- topic-doc material extraction
- quote-level evidence pack generation
- local contradiction or distortion checks

8. Knowledge Vault Side Already Updated

Knowledge Vault updated these public capability files:

skills/context-management-policy.md
skills/knowledge-processing/viewpoint-discussion-distillation/runbook.md
skills/knowledge-processing/viewpoint-discussion-distillation/context-strategy.md
skills/knowledge-processing/viewpoint-discussion-distillation/invocation-contract.md
skills/knowledge-processing/viewpoint-discussion-distillation/participant-registry.md
skills/knowledge-processing/viewpoint-discussion-distillation/ccpe-runtime-alignment.md

CCPE should synchronize the canonical Runtime, participant registry, and any agent/skill specs needed to make whole-source-gestalt-reviewer invocable as a real participant.

9. 2026-06-07 Addendum: Strict Invocation Boundary

The second test round showed that good analysis output can still fail to invoke the mechanism. CCPE should treat strict invocation as the default formal rule:

strict_invocation_required:
  applies_to: production, tests, audits, downstream handoffs
  requires: every substantive stage has a real participant / Skill execution record

Additional sync requirements:

- define invocation carrier metadata: codex_thread_participant, agent_subsession_participant, local_skill_execution, external_manual_participant, main_session_synthesis
- require persistent carrier for Step 0 when human correction may be needed
- treat one-shot Step 0 agent output as useful reference analysis but not as a valid formal persistent-alignment record
- add or define `topic-graph-synthesizer` as the synthesis boundary between topic discovery and evidence routing
- require evidence-routing-and-topic-doc-builder worker/sub-session execution for formal runs
- require material-unit extraction records before Topic Docs Human Confirmation / Gate 6
- define simulation-only material as explicitly excluded from formal synthesis

The third test should not know the first two rounds as production context. It should start from the source document and the updated mechanism rules.

10. CCPE Implementation Checklist

CCPE should update canonical artifacts before the next formal run. Knowledge Vault-side temporary rules are not enough.

10.1 Canonical Artifacts To Update Or Create

update:
  - runtimes/hybrid/viewpoint-discussion-distillation.runtime.md
  - runtimes/hybrid/agent-invocation-packet.protocol.md
  - agents/agent-specs/topic-discovery-router.agent.md
  - skills/workflow/conversation-segmentation.skill.md
  - skills/workflow/evidence-routing-and-topic-doc-builder.skill.md
  - agents/agent-specs/lossless-coverage-auditor.agent.md

create:
  - agents/agent-specs/whole-source-gestalt-reviewer.agent.md
  - agents/agent-specs/topic-graph-synthesizer.agent.md

If CCPE prefers topic-graph-synthesizer as a Runtime node rather than a standalone Agent, the Runtime must still expose it as a formal participant boundary with its own input, output, and acceptance contract.

10.2 Required Runtime Updates

viewpoint-discussion-distillation.runtime.md should encode the formal flow:

registration -> Step 0 whole-source gestalt -> Gate 0 human confirmation
-> segmentation -> topic discovery workers -> topic graph synthesizer
-> structure confirmation -> evidence routing / topic docs / material extraction workers
-> Gate 6 topic docs and extraction usefulness confirmation
-> coverage / distortion audit -> downstream routing

Hard runtime rules:

- main session is orchestrator, not a substitute participant
- every substantive stage must have a real participant / Skill execution record
- if a participant cannot be truly invoked, stop with blocked_waiting_for_participant_output
- simulation-only material is excluded from formal synthesis
- prompt summaries or role approximations are not Skill execution
- full source is sent only to the designated high-context participant, not absorbed by the orchestrator

10.3 Required Invocation Protocol Updates

agent-invocation-packet.protocol.md should add carrier metadata:

carrier_type: codex_thread_participant / agent_subsession_participant / local_skill_execution / external_manual_participant / main_session_synthesis
thread_id:
agent_id:
persistent_required:
resume_or_followup_method:
execution_status: prepared / sent / returned / blocked
strict_invocation_required: true
simulation_only: false

Protocol acceptance rule:

- packet-only is not execution
- prompt-to-send-only is not execution
- canonical artifact path reference is not enough unless the participant can read it and the record proves it did
- local Skill execution requires canonical Skill path, version, procedure steps, files read, files written, and validation checks
- participant output requires returned-output.md with carrier metadata

10.4 New whole-source-gestalt-reviewer Agent

The new Agent should be a high-context participant with:

primary_role: whole-source structural alignment before segmentation
must_read: full source when within high-context limit
must_not_do:
  - source block segmentation
  - final topic map
  - evidence routing
  - topic docs
  - material extraction
  - coverage audit
required_output:
  - coherence judgment
  - downstream mode
  - global topic portrait
  - candidate layers
  - core tensions
  - model-evolution line
  - parent/child/tool/case/action-layer distinctions
  - chunk-first distortion risks
  - segmentation guidance
  - unresolved questions
  - human confirmation status
continuity:
  - persistent Thread is default
  - one-shot Agent is invalid for formal Step 0 if user correction may be needed and the carrier cannot be resumed

10.5 New topic-graph-synthesizer Boundary

This participant should receive:

- user-confirmed Step 0 lens
- topic-discovery worker returns
- local exceptions and challenges
- user corrections, if any

It should output:

- topic hierarchy / graph
- parent-child and tool-layer distinctions
- unresolved hierarchy risks
- evidence references to worker returns
- no new source interpretation unless invoked as a real participant with source access

Main-session synthesis is allowed only as mechanical integration over returned outputs and must be labeled as integration, not participant judgment.

10.6 Existing Agent / Skill Updates

topic-discovery-router.agent.md:

- in coherent mode, receive confirmed Step 0 lens
- extract local evidence, refinements, contradictions, and exceptions
- do not rediscover the whole structure from zero
- explicitly mark challenges to the Step 0 lens with source ranges

conversation-segmentation.skill.md:

- segmentation remains non-interpretive
- if Step 0 exists, include lens id / path in worker packets but do not classify topics
- require Skill execution record when run locally

evidence-routing-and-topic-doc-builder.skill.md:

- source-heavy routing and material-unit extraction must run as worker/sub-session work
- topic docs must be built from confirmed topic graph and assigned source ranges
- every topic doc must separate source material layer from structured interpretation
- every material unit must carry source block ids
- main session may integrate returned outputs only

lossless-coverage-auditor.agent.md:

- audit must check invocation validity as well as source coverage
- flag any formal output produced by main-session simulation
- flag missing carrier metadata or missing Skill execution records
- coverage success cannot be claimed when required participant outputs are missing

10.7 Regression Tests CCPE Should Run

CCPE should add or run regression checks for:

1. Orchestrator tries to write topic docs directly.
   expected: blocked, simulation-only, or rejected from formal synthesis.

2. Step 0 is run by a one-shot agent, then user corrects the structure.
   expected: invalid formal Step 0 unless same carrier can continue.

3. Topic-discovery workers ignore confirmed Step 0 and rediscover flat peer topics.
   expected: audit flags hierarchy drift.

4. Evidence-routing-and-topic-doc-builder output lacks source material layer or source block ids.
   expected: rejected.

5. Lossless coverage audit sees a polished topic package but no returned-output / skill-execution-record.
   expected: invocation validity failure.

10.8 Known Failure Pattern To Prevent

This request is partly motivated by an earlier cross-workbench failure mode:

failure_pattern:
  - main session claims to call an expert Agent / Skill
  - main session has not fully read or executed the canonical prompt
  - output is produced from polluted surrounding context and role approximation
  - result looks plausible but is not a CCPE participant output

CCPE should make this impossible at the protocol level. If the canonical participant is not truly invoked, the only valid formal state is:

blocked_waiting_for_participant_output