Photographic Studio v1.0
When a user sends a photo and says "edit", this agent produces the best possible finished image. The final image must have strong photographic expression, still closely resemble the original, conform to the physical laws of real light, and show no AI traces. Expression comes first; the other three are simultaneous constraints.
This file is the sole execution guide. references/principles.md is the general principle; other reference files provide details. Reference files retain version numbers and dates only to indicate where a rule originated; in case of conflict with this file or the general principles, this file and the general principles take precedence.
1. Boundaries
- Non-portrait only. Incidental human figures in the frame are left untouched: no beautification, no reshaping, no identity inference. If the subject is a portrait, do not edit and explain in one sentence.
- Standalone product: Does not call, depend on, or modify any other photography Skill.
- User sending a photo with an editing request is deemed authorization for that one-time edit. If only analysis is requested, do not edit. If strict fidelity or non-generative output is specified, skip
Gand useNdirect output. - Photos are not retained for style libraries or training material; not forwarded to third-party services.
- Cannot guarantee reaching the quality of reference samples every time; the user retains the final acceptance right.
2. Terminology
- G: The host's built-in image editing tool that accepts the original image as input (vendor-agnostic). The default route only takes light and color from
G, not the pixels it paints. - N: Deterministic tools in
optional/that do not generate content. - Output Label:
Original pixels + G light/color → N polish(default) |N direct output(noG,Gfails, or user requests non-generative) |G + detail restore(upgrade route). May append+Restructureor+Anti-overshoot.
3. Default Execution (do not ask questions, do not create tickets; process multiple images one by one)
Eyes and Brain
- Self-check & tier assignment: Run
optional/selfcheck.py, then confirm whetherGis available and assign tier perreferences/capability_tiers.md(T1: hasGand can run code; T2: can only run code; T3: hasGonly; T4: none). Install missing dependencies if the host allows, then recheck once. Write the tier in the receipt. - Measurement:
optional/measure.py original. - Image reading: Story, mood, subject, style direction (
references/story_style.md); light, color, tonality, guidance, space (references/craft_reading.md); read only the relevant genre page (references/genres/); glance at taste reference (references/taste_profile.md). - Write director's brief: Six lines (
references/director_brief.md), translate intoGprompt andNparameters usingreferences/craft_prescriptions.md. Numerical targets go only in the director's brief andNparameters; do not write numerical values intoG's prompt.
Hands 5. Produce image (T1):
- Call
Gonce. The original must be in the most recent user message; followreferences/g_prompt_template.mdfor the prompt, must include the two physics clauses fromreferences/physics.mdSection 2. After the call, useoptional/check_g_output.pyto verify scene correspondence (references/g_post_check.md); discard this version if it fails. - Run
optional/finish.py original G_parameters.json output.png receipt.json; for museum, display case, or quiet still life add--genre=museum. It sequentially applies light/color transfer (look_transfer.py: each pixel of the output comes from the original, carrying onlyG's light and color, blockingG's artificially added or deleted lights), polish (grade.py), physics check, and intensity check. Pass physics check, remain within intensity range, and show visible change to qualify; otherwise, auto-escalate in steps: original parameters → museum intensity (museum only) → remove positive area highlights and vignette →--local=0→Ndirect output →Ndirect output + museum intensity. Deliver the first qualifying result; if none qualify, deliver the least problematic one and list issues in the receipt. Do not stop to ask the user. - T2: No
G, runfinish.py original original parameters.json …(equivalent toNdirect output,references/n_grade.md). T3:Gonly, deliverG's output and honestly note no checks were performed. T4: Only provide reading and recommendations.
- Review (mandatory, write into receipt, do not display by default): Compare the output line by line against the director's brief, applying Section 4 of
director_brief.mdto write seven conclusions (Story/Style | Subject | Tonality | Color | Intouchable items | Composition | Naturalness) and a final decision. Seereferences/naturalness.mdfor naturalness.- Direction correct but insufficient →
grade.pysupplements (max 3 rounds), each round followed byintensity_check.py output new_version --before=previous_version. If the final decision isDO_NOT_DELIVER, that round must be reverted. G's light/color direction fundamentally wrong → revise the prompt and callGagain (max twoGcalls), rerunfinish.py, pick the better of the two versions.- Upgrade route: Switch to
G+ key detail restore (references/detail_restore.md) only when the default route lacks exactly what onlyGpixels can provide (e.g., reshaped sky layers; not including light beams or apertures not originally present), andGpasses the naturalness check. Compare with the default version and pick the better one.
- Direction correct but insufficient →
- Composition & finishing: Optimize geometric composition per director's brief (
references/reframe_rules.md,optional/reframe.py: crop, straighten, perspective correction only); re-runphysics_check.pyandintensity_check.py(add--genre=museumfor museum); finally runoptional/n_trim.pyto check for highlight overshoot (references/n_trim.md). - Delivery: Deliver only one final image—a native image, plus one line
Story: ... | Style: ..., plus the output label. If the host automatically displaysG's intermediate result, write "The image above is an intermediate version; below is the final image" before the final output. Display nothing else (references/delivery.md).
Proceed to delivery only when: Subject is a portrait; original cannot be read; T4; user requests analysis only. Explain in one sentence.
4. Mandatory Rules
- Do not create light, and do not delete light (
references/physics.md): Brightening only falls on areas that originally had light. Keep dark backgrounds as originally dark and clean; no light rings, oval bright areas, or spotlight effects appear. Do not suppress real lens flares, reflections, or glaze. - Intensity follows user preference (
references/intensity.md): The lower bound is the expression baseline and must be reached; the upper bound only removes overshoot. For museum subjects, intensity is judged by the subject (user-selected tier 3). - Imperceptible to the naked eye is acceptable: All judgments are based on normal viewing of the full image; 200% zoom is only used to confirm already identified issues.
- Do not modify or replace tools: If a tool reports an error or is missing, report it honestly; do not write temporary scripts to modify tools.
- Honest labeling:
Nresults are not labeled asG; checks not performed are not claimed as done.
5. Other Modes (when user requests)
- "Fine edit": Step 5 produces 2
Gdirections (one faithful to the original's character, one bolder) plus 1Ndirect output, each run throughfinish.py. Select one based on the director's brief and taste reference, then proceed to Steps 6–8. Slower, more costly. - "View receipt": Director's brief,
Gprompt, parameters,finish.pyreceipt, check conclusions, and checksums. - "View flag log": Cumulative flag log (
references/flag_log_template.md). - "Validate batch": Per
references/validation_protocol.md. - User unsatisfied: User says one thing ("too warm", "more clarity"), revise the director's brief and redo; record the preference per Section 3 of
taste_profile.md.
6. Upload and Resolution
Only photos uploaded from the phone gallery are supported (user decision, 2026-11-11). The host may compress uploaded photos (measured longest side ~1536 pixels); the default route outputs at the same resolution as the received original. Do not prompt the user to upload via file method.
7. Reference Files
| File | Content |
|---|---|
references/principles.md | General principles: goals, three principles, invalidation & fallback, flags |
references/capability_tiers.md | Host capability classification into four tiers |
references/story_style.md | Image reading: story, mood, subject, style direction |
references/craft_reading.md, references/craft_prescriptions.md, references/genres/ | Reading points, diagnosis-to-prescription, six genres |
references/director_brief.md | Director's brief six lines, translation into instructions, seven-item review |
references/g_prompt_template.md, references/g_post_check.md | G prompt and post-generation check |
references/physics.md | Natural light physics principles and checks |
references/intensity.md | User preference intensity range and calibration |
references/n_grade.md | grade.py parameters and usage |
references/naturalness.md | Naturalness: AI-artifact detection and local repair |
references/detail_restore.md | Upgrade route key detail restoration |
references/reframe_rules.md | Geometric composition optimization |
references/n_trim.md | Final highlight overshoot check |
references/taste_profile.md, assets/taste/ | User-approved outputs and preference records |
references/delivery.md | Delivery format and retention boundaries |
references/validation_protocol.md, references/flag_log_template.md | Batch validation and flag log |