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
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: owflow:research-gather
|
|
3
|
-
description: Research skill — reads the plan's Gathering Strategy and launches the parallel information-gatherer agent fan in ONE message, then merges per-category findings. Ends the gathering step of the research workflow (findings-gathered) and continues with research-synthesize.
|
|
4
|
-
argument-hint: "[task-path-or-identifier]"
|
|
5
|
-
user-invocable: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Research Gather — Parallel Findings Fan (findings-gathered)
|
|
9
|
-
|
|
10
|
-
Work phase of the research workflow. Reads the gathering strategy out of the research plan and launches the parallel information-gatherer fan (`analysis/findings/*.md`, one file per category). State lives in `orchestrator-state.yml` — this skill reads it on entry and writes results on exit.
|
|
11
|
-
|
|
12
|
-
Related phases: `/owflow:research-plan` (produces the plan this skill parses), `/owflow:research-synthesize` (consumes the merged findings). In the quick lane, `research-quick` may author findings inline — those are pre-existing category files for this skill.
|
|
13
|
-
|
|
14
|
-
## Entry Gate
|
|
15
|
-
|
|
16
|
-
Resolve the `task-path-or-identifier` argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)):
|
|
17
|
-
|
|
18
|
-
- **Path** (absolute or project-relative) to the task directory — use as-is.
|
|
19
|
-
- **Identifier** — exact directory name inside `.owflow/tasks/research/` (e.g., `2026-09-26-my-research`); resolve to its path.
|
|
20
|
-
- If the argument is **missing**, the path does **not exist**, or matches **no identifier** → print the blocked block, then STOP (never guess or auto-pick a task):
|
|
21
|
-
1. Steps that must be completed first (in order), each with its command:
|
|
22
|
-
- Research brief & plan (`brief-written`, `plan-created`) → `/owflow:research-plan <task-path>`
|
|
23
|
-
2. List available research-task identifiers (directories under `.owflow/tasks/research/`) to resume from, if any.
|
|
24
|
-
3. Hint: `Run /owflow:research-plan <task-path> first, /owflow:research <question> to start a task from scratch, or pass a task path/identifier to resume.`
|
|
25
|
-
|
|
26
|
-
### Prerequisites
|
|
27
|
-
|
|
28
|
-
| Required for this skill | Where verified | Produced by |
|
|
29
|
-
| ---------------------------------- | -------------------------------------------------------------------- | -------------------------------------- |
|
|
30
|
-
| State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:research <question>` or `/owflow:research-quick` |
|
|
31
|
-
| Plan exists | `plan-created` in `completed_phases` + `planning/research-plan.md` exists | `/owflow:research-plan <task-path>` |
|
|
32
|
-
|
|
33
|
-
1. **Read `orchestrator-state.yml`** from the task path. If missing → mid-pipeline bootstrap ([Missing-state Bootstrap](../orchestrator-framework/references/gate-contract.md), starting slug `findings-gathered`): `question` — create a fresh standard research task starting at this step, or decline → print `No research task found at <path>. Run /owflow:research <question> to start a task from scratch.` and STOP.
|
|
34
|
-
2. **Content check — plan file**: Read `planning/research-plan.md`. If the file is missing → print the blocked block, then STOP (`Run /owflow:research-plan <task-path> first.`). A missing `## Gathering Strategy` section does NOT block — Execute falls back to the default 4 categories.
|
|
35
|
-
3. **Skip/resume — only missing categories re-fan**: existing files under `analysis/findings/` count as done whether or not `findings-gathered` is already in `completed_phases` (artifacts before state; quick-lane and pre-split files included). Re-fan ONLY categories with no matching file, then append `findings-gathered` once every planned category has a file. All categories already present → adopt the slug if it is missing, report existing findings, and route to the Exit Gate.
|
|
36
|
-
|
|
37
|
-
## Input / Output Artifacts
|
|
38
|
-
|
|
39
|
-
| Artifact | Normal mode (full lane) | Quick mode (`research-quick`) |
|
|
40
|
-
| ---------------------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
41
|
-
| Consumed: `planning/research-plan.md` | parsed for `## Gathering Strategy` (fallback: 4 default categories) | same — quick plan always keeps a `## Gathering Strategy` section, pinning gather inline vs capped fan |
|
|
42
|
-
| Consumed: `information-gatherer` agents (Task tool, one per category, all N in ONE message) | N agents (cap 8) | zero agents (≤2 categories, inline) or the fan capped at 3 agents |
|
|
43
|
-
| Produced: `analysis/findings/*.md` | exactly one per gathering category | same paths — quick-lane findings are pre-existing category files here, never re-fanned |
|
|
44
|
-
| State write | `findings-gathered`; `gathering_strategy`, `research_outputs.findings_directory`, `phase_summaries.gather` | same slug and fields, condensation-noted |
|
|
45
|
-
|
|
46
|
-
## Execute (delegated fan)
|
|
47
|
-
|
|
48
|
-
**Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md).
|
|
49
|
-
|
|
50
|
-
**Scope**: normal runs — findings authored by the `research-quick` lane are treated as pre-existing category files (Entry Gate resume check) and are NOT re-gathered.
|
|
51
|
-
|
|
52
|
-
### The `information-gatherer` agent
|
|
53
|
-
|
|
54
|
-
Each gathering category is delegated to ONE `information-gatherer` subagent via the Task tool — one agent per category, N categories → N agents. The agent receives the category id and the task context and writes that category's findings file itself; this skill only launches the fan and merges the results. Never gather category findings inline in this skill.
|
|
55
|
-
|
|
56
|
-
### Determine the gatherer count and categories
|
|
57
|
-
|
|
58
|
-
1. Read the **Gathering Strategy** section from `planning/research-plan.md` (heading may carry a numeric prefix, e.g. `## 6. Gathering Strategy` — match the heading by the words "Gathering Strategy", not the exact literal)
|
|
59
|
-
2. If gathering strategy found: use specified categories and count (cap at 8 max)
|
|
60
|
-
3. If no gathering strategy: fall back to the default 4 categories — codebase, documentation, configuration, external — and set `source: default`
|
|
61
|
-
4. Update state: `research_context.gathering_strategy`
|
|
62
|
-
|
|
63
|
-
**CRITICAL: Launch all N `information-gatherer` agents in ONE message for parallel execution.**
|
|
64
|
-
|
|
65
|
-
**Parallel Execution Pattern**:
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
Read gathering strategy from planning/research-plan.md
|
|
69
|
-
For each category in strategy:
|
|
70
|
-
Use Task tool: information-gatherer with source_category=[category_id] → analysis/findings/[category_id]-*.md
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
> **ANTI-PATTERN — never launch the gatherer fan as sequential Task calls or via the Skill tool. The `information-gatherer` agents go through the Task tool, one call per category, all N calls in ONE message.**
|
|
74
|
-
|
|
75
|
-
### Output artifact & handoff to research-synthesize
|
|
76
|
-
|
|
77
|
-
The output artifact of this skill is the **findings directory**: `analysis/findings/*.md`, exactly one file per gathering category (`[category-id]-*.md` — the category ID leads the filename; e.g. `codebase-*.md`, `docs-*.md`, plus any custom categories). The file tail adds only keywords NOT already in the category ID (no stacked/repeated slugs). `research_outputs.findings_directory` records that path in state.
|
|
78
|
-
|
|
79
|
-
`research-synthesize` consumes exactly these files: it reads every `analysis/findings/*.md` (the Entry Gate verifies one file per planned category exists), cross-references them in `analysis/synthesis.md`, and feeds the merged evidence into `outputs/research-report.md`. Nothing else from this skill flows downstream — the findings files ARE the contract.
|
|
80
|
-
|
|
81
|
-
### Merge & close (`findings-gathered`)
|
|
82
|
-
|
|
83
|
-
1. Verify one findings file per category exists under `analysis/findings/`
|
|
84
|
-
2. **State write**: append `findings-gathered` to `completed_phases`; update `research_context.gathering_strategy`, `phase_summaries.gather`; set `research_outputs.findings_directory`; bump `orchestrator.updated`. On failure (or a category permanently failing): append `findings-gathered` to `failed_phases`, increment `auto_fix_attempts["findings-gathered"]`. Then re-read state + run `verify_template` (see State Update Convention).
|
|
85
|
-
|
|
86
|
-
## State Update Convention (per step)
|
|
87
|
-
|
|
88
|
-
Apply after EVERY step above:
|
|
89
|
-
|
|
90
|
-
1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed (`findings-gathered`) plus that step's fields. Never batch multiple steps into one end-of-skill write.
|
|
91
|
-
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
92
|
-
3. **Failures** — if the step fails or its retries are abandoned, do NOT append to `completed_phases`; instead append the step's slug to `orchestrator.failed_phases` and increment `auto_fix_attempts["findings-gathered"]`.
|
|
93
|
-
4. **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-research.yml`. Fix any reported issue immediately before proceeding.
|
|
94
|
-
5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run to confirm the full state matches everything performed in this session.
|
|
95
|
-
|
|
96
|
-
## Recovery
|
|
97
|
-
|
|
98
|
-
| Step | Max Attempts | Strategy |
|
|
99
|
-
| ----------------------------- | ------------ | ------------------------------------------------------------- |
|
|
100
|
-
| Gather (`findings-gathered`) | 3 | Retry failed agents only, continue with successful categories |
|
|
101
|
-
|
|
102
|
-
## Exit Gate
|
|
103
|
-
|
|
104
|
-
Present results, get user confirmation, then hand off (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
105
|
-
|
|
106
|
-
### Results box
|
|
107
|
-
|
|
108
|
-
```markdown
|
|
109
|
-
## ✅ RESEARCH GATHER COMPLETE — <research question>
|
|
110
|
-
|
|
111
|
-
**Categories** — [N gathered / M planned]
|
|
112
|
-
**Findings files** — [list of `analysis/findings/*.md` files]
|
|
113
|
-
**Source** — [planner-specified strategy / default 4-category fallback]
|
|
114
|
-
|
|
115
|
-
**Artifacts**
|
|
116
|
-
|
|
117
|
-
- `analysis/findings/*.md` ([per category])
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
### Results-acceptance question
|
|
121
|
-
|
|
122
|
-
Use `question` — "Are these results correct?" with options:
|
|
123
|
-
|
|
124
|
-
- **Accept** — the findings are good; continue.
|
|
125
|
-
- **Adjust** — re-run only the affected categories (missing/failed agents only — successful category files stay), update state and artifacts, re-present the results box.
|
|
126
|
-
- **Discuss** — walk through a specific category's findings in more depth; then re-ask.
|
|
127
|
-
- **Stop here** — print the resume command (`/owflow:research-gather <task-path>`) and end. Note: on a later resume, only the missing categories re-fan.
|
|
128
|
-
|
|
129
|
-
### Next steps (after Accept)
|
|
130
|
-
|
|
131
|
-
- `→ /owflow:research-synthesize <task-path>` — `required` next: delegates the synthesis agent for pattern analysis (`analysis/synthesis.md`) + the comprehensive research report (`outputs/research-report.md`) with confidence per finding. Remaining after: scope → optional chain → finalize.
|
|
132
|
-
|
|
133
|
-
Then STOP.
|
|
1
|
+
---
|
|
2
|
+
name: owflow:research-gather
|
|
3
|
+
description: Research skill — reads the plan's Gathering Strategy and launches the parallel information-gatherer agent fan in ONE message, then merges per-category findings. Ends the gathering step of the research workflow (findings-gathered) and continues with research-synthesize.
|
|
4
|
+
argument-hint: "[task-path-or-identifier]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Research Gather — Parallel Findings Fan (findings-gathered)
|
|
9
|
+
|
|
10
|
+
Work phase of the research workflow. Reads the gathering strategy out of the research plan and launches the parallel information-gatherer fan (`analysis/findings/*.md`, one file per category). State lives in `orchestrator-state.yml` — this skill reads it on entry and writes results on exit.
|
|
11
|
+
|
|
12
|
+
Related phases: `/owflow:research-plan` (produces the plan this skill parses), `/owflow:research-synthesize` (consumes the merged findings). In the quick lane, `research-quick` may author findings inline — those are pre-existing category files for this skill.
|
|
13
|
+
|
|
14
|
+
## Entry Gate
|
|
15
|
+
|
|
16
|
+
Resolve the `task-path-or-identifier` argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)):
|
|
17
|
+
|
|
18
|
+
- **Path** (absolute or project-relative) to the task directory — use as-is.
|
|
19
|
+
- **Identifier** — exact directory name inside `.owflow/tasks/research/` (e.g., `2026-09-26-my-research`); resolve to its path.
|
|
20
|
+
- If the argument is **missing**, the path does **not exist**, or matches **no identifier** → print the blocked block, then STOP (never guess or auto-pick a task):
|
|
21
|
+
1. Steps that must be completed first (in order), each with its command:
|
|
22
|
+
- Research brief & plan (`brief-written`, `plan-created`) → `/owflow:research-plan <task-path>`
|
|
23
|
+
2. List available research-task identifiers (directories under `.owflow/tasks/research/`) to resume from, if any.
|
|
24
|
+
3. Hint: `Run /owflow:research-plan <task-path> first, /owflow:research <question> to start a task from scratch, or pass a task path/identifier to resume.`
|
|
25
|
+
|
|
26
|
+
### Prerequisites
|
|
27
|
+
|
|
28
|
+
| Required for this skill | Where verified | Produced by |
|
|
29
|
+
| ---------------------------------- | -------------------------------------------------------------------- | -------------------------------------- |
|
|
30
|
+
| State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:research <question>` or `/owflow:research-quick` |
|
|
31
|
+
| Plan exists | `plan-created` in `completed_phases` + `planning/research-plan.md` exists | `/owflow:research-plan <task-path>` |
|
|
32
|
+
|
|
33
|
+
1. **Read `orchestrator-state.yml`** from the task path. If missing → mid-pipeline bootstrap ([Missing-state Bootstrap](../orchestrator-framework/references/gate-contract.md), starting slug `findings-gathered`): `question` — create a fresh standard research task starting at this step, or decline → print `No research task found at <path>. Run /owflow:research <question> to start a task from scratch.` and STOP.
|
|
34
|
+
2. **Content check — plan file**: Read `planning/research-plan.md`. If the file is missing → print the blocked block, then STOP (`Run /owflow:research-plan <task-path> first.`). A missing `## Gathering Strategy` section does NOT block — Execute falls back to the default 4 categories.
|
|
35
|
+
3. **Skip/resume — only missing categories re-fan**: existing files under `analysis/findings/` count as done whether or not `findings-gathered` is already in `completed_phases` (artifacts before state; quick-lane and pre-split files included). Re-fan ONLY categories with no matching file, then append `findings-gathered` once every planned category has a file. All categories already present → adopt the slug if it is missing, report existing findings, and route to the Exit Gate.
|
|
36
|
+
|
|
37
|
+
## Input / Output Artifacts
|
|
38
|
+
|
|
39
|
+
| Artifact | Normal mode (full lane) | Quick mode (`research-quick`) |
|
|
40
|
+
| ---------------------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
41
|
+
| Consumed: `planning/research-plan.md` | parsed for `## Gathering Strategy` (fallback: 4 default categories) | same — quick plan always keeps a `## Gathering Strategy` section, pinning gather inline vs capped fan |
|
|
42
|
+
| Consumed: `information-gatherer` agents (Task tool, one per category, all N in ONE message) | N agents (cap 8) | zero agents (≤2 categories, inline) or the fan capped at 3 agents |
|
|
43
|
+
| Produced: `analysis/findings/*.md` | exactly one per gathering category | same paths — quick-lane findings are pre-existing category files here, never re-fanned |
|
|
44
|
+
| State write | `findings-gathered`; `gathering_strategy`, `research_outputs.findings_directory`, `phase_summaries.gather` | same slug and fields, condensation-noted |
|
|
45
|
+
|
|
46
|
+
## Execute (delegated fan)
|
|
47
|
+
|
|
48
|
+
**Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md).
|
|
49
|
+
|
|
50
|
+
**Scope**: normal runs — findings authored by the `research-quick` lane are treated as pre-existing category files (Entry Gate resume check) and are NOT re-gathered.
|
|
51
|
+
|
|
52
|
+
### The `information-gatherer` agent
|
|
53
|
+
|
|
54
|
+
Each gathering category is delegated to ONE `information-gatherer` subagent via the Task tool — one agent per category, N categories → N agents. The agent receives the category id and the task context and writes that category's findings file itself; this skill only launches the fan and merges the results. Never gather category findings inline in this skill.
|
|
55
|
+
|
|
56
|
+
### Determine the gatherer count and categories
|
|
57
|
+
|
|
58
|
+
1. Read the **Gathering Strategy** section from `planning/research-plan.md` (heading may carry a numeric prefix, e.g. `## 6. Gathering Strategy` — match the heading by the words "Gathering Strategy", not the exact literal)
|
|
59
|
+
2. If gathering strategy found: use specified categories and count (cap at 8 max)
|
|
60
|
+
3. If no gathering strategy: fall back to the default 4 categories — codebase, documentation, configuration, external — and set `source: default`
|
|
61
|
+
4. Update state: `research_context.gathering_strategy`
|
|
62
|
+
|
|
63
|
+
**CRITICAL: Launch all N `information-gatherer` agents in ONE message for parallel execution.**
|
|
64
|
+
|
|
65
|
+
**Parallel Execution Pattern**:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Read gathering strategy from planning/research-plan.md
|
|
69
|
+
For each category in strategy:
|
|
70
|
+
Use Task tool: information-gatherer with source_category=[category_id] → analysis/findings/[category_id]-*.md
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
> **ANTI-PATTERN — never launch the gatherer fan as sequential Task calls or via the Skill tool. The `information-gatherer` agents go through the Task tool, one call per category, all N calls in ONE message.**
|
|
74
|
+
|
|
75
|
+
### Output artifact & handoff to research-synthesize
|
|
76
|
+
|
|
77
|
+
The output artifact of this skill is the **findings directory**: `analysis/findings/*.md`, exactly one file per gathering category (`[category-id]-*.md` — the category ID leads the filename; e.g. `codebase-*.md`, `docs-*.md`, plus any custom categories). The file tail adds only keywords NOT already in the category ID (no stacked/repeated slugs). `research_outputs.findings_directory` records that path in state.
|
|
78
|
+
|
|
79
|
+
`research-synthesize` consumes exactly these files: it reads every `analysis/findings/*.md` (the Entry Gate verifies one file per planned category exists), cross-references them in `analysis/synthesis.md`, and feeds the merged evidence into `outputs/research-report.md`. Nothing else from this skill flows downstream — the findings files ARE the contract.
|
|
80
|
+
|
|
81
|
+
### Merge & close (`findings-gathered`)
|
|
82
|
+
|
|
83
|
+
1. Verify one findings file per category exists under `analysis/findings/`
|
|
84
|
+
2. **State write**: append `findings-gathered` to `completed_phases`; update `research_context.gathering_strategy`, `phase_summaries.gather`; set `research_outputs.findings_directory`; bump `orchestrator.updated`. On failure (or a category permanently failing): append `findings-gathered` to `failed_phases`, increment `auto_fix_attempts["findings-gathered"]`. Then re-read state + run `verify_template` (see State Update Convention).
|
|
85
|
+
|
|
86
|
+
## State Update Convention (per step)
|
|
87
|
+
|
|
88
|
+
Apply after EVERY step above:
|
|
89
|
+
|
|
90
|
+
1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed (`findings-gathered`) plus that step's fields. Never batch multiple steps into one end-of-skill write.
|
|
91
|
+
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
92
|
+
3. **Failures** — if the step fails or its retries are abandoned, do NOT append to `completed_phases`; instead append the step's slug to `orchestrator.failed_phases` and increment `auto_fix_attempts["findings-gathered"]`.
|
|
93
|
+
4. **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-research.yml`. Fix any reported issue immediately before proceeding.
|
|
94
|
+
5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run to confirm the full state matches everything performed in this session.
|
|
95
|
+
|
|
96
|
+
## Recovery
|
|
97
|
+
|
|
98
|
+
| Step | Max Attempts | Strategy |
|
|
99
|
+
| ----------------------------- | ------------ | ------------------------------------------------------------- |
|
|
100
|
+
| Gather (`findings-gathered`) | 3 | Retry failed agents only, continue with successful categories |
|
|
101
|
+
|
|
102
|
+
## Exit Gate
|
|
103
|
+
|
|
104
|
+
Present results, get user confirmation, then hand off (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
105
|
+
|
|
106
|
+
### Results box
|
|
107
|
+
|
|
108
|
+
```markdown
|
|
109
|
+
## ✅ RESEARCH GATHER COMPLETE — <research question>
|
|
110
|
+
|
|
111
|
+
**Categories** — [N gathered / M planned]
|
|
112
|
+
**Findings files** — [list of `analysis/findings/*.md` files]
|
|
113
|
+
**Source** — [planner-specified strategy / default 4-category fallback]
|
|
114
|
+
|
|
115
|
+
**Artifacts**
|
|
116
|
+
|
|
117
|
+
- `analysis/findings/*.md` ([per category])
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Results-acceptance question
|
|
121
|
+
|
|
122
|
+
Use `question` — "Are these results correct?" with options:
|
|
123
|
+
|
|
124
|
+
- **Accept** — the findings are good; continue.
|
|
125
|
+
- **Adjust** — re-run only the affected categories (missing/failed agents only — successful category files stay), update state and artifacts, re-present the results box.
|
|
126
|
+
- **Discuss** — walk through a specific category's findings in more depth; then re-ask.
|
|
127
|
+
- **Stop here** — print the resume command (`/owflow:research-gather <task-path>`) and end. Note: on a later resume, only the missing categories re-fan.
|
|
128
|
+
|
|
129
|
+
### Next steps (after Accept)
|
|
130
|
+
|
|
131
|
+
- `→ /owflow:research-synthesize <task-path>` — `required` next: delegates the synthesis agent for pattern analysis (`analysis/synthesis.md`) + the comprehensive research report (`outputs/research-report.md`) with confidence per finding. Remaining after: scope → optional chain → finalize.
|
|
132
|
+
|
|
133
|
+
Then STOP.
|
|
@@ -1,141 +1,141 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: owflow:research-plan
|
|
3
|
-
description: Research skill — creates the research brief, delegates methodology selection and planning to the research-planner agent, and writes the research plan with a parsable Gathering Strategy. First work phase of the research workflow; continues with research-gather.
|
|
4
|
-
argument-hint: "[task-path-or-identifier | \"description\"]"
|
|
5
|
-
user-invocable: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Research Plan — Brief, Methodology & Plan (brief-written, plan-created)
|
|
9
|
-
|
|
10
|
-
Work phase of the research workflow. Creates the research brief, delegates methodology selection and gathering-strategy planning to the `research-planner` agent, and writes the research plan. State lives in `orchestrator-state.yml` — this skill reads it on entry and writes results on exit.
|
|
11
|
-
|
|
12
|
-
## Entry Gate
|
|
13
|
-
|
|
14
|
-
Resolve the argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). The argument may be:
|
|
15
|
-
|
|
16
|
-
- **Path** (absolute or project-relative) to the task directory — use as-is.
|
|
17
|
-
- **Identifier** — exact directory name inside `.owflow/tasks/research/` (e.g., `2026-09-26-my-research`); resolve to its path.
|
|
18
|
-
- **Research question** — anything else (free text, e.g. `"evaluate caching strategies for our API"`) is treated as a new research question — the routing table asks first.
|
|
19
|
-
|
|
20
|
-
Route by argument kind:
|
|
21
|
-
|
|
22
|
-
| Situation | Route |
|
|
23
|
-
| ------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
24
|
-
| Task path/identifier, state + question present | Full lane below (brief step → plan step) |
|
|
25
|
-
| Research question | Ask via `question`: full pipeline through the dispatcher / quick fused task via `/owflow:research-quick "<question>"` / cancel |
|
|
26
|
-
| Missing argument | Prompt for input (path, identifier, or research question), then re-route |
|
|
27
|
-
|
|
28
|
-
If the path does **not exist** or matches **no identifier** → print the blocked block, then STOP (never guess or auto-pick a task):
|
|
29
|
-
|
|
30
|
-
1. Steps that must be completed first (in order), each with its command:
|
|
31
|
-
- State initialization (`task.*`) → `/owflow:research <question>`
|
|
32
|
-
2. List available research-task identifiers (directories under `.owflow/tasks/research/`) to resume from, if any.
|
|
33
|
-
3. Hint: `Run /owflow:research <question> to start a task from scratch, /owflow:research-quick "<question>" for a quick fused task, or pass a task path/identifier to resume.`
|
|
34
|
-
|
|
35
|
-
### Prerequisites
|
|
36
|
-
|
|
37
|
-
| Required for this skill | Where verified | Produced by |
|
|
38
|
-
| ------------------------------------- | ---------------------------------------------------- | ------------------------------------------------- |
|
|
39
|
-
| State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:research <question>` (dispatcher init) |
|
|
40
|
-
| Research question resolved (resume) | `research_context.research_question` non-null in state | brief step (`brief-written`) |
|
|
41
|
-
|
|
42
|
-
1. **Read `orchestrator-state.yml`** from the task path. If missing → a question argument follows the routing table (ask first). Otherwise mid-pipeline bootstrap ([Missing-state Bootstrap](../orchestrator-framework/references/gate-contract.md), starting slug `brief-written`): `question` — create a fresh standard research task starting at this step, or decline → print `No research task found at <path>. Run /owflow:research <question> to start a task from scratch, or /owflow:research-quick "<question>" for a quick fused task.` and STOP.
|
|
43
|
-
2. **Content check (resume)**: `research_context.research_question` must be non-null. If null (state exists, question never recorded), prompt via `question` — "What is your research question?" — and let the brief step record it in state.
|
|
44
|
-
|
|
45
|
-
## Input / Output Artifacts
|
|
46
|
-
|
|
47
|
-
| Artifact | Normal mode (full lane) | Quick mode (`research-quick`) |
|
|
48
|
-
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
49
|
-
| Consumed: state (`research_context.research_question`, `.research_type`, `.project_doc_paths`) | input | same — quick bootstrap already records them (condensed brief) |
|
|
50
|
-
| Consumed: `references/research-methodologies.md` | read before delegation | read by research-quick directly (no delegation) |
|
|
51
|
-
| Produced: `planning/research-brief.md` | inline (brief step) | inline — condensed brief, identical path |
|
|
52
|
-
| Produced: `planning/research-plan.md`, `planning/sources.md` | delegated to `research-planner` (plan step) | written directly inline (the ONLY exception to the planner-delegation anti-pattern) |
|
|
53
|
-
| State write | `brief-written`, `plan-created` slugs; `methodology`, `sources`, `phase_summaries.plan` | same slugs and fields, condensation-noted |
|
|
54
|
-
|
|
55
|
-
3. **Skip/resume** — artifacts before state. If the file exists but its slug is missing, adopt it (append the slug, backfill still-null fields) instead of re-running:
|
|
56
|
-
- `planning/research-brief.md` exists → append `brief-written` if missing, then skip the brief step.
|
|
57
|
-
- `planning/research-plan.md` AND `planning/sources.md` exist → append `plan-created` if missing, backfill `methodology` / `sources` / `phase_summaries.plan` when still null, report the existing plan summary, and route to the Exit Gate.
|
|
58
|
-
- A slug whose artifact is missing → drop the slug and re-run that step.
|
|
59
|
-
|
|
60
|
-
## Execute (full lane — inline brief, delegated planning)
|
|
61
|
-
|
|
62
|
-
**Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md) and the [Dispatcher & Handoff Pattern](../orchestrator-framework/references/dispatcher-handoff.md).
|
|
63
|
-
|
|
64
|
-
### Brief (`brief-written`, inline)
|
|
65
|
-
|
|
66
|
-
**Artifacts**: `planning/research-brief.md`
|
|
67
|
-
**Resume check**: if `planning/research-brief.md` exists, adopt it (append `brief-written` if that slug is missing) and skip to the plan step.
|
|
68
|
-
|
|
69
|
-
1. Parse research question (from command or prompt user)
|
|
70
|
-
2. Classify research type. If `research_context.research_type` is already one of `technical`, `requirements`, `literature`, `mixed` (the dispatcher or `goal-research` wrote it from `--type`), keep that value. The template placeholder `"technical | requirements | literature | mixed"` is not a classification — auto-detect from keywords in that case. This skill's own command does not take `--type`.
|
|
71
|
-
3. Determine scope (included, excluded, constraints)
|
|
72
|
-
4. Define success criteria
|
|
73
|
-
5. Create research brief
|
|
74
|
-
6. Update state: set `research_context.research_type`, `research_question`, `scope`
|
|
75
|
-
7. **Discover project documentation**: Read `.owflow/docs/INDEX.md` (if exists), extract ALL file paths from the "Project Documentation" section — includes predefined docs AND any user-added project docs. Store as `research_context.project_doc_paths` in state.
|
|
76
|
-
|
|
77
|
-
**State write**: append `brief-written` to `completed_phases` (the brief step's fields above go in with it); bump `orchestrator.updated`. On failure: append `brief-written` to `failed_phases`, increment `auto_fix_attempts["brief-written"]`. Then re-read state + run `verify_template` (see State Update Convention).
|
|
78
|
-
|
|
79
|
-
### Plan (`plan-created`, delegated)
|
|
80
|
-
|
|
81
|
-
**Artifacts**: `planning/research-plan.md`, `planning/sources.md`
|
|
82
|
-
**Resume check**: if `planning/research-plan.md` AND `planning/sources.md` exist, adopt them (append `plan-created` if that slug is missing; backfill `methodology`, `sources`, and `phase_summaries.plan` when still null) and skip to the Exit Gate.
|
|
83
|
-
|
|
84
|
-
> **ANTI-PATTERN — never write the research plan yourself. "The question is simple" is NOT a reason to skip delegation.**
|
|
85
|
-
|
|
86
|
-
1. **Read `references/research-methodologies.md` NOW using the Read tool** — research type classification, methodology selection, gathering strategies (the reference lives in this skill's own folder).
|
|
87
|
-
2. **INVOKE NOW**: Task tool - `research-planner` subagent (never the Skill tool — this is an agent). Pass (Pattern 7 — accumulated context): task_path, research_brief_path, research_type, research_question, scope, project_doc_paths (from state). Output: `planning/research-plan.md`, `planning/sources.md`.
|
|
88
|
-
3. **Plan parsability**: the plan SHOULD keep a `## Gathering Strategy` section (categories + count). `research-gather` parses that section; if the planner omitted it, do NOT hand-author the section in a full-lane run — note the omission in `phase_summaries.plan` and let gather fall back to its default 4 categories.
|
|
89
|
-
4. **State write**: append `plan-created` to `completed_phases`; update `research_context.methodology`, `sources`, `phase_summaries.plan`; bump `orchestrator.updated`. On failure: append `plan-created` to `failed_phases`, increment `auto_fix_attempts["plan-created"]`. Then re-read state + run `verify_template`.
|
|
90
|
-
|
|
91
|
-
## State Update Convention (per step)
|
|
92
|
-
|
|
93
|
-
Apply after EVERY step above:
|
|
94
|
-
|
|
95
|
-
1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed (e.g. `brief-written`, `plan-created`) plus that step's fields. Never batch multiple steps into one end-of-skill write.
|
|
96
|
-
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
97
|
-
3. **Failures** — if the step fails or its retries are abandoned, do NOT append to `completed_phases`; instead append the step's slug to `orchestrator.failed_phases` and increment `auto_fix_attempts["<slug>"]`.
|
|
98
|
-
4. **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-research.yml`. Fix any reported issue immediately before proceeding.
|
|
99
|
-
5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run to confirm the full state matches everything performed in this session.
|
|
100
|
-
|
|
101
|
-
## Recovery
|
|
102
|
-
|
|
103
|
-
| Step | Max Attempts | Strategy |
|
|
104
|
-
| --------------------------- | ------------ | ----------------------------------------------------- |
|
|
105
|
-
| Brief (`brief-written`) | 1 | Prompt user for clarification if question unclear |
|
|
106
|
-
| Plan (`plan-created`) | 2 | Expand search patterns, use fallback mixed methodology |
|
|
107
|
-
|
|
108
|
-
## Exit Gate
|
|
109
|
-
|
|
110
|
-
Present results, get user confirmation, then hand off (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
111
|
-
|
|
112
|
-
### Results box
|
|
113
|
-
|
|
114
|
-
```markdown
|
|
115
|
-
## ✅ RESEARCH PLAN COMPLETE — <research question>
|
|
116
|
-
|
|
117
|
-
**Type** — [research type]
|
|
118
|
-
**Methodology** — [methodology summary from state]
|
|
119
|
-
**Gathering categories** — [N categories in the plan's Gathering Strategy]
|
|
120
|
-
|
|
121
|
-
**Artifacts**
|
|
122
|
-
|
|
123
|
-
- `planning/research-brief.md`
|
|
124
|
-
- `planning/research-plan.md` (keeps the parsable `## Gathering Strategy` section)
|
|
125
|
-
- `planning/sources.md`
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### Results-acceptance question
|
|
129
|
-
|
|
130
|
-
Use `question` — "Are these results correct?" with options:
|
|
131
|
-
|
|
132
|
-
- **Accept** — the brief/plan are good; continue.
|
|
133
|
-
- **Adjust** — re-run only the affected step (brief or plan) with the user's corrections, update state and artifacts, re-present the results box.
|
|
134
|
-
- **Discuss** — walk through a specific part (research type, methodology, gathering strategy) in more depth; then re-ask.
|
|
135
|
-
- **Stop here** — print the resume command (`/owflow:research-plan <task-path>`) and end.
|
|
136
|
-
|
|
137
|
-
### Next steps (after Accept)
|
|
138
|
-
|
|
139
|
-
- `→ /owflow:research-gather <task-path>` — `required` next: launches the parallel `information-gatherer` fan and merges per-category findings (`findings-gathered`), then `research-synthesize` fuses synthesis + research report. Remaining after: optional chain (user choice) → finalize.
|
|
140
|
-
|
|
141
|
-
Then STOP.
|
|
1
|
+
---
|
|
2
|
+
name: owflow:research-plan
|
|
3
|
+
description: Research skill — creates the research brief, delegates methodology selection and planning to the research-planner agent, and writes the research plan with a parsable Gathering Strategy. First work phase of the research workflow; continues with research-gather.
|
|
4
|
+
argument-hint: "[task-path-or-identifier | \"description\"]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Research Plan — Brief, Methodology & Plan (brief-written, plan-created)
|
|
9
|
+
|
|
10
|
+
Work phase of the research workflow. Creates the research brief, delegates methodology selection and gathering-strategy planning to the `research-planner` agent, and writes the research plan. State lives in `orchestrator-state.yml` — this skill reads it on entry and writes results on exit.
|
|
11
|
+
|
|
12
|
+
## Entry Gate
|
|
13
|
+
|
|
14
|
+
Resolve the argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). The argument may be:
|
|
15
|
+
|
|
16
|
+
- **Path** (absolute or project-relative) to the task directory — use as-is.
|
|
17
|
+
- **Identifier** — exact directory name inside `.owflow/tasks/research/` (e.g., `2026-09-26-my-research`); resolve to its path.
|
|
18
|
+
- **Research question** — anything else (free text, e.g. `"evaluate caching strategies for our API"`) is treated as a new research question — the routing table asks first.
|
|
19
|
+
|
|
20
|
+
Route by argument kind:
|
|
21
|
+
|
|
22
|
+
| Situation | Route |
|
|
23
|
+
| ------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
24
|
+
| Task path/identifier, state + question present | Full lane below (brief step → plan step) |
|
|
25
|
+
| Research question | Ask via `question`: full pipeline through the dispatcher / quick fused task via `/owflow:research-quick "<question>"` / cancel |
|
|
26
|
+
| Missing argument | Prompt for input (path, identifier, or research question), then re-route |
|
|
27
|
+
|
|
28
|
+
If the path does **not exist** or matches **no identifier** → print the blocked block, then STOP (never guess or auto-pick a task):
|
|
29
|
+
|
|
30
|
+
1. Steps that must be completed first (in order), each with its command:
|
|
31
|
+
- State initialization (`task.*`) → `/owflow:research <question>`
|
|
32
|
+
2. List available research-task identifiers (directories under `.owflow/tasks/research/`) to resume from, if any.
|
|
33
|
+
3. Hint: `Run /owflow:research <question> to start a task from scratch, /owflow:research-quick "<question>" for a quick fused task, or pass a task path/identifier to resume.`
|
|
34
|
+
|
|
35
|
+
### Prerequisites
|
|
36
|
+
|
|
37
|
+
| Required for this skill | Where verified | Produced by |
|
|
38
|
+
| ------------------------------------- | ---------------------------------------------------- | ------------------------------------------------- |
|
|
39
|
+
| State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:research <question>` (dispatcher init) |
|
|
40
|
+
| Research question resolved (resume) | `research_context.research_question` non-null in state | brief step (`brief-written`) |
|
|
41
|
+
|
|
42
|
+
1. **Read `orchestrator-state.yml`** from the task path. If missing → a question argument follows the routing table (ask first). Otherwise mid-pipeline bootstrap ([Missing-state Bootstrap](../orchestrator-framework/references/gate-contract.md), starting slug `brief-written`): `question` — create a fresh standard research task starting at this step, or decline → print `No research task found at <path>. Run /owflow:research <question> to start a task from scratch, or /owflow:research-quick "<question>" for a quick fused task.` and STOP.
|
|
43
|
+
2. **Content check (resume)**: `research_context.research_question` must be non-null. If null (state exists, question never recorded), prompt via `question` — "What is your research question?" — and let the brief step record it in state.
|
|
44
|
+
|
|
45
|
+
## Input / Output Artifacts
|
|
46
|
+
|
|
47
|
+
| Artifact | Normal mode (full lane) | Quick mode (`research-quick`) |
|
|
48
|
+
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
49
|
+
| Consumed: state (`research_context.research_question`, `.research_type`, `.project_doc_paths`) | input | same — quick bootstrap already records them (condensed brief) |
|
|
50
|
+
| Consumed: `references/research-methodologies.md` | read before delegation | read by research-quick directly (no delegation) |
|
|
51
|
+
| Produced: `planning/research-brief.md` | inline (brief step) | inline — condensed brief, identical path |
|
|
52
|
+
| Produced: `planning/research-plan.md`, `planning/sources.md` | delegated to `research-planner` (plan step) | written directly inline (the ONLY exception to the planner-delegation anti-pattern) |
|
|
53
|
+
| State write | `brief-written`, `plan-created` slugs; `methodology`, `sources`, `phase_summaries.plan` | same slugs and fields, condensation-noted |
|
|
54
|
+
|
|
55
|
+
3. **Skip/resume** — artifacts before state. If the file exists but its slug is missing, adopt it (append the slug, backfill still-null fields) instead of re-running:
|
|
56
|
+
- `planning/research-brief.md` exists → append `brief-written` if missing, then skip the brief step.
|
|
57
|
+
- `planning/research-plan.md` AND `planning/sources.md` exist → append `plan-created` if missing, backfill `methodology` / `sources` / `phase_summaries.plan` when still null, report the existing plan summary, and route to the Exit Gate.
|
|
58
|
+
- A slug whose artifact is missing → drop the slug and re-run that step.
|
|
59
|
+
|
|
60
|
+
## Execute (full lane — inline brief, delegated planning)
|
|
61
|
+
|
|
62
|
+
**Read first**: the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md) and the [Dispatcher & Handoff Pattern](../orchestrator-framework/references/dispatcher-handoff.md).
|
|
63
|
+
|
|
64
|
+
### Brief (`brief-written`, inline)
|
|
65
|
+
|
|
66
|
+
**Artifacts**: `planning/research-brief.md`
|
|
67
|
+
**Resume check**: if `planning/research-brief.md` exists, adopt it (append `brief-written` if that slug is missing) and skip to the plan step.
|
|
68
|
+
|
|
69
|
+
1. Parse research question (from command or prompt user)
|
|
70
|
+
2. Classify research type. If `research_context.research_type` is already one of `technical`, `requirements`, `literature`, `mixed` (the dispatcher or `goal-research` wrote it from `--type`), keep that value. The template placeholder `"technical | requirements | literature | mixed"` is not a classification — auto-detect from keywords in that case. This skill's own command does not take `--type`.
|
|
71
|
+
3. Determine scope (included, excluded, constraints)
|
|
72
|
+
4. Define success criteria
|
|
73
|
+
5. Create research brief
|
|
74
|
+
6. Update state: set `research_context.research_type`, `research_question`, `scope`
|
|
75
|
+
7. **Discover project documentation**: Read `.owflow/docs/INDEX.md` (if exists), extract ALL file paths from the "Project Documentation" section — includes predefined docs AND any user-added project docs. Store as `research_context.project_doc_paths` in state.
|
|
76
|
+
|
|
77
|
+
**State write**: append `brief-written` to `completed_phases` (the brief step's fields above go in with it); bump `orchestrator.updated`. On failure: append `brief-written` to `failed_phases`, increment `auto_fix_attempts["brief-written"]`. Then re-read state + run `verify_template` (see State Update Convention).
|
|
78
|
+
|
|
79
|
+
### Plan (`plan-created`, delegated)
|
|
80
|
+
|
|
81
|
+
**Artifacts**: `planning/research-plan.md`, `planning/sources.md`
|
|
82
|
+
**Resume check**: if `planning/research-plan.md` AND `planning/sources.md` exist, adopt them (append `plan-created` if that slug is missing; backfill `methodology`, `sources`, and `phase_summaries.plan` when still null) and skip to the Exit Gate.
|
|
83
|
+
|
|
84
|
+
> **ANTI-PATTERN — never write the research plan yourself. "The question is simple" is NOT a reason to skip delegation.**
|
|
85
|
+
|
|
86
|
+
1. **Read `references/research-methodologies.md` NOW using the Read tool** — research type classification, methodology selection, gathering strategies (the reference lives in this skill's own folder).
|
|
87
|
+
2. **INVOKE NOW**: Task tool - `research-planner` subagent (never the Skill tool — this is an agent). Pass (Pattern 7 — accumulated context): task_path, research_brief_path, research_type, research_question, scope, project_doc_paths (from state). Output: `planning/research-plan.md`, `planning/sources.md`.
|
|
88
|
+
3. **Plan parsability**: the plan SHOULD keep a `## Gathering Strategy` section (categories + count). `research-gather` parses that section; if the planner omitted it, do NOT hand-author the section in a full-lane run — note the omission in `phase_summaries.plan` and let gather fall back to its default 4 categories.
|
|
89
|
+
4. **State write**: append `plan-created` to `completed_phases`; update `research_context.methodology`, `sources`, `phase_summaries.plan`; bump `orchestrator.updated`. On failure: append `plan-created` to `failed_phases`, increment `auto_fix_attempts["plan-created"]`. Then re-read state + run `verify_template`.
|
|
90
|
+
|
|
91
|
+
## State Update Convention (per step)
|
|
92
|
+
|
|
93
|
+
Apply after EVERY step above:
|
|
94
|
+
|
|
95
|
+
1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed (e.g. `brief-written`, `plan-created`) plus that step's fields. Never batch multiple steps into one end-of-skill write.
|
|
96
|
+
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
97
|
+
3. **Failures** — if the step fails or its retries are abandoned, do NOT append to `completed_phases`; instead append the step's slug to `orchestrator.failed_phases` and increment `auto_fix_attempts["<slug>"]`.
|
|
98
|
+
4. **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-research.yml`. Fix any reported issue immediately before proceeding.
|
|
99
|
+
5. **Final check** — before the Exit Gate, one consolidated re-read + `verify_template` run to confirm the full state matches everything performed in this session.
|
|
100
|
+
|
|
101
|
+
## Recovery
|
|
102
|
+
|
|
103
|
+
| Step | Max Attempts | Strategy |
|
|
104
|
+
| --------------------------- | ------------ | ----------------------------------------------------- |
|
|
105
|
+
| Brief (`brief-written`) | 1 | Prompt user for clarification if question unclear |
|
|
106
|
+
| Plan (`plan-created`) | 2 | Expand search patterns, use fallback mixed methodology |
|
|
107
|
+
|
|
108
|
+
## Exit Gate
|
|
109
|
+
|
|
110
|
+
Present results, get user confirmation, then hand off (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
111
|
+
|
|
112
|
+
### Results box
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
## ✅ RESEARCH PLAN COMPLETE — <research question>
|
|
116
|
+
|
|
117
|
+
**Type** — [research type]
|
|
118
|
+
**Methodology** — [methodology summary from state]
|
|
119
|
+
**Gathering categories** — [N categories in the plan's Gathering Strategy]
|
|
120
|
+
|
|
121
|
+
**Artifacts**
|
|
122
|
+
|
|
123
|
+
- `planning/research-brief.md`
|
|
124
|
+
- `planning/research-plan.md` (keeps the parsable `## Gathering Strategy` section)
|
|
125
|
+
- `planning/sources.md`
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Results-acceptance question
|
|
129
|
+
|
|
130
|
+
Use `question` — "Are these results correct?" with options:
|
|
131
|
+
|
|
132
|
+
- **Accept** — the brief/plan are good; continue.
|
|
133
|
+
- **Adjust** — re-run only the affected step (brief or plan) with the user's corrections, update state and artifacts, re-present the results box.
|
|
134
|
+
- **Discuss** — walk through a specific part (research type, methodology, gathering strategy) in more depth; then re-ask.
|
|
135
|
+
- **Stop here** — print the resume command (`/owflow:research-plan <task-path>`) and end.
|
|
136
|
+
|
|
137
|
+
### Next steps (after Accept)
|
|
138
|
+
|
|
139
|
+
- `→ /owflow:research-gather <task-path>` — `required` next: launches the parallel `information-gatherer` fan and merges per-category findings (`findings-gathered`), then `research-synthesize` fuses synthesis + research report. Remaining after: optional chain (user choice) → finalize.
|
|
140
|
+
|
|
141
|
+
Then STOP.
|