feat(ce-ideate): mode-aware v2 ideation (#588)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -164,7 +164,14 @@ Signals that justify artifact-backed mode:
|
||||
|
||||
If artifact-backed mode is not clearly warranted, stay in direct mode.
|
||||
|
||||
Artifact-backed mode uses a per-run scratch directory under `.context/compound-engineering/ce-plan/deepen/`.
|
||||
Artifact-backed mode uses a per-run OS-temp scratch directory. Create it once before dispatching sub-agents and capture its **absolute path** — pass that absolute path to each sub-agent so they write to it directly. Do not use `.context/`; the artifacts are per-run throwaway that are cleaned up when deepening ends (see 5.3.6b), matching the repo Scratch Space convention for one-shot artifacts. Do not pass unresolved shell-variable strings to sub-agents; they need the resolved absolute path.
|
||||
|
||||
```bash
|
||||
SCRATCH_DIR="$(mktemp -d -t ce-plan-deepen-XXXXXX)"
|
||||
echo "$SCRATCH_DIR"
|
||||
```
|
||||
|
||||
Refer to the echoed absolute path as `<scratch-dir>` throughout the rest of this workflow.
|
||||
|
||||
## 5.3.6 Run Targeted Research
|
||||
|
||||
@@ -176,7 +183,7 @@ If a selected section can be improved by reading the origin document more carefu
|
||||
|
||||
**Direct mode:** Have each selected agent return its findings directly to the parent. Keep the return payload focused: strongest findings only, the evidence or sources that matter, the concrete planning improvement implied by the finding.
|
||||
|
||||
**Artifact-backed mode:** For each selected agent, instruct it to write one compact artifact file in the scratch directory and return only a short completion summary. Each artifact should contain: target section, why selected, 3-7 findings, source-backed rationale, the specific plan change implied by each finding. No implementation code, no shell commands.
|
||||
**Artifact-backed mode:** For each selected agent, pass the absolute `<scratch-dir>` path captured earlier and instruct the agent to write one compact artifact file inside that directory, then return only a short completion summary. Each artifact should contain: target section, why selected, 3-7 findings, source-backed rationale, the specific plan change implied by each finding. No implementation code, no shell commands.
|
||||
|
||||
If an artifact is missing or clearly malformed, re-run that agent or fall back to direct-mode reasoning for that section.
|
||||
|
||||
@@ -204,7 +211,7 @@ When presenting findings from multiple agents targeting the same section, presen
|
||||
|
||||
After all agents have been reviewed, carry only the accepted findings forward to 5.3.7.
|
||||
|
||||
If the user accepted no findings, report "No findings accepted — plan unchanged." If artifact-backed mode was used, clean up the scratch directory before continuing. Then proceed directly to Phase 5.4 (skip document-review and synthesis — the plan was not modified). This interactive-mode-only skip does not apply in auto mode; auto mode always proceeds through 5.3.7 and 5.3.8.
|
||||
If the user accepted no findings, report "No findings accepted — plan unchanged." Then proceed directly to Phase 5.4 (skip document-review and synthesis — the plan was not modified). This interactive-mode-only skip does not apply in auto mode; auto mode always proceeds through 5.3.7 and 5.3.8. No explicit scratch cleanup needed — `$SCRATCH_DIR` is OS temp and will be cleaned up by the OS; leaving it in place preserves the rejected agent artifacts for debugging.
|
||||
|
||||
If findings were accepted and the plan was modified, proceed through 5.3.7 and 5.3.8 as normal — document-review acts as a quality gate on the changes.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user