Skip to content

Commit 9c73510

Browse files
authored
Merge pull request #103 from dmoliveira/my_opencode-e22-autoflow-adapter
Implement E22-T2 autoflow orchestration adapter
2 parents 963d747 + c824f5b commit 9c73510

File tree

5 files changed

+510
-4
lines changed

5 files changed

+510
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ All notable changes to this project are documented in this file.
7070
- Added `scripts/budget_command.py` with `/budget status|profile|override|doctor` controls for execution budget visibility and tuning.
7171
- Added `/budget`, `/budget-status`, `/budget-profile`, `/budget-override`, and `/budget-doctor-json` aliases in `opencode.json`.
7272
- Added `instructions/autoflow_command_contract.md` defining Epic 22 Task 22.1 `/autoflow` subcommands, validation/error contract, output schema modes, lifecycle states, and safety defaults.
73+
- Added `scripts/autoflow_adapter.py` implementing Epic 22 Task 22.2 primitive composition and deterministic transition/explain logic for unified orchestration.
7374

7475
### Changes
7576
- Documented extension evaluation outcomes and when each tool is the better fit.
@@ -136,6 +137,7 @@ All notable changes to this project are documented in this file.
136137
- Expanded budget verification coverage for invalid override input handling and usage guidance in selftest.
137138
- Marked Epic 20 Task 20.4 complete and promoted Epic 20 status to done in the roadmap.
138139
- Marked Epic 22 as in progress and completed Task 22.1 contract definition notes in the roadmap.
140+
- Expanded selftest coverage with `/autoflow` adapter status and explain-path checks for illegal transitions and resume-gating fallback reason codes.
139141

140142
## v0.2.0 - 2026-02-12
141143

IMPLEMENTATION_ROADMAP.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -787,10 +787,11 @@ Every command-oriented epic must ship all of the following:
787787
- [x] Subtask 22.1.2: Define input plan requirements and validation errors
788788
- [x] Subtask 22.1.3: Define output format for concise and verbose modes
789789
- [x] Notes: Added `instructions/autoflow_command_contract.md` defining `/autoflow` subcommands, deterministic validation/error shape, concise-vs-JSON output schema, lifecycle status model, and safety defaults for Task 22.2 implementation.
790-
- [ ] Task 22.2: Implement orchestration adapter layer
791-
- [ ] Subtask 22.2.1: Compose existing plan, todo, budget, checkpoint, and loop primitives
792-
- [ ] Subtask 22.2.2: Add deterministic state machine transitions
793-
- [ ] Subtask 22.2.3: Add explain mode showing decisions and fallbacks
790+
- [x] Task 22.2: Implement orchestration adapter layer
791+
- [x] Subtask 22.2.1: Compose existing plan, todo, budget, checkpoint, and loop primitives
792+
- [x] Subtask 22.2.2: Add deterministic state machine transitions
793+
- [x] Subtask 22.2.3: Add explain mode showing decisions and fallbacks
794+
- [x] Notes: Added `scripts/autoflow_adapter.py` to compose runtime primitives (`plan`, `todo`, `budget`, `checkpoint`, `resume`, `loop_guard`) and resolve deterministic intent transitions with explain traces and fallback reason codes.
794795
- [ ] Task 22.3: Add safety and usability controls
795796
- [ ] Subtask 22.3.1: Add `dry-run` to preview actions without mutating state
796797
- [ ] Subtask 22.3.2: Add explicit kill-switch behavior for unsafe or runaway states

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,13 @@ Current baseline includes:
177177
- concise human output plus structured `--json` schema for automation
178178
- lifecycle status model and safety defaults for dry-run, stop, and recovery gating
179179

180+
Task 22.2 adapter baseline:
181+
182+
- adapter module: `scripts/autoflow_adapter.py`
183+
- primitive composition: `plan`, `todo_compliance`, `budget`, `checkpoint`, `resume`, and `loop_guard`
184+
- deterministic transition matrix for `start|status|resume|stop|report|dry-run`
185+
- explain path that returns trace entries plus fallback intent/reason when transitions are illegal or resume gating fails
186+
180187
## Installed plugin stack 🔌
181188

182189
- `@mohak34/opencode-notifier@latest` - desktop and sound alerts for completion, errors, and permission prompts.
@@ -1159,6 +1166,7 @@ For your LangGraph setup, default endpoint target is `http://localhost:3000/open
11591166
- `scripts/stack_profile_command.py` - backend script for `/stack`
11601167
- `scripts/browser_command.py` - backend script for `/browser`
11611168
- `scripts/start_work_command.py` - backend script for `/start-work`
1169+
- `scripts/autoflow_adapter.py` - orchestration adapter for `/autoflow` transition and explain planning
11621170
- `scripts/budget_command.py` - backend script for `/budget`
11631171
- `scripts/todo_command.py` - backend script for `/todo`
11641172
- `scripts/resume_command.py` - backend script for `/resume`

0 commit comments

Comments
 (0)