[feat] solution/backend: 에이전트가 페이지 구성을 바꾼다 — 섹션 on/off·순서
"문구 변경밖에 안 된다" 는 지적에서 시작했다. 페이지 구성은 sites.theme.sections 배열 하나이고 배열 순서가 곧 발행본의 순서라, 그 JSON 을 만지는 도구 셋을 붙였다. - list_sections(READ) · toggle_section(REVERSIBLE) · move_section(REVERSIBLE) - 목록은 site_payload._sections 를 그대로 쓴다 — 발행본이 쓰는 그 함수다. 표를 따로 만들면 에디터·발행본·대화 셋이 갈라지고 "껐는데 나온다" 가 된다 - 잠긴 섹션은 못 끈다. _sections 가 어차피 켜서 내보내므로 끌 수 있게 두면 화면만 거짓말한다 - 이름이 둘 이상 걸리면 고르지 않는다 — 추측으로 고르면 발행하고 나서야 안다 - sections 만 갈아끼운다 — theme 을 통째로 쓰면 고른 색·서체가 말없이 사라진다 ★ 템플릿·색은 넣지 않았다. templatesFor() 가 색·look·기본 섹션·배리에이션을 함께 계산해서, 백엔드가 template_id 만 바꾸면 "레이아웃은 새것, 색은 옛것" 이 된다 — 레지스트리를 공유 단일 출처로 옮기는 작업이 먼저다(docs/AGENT.md). test_agent_runtime 26 passed(구성 7건 추가). 전체 864 passed / 53 failed — 53 은 이번 변경 전과 동일. npm run lint 통과 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
e35ce311d3
commit
ea9ae1ac2a
6 files changed
+276
-6
No files matched your search
@@ -36,7 +36,8 @@ RESPONSE_SCHEMA = {
|
||||
}
|
||||
|
||||
|
||||
def build_prompt(*, place_name: str, tools: list[dict], fields: list[dict], facts: list[dict], message: str) -> str:
|
||||
def build_prompt(*, place_name: str, tools: list[dict], fields: list[dict], facts: list[dict],
|
||||
sections: list[dict], message: str) -> str:
|
||||
"""사장님 발화 → 도구 하나.
|
||||
|
||||
★ 모호하면 실행하지 말고 되물으라고 명시한다. 티오더가 "유사한 메뉴가 2개 이상이면
|
||||
@@ -61,5 +62,8 @@ def build_prompt(*, place_name: str, tools: list[dict], fields: list[dict], fact
|
||||
지금 저장된 값:
|
||||
{json.dumps(facts, ensure_ascii=False)}
|
||||
|
||||
홈페이지를 이루는 부분들 — 위에서부터의 순서다(toggle_section·move_section 의 name 은 이 중 하나):
|
||||
{chr(10).join(f"{s['name']}" + (" [끄기 불가]" if s['locked'] else "") + (" (꺼짐)" if not s['enabled'] else "") for s in sections)}
|
||||
|
||||
사장님 요청:
|
||||
{message}'''
|
||||
Reference in new issue
Block a user