This file is the single source of truth for how Codex must work in this repository. Primary goal: ship small, safe changes that preserve existing behavior and architecture.
Neon Vision Editor is a native SwiftUI/AppKit editor focused on speed, stability, and minimalism. Avoid "helpful refactors." Fix or implement exactly what is requested.
- Do NOT touch working code unless strictly required.
- No opportunistic refactors.
- No renaming/moving for aesthetics.
- Do not introduce deprecated Apple APIs.
- Modern Swift patterns only if required for the task.
- No telemetry.
- No sensitive logging (documents, prompts, tokens).
- Network calls only when explicitly user-triggered.
- API tokens must remain in Keychain.
- No weakening sandbox or file security.
- Minimal patches only.
- If change is large, split into phases.
- If diff exceeds reasonable review scope, stop and split.
- No accidental shared state across windows/scenes.
- Window state must remain isolated unless explicitly designed otherwise.
- UI mutations must be on main thread /
@MainActor. - No blocking IO, parsing, or network on main thread.
Neon Vision Editor ships on:
- macOS
- iOS
- iPadOS
ANY change targeting one platform MUST prove it does not break the others.
- No AppKit types in shared code without
#if os(macOS)guards. - No UIKit-only APIs leaking into macOS builds.
- Shared models must remain platform-agnostic.
A patch is NOT acceptable without explicit iOS and iPadOS verification steps.
Your response MUST include either:
A) Exact build commands executed for:
- macOS
- iOS simulator
- iPad simulator
OR
B) A detailed manual verification checklist for:
- macOS
- iOS
- iPadOS
If this section is missing, the answer is incomplete.
Prefer the repo matrix script when Xcode and simulator services are available:
scripts/ci/build_platform_matrix.shIt runs macOS, iOS Simulator, and iPad Simulator builds sequentially with CODE_SIGNING_ALLOWED=NO. By default it writes to .DerivedDataMatrix and removes it on exit. Use --keep-derived-data only when actively debugging build artifacts, then remove the derived data directory before finishing.
Equivalent individual commands, when the matrix script is not suitable:
xcodebuild -project "Neon Vision Editor.xcodeproj" -scheme "Neon Vision Editor" -configuration Debug -destination "generic/platform=macOS" -derivedDataPath .DerivedData-macOS CODE_SIGNING_ALLOWED=NO build
xcodebuild -project "Neon Vision Editor.xcodeproj" -scheme "Neon Vision Editor" -configuration Debug -sdk iphonesimulator -destination "generic/platform=iOS Simulator" -derivedDataPath .DerivedData-iOS CODE_SIGNING_ALLOWED=NO build
xcodebuild -project "Neon Vision Editor.xcodeproj" -scheme "Neon Vision Editor" -configuration Debug -sdk iphonesimulator -destination "generic/platform=iOS Simulator" -derivedDataPath .DerivedData-iPad TARGETED_DEVICE_FAMILY=2 CODE_SIGNING_ALLOWED=NO buildRemove any .DerivedData* folders created during verification before returning.
Every UI-affecting change must consider:
- VoiceOver (macOS + iOS/iPadOS)
- Keyboard navigation (macOS + iPad with keyboard)
- Focus management
You must explicitly state:
- What accessibility elements were affected
- How labels/traits remain correct
- That focus order is preserved
- That no UI state traps accessibility focus
If accessibility validation is missing, the patch is incomplete.
At the top of every implementation response, state:
MODE: BUGFIX/DEBUGorMODE: NEW FEATURE
If unclear, default to BUGFIX/DEBUG.
Crashes, regressions, incorrect behavior, UI glitches, build failures, performance issues.
- Do not change expected behavior unless clearly wrong.
- Fix smallest surface possible.
- Prefer guards and state corrections over redesign.
- Debug logs must be
#if DEBUGgated.
- Repro steps
- Root cause hypothesis
- Minimal patch plan
- Patch
- Verification
- macOS
- iOS
- iPadOS
- Accessibility checks (if UI touched)
- Risk assessment
If any section is missing, the response is invalid.
New UI, new settings, new editor capability, new integration.
- Must fit lightweight editor philosophy.
- No IDE bloat.
- Integrate into existing infrastructure.
- No hidden default behavior changes.
- Must define macOS interaction model.
- Must define iOS touch interaction.
- Must define iPad keyboard/multitasking behavior.
- If platform-limited, explicitly guard and document.
- User problem
- Proposed solution
- Why this fits scope
- Alternatives considered
- Minimal phased plan
- Patch
- Acceptance criteria
- Verification checklist
- macOS
- iOS
- iPadOS
- Accessibility validation
- Security/privacy impact
- Performance impact
If cross-platform verification is missing, the patch is invalid.
Install the repo hooks before routine development:
scripts/install_git_hooks.shThe pre-commit hook auto-bumps CURRENT_PROJECT_VERSION for non-doc-only commits. Set NVE_SKIP_BUILD_NUMBER_BUMP=1 only for intentional release/doc automation commits that should not bump the build number.
Use dry-run validation before creating or pushing release tags:
scripts/release_dry_run.sh v0.6.2Use the full release orchestrator only from a clean, authenticated repo with gh available:
scripts/release_all.sh v0.6.2 --dry-run
scripts/release_all.sh v0.6.2 notarizedIf an existing tag must be repointed as part of a notarized release, the supported command shape is:
scripts/release_all.sh v0.6.2 notarized --retagUse --resume-auto to continue an interrupted release flow after checking whether local and remote tags already exist.
For release-specific local checks, run:
scripts/ci/release_preflight.sh v0.6.2This validates release docs, README metrics freshness when applicable, critical runtime tests, and icon payloads.
- Explicit naming over comments.
- Comments explain WHY, not WHAT.
- No clever hidden logic.
- No dead code.
- No temporary hacks.
Stop and ask for clarification if:
- Feature requires architectural rewrite.
- Expected behavior is ambiguous.
- Security posture would change.
- Cross-platform behavior cannot be guaranteed.
Do NOT guess.
Remove .DerivedData* folders after use so they are not accumulated.