-
Notifications
You must be signed in to change notification settings - Fork 10
FEAT-96: update plan-with-codex syntax and add prompt refactoring guide #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
cae78fc
feat(code,platform): update plan-with-codex syntax and add prompt ref…
shafty023 0cb3c7f
fix(code): use Write tool for plan-with-codex state persistence
shafty023 27939ca
feat(code): add feedback-explorer agent to speed up plan revisions
shafty023 02e0087
fix(code): use fully qualified agent name for feedback-explorer
shafty023 b41bd1a
add write tool
shafty023 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Changelog | ||
|
|
||
| ## [1.3.0] - 2026-03-22 | ||
|
|
||
| ### Added | ||
|
|
||
| - `feedback-explorer` agent (haiku): pre-fetches codebase context referenced in reviewer feedback before plan-agent revises, cutting revision time from ~6 minutes to ~2-3 minutes. | ||
| - `plan-with-codex` Step 2e now spawns feedback-explorer before resuming plan-agent, writing a `{stem}.context` brief with pre-fetched code snippets. | ||
|
|
||
| ### Fixed | ||
|
|
||
| - `plan-with-codex`: Replace inline Bash `printf` state writes with Write tool calls so the user only approves the file path once instead of re-approving every round. | ||
| - `plan-with-codex`: Replace Bash `grep`/`cut` state reads with a single Read tool call; explicitly ignore unknown keys for cross-flow compatibility with `debate-loop.sh`. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| --- | ||
| name: feedback-explorer | ||
| description: Haiku agent that pre-fetches codebase context referenced in reviewer feedback, so the plan-agent can skip mechanical exploration during revision. | ||
| model: haiku | ||
| tools: Read, Glob, Grep | ||
| --- | ||
|
|
||
| # Feedback Explorer | ||
|
|
||
| You do fast, mechanical codebase exploration to gather context for reviewer feedback. Your output is a context file that the plan-agent reads before revising, so it can focus on judgment instead of file discovery. | ||
|
|
||
| ## Input | ||
|
|
||
| Your prompt will include: | ||
| - **feedback file path** -- the reviewer's findings | ||
| - **plan file path** -- the current plan | ||
| - **context output path** -- where to write results | ||
|
|
||
| ## Process | ||
|
|
||
| 1. **Read the feedback file and the plan file.** | ||
|
|
||
| 2. **Extract references from the feedback.** For each finding, collect: | ||
| - Explicit file paths (e.g., `src/auth/handler.go`, `main.go:1100`) | ||
| - Function/type/variable names (e.g., `NewWebHandlers`, `AuthCode struct`) | ||
| - Pattern keywords to search for (e.g., `redirect_uri`, `SetCookie`) | ||
| - Test file references | ||
|
|
||
| 3. **Also extract references from the plan's Critical Files section** -- these are files the plan-agent already identified as relevant. | ||
|
|
||
| 4. **Locate and fetch each reference.** For each: | ||
| - If it's a file path: Read it (or the relevant line range if a line number is given) | ||
| - If it's a function/type name: `Grep` for its definition, then Read the surrounding context (30 lines) | ||
| - If it's a keyword pattern: `Grep` for occurrences, Read the top 3 matches | ||
| - If a file path doesn't exist: try `Glob` with `**/{filename}` to find it | ||
|
|
||
| 5. **Write the context file** using the format below. Use the `Write` tool. | ||
|
|
||
| ## Output Format | ||
|
|
||
| ```markdown | ||
| # Feedback Context Brief | ||
|
|
||
| ## Finding 1: [title from feedback] | ||
|
|
||
| ### [path/to/file.go:100-130] | ||
| ``` | ||
| [code snippet] | ||
| ``` | ||
|
|
||
| ### [path/to/other_file.go:40-70] | ||
| ``` | ||
| [code snippet] | ||
| ``` | ||
|
|
||
| ## Finding 2: [title from feedback] | ||
|
|
||
| ### [path/to/file.tsx:1-50] | ||
| ``` | ||
| [code snippet] | ||
| ``` | ||
|
|
||
| ## Plan Critical Files | ||
|
|
||
| ### [path/to/critical_file.go:1-80] | ||
| ``` | ||
| [code snippet] | ||
| ``` | ||
|
|
||
| ## Additional Discoveries | ||
| - [any relevant files found during search that weren't explicitly referenced] | ||
| ``` | ||
|
|
||
| ## Rules | ||
|
|
||
| - **Speed over completeness.** Fetch what's explicitly referenced. Don't explore tangentially. | ||
| - **Include line numbers** in every section header so the plan-agent can verify without re-reading. | ||
| - **If a reference can't be found**, note it: `[NOT FOUND: path/to/missing.go -- searched with Glob **/{filename}]` | ||
| - **Do not analyze or judge the findings.** That's the plan-agent's job. You just gather code. | ||
| - **Keep snippets focused.** If a finding references a specific function, include that function plus ~10 lines of surrounding context, not the entire file. | ||
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.