Skip to content

feat: UX refactor — smart router, colon-namespaced skills, non-blocking hooks#21

Open
orban wants to merge 9 commits intomainfrom
feat/ux-refactor
Open

feat: UX refactor — smart router, colon-namespaced skills, non-blocking hooks#21
orban wants to merge 9 commits intomainfrom
feat/ux-refactor

Conversation

@orban
Copy link
Owner

@orban orban commented Feb 16, 2026

Summary

  • Consolidate 7 flat skills into 5 colon-namespaced commands (/intent-layer:maintain, /intent-layer:review, /intent-layer:query, /intent-layer:health)
  • Rewrite /intent-layer as a smart router that detects state (none/partial/complete), counts pending learnings, and routes to the right action
  • Make stop hook non-blocking with three-tier confidence scoring (heuristic → Haiku classify → Haiku extract)
  • Add session deduplication to PreToolUse hook (5-min TTL per node, keyed by CLAUDE_SESSION_ID)
  • PostToolUse only shows reminders when the edited file's basename appears in the covering AGENTS.md
  • New /intent-layer:review batch triage skill with AskUserQuestion multiSelect
  • ANSI color support for dashboard scripts (respects NO_COLOR and piped output)
  • Version bump to 2.0.0 with SessionStart migration message for old command names

Breaking changes

Command names changed (no aliases — clean break):

Old New
/intent-layer-maintenance /intent-layer:maintain
/review-mistakes /intent-layer:review
/intent-layer-compound (removed, auto-captured by stop hook)
/intent-layer-onboarding /intent-layer (router handles it)
/intent-layer-query /intent-layer:query
/intent-layer-health /intent-layer:health

SessionStart hook includes a migration table so users see the mapping on their next session.

Commits

  1. 5e5e2dc — ANSI color support for dashboard scripts
  2. d9359e5 — Session deduplication for PreToolUse hook
  3. 879cc34 — Non-blocking stop hook with three-tier confidence scoring
  4. 6708b6b — PostToolUse basename matching (noise reduction)
  5. 982417c — Batch review skill (/intent-layer:review)
  6. e8e4053 — Consolidate 7 skills → 5 with colon namespacing
  7. 1c7943a — Smart router rewrite for /intent-layer
  8. 768149a — Migrate all references, bump to v2.0.0

Stats

37 files changed, 1103 insertions, 2049 deletions (net -946 lines)

Test plan

  • test_hooks.sh — 15 passed
  • test_dedup.sh — 8 passed (new)
  • test_colors.sh — 13 passed (new)
  • test_stop_hook.sh — 13 passed
  • test_writeback.sh — 6 passed
  • test_learn.sh — 8 passed
  • Manual: run /intent-layer in a project with state=complete and pending learnings
  • Manual: verify SessionStart migration message appears

Entire-Checkpoint: 57f99f28cdb3
Add setup_colors() to lib/common.sh with TTY detection and NO_COLOR
convention support. Apply color to show_status.sh, show_hierarchy.sh,
show_telemetry.sh, and audit_intent_layer.sh. JSON output paths
remain unaffected. Add tests/test_colors.sh with 13 tests covering
pipe suppression, NO_COLOR, and JSON output integrity.

Entire-Checkpoint: aebccc32f59e
Skip AGENTS.md injection when the same node was injected <5 min ago
in the same session. Uses CLAUDE_SESSION_ID (primary) or
CLAUDE_PROJECT_DIR (fallback) for session scoping. Dedup files
stored in $TMPDIR, cleaned up by SessionStart hook after 24h.

Entire-Checkpoint: aebccc32f59e
Stop hook now writes stderr summary instead of blocking via output_block.
Three-tier confidence (high/medium/low) threaded through capture pipeline.
High confidence learnings auto-integrate via learn.sh, medium/low queued.
Skeleton reports from PostToolUseFailure default to low confidence.

Entire-Checkpoint: aebccc32f59e
Case-insensitive basename check against covering node reduces noise for
edits to files not explicitly documented in AGENTS.md.

Entire-Checkpoint: aebccc32f59e
New /intent-layer:review presents pending learnings ranked by confidence
with multiSelect for batch acceptance. Replaces the per-item review flow
from review-mistakes and intent-layer-compound.

Entire-Checkpoint: aebccc32f59e
Rename intent-layer-maintenance → intent-layer-maintain.
Update YAML names to colon format: intent-layer:maintain, :health, :query.
Delete intent-layer-compound, review-mistakes, intent-layer-onboarding
(replaced by stop hook auto-capture + /intent-layer:review).
Add workflow reference files under intent-layer/workflows/.
Update skills/AGENTS.md to reflect new structure.

Entire-Checkpoint: aebccc32f59e
4-row state matrix: none→setup, partial→continue, complete+pending→review,
complete+healthy→menu. Delegates to workflow reference files and namespaced
sub-commands. Reduces SKILL.md from 800 lines to ~150.

Entire-Checkpoint: aebccc32f59e
…v2.0.0

Migrate old skill names across scripts, skills, references, and docs.
Add SessionStart migration message for existing users. Bump plugin
version to 2.0.0 reflecting the breaking command name changes.

Entire-Checkpoint: aebccc32f59e
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