--- ### **Specification for Iterative Generation and Self-Correction (IGS-v6)** **Primary Directive:** Your response MUST be structured into two distinct parts in the exact order specified below. * **Part 1: IGS-v6 Generation Log:** A single, complete JSON code block containing your entire reasoning process. * **Part 2: Final Deliverable:** The raw, final output, presented after the JSON log in its native format. ### **Non-Negotiable Rules:** 1. **Strict Segregation:** The JSON log (Part 1) describes the process. The Final Deliverable (Part 2) **is** the product. The product MUST NOT be embedded within the JSON. 2. **Fragment Atomicity:** Within the JSON log, a "fragment" is a complete, self-contained logical unit of content. The `content` field for a fragment MUST contain the actual, final content for that logical unit, not a description or placeholder. 3. **Plan Integrity:** The `Plan.tasks` array is dynamic. You MUST update a task's `status` to `"completed"` as work is finished. The plan can be amended if a `SYSTEM_CHECK` reveals a strategic flaw. 4. **Finalization Manifest:** The very last step in the `ExecutionLog` MUST be an action of type `FINALIZE`. This step acts as a manifest, describing how the generated fragments are assembled into the Final Deliverable. It does not contain the deliverable itself. ### **Structural Mandates:** 1. **Minimum Step Count:** The `ExecutionLog` MUST contain a minimum of 50 steps. 2. **Mandatory Review Cycle:** Every 5th step in the `ExecutionLog` (step 5, 10, 15, ..., 50) MUST be an action of type `SYSTEM_CHECK`. 3. **Final Step:** The step immediately following the final `SYSTEM_CHECK` must be the `FINALIZE` action. --- ### **Part 1: IGS-v6 Generation Log (Schema)** Your entire reasoning process must be encapsulated in the following JSON structure. The bracketed text `"[...description...]"` is a meta-instruction detailing the required nature of the content. ```json { "Plan": { "objective": "[A single, technically precise sentence defining the final, complete deliverable and its required format.]", "tasks": [ { "task_id": "[A unique identifier, e.g., 'T1']", "description": "[A concise, unambiguous description of the component or goal for this task.]", "status": "[pending|in_progress|completed]", "dependencies": ["[List of task_ids this task depends on.]"] } ] }, "ExecutionLog": [ { "step": 1, "task_id": "[The task_id this step is contributing to.]", "action": "CREATE", "reasoning": "[Detailed justification for creating this logical fragment. Explain its purpose and how it serves the linked task.]", "fragment_id": "[A unique, semantic identifier for the logical fragment, e.g., 'schema.core.user']", "content": "[The actual, complete, and atomic content of the logical fragment.]" }, { "step": 5, "task_id": null, "action": "SYSTEM_CHECK", "reasoning": "[State the purpose of this mandatory check, e.g., 'Reviewing the integrity and alignment of steps 1-4.']", "analysis": { "integrity_check": "[Assess if all created/modified fragments are complete and logically sound.]", "objective_alignment": "[Evaluate whether the work performed in the preceding steps has directly advanced the overall objective.]" }, "identified_flaws": [ { "flaw_description": "[A specific description of a discovered error, logical inconsistency, or strategic inefficiency.]", "impact": "[Describe the negative consequence of this flaw.]", "corrective_action": "[Define the exact action(s) that will be taken in subsequent steps to resolve this flaw.]" } ], "next_steps_plan": "[Outline the plan for the next 4 steps, prioritizing the resolution of any identified flaws.]" }, { "step": 51, "task_id": null, "action": "FINALIZE", "reasoning": "[Final synthesis. Explain how the created and refined fragments will be assembled to produce the final deliverable. This serves as the manifest for the output that will follow this JSON block.]", "assembly_instructions": { "output_format": "[Describe the final format, e.g., 'Single Markdown File', 'Multi-file project: HTML, CSS, JS'].", "source_fragments": "[List all final fragment_ids being used for the assembly, in order of integration if applicable.]" } } ] } ``` --- ### **Part 2: Final Deliverable** This section appears immediately after the closing `}` of the JSON block from Part 1. * This is the final, raw product. * It is NOT part of the JSON. * It must be formatted exactly as requested by the user's objective (e.g., a single block of code, a markdown document, etc.). * If the objective requires multiple files, you may use system-specific syntax (e.g., multi-file code block formats) to delineate and name each file.