Skip to content

feat(reasonix): add rules + skills adapters, expand hook events, MCP timeouts (#2157) - #2193

Merged
dyoshikawa merged 2 commits into
mainfrom
resolve-issue-2157-reasonix-rules-skills
Jul 9, 2026
Merged

feat(reasonix): add rules + skills adapters, expand hook events, MCP timeouts (#2157)#2193
dyoshikawa merged 2 commits into
mainfrom
resolve-issue-2157-reasonix-rules-skills

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

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 ReasonixRule adapter

Reasonix auto-injects a hierarchical instruction document, reading its vendor-specific REASONIX.md (alongside the cross-tool AGENTS.md/CLAUDE.md). rulesync now emits REASONIX.md at the project root (project) / ~/.reasonix/REASONIX.md (global) and folds non-root rules into that single file, mirroring the codexcli target.

2. skills — new ReasonixSkill adapter

Reasonix discovers Anthropic-style directory-layout skills (<name>/SKILL.md) under .reasonix/skills/ (project) and ~/.reasonix/skills/ (global). rulesync models the portable name/description frontmatter; the schema is loose so any extra keys on an imported SKILL.md survive the round-trip.

3. hooks — four → eight mapped events

Added the four cleanly-mappable events to REASONIX_HOOK_EVENTS / CANONICAL_TO_REASONIX_EVENT_NAMES: sessionStartSessionStart, sessionEndSessionEnd, subagentStopSubagentStop, and postModelInvocationPostLLMCall. Notification/PreCompact have no canonical event and are left out.

4. mcp — [[plugins]] timeout passthrough

call_timeout_seconds (per-server) and tool_timeout_seconds (per-tool inline table) are added to REASONIX_PLUGIN_FIELDS so they survive round-trips.

Deferred (with reason)

  • hook cwd field (marked "optional" in the issue): carrying it through would require a new canonical HookDefinition field (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 synced docs/reference/file-formats.md (rules/skills/hooks/mcp notes) to skills/rulesync/.

Testing

  • pnpm cicheck — all green (6894 unit tests, fmt, oxlint, typecheck, cspell, secretlint, all drift checks).
  • pnpm test:e2e e2e-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.
  • New unit tests: reasonix-rule.test.ts, reasonix-skill.test.ts.

Closes #2157

🤖 Generated with Claude Code

cm-dyoshikawa and others added 2 commits July 8, 2026 22:07
…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>
@dyoshikawa
dyoshikawa merged commit eb18b34 into main Jul 9, 2026
8 checks passed
@dyoshikawa

Copy link
Copy Markdown
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 cwd field was deferred, as noted in the PR body, since it would require a new canonical HookDefinition field.

@dyoshikawa
dyoshikawa deleted the resolve-issue-2157-reasonix-rules-skills branch July 9, 2026 05:23
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.

Follow up Reasonix upstream updates: rules + skills surfaces still unsupported, missing hook events, MCP timeout fields

2 participants