E2: add read-only planning provider and safe response contract - #32
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Two moderate issues remain regarding input field narrowing and initial revision validation.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds a bounded, read-only planning authoring boundary with escaped prompts, revision validation, and typed draft/suggestion responses.
Changes:
- Adds immutable request preparation and response validation.
- Updates draft and suggestion prompt instructions.
- Documents provider contracts and integration limitations.
- Adds focused contract and safety tests.
| File | Summary |
|---|---|
test/planning-author.test.ts |
Tests authoring contracts, escaping, bounds, and validation. |
prompts/plan-author.md |
Defines draft and suggestion output instructions. |
docs/implementation/planning-provider.md |
Documents provider contracts and integration boundaries. |
core/planning-author.ts |
Implements request construction and response validation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.

Adds bounded, single-pass prompt construction for drafting and independent typed suggestion cards. All source text stays escaped JSON; provider payloads include only explicit issue and stable identity fields. Replies must match captured issue/revision and every card must yield a valid plan.
Depends on merged E1 #30; ownership #29. Contract: docs/implementation/planning-provider.md. No CLI, shared store or UI changes. D5 supplies production invocation.
Validated head: fac848a, based on main 0d46518. Five targeted suites: 132 tests passed; typecheck passed after merging current main and before push. Fresh CI and review are pending. Earlier heads are intermediate checkpoints.
Review rounds: 1 fixed issue-data field narrowing and reproduced/fixed initial revision validation; 2 returned no inline findings with generic summary text reconciled in #29; 3 fixed extra identity properties and added a direct cyclic-input regression; 4 returned no findings and recommended approval. All threads resolved. The current head only merges reviewed E1/main history to remove stacked diff noise; self-review confirms the PR diff remains the four E2 files with no new implementation changes. No findings declined.
Review-lesson audit: issue-field narrowing is covered by prompts/plan-author.md four-field contract. Stable identity narrowing is a one-off implementation fix with regression coverage. Initial revision is a Store createPlan precondition. Cyclic input is covered by bounded traversal and regression. No duplicate AGENTS rule introduced. Live adapter and UI acceptance remain D/F/G work.