t1k:kit
| Field | Value |
|---|---|
| Module | t1k-maintainer |
| Version | 2.18.3 |
| Effort | medium |
| Tools | — |
Keywords: audit, kit, maintainer, migrate, release, scaffold, validate
How to invoke
Section titled “How to invoke”/t1k:kit<subcommand> [options]TheOneKit Kit — Maintainer Toolkit
Section titled “TheOneKit Kit — Maintainer Toolkit”Unified kit maintenance skill. All subcommands are for kit maintainers only, not end-users.
Subcommands
Section titled “Subcommands”| Subcommand | Usage | Purpose |
|---|---|---|
validate | /t1k:kit validate [--cross-kit] | Schema, activation paths, keyword conflicts, preset refs, universal t1k- prefix (skills + agents — see rules/naming-convention.md) |
release | /t1k:kit release [--skip-validate] | Guided release: validate → CI gate → GitHub release → Discord |
sync | /t1k:kit sync [--pull] [--status-only] | Pull all kits, check version compat, release-action alignment |
scaffold | /t1k:kit scaffold <name> [--org] | Create new kit repo from template with full boilerplate |
audit | /t1k:kit audit [--all] | Health audit: file counts, modules, keywords, CI, freshness |
migrate | /t1k:kit migrate [--dry-run] | Schema migration (e.g., registryVersion 1→2) |
test | /t1k:kit test [--all] [--kit <name>] | Comprehensive 15-phase E2E testing: install, modules, CLI, release infra |
Quick Reference
Section titled “Quick Reference”/t1k:kit validate # Validate current kit repo/t1k:kit validate --cross-kit # Validate across all installed kits/t1k:kit release # Guided release workflow/t1k:kit sync --pull # Pull and check all kits/t1k:kit scaffold theonekit-x # Scaffold new kit/t1k:kit audit --all # Audit all kit repos/t1k:kit migrate --dry-run # Preview schema migration/t1k:kit test --all # E2E test all kits/t1k:kit test --kit unity # E2E test specific kitSubcommand Details
Section titled “Subcommand Details”Read the reference file for full details on each subcommand:
references/validate.md— per-kit and cross-kit validation checksreferences/release.md— release workflow steps and gatesreferences/sync.md— cross-kit synchronization protocolreferences/scaffold.md— new kit scaffolding templatereferences/audit.md— health audit checks and scoringreferences/migrate.md— registry schema migration steps (v1→v2)references/test.md— 12-phase E2E test planreferences/cli-commands.md—t1k new,t1k modules create,t1k migrate,t1k migrate metadata,t1k rollback([email protected]; flags + gotchas grounded in source)references/global-hook-authoring.md— MANDATORY for any kit shipping hooks at global scope. Requirednode -e require(...)wrapper pattern that survives the CLI’s$HOME→$CLAUDE_PROJECT_DIRrewrite bug (model-router#49). CI gatevalidate-global-hook-home-resilience.cjsenforces it.
Per-module scaffold
Section titled “Per-module scaffold”scaffold creates a whole new kit (/t1k:kit scaffold theonekit-{engine}). To add one module inside an existing kit, use the scaffolder instead of hand-creating dirs + registry entries (per rules/replicate-and-automate.md):
t1k module new <name> [--required] [--deps a,b] # → .claude/modules/<name>/module.json + skill/agent/rules dirsIt writes module.json, creates the skills/, agents/, and rules/ dirs, adds a registry entry, and regenerates t1k-modules.json (via generate-modules-registry.cjs). Requires CLI ≥ 5.4.0.
Gotchas
Section titled “Gotchas”- Global-scope hooks MUST use the
node -e require(...)wrapper, NOT bare$HOME/.claude/hooks/X.cjs. When a kit ships hooks installed into global~/.claude/settings.json(not project.claude/settings.json), the T1K CLI’sfixSingleCommandPath(cmd, isGlobal=false)defaultsisGlobalto false and rewrites$HOME→$CLAUDE_PROJECT_DIR— silently breaking every hook withMODULE_NOT_FOUND(loader:1424). Defense-in-depth wrapper:node -e "process.env.HOME = require('os').userInfo().homedir; require(require('path').join(process.env.HOME, '.claude', 'hooks', 'your-hook.cjs'))". Reads home from/etc/passwd(POSIX) — unaffected by HOME env corruption. Originating incident: model-router#49 (~363 banner errors per 90-min session before fix). Full pattern + validation:references/global-hook-authoring.md. CI gatevalidate-global-hook-home-resilience.cjsenforces. - Origin metadata: hand-stamp on NEW files, hands-off on existing files. The release-action
inject-origin-metadata.cjsruns post-merge — it strips and re-injects canonicalorigin / repository / module / protected(andversionfor SKILL.md) from env vars + module-resolution. So files already onmainMUST NOT be hand-edited for these fields. BUT new files in PR branches MUST hand-stamp at leastorigin:(validatorvalidate-origin-injection-coverage.cjschecks marker presence pre-merge — values are best-effort, CI overwrites them). Format per file type lives in memoryfeedback_origin_marker_handauthor.mdand thet1k:skill-creator“Required Frontmatter” section. - Modular kits use
release-modules.cjs(custom release script), NOT semantic-release directly. Flat kits (e.g., theonekit-rn) still use semantic-release.release-modules.cjsproduces per-module ZIPs +manifest.jsonindex. t1k-modules.jsonis GENERATED for themodulessection — do not hand-author it. Source of truth is eachmodule.json. Onlypresetsint1k-modules.jsonare hand-authored..releaserc.jsonMUST includepackage.jsonand.claude/metadata.jsonin@semantic-release/gitassets — without this,package.jsonstays at0.0.0forever. Every kit repo needs:"assets": ["package.json", "CHANGELOG.md", ".claude/metadata.json"]- Do not hardcode
versionorbuildDatein sourcemetadata.json— CI generates these frompackage.json. Source should only contain manually-maintained fields (name,repository,deletions). - Canonical “full” preset — required in EVERY kit — every modular kit MUST declare
"full": "*"int1k-modules.jsonpresets. The interactive selector renders a synthetic “Full — all N modules” choice from any"*"-valued preset (it keys off the value, not the name), so kits with no presets or a differently-named"*"preset look fine in the UI — but scripted invocations liket1k new --preset fullfail when the preset is named anything other than literally"full". Apr 2026 audit caught: web (everything: "*"), marketing + nakama (no presets section at all), designer (array-shorthand drift). Always name the"*"preset literally"full"even when the kit has only one required module (future-proofs scripted use). Other named presets (rpg,fullstack, etc.) MUST use v3 object form{ "modules": [...], "description"?: "...", "crossKitModules"?: [...] }— array shorthand["mod-a", "mod-b"]resolves at runtime but breaks cross-kit format consistency. module newandkit neware NOT real CLI subcommands. The shipped commands aret1k new(project bootstrap) andt1k modules create(module scaffold). Older audits and design docs use the legacy names — when documenting maintainer flows, reference the real CLI surface (references/cli-commands.md).t1k rollbackrequires a snapshot that nothing currently creates. The H7 rollback read-side shipped in v4.14.0, but no production install/update path callscreateSnapshot()yet. Until the write-side lands,t1k rollback --kit X --to-snapshot pre-Ywill reliably fail withsnapshot '...' does not exist. Direct users tot1k install --resetfor now if they’re truly stuck — and NEVER recommendrm -rf ~/.claude/.t1k rollback --yesis a documented no-op as of v4.14.0 — declared in the CLI registry, never read by the handler. Do not promise confirmation-bypass behavior in maintainer guidance.--to-snapshotMUST literally start withpre-. Bare-version arguments (--to-snapshot 2.4.1) are rejected. Always render thepre-prefix in examples.- Scaffold new modules with a
detect:stub — whenscaffoldor/t1k:modules createwrites a newmodule.jsonfor a non-base module, emit a_disabled: truedetect stub so P6d CI and doctor #41 stay green while the author tightens patterns:The stub is schema-valid (passes P6d), scanner silently skips modules with"detect": {"_disabled": true,"_note": "AUTO-GENERATED STUB. Tighten files+anyOf then remove _disabled to activate.","files": ["**/*.md"],"anyOf": [{ "pattern": "TightenThisPattern_<moduleName>", "minHits": 2 }]}_disabled: true, and doctor #41 surfaces the stub as “needs activation” so the author can’t forget. - Universal
t1k-naming prefix (MANDATORY) — every skill directory + agent file + frontmattername:MUST start witht1k-. Tiers: coret1k-{slug}, kit-widet1k-{kit}-{slug}, module-scopedt1k-{kit}-{module}-{slug}. Slug MUST NOT redundantly start with the kit-short or any module-segment-token (algorithm v2 strips them). Three release-action gates are strict-by-default:validate-skill-prefix.cjs,validate-agent-prefix.cjs,validate-new-name-conformance.cjs. SSOT lives atrules/naming-convention.md+skills/t1k-skill-creator/references/architecture-rules.md§0 +skills/t1k-agent-creator/references/architecture-rules.md§0. Whenscaffold-ing a new kit/module or auditing an existing one, runnode /path/to/release-action/scripts/validate-skill-prefix.cjsandvalidate-agent-prefix.cjslocally — fail-fast catches missed renames before push. - Activation fragment ref convention — bare-slug refs are the SSOT — entries in
t1k-activation-*.jsonsessionBaseline[]andmappings[].skills[]arrays canonically use the bare slug form (e.g.,nakama-rpcfor the dirt1k-nakama-rpc). The CI prefixer’sauto-prefix-skills.cjs::buildSelfHealMap()self-heals legacy refs to canonical dir names at release time but the SSOT in fragment files stays bare so authors can write naturally. The release-action gatevalidate-activation-skill-resolution.cjs(per-PR safety net, added 2026-05-11) accepts BOTH bare and full-prefixed forms — anything else fails. When authoring or reviewing activation fragments, use the local bare slug ({slug}after kit + module strip) — NOT{kit}-{slug}shorthand that skips the module segment, which is the legacy form the self-heal does not accept and the gate flags. Seet1k-doctorcheck #47 for the doctor-time mirror.
Future: Self-Improving AI Pipeline
Section titled “Future: Self-Improving AI Pipeline”T1K vision: the kit should self-teach and improve using aggregated consumer data. Planned pipeline:
- User errors collected via telemetry → D1 (already exists)
- Scheduled AI agent (cron) queries D1 for error clusters (same fingerprint, 3+ occurrences, multiple users)
- AI aggregates patterns → synthesizes root cause, workaround, prevention
- Auto-generates gotcha entries for relevant skill SKILL.md files
- Opens PR to kit repo automatically
- Maintainer reviews and merges → next release distributes to ALL users
Status: Not yet implemented. See CLAUDE.md “Self-Improving AI Vision” for context.
Auto-Activation Keywords
Section titled “Auto-Activation Keywords”Triggers on: kit validate, kit release, kit sync, kit scaffold, kit audit, kit migrate, kit test, kit health, kit status, cross-kit, maintainer, test kit, test install, test modules, e2e kit, validate installation, self-improving, auto-gotcha, gotcha generation, ai aggregation, learn from users, t1k new, t1k rollback, t1k migrate, t1k modules create, module new, kit new, module migrate, migrate metadata, rollback snapshot, pre-snapshot