Repository navigation
Make coordinator self-contained and runtime-adaptive - #7
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 81c2f2ae5f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 3. Install that complete directory at `~/.agents/skills/coordinator`. Replace an existing destination | ||
| only when its `SKILL.md` declares `name: coordinator`; never merge old and new contents. If the path | ||
| belongs to something else, leave it untouched and ask the user where to install. |
There was a problem hiding this comment.
Verify ownership before replacing the destination
When ~/.agents/skills/coordinator contains an unrelated or user-modified skill that also declares the generic name: coordinator, this rule treats it as Coordinator-owned and directs the installer to replace the entire directory. The previous source/readme and adapter checks distinguished this repository from name collisions; retain an equivalent ownership check so installation cannot delete another skill's files.
Useful? React with 👍 / 👎.
| 3. Install that complete directory at `~/.agents/skills/coordinator`. Replace an existing destination | ||
| only when its `SKILL.md` declares `name: coordinator`; never merge old and new contents. If the path | ||
| belongs to something else, leave it untouched and ask the user where to install. | ||
| 4. Remove the temporary checkout and report the installed path and source commit. |
There was a problem hiding this comment.
Check Python compatibility before reporting success
On a machine without Python 3.11 or newer, these steps still replace any existing installation and report success even though the installed protocol explicitly requires Python 3.11 and the runtime targets that version. Restore a prerequisite or installed-adapter check before placement so an incompatible host does not end up with an unusable installation presented as successful.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
🟢 Approval recommended
The changes are consistent across implementation, contracts, and tests, and the updated validation/routing logic aligns with the new runtime-adaptive, self-contained design.
Pull request overview
This PR makes the Coordinator skill installation self-contained and updates routing/execution behavior to adapt at runtime: it can rank arbitrary runtime model candidates when available, inherit the parent route when no catalog exists, and support inline execution fallback semantics (including stable inline child identifiers) in the state protocol.
Changes:
- Replace fixed model/effort allowlists with runtime-supplied candidate routing and “inherit parent route” behavior when no catalog is available.
- Relax state/CLI validation to allow optional
model/effort(nullable) and arbitrary bounded identifiers rather than a built-in catalog. - Update docs/contracts and tests to reflect adaptive execution, self-contained installation, and inline fallback rules.
File summaries
| File | Description |
|---|---|
| tests/test_state.py | Updates state tests for nullable model/effort inheritance and inline fallback child-id binding. |
| tests/test_routing.py | Updates routing tests to use runtime candidates and validate inheritance behavior when catalog is missing. |
| tests/test_contract.py | Updates contract tests to reflect self-contained install surface and adaptive execution protocol requirements. |
| src/coordinator/state/store.py | Removes fixed MODELS/EFFORTS allowlists and validates model/effort as optional bounded strings. |
| src/coordinator/routing/selector.py | Reworks router to rank caller-supplied runtime candidates and support “no catalog → inherit” routing. |
| src/coordinator/cli/state.py | Makes --model/--effort optional in CLI to support runtime-adaptive routing/inheritance. |
| skill/SKILL.md | Replaces static multi-agent assumptions with an adaptive “delegate if callable, else inline” execution protocol. |
| skill/scripts/model_router.py | Updates adapter description to remove “installed adapter” framing. |
| skill/scripts/coordinator_state.py | Updates adapter description to remove “installed adapter” framing. |
| skill/references/workflow-protocol.md | Updates workflow protocol to describe runtime candidate routing and adaptive execution. |
| skill/references/state-schema.md | Updates schema documentation for nullable model/effort and inline child-id derivation rules. |
| skill/references/model-routing.md | Updates routing contract to define candidates profile format and inheritance semantics. |
| skill/README.md | Updates skill README to describe adaptive protocol and role-profile handling. |
| skill/agents/openai.yaml | Updates default prompt/description to reflect delegated-or-inline adaptive behavior. |
| SECURITY.md | Updates security boundary text to match self-contained install and no global settings edits. |
| README.md | Updates project overview/install/operate documentation to match adaptive delegation and self-contained install. |
| INSTALL.md | Simplifies install procedure to a single self-contained skill placement without global agent/config edits. |
Review details
- Files reviewed: 17/17 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Validation