feat(reasonix): add rules + skills adapters, expand hook events, MCP timeouts (#2157) - #2193
Merged
Merged
Conversation
…timeouts Follow up DeepSeek-Reasonix upstream updates (all four verified against primary sources): - rules: new ReasonixRule adapter emitting the vendor REASONIX.md at the project root (project) / ~/.reasonix/REASONIX.md (global), folding non-root rules into the single root file (mirrors codexcli). - skills: new ReasonixSkill adapter for Anthropic-style directory-layout skills under .reasonix/skills/<name>/SKILL.md (project + global), modeling the portable name/description frontmatter. - hooks: map four more upstream events onto their canonical equivalents (sessionStart/sessionEnd/subagentStop, and postModelInvocation ⇄ PostLLMCall), taking Reasonix from four to eight mapped events. Notification/PreCompact have no canonical event and are left out; the optional cwd hook field is deferred (needs a canonical HookDefinition field decision). - mcp: pass through the Reasonix-only [[plugins]] call_timeout_seconds (per-server) and tool_timeout_seconds (per-tool table) fields on round-trip. Wires the new adapters into the tuples/processors, regenerates the supported-tools tables and gitignore, syncs docs, and adds unit + e2e Tool x Feature coverage for reasonix rules and skills. Closes #2157 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address a mid review finding on #2193: add export/import/round-trip tests for the new call_timeout_seconds (per-server scalar) and tool_timeout_seconds (per-tool inline table) plugin passthrough fields, including the nested-table serialize path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
|
Merged. All four upstream facts were primary-source verified before implementing. Added the mid review finding's missing coverage (MCP timeout-field round-trip tests, including the nested tool_timeout_seconds table). The optional hook |
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Follow up DeepSeek-Reasonix upstream updates (#2157). Reasonix already emitted MCP, commands, hooks, and permissions; this PR closes the remaining gaps. All four upstream facts were verified against primary sources (
internal/skill/skill.go,internal/memory/doc.go,docs/SPEC.md,docs/DESKTOP_HOOKS.zh-CN.md) before implementing.Changes
1. rules — new
ReasonixRuleadapterReasonix auto-injects a hierarchical instruction document, reading its vendor-specific
REASONIX.md(alongside the cross-toolAGENTS.md/CLAUDE.md). rulesync now emitsREASONIX.mdat the project root (project) /~/.reasonix/REASONIX.md(global) and folds non-root rules into that single file, mirroring the codexcli target.2. skills — new
ReasonixSkilladapterReasonix discovers Anthropic-style directory-layout skills (
<name>/SKILL.md) under.reasonix/skills/(project) and~/.reasonix/skills/(global). rulesync models the portablename/descriptionfrontmatter; the schema is loose so any extra keys on an importedSKILL.mdsurvive the round-trip.3. hooks — four → eight mapped events
Added the four cleanly-mappable events to
REASONIX_HOOK_EVENTS/CANONICAL_TO_REASONIX_EVENT_NAMES:sessionStart⇄SessionStart,sessionEnd⇄SessionEnd,subagentStop⇄SubagentStop, andpostModelInvocation⇄PostLLMCall.Notification/PreCompacthave no canonical event and are left out.4. mcp —
[[plugins]]timeout passthroughcall_timeout_seconds(per-server) andtool_timeout_seconds(per-tool inline table) are added toREASONIX_PLUGIN_FIELDSso they survive round-trips.Deferred (with reason)
cwdfield (marked "optional" in the issue): carrying it through would require a new canonicalHookDefinitionfield (a permanent schema decision), so it is left out of this PR rather than smuggled in as an unmodeled key.Wiring / generated
Registered both adapters in the per-feature tuples and processors, regenerated the supported-tools tables (
README.md,docs/reference/supported-tools.md) and.gitignore, and synceddocs/reference/file-formats.md(rules/skills/hooks/mcp notes) toskills/rulesync/.Testing
pnpm cicheck— all green (6894 unit tests, fmt, oxlint, typecheck, cspell, secretlint, all drift checks).pnpm test:e2ee2e-rules/e2e-skills/e2e-hooks/e2e-mcp— 381 passed. reasonix is now covered by the rules and skills Tool × Feature happy-path matrices (project + global), and the generate/import round-trips are exercised end-to-end.reasonix-rule.test.ts,reasonix-skill.test.ts.Closes #2157
🤖 Generated with Claude Code