1. 목적
이 문서는 MISE 설계·구현·리뷰를 재현하는 internal Prompt와 MISE 사용자가 복사해 사용할 public Prompt의 분리, index, version과 검증 규칙을 소유한다.
2. 범위
Prompt Catalog
├─ internal
│ └─ architecture, implementation, review, verification, release
└─ public
└─ component, controller, docs, WebGL integration, migration
**PRM-01** 전체 대화와 hidden reasoning을 저장하지 않는다. **PRM-02** 사용자 원문은 개인정보·secret·로컬 경로를 제거한 sourceSummary
로만 남긴다. **PRM-03** internal Prompt는 public 문서, 검색 index와 production artifact에서 제외한다. **PRM-04** Prompt는 실행 가능한 정제본, 입력, 출력, 금지와 pass criteria를 포함한다. **PRM-05** 결과 전문 대신 test·artifact·ADR·commit 같은 검증 증거를 연결한다.
3. ID와 metadata
ID 형식:
mise.<package>.<category>.<name>.v<major>
예:
mise.ui.implement.tabs.v1
mise.php.review.escaping.v1
mise.docs.audit.accessibility.v1
필수 frontmatter:
id: mise.ui.implement.tabs.v1
title: Tabs Component 구현
scope: internal
category: implement
status: draft
version: 1
appliesTo:
- mise-ui@0.2
tags:
- component
- accessibility
sourceSummary: 비식별 요청 요약
relatedAdr:
- ADR-UI-002
relatedDocs:
- components/tabs
requiredInputs:
- component contract
passCriteria:
- keyboard test pass
lastVerified: null
replacement: null
4. 본문 구조
모든 Prompt는 다음 heading을 같은 순서로 사용한다.
- Goal
- Context
- Required inputs
- Constraints
- Ownership boundaries
- Task
- Output contract
- Verification
- Stop conditions
같은 지시는 한 번만 작성한다. 장황한 배경 대신 실제 파일·계약·pass 결과를 명시한다. 외부 write, destructive action과 scope 확대에는 명확한 승인 경계를 둔다.
5. 상태
draft → reviewed → verified → deprecated
verified
조건:
- required input이 존재한다.
- output contract가 결정돼 있다.
- pass criteria가 자동 또는 수동으로 판정 가능하다.
- 관련 fixture 또는 dogfood 증거가 있다.
- architecture 변경이면 ADR이 연결된다.
- secret·개인정보 scan을 통과한다.
폐기 Prompt는 삭제하지 않는다. deprecated
와 replacement
를 기록해 기존 link와 결정 이력을 유지한다.
6. index
Prompt index는 다음 필드로 filter할 수 있어야 한다.
- scope
- package
- category
- status
- version
- tag
- related ADR
- related docs
ID는 rename하지 않는다. 의미가 바뀌면 major ID를 올리고 이전 Prompt에 replacement를 설정한다.
**PRM-06** duplicate ID는 build failure다. **PRM-07** 깨진 ADR·문서·fixture link는 build failure다. **PRM-08** verified
Prompt의 package version이 현재 compatibility range와 맞지 않으면 stale로 실패한다. **PRM-09** public Prompt는 문서의 component-only Markdown pipeline을 사용한다.
7. Prompt와 다른 지침의 경계
| 자산 | 책임 |
|---|---|
| Prompt | 한 작업의 입력·출력·제약 |
| AGENTS.md | repository 전체의 영구 규칙 |
| ADR | 채택한 architecture 결정과 대안 |
| Skill | 반복되는 tool workflow와 절차 |
| API docs | 사용자 공개 계약 |
반복 Prompt가 tool 호출, 분기와 검증 절차를 안정적으로 공유하게 되면 Skill 후보로 승격한다. Prompt와 Skill에 같은 절차를 복제하지 않는다.
8. 초기 catalog
Internal:
- package boundary 설계
- Component contract 작성
- PHP escaping review
- DOM ownership review
- SCSS variable mapping review
- WebGL API compatibility review
- browser accessibility audit
- RC package dogfood
Public:
- PHP Component 추가
- TS Controller 추가
- SCSS token 확장
- API 문서 작성
- WebGL Surface 통합
- 접근성 audit
- 기존 PHP Host migration
9. 검증
- schema parse
- duplicate ID
- required heading
- internal/public leakage
- secret·개인정보 pattern
- broken relation
- stale package version
- public search와 copy browser test
10. 공식 근거
- https://developers.openai.com/api/docs/guides/latest-model
- https://developers.openai.com/codex/use-cases
Public Prompt
MISE UI Component 추가
verified · v1
Component-only DOM, PHP template, Controller와 fluid SCSS를 한 계약으로 추가하는 공개 작업 Prompt다.
검증: packages/mise-ui/tests/unit/Controller.test.ts
# Goal
MISE의 Component-only DOM과 기존 fluid SCSS 규칙을 지키는 재사용 Component 하나를
contract, PHP template, 선택적 Controller와 검증까지 완성한다.
# Context
MISE UI는 semantic Component가 HTML을 소유하고 PHP Model·Controller와 TypeScript
Controller가 literal HTML을 만들지 않는 구조다. Component SCSS는 중앙 `fluid()`와
공개 token만 소비한다.
# Required inputs
- 만들 Component의 사용자 목적과 semantic root
- Props·Slot·state·keyboard·focus·no-JS 요구
- 기존 Component catalog와 SCSS token
- 실제 consumer와 가장 작은 검증 명령
# Constraints
- 새 DOM은 등록된 Component template으로만 만든다.
- Slot은 Component 또는 Component list만 허용한다.
- dynamic text, attribute와 URL은 각 context 정책으로 escape·검증한다.
- `innerHTML`, generic class/style Props와 inline style을 추가하지 않는다.
- Component/Layout/Page partial에 직접 `clamp()`를 쓰지 않는다.
- 상태 source는 native state와 ARIA이며 state class를 source로 만들지 않는다.
# Ownership boundaries
- `mise-ui/contracts`: language-neutral anatomy와 interaction 계약
- `mise-php/templates`: semantic HTML과 context escaping
- `mise-ui/src`: DOM Controller와 dispose 가능한 event lifecycle
- `mise-ui/styles`: token을 소비하는 Component style
- consumer: content와 조립
# Task
1. 기존 catalog에서 같은 책임의 Component를 검색한다.
2. semantic root, Props, Slot, state, keyboard, focus와 no-JS 계약을 작성한다.
3. PHP Component template을 registry에 등록하고 모든 동적 값을 escape한다.
4. browser behavior가 필요할 때만 AbortSignal 기반 Controller를 추가한다.
5. 기존 token, typography, breakpoint와 `fluid()`로 SCSS를 작성한다.
6. unit, PHP, keyboard, JS-off와 accessibility 검증을 추가한다.
7. Component·token·Prompt index와 관련 문서를 갱신한다.
# Output contract
- unique Component contract ID
- 등록된 PHP template과 Component-only Slot 조립
- 필요 시 typed Controller
- 기존 foundation을 소비하는 SCSS
- unit·PHP·browser 검증 증거
- catalog와 문서 index 갱신
# Verification
- Component schema와 duplicate ID 검사
- PHP lint·escaping·safe URL test
- TypeScript strict·controller dispose test
- Sass compile·direct `clamp()` scan
- keyboard·focus return·JS-off browser test
- axe serious/critical 0건
# Stop conditions
- 기존 Component가 책임을 충족하면 새 Component를 만들지 않는다.
- semantic element나 no-JS 동작이 결정되지 않으면 구현을 중단한다.
- 새 global token이 한 Component만을 위해 필요하면 local value로 재검토한다.
- escaping 또는 focus 복귀 test가 실패하면 공개 완료로 판정하지 않는다.