tink-harness 1.0.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/.claude-plugin/marketplace.json +14 -0
- package/.claude-plugin/plugin.json +8 -0
- package/CHANGELOG.md +109 -0
- package/LICENSE +21 -0
- package/README.ko.md +224 -0
- package/README.md +166 -0
- package/VERSIONING.md +73 -0
- package/bin/install.js +520 -0
- package/commands/cast.md +484 -0
- package/commands/frog.md +77 -0
- package/commands/list.md +104 -0
- package/commands/setup.md +185 -0
- package/commands/update.md +90 -0
- package/commands/weave.md +81 -0
- package/hooks/hooks.json +15 -0
- package/package.json +52 -0
- package/skills/tink/SKILL.md +66 -0
- package/templates/claude/commands/tink/cast.md +484 -0
- package/templates/claude/commands/tink/frog.md +77 -0
- package/templates/claude/commands/tink/list.md +104 -0
- package/templates/claude/commands/tink/setup.md +185 -0
- package/templates/claude/commands/tink/update.md +90 -0
- package/templates/claude/commands/tink/weave.md +81 -0
- package/templates/claude/skills/tink/SKILL.md +66 -0
- package/templates/tink/config.json +20 -0
- package/templates/tink/harnesses/HARNESS.md +28 -0
- package/templates/tink/harnesses/bug-fix.md +31 -0
- package/templates/tink/harnesses/code-change.md +30 -0
- package/templates/tink/harnesses/docs.md +30 -0
- package/templates/tink/harnesses/harness-curation.md +78 -0
- package/templates/tink/harnesses/harness-synthesis.md +52 -0
- package/templates/tink/harnesses/index.json +157 -0
- package/templates/tink/harnesses/pre-publish-multi-agent-verify.md +44 -0
- package/templates/tink/harnesses/research.md +31 -0
- package/templates/tink/harnesses/review.md +31 -0
- package/templates/tink/harnesses/ship.md +33 -0
- package/templates/tink/harnesses/tink-feedback-apply.md +37 -0
- package/templates/tink/hooks/user-prompt-submit.json +7 -0
- package/templates/tink/hooks/user-prompt-submit.mjs +49 -0
- package/templates/tink/maintenance/ledger.jsonl +0 -0
- package/templates/tink/maintenance/weave-queue.json +3 -0
- package/templates/tink/memory/lessons.md +17 -0
- package/templates/tink/memory/mistakes.md +16 -0
- package/templates/tink/memory/preferences.md +16 -0
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Choose, build, or synthesize the right harness for the current task.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /tink:cast
|
|
6
|
+
|
|
7
|
+
Cast the right harness for the task, run it, and capture reusable learning.
|
|
8
|
+
|
|
9
|
+
`cast` is the main Tink command. Use it before non-trivial work.
|
|
10
|
+
|
|
11
|
+
## Product promise
|
|
12
|
+
Tink is not a harness recommendation list. It must leave the user with an active run state and a concrete next action.
|
|
13
|
+
|
|
14
|
+
Tink should:
|
|
15
|
+
1. understand the task,
|
|
16
|
+
2. choose the smallest effective harness/tool set,
|
|
17
|
+
3. replace heavy harnesses when the current stage or token budget makes them harmful,
|
|
18
|
+
4. build or synthesize a narrow harness when none fits,
|
|
19
|
+
5. materialize the harness as a run plan,
|
|
20
|
+
6. execute the first safe step after approval,
|
|
21
|
+
7. prevent repeated mistakes while working,
|
|
22
|
+
8. maintain the harness set through approved memory, weave, or frog proposals.
|
|
23
|
+
|
|
24
|
+
## Default behavior
|
|
25
|
+
Do not stop after saying which harness might fit.
|
|
26
|
+
|
|
27
|
+
A valid `/tink:cast` response must do one of these:
|
|
28
|
+
- create or update `.tink/current/` and start the harnessed work,
|
|
29
|
+
- ask one blocking question that is required to create `.tink/current/`, or
|
|
30
|
+
- cancel because the user chose not to proceed.
|
|
31
|
+
|
|
32
|
+
If the task is clear enough to classify, do not ask broad clarification first. Make a best recommendation, ask for approval, then act.
|
|
33
|
+
|
|
34
|
+
## Interaction policy
|
|
35
|
+
Always call the `AskUserQuestion` tool for choice prompts. Do not render `❯` text format. Do not ask the user to type a number inline.
|
|
36
|
+
|
|
37
|
+
Map prompt content to `AskUserQuestion` fields:
|
|
38
|
+
- `question`: the full question text
|
|
39
|
+
- `header`: max 12-character tag (e.g. "진행 방식", "하네스 선택", "Git 설정")
|
|
40
|
+
- `label`: 1–5 word option name (e.g. "승인", "조정", "취소"). Add "(권장)" to the first option label if it is recommended.
|
|
41
|
+
- `description`: explanatory text for the option
|
|
42
|
+
|
|
43
|
+
Use Korean field values when `.tink/config.json` language is `ko` or `auto` with Korean input; use English otherwise.
|
|
44
|
+
|
|
45
|
+
## Readiness check
|
|
46
|
+
Before normal classification, check whether Tink is fully initialized. If `.tink/harnesses/index.json`, `.tink/config.json`, or `.tink/memory/` is missing, do not fail and do not write anything yet. Show a short recovery prompt:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
Tink is not fully initialized.
|
|
50
|
+
|
|
51
|
+
? What would you like to do?
|
|
52
|
+
❯ 1. Run /tink:setup to review or repair setup
|
|
53
|
+
2. Create the minimal .tink scaffold for this repo
|
|
54
|
+
3. Continue once with a lightweight one-run harness
|
|
55
|
+
4. Cancel
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
If legacy Tiny files such as `.tiny/` or `/tiny:use` instructions are present, treat them as old state. Explain that `/tink:cast` replaces `/tiny:use`, and offer to migrate useful `.tiny/harnesses/`, `.tiny/config.json`, and `.tiny/memory/` into `.tink/` only after approval. Never tell the user to run `/tiny:use`.
|
|
59
|
+
|
|
60
|
+
## Stitch
|
|
61
|
+
Before committing to `.tink/current/`, run Stitch exactly once. Stitch is an internal quality gate inside `/tink:cast`, not a separate `/tink:grill` command and not a real subagent in v1.0.0.
|
|
62
|
+
|
|
63
|
+
Evaluate Stitch every time, but show it to the user only when it finds a high-impact quality or safety branch. A clean internal Stitch pass is not recorded.
|
|
64
|
+
|
|
65
|
+
When Stitch is visible, show exactly one proposal in this order: proposal, reason, choices.
|
|
66
|
+
1. proposal
|
|
67
|
+
2. reason
|
|
68
|
+
3. choices
|
|
69
|
+
|
|
70
|
+
Choose the one proposal by priority:
|
|
71
|
+
1. safety or irreversibility
|
|
72
|
+
2. success criteria or verification
|
|
73
|
+
3. goal or scope ambiguity
|
|
74
|
+
4. harness mismatch
|
|
75
|
+
5. reusable improvement opportunity
|
|
76
|
+
|
|
77
|
+
Stitch may change the order or method of work, but it must not change the user's goal without separate approval.
|
|
78
|
+
|
|
79
|
+
Follow `.tink/config.json` for language. If language is `auto`, use the current user message language and fall back to English only when unclear.
|
|
80
|
+
|
|
81
|
+
Soft gate choices:
|
|
82
|
+
- English: `Approve`, `Add requirements`, `Continue as-is`
|
|
83
|
+
- Korean: `승인`, `요구사항 입력`, `이대로 진행`
|
|
84
|
+
|
|
85
|
+
Hard gate choices:
|
|
86
|
+
- English: `Approve`, `Add requirements`, `Cancel`
|
|
87
|
+
- Korean: `승인`, `요구사항 입력`, `취소`
|
|
88
|
+
|
|
89
|
+
Hard gates apply when at least one of the following is true for the next action: it is difficult or unsafe to reverse (reusable memory or harness saves, harness creation, edits, frog, weave, deleting files, removing configuration); it has external side-effects or visibility (publishing, deploying, tagging, releasing, opening a public PR, changing broad architecture or public contracts); or it involves sensitive data (secrets, credentials, payments, personal data, or destructive/external side-effect commands).
|
|
90
|
+
|
|
91
|
+
Some harnesses are inherently hard-gate territory regardless of the immediate next action. `ship` covers release/publish/deploy/PR, which are listed above. When such a harness is selected, trigger Stitch as a `safety` hard gate during the initial approval — even if the first action is read-only inspection. The hard gate protects the entire run, not just one step.
|
|
92
|
+
|
|
93
|
+
Hard gates must not offer `Continue as-is` or `이대로 진행`.
|
|
94
|
+
|
|
95
|
+
When Stitch triggers as a **soft gate**, do not call a separate `AskUserQuestion` for Stitch. Instead, add a `**🔍 Stitch**` section inside the main approval format and use a single `AskUserQuestion`. Hard gate Stitch remains a separate call.
|
|
96
|
+
|
|
97
|
+
When Stitch is visible and the user responds, record current-run state:
|
|
98
|
+
- `.tink/current/answers.md`: proposal, user choice, explicit assumptions
|
|
99
|
+
- `.tink/current/notes.md`: proposal, risk, reason, follow-up needed
|
|
100
|
+
|
|
101
|
+
If the user chooses `Continue as-is` / `이대로 진행`, proceed with the explicit assumptions recorded in `answers.md`.
|
|
102
|
+
|
|
103
|
+
Do not record a clean Stitch pass.
|
|
104
|
+
|
|
105
|
+
## Reusable State Save Gate
|
|
106
|
+
Reusable State Save Gate is a separate absolute hard approval gate, not merely a Stitch subtype. Current-run approval does not authorize reusable-state writes.
|
|
107
|
+
|
|
108
|
+
Reusable state includes:
|
|
109
|
+
- `.tink/memory/*`
|
|
110
|
+
- `.tink/harnesses/*`
|
|
111
|
+
- `.tink/harnesses/index.json`
|
|
112
|
+
- `.tink/config.json` policy changes
|
|
113
|
+
- `.claude/` workflow-affecting commands, skills, settings, or hooks (not simple preferences such as theme or model)
|
|
114
|
+
- template/plugin files that affect future installs
|
|
115
|
+
|
|
116
|
+
Before reusable-state writes, show a separate approval payload:
|
|
117
|
+
- operation
|
|
118
|
+
- destination files
|
|
119
|
+
- exact entry text or patch summary
|
|
120
|
+
- why it is reusable
|
|
121
|
+
- sensitive/private content excluded
|
|
122
|
+
- rollback or removal path
|
|
123
|
+
|
|
124
|
+
Reusable-state approval choices are `Approve`, `Add requirements`, and `Cancel`, localized when appropriate. Never offer `Continue as-is` or `이대로 진행` for reusable-state writes.
|
|
125
|
+
|
|
126
|
+
Show the payload directly at the point of proposal. Do not add a preliminary "do you want to save?" question before it — the payload IS the question.
|
|
127
|
+
|
|
128
|
+
When the plan's only non-trivial action is a reusable-state write, create run state silently first, then use Save Gate as the sole approval — skip the separate run-approval question.
|
|
129
|
+
|
|
130
|
+
## Run state contract
|
|
131
|
+
After approval, create `.tink/current/` with these files before doing deeper work. `.tink/current/` is the current workbench: the one active task plan Claude should keep updating while it works. It is temporary, local runtime state, not reusable memory and not a knowledge base:
|
|
132
|
+
|
|
133
|
+
- `plan.md`: goal, selected harnesses, assumptions, scope, out-of-scope, next steps
|
|
134
|
+
- `checks.md`: done criteria, verification commands, evidence required before final
|
|
135
|
+
- `steps.json`: machine-readable step list with `pending`, `in_progress`, `done`, or `blocked`
|
|
136
|
+
- `notes.md`: short working notes, failures, last safe point, recovery actions
|
|
137
|
+
- `answers.md`: user answers or inferred defaults used for this run
|
|
138
|
+
|
|
139
|
+
Also append a compact run record to `.tink/runs/YYYY-MM-DD-HHMM-<slug>.md` when the task completes, is canceled, is blocked, or is superseded. Do not store secrets, raw logs, full diffs, or one-off private context.
|
|
140
|
+
|
|
141
|
+
## Current run lifecycle
|
|
142
|
+
Before creating a new `.tink/current/`, check whether one already exists:
|
|
143
|
+
|
|
144
|
+
1. No current run: create `.tink/current/` and start.
|
|
145
|
+
2. Same task still active in the same conversation: resume it, update `notes.md`, and continue from the next pending step.
|
|
146
|
+
3. `.tink/current/` exists but the conversation context is gone or uncertain: treat it as a recovery candidate, not as active truth. Even if the user says “continue” or “이어서 해”, first read `plan.md`, `checks.md`, `steps.json`, `notes.md`, and `answers.md`, show the five-line recovery summary below, then ask the user to resume, archive, replace, or cancel. If the user resumes, reuse the prior Stitch decision recorded in `answers.md`; do not re-evaluate Stitch.
|
|
147
|
+
4. Different task requested: if every step in `steps.json` is `done`, auto-archive to `.tink/runs/` without asking and create the new current run. If any step is not `done`, ask whether to archive/replace the old current run. Do not overwrite silently.
|
|
148
|
+
5. Blocked or canceled task: write a compact run record with `outcome: blocked` or `outcome: canceled`, then clear or replace `.tink/current/` after approval.
|
|
149
|
+
6. Superseded task: archive the old state as `outcome: superseded` before creating the new current run.
|
|
150
|
+
|
|
151
|
+
A completed or archived current run should not remain ambiguous. Either keep it only because the user explicitly chose to resume, or archive it to `.tink/runs/` and replace it. When context was lost, do not silently continue from `steps.json`; first rebuild a short human summary and get a resume/archive/replace decision.
|
|
152
|
+
|
|
153
|
+
Recovery prompt format:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
이전 작업 복구:
|
|
157
|
+
- 목표:
|
|
158
|
+
- 마지막 안전 지점:
|
|
159
|
+
- 다음 단계:
|
|
160
|
+
- 열린 질문:
|
|
161
|
+
- 검증 상태:
|
|
162
|
+
|
|
163
|
+
? 어떻게 할까요?
|
|
164
|
+
❯ 1. 이어가기
|
|
165
|
+
2. 보관하고 새 작업
|
|
166
|
+
3. 교체
|
|
167
|
+
4. 취소
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
## Run record schema
|
|
172
|
+
Each `.tink/runs/*.md` record starts with YAML frontmatter:
|
|
173
|
+
|
|
174
|
+
```yaml
|
|
175
|
+
---
|
|
176
|
+
run_id: "run-YYYYMMDD-HHMM-slug"
|
|
177
|
+
started_at: "YYYY-MM-DDTHH:MM:SSZ"
|
|
178
|
+
ended_at: "YYYY-MM-DDTHH:MM:SSZ"
|
|
179
|
+
outcome: completed # completed | blocked | canceled | superseded
|
|
180
|
+
task_summary: ""
|
|
181
|
+
selected_harnesses: []
|
|
182
|
+
actually_loaded_harnesses: []
|
|
183
|
+
considered_but_rejected: [] # {name, reason}
|
|
184
|
+
checks_result: pass # pass | fail | blocked | not_run
|
|
185
|
+
user_corrections: [] # compact handles only
|
|
186
|
+
maintenance_suggestions: [] # {op_id, type, target, evidence}
|
|
187
|
+
approved_saves: [] # approval op IDs from .tink/maintenance/ledger.jsonl
|
|
188
|
+
context_footprint: unknown # tiny | small | large | unknown
|
|
189
|
+
---
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
The body should be a short human summary: goal, evidence, negative signals, and next safe action if blocked.
|
|
193
|
+
|
|
194
|
+
## Maintenance evidence
|
|
195
|
+
When proposing memory saves, harness edits, index updates, weave, or frog, create an operation ID and cite evidence handles. Evidence handles should be compact paths such as `.tink/runs/<file>.md`, `.tink/current/notes.md`, failed check names, or user correction snippets. Do not use raw logs as evidence.
|
|
196
|
+
|
|
197
|
+
Approved reusable changes should append one JSON line to `.tink/maintenance/ledger.jsonl` with:
|
|
198
|
+
|
|
199
|
+
```json
|
|
200
|
+
{ "timestamp": "", "op_id": "op-...", "type": "weave|frog|memory|index-update|harness-create|harness-edit", "files": [], "evidence": [], "approval": "", "result": "applied|rejected|deferred", "rollback": "" }
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Procedure
|
|
204
|
+
1. Read `.tink/harnesses/index.json` first. Do not read every harness.
|
|
205
|
+
2. Read small memory files where `config.json` sets `memory_has_entries.<name>: true`. Skip files set to `false`. After a Save Gate approves a new memory entry, set that file's flag to `true` in `config.json`.
|
|
206
|
+
- `.tink/memory/mistakes.md`
|
|
207
|
+
- `.tink/memory/preferences.md`
|
|
208
|
+
- `.tink/memory/lessons.md`
|
|
209
|
+
3. Classify the task:
|
|
210
|
+
- code change
|
|
211
|
+
- bug fix
|
|
212
|
+
- research
|
|
213
|
+
- review
|
|
214
|
+
- docs
|
|
215
|
+
- ship/release
|
|
216
|
+
- new pattern not covered yet
|
|
217
|
+
4. Pick the best existing harness set using the context budget policy below. Prefer 1-3 harnesses, but do not use a hard cap when several tiny harnesses add useful checks without crowding context. When the task is ambiguous (Stitch goal-ambiguity is expected to trigger), start with a single best-fit harness; add a second only after the user clarifies. Do not bundle 2+ harnesses for ambiguous tasks upfront.
|
|
218
|
+
5. Run the synthesis probe on the initial harness choice. The probe produces one of three outcomes: strong fit (0-1 yes), generic fit (2-3 yes), or no fit (4-5 yes or no harness matches).
|
|
219
|
+
6. If the probe finds no fit, load `harness-synthesis` and draft a domain-specific harness for this run instead of forcing a bad fit.
|
|
220
|
+
7. If the probe finds a generic fit (2-3 yes), propose a run-only draft harness or domain rules alongside the built-in harness. Do not save it by default.
|
|
221
|
+
8. If too many tools, skills, agents, or harnesses are available, load `harness-curation` and choose the smallest effective set before loading more context.
|
|
222
|
+
9. If lightweight signals show a recurring operating habit, use `harness-curation` (its habit calibration section) to make one advisory recommendation without loading a separate body.
|
|
223
|
+
10. If the user points to research, notes, examples, prior failures, or "what I learned today", synthesize from those inputs. Extract behavior-shaping rules and reusable procedure, not a summary.
|
|
224
|
+
11. Run Stitch once before committing to `.tink/current/`. If it triggers, show exactly one proposal before approval. Call `AskUserQuestion` as described in the Interaction policy section.
|
|
225
|
+
12. Ask for explicit approval before non-trivial work.
|
|
226
|
+
13. After approval, read only the selected harness files and any approved run-only draft.
|
|
227
|
+
14. Create `.tink/current/` files from the run state contract.
|
|
228
|
+
15. Execute the first safe step immediately:
|
|
229
|
+
- inspect relevant files,
|
|
230
|
+
- run a read-only diagnostic,
|
|
231
|
+
- draft the first artifact,
|
|
232
|
+
- or reproduce the issue.
|
|
233
|
+
16. Keep `steps.json` and `notes.md` current as work progresses.
|
|
234
|
+
17. Before final, verify `checks.md` and report evidence.
|
|
235
|
+
18. If the task exposed a repeated mistake or reusable improvement, use the Reusable State Save Gate approval payload below. Save only after separate user approval.
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
## Synthesis probe
|
|
239
|
+
Run this short probe even when a built-in harness seems usable. It prevents broad default harnesses from hiding repeatable domain workflows.
|
|
240
|
+
|
|
241
|
+
Answer yes/no:
|
|
242
|
+
1. Is this likely to recur in this repo, product, customer segment, release process, or personal workflow?
|
|
243
|
+
2. Would a domain-specific rule change the first action, the order of steps, the stop condition, or the verification evidence?
|
|
244
|
+
3. Is the selected built-in harness only a loose or generic fit?
|
|
245
|
+
4. Did the user correction, prior run note, failed check, research source, or named project context expose a reusable rule?
|
|
246
|
+
5. Would a one-screen draft reduce future context or repeated explanation?
|
|
247
|
+
|
|
248
|
+
Decision:
|
|
249
|
+
- 0-1 yes: use the selected built-in harness only. Record why no draft is needed if relevant.
|
|
250
|
+
- 2-3 yes: propose a run-only draft harness. It applies to this run, is written into `.tink/current/plan.md` or `notes.md`, and is not saved by default.
|
|
251
|
+
- 4-5 yes: propose a run-only draft now and ask whether it should become a save candidate after the run. Saving still needs the approval payload.
|
|
252
|
+
|
|
253
|
+
Run-only draft format:
|
|
254
|
+
|
|
255
|
+
```text
|
|
256
|
+
임시 하네스 초안 (이번 작업 전용):
|
|
257
|
+
- name: <specific-lowercase-name>
|
|
258
|
+
- why not just built-in: <one sentence>
|
|
259
|
+
- domain rules: <2-4 bullets that change execution>
|
|
260
|
+
- checks: <2-4 evidence checks>
|
|
261
|
+
- save policy: 이번 run에는 적용, 저장은 반복 근거와 별도 승인 후만
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
A run-only draft is not reusable memory. Do not update `.tink/harnesses/`, `index.json`, or `.tink/maintenance/ledger.jsonl` unless the user separately approves saving.
|
|
265
|
+
|
|
266
|
+
## Context budget policy
|
|
267
|
+
Do not use one universal harness cap. Choose by context footprint and task risk. Classify size by how much thinking and checking the harness adds, not only by file length:
|
|
268
|
+
|
|
269
|
+
- Tiny harnesses: one screen or less, one clear trigger, no extra tool chain, and one or two checks. May exceed 4 when each is directly useful. Still explain why each earns its place.
|
|
270
|
+
- Small harnesses: checklist-sized, one work type, a few checks, and limited recovery rules. Usually 1-4 active bodies. Add more only when the task has separate risks that need separate checks.
|
|
271
|
+
- Large harnesses: multi-phase, tool-heavy, research-heavy, multi-agent, or broad enough to change the whole workflow. Load one at a time and only after approval.
|
|
272
|
+
- Meta harnesses (`harness-curation`, `harness-synthesis`): do not do the end-user task directly. They decide whether to choose, reduce, replace, create, or tune other harnesses. Count their context cost and use them to reduce or replace the active set, not to pile on top by default.
|
|
273
|
+
- No hard cap mode is allowed for complex tasks, but it must be explicit: state the expected context cost, why no cap is safer, and what will be unloaded or summarized first.
|
|
274
|
+
|
|
275
|
+
If the harness list feels heavy, stop and use `harness-curation` before loading more bodies.
|
|
276
|
+
|
|
277
|
+
## Approval payload for saves
|
|
278
|
+
This is the Reusable State Save Gate payload. Before saving memory, a new harness, a harness edit, or index metadata, show:
|
|
279
|
+
|
|
280
|
+
- operation: memory-save | harness-create | harness-edit | index-update | frog | weave
|
|
281
|
+
- destination files
|
|
282
|
+
- exact entry text or patch summary
|
|
283
|
+
- why it is reusable
|
|
284
|
+
- sensitive/private content excluded
|
|
285
|
+
- evidence handles
|
|
286
|
+
- rollback or removal path
|
|
287
|
+
- approval ledger entry path: `.tink/maintenance/ledger.jsonl`
|
|
288
|
+
|
|
289
|
+
Do not save if the user approved only the current run. Saving reusable state needs separate approval.
|
|
290
|
+
|
|
291
|
+
## Approval format
|
|
292
|
+
Use concise, selection-oriented wording. The recommendation must include the first action Tink will perform, not only the harness name.
|
|
293
|
+
|
|
294
|
+
Approval option counts (always exactly one applies):
|
|
295
|
+
- Default (no Stitch, no run-only draft): 4 options — 승인 / 조정 / 새 하네스 초안 만들기 / 취소
|
|
296
|
+
- Run-only draft offered: 4 options — 승인 / 조정 / 기본 하네스만 사용 / 취소
|
|
297
|
+
- Stitch soft gate: 4 options — 승인 / 요구사항 입력 / 이대로 진행 / 취소
|
|
298
|
+
- Stitch hard gate (or Save Gate): 3 options — 승인 / 요구사항 입력 / 취소. Never offer `이대로 진행` / `Continue as-is`.
|
|
299
|
+
|
|
300
|
+
```text
|
|
301
|
+
### 🧶 Run: <task name>
|
|
302
|
+
|
|
303
|
+
**🎯 Goals**
|
|
304
|
+
- <goal>
|
|
305
|
+
|
|
306
|
+
**🛠️ Harness**: `code-change + review`
|
|
307
|
+
- **Probe:** 1 yes — built-in 하네스로 충분
|
|
308
|
+
- **이유:** 변경 범위가 좁고, 회귀 확인이 필요합니다.
|
|
309
|
+
- **첫 실행:** 관련 파일을 먼저 읽고 검증 명령 후보를 확정합니다.
|
|
310
|
+
|
|
311
|
+
? 진행할까요?
|
|
312
|
+
❯ 1. 승인 (권장) — 실행 상태 생성 후 첫 실행까지 진행
|
|
313
|
+
2. 조정 — 다른 하네스 조합 선택
|
|
314
|
+
3. 새 하네스 초안 만들기
|
|
315
|
+
4. 취소
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
If a run-only draft or new harness is useful:
|
|
319
|
+
|
|
320
|
+
```text
|
|
321
|
+
### 🧶 Run: <task name>
|
|
322
|
+
|
|
323
|
+
**🎯 Goals**
|
|
324
|
+
- <goal>
|
|
325
|
+
|
|
326
|
+
**🛠️ Harness**: `<built-in>` (probe: 3 yes — generic fit)
|
|
327
|
+
|
|
328
|
+
**임시 하네스 초안** (이번 작업 전용):
|
|
329
|
+
- **name:** `customer-interview-synthesis`
|
|
330
|
+
- **why not just built-in:** 일반 research보다 인터뷰 단위, 원문 근거, pain point 반복성이 중요합니다.
|
|
331
|
+
- **domain rules:**
|
|
332
|
+
- 인터뷰별 원문 근거를 먼저 분리
|
|
333
|
+
- 반복 pain point와 단발 의견을 구분
|
|
334
|
+
- 제품 기회와 다음 검증 질문을 함께 남김
|
|
335
|
+
- **checks:** 원문 근거, 추측 분리, 다음 액션
|
|
336
|
+
- **save policy:** 이번 run에는 적용, 저장은 반복 근거와 별도 승인 후만
|
|
337
|
+
|
|
338
|
+
? 진행할까요?
|
|
339
|
+
❯ 1. 승인 (권장) — 기본 하네스 + 임시 초안으로 `.tink/current/` 생성
|
|
340
|
+
2. 조정
|
|
341
|
+
3. 기본 하네스만 사용
|
|
342
|
+
4. 취소
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
If Stitch triggers as a soft gate, merge it into the approval format. The user-facing block uses plain language — never the word `Stitch`. The Korean default uses `점검 사항`; English uses `Review note`:
|
|
346
|
+
|
|
347
|
+
```text
|
|
348
|
+
### 🧶 Run: <task name>
|
|
349
|
+
|
|
350
|
+
**🎯 Goals**
|
|
351
|
+
- <goal>
|
|
352
|
+
|
|
353
|
+
**🔍 점검 사항**
|
|
354
|
+
- 제안: <one proposal>
|
|
355
|
+
- 이유: <reason>
|
|
356
|
+
- 이대로 진행 시 가정: <explicit assumption>
|
|
357
|
+
|
|
358
|
+
**🛠️ Harness**: `<harness>`
|
|
359
|
+
- **Probe:** ...
|
|
360
|
+
- **이유:** ...
|
|
361
|
+
- **첫 실행:** ...
|
|
362
|
+
|
|
363
|
+
? 진행할까요?
|
|
364
|
+
❯ 1. 승인 (권장) — 점검 가정 포함 진행
|
|
365
|
+
2. 요구사항 입력 — 점검 제안 또는 계획 조정
|
|
366
|
+
3. 이대로 진행 — 점검 무시하고 원래 계획대로
|
|
367
|
+
4. 취소
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
## Harness synthesis contract
|
|
371
|
+
When creating a new harness or run-only draft, Tink must create a procedure that would outperform a generic skill recommendation for a repeated task.
|
|
372
|
+
|
|
373
|
+
Do not wait for total mismatch. `generic fit` is enough to draft when the synthesis probe says the task has repeatable domain rules.
|
|
374
|
+
|
|
375
|
+
A generated harness can encode:
|
|
376
|
+
- domain triggers: when this exact workflow should run
|
|
377
|
+
- source inputs: research notes, examples, project files, prior run notes, failures, user corrections
|
|
378
|
+
- decision rules: how to choose options, reject bad paths, or stop
|
|
379
|
+
- tool sequence: what to inspect, search, run, draft, verify, or avoid first
|
|
380
|
+
- checks: objective evidence required before final
|
|
381
|
+
- recovery: what to do when a check fails
|
|
382
|
+
- memory rule: what may become reusable memory or harness improvement
|
|
383
|
+
|
|
384
|
+
Do not generate broad harnesses like `coding-helper` or `research-assistant`. Generate narrow harnesses like `nextjs-rsc-boundary-refactor`, `pre-pr-security-gate`, or `cafe-menu-validation-note`.
|
|
385
|
+
|
|
386
|
+
Before saving, score the candidate 1-5 on specificity, actionability, verifiability, reuse likelihood, and context cost. Save only if the weak points are acceptable and the user approves.
|
|
387
|
+
|
|
388
|
+
## `plan.md` template
|
|
389
|
+
```md
|
|
390
|
+
# Tink current run
|
|
391
|
+
|
|
392
|
+
## Goal
|
|
393
|
+
-
|
|
394
|
+
|
|
395
|
+
## Selected harnesses
|
|
396
|
+
-
|
|
397
|
+
|
|
398
|
+
## Why this harness
|
|
399
|
+
-
|
|
400
|
+
|
|
401
|
+
## Scope
|
|
402
|
+
-
|
|
403
|
+
|
|
404
|
+
## Out of scope
|
|
405
|
+
-
|
|
406
|
+
|
|
407
|
+
## Assumptions / answers
|
|
408
|
+
-
|
|
409
|
+
|
|
410
|
+
## Next steps
|
|
411
|
+
1.
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
## `checks.md` template
|
|
415
|
+
```md
|
|
416
|
+
# Checks
|
|
417
|
+
|
|
418
|
+
## Done means
|
|
419
|
+
-
|
|
420
|
+
|
|
421
|
+
## Verification
|
|
422
|
+
-
|
|
423
|
+
|
|
424
|
+
## Evidence to report
|
|
425
|
+
-
|
|
426
|
+
|
|
427
|
+
## Stop conditions
|
|
428
|
+
-
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
## `answers.md` template
|
|
432
|
+
```md
|
|
433
|
+
# Answers and assumptions
|
|
434
|
+
|
|
435
|
+
## User answers
|
|
436
|
+
-
|
|
437
|
+
|
|
438
|
+
## Inferred defaults
|
|
439
|
+
-
|
|
440
|
+
|
|
441
|
+
## Open questions
|
|
442
|
+
-
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
## `steps.json` template
|
|
446
|
+
```json
|
|
447
|
+
{
|
|
448
|
+
"goal": "",
|
|
449
|
+
"harnesses": [],
|
|
450
|
+
"steps": [
|
|
451
|
+
{ "id": "1", "status": "in_progress", "description": "Create run state and inspect the target", "started_at": "", "completed_at": "" }
|
|
452
|
+
]
|
|
453
|
+
}
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
## Meaning of `context`
|
|
457
|
+
When listing harnesses, define `context` once:
|
|
458
|
+
|
|
459
|
+
```text
|
|
460
|
+
context는 이 harness가 Claude 작업 컨텍스트를 얼마나 차지하는지입니다.
|
|
461
|
+
- tiny: 아주 짧음
|
|
462
|
+
- small: 보통 체크리스트
|
|
463
|
+
- large: 별도 승인 후 읽는 큰 하네스
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
## Other slash skills
|
|
467
|
+
Tink does not automatically wrap `/grill-me`, `/diagnose`, `/tdd`, or other slash skills. That is intentional. If needed, run `/tink:cast` first, then use the other skill output as input.
|
|
468
|
+
|
|
469
|
+
## Failure behavior
|
|
470
|
+
If a check fails:
|
|
471
|
+
- write the failure to `.tink/current/notes.md`,
|
|
472
|
+
- identify the last safe point,
|
|
473
|
+
- take one recovery action,
|
|
474
|
+
- update `steps.json`,
|
|
475
|
+
- then update the harness or memory only if the lesson is reusable and approved.
|
|
476
|
+
|
|
477
|
+
## Do not
|
|
478
|
+
- Do not end with a harness recommendation only.
|
|
479
|
+
- Do not load every harness body up front.
|
|
480
|
+
- Do not create memory entries without separate Reusable State Save Gate approval.
|
|
481
|
+
- Do not store raw logs, full diffs, secrets, or one-off task progress as reusable memory.
|
|
482
|
+
- Do not ask "do you want to save?" before showing the Reusable State Save Gate payload. Show the payload directly.
|
|
483
|
+
- Do not narrate .tink/ file writes (current/, runs/, memory/, config.json) in the response body. Do not show diff summaries, file lists, or "I created X / I updated Y" breakdowns. The tool-use header is sufficient on its own. At the end of the response, add at most one short sentence summarizing what changed across all .tink/ writes.
|
|
484
|
+
- Do not use Tink-internal jargon (Stitch, hard gate, Save Gate, Reusable State, or temporary labels like G1/G2/G3) when writing user-facing responses. Translate to plain language matching `config.json` language. Internal documentation and code keep original terms for consistency.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Propose unused or redundant harness cleanup without deleting automatically.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /tink:frog
|
|
6
|
+
|
|
7
|
+
Find harnesses that are probably unused or redundant, then ask before removing them.
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
Keep Tink small. A large harness set defeats the point.
|
|
11
|
+
|
|
12
|
+
## Interaction policy
|
|
13
|
+
Always call the `AskUserQuestion` tool for choice prompts. Do not render `❯` text format. Do not ask the user to type a number inline.
|
|
14
|
+
|
|
15
|
+
Map prompt content to `AskUserQuestion` fields:
|
|
16
|
+
- `question`: the full question text
|
|
17
|
+
- `header`: max 12-character tag (e.g. "진행 방식", "정리 방식")
|
|
18
|
+
- `label`: 1–5 word option name. Add "(권장)" if recommended.
|
|
19
|
+
- `description`: explanatory text for the option
|
|
20
|
+
|
|
21
|
+
Use Korean field values when `.tink/config.json` language is `ko` or `auto` with Korean input; use English otherwise.
|
|
22
|
+
|
|
23
|
+
## Procedure
|
|
24
|
+
1. Read `.tink/harnesses/index.json`.
|
|
25
|
+
2. Check compact evidence if available:
|
|
26
|
+
- `.tink/runs/` summaries
|
|
27
|
+
- `.tink/maintenance/ledger.jsonl`
|
|
28
|
+
- `.tink/maintenance/weave-queue.json`
|
|
29
|
+
- references in memory files
|
|
30
|
+
- recent git history touching harness files as weak context only
|
|
31
|
+
3. Treat `.tink/current/notes.md` as weak evidence unless it is clearly from the same active conversation. If uncertain, label it `stale current candidate`.
|
|
32
|
+
4. Grade evidence before recommending action:
|
|
33
|
+
- strong: multiple run or ledger records show non-use, repeated rejection, replacement, or accepted alternative
|
|
34
|
+
- medium: one run or ledger record plus clear overlap or memory evidence
|
|
35
|
+
- weak: static index, git-only evidence, stale current notes, or model judgment
|
|
36
|
+
5. Identify candidates:
|
|
37
|
+
- never used with strong evidence
|
|
38
|
+
- not used recently with strong evidence
|
|
39
|
+
- overlaps strongly with another harness
|
|
40
|
+
- too broad to guide behavior
|
|
41
|
+
- repeatedly ignored during `/tink:cast`
|
|
42
|
+
6. For each candidate, show evidence grade and recommendation:
|
|
43
|
+
- keep
|
|
44
|
+
- merge into another harness
|
|
45
|
+
- delete
|
|
46
|
+
- rewrite via `/tink:weave`
|
|
47
|
+
7. Only strong evidence may recommend `delete`. Medium evidence may recommend `merge` or `hone`. Weak evidence must default to `keep` or `needs evidence`.
|
|
48
|
+
8. For each non-keep action, prepare an operation-specific approval payload with exact files, op ID, evidence handles, and rollback.
|
|
49
|
+
9. If the recommendation is `weave`, write or present a weave handoff packet and, after approval, add it to `.tink/maintenance/weave-queue.json`:
|
|
50
|
+
- id
|
|
51
|
+
- target harness
|
|
52
|
+
- evidence
|
|
53
|
+
- proposed direction
|
|
54
|
+
- affected files
|
|
55
|
+
- approval status
|
|
56
|
+
10. Ask for approval before changing files.
|
|
57
|
+
11. If approved, remove or merge surgically, update `.tink/harnesses/index.json`, and append the approval/result to `.tink/maintenance/ledger.jsonl`.
|
|
58
|
+
|
|
59
|
+
## Approval format
|
|
60
|
+
```text
|
|
61
|
+
Purge candidates with operation IDs:
|
|
62
|
+
- docs: keep. Evidence grade=strong. Used recently and distinct.
|
|
63
|
+
- op-1 ship: hone. Evidence grade=medium. Handoff: target=ship, direction=tighten release checks.
|
|
64
|
+
- old-research: needs evidence. Evidence grade=weak. Static index only, so no delete recommendation.
|
|
65
|
+
|
|
66
|
+
? 진행할까요?
|
|
67
|
+
❯ 1. 승인 — 추천안 적용
|
|
68
|
+
2. 일부만 적용 — op ID로 선택
|
|
69
|
+
3. 취소
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Do not
|
|
73
|
+
- Do not delete without approval.
|
|
74
|
+
- Do not delete built-in harnesses only because usage data is missing.
|
|
75
|
+
- Do not treat missing `.tink/runs/` as proof of non-use.
|
|
76
|
+
- Do not recommend delete from weak evidence.
|
|
77
|
+
- Do not apply a delete, merge, weave handoff, or index update without an operation-specific approval payload.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Inspect available Tink harnesses and recent usage signals.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /tink:list
|
|
6
|
+
|
|
7
|
+
List available Tink harnesses without loading every harness body.
|
|
8
|
+
|
|
9
|
+
## Procedure
|
|
10
|
+
1. Read `.tink/harnesses/index.json`.
|
|
11
|
+
2. Read only compact usage metadata from `.tink/runs/` (frontmatter `selected_harnesses` / `actually_loaded_harnesses` + dates), `.tink/maintenance/ledger.jsonl`, and `.tink/maintenance/weave-queue.json`. Do not load raw logs.
|
|
12
|
+
3. Treat `.tink/current/` as weak evidence unless it is clearly from the same active conversation. If context is uncertain, label it `stale current candidate`, not proof of usage.
|
|
13
|
+
4. Classify every harness into exactly one of three categories:
|
|
14
|
+
- **working** — directly performs tasks (e.g. `code-change`, `bug-fix`, `research`, `review`, `docs`, `ship`).
|
|
15
|
+
- **meta** — manages other harnesses or Tink itself. Treat these names as meta regardless of `kind`: `harness-synthesis`, `harness-curation`, `tink-feedback-apply`.
|
|
16
|
+
- **custom (this repo)** — `kind: synthesized` in `index.json` (created in this repo, not part of the default set). If a synthesized harness also matches a meta name, prefer meta.
|
|
17
|
+
5. Compute the signal per harness:
|
|
18
|
+
- 🟢 **active** — appears in any `.tink/runs/*.md` frontmatter or `.tink/maintenance/ledger.jsonl` entry.
|
|
19
|
+
- ⚪ **unknown** — no run/ledger/memory evidence. Do not call it `quiet` or `candidate for purge` from the static index alone. Do not infer non-use from missing evidence.
|
|
20
|
+
6. Show all three categories every time, even when one is empty. For an empty category, render `_(아직 없음)_` (or the English equivalent if the project language is `en`) instead of an item list.
|
|
21
|
+
7. Do not output the `evidence` field. Usage is now compressed into `signal`.
|
|
22
|
+
|
|
23
|
+
## Output format
|
|
24
|
+
|
|
25
|
+
Always start with a header block that defines the fields and categories. Render each harness as a multi-line block — one field per line, never collapsed onto one line. Close with an assessment and command suggestions.
|
|
26
|
+
|
|
27
|
+
Use this exact skeleton (translate field labels and descriptions to the language in `.tink/config.json`):
|
|
28
|
+
|
|
29
|
+
````markdown
|
|
30
|
+
### 🧶 Tink 하네스 목록
|
|
31
|
+
|
|
32
|
+
> **필드 설명**
|
|
33
|
+
> - **purpose** — 이 하네스가 다루는 작업
|
|
34
|
+
> - **context** — Claude 컨텍스트 점유량
|
|
35
|
+
> · `tiny` 아주 짧음 · `small` 보통 체크리스트 · `large` 별도 승인 후 읽는 큰 하네스
|
|
36
|
+
> - **last used** — 가장 최근 실행 날짜 (없으면 `미사용`)
|
|
37
|
+
> - **signal** — 🟢 `active` 사용 기록 있음 · ⚪ `unknown` 아직 사용 기록 없음
|
|
38
|
+
>
|
|
39
|
+
> **카테고리 설명**
|
|
40
|
+
> - **작업 하네스** — 실제 작업을 수행 (코드 변경·리뷰·문서 등)
|
|
41
|
+
> - **메타 하네스** — 다른 하네스나 Tink 자체를 관리 (선택·합성·피드백 반영)
|
|
42
|
+
> - **이 저장소 전용** — 이 프로젝트에서 직접 만들어 저장된 하네스
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
#### 🛠️ 작업 하네스
|
|
47
|
+
|
|
48
|
+
##### `<name>`
|
|
49
|
+
- **purpose**: <one short sentence>
|
|
50
|
+
- **context**: <tiny | small | large>
|
|
51
|
+
- **last used**: <YYYY-MM-DD | 미사용>
|
|
52
|
+
- **signal**: 🟢 active | ⚪ unknown
|
|
53
|
+
|
|
54
|
+
#### 🧭 메타 하네스
|
|
55
|
+
|
|
56
|
+
##### `<name>`
|
|
57
|
+
- **purpose**: …
|
|
58
|
+
- **context**: …
|
|
59
|
+
- **last used**: …
|
|
60
|
+
- **signal**: …
|
|
61
|
+
|
|
62
|
+
(또는 비어 있으면)
|
|
63
|
+
_(아직 없음)_
|
|
64
|
+
|
|
65
|
+
#### 🔧 이 저장소 전용
|
|
66
|
+
|
|
67
|
+
##### `<name>`
|
|
68
|
+
- **purpose**: …
|
|
69
|
+
- **context**: …
|
|
70
|
+
- **last used**: …
|
|
71
|
+
- **signal**: …
|
|
72
|
+
|
|
73
|
+
(또는 비어 있으면)
|
|
74
|
+
_(아직 없음)_
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### 📊 평가
|
|
79
|
+
- **가장 활발**: …
|
|
80
|
+
- **한 번도 안 쓴 하네스**: …
|
|
81
|
+
- **균형/주의점**: 한두 문장 평가.
|
|
82
|
+
|
|
83
|
+
### 💡 다음에 쓸 수 있는 명령
|
|
84
|
+
- `/tink:cast <작업 설명>` — 적절한 하네스를 골라 작업 시작
|
|
85
|
+
- `/tink:weave` — 자주 쓰는 하네스에 누적된 개선 사항 반영 (해당될 때만)
|
|
86
|
+
- `/tink:frog` — 오래 사용 안 된 하네스 정리 후보 검토 (실제 삭제는 별도 승인)
|
|
87
|
+
- `/tink:setup` — 언어·범위·훅 정책 등 Tink 설정 점검
|
|
88
|
+
````
|
|
89
|
+
|
|
90
|
+
## Assessment & command-suggestion rules
|
|
91
|
+
- The 평가 section must mention at least: the most-used harness, every harness with an `unknown` signal, and any obvious imbalance (e.g. meta harnesses all untouched).
|
|
92
|
+
- Always include `/tink:cast` and `/tink:setup` as default next steps.
|
|
93
|
+
- Only suggest `/tink:weave` when at least one active harness has user-correction evidence, repeated runs of the same category, or items queued in `.tink/maintenance/weave-queue.json`.
|
|
94
|
+
- Only suggest `/tink:frog` when at least one harness has been `unknown` for the entire visible history AND there is no plausible upcoming use. Frame it as "정리 후보 검토", not "삭제".
|
|
95
|
+
|
|
96
|
+
## Output style
|
|
97
|
+
Use bullets, not tables. One field per line per harness. Never collapse a harness into a single line.
|
|
98
|
+
|
|
99
|
+
## Do not
|
|
100
|
+
- Do not read every harness body by default.
|
|
101
|
+
- Do not infer non-use from missing evidence.
|
|
102
|
+
- Do not remove anything. Use `/tink:frog` for removal candidates.
|
|
103
|
+
- Do not output the `evidence` field.
|
|
104
|
+
- Do not hide a category because it has zero items — render `_(아직 없음)_` instead.
|