Skip to content

feat(integrations): add layered PowerContext Skill routing - #1622

Merged
Teingi merged 7 commits into
oceanbase:masterfrom
knqiufan:codex/layer-powercontext-skills
Sep 16, 2026
Merged

Teingi merged 7 commits into
oceanbase:masterfrom
knqiufan:codex/layer-powercontext-skills

Conversation

@knqiufan

@knqiufan knqiufan commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Closes #1620. Refs #1450 (E). Builds on merged #1522 and follows MiniMax #1526's local-reference organization.

Rationale for this change

PowerContext workflows were combined in large Skill entries, with inconsistent names across hosts and no packaged
OpenClaw Skill. Agents need a discoverable entry and focused workflow detail while tools remain independently usable.

What changes are included in this PR?

  • Use powercontext-project-context for every maintained Skill entry. Update directories, native registration, installation/diagnostic paths, package contents, guidance, docs and tests together. No legacy aliases or migration logic.
  • Split file-backed entries into a concise router and focused Memory, Handoff and Review references. Retain MiniMax's HTTP boundaries and examples; expose only supported workflows per host.
  • Register independently loadable DSH Memory/Handoff/Review Skills and package an OpenClaw Skill through native discovery. Resolve the DSH router by name rather than registration order.
  • Read Hermes discovery descriptions from installed SKILL.md through the native parser. Export the actual host-qualified name and description from its native provider loader / PluginManager; the evaluator preserves this metadata. Add pinned native CI covering installed discovery and propagation of changed bilingual frontmatter.
  • Include all OpenCode Skill resources in its npm archive and expand WorkBuddy placeholders in installed reference files.
  • Validate requested domain reads before data operations. Router-only, wrong-domain and late reads fail with the host, case, expected resource and actual reads; specific read failures retain their original cause and attempted calls. Ordinary requests and unavailable Skills do not require reading.
  • Align DSH domain Handoff with its system guidance: ordinary transfers use capture/prepare/finalize; activation is reserved for explicit boundary triggers. Clarify text-only previews in DSH and OpenCode.
  • Keep behavior/installation/native loading regressions and remove wording, internal-shape, character-set and registration-order assertions. Retain the Scope and standalone-carrier evaluator regressions.
  • Keep English/Chinese development docs focused on current design and validation. Store run-specific observations in the evaluation report.

Are there any user-facing changes?

The Skill entry is now named powercontext-project-context across hosts, replacing project-context and Hermes's
powercontext Skill. Existing installations using an old entry must be reinstalled under the new name; old entry
names are not supported aliases and the installer does not migrate or remove old directories. Hermes exposes the entry as powercontext:powercontext-project-context in its native plugin namespace. Plugin/MCP identities
are unchanged. Ordinary coding has no mandatory Skill/tool detour. Scope isolation, exact citations, explicit writes,
human Review authority and OpenClaw private-session gates remain in force.

This PR closes the E implementation issue only. Keep #1450 open for aggregate acceptance. A fresh 80-observation
step-3.7-flash run has 53 automated routing passes: all 40 ordinary/current-context cases avoided detours, while
13/40 requested-reading probes passed. No passing probe omitted its required domain. These observations are not
semantically qualified acceptance results. Failed model behavior remains visible; green CI does not qualify it.
A separate 16-case DSH/OpenCode follow-up after the Handoff clarification has 15 automated routing passes and one output-budget truncation; semantic reporting remains unreviewed.
The historical Hermes catalogs used file metadata instead of native discovery, so their observations do not qualify the host-visible description or namespace. Native metadata propagation is now tested separately; historical records are not relabeled as native acceptance.
The report also preserves the original 400 observations and identifies 15 historical routing false passes caused by
missing domain reads, without rewriting those records or presenting rescoring as a new model run.

How was this change tested?

  • Local Hermes native/provider, evaluator, WorkBuddy/OpenCode installer and Hermes CLI suites: 174 passed, no skips, using Hermes v2026.8.18 / CLI 0.20.4 and Node 24.15.0. This includes the Windows checkout/probe regressions after synchronizing master.
  • Local Skill resource, missing-resource diagnostic and npm packaging regressions: 12 passed.
  • Existing Python integration/installer/packaging checks and the full supported Python/platform matrix are covered by CI.
  • DSH package and E2E: 265 passed; real DSH SDK runtime: 6 passed, including domain discovery and loading.
  • Pi: 96 passed, including native CLI loading; OpenCode: 53 passed; OpenClaw: 74 passed, including clean-build native Skill discovery.
  • Pi/OpenCode/OpenClaw type checks; DSH/OpenCode/OpenClaw builds; lock check; pre-commit checks; Linux-target Python type check; workflow-action and integration-manifest checks.
  • Local Windows's default type check also traverses untracked user documents and POSIX-only tests; Linux-target checking excluding those local directories passed. Full CI remains authoritative for the supported Python/platform matrix.
  • Website lint, tests, build and static export verification.
  • Fresh model observations, complete exported catalogs, source hashes and precise failures are in the evaluation report. This is controlled evaluation, not proof of native automatic selection or real Server persistence.

Current head 9b56eb19: CI is running. Rebased onto master 534460e0 (#1625). The layered Pi entry retains external Skill workflows and explicit candidate approve/reject/revise workflows, including current-version checks and interactive confirmation. Local Pi tests: 96 passed; Skill resource, evaluator and native Hermes tests: 67 passed. Pi type checking, pre-commit checks and Linux-target Python type checking passed.

AI usage statement

OpenAI Codex assisted with implementation, tests, review analysis, source review and documentation. Model routing
observations used step-3.7-flash. No private credentials are included in the evaluation record.

@PsiACE PsiACE left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the naming, documentation, test scope, and evaluation issues noted inline.

Comment thread docs/en/development/layered-skills.md Outdated
Comment on lines +33 to +36
`using-powercontext` in the tracker describes a routing role, not a required new name. Existing names and installation
paths remain compatible; E does not introduce a competing distribution generator. Canonical names, generated
projections, and their migration remain owned by [#1405](https://github.com/oceanbase/powercontext/issues/1405) and
[#1410](https://github.com/oceanbase/powercontext/pull/1410). Framework adapters and Bub are outside this Skill migration.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please unify the Skill name across agents and update registration, installation paths, docs, and tests together. Replace the old names directly; no aliases or compatibility handling are needed.

Comment thread docs/en/development/layered-skills.md Outdated
catalogs, including MiniMax, do not prove each product's native automatic discovery. Routing and argument validation
remain separate from transcript-bound reporting review. Preserve failed observations and evaluation limits.

## Recorded observations and completion boundary

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move run-specific results, implementation history, and issue completion status to the PR or an evaluation report. Keep the development docs focused on the current design, behavior, and validation steps. Apply this to both languages.

Comment thread tests/test_layered_skills.py Outdated
Comment on lines +36 to +38
assert skill["resources"]["SKILL.md"] == skill["content"]
assert any(key.startswith("references/") for key in skill["resources"])
assert skill["description"].isascii() is False

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove assertions that only lock internal data shapes, directory layout, wording, or registration order. Keep behavior tests, including e2e acceptance, and regressions for known failures. Installed resources being discoverable and readable is worth testing; a straightforward helper does not need tests merely because it exists.

Related assertions: exact wording and registration order.

Comment thread scripts/integration_guidance_skills.py Outdated
Comment on lines +110 to +111
if case.startswith("skill_") and self.available and not self.steps and not record.get("error"):
record.update(routing_passed=False, error="Requested Skill workflow was not read")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In skill_search, reading the router and review-publication.md still passes the routing check without reading the Memory workflow. Please verify that the requested domain was loaded and add a regression test for this false pass.

Comment thread integrations/hermes/plugins/powercontext/__init__.py
@knqiufan

Copy link
Copy Markdown
Contributor Author

Thank you @PsiACE and @Teingi for the careful reviews.
I’ve addressed the feedback and pushed the updates:

  • Unified the Skill entry names and updated registration, installation, documentation, and tests together.
  • Kept development docs focused on the current design and validation, with run-specific results in the evaluation report.
  • Removed implementation-detail assertions and added regressions requiring the requested domain workflow before data operations.
  • Fixed Hermes registration to read the description from the installed SKILL.md using its native parser. Native-host tests now verify discovery metadata, resource resolution, and propagation of updated bilingual descriptions.
  • Updated the evaluator to preserve Hermes’ actual host-qualified name and description, and documented the limitations of the historical Hermes observations.
    All 22 CI checks pass on 26a9314. Historical model failures remain visible and have not been reclassified as successful acceptance.

@knqiufan
knqiufan force-pushed the codex/layer-powercontext-skills branch from 5ada85f to 9b56eb1 Compare September 16, 2026 09:12

@Teingi Teingi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Teingi
Teingi merged commit 69823b1 into oceanbase:master Sep 16, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(integrations): add layered PowerContext Skill routing

3 participants