template-source-editing

Enforce source-only edits to compiled templates in view/tpl.

1|Updated Mar 2, 2024
One-click install
npx skills add https://github.com/Aiweline/WelineFramework --skill template-source-editing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: template-source-editing
Source: https://github.com/Aiweline/WelineFramework/tree/main/dev/ai/skills/template-source-editing
Command: npx skills add https://github.com/Aiweline/WelineFramework --skill template-source-editing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guideline enforces that the compiled template output in view/tpl cannot be edited directly. All changes must be made against the corresponding source templates in view/templates or view/theme, and the system will re-generate the compiled output from those sources to ensure consistency.

Core Features & Use Cases

  • Enforces strict separation between compiled assets (view/tpl) and their source origins (view/templates, view/theme, and module sources).
  • Guides developers to locate source templates efficiently, and to validate changes via the standard build/compile workflow.
  • Use Case: A developer notices a mismatch between the rendered UI and the source template; they locate the source in view/templates, update it, and trigger the build to reflect changes in view/tpl.

Quick Start

Modify the source template in view/templates or view/theme and re-run the build to refresh the compiled outputs.

Frequently Asked Questions about template-source-editing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why do my template changes in view/tpl keep getting overwritten?

Changes to compiled templates in view/tpl are overwritten because the build process regenerates them. You must edit the source templates in view/templates or view/theme to ensure updates persist through the build workflow.

How do I safely edit frontend templates without breaking the build?

To safely edit frontend templates, modify the source files in view/templates or view/theme instead of the compiled view/tpl outputs. Re-running the standard build process will regenerate the compiled templates to reflect your source updates.

What is the difference between source templates and compiled template outputs?

Source templates reside in view/templates or view/theme and serve as the single editable origin. Compiled template outputs in view/tpl are generated artifacts that should never be edited directly to maintain consistency across the framework.

Where do I locate the source template for a specific view/tpl file?

You locate the source template for a compiled view/tpl file by checking the corresponding module sources, view/templates, or view/theme directories. The framework maps these source origins to generate the final compiled output during the build.

Can I directly modify phtml files in the view/tpl directory?

You cannot directly modify phtml files in the view/tpl directory because it contains compiled outputs. All modifications must target the source templates in view/templates or view/theme to ensure the build process regenerates consistent views.

What should I do if the rendered UI does not match my source template updates?

If the rendered UI does not match your source template updates, verify you modified the correct source in view/templates or view/theme. Then trigger the standard build or compile workflow to refresh the compiled view/tpl outputs and reflect the changes.