- Build executable only:
swift build - Build app bundle:
make build - Build release zip:
make dist - Dev run:
make run FILE=/absolute/path/to/file.md - Install app bundle:
make install - Clean build artifacts:
make clean
No dedicated test, lint, or typecheck command is configured. Use swift build for compile/type checking and make build when app bundle packaging or Resources/Info.plist changes.
Package.swift- SwiftPM package for themarkitexecutable, macOS 13+, Swift 5.9+, withapple/swift-markdown.Sources/MarkitApp.swift- SwiftUI app entry point and window sizing.Sources/AppDelegate.swift- file opening, CLI argument handling, markdown parsing, and app state hydration.Sources/ContentView.swift- main SwiftUI shell, empty/error states, HUD, andWebViewhosting.Sources/WebView.swift-WKWebViewbridge, injected JavaScript, selection handling, highlighting, popovers, and export messages.Sources/MarkdownRenderer.swift- markdown-to-HTML renderer.Sources/AnnotationStore.swift- annotation sidecar JSON persistence.Sources/Config.swift- app data paths and shortcut config loaded from~/.markit/config.json.Resources/Info.plist- app bundle metadata copied bymake build.markit- CLI shim used by README install instructions.
- Make surgical changes and match the existing Swift/SwiftUI style.
- Keep the source markdown files read-only; the app stores annotations under
~/.markit/annotations/. - Keep shortcut behavior aligned between
Sources/Config.swift, injected JavaScript inSources/WebView.swift, and README documentation. - Avoid broad rewrites of
Sources/WebView.swift; changes there should be localized and manually verified because it contains the selection/highlight/export bridge. - Do not reformat unrelated files or update screenshots unless the UI change requires it.
- For most code changes, run
swift build. - For packaging, launch,
Info.plist, or app bundle changes, runmake build. - For release archive changes, run
make dist. - For UI or annotation workflow changes, run
make run FILE=/absolute/path/to/sample.mdand check selection, comment save, highlight display, deletion, and export. make runterminates any runningmarkitinstance before relaunching.
- Do not edit generated build output in
.build/or.swiftpm/. - Do not edit
Package.resolvedunless dependency changes require it. - Do not delete or modify user data under
~/.markit/unless explicitly asked. - Ask before destructive filesystem, application install, or git operations.
- No Claude handoffs or project memory were found to migrate during init.
- Use
$startto create localhandoffs/andbacklog.mdfor Codex session tracking when needed.