owflow 0.6.0 → 0.7.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/LICENSE +21 -21
- package/README.md +448 -283
- package/dist/agents/bottleneck-analyzer.md +332 -333
- package/dist/agents/code-quality-pragmatist.md +353 -354
- package/dist/agents/code-reviewer.md +238 -239
- package/dist/agents/codebase-analysis-reporter.md +245 -246
- package/dist/agents/docs-operator.md +22 -23
- package/dist/agents/e2e-test-verifier.md +447 -448
- package/dist/agents/gap-analyzer.md +501 -502
- package/dist/agents/implementation-completeness-checker.md +219 -220
- package/dist/agents/implementation-planner.md +308 -309
- package/dist/agents/information-gatherer.md +690 -691
- package/dist/agents/production-readiness-checker.md +278 -279
- package/dist/agents/project-analyzer.md +403 -403
- package/dist/agents/reality-assessor.md +365 -366
- package/dist/agents/research-planner.md +449 -450
- package/dist/agents/research-synthesizer.md +402 -403
- package/dist/agents/solution-brainstormer.md +256 -257
- package/dist/agents/solution-designer.md +371 -372
- package/dist/agents/spec-auditor.md +297 -298
- package/dist/agents/specification-creator.md +333 -334
- package/dist/agents/task-classifier.md +449 -450
- package/dist/agents/task-group-implementer.md +283 -284
- package/dist/agents/test-suite-runner.md +194 -195
- package/dist/agents/user-docs-generator.md +508 -509
- package/dist/commands/reviews-code.md +90 -90
- package/dist/commands/reviews-pragmatic.md +99 -99
- package/dist/commands/reviews-production-readiness.md +113 -113
- package/dist/commands/reviews-reality-check.md +110 -110
- package/dist/commands/reviews-spec-audit.md +114 -114
- package/dist/commands/work.md +280 -280
- package/dist/configuration/agents-config.d.ts +2 -0
- package/dist/configuration/agents-config.js +8 -44
- package/dist/configuration/commands-config.d.ts +23 -0
- package/dist/configuration/commands-config.js +17 -17
- package/dist/configuration/skills-config.d.ts +2 -0
- package/dist/configuration/skills-config.js +3 -3
- package/dist/hooks/hooks-diagnostics.d.ts +3 -0
- package/dist/hooks/hooks-diagnostics.js +21 -0
- package/dist/hooks/hooks-persistence.d.ts +17 -0
- package/dist/hooks/hooks-persistence.js +207 -0
- package/dist/hooks/hooks-registry.d.ts +6 -0
- package/dist/hooks/hooks-registry.js +104 -0
- package/dist/hooks/hooks-wrapper.d.ts +25 -0
- package/dist/hooks/hooks-wrapper.js +318 -0
- package/dist/hooks/internal/before-tool.d.ts +6 -0
- package/dist/hooks/internal/before-tool.js +13 -0
- package/dist/hooks/internal/session-compaction.d.ts +9 -0
- package/dist/hooks/{session-compaction.js → internal/session-compaction.js} +9 -7
- package/dist/hooks/runtime/circuit-breaker.d.ts +23 -0
- package/dist/hooks/runtime/circuit-breaker.js +39 -0
- package/dist/hooks/runtime/failure-policy.d.ts +15 -0
- package/dist/hooks/runtime/failure-policy.js +49 -0
- package/dist/hooks/runtime/process-executor.d.ts +33 -0
- package/dist/hooks/runtime/process-executor.js +147 -0
- package/dist/hooks/runtime/status-recorder.d.ts +27 -0
- package/dist/hooks/runtime/status-recorder.js +111 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +111 -40
- package/dist/skills/agents-md-generator/SKILL.md +223 -223
- package/dist/skills/codebase-analyzer/SKILL.md +162 -162
- package/dist/skills/codebase-analyzer/references/code-analysis.md +63 -63
- package/dist/skills/codebase-analyzer/references/combined.md +31 -31
- package/dist/skills/codebase-analyzer/references/context-discovery.md +63 -63
- package/dist/skills/codebase-analyzer/references/file-discovery.md +51 -51
- package/dist/skills/codebase-analyzer/references/migration-target.md +23 -23
- package/dist/skills/codebase-analyzer/references/pattern-mining.md +22 -22
- package/dist/skills/dev-analyze/SKILL.md +115 -115
- package/dist/skills/dev-bugfix/SKILL.md +452 -452
- package/dist/skills/dev-finalize/SKILL.md +118 -118
- package/dist/skills/dev-implement/SKILL.md +167 -167
- package/dist/skills/dev-plan/SKILL.md +147 -147
- package/dist/skills/dev-spec/SKILL.md +182 -182
- package/dist/skills/dev-tdd-red/SKILL.md +94 -94
- package/dist/skills/dev-verify/SKILL.md +153 -153
- package/dist/skills/development/SKILL.md +260 -260
- package/dist/skills/diagrams-mermaid/SKILL.md +183 -159
- package/dist/skills/diagrams-mermaid/references/reference.md +220 -148
- package/dist/skills/docs-manager/SKILL.md +379 -379
- package/dist/skills/docs-manager/docs/INDEX.md +199 -199
- package/dist/skills/docs-manager/docs/standards/backend/api.md +25 -25
- package/dist/skills/docs-manager/docs/standards/backend/migrations.md +22 -22
- package/dist/skills/docs-manager/docs/standards/backend/models.md +25 -25
- package/dist/skills/docs-manager/docs/standards/backend/queries.md +22 -22
- package/dist/skills/docs-manager/docs/standards/frontend/accessibility.md +25 -25
- package/dist/skills/docs-manager/docs/standards/frontend/components.md +28 -28
- package/dist/skills/docs-manager/docs/standards/frontend/css.md +16 -16
- package/dist/skills/docs-manager/docs/standards/frontend/responsive.md +28 -28
- package/dist/skills/docs-manager/docs/standards/global/coding-style.md +25 -25
- package/dist/skills/docs-manager/docs/standards/global/commenting.md +10 -10
- package/dist/skills/docs-manager/docs/standards/global/conventions.md +31 -31
- package/dist/skills/docs-manager/docs/standards/global/error-handling.md +22 -22
- package/dist/skills/docs-manager/docs/standards/global/minimal-implementation.md +22 -22
- package/dist/skills/docs-manager/docs/standards/global/validation.md +28 -28
- package/dist/skills/docs-manager/docs/standards/testing/test-writing.md +25 -25
- package/dist/skills/docs-manager/references/agents-md-template.md +29 -29
- package/dist/skills/docs-manager/references/index-md-template.md +73 -73
- package/dist/skills/flow-init/SKILL.md +234 -234
- package/dist/skills/flow-init/references/architecture-template.md +45 -45
- package/dist/skills/flow-init/references/roadmap-templates.md +93 -93
- package/dist/skills/flow-init/references/tech-stack-template.md +70 -70
- package/dist/skills/flow-init/references/vision-templates.md +75 -75
- package/dist/skills/goal-development/SKILL.md +96 -96
- package/dist/skills/goal-migration/SKILL.md +114 -114
- package/dist/skills/goal-performance/SKILL.md +126 -126
- package/dist/skills/goal-research/SKILL.md +118 -118
- package/dist/skills/html-renderer/SKILL.md +173 -173
- package/dist/skills/html-renderer/references/index.html +318 -318
- package/dist/skills/html-renderer/references/styles.css +388 -388
- package/dist/skills/html-renderer/references/tokens.json +104 -104
- package/dist/skills/implementation-plan-executor/SKILL.md +378 -378
- package/dist/skills/implementation-verifier/SKILL.md +307 -307
- package/dist/skills/migration/SKILL.md +268 -268
- package/dist/skills/migration-analyze/SKILL.md +126 -126
- package/dist/skills/migration-finalize/SKILL.md +161 -161
- package/dist/skills/migration-fix/SKILL.md +155 -155
- package/dist/skills/migration-implement/SKILL.md +131 -131
- package/dist/skills/migration-plan/SKILL.md +131 -131
- package/dist/skills/migration-spec/SKILL.md +135 -135
- package/dist/skills/migration-spec/references/migration-strategies.md +430 -430
- package/dist/skills/migration-target/SKILL.md +134 -134
- package/dist/skills/migration-target/references/migration-types.md +489 -489
- package/dist/skills/migration-verify/SKILL.md +184 -184
- package/dist/skills/orchestrator-framework/SKILL.md +65 -65
- package/dist/skills/orchestrator-framework/references/command-namespacing.md +7 -7
- package/dist/skills/orchestrator-framework/references/confirm-or-revise-exception.md +20 -20
- package/dist/skills/orchestrator-framework/references/delegation-rules.md +54 -54
- package/dist/skills/orchestrator-framework/references/dispatcher-handoff.md +27 -27
- package/dist/skills/orchestrator-framework/references/fix-loop-contract.md +65 -65
- package/dist/skills/orchestrator-framework/references/gate-contract.md +122 -122
- package/dist/skills/orchestrator-framework/references/orchestrator-creation-checklist.md +51 -51
- package/dist/skills/orchestrator-framework/references/orchestrator-patterns.md +235 -235
- package/dist/skills/performance/SKILL.md +267 -267
- package/dist/skills/performance-analyze/SKILL.md +129 -129
- package/dist/skills/performance-analyze/references/performance-optimization-guide.md +271 -271
- package/dist/skills/performance-finalize/SKILL.md +117 -117
- package/dist/skills/performance-implement/SKILL.md +114 -114
- package/dist/skills/performance-plan/SKILL.md +112 -112
- package/dist/skills/performance-spec/SKILL.md +145 -145
- package/dist/skills/performance-verify/SKILL.md +164 -164
- package/dist/skills/research/SKILL.md +249 -249
- package/dist/skills/research-brainstorm/SKILL.md +120 -120
- package/dist/skills/research-brainstorm/references/brainstorming-techniques.md +84 -84
- package/dist/skills/research-converge/SKILL.md +130 -130
- package/dist/skills/research-design/SKILL.md +146 -146
- package/dist/skills/research-design/references/design-techniques.md +40 -40
- 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-plan/references/research-methodologies.md +710 -710
- 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 +334 -334
- package/dist/skills/standards-discover/SKILL.md +260 -260
- package/dist/skills/standards-discover/references/aggregation-strategy.md +76 -76
- package/dist/skills/standards-discover/references/code-pattern-prompt.md +68 -68
- package/dist/skills/standards-discover/references/config-analyzer-prompt.md +67 -67
- package/dist/skills/standards-discover/references/docs-extractor-prompt.md +65 -65
- package/dist/skills/standards-discover/references/external-analyzer-prompt.md +75 -75
- package/dist/skills/standards-update/SKILL.md +207 -207
- package/dist/templates/orchestrator-state-base.yml +17 -17
- package/dist/templates/orchestrator-state-development.yml +95 -95
- package/dist/templates/orchestrator-state-migration.yml +95 -95
- package/dist/templates/orchestrator-state-performance.yml +64 -64
- package/dist/templates/orchestrator-state-research.yml +67 -67
- package/dist/tools/fork_task.d.ts +17 -0
- package/dist/tools/fork_task.js +21 -11
- package/dist/tools/verify_template.d.ts +11 -0
- package/dist/tools/verify_template.js +32 -17
- package/dist/tui/hooks-dialogs.d.ts +20 -0
- package/dist/tui/hooks-dialogs.js +181 -0
- package/dist/tui/hooks-presenter.d.ts +15 -0
- package/dist/tui/hooks-presenter.js +70 -0
- package/dist/tui/hooks-sidebar.d.ts +10 -0
- package/dist/tui/hooks-sidebar.js +104 -0
- package/dist/tui/primitives.d.ts +21 -0
- package/dist/tui/primitives.js +47 -0
- package/dist/tui.d.ts +12 -0
- package/dist/tui.js +129 -0
- package/dist/types/hook-types.d.ts +125 -0
- package/dist/types/hook-types.js +76 -0
- package/dist/types/opencode-types.d.ts +13 -0
- package/dist/utils/file-util.d.ts +2 -0
- package/dist/utils/file-util.js +6 -6
- package/dist/utils/fork-task.d.ts +27 -0
- package/dist/utils/fork-task.js +18 -23
- package/dist/utils/plugin-info.d.ts +3 -0
- package/dist/utils/plugin-info.js +8 -10
- package/dist/utils/workflow-paths.d.ts +17 -0
- package/dist/utils/workflow-paths.js +18 -0
- package/dist/utils/yaml-structure.d.ts +7 -0
- package/dist/utils/yaml-structure.js +7 -11
- package/package.json +68 -48
- package/dist/hooks/before-tool.js +0 -19
|
@@ -1,190 +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.
|
|
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.
|