polydeukes 0.6.0 → 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 +30 -70
- package/README.md +31 -84
- package/dist/baseline.d.ts +37 -1
- package/dist/baseline.js +68 -1
- package/dist/bin.d.ts +3 -4
- package/dist/bin.js +79 -93
- 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 +60 -0
- package/dist/docs/README.md +64 -0
- package/dist/docs/catalog.json +480 -0
- package/dist/docs/concepts/judgment.ko.md +113 -0
- package/dist/docs/concepts/judgment.md +113 -0
- package/dist/docs/how-to/configure-project.ko.md +99 -0
- package/dist/docs/how-to/configure-project.md +98 -0
- package/dist/docs/how-to/connect-surfaces.ko.md +120 -0
- package/dist/docs/how-to/connect-surfaces.md +121 -0
- package/dist/docs/how-to/write-disciplines.ko.md +179 -0
- package/dist/docs/how-to/write-disciplines.md +181 -0
- package/dist/docs/index.json +2280 -0
- package/dist/docs/reference/cli/covenant-check.ko.md +148 -0
- package/dist/docs/reference/cli/covenant-check.md +153 -0
- package/dist/docs/reference/cli/docs.ko.md +97 -0
- package/dist/docs/reference/cli/docs.md +95 -0
- package/dist/docs/reference/cli/explain.ko.md +84 -0
- package/dist/docs/reference/cli/explain.md +89 -0
- package/dist/docs/reference/cli/init.ko.md +119 -0
- package/dist/docs/reference/cli/init.md +119 -0
- package/dist/docs/reference/configuration/index.ko.md +553 -0
- package/dist/docs/reference/{configuration.md → configuration/index.md} +215 -90
- package/dist/docs/reference/packages/adapter-claude-code.ko.md +110 -0
- package/dist/docs/reference/{adapter-claude-code.md → packages/adapter-claude-code.md} +47 -19
- 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 +174 -0
- package/dist/docs/reference/{core.md → packages/core.md} +74 -12
- package/dist/docs/reference/packages/polydeukes.ko.md +195 -0
- package/dist/docs/reference/packages/polydeukes.md +204 -0
- 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 +144 -0
- package/dist/docs/troubleshooting.md +103 -151
- package/dist/docs/tutorials/first-judgment.ko.md +82 -0
- package/dist/docs/tutorials/first-judgment.md +81 -0
- package/dist/docs-catalog.d.ts +25 -0
- package/dist/docs-catalog.js +450 -0
- package/dist/docs-library.d.ts +23 -0
- package/dist/docs-library.js +347 -0
- package/dist/docs-markdown.d.ts +32 -0
- package/dist/docs-markdown.js +150 -0
- package/dist/docs-query.d.ts +11 -40
- package/dist/docs-query.js +28 -122
- package/dist/docs-types.d.ts +105 -0
- package/dist/docs-types.js +2 -0
- 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/configuration.md +0 -103
- package/dist/docs/installation.md +0 -241
- package/dist/docs/reference/adapter-git.md +0 -100
- package/dist/docs/reference/covenant.md +0 -116
- package/dist/docs/reference/polydeukes.md +0 -315
- 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 -469
- package/dist/init-grok.d.ts +0 -51
- package/dist/init-grok.js +0 -242
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# `pdks init`
|
|
2
|
+
|
|
3
|
+
[English](./init.md) · **한국어**
|
|
4
|
+
|
|
5
|
+
`pdks init`은 에이전트와 무관한 초기 파일을 만듭니다. 설정 파일과 텔레메트리 제외 항목
|
|
6
|
+
둘입니다. 이 명령은 어느 에이전트도 알지 못합니다. 세션 표면 등록은 그 에이전트의 어댑터가
|
|
7
|
+
맡는 별도 명령입니다. Claude Code는 `pdks-claude-code init`, Grok는 `pdks-grok init`입니다.
|
|
8
|
+
|
|
9
|
+
<a id="init-syntax"></a>
|
|
10
|
+
## 구문
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
pdks init
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
다른 인자를 주면 사용법을 출력하고 종료 코드 `2`를 반환합니다. 이미 있는 산출물은 보존하고
|
|
17
|
+
`skipped`로 보고하며, 사전 검사에 실패하면 파일을 쓰지 않고 종료 코드 `2`를 반환합니다.
|
|
18
|
+
|
|
19
|
+
<a id="init-common"></a>
|
|
20
|
+
## `pdks init` — 초기 파일
|
|
21
|
+
|
|
22
|
+
이 명령의 순서는 다음과 같습니다.
|
|
23
|
+
|
|
24
|
+
1. 대상 프로젝트에서 `polydeukes`를 찾을 수 있는지 확인합니다.
|
|
25
|
+
2. 공통 설정과 텔레메트리 제외 항목을 만듭니다.
|
|
26
|
+
|
|
27
|
+
어느 표면이든 여기서 출발합니다.
|
|
28
|
+
|
|
29
|
+
- `polydeukes.config.yaml`
|
|
30
|
+
- `.gitignore`의 `.polydeukes/` 항목
|
|
31
|
+
|
|
32
|
+
설정 파일에는 언어 블록, 보호 목록, 증인(witness) 블록, 주석으로 된 규율(discipline) 예제가
|
|
33
|
+
있습니다. 완성된 정책이 아니라 프로젝트에 맞춰 고칠 출발점입니다.
|
|
34
|
+
|
|
35
|
+
<a id="init-claude-code"></a>
|
|
36
|
+
## Claude Code — `pdks-claude-code init`
|
|
37
|
+
|
|
38
|
+
Claude Code 세션 표면은
|
|
39
|
+
[`@polydeukes/adapter-claude-code`](../packages/adapter-claude-code.ko.md)가 설치합니다. 이
|
|
40
|
+
어댑터에는 자체 실행 파일이 있습니다.
|
|
41
|
+
|
|
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 등록 산출물을 씁니다.
|
|
48
|
+
|
|
49
|
+
- `.claude/hooks/covenant-pretooluse.mjs`
|
|
50
|
+
- `.claude/settings.json`
|
|
51
|
+
- `.claude/rules/polydeukes.md`
|
|
52
|
+
- `.claude/skills/discipline-draft/SKILL.md`
|
|
53
|
+
|
|
54
|
+
산출물별 동작은 [표면 연결하기](../../how-to/connect-surfaces.ko.md#claude-code)에 있습니다.
|
|
55
|
+
|
|
56
|
+
<a id="init-grok"></a>
|
|
57
|
+
## Grok — `pdks-grok init`
|
|
58
|
+
|
|
59
|
+
Grok 세션 표면은
|
|
60
|
+
[`@polydeukes/adapter-grok`](../packages/adapter-grok.ko.md)가 설치합니다. 이
|
|
61
|
+
어댑터에는 자체 실행 파일이 있습니다.
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
npm install --save-dev polydeukes @polydeukes/adapter-grok
|
|
65
|
+
npx pdks-grok init
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
이 명령은 먼저 `pdks init`으로 초기 파일을 만든 뒤 Grok 등록 산출물을 씁니다.
|
|
69
|
+
|
|
70
|
+
- `.grok/hooks/covenant-pretooluse.mjs`
|
|
71
|
+
- `.grok/hooks/covenant-pretooluse.json`
|
|
72
|
+
|
|
73
|
+
`.claude/` 파일을 만들거나 고치지 않습니다. 새 등록의 제한 시간은 60초입니다. Grok 호스트
|
|
74
|
+
기본값은 5초이며, 훅 실행이 시간 초과로 끝나면 해당 호출을 차단하지 않습니다(fail-open).
|
|
75
|
+
두 세션 어댑터를 한 프로젝트에 함께 설치하면 호출마다 판정기가 두 번 실행될 수 있습니다.
|
|
76
|
+
|
|
77
|
+
Grok는 Claude 세션 증인(witness) 밸브가 요구하는 인간 메시지 증거를 제공하지 않습니다.
|
|
78
|
+
대화 기록은 Claude JSONL이 아니라 ACP `updates.jsonl`입니다.
|
|
79
|
+
[Grok 복구 안내](../../troubleshooting.ko.md#grok-witness)를 참고하세요. 산출물별 동작은
|
|
80
|
+
[표면 연결하기](../../how-to/connect-surfaces.ko.md#grok)에 있습니다.
|
|
81
|
+
|
|
82
|
+
<a id="init-results"></a>
|
|
83
|
+
## 결과와 실패 조건
|
|
84
|
+
|
|
85
|
+
| 상황 | 결과 |
|
|
86
|
+
|---|---|
|
|
87
|
+
| 패키지를 찾고 대상 프로젝트의 초기 파일을 만들 수 있음 | 종료 `0` |
|
|
88
|
+
| 요청한 산출물이 이미 있음 | `skipped`로 보고하고 종료 `0` |
|
|
89
|
+
| 대상 프로젝트에서 패키지를 찾을 수 없음 | 종료 `2`, 파일을 쓰지 않음 |
|
|
90
|
+
| 설정 파일이 여러 개라 모호함 | 종료 `2`, 파일을 쓰지 않음 |
|
|
91
|
+
| 호스트 설정 파일을 읽거나 구문을 분석할 수 없음 | 종료 `2`, 파일을 쓰지 않음 |
|
|
92
|
+
| 그 밖의 사전 검사 또는 파일 쓰기 실패 | 종료 `2` |
|
|
93
|
+
|
|
94
|
+
사전 검사는 파일을 쓰기 전에 끝납니다. 하지만 이후 파일 쓰기에서 실패하면 일부 파일이
|
|
95
|
+
이미 만들어졌을 수 있습니다. 설치 전체를 한꺼번에 되돌리는 기능은 아닙니다. 오류를 확인하고
|
|
96
|
+
파일시스템 문제를 고친 뒤 다시 실행하세요. 설치가 실패했으니 아무 파일도 없을 것이라고
|
|
97
|
+
가정해서는 안 됩니다.
|
|
98
|
+
|
|
99
|
+
<a id="init-examples"></a>
|
|
100
|
+
## 예제
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
pdks init
|
|
104
|
+
npx pdks-claude-code init
|
|
105
|
+
npx pdks-grok init
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
설치기는 CLI 명령입니다. `polydeukes` 계약의 공개 심볼이 아닙니다.
|
|
109
|
+
|
|
110
|
+
<a id="init-see-also"></a>
|
|
111
|
+
## 함께 보기
|
|
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
|
+
- [`pdks docs`](./docs.ko.md)
|
|
117
|
+
- [`pdks explain`](./explain.ko.md)
|
|
118
|
+
- [설정 참조](../configuration/index.ko.md)
|
|
119
|
+
- [`polydeukes`](../packages/polydeukes.ko.md)
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# `pdks init`
|
|
2
|
+
|
|
3
|
+
**English** · [한국어](./init.ko.md)
|
|
4
|
+
|
|
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
|
+
|
|
9
|
+
<a id="init-syntax"></a>
|
|
10
|
+
## Syntax
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
pdks init
|
|
14
|
+
```
|
|
15
|
+
|
|
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`.
|
|
18
|
+
|
|
19
|
+
<a id="init-common"></a>
|
|
20
|
+
## `pdks init` — the scaffold
|
|
21
|
+
|
|
22
|
+
The command does two things in order:
|
|
23
|
+
|
|
24
|
+
1. Resolve `polydeukes` from the target project.
|
|
25
|
+
2. Create the shared project-side scaffold: config and telemetry ignore line.
|
|
26
|
+
|
|
27
|
+
The scaffold is the same one every surface starts from:
|
|
28
|
+
|
|
29
|
+
- `polydeukes.config.yaml`
|
|
30
|
+
- `.gitignore` with `.polydeukes/`
|
|
31
|
+
|
|
32
|
+
The config file starts with the language block, a protection list, a witness block, and commented
|
|
33
|
+
discipline examples. It is a starter policy, not a complete project policy.
|
|
34
|
+
|
|
35
|
+
<a id="init-claude-code"></a>
|
|
36
|
+
## Claude Code — `pdks-claude-code init`
|
|
37
|
+
|
|
38
|
+
The Claude Code session surface is installed by
|
|
39
|
+
[`@polydeukes/adapter-claude-code`](../packages/adapter-claude-code.md), which ships its own bin:
|
|
40
|
+
|
|
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:
|
|
48
|
+
|
|
49
|
+
- `.claude/hooks/covenant-pretooluse.mjs`
|
|
50
|
+
- `.claude/settings.json`
|
|
51
|
+
- `.claude/rules/polydeukes.md`
|
|
52
|
+
- `.claude/skills/discipline-draft/SKILL.md`
|
|
53
|
+
|
|
54
|
+
Details and the per-artifact behaviour are in
|
|
55
|
+
[Connect the surfaces](../../how-to/connect-surfaces.md#claude-code).
|
|
56
|
+
|
|
57
|
+
<a id="init-grok"></a>
|
|
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:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
npm install --save-dev polydeukes @polydeukes/adapter-grok
|
|
65
|
+
npx pdks-grok init
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
That command runs `pdks init` for the scaffold, then writes the Grok registration artifacts:
|
|
69
|
+
|
|
70
|
+
- `.grok/hooks/covenant-pretooluse.mjs`
|
|
71
|
+
- `.grok/hooks/covenant-pretooluse.json`
|
|
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.
|
|
76
|
+
|
|
77
|
+
Grok does not supply the human-message evidence required by the Claude session witness valve.
|
|
78
|
+
The session log is ACP `updates.jsonl`, not Claude's JSONL.
|
|
79
|
+
See [Grok recovery](../../troubleshooting.md#grok-witness). Details are in
|
|
80
|
+
[Connect the surfaces](../../how-to/connect-surfaces.md#grok).
|
|
81
|
+
|
|
82
|
+
<a id="init-results"></a>
|
|
83
|
+
## Results and failure conditions
|
|
84
|
+
|
|
85
|
+
| Situation | Result |
|
|
86
|
+
|---|---|
|
|
87
|
+
| Package resolves and the target tree can be scaffolded | exit `0` |
|
|
88
|
+
| A requested artifact already exists | Reported as skipped, but the command still exits `0` |
|
|
89
|
+
| The package cannot be resolved from the target project | exit `2`, nothing written |
|
|
90
|
+
| The config path is ambiguous | exit `2`, nothing written |
|
|
91
|
+
| The settings file is unreadable or unparseable | exit `2`, nothing written |
|
|
92
|
+
| Any other preflight or write failure | exit `2` |
|
|
93
|
+
|
|
94
|
+
Preflight failures occur before writing. A later filesystem write failure can leave some
|
|
95
|
+
artifacts created; the installer is not an atomic transaction. Inspect the error, repair the
|
|
96
|
+
filesystem problem, and rerun rather than assuming every failed installation left an empty tree.
|
|
97
|
+
|
|
98
|
+
<a id="init-examples"></a>
|
|
99
|
+
## Examples
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
pdks init
|
|
103
|
+
npx pdks-claude-code init
|
|
104
|
+
npx pdks-grok init
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The installers are CLI commands. They are not symbols on the `polydeukes` contract.
|
|
108
|
+
|
|
109
|
+
<a id="init-see-also"></a>
|
|
110
|
+
## See also
|
|
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.
|
|
115
|
+
- [`pdks docs`](../packages/polydeukes.md#polydeukes-bin) — the installed documentation reader lives
|
|
116
|
+
in the same package.
|
|
117
|
+
- [`pdks explain`](./explain.md)
|
|
118
|
+
- [`Configuration reference`](../configuration/index.md)
|
|
119
|
+
- [`polydeukes`](../packages/polydeukes.md)
|