wizard-development

작성자: posthog

PostHog 마법사의 디자인 철학과 아키텍처 원칙. 구조적 변경(기능 추가, 러너 확장 등)을 하기 전에 먼저 읽으십시오…

npx skills add https://github.com/posthog/wizard --skill wizard-development

Wizard development

Ask who owns the concern and what they should need to understand to change it. Product knowledge belongs behind typed configuration boundaries; runner and UI infrastructure should consume those boundaries.

ConcernOwner
Framework detection, context, env conventionsFrameworkConfig and framework configs
Integration instructions and orchestrator flows/taskscontext-mill
Programs, steps, prerequisites and outcomesprograms
Sequence, harness, model and effort selectionswitchboard
Local tool permissions and scanner adaptersagent-interface, YARA hooks, Pi security
Scanner ruleswarlock
Token admission and budgetsPostHog mint endpoint and ai-gateway
Screen resolution and renderingTUI through WizardUI

Execution policy and model admission

  • Pi is the default choice for new work. Harness choice and model provider are separate: Pi supports gateway-backed Anthropic and OpenAI transports.
  • Prefer orchestration. A seed agent plans work, then task agents execute focused conversations. Start from metrics and its context-mill flow.
  • Linear is for very simple tasks and legacy support. Composed program sub-runs are also structurally clamped to linear; orchestration cannot nest through that seam.
  • Anthropic Agent SDK remains supported as a legacy fallback, deprecated as the default. Retain it for major Pi vulnerabilities or missing support for new Anthropic models.

Existing routing has not all migrated: DEFAULT_BINDING selects Pi + linear, with per-program and flag overrides. Set new bindings explicitly. Migrating an existing program requires checking its flow, tasks, and lifecycle hooks; changing the default constant alone is insufficient. Both harnesses implement run and runTask.

Adding a model or effort is a cross-repository change:

  1. Define the Wizard model ID and capabilities in constants and models; select it through the switchboard or supported context-mill stage metadata.
  2. Check the PostHog mint's WIZARD_MODEL_ALLOWLIST and allowed efforts. The token's policy is enforced by the gateway; a local constant or CLI override cannot authorize a model.
  3. Check the gateway's provider/catalog support and required Wizard system-prompt policy, including the security-triage request shape. A model not supported by that infrastructure needs a coordinated gateway/mint change before use.
  4. Verify the chosen harness transport and effective effort with the same admission policy used by the target environment.

Local commandments provide runtime and tool guidance. They do not replace the gateway's required safety prompt. Keep gateway policy owned there rather than copying it into skills. Do not infer per-model effort authorization merely from the local capabilities table.

Choose the extension surface

  • For a framework, follow adding-framework-support. Detection is pure; use bounded filesystem helpers and preserve specific-before-generic ordering.
  • For a capability, follow adding-skill-program. Prefer a context-mill command within an existing family when that is sufficient. A native command needs a command module and registration in main.ts, as well as program and binding registration.
  • For screens or primitives, follow ink-tui. Program steps drive screen sequences; business logic calls getUI(), and session mutations use store setters that emit changes.
  • For headless exploration, follow exploring-the-wizard. Drive current legal actions and inspect error outros and pending questions throughout execution.

For a new concern, first look for an existing typed surface. Add an abstraction only when it gives a real owner a smaller, reusable boundary.

Lifecycle and security

runner/index.ts bootstraps, resolves a binding, and dispatches to a sequence. agent-runner.ts is a compatibility re-export, not the implementation. Sequences own their lifecycle; harnesses own SDK calls. ProgramRun.postRun, buildOutroData, customPrompt, and abortCases are consumed by the linear sequence, not by the orchestrator. Put orchestrated work in its flow/tasks and inspect its completion path when extending it.

Keep tool enforcement at the boundary: shared permissions, harness-specific adapters, and warlock scanning. Scanner failure must not silently allow an unsafe operation. Review each adapter's blocking and termination behavior rather than assuming every rejection terminates the run. New scanner rules belong in warlock; changes to how a match is handled belong in Wizard.

User-provided secrets should travel through secret-vault references. Tool implementations resolve values host-side where they are used; they must not return the raw value to the model. Inspect the wizard-tools implementations and the Pi adapter when extending this shared tool surface.

Verification and maintenance

Reuse existing tests for routing, registration, detection, state transitions, and security behavior. Add a focused regression only when it protects a meaningful failure mode that existing checks do not cover. Avoid tests of prose, duplicated shape checks, and assertions already enforced by TypeScript.

For docs, verify local links and claimed APIs, then format edited files. For code, run pnpm typecheck and the relevant existing Vitest files; build when the change affects bundling or runtime behavior. pnpm test already builds. Avoid repository-wide pnpm fix for a scoped edit. Keep new code comments to one line.

Keep desired design policy distinguishable from current runtime behavior.

Read references as needed:

posthog의 다른 스킬

error-tracking-hono
posthog
PostHog 오류 추적 for Hono
tuning-incremental-sync-config
posthog
동기화의 구성은 ExternalDataSchema에 저장되며, external-data-schemas-partial-update를 통해 언제든지 변경할 수 있습니다. 대부분의 변경은 비파괴적이며(다음 동기화에 적용됨), 일부 변경(sync_type 전환, 기본 키 변경)은 동기화된 데이터 손상을 방지하기 위해 신중한 처리가 필요합니다.
playwright-test
posthog
플레이라이트 테스트를 작성하고, 실행이 잘 되며, 불안정하지 않도록 하세요.
error-tracking-ruby
posthog
PostHog Ruby 오류 추적
authoring-log-alerts
posthog
PostHog 프로젝트의 서비스에 유용하고 노이즈가 적은 로그 알림을 작성합니다. 사용자가 로그에 대한 알림 설정을 요청하거나 추가해야 할 알림을 제안할 때 사용하세요.
making-scenes-tab-aware
posthog
Guides converting PostHog frontend scenes to be tab aware for internal scene tabs. Use when adding or refactoring a `SceneExport` scene, fixing state leaking…
posthog-survey-creator
posthog
PostHog에서 안내 대화를 통해 설문조사를 생성하고 구성합니다. 사용자가 설문조사를 만들거나, 사용자 피드백을 수집하거나, 실행하려 할 때 이 스킬을 사용하세요.
authoring-scouts
posthog
PostHog Signals 스카우트를 작성, 편집 및 조정하는 방법 — 프로젝트를 스캔하고 Signals 인박스에 보고서를 작성하는 예약된 에이전트입니다. 사용자가…