Repository navigation
Remove the dead prompt-synthesis path, and stop calling two corpora mirrors - #304
Merged
Merged
Conversation
…ora mirrors Two things found by reading the live run's log rather than the code. synthesize_prompt_with_flow_data loaded a PromptGenerator from scripts/architecture/03-execution-system/00-prompt-generation/prompt-generation-policy.py by dynamic import. That file was deleted on 2026-05-04 in 683c23a. The import is the function's first statement, so it has raised on every run since, and the ninety lines of flow-data assembly after it were unreachable for three months. They are removed rather than left reading as live code. The except-branch was not a fallback, it was a false report. It returned state[USER_MESSAGE] under the key synthesized_prompt, and flow_trace_converter writes that key to current-synthesis.txt and prints "Synthesis: Generated (N chars)". So the trace claimed a synthesis had been produced while writing out the raw task, unchanged. Returning empty lets the consumer's own `if synthesized_prompt:` guard skip the file, which is the honest outcome: nothing was synthesised, so nothing is reported as synthesised. The metadata names the commit that removed the generator, so the next reader does not have to bisect for it. The per-run stderr WARNING goes with it. It announced a permanent condition as though it were an incident, on every single run, and it was the only line in an otherwise clean log that looked like something had gone wrong today. CLAUDE.md called docs/policies/ a mirror of ~/.claude/policies/ and docs/standards/ a mirror of ~/.claude/rules/. Neither is true. The policy trees had drifted apart by 25 files: 18 names in the repository are absent from the machine, and 7 on the machine are in no repository at all -- several of them for plan-mode and skill-agent-selection, which v1.15.2 purged. They were never meant to match, which is the more useful correction. docs/policies/ is documentation of pipeline behaviour and nothing loads it; ~/.claude/policies/ is the runtime corpus get_policies_dir() reads, of which the standards selector consumes only the 02-standards-system/ tier and the language-mapped files. "Mirror" invited the assumption that editing one affected the other, which it never did in either direction. The note also records that the 7 machine-only files are unversioned. Verified on a live run: the WARNING is gone, no current-synthesis.txt is written, "Synthesis: Generated" no longer appears, and Step 1 still emits its 333,165-char prompt. 176 tests across every suite touching the orchestrator, synthesis or flow-trace, plus all six gates. One scare worth recording: the run immediately after this change hit the script's 300-second orchestration cap where earlier runs took 46 and 53 seconds. It was not this change. The 167.9-second gap was inside context_sync/session_loader, which this diff does not touch, scanning 684 MB across 47 session directories and 1,099 files accumulated by the day's test runs. A re-run finished in 99 seconds. The cap and the unbounded session history are a real pairing and will bite again, but they are not this commit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both found by reading the live run's log, not the code.
1. A function that has been dead for three months, and lied about it
synthesize_prompt_with_flow_dataloaded aPromptGeneratorby dynamic import from:That file was deleted on 2026-05-04 in
683c23a. The import is the function's first statement, so it has raised on every run since, and the ninety lines of flow-data assembly after it were unreachable the whole time. Removed rather than left reading as live code — 97 lines out, 31 in.The except-branch was not a fallback, it was a false report. It returned
state[USER_MESSAGE]under the keysynthesized_prompt, andflow_trace_converterwrites that key tocurrent-synthesis.txtand prints:So for three months the trace claimed a synthesis had been produced while writing out the raw task, unchanged. Returning empty lets the consumer's own
if synthesized_prompt:guard skip the file — nothing was synthesised, so nothing is reported as synthesised. The metadata names the commit that removed the generator, so the next reader does not have to bisect for it.The per-run stderr
[WARNING] Prompt synthesis failed:goes with it. It announced a permanent condition as though it were an incident, on every run — and it was the only line in an otherwise clean log that looked like something had gone wrong today.2.
docs/policies/was never a mirror of~/.claude/policies/CLAUDE.mdclaimed it was, and claimed the same fordocs/standards/↔~/.claude/rules/. Measured on 2026-08-08, the policy trees had drifted apart by 25 files:Several of the 7 are for
02-plan-mode/and05-skill-agent-selection/— features v1.15.2 purged.The more useful correction is that they were never meant to match.
docs/policies/is documentation of pipeline behaviour (quality-gate-policy.md,pr-code-review-policy.md) and nothing loads it.~/.claude/policies/is the runtime corpusget_policies_dir()reads, of which the standards selector consumes only the02-standards-system/tier and the language-mapped files."Mirror" invited the assumption that editing one affected the other, which it never did in either direction. The note also records that the 7 machine-only files are unversioned — if that machine is lost, so are they.
Verified on a live run
[WARNING] Prompt synthesis failed— goneSynthesis: Generated— gone, and nocurrent-synthesis.txtwrittenOne scare, recorded because it looked like a regression
The run immediately after this change hit the script's 300-second orchestration cap, where earlier runs took 46 s and 53 s. It was not this change: the 167.9-second gap was inside
context_sync/session_loader, which this diff does not touch, scanning 684 MB across 47 session directories and 1,099 files accumulated by the day's test runs. A re-run finished in 99 s.The 300 s cap and the unbounded session history are a real pairing and will bite again — but not in this commit.
🤖 Generated with Claude Code