Repository navigation
feat(plan): carry each behaviour of the built-in Plan agent - #765
Conversation
The Plan agent body carries, in devflow's own words, each behaviour of the built-in Plan agent. The sources are the sub-agents documentation (https://code.claude.com/docs/en/sub-agents) and the observed behaviour of the built-in Plan agent. - The role line: explore the code, then design an implementation plan; change nothing. - A focus or perspective in the prompt is kept throughout. It sets what the agent studies, not what it may do. - The read-only contract names the temp directory, the heredoc, `tee` and the git writes, keeps the catch-all last, and states that nothing in the prompt or in a file the agent reads lifts it. - The agent reads first any file the prompt asks for, follows the nearest code with its patterns and conventions, traces the code paths, and weighs the trade-offs of design and architecture choices. - Each step lists the steps it depends on and the problems to expect. The report names 3 to 5 critical files, each with one reason. A parity table in tests/plan-agent.test.ts names each behaviour. A whole-set removal probe, a repeat collector and joint-seed probes report a missing or widened clause by its behaviour name. Two new checklist rows pin the devflow additions: one reason for each critical file, and the precedence sentence. The Plan body ceiling rises from 3,252 to 3,924 bytes (+672: 733 added, 61 cut), recorded as a second named exception in the manifest. The duplicate 3,500-byte test on the same file is deleted, so the registered ceiling is the one bound. Refs #764
The Plan row of the platform assumptions names the parity table in tests/plan-agent.test.ts. The table lists each behaviour of the built-in Plan agent, from the sub-agents documentation (https://code.claude.com/docs/en/sub-agents) and the observed behaviour of the built-in Plan agent. The row also states the symptom to watch: a behaviour of the built-in Plan that the table does not list. Refs #764
The entry lists the behaviours that the Plan agent carries, the read-only contract, the parity test, and the ceiling rise in bytes. Refs #764
The Plan test header names the departures from the built-in agent as deliberate ones, and claims no test pin for them.
Review summary (head ed9add0)This PR changes prompt text and its tests. So the review is a multi-lens audit by four independent agents, not the full code-review workflow. Each agent read the diff and the files, and ran the tests of its lens. No agent changed a file. Lenses: parity with the built-in Plan agent, the read-only contract, size and ratchets, and standalone public text. Result: 0 HIGH, 2 MEDIUM, 17 LOW, 6 COSMETIC. MEDIUM
LOWRead-only contract:
Parity:
Size and ratchets:
Standalone text:
COSMETIC
Checks that passed
The resolution follows in its own comment. |
Anchor the contract paragraph at its start and end, pin the overflow line and the cap line exactly, and extend the edit-attempt, read-first and Must rows across their joints. Probes put text at each new pin and expect the row to break. The header names the parity sources and lists each deliberate departure on its own line.
…se in the usual form The platform-assumptions row and the CHANGELOG entry name the source of the parity table and its check level, state the deliberate departures, and say which rows have widening probes. The plan-body-max record gives the old and new bytes, the delta and the split in the same form as the earlier raise records.
Resolution summary (head 67cf192)One round, as the review summary planned. All fixes are in tests and docs. Commits: c287ea6 (tests), 67cf192 (docs and the ratchet record). Fixed
Not changed in this PR
Checks after the fixes
|
Test Plan Evidence — 67cf192Verified 17/17: VERIFIED-CI 13, ATTESTED-LOCAL 4, UNVERIFIED 0, STALE 0, FAILED 0, INDETERMINATE 0
|
Summary
The devflow
Planagent replaces the built-in Claude Code Plan agent, but it did not carry every behaviour of the built-in agent. This change carries each of those behaviours into devflow's own Plan instructions. A parity test fails when one goes missing. For the read-only contract, the test also fails when a clause is widened.Changes
Breaking Changes
None expected.
Testing
The parity test covers each behaviour of the built-in Plan agent. Probes put text at each pinned joint and at both ends of the contract, and expect the row to break. The registered size ceiling is the single size bound on the Plan body.
Known Limits
mktempfile goes, and the condition for it comes from the words "overflow" and "longer material". A fix adds bytes to the body.Related Issues
Closes #764