owflow 0.4.2 → 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 +6 -2
- package/dist/agents/implementation-planner.md +1 -1
- package/dist/agents/information-gatherer.md +691 -691
- package/dist/agents/research-planner.md +450 -450
- package/dist/agents/research-synthesizer.md +403 -403
- package/dist/agents/solution-brainstormer.md +257 -257
- package/dist/agents/solution-designer.md +372 -372
- package/dist/agents/specification-creator.md +1 -1
- package/dist/commands/work.md +9 -9
- package/dist/configuration/commands-config.js +57 -0
- package/dist/skills/codebase-analyzer/SKILL.md +4 -4
- package/dist/skills/dev-verify/SKILL.md +3 -10
- package/dist/skills/diagrams-mermaid/SKILL.md +1 -0
- package/dist/skills/diagrams-mermaid/references/reference.md +4 -4
- package/dist/skills/flow-init/SKILL.md +1 -1
- package/dist/skills/goal-migration/SKILL.md +114 -0
- package/dist/skills/goal-research/SKILL.md +118 -118
- package/dist/skills/html-renderer/SKILL.md +1 -0
- package/dist/skills/migration/SKILL.md +157 -295
- 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/command-namespacing.md +1 -1
- 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 +117 -112
- package/dist/skills/orchestrator-framework/references/orchestrator-patterns.md +4 -1
- package/dist/skills/performance/SKILL.md +1 -0
- package/dist/skills/research/SKILL.md +249 -249
- package/dist/skills/research-brainstorm/SKILL.md +120 -120
- package/dist/skills/research-converge/SKILL.md +130 -130
- package/dist/skills/research-design/SKILL.md +146 -146
- package/dist/skills/research-finalize/SKILL.md +125 -125
- package/dist/skills/research-fork/SKILL.md +190 -190
- package/dist/skills/research-gather/SKILL.md +133 -133
- package/dist/skills/research-plan/SKILL.md +141 -141
- package/dist/skills/research-quick/SKILL.md +139 -139
- package/dist/skills/research-synthesize/SKILL.md +127 -127
- package/dist/skills/rule-reviewer/SKILL.md +1 -1
- package/dist/skills/standards-discover/SKILL.md +1 -0
- package/dist/templates/orchestrator-state-migration.yml +49 -9
- package/package.json +1 -1
- package/dist/commands/agents-md-generator.md +0 -36
- package/dist/commands/dev-analyze.md +0 -33
- package/dist/commands/dev-bugfix.md +0 -37
- package/dist/commands/dev-finalize.md +0 -33
- package/dist/commands/dev-implement.md +0 -34
- package/dist/commands/dev-plan.md +0 -37
- package/dist/commands/dev-spec.md +0 -37
- package/dist/commands/dev-tdd-red.md +0 -33
- package/dist/commands/dev-verify.md +0 -33
- package/dist/commands/development.md +0 -36
- package/dist/commands/diagrams-mermaid.md +0 -36
- package/dist/commands/flow-init.md +0 -36
- package/dist/commands/goal-development.md +0 -32
- package/dist/commands/goal-research.md +0 -33
- package/dist/commands/html-renderer.md +0 -36
- package/dist/commands/migration.md +0 -36
- package/dist/commands/performance.md +0 -36
- package/dist/commands/research-brainstorm.md +0 -33
- package/dist/commands/research-converge.md +0 -33
- package/dist/commands/research-design.md +0 -33
- package/dist/commands/research-finalize.md +0 -33
- package/dist/commands/research-fork.md +0 -40
- package/dist/commands/research-gather.md +0 -33
- package/dist/commands/research-plan.md +0 -37
- package/dist/commands/research-quick.md +0 -37
- package/dist/commands/research-synthesize.md +0 -33
- package/dist/commands/research.md +0 -55
- package/dist/commands/rule-reviewer.md +0 -38
- package/dist/commands/standards-discover.md +0 -36
- package/dist/commands/standards-update.md +0 -36
package/dist/commands/work.md
CHANGED
|
@@ -53,12 +53,12 @@ Auto-classifies tasks and routes to the appropriate workflow orchestrator. Suppo
|
|
|
53
53
|
|
|
54
54
|
## Workflow Type Routing
|
|
55
55
|
|
|
56
|
-
| Classification | Routes To (Skill)
|
|
57
|
-
| -------------- |
|
|
58
|
-
| development | `development`
|
|
59
|
-
| performance | `performance`
|
|
60
|
-
| migration | `migration`
|
|
61
|
-
| research | `research`
|
|
56
|
+
| Classification | Routes To (Skill) |
|
|
57
|
+
| -------------- | --------------------- |
|
|
58
|
+
| development | `owflow:development` |
|
|
59
|
+
| performance | `owflow:performance` |
|
|
60
|
+
| migration | `owflow:migration` |
|
|
61
|
+
| research | `owflow:research` |
|
|
62
62
|
|
|
63
63
|
---
|
|
64
64
|
|
|
@@ -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
|
---
|
|
@@ -1,4 +1,44 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import matter from "gray-matter";
|
|
1
4
|
import { loadMarkdownDir } from "../utils/file-util.js";
|
|
5
|
+
import { PLUGIN_ROOT } from "../utils/plugin-info.js";
|
|
6
|
+
// Keeps the rendered body independent of the line endings of this file's storage.
|
|
7
|
+
const CRLF = "\r\n";
|
|
8
|
+
const REQUIRED_COMMAND_KEYS = ["name", "description"];
|
|
9
|
+
/**
|
|
10
|
+
* Renders the command body for one skill from its frontmatter.
|
|
11
|
+
* Pure: one frontmatter object in, one string out.
|
|
12
|
+
*/
|
|
13
|
+
export const renderCommandTemplate = (data) => [
|
|
14
|
+
`CRITICAL INSTRUCTION: You MUST invoke the ${data.name} skill immediately as your FIRST action.`,
|
|
15
|
+
"",
|
|
16
|
+
"Use the Skill tool with these exact parameters:",
|
|
17
|
+
`name: "${data.name}"`,
|
|
18
|
+
`prompt: "$ARGUMENTS"`,
|
|
19
|
+
].join(CRLF);
|
|
20
|
+
/**
|
|
21
|
+
* Reads the frontmatter of every `skills/<slug>/SKILL.md`, one level deep.
|
|
22
|
+
* I/O and parsing only — the invocable gate and the key contract live in the
|
|
23
|
+
* registration loop. Failures are never swallowed: our own source data must not
|
|
24
|
+
* register silently incomplete.
|
|
25
|
+
*/
|
|
26
|
+
export const readSkillFrontmatter = () => {
|
|
27
|
+
const skillsDir = path.join(PLUGIN_ROOT, "skills");
|
|
28
|
+
const skills = [];
|
|
29
|
+
for (const entry of fs.readdirSync(skillsDir, { withFileTypes: true })) {
|
|
30
|
+
if (!entry.isDirectory())
|
|
31
|
+
continue;
|
|
32
|
+
const skillFile = path.join(skillsDir, entry.name, "SKILL.md");
|
|
33
|
+
if (!fs.existsSync(skillFile))
|
|
34
|
+
continue;
|
|
35
|
+
skills.push({
|
|
36
|
+
slug: entry.name,
|
|
37
|
+
data: matter(fs.readFileSync(skillFile, "utf8")).data,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return skills;
|
|
41
|
+
};
|
|
2
42
|
export const configureCommands = (config) => {
|
|
3
43
|
config.command = config.command || {};
|
|
4
44
|
for (const { data, content } of loadMarkdownDir("commands")) {
|
|
@@ -18,4 +58,21 @@ export const configureCommands = (config) => {
|
|
|
18
58
|
}),
|
|
19
59
|
};
|
|
20
60
|
}
|
|
61
|
+
for (const { slug, data } of readSkillFrontmatter()) {
|
|
62
|
+
if (data["user-invocable"] !== true)
|
|
63
|
+
continue;
|
|
64
|
+
const missing = REQUIRED_COMMAND_KEYS.filter((key) => typeof data[key] !== "string" || data[key] === "");
|
|
65
|
+
if (missing.length > 0) {
|
|
66
|
+
throw new Error(`[owflow] Skill '${slug}' is user-invocable but is missing required frontmatter: ${missing.join(", ")}`);
|
|
67
|
+
}
|
|
68
|
+
const name = data.name;
|
|
69
|
+
// Don't overwrite commands the user has explicitly configured
|
|
70
|
+
if (config.command[name])
|
|
71
|
+
continue;
|
|
72
|
+
config.command[name] = {
|
|
73
|
+
template: renderCommandTemplate(data),
|
|
74
|
+
// A folded YAML description scalar parses with a trailing newline
|
|
75
|
+
description: data.description.trimEnd(),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
21
78
|
};
|
|
@@ -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.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: owflow:diagrams-mermaid
|
|
3
3
|
description: Creates Mermaid diagrams for planning flows, component communication, and architecture views with adaptive detail selection (including C4 levels). This skill should be used when the user asks for a workflow, interaction, or architecture visualization from provided task context.
|
|
4
|
+
argument-hint: "[diagram description]"
|
|
4
5
|
user-invocable: true
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -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).
|
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: owflow:goal-research
|
|
3
|
-
description: Full orchestrated research wrapper — runs ALL research steps in one session by invoking every research-* subskill in sequence with question gates between them (equivalent to the classic unified orchestrator for research). Use /owflow:research for the same lifecycle in assisted mode — tasks can mix both modes freely.
|
|
4
|
-
argument-hint: "[task description | task-path] [--from=<slug>] [--type=<type>]"
|
|
5
|
-
user-invocable: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Orchestrated Research Wrapper
|
|
9
|
-
|
|
10
|
-
Autonomous mode for research tasks. Initializes (or resumes) the task, then invokes every required `research-*` subskill back-to-back via the Skill tool, pausing at gates between subskills. Shares `orchestrator-state.yml` with assisted mode (`/owflow:research`) — tasks can mix both modes freely.
|
|
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 | Normal mode (this wrapper) | Quick mode (`research-quick`) |
|
|
17
|
-
| ----------------------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
18
|
-
| Consumed: argument (question / path)| research question (new task) or task path/identifier (resume) | n/a — this wrapper never starts a quick run; a completed quick pass just skips rows 2-3 |
|
|
19
|
-
| Consumed/produced: all task artifacts| owned entirely by the invoked subskills (none here — delegate, never inline) | same — the subskills run at full fidelity after a quick pass |
|
|
20
|
-
| State write | `orchestrator.task_ids` (task items) + `orchestrator.updated` only | none additional — state was already written by the quick pass |
|
|
21
|
-
|
|
22
|
-
## Entry Gate
|
|
23
|
-
|
|
24
|
-
Identical to the research dispatcher — complete ALL of its entry-gate steps first (see `../research/SKILL.md` Entry Gate):
|
|
25
|
-
|
|
26
|
-
1. Read the framework reference files NOW, exactly as the research 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 research dispatcher does: task path or identifier (a directory, or a directory name under `.owflow/tasks/research/`) → **resume mode** (read `orchestrator-state.yml`, validate expected artifacts for `completed_phases`; find the first step slug NOT in `completed_phases`, with `--from=<slug>` overriding); a research question (free text) → new task; nothing provided → ask via `question` — "What is your research question?" — then WAIT. Missing state file → print `No research task found at <path>. Run /owflow:research <question> to start from scratch.` and STOP.
|
|
28
|
-
3. Initialize (new task) exactly as the dispatcher: create `.owflow/tasks/research/YYYY-MM-DD-task-name/` + `orchestrator-state.yml` from the research template — `task.title` / `task.description` from the question, `task.status: in_progress`, `orchestrator.task_path`, `orchestrator.entry_point: "research"`. **CRITICAL**: use the `verify_template` tool immediately after creation to check YAML validity against `orchestrator-state-research.yml`. No project-docs discovery at this layer — the `research-plan` brief step owns it.
|
|
29
|
-
4. Command flags: `--type=TYPE` → `research_context.research_type`. Subskills read it from there. This wrapper never forwards quick runs. The optional brainstorm/design chain has no flags — the chain decision is asked at the gate after synthesis (row 4 below) or made by manually invoking the optional subskills.
|
|
30
|
-
5. Create ONE task item via `TaskCreate` per subskill in the upcoming loop (subject: `"<step name>: <subskill>"`, e.g. `"Brief + plan: research-plan"`), then set the execution order with `TaskUpdate addBlockedBy` (plan → gather → synthesize → optional chain (gate question) → finalize). On resume, refresh the already-evidenced items instead of re-creating them. Update statuses as the loop progresses.
|
|
31
|
-
|
|
32
|
-
**Output**:
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
🚀 Orchestrated Research
|
|
36
|
-
|
|
37
|
-
Task: [research question]
|
|
38
|
-
Directory: [task-path]
|
|
39
|
-
Loop: research-plan → research-gather → research-synthesize → [research-brainstorm] → [research-converge] → [research-design] → research-finalize (chain asked at the gate)
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## The Loop
|
|
45
|
-
|
|
46
|
-
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):
|
|
47
|
-
|
|
48
|
-
1. **Announce**: 1-line step banner.
|
|
49
|
-
2. **Invoke**: Skill tool with `name: "<subskill>"` and `prompt: "<task-path> [flags relevant to that subskill]"`. The subskill owns its Entry Gate, delegation, and state updates.
|
|
50
|
-
3. **Verify handback**: after the skill returns, re-read `orchestrator-state.yml` — confirm the expected step slugs were appended to `completed_phases` (per the Sequence and Conditionals table). A user-chosen skip of `research-brainstorm` or `research-design` appends no slug — the gate answer itself settles the decision, and the loop continues to the next selected row (or to finalize). Do not treat a skipped optional subskill as an early stop. If a subskill stopped early (entry check failed), STOP the loop and relay its routing message to the user.
|
|
51
|
-
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 the same way a rejected gate would.
|
|
52
|
-
- **Exception**: the per-area convergence `question`s `research-converge` fires (one area, one question) 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`.
|
|
53
|
-
- **Condensed lane**: this wrapper never starts a quick run. A task already started with `/owflow:research-quick` enters the loop with `brief-written` … `synthesis-complete` already recorded, so those rows are skipped like any other completed slug. An interrupted quick pass (those slugs missing) is not finished condensed here — the user runs `/owflow:research-quick <task-path>` for that.
|
|
54
|
-
|
|
55
|
-
### Sequence and Conditionals
|
|
56
|
-
|
|
57
|
-
| Order | Subskill | Run when (from state) |
|
|
58
|
-
| ----- | ------------------ | ------------------------------------------------------------------------------------------------------------------- |
|
|
59
|
-
| 1 | research-plan | Always (new task or partial foundation) |
|
|
60
|
-
| 2 | research-gather | `plan-created` completed (parses `## Gathering Strategy`, or falls back to 4 default categories; existing findings count as done) |
|
|
61
|
-
| 3 | research-synthesize| `findings-gathered` completed |
|
|
62
|
-
| 4 | chain decision | `synthesis-complete` completed — the wrapper asks via `question`: brainstorm → converge → design, design-only, or straight to finalize |
|
|
63
|
-
| 5 | research-brainstorm| User chose brainstorming at the gate (invoking/sequencing the skill IS the decision) |
|
|
64
|
-
| 6 | research-converge | `alternatives-generated` completed (brainstorm ran) |
|
|
65
|
-
| 7 | research-design | User chose design — after `approaches-chosen`, or the design-only branch (seeded from the research report) |
|
|
66
|
-
| 8 | research-finalize | Foundation complete + optional chain settled (every step the user chose to run is recorded) |
|
|
67
|
-
|
|
68
|
-
A completed quick pass already recorded `brief-written` … `synthesis-complete`, so rows 2-3 are skipped as already done and the loop continues at row 4 (the chain decision). This wrapper never starts a quick run.
|
|
69
|
-
|
|
70
|
-
The optional chain is the user's choice — asked at the gate (row 4) or made by manually invoking the optional subskills. There is no enablement flag in state:
|
|
71
|
-
|
|
72
|
-
- Brainstorm chosen → `research-brainstorm` → `research-converge` → design (if chosen) → finalize.
|
|
73
|
-
- Design-only chosen → skip the brainstorm + converge rows → `research-design` → finalize.
|
|
74
|
-
- Neither chosen → all conditional rows are skipped → `research-finalize`.
|
|
75
|
-
|
|
76
|
-
`research-completed` already in `completed_phases` → the task is TERMINAL: skip the Loop and present the wrapper Exit Gate.
|
|
77
|
-
|
|
78
|
-
**Interruptible**: at any gate the user may answer "stop" — print the standard handoff block (next command + `/owflow:research <task-path>` resume hint) and end the session. The task resumes later in either mode.
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## Exit Gate
|
|
83
|
-
|
|
84
|
-
When research-finalize completes (`task.status: completed`):
|
|
85
|
-
|
|
86
|
-
1. Mark the final task item completed via `TaskUpdate`.
|
|
87
|
-
2. Present the workflow results box:
|
|
88
|
-
|
|
89
|
-
```markdown
|
|
90
|
-
## ✅ RESEARCH WORKFLOW COMPLETE — <research question>
|
|
91
|
-
|
|
92
|
-
**Steps** — [executed step slugs, e.g. brief-written → plan-created → findings-gathered → synthesis-complete → alternatives-generated → approaches-chosen → design-generated → research-completed]
|
|
93
|
-
**Confidence** — [research_context.confidence_level]
|
|
94
|
-
**Decisions** — [count of ADRs in the decision log, if design ran]
|
|
95
|
-
**Artifacts** — [artifact inventory: outputs/research-report.md always; outputs/solution-exploration.md / outputs/high-level-design.md / outputs/decision-log.md conditionally]
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
3. Use `question` — "Are these results correct?" with options: **Accept** (print follow-up suggestions: clear context, then `/owflow:development <task-path>` to build on this research, `/owflow:standards-update "<lesson>"` if a standard surfaced, then end) / **Adjust** (re-open the relevant `/owflow:research-*` skill with the corrections) / **Discuss** (walk through the research summary) / **Stop here** (print the resume command `/owflow:research <task-path>` and end).
|
|
99
|
-
|
|
100
|
-
Then end. No further owflow phase commands are required.
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
## Loop Rules
|
|
105
|
-
|
|
106
|
-
- **Delegate, never inline**: the wrapper only sequences — all step work happens inside subskills. If you catch yourself researching/authoring outside a subskill, STOP and invoke the subskill instead.
|
|
107
|
-
- **State is the truth**: gates and routing read `orchestrator-state.yml`, not memory. Re-read after every subskill returns.
|
|
108
|
-
- **Same state schema as assisted mode**: `completed_phases` step slugs (`brief-written` … `research-completed`) are identical; resume works across modes.
|
|
109
|
-
- **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).
|
|
110
|
-
|
|
111
|
-
## Command Integration
|
|
112
|
-
|
|
113
|
-
Invoked via:
|
|
114
|
-
|
|
115
|
-
- `/owflow:goal-research [question] [--type=TYPE]` (new)
|
|
116
|
-
- `/owflow:goal-research [task-path] [--from=<slug>]` (resume)
|
|
117
|
-
|
|
118
|
-
Alternative: `/owflow:research` — same task in assisted mode (one subskill per invocation, fresh context each step).
|
|
1
|
+
---
|
|
2
|
+
name: owflow:goal-research
|
|
3
|
+
description: Full orchestrated research wrapper — runs ALL research steps in one session by invoking every research-* subskill in sequence with question gates between them (equivalent to the classic unified orchestrator for research). Use /owflow:research for the same lifecycle in assisted mode — tasks can mix both modes freely.
|
|
4
|
+
argument-hint: "[task description | task-path] [--from=<slug>] [--type=<type>]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Orchestrated Research Wrapper
|
|
9
|
+
|
|
10
|
+
Autonomous mode for research tasks. Initializes (or resumes) the task, then invokes every required `research-*` subskill back-to-back via the Skill tool, pausing at gates between subskills. Shares `orchestrator-state.yml` with assisted mode (`/owflow:research`) — tasks can mix both modes freely.
|
|
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 | Normal mode (this wrapper) | Quick mode (`research-quick`) |
|
|
17
|
+
| ----------------------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
18
|
+
| Consumed: argument (question / path)| research question (new task) or task path/identifier (resume) | n/a — this wrapper never starts a quick run; a completed quick pass just skips rows 2-3 |
|
|
19
|
+
| Consumed/produced: all task artifacts| owned entirely by the invoked subskills (none here — delegate, never inline) | same — the subskills run at full fidelity after a quick pass |
|
|
20
|
+
| State write | `orchestrator.task_ids` (task items) + `orchestrator.updated` only | none additional — state was already written by the quick pass |
|
|
21
|
+
|
|
22
|
+
## Entry Gate
|
|
23
|
+
|
|
24
|
+
Identical to the research dispatcher — complete ALL of its entry-gate steps first (see `../research/SKILL.md` Entry Gate):
|
|
25
|
+
|
|
26
|
+
1. Read the framework reference files NOW, exactly as the research 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 research dispatcher does: task path or identifier (a directory, or a directory name under `.owflow/tasks/research/`) → **resume mode** (read `orchestrator-state.yml`, validate expected artifacts for `completed_phases`; find the first step slug NOT in `completed_phases`, with `--from=<slug>` overriding); a research question (free text) → new task; nothing provided → ask via `question` — "What is your research question?" — then WAIT. Missing state file → print `No research task found at <path>. Run /owflow:research <question> to start from scratch.` and STOP.
|
|
28
|
+
3. Initialize (new task) exactly as the dispatcher: create `.owflow/tasks/research/YYYY-MM-DD-task-name/` + `orchestrator-state.yml` from the research template — `task.title` / `task.description` from the question, `task.status: in_progress`, `orchestrator.task_path`, `orchestrator.entry_point: "research"`. **CRITICAL**: use the `verify_template` tool immediately after creation to check YAML validity against `orchestrator-state-research.yml`. No project-docs discovery at this layer — the `research-plan` brief step owns it.
|
|
29
|
+
4. Command flags: `--type=TYPE` → `research_context.research_type`. Subskills read it from there. This wrapper never forwards quick runs. The optional brainstorm/design chain has no flags — the chain decision is asked at the gate after synthesis (row 4 below) or made by manually invoking the optional subskills.
|
|
30
|
+
5. Create ONE task item via `TaskCreate` per subskill in the upcoming loop (subject: `"<step name>: <subskill>"`, e.g. `"Brief + plan: research-plan"`), then set the execution order with `TaskUpdate addBlockedBy` (plan → gather → synthesize → optional chain (gate question) → finalize). On resume, refresh the already-evidenced items instead of re-creating them. Update statuses as the loop progresses.
|
|
31
|
+
|
|
32
|
+
**Output**:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
🚀 Orchestrated Research
|
|
36
|
+
|
|
37
|
+
Task: [research question]
|
|
38
|
+
Directory: [task-path]
|
|
39
|
+
Loop: research-plan → research-gather → research-synthesize → [research-brainstorm] → [research-converge] → [research-design] → research-finalize (chain asked at the gate)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## The Loop
|
|
45
|
+
|
|
46
|
+
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):
|
|
47
|
+
|
|
48
|
+
1. **Announce**: 1-line step banner.
|
|
49
|
+
2. **Invoke**: Skill tool with `name: "<subskill>"` and `prompt: "<task-path> [flags relevant to that subskill]"`. The subskill owns its Entry Gate, delegation, and state updates.
|
|
50
|
+
3. **Verify handback**: after the skill returns, re-read `orchestrator-state.yml` — confirm the expected step slugs were appended to `completed_phases` (per the Sequence and Conditionals table). A user-chosen skip of `research-brainstorm` or `research-design` appends no slug — the gate answer itself settles the decision, and the loop continues to the next selected row (or to finalize). Do not treat a skipped optional subskill as an early stop. If a subskill stopped early (entry check failed), STOP the loop and relay its routing message to the user.
|
|
51
|
+
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 the same way a rejected gate would.
|
|
52
|
+
- **Exception**: the per-area convergence `question`s `research-converge` fires (one area, one question) 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`.
|
|
53
|
+
- **Condensed lane**: this wrapper never starts a quick run. A task already started with `/owflow:research-quick` enters the loop with `brief-written` … `synthesis-complete` already recorded, so those rows are skipped like any other completed slug. An interrupted quick pass (those slugs missing) is not finished condensed here — the user runs `/owflow:research-quick <task-path>` for that.
|
|
54
|
+
|
|
55
|
+
### Sequence and Conditionals
|
|
56
|
+
|
|
57
|
+
| Order | Subskill | Run when (from state) |
|
|
58
|
+
| ----- | ------------------ | ------------------------------------------------------------------------------------------------------------------- |
|
|
59
|
+
| 1 | research-plan | Always (new task or partial foundation) |
|
|
60
|
+
| 2 | research-gather | `plan-created` completed (parses `## Gathering Strategy`, or falls back to 4 default categories; existing findings count as done) |
|
|
61
|
+
| 3 | research-synthesize| `findings-gathered` completed |
|
|
62
|
+
| 4 | chain decision | `synthesis-complete` completed — the wrapper asks via `question`: brainstorm → converge → design, design-only, or straight to finalize |
|
|
63
|
+
| 5 | research-brainstorm| User chose brainstorming at the gate (invoking/sequencing the skill IS the decision) |
|
|
64
|
+
| 6 | research-converge | `alternatives-generated` completed (brainstorm ran) |
|
|
65
|
+
| 7 | research-design | User chose design — after `approaches-chosen`, or the design-only branch (seeded from the research report) |
|
|
66
|
+
| 8 | research-finalize | Foundation complete + optional chain settled (every step the user chose to run is recorded) |
|
|
67
|
+
|
|
68
|
+
A completed quick pass already recorded `brief-written` … `synthesis-complete`, so rows 2-3 are skipped as already done and the loop continues at row 4 (the chain decision). This wrapper never starts a quick run.
|
|
69
|
+
|
|
70
|
+
The optional chain is the user's choice — asked at the gate (row 4) or made by manually invoking the optional subskills. There is no enablement flag in state:
|
|
71
|
+
|
|
72
|
+
- Brainstorm chosen → `research-brainstorm` → `research-converge` → design (if chosen) → finalize.
|
|
73
|
+
- Design-only chosen → skip the brainstorm + converge rows → `research-design` → finalize.
|
|
74
|
+
- Neither chosen → all conditional rows are skipped → `research-finalize`.
|
|
75
|
+
|
|
76
|
+
`research-completed` already in `completed_phases` → the task is TERMINAL: skip the Loop and present the wrapper Exit Gate.
|
|
77
|
+
|
|
78
|
+
**Interruptible**: at any gate the user may answer "stop" — print the standard handoff block (next command + `/owflow:research <task-path>` resume hint) and end the session. The task resumes later in either mode.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Exit Gate
|
|
83
|
+
|
|
84
|
+
When research-finalize completes (`task.status: completed`):
|
|
85
|
+
|
|
86
|
+
1. Mark the final task item completed via `TaskUpdate`.
|
|
87
|
+
2. Present the workflow results box:
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
## ✅ RESEARCH WORKFLOW COMPLETE — <research question>
|
|
91
|
+
|
|
92
|
+
**Steps** — [executed step slugs, e.g. brief-written → plan-created → findings-gathered → synthesis-complete → alternatives-generated → approaches-chosen → design-generated → research-completed]
|
|
93
|
+
**Confidence** — [research_context.confidence_level]
|
|
94
|
+
**Decisions** — [count of ADRs in the decision log, if design ran]
|
|
95
|
+
**Artifacts** — [artifact inventory: outputs/research-report.md always; outputs/solution-exploration.md / outputs/high-level-design.md / outputs/decision-log.md conditionally]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
3. Use `question` — "Are these results correct?" with options: **Accept** (print follow-up suggestions: clear context, then `/owflow:development <task-path>` to build on this research, `/owflow:standards-update "<lesson>"` if a standard surfaced, then end) / **Adjust** (re-open the relevant `/owflow:research-*` skill with the corrections) / **Discuss** (walk through the research summary) / **Stop here** (print the resume command `/owflow:research <task-path>` and end).
|
|
99
|
+
|
|
100
|
+
Then end. No further owflow phase commands are required.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Loop Rules
|
|
105
|
+
|
|
106
|
+
- **Delegate, never inline**: the wrapper only sequences — all step work happens inside subskills. If you catch yourself researching/authoring outside a subskill, STOP and invoke the subskill instead.
|
|
107
|
+
- **State is the truth**: gates and routing read `orchestrator-state.yml`, not memory. Re-read after every subskill returns.
|
|
108
|
+
- **Same state schema as assisted mode**: `completed_phases` step slugs (`brief-written` … `research-completed`) are identical; resume works across modes.
|
|
109
|
+
- **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).
|
|
110
|
+
|
|
111
|
+
## Command Integration
|
|
112
|
+
|
|
113
|
+
Invoked via:
|
|
114
|
+
|
|
115
|
+
- `/owflow:goal-research [question] [--type=TYPE]` (new)
|
|
116
|
+
- `/owflow:goal-research [task-path] [--from=<slug>]` (resume)
|
|
117
|
+
|
|
118
|
+
Alternative: `/owflow:research` — same task in assisted mode (one subskill per invocation, fresh context each step).
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: owflow:html-renderer
|
|
3
3
|
description: Render a markdown plan, idea, RFC, or design note into a self-contained, share-ready HTML file using the warm editorial visual system bundled under `references/`. Use this skill whenever the user asks to "render", "convert", "turn into HTML", "make a nice HTML version", "share this as a page", or "make this look good" for a markdown file containing a plan, proposal, idea, brief, RFC, design note, or pitch — even if they don't explicitly say "HTML". The output is a single .html file with all CSS inlined, written next to the source .md, that visually matches the reference layout in `references/index.html` and uses tokens from `references/tokens.json`.
|
|
4
|
+
argument-hint: "[path to markdown file]"
|
|
4
5
|
disable-model-invocation: true
|
|
5
6
|
user-invocable: true
|
|
6
7
|
---
|