From 9d34b22dab76a014f8e7315cac69ad60f9ce820f Mon Sep 17 00:00:00 2001 From: Kisa Date: Wed, 24 Jun 2026 00:16:22 -0400 Subject: [PATCH] docs(delegation): brief Pi on the delegation router + hybrid skill model Router brain = existing dispatch skill (no new skill). Trigger = cheap keyword UserPromptSubmit hook. chief-of-staff conditional, not permanent. Hybrid 3-tier skill model locked. Pi designs the trigger + thresholds + pi-subagents mirror + design-review/persist skill. Co-Authored-By: Claude Opus 4.8 (1M context) --- context/current-state.md | 5 ++- .../delegation-and-skills-brief-2026-06-24.md | 38 +++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 docs/delegation-and-skills-brief-2026-06-24.md diff --git a/context/current-state.md b/context/current-state.md index 0883b49..f2a7219 100644 --- a/context/current-state.md +++ b/context/current-state.md @@ -2,9 +2,10 @@ v:1 # current-state ACTIVE: Workflow-consolidation build from Pi's recovered design is COMPLETE: v:1 state schema, state-sync skill, demoted state blocks (signal/CLAUDE.md + Pi AGENTS.md), governance doc, scoped auto-push Stop hook (live + verified), and startup edits applied to global CLAUDE.md + Pi AGENTS.md (backups *.bak-2026-06-24). Both agents now read current-state.md at startup via state-sync. -NEXT (agent, in order): (1) Pi: re-design option b — broaden git auto-versioning beyond current-state.md to research artifacts (policy/regulatory docs, TriLane-fed intelligence, blog) for the research workflow. (2) Claude: build the readiness model from Pi's design (rename coverage->readiness, rules-to-config, patient/line/shipment grouping + verdict, device-keyed override+recompute, require-plan-type + remove guesser, frontend nesting). (3) Claude: review Pi's AIOS + Automated Blog plans and recommend. MCP parity + skills-as-git-repo = phase 2. To fully arm the Stop hook this session, open /hooks once or restart. +NEXT (agent, in order): (1) Pi: design from docs/delegation-and-skills-brief-2026-06-24.md — delegation-router trigger (cheap UserPromptSubmit keyword hook firing the existing `dispatch` skill) + dispatch thresholds + Pi-side pi-subagents mirror + design-review/persist skill, within the locked hybrid 3-tier skill model. Persist to a file. (2) Pi: re-design option b — broaden git auto-versioning to research artifacts (policy/regulatory docs, TriLane-fed intelligence, blog) for the research workflow. (3) Claude: build the readiness model from Pi's design (rename coverage->readiness, rules-to-config, patient/line/shipment grouping + verdict, device-keyed override+recompute, require-plan-type + remove guesser, frontend nesting). (4) Claude: review Pi's AIOS + Automated Blog plans and recommend. MCP parity + skills-as-git-repo = phase 2. ## Decisions (last 8) +- 2026-06-24 [CC]: Delegation made automatic + content-driven (Kisa's call, worked via /barrier). The existing `dispatch` skill is the router brain (no new skill); trigger = a cheap UserPromptSubmit keyword hook (Route 2, no LLM cost) firing dispatch only on task-shaped prompts; chief-of-staff stays conditional (hat chosen by the task, never permanent, never forbidden). Hybrid 3-tier skill model locked. Briefed to Pi at docs/delegation-and-skills-brief-2026-06-24.md. - 2026-06-24 [CC]: Applied the startup edits — build complete. Global CLAUDE.md Step 1 now runs the state-sync read of current-state.md; Pi AGENTS.md embedded state block demoted to a pointer, skill section modernized, state-sync added. Backups at *.bak-2026-06-24. Workflow-consolidation core: schema + skill + governance + demoted blocks + auto-push hook + startup edits, all done. - 2026-06-24 [CC]: Built + activated the scoped auto-push Stop hook (~/.claude/hooks/state-autopush.sh + ~/.claude/settings.json Stop) — commits + pushes current-state.md only on session stop, never `git add .`. Push path verified. Kisa chose hook option a; option b (broaden auto-versioning to research artifacts) handed to Pi to re-design for the research workflow. - 2026-06-24 [CC]: Recovered Pi's workflow-consolidation design from its session log (Pi finalized it in chat but never wrote it to a file) to docs/workflow-consolidation-design-2026-06-24-pi-recovered.md. Built v:1 state schema + state-sync skill + governance doc; demoted CLAUDE.md embedded state block. Corrected Pi's Stop hook to scope to current-state.md, not `git add .`. @@ -33,4 +34,4 @@ NEXT (agent, in order): (1) Pi: re-design option b — broaden git auto-versioni ## Tip State protocol: read = `git pull --rebase` then read this file (warn if Updated > 24h old); write = edit ACTIVE/NEXT, append one author-stamped decision, then commit + push. Full protocol in the `state-sync` skill. TriLane = searchable archive, not live state. -## Updated: 2026-06-24 (CC: workflow-consolidation build COMPLETE — v:1 schema, state-sync skill, demoted state blocks, governance, scoped auto-push Stop hook (verified), startup edits to global CLAUDE.md + Pi AGENTS.md (backups saved). Option b -> Pi to re-design for the research workflow. NEXT: Pi designs option b; Claude builds the readiness model.) +## Updated: 2026-06-24 (CC: worked the delegation barrier with Kisa. Resolved: `dispatch` is the router brain, a cheap keyword hook is the trigger, chief-of-staff stays conditional; hybrid 3-tier skill model locked. Briefed to Pi at docs/delegation-and-skills-brief-2026-06-24.md. Earlier this session: workflow-consolidation build complete (v:1 schema, state-sync skill, demoted blocks, governance, auto-push hook, startup edits). NEXT: Pi designs the delegation router + option b; Claude builds the readiness model.) diff --git a/docs/delegation-and-skills-brief-2026-06-24.md b/docs/delegation-and-skills-brief-2026-06-24.md new file mode 100644 index 0000000..f75e741 --- /dev/null +++ b/docs/delegation-and-skills-brief-2026-06-24.md @@ -0,0 +1,38 @@ +# Pi Design Brief — Delegation Router + Skill Model + +**Date:** 2026-06-24 +**Designs:** Pi (persist to a FILE, not just chat). **Builds:** Claude. **Approves:** Kisa. +**Frame:** the hybrid 3-tier skill model is locked (below). This brief covers the delegation piece plus two cross-readable process skills. + +## Problem + +Delegation to specialist agents must happen automatically, driven by the work in the moment, not by Kisa's or Claude's memory. Today it depends on Claude remembering to delegate, which fails under load. The `dispatch` skill is already the router brain (auto-invoke rules, a "do NOT invoke" list, the routing table, a brief template, and result synthesis). The missing piece is a reliable, cheap, low-noise TRIGGER that fires it. The same gap exists for Pi with its `pi-subagents`. + +## Decisions locked — do not re-litigate + +- **Router brain = the existing `dispatch` skill.** No new router skill. Enhance `dispatch`; do not duplicate it. +- **Trigger = Route 2:** a cheap conditional `UserPromptSubmit` hook (plain keyword/heuristic match, NO per-prompt LLM cost) that injects a one-line "run the dispatch check" only when a prompt is task-shaped. Not a per-prompt nag, not a standing instruction that leans on memory. +- **chief-of-staff is CONDITIONAL:** the hat is chosen by the task, never permanent and never forbidden. The router decides per task; neither Kisa nor Claude decides by memory. +- **Hybrid 3-tier skill model:** (1) shared operational skills stay at parity (already shared in `~/.claude/skills/`); (2) role-tailored process skills (Claude = build disciplines, Pi = design disciplines); (3) platform-bound capabilities (Claude crew, Pi subagents, vercel, firecrawl) left as-is. + +## What Pi designs + +1. **The trigger (Claude side).** + - The keyword/heuristic set that catches task-shaped prompts (build, fix, design, deploy, refactor, audit, research, "and then", multiple files, etc.) while NOT firing on conversation, one-line answers, or simple lookups. Aim: high recall on real tasks, low noise. + - The exact one-line reminder text it injects (points at the `dispatch` When-to-Invoke check). + - The hook config: `UserPromptSubmit`, `type: command`, cheap (grep/regex, no LLM). Provide the exact `settings.json` block plus any tiny script. Reversible. +2. **Thresholds layered on `dispatch`.** Sharpen "delegate vs solo," and "full chief-of-staff orchestration vs one specialist vs parallel fan-out," so the hat is content-driven. Keep `dispatch`'s existing "do NOT invoke" list intact (single-domain, known-answer, one-liners). +3. **The Pi-side mirror.** The same trigger + router for Pi's `pi-subagents` (fan out research/design-exploration, compare options). PLUS a Pi "design-review + persist-the-deliverable" discipline that runs before Pi declares a design done — this directly fixes the 2026-06-24 drift where Pi finished a design only in chat and never wrote the file. Write it as a plain `~/.claude/skills/*.md` so both runtimes can read it. +4. **The two cross-readable process skills (tier 2):** (a) the delegation discipline, (b) Pi design-review/persist-deliverable. + +## Constraints + +- Content-driven, not memory-dependent. Automatic. +- Cheap: no per-prompt LLM cost; low noise (never fires on chat or one-liners). +- No redundant new router skill; enhance `dispatch`. +- Reversible (hook lives in `settings.json`; back up any global-config file before editing). +- Works for both runtimes (Claude crew via `dispatch`; Pi via `pi-subagents`). + +## Deliverable + +A short design doc, persisted to a file in `signal/docs/`: the trigger keyword set + injected text + exact hook config; the `dispatch` threshold edits; the Pi-side mirror + the design-review/persist skill; and how chief-of-staff stays conditional. Then Claude builds.