@softspark/ai-toolkit 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/llms-full.txt CHANGED
@@ -16,9 +16,12 @@
16
16
  - [Plan: Deep Coverage v3.0 — 100% Native Surface Utilization](kb/history/completed/deep-coverage-v3-20260423.md)
17
17
  - [Plan: Ecosystem Deep Sweep — All 12 Supported Tools](kb/history/completed/ecosystem-deep-sweep-20260423.md)
18
18
  - [Plan: Enterprise Config Inheritance — Multi-Repo Governance with `extends`](kb/history/completed/enterprise-config-inheritance-plan-20260412.md)
19
+ - [Spike: F2 MCP Context Trim — Hook Feasibility & Path Decision](kb/history/completed/f2-mcp-trim-spike-20260504.md)
19
20
  - [Plan: Offline-First SLM Profile — Lightweight Mode for Local Models](kb/history/completed/offline-slm-profile-plan-20260411.md)
21
+ - [Plan: Output & Token Discipline](kb/history/completed/output-token-discipline-plan-20260504.md)
20
22
  - [How-To Guides](kb/howto/README.md)
21
23
  - [Plan: Cloud Security Pack — Multi-Cloud Audit](kb/planning/cloud-security-pack-plan.md)
24
+ - [PRD: MCP Context Trim v4.0](kb/planning/mcp-context-trim-v4-prd.md)
22
25
  - [SOP: Ecosystem Sync](kb/procedures/ecosystem-sync-sop.md)
23
26
  - [SOP: Claude Toolkit Maintenance](kb/procedures/maintenance-sop.md)
24
27
  - [SOP: Release Preparation](kb/procedures/release-preparation-sop.md)
@@ -71,7 +74,7 @@
71
74
  - **architecture-audit**: Explore codebase organically for architectural friction, discover shallow modules, and propose module-deepening refactors as GitHub issue RFCs using parallel sub-agent interface designs. Use when user wants to improve architecture, find shallow modules, deepen modules, or reduce coupling.
72
75
  - **architecture-decision**: Architecture decision making via trade-off analysis in RFC/RFD/ADR format: context, constraints, 3+ options, comparison, recommendation. Triggers: architecture decision, ADR, RFC, RFD, trade-offs, options comparison, design choice, pick between, should we use, evaluate approach. Load when weighing 2+ architectural options or writing decision records.
73
76
  - **biz-scan**: Scans codebase for business opportunities by analyzing database schemas, API endpoints, tracking events, and feature flags to surface underutilized capabilities, missing KPIs, and monetization gaps. Use when the user asks about revenue opportunities, business metrics, KPI coverage, analytics gaps, or monetization analysis of a codebase.
74
- - **brand-voice**: Loaded when writing documentation, content, README, or user-facing text. Prevents generic LLM rhetoric and enforces direct, technical voice.
77
+ - **brand-voice**: Loaded when writing documentation, content, README, or user-facing text, AND when an output-mode is set for conversational responses. Prevents generic LLM rhetoric, enforces direct technical voice, and supplies optional concise/strict response modes.
75
78
  - **briefing**: Generate an executive daily briefing that aggregates reports from all agents into a short, decision-focused summary. Use when the user asks for a status update across the whole system — not for one-agent activity reports.
76
79
  - **build**: Build the project with auto-detected toolchain (npm, poetry, cargo, go, flutter, Docker). Use when the user asks to compile, bundle, or produce artifacts — not to run tests or deploy.
77
80
  - **chaos**: Inject controlled faults for resilience testing on non-production targets. Use when the user explicitly asks for a chaos experiment, latency injection, or dependency kill — never implicit.
@@ -217,7 +220,7 @@
217
220
  - **search-specialist**: Information retrieval and search optimization specialist. Trigger words: search, query, semantic search, information retrieval, relevance, ranking, search optimization
218
221
  - **security-architect**: Proactive security design expert. Use for Threat Modeling, architecture security reviews, and designing secure systems (AuthN/AuthZ, Crypto).
219
222
  - **security-auditor**: Security expert. Use for OWASP Top 10, CVE analysis, security audits, penetration testing, vulnerability assessment, hardening. Triggers: security, owasp, cve, vulnerability, audit, hardening, penetration, pentest, injection test, api security.
220
- - **seo-specialist**: Search engine optimization specialist. Trigger words: SEO, search engine, meta tags, structured data, Core Web Vitals, sitemap, robots.txt, schema.org
223
+ - **seo-specialist**: Search engine + generative engine optimization specialist. Trigger words: SEO, GEO, AEO, search engine, meta tags, structured data, Core Web Vitals, sitemap, robots.txt, schema.org, llms.txt, ChatGPT visibility, Claude citation, Perplexity ranking, AI Overviews
221
224
  - **system-governor**: The Guardian of the Constitution. Validates all evolutionary changes and enforces immutable rules. Has VETO power.
222
225
  - **tech-lead**: Technical authority for code quality, architecture patterns, and stack decisions. Use for code reviews, technological disputes, and standards enforcement.
223
226
  - **technical-researcher**: Deep technical investigation and multi-source research synthesis specialist. Trigger words: technical research, feasibility study, root cause analysis, API investigation, compatibility research, comparison matrix, synthesize, aggregate, report, executive summary, gap analysis, findings, multi-source, cross-reference
@@ -1652,6 +1655,128 @@ This plan shares modification targets with the Offline SLM plan:
1652
1655
 
1653
1656
  ---
1654
1657
 
1658
+ ## kb/history/completed/f2-mcp-trim-spike-20260504.md
1659
+
1660
+ ---
1661
+ title: "Spike: F2 MCP Context Trim — Hook Feasibility & Path Decision"
1662
+ category: planning
1663
+ service: ai-toolkit
1664
+ tags:
1665
+ - mcp
1666
+ - hooks
1667
+ - claude-code
1668
+ - spike
1669
+ - feasibility
1670
+ doc_type: spike
1671
+ status: completed
1672
+ created: "2026-05-04"
1673
+ last_updated: "2026-05-04"
1674
+ completed: "2026-05-04"
1675
+ shipped_in: "v3.2.0 (decision only — implementation deferred to v4.0)"
1676
+ description: "Spike conclusion for Feature 2 of the output-token-discipline plan. Determines whether Claude Code hooks can modify MCP tool descriptions before they reach the LLM. Result: hooks operate per-call, not on tool list metadata. Full feature requires an MCP proxy server (multi-day scope). Outcome: F2 deferred to v4.0 with own dedicated PRD."
1677
+ ---
1678
+
1679
+ # Spike: F2 MCP Context Trim — Hook Feasibility & Path Decision
1680
+
1681
+ ## Question
1682
+
1683
+ Can Claude Code's hook system modify MCP **tool descriptions** that get included in the model's system prompt, or do hooks only intercept individual tool **calls**?
1684
+
1685
+ ## Method
1686
+
1687
+ Reviewed local sources only (RAG MCP offline at spike time):
1688
+
1689
+ 1. `app/skills/hook-creator/SKILL.md` — exhaustive list of supported hook events and their data shapes
1690
+ 2. `app/hooks/guard-destructive.sh`, `app/hooks/guard-path.sh` — actual examples reading `tool_input` from stdin
1691
+ 3. `app/skills/mcp-builder/SKILL.md` — MCP server-side conventions
1692
+ 4. `~/.claude/.mcp.json` — user's installed MCP servers (Context7, sequential-thinking, filesystem, rag-mcp, memory, jira-mcp)
1693
+
1694
+ ## Findings
1695
+
1696
+ ### Hook events that touch tool data
1697
+
1698
+ | Event | Modifies tool list? | Modifies tool input? | Notes |
1699
+ |-------|--------------------|--------------------|-------|
1700
+ | `PreToolUse` | no | no (only block via exit 2) | Reads `tool_input.*`, decides allow/deny |
1701
+ | `PostToolUse` | no | no | Sees result for logging / feedback |
1702
+ | `PermissionRequest` | no | yes (`updatedInput`) | Can rewrite a single call's args |
1703
+ | `Elicitation` | no | n/a | Intercepts MCP UI prompts, not tool list |
1704
+ | `SessionStart` | no | n/a | Context injection only |
1705
+ | `InstructionsLoaded` | no | n/a | Verifies CLAUDE.md presence |
1706
+
1707
+ **No event exposes the MCP `tools/list` response or the system-prompt tool catalog**. The tool catalog is materialized once per MCP server connection from the server's own `tools/list` reply.
1708
+
1709
+ ### Why this matters
1710
+
1711
+ The compression target was the bulk of MCP tool descriptions sitting in every model turn's system prompt. Examples from the user's installed servers:
1712
+
1713
+ - `dart-mcp-server` — ~30 tools with multi-paragraph descriptions
1714
+ - `filesystem` — verbose paths and example sections
1715
+ - `pencil` — "IMPORTANT" stanzas repeated across tools
1716
+ - `jira-mcp` — long `Use this tool to...` boilerplate
1717
+
1718
+ At ~100 tools across 7 servers in this user's config, easily 8–15k tokens of pure description text. Real waste, but Claude Code does not let a hook touch it.
1719
+
1720
+ ### What would actually work
1721
+
1722
+ To compress MCP tool descriptions before they reach the LLM, exactly two architectures are viable:
1723
+
1724
+ 1. **Local MCP proxy server** between Claude Code and each target server. The proxy re-implements `tools/list` to rewrite descriptions on the fly while passing through `tools/call`. Requires JSON-RPC 2.0 over stdio + SSE per server, per-server config in `~/.claude/.mcp.json`, and a process supervisor for the proxies. Multi-day scope. Failure mode: a buggy proxy breaks all MCP-dependent skills.
1725
+ 2. **Source-side fork**: ship pre-trimmed copies of common MCP servers (`@softspark/jira-mcp-trim`, etc.) — high maintenance burden, doesn't help users with custom servers.
1726
+
1727
+ Neither is a "minimal change" by the standards of this plan.
1728
+
1729
+ ## Decision (final, 2026-05-04)
1730
+
1731
+ **Drop F2 from v3.2.0 entirely. Defer the full MCP proxy approach to v4.0** with its own dedicated PRD and architecture spike.
1732
+
1733
+ The spike originally surfaced a smaller "F2-lite observability tool" alternative (read-only inventory + suggestions). After review, the user chose to drop both options from v3.2.0:
1734
+
1735
+ - v3.2.0 ships F1 + F3 + F3.5 only (output modes, token telemetry, default statusline)
1736
+ - F2 work — including any observability-first prototype — moves wholesale to v4.0 milestone
1737
+ - Reasoning: keep v3.2.0 release scope tight; v4.0 owns MCP-cost story end-to-end with proper proxy architecture
1738
+
1739
+ ## Alternatives considered
1740
+
1741
+ | Option | Pros | Cons | Verdict |
1742
+ |--------|------|------|---------|
1743
+ | Build full MCP proxy in v3.2.0 | Achieves original compression goal | Multi-day work, single-bug-breaks-all-MCP failure mode, would block release | Rejected — too big for current release |
1744
+ | Pre-install rewrite of `.mcp.json` | One-shot, no runtime cost | MCP spec sources descriptions from server, not config — wouldn't actually take effect | Rejected — does not work |
1745
+ | F2-lite observability tool in v3.2.0 | Low risk, gives users data | Not the original target; partial value; mixes two milestones | Rejected by user — keep v3.2.0 focused |
1746
+ | **Defer F2 entirely to v4.0** | Clean release boundaries; v4.0 owns MCP story end-to-end with full proxy scope | Token waste in MCP descriptions stays invisible to users until v4.0 | **Selected** |
1747
+
1748
+ ## What was delivered in v3.2.0 (F1 + F3 + F3.5)
1749
+
1750
+ The output-discipline goal is partially addressed by what shipped:
1751
+
1752
+ - **Output modes** (F1) cut conversational response tokens 60–80% on the shipped fixture set
1753
+ - **Real token telemetry** (F3) lets users see actual cost per session — including the MCP description overhead, even if they cannot yet trim it
1754
+ - **Default statusline** (F3.5) surfaces that cost continuously
1755
+
1756
+ Users now have visibility into the MCP-description waste this spike identified, even though automated compression has to wait for v4.0.
1757
+
1758
+ ## What goes into v4.0
1759
+
1760
+ Tracked as an active PRD: [`kb/planning/mcp-context-trim-v4-prd.md`](../../planning/mcp-context-trim-v4-prd.md). It carries forward:
1761
+
1762
+ 1. Compression heuristics from the original F2 design (migrated out of the archived plan into the live PRD)
1763
+ 2. Local MCP proxy server architecture: JSON-RPC 2.0 over stdio + SSE per server, process supervisor, per-server config in `~/.softspark/ai-toolkit/mcp-proxy/`
1764
+ 3. Rollback / opt-out story — a buggy proxy must not break MCP-dependent skills
1765
+ 4. Failure mode — proxy down → fall through to direct MCP server, with telemetry warning
1766
+ 5. Migration of existing user `.mcp.json` configs
1767
+
1768
+ Estimate in the PRD: ~8 working days.
1769
+
1770
+ ## Status
1771
+
1772
+ | Date | Status | Author |
1773
+ |------|--------|--------|
1774
+ | 2026-05-04 | Spike completed | claude |
1775
+ | 2026-05-04 | User decision: defer F2 to v4.0 entirely (no F2-lite in v3.2.0) | lukasz.krzemien |
1776
+ | 2026-05-04 | Spike archived to `kb/history/completed/` alongside the parent plan | claude |
1777
+
1778
+ ---
1779
+
1655
1780
  ## kb/history/completed/offline-slm-profile-plan-20260411.md
1656
1781
 
1657
1782
  ---
@@ -2401,6 +2526,272 @@ This plan shares modification targets with the Enterprise Config plan:
2401
2526
 
2402
2527
  ---
2403
2528
 
2529
+ ## kb/history/completed/output-token-discipline-plan-20260504.md
2530
+
2531
+ ---
2532
+ title: "Plan: Output & Token Discipline — Concise Modes, MCP Trim, Token Receipts"
2533
+ category: planning
2534
+ service: ai-toolkit
2535
+ tags:
2536
+ - brand-voice
2537
+ - output-style
2538
+ - mcp
2539
+ - statusline
2540
+ - token-tracking
2541
+ - hooks
2542
+ - briefing
2543
+ doc_type: plan
2544
+ status: completed
2545
+ created: "2026-05-04"
2546
+ last_updated: "2026-05-04"
2547
+ completed: "2026-05-04"
2548
+ completion: "100% of v3.2.0 scope (F2 deferred to v4.0 per spike conclusion)"
2549
+ shipped_in: "v3.2.0"
2550
+ description: "Three coordinated extensions to ai-toolkit that reduce token usage and surface real cost data: (1) brand-voice output modes for concise/strict Claude responses, (2) MCP description trimmer to compact tool listings before they reach the model, (3) token receipts in statusline reading session JSONL directly. Native extensions, no third-party skill names imported."
2551
+ ---
2552
+
2553
+ # Plan: Output & Token Discipline
2554
+
2555
+ **Status:** Completed (shipped in v3.2.0 on 2026-05-04)
2556
+ **Author:** lukasz.krzemien
2557
+ **Source of inspiration:** external Claude Code plugin observed 2026-05-04 (mechanism only, not naming or branding)
2558
+ **Spike companion:** [`kb/history/completed/f2-mcp-trim-spike-20260504.md`](f2-mcp-trim-spike-20260504.md)
2559
+
2560
+ ## Cel
2561
+
2562
+ Zmniejszyć realne zużycie tokenów w sesjach Claude Code i dać użytkownikowi widoczność tego zużycia w czasie rzeczywistym. Trzy mechanizmy działające razem, każdy jako natywne rozszerzenie istniejących komponentów ai-toolkit (`brand-voice`, `briefing`, `track-usage.sh`). Bez importowania obcych nazw — adaptacja idei jako własnych.
2563
+
2564
+ ## Kontekst
2565
+
2566
+ Obecnie ai-toolkit ma:
2567
+
2568
+ - `brand-voice` skill — pilnuje stylu pisanego (docs, README, content)
2569
+ - `track-usage.sh` hook — liczy `/skill` invocations do `~/.softspark/ai-toolkit/stats.json`
2570
+ - `compile_slm.py` — kompresuje cały toolkit dla małych modeli (inny scope)
2571
+ - 113 skilli, pełen system hooków, doctor, eject
2572
+
2573
+ Brakuje:
2574
+
2575
+ - Trybu zwięzłego dla *odpowiedzi* Claude'a (brand-voice działa tylko dla pisanej zawartości)
2576
+ - Kompresji opisów MCP-tooli, które zżerają setki tokenów na każdym wywołaniu
2577
+ - Realnego pomiaru tokenów per sesja (mamy tylko licznik invocations, nie tokenów)
2578
+
2579
+ ## Zakres
2580
+
2581
+ Trzy features, zaplanowane w kolejności narastającego ryzyka.
2582
+
2583
+ ---
2584
+
2585
+ ## Feature 1 — `brand-voice` output modes
2586
+
2587
+ ### Cel
2588
+ Rozszerzyć `brand-voice` o tryby zwięzłości stosowane do odpowiedzi konwersacyjnych Claude'a, nie tylko do generowanych dokumentów.
2589
+
2590
+ ### Decyzje nazewnicze
2591
+ - **Wybrane:** zostaje `brand-voice` z wewnętrznymi trybami (`default`, `concise`, `strict`)
2592
+ - **Odrzucone:**
2593
+ - `concise` jako osobny skill — duplikuje brand-voice, niepotrzebny rozłam
2594
+ - `terse` — niejednoznaczne, kojarzy się z "rude"
2595
+ - `output-discipline` — zbyt biurokratyczne
2596
+
2597
+ ### Pliki
2598
+
2599
+ | Ścieżka | Akcja | Cel |
2600
+ |---------|-------|-----|
2601
+ | `app/skills/brand-voice/SKILL.md` | edit | Dodaj sekcję `## Output Modes` z opisem trzech trybów i sposobu aktywacji |
2602
+ | `app/skills/brand-voice/modes/concise.md` | new | Reguły: max 3 zdania per odpowiedź na pytanie zamknięte, brak preamble, brak "I'll now..." |
2603
+ | `app/skills/brand-voice/modes/strict.md` | new | Reguły: tylko fakty, zero filler adjectives, max 1 zdanie per fakt, listy zamiast prozy |
2604
+ | `app/skills/brand-voice/scripts/measure.py` | new | Eval przed/po na fixtures, raport oszczędności tokenów |
2605
+ | `tests/fixtures/output-modes/` | new | 10 par baseline/expected dla różnych typów zadań (debug, review, plan, eksploracja) |
2606
+ | `tests/skills_brand_voice.bats` | edit | Dodaj asercje dla modes (regex na zakazane filler, max-line-length) |
2607
+
2608
+ ### Aktywacja
2609
+
2610
+ Trzy mechanizmy:
2611
+
2612
+ 1. Frontmatter w projekcie: `output-mode: concise` w `CLAUDE.md` lub `.claude/settings.json`
2613
+ 2. Slash: `/brand-voice concise` przełącza dla bieżącej sesji (przez `track-usage.sh` zapisuje do session state)
2614
+ 3. Auto-trigger: skill ładuje się także przy długich sesjach generowania (>30 min, heurystyka)
2615
+
2616
+ ### Success criteria
2617
+
2618
+ - Na zestawie 10 fixtures `concise` redukuje output >40% bez utraty kluczowych faktów
2619
+ - Test asercji: zachowane są wszystkie nazwy plików i symboli z baseline (regex match)
2620
+ - `validate.py --strict` przechodzi
2621
+ - `audit_skills.py --ci` zero HIGH
2622
+
2623
+ ### Estymata
2624
+ 4–6h
2625
+
2626
+ ---
2627
+
2628
+ ## Feature 2 — MCP context trim — DEFERRED TO v4.0
2629
+
2630
+ **Status:** Deferred. Spike conducted before implementation, conclusion in [`f2-mcp-trim-spike-20260504.md`](f2-mcp-trim-spike-20260504.md).
2631
+
2632
+ **Reason:** Claude Code hooks do not expose the MCP `tools/list` response or the system-prompt tool catalog. Hook events (`PreToolUse`, `PermissionRequest`, `Elicitation`) operate on individual tool calls only. Modifying tool descriptions before they reach the model requires a local MCP proxy server — multi-day scope, single-bug-breaks-all-MCP failure mode, out of scope for v3.2.0.
2633
+
2634
+ **Resolution:** Full proxy-server approach moved to its own active planning doc: [`kb/planning/mcp-context-trim-v4-prd.md`](../../planning/mcp-context-trim-v4-prd.md). The mid-spike "F2-lite observability tool" alternative was also dropped per user decision (2026-05-04) — v3.2.0 ships F1+F3 only; v4.0 picks up the proxy-server work in full scope.
2635
+
2636
+ The compression heuristics, file plan, and risk register from the original Feature 2 design were migrated into the v4.0 PRD. They are no longer duplicated in this archived doc.
2637
+
2638
+ ---
2639
+
2640
+ ## Feature 3 — Token receipts w statusline
2641
+
2642
+ ### Cel
2643
+ Pokazać realne (nie estymowane) zużycie tokenów per-sesja w statusline Claude Code. Dane czytane z session JSONL, nie z heurystyk.
2644
+
2645
+ ### Decyzje nazewnicze
2646
+ - **Wybrane:** rozszerzenie istniejącego skilla `briefing` + nowy hook `statusline-tokens.sh` + nowy skrypt `session_token_stats.py`
2647
+ - **Odrzucone:**
2648
+ - Nowy skill `stats` / `receipts` — duplikuje funkcjonalnie `briefing`
2649
+ - Modyfikacja istniejącego `track-usage.sh` jako jedynego punktu — za duża odpowiedzialność jednego pliku
2650
+
2651
+ ### Pliki
2652
+
2653
+ | Ścieżka | Akcja | Cel |
2654
+ |---------|-------|-----|
2655
+ | `scripts/session_token_stats.py` | new | Parser JSONL stdlib-only. Funkcje: `read_session()`, `aggregate_by_skill()`, `compare_baseline_vs_concise()` |
2656
+ | `app/hooks/statusline-tokens.sh` | new | Type `statusLine` w settings.json. Sumuje `usage.input_tokens` + `usage.output_tokens` z bieżącej sesji JSONL |
2657
+ | `app/hooks/track-usage.sh` | edit | Po wykryciu `/skill` zapisuj też `prompt_tokens` jeśli `transcript_path` dostępne |
2658
+ | `app/skills/briefing/SKILL.md` | edit | Nowa sekcja "Token receipts", komendy `/briefing --tokens --since 7d`, `/briefing --tokens --share` |
2659
+ | `scripts/merge-hooks.py` | edit | Statusline injection do `settings.json`, preserve user-customized entries (delivered as F3.5) |
2660
+ | `app/hooks/ai-toolkit-statusline.sh` | new | Comprehensive statusline (cwd + git + ctx + tokens + cost + model), default install (delivered as F3.5) |
2661
+ | `tests/session_token_stats.bats` | new | Fixture JSONL z 3 messages, asercje na sumę i breakdown |
2662
+ | `tests/statusline_tokens.bats` | new | Mock JSONL, weryfikacja outputu hooka (max 80 znaków, brak NaN, fallback gdy brak sesji) |
2663
+
2664
+ ### Format statusline (proponowany)
2665
+
2666
+ ```
2667
+ [ai-toolkit] /concise · session: 24.7k · trend: ↓18%
2668
+ ```
2669
+
2670
+ Krótki tryb default, `--verbose` dodaje breakdown per skill.
2671
+
2672
+ ### Ścieżka odczytu sesji
2673
+
2674
+ Claude Code zapisuje JSONL do `~/.claude/projects/<sanitized-cwd>/<session-id>.jsonl`. Każda linia to message z polem `usage` (input_tokens, output_tokens, cache_*). Skrypt:
2675
+
2676
+ 1. Identyfikuje aktualną sesję z env var `CLAUDE_SESSION_ID` (jeśli istnieje) lub najświeższy plik
2677
+ 2. Parsuje linie ignorując te bez `usage`
2678
+ 3. Sumuje + agreguje per skill (jeśli `track-usage.sh` zapisał skill mapping w sidecar pliku)
2679
+
2680
+ ### Success criteria
2681
+
2682
+ - Statusline pokazuje liczbę tokenów odczytaną z JSONL z dokładnością ±2% vs Anthropic API report (jeśli dostępny)
2683
+ - Brak crash gdy sesja jeszcze pusta
2684
+ - Brak crash gdy JSONL malformed
2685
+ - `validate.py --strict` przechodzi
2686
+
2687
+ ### Estymata
2688
+ 6–8h
2689
+
2690
+ ---
2691
+
2692
+ ## Co nie wchodzi w plan
2693
+
2694
+ | Pomysł | Powód odrzucenia |
2695
+ |--------|------------------|
2696
+ | Memory/file compressor (`/compress <file>`) | `compile_slm.py` już kompresuje toolkit, brak konkretnego use-case dla per-file |
2697
+ | Compact `/commit`, `/review` modes | Powstaną automatycznie po Feature 1 (te skille będą używać reguł `concise` mode) |
2698
+ | "Caveman speak" / classical Chinese mode | Nie pasuje do tonu workmanlike, sprzeczne z brand-voice |
2699
+ | Single curl-installer | Już mamy `ai-toolkit install` z profilami |
2700
+
2701
+ ---
2702
+
2703
+ ## Kolejność realizacji i zależności
2704
+
2705
+ ```
2706
+ Feature 1 (brand-voice modes)
2707
+ ↓ dostarcza reguły zwięzłości
2708
+ Feature 3 (token receipts)
2709
+ ↓ dostarcza pomiar before/after dla F1
2710
+ Feature 2 (mcp-trim) ← spike research najpierw, niezależne od F1/F3
2711
+ ```
2712
+
2713
+ **F1 i F3 mogą iść parallel po dokończeniu F1 mode files.**
2714
+ **F2 ma osobną decyzję go/no-go po spike'u.**
2715
+
2716
+ ## Estymata zbiorcza
2717
+
2718
+ | Feature | Min | Max |
2719
+ |---------|-----|-----|
2720
+ | F1 | 4h | 6h |
2721
+ | F3 | 6h | 8h |
2722
+ | F2 spike | 1h | 1h |
2723
+ | F2 implementacja | 0h | 10h |
2724
+ | **Total** | **11h** | **25h** |
2725
+
2726
+ ## Doc & test sweep (obowiązkowy po każdym feature)
2727
+
2728
+ 1. `python3 scripts/validate.py --strict`
2729
+ 2. `python3 scripts/audit_skills.py --ci`
2730
+ 3. Regen `AGENTS.md`: `python3 scripts/generate_agents_md.py > AGENTS.md`
2731
+ 4. Regen `llms.txt`: `python3 scripts/generate_llms_txt.py > llms.txt`
2732
+ 5. Bump version w `package.json` + `plugin.json`
2733
+ 6. Update `skills-catalog.md` z nowymi/zmienionymi skillami
2734
+ 7. Update `README.md`, `CLAUDE.md`, `ARCHITECTURE.md`, `architecture-overview.md` jeśli zmiana behavior
2735
+ 8. Commit conventional: `feat(brand-voice): add output modes`, `feat(briefing): add token receipts`, `feat(mcp-trim): add description trimmer`
2736
+
2737
+ ## Open questions — resolved
2738
+
2739
+ 1. **Czy `PreToolUse` może modyfikować deklarację tool'a w MCP listingu?** — NIE. Spike potwierdził że żaden hook event nie wystawia `tools/list`. F2 wymaga MCP proxy. Odsunięte do v4.0.
2740
+ 2. **Czy Claude Code wystawia hookom `CLAUDE_SESSION_ID`?** — częściowo. `scripts/session_token_stats.py` używa fallback "newest JSONL w katalogu projektu" + opcjonalnie cwd → sanitize → match. Działa stabilnie na realnych sesjach (96.6k tokens parsed correctly w smoke tescie).
2741
+ 3. **Czy włączyć `concise` mode jako default?** — pozostaje opt-in. `brand-voice` z trybami auto-loaduje się tylko gdy projekt ustawi `output-mode: concise` w `CLAUDE.md` lub user wpisze `/brand-voice concise`. Pomiary z F3 dadzą dane do późniejszej decyzji.
2742
+
2743
+ ## Final delivery (v3.2.0)
2744
+
2745
+ ### Shipped
2746
+
2747
+ | Feature | Outcome | Pliki |
2748
+ |---------|---------|-------|
2749
+ | **F1 — brand-voice output modes** | Done. Aggregate ratio na 3 fixtures: concise **21%**, strict **14%** (cel ≤60% / ≤40%). | `app/skills/brand-voice/SKILL.md`, `app/skills/brand-voice/modes/{concise,strict}.md`, `app/skills/brand-voice/scripts/measure.py`, `tests/fixtures/output-modes/{debug-explanation,plan-question,review-summary}/`, `tests/test_brand_voice.bats` (14 tests) |
2750
+ | **F3 — token receipts** | Done. Smoke-test na realnej sesji: 96.6k tokenów poprawnie sparsowane. | `scripts/session_token_stats.py`, `tests/fixtures/session-jsonl/{three-messages,malformed,empty}.jsonl`, `tests/test_session_token_stats.bats` (15 tests) |
2751
+ | **F3.5 — comprehensive default statusline** | Done. Pełny segment: cwd + git + ctx% + tokens + trend + model-aware cost + model. Installed by default via `merge-hooks.py`, user-custom statusLine preserved untouched. | `app/hooks/ai-toolkit-statusline.sh`, `app/hooks.json` (`statusLine` entry), `scripts/merge-hooks.py` (statusLine inject/strip), `tests/test_statusline_hook.bats` (14 tests), `tests/test_merge_hooks_statusline.bats` (8 tests) |
2752
+ | **briefing skill extension** | `/briefing --tokens` + wire-up docs + opt-out env vars. | `app/skills/briefing/SKILL.md` |
2753
+
2754
+ ### Deviations from plan
2755
+
2756
+ | Plan said | Shipped | Reason |
2757
+ |-----------|---------|--------|
2758
+ | 10 fixtures w F1 | 3 fixtures + `must_contain.txt` mechanism | Mniejszy zestaw + extensible konwencja wystarcza do walidacji budżetów; jakość > ilość |
2759
+ | F3 hook integracja jako follow-up (manual settings.json edit) | F3.5 dostarczył pełny default install via `merge-hooks.py` | User feedback w trakcie pracy: "niech ai-toolki instaluje go domyslnie od nowej wersji" |
2760
+ | F2 implementacja po spike'u | F2 deferred do v4.0 | Spike pokazał że Claude Code hooki nie wystawiają `tools/list` → wymaga proxy server, multi-day scope |
2761
+
2762
+ ### Quality gates passed
2763
+
2764
+ - `validate.py --strict`: 0 errors / 0 warnings
2765
+ - `audit_skills.py --ci`: 0 HIGH / 0 WARN / 13 INFO (pre-existing)
2766
+ - `audit_skills.py --sarif`: SARIF 2.1.0 valid, 5 rules
2767
+ - `npm test`: 1032 / 1032 passing (was 981 in v3.1.1)
2768
+ - Registry drift: clean
2769
+ - Provenance + checksum-pin: verified
2770
+ - Ecosystem doctor: 9 cosmetic drifts (class A) refreshed
2771
+
2772
+ ### Skill classification change
2773
+
2774
+ `brand-voice` przeszedł `user-invocable: false → true` (knowledge → hybrid):
2775
+
2776
+ - **Hybrid**: 31 → 32
2777
+ - **Knowledge**: 49 → 48
2778
+ - **Task**: 32 (no change)
2779
+
2780
+ Updated: `README.md`, `kb/reference/architecture-overview.md`, `kb/reference/skills-catalog.md`.
2781
+
2782
+ ## Status & rewizje
2783
+
2784
+ | Data | Zmiana | Autor |
2785
+ |------|--------|-------|
2786
+ | 2026-05-04 | Initial draft | lukasz.krzemien |
2787
+ | 2026-05-04 | F1 implementation done — brand-voice modes, measure.py, 3 fixtures, 14 bats tests. Aggregate ratio: concise 21%, strict 14%. | claude |
2788
+ | 2026-05-04 | F3 implementation done — `session_token_stats.py`, `statusline-tokens.sh`, briefing skill extension. 22 new bats tests. Smoke-tested on real session. | claude |
2789
+ | 2026-05-04 | F3.5 follow-up done — replaced focused tokens hook with comprehensive `ai-toolkit-statusline.sh`. Extended `merge-hooks.py` for safe statusLine injection. Version bumped 3.1.1 → 3.2.0. 22 new bats tests. CHANGELOG + README updated. | claude |
2790
+ | 2026-05-04 | F2 spike completed — see [`f2-mcp-trim-spike-20260504.md`](f2-mcp-trim-spike-20260504.md). Hooks cannot modify `tools/list`. F2 deferred to v4.0 with own PRD. | claude |
2791
+ | 2026-05-04 | Plan archived to `kb/history/completed/`. Shipped in v3.2.0. | claude |
2792
+
2793
+ ---
2794
+
2404
2795
  ## kb/howto/README.md
2405
2796
 
2406
2797
  ---
@@ -3588,6 +3979,169 @@ Examples:
3588
3979
 
3589
3980
  ---
3590
3981
 
3982
+ ## kb/planning/mcp-context-trim-v4-prd.md
3983
+
3984
+ ---
3985
+ title: "PRD: MCP Context Trim v4.0 — Local Proxy with Description Compression"
3986
+ category: planning
3987
+ service: ai-toolkit
3988
+ tags:
3989
+ - mcp
3990
+ - proxy
3991
+ - tool-descriptions
3992
+ - jsonrpc
3993
+ - tokens
3994
+ - v4
3995
+ doc_type: plan
3996
+ status: proposed
3997
+ created: "2026-05-04"
3998
+ last_updated: "2026-05-04"
3999
+ completion: "0%"
4000
+ target_milestone: "v4.0"
4001
+ predecessor:
4002
+ - "kb/history/completed/output-token-discipline-plan-20260504.md"
4003
+ - "kb/history/completed/f2-mcp-trim-spike-20260504.md"
4004
+ description: "Local MCP proxy server that compresses tool descriptions before they reach the model. Carved out of the v3.2.0 output-token-discipline plan (Feature 2), deferred after the 2026-05-04 spike showed Claude Code hooks cannot modify tools/list metadata. Targets ~8-15k token reduction per session for users with many MCP servers."
4005
+ ---
4006
+
4007
+ # PRD: MCP Context Trim v4.0
4008
+
4009
+ **Status:** Proposed
4010
+ **Target milestone:** v4.0
4011
+ **Carved out of:** [`output-token-discipline-plan-20260504.md`](../history/completed/output-token-discipline-plan-20260504.md) (was Feature 2)
4012
+ **Spike basis:** [`f2-mcp-trim-spike-20260504.md`](../history/completed/f2-mcp-trim-spike-20260504.md)
4013
+
4014
+ ## Problem
4015
+
4016
+ MCP server tool descriptions are injected into every model turn's system prompt. With ~100 tools across 7 typical servers, descriptions consume 8–15k tokens per turn — pure overhead, paid every message. Examples observed in users' configs:
4017
+
4018
+ - `dart-mcp-server` — ~30 tools with multi-paragraph descriptions
4019
+ - `filesystem` — verbose paths and example sections
4020
+ - `pencil` — "IMPORTANT" stanzas repeated across tools
4021
+ - `jira-mcp` — long `Use this tool to…` boilerplate
4022
+
4023
+ The v3.2.0 output-discipline plan attempted to solve this with a hook-based trimmer. The spike conducted 2026-05-04 proved Claude Code hooks do not expose `tools/list` metadata or the system-prompt tool catalog. The only viable architecture is a local MCP proxy.
4024
+
4025
+ ## Goal
4026
+
4027
+ Reduce MCP-description overhead by ≥40% per server, with **zero** loss of parameter schemas, required fields, or discrimination signals (`not`, `never`, `only`, `except`, `unless`).
4028
+
4029
+ ## Non-goals
4030
+
4031
+ - Modifying tool **call** behavior (only descriptions)
4032
+ - Compressing user-facing prompts or completions
4033
+ - Replacing or rewriting upstream MCP servers
4034
+ - Touching MCP servers we do not control
4035
+
4036
+ ## Architecture
4037
+
4038
+ ### Proxy topology
4039
+
4040
+ ```
4041
+ Claude Code ──stdio──▶ ai-toolkit MCP proxy ──stdio/SSE──▶ upstream MCP server
4042
+
4043
+ └─ rewrites tools/list response
4044
+ passes through tools/call unchanged
4045
+ ```
4046
+
4047
+ One proxy process per upstream server, supervised by `ai-toolkit mcp-trim daemon` (or equivalent). User's `~/.claude/.mcp.json` is rewritten by `ai-toolkit install` (opt-in) to point Claude Code at the proxy instead of upstream — proxy reads the original target from a sidecar config.
4048
+
4049
+ ### Required components
4050
+
4051
+ | Component | Purpose |
4052
+ |-----------|---------|
4053
+ | `scripts/mcp_proxy_server.py` | JSON-RPC 2.0 proxy. Reads stdin, forwards to upstream over stdio or SSE, intercepts `tools/list` response, rewrites descriptions. Stdlib-only. |
4054
+ | `scripts/mcp_description_trimmer.py` | Pure function library: `trim(description: str) → str`. Reused from heuristics below. Stdlib-only. |
4055
+ | `scripts/mcp_proxy_config.py` | Reads `~/.softspark/ai-toolkit/mcp-proxy/servers.json`, validates upstream targets, generates supervisord/launchd config. |
4056
+ | `app/hooks/mcp-proxy-health.sh` | SessionStart hook — verifies all configured proxies responsive; fall through (warn, do not block) if any down. |
4057
+ | `app/skills/mcp-trim/SKILL.md` | Knowledge skill: how to enable, opt out, audit savings. |
4058
+ | `bin/ai-toolkit-mcp-trim` | CLI: `enable`, `disable`, `status`, `audit` (per-server token savings report). |
4059
+ | `tests/test_mcp_proxy.bats` | Integration tests with mock upstream MCP servers. |
4060
+ | `tests/test_mcp_trimmer.bats` | Unit tests for description trim heuristics on captured fixtures. |
4061
+
4062
+ ### Compression heuristics (from spike)
4063
+
4064
+ Applied to each tool description in `tools/list` response:
4065
+
4066
+ - Drop example sections >40 chars
4067
+ - Collapse `Use this server to…` / `Use this tool to…` boilerplate to minimum form preserving intent
4068
+ - Drop duplicate occurrences of tool name in its own description
4069
+ - **Preserve bytewise:** `inputSchema.properties[*].description`, `required`, `enum` values, URL/path identifiers
4070
+ - **Never strip:** the words `not`, `never`, `only`, `except`, `unless` — these carry "when NOT to use" signals
4071
+ - Target: ≥40% length reduction, 0% schema loss
4072
+
4073
+ ### Failure modes & rollback
4074
+
4075
+ | Scenario | Behavior |
4076
+ |----------|----------|
4077
+ | Proxy crashes mid-session | `mcp-proxy-health.sh` detects on next SessionStart, prints warning, suggests `ai-toolkit mcp-trim disable <server>` |
4078
+ | Upstream MCP server changes its tool catalog | Proxy passes through unchanged tools (no cached schema), warns once if a tool's description was previously trimmed |
4079
+ | Trimmer produces malformed JSON | Proxy falls through to upstream response unchanged, logs to `~/.softspark/ai-toolkit/mcp-proxy/error.log` |
4080
+ | User wants to bypass | `AI_TOOLKIT_MCP_TRIM_DISABLE=1` env var → proxies pass everything through unchanged |
4081
+ | User wants to fully uninstall | `ai-toolkit mcp-trim disable` reverts `~/.claude/.mcp.json` to original upstream targets |
4082
+
4083
+ ### Migration of existing user `.mcp.json`
4084
+
4085
+ `ai-toolkit mcp-trim enable` does:
4086
+
4087
+ 1. Backup `~/.claude/.mcp.json` → `~/.softspark/ai-toolkit/mcp-proxy/.mcp.json.bak.<timestamp>`
4088
+ 2. Read each server entry, store in `~/.softspark/ai-toolkit/mcp-proxy/servers.json`
4089
+ 3. Rewrite each entry to point at the local proxy (with sidecar `target` field)
4090
+ 4. Spawn supervisor (per-OS: launchd on macOS, systemd on Linux, scheduled task on Windows)
4091
+ 5. Verify each upstream reachable via proxy, abort + restore backup on any failure
4092
+
4093
+ ## Out-of-scope decisions (rejected mid-spike)
4094
+
4095
+ | Option | Why rejected |
4096
+ |--------|--------------|
4097
+ | Pre-install rewrite of `.mcp.json` only | MCP spec sources descriptions from server runtime, not config — wouldn't take effect |
4098
+ | Source-side forks of MCP servers | Doesn't help users with custom servers; high maintenance |
4099
+ | F2-lite observability tool | User decision 2026-05-04: tracking token waste without trimming is half-value; do the full thing in v4.0 |
4100
+ | Hook-based interception | Spike proved hooks cannot reach `tools/list` |
4101
+
4102
+ ## Success criteria
4103
+
4104
+ - ≥40% description-length reduction per server on the captured fixture set (jira, filesystem, dart, pencil)
4105
+ - Deep-equal `inputSchema` between trimmed and upstream — zero schema regression
4106
+ - Proxy adds <50ms per `tools/list` call (one-time per session)
4107
+ - Proxy adds <5ms per `tools/call` (passthrough overhead)
4108
+ - Round-trip correctness: every tool callable via proxy returns byte-identical result vs direct call
4109
+ - Zero MCP-skill regressions in `npm test` after enabling proxy in CI
4110
+ - Rollback (`ai-toolkit mcp-trim disable`) restores byte-identical original `.mcp.json`
4111
+
4112
+ ## Open questions
4113
+
4114
+ 1. Process supervision per-OS — launchd / systemd / scheduled-task wrappers, or a built-in `ai-toolkit-mcp-trimd` daemon binary?
4115
+ 2. SSE-mode upstreams (e.g., rag-mcp at `http://localhost:8081/mcp/sse`) — proxy listens on SSE locally too, or stdio-only with internal SSE client?
4116
+ 3. Description rewrites — static dictionary of "boilerplate phrases to drop" (faster, deterministic) vs LLM-based summarizer (more aggressive, less predictable)? Recommend static for v4.0, LLM as v4.1 stretch.
4117
+ 4. Config path — `~/.softspark/ai-toolkit/mcp-proxy/` (matches existing convention) or `~/.claude/mcp-proxy/` (closer to MCP config)? Recommend the former.
4118
+ 5. Telemetry — does this become an opt-in metric in `/briefing --tokens` ("MCP descriptions: 12.3k → 7.2k, saved 5.1k per turn")? Recommend yes.
4119
+
4120
+ ## Pre-mortem (failure scenarios to design against)
4121
+
4122
+ 1. **Proxy gets out of sync with upstream** — upstream adds a new tool, proxy doesn't know how to compress it → passthrough that tool's description unchanged, log warning
4123
+ 2. **Compression breaks tool discriminability** — model picks wrong tool because trimmed description lost the "use only when X" qualifier → the `not/never/only/except/unless` blacklist must be exhaustive; add per-server allowlists for false positives
4124
+ 3. **Multi-process race on `.mcp.json` rewrite** — two `ai-toolkit install` invocations clobber each other → file lock during enable/disable
4125
+ 4. **Proxy supervisor fails to start on user's machine** — different distro / no systemd → ai-toolkit doctor must detect and report; degrade to "MCP proxy unavailable, falling through" with no functionality loss
4126
+ 5. **User has custom MCP server we don't recognize** — must work without per-server schema; default heuristics must be safe enough for arbitrary servers
4127
+
4128
+ ## Estimate
4129
+
4130
+ - Architecture spike + working proxy prototype: 2 days
4131
+ - Production proxy + supervisor + config + CLI: 3 days
4132
+ - Test suite + fixtures + CI integration: 2 days
4133
+ - Documentation + migration guide + release notes: 1 day
4134
+
4135
+ **Total: ~8 working days** (1.5–2 weeks calendar time at typical pace)
4136
+
4137
+ ## Status
4138
+
4139
+ | Date | Status | Author |
4140
+ |------|--------|--------|
4141
+ | 2026-05-04 | PRD drafted from spike conclusions, carved out of v3.2.0 plan | claude |
4142
+
4143
+ ---
4144
+
3591
4145
  ## kb/procedures/ecosystem-sync-sop.md
3592
4146
 
3593
4147
  ---
@@ -4701,10 +5255,10 @@ title: "SOP: Release Verification"
4701
5255
  category: procedures
4702
5256
  service: ai-toolkit
4703
5257
  tags: [sop, verification, release, smoke-test, install, update, qa, provenance, sarif]
4704
- version: "1.4.1"
5258
+ version: "1.4.2"
4705
5259
  created: "2026-04-08"
4706
- last_updated: "2026-04-28"
4707
- description: "End-to-end smoke test after installing or updating @softspark/ai-toolkit — verifies CLI, install, doctor, validation, tests, eject, npm provenance attestation, SARIF audit, and per-skill permissions. Reflects the v2.8.0 supply-chain standard. v1.3.0 added the single-run npm test discipline; v1.4.0 adds v3.0.0 deep-coverage checks (--profile full, --codex-skills, breaking-change surfaces, idempotence, registry drift, live-JSON parse) and refreshes stale thresholds."
5260
+ last_updated: "2026-04-29"
5261
+ description: "End-to-end smoke test after installing or updating @softspark/ai-toolkit — verifies CLI, install, doctor, validation, tests, eject, npm provenance attestation, SARIF audit, and per-skill permissions. Reflects the v2.8.0 supply-chain standard. v1.3.0 added the single-run npm test discipline; v1.4.0 adds v3.0.0 deep-coverage checks (--profile full, --codex-skills, breaking-change surfaces, idempotence, registry drift, live-JSON parse) and refreshes stale thresholds. v1.4.2 makes the Phase 9.4 idempotence check deterministic by sorting file paths before hashing."
4708
5262
  ---
4709
5263
 
4710
5264
  # SOP: Release Verification
@@ -5080,10 +5634,13 @@ grep -q "\\.gemini/settings\\.json hooks" /tmp/aitk-breaking.log && echo "OK: Ge
5080
5634
 
5081
5635
  ```bash
5082
5636
  D=/tmp/aitk-idem-${RANDOM} && mkdir -p "$D" && cd "$D" && git init -q
5637
+ # Sort file paths before hashing — find traversal order follows inode order,
5638
+ # which can shift between runs even when content is byte-identical, producing
5639
+ # false FAIL signals.
5083
5640
  ai-toolkit install --local --editors cursor,gemini --profile full >/dev/null 2>&1
5084
- SHA1=$(find .cursor .gemini -type f -exec shasum {} + | shasum | awk '{print $1}')
5641
+ SHA1=$(find .cursor .gemini -type f -print0 | LC_ALL=C sort -z | xargs -0 shasum | shasum | awk '{print $1}')
5085
5642
  ai-toolkit install --local --editors cursor,gemini --profile full >/dev/null 2>&1
5086
- SHA2=$(find .cursor .gemini -type f -exec shasum {} + | shasum | awk '{print $1}')
5643
+ SHA2=$(find .cursor .gemini -type f -print0 | LC_ALL=C sort -z | xargs -0 shasum | shasum | awk '{print $1}')
5087
5644
  [ "$SHA1" = "$SHA2" ] && echo "OK: idempotent" || echo "FAIL: install is not idempotent"
5088
5645
  ```
5089
5646
 
@@ -5722,8 +6279,8 @@ Three tiers determine how to approach a task:
5722
6279
  | Type | Field | Invocation | Count |
5723
6280
  |------|-------|-----------|-------|
5724
6281
  | Task | `disable-model-invocation: true` | User via `/skill` only | 32 |
5725
- | Hybrid | (neither) | User via `/skill` + agent knowledge | 31 |
5726
- | Knowledge | `user-invocable: false` | Claude auto-loads | 49 |
6282
+ | Hybrid | (neither) | User via `/skill` + agent knowledge | 32 |
6283
+ | Knowledge | `user-invocable: false` | Claude auto-loads | 48 |
5727
6284
 
5728
6285
  ## Multi-Agent Execution
5729
6286
 
@@ -10479,7 +11036,7 @@ Task skills execute a specific action. Invoked via slash commands. `disable-mode
10479
11036
  | **seo-validate** | `/seo-validate` | medium | Scan codebase for SEO issues: W3C semantics, meta/OG tags, Schema.org, hreflang, Core Web Vitals (LCP/INP/CLS), resource hints, GEO, SPA/SSG/CSR crawlability, technical SEO, accessibility-for-SEO. Framework-aware (Next/Nuxt/Astro/Gatsby/SvelteKit/Remix/Angular/Vue/static HTML). |
10480
11037
  | **mcp-builder** | `/mcp-builder` | high | Build production-grade MCP servers using the 4-phase methodology (research, implement, test, evaluate). TypeScript/Python, stdio/streamable-http. |
10481
11038
 
10482
- ## Hybrid Skills (31)
11039
+ ## Hybrid Skills (32)
10483
11040
 
10484
11041
  Hybrid skills combine slash-command invocation with domain knowledge that agents reference.
10485
11042
 
@@ -10516,6 +11073,7 @@ Hybrid skills combine slash-command invocation with domain knowledge that agents
10516
11073
  | **persona** | `/persona` | low | Switch engineering persona at runtime (backend-lead, frontend-lead, devops-eng, junior-dev) |
10517
11074
  | **council** | `/council` | high | 4-perspective decision evaluation (Advocate, Critic, Pragmatist, User-Proxy) with synthesis and confidence-rated recommendation. Tier 1, orchestrator, `context: fork`. |
10518
11075
  | **introspect** | `/introspect` | medium | Agent self-debugging: classify failure pattern, suggest smallest recovery action, emit structured introspection report |
11076
+ | **brand-voice** | `/brand-voice` | medium | Anti-trope list, voice principles, LLM rhetoric prevention; output modes (`concise` ≤60% tokens, `strict` ≤40%) governing conversational responses. |
10519
11077
 
10520
11078
  ### `/workflow` types
10521
11079
 
@@ -10537,7 +11095,7 @@ Hybrid skills combine slash-command invocation with domain knowledge that agents
10537
11095
  | `application-deploy` | 3 | Deploy → smoke test → release notes |
10538
11096
  | `proactive-troubleshooting` | 4 | Investigate → check perf → preventive fix → docs |
10539
11097
 
10540
- ## Knowledge Skills - Development (16)
11098
+ ## Knowledge Skills - Development (15)
10541
11099
 
10542
11100
  | Skill | Directory | Domain |
10543
11101
  |-------|-----------|--------|
@@ -10556,7 +11114,6 @@ Hybrid skills combine slash-command invocation with domain knowledge that agents
10556
11114
  | **ruby-patterns** | `skills/ruby-patterns/` | Blocks, Rails conventions, RSpec, ActiveRecord |
10557
11115
  | **design-engineering** | `skills/design-engineering/` | UI polish, animation craft, easing, transforms, accessibility |
10558
11116
  | **documentation-standards** | `skills/documentation-standards/` | KB document conventions, frontmatter validation, category taxonomy |
10559
- | **brand-voice** | `skills/brand-voice/` | Anti-trope list, voice principles, LLM rhetoric prevention |
10560
11117
 
10561
11118
  ## Knowledge Skills - Infrastructure (6)
10562
11119