iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
The two-plane design keeps AI code generation in a disposable scratch workspace and gives a separate, trusted identity the only authority to apply changes to the canonical repository. The generator produces a diff and logs; it never pushes to canonical history. Harper Xu’s technical article proposes this as a recommended architecture for AI-assisted software changes, not as a formally standardized or independently proven one.
The core idea: separate authority from work
The article uses a kitchen and dining room metaphor. Scratch compute is the kitchen, where code is prepared and where mistakes are cheap. The canonical repository is the dining room: its history is reviewed and serves everyone downstream, so only work that passes inspection is allowed in. The practical point is that the generation environment and the apply side fail differently and hold different permissions. A failure in generation should never be able to rewrite canonical history.
The article states this as a rule: “The applying identity must not be the generator.” A second line makes the same point about lifecycle: “Generation and apply remain separate failure domains always.”
How the workflow runs
- Build a task bundle instead of mounting the live tree. The bundle contains a sparse checkout recipe, the test command, and a size budget. Dotenv files and private keys are excluded. The article presents this manifest as a local contract that a team defines for itself, not as a vendor schema.
- Let the agent work in disposable scratch state. Production secrets, private deploy keys, writable origin access, and unnecessary production network access are withheld from this environment.
- Export only a diff and logs to a review inbox on a trusted machine. The design does not send changes through a push initiated from the generator side.
- Inspect and apply on the trusted side. Review the diff for scope, path problems, secrets, and binary content. Then apply it under a trusted identity.
- Enforce limits on the trusted side. The generator may ignore the manifest’s budget, so the apply host must count files and bytes itself and reject anything over the limit.
The apply sequence in practice
The article’s sample apply step runs a check before anything changes, then applies the patch to the index, and commits from the canonical side. A minimal version looks like this, using placeholder paths for a trusted apply host:
Quick Recap
Rank #4
- POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
Rank #3
- POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
- WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
- FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
- MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
- PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
Rank #2
- POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
- WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
- FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
- MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
- PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
#1 Best Overall
- POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
cd /srv/canonical
git status --porcelain # must be empty before applying
git apply --check /srv/inbox/change-0142.diff
git apply --index /srv/inbox/change-0142.diff
git commit -m "Apply reviewed change 0142"
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.

