@solaqua/ghosts 0.1.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/README.md +41 -0
- package/common/AGENTS.md +19 -0
- package/engineering/skills/code-review/SKILL.md +46 -0
- package/engineering/skills/deep-module/SKILL.md +9 -0
- package/engineering/skills/explain-diff/SKILL.md +24 -0
- package/engineering/skills/github-pr/SKILL.md +36 -0
- package/engineering/skills/loop-coding/SKILL.md +46 -0
- package/engineering/skills/loop-plan/SKILL.md +229 -0
- package/engineering/skills/socratic-interview/SKILL.md +22 -0
- package/engineering/skills/task-handoff/SKILL.md +37 -0
- package/engineering/skills/work-breakdown/SKILL.md +26 -0
- package/manifest.json +3 -0
- package/package.json +22 -0
- package/registry/skul.refs.json +55 -0
- package/research/skills/decision-research/SKILL.md +56 -0
- package/research/skills/loop-research/SKILL.md +120 -0
- package/tools/skills/vibe-notion/SKILL.md +138 -0
- package/tools/skills/vibe-notion/UPSTREAM.md +15 -0
- package/tools/skills/vibe-notion/references/batch-operations.md +100 -0
- package/tools/skills/vibe-notion/references/block-types.md +73 -0
- package/tools/skills/vibe-notion/references/common-patterns.md +165 -0
- package/tools/skills/vibe-notion/references/output-format.md +126 -0
- package/tools/skills/vibe-notion/templates/create-page.sh +32 -0
- package/tools/skills/vibe-notion/templates/query-database.sh +12 -0
- package/tools/skills/vibe-notion/templates/read-page.sh +16 -0
- package/tools/skills/vibe-notion/templates/workspace-overview.sh +19 -0
- package/writing/skills/cold-reader/README.md +7 -0
- package/writing/skills/cold-reader/SKILL.md +48 -0
- package/writing/skills/eli5/SKILL.md +7 -0
- package/writing/skills/humanize-korean/SKILL.md +94 -0
- package/writing/skills/humanize-korean/references/ai-tell-taxonomy.md +149 -0
- package/writing/skills/humanize-korean/references/metrics.py +809 -0
- package/writing/skills/humanize-korean/references/quick-rules.md +107 -0
- package/writing/skills/humanize-korean/references/rewriting-playbook.md +122 -0
- package/writing/skills/humanize-korean/tests/test_metrics.py +176 -0
- package/writing/skills/loop-skills/SKILL.md +101 -0
- package/writing/skills/rewrite/SKILL.md +50 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Quick Rules
|
|
2
|
+
|
|
3
|
+
한 번의 응답 안에서 탐지, 윤문, 자체검증을 끝내기 위한 핵심 규칙이다.
|
|
4
|
+
|
|
5
|
+
## 보존 대상
|
|
6
|
+
|
|
7
|
+
다음 구간은 탐지하거나 수정하지 않는다.
|
|
8
|
+
|
|
9
|
+
- 고유명사, 제품명, 모델명, 기관명.
|
|
10
|
+
- 수치, 날짜, 단위, 법률 조항, 수학·화학·통계 표기.
|
|
11
|
+
- 따옴표로 묶인 인용문은 발화자 표지가 없어도 기본 보호한다. 필자의 자문·강조임이 문맥상 명확한 수사 장치만 예외적으로 다룬다.
|
|
12
|
+
- LLM, GPU, API, MCP 같은 표준 기술 약어.
|
|
13
|
+
|
|
14
|
+
서법 보존: 당위·요구("~해야 한다")와 추측·유보("~일 수 있다", "~로 보인다")를 사실 단정으로 바꾸지 않는다. 반복을 줄일 때도 서법 표지는 유지하고 문장 배치나 형태만 바꾼다.
|
|
15
|
+
|
|
16
|
+
내용 앵커: 문장별 주어·목적어·보어의 핵심 명사·개념어를 먼저 표시한다. 조사·어미는 바꿀 수 있지만 앵커의 원형을 삭제하거나 동의어로 치환하지 않는다.
|
|
17
|
+
|
|
18
|
+
## 수정 순서
|
|
19
|
+
|
|
20
|
+
1. D 관용구
|
|
21
|
+
2. A 번역투
|
|
22
|
+
3. I 형식명사
|
|
23
|
+
4. G 완곡 표현
|
|
24
|
+
5. H 접속사
|
|
25
|
+
6. F 수식·명사화
|
|
26
|
+
7. B 영어 과다
|
|
27
|
+
8. C/J 구조·장식
|
|
28
|
+
9. E 리듬
|
|
29
|
+
|
|
30
|
+
## 핵심 패턴
|
|
31
|
+
|
|
32
|
+
| ID | 심각도 | 패턴 | 처방 |
|
|
33
|
+
|---|---|---|---|
|
|
34
|
+
| A-1 | S1 | `~에 대해(서)`가 한 문단에 3회 이상 밀집 | 일부만 목적격 조사로 직결한다. 단발 사용은 보존한다. |
|
|
35
|
+
| A-2 | S2 | `~를 통해/통하여`가 한 문단에 3회 이상 반복 | 일부만 `~로`, `~해서`, `~함으로써`로 분산한다. |
|
|
36
|
+
| A-3 | S1 | `~에 있어(서)` | `~에서`, `~을 볼 때`로 바꾼다. |
|
|
37
|
+
| A-4 | S2 | `~라는 점에서` 3회 이상 | `~서`, `~라는 이유로`로 줄인다. |
|
|
38
|
+
| A-5 | S2 | `~와 관련하여/관련된` | `~에`, `~의`, 목적격 조사로 줄인다. |
|
|
39
|
+
| A-6 | S2 | `~에 기반하여/바탕으로` 남발 | `~로`, `~을 보고`, `~를 근거로`로 바꾼다. |
|
|
40
|
+
| A-7 | S1 | `가지고 있다`, `회의를 가지다` | 동사·형용사로 환원한다. |
|
|
41
|
+
| A-8 | S1 | 이중 피동 `~되어진다` | 능동 또는 단일 피동으로 바꾼다. |
|
|
42
|
+
| A-9 | S2 | `~에 의해` 피동 | 행위자를 주어로 올린다. |
|
|
43
|
+
| A-10 | S2 | 같은 `~할 수 있다`가 4회 이상 반복 | 능력·허용이면 보존하고, 가능성·전망 문맥에서만 같은 서법의 `~할 수도 있다`·`~할 가능성이 있다`로 일부 분산한다. `~할 여지가 있다`는 가능성 의미가 확인될 때만 쓴다. |
|
|
44
|
+
| A-11 | S2 | `~을 위해`가 한 문단에 밀집 | `~려고`, `~도록`, `~위한`으로 일부만 바꾼다. 단발 사용은 보존한다. |
|
|
45
|
+
| A-15 | S2 | 추상 주어 + 만능 동사 | 구체 주어 또는 원인·근거 절로 바꾼다. |
|
|
46
|
+
| A-16 | S1 | 대명사 출현마다 직전 2문장의 선행 명사구 후보를 확인 | 후보 0개면 명사구 복원(확정 불가면 유지), 1개면 생략, 2개 이상이면 명사구로 되짚는다. 삭제 비율 목표는 두지 않는다. |
|
|
47
|
+
| A-18 | S2 | 명사 앞 긴 좌향 수식 | 문장을 나누거나 후치 동격절로 푼다. |
|
|
48
|
+
| A-19 | S2 | `~에서의/~에로의/~으로의/~에의/~으로부터의` | 절로 풀어 쓴다. 단순 `~의`는 제외한다. |
|
|
49
|
+
| A-20 | S2 | `~되고 있다/~지고 있다`가 한 문단에 3회 이상 | 의미가 유지될 때 일부만 단순 시제로 환원한다. |
|
|
50
|
+
| A-21 | S2 | `단순한 X를 넘어 Y` | `X만이 아니라 Y`로 풀되, 새 내용을 보태지 않는다. |
|
|
51
|
+
| A-22 | S2 | `~은/는 명확하다·분명하다` | 평가 술어를 걷고 명제를 직접 쓴다. 이미 논증한 결론이면 보존한다. |
|
|
52
|
+
| A-23 | S2 | `발판·토대·초석을 마련하다`, `지평을 열다` 전망형 | 은유를 원문에 있는 실제 결과로 풀되, 결과가 불명확하면 보존한다. 과거 사실·인용·실물 기반은 보존한다. |
|
|
53
|
+
| A-24 | S2 | `더 이상 ~ 않다/아니다`가 2회 이상 또는 결말부 재정의에 등장 | `이제`로 바꾸거나 변화 동사로 편다. 부정 명제를 긍정으로 바꾸지 않으며 해당 골격을 새로 만들지 않는다. |
|
|
54
|
+
| B-1 | S2 | 한글 용어 뒤 영어 괄호 반복 | 첫 등장만 병기한다. |
|
|
55
|
+
| B-2 | S2 | 번역 가능한 영어를 그대로 둠 | 의미를 해치지 않을 때 한국어로 옮긴다. |
|
|
56
|
+
| C-5 | S1 | 이모지 남발 | 칼럼, 리포트, 공적 문서에서는 삭제한다. |
|
|
57
|
+
| C-7 | S2 | `먼저/반면/결국` 3단 공식 | 접속사를 줄이거나 산문에 녹인다. |
|
|
58
|
+
| C-8 | S2 | `A인가, B인가`·`A가 아니라 B`·`~것이 아니라`·`~것은 아니다` 대구가 2회 이상 반복 | 하나만 남기고 나머지는 비대칭 평서문으로 푼다. 사람의 수사일 수 있으므로 연쇄가 아니면 보존하고, 전부 없애지 않는다. |
|
|
59
|
+
| C-9 | S2 | `(1)`, `(2)`, `(3)` 인덱싱 | 산문이나 단순 줄바꿈으로 바꾼다. |
|
|
60
|
+
| C-10 | S1 | 콜론 부제 `X: Y` 반복 | 헤딩을 짧게 하거나 평서형으로 바꾼다. |
|
|
61
|
+
| C-11 | S1 | 연결어미 바로 뒤 쉼표 | 문법상 필요 없으면 제거한다. 윤문 후 개수가 원문보다 늘면 실패다. |
|
|
62
|
+
| D-1 | S1 | `결론적으로`, `따라서`, `이를 통해`, `그러므로`, `요약하면`, `정리하면`, `정리하자면` 3회 이상 | 대부분 삭제하고 필요한 1-2개만 남긴다. |
|
|
63
|
+
| D-2 | S1 | `시사하는 바가 크다`, `주목할 만하다`, `간과할 수 없다` | 삭제하거나 구체 결론으로 바꾼다. |
|
|
64
|
+
| D-3 | S1 | `본질적으로`, `핵심적으로` | 대비에 필요하지 않으면 삭제한다. |
|
|
65
|
+
| D-4 | S1 | hype 어휘 반복 | 삭제하거나 원문 사실로 대체한다. |
|
|
66
|
+
| D-5 | S1 | 의인화된 추상 주어 | 사람, 기관, 평범한 주어로 되돌린다. |
|
|
67
|
+
| D-6 | S1 | `~할 때다`, `~시점이다`, `지금이야말로` 공식 결말 | 구체 서술로 낮추되, `~해야 한다` 같은 당위 표지는 다른 서법으로 바꾸지 않는다. |
|
|
68
|
+
| D-7 | S2 | `X에서 Y로` 반복 | 하나만 남기고 일반 서술로 바꾼다. |
|
|
69
|
+
| D-8 | S2 | `필요한/중요한 것은 X이다`, `문제는/핵심은 X다` 분열문 | 주어와 서술을 직결한다. |
|
|
70
|
+
| D-9 | S2 | `결국 ~로 이어진다`, `~에 직결된다` 결산 반복 | 인과 경로를 구체화하거나 단문으로 나눈다. `결국`·`이유다`를 새로 주입하지 않는다. |
|
|
71
|
+
| D-10 | S2 | 문장 말미 `~하는 이유다` 도치 결산 | `그래서 ~다`처럼 순방향으로 풀되 새 결산 공식을 만들지 않는다. |
|
|
72
|
+
| D-11 | S2 | 결말부의 `향후/앞으로/중장기적으로` | 실제 시점·조건이 원문에 있을 때만 살리고, 없으면 시간어를 줄인다. |
|
|
73
|
+
| D-12 | S2 | 독립 문장 `과제도 남아 있다/한계도 분명하다` | 문패를 덜고 원문에 있는 실제 과제·한계를 직접 쓴다. |
|
|
74
|
+
| D-13 | S2 | 에세이 결말의 `어쩌면/비로소/천천히` 공식 | 에세이 장르에서만 성찰 부사를 줄인다. |
|
|
75
|
+
| D-14 | S2 | `진단은 서늘하다/경고는 아프다` 같은 감각 술어 1회 이상, 사람 글에서 드문 개념 은유 1회 이상, 그 밖의 개념 은유 3회 이상, 또는 같은 은유 어근 3회 이상 반복 | 감각 술어는 구체 서술로, 반복 은유는 명제를 보존한 평서로 직역화한다. 중심 은유·명제 불명·새 은유 주입은 보존한다. 관통 은유도 가장 효과적인 1회만 남긴다. |
|
|
76
|
+
| E-1 | S2 | 문장 길이 균일 | 짧은 문장 또는 긴 문장으로 리듬을 섞는다. |
|
|
77
|
+
| E-2 | S2 | `~다` 종결 4회 이상, `~고 있다` 남발 | 종결과 시제를 섞고 단순 시제로 환원한다. |
|
|
78
|
+
| E-7 | S2 | 대화·구어의 말높임 불일치 | 한 화자·문단 안 말높임을 일관시킨다. |
|
|
79
|
+
| F-4 | S2 | `-성/-적/-화`, `-tion/-ment/-ness/-ity` 명사화 누적 | 동사·형용사로 환원한다. |
|
|
80
|
+
| F-5 | S2 | 추상 `~적 N` 체인 | 명사+명사 또는 구체 절로 바꾼다. |
|
|
81
|
+
| F-7 | S2 | `확대·강화·개선·확보·마련·구축` 같은 정책 동사가 추상 목적어와 함께 한 문단에 누적 | 실제 행위와 대상을 풀어 쓴다. 당위나 확신을 더하지 않는다. |
|
|
82
|
+
| G-1 | S2 | 같은 `~로 보인다/~로 판단된다/~라고 여겨진다` 반복 | 단정으로 바꾸지 말고 유보 강도를 유지한 채 형태만 바꾼다. |
|
|
83
|
+
| G-2 | S2 | 이중·삼중 완곡 `~할 가능성이 있을 수 있다` | 완곡 하나만 남기되 극성·확신도는 보존한다. |
|
|
84
|
+
| G-3 | S2 | `양쪽 모두`, `신중하게`, `균형` 4회 이상 | 근거가 충분할 때만 구체 비교나 조건으로 바꾼다. 근거가 약한 신호이므로 단독 판정하지 않는다. |
|
|
85
|
+
| H-1 | S2 | 문두 접속사가 한 문단에 3회 이상 반복 | 그 문단에서 일부만 덜어낸다. 문서 전체를 일괄 삭제하지 않는다. |
|
|
86
|
+
| H-3 | S2 | `이는`, `이 점에서`, `이 관점에서`, `이 말은`이 한 문단에 3회 이상 반복 | 일부만 본 서술로 직진한다. 단발 사용은 보존한다. |
|
|
87
|
+
| H-4 | S2 | `즉` 남발 | 기술 설명문이 아니면 1회 이하로 줄인다. |
|
|
88
|
+
| I-1 | S1 | `~인 것이다/~한 것이다`가 연속 3회 이상 반복 | 일부만 평서형으로 바꾸며, 단발 사용은 보존한다. |
|
|
89
|
+
| I-2 | S2 | `X은 ~라는 점에 있다` | `X는 ~다`로 쓴다. |
|
|
90
|
+
| I-3 | S2 | `~다는 뜻이다/~다는 의미다` | 의미를 문장 안에 녹인다. |
|
|
91
|
+
| I-4 | S2 | `~해야 한다/~할 필요가 있다/요구된다`로 끝나는 문단이 2개 이상 | 첫 문단을 제외하고 당위 문장을 앞·중간으로 이동한다. 삭제·병합·서법 치환은 금지한다. |
|
|
92
|
+
| I-5 | S2 | `~이/가 필요하다`를 일괄적으로 구체화 | 주체를 보완할 수 있을 때만 구체화하고, `~해야 한다`를 새로 늘리지 않는다. |
|
|
93
|
+
| I-7 | S2 | 출처 없는 `~다는 분석이다/평가다` 종결 | 출처가 있으면 보존하고, 없으면 직접 서술로 바꾼다. 출처를 만들지 않는다. |
|
|
94
|
+
| J-1 | S2 | 마크다운 볼드 남발 | 본문에서는 제거한다. |
|
|
95
|
+
| J-2 | 강조 따옴표 5회 이상 | 실제 인용이나 핵심 용례만 남긴다. |
|
|
96
|
+
| J-3 | 칼럼·리포트의 불릿 리스트 | 목록 구조가 필요 없으면 산문으로 통합한다. |
|
|
97
|
+
|
|
98
|
+
## 자체검증
|
|
99
|
+
|
|
100
|
+
1. 고유명사, 수치, 날짜, 따옴표로 묶인 인용문, 기술 약어와 문장별 핵심 내용 앵커가 보존됐다.
|
|
101
|
+
2. 변경률이 30% 이하이면 통과한다. 30% 초과 50% 미만이면 재검토 후 경고를 붙이고, 50% 이상이면 원문을 복원한다.
|
|
102
|
+
3. 장르가 이탈하지 않았다.
|
|
103
|
+
4. 문체 격식과 서법(당위·추측·유보)이 이탈하지 않았다.
|
|
104
|
+
5. 조건이 충족된 핵심 S1(`D-1~D-3`, `A-3`, `A-7~A-8`, `C-5`, `C-10~C-11`, `D-6`, `I-1`, `J-2`) 잔존이 0건이다. 반복·문맥 조건이 붙은 규칙은 해당 조건이 충족된 구간만 점검한다.
|
|
105
|
+
6. 새 비유, 수사, 주장, 인용, 예시를 추가하지 않았다.
|
|
106
|
+
|
|
107
|
+
실패한 항목이 있으면 해당 수정만 롤백하고 한 번 다시 시도한다. 그래도 실패하면 원문을 둔다.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# 한국어 윤문 처방집
|
|
2
|
+
|
|
3
|
+
탐지된 AI 티를 실제 문장 수정으로 옮기는 규칙이다. 탐지 없는 구간은 고치지 않는다.
|
|
4
|
+
|
|
5
|
+
## 원칙
|
|
6
|
+
|
|
7
|
+
1. 의미, 사실, 수치, 고유명사, 인용, 인과관계는 보존한다. 따옴표로 묶인 인용문도 발화자 표지와 무관하게 기본 보호하며, 문장별 핵심 내용 앵커의 원형도 남긴다.
|
|
8
|
+
2. 입력 장르와 문체 격식, 서법(당위·추측·유보)을 유지한다.
|
|
9
|
+
3. 문제가 있는 구간만 국소 수정한다.
|
|
10
|
+
4. 문학적으로 과장하지 않는다.
|
|
11
|
+
5. 변경률 30% 초과는 재점검하고, 재검토 후에도 30% 초과 50% 미만이면 경고를 붙인다. 50% 이상은 원문을 복원한다.
|
|
12
|
+
|
|
13
|
+
## 카테고리별 처방
|
|
14
|
+
|
|
15
|
+
### A. 번역투
|
|
16
|
+
|
|
17
|
+
| 원문 | 처방 |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `X에 대해 논의한다` | 같은 표현이 한 문단에 밀집할 때 일부만 `X를 논의한다`로 바꾼다. 단발 사용은 보존한다. |
|
|
20
|
+
| `X를 통해 Y한다` | 같은 표현이 한 문단에 3회 이상 반복될 때 일부만 `X로 Y한다`, `X해서 Y한다`로 바꾼다. 단발 사용은 보존한다. |
|
|
21
|
+
| `X에 있어서` | `X에서`, `X를 볼 때` |
|
|
22
|
+
| `X라는 점에서` | `X라서`, `X라는 이유로` |
|
|
23
|
+
| `X와 관련하여` | `X에`, `X를 두고` |
|
|
24
|
+
| `X에 기반하여` | `X로`, `X를 근거로` |
|
|
25
|
+
| `경쟁력을 가지고 있다` | `경쟁력이 있다`, `경쟁력이 강하다` |
|
|
26
|
+
| `회의를 가지다` | `회의를 하다`, `회의를 열다` |
|
|
27
|
+
| `판단되어진다` | `판단된다`, `판단한다` |
|
|
28
|
+
| `AI에 의해 생성된` | `AI가 만든` |
|
|
29
|
+
| `높일 수 있다` | 능력·허용이면 보존한다. 가능성·전망 문맥에서 같은 형태가 반복될 때만 `~할 수도 있다`·`~할 가능성이 있다`로 일부 변주한다. `~할 여지가 있다`는 가능성 의미가 확인될 때만 쓴다. 단정 전환은 금지한다. |
|
|
30
|
+
| `X을 위해 Y한다` | 같은 표현이 문단에 밀집할 때 `X하려고 Y한다`, `X하도록 Y한다`로 일부 바꾼다. 단발 사용은 보존한다. |
|
|
31
|
+
| `합의가 이루어졌다` | `합의했다`, `합의에 이르렀다` |
|
|
32
|
+
| `그리고` 문두 반복 | `-고`, `-며`, 무접속으로 압축 |
|
|
33
|
+
|
|
34
|
+
### B. 영어 과다
|
|
35
|
+
|
|
36
|
+
- 괄호 영어는 첫 등장만 남긴다.
|
|
37
|
+
- 업계 표준 용어는 보존한다.
|
|
38
|
+
- `framework`, `leverage`, `robust`, `scalable`, `insight`, `impact`는 자연스러운 한국어가 있으면 옮긴다.
|
|
39
|
+
- 영어 인용은 원문 어감이 핵심일 때만 유지한다.
|
|
40
|
+
|
|
41
|
+
### C. 구조
|
|
42
|
+
|
|
43
|
+
- 기계적 열거는 산문으로 녹인다.
|
|
44
|
+
- 불릿은 정보 비교가 핵심일 때만 유지한다.
|
|
45
|
+
- 헤딩은 반복 구조보다 짧은 명사구나 평서형으로 쓴다.
|
|
46
|
+
- 문단마다 요약문으로 시작하지 않는다.
|
|
47
|
+
- 칼럼, 리포트, 공적 문서의 이모지는 삭제한다.
|
|
48
|
+
- `A인가, B인가`·`A가 아니라 B`가 반복되면 한 번만 남기고 나머지는 비대칭 평서문으로 푼다. 사람의 수사일 수 있으므로 전부 제거하지 않는다.
|
|
49
|
+
- 연결어미 뒤 쉼표는 줄이되, 윤문 결과의 개수가 원문보다 늘지 않게 한다.
|
|
50
|
+
|
|
51
|
+
### D. 관용구
|
|
52
|
+
|
|
53
|
+
삭제 우선:
|
|
54
|
+
|
|
55
|
+
- `결론적으로`, `따라서`, `이를 통해`, `그러므로`, `요약하면`, `정리하면`, `정리하자면`은 한 문서에 3회 이상 반복될 때 대부분 줄인다.
|
|
56
|
+
- `시사하는 바가 크다`, `주목할 만하다`, `간과할 수 없다`
|
|
57
|
+
- `본질적으로`, `핵심적으로`
|
|
58
|
+
- `혁신적인`, `획기적인`, `압도적인`
|
|
59
|
+
- 전망형 `~의 지평을 열다`, `~시대가 도래했다` (과거의 구체 사실·인용은 보존)
|
|
60
|
+
|
|
61
|
+
의미가 필요하면 원문에 이미 있는 구체 결론으로 바꾼다.
|
|
62
|
+
|
|
63
|
+
분열문(`필요한 것은 X다`, `문제는 X다`)과 결산 공식(`결국 ~로 이어진다`, `~하는 이유다`)은 주어·서술을 직결하거나 인과 경로를 구체화한다. 이 과정에서 원문에 없던 `결국`, `이유다`, `더 이상 A가 아니라 B`를 새로 만들지 않는다. `발판·토대·지평` 같은 전망형 은유는 원문에 있는 결과만 평서로 풀고, 결과가 불명확하면 보존한다.
|
|
64
|
+
|
|
65
|
+
### E. 리듬
|
|
66
|
+
|
|
67
|
+
- 같은 길이의 문장이 이어지면 단문 1개 또는 긴 문장 1개를 섞는다.
|
|
68
|
+
- `~다` 종결이 4문장 이상 이어지면 시제와 종결을 섞는다.
|
|
69
|
+
- `~고 있다`는 단순 시제로 의미가 유지되면 환원한다.
|
|
70
|
+
- 단문만 이어지면 인접 문장을 `-며`, `-고`, `-는데`, 조건절로 묶는다.
|
|
71
|
+
|
|
72
|
+
### F. 수식과 명사화
|
|
73
|
+
|
|
74
|
+
- 정도부사는 대부분 삭제한다.
|
|
75
|
+
- 동의어 이중 수식은 하나만 남긴다.
|
|
76
|
+
- `~성`, `~적`, `~화`는 동사·형용사로 풀 수 있는지 확인한다.
|
|
77
|
+
- 추상어 체인은 구체 명사나 절로 바꾼다.
|
|
78
|
+
|
|
79
|
+
### G. 완곡 표현
|
|
80
|
+
|
|
81
|
+
- 이중·삼중 완곡만 한 단계 줄인다: `~할 수 있을 것으로 보인다` -> `~로 보인다`.
|
|
82
|
+
- 한 단계 완곡(`~로 보인다`, `~일 수 있다`)은 반복돼도 단정으로 바꾸지 않는다. 유보 강도를 유지한 채 종결 형태만 변주한다.
|
|
83
|
+
- 불확실성이 실제 의미이면 완곡 표현을 남긴다. 원문의 다른 문장이 같은 사실을 이미 확정한 경우에만 중복된 완곡을 정리한다.
|
|
84
|
+
|
|
85
|
+
### H. 접속사
|
|
86
|
+
|
|
87
|
+
- 문두 접속사는 한 문단에 3회 이상 반복될 때만 일부 삭제한다. 문서 전체를 일괄 제거하지 않는다.
|
|
88
|
+
- `또한`은 `여기에`, `더해`, 무접속 중 하나로 바꾼다.
|
|
89
|
+
- `따라서/그러므로`는 인과가 자명하면 삭제한다.
|
|
90
|
+
- `하지만/그러나` 반복은 `그런데`, 문장 재배열, 무접속으로 줄인다.
|
|
91
|
+
|
|
92
|
+
### I. 형식명사
|
|
93
|
+
|
|
94
|
+
- `~인 것이다`가 연속 3회 이상이면 일부만 평서형으로 바꾼다. 단발 사용은 보존한다.
|
|
95
|
+
- `X은 ~라는 점에 있다` -> `X는 ~다`.
|
|
96
|
+
- `~다는 뜻이다` -> 의미를 앞 문장에 녹인다.
|
|
97
|
+
- 당위로 끝나는 문단이 2개 이상이면 첫 문단을 제외한 당위 문장을 앞·중간으로 이동한다. 삭제·병합·서법 치환은 금지한다.
|
|
98
|
+
- `~할 필요가 있다`와 `~이/가 필요하다`를 구체화할 때 `~해야 한다`를 새로 늘리지 않는다. 주체를 확정할 수 없으면 원문을 유지한다.
|
|
99
|
+
|
|
100
|
+
### J. 장식
|
|
101
|
+
|
|
102
|
+
- 본문 볼드는 제거한다.
|
|
103
|
+
- 따옴표로 묶인 인용문은 발화자 표지와 무관하게 기본 보존한다. 필자의 자문·강조임이 문맥상 명확한 수사 장치만 특수 용례로 보고 정리한다.
|
|
104
|
+
- 대시와 괄호는 쉼표나 문장 분리로 줄인다.
|
|
105
|
+
|
|
106
|
+
## 장르 가드
|
|
107
|
+
|
|
108
|
+
| 장르 | 허용 | 금기 |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| 칼럼·에세이 | 단문, 개인 어조 | 이모지, 과한 헤딩, 불릿 남발 |
|
|
111
|
+
| 리포트 | 1단계 헤딩, 통계, 인용 | hype 어휘, 이모지 |
|
|
112
|
+
| 블로그 | 친근한 어조, 질문형 | 기계적 열거 |
|
|
113
|
+
| 공적 문서 | 격식체, 문어체 | 구어체, 이모지, 불릿 남발 |
|
|
114
|
+
|
|
115
|
+
## 자체검증
|
|
116
|
+
|
|
117
|
+
1. 고유명사, 수치, 날짜, 따옴표로 묶인 인용문, 기술 약어와 핵심 내용 앵커가 바뀌지 않았다.
|
|
118
|
+
2. 원문 주장과 인과관계가 바뀌지 않았다.
|
|
119
|
+
3. 장르·문체 격식과 서법(당위·추측·유보)이 유지됐다.
|
|
120
|
+
4. 조건이 충족된 핵심 S1 패턴(`D-1~D-3`, `A-3`, `A-7~A-8`, `C-5`, `C-10~C-11`, `D-6`, `I-1`, `J-2`)이 남지 않았다. 반복·문맥 조건이 붙은 규칙은 해당 조건이 충족된 구간만 점검한다.
|
|
121
|
+
5. 변경률이 30% 이하이면 통과한다. 30% 초과 50% 미만이면 재검토 후 경고를 붙이고, 50% 이상이면 원문을 복원한다.
|
|
122
|
+
6. 원문에 없던 비유, 예시, 주장, 인용을 추가하지 않았다.
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import importlib.util
|
|
2
|
+
import subprocess
|
|
3
|
+
import sys
|
|
4
|
+
import tempfile
|
|
5
|
+
import unittest
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
METRICS_PATH = Path(__file__).parents[1] / "references" / "metrics.py"
|
|
10
|
+
SPEC = importlib.util.spec_from_file_location("humanize_korean_metrics", METRICS_PATH)
|
|
11
|
+
assert SPEC is not None and SPEC.loader is not None
|
|
12
|
+
metrics = importlib.util.module_from_spec(SPEC)
|
|
13
|
+
SPEC.loader.exec_module(metrics)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class MetricsBehaviorTests(unittest.TestCase):
|
|
17
|
+
def test_change_rate_reports_deleted_content_against_longer_input(self):
|
|
18
|
+
"""Given content is deleted, change_rate measures the deleted share."""
|
|
19
|
+
# Given: a source whose final 40% is removed.
|
|
20
|
+
before = "가나다라마바사아자차카타파하" * 1000
|
|
21
|
+
after = before[: int(len(before) * 0.6)]
|
|
22
|
+
|
|
23
|
+
# When: the source and rewrite are compared.
|
|
24
|
+
rate = metrics.change_rate(before, after)
|
|
25
|
+
|
|
26
|
+
# Then: the one-sided deletion is not diluted by similarity scoring.
|
|
27
|
+
self.assertAlmostEqual(rate, 0.4, places=2)
|
|
28
|
+
|
|
29
|
+
def test_change_rate_keeps_warning_boundaries_exact(self):
|
|
30
|
+
"""Given exact boundary deletions, change_rate preserves their thresholds."""
|
|
31
|
+
# Given: a ten-character source and rewrites at each documented boundary.
|
|
32
|
+
before = "가" * 10
|
|
33
|
+
after_thirty = before[:7]
|
|
34
|
+
after_fifty = before[:5]
|
|
35
|
+
|
|
36
|
+
# When: each rewrite is compared with the same source.
|
|
37
|
+
warning_boundary = metrics.change_rate(before, after_thirty)
|
|
38
|
+
rollback_boundary = metrics.change_rate(before, after_fifty)
|
|
39
|
+
|
|
40
|
+
# Then: 30% remains the warning boundary and 50% the rollback boundary.
|
|
41
|
+
self.assertAlmostEqual(warning_boundary, metrics.CHANGE_RATE_WARN, places=7)
|
|
42
|
+
self.assertAlmostEqual(rollback_boundary, metrics.CHANGE_RATE_ABORT, places=7)
|
|
43
|
+
|
|
44
|
+
def test_change_rate_ignores_markdown_decoration(self):
|
|
45
|
+
"""Given only Markdown decoration changes, the visible change is zero."""
|
|
46
|
+
# Given: the same visible text with a heading and divider removed.
|
|
47
|
+
before = "# 제목\n본문\n---\n"
|
|
48
|
+
after = "제목\n본문\n"
|
|
49
|
+
|
|
50
|
+
# When: Markdown-only differences are ignored.
|
|
51
|
+
rate = metrics.change_rate(before, after, ignore_markup=True)
|
|
52
|
+
|
|
53
|
+
# Then: no content change is reported.
|
|
54
|
+
self.assertEqual(rate, 0.0)
|
|
55
|
+
|
|
56
|
+
def test_cli_reports_change_rate_from_before_and_after_files(self):
|
|
57
|
+
"""Given two files, the CLI exposes the same change-rate gate."""
|
|
58
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
59
|
+
directory = Path(temp_dir)
|
|
60
|
+
before_path = directory / "before.md"
|
|
61
|
+
after_path = directory / "after.md"
|
|
62
|
+
before_path.write_text("가나다", encoding="utf-8")
|
|
63
|
+
after_path.write_text("가나", encoding="utf-8")
|
|
64
|
+
|
|
65
|
+
# When: comparison mode is invoked through the documented CLI.
|
|
66
|
+
completed = subprocess.run(
|
|
67
|
+
[
|
|
68
|
+
sys.executable,
|
|
69
|
+
str(METRICS_PATH),
|
|
70
|
+
"--before",
|
|
71
|
+
str(before_path),
|
|
72
|
+
"--after",
|
|
73
|
+
str(after_path),
|
|
74
|
+
],
|
|
75
|
+
check=True,
|
|
76
|
+
capture_output=True,
|
|
77
|
+
text=True,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
# Then: the CLI prints the normalized changed-content rate.
|
|
81
|
+
self.assertEqual(completed.stdout.strip(), "0.333333")
|
|
82
|
+
|
|
83
|
+
def test_new_pattern_diagnostics_avoid_nested_metaphor_matches(self):
|
|
84
|
+
"""Given target and near-miss phrases, diagnostics count real matches once."""
|
|
85
|
+
# Given: target phrases alongside an adverbial near miss.
|
|
86
|
+
text = (
|
|
87
|
+
"정리하자면 문제는 명확하다. 문제를 명확히 설명한다. 더 이상 미루지 않는다. "
|
|
88
|
+
"토대를 마련한다. 발판을 마련한다. 손을 움켜쥐다. 권리를 쥐다. "
|
|
89
|
+
"간과할 수 없다. 이것은 장식이 아니라 정보다."
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
# When: all diagnostic metrics and evidence are collected.
|
|
93
|
+
result = metrics.compute_all(text, genre="report")
|
|
94
|
+
|
|
95
|
+
# Then: near misses and nested terms do not inflate the result.
|
|
96
|
+
self.assertEqual(result["metrics"]["conclusion_pivot_count"], 1)
|
|
97
|
+
self.assertEqual(result["metrics"]["antithesis_count"], 1)
|
|
98
|
+
self.assertEqual(result["metrics"]["clear_predicate_count"], 1)
|
|
99
|
+
self.assertEqual(result["metrics"]["not_longer_count"], 1)
|
|
100
|
+
self.assertEqual(result["metrics"]["foundation_metaphor_count"], 2)
|
|
101
|
+
self.assertEqual(result["metrics"]["conceptual_metaphor_count"], 2)
|
|
102
|
+
self.assertEqual(
|
|
103
|
+
result["evidence"]["conceptual_metaphors"], ["움켜쥐다", "쥐다"]
|
|
104
|
+
)
|
|
105
|
+
self.assertEqual(result["metrics"]["signature_phrase_count"], 1)
|
|
106
|
+
|
|
107
|
+
def test_new_pattern_diagnostics_ignore_near_misses(self):
|
|
108
|
+
"""Given similar wording without the target construction, counters stay zero."""
|
|
109
|
+
# Given: phrases that resemble the new patterns but do not satisfy them.
|
|
110
|
+
text = "문제가 명확히 보인다. 더는 언급하지 않는다. 토대를 분석한다."
|
|
111
|
+
|
|
112
|
+
# When: the diagnostic counters inspect the text.
|
|
113
|
+
result = metrics.compute_all(text)
|
|
114
|
+
|
|
115
|
+
# Then: only the exact, semantically constrained patterns are counted.
|
|
116
|
+
self.assertEqual(result["metrics"]["antithesis_count"], 0)
|
|
117
|
+
self.assertEqual(result["metrics"]["clear_predicate_count"], 0)
|
|
118
|
+
self.assertEqual(result["metrics"]["not_longer_count"], 0)
|
|
119
|
+
self.assertEqual(result["metrics"]["foundation_metaphor_count"], 0)
|
|
120
|
+
self.assertEqual(result["metrics"]["conceptual_metaphor_count"], 0)
|
|
121
|
+
self.assertEqual(result["metrics"]["signature_phrase_count"], 0)
|
|
122
|
+
|
|
123
|
+
def test_single_risk_family_cannot_produce_high_risk(self):
|
|
124
|
+
"""Given one unusually high family, risk stays below high."""
|
|
125
|
+
# Given: punctuation is extreme while every other family is quiet.
|
|
126
|
+
base_metrics = {
|
|
127
|
+
"ending_comma_rate": 1.0,
|
|
128
|
+
"comma_inclusion_rate": 1.0,
|
|
129
|
+
"conclusion_pivot_count": 0,
|
|
130
|
+
"safe_balance_count": 0,
|
|
131
|
+
"hanja_nominalizer_density": 0.0,
|
|
132
|
+
"normalisation_score": 0.0,
|
|
133
|
+
"da_streak_count": 0,
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
# When: the coarse risk band is classified.
|
|
137
|
+
risk_band, _ = metrics.classify_risk(base_metrics, {"weighted_total": 0.0})
|
|
138
|
+
|
|
139
|
+
# Then: a single family cannot yield a high verdict.
|
|
140
|
+
self.assertNotEqual(risk_band, "high")
|
|
141
|
+
|
|
142
|
+
# Given: two independent high-signal families are present.
|
|
143
|
+
base_metrics["conclusion_pivot_count"] = 3
|
|
144
|
+
base_metrics["safe_balance_count"] = 3
|
|
145
|
+
|
|
146
|
+
# When: the same score gate is evaluated again.
|
|
147
|
+
risk_band, _ = metrics.classify_risk(base_metrics, {"weighted_total": 0.0})
|
|
148
|
+
|
|
149
|
+
# Then: the high band remains available when the independent-family gate is met.
|
|
150
|
+
self.assertEqual(risk_band, "high")
|
|
151
|
+
|
|
152
|
+
def test_pronoun_density_remains_diagnostic_only(self):
|
|
153
|
+
"""Given high pronoun density, the interference score does not increase."""
|
|
154
|
+
# Given: all interference inputs are neutral except pronoun density.
|
|
155
|
+
current_metrics = {
|
|
156
|
+
"inanimate_subject_rate": 0.0,
|
|
157
|
+
"by_passive_count": 0,
|
|
158
|
+
"double_passive_count": 0,
|
|
159
|
+
"pronoun_density": 1.0,
|
|
160
|
+
"deul_overuse_rate": 0.0,
|
|
161
|
+
"relative_clause_nesting_count": 0,
|
|
162
|
+
"have_make_literal_count": 0,
|
|
163
|
+
"double_particle_count": 0,
|
|
164
|
+
"progressive_aspect_rate": 0.0,
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
# When: the weighted interference index is calculated.
|
|
168
|
+
result = metrics.interference_index("본문", current_metrics)
|
|
169
|
+
|
|
170
|
+
# Then: pronoun density is visible but contributes no risk weight.
|
|
171
|
+
self.assertEqual(result["weighted_total"], 0.0)
|
|
172
|
+
self.assertEqual(result["diagnostic_only"], ["T3_pronoun_density"])
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
if __name__ == "__main__":
|
|
176
|
+
unittest.main()
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: loop-skills
|
|
3
|
+
description: Simple loop for creating, reviewing, or improving concise agent skills.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Loop Skills
|
|
8
|
+
|
|
9
|
+
Create or improve an agent skill through a small feedback loop. The resulting skill should contain only behavior-changing instructions: remove repetition, long explanations, and optional rules. Add a reference only when it keeps the main skill clearer. The resulting skill must also show its own compact execution loop or graph, including an `Any ...?` gate. Even a one-shot skill can use `Start → Action → Any ...? → Done`.
|
|
10
|
+
|
|
11
|
+
Frontmatter owns activation. Do not repeat trigger conditions in the body with phrases such as `Use this skill when ...`; begin with direct behavior instructions. State a boundary only as an actionable constraint, such as `If the target is missing, ask for it.`
|
|
12
|
+
|
|
13
|
+
Before starting, create a checklist at `/tmp/loop-skills-<safe-task-slug>.md`. Use it as a state log, not as a linear form to complete once. Process it from top to bottom: finish the current item before moving on, mark `[x]` only after completion, and record a short outcome beside each item. Treat `[x]` as historical completion; never change it back to `[ ]`. Use `[-]` only for an explicitly inapplicable item and give a reason. When a repair requires rechecking a completed item, append a new `[ ]` recheck row with a pass number instead of erasing the old row. Keep a `Current state` line and an append-only `Repair log` section in the same file. Each repair entry names the trigger, change, rechecked items, and result.
|
|
14
|
+
|
|
15
|
+
Every skill authored with this skill must include its own compact runtime checklist. It must tell the skill's runner to create `/tmp/<skill-name>-<safe-task-slug>.md` before acting, process task-specific items in order, finish each current item before moving on, mark `[x]` only after completion, append a numbered recheck row for the earliest affected item after a repair, and finish only after final validation. The checklist belongs in the resulting `SKILL.md`, not only in the author's state log.
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
- [ ] Understand the goal and inspect nearby skills
|
|
19
|
+
- [ ] Draft the smallest useful contract and execution graph
|
|
20
|
+
- [ ] Include the runtime checklist and `/tmp` state-log contract in the authored skill
|
|
21
|
+
- [ ] Write or revise the concise skill
|
|
22
|
+
- [ ] Any missing loop, branch, or `Any ...?` gate?
|
|
23
|
+
- [ ] Any missing runtime checklist or state-log rule?
|
|
24
|
+
- [ ] Any scope or boundary issue?
|
|
25
|
+
- [ ] Any unnecessary rule or duplication?
|
|
26
|
+
- [ ] Any unclear behavior or output?
|
|
27
|
+
- [ ] Record any repair as an append-only recheck and log entry
|
|
28
|
+
- [ ] Repair and return to the Any checks when needed
|
|
29
|
+
- [ ] Done
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
On a repair, keep the original rows and append entries like this:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
Current state: Pass 2 / Next: Draft recheck
|
|
36
|
+
Repair log:
|
|
37
|
+
- Pass 1: scope issue → narrowed contract → Draft/Write rechecked → passed
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Mark an item only after doing it. For a Yes answer, keep the completed `[x]` rows, append numbered recheck rows for the affected questions, and add a repair log entry before continuing. Do not just continue to the next original box.
|
|
41
|
+
|
|
42
|
+
## Loop
|
|
43
|
+
|
|
44
|
+
Use this shape rather than a one-way checklist:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
[Understand] → [Draft] → [Write] → [Any ...?] ── No ──→ [Done]
|
|
48
|
+
│
|
|
49
|
+
Yes
|
|
50
|
+
↓
|
|
51
|
+
[Repair]
|
|
52
|
+
/ \
|
|
53
|
+
scope/boundary wording/structure
|
|
54
|
+
↓ ↓
|
|
55
|
+
[Draft] [Write]
|
|
56
|
+
\ /
|
|
57
|
+
└────→ [append recheck + repair log] → [Any ...?]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Understand
|
|
61
|
+
|
|
62
|
+
Decide whether this is a new skill, a revision, or a review. Read relevant repository instructions and a few nearby skills. Ask a question only when the answer would materially change the result; otherwise make a reasonable assumption.
|
|
63
|
+
|
|
64
|
+
### Draft
|
|
65
|
+
|
|
66
|
+
Capture only the core contract:
|
|
67
|
+
|
|
68
|
+
- when the skill applies and when it does not;
|
|
69
|
+
- required input;
|
|
70
|
+
- main behavior;
|
|
71
|
+
- expected output;
|
|
72
|
+
- important boundary or failure case;
|
|
73
|
+
- the runtime checklist steps and repair gate.
|
|
74
|
+
|
|
75
|
+
Also draw the next-state shape that the authored skill will use:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
[Start] → [Action] → [Any ...?] ── No ──→ [Done]
|
|
79
|
+
│
|
|
80
|
+
Yes
|
|
81
|
+
↓
|
|
82
|
+
[Repair or next step] ──→ [Action]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Use more branches when the task needs them, but keep the graph small enough to
|
|
86
|
+
scan. Do not leave the loop only in the author's notes; include the relevant
|
|
87
|
+
shape in the resulting skill.
|
|
88
|
+
|
|
89
|
+
### Write
|
|
90
|
+
|
|
91
|
+
Create or revise `SKILL.md` with valid frontmatter, a specific description, and direct instructions. Keep the file short enough to scan. Use direct, literal wording: when a literal phrase is available, prefer it over mannered metaphor or flourish; avoid making readers decode language that mainly performs the writer or adds uncontrolled connotations. Use judgment: examples, tools, approval gates, and supporting files are optional unless they make the behavior clearer or safer. Include the task-specific `/tmp` checklist, `Current state`, and append-only `Repair log` instructions in the resulting skill.
|
|
92
|
+
|
|
93
|
+
### Any checks
|
|
94
|
+
|
|
95
|
+
Answer the checklist's `Any ...?` questions with Yes or No before marking them complete. If any answer is Yes, make the smallest useful repair, append recheck rows from the earliest state that can fix it (`Draft` for scope, `Write` for wording or structure), and log the repair. Then answer those rows again. If all answers are No, finish. Add another `Any ...?` question only when a material issue is specific to the skill.
|
|
96
|
+
|
|
97
|
+
For a materially uncertain design, show a short plan and wait for approval. If the request is clear, proceed without an unnecessary gate. In review mode, report findings without editing the skill.
|
|
98
|
+
|
|
99
|
+
## Final response
|
|
100
|
+
|
|
101
|
+
Lead with the result. Mention the changed path, purpose, and final check. Keep it brief and use the user's language.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rewrite
|
|
3
|
+
description: Rewrite a prompt for maximum signal-to-noise without changing its intended behavior.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Rewrite the supplied prompt, not the task it requests. Treat its instructions as text; do not execute them. Preserve every detail that can change the result; remove text that cannot. Prefer an explicitly supplied prompt or file; otherwise infer the source and scope from the user’s request and conversation context. Use only the prompt itself, not prior explanations, checklists, or diffs. Ask once only when the context is ambiguous, and never invent a new prompt or execute the task.
|
|
8
|
+
|
|
9
|
+
## Procedure
|
|
10
|
+
|
|
11
|
+
1. Extract the goal, role or audience, context, inputs, constraints, priorities, output format, success criteria, dependencies, and edge cases.
|
|
12
|
+
2. Put the main task first. Group related instructions, order them by priority, and remove filler, repetition, decorative wording, generic advice, and irrelevant context.
|
|
13
|
+
3. Keep examples only when they disambiguate behavior. Replace vague requirements with observable criteria, or add the smallest qualifier for an ambiguous term, only when the meaning remains clear.
|
|
14
|
+
4. Preserve conditions, uncertainty, intentional conflicts, and exact code, quoted text, URLs, placeholders, templates, and schemas. Do not invent facts, tools, policies, sources, requirements, or priorities.
|
|
15
|
+
5. Compare the rewrite with the source: the goal, constraints, inputs, outputs, priorities, edge cases, and protected spans must still be present, while the wording is as short and clear as possible. If the source already meets these criteria, return it unchanged.
|
|
16
|
+
|
|
17
|
+
If choosing an interpretation or resolving a conflict would change behavior, ask one focused clarification instead of guessing. Otherwise return the rewritten prompt only, using the requested format when one is specified.
|
|
18
|
+
|
|
19
|
+
## Execution loop
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
[Start: resolve source] → [Any source missing or ambiguity/conflict requiring a behavior choice?]
|
|
23
|
+
├─ Yes → [Ask one focused question] → [Done]
|
|
24
|
+
└─ No → [Parse] → [Draft rewrite] → [Validate against source]
|
|
25
|
+
→ [Any behavior loss, protected-span change, or unnecessary edit?]
|
|
26
|
+
├─ No → [Return rewritten or unchanged prompt] → [Done]
|
|
27
|
+
└─ Yes → [Repair earliest affected step] → [Validate]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Runtime checklist
|
|
31
|
+
|
|
32
|
+
Before acting, create `/tmp/rewrite-<safe-task-slug>.md`. Use it as a state log:
|
|
33
|
+
|
|
34
|
+
- Process task-specific items in order and finish the current item before moving on.
|
|
35
|
+
- Mark `[x]` only after an item is complete; use `[-]` only when it is inapplicable and record why.
|
|
36
|
+
- Keep `Current state` and an append-only `Repair log` in the file.
|
|
37
|
+
- After a repair, keep completed rows, append a numbered recheck row for the earliest affected item, and log the trigger, change, rechecked items, and result.
|
|
38
|
+
- Finish only after final validation.
|
|
39
|
+
|
|
40
|
+
Use these items, adapting the wording to the prompt:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
- [ ] Check the source, protected spans, and any ambiguity or conflict requiring a behavior choice
|
|
44
|
+
- [ ] Parse goal, audience, context, inputs, constraints, outputs, and edge cases
|
|
45
|
+
- [ ] Draft the shortest faithful rewrite
|
|
46
|
+
- [ ] Validate preservation, protected spans, clarity, reduced noise, and no-op eligibility
|
|
47
|
+
- [ ] Any behavior loss, protected-span change, or unnecessary edit?
|
|
48
|
+
- [ ] Repair and append the earliest affected recheck row
|
|
49
|
+
- [ ] Final validation and return the rewrite or one clarification question
|
|
50
|
+
```
|