t1k:lib-contribute
| Field | Value |
|---|---|
| Module | t1k-studio-library |
| Version | 2.8.52 |
| Effort | high |
| Tools | Agent, 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
How to invoke
Section titled “How to invoke”/t1k:lib-contributeLibrary Contribution
Section titled “Library Contribution”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.
Decision Tree
Section titled “Decision Tree”| Intent | Path |
|---|---|
A lib-candidate row arrived | Full 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 |
- Intake. A
lib-candidatequeue row (phase 01) or a direct user request. Record{engine, symbol, sourcePath, project, verdict, fingerprint}— never a person’s name. - Sweep. Spawn
t1k-corpus-scout. A contribution is only warranted on a realCONTRIBUTEverdict with its two-line search record. A miss is not a finding (rules/negative-result-scope.md). - Resolve.
t1k-lib-registry resolve --engine <e> --category <c>. Exit 1 withno-canonicalmeans the destination does not exist yet — that ist1k-lib-creatework, not a reason to pick a repo by hand. - Plan. Files, dependencies, and domain-neutral renames. Shared code must
carry no consumer-specific token (
docs/library-quality-mandate.md). - Pass-test. 5 quality checks + 6 decoupling tests, each pass/fail with
evidence. Fail → fix before the PR.
references/pass-test.md. - Adapter diff. The engine adapter works in a temporary clone in the scratchpad and emits a diff. Never the game repo’s tree.
- Plan.
t1k-lib-plan plan open-pr→PLAN-WRITTEN <id> <content-hash> <plan-path>. Relay it and stop. - Approve → PR. By default, only on explicit human approval.
planwrote at1k-git-managerbrief; the MAIN SESSION invokes git-manager with it — git-manager pushes and opens the PR (pr-target-stagingapplies). This skill never pushes. Exception —features.autoContribute: true(resolvedt1k-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 onlyopen-prand/orcreate-issue; useplanIsAutoContributeSafe), proceed WITHOUTAskUserQuestion— invoket1k-git-managerand armgh pr merge --auto. The--autoPR + 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 resurrectexec(skills/t1k-lib-contribute/references/auto-contribute.md). - Recurrence. Search that library repo’s open issues labelled
lib-candidatefor the fingerprint → plan acomment-issuestep (+1 project=<name>). Otherwise plan acreate-issuestep in the same plan document.references/recurrence.md. - Optional, separately planned. Replace the local copy in the source project with the package dependency — preview-first, N=1.
Non-negotiables
Section titled “Non-negotiables”- 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.mdfor 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.
Detail
Section titled “Detail”references/flow.md— each step, with the exact commands and the hand-off pointsreferences/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 providereferences/recurrence.md— the GitHub-side dedup