Lucky.ai Auto Dev — All in One v1.3.3

本版在 v1.3.2 基础上补齐 A0 三个审计边界:secret-safe inspection、non-mutating writability checks、source-only schema discovery / no case filename listing。

E0-SlimFROZEN
Auto Dev当前开发优先级
A0 only报告后 STOP
Read-safe不读案件内容 / secrets / case filenames
新增硬限制:不 cat secrets;可写性只用 test -w/ACL;sudo 只允许 sudo -n -l;Candidate/Task schema 只从 repo/migrations 获取;案件目录不列文件名。

1. Requirements v1.3.3

Lucky.ai Auto Dev — Requirements v1.3.3

Date: 2026-10-02
Status: PASS FOR A0 ONLY NOW
Development authorization ≠ production release authorization.
Until the 2026-10-10 hearing ends, Claude work is session-based and Owner-started only. No unattended Claude.

0. North Star

Lucky.ai Auto Dev moves the Owner from:

Developer + QA + Release Manager

to:

Product Owner + Exception Handler

Claude may help discover, plan, code, test and repair, but:

  • Claude never has root.
  • Claude never directly releases production.
  • Policy remains authoritative.
  • Case content never enters the development domain.
  • Auto Dev may develop control-plane code, but may never auto-deploy or auto-upgrade the control plane.
  • Production auto-release remains OFF until G9 is explicitly enabled through root-owned policy.

1. Timing, Priority and Session Rules

1.1 Immediate scope

Before the hearing ends, the only authorized implementation start is:

  1. A0 read-only compatibility audit.
  2. After A0 is reviewed and passes, A1/A2 may be started in later Owner-started sessions.
  3. No unattended Claude before the hearing ends.

Do not interpret “start development now” as authorization for unattended work, production changes, root actions, G4b, G9, or production Release Agent installation.

1.2 Current priority: E0-Slim frozen, Auto Dev active

Owner has now explicitly frozen E0-Slim.

Therefore:

  • E0-Slim must not be started, resumed, modified, tested, or used as an active development task unless the Owner explicitly unfreezes it later.
  • Auto Dev is the current active development priority.
  • Auto Dev runs in a separate Claude session and separate worktree.
  • The Auto Dev task must not enter, modify, test, or inspect the E0-Slim worktree or its outputs.
  • No resources need to be reserved for E0-Slim while it remains frozen.
  • Production release freeze and hearing-week Owner-attention protections remain separate controls.

From 2026-10-05 through hearing end on 2026-10-10:

  • no unattended Claude;
  • Auto Dev runs only when the Owner explicitly starts a session;
  • any Owner/root/security/product decision becomes WAITING;
  • production release freeze remains active.

1.3 No unattended work before hearing

Option A is selected.

Until hearing end:

  • no persistent Claude session;
  • no systemd/tmux/screen/background Claude loop;
  • no cron or scheduler that launches Claude;
  • no autonomous D5/G3 start;
  • no “continue while Owner is away”.

After hearing, unattended work can be reconsidered only after:

  • D0/D1 permission separation passes;
  • dedicated/capped dev model credential or equivalent usage-isolation exists;
  • resource guards are active;
  • hard timeouts are active.

2. Branch and Worktree Rules

devcontrol/d1 remains frozen and untouched.

Auto Dev must:

  • create a new branch such as `autodev/a0` from the audited `devcontrol/d1` commit;
  • create a separate worktree for Auto Dev;
  • never commit directly to `devcontrol/d1`;
  • never alter D2;
  • keep Dev Control D2 frozen.

The Auto Dev worktree must not be the E0-Slim worktree.


3. Existing Dev Control v1.2 State Model Is Authoritative

Candidate states remain:

  • DISCOVERED
  • PROPOSED
  • APPROVED
  • AUTO_APPROVED
  • PROMOTED_TO_TASK
  • REJECTED
  • DUPLICATE
  • OBSOLETE

Do not introduce NEW / IGNORED / BLOCKED / CONVERTED database states merely for UI wording.

Low-risk auto-approved path:

DISCOVERED → PROPOSED → AUTO_APPROVED → PROMOTED_TO_TASK

Medium-risk path:

DISCOVERED → PROPOSED → APPROVED → PROMOTED_TO_TASK

High-risk path:

DISCOVERED → PROPOSED → REJECTED(reason=POLICY_BLOCKED)

Task states already implemented in Dev Control v1.2 remain authoritative.

CANCEL_REQUESTED must remain. A task is not shown as cancelled until the executor/worker confirms stop.


4. A0 Permission Audit Must Not Read Case Content

A0 may inspect:

  • paths;
  • owners;
  • groups;
  • mode bits;
  • ACLs;
  • mount options;
  • whether the dev identity can open a protected file;
  • whether the dev identity can write a protected path.

A0 must never:

  • read file contents;
  • print case filenames beyond the minimum path needed for the permission test;
  • open E0-Slim worktree content;
  • inspect E0-Slim outputs;
  • parse case documents;
  • query production DB rows.

If actual-open testing is necessary:

  • open then immediately close;
  • read zero bytes;
  • record only success or permission-denied;
  • permission-denied is the expected PASS for protected resources.

A0 must also record:

  • every path/script/config that root executes;
  • whether the dev user can write to any of them;
  • whether a privileged launcher resolves or executes developer-writable code.

4.1 Secret-Safe Audit Rules

A0 must treat credentials and secrets as protected content, even when they are not case data.

A0 must never cat, print, copy, or otherwise emit values from files that may contain credentials, including but not limited to:

  • `.env` files;
  • systemd `EnvironmentFile` files;
  • Cloudflare tunnel tokens;
  • API keys;
  • model/provider credentials;
  • backup passwords;
  • database passwords;
  • service tokens;
  • private keys.

For such files, A0 may record only:

  • path;
  • owner;
  • group;
  • mode;
  • ACL;
  • whether the dev identity can read/write it.

If configuration structure must be inspected, only key names may be shown and every value must be replaced with <redacted>.

The A0 report must contain no token, password, secret, private key, credential value, or secret-bearing URI.

4.2 Non-Mutating Write-Permission Tests

A0 must determine writability without mutating production or protected paths.

Allowed:

  • `test -w <path>`;
  • `access(W_OK)` or equivalent permission check;
  • mode/ACL inspection;
  • parent-directory permission analysis.

Forbidden:

  • `touch`;
  • opening with write/create/truncate flags;
  • creating a temporary file inside a protected production directory;
  • chmod/chown/setfacl;
  • any write that changes timestamps, content, directory entries, or metadata.

If a protected path is unexpectedly writable, that is a finding to report. Do not “verify” it by writing.

For sudo inspection, the only allowed command is:

sudo -n -l

No other sudo command may be executed. Do not trigger an interactive password prompt.

4.3 Source-Only Schema Inspection and Case-Filename Minimization

Candidate/Task schema and enum discovery must come from:

  • repository source code;
  • migration files;
  • schema definitions checked into the dev repository.

Do not open production dev_control.db or the production main database to discover schema or enum definitions, even read-only.

For case directories:

  • do not list filenames;
  • do not emit filenames into Claude context or reports;
  • record only directory path, owner/group/mode/ACL, and an aggregate file count if needed.

Case filenames may themselves contain party/case details and are therefore treated as protected metadata.

5. Root and Windows Actions

Claude must never request, simulate, or perform root/admin actions.

If implementation requires:

  • creating `luckybuilder`;
  • creating `luckybridge`;
  • installing systemd services;
  • changing polkit/sudo;
  • creating a Windows user;
  • configuring WSL host-level settings;
  • changing root-owned files;

Claude must:

  1. write an install script or exact command checklist;
  2. mark the step WAITING_FOR_OWNER;
  3. continue only with safe unprivileged work;
  4. not repeatedly ask the Owner during hearing week.

These steps remain waiting until the Owner explicitly executes them.


6. Separate Session, Worktree and Resource Controls

Auto Dev must use:

  • a separate Claude session;
  • a separate worktree;
  • a separate task log;
  • heavy-job concurrency = 1.

Any build/test wrapper must support:

  • `nice` or equivalent CPU priority reduction;
  • cgroup/systemd-run/resource limits when available;
  • hard timeout;
  • disk guard.

Before A1/A2 heavy work is allowed, the implementation must document a model-usage isolation mechanism:

Preferred:

  • dedicated dev API/model credential with spending/rate cap.

If the current Claude product does not support a separate credential:

  • record `DEDICATED_DEV_KEY=UNAVAILABLE`;
  • do not fake one;
  • enforce session-based manual start plus explicit usage budget/stop conditions;
  • A0 may still proceed.

7. Explicit State Machine, Idempotency and Recovery

Every Candidate / Task / Run / Release operation must have:

  • operation_id;
  • run_id;
  • deterministic transition rules;
  • audit event;
  • duplicate suppression;
  • restart recovery;
  • concurrency guard.

Retries must not duplicate:

  • task creation;
  • approval;
  • release;
  • rollback;
  • notifications.

Claude cannot authoritatively write:

  • verified test result;
  • final release state;
  • rollback success;
  • production health result.

8. Release State Store Ownership

Release lifecycle must use a separate Release/Run store owned by the Release Agent trust domain.

Requirements:

  • Release Agent is the only writer of authoritative release state.
  • Dev Bridge and Claude are not allowed to mutate authoritative release state.
  • Bridge/Claude receive copies through append-only events or read-only views.
  • Approval records may be created by the approval service, but Release Agent independently validates them.
  • Release state transitions are evented and idempotent.

9. Clean Builder and Artifact Store

Use a distinct builder identity such as luckybuilder.

Builder source must come from its own clean clone/archive of the exact commit.

Forbidden inputs:

  • Claude working tree;
  • untracked files;
  • uncommitted changes;
  • developer-home temporary files;
  • case data;
  • production credentials.

Dependencies:

  • only from declared lockfiles;
  • hash/integrity verification where ecosystem supports it;
  • limited/allowlisted package mirror or registry;
  • no arbitrary dependency URL discovered from runtime text.

Artifact store:

  • only `luckybuilder` may write new artifacts/manifests;
  • Release Agent reads artifacts but does not rebuild;
  • Claude/Bridge cannot modify an existing artifact;
  • artifacts are immutable by digest.

Required invariant:

release_artifact_sha256

== verified_artifact_sha256

== staging_artifact_sha256


10. CONTROL_PLANE_PROTECTED

Permanently protected:

  • Release Agent;
  • Dev Bridge;
  • Policy Engine;
  • Builder runner/service definitions;
  • backup/restore control;
  • rollback control;
  • fresh-auth / approval security;
  • worker auth/gateway;
  • auth/session/network/Cloudflare control;
  • privileged systemd/polkit/sudo/root integration.

Claude may develop and test them in dev.

Auto Dev may never production-deploy them, even with G9 ON.

Production install requires:

  • Owner review;
  • protected/manual root installation.

11. Release Agent

Properties:

  • deterministic;
  • model-free;
  • no public hostname;
  • no public release TCP endpoint;
  • no generic shell endpoint;
  • no root;
  • no sudo.

IPC:

  • Unix domain socket;
  • filesystem ACL;
  • OS peer credentials;
  • allowlisted caller identity.

Release request validates:

  • request ID;
  • task ID;
  • commit SHA;
  • artifact digest;
  • builder run;
  • verified runs;
  • staging run;
  • policy snapshot;
  • live policy;
  • freeze state;
  • approval if needed;
  • expiry;
  • replay/idempotency.

Live policy rule

A release is blocked if the current live policy is stricter than the policy snapshot used during verification.

A stale snapshot can never override a newer stricter live policy.


12. Backup Attestation Authenticity

Release Agent does not gain production DB read access just to create backups.

Backup attestation must specify:

  • backup_id;
  • database/storage set covered;
  • created_at;
  • integrity_verified_at;
  • source release context;
  • producer identity;
  • attestation signature/MAC or equivalent protected provenance.

Only the protected Backup Service / root-owned backup path may write authoritative backup attestations.

Release Agent only reads/verifies the attestation.

Production release requires:

  • backup covers every production datastore affected by the release;
  • backup age is within root-owned freshness limit;
  • integrity verification is successful;
  • attestation provenance is valid.

Restore test may be periodic rather than per release.


13. Dev Verify Worker Boundary

Separate WSL distro alone is insufficient.

Minimum accepted same-PC design:

  • separate Windows user;
  • dedicated WSL distro;
  • Linux user `luckyverify`;
  • Windows interop OFF;
  • automount OFF;
  • Windows PATH not inherited;
  • no C: mount;
  • no user-profile mount;
  • no case data;
  • no Case Worker credential;
  • no production credential;
  • no model credential.

Before Claude-written E2E code runs, prove the worker cannot:

  • access case files;
  • invoke Windows tools to bypass isolation;
  • invoke another WSL distro;
  • access the Case Worker without authorization.

Failure means STOP and move to a separate machine/VM or equivalent verifiable isolation.


14. Dev Verify Worker → Staging Path

Define an explicit staging path.

Requirements:

  • separate staging hostname from production;
  • synthetic data only;
  • dedicated staging identity;
  • Cloudflare Access service token or equivalent machine credential;
  • token scoped only to staging;
  • no production hostname permission;
  • no real case access.

The Worker must not reuse Owner browser cookies.


15. Safe Fault Injection

Allowed:

  • injected ENOSPC;
  • failpoints;
  • quota-limited directories;
  • bounded tmpfs;
  • isolated sandbox.

Forbidden:

  • filling VPS root FS;
  • filling WSL VHDX;
  • filling Windows disk;
  • damaging global network/systemd/credentials.

16. Migration / Rollback

No migration:

  • code-only automatic rollback may be enabled after its gate.

Any DB migration:

  • AUTO_RELEASE = FORBIDDEN;
  • AUTO_ROLLBACK = FORBIDDEN;
  • manual approval/release required;
  • explicit compatibility/recovery plan required.

17. Owner Approval and Fresh Auth

D-2 may be developed but remains OFF until fresh-auth passes.

Approval binds:

  • owner;
  • task_id;
  • release_request_id;
  • commit_sha;
  • artifact_sha256;
  • expires_at.

Preferred:

Passkey/WebAuthn step-up challenge including:

  • release_request_id;
  • artifact_sha256;
  • nonce;
  • expiry.

Long-lived app session or Cloudflare Access token alone is not sufficient recent-auth proof.


18. Production Synthetic Checks

Use:

  • dedicated synthetic account;
  • dedicated synthetic project/case;
  • no permission to real cases;
  • no real-case read/write.

Prefer no-model deterministic checks.

Any real model call:

  • low frequency;
  • separate budget;
  • counted in Auto Dev cost metrics.

19. Monitoring and Low-Traffic Rollback

High-traffic signal:

  • 5xx > 2% in 5 minutes;
  • request count >= 20.

Low-traffic fallback:

  • critical healthcheck fails twice; or
  • critical synthetic transaction fails twice; or
  • browser smoke reaches configured consecutive-failure threshold.

Low traffic must not disable rollback protection.


20. Freeze Window

Default:

5 days before hearing → hearing end.

For 2026-10-10 hearing:

production release freeze begins 2026-10-05.

Freeze:

  • blocks new production release;
  • does not block supervised dev-only work;
  • does not block necessary rollback.

21. Notifications

Default:

  • low/medium normal events → overnight brief only;
  • no nighttime Owner interruption.

Immediate notification channel for severe production incident/rollback remains an explicit Owner decision.

Until configured:

  • log event;
  • do not invent external notification channel.

22. Production Signals

Use existing G4b.

No duplicate G10.

G4b default = OFF.

Allowed:

  • counts;
  • latency;
  • status aggregates;
  • job failure counts.

Forbidden:

  • prompt content;
  • case text;
  • uploaded file contents;
  • generated legal document contents.

23. G9

Historical rule: root production release is manual.

G9 is the only explicit limited supersession.

G9:

  • must be explicitly enabled by Owner + root-owned policy;
  • applies only to AUTO_ELIGIBLE application releases;
  • never covers CONTROL_PLANE_PROTECTED;
  • never covers DB migrations;
  • is independently reversible.

24. Resource and Cost Protection

Before continuous discovery or any future unattended mode:

VPS

  • heavy-job concurrency = 1;
  • production priority;
  • nice/cgroup limits;
  • disk guard;
  • artifact/log/worktree TTL;
  • hard operation timeout;
  • queue backpressure.

Model cost

  • daily budget;
  • monthly budget;
  • discovery-frequency cap;
  • max repair rounds = 2;
  • Candidate analysis cap;
  • no 24/7 Claude session.

Correct future discovery design:

scheduler

→ deterministic collectors

→ structured signals

→ dedup

→ confidence gate

→ budget gate

→ Claude on demand

Hard timeout

Every autonomous operation must have a hard timeout.

On timeout:

  • executor terminates;
  • cleanup runs;
  • state becomes FAILED or NEEDS_ATTENTION;
  • Claude cannot extend its own timeout.

Candidate noise budget

Must include:

  • fingerprint dedup;
  • confidence threshold;
  • per-cycle Candidate cap;
  • repeated-signal aggregation;
  • per-day analysis cap.

Worker idle policy

No persistent browser or model workload while idle.

Soft/hard thresholds

For disk, CPU, RAM, daily model use, monthly model use, and queue length:

  • warning threshold;
  • hard-stop threshold;
  • emergency reserve.

Hard-stop logic is deterministic and outside Claude control.


25. Immediate Allowed Scope

Before hearing, the current authorized step is:

A0 only.

After A0 is reviewed and passes, the Owner may start A1 and A2 in later supervised sessions.

Do not:

  • modify `devcontrol/d1`;
  • unfreeze D2;
  • install production Release Agent;
  • apply root/Windows changes;
  • read case contents;
  • enter E0-Slim worktree;
  • enable G4b;
  • enable G9;
  • run unattended Claude.

26. Verdict

STATUS = PASS FOR SUPERVISED A0 NOW

A0 must run:

  • in a new `autodev/a0` branch/worktree cut from the audited frozen `devcontrol/d1` commit;
  • in an Owner-started separate Claude session;
  • while E0-Slim remains frozen and untouched;
  • read-only with respect to production;
  • without case-content access;
  • without root/admin actions.

2. Implementation Plan v1.2.3

Lucky.ai Auto Dev — Implementation Plan v1.2.3

Baseline: Requirements v1.3.3
Current authorization: A0 ONLY
Unattended Claude before hearing: NO
devcontrol/d1: FROZEN / READ-ONLY SOURCE
D2: FROZEN

Phase A0 — Read-only Compatibility and Permission Audit

Start conditions

  • Owner starts a separate Claude session.
  • E0-Slim is already frozen and must remain untouched.
  • Auto Dev is the current active development priority.
  • Create separate Auto Dev worktree.
  • Branch from the audited `devcontrol/d1` commit into `autodev/a0`.
  • Do not modify `devcontrol/d1`.

Inspect

  • current D1 HEAD;
  • production deployed SHA;
  • Candidate schema/enum;
  • Task schema/enum;
  • CANCEL_REQUESTED semantics;
  • AUTO_APPROVED support;
  • audit/event tables;
  • operation_id/run_id support;
  • dev_control DB location;
  • identity split status;
  • luckybridge existence/status;
  • root-owned release path;
  • backup architecture;
  • current gates including G4b;
  • every path/script/config executed by root;
  • whether dev identity can write to anything root executes.

Production/case/secret permission probe

Allowed:

  • stat;
  • owner/group/mode/ACL inspection;
  • mount-option inspection;
  • open-then-close with zero-byte read when necessary;
  • `test -w` / `access(W_OK)` and ACL/mode analysis for writability;
  • aggregate file count for a protected case directory if needed.

Forbidden:

  • reading case contents;
  • listing case filenames;
  • DB row queries;
  • opening production `dev_control.db` or the production main DB to discover schema;
  • parsing production documents;
  • entering E0-Slim worktree/output;
  • copying case files;
  • `touch` or any write/create/truncate-based permission test;
  • printing secret-bearing configuration values.

Secrets:

  • never `cat`, print or copy `.env`, EnvironmentFile contents, API keys, Cloudflare tokens, backup passwords, service tokens or private keys;
  • if config structure must be inspected, emit key names only with values `<redacted>`;
  • report must contain no credential values.

Sudo:

  • only `sudo -n -l` is permitted for privilege inspection;
  • no other sudo command;
  • no interactive password prompt.

Schema/enums:

  • derive from repository source/migrations/schema definitions only.

Expected PASS for protected content:

permission denied.

Root/admin discoveries

If A0 discovers a need for root or Windows admin:

  • write exact install script/checklist;
  • mark WAITING_FOR_OWNER;
  • do not execute or simulate privileged change.

Deliverable

AUTODEV_A0_COMPATIBILITY_REPORT.md

Minimum fields:

  • A0_RESULT
  • SOURCE_D1_COMMIT
  • AUTODEV_BRANCH
  • AUTODEV_WORKTREE
  • PRODUCTION_SHA
  • CANDIDATE_STATES
  • TASK_STATES
  • CANCEL_REQUESTED
  • AUTO_APPROVED
  • D1_IDENTITY_SPLIT
  • LUCKYBRIDGE_STATUS
  • ROOT_RELEASE_HARDENING
  • DEV_CONTROL_DB
  • G4B_STATUS
  • DEV_CAN_WRITE_ROOT_EXECUTED_PATH
  • CASE_CONTENT_READ_ATTEMPTED=NO
  • E0_SLIM_WORKTREE_TOUCHED=NO
  • ROOT_ACTION_TAKEN=NO
  • BLOCKERS
  • WAITING_FOR_OWNER
  • NEXT_SAFE_STEP

Gate

A0_COMPAT_PASS

Stop after A0 and report. Do not continue automatically to A1 before Owner review during hearing period.


Phase A1 — State Integration

Start only in a later Owner-started session after A0 review.

Use existing Candidate/Task states unchanged.

Preserve CANCEL_REQUESTED.

If reason metadata requires schema migration:

  • prepare migration proposal;
  • do not apply automatically.

Define authoritative Release/Run store:

  • owned by Release Agent trust domain;
  • Release Agent only authoritative writer;
  • Bridge/Claude receive event copies/read-only views.

Gate:

A1_STATE_COMPAT_PASS


Phase A2 — Clean Builder and Artifact Store

Start only after A1 PASS.

Builder:

  • separate identity;
  • own clean clone/archive;
  • exact commit input;
  • no Claude worktree input;
  • lockfile-only dependencies;
  • integrity/hash checks where supported;
  • limited package registry/mirror;
  • no case/prod secrets.

Artifact store:

  • builder is only writer;
  • immutable by digest;
  • Release Agent read-only;
  • Bridge/Claude cannot overwrite artifact.

Before heavy A2 build/test:

  • resource wrapper exists;
  • nice/cgroup limits documented;
  • hard timeout active;
  • disk guard active;
  • model-usage isolation documented.

Gate:

A2_CLEAN_BUILDER_PASS


Later Phases

A3 — Immutable Artifact Pipeline

A4 — CONTROL_PLANE_PROTECTED policy

A5 — Dev-only Release Agent

A6 — D1 security prerequisite gate

A7 — authenticated backup attestation

A8 — hardened Dev Verify Worker

A9 — safe E2E/fault injection

A10 — repair

A11 — monitoring/rollback

A12 — fresh auth

A13 — UI

A14 — discovery

A15 — staging E2E

No unattended Claude before hearing end.

Production-facing work waits for the required security gates.


Release-Time Policy Rule

At release:

  • validate policy snapshot used during verification;
  • also read current live policy;
  • if live policy is stricter, block release;
  • stale snapshot never overrides stricter live policy.

Dev Verify Worker → Staging

When A8 is reached:

  • separate staging hostname;
  • dedicated machine/service identity;
  • Cloudflare Access service token or equivalent;
  • token scoped only to staging;
  • synthetic data only;
  • no production cookies/credentials.

Backup Attestation

When A7 is reached:

Authoritative writer:

  • protected Backup Service only.

Attestation includes:

  • backup_id;
  • covered datastores;
  • created_at;
  • integrity_verified_at;
  • producer identity;
  • protected signature/MAC or equivalent provenance;
  • source release context.

Release requires:

  • all affected datastores covered;
  • freshness within root-owned threshold;
  • integrity verified;
  • provenance valid.

Current Execution Order

NOW:

A0 only, with Auto Dev as the current active development task.

E0-Slim remains frozen.

After Owner reviews A0:

A1

After A1 passes:

A2

Do not auto-chain A0 → A1 → A2 during hearing week.

PLAN STATUS = PASS

3. Claude A0 Start Prompt v1.3.3

# Claude Code Start Prompt — Lucky.ai Auto Dev A0 Only

You are working on Lucky.ai Auto Dev.

This session is authorized for A0 ONLY.

Do not continue to A1 or A2 automatically.

## Priority and timing

- E0-Slim is already FROZEN by the Owner.
- Do NOT start, resume, modify, test, or inspect E0-Slim.
- Auto Dev is the current active development priority.
- This Auto Dev session is explicitly Owner-started.
- No unattended Claude before the 2026-10-10 hearing ends.
- Do not leave a persistent/background Claude process running.

## Frozen branches

`devcontrol/d1` is frozen.

Dev Control D2 is also frozen.

You must:

1. identify the exact current `devcontrol/d1` commit;
2. create a NEW branch such as `autodev/a0` from that exact commit;
3. create a SEPARATE worktree for Auto Dev;
4. leave `devcontrol/d1` itself untouched;
5. never touch the E0-Slim worktree or its outputs;
6. do not reserve development time or resources for E0-Slim while it remains frozen.

Do not commit to `devcontrol/d1`.

## A0 objective

Perform a read-only compatibility and permission audit.

Inspect:

- current D1 HEAD;
- production deployed SHA;
- Candidate enum/schema;
- Task enum/schema;
- CANCEL_REQUESTED semantics;
- AUTO_APPROVED support;
- audit/event tables;
- operation_id/run_id support;
- dev_control DB location;
- current D1 dev/prod identity split status;
- luckybridge existence/status;
- root-owned privileged release entrypoint;
- backup architecture;
- existing gate names, especially G4b;
- every script/path/config that root executes;
- whether the dev user can write to anything root executes.

## Absolute case-data and secret-data restriction

A0 MUST NOT READ CASE CONTENT OR SECRET VALUES.

You may inspect:

- path;
- owner;
- group;
- mode;
- ACL;
- mount options;
- whether the dev identity can open a protected file;
- whether the dev identity can write a protected path.

### Case content

If actual open testing is necessary:

- open and immediately close;
- read ZERO bytes;
- record only SUCCESS or EACCES/permission-denied;
- do not emit file content.

For protected case data, permission denied is the expected PASS.

For case directories:

- do NOT list filenames;
- record only the directory path, owner/group/mode/ACL, and an aggregate file count if needed;
- filenames are protected metadata because they may contain case/party details.

### Secrets and credentials

Never `cat`, print, copy, or otherwise emit credential-bearing values from files such as:

- `.env`;
- systemd `EnvironmentFile`;
- Cloudflare tunnel/token files;
- API/model/provider credential files;
- backup password files;
- database credential files;
- service-token files;
- private keys.

For such files, record only:

- path;
- owner;
- group;
- mode;
- ACL;
- read/write accessibility result.

If configuration structure must be inspected, show KEY NAMES ONLY and replace every value with `<redacted>`.

The A0 report must contain NO tokens, keys, passwords, credential values, private keys, or secret-bearing URIs.

### Schema / enum discovery

Candidate and Task schemas/enums must be obtained from:

- repository source code;
- repository migration files;
- checked-in schema definitions.

Do NOT open production `dev_control.db` or the production main database to discover schemas/enums, even read-only.

Do NOT:

- parse case files;
- read case text;
- query production DB rows;
- copy case files;
- enter the E0-Slim worktree;
- inspect E0-Slim outputs.


## Non-mutating write and sudo checks

When checking whether the dev identity can write a production/protected path:

Allowed:

- `test -w <path>`;
- `access(W_OK)` or equivalent;
- mode/ACL inspection;
- parent-directory permission analysis.

Forbidden:

- `touch`;
- open with write flags;
- create flags;
- truncate flags;
- creating probe files in production/protected directories;
- chmod/chown/setfacl;
- any operation that mutates content, timestamps, directory entries, or metadata.

If a protected path is unexpectedly writable:

- record it as a finding;
- do NOT prove it by writing.

For sudo privilege inspection, the ONLY allowed sudo command is:

`sudo -n -l`

Do not execute any other sudo command.
Do not trigger an interactive password prompt.


## Root / Windows / privileged actions

Never request, simulate, or perform root/admin actions in this session.

If you determine that a later phase needs:

- luckybuilder user;
- luckybridge user;
- systemd service installation;
- polkit/sudo changes;
- root-owned file changes;
- Windows user creation;
- WSL host-level configuration;

then:

1. write an exact install script or Owner checklist;
2. mark it `WAITING_FOR_OWNER`;
3. do not execute it;
4. do not repeatedly ask the Owner during hearing week.

## Resource rules

This A0 session must remain light.

Do not run heavy builds or browser tests.

Do not run more than one heavy process.

Do not start persistent Claude loops.

Do not enable G4b or G9.

Do not install Release Agent.

Do not modify production.

## A0 deliverable

Create:

`AUTODEV_A0_COMPATIBILITY_REPORT.md`

It must include at least:

- A0_RESULT=PASS / FAIL / PASS_WITH_BLOCKERS
- SOURCE_D1_COMMIT=...
- AUTODEV_BRANCH=...
- AUTODEV_WORKTREE=...
- PRODUCTION_SHA=...
- CANDIDATE_STATES=...
- TASK_STATES=...
- CANCEL_REQUESTED=...
- AUTO_APPROVED=...
- D1_IDENTITY_SPLIT=...
- LUCKYBRIDGE_STATUS=...
- ROOT_RELEASE_HARDENING=...
- DEV_CONTROL_DB=...
- G4B_STATUS=...
- DEV_CAN_WRITE_ROOT_EXECUTED_PATH=YES/NO/UNKNOWN
- CASE_CONTENT_READ_ATTEMPTED=NO
- SECRET_VALUE_READ_OR_EMITTED=NO
- CASE_FILENAMES_LISTED=NO
- PRODUCTION_DB_OPENED_FOR_SCHEMA=NO
- MUTATING_WRITE_TEST_USED=NO
- SUDO_COMMANDS_OTHER_THAN_N_L_USED=NO
- E0_SLIM_WORKTREE_TOUCHED=NO
- ROOT_ACTION_TAKEN=NO
- BLOCKERS=...
- WAITING_FOR_OWNER=...
- NEXT_SAFE_STEP=...

## Stop condition

After writing the report:

STOP.

Do not start A1.

Do not start A2.

Do not ask for root.

Do not touch production.

Return the report summary to the Owner and wait for the next Owner-started session.

Begin A0 now.