Skip to content

feat(traits): write the run's framework through its project trait - #1499

Draft
edwinyjlim wants to merge 1 commit into
dag/w1-skills-by-traitsfrom
dag/d1-framework-traits
Draft

edwinyjlim wants to merge 1 commit into
dag/w1-skills-by-traitsfrom
dag/d1-framework-traits

Conversation

@edwinyjlim

@edwinyjlim edwinyjlim commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Every write of the run's framework also records it as a project trait with its source, static or user. The values a run uses are unchanged, and the ~20 places that read integration stay as they are.

Stack

The four PRs, in merge order:

PR What it does How it fits in
C1 · PostHog/context-mill#447 Adds a title, description and tags to every skill-menu entry. Wizards in the field ignore the new fields. Ships first, in a context-mill release. W1 picks skills by these tags, and W1 and W2 record their fixtures and prompts from this release.
W1 · #1497 Adds project traits and a tag-based skill pick that runs beside today's pick, plus the wizard-agent-dag flag that decides which pick installs. Base of the wizard stack, on main. Reads C1's tags but works without them. D1 builds on its traits service, and W2 on its traits and flag.
D1 · #1499 (this PR) Records every framework write as a project trait with its source. No flag; the values a run uses don't change. On W1. Extends W1's traits service, so the traits carry the framework as it was written. W1's skill pick and W2's flow conditions read it.
W2 · #1498 Moves the task graphs and prompts of the five orchestrator programs into the wizard. With wizard-agent-dag on, runs use them instead of the fetched prompts and the planner's graph. Top of the stack, on D1. Its flow conditions read W1's traits, W1's flag switches it on, and its prompts come from C1's release.

W1, D1 and W2 merge in that order and ship together in one wizard release, with wizard-agent-dag off. A later PR, W3, removes the flag and the paths it replaced after a week at 100%.

Framework writes

flowchart LR
  detect["Detect step"] -->|static| setter
  screens["Error-tracking and self-driving<br/>detect screens"] -->|static| setter
  picker["Intro screen picker"] -->|user| setter
  hooks["ciPreRun hooks of four programs"] -->|static| apply
  cli["--integration flag"] -->|user| fields
  setter["SessionStore.setFrameworkConfig<br/>on the live session"] --> fields
  apply["applyFramework<br/>on a session draft"] --> fields
  setter & apply -.-> tags(["Later events carry integration<br/>and framework_source"])
  fields["session.integration<br/>session.projectTraits.framework<br/>value and source"]
  fields --> readers["~20 readers of integration<br/>unchanged"]
  fields --> traits["getProjectTraits<br/>written trait over detection"]
  fields --> check{"Before each agent run:<br/>trait matches integration?"}
  check -- no --> mismatch(["framework trait mismatch event"])
Loading
Source Written by
static the detect step; the error-tracking and self-driving detect screens; the ciPreRun hooks of posthog-integration, feature-flags, error-tracking and replay-vision
user the intro screen's framework picker; --integration

Detection that later finds a framework overwrites --integration, as it does today. There is no flag: detection runs before login, and flags load after it.

Telemetry

Event or property Sent
framework_source on every event after a framework write
framework trait mismatch before an agent run, when the framework trait and integration disagree, meaning a write skipped the setter

Test plan

  • pnpm typecheck, pnpm lint (no errors), pnpm check:decisions-bundle
  • pnpm test: 259 files, 3,830 tests
  • New tests: the store setter records static and user and clears the trait with the framework; --integration records user; applyFramework writes integration, trait and tags on a draft; the mismatch check; getProjectTraits keeps the written source
  • The ciPreRun tests for feature-flags and error-tracking run through applyFramework
  • Before merge: a trace run over the detection fixtures and the workbench's framework apps, showing the same framework, skill ids, prompts and graph as main
  • After release: 0 framework trait mismatch events before wizard-agent-dag turns on

🤖 Generated with Claude Code

The session holds the run's written traits in `projectTraits`, each with
its source. Every framework write records the framework trait as well
as `integration`: the session store's `setFrameworkConfig` on a live
session, and `applyFramework` on the drafts the `ciPreRun` hooks of
posthog-integration, feature-flags, error-tracking and replay-vision
edit. Detection records `static`; the intro screen's framework picker and
`--integration` record `user`. The readers of `integration` are
unchanged.

`getProjectTraits` reads the written framework trait, with its source,
over what detection supports. Every later event carries
`framework_source`. Before each agent run, the runner compares the
framework trait with `integration` and logs `framework trait mismatch`
when a write went around the trait.

Detection runs before login and flags are evaluated after it, so the
change has no flag; the values the run uses are the same as before.

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.

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