Skip to content

Conversation

@bfollington
Copy link
Contributor

@bfollington bfollington commented Apr 1, 2025

Todo

  • Fix initial appearance (should be hidden)
  • Spec needs to be extracted from raw XML block, along with data model
  • Cached response needs short delay to make animation look correct between states (height keeps setting itself to 0)
  • Broken references when imagining from currentcharm
  • Block pass as much information through the pipeline as we can in a form
  • What can we trim from workflow.ts
  • Clean TODO(bf) comments
  • Clean up debug logs

Context

image

@bfollington bfollington marked this pull request as draft April 1, 2025 06:08
@bfollington bfollington changed the title Fix/edit/rework planning and workflow classification Fix/edit/rework planning and workflow classification CT-59 Apr 1, 2025
@linear
Copy link

linear bot commented Apr 1, 2025

@bfollington bfollington changed the title Fix/edit/rework planning and workflow classification CT-59 Fix/edit/rework planning and workflow classification CT-59 CT-104 Apr 1, 2025
@linear
Copy link

linear bot commented Apr 1, 2025

bfollington and others added 7 commits April 3, 2025 16:54
Added new workflow classification system with three core workflows:
- FIX: Address bugs without changing spec or schema
- EDIT: Update functionality while preserving core schema
- REWORK: Create new functionality with potentially new schema

Implemented:
- Intent classification using LLM
- Plan generation based on workflow type
- Preview integration in SpecPreview component
- Workflow toggle UI in preview panel
- Basic test coverage

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix imports in charm/src/imagine.ts
- Fix CharmDetailView to use correct components
- Update the SpecPreview component to use basic preview without workflow controls for now
- Add proper fallbacks for LLM failures in tests

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add current implementation status section
- Document integration with existing functionality
- Add implementation details for each component
- Outline next steps for further development

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
When a user mentions any charm (except the implicit reference to the current charm),
we must use the "rework" workflow which:
1. Constructs an argument cell that can access data from all referenced charms
2. Builds a combined schema from all references
3. Uses castNewRecipe instead of iterate

This change:
- Updates classifyIntent to automatically classify as "rework" when references exist
- Adds a check in generateWorkflowPreview to override user workflow selection
- Updates IMAGINE-DESIGN.md with detailed explanation of the reference handling
- Adds skeleton tests for the reference handling behavior

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@bfollington bfollington force-pushed the feature/workflow-classification branch from 6a35590 to 50b8ec3 Compare April 3, 2025 06:58
Comment on lines +90 to +92

// XML tag functions have been moved elsewhere
// Tests will be updated when we create proper tests for the workflow module
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wat?

For IMAGINE workflows you MUST include both <result_schema> tags with valid JSON schemas.
Each schema must be a JSON object with "type": "object" and must include a "properties" object with property definitions.
Example schema format:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll move the schema to the second step in a later PR

}

// For rework workflows, extract both argument and result schemas
if (workflowType === "imagine") {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda messy logic, needs a cleanup

@bfollington bfollington marked this pull request as ready for review April 7, 2025 08:06
@bfollington bfollington requested a review from seefeldb April 7, 2025 08:07
@bfollington bfollington self-assigned this Apr 7, 2025
@bfollington bfollington merged commit 8c15b8f into main Apr 8, 2025
5 checks passed
@bfollington bfollington deleted the feature/workflow-classification branch April 8, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment