tink-harness 1.5.0 → 1.6.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tink",
3
3
  "description": "A small harness layer for Claude Code and Codex.",
4
- "version": "1.5.0",
4
+ "version": "1.6.0",
5
5
  "author": {
6
6
  "name": "dotori"
7
7
  }
package/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ All notable changes to Tink are tracked here.
7
7
  No unreleased changes yet.
8
8
 
9
9
 
10
+ ## [1.6.0] - 2026-06-09
11
+
12
+ ### Added
13
+
14
+ - Graph-rule seed rules now route common Tink maintenance work to the right supporting files, harnesses, and verification checks without adding a public `tink index` command.
15
+ - `/tink:weave`, `/tink:frog`, and `$tink:*` guidance now treats rule `reason`, `risk`, `include_paths`, and `checks` as reviewable context-engineering evidence.
16
+ - Korean PR history draft for the graph-rule seed rules work in `docs/pr/2026-06-09-graph-rule-seed-rules.ko.md`.
17
+ - Korean PR history draft for the v1.6.0 release in `docs/pr/2026-06-09-v1.6.0.ko.md`.
18
+
19
+
10
20
  ## [1.5.0] - 2026-06-08
11
21
 
12
22
  ### Changed
package/README.ko.md CHANGED
@@ -1,4 +1,4 @@
1
- <p align="center">
1
+ <p align="center">
2
2
  <img src=".github/assets/hero.gif" alt="Tink Hero Banner" width="100%">
3
3
  </p>
4
4
 
@@ -8,7 +8,7 @@ Claude Code와 Codex를 위한 작은 하네스 레이어입니다.
8
8
 
9
9
  Tink는 지금 작업에 맞는 하네스를 고르고, 실행 상태를 보이게 만들고, 실제 사용 중 생긴 실패와 피드백으로 하네스 세트를 개선합니다.
10
10
 
11
- **최신 릴리스:** v1.5.0 — Codex-only update에서 Codex skill picker에 `Source Command Tink ...`로 보이던 repo-local Claude Tink surface를 정리합니다.
11
+ **최신 릴리스:** v1.6.0 — graph-rule seed routing으로 반복 작업에서 필요한 관련 파일, 하네스, 검증 체크를 고릅니다.
12
12
 
13
13
  [English](README.md) · **한국어**
14
14
 
@@ -59,14 +59,14 @@ npx tink-harness@latest update
59
59
 
60
60
  업데이트 후 Codex skill, schema, Windows 경고가 이상해 보이면 `docs/update-troubleshooting.ko.md` 또는 `docs/update-troubleshooting.md`를 확인하세요.
61
61
 
62
- ## 1.5.0에서 달라진 점
62
+ ## 1.6.0에서 달라진 점
63
63
 
64
- 이번 릴리스는 기존 repo에서 Codex skill picker가 헷갈리게 보이는 문제를 고쳤습니다.
65
-
66
- - Codex-only `tink-harness update`가 repo-local `.claude/commands/tink/*.md`와 예전 repo-local `.claude/skills/tink/SKILL.md` Tink surface를 정리합니다.
67
- - 그래서 Codex에서 `$tink:*` action skill만 기대하는 상황에 `Source Command Tink Frog/List/...` 또는 넓은 `Tink` 항목이 같이 보이는 일을 줄입니다.
68
- - 의도적으로 Claude Code와 Codex를 둘 다 설치한 경우에는 repo-local Claude Code command가 남을 수 있고, 이때 `Source Command Tink ...` 항목은 정상일 수 있습니다. 자세한 내용은 `docs/update-troubleshooting.ko.md` 또는 `docs/update-troubleshooting.md`를 확인하세요.
64
+ 이번 릴리스는 Tink의 작은 rule graph를 실제 작업에서 쓸모 있게 만듭니다.
69
65
 
66
+ - README 한/영 동기화, 버전 메타데이터 동기화, Claude Code 명령 3-copy 동기화, installer/update smoke check처럼 반복되는 작업에 필요한 관련 파일과 검증 체크를 seed rule로 연결합니다.
67
+ - `/tink:cast`와 `$tink:cast`는 rule의 `reason`, `risk`, `include_paths`, `checks`를 context 증거로 남기도록 안내합니다.
68
+ - `/tink:weave`와 `/tink:frog`는 rule quality를 함께 점검해서 keep, rewrite, split, merge, needs evidence로 정리할 수 있게 합니다.
69
+ - 그래프는 계속 작고 파일 기반으로 유지합니다. 이번 릴리스도 public `tink index` 명령, watcher, generated cache, database, 외부 서비스를 추가하지 않습니다.
70
70
  ## 1.2.0 이후 기반 개선
71
71
 
72
72
  이번 릴리스는 Tink를 Claude Code와 Codex에서 같은 하네스 레이어로 쓰기 쉽게 정리합니다.
@@ -122,7 +122,7 @@ Tink는 직접 볼 수 있는 파일을 씁니다.
122
122
 
123
123
  Rule graph는 작게 유지합니다. Tink는 먼저 필수 규칙을 고르고, 작업 사실이나 keyword에 맞는 선택 규칙만 가져오며, phase별로 이미 읽은 rule id를 기록해 같은 안내를 반복하지 않습니다.
124
124
 
125
- 설계 메모는 `docs/`에 둡니다. 기본 호환성 기준은 `docs/compatibility-policy.md`에 있으며, 새 작업은 Claude Code와 Codex, macOS와 Windows를 함께 고려해야 합니다. Repo Signal 동작은 `docs/repo-signals.ko.md` 또는 `docs/repo-signals.md`에 정리되어 있고, 외부 context 안전 기준은 `docs/mcp-safe-profile.md`에 정리되어 있습니다. `.tink/current/` 상태를 읽거나 검토할 때는 `docs/work-state.ko.md` 또는 `docs/work-state.md`부터 보면 됩니다. 다음 업데이트 안정화 계획은 `docs/phase-5-update-confidence.ko.md`와 `docs/phase-5-update-confidence.md`에 정리되어 있습니다. 더 큰 아이디어 구현 점검과 로드맵은 `docs/tink-idea-implementation-plan.ko.md`에 정리되어 있습니다.
125
+ 설계 메모는 `docs/`에 둡니다. 기본 호환성 기준은 `docs/compatibility-policy.md`에 있으며, 새 작업은 Claude Code와 Codex, macOS와 Windows를 함께 고려해야 합니다. Repo Signal 동작은 `docs/repo-signals.ko.md` 또는 `docs/repo-signals.md`에 정리되어 있고, 가벼운 graph 규칙 적용 계획은 `docs/graph-rule-adoption-plan.ko.md`에 정리되어 있습니다. 외부 context 안전 기준은 `docs/mcp-safe-profile.md`에 정리되어 있습니다. `.tink/current/` 상태를 읽거나 검토할 때는 `docs/work-state.ko.md` 또는 `docs/work-state.md`부터 보면 됩니다. 다음 업데이트 안정화 계획은 `docs/phase-5-update-confidence.ko.md`와 `docs/phase-5-update-confidence.md`에 정리되어 있습니다. 더 큰 아이디어 구현 점검과 로드맵은 `docs/tink-idea-implementation-plan.ko.md`에 정리되어 있습니다.
126
126
 
127
127
  중요한 원칙은 승인입니다. 현재 작업을 진행하는 승인과, 미래에도 재사용될 상태를 저장하는 승인은 별개입니다. 새 하네스, 메모리, rule graph, hook guard 저장은 항상 별도 승인이 필요합니다.
128
128
 
package/README.md CHANGED
@@ -17,14 +17,14 @@
17
17
  </p>
18
18
 
19
19
  <p>
20
- <a href="https://github.com/dotoricode/tink-harness/releases/tag/v1.5.0"><img src="https://img.shields.io/github/v/release/dotoricode/tink-harness?label=release&color=2ea44f" alt="GitHub release"></a>
20
+ <a href="https://github.com/dotoricode/tink-harness/releases/tag/v1.6.0"><img src="https://img.shields.io/github/v/release/dotoricode/tink-harness?label=release&color=2ea44f" alt="GitHub release"></a>
21
21
  <a href="https://www.npmjs.com/package/tink-harness"><img src="https://img.shields.io/npm/v/tink-harness?label=npm&color=cb3837" alt="npm version"></a>
22
22
  <a href="https://github.com/dotoricode/tink-harness/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/dotoricode/tink-harness/ci.yml?branch=main&label=ci" alt="CI"></a>
23
23
  <a href="https://github.com/dotoricode/tink-harness/blob/main/LICENSE"><img src="https://img.shields.io/github/license/dotoricode/tink-harness" alt="License"></a>
24
24
  <a href="https://github.com/dotoricode/tink-harness/stargazers"><img src="https://img.shields.io/github/stars/dotoricode/tink-harness?style=social" alt="GitHub stars"></a>
25
25
  </p>
26
26
 
27
- <p><strong>Latest release:</strong> v1.5.0 - Codex-only update now removes repo-local Claude Tink surfaces that appeared as <code>Source Command Tink ...</code>.</p>
27
+ <p><strong>Latest release:</strong> v1.6.0 - Graph-rule seed routing now helps Tink pick supporting files, harnesses, and verification checks for repeated work.</p>
28
28
 
29
29
  **English** · [한국어](README.ko.md)
30
30
 
@@ -124,13 +124,14 @@ To quickly verify the updated install, see `docs/update-verification-recipe.md`
124
124
 
125
125
  If an update looks stale or incomplete, see `docs/update-troubleshooting.md` or `docs/update-troubleshooting.ko.md`.
126
126
 
127
- ## What's new in 1.5.0
127
+ ## What's new in 1.6.0
128
128
 
129
- This release fixes the Codex skill picker state after updating an existing repo.
129
+ This release makes Tink's small rule graph more useful during real work.
130
130
 
131
- - Codex-only `tink-harness update` now removes repo-local `.claude/commands/tink/*.md` and the old repo-local `.claude/skills/tink/SKILL.md` Tink surface.
132
- - This prevents Codex from showing `Source Command Tink Frog/List/...` or a broad repo-local `Tink` entry when the user expects only `$tink:*` action skills.
133
- - If you intentionally install both Claude Code and Codex surfaces, repo-local Claude Code commands can remain and `Source Command Tink ...` entries may be expected. See `docs/update-troubleshooting.md` or `docs/update-troubleshooting.ko.md`.
131
+ - Seed rules now connect common maintenance work to related files, harnesses, and checks, such as README bilingual sync, version metadata sync, Claude Code command 3-copy sync, and installer/update smoke checks.
132
+ - `/tink:cast` and `$tink:cast` guidance now records rule `reason`, `risk`, `include_paths`, and `checks` as reviewable context evidence instead of silently loading extra files.
133
+ - `/tink:weave` and `/tink:frog` now include rule-quality review so reusable rules can be kept, rewritten, split, merged, or marked as needing more evidence.
134
+ - The graph remains file-based and small. This release still does not add a public `tink index` command, watcher, generated cache, database, or external service.
134
135
 
135
136
  ## Recent foundation from 1.2.0+
136
137
 
@@ -201,7 +202,7 @@ Tink uses files you can inspect:
201
202
 
202
203
  The rule graph stays small on purpose. Tink loads matching mandatory rules first, retrieves only relevant optional rules by task facts or keywords, and records loaded rule ids by phase so the same guidance is not repeated in one run.
203
204
 
204
- Design notes live in `docs/`. The compatibility baseline is `docs/compatibility-policy.md`: every new slice should consider Claude Code and Codex, plus macOS and Windows. Repo signal behavior is described in `docs/repo-signals.md` or `docs/repo-signals.ko.md`. External context safety is described in `docs/mcp-safe-profile.md` and `docs/external-context-policy.md`. To read or review `.tink/current/` state, start with `docs/work-state.md` or `docs/work-state.ko.md`. Update confidence is still documented in `docs/phase-5-update-confidence.md` or `docs/phase-5-update-confidence.ko.md`. The planned work-unit list is `docs/planned-work-units.md` or `docs/planned-work-units.ko.md`, with details in the verification evidence, harness lifecycle, memory decision, context change, and update diagnosis docs. The broader Korean idea audit and roadmap is `docs/tink-idea-implementation-plan.ko.md`.
205
+ Design notes live in `docs/`. The compatibility baseline is `docs/compatibility-policy.md`: every new slice should consider Claude Code and Codex, plus macOS and Windows. Repo signal behavior is described in `docs/repo-signals.md` or `docs/repo-signals.ko.md`. The lightweight graph-rule adoption plan is `docs/graph-rule-adoption-plan.ko.md`. External context safety is described in `docs/mcp-safe-profile.md` and `docs/external-context-policy.md`. To read or review `.tink/current/` state, start with `docs/work-state.md` or `docs/work-state.ko.md`. Update confidence is still documented in `docs/phase-5-update-confidence.md` or `docs/phase-5-update-confidence.ko.md`. The planned work-unit list is `docs/planned-work-units.md` or `docs/planned-work-units.ko.md`, with details in the verification evidence, harness lifecycle, memory decision, context change, and update diagnosis docs. The broader Korean idea audit and roadmap is `docs/tink-idea-implementation-plan.ko.md`.
205
206
 
206
207
  The important rule is approval.
207
208
 
package/VERSIONING.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Versioning
2
2
 
3
- Current version: `1.5.0`
3
+ Current version: `1.6.0`
4
4
 
5
5
  Tink follows semver from `1.0.0` onward.
6
6
 
package/commands/cast.md CHANGED
@@ -369,8 +369,12 @@ A task is trivial only when ALL of the following are true:
369
369
  2. Read `.tink/rules/index.json` if present. Use it as a small rule graph to choose candidate harnesses, checks, and opt-in guard candidates from contract facts. Do not read every harness.
370
370
  - Load `mandatory` nodes first when their `when` facts match the contract.
371
371
  - Retrieve `retrievable` nodes only when their `when` facts or `keywords` fit the task.
372
+ - Treat `select_harnesses`, `include_paths`, `checks`, `reason`, and `risk` as first-class routing data when present.
372
373
  - Respect `budget_cost` and `selection_policy.retrieval.max_retrievable_per_phase` when present.
373
374
  - Record every loaded rule id in `.tink/current/session.json` under `loaded_rule_ids_by_phase.<phase>`.
375
+ - Record selected `include_paths` in `context-map.json.included[]` with `role: "supporting"` or `role: "verification_target"` when the rule also adds a check.
376
+ - Record rule `checks` in `contract.json.verification.manual_checks[]` or `commands[]` only when they are relevant and cheap; otherwise record them in `notes.md` as deferred checks.
377
+ - Record rule `reason` and `risk` in `context-map.json.signals[]` with `kind: "rule_graph"` so reviewers can see why the context or check was chosen.
374
378
  - If a rule id is already listed for the same phase, do not repeat its guidance; cite the existing session entry instead.
375
379
  3. Read `.tink/harnesses/index.json`. Use it to validate the candidates from the rule graph and to fall back when no rule node matches.
376
380
  4. 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`.
package/commands/frog.md CHANGED
@@ -26,6 +26,7 @@ Use Korean field values when `.tink/config.json` language is `ko` or `auto` with
26
26
  - `.tink/runs/` summaries
27
27
  - `.tink/maintenance/ledger.jsonl`
28
28
  - `.tink/maintenance/weave-queue.json`
29
+ - `.tink/rules/index.json`
29
30
  - references in memory files
30
31
  - recent git history touching harness files as weak context only
31
32
  2b. Check `.tink/runs/` accumulation against TTL config:
@@ -53,6 +54,14 @@ Use Korean field values when `.tink/config.json` language is `ko` or `auto` with
53
54
  - merge into another harness
54
55
  - delete
55
56
  - rewrite via `/tink:weave`
57
+ 6b. If `.tink/rules/index.json` exists, also inspect rule quality:
58
+ - keep: concrete `when`, `reason`, and useful `checks` or `include_paths`
59
+ - rewrite: too broad, unclear reason, or missing verification
60
+ - split: one rule mixes unrelated paths, tasks, or risks
61
+ - merge: multiple rules cover the same `when`, `include_paths`, and `checks`
62
+ - needs evidence: weak or no run, ledger, friction, or user-correction evidence
63
+ Prefer keep, rewrite, split, merge, or needs evidence before any removal proposal.
64
+ Report rule recommendations separately from harness recommendations.
56
65
  7. Only strong evidence may recommend `delete`. Medium evidence may recommend `merge` or `hone`. Weak evidence must default to `keep` or `needs evidence`.
57
66
  8. For each non-keep action, prepare an operation-specific approval payload with exact files, op ID, evidence handles, and rollback.
58
67
  9. If the recommendation is `weave`, write or present a weave handoff packet and, after approval, add it to `.tink/maintenance/weave-queue.json`:
package/commands/weave.md CHANGED
@@ -24,42 +24,50 @@ Use Korean field values when `.tink/config.json` language is `ko` or `auto` with
24
24
  1. Read `.tink/harnesses/index.json`. If `.tink/maintenance/weave-queue.json` exists, read it to find:
25
25
  - Handoff packets from `/tink:frog` (entries where `auto` is absent or false)
26
26
  - Auto signals from completed runs (entries where `auto: true`)
27
- Count auto signals per harness: `check_failed` signals count as 2, all other outcomes count as 1. Use this frequency to rank improvement candidates — harnesses with the highest signal count should be improved first. If invoked from `/tink:frog`, also read the purge output and `.tink/current/notes.md` for the weave handoff packet.
28
- If `.tink/maintenance/friction.jsonl` exists, read only compact recent entries and count repeated `check_failed`, `check_skipped`, `blocked`, gate denial, or rollback events. Repeated friction can justify a harness edit, rule graph update, or opt-in guard candidate.
27
+ Count auto signals per harness: `check_failed` signals count as 2, all other outcomes count as 1. Use this frequency to rank improvement candidates — harnesses with the highest signal count should be improved first. If invoked from `/tink:frog`, also read the purge output and `.tink/current/notes.md` for the weave handoff packet.
28
+ If `.tink/maintenance/friction.jsonl` exists, read only compact recent entries and count repeated `check_failed`, `check_skipped`, `blocked`, gate denial, or rollback events. Repeated friction can justify a harness edit, rule graph update, or opt-in guard candidate.
29
29
  2. Identify one or a few active harnesses to improve using real failures and evidence:
30
30
  - repeated mistakes
31
- - user corrections
32
- - failed checks
33
- - repeated friction entries
34
- - confusing approval prompts
31
+ - user corrections
32
+ - failed checks
33
+ - repeated friction entries
34
+ - confusing approval prompts
35
35
  - too much context footprint
36
36
  - missing done criteria
37
37
  3. Require concrete evidence handles before proposing a save:
38
- - run record path or run ID
39
- - current notes path when same-conversation certainty exists
40
- - failed check name
41
- - friction entry timestamp/type
42
- - compact user correction snippet
38
+ - run record path or run ID
39
+ - current notes path when same-conversation certainty exists
40
+ - failed check name
41
+ - friction entry timestamp/type
42
+ - compact user correction snippet
43
43
  - purge handoff ID from `.tink/maintenance/weave-queue.json`
44
44
  4. Classify the evidence as repeated or single-run. Single-run evidence may suggest a trial edit, but should not become broad policy unless the user explicitly approves.
45
- 5. Explain why the change belongs in the harness rather than `.tink/memory/` or `.tink/current/notes.md`.
46
- 6. Decide the right destination:
47
- - harness edit: a procedure, ask-first question, check, or recovery step should change;
48
- - rule graph update: a contract fact should select a harness, check, or guard candidate earlier;
49
- - opt-in hook guard candidate: the same failure should be blocked by `PreToolUse`, `PostToolUse`, or `Stop` after user approval;
50
- - friction logging update: the run should record a missing evidence pattern more clearly.
51
- 7. Read only the target harness files and `.tink/rules/index.json` when the evidence points to rule selection.
52
- 8. Propose small edits:
53
- - clearer when-to-use trigger
54
- - better ask-first question
55
- - tighter checks
56
- - smaller context footprint
57
- - explicit failure recovery
58
- - rule graph node or edge
59
- - opt-in guard template
60
- 9. Show an approval payload: destination files, exact patch summary, evidence handles, repeated vs single-run classification, why reusable, context-cost delta, sensitive content excluded, rollback path.
61
- 10. Ask for approval before saving.
62
- 11. Apply surgical changes, update index metadata or `.tink/rules/index.json` if needed, mark the weave queue item status, and append the approval/result to `.tink/maintenance/ledger.jsonl`.
45
+ 5. Explain why the change belongs in the harness rather than `.tink/memory/` or `.tink/current/notes.md`.
46
+ 6. Decide the right destination:
47
+ - harness edit: a procedure, ask-first question, check, or recovery step should change;
48
+ - rule graph update: a contract fact should select a harness, check, or guard candidate earlier;
49
+ - opt-in hook guard candidate: the same failure should be blocked by `PreToolUse`, `PostToolUse`, or `Stop` after user approval;
50
+ - friction logging update: the run should record a missing evidence pattern more clearly.
51
+ 7. Read only the target harness files and `.tink/rules/index.json` when the evidence points to rule selection.
52
+ For rule graph updates, run a structural gate before proposing a save:
53
+ - duplicate: does an existing rule already cover the same `when`, `include_paths`, or `checks`?
54
+ - breadth: is the rule too broad, such as "always check docs", instead of tied to concrete paths, task facts, or risks?
55
+ - evidence: does the proposal cite a run, failed check, user correction, or friction entry?
56
+ - verification: does the rule add a check or explain why no check is needed?
57
+ - compatibility: does the rule make sense for both Claude Code and Codex, and for macOS and Windows?
58
+ - portability: does it avoid OS-specific shell syntax unless alternatives are listed?
59
+ 8. Propose small edits:
60
+ - clearer when-to-use trigger
61
+ - better ask-first question
62
+ - tighter checks
63
+ - smaller context footprint
64
+ - explicit failure recovery
65
+ - rule graph node or edge
66
+ - opt-in guard template
67
+ 9. Show an approval payload: destination files, exact patch summary, evidence handles, repeated vs single-run classification, why reusable, context-cost delta, sensitive content excluded, rollback path.
68
+ For rule graph updates, also show structural gate results: duplicate, breadth, evidence, verification, compatibility, and portability.
69
+ 10. Ask for approval before saving.
70
+ 11. Apply surgical changes, update index metadata or `.tink/rules/index.json` if needed, mark the weave queue item status, and append the approval/result to `.tink/maintenance/ledger.jsonl`.
63
71
 
64
72
  ## Approval format
65
73
  ```text
@@ -72,11 +80,11 @@ Evidence:
72
80
  - observed failure: verification command was unclear in two runs
73
81
 
74
82
  Approval payload:
75
- - operation: weave
76
- - destination files: `.tink/harnesses/code-change.md`, `.tink/harnesses/index.json` if metadata changes, `.tink/rules/index.json` if routing changes
77
- - context-cost delta: neutral or smaller
78
- - ledger: append op ID to `.tink/maintenance/ledger.jsonl`
79
- - rollback: revert this patch or rerun `/tink:weave` with the previous trigger
83
+ - operation: weave
84
+ - destination files: `.tink/harnesses/code-change.md`, `.tink/harnesses/index.json` if metadata changes, `.tink/rules/index.json` if routing changes
85
+ - context-cost delta: neutral or smaller
86
+ - ledger: append op ID to `.tink/maintenance/ledger.jsonl`
87
+ - rollback: revert this patch or rerun `/tink:weave` with the previous trigger
80
88
 
81
89
  Proposed improvement:
82
90
  - Checks 섹션에 “검증 명령과 실패 시 마지막 안전 지점 기록” 추가
@@ -89,7 +97,7 @@ Proposed improvement:
89
97
 
90
98
  ## Do not
91
99
  - Do not rewrite a harness from scratch unless the user asks.
92
- - Do not add broad principles that do not change behavior.
93
- - Do not save one-off task progress as harness knowledge.
94
- - Do not propose a harness edit without evidence handles.
95
- - Do not register enforcement hooks by default. Save guard templates as opt-in candidates unless the user explicitly approves installation.
100
+ - Do not add broad principles that do not change behavior.
101
+ - Do not save one-off task progress as harness knowledge.
102
+ - Do not propose a harness edit without evidence handles.
103
+ - Do not register enforcement hooks by default. Save guard templates as opt-in candidates unless the user explicitly approves installation.
@@ -0,0 +1,215 @@
1
+ # Graph 규칙 적용 계획
2
+
3
+ 이 문서는 Writ의 graph 기반 context 선택 아이디어를 Tink에 맞게 가볍게 적용하는 계획이다.
4
+
5
+ 목표는 Neo4j, FastAPI, vector DB, watcher, generated cache를 도입하는 것이 아니다. Tink의 장점인 작은 파일 기반 구조를 유지하면서, 작업에 맞는 하네스와 검증을 더 안정적으로 고르는 작은 규칙 지도를 만드는 것이다.
6
+
7
+ ## 왜 필요한가
8
+
9
+ Tink는 현재 작업을 보고 `research`, `docs`, `code-change`, `ship` 같은 하네스를 고른다. 이 선택이 맞으면 context가 작고 검증도 선명하다. 하지만 작업이 애매하면 다음 문제가 생길 수 있다.
10
+
11
+ - 릴리스 작업인데 `docs`만 골라서 `npm pack`이나 changelog 확인을 놓친다.
12
+ - 작은 문서 수정인데 `ship`까지 골라 작업이 과해진다.
13
+ - README를 고치면서 한국어 companion 문서를 빼먹는다.
14
+ - version bump를 하면서 `.claude-plugin/plugin.json`을 놓친다.
15
+
16
+ Graph 규칙은 이런 실수를 줄이기 위한 작은 연결 규칙이다.
17
+
18
+ ```text
19
+ 작업 사실
20
+ -> 필요한 하네스
21
+ -> 같이 봐야 하는 파일
22
+ -> 반드시 확인할 검증
23
+ -> 적용 이유
24
+ ```
25
+
26
+ ## 원칙
27
+
28
+ 1. **파일 기반으로 유지한다.**
29
+ `.tink/rules/index.json` 같은 작은 JSON을 사용한다.
30
+
31
+ 2. **사람 승인 없이 규칙을 저장하지 않는다.**
32
+ AI는 후보를 제안하고, 사람은 승인한다.
33
+
34
+ 3. **항상 필요한 규칙과 필요할 때만 가져오는 규칙을 나눈다.**
35
+ 예: 비밀키 노출 금지는 항상 중요하지만, npm publish 검증은 release 작업에서만 필요하다.
36
+
37
+ 4. **규칙은 작고 구체적이어야 한다.**
38
+ “문서를 잘 확인한다”보다 “README.md를 수정하면 README.ko.md도 확인한다”가 좋다.
39
+
40
+ 5. **왜 선택됐는지 run artifact에 남긴다.**
41
+ 선택된 규칙은 `.tink/current/session.json`, `context-map.json`, `verification.json`에서 추적 가능해야 한다.
42
+
43
+ ## 좋은 규칙의 모양
44
+
45
+ 좋은 규칙은 네 가지를 가진다.
46
+
47
+ - 언제 적용되는가
48
+ - 무엇을 context로 가져오는가
49
+ - 무엇을 검증하는가
50
+ - 왜 필요한가
51
+
52
+ 예시:
53
+
54
+ ```json
55
+ {
56
+ "id": "readme-bilingual-sync",
57
+ "when": {
58
+ "changed_paths": ["README.md"]
59
+ },
60
+ "include_paths": ["README.ko.md"],
61
+ "checks": ["README language pair stays aligned"],
62
+ "reason": "README has a Korean companion document."
63
+ }
64
+ ```
65
+
66
+ ## 작업 단위
67
+
68
+ ## 현재 구현 상태
69
+
70
+ - 1차 구현: `templates/tink/rules/index.json`에 `node_shape`와 안전 seed rule을 추가했다.
71
+ - 1차 구현: `$tink:cast` / `/tink:cast`가 `select_harnesses`, `include_paths`, `checks`, `reason`, `risk`를 기록 대상으로 다루도록 지침을 보강했다.
72
+ - 1차 구현: `$tink:weave` / `/tink:weave`가 reusable rule graph update를 제안하기 전에 structural gate를 확인하도록 했다.
73
+ - 1차 구현: `$tink:frog` / `/tink:frog`가 harness뿐 아니라 rule quality도 `keep`, `rewrite`, `split`, `merge`, `needs evidence`로 점검할 수 있게 했다.
74
+ - 남은 구현: 실제 cast 실행 산출물 fixture에서 seed rule 선택 결과를 더 풍부하게 보여주는 예제를 늘릴 수 있다.
75
+ - 남은 구현: 충분한 run 기록이 쌓인 뒤 rule 사용 빈도와 실패 신호 기반 정리 제안을 더 정량화할 수 있다.
76
+
77
+ ### 1. 규칙 schema 정리
78
+
79
+ `templates/tink/rules/index.json`의 노드 형식을 더 명확히 한다.
80
+
81
+ 추가하면 좋은 필드:
82
+
83
+ - `when`: 적용 조건
84
+ - `select_harnesses`: 선택할 하네스
85
+ - `include_paths`: 같이 볼 파일
86
+ - `checks`: 추가할 검증
87
+ - `reason`: 선택 이유
88
+ - `load`: `mandatory` 또는 `retrievable`
89
+ - `risk`: 잘못 적용됐을 때의 위험
90
+
91
+ 완료 기준:
92
+
93
+ - Claude Code와 Codex 둘 다 같은 JSON을 읽을 수 있다.
94
+ - macOS와 Windows 테스트에서 통과한다.
95
+ - public `tink index` 명령, watcher, generated cache를 만들지 않는다.
96
+
97
+ ### 2. 첫 번째 안전 규칙 세트 추가
98
+
99
+ 처음에는 자주 실수할 수 있고 근거가 뚜렷한 규칙만 넣는다.
100
+
101
+ 후보:
102
+
103
+ - `README.md` 변경 시 `README.ko.md` 확인
104
+ - `package.json` version 변경 시 `package-lock.json`, `.claude-plugin/plugin.json`, `CHANGELOG.md`, `VERSIONING.md` 확인
105
+ - `commands/*.md` 변경 시 3-copy sync 확인
106
+ - `bin/install.js` 변경 시 install/update smoke 경로 확인
107
+ - release/publish 작업 시 `npm test`, `git diff --check`, `npm pack --dry-run --json` 확인
108
+ - Codex-only update 작업 시 repo-local `.claude/commands/tink/*.md`와 `.claude/skills/tink/SKILL.md` 정리 여부 확인
109
+
110
+ 완료 기준:
111
+
112
+ - 각 규칙은 적용 조건과 검증 이유를 가진다.
113
+ - 너무 넓은 규칙은 넣지 않는다.
114
+ - 테스트 fixture로 선택 결과를 확인한다.
115
+
116
+ ### 3. `$tink:cast` 선택 기록 강화
117
+
118
+ `$tink:cast`가 규칙을 적용했을 때 다음을 남긴다.
119
+
120
+ - 어떤 rule id가 적용됐는지
121
+ - 어떤 하네스가 선택됐는지
122
+ - 어떤 파일이 context 후보가 됐는지
123
+ - 어떤 검증이 추가됐는지
124
+ - 어떤 후보를 제외했는지
125
+
126
+ 기록 위치:
127
+
128
+ - `.tink/current/session.json`
129
+ - `.tink/current/context-map.json`
130
+ - `.tink/current/excluded-context.md`
131
+
132
+ 완료 기준:
133
+
134
+ - 사람이 “왜 이 파일을 봤는지” 다시 추리하지 않아도 된다.
135
+ - 불필요 context와 제외 context가 분리된다.
136
+
137
+ ### 4. reusable 규칙 제안 gate 추가
138
+
139
+ `$tink:weave`가 새 rule을 저장하기 전에 다음을 확인한다.
140
+
141
+ - 기존 규칙과 중복되는가
142
+ - 너무 넓은가
143
+ - 실제 evidence가 있는가
144
+ - 검증 가능한가
145
+ - Claude Code와 Codex 모두에서 의미가 있는가
146
+ - macOS와 Windows에 묶인 명령은 아닌가
147
+
148
+ 완료 기준:
149
+
150
+ - AI는 rule 후보를 제안할 수 있다.
151
+ - 저장은 별도 승인 후에만 가능하다.
152
+ - 거절된 후보는 반복 제안을 줄이기 위해 이유를 남길 수 있다.
153
+
154
+ ### 5. frog/weave 점검 루프 연결
155
+
156
+ `$tink:frog`와 `$tink:weave`가 규칙 품질도 점검하게 한다.
157
+
158
+ 점검 대상:
159
+
160
+ - 자주 적용됐지만 검증 도움이 없던 규칙
161
+ - 자주 제외된 규칙
162
+ - 너무 많은 context를 끌고 오는 규칙
163
+ - 실패를 반복해서 놓친 규칙
164
+
165
+ 완료 기준:
166
+
167
+ - 삭제보다 먼저 `keep`, `rewrite`, `split`, `merge`, `needs evidence`로 분류한다.
168
+ - 강한 근거 없이 규칙을 삭제하지 않는다.
169
+
170
+ ## 나쁜 시나리오와 방어
171
+
172
+ | 나쁜 시나리오 | 결과 | 방어 |
173
+ | --- | --- | --- |
174
+ | 너무 넓은 규칙 | context가 커짐 | `risk`, `cost`, `reason` 필수화 |
175
+ | 필요한 규칙 누락 | 검증 빠짐 | 자주 실패한 check를 weave 후보로 기록 |
176
+ | docs 작업에 release 규칙 적용 | 작업이 과해짐 | `when` 조건을 path와 task_type으로 좁힘 |
177
+ | AI가 rule을 자동 저장 | 사용자의 작업 방식 침범 | reusable save 별도 승인 유지 |
178
+ | OS 전용 명령이 rule에 고정 | Windows/macOS 한쪽 실패 | portable command 또는 플랫폼별 대안 요구 |
179
+
180
+ ## 권장 순서
181
+
182
+ 1. `templates/tink/rules/index.json` schema를 정리한다.
183
+ 2. README, version, command sync, release 같은 안전 규칙 5-6개만 넣는다.
184
+ 3. fixture 테스트로 규칙 선택 결과를 확인한다.
185
+ 4. `$tink:cast`가 적용 rule id를 current artifact에 남기게 한다.
186
+ 5. `$tink:weave`에 reusable rule proposal gate를 붙인다.
187
+ 6. 충분한 run 기록이 쌓인 뒤 `$tink:frog`에서 rule 정리 후보를 제안한다.
188
+
189
+ ## 지금 당장 만들지 않을 것
190
+
191
+ - public `tink index` 명령
192
+ - runtime watcher
193
+ - generated graph cache
194
+ - Neo4j, FastAPI, vector DB
195
+ - Sentry integration
196
+ - release evidence bundling
197
+ - 사용자 승인 없는 rule 자동 저장
198
+
199
+ ## 첫 PR 제안
200
+
201
+ 첫 PR은 “Graph Rule Schema and Seed Rules”가 좋다.
202
+
203
+ 범위:
204
+
205
+ - `templates/tink/rules/index.json`에 필드 의미를 명확히 반영한다.
206
+ - README/version/command sync/release 관련 seed rule을 추가한다.
207
+ - fixture와 테스트를 추가해 선택 결과를 확인한다.
208
+ - 문서에 “이것은 public index가 아니라 작은 rule graph”라고 명시한다.
209
+
210
+ 완료 확인:
211
+
212
+ - `npm test`
213
+ - `git diff --check`
214
+ - `npm pack --dry-run --json`
215
+ - Claude Code와 Codex 설명 문구가 같은 방향을 가리키는지 수동 확인
@@ -0,0 +1,26 @@
1
+ # Graph 규칙 적용 계획
2
+
3
+ ## 문제
4
+
5
+ Writ의 graph 기반 context 선택 아이디어를 Tink에 적용할 수 있을지 검토했음. 다만 Writ의 Neo4j, FastAPI, vector DB, watcher 같은 구조를 그대로 가져오면 Tink의 장점인 가벼운 파일 기반 흐름이 무거워질 수 있었음.
6
+
7
+ 또한 하네스를 잘못 고르면 릴리스 검증 누락, 과한 절차, companion 문서 누락, version metadata drift 같은 문제가 생길 수 있으므로, 작은 graph 규칙이 어떤 방식으로 안전하게 도움을 줄 수 있는지 먼저 계획으로 정리할 필요가 있었음.
8
+
9
+ ## 해결
10
+
11
+ - `docs/graph-rule-adoption-plan.ko.md`를 추가해 Tink식 graph 규칙 적용 방향을 정리했음.
12
+ - public `tink index`, watcher, generated cache, Neo4j/FastAPI/vector DB를 만들지 않는다는 경계를 명확히 했음.
13
+ - `when`, `include_paths`, `checks`, `reason`, `load`, `risk` 중심의 작은 JSON rule graph 방향을 제안했음.
14
+ - README와 한국어 README에서 새 계획 문서로 연결되도록 링크를 추가했음.
15
+
16
+ ## 검증
17
+
18
+ - `npm test`
19
+ - `git diff --check`
20
+ - `npm pack --dry-run --json`
21
+
22
+ ## 참고
23
+
24
+ - 구현은 포함하지 않았음.
25
+ - publish와 release는 포함하지 않았음.
26
+ - 새 하네스는 만들지 않았음. 기존 `research`, `docs`, `harness-curation` 관점으로 충분하다고 판단했음.
@@ -0,0 +1,27 @@
1
+ # Graph rule seed rules 구현
2
+
3
+ ## 문제
4
+
5
+ Graph 규칙 적용 계획은 문서화됐지만, 실제 설치 템플릿의 `.tink/rules/index.json`에는 README 동기화, version metadata 동기화, command 3-copy sync, installer smoke 같은 안전 규칙이 아직 들어가 있지 않았음.
6
+
7
+ 또한 `cast`, `weave`, `frog`가 새 rule 필드와 rule 품질 점검을 어떻게 다뤄야 하는지 지침이 충분히 구체적이지 않았음.
8
+
9
+ ## 해결
10
+
11
+ - `templates/tink/rules/index.json`에 `node_shape`와 안전 seed rule을 추가했음.
12
+ - `$tink:cast` / `/tink:cast`가 `select_harnesses`, `include_paths`, `checks`, `reason`, `risk`를 기록 대상으로 다루도록 보강했음.
13
+ - `$tink:weave` / `/tink:weave`에 reusable rule graph update structural gate를 추가했음.
14
+ - `$tink:frog` / `/tink:frog`가 rule quality를 `keep`, `rewrite`, `split`, `merge`, `needs evidence`로 점검하도록 보강했음.
15
+ - Claude Code와 Codex surface가 같은 방향을 보도록 root command, Claude template command, repo-local command, Claude skill, Codex core rule을 함께 갱신했음.
16
+
17
+ ## 검증
18
+
19
+ - `npm test`
20
+ - `git diff --check`
21
+ - `npm pack --dry-run --json`
22
+
23
+ ## 참고
24
+
25
+ - public `tink index` 명령, watcher, generated cache, Neo4j/FastAPI/vector DB는 추가하지 않았음.
26
+ - Sentry와 release evidence bundling은 포함하지 않았음.
27
+ - 이 변경은 설치 템플릿과 명령 지침이 바뀌므로 배포가 필요함.
@@ -0,0 +1,27 @@
1
+ # v1.6.0 릴리스 이력 초안
2
+
3
+ ## 문제
4
+
5
+ - graph-rule seed routing이 main에 머지됐지만, npm 최신 버전은 아직 `1.5.0`이었음.
6
+ - 다른 레포에서 `npx tink-harness@latest update`를 실행하는 사용자는 새 rule graph seed와 cast/weave/frog 안내를 받을 수 없는 상태였음.
7
+ - Claude Code plugin 버전도 함께 올리지 않으면 plugin update 경로와 npm update 경로가 서로 다르게 보일 수 있었음.
8
+
9
+ ## 해결
10
+
11
+ - `package.json`, `package-lock.json`, `.claude-plugin/plugin.json`을 `1.6.0`으로 맞췄음.
12
+ - `CHANGELOG.md`, `VERSIONING.md`, `README.md`, `README.ko.md`에 v1.6.0 내용을 반영했음.
13
+ - README의 최신 릴리스 설명을 graph-rule seed routing 중심으로 바꿨음.
14
+ - v1.6.0은 새 public command를 추가하지 않고, 기존 작은 file-based rule graph를 실제 작업 흐름에 연결하는 마이너 릴리스로 정리했음.
15
+
16
+ ## 검증
17
+
18
+ - `npm test`로 템플릿, 버전 메타데이터, README 문구, package contents 회귀 테스트를 확인할 예정임.
19
+ - `git diff --check`로 공백 문제를 확인할 예정임.
20
+ - `npm pack --dry-run --json`으로 npm 패키지에 새 docs와 templates가 포함되는지 확인할 예정임.
21
+ - publish 후에는 `npm view tink-harness version`과 임시 설치/update smoke로 `@latest` 경로를 확인할 예정임.
22
+
23
+ ## 참고
24
+
25
+ - GitHub Release는 마이너 버전 업데이트이므로 생성 대상임.
26
+ - 이번 릴리스는 Writ식 무거운 그래프 인프라를 도입하지 않음.
27
+ - public `tink index`, watcher, generated cache, database, 외부 서비스는 추가하지 않음.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tink-harness",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Self-growing harnesses for Claude Code and Codex.",
5
5
  "license": "MIT",
6
6
  "type": "module",