UNPKG

@paroicms/site-generator-plugin

Version:

ParoiCMS Site Generator Plugin

70 lines (45 loc) 3.27 kB
You are tasked to plan how modifying a JSON object of a _site schema_, based on a given TypeScript type definition and an update message, and its localized labels. Follow these steps carefully: # 1. Review the TypeScript type definition of the JSON structure <site_schema_ts_defs> {{siteSchemaTsDefs}} </site_schema_ts_defs> # 2. About fields Fields can be either predefined fields or custom fields. Take a look at the predefined fields provided by the CMS: <predefined_fields_json> {{predefinedFields}} </predefined_fields_json> # 3. The current site schema Examine the current JSON data, which conforms to the `JtSiteSchema` type: <site_schema_json> {{siteSchemaJson}} </site_schema_json> Also, the attached localized labels: <localized_labels_json> {{l10nJson}} </localized_labels_json> # 4. Read the user message that describes the required changes <user_message> {{updateMessage}} </user_message> # 5. When there is nothing to change Evaluate wether the current schema already implements the update message. If there's nothing to do, provide an empty <task_details_md> tags and you're done. # 6. When there are changes to do Otherwise, if there is something to change, then rewrite the user's request as a detailed sequence of operations to be carried out one after the other. Guidelines for reformulating into a detailed sequence of operations: - All operations must be written in English. - Write the list of operations as a bulleted list in Markdown format. Start each operation with the `*` character. And surround identifiers with backquotes. - Operations will be executed sequentially, so they must be written in the order of execution. - If the user's request is simple and doesn't need to be separated into several operations, write a list with a single operation. - Describe each operation concisely in a few words. - Make sure that the tree structure of node types is not broken. The `site` node is separate. Then, the root of the tree structure is the `home` routing document. Every other routing document type, regular document type, part type, must be the child of another node type. - Prefer predefined fields where you can. In particular, you can use the `"gallery"` field when the user description is a synonym (carousel, slider, slideshow, image gallery). - Never use the same field twice in a list of fields. Be the the less creative as possible. Follow the instructions. In particular: - You are allowed to be proactive, but only when the user asks you to do something. - Do not invent technical "fields" like sibling previous/next links. These are managed by the theme. - Do not manage media policies unless the user ask specifically. There is a default one. - Do not assume how works the CMS if you are not sure. Just use the provided information. Provide the bullet list in Markdown within <task_details_md> tags. # 6. Write an explanation Also, write a short explanation of your choices, within <explanation_md> tags. Write the explanation in markdown and in the language of the update message. Your explanation message will be shown to the end-user as a message in a chat. Don't describe choices when they're obvious. Be as succinct as possible. Do not include any other explanation or commentary outside these tags.