Extension ID
token-budget
Extension Name
Token Budget
Version
1.0.1
Description
Reduces LLM token consumption in Spec Kit workflows: compact artifacts in-place, scope per-phase reading, suppress prose padding, and report token usage.
Author
Tine Kondo
Repository URL
https://github.com/tinesoft/spec-kit-token-budget
Download URL
https://github.com/tinesoft/spec-kit-token-budget/archive/refs/tags/v1.0.1.zip
License
MIT
Homepage (optional)
https://github.com/tinesoft/spec-kit-token-budget
Documentation URL (optional)
https://github.com/tinesoft/spec-kit-token-budget/blob/main/README.md
Changelog URL (optional)
https://github.com/tinesoft/spec-kit-token-budget/blob/main/CHANGELOG.md
Required Spec Kit Version
=0.1.0
Required Tools (optional)
- `python3` + `tiktoken` — optional, for accurate token counts (cl100k_base); falls back to chars/4 heuristic if absent
- `rtk` binary — optional, for stronger CLI output compression in `slim_output.sh`; built-in rules used otherwise
Number of Commands
4
Number of Hooks (optional)
6
Tags
tokens, budget, context, efficiency, cost-optimization
Key Features
/speckit.token-budget.compact — lossless SDD artifact compaction (light / medium / aggressive). Backs up originals as <artifact>.full.md. Never touches IDs matching FR-, NFR-, T-, US-, AC- patterns or headings in preserve_sections. Aliases: compress, distill.
/speckit.token-budget.scope — pre-flight reading manifest for the next workflow phase (plan / tasks / implement / analyze / checklist), with per-file token budgets. Aliases: brief, focus.
/speckit.token-budget.concise — toggles a marker-bracketed concise-output directive in the project's agent memory file. Prefers AGENTS.md (open cross-agent standard); falls back to CLAUDE.md, GEMINI.md, .cursor/rules/, etc. Reversible. Aliases: terse, quiet.
/speckit.token-budget.usage — read-only token dashboard: per-artifact sizes, savings vs .full.md backups, projected per-phase budgets. Aliases: stats, report.
scripts/bash/slim_output.sh — CLI output compressor with built-in rules for git status, git log, pytest, npm test, and a generic head/tail fallback. Defers to rtk if installed.
- 6 lifecycle hooks:
before_plan, before_tasks, before_implement (auto-scope); after_specify, after_plan, after_tasks (auto-compact). All optional.
Testing Checklist
Submission Requirements
Testing Details
Tested on:
- macOS 15.x with Spec Kit v0.1.0
Test project: https://github.com/tinesoft/spec-kit-token-budget-demo
Test scenarios:
- Installed extension via
specify extension add token-budget --from <release-zip-url>
- Copied
token-budget-config.template.yml to token-budget-config.yml
- Ran
/speckit.token-budget.usage — verified per-artifact token counts
- Ran
/speckit.token-budget.compact at all three levels — verified lossless preservation of FR-/NFR-/T-/US-/AC- IDs and preserve_sections headings; confirmed .full.md backup created
- Ran
/speckit.token-budget.concise on — verified marker block injected in AGENTS.md; ran concise off — verified block removed cleanly
- Ran
/speckit.token-budget.scope tasks — verified manifest written to specs/<feature>/.token-budget/scope-tasks.md
- Verified
slim_output.sh compression on git status and git log -n 50
- Verified lifecycle hooks fire at the correct phases
Example Usage
# Install extension
specify extension add token-budget \
--from https://github.com/tinesoft/spec-kit-token-budget/archive/refs/tags/v1.0.1.zip
# Copy and edit config
cp .specify/extensions/token-budget/token-budget-config.template.yml \
.specify/extensions/token-budget/token-budget-config.yml
# Inside an SDD project, after running /speckit.specify and /speckit.plan:
/speckit.token-budget.usage # see baseline token counts
/speckit.token-budget.compact # compress every artifact (medium level by default)
/speckit.token-budget.concise on # silence prose narration during SDD steps
/speckit.token-budget.scope tasks # write a focused reading manifest before /speckit.tasks
/speckit.tasks # agent reads the manifest first
Proposed Catalog Entry
{
"token-budget": {
"name": "Token Budget",
"id": "token-budget",
"description": "Reduces LLM token consumption in Spec Kit workflows: compact artifacts in-place, scope per-phase reading, suppress prose padding, and report token usage.",
"author": "Tine Kondo",
"version": "1.0.1",
"download_url": "https://github.com/tinesoft/spec-kit-token-budget/archive/refs/tags/v1.0.1.zip",
"repository": "https://github.com/tinesoft/spec-kit-token-budget",
"homepage": "https://github.com/tinesoft/spec-kit-token-budget",
"documentation": "https://github.com/tinesoft/spec-kit-token-budget/blob/main/README.md",
"changelog": "https://github.com/tinesoft/spec-kit-token-budget/blob/main/CHANGELOG.md",
"license": "MIT",
"requires": {
"speckit_version": ">=0.1.0"
},
"provides": {
"commands": 4,
"hooks": 6
},
"tags": ["tokens", "budget", "context", "efficiency", "cost-optimization"],
"verified": false,
"downloads": 0,
"stars": 0,
"created_at": "2026-05-10T00:00:00Z",
"updated_at": "2026-05-12T00:00:00Z"
}
}
Additional Context
This extension was designed to address the structural property of SDD artifact pipelines: earlier artifacts (spec, plan, research) are re-read on every subsequent phase, so compacting them at the source compounds savings across every downstream turn and phase. It is inspired by RTK, CavemanClaude, claude-token-efficient, and Anthropic's official cost guide.
Extension ID
token-budget
Extension Name
Token Budget
Version
1.0.1
Description
Reduces LLM token consumption in Spec Kit workflows: compact artifacts in-place, scope per-phase reading, suppress prose padding, and report token usage.
Author
Tine Kondo
Repository URL
https://github.com/tinesoft/spec-kit-token-budget
Download URL
https://github.com/tinesoft/spec-kit-token-budget/archive/refs/tags/v1.0.1.zip
License
MIT
Homepage (optional)
https://github.com/tinesoft/spec-kit-token-budget
Documentation URL (optional)
https://github.com/tinesoft/spec-kit-token-budget/blob/main/README.md
Changelog URL (optional)
https://github.com/tinesoft/spec-kit-token-budget/blob/main/CHANGELOG.md
Required Spec Kit Version
Required Tools (optional)
Number of Commands
4
Number of Hooks (optional)
6
Tags
tokens, budget, context, efficiency, cost-optimization
Key Features
/speckit.token-budget.compact— lossless SDD artifact compaction (light / medium / aggressive). Backs up originals as<artifact>.full.md. Never touches IDs matchingFR-,NFR-,T-,US-,AC-patterns or headings inpreserve_sections. Aliases:compress,distill./speckit.token-budget.scope— pre-flight reading manifest for the next workflow phase (plan / tasks / implement / analyze / checklist), with per-file token budgets. Aliases:brief,focus./speckit.token-budget.concise— toggles a marker-bracketed concise-output directive in the project's agent memory file. PrefersAGENTS.md(open cross-agent standard); falls back toCLAUDE.md,GEMINI.md,.cursor/rules/, etc. Reversible. Aliases:terse,quiet./speckit.token-budget.usage— read-only token dashboard: per-artifact sizes, savings vs.full.mdbackups, projected per-phase budgets. Aliases:stats,report.scripts/bash/slim_output.sh— CLI output compressor with built-in rules forgit status,git log,pytest,npm test, and a generic head/tail fallback. Defers tortkif installed.before_plan,before_tasks,before_implement(auto-scope);after_specify,after_plan,after_tasks(auto-compact). All optional.Testing Checklist
Submission Requirements
extension.ymlmanifest includedTesting Details
Tested on:
Test project: https://github.com/tinesoft/spec-kit-token-budget-demo
Test scenarios:
specify extension add token-budget --from <release-zip-url>token-budget-config.template.ymltotoken-budget-config.yml/speckit.token-budget.usage— verified per-artifact token counts/speckit.token-budget.compactat all three levels — verified lossless preservation of FR-/NFR-/T-/US-/AC- IDs andpreserve_sectionsheadings; confirmed.full.mdbackup created/speckit.token-budget.concise on— verified marker block injected inAGENTS.md; ranconcise off— verified block removed cleanly/speckit.token-budget.scope tasks— verified manifest written tospecs/<feature>/.token-budget/scope-tasks.mdslim_output.shcompression ongit statusandgit log -n 50Example Usage
Proposed Catalog Entry
{ "token-budget": { "name": "Token Budget", "id": "token-budget", "description": "Reduces LLM token consumption in Spec Kit workflows: compact artifacts in-place, scope per-phase reading, suppress prose padding, and report token usage.", "author": "Tine Kondo", "version": "1.0.1", "download_url": "https://github.com/tinesoft/spec-kit-token-budget/archive/refs/tags/v1.0.1.zip", "repository": "https://github.com/tinesoft/spec-kit-token-budget", "homepage": "https://github.com/tinesoft/spec-kit-token-budget", "documentation": "https://github.com/tinesoft/spec-kit-token-budget/blob/main/README.md", "changelog": "https://github.com/tinesoft/spec-kit-token-budget/blob/main/CHANGELOG.md", "license": "MIT", "requires": { "speckit_version": ">=0.1.0" }, "provides": { "commands": 4, "hooks": 6 }, "tags": ["tokens", "budget", "context", "efficiency", "cost-optimization"], "verified": false, "downloads": 0, "stars": 0, "created_at": "2026-05-10T00:00:00Z", "updated_at": "2026-05-12T00:00:00Z" } }Additional Context
This extension was designed to address the structural property of SDD artifact pipelines: earlier artifacts (spec, plan, research) are re-read on every subsequent phase, so compacting them at the source compounds savings across every downstream turn and phase. It is inspired by RTK, CavemanClaude, claude-token-efficient, and Anthropic's official cost guide.