polydeukes 0.6.0 → 0.6.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 +54 -80
- package/README.md +55 -94
- package/dist/bin.js +8 -5
- package/dist/docs/README.ko.md +60 -0
- package/dist/docs/README.md +64 -0
- package/dist/docs/catalog.json +464 -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 +95 -0
- package/dist/docs/how-to/connect-surfaces.ko.md +115 -0
- package/dist/docs/how-to/connect-surfaces.md +118 -0
- package/dist/docs/how-to/write-disciplines.ko.md +124 -0
- package/dist/docs/how-to/write-disciplines.md +125 -0
- package/dist/docs/index.json +2046 -0
- package/dist/docs/reference/cli/covenant-check.ko.md +101 -0
- package/dist/docs/reference/cli/covenant-check.md +98 -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 +79 -0
- package/dist/docs/reference/cli/explain.md +84 -0
- package/dist/docs/reference/cli/init.ko.md +119 -0
- package/dist/docs/reference/cli/init.md +131 -0
- package/dist/docs/reference/configuration/index.ko.md +448 -0
- package/dist/docs/reference/{configuration.md → configuration/index.md} +48 -30
- package/dist/docs/reference/packages/adapter-claude-code.ko.md +83 -0
- package/dist/docs/reference/{adapter-claude-code.md → packages/adapter-claude-code.md} +10 -6
- package/dist/docs/reference/packages/adapter-git.ko.md +101 -0
- package/dist/docs/reference/{adapter-git.md → packages/adapter-git.md} +20 -12
- package/dist/docs/reference/packages/core.ko.md +128 -0
- package/dist/docs/reference/{core.md → packages/core.md} +21 -8
- package/dist/docs/reference/packages/covenant.ko.md +115 -0
- package/dist/docs/reference/{covenant.md → packages/covenant.md} +18 -11
- package/dist/docs/reference/packages/polydeukes.ko.md +134 -0
- package/dist/docs/reference/packages/polydeukes.md +139 -0
- package/dist/docs/troubleshooting.ko.md +142 -0
- package/dist/docs/troubleshooting.md +98 -150
- 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/init-claude-code.d.ts +1 -1
- package/dist/init-claude-code.js +159 -42
- package/package.json +5 -5
- package/dist/docs/configuration.md +0 -103
- package/dist/docs/installation.md +0 -241
- package/dist/docs/reference/polydeukes.md +0 -315
package/README.ko.md
CHANGED
|
@@ -1,80 +1,54 @@
|
|
|
1
|
-
# polydeukes
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
프롬프트는 깨진 등록과 걸린 항목, 그리고 이 한 번의 답이 커밋 전체를 덮는다는 사실을 적습니다.
|
|
56
|
-
깨끗한 커밋은 프롬프트를 보지 않습니다. TTY가 없으면, 즉 CI나 에이전트가 띄운 `git commit`
|
|
57
|
-
이면 프롬프트도 통과할 길도 없습니다. 밸브는 터미널 앞의 인간에게만 닿고, 어떤 상태도 남기지
|
|
58
|
-
않으며, 증언으로 통과한 판정은 모두 `witnessed`로 기록됩니다. 조용한 우회는 없습니다.
|
|
59
|
-
- **시행 수위.** git 어댑터의 네임스페이스 설정 `adapters.git.enforce: block | advise`가 커밋
|
|
60
|
-
표면 판정의 처분을 고릅니다. `advise`에서는 밸브 자체가 조립되지 않습니다. 판정은 `advised`
|
|
61
|
-
이벤트로 기록되고, stderr에 권고 한 줄이 남으며, 커밋은 진행됩니다. 차단하는 대신 측정하는
|
|
62
|
-
백스톱입니다. 완화되는 것은 판정뿐이라, 판정 자체가 불가능한 실행(설정 없음·무효, 판정 본체
|
|
63
|
-
해석 불가)은 어느 수위에서든 exit 2로 닫힙니다.
|
|
64
|
-
|
|
65
|
-
## 전체 지도
|
|
66
|
-
|
|
67
|
-
| 모듈 | 역할 |
|
|
68
|
-
|---|---|
|
|
69
|
-
| `@polydeukes/core` | 약속(covenant) 프로토콜, config 스키마, ROI 텔레메트리, 대화 기록 이음새 |
|
|
70
|
-
| `@polydeukes/covenant` | 디스패처, 판정 본체, Bash 분석, 규율(discipline) 라이브러리 |
|
|
71
|
-
| `@polydeukes/adapter-claude-code` | 세션 표면. PreToolUse 페이로드를 약속(covenant) 입력 IR로 번역 |
|
|
72
|
-
| `@polydeukes/adapter-git` | 커밋 표면. `staged diff`를 약속(covenant) 입력 IR로 번역 |
|
|
73
|
-
| `@polydeukes/ledger` · `@polydeukes/memory` · `@polydeukes/verify` | 청사진 단계 |
|
|
74
|
-
|
|
75
|
-
아키텍처 청사진과 설계 근거는
|
|
76
|
-
[프로젝트 저장소](https://github.com/huskyhoochu/polydeukes)에 있습니다.
|
|
77
|
-
|
|
78
|
-
## 라이선스
|
|
79
|
-
|
|
80
|
-
MIT
|
|
1
|
+
# `polydeukes`
|
|
2
|
+
|
|
3
|
+
[English](./README.md) · **한국어**
|
|
4
|
+
|
|
5
|
+
Polydeukes는 우산 패키지입니다. 이 패키지 하나에 `pdks` 실행 파일, 설정 로더,
|
|
6
|
+
커밋 표면 실행기, 세션 표면 실행기 서브패스, 동봉 스키마가 모두 포함돼 있습니다.
|
|
7
|
+
|
|
8
|
+
<a id="overview"></a>
|
|
9
|
+
## 개요
|
|
10
|
+
|
|
11
|
+
공개 계약 심볼과 진입점은 다음과 같습니다.
|
|
12
|
+
|
|
13
|
+
- `loadConfig`
|
|
14
|
+
- `runCovenantCheck`
|
|
15
|
+
- `ResolvedConfig`
|
|
16
|
+
- `polydeukes/claude-code` → `runClaudeCodeHook`
|
|
17
|
+
- `polydeukes/schema.json`
|
|
18
|
+
- `pdks covenant check`
|
|
19
|
+
- `pdks init claude-code`
|
|
20
|
+
- `pdks init grok`
|
|
21
|
+
- `pdks explain`
|
|
22
|
+
- `pdks docs [topic]`
|
|
23
|
+
|
|
24
|
+
<a id="public-symbols"></a>
|
|
25
|
+
## 공개 심볼
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { loadConfig, runCovenantCheck } from 'polydeukes';
|
|
29
|
+
import { runClaudeCodeHook } from 'polydeukes/claude-code';
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
function loadConfig(spec: { rootDir: string }): {
|
|
34
|
+
config: import('@polydeukes/core').ResolvedConfig;
|
|
35
|
+
configPath: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
function runCovenantCheck(spec: {
|
|
39
|
+
repoRoot: string;
|
|
40
|
+
telemetryPath?: string;
|
|
41
|
+
covenantDist?: string;
|
|
42
|
+
ttyPrompt?: (prompt: string) => string | null;
|
|
43
|
+
domain?: unknown;
|
|
44
|
+
}): Promise<{ exitCode: 0 | 2 }>;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
<a id="see-also"></a>
|
|
48
|
+
## 같이 보기
|
|
49
|
+
|
|
50
|
+
- [`polydeukes` 패키지 레퍼런스](../../docs/reference/packages/polydeukes.ko.md)
|
|
51
|
+
- [`설정 레퍼런스`](../../docs/reference/configuration/index.ko.md)
|
|
52
|
+
- [`pdks covenant check`](../../docs/reference/cli/covenant-check.ko.md)
|
|
53
|
+
- [`pdks init`](../../docs/reference/cli/init.ko.md)
|
|
54
|
+
- [`pdks explain`](../../docs/reference/cli/explain.ko.md)
|
package/README.md
CHANGED
|
@@ -1,94 +1,55 @@
|
|
|
1
|
-
# polydeukes
|
|
2
|
-
|
|
3
|
-
**English** · [한국어](
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- **`pdks docs [topic]`** — the offline documentation reader. The English guides and the reference
|
|
57
|
-
layer are copied into `dist/docs` at build time, so a consumer's AI partner reads the
|
|
58
|
-
documentation that shipped with the code doing the judging instead of whichever release a search
|
|
59
|
-
engine indexed. With no argument it lists the five topics — that listing is how an agent
|
|
60
|
-
discovers what it may ask at all; with one it returns that topic's section verbatim plus the
|
|
61
|
-
reference to read next. The query domain is those five names and nothing else: an unknown topic,
|
|
62
|
-
a bundled document that is missing, and a heading a document no longer carries each name what
|
|
63
|
-
was missing on stderr and exit 2, leaving stdout at zero bytes. A partially written answer would
|
|
64
|
-
be read as the document and quoted onward, so no path produces one.
|
|
65
|
-
- **The commit-surface witness valve** — at the `block` level (the default), when a staged change
|
|
66
|
-
actually breaks a covenant, the runner prompts once on `/dev/tty` for the full witness token (a
|
|
67
|
-
substring is refused), naming the broken registration, the matched entry, and the commit-wide
|
|
68
|
-
reach of the one answer. A clean commit never prompts. No TTY — CI, an agent-spawned
|
|
69
|
-
`git commit` — means no prompt and no way through: the valve is reachable only by a human at a
|
|
70
|
-
terminal, and nothing is ever persisted. Every witnessed pass is measured as `witnessed`, never
|
|
71
|
-
silent.
|
|
72
|
-
- **The enforcement level** — the git adapter's namespace setting
|
|
73
|
-
`adapters.git.enforce: block | advise` selects what a commit-surface verdict does. Under
|
|
74
|
-
`advise` the valve is structurally absent: a verdict is recorded as an `advised` event, one
|
|
75
|
-
advisory line lands on stderr, and the commit proceeds — a backstop that measures instead of
|
|
76
|
-
blocking. Only the verdict is relaxed: a run that cannot judge (missing or invalid config, an
|
|
77
|
-
unresolvable judge body) fails closed at exit 2 at either level.
|
|
78
|
-
|
|
79
|
-
## The wider map
|
|
80
|
-
|
|
81
|
-
| Module | Role |
|
|
82
|
-
|---|---|
|
|
83
|
-
| `@polydeukes/core` | Covenant protocol, config schema, ROI telemetry, transcript seam |
|
|
84
|
-
| `@polydeukes/covenant` | Dispatcher, judge bodies, Bash analysis, discipline library |
|
|
85
|
-
| `@polydeukes/adapter-claude-code` | Session surface — PreToolUse payloads → covenant input IR |
|
|
86
|
-
| `@polydeukes/adapter-git` | Commit surface — staged diffs → covenant input IR |
|
|
87
|
-
| `@polydeukes/ledger` · `@polydeukes/memory` · `@polydeukes/verify` | Blueprint stage |
|
|
88
|
-
|
|
89
|
-
See the [project repository](https://github.com/huskyhoochu/polydeukes) for the architecture
|
|
90
|
-
blueprint and design rationale.
|
|
91
|
-
|
|
92
|
-
## License
|
|
93
|
-
|
|
94
|
-
MIT
|
|
1
|
+
# `polydeukes`
|
|
2
|
+
|
|
3
|
+
**English** · [한국어](./README.ko.md)
|
|
4
|
+
|
|
5
|
+
Polydeukes is the umbrella package. Install this package; it ships the `pdks` bin, the config
|
|
6
|
+
loader, the commit-surface runner, the session-surface runner subpath, and the bundled schema
|
|
7
|
+
artifact.
|
|
8
|
+
|
|
9
|
+
<a id="overview"></a>
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Public contract symbols and entry points:
|
|
13
|
+
|
|
14
|
+
- `loadConfig`
|
|
15
|
+
- `runCovenantCheck`
|
|
16
|
+
- `ResolvedConfig`
|
|
17
|
+
- `polydeukes/claude-code` → `runClaudeCodeHook`
|
|
18
|
+
- `polydeukes/schema.json`
|
|
19
|
+
- `pdks covenant check`
|
|
20
|
+
- `pdks init claude-code`
|
|
21
|
+
- `pdks init grok`
|
|
22
|
+
- `pdks explain`
|
|
23
|
+
- `pdks docs [topic]`
|
|
24
|
+
|
|
25
|
+
<a id="public-symbols"></a>
|
|
26
|
+
## Public symbols
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { loadConfig, runCovenantCheck } from 'polydeukes';
|
|
30
|
+
import { runClaudeCodeHook } from 'polydeukes/claude-code';
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
function loadConfig(spec: { rootDir: string }): {
|
|
35
|
+
config: import('@polydeukes/core').ResolvedConfig;
|
|
36
|
+
configPath: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
function runCovenantCheck(spec: {
|
|
40
|
+
repoRoot: string;
|
|
41
|
+
telemetryPath?: string;
|
|
42
|
+
covenantDist?: string;
|
|
43
|
+
ttyPrompt?: (prompt: string) => string | null;
|
|
44
|
+
domain?: unknown;
|
|
45
|
+
}): Promise<{ exitCode: 0 | 2 }>;
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
<a id="see-also"></a>
|
|
49
|
+
## See also
|
|
50
|
+
|
|
51
|
+
- [`polydeukes` package reference](../../docs/reference/packages/polydeukes.md)
|
|
52
|
+
- [`Configuration reference`](../../docs/reference/configuration/index.md)
|
|
53
|
+
- [`pdks covenant check`](../../docs/reference/cli/covenant-check.md)
|
|
54
|
+
- [`pdks init`](../../docs/reference/cli/init.md)
|
|
55
|
+
- [`pdks explain`](../../docs/reference/cli/explain.md)
|
package/dist/bin.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* CI or by an agent-spawned shell — no controlling terminal), the seam stays absent and
|
|
12
12
|
* the witness valve is structurally unreachable, so only a human at a terminal can arm it.
|
|
13
13
|
*/
|
|
14
|
-
import { closeSync, openSync, readSync, writeSync } from 'node:fs';
|
|
14
|
+
import { closeSync, openSync, readFileSync, readSync, writeSync } from 'node:fs';
|
|
15
15
|
import { dirname, join } from 'node:path';
|
|
16
16
|
import { fileURLToPath } from 'node:url';
|
|
17
17
|
/**
|
|
@@ -105,15 +105,18 @@ if (args.length === 2 && args[0] === 'init' && args[1] === 'grok') {
|
|
|
105
105
|
process.exit(2);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
if (args[0] === 'docs'
|
|
108
|
+
if (args[0] === 'docs') {
|
|
109
109
|
try {
|
|
110
110
|
// Imported inside the try for the same reason `init` is: the query core and the
|
|
111
111
|
// markdown behind it have no business on `covenant check`'s load path.
|
|
112
|
-
const {
|
|
112
|
+
const { runDocs } = await import('./docs-library.js');
|
|
113
113
|
// The bundle ships beside this file, so the docs root comes from the module's own
|
|
114
114
|
// location — never from the working directory, which is whatever shell invoked us.
|
|
115
115
|
const docsRoot = join(dirname(fileURLToPath(import.meta.url)), 'docs');
|
|
116
|
-
const
|
|
116
|
+
const manifest = JSON.parse(readFileSync(join(docsRoot, '../../package.json'), 'utf8'));
|
|
117
|
+
if (typeof manifest.version !== 'string')
|
|
118
|
+
throw new Error('missing package version');
|
|
119
|
+
const { text } = runDocs({ docsRoot, args: args.slice(1), version: manifest.version });
|
|
117
120
|
await emitAndExit(text);
|
|
118
121
|
}
|
|
119
122
|
catch (error) {
|
|
@@ -166,7 +169,7 @@ function parseCheckDomain(flags) {
|
|
|
166
169
|
}
|
|
167
170
|
const domain = args[0] === 'covenant' && args[1] === 'check' ? parseCheckDomain(args.slice(2)) : null;
|
|
168
171
|
if (domain === null) {
|
|
169
|
-
process.stderr.write('usage: pdks covenant check [--worktree | --range <base>..<head>] | pdks explain | pdks init claude-code | pdks init grok | pdks docs [topic]\n');
|
|
172
|
+
process.stderr.write('usage: pdks covenant check [--worktree | --range <base>..<head>] | pdks explain | pdks init claude-code | pdks init grok | pdks docs [topic | search <query> | show <document-id>]\n');
|
|
170
173
|
process.exit(2);
|
|
171
174
|
}
|
|
172
175
|
try {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# 폴리데우케스 문서
|
|
2
|
+
|
|
3
|
+
[English](./README.md) · **한국어**
|
|
4
|
+
|
|
5
|
+
> AI 코딩 파트너와 함께 개발하기 위한 규율 프레임워크입니다. 궁금한 곳부터 읽으십시오.
|
|
6
|
+
|
|
7
|
+
<a id="start-here"></a>
|
|
8
|
+
## 여기서 시작하십시오
|
|
9
|
+
|
|
10
|
+
| 하려는 것 | 읽을 문서 |
|
|
11
|
+
|---|---|
|
|
12
|
+
| 첫 눈에 보이는 판정을 보고 싶다 | [첫 판정](./tutorials/first-judgment.ko.md) — 설치하고 Claude Code를 배선한 뒤 보호된 편집이 판정되는 모습을 봅니다 |
|
|
13
|
+
| Claude Code, Grok, git을 연결하고 싶다 | [표면 연결하기](./how-to/connect-surfaces.ko.md) — 세션과 커밋 배선, Grok 포함 |
|
|
14
|
+
| 프로젝트 설정을 다듬고 싶다 | [프로젝트 설정하기](./how-to/configure-project.ko.md) — 발견, IDE 지원, advise와 block의 선택 |
|
|
15
|
+
| 실제 규율을 쓰고 싶다 | [규율 작성하기](./how-to/write-disciplines.ko.md) — 실전 선언 예제, 특히 locale key pairing |
|
|
16
|
+
| 차단이나 건너뜀에서 회복하고 싶다 | [문제 해결](./troubleshooting.ko.md) — fail-closed 상태, 증인 밸브, 로그 |
|
|
17
|
+
| 이 프레임워크가 왜 있는지 알고 싶다 | [왜 폴리데우케스인가?](./why-polydeukes.ko.md) — 설계 백서 |
|
|
18
|
+
| 이 문서에 기여하고 싶다 | [문서에 기여하기](./contributing.ko.md) — 영한 쌍, 안정 ID, 카탈로그, 검사 |
|
|
19
|
+
|
|
20
|
+
<a id="reference"></a>
|
|
21
|
+
## 레퍼런스
|
|
22
|
+
|
|
23
|
+
설정 키, 하위 명령, 종료 코드를 설명합니다. 계획이 아니라 현재 동작을 기준으로 서술합니다.
|
|
24
|
+
|
|
25
|
+
| 문서 | 답하는 것 |
|
|
26
|
+
|---|---|
|
|
27
|
+
| [설정 레퍼런스](./reference/configuration/index.ko.md) | `polydeukes.config.yaml`에 무엇을 넣을 수 있고 각 키가 무엇을 하는지 |
|
|
28
|
+
| [`polydeukes` (`pdks` CLI)](./reference/packages/polydeukes.ko.md) | 패키지 계약. 서브커맨드는 [`reference/cli/`](./reference/cli/covenant-check.ko.md) |
|
|
29
|
+
| [`@polydeukes/core`](./reference/packages/core.ko.md) | 프로토콜, 입력 IR, 설정 스키마, 텔레메트리 |
|
|
30
|
+
| [`@polydeukes/covenant`](./reference/packages/covenant.ko.md) | 판정기입니다. 디스패처와 규율 라이브러리, 메타 약속, 밸브 |
|
|
31
|
+
| [`@polydeukes/adapter-claude-code`](./reference/packages/adapter-claude-code.ko.md) | 세션 표면입니다. 훅 페이로드에서 입력 IR로 |
|
|
32
|
+
| [`@polydeukes/adapter-git`](./reference/packages/adapter-git.ko.md) | 커밋 표면입니다. 스테이징·작업 트리·범위 diff에서 입력 IR로 |
|
|
33
|
+
|
|
34
|
+
<a id="shape-of-the-thing"></a>
|
|
35
|
+
## 한 페이지로 보는 구조
|
|
36
|
+
|
|
37
|
+
폴리데우케스는 개발자나 AI 에이전트가 하려는 일을 판정하고 결과를 기록합니다.
|
|
38
|
+
기본값으로는 작업을 차단하지 않습니다. 설계의 바탕은 다음 세 가지입니다.
|
|
39
|
+
|
|
40
|
+
**약속은 가두기 위한 울타리가 아닙니다.** 여기서 확인하는 규율은 개발자가 이미 스스로 지켜 온 것들입니다. AI에게만큼 사람에게도 똑같이 적용되고, 프레임워크를 만든
|
|
41
|
+
사람도 매일 그 판정을 받습니다.
|
|
42
|
+
|
|
43
|
+
**판정과 차단은 별개의 결정입니다.** 선언된 규율은 적용 범위에 해당하는 호출마다 판정합니다.
|
|
44
|
+
위반했을 때 호출을 차단할지는 별도로 정합니다. 기본값으로는 사유를 기록하고 호출을 계속합니다.
|
|
45
|
+
작성자는 `enforce: block`으로 차단을 선택할 수 있습니다. 별도 선택 없이 차단하는 것은
|
|
46
|
+
프레임워크 자체를 보호하는 경우뿐입니다.
|
|
47
|
+
|
|
48
|
+
**모든 판정은 행 하나를 남깁니다.** `.polydeukes/roi.log`가 판정 결과마다 한 줄씩, 낱말 여섯 개짜리 어휘로 담습니다. 이 프로젝트가 자기 결함을 찾는
|
|
49
|
+
방법이 그 기록입니다. 백서에 적힌 결함들도 전부 코드를 읽어서가 아니라 행을 세어서 나왔습니다.
|
|
50
|
+
|
|
51
|
+
<a id="two-surfaces"></a>
|
|
52
|
+
## 두 표면
|
|
53
|
+
|
|
54
|
+
| 표면 | 판정 대상 | 배선 방법 | 대상 |
|
|
55
|
+
|---|---|---|---|
|
|
56
|
+
| **세션** | 도구 호출, 실행되기 전에 | `pdks init claude-code` 또는 `pdks init grok` | AI 파트너와 함께 개발하는 프로젝트 |
|
|
57
|
+
| **커밋** | diff — 스테이징 영역, 작업 트리, ref 범위 | pre-commit 훅, 또는 필요할 때 직접 실행 | 혼자 개발하는 사람, 그리고 CI |
|
|
58
|
+
|
|
59
|
+
커밋 판정기는 필요할 때 직접 실행할 수도 있습니다. 작업 후에는 `pdks covenant check --worktree`,
|
|
60
|
+
PR 전에는 `--range`를 사용합니다. 같은 판정 기준으로 결과를 보고하며 증인 입력은 요청하지 않습니다.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Polydeukes documentation
|
|
2
|
+
|
|
3
|
+
**English** · [한국어](./README.ko.md)
|
|
4
|
+
|
|
5
|
+
> A development discipline framework for building alongside an AI coding partner. Start where your
|
|
6
|
+
question is.
|
|
7
|
+
|
|
8
|
+
<a id="start-here"></a>
|
|
9
|
+
## Start here
|
|
10
|
+
|
|
11
|
+
| If you want to | Read |
|
|
12
|
+
|---|---|
|
|
13
|
+
| Get to a first visible judgment | [First judgment](./tutorials/first-judgment.md) — install, wire Claude Code, and watch one protected edit get judged |
|
|
14
|
+
| Connect Claude Code, Grok, or git | [Connect the surfaces](./how-to/connect-surfaces.md) — session and commit setup, including Grok |
|
|
15
|
+
| Shape the project config | [Configure the project](./how-to/configure-project.md) — discovery, IDE support, and advise versus block |
|
|
16
|
+
| Write a real discipline | [Write disciplines](./how-to/write-disciplines.md) — worked declarations, especially locale key pairing |
|
|
17
|
+
| Recover from a block or skip | [Troubleshooting](./troubleshooting.md) — the fail-closed states, the witness valve, and the log |
|
|
18
|
+
| Understand why the framework exists | [Why Polydeukes?](./why-polydeukes.md) — the design whitepaper |
|
|
19
|
+
| Contribute to these docs | [Contributing](./contributing.md) — bilingual pairs, stable IDs, catalog, and checks |
|
|
20
|
+
|
|
21
|
+
<a id="reference"></a>
|
|
22
|
+
## Reference
|
|
23
|
+
|
|
24
|
+
Every key, every subcommand, every exit code. These describe the present state only — nothing here
|
|
25
|
+
is aspirational.
|
|
26
|
+
|
|
27
|
+
| Document | Answers |
|
|
28
|
+
|---|---|
|
|
29
|
+
| [Configuration reference](./reference/configuration/index.md) | What may go in `polydeukes.config.yaml`, and what each key does |
|
|
30
|
+
| [`polydeukes` (the `pdks` CLI)](./reference/packages/polydeukes.md) | Package contract; subcommands live under [`reference/cli/`](./reference/cli/covenant-check.md) |
|
|
31
|
+
| [`@polydeukes/core`](./reference/packages/core.md) | The protocol, the input IR, the config schema, telemetry |
|
|
32
|
+
| [`@polydeukes/covenant`](./reference/packages/covenant.md) | The judge — dispatcher, discipline library, meta-covenants, the valve |
|
|
33
|
+
| [`@polydeukes/adapter-claude-code`](./reference/packages/adapter-claude-code.md) | Session surface — hook payloads become the input IR |
|
|
34
|
+
| [`@polydeukes/adapter-git`](./reference/packages/adapter-git.md) | Commit surface — staged, worktree, and range diffs become the input IR |
|
|
35
|
+
|
|
36
|
+
<a id="shape-of-the-thing"></a>
|
|
37
|
+
## The shape of the thing, in one page
|
|
38
|
+
|
|
39
|
+
Polydeukes judges what a developer or an AI agent is about to do, records the verdict, and by
|
|
40
|
+
default lets the work proceed. Three ideas carry the rest.
|
|
41
|
+
|
|
42
|
+
**A covenant is a promise, not a fence.** The disciplines it enforces are the ones a good developer
|
|
43
|
+
already imposes on themselves. They bind the human exactly as much as the AI, and the framework's
|
|
44
|
+
own authors get judged by them daily.
|
|
45
|
+
|
|
46
|
+
**Judging and stopping are separate decisions.** Every declared discipline is judged on every
|
|
47
|
+
matching call. What a break then does is a second question: by default it is recorded with its
|
|
48
|
+
reason and the call continues. `enforce: block` is a promotion the author chooses. The only things
|
|
49
|
+
that stop a call unasked are the framework's own protections.
|
|
50
|
+
|
|
51
|
+
**Every judgment leaves a row.** `.polydeukes/roi.log` holds one line per verdict, in a vocabulary
|
|
52
|
+
of six words. That record is how this project finds its own defects — including the ones described
|
|
53
|
+
in the whitepaper, which were all found by counting rows rather than by reading code.
|
|
54
|
+
|
|
55
|
+
<a id="two-surfaces"></a>
|
|
56
|
+
## Two surfaces
|
|
57
|
+
|
|
58
|
+
| Surface | Judges | Wired by | For |
|
|
59
|
+
|---|---|---|---|
|
|
60
|
+
| **Session** | A tool call, before it runs | `pdks init claude-code` or `pdks init grok` | A project developed with an AI partner |
|
|
61
|
+
| **Commit** | A diff — staged, the working tree, or a ref range | A pre-commit hook, or run on demand | A human developing alone, and CI |
|
|
62
|
+
|
|
63
|
+
The commit judge also answers on demand: `pdks covenant check --worktree` after a task, `--range`
|
|
64
|
+
before a PR. Same verdict a commit would receive, delivered as a report with no prompt and no gate.
|