Upgrade to Pro — share decks privately, control downloads, hide ads and more …

プラガブルで宣言的なソフトウェアファクトリーを支えるTypeScript

 プラガブルで宣言的なソフトウェアファクトリーを支えるTypeScript

JSConf 2026

Seiji Takahashi

November 22, 2026

Transcript

48 slides
  1. 1 orchestrator: { model: opus, effort: high } 2 stages:

    3 - id: plan 4 role: plan 5 model: fable 6 effort: xhigh 7 - id: build 8 role: implement 9 routing: 10 router: { provider: cloudflare, model: clef } 11 routes: 12 - { id: heavy, model: opus, effort: xhigh } 13 - { id: standard, model: opus, effort: high } 14 plugins: 15 mockup: { model: sonnet, effort: high }
  2. hellofactory-definitions EXPLORER acme-billing.yaml definitions agents verified.yaml standard.yaml projects acme-billing.yaml acme-portal.yaml

    1 name: acme-billing 2 agent: verified 3 repositories: 4 - repo: acme/billing-api 5 setup: 6 - go mod download 7 checks: 8 - go test ./... 9 - repo: acme/billing-web 10 setup: 11 - pnpm install --frozen-lockfile 12 checks: 13 - pnpm check verified.yaml 1 name: 2 stages: 3 - id: plan 4 role: plan 5 gate: human-approval 6 - id: build 7 role: implement 8 - id: verify 9 role: verify 10 - id: deliver 11 uses: github-draft-pr 12 slots: 13 capture: browser
  3. hellofactory-definitions standard.yaml contracts/stage.ts 3 stages: 4 - id: plan 5

    role: plan 6 - id: build 7 role: implement 8 - id: deliver 9 uses: github-draft PROBLEMS 1 standard.yaml:9 1 2 3 4 5 6 7 8 9 10 11 const BUILT_IN_STEP_IDS = ["github-draft-pr"] as const; export const BuiltInStepSchema = z.enum(BUILT_IN_STEP_IDS, { error: unknownName(" ", BUILT_IN_STEP_IDS), }); export const StageSchema = z .strictObject(stageFields, { error: unknownFlowKey }) .refine(roleOrUses.check, { message: roleOrUses.message }); export type Stage = z.infer<typeof StageSchema>;
  4. plugin-registry 1 2 3 4 5 6 7 8 9

    10 11 12 13 declarations/mockup.ts plan PlanInput → PlanResult export const mockupDeclaration = declarePlugin({ id: "mockup", slots: ["mockup"], settings: { enabled: z.boolean().default(true), ...pluginAgentFields, }, }); export const PLUGIN_DECLARATIONS = [ artifactsDeclaration, browserDeclaration, … planDeclaration, mockupDeclaration, implementDeclaration, verifyDeclaration, ] as const; mockup MockupInput → MockupResult implement ImplementInput FixInput → verify VerifyInput → VerifyResult delivery DeliverInput → DeliveryState periodic → PeriodicResult capture keep CaptureTarget →
  5. export type MockupMaker = { auto: boolean; make( input: MockupInput,

    tools: StageTools, ): Promise<MockupResult>; }; tools.turn tools.environment tools.capture tools.checkpoint
  6. stg.example.com $ strix -n -t ./ -t https://stg.example.com # 0

    export type PeriodicTask = { name: string; schedule: PeriodicSchedule; run(context: { at: Date }, tools: Tools): Promise<PeriodicResult | undefined>; };
  7. plan 8 Fable · xhigh build 26 Opus · xhigh

    verify 6 Opus · high 1 draft PR deliver
  8. stages: - - id: split uses: split-plan - id: build

    role: implement - - id: review uses: self-review
  9. export const mockupRunnerPlugin = defineRunnerPlugin( mockupDeclaration, (setup) => mockupPlugin(setup.settings), );

    const RUNNER_PLUGINS: Record< $ playwright-cli open http://localhost:3200/ PluginId, RunnerPluginEntry<…> > = { artifacts, browser, implement, mockup, plan, … }; $ playwright-cli video-start /tmp/run.webm $ playwright-cli screenshot --filename=ac1.png
  10. /invoices INV-2041 INV-2038 AC1 1. playwright-cli open http://localhost:3200/invoices 2. playwright-cli

    video-start /tmp/run.webm 3. 4. /invoices → screenshot ac1.png → screenshot ac2.png 5. → screenshot ac3.png 6. video-stop → ffmpeg run.mp4 AC3 /invoices?dept=sales ¥128,000 ¥54,000 INV-2041 INV-2038 ¥128,000 ¥54,000 AC2 /invoices INV-2041 ¥128,000 INV-2038 ¥54,000

More Decks by Seiji Takahashi

Other Decks in Technology