Skip to content

feat(orchestrator): pick task skills by project traits, in shadow - #1497

Draft
edwinyjlim wants to merge 2 commits into
mainfrom
dag/w1-skills-by-traits
Draft

edwinyjlim wants to merge 2 commits into
mainfrom
dag/w1-skills-by-traits

Conversation

@edwinyjlim

Copy link
Copy Markdown
Member

Summary

  • Skills by criteria, in shadow. Orchestrator runs resolve each task's skills two ways. The exact-match pick (the id itself, else its group's variant for the run's framework) decides. The criteria resolver in @shared/skill-resolution picks beside it from menu tags and the run's project traits; each disagreement is logged as orchestrator skill resolver disagreement. With the wizard-agent-dag flag on, the criteria pick decides and the exact match is its fallback.
  • Project traits. @services/project-traits holds the run's traits from static detection: the framework, and callsLlmApi when an LLM SDK is a dependency. traitsToSkillTags maps the framework to its framework:<id> tag, and the program runner passes the tags to the orchestrator through RunConfig.traitTags.
  • Menu metadata. SkillEntry carries title, description and tags; bundle variants inherit the bundle's title and description.
  • Telemetry. Every event after the skill menu loads carries context_mill_version. The terminal setup wizard finished event carries the run's wizard flags ($feature/<key>), so run outcomes can be split by flag variant.
  • Fixtures. fixtures/context-mill/ holds a context-mill build's skill menu, agent menu and 41 agent prompts. pnpm record:context-mill-fixtures [base-url] re-records them from a release.

Part of the agent DAG and project traits plan. The flag is wizard-agent-dag; it does not exist in PostHog yet, so every run takes the off path.

Stack

Test plan

  • pnpm typecheck
  • pnpm lint: no errors, and no new warnings in changed files
  • pnpm test: 258 files, 3,822 tests
  • Equivalence test: 0 disagreements for every prompt skill × framework, against the fixtures and against the live v1.59.0 menu (CONTEXT_MILL_MENU=<path>), which has no tags
  • Before merge: re-record the fixtures from the context-mill release that carries Emit a coding-agent handoff doc alongside posthog-setup-report.md #447 (they come from a local build of it today, buildVersion: dev)
  • After release: a week of real runs with 0 disagreement events before wizard-agent-dag turns on

🤖 Generated with Claude Code

Orchestrator runs resolve each task's skills two ways. The exact-match
pick (the id itself, else its group's variant for the run's framework)
decides. The criteria resolver in `@shared/skill-resolution` picks beside
it from menu tags and the run's project traits, and each disagreement is
logged as `orchestrator skill resolver disagreement`. With the
`wizard-agent-dag` flag on, the criteria pick decides and the exact match
is its fallback.

`@services/project-traits` holds the run's project traits from static
detection: the framework, and `callsLlmApi` when an LLM SDK is a
dependency. `traitsToSkillTags` maps the framework to its
`framework:<id>` tag, and the program runner hands the tags to the
orchestrator through `RunConfig.traitTags`.

Skill-menu entries carry `title`, `description` and `tags`, and bundle
variants inherit the bundle's title and description. Every event after
the menu loads carries `context_mill_version`, and the terminal
`setup wizard finished` event carries the run's wizard flags.

`fixtures/context-mill/` holds a context-mill build's skill menu, agent
menu and 41 agent prompts; `pnpm record:context-mill-fixtures` re-records
them from a release. The equivalence test checks that both resolvers pick
the same skill for every prompt skill and framework.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci feature-flags
  • /wizard-ci mcp-analytics
  • /wizard-ci replay-vision
  • /wizard-ci revenue
  • /wizard-ci self-driving
  • /wizard-ci warehouse
  • /wizard-ci warehouse-seeded

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/google-adk
  • /wizard-ci ai-observability/groq
Show more apps
  • /wizard-ci ai-observability/manual-capture
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/opentelemetry
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/flutter
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci feature-flags/django
  • /wizard-ci feature-flags/next-js
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci replay-vision/javascript-node
  • /wizard-ci replay-vision/next-js
  • /wizard-ci replay-vision/react-vite
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit
  • /wizard-ci warehouse/monorepo-env
  • /wizard-ci warehouse/multi-source-next
  • /wizard-ci warehouse/stripe-node
  • /wizard-ci warehouse/zero-source
  • /wizard-ci warehouse-seeded/next-stripe
  • /wizard-ci warehouse-seeded/next-stripe-declined

Test against a Context Mill branch:

  • /wizard-ci all context-mill:my-branch

Add context-mill:<branch> to any command above to pin the Context Mill branch. It defaults to main.

Results will be posted here when complete.

Flows in the program contract read project traits, and the contract
imports no service, so the vocabulary types live there and
`@services/project-traits` produces their values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant