Imported from Meditrendy/theme_lt (
AGENTS.md). Install upstream withnpx skills add Meditrendy/theme_lt. Copyright stays with the author.
Agent Instructions: Meditrendy Pro Child Theme
This repository contains the Meditrendy child theme for the Pro theme. Treat it as the presentation layer of the site.
Responsibility
- Put only website-specific visual, layout, header, mobile navigation, cart/checkout presentation, and theme integration changes here.
- Do not move CSS required for
meditrendy-coreplugin features to function into the theme. Plugin-owned components should remain usable on any site with their own structural CSS in the plugin. - Use the theme for site-specific polish layered on top of plugin components: colors, typography, decorative spacing, brand treatment, and layout adjustments that are specific to this theme/site.
- Do not put changes intended to work across Meditrendy sites here. Reusable WooCommerce behavior, shared cart/checkout UI, and their required assets belong in
meditrendy-core. - Do not edit the Pro parent theme, WordPress core, WooCommerce core, or third-party plugin files unless the user explicitly asks.
- If a requested change can be made cleanly in Cornerstone, Pro, WordPress admin, WooCommerce settings, or another editor UI, prefer giving the user exact editor instructions instead of changing code.
- Use code for editor-controlled areas only when the editor cannot reasonably express the behavior, the change must be reusable/systematic, or the user explicitly asks for a code-level implementation.
Project Conventions
- Do not create Git commits, push branches, or open pull requests unless the user explicitly requests that action in the current conversation. Leave completed changes uncommitted by default.
- Frontend/customer-facing labels should stay Lithuanian unless the user asks otherwise.
- Admin/editor-facing labels may be English or Polish.
- Prefer stable custom classes and existing theme modules over styling generated Cornerstone classes such as
m1q-*ore246-*. - Cornerstone/Pro generated markup can change; avoid depending on brittle generated class names when a custom wrapper or selector is possible.
- Before editing code that targets Cornerstone-generated markup, check whether the same result can be achieved by adding a class, changing element settings, or editing content in Cornerstone.
- Prefer shortcode-based customization for Cornerstone output over JavaScript DOM rewriting when the behavior can be expressed server-side.
- Keep changes focused. Avoid unrelated refactors.
- Always consider the user experience when making changes.
- Always consider website performance when making changes.
- Changes that apply to products usually apply to product sets as well.
- Add block comments in english to the CSS code to indicate what part is being styled.
- Do not introduce English or Polish frontend strings unless the user explicitly approves them.
- For user-facing strings, use Lithuanian wording and keep it consistent with WooCommerce context.
- Always prepare for translations in the future.
- For translation-only changes to WordPress, WooCommerce, theme, or plugin strings, prefer advising the user to change the string in Loco Translate (or the active translation plugin) instead of adding translation overrides in code. Add code-level translation filters only when the string cannot be translated reliably through the admin translation workflow, when the behavior must be dynamic, or when the user explicitly asks for a code fix.
File Layout
- PHP bootstrap and enqueues:
functions.php - Theme modules:
modules/ - CSS:
styles/ - JavaScript:
scripts/
Use existing files when the change naturally belongs there. Add a new file only when it creates a clearer boundary.
JavaScript And CSS
- Use
constandletin new JavaScript. - Keep JavaScript small and scoped to the affected UI.
- Use JavaScript for Cornerstone customizations only when a shortcode, template setting, or CSS cannot reasonably solve the problem.
- Do not add new build tools or external packages without user approval.
- Avoid global selectors that could affect WooCommerce blocks, product pages, or Cornerstone sections unintentionally.
- Prefer CSS over JavaScript for styling.
- Prefer theme CSS only for site-specific visual styling, even when the markup is generated by
meditrendy-core. - Keep plugin CSS responsible for plugin-owned structure, positioning, visibility states, responsive behavior, loading/disabled states, and baseline usability.
- When a plugin feature needs broader visual polish, put brand/theme-specific styling here; keep any CSS required for the component to display and operate correctly in
meditrendy-core. - When writing JavaScript, use ES6 syntax and modern browser features.
- When writing JavaScript, avoid jQuery and other third-party libraries unless the existing integration requires them.
- When writing JavaScript, take performance into account.
Testing
- For changed PHP files, run:
C:\laragon\bin\php\php-8.1.10-Win32-vs16-x64\php.exe -l path/to/file.php - For frontend behavior, verify the affected page in a browser when practical.
- Check both desktop and mobile behavior for navigation, header, filters, cart, and checkout UI changes.
Boundaries
- If a change is intended to apply across sites, it belongs in
meditrendy-core, including shared checkout/cart UI, reusable CSS, JavaScript, and WooCommerce behavior. - If a change is specific to this website's theme, branding, layout, or content, it belongs here.
- Prepare and version theme changes in this repository, but do not deploy, upload, or replace the production theme unless the user explicitly requests a specific deployment method. Assume the user will transfer theme files to production via FTP when no deployment method has been requested, and do not invent a substitute deployment workflow.
