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

Copy link
Copy Markdown
Member

Summary

  • One write, recorded as a trait. The session holds the run's written traits in projectTraits, each with its source. Every framework write records the framework trait alongside integration:
    • the session store's setFrameworkConfig on a live session (the detect step, the error-tracking and self-driving detect screens, the intro picker)
    • applyFramework on the drafts the ciPreRun hooks edit (posthog-integration, feature-flags, error-tracking, replay-vision)
  • Sources. Detection records static. The intro screen's framework picker and --integration record user. Detection that later finds a framework still overwrites --integration, as it does today.
  • Readers unchanged. The ~20 places that read integration (screens, analytics, prompts, the health check) stay as they are. getProjectTraits reads the written framework trait, with its source, over what detection supports.
  • Telemetry. Every event after a framework write 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.
  • No flag. Detection runs before login and flags are evaluated after it, so this can't sit behind wizard-agent-dag. The values a run uses are the same as before; the mismatch event is the field check.

Stack

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