polydeukes 0.6.1 → 0.7.1
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/README.ko.md +14 -28
- package/README.md +14 -28
- package/dist/baseline.d.ts +37 -1
- package/dist/baseline.js +68 -1
- package/dist/bin.d.ts +3 -4
- package/dist/bin.js +73 -90
- package/dist/covenant/bash-line.d.ts +130 -0
- package/dist/covenant/bash-line.js +566 -0
- package/dist/covenant/declaration-engine.d.ts +108 -0
- package/dist/covenant/declaration-engine.js +415 -0
- package/dist/covenant/discipline.d.ts +103 -0
- package/dist/covenant/discipline.js +667 -0
- package/dist/covenant/dispatch.d.ts +153 -0
- package/dist/covenant/dispatch.js +237 -0
- package/dist/covenant/extract-steps.d.ts +122 -0
- package/dist/covenant/extract-steps.js +0 -0
- package/dist/covenant/mention.d.ts +117 -0
- package/dist/covenant/mention.js +209 -0
- package/dist/covenant/module.d.ts +25 -0
- package/dist/covenant/module.js +23 -0
- package/dist/covenant/mutation-rules.d.ts +40 -0
- package/dist/covenant/mutation-rules.js +146 -0
- package/dist/covenant/relations.d.ts +46 -0
- package/dist/covenant/relations.js +68 -0
- package/dist/covenant/run-covenant.d.ts +95 -0
- package/dist/covenant/run-covenant.js +164 -0
- package/dist/covenant/self-mod.d.ts +55 -0
- package/dist/covenant/self-mod.js +84 -0
- package/dist/covenant/shell-evidence.d.ts +38 -0
- package/dist/covenant/shell-evidence.js +247 -0
- package/dist/covenant/shell-mod.d.ts +84 -0
- package/dist/covenant/shell-mod.js +213 -0
- package/dist/covenant/supply.d.ts +54 -0
- package/dist/covenant/supply.js +50 -0
- package/dist/covenant/transcript-mod.d.ts +60 -0
- package/dist/covenant/transcript-mod.js +254 -0
- package/dist/covenant/ttl-witness.d.ts +47 -0
- package/dist/covenant/ttl-witness.js +80 -0
- package/dist/covenant-check.d.ts +72 -39
- package/dist/covenant-check.js +260 -121
- package/dist/diff-ir.d.ts +28 -0
- package/dist/diff-ir.js +310 -0
- package/dist/docs/README.ko.md +8 -8
- package/dist/docs/README.md +8 -8
- package/dist/docs/catalog.json +44 -28
- package/dist/docs/concepts/judgment.ko.md +2 -2
- package/dist/docs/concepts/judgment.md +2 -2
- package/dist/docs/how-to/configure-project.ko.md +16 -16
- package/dist/docs/how-to/configure-project.md +15 -12
- package/dist/docs/how-to/connect-surfaces.ko.md +39 -34
- package/dist/docs/how-to/connect-surfaces.md +36 -33
- package/dist/docs/how-to/write-disciplines.ko.md +61 -6
- package/dist/docs/how-to/write-disciplines.md +62 -6
- package/dist/docs/index.json +607 -373
- package/dist/docs/reference/cli/covenant-check.ko.md +112 -65
- package/dist/docs/reference/cli/covenant-check.md +114 -59
- package/dist/docs/reference/cli/docs.ko.md +2 -2
- package/dist/docs/reference/cli/docs.md +2 -2
- package/dist/docs/reference/cli/explain.ko.md +14 -9
- package/dist/docs/reference/cli/explain.md +15 -10
- package/dist/docs/reference/cli/init.ko.md +52 -52
- package/dist/docs/reference/cli/init.md +43 -55
- package/dist/docs/reference/configuration/index.ko.md +171 -66
- package/dist/docs/reference/configuration/index.md +178 -71
- package/dist/docs/reference/packages/adapter-claude-code.ko.md +38 -11
- package/dist/docs/reference/packages/adapter-claude-code.md +38 -14
- package/dist/docs/reference/packages/adapter-grok.ko.md +77 -0
- package/dist/docs/reference/packages/adapter-grok.md +79 -0
- package/dist/docs/reference/packages/core.ko.md +49 -3
- package/dist/docs/reference/packages/core.md +54 -5
- package/dist/docs/reference/packages/polydeukes.ko.md +138 -77
- package/dist/docs/reference/packages/polydeukes.md +146 -81
- package/dist/docs/reference/packages/sdk-ts.ko.md +161 -0
- package/dist/docs/reference/packages/sdk-ts.md +164 -0
- package/dist/docs/troubleshooting.ko.md +17 -15
- package/dist/docs/troubleshooting.md +18 -14
- package/dist/docs/tutorials/first-judgment.ko.md +2 -2
- package/dist/docs/tutorials/first-judgment.md +2 -2
- package/dist/explain.d.ts +1 -1
- package/dist/explain.js +37 -22
- package/dist/load-config.d.ts +1 -1
- package/dist/load-config.js +1 -1
- package/dist/pre-state-reader.d.ts +1 -1
- package/dist/pre-state-reader.js +1 -1
- package/dist/scaffold-project.d.ts +2 -2
- package/dist/scaffold-project.js +9 -3
- package/dist/schema/polydeukes.schema.json +12 -0
- package/dist/worktree-reader.d.ts +19 -0
- package/dist/worktree-reader.js +30 -0
- package/package.json +3 -17
- package/dist/claude-code-hook.d.ts +0 -79
- package/dist/claude-code-hook.js +0 -372
- package/dist/claude-code.d.ts +0 -6
- package/dist/claude-code.js +0 -6
- package/dist/covenant-module.d.ts +0 -25
- package/dist/covenant-module.js +0 -42
- package/dist/docs/reference/packages/adapter-git.ko.md +0 -101
- package/dist/docs/reference/packages/adapter-git.md +0 -108
- package/dist/docs/reference/packages/covenant.ko.md +0 -115
- package/dist/docs/reference/packages/covenant.md +0 -123
- package/dist/index.d.ts +0 -22
- package/dist/index.js +0 -21
- package/dist/init-claude-code.d.ts +0 -52
- package/dist/init-claude-code.js +0 -586
- package/dist/init-grok.d.ts +0 -51
- package/dist/init-grok.js +0 -242
|
@@ -2,85 +2,82 @@
|
|
|
2
2
|
|
|
3
3
|
[English](./init.md) · **한국어**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
`pdks init`은 에이전트와 무관한 초기 파일을 만듭니다. 설정 파일과 텔레메트리 제외 항목
|
|
6
|
+
둘입니다. 이 명령은 어느 에이전트도 알지 못합니다. 세션 표면 등록은 그 에이전트의 어댑터가
|
|
7
|
+
맡는 별도 명령입니다. Claude Code는 `pdks-claude-code init`, Grok는 `pdks-grok init`입니다.
|
|
7
8
|
|
|
8
9
|
<a id="init-syntax"></a>
|
|
9
10
|
## 구문
|
|
10
11
|
|
|
11
12
|
```sh
|
|
12
|
-
pdks init
|
|
13
|
-
pdks init grok
|
|
13
|
+
pdks init
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
사전 검사에 실패하면 파일을 쓰지 않고 종료 코드 `2`를 반환합니다.
|
|
16
|
+
다른 인자를 주면 사용법을 출력하고 종료 코드 `2`를 반환합니다. 이미 있는 산출물은 보존하고
|
|
17
|
+
`skipped`로 보고하며, 사전 검사에 실패하면 파일을 쓰지 않고 종료 코드 `2`를 반환합니다.
|
|
18
18
|
|
|
19
19
|
<a id="init-common"></a>
|
|
20
|
-
##
|
|
20
|
+
## `pdks init` — 초기 파일
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
이 명령의 순서는 다음과 같습니다.
|
|
23
23
|
|
|
24
24
|
1. 대상 프로젝트에서 `polydeukes`를 찾을 수 있는지 확인합니다.
|
|
25
25
|
2. 공통 설정과 텔레메트리 제외 항목을 만듭니다.
|
|
26
|
-
3. 표면별 등록 파일을 추가합니다.
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
어느 표면이든 여기서 출발합니다.
|
|
28
|
+
|
|
29
|
+
- `polydeukes.config.yaml`
|
|
30
|
+
- `.gitignore`의 `.polydeukes/` 항목
|
|
31
|
+
|
|
32
|
+
설정 파일에는 언어 블록, 보호 목록, 증인(witness) 블록, 주석으로 된 규율(discipline) 예제가
|
|
33
|
+
있습니다. 완성된 정책이 아니라 프로젝트에 맞춰 고칠 출발점입니다.
|
|
31
34
|
|
|
32
35
|
<a id="init-claude-code"></a>
|
|
33
|
-
## `pdks
|
|
36
|
+
## Claude Code — `pdks-claude-code init`
|
|
37
|
+
|
|
38
|
+
Claude Code 세션 표면은
|
|
39
|
+
[`@polydeukes/adapter-claude-code`](../packages/adapter-claude-code.ko.md)가 설치합니다. 이
|
|
40
|
+
어댑터에는 자체 실행 파일이 있습니다.
|
|
34
41
|
|
|
35
|
-
|
|
42
|
+
```sh
|
|
43
|
+
npm install --save-dev polydeukes @polydeukes/adapter-claude-code
|
|
44
|
+
npx pdks-claude-code init
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
이 명령은 먼저 `pdks init`으로 초기 파일을 만든 뒤 Claude Code 등록 산출물을 씁니다.
|
|
36
48
|
|
|
37
49
|
- `.claude/hooks/covenant-pretooluse.mjs`
|
|
38
50
|
- `.claude/settings.json`
|
|
39
51
|
- `.claude/rules/polydeukes.md`
|
|
40
52
|
- `.claude/skills/discipline-draft/SKILL.md`
|
|
41
|
-
- `polydeukes.config.yaml`
|
|
42
|
-
- `.gitignore`
|
|
43
53
|
|
|
44
|
-
|
|
45
|
-
문서 안내 파일은 AI 파트너가 웹 검색 대신 `pdks docs`를 쓰도록 알려 줍니다.
|
|
46
|
-
스킬은 설명된 규율 문제를 설정 항목으로 바꾸는 절차를 제공합니다.
|
|
54
|
+
산출물별 동작은 [표면 연결하기](../../how-to/connect-surfaces.ko.md#claude-code)에 있습니다.
|
|
47
55
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
수도 있으므로 재실행이 언제나 아무것도 바꾸지 않는 것은 아닙니다.
|
|
56
|
+
<a id="init-grok"></a>
|
|
57
|
+
## Grok — `pdks-grok init`
|
|
51
58
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
Grok 세션 표면은
|
|
60
|
+
[`@polydeukes/adapter-grok`](../packages/adapter-grok.ko.md)가 설치합니다. 이
|
|
61
|
+
어댑터에는 자체 실행 파일이 있습니다.
|
|
55
62
|
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
```sh
|
|
64
|
+
npm install --save-dev polydeukes @polydeukes/adapter-grok
|
|
65
|
+
npx pdks-grok init
|
|
66
|
+
```
|
|
58
67
|
|
|
59
|
-
|
|
68
|
+
이 명령은 먼저 `pdks init`으로 초기 파일을 만든 뒤 Grok 등록 산출물을 씁니다.
|
|
60
69
|
|
|
61
70
|
- `.grok/hooks/covenant-pretooluse.mjs`
|
|
62
71
|
- `.grok/hooks/covenant-pretooluse.json`
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
- Claude 위임 훅이 이미 있으면 새 훅을 만들지 않고 Grok JSON에서 기존 파일을 지정합니다.
|
|
70
|
-
- 새 등록의 제한 시간은 60초입니다. Grok 호스트 기본값은 5초이며, 훅 실행이 시간 초과로
|
|
71
|
-
끝나면 해당 호출을 차단하지 않습니다(fail-open). Claude 설정에 같은 명령이 등록돼 있으면
|
|
72
|
-
Grok의 매칭 조건도 맞춰
|
|
73
|
-
명령과 조건이 모두 같게 만듭니다.
|
|
74
|
-
- 어느 설치기를 다시 실행하든, 설치기가 만든 Grok 훅 명령을 기존 Claude 파일로 바꾸고
|
|
75
|
-
매칭 조건을 맞출 수 있습니다. 사용자가 다른 곳을 지정한 명령은 그대로 두며 기존 제한
|
|
76
|
-
시간도 유지합니다.
|
|
77
|
-
- 나중에 Claude 설정을 제거했다면 Grok JSON을 다시 만들어 Grok 기본 매칭 조건을 복원하세요.
|
|
78
|
-
사용자 설정부터 백업해야 합니다. 변경 뒤에는 Grok의 Hooks 탭을 다시 불러오거나 새 세션을
|
|
79
|
-
시작합니다.
|
|
80
|
-
|
|
81
|
-
Grok는 Claude 세션 증인 밸브가 요구하는 인간 메시지 증거를 제공하지 않습니다.
|
|
72
|
+
|
|
73
|
+
`.claude/` 파일을 만들거나 고치지 않습니다. 새 등록의 제한 시간은 60초입니다. Grok 호스트
|
|
74
|
+
기본값은 5초이며, 훅 실행이 시간 초과로 끝나면 해당 호출을 차단하지 않습니다(fail-open).
|
|
75
|
+
두 세션 어댑터를 한 프로젝트에 함께 설치하면 호출마다 판정기가 두 번 실행될 수 있습니다.
|
|
76
|
+
|
|
77
|
+
Grok는 Claude 세션 증인(witness) 밸브가 요구하는 인간 메시지 증거를 제공하지 않습니다.
|
|
82
78
|
대화 기록은 Claude JSONL이 아니라 ACP `updates.jsonl`입니다.
|
|
83
|
-
[Grok 복구 안내](../../troubleshooting.ko.md#grok-witness)를 참고하세요.
|
|
79
|
+
[Grok 복구 안내](../../troubleshooting.ko.md#grok-witness)를 참고하세요. 산출물별 동작은
|
|
80
|
+
[표면 연결하기](../../how-to/connect-surfaces.ko.md#grok)에 있습니다.
|
|
84
81
|
|
|
85
82
|
<a id="init-results"></a>
|
|
86
83
|
## 결과와 실패 조건
|
|
@@ -103,16 +100,19 @@ Grok는 Claude 세션 증인 밸브가 요구하는 인간 메시지 증거를
|
|
|
103
100
|
## 예제
|
|
104
101
|
|
|
105
102
|
```sh
|
|
106
|
-
pdks init
|
|
107
|
-
pdks init
|
|
103
|
+
pdks init
|
|
104
|
+
npx pdks-claude-code init
|
|
105
|
+
npx pdks-grok init
|
|
108
106
|
```
|
|
109
107
|
|
|
110
|
-
설치기는 CLI 명령입니다. `polydeukes
|
|
111
|
-
아닙니다.
|
|
108
|
+
설치기는 CLI 명령입니다. `polydeukes` 계약의 공개 심볼이 아닙니다.
|
|
112
109
|
|
|
113
110
|
<a id="init-see-also"></a>
|
|
114
111
|
## 함께 보기
|
|
115
112
|
|
|
113
|
+
- [`@polydeukes/adapter-claude-code`](../packages/adapter-claude-code.ko.md) — Claude Code 설치
|
|
114
|
+
단위와 그 실행 파일
|
|
115
|
+
- [`@polydeukes/adapter-grok`](../packages/adapter-grok.ko.md) — Grok 설치 단위와 그 실행 파일
|
|
116
116
|
- [`pdks docs`](./docs.ko.md)
|
|
117
117
|
- [`pdks explain`](./explain.ko.md)
|
|
118
118
|
- [설정 참조](../configuration/index.ko.md)
|
|
@@ -2,31 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [한국어](./init.ko.md)
|
|
4
4
|
|
|
5
|
-
`pdks init`
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
`pdks init` creates the agent-neutral project scaffold: the config file and the telemetry ignore
|
|
6
|
+
line. It knows no agent. Registering a session surface is a separate command owned by that
|
|
7
|
+
agent's adapter — `pdks-claude-code init` for Claude Code, and `pdks-grok init` for Grok.
|
|
8
8
|
|
|
9
9
|
<a id="init-syntax"></a>
|
|
10
10
|
## Syntax
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
|
-
pdks init
|
|
14
|
-
pdks init grok
|
|
13
|
+
pdks init
|
|
15
14
|
```
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
failure writes nothing and exits `2`.
|
|
16
|
+
Any other argument prints usage and exits `2`. The command is idempotent: existing artifacts are
|
|
17
|
+
left in place and reported as skipped, and a preflight failure writes nothing and exits `2`.
|
|
19
18
|
|
|
20
19
|
<a id="init-common"></a>
|
|
21
|
-
##
|
|
20
|
+
## `pdks init` — the scaffold
|
|
22
21
|
|
|
23
|
-
The
|
|
22
|
+
The command does two things in order:
|
|
24
23
|
|
|
25
24
|
1. Resolve `polydeukes` from the target project.
|
|
26
25
|
2. Create the shared project-side scaffold: config and telemetry ignore line.
|
|
27
|
-
3. Add the surface-specific registration artifacts.
|
|
28
26
|
|
|
29
|
-
The
|
|
27
|
+
The scaffold is the same one every surface starts from:
|
|
30
28
|
|
|
31
29
|
- `polydeukes.config.yaml`
|
|
32
30
|
- `.gitignore` with `.polydeukes/`
|
|
@@ -35,64 +33,51 @@ The config file starts with the language block, a protection list, a witness blo
|
|
|
35
33
|
discipline examples. It is a starter policy, not a complete project policy.
|
|
36
34
|
|
|
37
35
|
<a id="init-claude-code"></a>
|
|
38
|
-
## `pdks
|
|
36
|
+
## Claude Code — `pdks-claude-code init`
|
|
39
37
|
|
|
40
|
-
|
|
38
|
+
The Claude Code session surface is installed by
|
|
39
|
+
[`@polydeukes/adapter-claude-code`](../packages/adapter-claude-code.md), which ships its own bin:
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
```sh
|
|
42
|
+
npm install --save-dev polydeukes @polydeukes/adapter-claude-code
|
|
43
|
+
npx pdks-claude-code init
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
That command runs `pdks init` for the scaffold, then writes the Claude Code registration
|
|
47
|
+
artifacts:
|
|
43
48
|
|
|
44
49
|
- `.claude/hooks/covenant-pretooluse.mjs`
|
|
45
50
|
- `.claude/settings.json`
|
|
46
51
|
- `.claude/rules/polydeukes.md`
|
|
47
52
|
- `.claude/skills/discipline-draft/SKILL.md`
|
|
48
|
-
- `polydeukes.config.yaml`
|
|
49
|
-
- `.gitignore`
|
|
50
|
-
|
|
51
|
-
What each artifact does:
|
|
52
|
-
|
|
53
|
-
- The hook file is a delegator that imports `polydeukes/claude-code`.
|
|
54
|
-
- The settings file merges a PreToolUse registration instead of replacing the whole file.
|
|
55
|
-
- The discovery file tells the AI partner to use `pdks docs` instead of web search.
|
|
56
|
-
- The skill file turns a described discipline problem into a config entry.
|
|
57
|
-
- The config and ignore line come from the shared scaffold.
|
|
58
53
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Grok registration as described below; it is not an unconditional no-op.
|
|
62
|
-
|
|
63
|
-
Package upgrades do not overwrite a customized skill. Generate a fresh copy in a disposable
|
|
64
|
-
project, compare it with the existing file, and merge the selected changes after taking a backup.
|
|
65
|
-
Do not delete the working project's skill merely to force regeneration.
|
|
54
|
+
Details and the per-artifact behaviour are in
|
|
55
|
+
[Connect the surfaces](../../how-to/connect-surfaces.md#claude-code).
|
|
66
56
|
|
|
67
57
|
<a id="init-grok"></a>
|
|
68
|
-
## `pdks init
|
|
58
|
+
## Grok — `pdks-grok init`
|
|
59
|
+
|
|
60
|
+
The Grok session surface is installed by
|
|
61
|
+
[`@polydeukes/adapter-grok`](../packages/adapter-grok.md), which ships its own bin:
|
|
69
62
|
|
|
70
|
-
|
|
63
|
+
```sh
|
|
64
|
+
npm install --save-dev polydeukes @polydeukes/adapter-grok
|
|
65
|
+
npx pdks-grok init
|
|
66
|
+
```
|
|
71
67
|
|
|
72
|
-
|
|
68
|
+
That command runs `pdks init` for the scaffold, then writes the Grok registration artifacts:
|
|
73
69
|
|
|
74
70
|
- `.grok/hooks/covenant-pretooluse.mjs`
|
|
75
71
|
- `.grok/hooks/covenant-pretooluse.json`
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
- It does not create `.claude/` files.
|
|
82
|
-
- It writes a Grok hook JSON registration instead of `.claude/settings.json`.
|
|
83
|
-
- If a Claude delegator already exists, the Grok JSON names it instead of creating another
|
|
84
|
-
delegator.
|
|
85
|
-
- Generated registrations use a timeout of 60 seconds. The Grok host default is 5 seconds, and a
|
|
86
|
-
timed-out hook fails open. When Claude settings register the same command, the Grok matcher
|
|
87
|
-
follows that registration so command and matcher agree.
|
|
88
|
-
- Re-running either installer can retarget a generated Grok-delegator command to the existing
|
|
89
|
-
Claude file and reconcile its matcher. A custom command is left alone; an existing timeout stays.
|
|
90
|
-
- If you later remove Claude settings, regenerate the Grok JSON to restore the Grok-native matcher.
|
|
91
|
-
Back up custom settings first. Reload Grok's Hooks tab or start a new session after changes.
|
|
72
|
+
|
|
73
|
+
It does not create or rewrite `.claude/` files. Generated registrations use a timeout of 60
|
|
74
|
+
seconds. The Grok host default is 5 seconds, and a timed-out hook fails open. Installing both
|
|
75
|
+
session adapters in one project can run the judge twice per call.
|
|
92
76
|
|
|
93
77
|
Grok does not supply the human-message evidence required by the Claude session witness valve.
|
|
94
78
|
The session log is ACP `updates.jsonl`, not Claude's JSONL.
|
|
95
|
-
See [Grok recovery](../../troubleshooting.md#grok-witness).
|
|
79
|
+
See [Grok recovery](../../troubleshooting.md#grok-witness). Details are in
|
|
80
|
+
[Connect the surfaces](../../how-to/connect-surfaces.md#grok).
|
|
96
81
|
|
|
97
82
|
<a id="init-results"></a>
|
|
98
83
|
## Results and failure conditions
|
|
@@ -114,16 +99,19 @@ filesystem problem, and rerun rather than assuming every failed installation lef
|
|
|
114
99
|
## Examples
|
|
115
100
|
|
|
116
101
|
```sh
|
|
117
|
-
pdks init
|
|
118
|
-
pdks init
|
|
102
|
+
pdks init
|
|
103
|
+
npx pdks-claude-code init
|
|
104
|
+
npx pdks-grok init
|
|
119
105
|
```
|
|
120
106
|
|
|
121
|
-
The
|
|
122
|
-
`polydeukes/claude-code` contract.
|
|
107
|
+
The installers are CLI commands. They are not symbols on the `polydeukes` contract.
|
|
123
108
|
|
|
124
109
|
<a id="init-see-also"></a>
|
|
125
110
|
## See also
|
|
126
111
|
|
|
112
|
+
- [`@polydeukes/adapter-claude-code`](../packages/adapter-claude-code.md) — the Claude Code
|
|
113
|
+
install unit and its bin.
|
|
114
|
+
- [`@polydeukes/adapter-grok`](../packages/adapter-grok.md) — the Grok install unit and its bin.
|
|
127
115
|
- [`pdks docs`](../packages/polydeukes.md#polydeukes-bin) — the installed documentation reader lives
|
|
128
116
|
in the same package.
|
|
129
117
|
- [`pdks explain`](./explain.md)
|
|
@@ -53,61 +53,34 @@ protectedPaths:
|
|
|
53
53
|
|
|
54
54
|
```yaml
|
|
55
55
|
adapters:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
protectedPaths:
|
|
59
|
-
- 'packages/core/src'
|
|
56
|
+
example:
|
|
57
|
+
someKey: '예시 어댑터가 정의하는 값'
|
|
60
58
|
```
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
차단합니다(exit 2). 보호 경로와 `enforce: block`으로 승격한 항목이 여기에 해당합니다.
|
|
72
|
-
일반 항목은 이 설정 아래에서도 자체 기본값 `advise`를 유지합니다(아래 `enforce` 참조). 통과하는
|
|
73
|
-
길은 증인(witness) 밸브뿐입니다. 사람이 TTY 프롬프트에 토큰 전체를 입력해야 하고,
|
|
74
|
-
프롬프트는 무엇을 증언하는지 적습니다. 깨진 등록과 걸린 항목, 그리고 이 한 번의 답이
|
|
75
|
-
커밋 전체를 덮는다는 사실입니다.
|
|
76
|
-
네임스페이스가 없어도, `adapters` 맵이 없어도, `enforce` 키가 없어도 전부 `block`으로
|
|
77
|
-
동작합니다. 키를 적지 않는 것이 곧 가장 엄격한 강제 수준의 선택입니다.
|
|
78
|
-
- **`advise`**는 커밋 표면에서 위반을 기록하되 작업을 차단하지 않게 합니다. 스테이징 변경에 내려진 판정은
|
|
79
|
-
`advised` 텔레메트리 이벤트로 기록되고 커밋은 진행되며(exit 0), stderr에 권고 한 줄이
|
|
80
|
-
남습니다. TTY 프롬프트는 표시하지 않습니다. 판정 기준은 유지하되 위반 시 차단하지 않는 것입니다. 판정 자체가
|
|
81
|
-
불가능한 실행(설정 없음·무효, 판정 본체 해석 불가)은 어느 강제 수준에서든 exit 2로
|
|
82
|
-
차단합니다.
|
|
83
|
-
|
|
84
|
-
**여기의 `protectedPaths`는 가산 범위입니다.** 커밋 표면은 최상위 `protectedPaths`와 이
|
|
85
|
-
목록의 합집합을 판정합니다. 공통 목록을 앞에 두고 이어 붙여 하나로 정규화하므로 철자와
|
|
86
|
-
중복 제거 규칙이 양쪽에 동일하게 적용됩니다. 세션 표면은 이 목록을 읽지 않습니다. 이
|
|
87
|
-
목록에는 세션에서 편집해도 되지만 커밋할 때는 보호해야 하는 경로를 적습니다. 판정기 소스를 여기에 둘 수 있습니다. 강제
|
|
88
|
-
수준과 마찬가지로 추가 범위도 관측자가 정합니다. 공통 목록에서 경로를 빼는 설정은 없습니다.
|
|
89
|
-
이 목록으로 보호 범위를 넓힐 수는 있지만 기존 범위를 줄일 수는 없습니다.
|
|
90
|
-
|
|
91
|
-
세션 표면(편집 시점 훅)에는 강제 수준 설정이 없습니다. 그곳에서 차단하는 것은 판정 사슬
|
|
60
|
+
**`protectedPaths`는 두 표면이 함께 쓰는 목록 하나입니다.** 변경 집합 표면에만 더해지는 목록도,
|
|
61
|
+
설정의 표면 단위 강제 수준 키도 없습니다. 변경 집합 표면은 세션 표면과 같은 정규화 목록을
|
|
62
|
+
판정합니다. 위반은 세션 표면에서 종료 코드 2이고, 변경 집합 표면에서는 검사를 `--enforce block`으로
|
|
63
|
+
실행하지 않는 한 종료 코드 0에 `advised`로 기록됩니다. 판정기가 내는 것은 그 종료 코드뿐이며
|
|
64
|
+
커밋을 멈출지는 사용자의 훅 배선이 정합니다. 그래서 텔레메트리 행은 판정 결과만 기록하고
|
|
65
|
+
커밋이 진행됐는지는 기록하지 않습니다. 훅 배선이 종료 코드를 무시해 커밋이 진행돼도
|
|
66
|
+
`blocked` 행은 그대로 남습니다.
|
|
67
|
+
|
|
68
|
+
세션 표면(편집 시점 훅)에도 강제 수준 설정이 없습니다. 그곳에서 차단하는 것은 판정 사슬
|
|
92
69
|
자신의 보호입니다. 도구 축과 셸 축의 `protectedPaths` 변경과 언급, 세션 대화 기록, 판정할
|
|
93
70
|
수 없는 조립(설정 없음·무효, 빌드되지 않은 판정기, 파싱할 수 없는 페이로드, 답하지 못한
|
|
94
71
|
라우팅), 그리고 `enforce: block`으로 승격한 항목입니다. 그 밖의 모든 규율 항목은
|
|
95
72
|
위반 시 `advised`로 기록합니다.
|
|
96
73
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
`
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
세션 표면이 읽을 대화 기록을 갖지 못했을 때의 처분과 같습니다. 다만 그 선언의 `supply`가
|
|
109
|
-
`pass`일 때입니다. 정책이 없으면 없는 소스는 판정 불가(exit 2)이지, 자동 건너뛰기가
|
|
110
|
-
아닙니다.
|
|
74
|
+
**선언은 자기 통로를 관측하는 표면에만 닿습니다.** 대화 기록(transcript)을 읽는 선언은
|
|
75
|
+
`sessionDisciplines`에 적히고 변경 집합에 대해서는 컴파일되지 않으며, `changes`를 읽는 선언은
|
|
76
|
+
`changeSetDisciplines`에 적히고 호출 하나에 대해서는 컴파일되지 않습니다. 세 목록과 항목을
|
|
77
|
+
그중 하나에 놓는 규칙은 [규율 목록 셋](#three-lists)에 있습니다.
|
|
78
|
+
|
|
79
|
+
표면이 등록은 하되 호스트가 증명하지 못하는 통로는 여전히 선언의 `supply` 정책이 처리합니다.
|
|
80
|
+
세션을 싣지 않는 호스트(Grok 어댑터)에서는 `sources: { session: { transcript: true } }` 항목의
|
|
81
|
+
소스가 없는 상태가 되고, `supply: { session: 'pass' }`가 사유 `supply-pass`와 함께 `skipped`를
|
|
82
|
+
기록하며 호출을 지나가게 합니다. 이 정책이 없으면 없는 소스는 판정 불가(exit 2)이지 자동
|
|
83
|
+
건너뛰기가 아닙니다.
|
|
111
84
|
|
|
112
85
|
<a id="telemetry"></a>
|
|
113
86
|
## `telemetry`
|
|
@@ -174,10 +147,136 @@ covenant witness
|
|
|
174
147
|
AI도 증언을 위조할 수 없습니다. 증언으로 통과한 판정은 조용히 사라지지 않고 `witnessed`로
|
|
175
148
|
기록됩니다.
|
|
176
149
|
|
|
150
|
+
<a id="three-lists"></a>
|
|
151
|
+
## 규율 목록 셋
|
|
152
|
+
|
|
153
|
+
규율은 세 목록 가운데 하나에 적으며, 어느 목록인지는 저자가 고르는 것이 아니라 선언 자체가
|
|
154
|
+
정하는 사실입니다. 선언은 자기가 읽는 증거 통로(channel)를 문법 안에서 이름 짓고, 표면마다
|
|
155
|
+
관측하는 통로가 다르므로, 목록은 그 통로에서 따라 나옵니다.
|
|
156
|
+
|
|
157
|
+
| 목록 | 판정하는 표면 | 그 목록의 선언이 읽는 것 |
|
|
158
|
+
|---|---|---|
|
|
159
|
+
| `disciplines` | 두 표면 모두 | 변경된 파일 자신(`target.path` · `pre` · `post` · `state`)과 `file` 소스뿐입니다. 초안(draft)도 여기에 적습니다 |
|
|
160
|
+
| `sessionDisciplines` | 세션 표면(session surface)만 | `command` · `transcript` · `sidecar` 통로 · `actor` 가운데 하나 이상을 읽고 `changes`는 읽지 않습니다 |
|
|
161
|
+
| `changeSetDisciplines` | 변경 집합 표면(change-set surface)만 | `changes`를 읽고 세션 통로는 읽지 않습니다 |
|
|
162
|
+
|
|
163
|
+
세션 표면은 호스트가 실행 전에 관측한 호출 하나입니다. 어댑터 훅이거나, 입력 IR로 SDK를
|
|
164
|
+
부르는 프로그램입니다. 이 표면은 명령줄과 대화 기록(transcript), 스폰 기록 통로, 주체(actor)를
|
|
165
|
+
싣고 끝난 변경 집합은 싣지 않습니다. 변경 집합 표면은 어떤 생산자가 끝낸 변경 집합을 판정하는
|
|
166
|
+
`pdks covenant check --diff`입니다. 이 표면은 `changes`를 싣고 명령줄과 대화 기록과 주체는
|
|
167
|
+
싣지 않습니다.
|
|
168
|
+
|
|
169
|
+
<a id="channel-to-list"></a>
|
|
170
|
+
### 통로와 목록의 대응
|
|
171
|
+
|
|
172
|
+
통로마다 선언에 나타나는 구문 자리가 정해져 있고, 로더는 그 자리를 읽어 목록을 유도합니다.
|
|
173
|
+
|
|
174
|
+
| 통로 | 선언에 나타나는 모양 | 목록 |
|
|
175
|
+
|---|---|---|
|
|
176
|
+
| `transcript` | `sources: { session: { transcript: true } }` | `sessionDisciplines` |
|
|
177
|
+
| `channel` | `sources: { spawns: { sidecar: true } }` | `sessionDisciplines` |
|
|
178
|
+
| `command` | `scope: { source: 'command' }`, 또는 어느 파이프라인의 `{ op: 'source', of: 'command' }` | `sessionDisciplines` |
|
|
179
|
+
| `actor` | 어느 파이프라인의 `{ op: 'source', of: 'actor' }` | `sessionDisciplines` |
|
|
180
|
+
| `changes` | 어느 파이프라인의 `{ op: 'source', of: 'changes' }` | `changeSetDisciplines` |
|
|
181
|
+
| 다섯 가운데 없음 | 선언이 변경된 파일과 `file` 소스만 읽습니다 | `disciplines` |
|
|
182
|
+
|
|
183
|
+
`witness` 블록 자신의 `extract`도 본체와 함께 훑으므로, 대화 기록을 읽는 밸브가 달린 항목은
|
|
184
|
+
다른 대화 기록 독자와 마찬가지로 `sessionDisciplines`에 들어갑니다.
|
|
185
|
+
|
|
186
|
+
<a id="placement-rule"></a>
|
|
187
|
+
### 배치 규칙
|
|
188
|
+
|
|
189
|
+
`disciplines`에는 다섯 통로를 하나도 묶지 않는 항목과 초안 전부가 들어갑니다.
|
|
190
|
+
`sessionDisciplines`에는 세션 통로를 하나 이상 묶고 `changes`는 묶지 않는 항목이 들어갑니다.
|
|
191
|
+
`changeSetDisciplines`에는 `changes`를 묶고 세션 통로는 묶지 않는 항목이 들어갑니다. 그 밖은
|
|
192
|
+
로드 시점에 두 표면 모두에서 `ConfigValidationError`이고, 메시지가 항목과 그 항목이 읽는
|
|
193
|
+
통로와 가야 할 목록을 함께 댑니다.
|
|
194
|
+
|
|
195
|
+
```text
|
|
196
|
+
disciplines[7] ('merge-is-the-users-call') reads transcript, command: it belongs in sessionDisciplines
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
댈 행선지가 없는 모양이 둘 있습니다. `changes`와 세션 통로를 함께 묶는 선언은 어느 표면도
|
|
200
|
+
그 둘을 한 번에 관측하지 못하므로 그대로 거부됩니다.
|
|
201
|
+
|
|
202
|
+
```text
|
|
203
|
+
sessionDisciplines[2] ('pairs-across-a-session') reads transcript, changes: no surface observes both changes and a session channel
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
초안은 선언을 갖지 않아 아무 통로도 묶지 않으므로 `disciplines`에 속하고, 표면 목록 어느
|
|
207
|
+
쪽에 적은 초안이든 `a draft belongs in disciplines`로 거부됩니다.
|
|
208
|
+
|
|
209
|
+
항목 id는 세 목록과 메타 약속 라벨 셋(`self-mod` · `shell-mod` · `transcript-mod`)에 걸쳐
|
|
210
|
+
유일합니다. 텔레메트리 라벨 공간이 하나이고, `pdks explain`을 비롯한 라벨 기준 판독기는
|
|
211
|
+
라벨만으로 항목을 찾기 때문입니다.
|
|
212
|
+
|
|
213
|
+
<a id="lists-in-practice"></a>
|
|
214
|
+
### 표면마다 무엇을 컴파일하는가
|
|
215
|
+
|
|
216
|
+
표준 입력으로 입력 IR을 읽는 `pdks covenant check`는 `disciplines` 다음에
|
|
217
|
+
`sessionDisciplines`를 컴파일하고, 같은 명령에 `--diff`를 주면 `disciplines` 다음에
|
|
218
|
+
`changeSetDisciplines`를 컴파일합니다. `pdks explain`은 두 표면을 모두 출력하며 표면
|
|
219
|
+
머리줄에 각 목록의 이름과 개수를 적으므로, 판정을 돌리지 않고도 모든 항목의 배치를 읽을 수
|
|
220
|
+
있습니다. 이 저장소의 실제 설정은 `disciplines`에 판정 항목 11개와 초안 1개,
|
|
221
|
+
`sessionDisciplines`에 13개, `changeSetDisciplines`에 1개(`docs-stay-bilingual`)를 두므로,
|
|
222
|
+
세션 표면에 등록 24개, 변경 집합 표면에 12개가 섭니다.
|
|
223
|
+
|
|
224
|
+
```yaml
|
|
225
|
+
disciplines: # 두 표면 모두
|
|
226
|
+
- id: 'covenant-vocabulary'
|
|
227
|
+
declare:
|
|
228
|
+
mechanism: 'added-only'
|
|
229
|
+
scope: { source: 'target.path', include: ['^packages/'] }
|
|
230
|
+
supply: { pre: 'empty', post: 'empty' }
|
|
231
|
+
extract:
|
|
232
|
+
before: [{ op: 'source', of: 'pre' }, { op: 'lines' }]
|
|
233
|
+
after: [{ op: 'source', of: 'post' }, { op: 'lines' }]
|
|
234
|
+
added: [{ op: 'onlyIn', of: 'after', notIn: 'before' }]
|
|
235
|
+
relate:
|
|
236
|
+
- { id: 'nothing-added', relation: { op: 'empty', of: 'added' }, message: 'adds {value}' }
|
|
237
|
+
|
|
238
|
+
sessionDisciplines: # 세션 표면만. command를 읽습니다
|
|
239
|
+
- id: 'pnpm-only'
|
|
240
|
+
declare:
|
|
241
|
+
mechanism: 'forbidden-command'
|
|
242
|
+
scope: { source: 'command' }
|
|
243
|
+
extract:
|
|
244
|
+
hits:
|
|
245
|
+
- { op: 'source', of: 'command' }
|
|
246
|
+
- { op: 'lines' }
|
|
247
|
+
- { op: 'matches', re: '\bnpm install\b' }
|
|
248
|
+
relate:
|
|
249
|
+
- { id: 'no-npm', relation: { op: 'empty', of: 'hits' }, message: '{value}' }
|
|
250
|
+
|
|
251
|
+
changeSetDisciplines: # 변경 집합 표면만. changes를 읽습니다
|
|
252
|
+
- id: 'docs-stay-bilingual'
|
|
253
|
+
declare:
|
|
254
|
+
mechanism: 'companion'
|
|
255
|
+
scope: { source: 'target.path', include: ['\.md$'] }
|
|
256
|
+
extract:
|
|
257
|
+
en:
|
|
258
|
+
- { op: 'source', of: 'target.path' }
|
|
259
|
+
- { op: 'keyByPattern', re: '^(.+?)(?<!\.ko)\.md$' }
|
|
260
|
+
koChanged:
|
|
261
|
+
- { op: 'source', of: 'changes' }
|
|
262
|
+
- { op: 'items' }
|
|
263
|
+
- { op: 'keyByPattern', re: '^(.+)\.ko\.md$' }
|
|
264
|
+
relate:
|
|
265
|
+
- id: 'ko-follows'
|
|
266
|
+
relation: { op: 'implies', of: 'en', requires: 'koChanged' }
|
|
267
|
+
message: '{value} changed without {key}.ko.md'
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
항목을 다른 목록으로 옮기는 것이 편집의 전부입니다. 옮겨도 항목 본문은 그대로이고, 새 자리가
|
|
271
|
+
맞는지는 로더가 답합니다.
|
|
272
|
+
|
|
177
273
|
<a id="disciplines"></a>
|
|
178
274
|
## `disciplines`
|
|
179
275
|
|
|
180
|
-
선택 항목입니다. 팀이 함께 지킬 규율을 항목마다 하나씩 데이터로 선언합니다.
|
|
276
|
+
선택 항목입니다. 팀이 함께 지킬 규율을 항목마다 하나씩 데이터로 선언합니다. 이 절의 내용은
|
|
277
|
+
세 목록 어디에 적힌 항목에도 그대로 적용되며, 항목을 어느 목록에 적는지는
|
|
278
|
+
[배치 규칙](#placement-rule)이 정합니다. `sessionDisciplines`와 `changeSetDisciplines`는
|
|
279
|
+
초안 형태를 뺀 나머지에서 `disciplines`와 같은 항목 모양을 받습니다.
|
|
181
280
|
판정 항목은 `declare` 블록(유일한 판정 형태로, 범위(`scope`)를 블록 안에 지니는 선언)과
|
|
182
281
|
`id`(텔레메트리 라벨)를 가지며, 선택적으로 `why`(에이전트가 읽는 차단 메시지에 함께 실리는
|
|
183
282
|
이유)와 `enforce` 강제 수준을 가집니다. 닫힌 키 집합은 `id` · `why` · `enforce` · `declare`이고
|
|
@@ -208,10 +307,10 @@ disciplines:
|
|
|
208
307
|
**`enforce`는 항목 자신의 강제 수준입니다.** 판정 항목에 선택적으로 쓸 수 있으며 값은
|
|
209
308
|
`block` 또는 `advise`입니다. **적지 않으면 `advise`입니다.** `advise`에서는 위반이
|
|
210
309
|
`advised` 텔레메트리 이벤트로 기록되고 호출은 진행되며(exit 0), 위반 메시지는 그대로
|
|
211
|
-
stderr에 쓰입니다. `block`을 지정하면 항목의 강제 수준을 차단으로 승격합니다.
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
310
|
+
stderr에 쓰입니다. `block`을 지정하면 항목의 강제 수준을 차단으로 승격합니다. 설정에는
|
|
311
|
+
표면 단위 강제 수준이 없으므로 항목이 선언한 수준이 설정 쪽 판단의 전부입니다. 적지 않거나 `advise`면
|
|
312
|
+
두 표면에서 `advised`이고, `block`이면 세션 표면과 `--enforce block`으로 실행한 커밋 검사에서
|
|
313
|
+
종료 코드 2입니다(변경 집합 표면의 기본 자세는 모든 판정에 대해 advise입니다).
|
|
215
314
|
판정할 수 없는 본체(빌드되지 않음, 적재 불가)는 강제 수준과 무관하게 차단됩니다. 초안(draft)은 `enforce`를 갖지 않고, 그 밖의
|
|
216
315
|
값은 로드 시점에 거부됩니다. `pdks explain`은 항목이 선언한 강제 수준(`enforce: block` 또는
|
|
217
316
|
`enforce: advise`)를 두 표면 모두에 표시하고 적지 않은 항목은 표시하지 않습니다. 세션
|
|
@@ -297,7 +396,13 @@ disciplines:
|
|
|
297
396
|
남긴 뒤, 결과가 `empty`이기를 요구합니다. 범위를 `command`에 걸어 셸 호출만 받아들이게
|
|
298
397
|
합니다. Edit에는 명령줄이 없고, 세계에 없는 소스를 읽는 선언은 판정 불가이기 때문입니다.
|
|
299
398
|
여러 줄 명령은 줄 단위로 판정하므로 `^`는 줄의 시작을 뜻하고, 줄 경계를 걸치는 패턴은
|
|
300
|
-
일치하지 않습니다.
|
|
399
|
+
일치하지 않습니다. heredoc 본문과 herestring 단어는 소스에 들어가지 않습니다. bash는 그
|
|
400
|
+
바이트를 실행하지 않고 명령에 stdin 데이터로 넘기므로, 그 안에 인용된 금지 토큰은 일치하지
|
|
401
|
+
않고, 그 데이터가 파일 쓰기가 되는지는 셸 증거 경로가 따로 판정합니다. bash가 먼저 확장하는
|
|
402
|
+
텍스트는 소스에 남습니다. 인용하지 않은 구분자 아래에서 `$`나 백틱을 담은 본문, 치환을 담은
|
|
403
|
+
herestring 단어가 그것이고, 토크나이저가 끝까지 읽지 못한 줄도 그대로 남습니다. 받는 명령이
|
|
404
|
+
stdin으로 무엇을 하는지는 판정하지 않습니다. 해석기에 넘긴 스크립트는 bash에게는 데이터이고
|
|
405
|
+
해석기에게는 프로그램입니다.
|
|
301
406
|
|
|
302
407
|
```yaml
|
|
303
408
|
- id: 'hooks-stay-armed'
|
|
@@ -322,8 +427,9 @@ disciplines:
|
|
|
322
427
|
`select`가 명령줄을 추출하고, `matches`가 요구된 명령을 찾습니다. 판정은 `nonEmpty`입니다.
|
|
323
428
|
약속(covenant)이 차단한 호출, 사람이 거부한 호출, 그냥 실패한 호출은 선행 증거가 아닙니다.
|
|
324
429
|
패턴은 명령줄의 어느 위치에서든 일치 여부를 찾으므로, 명령을 언급만 한 줄도 증거로 셉니다. 선언된
|
|
325
|
-
한계입니다. `supply: { session: 'pass' }
|
|
326
|
-
`
|
|
430
|
+
한계입니다. `supply: { session: 'pass' }`는 세션을 증명하지 못하는 호스트에서 없는 세션을 처리하는
|
|
431
|
+
값입니다. 대화 기록을 읽는 항목은 `sessionDisciplines`에 적히므로 변경 집합은 그 항목을 아예
|
|
432
|
+
컴파일하지 않습니다.
|
|
327
433
|
|
|
328
434
|
```yaml
|
|
329
435
|
- id: 'dependency-needs-npm-view'
|
|
@@ -392,14 +498,13 @@ disciplines:
|
|
|
392
498
|
관측 하나가 **세계(world)** 하나로 판정되며 소스 이름은 일곱입니다. `target.path`(저장소
|
|
393
499
|
상대 경로), `pre`와 `post`(변경이 지닌 쪽의 파일 본문. 생성에는 `pre`가, 삭제에는 `post`가
|
|
394
500
|
없습니다), `state`(`{ pre, post }`, 수정에만 있습니다), `changes`(이 관측이 바꾸는 경로 전부.
|
|
395
|
-
세션 표면에서는 호출 하나,
|
|
501
|
+
세션 표면에서는 호출 하나, 변경 집합 표면에서는 staged 집합 전체), 그리고 `command`(셸 호출의
|
|
396
502
|
명령줄. 셸 호출에만 있고, 파일을 바꾸지 않는 셸 호출은 자기 세계 하나가 되므로 `command`에
|
|
397
503
|
범위를 건 선언은 그 호출을 보고 `target.path`에 범위를 건 선언은 보지 않습니다). `changes`를
|
|
398
|
-
읽는 선언은 변경 집합 전체를 관측하는 표면에서만
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
advised로 남습니다. 대상 밖 파일이 필요한 선언은
|
|
504
|
+
읽는 선언은 `changeSetDisciplines`에 적히고 변경 집합 전체를 관측하는 표면에서만
|
|
505
|
+
컴파일됩니다. 호출 하나는 쌍의 나머지 반쪽을 실을 수 없기 때문입니다. 이 저장소의 라이브
|
|
506
|
+
설정은 그런 선언 하나를 싣습니다. `docs-stay-bilingual`은 `.md`/`.ko.md` 쌍 위의 `implies`이고,
|
|
507
|
+
한쪽만 staged된 변경 집합 표면에서 advised로 남습니다. 대상 밖 파일이 필요한 선언은
|
|
403
508
|
`sources` 블록에 이름을 붙이고(`sources: { en: { file: 'locales/en.json' } }`) `{ op:
|
|
404
509
|
'source', of: 'en' }`로 읽습니다. 경로는 저장소 상대(선두 `/` 없음, `..` 세그먼트 없음)이고
|
|
405
510
|
이름은 일곱 고정 이름과 겹칠 수 없습니다. 파일은 표면이 트리를 관측하는 방식대로
|
|
@@ -408,15 +513,15 @@ advised로 남습니다. 대상 밖 파일이 필요한 선언은
|
|
|
408
513
|
`sources: { spawns: { sidecar: true } }`는 경로가 아니라 세션의 스폰 기록 채널을 이름
|
|
409
514
|
붙입니다 — 호스트가 대화 기록(transcript) 옆에 남기는 서브에이전트 기록을 JSON 배열
|
|
410
515
|
하나로 공급받습니다. 채널이 어디 있는지는 표면이 아는 사실이라 값은 표지 `true`이고,
|
|
411
|
-
세션이 없는
|
|
516
|
+
세션이 없는 변경 집합 표면에서는 채널이 언제나 없습니다. 셋째 종류
|
|
412
517
|
`sources: { session: { transcript: true } }`는 세션 자신의 대화 기록(transcript)을 이름
|
|
413
518
|
붙입니다 — 표면이 읽는 사용자 턴과 도구 호출을, 항목마다 관측
|
|
414
519
|
순번을 실은 스냅샷 하나로 선언에 건넵니다. 이력 단계(`toolUses` · `userTexts` · `first` ·
|
|
415
520
|
`ageMs`)가 그것을 읽고, `agentType`은 파싱된 사이드카를 읽습니다. 이 저장소의 라이브
|
|
416
|
-
설정은 그런 선언 하나를
|
|
417
|
-
|
|
521
|
+
설정은 그런 선언 하나를 싣습니다. `tests-before-implementation`은 서브에이전트 스폰 둘의 순번
|
|
522
|
+
위의 `ordered`이고 `sessionDisciplines`에 적혀 있습니다. 일곱째 고정 이름
|
|
418
523
|
`actor`는 관측의 주체(actor)입니다. 서브에이전트 안에서는 `{ agentType }`, 주 세션에서는
|
|
419
|
-
`{}`, 표면이 주체를 증명하지 못하면(
|
|
524
|
+
`{}`, 표면이 주체를 증명하지 못하면(변경 집합 표면) 없습니다. `{ op: 'source', of: 'actor' }` 뒤에
|
|
420
525
|
`agentType`을 `select`해 읽고, `producer-owned` · `actor-scope` 기전이 요구하는 `actor`
|
|
421
526
|
축을 유도합니다. 이 저장소의 라이브 설정은 각 하나씩 싣습니다(`tests-are-the-writers`,
|
|
422
527
|
`commits-come-from-the-main-session`). `supply`의 키는
|