docs(ai): split SW usage into general / viewer mode in packaged AI guides
- Usage types are now Web / SW (general mode, viewer mode) / OrgChart / mixed. Shared AI_GUIDE step 1 asks for the SW mode only when the request or the project setting (HMDesign 사용 유형: SW 일반 | SW 뷰어) leaves it open; examples B0/B1/B2 cover "HMDesign SW로 화면을 만들어 주세요", general and viewer. - Missing-component handling in three steps (reuse in the chosen type/mode -> build with that mode's tokens -> HMDesign-consistent style, reported as "AI 구성 값 — 디자인 확인 필요"), plus SW general/viewer separation rules. - sw/ai: AI_USAGE §0 mode selection, catalog §8 lists all 33 SWViewer* exports, DESIGN_RULES §11 viewer tokens, PATTERNS 7 viewer composition; examples B/F marked as general mode. ui/ai and org-chart/ai aligned with the new types. - AGENTS_SNIPPET, AGENTS.md and MAINTAINING updated; copies synced. - scripts/ai-docs.mjs: shared-copy check ignores CRLF/LF (core.autocrlf=true checks out packages/sw as LF and the rest as CRLF). - Verification record updated (code samples typechecked, built and rendered).
This commit is contained in:
1 parent
be7a04a847
commit
7621934f69
25 files changed
+779
-235
No files matched your search
+5
-3
@@ -36,13 +36,15 @@ if (mode === "--sync") {
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
// 1. Shared copies are identical to docs/ai.
|
||||
// 1. Shared copies are identical to docs/ai. Line endings are ignored: with core.autocrlf=true, packages/sw
|
||||
// (.gitattributes eol=lf) checks out LF while docs/ai and the other packages check out CRLF.
|
||||
const normalizeEol = text => text.replace(/\r\n/g, "\n")
|
||||
for (const file of shared) {
|
||||
const source = await readFile(path.join(root, "docs/ai", file), "utf8")
|
||||
const source = normalizeEol(await readFile(path.join(root, "docs/ai", file), "utf8"))
|
||||
for (const name of Object.keys(packages)) {
|
||||
const copy = path.join(packageDir(name), "ai", file)
|
||||
if (!existsSync(copy)) failures.push(`${name}: ai/${file} missing (run npm run sync:ai-docs)`)
|
||||
else if ((await readFile(copy, "utf8")) !== source) failures.push(`${name}: ai/${file} differs from docs/ai/${file} (run npm run sync:ai-docs)`)
|
||||
else if (normalizeEol(await readFile(copy, "utf8")) !== source) failures.push(`${name}: ai/${file} differs from docs/ai/${file} (run npm run sync:ai-docs)`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user