owflow 0.4.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/agents/implementation-planner.md +1 -1
- package/dist/agents/specification-creator.md +1 -1
- package/dist/commands/work.md +3 -3
- package/dist/skills/codebase-analyzer/SKILL.md +4 -4
- package/dist/skills/dev-verify/SKILL.md +3 -10
- package/dist/skills/diagrams-mermaid/references/reference.md +4 -4
- package/dist/skills/goal-migration/SKILL.md +114 -0
- package/dist/skills/migration/SKILL.md +157 -296
- package/dist/skills/migration-analyze/SKILL.md +126 -0
- package/dist/skills/migration-finalize/SKILL.md +161 -0
- package/dist/skills/migration-fix/SKILL.md +155 -0
- package/dist/skills/migration-implement/SKILL.md +131 -0
- package/dist/skills/migration-plan/SKILL.md +131 -0
- package/dist/skills/migration-spec/SKILL.md +135 -0
- package/dist/skills/{migration → migration-spec}/references/migration-strategies.md +9 -9
- package/dist/skills/migration-target/SKILL.md +134 -0
- package/dist/skills/{migration → migration-target}/references/migration-types.md +22 -23
- package/dist/skills/migration-verify/SKILL.md +184 -0
- package/dist/skills/orchestrator-framework/references/dispatcher-handoff.md +1 -1
- package/dist/skills/orchestrator-framework/references/fix-loop-contract.md +65 -0
- package/dist/skills/orchestrator-framework/references/gate-contract.md +7 -2
- package/dist/skills/orchestrator-framework/references/orchestrator-patterns.md +4 -1
- package/dist/templates/orchestrator-state-migration.yml +49 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -146,6 +146,10 @@ Use `/owflow:work` as a single entry point — it classifies the task with the `
|
|
|
146
146
|
| `/owflow:research-quick "<description>"` | Condensed research: brief → plan → gather → synthesis in one pass |
|
|
147
147
|
| `/owflow:research-fork <task-path> ["<what this fork should explore>"]` | Branch a research task and re-run from the fork point with different choices |
|
|
148
148
|
|
|
149
|
+
### Migration Subskills
|
|
150
|
+
|
|
151
|
+
Migration runs as a pipeline of eight standalone subskills — `/owflow:migration-analyze`, `/owflow:migration-target`, `/owflow:migration-spec`, `/owflow:migration-plan`, `/owflow:migration-implement`, `/owflow:migration-verify`, `/owflow:migration-fix`, `/owflow:migration-finalize` — with `/owflow:migration` as the dispatcher and `/owflow:goal-migration` running the whole pipeline in one session. Flags: `--from=<slug>`, `--type=code|data|architecture|general`, `--no-web-research`.
|
|
152
|
+
|
|
149
153
|
### Quick Commands
|
|
150
154
|
|
|
151
155
|
For smaller tasks that don't need a full workflow:
|
package/dist/commands/work.md
CHANGED
|
@@ -146,8 +146,8 @@ Use Skill tool:
|
|
|
146
146
|
Examples:
|
|
147
147
|
|
|
148
148
|
- Resume development: `skill: "owflow:development"` with `args: "--resume .owflow/tasks/development/2025-10-23-fix"`
|
|
149
|
-
- Restart from step: `skill: "owflow:development"` with `args: "--resume .owflow/tasks/development/2025-10-26-auth --from=verification-done"` (
|
|
150
|
-
- Fresh attempts: `skill: "owflow:
|
|
149
|
+
- Restart from step: `skill: "owflow:development"` with `args: "--resume .owflow/tasks/development/2025-10-26-auth --from=verification-done"` (development, research, and migration tasks use descriptive step slugs in `completed_phases`; performance is the remaining `phase-N` holdout)
|
|
150
|
+
- Fresh attempts: `skill: "owflow:development"` with `args: "--resume .owflow/tasks/development/2025-10-23-fix --reset-attempts"`
|
|
151
151
|
|
|
152
152
|
### Step 3: Classify & Route New Task
|
|
153
153
|
|
|
@@ -237,7 +237,7 @@ Display:
|
|
|
237
237
|
| ------------- | ------------- | --------------------------------------------------- |
|
|
238
238
|
| development | `development` | `--resume [path] [--from=<slug>] [--reset-attempts]` |
|
|
239
239
|
| performance | `performance` | `--resume [path] [--from=PHASE]` |
|
|
240
|
-
| migration | `migration` | `--resume [path] [--from
|
|
240
|
+
| migration | `migration` | `--resume [path] [--from=<slug>]` |
|
|
241
241
|
| research | `research` | `--resume [path] [--from=<slug>]` |
|
|
242
242
|
|
|
243
243
|
---
|
|
@@ -155,8 +155,8 @@ risk_level: low|low-medium|medium|medium-high|high
|
|
|
155
155
|
|
|
156
156
|
## Integration
|
|
157
157
|
|
|
158
|
-
| Orchestrator |
|
|
158
|
+
| Orchestrator | Step (slug) | artifact_name |
|
|
159
159
|
|-------------|-------|---------------|
|
|
160
|
-
| development orchestrator |
|
|
161
|
-
| migration
|
|
162
|
-
| performance orchestrator |
|
|
160
|
+
| development orchestrator | `codebase-analysed` | `codebase-analysis.md` (default) |
|
|
161
|
+
| migration-analyze | `state-analysed` | `current-state-analysis.md` |
|
|
162
|
+
| performance orchestrator | `phase-1` | `codebase-analysis.md` (default) |
|
|
@@ -43,7 +43,7 @@ Resolve the `task-path-or-identifier` argument BEFORE anything else (see [Gate C
|
|
|
43
43
|
|
|
44
44
|
## Execute
|
|
45
45
|
|
|
46
|
-
**Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md) and [Issue Resolution](../orchestrator-framework/references/orchestrator-patterns.md) (Section 6).
|
|
46
|
+
**Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md), the [Fix Loop Contract](../orchestrator-framework/references/fix-loop-contract.md), and [Issue Resolution](../orchestrator-framework/references/orchestrator-patterns.md) (Section 6).
|
|
47
47
|
|
|
48
48
|
### Verification Options Prompt (`options-chosen`, inline)
|
|
49
49
|
|
|
@@ -94,14 +94,7 @@ Verification Results:
|
|
|
94
94
|
|
|
95
95
|
**Step 3**: Gate on status — `passed` → skip to State Update. `passed_with_issues` or `failed` → fix loop (Step 4).
|
|
96
96
|
|
|
97
|
-
**Step 4**: User-driven fix loop (max 3 iterations):
|
|
98
|
-
|
|
99
|
-
1. Present critical + warning issues as a numbered list.
|
|
100
|
-
2. `question` — "Which issues should I fix?" Options: "Fix all fixable issues" / "Let me choose specific issues" / "Skip fixes, proceed as-is".
|
|
101
|
-
3. Fix selected issues; **immediately** log each to `verification_context.fixes_applied` in state (not deferred to the end).
|
|
102
|
-
4. After fixes: set `skip_test_suite: false` (code changed, tests must re-run).
|
|
103
|
-
5. `question` — "Re-run verification to check fixes?" → re-invoke `implementation-verifier` → back to Step 2, or "No, proceed to next phase".
|
|
104
|
-
6. **Immediately** update `verification_context.reverify_count` and `verification_context.last_status` in state after each verifier run.
|
|
97
|
+
**Step 4**: User-driven fix loop (max 3 iterations) — follow the [Fix Loop Contract](../orchestrator-framework/references/fix-loop-contract.md): the three-option question wording, immediate `fixes_applied` writes, `skip_test_suite: false` after fixes, re-invoking `implementation-verifier` on request, and refreshing `reverify_count` / `last_status` / `issues_found` right after each verifier run.
|
|
105
98
|
|
|
106
99
|
**Exit conditions**: no critical issues remain → proceed; user explicitly chooses to proceed with issues → proceed with issues logged; max 3 iterations → `question` "Proceed with known issues?" / "Stop workflow". **MUST NOT proceed with unresolved critical issues unless the user explicitly approves.**
|
|
107
100
|
|
|
@@ -111,7 +104,7 @@ Apply after EVERY phase/step above:
|
|
|
111
104
|
|
|
112
105
|
1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed plus that step's fields. Never defer writes to the end of the skill.
|
|
113
106
|
2. **Options prompt** — append `options-chosen` to `completed_phases` with the chosen `options.*` and `skip_test_suite` (written right after the options prompt, before verification starts).
|
|
114
|
-
3. **Per verifier run** — update `verification_context.last_status`, `issues_found`, `fixes_applied`, and `reverify_count` immediately after each `implementation-verifier` run and after each fix-loop iteration (per
|
|
107
|
+
3. **Per verifier run** — update `verification_context.last_status`, `issues_found`, `fixes_applied`, and `reverify_count` immediately after each `implementation-verifier` run and after each fix-loop iteration (per the [Fix Loop Contract](../orchestrator-framework/references/fix-loop-contract.md)'s immediate-write cadence), so an interruption loses nothing.
|
|
115
108
|
4. **Completion** — append `verification-done` to `completed_phases` only at skill exit: status `passed`, or user-approved proceed with issues logged. Bump `orchestrator.updated` on every write.
|
|
116
109
|
5. **Failures** — if `implementation-verifier` itself fails or the workflow stops with unresolved critical issues, do NOT append `verification-done` to `completed_phases`; append it to `orchestrator.failed_phases` and increment `auto_fix_attempts["verification-done"]`.
|
|
117
110
|
6. **Validate** — after every write, re-read the file to confirm values, then run the `verify_template` tool with `filePath: <task-path>/orchestrator-state.yml`, `templateName: orchestrator-state-development.yml`. Fix any reported issue immediately before proceeding.
|
|
@@ -138,10 +138,10 @@ Better:
|
|
|
138
138
|
|
|
139
139
|
Integrated into:
|
|
140
140
|
- `src/skills/flow-init/SKILL.md` - Phase 6 (architecture and tech-stack doc refinement)
|
|
141
|
-
- `src/skills/
|
|
142
|
-
- `src/skills/research/SKILL.md` -
|
|
143
|
-
- `src/skills/performance/SKILL.md` -
|
|
144
|
-
- `src/skills/migration/SKILL.md` -
|
|
141
|
+
- `src/skills/dev-spec/SKILL.md` - `spec-written` (spec refinement); `src/skills/dev-plan/SKILL.md` - `plan-created` (plan refinement)
|
|
142
|
+
- `src/skills/research-design/SKILL.md` - `design-generated` (high-level design refinement)
|
|
143
|
+
- `src/skills/performance/SKILL.md` - `phase-3` (spec refinement), `phase-5` (plan refinement)
|
|
144
|
+
- `src/skills/migration-spec/SKILL.md` - `strategy-specified` (spec refinement); `src/skills/migration-plan/SKILL.md` - `plan-created` (plan refinement)
|
|
145
145
|
|
|
146
146
|
Reference files:
|
|
147
147
|
- `src/skills/flow-init/references/architecture-template.md`
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: owflow:goal-migration
|
|
3
|
+
description: Full orchestrated migration wrapper — runs ALL migration steps in one session by invoking every migration-* subskill in sequence with question gates between them. Use /owflow:migration for the same lifecycle in assisted mode — tasks can mix both modes freely.
|
|
4
|
+
argument-hint: "[task description | task-path] [--from=<slug>] [--type=TYPE] [--no-web-research]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Orchestrated Migration Wrapper
|
|
9
|
+
|
|
10
|
+
Autonomous mode for migration tasks. Initializes (or resumes) the task, then invokes every required `migration-*` subskill back-to-back via the Skill tool, pausing at gates between subskills. Shares `orchestrator-state.yml` with assisted mode (`/owflow:migration`) — tasks can mix both modes freely. There is no migration quick lane.
|
|
11
|
+
|
|
12
|
+
Gates follow the shared contract in [Gate Contract](../orchestrator-framework/references/gate-contract.md) — orchestrated mode exception: each subskill's own Exit Gate acceptance question IS the loop gate (Accept = continue to the next subskill).
|
|
13
|
+
|
|
14
|
+
## Input / Output Artifacts
|
|
15
|
+
|
|
16
|
+
| Artifact | Behavior (this wrapper) |
|
|
17
|
+
| ------------------------------------ | ---------------------------------------------------------------------------------------------- |
|
|
18
|
+
| Consumed: argument (description / path) | migration description (new task) or task path/identifier (resume) |
|
|
19
|
+
| Consumed/produced: all task artifacts | owned entirely by the invoked subskills (none here — delegate, never inline) |
|
|
20
|
+
| State write | `orchestrator.task_ids` (task items) + `orchestrator.updated` only; first-time initialization per the dispatcher's Step 3 is the one permitted write outside the loop |
|
|
21
|
+
|
|
22
|
+
## Entry Gate
|
|
23
|
+
|
|
24
|
+
Identical to the migration dispatcher — complete ALL of its entry-gate steps first (see `../migration/SKILL.md` Entry Gate):
|
|
25
|
+
|
|
26
|
+
1. Read the framework reference files NOW, exactly as the migration dispatcher's Step 1: the [Dispatcher & Handoff Pattern](../orchestrator-framework/references/dispatcher-handoff.md), the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md), and the [Orchestrator Patterns](../orchestrator-framework/references/orchestrator-patterns.md).
|
|
27
|
+
2. Resolve the argument the same way the migration dispatcher does: task path or identifier (a directory, or a directory name under `.owflow/tasks/migrations/`) → **resume mode** (read `orchestrator-state.yml`, artifact-validate `completed_phases` against the dispatcher's marker table; find the first step slug NOT in `completed_phases` whose condition holds, with `--from=<slug>` overriding after prerequisite validation); a migration description (free text) → new task; nothing provided → ask via `question` — "What technology, platform, or architecture should be migrated, and to what?" — then WAIT. Missing state file → print `No migration task found at <path>. Run /owflow:migration <description> to start a migration task from scratch.` and STOP.
|
|
28
|
+
3. Initialize (new task) exactly as the dispatcher's Step 3: create `.owflow/tasks/migrations/YYYY-MM-DD-task-name/` + `orchestrator-state.yml` from the migration template — `task.title` / `task.description` from the description, `task.status: in_progress`, `orchestrator.started_phase: state-analysed`, `orchestrator.entry_point: "migration"`, `orchestrator.task_path`, flags recorded (`--type` → `migration_context.migration_type`; `--no-web-research` is forwarded to `migration-target` per invocation — nothing is persisted for it). **CRITICAL**: use the `verify_template` tool immediately after creation to check YAML validity against `orchestrator-state-migration.yml`. First-time initialization is the one permitted write outside the loop.
|
|
29
|
+
4. Create ONE task item via `TaskCreate` per subskill in the upcoming loop (subject: `"<step name>: <subskill>"`, e.g. `"Spec: migration-spec"`), then set the execution order with `TaskUpdate addBlockedBy` (analyze → target → spec → plan → implement → verify → fix → finalize). Record the ids in `orchestrator.task_ids`. On resume, refresh the already-evidenced items instead of re-creating them. Update statuses as the loop progresses.
|
|
30
|
+
|
|
31
|
+
**Output**:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
🚀 Orchestrated Migration
|
|
35
|
+
|
|
36
|
+
Task: [migration description]
|
|
37
|
+
Directory: [task-path]
|
|
38
|
+
Loop: migration-analyze → migration-target → migration-spec → migration-plan → migration-implement → migration-verify → [migration-fix] → migration-finalize
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## The Loop
|
|
44
|
+
|
|
45
|
+
For each subskill in sequence, execute — skipping any row whose condition is not met (a row whose slug is already in `completed_phases` counts as done). **Compatibility re-verification fallback**: when the loop finds no runnable row and `verification-done` is complete with `verification_context.compatibility_status != passed` (failed or null/invalidated), invoke `migration-verify` once (re-verification, overriding slug completeness), then re-read state and continue from the first row whose condition holds; it does not re-fire while the Fix row is runnable; a recorded data-integrity HALT keeps the user-confirmed rollback path dominant.
|
|
46
|
+
|
|
47
|
+
1. **Announce**: 1-line step banner.
|
|
48
|
+
2. **Invoke**: Skill tool with `name: "owflow:<subskill>"` and `prompt: "<task-path> [flags relevant to that subskill]"`. The subskill owns its Entry Gate, delegation, and state updates. Flags forwarded per subskill: `--type` and `--no-web-research` to `migration-target`.
|
|
49
|
+
3. **Verify handback**: after the skill returns, re-read `orchestrator-state.yml` — confirm the expected step slug(s) were appended to `completed_phases` per the Sequence and Conditionals table. If a subskill stopped early (its Entry Gate failed), STOP the loop and relay its routing message to the user verbatim.
|
|
50
|
+
4. **Gate (subskill's Exit Gate is the loop gate)**: each subskill presents its results box and fires its own results-acceptance `question` before its handoff hint (Orchestrated-mode exception, [Gate Contract](../orchestrator-framework/references/gate-contract.md)). [Rule 5 of the Dispatcher & Handoff Pattern](../orchestrator-framework/references/dispatcher-handoff.md) — "subskills only SUGGEST the next command" — is superseded for Accept: when the user answers **Accept** to the subskill's Exit Gate question pointing at the next subskill in this loop, treat that as "continue to the next subskill" and invoke it. Any other answer (Adjust / Discuss / Stop / other options picked) ends the loop: print the standard handoff block (next command + `/owflow:migration <task-path>` resume hint) and end.
|
|
51
|
+
- **Non-loop-gate questions**: the in-phase questions inside subskills (analyze clarifiers, spec requirement questions, verify's options step, fix's per-iteration questions) are part of that subskill's own decision flow — they are NOT the loop gate and are NEVER auto-accepted or answered by this wrapper. There is exactly ONE gate definition per subskill hop; the wrapper adds NO second consecutive `question`.
|
|
52
|
+
- **No quick lane**: migration has no quick lane — every row runs at full fidelity.
|
|
53
|
+
|
|
54
|
+
### Sequence and Conditionals
|
|
55
|
+
|
|
56
|
+
| Order | Subskill | Run when (re-read from state) |
|
|
57
|
+
| ----- | ------------------ | ----------------------------------------------------------------------------------------------------------------------- |
|
|
58
|
+
| 1 | migration-analyze | Always (new task or partial foundation) |
|
|
59
|
+
| 2 | migration-target | `state-analysed` in `completed_phases` |
|
|
60
|
+
| 3 | migration-spec | `target-planned` completed |
|
|
61
|
+
| 4 | migration-plan | `strategy-specified` completed |
|
|
62
|
+
| 5 | migration-implement | `plan-created` completed |
|
|
63
|
+
| 6 | migration-verify | `migration-executed` completed |
|
|
64
|
+
| 7 | migration-fix | `verification-done` completed **and** (`verification_context.compatibility_status = failed` **or** (`verification_context.last_status != passed` **and** no recorded deliberate skip)); otherwise the row is skipped and `migration-finalize`'s own Entry Gate routes forward |
|
|
65
|
+
| 8 | migration-finalize | `verification-done` completed **and** `verification_context.compatibility_status = passed` **and** the fix phase is settled (`issues-resolved` present, or `last_status = passed`, or a recorded deliberate skip) |
|
|
66
|
+
|
|
67
|
+
`task-completed` already in `completed_phases` → the task is TERMINAL: skip the loop and present the wrapper Exit Gate.
|
|
68
|
+
|
|
69
|
+
**Interruptible**: at any gate the user may answer "stop" — print the standard handoff block (next command + `/owflow:migration <task-path>` resume hint) and end the session. The task resumes later in either mode; a fresh invocation of this wrapper resumes from state, never from loop memory.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Exit Gate
|
|
74
|
+
|
|
75
|
+
When migration-finalize completes (`task.status: completed`):
|
|
76
|
+
|
|
77
|
+
1. Mark the final task item completed via `TaskUpdate`.
|
|
78
|
+
2. Present the workflow results box:
|
|
79
|
+
|
|
80
|
+
```markdown
|
|
81
|
+
## ✅ MIGRATION WORKFLOW COMPLETE — <task name>
|
|
82
|
+
|
|
83
|
+
**Migration** — [current → target, type]
|
|
84
|
+
**Strategy** — [incremental / big-bang / dual-run / phased]
|
|
85
|
+
**Steps** — [executed step slugs, e.g. state-analysed → target-planned → strategy-specified → plan-created → migration-executed → options-chosen → verification-done → issues-resolved → docs-generated → task-completed]
|
|
86
|
+
**Verification** — [final verifier verdict + overall compatibility verdict]
|
|
87
|
+
**Fixes** — [N applied / none required / deliberately skipped]
|
|
88
|
+
**Operator guide** — [generated / skipped (`docs_enabled` not enabled)]
|
|
89
|
+
|
|
90
|
+
**Artifacts** — [artifact inventory: `analysis/current-state-analysis.md`, `analysis/target-state-plan.md`, `analysis/requirements.md`, `analysis/rollback-plan.md`, `implementation/spec.md`, `implementation/implementation-plan.md`, `implementation/work-log.md`, `verification/implementation-verification.md`, `verification/compatibility-test-results.md`, `documentation/migration-guide.md` (conditional)]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
3. Use `question` — "Are these results correct?" with options: **Accept** (print follow-up suggestions: review the artifacts, commit personally — the workflow performs no commits; `/owflow:reviews-pragmatic <task-path>` if desired; then end) / **Adjust** (re-open the relevant `/owflow:migration-*` skill with the corrections) / **Discuss** (walk through the migration summary) / **Stop here** (print the resume command `/owflow:migration <task-path>` and end).
|
|
94
|
+
|
|
95
|
+
Then end. No further owflow phase commands are required.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Loop Rules
|
|
100
|
+
|
|
101
|
+
- **Delegate, never inline**: the wrapper only sequences — all step work happens inside subskills. If you catch yourself analyzing/migrating outside a subskill, STOP and invoke the subskill instead.
|
|
102
|
+
- **State is the truth**: gates and routing read `orchestrator-state.yml`, not memory. Re-read after every subskill returns.
|
|
103
|
+
- **Same state schema as assisted mode**: `completed_phases` step slugs (`state-analysed` … `task-completed`) are identical; resume works across modes.
|
|
104
|
+
- **Wrapper writes almost nothing**: step slugs, summaries, and outputs belong to the subskills — this wrapper writes ONLY `orchestrator.task_ids` (task items) and `orchestrator.updated` (timestamps); the sole exception is first-time initialization per the dispatcher's Step 3.
|
|
105
|
+
- **Zero added pause points**: one full pass asks at most the 8 subskill Exit Gates + this terminal gate = 9 — fewer when the conditional `migration-fix` row is skipped; the same asks as assisted mode. There is no per-hop back-to-back `question` exception: the wrapper adds no question inside the loop, and its only wrapper-level `question` is this terminal gate (the finalize gate and the wrapper gate are the one legitimate consecutive pair).
|
|
106
|
+
|
|
107
|
+
## Command Integration
|
|
108
|
+
|
|
109
|
+
Invoked via:
|
|
110
|
+
|
|
111
|
+
- `/owflow:goal-migration [description] [--type=TYPE] [--no-web-research]` (new)
|
|
112
|
+
- `/owflow:goal-migration [task-path] [--from=<slug>]` (resume)
|
|
113
|
+
|
|
114
|
+
Alternative: `/owflow:migration` — same task in assisted mode (one subskill per invocation, fresh context each step).
|