feature:skill creation/improved from completed task#236
Conversation
| // | ||
| // KEEP IN SYNC with _INTERNAL_WORKFLOW_IDS / _INTERNAL_SKILL_NAMES in | ||
| // app/ui_layer/adapters/browser_adapter.py | ||
| const INTERNAL_WORKFLOW_IDS = new Set<string>([ |
There was a problem hiding this comment.
Single source for the new internal/reserved skill lists
What: Keep the lists in browser_adapter.py only; have the frontend receive them via a new skill_meta WS message
Where: _INTERNAL_WORKFLOW_IDS / _INTERNAL_SKILL_NAMES / _RESERVED_SKILL_NAMES stay in browser_adapter.py; delete INTERNAL_WORKFLOW_IDS + INTERNAL_SKILL_NAMES in TasksPage.tsx and RESERVED_NAMES in SkillCreatorModal.tsx
Why: All three sets are new in this PR and already drifting, modal's RESERVED_NAMES is missing day-planner / week-planner / month-planner. Every future internal skill = 3 places to update
There was a problem hiding this comment.
Move _INTERNAL_WORKFLOW_IDS / _INTERNAL_SKILL_NAMES / _RESERVED_SKILL_NAMES away from TaskPage. We have to keep internal workflow IDs and internal skills names as it is, we can have better system to register CraftBot special workflow in the next update.
|
|
||
| _SKILL_NAME_PATTERN = re.compile(r"^[a-z][a-z0-9-]{1,63}$") | ||
|
|
||
| async def _handle_create_skill_from_task(self, data: Dict[str, Any]) -> None: |
There was a problem hiding this comment.
Extract SkillWorkflowSpawner from the WS handler
What: Move the validation / source lookup / SOURCE-write / spawn flow out of the WS handler into a dedicated module
Where: Refactor browser_adapter.py:_handle_create_skill_from_task (~180 new lines) so the handler shrinks to parse → spawn → broadcast
Why: A handler this large can't be unit-tested without a WS connection; future non-browser adapters will copy-paste it
There was a problem hiding this comment.
Sorry. But let's keep this until the browser adapter refactor.
What and why?
CraftBot now create and improve skill from completed tasks. CraftBot distils the action trace into a reusable skills//SKILL.md for agent to read. The new skill auto-enables and can be called immediately.
Features/items added
Potential issue