owflow 0.2.0 → 0.4.2
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 +83 -28
- package/dist/agents/code-reviewer.md +1 -1
- package/dist/agents/information-gatherer.md +691 -691
- package/dist/agents/production-readiness-checker.md +1 -1
- package/dist/agents/project-analyzer.md +0 -1
- package/dist/agents/research-planner.md +450 -447
- package/dist/agents/research-synthesizer.md +403 -401
- package/dist/agents/solution-brainstormer.md +257 -257
- package/dist/agents/solution-designer.md +372 -372
- package/dist/agents/task-classifier.md +3 -3
- package/dist/commands/agents-md-generator.md +36 -0
- package/dist/commands/dev-analyze.md +33 -0
- package/dist/commands/dev-bugfix.md +37 -0
- package/dist/commands/dev-finalize.md +33 -0
- package/dist/commands/dev-implement.md +34 -0
- package/dist/commands/dev-plan.md +37 -0
- package/dist/commands/dev-spec.md +37 -0
- package/dist/commands/dev-tdd-red.md +33 -0
- package/dist/commands/dev-verify.md +33 -0
- package/dist/commands/development.md +11 -12
- package/dist/commands/diagrams-mermaid.md +3 -4
- package/dist/commands/flow-init.md +3 -4
- package/dist/commands/goal-development.md +32 -0
- package/dist/commands/goal-research.md +33 -0
- package/dist/commands/html-renderer.md +3 -4
- package/dist/commands/migration.md +3 -4
- package/dist/commands/performance.md +3 -4
- package/dist/commands/research-brainstorm.md +33 -0
- package/dist/commands/research-converge.md +33 -0
- package/dist/commands/research-design.md +33 -0
- package/dist/commands/research-finalize.md +33 -0
- package/dist/commands/research-fork.md +40 -0
- package/dist/commands/research-gather.md +33 -0
- package/dist/commands/research-plan.md +37 -0
- package/dist/commands/research-quick.md +37 -0
- package/dist/commands/research-synthesize.md +33 -0
- package/dist/commands/research.md +55 -37
- package/dist/commands/reviews-code.md +4 -4
- package/dist/commands/reviews-pragmatic.md +4 -4
- package/dist/commands/reviews-production-readiness.md +4 -4
- package/dist/commands/reviews-reality-check.md +4 -4
- package/dist/commands/reviews-spec-audit.md +4 -4
- package/dist/commands/rule-reviewer.md +38 -0
- package/dist/commands/standards-discover.md +3 -4
- package/dist/commands/standards-update.md +3 -4
- package/dist/commands/work.md +21 -21
- package/dist/configuration/skills-config.js +1 -1
- package/dist/index.js +5 -2
- package/dist/skills/agents-md-generator/SKILL.md +223 -0
- package/dist/skills/codebase-analyzer/SKILL.md +1 -1
- package/dist/skills/dev-analyze/SKILL.md +115 -0
- package/dist/skills/dev-bugfix/SKILL.md +452 -0
- package/dist/skills/dev-finalize/SKILL.md +118 -0
- package/dist/skills/dev-implement/SKILL.md +167 -0
- package/dist/skills/dev-plan/SKILL.md +147 -0
- package/dist/skills/dev-spec/SKILL.md +182 -0
- package/dist/skills/dev-tdd-red/SKILL.md +94 -0
- package/dist/skills/dev-verify/SKILL.md +160 -0
- package/dist/skills/development/SKILL.md +130 -522
- package/dist/skills/diagrams-mermaid/SKILL.md +3 -1
- package/dist/skills/docs-manager/SKILL.md +4 -4
- package/dist/skills/docs-manager/references/agents-md-template.md +1 -1
- package/dist/skills/flow-init/SKILL.md +34 -13
- package/dist/skills/goal-development/SKILL.md +96 -0
- package/dist/skills/goal-research/SKILL.md +118 -0
- package/dist/skills/html-renderer/SKILL.md +14 -1
- package/dist/skills/implementation-plan-executor/SKILL.md +1 -1
- package/dist/skills/implementation-verifier/SKILL.md +1 -1
- package/dist/skills/migration/SKILL.md +63 -18
- package/dist/skills/orchestrator-framework/SKILL.md +1 -1
- package/dist/skills/orchestrator-framework/references/command-namespacing.md +7 -0
- package/dist/skills/orchestrator-framework/references/confirm-or-revise-exception.md +20 -0
- package/dist/skills/orchestrator-framework/references/delegation-rules.md +54 -0
- package/dist/skills/orchestrator-framework/references/dispatcher-handoff.md +27 -0
- package/dist/skills/orchestrator-framework/references/gate-contract.md +112 -0
- package/dist/skills/orchestrator-framework/references/orchestrator-creation-checklist.md +3 -0
- package/dist/skills/orchestrator-framework/references/orchestrator-patterns.md +8 -50
- package/dist/skills/performance/SKILL.md +52 -18
- package/dist/skills/research/SKILL.md +249 -462
- package/dist/skills/research-brainstorm/SKILL.md +120 -0
- package/dist/skills/{research → research-brainstorm}/references/brainstorming-techniques.md +1 -1
- package/dist/skills/research-converge/SKILL.md +130 -0
- package/dist/skills/research-design/SKILL.md +146 -0
- package/dist/skills/{research → research-design}/references/design-techniques.md +1 -1
- package/dist/skills/research-finalize/SKILL.md +125 -0
- package/dist/skills/research-fork/SKILL.md +190 -0
- package/dist/skills/research-gather/SKILL.md +133 -0
- package/dist/skills/research-plan/SKILL.md +141 -0
- package/dist/skills/research-quick/SKILL.md +139 -0
- package/dist/skills/research-synthesize/SKILL.md +127 -0
- package/dist/skills/rule-reviewer/SKILL.md +334 -0
- package/dist/skills/standards-discover/SKILL.md +37 -14
- package/dist/skills/standards-update/SKILL.md +58 -10
- package/dist/templates/orchestrator-state-development.yml +14 -13
- package/dist/templates/orchestrator-state-research.yml +19 -13
- package/dist/tools/fork_task.js +36 -0
- package/dist/tools/verify_template.js +10 -31
- package/dist/utils/file-util.js +14 -8
- package/dist/utils/fork-task.js +74 -0
- package/dist/utils/plugin-info.js +20 -0
- package/dist/utils/yaml-structure.js +32 -0
- package/package.json +1 -1
- package/dist/commands/quick-bugfix.md +0 -37
- package/dist/commands/quick-dev.md +0 -182
- package/dist/commands/quick-plan.md +0 -167
- package/dist/constants.js +0 -4
- package/dist/skills/quick-bugfix/SKILL.md +0 -311
- package/dist/templates/quick-bugfix-task.yml +0 -10
- package/dist/templates/quick-dev-task.yml +0 -10
- package/dist/templates/quick-plan-task.yml +0 -11
- /package/dist/skills/{research → research-plan}/references/research-methodologies.md +0 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: owflow:research-fork
|
|
3
|
+
description: Research utility — forks a research task by copying its directory wholesale into a NEW task, then trimming the copied state so the fork continues from a chosen completed step (fork point) onwards. Passing only the task path is enough — the skill orients on the source research, then asks the user (with suggestions) for the fork's intent, fork point, and name. The source task is never modified.
|
|
4
|
+
argument-hint: "<task-path-or-identifier> [\"what this fork should explore\"] [--from=<slug>] [--name=\"...\"]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Research Fork — Task Divergence Copy (utility, no phases)
|
|
9
|
+
|
|
10
|
+
Utility skill for the research workflow. Copies an existing research task directory (`.owflow/tasks/research/<name>`) **wholesale** into a new task so it can **diverge from the previously run one** — e.g. re-run synthesis or the optional chain (brainstorm → converge → design) with different choices while the original stays intact.
|
|
11
|
+
|
|
12
|
+
The copy is verbatim — every artifact, including outputs of steps after the fork point (the source keeps them too; the resumed step overwrites its outputs). The fork's `orchestrator-state.yml` is then trimmed: `completed_phases` cut at the **fork point** (a completed step slug), so the fork **continues from the point onwards**. The fork then continues at full fidelity from the fork point with every research subskill.
|
|
13
|
+
|
|
14
|
+
**The task path is the only required input.** A bare `/owflow:research-fork <task-path>` is answered by a short guided setup: the skill reads the source research, then asks up to three questions — intent, fork point, name — each pre-filled with suggestions drawn from that research, and confirms the resulting plan before copying. Every question is skipped when its input is already supplied: a quoted description answers the intent question, `--from=<slug>` the fork point, `--name="..."` the name. Nothing is ever guessed silently — suggestions are proposals, the user answers.
|
|
15
|
+
|
|
16
|
+
Copy mechanics live in the deterministic `fork_task` tool (delegation anti-pattern does not apply — this is a file-copy utility, NOT research work; never perform the copy with bash `cp` yourself). State lives in `orchestrator-state.yml` — this skill reads source state on entry; the tool writes the forked state.
|
|
17
|
+
|
|
18
|
+
This is NOT a pipeline step: it creates a task, stops at its Exit Gate, and never chains into other skills. Fork anytime — including on `task.status: completed` tasks (`research-completed` is trimmed from the fork's `completed_phases`).
|
|
19
|
+
|
|
20
|
+
## Entry Gate
|
|
21
|
+
|
|
22
|
+
Resolve the `task-path-or-identifier` argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)):
|
|
23
|
+
|
|
24
|
+
- **Path** (absolute or project-relative) to the task directory — use as-is.
|
|
25
|
+
- **Identifier** — exact directory name inside `.owflow/tasks/research/` (e.g., `2026-09-26-my-research`); resolve to its path.
|
|
26
|
+
- Any remaining free text in the argument is the **intent description** (see Guided setup Q1). It never participates in path resolution.
|
|
27
|
+
- If no path/identifier is present → `question` — "Which research task should be forked?" — listing the directory names under `.owflow/tasks/research/` as options (free-form path also accepted), then re-route. If the given argument does **not exist** or matches **no identifier** → print:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
BLOCKED — no research task found at <arg>.
|
|
31
|
+
|
|
32
|
+
Quick way out:
|
|
33
|
+
/owflow:research-fork <task-path-or-identifier> ["<what this fork should explore>"]
|
|
34
|
+
|
|
35
|
+
Available research tasks:
|
|
36
|
+
<list directory names under .owflow/tasks/research/, one per line, if any>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
then STOP (never guess or auto-pick a task). For a fresh research question instead: `/owflow:research <question>`.
|
|
40
|
+
|
|
41
|
+
### Prerequisites
|
|
42
|
+
|
|
43
|
+
| Required for this skill | Where verified | Produced by |
|
|
44
|
+
| ----------------------- | ---------------------------------------------------------- | ---------------------------------------------- |
|
|
45
|
+
| State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:research <question>` or `/owflow:research-quick` |
|
|
46
|
+
| Forkable research | at least one completed step in `completed_phases` | any research subskill |
|
|
47
|
+
|
|
48
|
+
1. **Read `orchestrator-state.yml`** from the task path. Missing / unreadable → print the blocked block (as above, plus quality gate: forkable research needs at least one completed step — run `/owflow:research-plan <task-path>`, then `/owflow:research-gather <task-path>`, then `/owflow:research-synthesize <task-path>` first) and STOP.
|
|
49
|
+
|
|
50
|
+
## Orient (read the source — suggestions depend on it)
|
|
51
|
+
|
|
52
|
+
The guided setup is only as good as what the agent actually read. Before asking anything, gather just enough of the source to name its angles, its decisions, and its loose ends:
|
|
53
|
+
|
|
54
|
+
1. From state: `task.title`, `research_context.research_question`, `scope.included` / `.excluded`, `research_context.phase_summaries.*` (especially `converge.decision_areas[].area|chosen_approach` and `converge.deferred_ideas`), `research_context.confidence_level`.
|
|
55
|
+
2. From artifacts, when they exist: the conclusions / open questions / limitations sections of `outputs/research-report.md` and `analysis/synthesis.md`, and the alternatives in `outputs/solution-exploration.md`. Read headings and the decision-relevant parts — this is orientation, not a re-run of the research.
|
|
56
|
+
3. Build the **fork-point list**: every slug in `completed_phases` (state is the truth — re-read it, don't trust memory), **excluding `research-completed`** (nothing diverges after completion), in pipeline order, each with the human step name from the [dispatcher routing table](../research/SKILL.md#routing-table-completed_phases--next-subskill):
|
|
57
|
+
|
|
58
|
+
| Fork point slug | Step name | Re-runs from |
|
|
59
|
+
| -------------------------- | ---------------------------- | ------------------------------------- |
|
|
60
|
+
| `brief-written` | Brief | research-plan |
|
|
61
|
+
| `plan-created` | Plan & sources | research-gather |
|
|
62
|
+
| `findings-gathered` | Findings gathering | research-synthesize |
|
|
63
|
+
| `synthesis-complete` | Synthesis & research report | optional chain (brainstorm / design) / finalize |
|
|
64
|
+
| `alternatives-generated` | Solution alternatives | research-converge |
|
|
65
|
+
| `approaches-chosen` | Approach convergence | research-design / finalize |
|
|
66
|
+
| `design-generated` | High-level design | research-finalize |
|
|
67
|
+
|
|
68
|
+
4. `--from=<slug>` given → validate it against that list — mismatch → print:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
BLOCKED — <slug> is not a completed fork point of <task-name>.
|
|
72
|
+
|
|
73
|
+
Valid fork points: <comma-separated slugs from completed_phases, minus research-completed>
|
|
74
|
+
Valid fork points are completed step slugs only. Re-run:
|
|
75
|
+
/owflow:research-fork <task-path> --from=<step-slug>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
then STOP. Never fall through to the question.
|
|
79
|
+
|
|
80
|
+
## Guided setup (ask what the argument did not answer)
|
|
81
|
+
|
|
82
|
+
Three questions, in this order. **Ask only the unanswered ones** — each input source short-circuits its question. Every question is a `question` call; WAIT for the answer before the next. Ask no question whose answer is already in the argument, and never invent a user's intent silently.
|
|
83
|
+
|
|
84
|
+
### Q1 — Intent: "What should this fork explore?"
|
|
85
|
+
|
|
86
|
+
- **Answered by** a quoted description in the argument → use it verbatim, skip the question.
|
|
87
|
+
- **Otherwise ask**, with 3-4 divergence angles derived from what Orient read, marked "(Recommended)" on the one you judge most useful, each description naming the evidence it comes from:
|
|
88
|
+
- re-synthesize with a different lens (e.g. another technology, a cost/constraint focus, a different scope) — from the report's open questions or low `confidence_level`
|
|
89
|
+
- explore a deferred idea — from `converge.deferred_ideas`
|
|
90
|
+
- revisit a chosen approach with an alternative — from `converge.decision_areas[].area|chosen_approach` and the alternatives in `solution-exploration.md`
|
|
91
|
+
- narrow or widen the scope — from `scope.included` / `.excluded`
|
|
92
|
+
- Free-form answers are welcome and common — do not push the user toward your options.
|
|
93
|
+
|
|
94
|
+
### Q2 — Fork point: "Where should the fork diverge?"
|
|
95
|
+
|
|
96
|
+
- **Answered by** `--from` → validated in Orient, skip the question.
|
|
97
|
+
- **Otherwise ask**, one option per fork point in pipeline order, each description = what the fork keeps and re-runs: `"keeps up to <slug> (<step name>); re-runs <next-step command>"`, plus `"(drops N later steps)"` when N > 0. Recommend the latest completed step whose re-run matches the intent — `synthesis-complete` when the intent re-thinks the findings, `approaches-chosen` when it re-opens a chosen approach, `design-generated` when it only reshapes the design, `plan-created` / `findings-gathered` when it changes the sources or scope, `brief-written` for a full restart with a different question. Mark that option "(Recommended)"; every other option stays selectable.
|
|
98
|
+
|
|
99
|
+
### Q3 — Name: "Short descriptive name for the fork?"
|
|
100
|
+
|
|
101
|
+
- **Answered by** `--name="..."` → that string is the name source, skip the question.
|
|
102
|
+
- **Otherwise ask** with 2-3 slug candidates you derived from the intent (recommended first, marked "(Recommended)"); free-form is fine.
|
|
103
|
+
|
|
104
|
+
**Derive slugs yourself** (you are the LLM; no code derives names): from the name source — the intent text, or the chosen candidate — extract 3-5 key words (Task Name Generation, [Orchestrator Patterns §5](../orchestrator-framework/references/orchestrator-patterns.md)) → lowercase kebab-case, 3-5 words of `[a-z0-9]`, no date prefix. Example: "compare caching strategies" → `compare-caching-strategies`. The final directory is `YYYY-MM-DD-<slug>` (fork execution date).
|
|
105
|
+
|
|
106
|
+
### Q4 — Plan confirmation (before anything is written)
|
|
107
|
+
|
|
108
|
+
Skip only when intent, fork point, and name were ALL supplied by the argument (description + `--from` + `--name`) — nothing was left to confirm. Otherwise print the fork plan and ask:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Fork plan
|
|
112
|
+
Source: <source-name> (task untouched)
|
|
113
|
+
Intent: <one line, from Q1 or the description argument>
|
|
114
|
+
Fork point: <slug> — <step name>
|
|
115
|
+
Keeps: <kept slugs> (verbatim)
|
|
116
|
+
Re-runs: <first step after the fork point>
|
|
117
|
+
New task: YYYY-MM-DD-<slug>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
`question` — "Create this fork?" with options: **Create the fork** (Recommended) / **Change something** (user names what — re-open only that question, keep the other answers) / **Cancel** (print the resume command and end without writing anything). On Cancel: nothing has been copied — do not create the directory.
|
|
121
|
+
|
|
122
|
+
If the fork-name check later reports `NAME_TAKEN`, suggest a 1-word variation and re-ask via `question`. If it reports `INVALID_NAME`, fix the slug (pattern + message tell you what broke) and retry the same source name without re-prompting unless the fix needs more than casing/spacing.
|
|
123
|
+
|
|
124
|
+
## Execute (utility pass — tool does the copy)
|
|
125
|
+
|
|
126
|
+
1. Call the `fork_task` tool with:
|
|
127
|
+
- `taskRoot`: `.owflow/tasks`
|
|
128
|
+
- `source`: the resolved task path (or identifier)
|
|
129
|
+
- `slug`: your derived slug
|
|
130
|
+
- `from`: the chosen fork point slug
|
|
131
|
+
- `intent`: the one-line intent (omit the key when the user gave none)
|
|
132
|
+
2. **Tool-agnostic failure handling** — any tool output starting with `INVALID_SOURCE`, `UNKNOWN_STEP`, `NAME_TAKEN`, or `INVALID_NAME` → fix per the output's Hint (re-ask name on `NAME_TAKEN`/`INVALID_NAME`; re-derive fork point on the rest) and re-call the tool. Any other failure → print it and STOP.
|
|
133
|
+
3. **Validate the forked state** — run the `verify_template` tool on the FORK's `orchestrator-state.yml` (`filePath: <fork-path>/orchestrator-state.yml`, `templateName: orchestrator-state-research.yml`) — belt-and-braces over the tool's own structural check. Any report → fix per the hint, re-run.
|
|
134
|
+
4. **Present the fork summary**:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
Fork created: <fork-path>
|
|
138
|
+
Forked from: <source-name> (task untouched)
|
|
139
|
+
Intent: <one line, or 'n/a'>
|
|
140
|
+
Fork point: <slug> (<step name>)
|
|
141
|
+
Copied: everything from the source (verbatim)
|
|
142
|
+
State trimmed: completed_phases cut at <slug> — resumes at the step after <slug>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Fork mechanics reference (what the tool does)
|
|
146
|
+
|
|
147
|
+
1. Copies the whole source task directory recursively into `<taskRoot>/research/YYYY-MM-DD-<slug>/` — all artifacts, verbatim.
|
|
148
|
+
2. Rewrites only the copied `orchestrator-state.yml`: `orchestrator.completed_phases` sliced up to and including the fork point, `orchestrator.started_phase: null`, `orchestrator.entry_point: "research-fork"`, `orchestrator.task_path` → fork dir, `task.status: in_progress`, `task.title` suffixed `(fork of <source-name>)`, and `orchestrator.options.fork_information` stamped `{forked_from, fork_point, forked_at, intent}` (`intent` only when given) — merged into any pre-existing `options`.
|
|
149
|
+
3. Everything else — `research_context`, `research_outputs`, timestamps — is carried verbatim from the source; the resumed step overwrites its own outputs.
|
|
150
|
+
|
|
151
|
+
Validation errors surfaced by the tool: `INVALID_NAME` (slug pattern), `INVALID_SOURCE` (no research task directory / no parseable state file), `UNKNOWN_STEP` (fork point not in `completed_phases`, or `research-completed` — nothing diverges after completion), `NAME_TAKEN` (fork directory already exists).
|
|
152
|
+
|
|
153
|
+
## Exit Gate
|
|
154
|
+
|
|
155
|
+
Utility skill: confirm-or-revise only ([Confirm-or-Revise Exception](../orchestrator-framework/references/confirm-or-revise-exception.md)) — no pipeline next-steps, no auto-chaining.
|
|
156
|
+
|
|
157
|
+
### Results box
|
|
158
|
+
|
|
159
|
+
```markdown
|
|
160
|
+
## ✅ RESEARCH FORK COMPLETE — <fork name>
|
|
161
|
+
|
|
162
|
+
**Source** — <source-name> (task untouched)
|
|
163
|
+
**Intent** — <one line, or n/a>
|
|
164
|
+
**Fork point** — <fork-point slug> (<step name>)
|
|
165
|
+
**Copied** — full source directory (verbatim)
|
|
166
|
+
**State trim** — completed_phases cut at <fork-point slug>
|
|
167
|
+
**Fork directory** — `<fork-path>`
|
|
168
|
+
|
|
169
|
+
**Fork state**
|
|
170
|
+
|
|
171
|
+
- `orchestrator-state.yml` (completed_phases trimmed at <fork-point slug>, status in_progress, `options.fork_information` stamped)
|
|
172
|
+
- all source artifacts, verbatim
|
|
173
|
+
|
|
174
|
+
**Next ▸** `/owflow:research <fork-path>` (resume the fork; it routes to the first step after the fork point)
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Results-acceptance question
|
|
178
|
+
|
|
179
|
+
Use `question` — "Are these results correct?" with options:
|
|
180
|
+
|
|
181
|
+
- **Confirm** — the fork is good; end the skill (print the Next ▸ command one more time for convenience).
|
|
182
|
+
- **Revise** — user specifies what to change (wrong fork point / wrong name / wrong intent): DELETE the fork directory ONLY with explicit user confirmation in that same message (`rm -rf` is destructive-hook protected for non-whitelisted agents — run it only after the user re-confirms), or re-fork under a different name; then re-present the results box.
|
|
183
|
+
- **Stop here** — print the resume command (`/owflow:research-fork <task-path>`) and end.
|
|
184
|
+
|
|
185
|
+
## Integration
|
|
186
|
+
|
|
187
|
+
- The fork is a normal research task from here on: `/owflow:research <fork-path>` routes it, `/owflow:goal-research <fork-path>` chains it, optional-chain choice gates apply as usual.
|
|
188
|
+
- Forking a FORK works — the title suffix chains (`(fork of <fork-name>)`) and `options.fork_information.forked_from` records the immediate parent.
|
|
189
|
+
- The description argument also matches the dispatcher's convention of free text narrowing scope, so `/owflow:research-fork <task> explore the cost angle` behaves like `/owflow:development <task> Implement only phase 1`.
|
|
190
|
+
- Development and migration tasks are NOT forkable — this skill is research-only by design.
|
|
@@ -0,0 +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.
|
|
@@ -0,0 +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.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: owflow:research-quick
|
|
3
|
+
description: Research skill — the quick lane. Bootstraps a standard research task and fuses brief, plan + sources, gather, and synthesis into one condensed pass — the only place where the planner delegation, the gatherer fan, and the synthesizer delegation are condensable. Produces the same standard artifacts and state as the full lane; continuable by any research subskill at full fidelity.
|
|
4
|
+
argument-hint: "[task-path-or-identifier | \"description\"]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Research Quick — Condensed Brief → Synthesis (brief-written … synthesis-complete)
|
|
9
|
+
|
|
10
|
+
Quick lane of the research workflow. Bootstraps a standard research task (state file, docs discovery) and then fuses brief, plan + sources, gather, and synthesis into one condensed pass. It does NOT introduce a second state format: the task gets a standard `orchestrator-state.yml` from `orchestrator-state-research.yml` with standard artifacts on the exact paths the full lane uses, so every other research subskill can pick it up afterwards and resume at full fidelity (gather re-fans only missing categories; later subskills treat existing artifacts as pre-existing). State lives in `orchestrator-state.yml` — this skill reads it on entry and writes results on exit.
|
|
11
|
+
|
|
12
|
+
Related phases: `/owflow:research-plan` (the full-lane owner of the brief and plan steps this lane condenses), `/owflow:research-gather` + `/owflow:research-synthesize` (the full-lane owners of the condensed gather and synthesis steps).
|
|
13
|
+
|
|
14
|
+
## Entry Gate
|
|
15
|
+
|
|
16
|
+
Resolve the argument BEFORE anything else (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). The argument may be:
|
|
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
|
+
- **Research question** — anything else (free text, e.g. `"evaluate caching strategies for our API"`) is treated as a new research question for quick bootstrap.
|
|
21
|
+
|
|
22
|
+
Route by argument kind:
|
|
23
|
+
|
|
24
|
+
| Situation | Route |
|
|
25
|
+
| ------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
26
|
+
| Task path/identifier, quick lane not yet complete | Quick pass for the missing pieces (below) |
|
|
27
|
+
| Task path/identifier, `synthesis-complete` present | Quick lane already ran — report existing results and route to the Exit Gate |
|
|
28
|
+
| Research question (or no argument after prompt) | Quick bootstrap (create task + fused brief → synthesis) |
|
|
29
|
+
| Missing argument | Prompt for input (path, identifier, or research question), then re-route |
|
|
30
|
+
|
|
31
|
+
If the path does **not exist** or matches **no identifier** → print the blocked block, then STOP (never guess or auto-pick a task):
|
|
32
|
+
|
|
33
|
+
1. Steps that must be completed first (in order), each with its command:
|
|
34
|
+
- State initialization (`task.*`) → `/owflow:research <question>`
|
|
35
|
+
2. List available research-task identifiers (directories under `.owflow/tasks/research/`) to resume from, if any.
|
|
36
|
+
3. Hint: `Run /owflow:research <question> to start a task from scratch, or pass a task path/identifier to resume.`
|
|
37
|
+
|
|
38
|
+
### Prerequisites
|
|
39
|
+
|
|
40
|
+
| Required for this skill | Where verified | Produced by |
|
|
41
|
+
| ------------------------------------- | ---------------------------------------------------- | ------------------------------------------------- |
|
|
42
|
+
| State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:research <question>` (dispatcher init) or the quick bootstrap below |
|
|
43
|
+
| Research question resolved (resume) | `research_context.research_question` non-null in state | quick bootstrap (`brief-written`) |
|
|
44
|
+
|
|
45
|
+
1. **Read `orchestrator-state.yml`** from the task path. If missing → quick bootstrap (below). On decline → print the blocked block and STOP.
|
|
46
|
+
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 condensed brief record it in state.
|
|
47
|
+
3. **Skip/resume — artifacts before state**: adopt existing artifacts instead of re-running (`planning/research-brief.md` → `brief-written`; `planning/research-plan.md` AND `planning/sources.md` → `plan-created`; findings files → `findings-gathered`; `analysis/synthesis.md` + `outputs/research-report.md` → `synthesis-complete`), then condense ONLY the quick-pass pieces that are still missing. All pieces present → report the existing results and route to the Exit Gate.
|
|
48
|
+
|
|
49
|
+
## Input / Output Artifacts
|
|
50
|
+
|
|
51
|
+
| Artifact | Normal mode (full lane, for comparison) | Quick mode (this skill's condensed pass) |
|
|
52
|
+
| ---------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------- |
|
|
53
|
+
| Consumed: argument | task path/identifier (subskills never bootstrap) | task path/identifier OR a research question (bootstrap + fuse in one pass) |
|
|
54
|
+
| Produced: `planning/research-brief.md` | inline (`research-plan` brief step) | inline — condensed brief, identical path |
|
|
55
|
+
| Produced: `planning/research-plan.md`, `planning/sources.md` | delegated to `research-planner` | written directly inline (the ONLY exception to the planner anti-pattern) |
|
|
56
|
+
| Produced: `analysis/findings/*.md` | `information-gatherer` fan (cap 8, one agent per category) | inline with zero agents (≤2 categories) or capped fan at 3 agents |
|
|
57
|
+
| Produced: `analysis/synthesis.md`, `outputs/research-report.md` | delegated to `research-synthesizer` | ALWAYS inline (the ONLY exception to the synthesizer anti-pattern) |
|
|
58
|
+
| State write | `brief-written`, `plan-created`, `findings-gathered`, `synthesis-complete` (owned by `research-plan`/`research-gather`/`research-synthesize`) | same slugs and fields per step, `entry_point: "research-quick"`, condensation noted in `phase_summaries.gather` / `phase_summaries.synthesize` |
|
|
59
|
+
|
|
60
|
+
## Quick bootstrap (no state file, question argument)
|
|
61
|
+
|
|
62
|
+
1. **Create Task Directory**: `.owflow/tasks/research/YYYY-MM-DD-task-name/` (3–5 kebab-case words from the question).
|
|
63
|
+
2. **Initialize State**: create `orchestrator-state.yml` from the research template with `task.title` / `task.description` from the question, `task.status: in_progress`, and `orchestrator.entry_point: "research-quick"`.
|
|
64
|
+
- **CRITICAL**: use the `verify_template` tool immediately after creation to check YAML validity against `orchestrator-state-research.yml`.
|
|
65
|
+
3. **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 — and store them in `research_context.project_doc_paths` (identical to the full lane's brief step).
|
|
66
|
+
4. If `.owflow/docs/` does not exist, proceed without project documentation and note the graceful-fallback hint in the completion message: `"No AI SDLC documentation found. Consider running /owflow:flow-init to initialize project documentation and coding standards."`
|
|
67
|
+
|
|
68
|
+
## Fused condensed pass
|
|
69
|
+
|
|
70
|
+
**MANDATORY order — brief before plan, plan before gather, gather before synthesis:**
|
|
71
|
+
|
|
72
|
+
1. **Condensed brief** — run the full lane's brief step inline (parse question, classify type, determine scope, success criteria, write `planning/research-brief.md`, docs discovery when not already done). Append `brief-written` on completion and set `research_context.research_type`, `research_question`, `scope`, and `project_doc_paths` — the same fields the full-lane brief step writes.
|
|
73
|
+
2. **Condensed plan + sources — written directly, NO delegation**: read the research-plan skill's `references/research-methodologies.md` using the Read tool (methodology selection still applies), then write `planning/research-plan.md` and `planning/sources.md` as separate artifacts on the exact full-lane paths. **Quick acceptance check: the plan MUST keep a `## Gathering Strategy` section (categories + count)** — this pass uses that count to choose inline gather vs a capped fan; `research-gather` parses the same section and falls back to 4 default categories only when it is absent. **This REPLACES the `research-planner` delegation (the quick lane is the ONLY exception to the plan anti-pattern)**, and it pins the gathering categories: ≤2 categories → the gather step below stays inline with zero agents; more → fan capped at 3. Append `plan-created` on completion and set `research_context.methodology`, `sources`, and `phase_summaries.plan` — the same fields the full-lane plan step writes.
|
|
74
|
+
3. **Condensed gather** — when the plan's Gathering Strategy (heading matched by the words "Gathering Strategy", numeric prefix tolerated) has ≤2 categories, write the per-category finding files into `analysis/findings/` directly, zero agents (**the quick lane is the ONLY exception to the always-fan rule**); with 3+ categories, launch the fan capped at 3 `information-gatherer` agents in ONE message (same mechanics as `/owflow:research-gather`). Append `findings-gathered` on completion; set `research_context.gathering_strategy` and `research_outputs.findings_directory`; note the condensation in `phase_summaries.gather`.
|
|
75
|
+
4. **Condensed synthesis — ALWAYS inline**: write `analysis/synthesis.md` (pattern analysis, cross-references, documented gaps and uncertainties) and `outputs/research-report.md` (comprehensive report answering the research question, confidence per finding) directly (**the quick lane is the ONLY exception to the `research-synthesizer` delegation**); set `research_context.confidence_level`, `research_outputs.synthesis`, and `research_outputs.research_report`. Append `synthesis-complete` on completion — condensation noted in `phase_summaries.synthesize`.
|
|
76
|
+
|
|
77
|
+
Slugs are appended individually on each step's completion — never batched (see State Update Convention). Then continue with the **Exit Gate** below.
|
|
78
|
+
|
|
79
|
+
## State Update Convention (per step)
|
|
80
|
+
|
|
81
|
+
Apply after EVERY step above:
|
|
82
|
+
|
|
83
|
+
1. **Write immediately** — update `orchestrator-state.yml` as soon as the step completes, appending ONLY the step slug actually performed (`brief-written`, `plan-created`, `findings-gathered`, `synthesis-complete`) plus that step's fields. Never batch multiple steps into one end-of-skill write — each slug lands on its own step's completion, with the same state fields the full-lane owner writes (`methodology`/`sources`, `gathering_strategy`, `research_outputs.findings_directory`/`synthesis`/`research_report`) and condensation noted in `phase_summaries.gather` / `phase_summaries.synthesize`.
|
|
84
|
+
2. **Timestamp** — set `orchestrator.updated` to the current UTC timestamp on every write.
|
|
85
|
+
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>"]`.
|
|
86
|
+
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.
|
|
87
|
+
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.
|
|
88
|
+
|
|
89
|
+
## Recovery
|
|
90
|
+
|
|
91
|
+
| Step | Max Attempts | Strategy |
|
|
92
|
+
| ----------------------------- | ------------ | ----------------------------------------------------- |
|
|
93
|
+
| Brief (`brief-written`) | 1 | Prompt user for clarification if question unclear |
|
|
94
|
+
| Plan (`plan-created`) | 2 | Expand search patterns, use fallback mixed methodology |
|
|
95
|
+
| Gather (`findings-gathered`) | 1 | Re-run the failed category only (inline or capped fan) |
|
|
96
|
+
| Synthesis (`synthesis-complete`) | 1 | Re-write from existing findings and report inputs |
|
|
97
|
+
|
|
98
|
+
## Exit Gate
|
|
99
|
+
|
|
100
|
+
Present results, get user confirmation, then hand off (see [Gate Contract](../orchestrator-framework/references/gate-contract.md)). Never auto-invoke the next skill.
|
|
101
|
+
|
|
102
|
+
### Results box
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
## ✅ RESEARCH QUICK COMPLETE — <research question>
|
|
106
|
+
|
|
107
|
+
**Type** — [research type]
|
|
108
|
+
**Methodology** — [methodology summary from state]
|
|
109
|
+
**Gathering categories** — [N categories in the plan's Gathering Strategy]
|
|
110
|
+
**Pass** — brief → plan → gather → synthesis fused inline
|
|
111
|
+
|
|
112
|
+
**Artifacts**
|
|
113
|
+
|
|
114
|
+
- `planning/research-brief.md`
|
|
115
|
+
- `planning/research-plan.md` (keeps the parsable `## Gathering Strategy` section)
|
|
116
|
+
- `planning/sources.md`
|
|
117
|
+
- `analysis/findings/*.md`
|
|
118
|
+
- `analysis/synthesis.md`
|
|
119
|
+
- `outputs/research-report.md`
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Results-acceptance question
|
|
123
|
+
|
|
124
|
+
Use `question` — "Are these results correct?" with options:
|
|
125
|
+
|
|
126
|
+
- **Accept** — the condensed-pass artifacts are good; continue.
|
|
127
|
+
- **Adjust** — re-run only the affected quick-pass piece (brief, plan, gather, or synthesis) with the user's corrections, update state and artifacts, re-present the results box.
|
|
128
|
+
- **Discuss** — walk through a specific part (research type, methodology, findings, report) in more depth; then re-ask.
|
|
129
|
+
- **Stop here** — print the resume command (`/owflow:research-quick <task-path>`) and end.
|
|
130
|
+
|
|
131
|
+
### Next steps (after Accept)
|
|
132
|
+
|
|
133
|
+
The task is a regular research task — the optional chain is the user's choice from here:
|
|
134
|
+
|
|
135
|
+
- `→ /owflow:research-brainstorm <task-path>` — brainstorm solution alternatives (→ converge → design, when wanted).
|
|
136
|
+
- `→ /owflow:research-design <task-path>` — design-only branch, seeded from the research report.
|
|
137
|
+
- `→ /owflow:research-finalize <task-path>` — no optional chain: inventories the outputs and completes the task.
|
|
138
|
+
|
|
139
|
+
Then STOP.
|