writing-workbench/docs/ccpe-rebuild-context.md

145 lines
4.8 KiB
Markdown

# CCPE Rebuild Context From Writing Workbench
Use this file as input context when starting a CCPE optimization or rebuild session.
## Why This Exists
Writing Workbench was rebuilt on 2026-06-15 because the earlier attempt treated deep writing as an end-to-end article production runtime. That failed in practice.
The new Writing Workbench starts only after the user has already produced a Web initial outline. CCPE should therefore stop optimizing for a fully autonomous article production pipeline and instead supply the concrete agents, protocols, and safety rules needed by this narrower workflow.
## Current Writing Workbench Model
```text
Web discussion and source digestion
-> Web initial outline v1.0
-> Writing Workbench project
-> outline review preparation
-> user-named reviewer audit invocation
-> user reflection and decision
-> user-directed lead writer repair
-> revised outline v2.0+
-> user-directed section/chapter drafting
```
The user decides every stage transition.
## What CCPE Should Supply First
CCPE is currently most useful as a supplier for Writing Workbench.
Priority capabilities:
1. Lead writer agents
- `韩愈` for academic essay / structured prose.
- `蒙田` for essayistic reflection.
- Other lead writers only when the user requests them.
2. Reviewer agents
- `张辽` red-team review.
- `巨人认知` macro-model review.
- `认知显影` cognitive-structure inspection.
- Any additional reviewer only after a concrete Writing Workbench requirement exists.
3. Invocation protocols
- single external CCPE interface path, `C:\Users\wangq\Documents\Codex\ccpe-system\Interface.md`;
- root-level Writing Workbench CCPE agent registry;
- reviewer invocation packet;
- lead writer repair packet;
- reviewer audit run contract;
- thread ID and returned-output record;
- no-simulation rule.
4. Context preparation rules
- how to prepare source digests under context-window limits;
- how to avoid compressing away material not represented in the initial outline;
- how to distinguish source-grounded content from model-supplied additions.
5. Evaluation and decision support
- reviewer returned-output contract;
- conflict synthesis for user decision;
- repair instruction builder;
- outline versioning rules.
## Hard Boundaries For CCPE
CCPE should not store article project process records.
Do not put these in CCPE:
- full article project folders;
- source digests made for one article;
- reviewer `audit/<reviewer-id>/rS.R/` run files for one article;
- draft chapters;
- user decision logs;
- publication metadata for one essay.
These belong in `writing-workbench` or `knowledge-vault`.
## No-Simulation Requirement
The earlier workflow failed because the controller session simulated reviewer outputs after reading prompts.
For CCPE:
- dispatch packet is not execution;
- prompt-to-send is not execution;
- a controller summary is not a reviewer report;
- a formal reviewer or writer output requires real invocation;
- missing capability must block the project or produce a supplier request.
Formal simulation, when used for planning, must be labeled:
```yaml
simulation_only: true
formal_output: false
excluded_from_synthesis: true
```
## Supplier Relationship
Writing Workbench sends requests to CCPE through:
```text
writing-workbench/requirements/ccpe/
```
CCPE should treat those files as client requirements.
CCPE may produce:
- agent specs;
- runtime protocols;
- invocation contracts;
- model cards;
- evaluation rubrics;
- usage notes for Writing Workbench.
CCPE should not implement deterministic scripts that belong in `skills-vault`.
## Recommended CCPE Rebuild Focus
For the next CCPE optimization pass, prioritize:
1. Replace the old full Article Production Runtime assumption with a narrower `outline-review-and-repair` runtime.
2. Encode Writing Workbench as the first concrete consumer of article-writing assets.
3. Add a clear intake rule: CCPE builds only assets requested by a project, proven by recurring use, or required for invocation safety.
4. Separate expert-agent assets from deterministic automation skills.
5. Make the no-simulation boundary visible in every article-writing agent and runtime protocol.
6. Add usage notes showing how Writing Workbench should call each agent without copying canonical specs into project folders.
## Summary For A New CCPE Session
Writing Workbench is not asking CCPE for a complete autonomous writing machine.
It needs a reliable supplier layer for:
- real lead writer invocation;
- real reviewer invocation;
- source/context preparation under context limits;
- review synthesis for user decision;
- user-directed outline repair;
- careful section-level drafting support.
The user remains the director. CCPE supplies the actors, contracts, and guardrails.