-
Notifications
You must be signed in to change notification settings - Fork 17
refactor(implement): demand-load phase routing #114
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
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
431a5ec
refactor(workflows): support demand-loaded routing
adalton 993e2fa
refactor(implement): demand-load phase routing
adalton 2781421
fix(implement): route controller phases through dispatcher
adalton f662d4d
docs(workflows): clarify command-relative routing paths
adalton 465739a
docs(workflows): preserve override routing contract
adalton 56bd1af
fix(implement): tighten phase completion contracts
adalton 17f5256
fix(implement): preserve legacy phase exits
adalton 4fcfbbd
fix(implement): clarify override validation and dispatch guards
adalton e8ffcf1
fix(overrides): preserve legacy completion contracts
adalton 771d48d
fix(versioning): apply one release bump relative to main
adalton cec9369
docs(overrides): keep continuation guidance workflow neutral
adalton feab14e
fix(overrides): leave phase execution to the invoking router
adalton 3033cd7
Load phase override validation only when an override exists
adalton f5c67c6
Sync phase override compatibility checks
adalton a499dce
Map router-defined implement handoffs
adalton 2c2b3a7
Merge origin/main into implement routing
adalton 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
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
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,32 @@ | ||
| --- | ||
| name: completion | ||
| description: Recommend next steps after one attended implement phase. | ||
| --- | ||
|
|
||
| # Implement Phase Completion | ||
|
|
||
| After the completed `PHASE` reports its results, recommend the best next step | ||
| for the actual outcome, mention relevant alternatives briefly, and stop for the | ||
| user. | ||
|
|
||
| - **ingest:** Recommend `/plan` unless the story context has blocking gaps. If | ||
| the story is contradictory or incomplete, recommend clarification from the | ||
| story author before planning. | ||
| - **plan:** Recommend `/revise` for user-requested changes, or `/code` when the | ||
| user has already reviewed and accepted the plan. | ||
| - **revise:** Recommend `/code` when the user is satisfied, or another | ||
| `/revise` round when further changes remain. | ||
| - **code:** Recommend `/validate`. If implementation exposed a plan gap, note | ||
| the inline plan update or offer `/plan` when redesign requires user review. | ||
| - **validate:** Recommend `/publish` only when validation passed. When failures | ||
| remain, recommend fixing them and rerunning `/validate`; offer `/plan` for a | ||
| design concern or ambiguous acceptance criterion that requires re-scoping. | ||
| - **publish:** Recommend `/respond` when review comments arrive; otherwise the | ||
| workflow is complete for now. | ||
| - **respond:** Recommend `/validate` after code changes, another `/respond` | ||
| round while comments remain, or note completion when the PR is approved and | ||
| no work remains. | ||
|
|
||
| The user may start at `/code` with an existing plan or partial implementation, | ||
| and may skip `/publish` and `/respond` when working locally. Never auto-advance | ||
| between attended phases. |
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,48 @@ | ||
| --- | ||
| name: dispatch | ||
| description: Resolve and execute one explicitly requested implement phase. | ||
| --- | ||
|
|
||
| # Implement Phase Dispatch | ||
|
|
||
| Require `PHASE` to be one of `ingest`, `plan`, `revise`, `code`, `validate`, | ||
| `publish`, or `respond`. If it is missing or unsupported, report the valid | ||
| phases and stop before resolving a filename. | ||
|
|
||
| Before dispatching, initialize `COMPLETION_CONSUMED=false` and read the project's | ||
| `AGENTS.md` or `CLAUDE.md` only if neither is already in the session. For | ||
| `PHASE=ingest`, do not glob this workflow, load `guidelines.md` or `gh-stack`, or | ||
| call `GetDynamicTools`; these guards apply before loading either a built-in | ||
| phase or a project override. | ||
|
|
||
| Announce `Starting /{PHASE}.` and read and follow | ||
| `../../_shared/recipes/phase-override-resolution.md` with `WORKFLOW=implement` | ||
| and `PHASE_FILE={PHASE}.md`. Read and execute the resolved phase file, passing | ||
| through the command context unchanged. | ||
|
|
||
| The built-in fallback is the phase file beside this dispatcher. Follow the | ||
| phase through its reporting step. Normalize the recipe's supported exits to a | ||
| return to this dispatcher: an invoking-router return, a request for this | ||
| workflow's completion guide, or a return to this workflow's controller. Map | ||
| `COMPLETION_HANDOFF=router-defined` to the invoking-router return. This mapping | ||
| applies during override validation as well as execution. Normalize the handoff | ||
| without executing its destination and leave `COMPLETION_CONSUMED=false`. Then | ||
| read `completion.md` once and follow its guidance for `PHASE`; the dispatcher | ||
| is the only component that reads the completion guide. | ||
|
|
||
| Legacy completion instructions may say to follow `controller.md` only if it | ||
| is already in the session. After such a phase finishes its steps and report, | ||
| treat it as a supported return even when that condition skips reading the | ||
| controller. Preserve the loading condition; do not load the controller just to | ||
| complete the phase. | ||
|
|
||
| Controller-return normalization preserves the completion contract of existing | ||
| project overrides and remains supported. Prefer an invoking-router return for | ||
| new implement phases and overrides; legacy exits do not require migration. | ||
|
|
||
| If the recipe rejects an override, continue with its built-in fallback. Stop | ||
| without reading `completion.md` only if that fallback cannot be resolved, an | ||
| operational error prevents the phase from completing, or the executing phase | ||
| lacks supported completion behavior. Report the specific failure. A completed phase | ||
| report with a failing verdict, including `validate.md` reporting `FAIL`, is a | ||
| valid outcome: read `completion.md` so it can provide fix-and-rerun guidance. |
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
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.