Skip to content

Init Prompt SSOT

Init Prompt SSOT — 운영 Runbook

AutoGen 솔루션 프로젝트 초기화에 사용하는 DESIGN / DEV 프롬프트의 Single Source of Truth 운영 가이드.

개요

레이어역할
Git (core/prompts/solution-init/)편집 원본 — PR로 변경
D1 (init_prompts)런타임 active 버전 — Generation Engine / Admin Wizard
core-admin조회, preview, publish, init run 생성

파일 구조

core/prompts/solution-init/
├── manifest.json
├── common-base.md
├── design-track.md
├── dev-track.md
└── frozen-spec-tasks.json

Topology v6 mapping (do not scaffold /apps/web + /apps/docs inside core):

Track surfaceLocation
APIcore/workers/core-api (core-api)
Admincore/apps/admin-web (core-admin)
Publicweb-public
Dashboardapp-dashboard
Docsdocs (Astro + Starlight)

Publish 절차

  1. manifest.jsonversion을 semver bump
  2. PR merge → CI (publish-init-prompts.yml) 자동 publish
  3. 또는 수동:
Terminal window
node scripts/publish-init-prompts.mjs --git-ref $(git rev-parse HEAD)

환경 변수: CORE_API_URL, ADMIN_API_TOKEN (admin role JWT)

Admin UI

  • /init-prompts — 목록 및 active 버전
  • /init-prompts/publish — 수동 publish
  • /projects/new — 3-step init wizard → agent payload

PADG Frozen Spec — 표준 Task Contract

Generation Engine 실행 시 DevelopmentGraph에 아래 태스크를 포함한다.

INIT-DEV-01

{
"taskId": "INIT-DEV-01",
"objective": "DEV init prompt 기반 backend/API bootstrap",
"promptRef": {
"templateId": "solution-init",
"track": "dev",
"version": "{{active_version}}"
},
"dependsOn": [],
"allowedFiles": ["workers/core-api/**", "packages/**", "pnpm-workspace.yaml"],
"protectedFiles": ["workers/core-api/wrangler.prod.toml"],
"acceptanceCriteria": [
"Hono RPC AppType exported from workers/core-api/src/rpc.ts",
"JWT login + /v1/me endpoints",
"RBAC requireMinRole middleware",
"Drizzle schema via packages/db + drizzle-zod / auth-kit",
"R2 upload stub when in scope",
"Typed client via api-client-kit or satellite contract + hc"
],
"completionGate": ["typecheck", "lint"]
}

INIT-DESIGN-01

{
"taskId": "INIT-DESIGN-01",
"objective": "DESIGN init prompt 기반 UI/layout bootstrap",
"promptRef": {
"templateId": "solution-init",
"track": "design",
"version": "{{active_version}}"
},
"dependsOn": ["INIT-DEV-01"],
"allowedFiles": ["apps/admin-web/**", "packages/ui/**"],
"acceptanceCriteria": [
"TailAdmin-style layout shell on admin-web",
"shadcn/ui --cl-* CSS variable tokens only",
"ProtectedRoute without flash",
"Dashboard grid + data table"
],
"completionGate": ["typecheck", "responsive_375_768_1440"]
}

INIT-COMMON-01 (optional)

{
"taskId": "INIT-COMMON-01",
"objective": "Monorepo + docs scaffold from common-base",
"promptRef": {
"templateId": "solution-init",
"track": "common",
"version": "{{active_version}}"
},
"dependsOn": [],
"completionGate": ["typecheck"]
}

promptRef Resolution

Generation Engine은 promptRef.version{{active_version}}이면 D1에서 해당 track의 active prompt를 resolve한다. Git commit SHA가 아닌 published 버전을 사용한다.

변수 치환

VariableDefault
{{project_name}}(required)
{{repo_slug}}(required)
{{db_name}}core-d1
{{r2_bucket}}core-r2
{{npm_scope}}@autogen-labs
{{pages_name}}= repo_slug
{{worker_name}}topology role (core-api, web-public, …) — never -admin kit dialect

Drift Detection

  • Publish 시 contentHash SHA-256 검증 — mismatch → 409
  • Admin UI에서 Git ahead warning (Phase 2)

관련 문서