@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/AGENTS.md +3 -3
- package/CHANGELOG.md +30 -0
- package/README.md +10 -8
- package/app/.claude-plugin/plugin.json +1 -1
- package/app/ARCHITECTURE.md +47 -0
- package/app/agents/seo-specialist.md +86 -3
- package/app/hooks/ai-toolkit-statusline.sh +201 -0
- package/app/hooks.json +5 -0
- package/app/skills/brand-voice/SKILL.md +38 -2
- package/app/skills/brand-voice/modes/concise.md +67 -0
- package/app/skills/brand-voice/modes/strict.md +91 -0
- package/app/skills/brand-voice/scripts/measure.py +246 -0
- package/app/skills/briefing/SKILL.md +61 -0
- package/app/skills/swarm/SKILL.md +83 -1
- package/benchmarks/ecosystem-doctor-snapshot.json +17 -13
- package/bin/ai-toolkit.js +2 -0
- package/kb/history/completed/f2-mcp-trim-spike-20260504.md +117 -0
- package/kb/history/completed/output-token-discipline-plan-20260504.md +261 -0
- package/kb/planning/mcp-context-trim-v4-prd.md +158 -0
- package/kb/procedures/release-verification-sop.md +8 -5
- package/kb/reference/architecture-overview.md +2 -2
- package/kb/reference/skills-catalog.md +3 -3
- package/llms-full.txt +569 -12
- package/llms.txt +3 -0
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/scripts/install_steps/hooks.py +33 -0
- package/scripts/merge-hooks.py +17 -0
- package/scripts/pack_codebase.py +362 -0
- package/scripts/session_token_stats.py +264 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Spike: F2 MCP Context Trim — Hook Feasibility & Path Decision"
|
|
3
|
+
category: planning
|
|
4
|
+
service: ai-toolkit
|
|
5
|
+
tags:
|
|
6
|
+
- mcp
|
|
7
|
+
- hooks
|
|
8
|
+
- claude-code
|
|
9
|
+
- spike
|
|
10
|
+
- feasibility
|
|
11
|
+
doc_type: spike
|
|
12
|
+
status: completed
|
|
13
|
+
created: "2026-05-04"
|
|
14
|
+
last_updated: "2026-05-04"
|
|
15
|
+
completed: "2026-05-04"
|
|
16
|
+
shipped_in: "v3.2.0 (decision only — implementation deferred to v4.0)"
|
|
17
|
+
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."
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Spike: F2 MCP Context Trim — Hook Feasibility & Path Decision
|
|
21
|
+
|
|
22
|
+
## Question
|
|
23
|
+
|
|
24
|
+
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**?
|
|
25
|
+
|
|
26
|
+
## Method
|
|
27
|
+
|
|
28
|
+
Reviewed local sources only (RAG MCP offline at spike time):
|
|
29
|
+
|
|
30
|
+
1. `app/skills/hook-creator/SKILL.md` — exhaustive list of supported hook events and their data shapes
|
|
31
|
+
2. `app/hooks/guard-destructive.sh`, `app/hooks/guard-path.sh` — actual examples reading `tool_input` from stdin
|
|
32
|
+
3. `app/skills/mcp-builder/SKILL.md` — MCP server-side conventions
|
|
33
|
+
4. `~/.claude/.mcp.json` — user's installed MCP servers (Context7, sequential-thinking, filesystem, rag-mcp, memory, jira-mcp)
|
|
34
|
+
|
|
35
|
+
## Findings
|
|
36
|
+
|
|
37
|
+
### Hook events that touch tool data
|
|
38
|
+
|
|
39
|
+
| Event | Modifies tool list? | Modifies tool input? | Notes |
|
|
40
|
+
|-------|--------------------|--------------------|-------|
|
|
41
|
+
| `PreToolUse` | no | no (only block via exit 2) | Reads `tool_input.*`, decides allow/deny |
|
|
42
|
+
| `PostToolUse` | no | no | Sees result for logging / feedback |
|
|
43
|
+
| `PermissionRequest` | no | yes (`updatedInput`) | Can rewrite a single call's args |
|
|
44
|
+
| `Elicitation` | no | n/a | Intercepts MCP UI prompts, not tool list |
|
|
45
|
+
| `SessionStart` | no | n/a | Context injection only |
|
|
46
|
+
| `InstructionsLoaded` | no | n/a | Verifies CLAUDE.md presence |
|
|
47
|
+
|
|
48
|
+
**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.
|
|
49
|
+
|
|
50
|
+
### Why this matters
|
|
51
|
+
|
|
52
|
+
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:
|
|
53
|
+
|
|
54
|
+
- `dart-mcp-server` — ~30 tools with multi-paragraph descriptions
|
|
55
|
+
- `filesystem` — verbose paths and example sections
|
|
56
|
+
- `pencil` — "IMPORTANT" stanzas repeated across tools
|
|
57
|
+
- `jira-mcp` — long `Use this tool to...` boilerplate
|
|
58
|
+
|
|
59
|
+
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.
|
|
60
|
+
|
|
61
|
+
### What would actually work
|
|
62
|
+
|
|
63
|
+
To compress MCP tool descriptions before they reach the LLM, exactly two architectures are viable:
|
|
64
|
+
|
|
65
|
+
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.
|
|
66
|
+
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.
|
|
67
|
+
|
|
68
|
+
Neither is a "minimal change" by the standards of this plan.
|
|
69
|
+
|
|
70
|
+
## Decision (final, 2026-05-04)
|
|
71
|
+
|
|
72
|
+
**Drop F2 from v3.2.0 entirely. Defer the full MCP proxy approach to v4.0** with its own dedicated PRD and architecture spike.
|
|
73
|
+
|
|
74
|
+
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:
|
|
75
|
+
|
|
76
|
+
- v3.2.0 ships F1 + F3 + F3.5 only (output modes, token telemetry, default statusline)
|
|
77
|
+
- F2 work — including any observability-first prototype — moves wholesale to v4.0 milestone
|
|
78
|
+
- Reasoning: keep v3.2.0 release scope tight; v4.0 owns MCP-cost story end-to-end with proper proxy architecture
|
|
79
|
+
|
|
80
|
+
## Alternatives considered
|
|
81
|
+
|
|
82
|
+
| Option | Pros | Cons | Verdict |
|
|
83
|
+
|--------|------|------|---------|
|
|
84
|
+
| 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 |
|
|
85
|
+
| 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 |
|
|
86
|
+
| 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 |
|
|
87
|
+
| **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** |
|
|
88
|
+
|
|
89
|
+
## What was delivered in v3.2.0 (F1 + F3 + F3.5)
|
|
90
|
+
|
|
91
|
+
The output-discipline goal is partially addressed by what shipped:
|
|
92
|
+
|
|
93
|
+
- **Output modes** (F1) cut conversational response tokens 60–80% on the shipped fixture set
|
|
94
|
+
- **Real token telemetry** (F3) lets users see actual cost per session — including the MCP description overhead, even if they cannot yet trim it
|
|
95
|
+
- **Default statusline** (F3.5) surfaces that cost continuously
|
|
96
|
+
|
|
97
|
+
Users now have visibility into the MCP-description waste this spike identified, even though automated compression has to wait for v4.0.
|
|
98
|
+
|
|
99
|
+
## What goes into v4.0
|
|
100
|
+
|
|
101
|
+
Tracked as an active PRD: [`kb/planning/mcp-context-trim-v4-prd.md`](../../planning/mcp-context-trim-v4-prd.md). It carries forward:
|
|
102
|
+
|
|
103
|
+
1. Compression heuristics from the original F2 design (migrated out of the archived plan into the live PRD)
|
|
104
|
+
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/`
|
|
105
|
+
3. Rollback / opt-out story — a buggy proxy must not break MCP-dependent skills
|
|
106
|
+
4. Failure mode — proxy down → fall through to direct MCP server, with telemetry warning
|
|
107
|
+
5. Migration of existing user `.mcp.json` configs
|
|
108
|
+
|
|
109
|
+
Estimate in the PRD: ~8 working days.
|
|
110
|
+
|
|
111
|
+
## Status
|
|
112
|
+
|
|
113
|
+
| Date | Status | Author |
|
|
114
|
+
|------|--------|--------|
|
|
115
|
+
| 2026-05-04 | Spike completed | claude |
|
|
116
|
+
| 2026-05-04 | User decision: defer F2 to v4.0 entirely (no F2-lite in v3.2.0) | lukasz.krzemien |
|
|
117
|
+
| 2026-05-04 | Spike archived to `kb/history/completed/` alongside the parent plan | claude |
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Plan: Output & Token Discipline — Concise Modes, MCP Trim, Token Receipts"
|
|
3
|
+
category: planning
|
|
4
|
+
service: ai-toolkit
|
|
5
|
+
tags:
|
|
6
|
+
- brand-voice
|
|
7
|
+
- output-style
|
|
8
|
+
- mcp
|
|
9
|
+
- statusline
|
|
10
|
+
- token-tracking
|
|
11
|
+
- hooks
|
|
12
|
+
- briefing
|
|
13
|
+
doc_type: plan
|
|
14
|
+
status: completed
|
|
15
|
+
created: "2026-05-04"
|
|
16
|
+
last_updated: "2026-05-04"
|
|
17
|
+
completed: "2026-05-04"
|
|
18
|
+
completion: "100% of v3.2.0 scope (F2 deferred to v4.0 per spike conclusion)"
|
|
19
|
+
shipped_in: "v3.2.0"
|
|
20
|
+
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."
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Plan: Output & Token Discipline
|
|
24
|
+
|
|
25
|
+
**Status:** Completed (shipped in v3.2.0 on 2026-05-04)
|
|
26
|
+
**Author:** lukasz.krzemien
|
|
27
|
+
**Source of inspiration:** external Claude Code plugin observed 2026-05-04 (mechanism only, not naming or branding)
|
|
28
|
+
**Spike companion:** [`kb/history/completed/f2-mcp-trim-spike-20260504.md`](f2-mcp-trim-spike-20260504.md)
|
|
29
|
+
|
|
30
|
+
## Cel
|
|
31
|
+
|
|
32
|
+
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.
|
|
33
|
+
|
|
34
|
+
## Kontekst
|
|
35
|
+
|
|
36
|
+
Obecnie ai-toolkit ma:
|
|
37
|
+
|
|
38
|
+
- `brand-voice` skill — pilnuje stylu pisanego (docs, README, content)
|
|
39
|
+
- `track-usage.sh` hook — liczy `/skill` invocations do `~/.softspark/ai-toolkit/stats.json`
|
|
40
|
+
- `compile_slm.py` — kompresuje cały toolkit dla małych modeli (inny scope)
|
|
41
|
+
- 113 skilli, pełen system hooków, doctor, eject
|
|
42
|
+
|
|
43
|
+
Brakuje:
|
|
44
|
+
|
|
45
|
+
- Trybu zwięzłego dla *odpowiedzi* Claude'a (brand-voice działa tylko dla pisanej zawartości)
|
|
46
|
+
- Kompresji opisów MCP-tooli, które zżerają setki tokenów na każdym wywołaniu
|
|
47
|
+
- Realnego pomiaru tokenów per sesja (mamy tylko licznik invocations, nie tokenów)
|
|
48
|
+
|
|
49
|
+
## Zakres
|
|
50
|
+
|
|
51
|
+
Trzy features, zaplanowane w kolejności narastającego ryzyka.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Feature 1 — `brand-voice` output modes
|
|
56
|
+
|
|
57
|
+
### Cel
|
|
58
|
+
Rozszerzyć `brand-voice` o tryby zwięzłości stosowane do odpowiedzi konwersacyjnych Claude'a, nie tylko do generowanych dokumentów.
|
|
59
|
+
|
|
60
|
+
### Decyzje nazewnicze
|
|
61
|
+
- **Wybrane:** zostaje `brand-voice` z wewnętrznymi trybami (`default`, `concise`, `strict`)
|
|
62
|
+
- **Odrzucone:**
|
|
63
|
+
- `concise` jako osobny skill — duplikuje brand-voice, niepotrzebny rozłam
|
|
64
|
+
- `terse` — niejednoznaczne, kojarzy się z "rude"
|
|
65
|
+
- `output-discipline` — zbyt biurokratyczne
|
|
66
|
+
|
|
67
|
+
### Pliki
|
|
68
|
+
|
|
69
|
+
| Ścieżka | Akcja | Cel |
|
|
70
|
+
|---------|-------|-----|
|
|
71
|
+
| `app/skills/brand-voice/SKILL.md` | edit | Dodaj sekcję `## Output Modes` z opisem trzech trybów i sposobu aktywacji |
|
|
72
|
+
| `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..." |
|
|
73
|
+
| `app/skills/brand-voice/modes/strict.md` | new | Reguły: tylko fakty, zero filler adjectives, max 1 zdanie per fakt, listy zamiast prozy |
|
|
74
|
+
| `app/skills/brand-voice/scripts/measure.py` | new | Eval przed/po na fixtures, raport oszczędności tokenów |
|
|
75
|
+
| `tests/fixtures/output-modes/` | new | 10 par baseline/expected dla różnych typów zadań (debug, review, plan, eksploracja) |
|
|
76
|
+
| `tests/skills_brand_voice.bats` | edit | Dodaj asercje dla modes (regex na zakazane filler, max-line-length) |
|
|
77
|
+
|
|
78
|
+
### Aktywacja
|
|
79
|
+
|
|
80
|
+
Trzy mechanizmy:
|
|
81
|
+
|
|
82
|
+
1. Frontmatter w projekcie: `output-mode: concise` w `CLAUDE.md` lub `.claude/settings.json`
|
|
83
|
+
2. Slash: `/brand-voice concise` przełącza dla bieżącej sesji (przez `track-usage.sh` zapisuje do session state)
|
|
84
|
+
3. Auto-trigger: skill ładuje się także przy długich sesjach generowania (>30 min, heurystyka)
|
|
85
|
+
|
|
86
|
+
### Success criteria
|
|
87
|
+
|
|
88
|
+
- Na zestawie 10 fixtures `concise` redukuje output >40% bez utraty kluczowych faktów
|
|
89
|
+
- Test asercji: zachowane są wszystkie nazwy plików i symboli z baseline (regex match)
|
|
90
|
+
- `validate.py --strict` przechodzi
|
|
91
|
+
- `audit_skills.py --ci` zero HIGH
|
|
92
|
+
|
|
93
|
+
### Estymata
|
|
94
|
+
4–6h
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Feature 2 — MCP context trim — DEFERRED TO v4.0
|
|
99
|
+
|
|
100
|
+
**Status:** Deferred. Spike conducted before implementation, conclusion in [`f2-mcp-trim-spike-20260504.md`](f2-mcp-trim-spike-20260504.md).
|
|
101
|
+
|
|
102
|
+
**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.
|
|
103
|
+
|
|
104
|
+
**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.
|
|
105
|
+
|
|
106
|
+
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.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Feature 3 — Token receipts w statusline
|
|
111
|
+
|
|
112
|
+
### Cel
|
|
113
|
+
Pokazać realne (nie estymowane) zużycie tokenów per-sesja w statusline Claude Code. Dane czytane z session JSONL, nie z heurystyk.
|
|
114
|
+
|
|
115
|
+
### Decyzje nazewnicze
|
|
116
|
+
- **Wybrane:** rozszerzenie istniejącego skilla `briefing` + nowy hook `statusline-tokens.sh` + nowy skrypt `session_token_stats.py`
|
|
117
|
+
- **Odrzucone:**
|
|
118
|
+
- Nowy skill `stats` / `receipts` — duplikuje funkcjonalnie `briefing`
|
|
119
|
+
- Modyfikacja istniejącego `track-usage.sh` jako jedynego punktu — za duża odpowiedzialność jednego pliku
|
|
120
|
+
|
|
121
|
+
### Pliki
|
|
122
|
+
|
|
123
|
+
| Ścieżka | Akcja | Cel |
|
|
124
|
+
|---------|-------|-----|
|
|
125
|
+
| `scripts/session_token_stats.py` | new | Parser JSONL stdlib-only. Funkcje: `read_session()`, `aggregate_by_skill()`, `compare_baseline_vs_concise()` |
|
|
126
|
+
| `app/hooks/statusline-tokens.sh` | new | Type `statusLine` w settings.json. Sumuje `usage.input_tokens` + `usage.output_tokens` z bieżącej sesji JSONL |
|
|
127
|
+
| `app/hooks/track-usage.sh` | edit | Po wykryciu `/skill` zapisuj też `prompt_tokens` jeśli `transcript_path` dostępne |
|
|
128
|
+
| `app/skills/briefing/SKILL.md` | edit | Nowa sekcja "Token receipts", komendy `/briefing --tokens --since 7d`, `/briefing --tokens --share` |
|
|
129
|
+
| `scripts/merge-hooks.py` | edit | Statusline injection do `settings.json`, preserve user-customized entries (delivered as F3.5) |
|
|
130
|
+
| `app/hooks/ai-toolkit-statusline.sh` | new | Comprehensive statusline (cwd + git + ctx + tokens + cost + model), default install (delivered as F3.5) |
|
|
131
|
+
| `tests/session_token_stats.bats` | new | Fixture JSONL z 3 messages, asercje na sumę i breakdown |
|
|
132
|
+
| `tests/statusline_tokens.bats` | new | Mock JSONL, weryfikacja outputu hooka (max 80 znaków, brak NaN, fallback gdy brak sesji) |
|
|
133
|
+
|
|
134
|
+
### Format statusline (proponowany)
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
[ai-toolkit] /concise · session: 24.7k · trend: ↓18%
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Krótki tryb default, `--verbose` dodaje breakdown per skill.
|
|
141
|
+
|
|
142
|
+
### Ścieżka odczytu sesji
|
|
143
|
+
|
|
144
|
+
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:
|
|
145
|
+
|
|
146
|
+
1. Identyfikuje aktualną sesję z env var `CLAUDE_SESSION_ID` (jeśli istnieje) lub najświeższy plik
|
|
147
|
+
2. Parsuje linie ignorując te bez `usage`
|
|
148
|
+
3. Sumuje + agreguje per skill (jeśli `track-usage.sh` zapisał skill mapping w sidecar pliku)
|
|
149
|
+
|
|
150
|
+
### Success criteria
|
|
151
|
+
|
|
152
|
+
- Statusline pokazuje liczbę tokenów odczytaną z JSONL z dokładnością ±2% vs Anthropic API report (jeśli dostępny)
|
|
153
|
+
- Brak crash gdy sesja jeszcze pusta
|
|
154
|
+
- Brak crash gdy JSONL malformed
|
|
155
|
+
- `validate.py --strict` przechodzi
|
|
156
|
+
|
|
157
|
+
### Estymata
|
|
158
|
+
6–8h
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Co nie wchodzi w plan
|
|
163
|
+
|
|
164
|
+
| Pomysł | Powód odrzucenia |
|
|
165
|
+
|--------|------------------|
|
|
166
|
+
| Memory/file compressor (`/compress <file>`) | `compile_slm.py` już kompresuje toolkit, brak konkretnego use-case dla per-file |
|
|
167
|
+
| Compact `/commit`, `/review` modes | Powstaną automatycznie po Feature 1 (te skille będą używać reguł `concise` mode) |
|
|
168
|
+
| "Caveman speak" / classical Chinese mode | Nie pasuje do tonu workmanlike, sprzeczne z brand-voice |
|
|
169
|
+
| Single curl-installer | Już mamy `ai-toolkit install` z profilami |
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Kolejność realizacji i zależności
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
Feature 1 (brand-voice modes)
|
|
177
|
+
↓ dostarcza reguły zwięzłości
|
|
178
|
+
Feature 3 (token receipts)
|
|
179
|
+
↓ dostarcza pomiar before/after dla F1
|
|
180
|
+
Feature 2 (mcp-trim) ← spike research najpierw, niezależne od F1/F3
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**F1 i F3 mogą iść parallel po dokończeniu F1 mode files.**
|
|
184
|
+
**F2 ma osobną decyzję go/no-go po spike'u.**
|
|
185
|
+
|
|
186
|
+
## Estymata zbiorcza
|
|
187
|
+
|
|
188
|
+
| Feature | Min | Max |
|
|
189
|
+
|---------|-----|-----|
|
|
190
|
+
| F1 | 4h | 6h |
|
|
191
|
+
| F3 | 6h | 8h |
|
|
192
|
+
| F2 spike | 1h | 1h |
|
|
193
|
+
| F2 implementacja | 0h | 10h |
|
|
194
|
+
| **Total** | **11h** | **25h** |
|
|
195
|
+
|
|
196
|
+
## Doc & test sweep (obowiązkowy po każdym feature)
|
|
197
|
+
|
|
198
|
+
1. `python3 scripts/validate.py --strict`
|
|
199
|
+
2. `python3 scripts/audit_skills.py --ci`
|
|
200
|
+
3. Regen `AGENTS.md`: `python3 scripts/generate_agents_md.py > AGENTS.md`
|
|
201
|
+
4. Regen `llms.txt`: `python3 scripts/generate_llms_txt.py > llms.txt`
|
|
202
|
+
5. Bump version w `package.json` + `plugin.json`
|
|
203
|
+
6. Update `skills-catalog.md` z nowymi/zmienionymi skillami
|
|
204
|
+
7. Update `README.md`, `CLAUDE.md`, `ARCHITECTURE.md`, `architecture-overview.md` jeśli zmiana behavior
|
|
205
|
+
8. Commit conventional: `feat(brand-voice): add output modes`, `feat(briefing): add token receipts`, `feat(mcp-trim): add description trimmer`
|
|
206
|
+
|
|
207
|
+
## Open questions — resolved
|
|
208
|
+
|
|
209
|
+
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.
|
|
210
|
+
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).
|
|
211
|
+
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.
|
|
212
|
+
|
|
213
|
+
## Final delivery (v3.2.0)
|
|
214
|
+
|
|
215
|
+
### Shipped
|
|
216
|
+
|
|
217
|
+
| Feature | Outcome | Pliki |
|
|
218
|
+
|---------|---------|-------|
|
|
219
|
+
| **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) |
|
|
220
|
+
| **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) |
|
|
221
|
+
| **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) |
|
|
222
|
+
| **briefing skill extension** | `/briefing --tokens` + wire-up docs + opt-out env vars. | `app/skills/briefing/SKILL.md` |
|
|
223
|
+
|
|
224
|
+
### Deviations from plan
|
|
225
|
+
|
|
226
|
+
| Plan said | Shipped | Reason |
|
|
227
|
+
|-----------|---------|--------|
|
|
228
|
+
| 10 fixtures w F1 | 3 fixtures + `must_contain.txt` mechanism | Mniejszy zestaw + extensible konwencja wystarcza do walidacji budżetów; jakość > ilość |
|
|
229
|
+
| 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" |
|
|
230
|
+
| 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 |
|
|
231
|
+
|
|
232
|
+
### Quality gates passed
|
|
233
|
+
|
|
234
|
+
- `validate.py --strict`: 0 errors / 0 warnings
|
|
235
|
+
- `audit_skills.py --ci`: 0 HIGH / 0 WARN / 13 INFO (pre-existing)
|
|
236
|
+
- `audit_skills.py --sarif`: SARIF 2.1.0 valid, 5 rules
|
|
237
|
+
- `npm test`: 1032 / 1032 passing (was 981 in v3.1.1)
|
|
238
|
+
- Registry drift: clean
|
|
239
|
+
- Provenance + checksum-pin: verified
|
|
240
|
+
- Ecosystem doctor: 9 cosmetic drifts (class A) refreshed
|
|
241
|
+
|
|
242
|
+
### Skill classification change
|
|
243
|
+
|
|
244
|
+
`brand-voice` przeszedł `user-invocable: false → true` (knowledge → hybrid):
|
|
245
|
+
|
|
246
|
+
- **Hybrid**: 31 → 32
|
|
247
|
+
- **Knowledge**: 49 → 48
|
|
248
|
+
- **Task**: 32 (no change)
|
|
249
|
+
|
|
250
|
+
Updated: `README.md`, `kb/reference/architecture-overview.md`, `kb/reference/skills-catalog.md`.
|
|
251
|
+
|
|
252
|
+
## Status & rewizje
|
|
253
|
+
|
|
254
|
+
| Data | Zmiana | Autor |
|
|
255
|
+
|------|--------|-------|
|
|
256
|
+
| 2026-05-04 | Initial draft | lukasz.krzemien |
|
|
257
|
+
| 2026-05-04 | F1 implementation done — brand-voice modes, measure.py, 3 fixtures, 14 bats tests. Aggregate ratio: concise 21%, strict 14%. | claude |
|
|
258
|
+
| 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 |
|
|
259
|
+
| 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 |
|
|
260
|
+
| 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 |
|
|
261
|
+
| 2026-05-04 | Plan archived to `kb/history/completed/`. Shipped in v3.2.0. | claude |
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "PRD: MCP Context Trim v4.0 — Local Proxy with Description Compression"
|
|
3
|
+
category: planning
|
|
4
|
+
service: ai-toolkit
|
|
5
|
+
tags:
|
|
6
|
+
- mcp
|
|
7
|
+
- proxy
|
|
8
|
+
- tool-descriptions
|
|
9
|
+
- jsonrpc
|
|
10
|
+
- tokens
|
|
11
|
+
- v4
|
|
12
|
+
doc_type: plan
|
|
13
|
+
status: proposed
|
|
14
|
+
created: "2026-05-04"
|
|
15
|
+
last_updated: "2026-05-04"
|
|
16
|
+
completion: "0%"
|
|
17
|
+
target_milestone: "v4.0"
|
|
18
|
+
predecessor:
|
|
19
|
+
- "kb/history/completed/output-token-discipline-plan-20260504.md"
|
|
20
|
+
- "kb/history/completed/f2-mcp-trim-spike-20260504.md"
|
|
21
|
+
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."
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# PRD: MCP Context Trim v4.0
|
|
25
|
+
|
|
26
|
+
**Status:** Proposed
|
|
27
|
+
**Target milestone:** v4.0
|
|
28
|
+
**Carved out of:** [`output-token-discipline-plan-20260504.md`](../history/completed/output-token-discipline-plan-20260504.md) (was Feature 2)
|
|
29
|
+
**Spike basis:** [`f2-mcp-trim-spike-20260504.md`](../history/completed/f2-mcp-trim-spike-20260504.md)
|
|
30
|
+
|
|
31
|
+
## Problem
|
|
32
|
+
|
|
33
|
+
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:
|
|
34
|
+
|
|
35
|
+
- `dart-mcp-server` — ~30 tools with multi-paragraph descriptions
|
|
36
|
+
- `filesystem` — verbose paths and example sections
|
|
37
|
+
- `pencil` — "IMPORTANT" stanzas repeated across tools
|
|
38
|
+
- `jira-mcp` — long `Use this tool to…` boilerplate
|
|
39
|
+
|
|
40
|
+
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.
|
|
41
|
+
|
|
42
|
+
## Goal
|
|
43
|
+
|
|
44
|
+
Reduce MCP-description overhead by ≥40% per server, with **zero** loss of parameter schemas, required fields, or discrimination signals (`not`, `never`, `only`, `except`, `unless`).
|
|
45
|
+
|
|
46
|
+
## Non-goals
|
|
47
|
+
|
|
48
|
+
- Modifying tool **call** behavior (only descriptions)
|
|
49
|
+
- Compressing user-facing prompts or completions
|
|
50
|
+
- Replacing or rewriting upstream MCP servers
|
|
51
|
+
- Touching MCP servers we do not control
|
|
52
|
+
|
|
53
|
+
## Architecture
|
|
54
|
+
|
|
55
|
+
### Proxy topology
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
Claude Code ──stdio──▶ ai-toolkit MCP proxy ──stdio/SSE──▶ upstream MCP server
|
|
59
|
+
│
|
|
60
|
+
└─ rewrites tools/list response
|
|
61
|
+
passes through tools/call unchanged
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
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.
|
|
65
|
+
|
|
66
|
+
### Required components
|
|
67
|
+
|
|
68
|
+
| Component | Purpose |
|
|
69
|
+
|-----------|---------|
|
|
70
|
+
| `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. |
|
|
71
|
+
| `scripts/mcp_description_trimmer.py` | Pure function library: `trim(description: str) → str`. Reused from heuristics below. Stdlib-only. |
|
|
72
|
+
| `scripts/mcp_proxy_config.py` | Reads `~/.softspark/ai-toolkit/mcp-proxy/servers.json`, validates upstream targets, generates supervisord/launchd config. |
|
|
73
|
+
| `app/hooks/mcp-proxy-health.sh` | SessionStart hook — verifies all configured proxies responsive; fall through (warn, do not block) if any down. |
|
|
74
|
+
| `app/skills/mcp-trim/SKILL.md` | Knowledge skill: how to enable, opt out, audit savings. |
|
|
75
|
+
| `bin/ai-toolkit-mcp-trim` | CLI: `enable`, `disable`, `status`, `audit` (per-server token savings report). |
|
|
76
|
+
| `tests/test_mcp_proxy.bats` | Integration tests with mock upstream MCP servers. |
|
|
77
|
+
| `tests/test_mcp_trimmer.bats` | Unit tests for description trim heuristics on captured fixtures. |
|
|
78
|
+
|
|
79
|
+
### Compression heuristics (from spike)
|
|
80
|
+
|
|
81
|
+
Applied to each tool description in `tools/list` response:
|
|
82
|
+
|
|
83
|
+
- Drop example sections >40 chars
|
|
84
|
+
- Collapse `Use this server to…` / `Use this tool to…` boilerplate to minimum form preserving intent
|
|
85
|
+
- Drop duplicate occurrences of tool name in its own description
|
|
86
|
+
- **Preserve bytewise:** `inputSchema.properties[*].description`, `required`, `enum` values, URL/path identifiers
|
|
87
|
+
- **Never strip:** the words `not`, `never`, `only`, `except`, `unless` — these carry "when NOT to use" signals
|
|
88
|
+
- Target: ≥40% length reduction, 0% schema loss
|
|
89
|
+
|
|
90
|
+
### Failure modes & rollback
|
|
91
|
+
|
|
92
|
+
| Scenario | Behavior |
|
|
93
|
+
|----------|----------|
|
|
94
|
+
| Proxy crashes mid-session | `mcp-proxy-health.sh` detects on next SessionStart, prints warning, suggests `ai-toolkit mcp-trim disable <server>` |
|
|
95
|
+
| 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 |
|
|
96
|
+
| Trimmer produces malformed JSON | Proxy falls through to upstream response unchanged, logs to `~/.softspark/ai-toolkit/mcp-proxy/error.log` |
|
|
97
|
+
| User wants to bypass | `AI_TOOLKIT_MCP_TRIM_DISABLE=1` env var → proxies pass everything through unchanged |
|
|
98
|
+
| User wants to fully uninstall | `ai-toolkit mcp-trim disable` reverts `~/.claude/.mcp.json` to original upstream targets |
|
|
99
|
+
|
|
100
|
+
### Migration of existing user `.mcp.json`
|
|
101
|
+
|
|
102
|
+
`ai-toolkit mcp-trim enable` does:
|
|
103
|
+
|
|
104
|
+
1. Backup `~/.claude/.mcp.json` → `~/.softspark/ai-toolkit/mcp-proxy/.mcp.json.bak.<timestamp>`
|
|
105
|
+
2. Read each server entry, store in `~/.softspark/ai-toolkit/mcp-proxy/servers.json`
|
|
106
|
+
3. Rewrite each entry to point at the local proxy (with sidecar `target` field)
|
|
107
|
+
4. Spawn supervisor (per-OS: launchd on macOS, systemd on Linux, scheduled task on Windows)
|
|
108
|
+
5. Verify each upstream reachable via proxy, abort + restore backup on any failure
|
|
109
|
+
|
|
110
|
+
## Out-of-scope decisions (rejected mid-spike)
|
|
111
|
+
|
|
112
|
+
| Option | Why rejected |
|
|
113
|
+
|--------|--------------|
|
|
114
|
+
| Pre-install rewrite of `.mcp.json` only | MCP spec sources descriptions from server runtime, not config — wouldn't take effect |
|
|
115
|
+
| Source-side forks of MCP servers | Doesn't help users with custom servers; high maintenance |
|
|
116
|
+
| F2-lite observability tool | User decision 2026-05-04: tracking token waste without trimming is half-value; do the full thing in v4.0 |
|
|
117
|
+
| Hook-based interception | Spike proved hooks cannot reach `tools/list` |
|
|
118
|
+
|
|
119
|
+
## Success criteria
|
|
120
|
+
|
|
121
|
+
- ≥40% description-length reduction per server on the captured fixture set (jira, filesystem, dart, pencil)
|
|
122
|
+
- Deep-equal `inputSchema` between trimmed and upstream — zero schema regression
|
|
123
|
+
- Proxy adds <50ms per `tools/list` call (one-time per session)
|
|
124
|
+
- Proxy adds <5ms per `tools/call` (passthrough overhead)
|
|
125
|
+
- Round-trip correctness: every tool callable via proxy returns byte-identical result vs direct call
|
|
126
|
+
- Zero MCP-skill regressions in `npm test` after enabling proxy in CI
|
|
127
|
+
- Rollback (`ai-toolkit mcp-trim disable`) restores byte-identical original `.mcp.json`
|
|
128
|
+
|
|
129
|
+
## Open questions
|
|
130
|
+
|
|
131
|
+
1. Process supervision per-OS — launchd / systemd / scheduled-task wrappers, or a built-in `ai-toolkit-mcp-trimd` daemon binary?
|
|
132
|
+
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?
|
|
133
|
+
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.
|
|
134
|
+
4. Config path — `~/.softspark/ai-toolkit/mcp-proxy/` (matches existing convention) or `~/.claude/mcp-proxy/` (closer to MCP config)? Recommend the former.
|
|
135
|
+
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.
|
|
136
|
+
|
|
137
|
+
## Pre-mortem (failure scenarios to design against)
|
|
138
|
+
|
|
139
|
+
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
|
|
140
|
+
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
|
|
141
|
+
3. **Multi-process race on `.mcp.json` rewrite** — two `ai-toolkit install` invocations clobber each other → file lock during enable/disable
|
|
142
|
+
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
|
|
143
|
+
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
|
|
144
|
+
|
|
145
|
+
## Estimate
|
|
146
|
+
|
|
147
|
+
- Architecture spike + working proxy prototype: 2 days
|
|
148
|
+
- Production proxy + supervisor + config + CLI: 3 days
|
|
149
|
+
- Test suite + fixtures + CI integration: 2 days
|
|
150
|
+
- Documentation + migration guide + release notes: 1 day
|
|
151
|
+
|
|
152
|
+
**Total: ~8 working days** (1.5–2 weeks calendar time at typical pace)
|
|
153
|
+
|
|
154
|
+
## Status
|
|
155
|
+
|
|
156
|
+
| Date | Status | Author |
|
|
157
|
+
|------|--------|--------|
|
|
158
|
+
| 2026-05-04 | PRD drafted from spike conclusions, carved out of v3.2.0 plan | claude |
|
|
@@ -3,10 +3,10 @@ title: "SOP: Release Verification"
|
|
|
3
3
|
category: procedures
|
|
4
4
|
service: ai-toolkit
|
|
5
5
|
tags: [sop, verification, release, smoke-test, install, update, qa, provenance, sarif]
|
|
6
|
-
version: "1.4.
|
|
6
|
+
version: "1.4.2"
|
|
7
7
|
created: "2026-04-08"
|
|
8
|
-
last_updated: "2026-04-
|
|
9
|
-
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."
|
|
8
|
+
last_updated: "2026-04-29"
|
|
9
|
+
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."
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# SOP: Release Verification
|
|
@@ -382,10 +382,13 @@ grep -q "\\.gemini/settings\\.json hooks" /tmp/aitk-breaking.log && echo "OK: Ge
|
|
|
382
382
|
|
|
383
383
|
```bash
|
|
384
384
|
D=/tmp/aitk-idem-${RANDOM} && mkdir -p "$D" && cd "$D" && git init -q
|
|
385
|
+
# Sort file paths before hashing — find traversal order follows inode order,
|
|
386
|
+
# which can shift between runs even when content is byte-identical, producing
|
|
387
|
+
# false FAIL signals.
|
|
385
388
|
ai-toolkit install --local --editors cursor,gemini --profile full >/dev/null 2>&1
|
|
386
|
-
SHA1=$(find .cursor .gemini -type f -
|
|
389
|
+
SHA1=$(find .cursor .gemini -type f -print0 | LC_ALL=C sort -z | xargs -0 shasum | shasum | awk '{print $1}')
|
|
387
390
|
ai-toolkit install --local --editors cursor,gemini --profile full >/dev/null 2>&1
|
|
388
|
-
SHA2=$(find .cursor .gemini -type f -
|
|
391
|
+
SHA2=$(find .cursor .gemini -type f -print0 | LC_ALL=C sort -z | xargs -0 shasum | shasum | awk '{print $1}')
|
|
389
392
|
[ "$SHA1" = "$SHA2" ] && echo "OK: idempotent" || echo "FAIL: install is not idempotent"
|
|
390
393
|
```
|
|
391
394
|
|
|
@@ -186,8 +186,8 @@ Three tiers determine how to approach a task:
|
|
|
186
186
|
| Type | Field | Invocation | Count |
|
|
187
187
|
|------|-------|-----------|-------|
|
|
188
188
|
| Task | `disable-model-invocation: true` | User via `/skill` only | 32 |
|
|
189
|
-
| Hybrid | (neither) | User via `/skill` + agent knowledge |
|
|
190
|
-
| Knowledge | `user-invocable: false` | Claude auto-loads |
|
|
189
|
+
| Hybrid | (neither) | User via `/skill` + agent knowledge | 32 |
|
|
190
|
+
| Knowledge | `user-invocable: false` | Claude auto-loads | 48 |
|
|
191
191
|
|
|
192
192
|
## Multi-Agent Execution
|
|
193
193
|
|
|
@@ -62,7 +62,7 @@ Task skills execute a specific action. Invoked via slash commands. `disable-mode
|
|
|
62
62
|
| **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). |
|
|
63
63
|
| **mcp-builder** | `/mcp-builder` | high | Build production-grade MCP servers using the 4-phase methodology (research, implement, test, evaluate). TypeScript/Python, stdio/streamable-http. |
|
|
64
64
|
|
|
65
|
-
## Hybrid Skills (
|
|
65
|
+
## Hybrid Skills (32)
|
|
66
66
|
|
|
67
67
|
Hybrid skills combine slash-command invocation with domain knowledge that agents reference.
|
|
68
68
|
|
|
@@ -99,6 +99,7 @@ Hybrid skills combine slash-command invocation with domain knowledge that agents
|
|
|
99
99
|
| **persona** | `/persona` | low | Switch engineering persona at runtime (backend-lead, frontend-lead, devops-eng, junior-dev) |
|
|
100
100
|
| **council** | `/council` | high | 4-perspective decision evaluation (Advocate, Critic, Pragmatist, User-Proxy) with synthesis and confidence-rated recommendation. Tier 1, orchestrator, `context: fork`. |
|
|
101
101
|
| **introspect** | `/introspect` | medium | Agent self-debugging: classify failure pattern, suggest smallest recovery action, emit structured introspection report |
|
|
102
|
+
| **brand-voice** | `/brand-voice` | medium | Anti-trope list, voice principles, LLM rhetoric prevention; output modes (`concise` ≤60% tokens, `strict` ≤40%) governing conversational responses. |
|
|
102
103
|
|
|
103
104
|
### `/workflow` types
|
|
104
105
|
|
|
@@ -120,7 +121,7 @@ Hybrid skills combine slash-command invocation with domain knowledge that agents
|
|
|
120
121
|
| `application-deploy` | 3 | Deploy → smoke test → release notes |
|
|
121
122
|
| `proactive-troubleshooting` | 4 | Investigate → check perf → preventive fix → docs |
|
|
122
123
|
|
|
123
|
-
## Knowledge Skills - Development (
|
|
124
|
+
## Knowledge Skills - Development (15)
|
|
124
125
|
|
|
125
126
|
| Skill | Directory | Domain |
|
|
126
127
|
|-------|-----------|--------|
|
|
@@ -139,7 +140,6 @@ Hybrid skills combine slash-command invocation with domain knowledge that agents
|
|
|
139
140
|
| **ruby-patterns** | `skills/ruby-patterns/` | Blocks, Rails conventions, RSpec, ActiveRecord |
|
|
140
141
|
| **design-engineering** | `skills/design-engineering/` | UI polish, animation craft, easing, transforms, accessibility |
|
|
141
142
|
| **documentation-standards** | `skills/documentation-standards/` | KB document conventions, frontmatter validation, category taxonomy |
|
|
142
|
-
| **brand-voice** | `skills/brand-voice/` | Anti-trope list, voice principles, LLM rhetoric prevention |
|
|
143
143
|
|
|
144
144
|
## Knowledge Skills - Infrastructure (6)
|
|
145
145
|
|