save_file
Finalize and save a file by replacing its full content. Provide the file UUID, name, and type; include context fields for significant changes.
Instructions
Finalize a file. Full replacement - call get_file first to update existing files.
Required: uuid, name, type. For significant changes, include context fields: summary, rationale, references, decisions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | UUID of the file to save | |
| name | Yes | File name (without extension) | |
| type | Yes | File type: "js" for JavaScript/Vue, others for PHP | |
| extension | No | File extension: "vue" for Vue SFCs, "js" for JavaScript | |
| template | No | Root element UUIDs for Vue <template> | |
| data | No | Method UUIDs (from create_method) | |
| statements | No | Statement UUIDs (imports, variables, refs) | |
| includes | No | File UUIDs for local imports (e.g., Vue components imported by app.js) AND framework class UUIDs/namespaces. CRITICAL: For JS mount files, add imported Vue component UUIDs here or they won't be bundled. Use models array for project models. | |
| models | No | Project model UUIDs (auto-namespaced). Do NOT duplicate in includes. | |
| frameworkImports | No | Stellify framework modules to import (e.g., ["Http", "Form", "Collection"]). Auto-generates: import { Http, Form, Collection } from 'stellify-framework'; | |
| summary | No | Context: What this file does and why it exists | |
| rationale | No | Context: Why it was built this way | |
| references | No | Context: Related entities [{uuid, type, relationship, note}] | |
| decisions | No | Context: Design decisions | |
| attributes | No | PHP 8 class-level attributes (e.g., ["Fillable(['name', 'email'])"], ["ObservedBy(UserObserver::class)"]). Use search_attributes tool to find available attributes. |