Skip to content

fix(skills,hooks): container friction fixes — cross-skill dispatch, degraded docs, Linear local mode, hook verbose - #814

Merged
jonahgabriel merged 4 commits into
mainfrom
jonahgabriel/container-friction-fixes
Mar 24, 2026
Merged

jonahgabriel merged 4 commits into
mainfrom
jonahgabriel/container-friction-fixes

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Mar 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes 4 of 9 friction points discovered when running ONEX skills in container-based Claude Code environments without full plugin infrastructure.

Hostile reviewed: 2 runs, 4 passes to convergence, 18 findings (2C, 7M, 9m) — all incorporated.

Files Changed (16)

Skills (slash-prefix fixes + degraded docs):

  • plugins/onex/skills/executing_plans/SKILL.md — dispatch refs + degraded docs + --local mode
  • plugins/onex/skills/insights_to_plan/SKILL.md — dispatch refs + degraded docs
  • plugins/onex/skills/design_to_plan/SKILL.md — dispatch refs + Linear guard
  • plugins/onex/skills/begin_day/SKILL.md — dispatch refs
  • plugins/onex/skills/dod_verify/SKILL.md — dispatch refs
  • plugins/onex/skills/autopilot/SKILL.md — dispatch refs
  • plugins/onex/skills/pr_review/SKILL.md — dispatch refs
  • plugins/onex/skills/ticket_pipeline/SKILL.md — degraded docs
  • plugins/onex/skills/epic_team/SKILL.md — degraded docs
  • plugins/onex/skills/plan_to_tickets/SKILL.md — degraded docs

Shared patterns:

  • plugins/onex/skills/_shared/linear-availability-check.md — new
  • plugins/onex/skills/_shared/validate-skill-names.sh — Rule 4

Hooks:

  • plugins/onex/hooks/scripts/error-guard.sh — _hook_status function
  • plugins/onex/hooks/scripts/pre_tool_use_poly_enforcer.sh — verbose calls
  • plugins/onex/hooks/scripts/pre_tool_use_bash_guard.sh — verbose calls
  • plugins/onex/hooks/scripts/post-tool-use-quality.sh — verbose calls

Test plan

  • validate-skill-names.sh Rules 1-3 pass (0 violations)
  • Rule 4 detects 76 warnings in unmodified files (expected — warning-only)
  • Rule 4 reports 0 warnings for files modified in this PR
  • All pre-commit hooks pass
  • Pre-push hooks pass (mypy, pyright, ONEX validation)

Summary by CodeRabbit

Release Notes

  • New Features

    • Added --local mode flag for offline ticket management when Linear MCP is unavailable
    • Added Linear MCP availability checks with automatic fallback handling
  • Improvements

    • Enhanced hook status reporting for execution visibility
    • Standardized skill references to use onex: prefix syntax
  • Documentation

    • Added Linear availability check and local mode guidelines
    • Added container/degraded environment behavior documentation
    • Added cross-skill reference validation rules

…, Linear check, hook verbose [FRICTION-1,2,3,5]

Tasks 1-4: Convert slash-prefix cross-skill dispatch references to onex: prefix
  in executing_plans, insights_to_plan, design_to_plan, begin_day, dod_verify,
  autopilot, and pr_review SKILL.md/prompt.md files.

Task 6: Add "Container / Degraded Environment" documentation to executing_plans,
  ticket_pipeline, epic_team (full template), insights_to_plan, plan_to_tickets
  (shorter template).

Task 7: Create _shared/linear-availability-check.md with reusable Linear MCP
  availability pattern including local ticket YAML format.

Task 10: Add opt-in OMNICLAUDE_HOOK_VERBOSE mode to error-guard.sh and wire
  _hook_status calls into poly_enforcer, bash_guard, and post-tool-use-quality.
…g-plans [FRICTION-1,3]

Task 5: Add Rule 4 to validate-skill-names.sh — detects slash-prefix
  cross-skill dispatch references. Warning-only initially. Scans both
  SKILL.md and prompt.md, handles indented fences, uses word-boundary
  self-slug exclusion.

Task 8: Add --local mode to executing-plans — probes Linear MCP
  availability before Step 2. Local mode preserves plan structure
  validation but skips ticket creation and routes to general-purpose
  agents instead of ticket-pipeline/epic-team.
…ase 3 [FRICTION-3]

Task 9: Add Linear MCP availability check before Phase 3 auto-launch.
When Linear is unavailable, appends --local to executing-plans invocation
so it creates local YAML stubs instead of Linear tickets.
@coderabbitai

coderabbitai Bot commented Mar 23, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The pull request introduces hook status reporting infrastructure via a new _hook_status() helper function and integrates explicit status logging across multiple hook scripts. It updates skill documentation to use onex: prefixed commands instead of slash-based paths, adds Linear MCP availability checks with local fallback mode, documents container/degraded environment behavior, and enhances skill validation with cross-skill reference warnings.

Changes

Cohort / File(s) Summary
Hook Status Reporting
plugins/onex/hooks/scripts/error-guard.sh, post-tool-use-quality.sh, pre_tool_use_bash_guard.sh, pre_tool_use_poly_enforcer.sh
Added _hook_status() helper function and integrated explicit status logging (PASS/BLOCKED) at control-flow exit points across hook scripts, including outcome details and optional elapsed-time reporting.
Skill Validation
plugins/onex/skills/_shared/validate-skill-names.sh
Added Rule 4 to detect slash-prefixed cross-skill references (e.g., /skill-name) in documentation files, introduced warning-only state with warn() helper, and updated final summary to report warnings separately from violations.
Shared Documentation
plugins/onex/skills/_shared/linear-availability-check.md
New standardized documentation defining Linear MCP availability preflight checks, local-mode fallback behavior, local ticket file schema, and user-facing failure messaging.
Command Reference Updates
plugins/onex/skills/autopilot/SKILL.md, begin_day/SKILL.md, dod_verify/SKILL.md, insights_to_plan/SKILL.md, pr_review/SKILL.md
Updated documentation to replace slash-prefixed command paths (e.g., /ticket-pipeline) with onex: prefixed equivalents and updated dispatch references accordingly.
Linear Availability & Local Mode
plugins/onex/skills/design_to_plan/SKILL.md, executing_plans/SKILL.md
Added Linear MCP availability check steps, documented --local flag for offline ticket creation with local YAML stubs, updated command references to onex: prefixes, and added routing logic for degraded environments.
Container/Degraded Environment Documentation
plugins/onex/skills/epic_team/SKILL.md, plan_to_tickets/SKILL.md, ticket_pipeline/SKILL.md
Added new sections documenting runtime behavior when omniclaude plugin is unavailable, including onex:polymorphic-agent fallback to general-purpose, skill registry dependencies, hook enforcement absence, and Linear MCP availability constraints.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Hooks now whisper status clear,
onex: prefixes far and near,
Linear checks before we start,
Local files when tech falls apart—
Skills evolve, one update per day! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main changes: converting slash-prefixed dispatch to onex: prefixes, adding degraded environment documentation, implementing Linear local mode, and adding hook verbose functionality across skills and hooks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonahgabriel/container-friction-fixes

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
plugins/onex/hooks/scripts/pre_tool_use_poly_enforcer.sh (1)

1-11: ⚠️ Potential issue | 🟡 Minor

Missing MIT SPDX header per coding guidelines.

This file lacks the required MIT SPDX header. Per coding guidelines, all shell scripts in plugins/onex/hooks/scripts/ must include the MIT SPDX header.

🔧 Proposed fix
 #!/bin/bash
+# SPDX-FileCopyrightText: 2025 OmniNode.ai Inc.
+# SPDX-License-Identifier: MIT
+
 # PreToolUse Polymorphic Agent Enforcer Hook
 # Intercepts Task and Agent tool calls and blocks any that don't use

As per coding guidelines: "All shell scripts in the hooks scripts directory must include MIT SPDX headers as specified in omnibase_core/docs/conventions/FILE_HEADERS.md"

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/onex/hooks/scripts/pre_tool_use_poly_enforcer.sh` around lines 1 -
11, The script pre_tool_use_poly_enforcer.sh is missing the required MIT SPDX
header; add the standard MIT SPDX header comment block at the top of the file
(above or immediately after the existing shebang) following the project's
FILE_HEADERS.md convention so the file includes the SPDX identifier and
copyright line; ensure the header format matches other hook scripts in the
repository and retains the existing shebang and script comments (so
functions/behavior like the polymorphic agent enforcement and subsequent Python
audit dispatch invocation are unchanged).
plugins/onex/hooks/scripts/pre_tool_use_bash_guard.sh (1)

1-4: ⚠️ Potential issue | 🟡 Minor

Missing MIT SPDX header per coding guidelines.

This file lacks the required MIT SPDX header. Per coding guidelines, all shell scripts in plugins/onex/hooks/scripts/ must include the MIT SPDX header as specified in omnibase_core/docs/conventions/FILE_HEADERS.md.

🔧 Proposed fix
 #!/bin/bash
+# SPDX-FileCopyrightText: 2025 OmniNode.ai Inc.
+# SPDX-License-Identifier: MIT
+
 # PreToolUse Bash Guard Hook - Portable Plugin Version
 # Intercepts Bash tool invocations for command safety validation

As per coding guidelines: "All shell scripts in the hooks scripts directory must include MIT SPDX headers as specified in omnibase_core/docs/conventions/FILE_HEADERS.md"

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/onex/hooks/scripts/pre_tool_use_bash_guard.sh` around lines 1 - 4,
The script pre_tool_use_bash_guard.sh is missing the required MIT SPDX header;
add the exact MIT SPDX header block (as defined in
omnibase_core/docs/conventions/FILE_HEADERS.md) at the very top of the file
before the shebang/comment lines so the file conforms to the project file-header
guideline; ensure the header text and SPDX identifier match the convention
document exactly.
🧹 Nitpick comments (1)
plugins/onex/skills/design_to_plan/SKILL.md (1)

528-528: Inconsistent slash-prefix at line 528.

Line 518 correctly uses onex:executing-plans, but line 528 still shows /executing-plans. For consistency with the PR's standardization goal, consider updating this to onex:executing-plans as well.

Suggested fix
-/executing-plans docs/plans/YYYY-MM-DD-<feature-name>.md
+onex:executing-plans docs/plans/YYYY-MM-DD-<feature-name>.md
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/onex/skills/design_to_plan/SKILL.md` at line 528, Replace the
inconsistent prefix "/executing-plans" with the standardized tag
"onex:executing-plans" in SKILL.md (locate the occurrence shown as
"/executing-plans" near the existing "onex:executing-plans" entry) so the
namespace/tag format matches the rest of the document; update that single token
and verify any adjacent examples or links use the same "onex:executing-plans"
form.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@plugins/onex/hooks/scripts/pre_tool_use_bash_guard.sh`:
- Around line 1-4: The script pre_tool_use_bash_guard.sh is missing the required
MIT SPDX header; add the exact MIT SPDX header block (as defined in
omnibase_core/docs/conventions/FILE_HEADERS.md) at the very top of the file
before the shebang/comment lines so the file conforms to the project file-header
guideline; ensure the header text and SPDX identifier match the convention
document exactly.

In `@plugins/onex/hooks/scripts/pre_tool_use_poly_enforcer.sh`:
- Around line 1-11: The script pre_tool_use_poly_enforcer.sh is missing the
required MIT SPDX header; add the standard MIT SPDX header comment block at the
top of the file (above or immediately after the existing shebang) following the
project's FILE_HEADERS.md convention so the file includes the SPDX identifier
and copyright line; ensure the header format matches other hook scripts in the
repository and retains the existing shebang and script comments (so
functions/behavior like the polymorphic agent enforcement and subsequent Python
audit dispatch invocation are unchanged).

---

Nitpick comments:
In `@plugins/onex/skills/design_to_plan/SKILL.md`:
- Line 528: Replace the inconsistent prefix "/executing-plans" with the
standardized tag "onex:executing-plans" in SKILL.md (locate the occurrence shown
as "/executing-plans" near the existing "onex:executing-plans" entry) so the
namespace/tag format matches the rest of the document; update that single token
and verify any adjacent examples or links use the same "onex:executing-plans"
form.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ba7de28b-9eac-4da1-b89a-6b391b8dcae2

📥 Commits

Reviewing files that changed from the base of the PR and between 3f8f50e and 77d05a5.

📒 Files selected for processing (16)
  • plugins/onex/hooks/scripts/error-guard.sh
  • plugins/onex/hooks/scripts/post-tool-use-quality.sh
  • plugins/onex/hooks/scripts/pre_tool_use_bash_guard.sh
  • plugins/onex/hooks/scripts/pre_tool_use_poly_enforcer.sh
  • plugins/onex/skills/_shared/linear-availability-check.md
  • plugins/onex/skills/_shared/validate-skill-names.sh
  • plugins/onex/skills/autopilot/SKILL.md
  • plugins/onex/skills/begin_day/SKILL.md
  • plugins/onex/skills/design_to_plan/SKILL.md
  • plugins/onex/skills/dod_verify/SKILL.md
  • plugins/onex/skills/epic_team/SKILL.md
  • plugins/onex/skills/executing_plans/SKILL.md
  • plugins/onex/skills/insights_to_plan/SKILL.md
  • plugins/onex/skills/plan_to_tickets/SKILL.md
  • plugins/onex/skills/pr_review/SKILL.md
  • plugins/onex/skills/ticket_pipeline/SKILL.md

@jonahgabriel
jonahgabriel added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit 9967e74 Mar 24, 2026
55 checks passed
@jonahgabriel
jonahgabriel deleted the jonahgabriel/container-friction-fixes branch March 24, 2026 00:18
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.

1 participant