chore: 문서 수정

This commit is contained in:
DongHyeonka
2026-07-29 18:29:25 +09:00
parent 3ac0a367dc
commit 4b7f1a90d2
29 changed files with 1594 additions and 747 deletions
+32
View File
@@ -13,6 +13,11 @@ from claridoc.models import (
Severity,
SourcePack,
)
from claridoc.style_contracts import (
KOREAN_EXPERIENCE_CONTRACT_ID,
korean_experience_contract_applies,
plain_form_ending_locations,
)
from claridoc.utils import line_number, normalize_heading, strip_code_blocks, word_count
@@ -201,6 +206,27 @@ def lint_document(text: str, brief: Brief, outline: Outline, sources: SourcePack
),
)
break
style_contract_applies = korean_experience_contract_applies(brief)
plain_form_locations = (
plain_form_ending_locations(text)
if style_contract_applies
else []
)
if plain_form_locations:
add(
"STYLE002",
Severity.BLOCKER,
(
"Reader-facing Korean prose mixes plain declarative endings "
f"into the required 합니다/했습니다 style ({len(plain_form_locations)} occurrence(s))."
),
line=plain_form_locations[0],
suggestion=(
"Use 했습니다 for observed or performed work and 합니다 for "
"current behavior. Preserve quoted material and code unchanged."
),
)
long_paragraph_count = 0
crowded_paragraph_count = 0
long_sentence_count = 0
@@ -398,6 +424,12 @@ def lint_document(text: str, brief: Brief, outline: Outline, sources: SourcePack
"decision_section_count": sum(bool(section.decision_requirements) for section in outline.sections),
"numbered_steps": numbered_steps,
"formulaic_ordinal_opening_count": len(formulaic_ordinal_openings),
"style_contract": (
KOREAN_EXPERIENCE_CONTRACT_ID
if style_contract_applies
else "none"
),
"plain_form_ending_count": len(plain_form_locations),
"has_verification": has_verification,
"has_tradeoffs": has_tradeoffs,
"severity_counts": dict(severity_counts),