Relocate the ~6k-file docs tree from the repo root into plugins/document-navigator/docs/ so the plugin is self-contained and portable. docs/superpowers/ (specs and plans) stays at the repo root. Moved via cp+rm rather than git mv because directory rename() fails with EPERM on this WSL /mnt DrvFs mount; git rename-detection pairs the identical-content files at commit time. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@suaveplan/rules-hono - Hono middleware for @suaveplan/rules — ruleMiddleware, validationMiddleware, accessControl, responseValidation, rateLimitRule, combineRules; lazy default engine, Zod-validated options, OTel surface
Summary
Hono middleware wrapping @suaveplan/rules. Six middleware factories — ruleMiddleware, validationMiddleware, accessControl, responseValidation, rateLimitRule, combineRules — plus a lazy default RuleEngine and a MemoryAccessControlCache reference implementation. Every factory accepts an optional caller-supplied RuleEngine for tenant isolation, returns structured JSON envelopes on every failure mode, and emits an OTel histogram / counter pair labelled by outcome.
Documentation tree
- engine — (no submodules)
- default — (no submodules)
- middleware — (no submodules)
- middleware — (no submodules)
Install
bun add @suaveplan/rules-hono hono
Quick start
import { Hono } from "hono";
import { condition } from "@suaveplan/rules";
import { ruleMiddleware } from "@suaveplan/rules-hono/middleware";
const app = new Hono();
app.use("*", ruleMiddleware(condition("age", "greaterThanOrEqual", 18)));
app.get("/", (c) => c.json({ ok: true }));
Modules
middleware— the six factory functions +MemoryAccessControlCacheengine— lazygetDefaultEngine()(+ test-onlyresetDefaultEnginevia./testing)
See also
@suaveplan/rules— the underlying engine, builder, operators, validators, serializer, optimizer.