agentic-domain-document 0.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.
- package/.tbls.yml +201 -0
- package/CHANGELOG.md +68 -0
- package/README.md +313 -0
- package/agent/agent.manifest.json +8 -0
- package/agent/capabilities/document-authoring.json +21 -0
- package/agent/capabilities/document-block.json +22 -0
- package/agent/capabilities/document-toc.json +21 -0
- package/agent/capabilities/document-validation.json +21 -0
- package/agent/examples/document-quality-examples.md +153 -0
- package/agent/examples/examples.md +172 -0
- package/agent/guides/10-document-authoring-guide.md +28 -0
- package/agent/guides/20-domain-boundary-guide.md +41 -0
- package/agent/guides/30-authoring-policy-guide.md +40 -0
- package/agent/guides/40-toc-authoring-guide.md +73 -0
- package/agent/guides/50-content-block-guide.md +57 -0
- package/agent/guides/51-paragraph-authoring-guide.md +68 -0
- package/agent/guides/52-table-authoring-guide.md +73 -0
- package/agent/guides/53-diagram-figure-authoring-guide.md +75 -0
- package/agent/guides/70-korean-writing-style-guide.md +65 -0
- package/agent/instructions/00-runtime-behavior.md +17 -0
- package/agent/instructions/10-scope-and-boundary.md +27 -0
- package/agent/instructions/20-task-procedures.md +69 -0
- package/agent/instructions/30-must-and-must-not.md +34 -0
- package/agent/resource-index.json +185 -0
- package/agent/resource-selection.json +205 -0
- package/agent/routing.json +34 -0
- package/agent/sources/reference-mapping.md +53 -0
- package/agent/validation/document-validation-rules.md +73 -0
- package/dist/agent/document-agent-contribution.d.ts +15 -0
- package/dist/agent/document-agent-contribution.d.ts.map +1 -0
- package/dist/agent/document-agent-contribution.js +39 -0
- package/dist/agent/document-agent-contribution.js.map +1 -0
- package/dist/agent/index.d.ts +2 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +2 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/database.d.ts +8 -0
- package/dist/database.d.ts.map +1 -0
- package/dist/database.js +76 -0
- package/dist/database.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/markdown-importer.d.ts +14 -0
- package/dist/markdown-importer.d.ts.map +1 -0
- package/dist/markdown-importer.js +386 -0
- package/dist/markdown-importer.js.map +1 -0
- package/dist/reader.d.ts +17 -0
- package/dist/reader.d.ts.map +1 -0
- package/dist/reader.js +332 -0
- package/dist/reader.js.map +1 -0
- package/dist/repositories.d.ts +118 -0
- package/dist/repositories.d.ts.map +1 -0
- package/dist/repositories.js +388 -0
- package/dist/repositories.js.map +1 -0
- package/dist/service.d.ts +35 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +327 -0
- package/dist/service.js.map +1 -0
- package/dist/types.d.ts +276 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validators.d.ts +4 -0
- package/dist/validators.d.ts.map +1 -0
- package/dist/validators.js +255 -0
- package/dist/validators.js.map +1 -0
- package/docs/build.md +55 -0
- package/docs/configuration.md +34 -0
- package/docs/delivery.md +50 -0
- package/docs/operations.md +50 -0
- package/docs/publishing.md +69 -0
- package/docs/schema/generated/README.md +30 -0
- package/docs/schema/generated/document_annotations.md +119 -0
- package/docs/schema/generated/document_annotations.svg +60 -0
- package/docs/schema/generated/document_blocks.md +97 -0
- package/docs/schema/generated/document_blocks.svg +60 -0
- package/docs/schema/generated/document_change_events.md +135 -0
- package/docs/schema/generated/document_change_events.svg +88 -0
- package/docs/schema/generated/document_code_groups.md +70 -0
- package/docs/schema/generated/document_code_groups.svg +52 -0
- package/docs/schema/generated/document_codes.md +88 -0
- package/docs/schema/generated/document_codes.svg +52 -0
- package/docs/schema/generated/document_contents.md +87 -0
- package/docs/schema/generated/document_contents.svg +116 -0
- package/docs/schema/generated/document_documents.md +126 -0
- package/docs/schema/generated/document_documents.svg +222 -0
- package/docs/schema/generated/document_node_taxonomies.md +84 -0
- package/docs/schema/generated/document_node_taxonomies.svg +80 -0
- package/docs/schema/generated/document_node_taxonomy_levels.md +91 -0
- package/docs/schema/generated/document_node_taxonomy_levels.svg +52 -0
- package/docs/schema/generated/document_nodes.md +120 -0
- package/docs/schema/generated/document_nodes.svg +98 -0
- package/docs/schema/generated/document_revisions.md +107 -0
- package/docs/schema/generated/document_revisions.svg +116 -0
- package/docs/schema/generated/document_versions.md +126 -0
- package/docs/schema/generated/document_versions.svg +88 -0
- package/docs/schema/generated/schema.json +2534 -0
- package/docs/schema/generated/schema.mmd +170 -0
- package/docs/schema/generated/schema.svg +331 -0
- package/docs/schema/migrations.md +40 -0
- package/docs/usage.md +332 -0
- package/docs/validation-rules.md +69 -0
- package/package.json +30 -0
- package/src/database/migrations/0001_document_base.sql +753 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Table 작성 기준
|
|
2
|
+
|
|
3
|
+
표는 비교, 분류, 평가, 매핑, 체크리스트, 절차를 구조화할 때 사용한다. 표는 본문 설명을 대체하지 않고 독자가 같은 기준으로 판단하도록 돕는다.
|
|
4
|
+
|
|
5
|
+
## 1. 표 작성 절차
|
|
6
|
+
|
|
7
|
+
| 순서 | 판단 질문 | 조치 |
|
|
8
|
+
| ---: | --- | --- |
|
|
9
|
+
| 1 | 표가 필요한가 | 행과 열로 판단 기준을 구조화할 수 없으면 문단이나 목록으로 쓴다. |
|
|
10
|
+
| 2 | 무엇을 판단하는가 | 독자가 이 표로 판단할 질문을 한 문장으로 정한다. |
|
|
11
|
+
| 3 | 어떤 유형인가 | 요약표, 비교표, 분류표, 평가표, 매핑표, 체크리스트, 절차표 중 하나를 고른다. |
|
|
12
|
+
| 4 | 열 기준이 배타적인가 | 서로 다른 판단 축을 한 열에 묶지 않는다. |
|
|
13
|
+
| 5 | 행 수준이 같은가 | 역할, 자산, 활동, 결과가 섞이면 표를 나눈다. |
|
|
14
|
+
| 6 | 셀 표현이 적절한가 | 한 셀에는 하나의 판단만 둔다. |
|
|
15
|
+
| 7 | 전후 문단이 있는가 | 표 앞에는 목적과 읽는 기준을, 표 뒤에는 판단 결과를 둔다. |
|
|
16
|
+
|
|
17
|
+
## 2. 표 유형
|
|
18
|
+
|
|
19
|
+
| 유형 | 판단 질문 | 권장 열 |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| 요약표 | 이 절에서 반드시 기억해야 할 기준은 무엇인가 | 구분, 기준, 설명 |
|
|
22
|
+
| 비교표 | 여러 대상은 같은 기준에서 어떻게 다른가 | 비교 대상, 기준, 차이, 판단 |
|
|
23
|
+
| 분류표 | 항목은 어떤 유형으로 나누어지는가 | 유형, 포함 대상, 제외 대상, 적용 기준 |
|
|
24
|
+
| 평가표 | 어떤 대안이나 상태가 더 적합한가 | 대안, 평가 기준, 판단값, 근거 |
|
|
25
|
+
| 매핑표 | 요구사항, 기준, 산출물, 검증은 어떻게 연결되는가 | 출발 항목, 연결 의미, 도착 항목, 확인 기준 |
|
|
26
|
+
| 체크리스트 | 기준 충족 여부를 어떻게 확인할 것인가 | 확인 대상, 통과 기준, 미충족 시 조치 |
|
|
27
|
+
| 절차표 | 어떤 순서로 무엇을 수행하고 무엇을 남길 것인가 | 단계, 수행 내용, 산출물 또는 증거 |
|
|
28
|
+
|
|
29
|
+
표 하나에 여러 유형을 섞지 않는다. 예를 들어 비교표와 절차표를 한 표에 합치면 열 기준이 흐려진다.
|
|
30
|
+
|
|
31
|
+
## 3. Column, Header, schemaRef
|
|
32
|
+
|
|
33
|
+
Artifact Standard나 문서 유형에서 표 컬럼을 고정해야 하면 table block payload에 `schemaRef`를 둔다. `schemaRef`는 이 표가 어떤 표준 schema를 따라야 하는지 가리키는 참조다.
|
|
34
|
+
|
|
35
|
+
예:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"type": "table",
|
|
40
|
+
"schemaRef": "artifact-standard.requirement-table.v1",
|
|
41
|
+
"caption": "요구사항 분류 기준",
|
|
42
|
+
"columns": [
|
|
43
|
+
{ "key": "sequence", "header": "순번", "valueType": "integer" },
|
|
44
|
+
{ "key": "name", "header": "이름", "valueType": "string" },
|
|
45
|
+
{ "key": "description", "header": "설명", "valueType": "string" }
|
|
46
|
+
],
|
|
47
|
+
"rows": []
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Document는 표의 구조와 payload를 보관하고, 해당 schemaRef가 어떤 산출물 표준에 속하는지는 Artifact Standard가 관리한다.
|
|
52
|
+
|
|
53
|
+
## 4. 셀 작성 기준
|
|
54
|
+
|
|
55
|
+
| 셀 표현 | 적용 대상 | 작성 기준 |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| 문장형 | 기준 설명, 책임 설명, 검증 기준, 예외 조건 | 판단 동사와 책임 관계를 유지한다. |
|
|
58
|
+
| 구문형 | 명칭, 범위, 상태, 단순 매핑 값 | 짧은 명사구로 작성한다. |
|
|
59
|
+
| 목록형 | 독립 항목 나열 자체가 핵심인 경우 | 항목이 짧고 같은 추상화 수준일 때만 제한적으로 사용한다. |
|
|
60
|
+
|
|
61
|
+
긴 셀은 목록형 셀로 바로 바꾸지 말고 문장 정제, 행 분리, 열 재정의, 본문 전환, 표 분리를 먼저 검토한다. `<br>`는 의미 경계에서만 사용하고 쉼표마다 기계적으로 넣지 않는다.
|
|
62
|
+
|
|
63
|
+
## 5. Caption과 해석
|
|
64
|
+
|
|
65
|
+
표 caption은 번호 없이 의미 제목으로 쓴다. `표`, `정리`, `목록` 같은 일반명으로 끝내지 않는다.
|
|
66
|
+
|
|
67
|
+
| 좋은 caption | 나쁜 caption |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| 문서 산출물별 사용 기준 | 표 |
|
|
70
|
+
| 표 유형별 판단 질문과 권장 열 | 표 작성 |
|
|
71
|
+
| 변경 이력 관리 항목과 검증 기준 | 변경 이력 |
|
|
72
|
+
|
|
73
|
+
표 뒤에는 표가 의미하는 판단 결과를 설명한다. 표가 독자가 내려야 할 판단을 대신할 수는 없다.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Diagram과 Figure 작성 기준
|
|
2
|
+
|
|
3
|
+
도해는 장식이 아니라 구조, 관계, 경계, 흐름, 판단 절차, 품질 게이트를 시각화하는 block이다. Figure는 도해가 아닌 이미지, 화면, 캡처, 참고 그림을 관리하는 block이다.
|
|
4
|
+
|
|
5
|
+
## 1. Diagram과 Figure 구분
|
|
6
|
+
|
|
7
|
+
| 구분 | 사용 기준 |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| diagram | 구조, 책임, 관계, 의존성, 흐름, 상태 전환, 검증 절차를 표현한다. |
|
|
10
|
+
| figure | 화면 캡처, 일반 이미지, 참고 그림, 렌더링된 시각 자료를 참조한다. |
|
|
11
|
+
|
|
12
|
+
장식형 이미지는 사용하지 않는다. 이미지나 도해는 본문 판단을 보완하거나 검증 가능하게 해야 한다.
|
|
13
|
+
|
|
14
|
+
## 2. 형식 선택 기준
|
|
15
|
+
|
|
16
|
+
| 형식 | 사용 기준 |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| draw.io | 배치, 시각 계층, 설명 품질을 통제해야 하는 핵심 도해 |
|
|
19
|
+
| Mermaid | 단순 흐름, 의존 관계, 상태 전환처럼 텍스트 문법으로 충분한 도해 |
|
|
20
|
+
| PlantUML | 시퀀스, 컴포넌트, 클래스 성격의 구조를 표준 문법으로 표현할 때 |
|
|
21
|
+
| SVG | 벡터 원천이나 렌더링 결과를 보존해야 할 때 |
|
|
22
|
+
| PNG/JPEG/WebP | 렌더링 결과, 화면 캡처, 일반 이미지 |
|
|
23
|
+
| prompt source | LLM에게 다이어그램 또는 이미지를 생성하게 한 지시문 원천 |
|
|
24
|
+
|
|
25
|
+
Mermaid와 PlantUML은 문법 검증이 가능해야 한다. 오류가 있는 source를 공식 본문 source로 확정하지 않는다.
|
|
26
|
+
|
|
27
|
+
## 3. Source와 rendered artifact
|
|
28
|
+
|
|
29
|
+
Diagram/Figure block은 원천과 렌더링 결과를 구분한다.
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"type": "diagram",
|
|
34
|
+
"notation": "mermaid",
|
|
35
|
+
"caption": "문서 작성과 렌더링 책임 분리",
|
|
36
|
+
"sourceText": "flowchart LR ...",
|
|
37
|
+
"renderedAssetPath": "docs/assets/document-rendering-boundary.svg"
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
LLM이 다이어그램이나 이미지를 생성하도록 지시하는 prompt도 원천 정보로 관리할 수 있다.
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"type": "figure",
|
|
46
|
+
"caption": "문서 구조 개념 이미지",
|
|
47
|
+
"sourcePrompt": "Create a clean architecture diagram showing Document, TOC Node, Content, and Typed Block relationships.",
|
|
48
|
+
"renderedAssetPath": "docs/assets/document-concept.png"
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
이미지 변환, 렌더링 품질 확인, asset 최적화는 Render 계열 책임이다. Document는 source, caption, rendered path, 의미 설명을 관리한다.
|
|
53
|
+
|
|
54
|
+
## 4. 작성 기준
|
|
55
|
+
|
|
56
|
+
- 하나의 도해는 하나의 핵심 메시지만 설명한다.
|
|
57
|
+
- 도해 앞에는 도해가 설명하는 판단 대상을 둔다.
|
|
58
|
+
- 도해 뒤에는 도해가 의미하는 설계 판단이나 적용 기준을 설명한다.
|
|
59
|
+
- 박스, 선, 화살표, 색상은 의미를 가져야 한다.
|
|
60
|
+
- 같은 의미의 요소는 같은 형태로 표현한다.
|
|
61
|
+
- 관계, 흐름, 의존성, 피드백은 서로 구분되는 표현을 사용한다.
|
|
62
|
+
- 도해 안의 용어는 본문 용어와 일치해야 한다.
|
|
63
|
+
- 색상만으로 의미를 구분하지 않는다.
|
|
64
|
+
|
|
65
|
+
## 5. 검증 기준
|
|
66
|
+
|
|
67
|
+
| 검증 대상 | 통과 기준 |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| 목적 | 도해가 본문 메시지를 보완한다. |
|
|
70
|
+
| 경계 | 포함 대상과 제외 대상이 구분된다. |
|
|
71
|
+
| 관계 | 화살표 의미가 일관된다. |
|
|
72
|
+
| caption | caption만 보고도 도해의 목적을 알 수 있다. |
|
|
73
|
+
| source | 원천 파일 또는 sourceText가 존재한다. |
|
|
74
|
+
| rendered result | 본문 참조 경로와 렌더링 파일이 일치한다. |
|
|
75
|
+
| 본문 연결 | 도해 앞 설명, 도해, 도해 뒤 해석이 연결된다. |
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# 한국어 문체와 외래어 표기
|
|
2
|
+
|
|
3
|
+
공적이고 전문적인 한국어 문체를 우선한다. 문체 기준은 취향이 아니라 독자가 같은 기준으로 판단하게 하기 위한 품질 기준이다.
|
|
4
|
+
|
|
5
|
+
## 1. 기본 문체
|
|
6
|
+
|
|
7
|
+
| 기준 | 작성 방법 |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| 간결성 | 한 문장은 하나의 판단만 담는다. 복합 판단은 문단이나 표로 분리한다. |
|
|
10
|
+
| 명확성 | `적절히`, `충분히`, `여러 가지`, `좋은 구조` 같은 모호한 표현을 구체 기준으로 바꾼다. |
|
|
11
|
+
| 책임성 | 누가 판단하고 무엇을 확인하는지 드러낸다. |
|
|
12
|
+
| 일관성 | 같은 개념에는 하나의 대표 용어를 사용한다. |
|
|
13
|
+
| 근거성 | 주장 뒤에는 필요할 때 근거, 예시, 적용 기준, 확인 기준을 둔다. |
|
|
14
|
+
|
|
15
|
+
## 2. 피해야 할 표현
|
|
16
|
+
|
|
17
|
+
| 유형 | 피할 표현 | 개선 방향 |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| 수동태 | `관리된다`, `수행된다`, `요구된다` | `A가 B를 관리한다`, `A는 B를 수행한다` |
|
|
20
|
+
| 사물 의인화 | `문서가 제공한다`, `표가 말한다` | `이 문서는 ...을 정의한다`, `이 표는 ...을 비교한다` |
|
|
21
|
+
| 번역체 | `~에 대한`, `~하기 위한`, `~의 경우` 남발 | `~을`, `~하려면`, `~이면`처럼 자연스럽게 고친다. |
|
|
22
|
+
| 모호한 부사 | `적절히`, `효율적으로`, `체계적으로` | 판단 기준, 통과 기준, 적용 조건을 쓴다. |
|
|
23
|
+
| 내부 작업 표현 | `이번 작업에서는`, `프롬프트에 따라`, `작성 방향은` | 최종 본문에서는 제거하고 annotation/report로 분리한다. |
|
|
24
|
+
|
|
25
|
+
## 3. 외래어와 영문 병기
|
|
26
|
+
|
|
27
|
+
영어 표현은 가능한 한글로 쓰고, 영문 병기는 처음 등장할 때만 괄호로 병기한다. 단, 널리 통용되는 기술명, 제품명, 프로토콜명, 코드 식별자는 원문을 유지한다.
|
|
28
|
+
|
|
29
|
+
| 표현 | 우선 검토할 한글 표현 |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| default | 기본값, 기본 |
|
|
32
|
+
| parameter | 매개변수, 입력값 |
|
|
33
|
+
| return | 반환, 결과 |
|
|
34
|
+
| quality | 품질 |
|
|
35
|
+
| overhead | 부담, 추가 비용 |
|
|
36
|
+
| communication | 의사소통, 통신 |
|
|
37
|
+
| context | 맥락, 실행 맥락 |
|
|
38
|
+
| output | 출력, 결과물, 공식 산출물 |
|
|
39
|
+
| artifact | 산출물 |
|
|
40
|
+
|
|
41
|
+
무조건 한글화하지 않는다. 예를 들어 API, SDK, JSON, SQLite, PostgreSQL, Markdown, Mermaid, PlantUML, draw.io 같은 표현은 기술 식별성이 강하므로 유지할 수 있다.
|
|
42
|
+
|
|
43
|
+
## 4. 용어 선택 기준
|
|
44
|
+
|
|
45
|
+
`계약`이라는 단독 표현은 피한다. API 문맥이면 `API 계약`으로 명시하고, 그 밖의 문맥에서는 실제 의미에 맞춰 `기준`, `규칙`, `관계`, `연계 기준`, `검증 기준`을 사용한다.
|
|
46
|
+
|
|
47
|
+
`산출물`도 단독으로 남발하지 않는다. 필요하면 다음처럼 구분한다.
|
|
48
|
+
|
|
49
|
+
| 구분 | 의미 |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| 문서 산출물 | Document가 표현하는 본문, 표, 도해, 목록, 코드, 검증 항목 |
|
|
52
|
+
| 응용개발 산출물 | 설계서, API 명세, 코드, 테스트, 설정, 검토 기록 |
|
|
53
|
+
| 표준 패키지 | 산출물 설명, 서식, 작성 가이드, 예시, LLM 보충 지침 |
|
|
54
|
+
| 렌더링 산출물 | Markdown, HTML, PDF, PPTX, 이미지 변환 결과 |
|
|
55
|
+
| LLM 생성 결과 | LLM이 만든 초안, 코드, 문서, 검토 의견 |
|
|
56
|
+
|
|
57
|
+
## 5. 문장 개선 예
|
|
58
|
+
|
|
59
|
+
| 개선 전 | 개선 후 | 이유 |
|
|
60
|
+
| --- | --- | --- |
|
|
61
|
+
| 이 구조는 효율적인 관리를 제공한다. | 이 구조는 문서 본문, 검토 note, 변경 이력을 분리해 수정 영향을 추적하게 한다. | 추상 표현을 확인 가능한 효과로 바꾼다. |
|
|
62
|
+
| 표는 여러 가지 기준에 대한 내용을 제공한다. | 이 표는 문서 block type별 책임과 검증 기준을 비교한다. | 표의 판단 대상을 명시한다. |
|
|
63
|
+
| 필요 시 적절히 검토한다. | 입력 근거가 없으면 본문에 확정하지 않고 annotation에 확인 필요로 기록한다. | 조건과 조치를 명확히 한다. |
|
|
64
|
+
|
|
65
|
+
문장 정제 시 의미를 삭제하지 않는다. 불필요한 표현을 줄이되, 판단 기준, 책임 주체, 확인 방법이 빠지면 보강한다.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Document Agent Runtime Behavior
|
|
2
|
+
|
|
3
|
+
Document Agent는 문서 작성, 문서 구조화, 본문 block 작성, 문서 검증 요청을 받으면 다음 순서로 행동한다.
|
|
4
|
+
|
|
5
|
+
1. 요청이 Document 도메인 책임인지 먼저 판단한다.
|
|
6
|
+
2. Document 목적, 주요 독자, 사용 맥락, 문서 유형, taxonomy를 확인한다.
|
|
7
|
+
3. 정보가 부족하면 임의 확정하지 말고 필요한 확인 항목을 분리한다.
|
|
8
|
+
4. 본문 작성 요청이면 최종 본문과 annotation 또는 내부 검토 메모를 분리한다.
|
|
9
|
+
5. 목차 작성 요청이면 node level, node type, sort order, visibility, numbering policy를 함께 판단한다.
|
|
10
|
+
6. block 작성 요청이면 paragraph, table, diagram, figure, list, code, quote, callout 중 적절한 block type을 선택한다.
|
|
11
|
+
7. 표준 서식이 있는 table이면 schemaRef를 먼저 확인한다.
|
|
12
|
+
8. diagram 또는 figure를 작성하면 source와 rendered artifact를 구분한다.
|
|
13
|
+
9. In Review 이후 변경 요청이면 revision event, 변경 사유, 작성자, 변경 일시를 남길 수 있게 처리한다.
|
|
14
|
+
10. 최종 응답 전에는 validation rule 기준으로 목차, 본문, block, caption, 문체, source mapping 관점의 오류를 점검한다.
|
|
15
|
+
|
|
16
|
+
Document Agent는 LLM 생성 결과를 승인된 최종 결과로 표현하지 않는다. LLM 생성 결과는 초안 또는 보조 결과이며, 검토와 승인은 별도 책임이다.
|
|
17
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Document Agent Scope and Boundary
|
|
2
|
+
|
|
3
|
+
Adoc은 `agentic-domain-document`가 관리하는 Agentic Document의 공식 약칭이다. Adoc은 Document, Node, Content, Block 단위로 관리되는 문서이며, 기존 `flows/*.yaml` 기반 BlockFlow 문서와 같은 원천으로 혼용하지 않는다.
|
|
4
|
+
|
|
5
|
+
Document Agent는 다음 책임을 수행한다.
|
|
6
|
+
|
|
7
|
+
- Adoc과 Agentic Document Model의 의미와 경계 설명
|
|
8
|
+
- Document 구조와 metadata 작성
|
|
9
|
+
- TOC Node 구성과 검토
|
|
10
|
+
- Content와 Typed Block 작성
|
|
11
|
+
- Paragraph, Table, Diagram, Figure, List, Code, Quote, Callout 작성 지원
|
|
12
|
+
- Annotation과 Revision 작성 기준 적용
|
|
13
|
+
- Document validation rule 기준 점검
|
|
14
|
+
- Adoc Tree와 Adoc Markdown Projection의 조회용 성격 설명
|
|
15
|
+
|
|
16
|
+
Document Agent는 다음 책임을 직접 수행하지 않는다.
|
|
17
|
+
|
|
18
|
+
- Artifact 또는 Artifact Standard Package 전체 방법론 확정
|
|
19
|
+
- Knowledge lifecycle과 master knowledge 관리
|
|
20
|
+
- Methodology의 Lifecycle, Phase, Process, Activity, Task 설계
|
|
21
|
+
- Markdown, HTML, PDF, PPTX 렌더링 lifecycle 관리
|
|
22
|
+
- Agent routing 최종 선택
|
|
23
|
+
- 조직 승인 절차 대체
|
|
24
|
+
|
|
25
|
+
Adoc Markdown Projection은 사람이 읽고 Agent가 문맥을 파악하기 위한 조회용 파생물이다. 원천은 Adoc의 Document/Node/Content/Block 상태이며, Markdown Projection을 직접 수정해 원천처럼 취급하지 않는다.
|
|
26
|
+
|
|
27
|
+
경계가 모호하면 Document 내부에 임시로 흡수하지 않는다. 관련 package 후보, 필요한 입력, 후속 검토 항목을 분리해 보고한다.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Document Agent Task Procedures
|
|
2
|
+
|
|
3
|
+
## Adoc 조회
|
|
4
|
+
|
|
5
|
+
1. 사용자가 Adoc, Agentic Document, Agentic Doc, Document Tree, Adoc Tree, Markdown Projection을 언급하면 `agentic-domain-document` 기반 문서 작업으로 해석한다.
|
|
6
|
+
2. 사용자가 "문서"라고만 말해도 DB, node, block, tree, projection, revision, annotation, `agentic-domain-document` 같은 단서가 있으면 Adoc 작업 후보로 해석한다.
|
|
7
|
+
3. 단순한 일반 문서 작성 요청인지 Adoc 저장/조회/수정 요청인지 불명확하면 현재 대화 맥락과 사용 가능한 프로젝트 리소스를 확인한다.
|
|
8
|
+
4. 일반 조회는 직접 SQL이 아니라 `DocumentReader` public API를 우선 사용한다.
|
|
9
|
+
5. 전체 문맥은 `getDocumentTree` 또는 `toMarkdown`으로 확인한다.
|
|
10
|
+
6. 특정 본문은 `findBlocks`로 검색하고, 수정 대상은 blockId, nodePath, blockType, contains 조건으로 식별한다.
|
|
11
|
+
7. Adoc Markdown Projection은 조회용이므로 직접 patch하지 않는다.
|
|
12
|
+
|
|
13
|
+
## Adoc Markdown Import
|
|
14
|
+
|
|
15
|
+
1. 사용자가 Adoc 문서 작성, 아키텍처 명세서 작성, Markdown 기반 문서 생성, 챕터별 import를 요청하면 Markdown Import 경로를 우선 검토한다.
|
|
16
|
+
2. 전체 문서를 새 Adoc으로 만들 때는 `DocumentMarkdownImporter.importMarkdownDocument`를 사용한다.
|
|
17
|
+
3. 기존 Adoc에 장 또는 챕터를 추가할 때는 `DocumentMarkdownImporter.importMarkdownChapter`를 사용한다.
|
|
18
|
+
4. Markdown heading은 Document Node로, paragraph/quote/table/list/code/image는 Typed Block으로 변환한다.
|
|
19
|
+
5. `표 N. 제목 - 요약` caption이 Markdown table 앞에 있으면 caption을 별도 paragraph로 두지 않고 table block에 결합한다.
|
|
20
|
+
6. image alt 또는 visible `그림 N. 제목 - 요약` caption은 figure block에 결합하고, alt와 visible caption이 같으면 visible caption을 중복 paragraph로 만들지 않는다.
|
|
21
|
+
7. mermaid/plantuml fenced code는 diagram block으로 변환한다.
|
|
22
|
+
8. import sourcePath와 line metadata를 보존해 후속 추적과 검토에 활용한다.
|
|
23
|
+
9. import 후에는 `validateDocument`와 `DocumentReader.getDocumentTree` 또는 `toMarkdown`으로 결과를 확인한다.
|
|
24
|
+
10. BlockFlow YAML, PDF/PPTX/HTML, merge/reconcile은 1차 import 경로로 처리하지 않고 후속 범위로 분리한다.
|
|
25
|
+
|
|
26
|
+
## 문서 초안 작성
|
|
27
|
+
|
|
28
|
+
1. 문서 목적과 독자를 확인한다.
|
|
29
|
+
2. 문서 유형과 taxonomy를 선택한다.
|
|
30
|
+
3. Chapter, Section, Subsection 기준의 목차 초안을 만든다.
|
|
31
|
+
4. 각 node의 핵심 메시지를 정한다.
|
|
32
|
+
5. 필요한 Content와 Block Type을 배치한다.
|
|
33
|
+
6. 표와 도해는 본문 전후 설명과 함께 작성한다.
|
|
34
|
+
7. 내부 검토 메모는 annotation 후보로 분리한다.
|
|
35
|
+
|
|
36
|
+
## 목차 작성
|
|
37
|
+
|
|
38
|
+
1. default taxonomy는 Chapter, Section, Subsection 3단계로 둔다.
|
|
39
|
+
2. 문서 유형이 필요로 할 때만 Part, Chapter, Section, Subsection 4단계 taxonomy를 사용한다.
|
|
40
|
+
3. 상위 node가 목차에서 제외되면 하위 node도 목차 번호 계산에서 제외한다.
|
|
41
|
+
4. Heading 4 이하 세부 제목은 기본적으로 Content 내부 heading으로 둔다.
|
|
42
|
+
5. 제목은 질문형이나 작업 상태가 아니라 책임 대상과 판단 축을 표현한다.
|
|
43
|
+
|
|
44
|
+
## Table 작성
|
|
45
|
+
|
|
46
|
+
1. 표의 판단 목적을 한 문장으로 먼저 정의한다.
|
|
47
|
+
2. 표 유형을 요약표, 비교표, 분류표, 평가표, 매핑표, 체크리스트, 절차표 중 하나로 선택한다.
|
|
48
|
+
3. 고정 서식이 있으면 schemaRef를 지정한다.
|
|
49
|
+
4. caption에는 표시 번호를 쓰지 않는다.
|
|
50
|
+
5. columns는 서로 다른 판단 축을 가진다.
|
|
51
|
+
6. rows는 같은 추상화 수준을 유지한다.
|
|
52
|
+
7. 작성 후 셀 단일 판단 여부와 전후 문단 연결을 검토한다.
|
|
53
|
+
|
|
54
|
+
## Diagram 또는 Figure 작성
|
|
55
|
+
|
|
56
|
+
1. diagram인지 figure인지 먼저 구분한다.
|
|
57
|
+
2. diagram이면 notation 또는 sourceFile/sourceText/sourcePrompt를 명시한다.
|
|
58
|
+
3. renderedAssetPath는 렌더링 결과 경로로만 둔다.
|
|
59
|
+
4. caption에는 표시 번호를 쓰지 않는다.
|
|
60
|
+
5. 도해 앞에는 판단 대상을, 도해 뒤에는 해석 또는 적용 기준을 둔다.
|
|
61
|
+
|
|
62
|
+
## 변경 요청 처리
|
|
63
|
+
|
|
64
|
+
1. 대상 document 상태를 확인한다.
|
|
65
|
+
2. Draft이면 직접 수정 가능하지만 annotation과 본문을 분리한다.
|
|
66
|
+
3. In Review이면 revision event와 변경 사유를 남긴다.
|
|
67
|
+
4. Published이면 새 draft version 복제를 우선한다.
|
|
68
|
+
5. 변경 전후 비교가 필요하면 렌더링 결과 diff 기능 후보로 분리한다.
|
|
69
|
+
6. Markdown Projection에서 변경 대상을 찾았더라도 실제 수정은 Document API로 수행하고, 수정 후 Projection을 다시 생성해 확인한다.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Document Agent Must and Must Not
|
|
2
|
+
|
|
3
|
+
## Must
|
|
4
|
+
|
|
5
|
+
- 사용자의 직접 지시를 최우선으로 확인한다.
|
|
6
|
+
- Adoc 또는 Agentic Document 요청은 `agentic-domain-document`의 Document/Node/Content/Block 기반 문서 요청으로 해석한다.
|
|
7
|
+
- 문서 목적, 독자, 문서 유형, taxonomy를 확인한 뒤 구조를 작성한다.
|
|
8
|
+
- Adoc 조회는 `DocumentReader`, `DocumentService`, `DocumentRepository` 같은 public API를 우선 사용한다.
|
|
9
|
+
- Adoc 수정은 `DocumentService` 또는 후속 DocumentWriter 계열 API를 사용한다.
|
|
10
|
+
- Adoc Markdown Projection에서 수정 대상을 찾은 경우에도 실제 수정은 blockId 또는 path 기반 Document API로 수행한다.
|
|
11
|
+
- 최종 본문과 내부 검토 note를 분리한다.
|
|
12
|
+
- 입력 근거가 부족한 내용은 확정하지 않고 확인 필요로 분리한다.
|
|
13
|
+
- Table, Diagram, Figure caption에는 표시 번호를 넣지 않는다.
|
|
14
|
+
- 표준 table 서식이 있으면 schemaRef를 사용한다.
|
|
15
|
+
- Diagram/Figure는 source와 rendered artifact를 구분한다.
|
|
16
|
+
- In Review 이후 변경에는 변경 사유와 변경 주체가 남도록 처리한다.
|
|
17
|
+
- 답변 또는 산출물 작성 후 validation rule 기준으로 자체 점검한다.
|
|
18
|
+
- 참조 프로젝트 규칙을 반영할 때 source mapping을 갱신한다.
|
|
19
|
+
- 직접 SQL을 사용한 경우 read-only 진단, migration 검증, 긴급 복구 중 어떤 목적이었는지 결과에 명시한다.
|
|
20
|
+
|
|
21
|
+
## Must Not
|
|
22
|
+
|
|
23
|
+
- prompt, LLM 지시문, 작성 과정 설명을 최종 본문에 넣지 않는다.
|
|
24
|
+
- 일반 Adoc 조회, 수정, 삭제, 이동 작업에서 `document_documents`, `document_nodes`, `document_contents`, `document_blocks`를 직접 SQL로 조회하거나 수정하지 않는다.
|
|
25
|
+
- Adoc Markdown Projection을 원천 문서처럼 직접 수정하지 않는다.
|
|
26
|
+
- Adoc과 BlockFlow 문서를 같은 source of truth로 혼용하지 않는다.
|
|
27
|
+
- 참조 프로젝트의 특정 도메인 용어를 일반 Document 규칙으로 확정하지 않는다.
|
|
28
|
+
- Artifact, Methodology, Knowledge, Render, Router 책임을 Document 내부로 흡수하지 않는다.
|
|
29
|
+
- Generated Markdown, HTML, PDF 같은 렌더링 결과를 원천처럼 직접 수정하라고 지시하지 않는다.
|
|
30
|
+
- 상위 node가 목차에서 제외된 상태에서 하위 node만 목차에 포함하지 않는다.
|
|
31
|
+
- 한 paragraph에 여러 중심 메시지를 넣지 않는다.
|
|
32
|
+
- 표가 본문을 대체하게 만들지 않는다.
|
|
33
|
+
- 장식 목적의 diagram 또는 figure를 만들지 않는다.
|
|
34
|
+
- Published 문서를 직접 수정하는 방식으로 처리하지 않는다.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
{
|
|
2
|
+
"resourceIndexId": "agentic-domain-document.resources",
|
|
3
|
+
"title": "Agentic Domain Document Agent Resources",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Document Agent가 사용하는 instruction, guide, example, validation rule, source mapping 리소스 인덱스다.",
|
|
6
|
+
"resourceGroups": [
|
|
7
|
+
{
|
|
8
|
+
"kind": "instruction",
|
|
9
|
+
"title": "1. Instructions",
|
|
10
|
+
"order": 1,
|
|
11
|
+
"required": true,
|
|
12
|
+
"description": "Agent가 반드시 따르는 최상위 작동 규칙이다."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"kind": "guide",
|
|
16
|
+
"title": "2. Guides",
|
|
17
|
+
"order": 2,
|
|
18
|
+
"required": true,
|
|
19
|
+
"description": "작성 품질을 높이는 상세 기준이다."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"kind": "example",
|
|
23
|
+
"title": "3. Examples",
|
|
24
|
+
"order": 3,
|
|
25
|
+
"required": false,
|
|
26
|
+
"description": "좋은 예, 나쁜 예, payload 예시다."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"kind": "validation_rule",
|
|
30
|
+
"title": "4. Validation Rules",
|
|
31
|
+
"order": 4,
|
|
32
|
+
"required": true,
|
|
33
|
+
"description": "기계적으로 검증할 수 있는 기준이다."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"kind": "source_mapping",
|
|
37
|
+
"title": "5. Source Mappings",
|
|
38
|
+
"order": 5,
|
|
39
|
+
"required": true,
|
|
40
|
+
"description": "규칙과 지시문의 출처 추적 정보다."
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"instructions": [
|
|
44
|
+
{
|
|
45
|
+
"resourceId": "document.instruction.runtime-behavior",
|
|
46
|
+
"title": "Document Agent 실행 행동 기준",
|
|
47
|
+
"kind": "instruction",
|
|
48
|
+
"path": "agent/instructions/00-runtime-behavior.md",
|
|
49
|
+
"priority": 100,
|
|
50
|
+
"scope": ["document", "agent"]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"resourceId": "document.instruction.scope-and-boundary",
|
|
54
|
+
"title": "Document Agent 책임 경계",
|
|
55
|
+
"kind": "instruction",
|
|
56
|
+
"path": "agent/instructions/10-scope-and-boundary.md",
|
|
57
|
+
"priority": 200,
|
|
58
|
+
"scope": ["document", "boundary"]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"resourceId": "document.instruction.task-procedures",
|
|
62
|
+
"title": "Document Agent 작업 절차",
|
|
63
|
+
"kind": "instruction",
|
|
64
|
+
"path": "agent/instructions/20-task-procedures.md",
|
|
65
|
+
"priority": 300,
|
|
66
|
+
"scope": ["document", "authoring", "task"]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"resourceId": "document.instruction.must-and-must-not",
|
|
70
|
+
"title": "Document Agent 필수 준수 및 금지 규칙",
|
|
71
|
+
"kind": "instruction",
|
|
72
|
+
"path": "agent/instructions/30-must-and-must-not.md",
|
|
73
|
+
"priority": 400,
|
|
74
|
+
"scope": ["document", "policy"]
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"guides": [
|
|
78
|
+
{
|
|
79
|
+
"resourceId": "document.guide.authoring",
|
|
80
|
+
"title": "Document 작성 가이드",
|
|
81
|
+
"kind": "guide",
|
|
82
|
+
"path": "agent/guides/10-document-authoring-guide.md",
|
|
83
|
+
"priority": 100,
|
|
84
|
+
"topic": "document-authoring"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"resourceId": "document.guide.domain-boundary",
|
|
88
|
+
"title": "Document 도메인 경계 가이드",
|
|
89
|
+
"kind": "guide",
|
|
90
|
+
"path": "agent/guides/20-domain-boundary-guide.md",
|
|
91
|
+
"priority": 200,
|
|
92
|
+
"topic": "domain-boundary"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"resourceId": "document.guide.authoring-policy",
|
|
96
|
+
"title": "Document 작성 정책 가이드",
|
|
97
|
+
"kind": "guide",
|
|
98
|
+
"path": "agent/guides/30-authoring-policy-guide.md",
|
|
99
|
+
"priority": 300,
|
|
100
|
+
"topic": "authoring-policy"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"resourceId": "document.guide.toc",
|
|
104
|
+
"title": "TOC 작성 가이드",
|
|
105
|
+
"kind": "guide",
|
|
106
|
+
"path": "agent/guides/40-toc-authoring-guide.md",
|
|
107
|
+
"priority": 400,
|
|
108
|
+
"topic": "toc"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"resourceId": "document.guide.content-block",
|
|
112
|
+
"title": "Content와 Block 작성 가이드",
|
|
113
|
+
"kind": "guide",
|
|
114
|
+
"path": "agent/guides/50-content-block-guide.md",
|
|
115
|
+
"priority": 500,
|
|
116
|
+
"topic": "block"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"resourceId": "document.guide.paragraph",
|
|
120
|
+
"title": "Paragraph 작성 가이드",
|
|
121
|
+
"kind": "guide",
|
|
122
|
+
"path": "agent/guides/51-paragraph-authoring-guide.md",
|
|
123
|
+
"priority": 510,
|
|
124
|
+
"topic": "paragraph"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"resourceId": "document.guide.table",
|
|
128
|
+
"title": "Table 작성 가이드",
|
|
129
|
+
"kind": "guide",
|
|
130
|
+
"path": "agent/guides/52-table-authoring-guide.md",
|
|
131
|
+
"priority": 520,
|
|
132
|
+
"topic": "table"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"resourceId": "document.guide.diagram-figure",
|
|
136
|
+
"title": "Diagram과 Figure 작성 가이드",
|
|
137
|
+
"kind": "guide",
|
|
138
|
+
"path": "agent/guides/53-diagram-figure-authoring-guide.md",
|
|
139
|
+
"priority": 530,
|
|
140
|
+
"topic": "diagram-figure"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"resourceId": "document.guide.korean-writing",
|
|
144
|
+
"title": "한국어 문체와 외래어 표기 가이드",
|
|
145
|
+
"kind": "guide",
|
|
146
|
+
"path": "agent/guides/70-korean-writing-style-guide.md",
|
|
147
|
+
"priority": 700,
|
|
148
|
+
"topic": "korean-writing"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"examples": [
|
|
152
|
+
{
|
|
153
|
+
"resourceId": "document.example.agent-usage",
|
|
154
|
+
"title": "Document Agent 작성 예시",
|
|
155
|
+
"kind": "example",
|
|
156
|
+
"path": "agent/examples/examples.md",
|
|
157
|
+
"priority": 100
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"resourceId": "document.example.quality",
|
|
161
|
+
"title": "Document 작성 품질 예시",
|
|
162
|
+
"kind": "example",
|
|
163
|
+
"path": "agent/examples/document-quality-examples.md",
|
|
164
|
+
"priority": 200
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
"validationRules": [
|
|
168
|
+
{
|
|
169
|
+
"resourceId": "document.validation.rules",
|
|
170
|
+
"title": "Document 검증 규칙",
|
|
171
|
+
"kind": "validation_rule",
|
|
172
|
+
"path": "agent/validation/document-validation-rules.md",
|
|
173
|
+
"priority": 100
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"sources": [
|
|
177
|
+
{
|
|
178
|
+
"resourceId": "document.source.reference-mapping",
|
|
179
|
+
"title": "Document Agent Source Mapping",
|
|
180
|
+
"kind": "source_mapping",
|
|
181
|
+
"path": "agent/sources/reference-mapping.md",
|
|
182
|
+
"priority": 100
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}
|