Skip to content

t1k:lib-contribute

FieldValue
Modulet1k-studio-library
Version2.8.52
Efforthigh
ToolsAgent, AskUserQuestion, Bash, Edit, Glob, Grep, Read, Skill, Write

Keywords: contribute to library, contribution intake, extract shared code, feature work contribution, library contribution, move code upstream, new reusable capability, pass-test, promote to library, reusable feature

/t1k:lib-contribute

Turns a recurring feature in a game project into a versioned library release. Engine-agnostic: the engine mechanics live in the adapter the registry names (adapters.contribute), never here.

IntentPath
A lib-candidate row arrivedFull flow → Flow
“Should this even be contributed?”Steps 1–2 first
“Just tell me if it would pass”Step 4 only → references/pass-test.md
“The PR is open, someone else hit the same bug”Step 8 → references/recurrence.md
  1. Intake. A lib-candidate queue row (phase 01) or a direct user request. Record {engine, symbol, sourcePath, project, verdict, fingerprint} — never a person’s name.
  2. Sweep. Spawn t1k-corpus-scout. A contribution is only warranted on a real CONTRIBUTE verdict with its two-line search record. A miss is not a finding (rules/negative-result-scope.md).
  3. Resolve. t1k-lib-registry resolve --engine <e> --category <c>. Exit 1 with no-canonical means the destination does not exist yet — that is t1k-lib-create work, not a reason to pick a repo by hand.
  4. Plan. Files, dependencies, and domain-neutral renames. Shared code must carry no consumer-specific token (docs/library-quality-mandate.md).
  5. Pass-test. 5 quality checks + 6 decoupling tests, each pass/fail with evidence. Fail → fix before the PR. references/pass-test.md.
  6. Adapter diff. The engine adapter works in a temporary clone in the scratchpad and emits a diff. Never the game repo’s tree.
  7. Plan. t1k-lib-plan plan open-pr → PLAN-WRITTEN <id> <content-hash> <plan-path>. Relay it and stop.
  8. Approve → PR. By default, only on explicit human approval. plan wrote a t1k-git-manager brief; the MAIN SESSION invokes git-manager with it — git-manager pushes and opens the PR (pr-target-staging applies). This skill never pushes. Exception — features.autoContribute: true (resolved t1k-config-*.json): when the flag is on AND every planned step is auto-safe (bun t1k-lib-plan.cjs kinds → autoContributeSafe, i.e. the plan is only open-pr and/or create-issue; use planIsAutoContributeSafe), proceed WITHOUT AskUserQuestion — invoke t1k-git-manager and arm gh pr merge --auto. The --auto PR + CI is the reversible net. If ANY planned step is NOT auto-safe (create-repo, add-topics, add-caller-workflow, comment-issue), STOP and require explicit human approval, naming that step — never auto-run a partial plan. The planner still only WRITES the plan; this exception does not resurrect exec (skills/t1k-lib-contribute/references/auto-contribute.md).
  9. Recurrence. Search that library repo’s open issues labelled lib-candidate for the fingerprint → plan a comment-issue step (+1 project=<name>). Otherwise plan a create-issue step in the same plan document. references/recurrence.md.
  10. Optional, separately planned. Replace the local copy in the source project with the package dependency — preview-first, N=1.
  • Preview-first, always. Dry run, then smoke on the smallest N, then confirm. N > 1 never runs without a shown smoke result (rules/preview-first-batch.md).
  • Default mode is propose. The planner only ever WRITES a plan document; see skills/t1k-lib-create/references/checklist.md for the pre-create checklist this plan-only flow shares.
  • Every action has a stated rollback, recorded in the plan document (or an honest note that none exists). There is no run log — nothing here executes, so there is nothing to log the execution of.
  • This skill contains ZERO engine steps. If you are writing a Unity or Cocos command here, it belongs in the adapter skill. That is the whole adapter contract: references/adapter-contract.md.
  • references/flow.md — each step, with the exact commands and the hand-off points
  • references/pass-test.md — the 5 + 6 checks AND the zero-tech-debt mandate itself (the SSOT)
  • references/adapter-contract.md — what an engine kit must provide
  • references/recurrence.md — the GitHub-side dedup