원클릭으로
ppt-typespec
Author TypeSpec at docs/api/typespec/ to drive the OpenAPI spec and the generated Rust + TS clients.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Author TypeSpec at docs/api/typespec/ to drive the OpenAPI spec and the generated Rust + TS clients.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Implement one task end-to-end for the PPT project — pick the right per-stack specialist, code, verify per-stack, push a draft PR against `dev`.
Project-management & delivery analysis for the PPT research routine (Phase 1.6). Runs an always-on Scrum Master synthesis plus role-based deep analysis (rotating one role/day by default; all 8 on `full`; a specific role on `pm:<role>`). Reads sprint-status + repo activity + research backlog, spawns role subagents, and writes delivery artifacts under .research/management/. Use from routine Phase 1.6, or standalone for a delivery snapshot.
Post-merge code review with issue creation. Reviews merged PRs in a time window, spots better approaches / missed edge cases / security holes / perf issues / test gaps, and opens GitHub issues with concrete improvement proposals.
Deterministic goal/convergence checks for the PPT dispatcher — coverage referential integrity, coverage-progress monotonicity, and buffer bounds. Run in dispatcher Phase 6 and CI. Use when adding/auditing the dispatcher's goal-verification layer.
Open a PR in this project's style — title, body template, IG3 evidence, CI surface, draft handling.
Land a green, approved PR. Verify preconditions (CI green, approved, no unresolved threads, not draft), auto-resolve mechanical merge conflicts against the base branch (sqlx offline data, Cargo.lock, generated openapi/api-client, lockfiles), then `gh pr merge --squash --auto`. Stops and surfaces if real code conflicts or stale CI.
| name | ppt-typespec |
| description | Author TypeSpec at docs/api/typespec/ to drive the OpenAPI spec and the generated Rust + TS clients. |
| when_to_use | The plan adds, removes, or changes an API endpoint — anything that needs to ripple through to the Rust server and frontend client. |
| mode | both |
| capabilities | ["C6"] |
| tags | ["backend","frontend","infra"] |
docs/api/typespec/ is the contract source-of-truth.
Pipeline (two steps):
cd docs/api/typespec && npx tsp compile . — compiles the TypeSpec
into the OpenAPI spec at docs/api/generated/openapi.yaml (per
tspconfig.yaml's emitter-output-dir: {project-root}/../generated).
This step is what regenerates the spec; the justfile recipe doesn't run it.just generate-api — wraps pnpm generate-api + pnpm generate-reality-api
inside frontend/, which consumes docs/api/generated/openapi.yaml to
regenerate the two TS API clients (@ppt/api-client, @ppt/reality-api-client).Run both. Step 1 alone leaves the TS clients stale; step 2 alone leaves the OpenAPI YAML stale. Backend handlers consume the spec via utoipa annotations.
The plan changes an endpoint shape, adds a route, or modifies a response / error contract. Any contract change starts here, then ripples to backend handlers and frontend client.
just generate-api)docs/api/typespec/domains/docs/api/typespec/
├── main.tsp # entry — composes domains
├── tspconfig.yaml # emitter config
├── shared/ # shared models / scalars
├── domains/
│ ├── announcements.tsp
│ ├── auth.tsp
│ ├── buildings.tsp
│ ├── compliance.tsp
│ ├── documents.tsp
│ ├── faults.tsp
│ ├── listings.tsp
│ ├── organizations.tsp
│ ├── rentals.tsp
│ ├── units.tsp
│ └── voting.tsp
# Note: TypeSpec emits to `docs/api/generated/openapi.yaml` (NOT `tsp-output/`)
# per tspconfig.yaml's `emitter-output-dir: {project-root}/../generated`.
├── package.json # @typespec/* deps
└── package-lock.json
docs/api/typespec/domains/<area>.tsp.just generate-api alone does NOT do this:
cd docs/api/typespec && npx tsp compile .
This refreshes docs/api/generated/openapi.yaml.just generate-api
Which wraps pnpm generate-api + pnpm generate-reality-api inside
frontend/, consuming the freshly-recompiled
docs/api/generated/openapi.yaml. Commit both the regenerated TS clients
(frontend/packages/api-client/, frontend/packages/reality-api-client/)
and the regenerated docs/api/generated/openapi.yaml.ppt-rust-backend.cd docs/api/typespec && npx tsp compile .
Anything that's a non-additive change to an existing operation (removing/renaming fields, changing types, status-code changes) is breaking and goes through these gates:
VERSION).## Breaking changes.api-validation.yml enforces spec validity — failures
here block merge.Additive changes (new optional field, new operation) are safe and don't need a version bump.
# 1. typespec deps installed
test -d docs/api/typespec/node_modules && echo OK
# expected: OK after first run; if missing, `cd docs/api/typespec && npm install`
# 2. tsp compiler reachable (subshell so cwd stays at repo root for later checks)
(cd docs/api/typespec && npx --no-install tsp --version) >/dev/null 2>&1 && echo OK
# expected: OK
# 3. main entry present (path from repo root)
test -f docs/api/typespec/main.tsp && echo OK
# expected: OK
# 4. expected domain files present (paths from repo root)
for d in announcements auth buildings compliance documents faults listings organizations rentals units voting; do
test -f "docs/api/typespec/domains/$d.tsp" || { echo "missing: $d"; exit 1; }
done
echo OK
# expected: OK
cd docs/api/typespec && npx --no-install tsp compile . --no-emit 2>/dev/null || cd docs/api/typespec && npx --no-install tsp --version >/dev/null
The compile + no-emit form is preferred but not all tsp versions support
--no-emit; the fallback just verifies the compiler is reachable. Either exit 0 means the toolchain is wired.
just generate-api && just check-frontend
ppt-rust-backend — utoipa annotations,
handler updatesppt-frontend — regenerated
client locations.github/workflows/api-validation.yml — CI gate