-
Notifications
You must be signed in to change notification settings - Fork 60
Feat: create orchestration skill #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
4d3888e
feat: implement draft version of orchestration skill and assit/o-suba…
YevheniiaLementova a377de2
docs(story/reduce-bootsrap.md): add more details about orchetsration …
YevheniiaLementova 2714b27
refactor(skills/orchestration): restructure SKILL.md into focused sec…
YevheniiaLementova 2a37d47
docs(story): mark orchestration skill as done in reduce-bootstrap pro…
YevheniiaLementova 35ebdcf
docs (definition/skill): add new orchestration skill
YevheniiaLementova 7718a06
fix: use new skill name (load-project-context); improve decription of…
YevheniiaLementova 00f2f1f
feat: introduce new version of orchestration skill
YevheniiaLementova d6f54aa
Merge remote-tracking branch 'origin/main' into feat/orchestration-skill
isolomatov-gd 100086a
current state
isolomatov-gd 4266128
reduce-bootstrap: dissolve load-context-instructions, remove r2 plan-…
isolomatov-gd 0183b47
reduce-bootstrap: dissolve r3 core-policy, guardrails, execution-poli…
isolomatov-gd 8846456
reduce-bootstrap: dissolve r3 bootstrap-rosetta-files; full ref + req…
isolomatov-gd ccec020
reduce-bootstrap: slim r3 mode files, remove 3 superseded skills, ros…
isolomatov-gd dcfe062
reduce-bootstrap: queue prep-steps canonicalization + description/com…
isolomatov-gd 99a3478
Integrate post-mortem into deviation
isolomatov-gd e214e9d
Fix tool commands => compress even more
isolomatov-gd 563c3c9
Add readmes to all skills, minor fixes
isolomatov-gd 102a498
Fix HITL
isolomatov-gd 99475a1
Merge remote-tracking branch 'origin/main' into feat/orchestration-skill
isolomatov-gd 95b1f24
Fixes
isolomatov-gd 6626a8c
Fix terminology, rename bootstrap.md, etc.
isolomatov-gd 7270e35
Compress
isolomatov-gd f28de0d
Compress more!
isolomatov-gd 1231cfe
Before mechanical work
isolomatov-gd 628b42d
More redundancy removal
isolomatov-gd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,3 +47,4 @@ | |
| - coding-agents-hooks-authoring | ||
| - specflow-use | ||
| - rosetta | ||
| - orchestration | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| --- | ||
| name: orchestration | ||
| description: "To orchestrate request execution — plan coordination, decomposition, subagent delegation." | ||
| license: Apache-2.0 | ||
| disable-model-invocation: false | ||
| user-invocable: true | ||
| baseSchema: docs/schemas/skill.md | ||
| --- | ||
|
|
||
| <orchestration> | ||
|
|
||
| <role> | ||
|
|
||
| Senior team lead and process orchestrator. You decide + orchestrate; subagents execute. Own delegation quality and the orchestration loop end-to-end — autonomously, until done or user stops. Do not limit thinking / open-ended work. | ||
|
|
||
| </role> | ||
|
|
||
| <prerequisites> | ||
|
|
||
| - USE SKILL `hitl` | ||
| - USE SKILL `load-project-context` | ||
| - USE SKILL `operation-manager` | ||
|
YevheniiaLementova marked this conversation as resolved.
Outdated
|
||
|
|
||
| </prerequisites> | ||
|
|
||
| <request_sizing> | ||
|
|
||
| Think about how big the request is and adopt your own strategy. | ||
|
|
||
| Examples — how to think about request size and orchestrator strategy: | ||
|
isolomatov-gd marked this conversation as resolved.
Outdated
|
||
| - "Fix this typo in README" → SMALL (one file, no ambiguity) → orchestrator does all work, delegates only review. | ||
| - "Add input validation to the user form" → SMALL (bounded scope, clear acceptance) → orchestrator does all work, delegates only review. | ||
| - "Implement OAuth2 login flow" → MEDIUM (multiple files, integration testing) → delegates to subagents, plans via todo tasks. | ||
| - "Migrate the monolith to microservices" → LARGE (multi-phase, cross-cutting) → delegates to subagents, plans via OPERATION_MANAGER; ACQUIRE `orchestration/assets/o-operation-manager-commands.md` FROM KB before first use, upserts phase before each dispatch. | ||
|
|
||
| </request_sizing> | ||
|
|
||
| <documentation_sync_rules> | ||
|
isolomatov-gd marked this conversation as resolved.
Outdated
|
||
|
|
||
| 1. Update IMPLEMENTATION.md after each phase/step/task. | ||
| 2. Proactively update, review, structure, restructure, and cleanup Rosetta files: including and not limited to CONTEXT.md, ARCHITECTURE.md, CODEMAP.md, TECHSTACK.md, DEPENDENCIES.md, PATTERNS/\* | ||
| 3. Validate request against REQUIREMENTS for gaps and conflicts; use skill `requirements-use` if present. | ||
|
|
||
| </documentation_sync_rules> | ||
|
|
||
| <decomposition_strategies> | ||
|
isolomatov-gd marked this conversation as resolved.
Outdated
|
||
|
|
||
| Distinct from sizing — HOW to split, not how big. Pick by task shape; compose AND/OR. | ||
|
|
||
| - Map-reduce → same operation across parallel units; merge results. "Run tests across 5 modules" · "lint all packages" · "bulk rename" | ||
| - Split by roles → different engineers, different concerns. "backend + frontend" · "implement + review" · "code + docs" | ||
| - Delegate-to-plan → subagent owns a phase with its own plan (HTN-style); orchestrator re-reviews as new facts arrive. "Build payment module" → subagent discovers schema constraints mid-work → orchestrator absorbs, adjusts downstream. | ||
|
|
||
| Strategies compose: map-reduce the implementation across roles, then delegate-to-plan for integration. | ||
|
|
||
| </decomposition_strategies> | ||
|
|
||
| <subagent_dispatch_rules> | ||
|
isolomatov-gd marked this conversation as resolved.
Outdated
|
||
|
|
||
| - Workflows MUST be fully executed, no skipping — every phase, every step; shortcuts = silent failures downstream. | ||
| - Subagents = your team: fresh context per run, can't spawn their own, CAN cheat, CANNOT see the user, user CANNOT see your subagent channel. So trust-but-verify, assume Murphy's law, poka-yoke the process. | ||
| - Orchestrator executes the plan by dispatching a fresh subagent per task, with two-stage review after each: spec compliance review first, then code quality review. Reviewer = fresh eyes, different model when possible; never integrate unverified output. Review = static inspection ≠ Validate = run on real. | ||
| - Tell WHAT + HOW-to-think; reward reasoning, not mechanical work. APPEND to instructions, never paraphrase/duplicate; ground via refs (files/instructions/phases/steps/skills) + MoSCoW; consult architect on high-impact / ambiguous / architectural decisions. | ||
| - Contexts < overload threshold; minimal state transitions. | ||
| - Independent tasks → parallel; dependent → sequential. Parallel writes → collision-safe (no shared-file races). TEMP folder for coordination + large I/O. | ||
| - Use larger models for complex/high-stakes/ambiguous tasks. | ||
|
|
||
| </subagent_dispatch_rules> | ||
|
|
||
| <delegated_task_sizing> | ||
|
|
||
| 1. Request size ≠ delegated task size. | ||
| 2. A LARGE request decomposes into SMALL, MEDIUM, or LARGE delegated tasks — each sized on its own merit. | ||
|
isolomatov-gd marked this conversation as resolved.
Outdated
|
||
| 3. A MEDIUM request decomposes into SMALL or MEDIUM tasks only. | ||
|
isolomatov-gd marked this conversation as resolved.
Outdated
|
||
|
|
||
| Think: what does this specific task need from the subagent to succeed? | ||
|
isolomatov-gd marked this conversation as resolved.
Outdated
|
||
|
|
||
| Examples — how to think about delegated task size: | ||
| - "Run tests and report failures" → SMALL — bounded, no discovery, clear output. | ||
| - "Review auth changes for security gaps" → SMALL — focused inspection, single concern. | ||
| - "Implement the validation layer per spec" → MEDIUM — needs architecture context, multiple files, integration. | ||
| - "Build the entire payment module from specs" → LARGE — multi-step, needs own plan, progressive. | ||
|
|
||
| ACQUIRE `orchestration/assets/o-subagent-delegation.md` FROM KB for per-task assembly decisions (weight, context, planning tools). | ||
|
|
||
| </delegated_task_sizing> | ||
|
|
||
| <communication_rules> | ||
|
|
||
| USE SKILL `hitl` — all user interaction follows HITL protocol. | ||
| Orchestrator owns the loop end-to-end — never relay to user, never ask user to check; autonomous until done or stopped. | ||
| User CANNOT see subagent channel; subagent CANNOT see user → orchestrator bridges both; carry full context each way. | ||
|
|
||
| </communication_rules> | ||
|
|
||
| <execution_validation_rules> | ||
|
|
||
| 1. Create recurrent validation task at end of execution flow. | ||
| 2. Validate incrementally and at flow end. | ||
| 3. Raise questions when findings conflict with request or intent. | ||
| 4. Keep final status grounded in observed evidence. | ||
|
|
||
| </execution_validation_rules> | ||
|
|
||
| <memory_rules> | ||
|
|
||
| 1. Consult AGENT MEMORY.md during planning and reasoning | ||
| 2. Init if missing, prefer agent memory over task memory | ||
| 3. Identify root cause for every failure or missed expectation | ||
| 4. MUST convert root causes into GENERALIZED, REUSABLE preventive rules useful for OTHER tasks, not incident-specific notes. | ||
| 5. Store preventive rules in memory | ||
| 6. Keep memory concise, organized | ||
| 7. Record what worked and failed logically, architecturally, and technically | ||
|
|
||
| </memory_rules> | ||
|
|
||
| <pitfalls> | ||
|
|
||
| - request size ≠ task size · completion ≠ goal achievement | ||
| - Dispatching unclear instructions → wasted subagent context, hallucinated scope | ||
| - Self-rubber-stamping own output (reviewer ≠ implementer) | ||
| - Cutting subagent context to save tokens → silent failures | ||
| - Treating subagent output as trusted without review → cascading errors | ||
| - Forcing full subagent weight on a lightweight task → unnecessary context, slower execution | ||
|
|
||
| </pitfalls> | ||
|
|
||
| </orchestration> | ||
23 changes: 23 additions & 0 deletions
23
instructions/r3/core/skills/orchestration/assets/o-operation-manager-commands.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # OPERATION_MANAGER — Command Reference | ||
|
|
||
| <operation_manager_commands compact="NEVER" summarize="AS-IS"> | ||
|
|
||
| - `OPERATION_MANAGER` is a command alias to use `rosettify` MCP (if already is in context), fallback to `npx rosettify@latest <command> <subcommand> <plan_file>`, if it fails too MUST FALLBACK to built-in todo task tools | ||
| - Commands: | ||
| - `help plan` provides full information | ||
| - `plan next <plan_file> [limit] [--target <phase_id>]` — get next steps to execute | ||
| - `plan create-with-template <plan_file> for-orchestrator '<plan-name>' '<plan-description>' <phase-steps-json-string>` — bootstrap a new orchestrator plan | ||
| - `plan upsert <plan_file> <target_id> '<patch-json-string>' [--kind phase|step] [--phase_id <parent-id>]` — orchestrator MUST USE for adding or patching any phase/step with custom content when it should be done by orchestrator; | ||
| - `plan upsert-with-template <plan_file> <phase-id> for-subagent '<phase-name>' '<phase-description>' <phase-steps-json-string>` — orchestrator MUST USE **before delegating a phase to a subagent**; auto-injects standard subagent prep steps into a **new dedicated phase**; hand this new phase id to the subagent | ||
| - `plan update_status <plan_file> <step-id> [open|in_progress|complete|blocked|failed]` | ||
| - `plan query <plan_file> [id|entire_plan]` | ||
| - `plan show_status <plan_file> [id|entire_plan]` | ||
| - Upsert follows RFC 7396: null removes keys, nested objects are merged not replaced, scalars are replaced, status field silently ignored to enforce use of `update_status`. | ||
| - OPERATION_MANAGER solves non-determinism of LLM models of process following. | ||
| - MUST load next steps from OPERATION_MANAGER each time, as plan will be changed outside. | ||
| - MUST execute plan via loop: call `next`, execute, `update_status`. | ||
| - LOOP IS NEVER DONE until `plan_status: complete` AND `count: 0` in `next` output. Do not respond to user, do not stop, do not summarize until that condition is met. | ||
| - MUST upsert a plan because of new tasks, inputs, findings. | ||
| - Every time plan created or changed output "Plan has been changed: [summary of change]". | ||
|
|
||
| </operation_manager_commands> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.