owflow 0.1.10 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -28
- package/dist/agents/code-reviewer.md +1 -1
- package/dist/agents/production-readiness-checker.md +1 -1
- package/dist/agents/project-analyzer.md +0 -1
- 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/html-renderer.md +3 -4
- package/dist/commands/migration.md +3 -4
- package/dist/commands/performance.md +3 -4
- package/dist/commands/research.md +3 -4
- 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 +19 -19
- package/dist/configuration/agents-config.js +66 -0
- package/dist/configuration/commands-config.js +21 -0
- package/dist/configuration/skills-config.js +10 -0
- package/dist/constants.js +4 -0
- package/dist/hooks/before-tool.js +19 -0
- package/dist/hooks/session-compaction.js +19 -0
- package/dist/index.js +11 -142
- 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/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 +20 -0
- package/dist/skills/orchestrator-framework/references/gate-contract.md +104 -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 +57 -24
- 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/utils/file-util.js +25 -0
- package/package.json +6 -4
- package/dist/__tests__/verify_template.test.js +0 -102
- 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/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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: diagrams-mermaid
|
|
2
|
+
name: owflow:diagrams-mermaid
|
|
3
3
|
description: Creates Mermaid diagrams for planning flows, component communication, and architecture views with adaptive detail selection (including C4 levels). This skill should be used when the user asks for a workflow, interaction, or architecture visualization from provided task context.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
---
|
|
@@ -8,6 +8,8 @@ user-invocable: true
|
|
|
8
8
|
|
|
9
9
|
Generate Mermaid diagrams from task context. Focus on visual structure and communication flow, not domain invention.
|
|
10
10
|
|
|
11
|
+
Gates follow the shared contract in [Gate Contract](../orchestrator-framework/references/gate-contract.md) — the "Output Contract" below IS this skill's Exit Gate, and Step 1 (Extract Context) IS the Entry Gate: when required inputs are missing, ask targeted clarification questions (never invent them) before drawing.
|
|
12
|
+
|
|
11
13
|
## 🚨 Core Rules
|
|
12
14
|
|
|
13
15
|
1. **Read `references/reference.md`** (located in the `references/` subdirectory of this skill) before generating any diagram.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: docs-manager
|
|
2
|
+
name: owflow:docs-manager
|
|
3
3
|
description: Internal engine for managing project documentation and technical standards in .owflow/docs/. Handles file operations, INDEX.md generation, and AGENTS.md integration. Invoked by flow-init, standards-update, and standards-discover skills.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
@@ -117,8 +117,8 @@ Use this when a project doesn't have `.owflow/docs/` or needs documentation for
|
|
|
117
117
|
|
|
118
118
|
_Not initialized for this project. If you need frontend standards, you can:_
|
|
119
119
|
|
|
120
|
-
- _Add them manually using the docs-manager skill_
|
|
121
|
-
- _Run `/standards-discover --scope=frontend` to auto-discover_
|
|
120
|
+
- _Add them manually using the owflow:docs-manager skill_
|
|
121
|
+
- _Run `/owflow:standards-discover --scope=frontend` to auto-discover_
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
6. **MANDATORY - Update AGENTS.md:**
|
|
@@ -144,7 +144,7 @@ Use this when a project doesn't have `.owflow/docs/` or needs documentation for
|
|
|
144
144
|
**Note on Skipped Standards**: If standard categories are skipped during initialization, teams can add them later using:
|
|
145
145
|
|
|
146
146
|
- "Add Documentation File" operation to add specific standards
|
|
147
|
-
- `/standards-discover` command to auto-discover standards from codebase
|
|
147
|
+
- `/owflow:standards-discover` command to auto-discover standards from codebase
|
|
148
148
|
|
|
149
149
|
---
|
|
150
150
|
|
|
@@ -21,7 +21,7 @@ When you notice recurring patterns, fixes, or conventions during implementation
|
|
|
21
21
|
- The same type of fix is needed across multiple files
|
|
22
22
|
- A new library/pattern is adopted that should be documented
|
|
23
23
|
|
|
24
|
-
When this happens, briefly suggest the standard to the user. If approved, invoke `/standards-update` with the identified pattern.
|
|
24
|
+
When this happens, briefly suggest the standard to the user. If approved, invoke `/owflow:standards-update` with the identified pattern.
|
|
25
25
|
|
|
26
26
|
## owflow Workflows
|
|
27
27
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: flow-init
|
|
2
|
+
name: owflow:flow-init
|
|
3
3
|
description: Initialize AI SDLC framework with intelligent project analysis and documentation generation
|
|
4
4
|
argument-hint: [--standards-from=PATH]
|
|
5
5
|
user-invocable: true
|
|
@@ -9,8 +9,14 @@ user-invocable: true
|
|
|
9
9
|
|
|
10
10
|
Initialize `.owflow/docs/` with intelligent project analysis and meaningful documentation generation based on actual codebase inspection.
|
|
11
11
|
|
|
12
|
+
Gates follow the shared contract in [Gate Contract](../orchestrator-framework/references/gate-contract.md).
|
|
13
|
+
|
|
12
14
|
**NOTE**: This skill invokes other skills and subagents at specific phases. Use the **Task tool with `docs-operator` subagent** (subagent_type: `docs-operator`) for all docs-manager operations, and **Task tool** for project-analyzer. Use the **Skill tool** only for standards-discover (Phase 8, last phase). The Task tool returns control to this skill after completion; the Skill tool does not.
|
|
13
15
|
|
|
16
|
+
## Entry Gate
|
|
17
|
+
|
|
18
|
+
PHASE 1 (Pre-flight Checks) below IS the entry gate of this skill. It validates the `--standards-from=PATH` argument (resolve it; abort with an informative message if the referenced project lacks `.owflow/docs/standards/`) and detects the pre-existing state of `.owflow/` — routing to backup, update, or cancel accordingly. Complete it before any other phase.
|
|
19
|
+
|
|
14
20
|
## Phase Configuration
|
|
15
21
|
|
|
16
22
|
| Phase | Subject | activeForm |
|
|
@@ -163,7 +169,7 @@ Write each file to `.owflow/docs/project/`.
|
|
|
163
169
|
|
|
164
170
|
---
|
|
165
171
|
|
|
166
|
-
## PHASE 7: Validate
|
|
172
|
+
## PHASE 7: Validate → Exit Gate
|
|
167
173
|
|
|
168
174
|
**Step 1**: Invoke `docs-operator` subagent via Task tool (subagent_type: `docs-operator`) with prompt:
|
|
169
175
|
|
|
@@ -179,17 +185,32 @@ Wait for docs-operator to complete, then immediately continue with Step 2.
|
|
|
179
185
|
- Verify selected standards directories exist
|
|
180
186
|
- Verify AGENTS.md integration
|
|
181
187
|
|
|
182
|
-
**Step 3
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
**Step 3: Results box** — present the summary as:
|
|
189
|
+
|
|
190
|
+
```markdown
|
|
191
|
+
## ✅ FLOW INIT COMPLETE — <project name>
|
|
192
|
+
|
|
193
|
+
**Project type** — [type, language, framework, architecture]
|
|
194
|
+
**Structure** — [tree with check marks for created items]
|
|
195
|
+
**Docs** — [which docs generated, which standards initialized]
|
|
196
|
+
**Standards** — [discovered count, applied]
|
|
197
|
+
**Key findings** — [strengths, opportunities]
|
|
198
|
+
|
|
199
|
+
**Created** — `.owflow/docs/INDEX.md`
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**Step 4: Results-acceptance question** — use `question` — "Are these results correct?" with options:
|
|
203
|
+
|
|
204
|
+
- **Accept** — initialization is complete; print next steps below.
|
|
205
|
+
- **Adjust** — regenerate the affected artifact (analysis, doc, standards) with the user's corrections, then re-present the results box.
|
|
206
|
+
- **Discuss** — walk through the generated structure and findings in more depth; then re-ask.
|
|
207
|
+
- **Stop here** — end; everything is already written to `.owflow/docs/`.
|
|
208
|
+
|
|
209
|
+
**Next steps (after Accept)**:
|
|
210
|
+
|
|
211
|
+
1. Review and customize the generated documentation and standards for your team
|
|
212
|
+
2. Start development with `/owflow:development "<task description>"` (or project work)
|
|
213
|
+
3. Keep documentation current via `/owflow:standards-update "<convention>"`
|
|
193
214
|
|
|
194
215
|
---
|
|
195
216
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: owflow:goal-development
|
|
3
|
+
description: Full orchestrated development wrapper — runs ALL development phases in one session by invoking every dev-* subskill in sequence with question gates between them. Equivalent to the classic unified orchestrator.
|
|
4
|
+
argument-hint: "[task description | task-path] [--from=<step-slug>] [--research=PATH] [--e2e] [--user-docs]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Orchestrated Development Wrapper
|
|
9
|
+
|
|
10
|
+
Autonomous mode for development tasks. Initializes (or resumes) the task, then invokes every required `dev-*` subskill back-to-back via the Skill tool, pausing at gates between subskills. Shares `orchestrator-state.yml` with assisted mode (`/owflow:development`) — tasks can mix both modes freely.
|
|
11
|
+
|
|
12
|
+
Gates follow the shared contract in [Gate Contract](../orchestrator-framework/references/gate-contract.md) — orchestrated mode exception: each subskill's own Exit Gate acceptance question IS the loop gate (Accept = continue to the next subskill).
|
|
13
|
+
|
|
14
|
+
## Entry Gate
|
|
15
|
+
|
|
16
|
+
Identical to the dispatcher — complete ALL of its entry-gate steps first:
|
|
17
|
+
|
|
18
|
+
1. Read the [Dispatcher & Handoff Pattern](../orchestrator-framework/references/dispatcher-handoff.md) and the [Delegation Rules](../orchestrator-framework/references/delegation-rules.md).
|
|
19
|
+
2. Detect prior work context: research folder path or `--research=<path>` flag (same detection and state setup as the development dispatcher — see `../development/SKILL.md` Entry Gate). Dev-bugfix tasks (`.owflow/tasks/development/` entries with `entry_point: "dev-bugfix"`) need no special handling — they are standard development tasks; route from the first missing slug.
|
|
20
|
+
3. Initialize (new task) or resume (task path): create task directory + `orchestrator-state.yml` with `verify_template` validation, discover `.owflow/docs/INDEX.md` project docs, write command flags to `options.*`. On resume, find the first step slug NOT in `completed_phases` (validate artifacts; `--from=<step-slug>` overrides).
|
|
21
|
+
4. Create ONE task item via `TaskCreate` per subskill in the upcoming loop (subject: `"<step names>: <subskill>"`, e.g. `"Analysis: dev-analyze"`); update statuses as the loop progresses.
|
|
22
|
+
|
|
23
|
+
**Output**:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
🚀 Orchestrated Development
|
|
27
|
+
|
|
28
|
+
Task: [description]
|
|
29
|
+
Directory: [task-path]
|
|
30
|
+
Loop: dev-analyze → [dev-tdd-red] → dev-spec → dev-plan → dev-implement → dev-verify → dev-finalize
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## The Loop
|
|
36
|
+
|
|
37
|
+
For each subskill in sequence (skipping conditionals below), execute:
|
|
38
|
+
|
|
39
|
+
1. **Announce**: 1-line phase banner.
|
|
40
|
+
2. **Invoke**: Skill tool with `name: "<subskill>"` and `prompt: "<task-path> [flags relevant to that subskill]"`. The subskill owns its Entry Gate, delegation, and state updates.
|
|
41
|
+
3. **Verify handback**: after the skill returns, re-read `orchestrator-state.yml` — confirm the expected step slugs were appended to `completed_phases` (per the Sequence and Conditionals table). If a subskill stopped early (entry check failed), STOP the loop and relay its routing message to the user.
|
|
42
|
+
4. **Gate (subskill's Exit Gate is the loop gate)**: each subskill presents its results box and fires its own results-acceptance `question` before its handoff hint (Orchestrated-mode exception, [Gate Contract](../orchestrator-framework/references/gate-contract.md)). [Rule 5 of the Dispatcher & Handoff Pattern](../orchestrator-framework/references/dispatcher-handoff.md) — "subskills only SUGGEST the next command" — is superseded for Accept: when the user answers **Accept** to the subskill's Exit Gate question pointing at the next subskill in this loop, treat that as "continue to the next subskill" and invoke it. Any other answer (Adjust / Discuss / Stop / other options picked) ends the loop the same way a rejected gate would.
|
|
43
|
+
- **Exception**: no separate gate between `dev-analyze` and `dev-tdd-red` when the red gate activates — these two run back-to-back (mirrors the AUTO-CONTINUE of the classic orchestrator). A gate still applies between analysis and spec.
|
|
44
|
+
|
|
45
|
+
### Sequence and Conditionals
|
|
46
|
+
|
|
47
|
+
| Order | Subskill | Run when (from state) |
|
|
48
|
+
| ----- | ------------- | -------------------------------------------------------- |
|
|
49
|
+
| 1 | dev-analyze | Always |
|
|
50
|
+
| 2 | dev-tdd-red | `task_characteristics.has_reproducible_defect: true` |
|
|
51
|
+
| 3 | dev-spec | Analysis complete (`gap-analysed` in `completed_phases`) |
|
|
52
|
+
| 4 | dev-plan | `implementation/spec.md` exists |
|
|
53
|
+
| 5 | dev-implement | Spec + plan exist |
|
|
54
|
+
| 6 | dev-verify | `implementation-done` completed |
|
|
55
|
+
| 7 | dev-finalize | `verification-done` completed; honors `e2e_enabled`/`user_docs_enabled` internally |
|
|
56
|
+
|
|
57
|
+
**Interruptible**: at any gate the user may answer "stop" — print the standard handoff block (next command + `/owflow:development <task-path>` resume hint) and end the session. The task resumes later in either mode.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Exit Gate
|
|
62
|
+
|
|
63
|
+
When dev-finalize completes (`task.status: completed`):
|
|
64
|
+
|
|
65
|
+
1. Mark the final task item completed via `TaskUpdate`.
|
|
66
|
+
2. Present the workflow results box:
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
## ✅ DEVELOPMENT WORKFLOW COMPLETE — <task name>
|
|
70
|
+
|
|
71
|
+
**Steps** — [executed step slugs]
|
|
72
|
+
**Verification** — [final verification outcome]
|
|
73
|
+
**Artifacts** — [task directory artifact summary]
|
|
74
|
+
**Commit message** — [template]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
3. Use `question` — "Are these results correct?" with options: **Accept** (print follow-up suggestions: `/owflow:reviews-pragmatic <task-path>`, `/owflow:standards-update "<lesson>"`, commit/PR, then end) / **Adjust** (re-open the relevant `/owflow:dev-*` skill) / **Discuss** (walk through the summary) / **Stop here** (print the resume command and end).
|
|
78
|
+
|
|
79
|
+
Then end. No further owflow phase commands are required.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Loop Rules
|
|
84
|
+
|
|
85
|
+
- **Delegate, never inline**: the wrapper only sequences — all phase work happens inside subskills. If you catch yourself implementing/analyzing outside a subskill, STOP and invoke the subskill instead.
|
|
86
|
+
- **State is the truth**: gates and routing read `orchestrator-state.yml`, not memory. Re-read after every subskill returns.
|
|
87
|
+
- **Same state schema as assisted mode**: `completed_phases` step slugs (`codebase-analysed` … `task-completed`) are identical; resume works across modes.
|
|
88
|
+
|
|
89
|
+
## Command Integration
|
|
90
|
+
|
|
91
|
+
Invoked via:
|
|
92
|
+
|
|
93
|
+
- `/owflow:goal-development [description] [--e2e] [--user-docs] [--research=PATH]` (new)
|
|
94
|
+
- `/owflow:goal-development [task-path] [--from=<step-slug>]` (resume)
|
|
95
|
+
|
|
96
|
+
Alternative: `/owflow:development` — same task in assisted mode (one subskill per invocation, fresh context each phase).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: html-renderer
|
|
2
|
+
name: owflow:html-renderer
|
|
3
3
|
description: Render a markdown plan, idea, RFC, or design note into a self-contained, share-ready HTML file using the warm editorial visual system bundled under `references/`. Use this skill whenever the user asks to "render", "convert", "turn into HTML", "make a nice HTML version", "share this as a page", or "make this look good" for a markdown file containing a plan, proposal, idea, brief, RFC, design note, or pitch — even if they don't explicitly say "HTML". The output is a single .html file with all CSS inlined, written next to the source .md, that visually matches the reference layout in `references/index.html` and uses tokens from `references/tokens.json`.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
user-invocable: true
|
|
@@ -9,6 +9,8 @@ user-invocable: true
|
|
|
9
9
|
|
|
10
10
|
Turn a markdown plan/idea/RFC into a single self-contained HTML page that follows the warm editorial design system bundled in this skill.
|
|
11
11
|
|
|
12
|
+
Gates follow the shared contract in [Gate Contract](../orchestrator-framework/references/gate-contract.md) — "Inputs and outputs" below IS the Entry Gate; Workflow step 7 (Verify) plus the Exit Gate block at the close.
|
|
13
|
+
|
|
12
14
|
## When to use
|
|
13
15
|
|
|
14
16
|
The user gives you a markdown file (or pastes markdown) describing a plan, idea, proposal, RFC, design note, or brief, and wants a clean HTML representation they can share. Output is *always* a portable single-file `.html` with the stylesheet inlined — no external assets, no JS.
|
|
@@ -43,6 +45,17 @@ Reuse existing classes and tokens before inventing anything. If the user asks fo
|
|
|
43
45
|
- `<body>` containing `<main class="hr-page">` wrapping the sectioned content.
|
|
44
46
|
6. **Write** the file as `<basename>.html` next to the source.
|
|
45
47
|
7. **Verify**: re-open the output and confirm every `class="hr-..."` you emitted exists in the inlined CSS.
|
|
48
|
+
8. **Exit Gate**: present the results box, then confirm (Exit Gate contract, [Gate Contract](../orchestrator-framework/references/gate-contract.md)):
|
|
49
|
+
|
|
50
|
+
```markdown
|
|
51
|
+
## ✅ HTML RENDER COMPLETE
|
|
52
|
+
|
|
53
|
+
**Source** — `<source.md>`
|
|
54
|
+
**Output** — `<basename>.html` (single file, self-contained)
|
|
55
|
+
**Sections** — [count] · **Diagrams** — [count, if any]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Use `question` — "Is the rendering correct?" with options: **Accept** (open the file in a browser and stop) / **Adjust** (user names layout/section issues; fix and re-present) / **Discuss** (explain a mapping or class choice) / **Stop here**. Note: visual correctness can only be confirmed by the user in a browser — offer to open it via the user's preferred `open`/`xdg-open` command.
|
|
46
59
|
|
|
47
60
|
## Markdown → HTML mapping
|
|
48
61
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: implementation-plan-executor
|
|
2
|
+
name: owflow:implementation-plan-executor
|
|
3
3
|
description: Execute implementation plans by delegating each task group to task-group-implementer subagent. Main agent coordinates prepares context, invokes subagent, processes output, marks checkboxes, updates work-log. Uses lazy standards loading from INDEX.md with keyword-triggered discovery.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: implementation-verifier
|
|
2
|
+
name: owflow:implementation-verifier
|
|
3
3
|
description: Verify completed implementations for quality assurance. Delegates all verification work to specialized subagents - completeness checking, test execution, code review, pragmatic review, production readiness, and reality assessment. Compiles results into comprehensive verification report. Read-only verification - reports issues but does not fix them. Use after implementation is complete and before code review/commit.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: migration
|
|
2
|
+
name: owflow:migration
|
|
3
3
|
description: Orchestrates the complete migration workflow from current state analysis through implementation to compatibility verification. Handles technology migrations, platform changes, and architecture pattern transitions with adaptive risk assessment, incremental execution, and rollback planning. Use when migrating technologies, platforms, or architecture patterns.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
---
|
|
@@ -8,23 +8,35 @@ user-invocable: true
|
|
|
8
8
|
|
|
9
9
|
Systematic migration workflow from current state analysis to verified migration with rollback capabilities.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Gates follow the shared contract in [Gate Contract](../orchestrator-framework/references/gate-contract.md).
|
|
12
|
+
|
|
13
|
+
## Entry Gate
|
|
12
14
|
|
|
13
15
|
**BEFORE executing any phase, you MUST complete these steps:**
|
|
14
16
|
|
|
15
|
-
###
|
|
17
|
+
### Argument resolution
|
|
18
|
+
|
|
19
|
+
- **Migration description provided** → use it as the task description.
|
|
20
|
+
- **Task path / identifier** (directory under `.owflow/tasks/migrations/`) → resume mode: read `orchestrator-state.yml`, find the first incomplete phase (`--from=PHASE` overrides), validate existing artifacts, then continue from there.
|
|
21
|
+
- **Nothing provided** → ask via `question`: "What technology, platform, or architecture should be migrated, and to what?" — capture source and target state before proceeding.
|
|
22
|
+
|
|
23
|
+
### Prerequisites
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
| Required for this skill | Where verified | Produced by |
|
|
26
|
+
| ----------------------- | ----------------------------------------------------- | -------------------------- |
|
|
27
|
+
| State file exists | `<task-path>/orchestrator-state.yml` (resume mode) | prior `/owflow:migration` run |
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
On resume, if the state file is missing → print: `No migration task found at <path>. Run /owflow:migration <description> to start from scratch.` and STOP. Validate expected artifacts for completed phases (remove entries with missing artifacts).
|
|
20
30
|
|
|
21
|
-
###
|
|
31
|
+
### Execution steps
|
|
22
32
|
|
|
23
|
-
1. **
|
|
24
|
-
2. **
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
1. **Load framework patterns** — Read `../orchestrator-framework/references/orchestrator-patterns.md` NOW: delegation rules, interactive mode, state schema, initialization, context passing, issue resolution.
|
|
34
|
+
2. **Initialize workflow:**
|
|
35
|
+
1. **Create Task Items**: Use `TaskCreate` for all phases (see Phase Configuration), then set dependencies with `TaskUpdate addBlockedBy`
|
|
36
|
+
2. **Create Task Directory**: `.owflow/tasks/migrations/YYYY-MM-DD-task-name/`
|
|
37
|
+
3. **Initialize State**: Create `orchestrator-state.yml` with migration context
|
|
38
|
+
- **CRITICAL**: Use the `verify_template` tool immediately after creation to check YAML validity against `orchestrator-state-migration.yml`.
|
|
39
|
+
4. **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 `project_context.project_doc_paths` in state.
|
|
28
40
|
|
|
29
41
|
**Output**:
|
|
30
42
|
|
|
@@ -282,14 +294,14 @@ question - Display executive summary: total issues found, issues fixed, issues r
|
|
|
282
294
|
|
|
283
295
|
---
|
|
284
296
|
|
|
285
|
-
### Phase 8: Documentation (Optional)
|
|
297
|
+
### Phase 8: Documentation → Exit Gate (Optional)
|
|
286
298
|
|
|
287
299
|
> **Phase gate**: Requires `question` confirmation from the preceding phase before executing.
|
|
288
300
|
|
|
289
|
-
**Purpose**: Create migration guide
|
|
290
|
-
**Execute**: Task tool - `user-docs-generator` subagent
|
|
291
|
-
**Output**: `documentation/migration-guide.md`
|
|
292
|
-
**State**: Set documentation complete
|
|
301
|
+
**Purpose**: Create migration guide (optional) and run the Exit Gate
|
|
302
|
+
**Execute**: Task tool - `user-docs-generator` subagent (conditional) + Direct (Exit Gate)
|
|
303
|
+
**Output**: `documentation/migration-guide.md` (conditional)
|
|
304
|
+
**State**: Set documentation complete, then `task.status: completed`
|
|
293
305
|
|
|
294
306
|
**Skip if**: `options.docs_enabled = false`
|
|
295
307
|
|
|
@@ -301,6 +313,39 @@ question - Display executive summary: total issues found, issues fixed, issues r
|
|
|
301
313
|
- Rollback procedures
|
|
302
314
|
- Troubleshooting common issues
|
|
303
315
|
|
|
316
|
+
**Results box** (present regardless of whether docs ran):
|
|
317
|
+
|
|
318
|
+
```markdown
|
|
319
|
+
## ✅ MIGRATION COMPLETE — <task name>
|
|
320
|
+
|
|
321
|
+
**Migration type** — [code / data / architecture]
|
|
322
|
+
**Strategy** — [incremental / big-bang / dual-run / phased]
|
|
323
|
+
**Verification** — [final verdict]
|
|
324
|
+
**Rollback plan** — [path / status]
|
|
325
|
+
**Migration guide** — [path] / not generated
|
|
326
|
+
|
|
327
|
+
**Artifacts**
|
|
328
|
+
- `analysis/current-state-analysis.md`
|
|
329
|
+
- `analysis/target-state-plan.md`
|
|
330
|
+
- `analysis/rollback-plan.md`
|
|
331
|
+
- `implementation/work-log.md`
|
|
332
|
+
- `verification/implementation-verification.md`
|
|
333
|
+
- `documentation/migration-guide.md` [conditional]
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Results-acceptance question** — use `question` — "Are these results correct?" with options:
|
|
337
|
+
|
|
338
|
+
- **Accept** — migration is complete; print next steps below.
|
|
339
|
+
- **Adjust** — re-run the affected phase (fixes, re-verification, docs) with the user's corrections, then re-present the results box.
|
|
340
|
+
- **Discuss** — walk through specific results (verification verdicts, rollback readiness, guide contents) in more depth; then re-ask.
|
|
341
|
+
- **Stop here** — print the resume command (`/owflow:migration <task-path>`) and end.
|
|
342
|
+
|
|
343
|
+
**Next steps (after Accept)**:
|
|
344
|
+
|
|
345
|
+
- `/owflow:reviews-pragmatic <task-path>` — post-migration over-engineering check
|
|
346
|
+
- `/owflow:standards-update "<lesson learned>"` — capture migration learnings as standards
|
|
347
|
+
- Commit the changes and open a PR using the migration guide's procedures
|
|
348
|
+
|
|
304
349
|
→ End of workflow
|
|
305
350
|
|
|
306
351
|
---
|
|
@@ -355,7 +400,7 @@ Refer to the template [src/templates/orchestrator-state-migration.yml](../../tem
|
|
|
355
400
|
|
|
356
401
|
Invoked via:
|
|
357
402
|
|
|
358
|
-
- `/migration [description] [--type=TYPE]` (new)
|
|
359
|
-
- `/migration [task-path] [--from=PHASE]` (resume)
|
|
403
|
+
- `/owflow:migration [description] [--type=TYPE]` (new)
|
|
404
|
+
- `/owflow:migration [task-path] [--from=PHASE]` (resume)
|
|
360
405
|
|
|
361
406
|
Task directory: `.owflow/tasks/migrations/YYYY-MM-DD-task-name/`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: orchestrator-framework
|
|
2
|
+
name: owflow:orchestrator-framework
|
|
3
3
|
description: Shared orchestration patterns for all workflow orchestrators. NOT an executable skill - provides reference documentation for phase execution, state management, interactive mode, and initialization. All orchestrators reference these patterns.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Command Namespacing
|
|
2
|
+
|
|
3
|
+
How commands and skills are named and referenced. Extracted from `orchestrator-patterns.md` (Section 8) so skills can link to it directly.
|
|
4
|
+
|
|
5
|
+
- Slash commands registered from `src/commands/*.md` use `name: owflow:<command>` in frontmatter; users invoke `/owflow:<command>`.
|
|
6
|
+
- **Skill `name:` fields are prefixed too.** Skill-tool invocations (`skill: "owflow:development"`, `skills:` frontmatter preloads, work.md routing) always reference `owflow:`-prefixed skill names.
|
|
7
|
+
- Handoff messages, docs, and cross-references always display the prefixed slash command — never the bare skill name — in user-facing text.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Confirm-or-Revise Exception
|
|
2
|
+
|
|
3
|
+
Extension of the [Gate Contract](gate-contract.md) for utility skills with explicit no-follow-up contracts — currently `agents-md-generator` and `rule-reviewer`.
|
|
4
|
+
|
|
5
|
+
## Rule
|
|
6
|
+
|
|
7
|
+
The standard Exit Gate's results-acceptance question offers four options (Accept / Adjust / Discuss / Stop). Utility skills whose whole purpose is to produce a single artifact and stop **narrow this to confirm-or-revise only**:
|
|
8
|
+
|
|
9
|
+
- **Confirm** — the artifact is good; end the skill.
|
|
10
|
+
- **Revise** — user specifies what to change; re-work only the affected parts of the artifact, then re-present it and re-ask.
|
|
11
|
+
|
|
12
|
+
## What stays prohibited
|
|
13
|
+
|
|
14
|
+
- No follow-up suggestions, "next steps" hints, or "Other options" blocks after Confirm.
|
|
15
|
+
- No auto-chaining into other skills or workflows.
|
|
16
|
+
- Follow-up work happens only if the user explicitly asks for it.
|
|
17
|
+
|
|
18
|
+
## Why
|
|
19
|
+
|
|
20
|
+
Utility skills end their contract with the artifact itself — there is no pipeline to continue — so offering pipeline-style next steps would imply a workflow that does not exist.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Delegation Rules
|
|
2
|
+
|
|
3
|
+
Shared rules for how orchestrators and subskills delegate work. Extracted from `orchestrator-patterns.md` (Section 1) so skills can link to it directly.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**Always use Skill/Task tools to delegate. Never execute delegated work inline.**
|
|
8
|
+
|
|
9
|
+
When a phase requires delegation:
|
|
10
|
+
|
|
11
|
+
1. Use the **Skill tool** for **skills** — loads SKILL.md instructions into the main agent's context; the main agent executes the skill's instructions and continues with the orchestrator workflow afterward
|
|
12
|
+
2. Use the **Task tool** for **subagents/agents** — spawns an isolated subprocess that returns results when complete
|
|
13
|
+
3. Wait for completion before continuing
|
|
14
|
+
|
|
15
|
+
**Skills and agents are NOT interchangeable.** Skills always use Skill tool; agents always use Task tool. Never invoke a skill via Task tool (`subagent_type`) — it will fail with "Agent type not found."
|
|
16
|
+
|
|
17
|
+
**Why skills MUST use Skill tool**: Skills like `codebase-analyzer`, `implementation-plan-executor`, and `implementation-verifier` spawn their own subagents (Explore agents, reporters, planners). Subagents cannot spawn other subagents — so these skills must run in the main agent context via Skill tool.
|
|
18
|
+
|
|
19
|
+
**Companion agent pattern** (e.g., `docs-operator`): Only works for skills that do NOT spawn subagents (like `docs-manager` which only does file operations). A companion agent preloads the skill via the `skills` frontmatter field and is invoked via Task tool. This pattern fails for any skill that needs to spawn subagents.
|
|
20
|
+
|
|
21
|
+
## Anti-Patterns
|
|
22
|
+
|
|
23
|
+
| Anti-Pattern | Why It's Wrong | Correct Approach |
|
|
24
|
+
| --------------------------------------- | ------------------------------------------- | ----------------------------------------------------- |
|
|
25
|
+
| "I'll analyze the codebase..." | Bypasses codebase-analyzer skill | Use `Skill` tool with `codebase-analyzer` |
|
|
26
|
+
| "Let me create the specification..." | Bypasses specification-creator | Use `Task` tool with `specification-creator` subagent |
|
|
27
|
+
| "Looking at the gaps between..." | Bypasses gap-analyzer subagent | Use `Task` tool with `gap-analyzer` |
|
|
28
|
+
| "I'll implement this by..." | Bypasses implementation-plan-executor skill | Use `Skill` tool with `implementation-plan-executor` |
|
|
29
|
+
| Reading a SKILL.md then doing the work | Skill files are instructions FOR skills | Use Skill tool to invoke |
|
|
30
|
+
| Spawning Explore agents in orchestrator | Codebase-analyzer manages its own agents | Invoke skill, let IT spawn agents |
|
|
31
|
+
|
|
32
|
+
## When Inline Execution is Acceptable
|
|
33
|
+
|
|
34
|
+
These do NOT require delegation:
|
|
35
|
+
|
|
36
|
+
1. **Clarifying questions phases** — question is direct
|
|
37
|
+
2. **State updates** — Reading/writing orchestrator-state.yml
|
|
38
|
+
3. **Phase announcements** — Outputting status messages
|
|
39
|
+
4. **Simple decisions** — Enabling/disabling optional phases
|
|
40
|
+
5. **Finalization** — Creating summary, updating metadata
|
|
41
|
+
|
|
42
|
+
For all analysis, planning, implementation, and verification phases: **ALWAYS DELEGATE**.
|
|
43
|
+
|
|
44
|
+
**Never acceptable inline** (regardless of perceived task simplicity):
|
|
45
|
+
|
|
46
|
+
- Specification creation → always delegate to `specification-creator` subagent
|
|
47
|
+
- Implementation planning → always delegate to `implementation-planner` subagent
|
|
48
|
+
- Gap analysis → always delegate to `gap-analyzer` subagent
|
|
49
|
+
- Codebase analysis → always delegate to `codebase-analyzer` skill
|
|
50
|
+
- Code review → always delegate to `code-reviewer` subagent
|
|
51
|
+
- Test execution → always delegate to `test-suite-runner` subagent
|
|
52
|
+
- Implementation completeness → always delegate to `implementation-completeness-checker` subagent
|
|
53
|
+
|
|
54
|
+
"The task is simple" is NOT a valid reason to skip delegation.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Dispatcher & Handoff Pattern (Subskill Loop)
|
|
2
|
+
|
|
3
|
+
How orchestrators delegate phase bodies to user-invocable **subskills**. Extracted from `orchestrator-patterns.md` (Section 7) so skills can link to it directly.
|
|
4
|
+
|
|
5
|
+
Orchestrators MAY delegate phase bodies to user-invocable **subskills** instead of executing them inline. Two modes share one state file and one set of subskills:
|
|
6
|
+
|
|
7
|
+
| Mode | Entry point | Behavior |
|
|
8
|
+
| ----------------- | ------------------------ | ------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| Orchestrated mode | wrapper skill/command | Invokes subskills back-to-back via Skill tool in sequence; pauses at `question` gates between subskills |
|
|
10
|
+
| Assisted mode | dispatcher skill/command | Derives next phase from state, prints the suggested command, and **STOPS**; user invokes each subskill |
|
|
11
|
+
|
|
12
|
+
## Rules
|
|
13
|
+
|
|
14
|
+
1. **State file is canonical.** `orchestrator-state.yml` remains the single source of truth. Subskills read it on entry and write step results on exit. `completed_phases` values MUST stay stable so both modes intermix freely on the same task.
|
|
15
|
+
- **Value convention**: `completed_phases` / `failed_phases` / `auto_fix_attempts` keys are **descriptive step slugs**, not `phase-N` numbers. The development workflow defines the canonical slugs (`codebase-analysed`, `gap-analysed`, `tdd-red-proven`, `spec-written`, `spec-audited`, `plan-created`, `implementation-done`, `tdd-green-proven`, `options-chosen`, `verification-done`, `e2e-run`, `docs-generated`, `task-completed` — see `skills/development/SKILL.md` routing table and `templates/orchestrator-state-development.yml`). New orchestrators SHOULD use descriptive step slugs too; older orchestrators (performance, migration, research) still use `phase-N` and MUST be kept internally consistent.
|
|
16
|
+
2. **Subskills are self-contained.** Each has: an entry check (validate state + prerequisite artifacts), an execute section (delegation via Skill/Task tools per the [Delegation Rules](delegation-rules.md)), and an exit (state update + closing ritual). **State updates are per-step**: a subskill writes `orchestrator-state.yml` immediately after each of its steps completes — appending only the step slug actually performed, bumping `orchestrator.updated`, recording failures in `failed_phases`/`auto_fix_attempts`, and validating with `verify_template` — never as a single end-of-skill write.
|
|
17
|
+
3. **Closing ritual (handoff) → Exit Gate.** Every subskill ends with the **Exit Gate** contract, see [Gate Contract](gate-contract.md) (results box → results-acceptance question → next-step hint on accept → STOP).
|
|
18
|
+
4. **Entry checks replace phase gates in assisted mode.** A subskill invoked directly must validate the same prerequisites a phase gate would (e.g., spec exists before audit) and route to the prerequisite's command if missing — via its **Entry Gate** ([Gate Contract](gate-contract.md)).
|
|
19
|
+
5. **Never chain automatically.** The orchestrated wrapper invokes; subskills only SUGGEST the next command and stop. Auto-chaining from a subskill skips user review.
|
|
20
|
+
6. **Assisted mode is the gate.** In assisted mode, the user explicitly invoking the next command IS the phase gate — no additional `question` confirmation before a subskill starts.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Gate Contract — Entry Gate & Exit Gate (Skill Contract)
|
|
2
|
+
|
|
3
|
+
Shared contract for how every user-invocable skill opens and closes. Extracted from `orchestrator-patterns.md` (Section 9) so skills can link to it directly.
|
|
4
|
+
|
|
5
|
+
Every **user-invocable** skill (orchestrators, subskills, dispatchers, utility commands) opens with an **Entry Gate** and closes with an **Exit Gate**. Internal skills (subagent-invoked, `user-invocable: false`) use lightweight input/structured-output contracts instead and never call `question`.
|
|
6
|
+
|
|
7
|
+
## Entry Gate
|
|
8
|
+
|
|
9
|
+
The Entry Gate runs BEFORE any phase work. It validates that this skill is allowed to run and routes to what is missing instead of guessing.
|
|
10
|
+
|
|
11
|
+
1. **Argument resolution** — resolve the argument in priority order: full path → identifier (directory name under the workflow's task type) → fresh description. If missing, ambiguous, or unmatched:
|
|
12
|
+
- Print a structured ask: the exact inputs accepted, with format examples, then WAIT.
|
|
13
|
+
- NEVER guess, auto-pick a task, or proceed with a resolved-by-hope path.
|
|
14
|
+
2. **Prerequisite check** — verify each required upstream artifact, expressed as a table the skill keeps at the top of its body:
|
|
15
|
+
|
|
16
|
+
| Required for this skill | Where verified | Produced by |
|
|
17
|
+
| ----------------------- | ------------------------------------------------------------------- | ---------------------------- |
|
|
18
|
+
| State file exists | `<task-path>/orchestrator-state.yml` | `/owflow:development <desc>` |
|
|
19
|
+
| Analysis done | `gap-analysed` in `completed_phases` + `analysis/gap-analysis.md` exists | `/owflow:dev-analyze` |
|
|
20
|
+
| Spec approved | `implementation/spec.md` exists | `/owflow:dev-spec` |
|
|
21
|
+
|
|
22
|
+
Verify **presence and, where cheap, content** (state field values like `has_reproducible_defect`, marker artifacts like `implementation/tdd-red-gate.md`), not just file existence.
|
|
23
|
+
|
|
24
|
+
3. **Blocked output** — when a prerequisite is unmet, print the blocked block and STOP:
|
|
25
|
+
1. Numbered "Steps that must be completed first (in order)", each with its exact prefixed command (`/owflow:dev-analyze <task-path>`).
|
|
26
|
+
2. List of resumable task identifiers (directories under the workflow's task type), if any exist.
|
|
27
|
+
3. Fresh-start hint: `Run /owflow:<entry-command> <description> to start a task from scratch.`
|
|
28
|
+
4. **Skip/resume semantics** — when the skill's steps are already in `completed_phases` (validate artifacts before trusting state): report the existing results briefly and route to the Exit Gate instead of re-executing.
|
|
29
|
+
5. **Conditional activation** — skills that only apply under a state condition (e.g., TDD red gate requires `has_reproducible_defect: true`) check it as part of the Entry Gate and route to the correct alternative command when inactive.
|
|
30
|
+
|
|
31
|
+
### Missing-state bootstrap (mid-pipeline entry)
|
|
32
|
+
|
|
33
|
+
When a dev-* subskill is invoked with a task path/identifier whose `orchestrator-state.yml` exists nowhere (no task, no state file) and the ONLY unmet prerequisite is the state file itself, the skill does not blindly send the user back to the full pipeline — the user chose to enter mid-pipeline. Instead:
|
|
34
|
+
|
|
35
|
+
1. **Ask** via `question`: "No development task exists at this path. Create a fresh standard development task and start at `<this skill's first step slug>`?"
|
|
36
|
+
2. **On confirm (bootstrap)**:
|
|
37
|
+
- Create the task directory `.owflow/tasks/development/YYYY-MM-DD-task-name/` (name derived from the argument or the user's input) — mark `orchestrator.entry_point: "<skill> (mid-pipeline bootstrap)"` and `started_phase` with this skill's starting step slug.
|
|
38
|
+
- Create `orchestrator-state.yml` from `orchestrator-state-development.yml`, honoring any of the skill's command flags into `options.*`; leave `completed_phases` empty (upstream steps stay unrecorded).
|
|
39
|
+
- Run `verify_template` against `orchestrator-state-development.yml`.
|
|
40
|
+
- Then continue into Execute. Because bootstrapping creates **state only — never upstream artifacts**, later artifact prerequisites (e.g., `implementation/spec.md` before planning) still block with the normal precondition loop, so an incorrectly early bootstrap cannot silently skip work.
|
|
41
|
+
3. **On decline** — print the blocked block with the fresh-start hint (`Run /owflow:development <description> to start a task from scratch.`) and STOP.
|
|
42
|
+
|
|
43
|
+
Skill starting points (used for the bootstrap question and `started_phase`): dev-analyze → `codebase-analysed`; dev-tdd-red → `tdd-red-proven`; dev-spec → `spec-written`; dev-plan → `plan-created`; dev-implement → `implementation-done`; dev-verify → `options-chosen`; dev-finalize → `e2e-run`.
|
|
44
|
+
|
|
45
|
+
### Deterministic entry checks (future)
|
|
46
|
+
|
|
47
|
+
Entry-gate checks above are currently executed by the agent reading state. For more deterministic routing, future work considers (a) a small script that checks whether `orchestrator-state.yml` exists, parses it, and answers slug/next-step queries, and (b) an OpenCode lifecycle hook that automates these entry-gate checks for dev-* skills before they run. Until then, follow the rules above exactly as written.
|
|
48
|
+
|
|
49
|
+
## Exit Gate
|
|
50
|
+
|
|
51
|
+
The Exit Gate runs after all phase work and state updates are final. It presents results, asks the user to confirm them, and only then hands off.
|
|
52
|
+
|
|
53
|
+
1. **Results box** — one-screen markdown summary (no ASCII borders, markdown headings/bold carry the emphasis):
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
## ✅ <SKILL> COMPLETE — <task name>
|
|
57
|
+
|
|
58
|
+
**<Field 1>** — [key outcome]
|
|
59
|
+
**<Field 2>** — [key outcome]
|
|
60
|
+
|
|
61
|
+
**Artifacts**
|
|
62
|
+
|
|
63
|
+
- `relative/path/to/artifact.md`
|
|
64
|
+
|
|
65
|
+
**Next ▸** `/owflow:<next-skill> <task-path>`
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Conventions:
|
|
69
|
+
- Status glyphs follow the outcome: ✅ pass/success, ⚠ pass-with-concerns/partial, ❌ fail.
|
|
70
|
+
- Set the **Next ▸** line to the suggested next command for this skill; omit it when the next-step hint depends on the Accept response (the handoff block is printed after Accept anyway).
|
|
71
|
+
|
|
72
|
+
2. **Results-acceptance question** (MANDATORY, fires before any handoff hint):
|
|
73
|
+
|
|
74
|
+
Use `question` — "Are these results correct?" with options:
|
|
75
|
+
- **Accept** — results are good; proceed to the next-step hint.
|
|
76
|
+
- **Adjust** — user specifies what to change; re-work ONLY the affected parts, update artifacts/state, then re-present the results box and re-ask.
|
|
77
|
+
- **Discuss** — walk through a specific result in more depth (evidence, reasoning, alternatives); after the discussion, re-ask.
|
|
78
|
+
- **Stop here** — artifacts persist; print the resume command (`/owflow:<this-skill> <task-path>` or the next phase command) and end.
|
|
79
|
+
|
|
80
|
+
3. **Next-step hint** — only after Accept: print the suggested next command derived from state, plus an "Other options" block of alternative valid commands. Every suggested command is a **compact annotated entry**:
|
|
81
|
+
- **Purpose** — one line stating what the proposed skill does.
|
|
82
|
+
- **Requirement tag** — `required` (mandatory next phase) or `optional` (shortcut, standalone utility, or conditional step) with its activation condition, e.g. `optional — only when has_reproducible_defect: true`.
|
|
83
|
+
- **Remaining plan** (for optional/alternative paths) — one compact line listing the phases still ahead in execution order, marking which are optional.
|
|
84
|
+
- Standalone review/utility commands are annotated `optional — does not advance phases`.
|
|
85
|
+
|
|
86
|
+
Example shape (~5 lines):
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
→ /owflow:dev-verify <task-path>
|
|
90
|
+
What: runs the verification pipeline (completeness, code review, fixes) — required before commit. Remaining after: /owflow:dev-finalize (required).
|
|
91
|
+
Other options:
|
|
92
|
+
/owflow:reviews-code <task-path> — optional, does not advance phases (standalone re-run of code review)
|
|
93
|
+
/owflow:goal-development <task-path> — optional shortcut: runs all remaining phases in one loop (… → verify → finalize)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Then STOP. Never auto-invoke the next skill.
|
|
97
|
+
|
|
98
|
+
4. **Gate ordering** — per the Phase Gate Behavior state ordering rule in `orchestrator-patterns.md`: finish phase work → present results box → acceptance question → user responds → THEN the state is already consistent (per-step writes happened during Execute); the Exit Gate never mutates phase state on its own except recording the user's acceptance decision where the state schema has a field for it.
|
|
99
|
+
|
|
100
|
+
## Exceptions
|
|
101
|
+
|
|
102
|
+
- **Dispatchers** (`development`): the Exit Gate's acceptance question is adapted — the results box is the handoff block, and the question asks how to proceed (hand off to the suggested subskill / switch to autonomous mode / adjust / stop).
|
|
103
|
+
- **Utility skills with explicit no-follow-up contracts** (`agents-md-generator`, `rule-reviewer`): the acceptance question is confirm-or-revise only; follow-up suggestions stay prohibited unless the user asks. See [confirm-or-revise exception](confirm-or-revise-exception.md).
|
|
104
|
+
- **Orchestrated mode** (`goal-development`): the subskill's own Exit Gate acceptance question IS the loop gate — Accept means "continue to the next subskill". The wrapper MUST NOT add a second consecutive `question`.
|